PageSourceSearch

https://account.canapii.com/chunk-MDP7TWHD.js

js canapii.com collected 2026-09-24 09:44:05 UTC 9,198 bytes, 1 lines download raw bytes

1import{a as q,b as G,c as Q}from"./chunk-2SMGYAHO.js";import{a as U}from"./chunk-Z2HMW2IQ.js";import"./chunk-4MPIUD7L.js";import"./chunk-OMAR6RBO.js";import"./chunk-E34OQ4RJ.js";import"./chunk-H4EPMV5Z.js";import"./chunk-ZSHO3KMD.js";import"./chunk-QVGEDMLN.js";import"./chunk-UZY2R5Q5.js";import"./chunk-5GAGQHFR.js";import"./chunk-RYT6C367.js";import"./chunk-SNZM6YGS.js";import"./chunk-3PGMBZAP.js";import"./chunk-FQFO62CD.js";import"./chunk-VT7CJSCD.js";import"./chunk-PNYSZFNB.js";import{A as N,D as V,G as j,N as B,O as H,P as K,R as $,V as A,i as M,k as R,l as I,t as O,ya as J}from"./chunk-Y3MTRBLK.js";import"./chunk-XMBPLYUK.js";import"./chunk-QRMJLQVM.js";import"./chunk-24HYNKH3.js";import"./chunk-65I45D2I.js";import"./chunk-GZL4NBTB.js";import"./chunk-OMIAKVTT.js";import"./chunk-3XCK7DOC.js";import"./chunk-PJWNDC7A.js";import"./chunk-QDFFLVTB.js";import{a as D}from"./chunk-JIVZONLP.js";import"./chunk-S43ITSQ5.js";import{k}from"./chunk-5FWAKVG3.js";import{u as W}from"./chunk-KAXBUATZ.js";import{Cc as s,Dc as a,Eb as b,Ec as r,Fa as f,Fc as u,Jb as o,Jd as P,Ld as L,Oc as z,Sa as S,Ta as T,Vc as h,Wb as w,Xc as v,bc as x,cc as _,gc as F,jd as p,kd as C,vc as m,xc as g}from"./chunk-XW6AEKHB.js";import{l as E}from"./chunk-6G35VSEK.js";function ee(t,l){t&1&&u(0,"cnp-skeleton",16)(1,"cnp-skeleton",17),t&2&&(s("rows",1),o(),s("rows",1))}function te(t,l){if(t&1&&u(0,"cnp-stat-card",18)(1,"cnp-stat-card",19),t&2){let e=v();s("value",e.events.length),o(),s("value",e.organizations.length)}}function ne(t,l){if(t&1){let e=z();a(0,"cnp-button",20),h("click",function(){S(e);let n=v();return T(n.clearSearch())}),p(1," Clear search "),r()}}function ie(t,l){if(t&1&&(a(0,"span",21),p(1),r()),t&2){let e=v().value;s("title",e),o(),C(e)}}function ae(t,l){t&1&&(a(0,"span",22),p(1,"\u2014"),r(),a(2,"span",23),p(3,"Empty"),r())}function re(t,l){if(t&1&&m(0,ie,2,2,"span",21)(1,ae,4,0),t&2){let e=l.value;g(e?0:1)}}function oe(t,l){if(t&1&&(a(0,"span",24),p(1),P(2,"date"),r()),t&2){let e=v().value;o(),C(L(2,1,e,"d MMM y"))}}function se(t,l){t&1&&(a(0,"span",22),p(1,"\u2014"),r(),a(2,"span",23),p(3,"Empty"),r())}function le(t,l){if(t&1&&m(0,oe,3,4,"span",24)(1,se,4,0),t&2){let e=l.value;g(e?0:1)}}function pe(t,l){if(t&1&&(a(0,"a",25),p(1,"Console"),r()),t&2){let e=l.$implicit;s("href","/emp/"+e.url,b)}}var y=(()=>{class t{constructor(e,i){this.csvDownloadService=e,this.api=i,this.columns=[{key:"name",header:"Name",sortable:!0},{key:"organizationName",header:"Organization",sortable:!0,width:"18%",truncate:!0},{key:"startDate",header:"Start date",sortable:!0,width:"11%"},{key:"registered",header:"Registered",sortable:!0,align:"end",width:"10%"},{key:"loggedIn",header:"Logged in",sortable:!0,align:"end",width:"10%"},{key:"console",header:"",width:"120px",align:"end",ariaLabel:"Console"}],this.events=[],this.organizations=[],this.isLoading=!1,this.loadFailed=!1,this.isExporting=!1,this.visibleRows=[],this.filteredCount=0,this.searchValue="",this.sort={key:"startDate",direction:"desc"},this.currentPage=1,this.pageSize=50,this.allRows=[],this.searchFilter="",this.byKey=n=>n.PK}ngOnInit(){this.load()}load(){return this.isLoading=!0,this.loadFailed=!1,this.api.get("/all-events/this-week").then(e=>{let i=!!e?.success&&Array.isArray(e?.data);this.loadFailed=!i;let n=i?e.data:[];this.allRows=n,this.events=n,this.organizations=n.map(c=>c.organizationName).filter(c=>!!c?.trim()).filter((c,d,Z)=>Z.indexOf(c)===d)}).catch(e=>{this.loadFailed=!0,console.error("Error loading this week events:",e)}).finally(()=>{this.isLoading=!1,this.refreshRows()})}get countLabel(){return`${this.filteredCount} ${this.filteredCount===1?"event":"events"}`}get announcement(){let e=this.sort;if(!e)return this.countLabel;let i=e.direction==="asc"?"ascending":"descending";return`${this.countLabel}, sorted by ${this.headerFor(e.key)}, ${i}`}get emptyHeading(){return this.loadFailed?"Events could not be loaded":this.searchFilter?"No events match your search":"No free-plan events this week"}get emptyDescription(){return this.loadFailed?"Refresh the page to try again.":this.searchFilter?"Try a different event or organization name.":"Free-plan events starting in the current week appear here."}get emptyIcon(){return this.searchFilter||this.loadFailed?"no-results":"inbox"}get isSearching(){return this.searchFilter.length>0}clearSearch(){this.filter("")}filter(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()}
1export(){return E(this,null,function*(){let e=[["id","PK"],"name","organizationName","timezone","startDate","endDate","registered","loggedIn"],i=structuredClone(this.allRows);i.forEach(n=>{n.startDate=n.startDate?n.startDate.split("T")[0]:"",n.endDate=n.endDate?n.endDate.split("T")[0]:""}),this.isExporting=!0;try{yield this.csvDownloadService.fromJsonList("admin-free-events-this-week",i,e)}finally{this.isExporting=!1}})}headerFor(e){return this.columns.find(i=>i.key===e)?.header??e}refreshRows(){let e=this.searchFilter?this.allRows.filter(n=>G(n,this.searchFilter)):[...this.allRows],i=q(e,this.sort);this.filteredCount=i.length,this.visibleRows=Q(i,this.currentPage,this.pageSize)}static{this.\u0275fac=function(i){return new(i||t)(w(U),w(D))}}static{this.\u0275cmp=x({type:t,selectors:[["app-events-this-week"]],decls:20,vars:18,consts:[[1,"this-week-page"],["heading","Free events this week","description","Free-plan events starting in the current week."],[1,"stat-grid"],[1,"list-card"],["ariaLabel","Free event list controls",3,"count"],["cnpToolbarStart","","label","Search events","placeholder","Search events, organizations\u2026",1,"events-search",3,"valueChange","value"],["variant","secondary","loadingLabel","Exporting",3,"click","loading"],["name","export"],["role","status","cnpVisuallyHidden",""],["ariaLabel","Free events this week","loadingLabel","Loading events",3,"sortChange","columns","rows","rowKey","sort","loading"],["cnpTableEmpty","",3,"icon","heading","description","headingLevel"],["cnpEmptyStatePrimary","","size","sm","variant","secondary"],["cnpCell","name"],["cnpCell","startDate"],["cnpCell","console"],["noun","events",3,"pageChange","pageSizeChange","total","page","pageSize"],["preset","stat-card","label","Loading events",3,"rows"],["preset","stat-card","label","Loading organizations",3,"rows"],["label","Events",3,"value"],["label","Organizations",3,"value"],["cnpEmptyStatePrimary","","size","sm","variant","secondary",3,"click"],[1,"cell-name",3,"title"],["aria-hidden","true"],["cnpVisuallyHidden",""],[1,"cell-date"],["cnpButton","","variant","secondary","size","sm",3,"href"]],template:function(i,n){i&1&&(a(0,"div",0),u(1,"cnp-page-header",1),a(2,"div",2),m(3,ee,2,2)(4,te,2,2),r(),a(5,"div",3)(6,"cnp-toolbar",4)(7,"cnp-search-field",5),h("valueChange",function(d){return n.filter(d)}),r(),a(8,"cnp-button",6),h("click",function(){return n.export()}),u(9,"cnp-icon",7),p(10," Export "),r()(),a(11,"span",8),p(12),r(),a(13,"cnp-table",9),h("sortChange",function(d){return n.onSortChange(d)}),a(14,"cnp-empty-state",10),m(15,ne,2,0,"cnp-button",11),r(),F(16,re,2,1,"ng-template",12)(17,le,2,1,"ng-template",13)(18,pe,2,1,"ng-template",14),r(),a(19,"cnp-paginator",15),h("pageChange",function(d){return n.onPageChange(d)})("pageSizeChange",function(d){return n.onPageSizeChange(d)}),r()()()),i&2&&(o(3),g(n.isLoading?3:4),o(3),s("count",n.countLabel),o(),s("value",n.searchValue),o(),s("loading",n.isExporting),o(4),C(n.announcement),o(),s("columns",n.columns)("rows",n.visibleRows)("rowKey",n.byKey)("sort",n.sort)("loading",n.isLoading),o(),s("icon",n.emptyIcon)("heading",n.emptyHeading)("description",n.emptyDescription)("headingLevel",2),o(),g(n.isSearching&&!n.loadFailed?15:-1),o(4),s("total",n.filteredCount)("page",n.currentPage)("pageSize",n.pageSize))},dependencies:[R,I,H,A,M,N,$,O,J,V,K,j,B,W],styles:["[_nghost-%COMP%]{display:block;padding:var(--cnp-space-page-gutter-y) var(--cnp-space-page-gutter-x)}.this-week-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cnp-space-card-gap)}.stat-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(11rem,14rem));gap:var(--cnp-space-card-gap)}.list-card[_ngcontent-%COMP%]{background:var(--cnp-color-bg-card);border-radius:var(--cnp-radius-container);box-shadow:var(--cnp-shadow-low);overflow:hidden}.events-search[_ngcontent-%COMP%]{--cnp-search-field-width: 22rem}.cell-name[_ngcontent-%COMP%]{display:block;max-width:26rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--cnp-font-weight-semibold)}.cell-date[_ngcontent-%COMP%]{white-space:nowrap}"]})}}return t})();var ce=[{path:"",component:y}],Y=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=_({type:t})}static{this.\u0275inj=f({imports:[k.forChild(ce),k]})}}return t})();var Ee=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=_({type:t})}static{this.\u0275inj=f({imports:[Y,y]})}}return t})();export{Ee as ThisWeekEventsModule};

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.