PageSourceSearch

https://account.canapii.com/chunk-55LXKGVA.js

js canapii.com collected 2026-10-01 12:00:23 UTC 13,554 bytes, 1 lines download raw bytes

1import{a as A}from"./chunk-ICPTETQX.js";import"./chunk-V67KQ2M3.js";import"./chunk-F5LIQWRK.js";import"./chunk-O6T6UJOX.js";import"./chunk-NE7QIBGA.js";import"./chunk-2SGXIXZG.js";import"./chunk-JIFKKBLC.js";import"./chunk-C4MS7DNK.js";import"./chunk-IHJMD6TU.js";import"./chunk-YZMJNOQO.js";import"./chunk-ZM2M4T7I.js";import"./chunk-KATBQBTT.js";import"./chunk-63S7Z45L.js";import"./chunk-BENDDUCM.js";import"./chunk-D7TP2RB2.js";import"./chunk-CCGT3L3J.js";import"./chunk-BRMPHYYJ.js";import"./chunk-VADS3VHW.js";import{c as ue}from"./chunk-QSR4XSOW.js";import{a as R}from"./chunk-EYV3GWVO.js";import"./chunk-F2XU6FO6.js";import"./chunk-HB4JGH6L.js";import"./chunk-VJX6N2HB.js";import"./chunk-H4EPMV5Z.js";import{a as te}from"./chunk-6PXU6RTR.js";import"./chunk-6DH3EJIN.js";import"./chunk-UZY2R5Q5.js";import"./chunk-5GAGQHFR.js";import"./chunk-RXRKGCUL.js";import"./chunk-LW7CZM4G.js";import"./chunk-EW2NZJHY.js";import"./chunk-GAHMBGQ7.js";import"./chunk-UAWJ3VGL.js";import"./chunk-VT7CJSCD.js";import{a as he}from"./chunk-R2ER225G.js";import{C as ae,I as oe,P as se,Q as ce,R as le,T as pe,X as de,Y as me,j as L,k as ie,l as N,u as ne,v as re}from"./chunk-TU3JUKDL.js";import"./chunk-6JETGMQG.js";import"./chunk-VRQFSSVW.js";import"./chunk-Y4544WYO.js";import"./chunk-73R64QIM.js";import{a as ee}from"./chunk-KOEZPSOA.js";import"./chunk-ZEL44FAF.js";import"./chunk-RT33Z4W3.js";import"./chunk-CTTXKPH2.js";import"./chunk-CT5YU3F2.js";import{e as J,h as X,i as Z,j as x}from"./chunk-B5NVKW3K.js";import{k as Y}from"./chunk-MRC2PHN7.js";import{Dd as K,Ec as d,Fa as w,Fc as o,Gc as s,Hc as C,Id as W,Jb as l,Jd as q,Ob as G,Qc as M,Sa as f,Ta as g,Wb as h,Xc as m,Zc as O,bc as b,bd as U,cc as P,cd as E,dd as I,gc as F,ld as c,md as _,nd as T,sd as H,td as $,ud as B,vc as Q}from"./chunk-77LCFR2D.js";import{a as v,b as y,l as S}from"./chunk-6G35VSEK.js";var z=(()=>{class n{constructor(e,t){this.userService=e,this.utilitiesService=t,this.user=null,this.created=new G,this.isLoading=!1,this.isLimitModalOpen=!1}open(){this.user&&(this.isLimitAdminCount=this.user.adminCount<=this.user.adminsRegistered),this.isLimitAdminCount?this.isLimitModalOpen=!0:this.form.open()}onSave(e){return S(this,null,function*(){this.isLoading=!0;try{let t=yield this.userService.create(e);t&&t.success?(this.form.close(),this.created.emit(t.data)):this.utilitiesService.alert({header:"Error",message:t?.message||"Unknown error."})}catch(t){this.utilitiesService.alert({header:"Error",message:t?.message||"Unknown error."})}finally{this.isLoading=!1}})}static{this.\u0275fac=function(t){return new(t||n)(h(R),h(ee))}}static{this.\u0275cmp=b({type:n,selectors:[["app-user-create"]],viewQuery:function(t,i){if(t&1&&U(A,5),t&2){let r;E(r=I())&&(i.form=r.first)}},inputs:{user:"user"},outputs:{created:"created"},decls:10,vars:2,consts:[["form",""],["title","Create admin",3,"save","isLoading"],["heading","Create admin",3,"openChange","open"],[1,"upgrade"],["href","https://canapii.com/pricing","rel","noopener","target","_blank",1,"upgrade-link"],["name","forward"],["src","assets/create-admin.png","alt","Upgrade your plan illustration",1,"upgrade-image"],["cnpModalFooter","","variant","secondary",3,"click"]],template:function(t,i){if(t&1){let r=M();o(0,"app-form",1,0),m("save",function(p){return f(r),g(i.onSave(p))}),s(),o(2,"cnp-modal",2),B("openChange",function(p){return f(r),$(i.isLimitModalOpen,p)||(i.isLimitModalOpen=p),g(p)}),o(3,"div",3)(4,"a",4),c(5," Upgrade your plan to add more admins "),C(6,"cnp-icon",5),s(),C(7,"img",6),s(),o(8,"cnp-button",7),m("click",function(){return f(r),g(i.isLimitModalOpen=!1)}),c(9,"Close"),s()()}t&2&&(d("isLoading",i.isLoading),l(2),H("open",i.isLimitModalOpen))},dependencies:[N,L,de,A],styles:[".upgrade[_ngcontent-%COMP%]{padding:var(--cnp-space-3) 0}.upgrade-link[_ngcontent-%COMP%]{align-items:center;display:flex;font-size:var(--cnp-font-size-title);font-weight:var(--cnp-font-weight-bold);gap:var(--cnp-space-2);justify-content:center;margin-bottom:var(--cnp-space-3);text-align:center}.upgrade-image[_ngcontent-%COMP%]{display:block;margin:0 auto;max-width:100%}"]})}}return n})();var _e=n=>[n];function ve(n,u){if(n&1&&(o(0,"a",19),c(1),s()),n&2){let e=u.value;d("routerLink",K(2,_e,e)),l(),_(e)}}function ye(n,u){if(n&1&&(c(0),W(1,"dateFormat")),n&2){let e=u.value;T(" ",q(1,1,e)," ")}}function Se(n,u){n&1&&C(0,"cnp-spinner",25)}function we(n,u){if(n&1){let e=M();o(0,"div",20)(1,"select",21),m("change",function(i){let r=f(e).$implicit,a=O();return g(a.onNotificationPreferenceChange(i,r.GSI1))}),o(2,"option",22),c(3," Stop receiving email notifications for attendee profile updates "),s(),o(4,"option",23),c(5," Receive email notifications for attendee profile updates "),s()(),F(6,Se,1,0,"cnp-spinner",24),s()}if(n&2){let e=u.$implicit,t=O();l(),d("disabled",t.isLoading||t.updatingNotificationFor.has(e.GSI1)),Q("aria-label","Email notifications for "+e.GSI1),l(),d("selected",!e.isNotifyAttendeeProfileUpdates),l(2),d("selected",e.isNotifyAttendeeProfileUpdates),l(2),d("ngIf",t.updatingNotificationFor.has(e.GSI1))}}var k=(()=>{class n{constructor(e,t,i,r,a){this.userService=e,this.router=t,this.route=i,this.eventService=r,this.toastService=a,this.math=Math,this.columns=[{key:"GSI1",header:"Email",sortable:!0,width:"40%"},{key:"dateCreated",header:"Created",sortable:!0}
1,{key:"emailNotifications",header:"Email notifications"}],this.isLoading=!1,this.updatingNotificationFor=new Set,this.visibleRows=[],this.filteredCount=0,this.sort={key:"GSI1",direction:"asc"},this.currentPage=1,this.pageSize=50,this.searchValue="",this.allRows=[],this.searchFilter="",this.subscription$=[],this.byKey=p=>p.GSI1}ngOnInit(){this.subscription$.push(this.eventService.eventSubject.subscribe(e=>{e&&e.user&&(this.adminCount=e.user.adminCount,this.adminsRegistered=e.user.adminsRegistered,this.adminUsed=this.adminCount-this.adminsRegistered)})),this.subscription$.push(this.userService.onUsersChanged(e=>{this.allRows=e.map(t=>y(v({},t),{isNotifyAttendeeProfileUpdates:t.isNotifyAttendeeProfileUpdates!==void 0?t.isNotifyAttendeeProfileUpdates:!1})),this.refreshRows()})),this.isLoading=!0,this.userService.load(!0).then(()=>{this.isLoading=!1})}ngOnDestroy(){this.subscription$.forEach(e=>e.unsubscribe())}get countLabel(){return`${this.filteredCount} ${this.filteredCount===1?"admin":"admins"}`}get isSearching(){return this.searchFilter.length>0}get emptyHeading(){return this.isSearching?"No matching admins":"No admins yet"}get emptyDescription(){return this.isSearching?"Try a different search term.":"Invite teammates to help manage your event."}get emptyActionLabel(){return this.isSearching?"Clear search":"Create admin"}onEmptyAction(){this.isSearching?this.onSearchChange(""):this.create()}create(){this.createModal.open()}onCreated(e){this.router.navigate([e.GSI1],{relativeTo:this.route})}view(e){this.router.navigate(["users",e])}onSearchChange(e){this.searchValue=e,this.searchFilter=e.trim().toLowerCase(),this.currentPage=1,this.refreshRows()}onSortChange(e){this.sort=e,this.refreshRows()}onPageChange(e){this.currentPage=e,this.refreshRows()}onPageSizeChange(e){this.pageSize=e,this.currentPage=1,this.refreshRows()}onNotificationPreferenceChange(e,t){let r=e.target.value==="enabled";if(this.updatingNotificationFor.has(t))return;let a=this.allRows.findIndex(p=>p.GSI1===t);a!==-1&&(this.allRows[a].isNotifyAttendeeProfileUpdates=r,this.refreshRows()),this.updateAttendeeProfileNotificationPreference(t,r)}updateAttendeeProfileNotificationPreference(e,t){return S(this,null,function*(){try{this.updatingNotificationFor.add(e);let i=this.allRows.findIndex(p=>p.GSI1===e);if(i===-1)throw new Error("User not found");let r=this.allRows[i],a=yield this.userService.update(y(v({},r),{isNotifyAttendeeProfileUpdates:t}));if(a?.success){this.allRows[i]=y(v({},r),{isNotifyAttendeeProfileUpdates:t}),this.refreshRows();let p=t?"Email notifications for attendee profile updates have been enabled":"Email notifications for attendee profile updates have been disabled";this.toastService.showSuccess("Success",p)}else throw new Error(a?.message||"Failed to update notification preference")}catch(i){console.error("Error updating attendee profile notification preference:",i);let r=this.allRows.findIndex(a=>a.GSI1===e);r!==-1&&(this.allRows[r].isNotifyAttendeeProfileUpdates=!t,this.refreshRows()),this.toastService.showDanger("Error","Failed to update notification preference. Please try again.")}finally{this.updatingNotificationFor.delete(e)}})}matchesFilter(e){return Object.values(e).some(t=>typeof t=="string"&&t.toLowerCase().includes(this.searchFilter))}sortValue(e,t){let i=e[t]??"";return typeof i=="string"?i.toLocaleLowerCase():i}refreshRows(){let e=this.searchFilter?this.allRows.filter(a=>this.matchesFilter(a)):[...this.allRows],t=this.sort;if(t){let a=t.direction==="asc"?1:-1;e.sort((p,ge)=>{let j=this.sortValue(p,t.key),D=this.sortValue(ge,t.key);return j===D?0:(j<D?-1:1)*a})}this.filteredCount=e.length;let i=Math.max(1,Math.ceil(e.length/this.pageSize));this.currentPage=Math.min(this.currentPage,i);let r=(this.currentPage-1)*this.pageSize;this.visibleRows=e.slice(r,r+this.pageSize)}static{this.\u0275fac=function(t){return new(t||n)(h(R),h(X),h(J),h(te),h(he))}}static{this.\u0275cmp=b({type:n,selectors:[["ng-component"]],viewQuery:function(t,i){if(t&1&&U(z,5),t&2){let r;E(r=I())&&(i.createModal=r.first)}},decls:33,vars:17,consts:[[1,"container-fluid","py-3","admins-page"],["heading","Admins"],["cnpPageHeaderDescription","",1,"header-copy"],["href","https://canapii.com/auth/register","rel","noopener","target","_blank"],[1,"admin-counts"],[3,"click"],["name","create"],[1,"list-card"],["ariaLabel","Admin list controls",3,"count"],["label","Search admins","placeholder","Search admins",1,"search",3,"valueChange","value"],["role","status","cnpVisuallyHidden",""],["ariaLabel","Admins",3,"sortChange","columns","rows","rowKey","sort","loading"],["cnpTableEmpty","",3,"icon","heading","description"],["cnpEmptyStatePrimary","",3,"click"],["cnpCell","GSI1"],["cnpCell","dateCreated"],["cnpCell","emailNotifications"],["noun","admins",3,"pageChange","pageSizeChange","total","page","pageSize"],[3,"created"],[3,"routerLink"],[1,"n
1otification-cell"],["cnpInput","","title","Control whether this admin receives email notifications for attendee profile updates",1,"notification-select",3,"change","disabled"],["value","disabled",3,"selected"],["value","enabled",3,"selected"],["size","sm","label","Updating",4,"ngIf"],["size","sm","label","Updating"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"cnp-page-header",1)(2,"div",2)(3,"p"),c(4," Invite teammates to help manage your event. These teammates will have admin access to your event console. Remember, to access they need to "),o(5,"a",3),c(6,"sign up"),s(),c(7," and create a Canapii profile. "),s(),o(8,"p",4),c(9," Your current plan allows you to have "),o(10,"span"),c(11),s(),c(12," admins. You can still add "),o(13,"span"),c(14),s(),c(15," more admins. "),s()(),o(16,"cnp-button",5),m("click",function(){return i.create()}),C(17,"cnp-icon",6),c(18," Create "),s()(),o(19,"div",7)(20,"cnp-toolbar",8)(21,"cnp-search-field",9),m("valueChange",function(a){return i.onSearchChange(a)}),s()(),o(22,"span",10),c(23),s(),o(24,"cnp-table",11),m("sortChange",function(a){return i.onSortChange(a)}),o(25,"cnp-empty-state",12)(26,"cnp-button",13),m("click",function(){return i.onEmptyAction()}),c(27),s()(),F(28,ve,2,4,"ng-template",14)(29,ye,2,3,"ng-template",15)(30,we,7,5,"ng-template",16),s(),o(31,"cnp-paginator",17),m("pageChange",function(a){return i.onPageChange(a)})("pageSizeChange",function(a){return i.onPageSizeChange(a)}),s()(),o(32,"app-user-create",18),m("created",function(a){return i.onCreated(a)}),s()()),t&2&&(l(11),_(i.adminCount),l(3),_(i.math.round(i.adminUsed)),l(6),d("count",i.countLabel),l(),d("value",i.searchValue),l(2),T("",i.countLabel," shown"),l(),d("columns",i.columns)("rows",i.visibleRows)("rowKey",i.byKey)("sort",i.sort)("loading",i.isLoading),l(),d("icon",i.isSearching?"no-results":"inbox")("heading",i.emptyHeading)("description",i.emptyDescription),l(2),_(i.emptyActionLabel),l(4),d("total",i.filteredCount)("page",i.currentPage)("pageSize",i.pageSize))},dependencies:[Y,Z,N,ce,me,L,ne,ae,pe,re,ie,le,oe,se,z,ue],styles:[".admins-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-card-gap)}.header-copy[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-bottom:var(--cnp-space-1)}.header-copy[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:var(--cnp-color-link);text-decoration:underline}.header-copy[_ngcontent-%COMP%]   .admin-counts[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-weight:var(--cnp-font-weight-bold)}.list-card[_ngcontent-%COMP%]{background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);overflow:hidden}.search[_ngcontent-%COMP%]{min-width:0}.notification-cell[_ngcontent-%COMP%]{align-items:center;display:flex;gap:var(--cnp-space-2)}.notification-select[_ngcontent-%COMP%]{min-width:300px}"]})}}return n})();var be=[{path:"",component:k},{path:":id",loadChildren:()=>import("./chunk-TAJ64CPY.js").then(n=>n.ViewModule)}],fe=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=P({type:n})}static{this.\u0275inj=w({imports:[x.forChild(be),x]})}}return n})();var qe=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=P({type:n})}static{this.\u0275inj=w({imports:[fe,k]})}}return n})();export{qe as UserModule};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.