PageSourceSearch

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

js canapii.com collected 2026-09-24 09:44:09 UTC 14,329 bytes, 1 lines download raw bytes

1import{a as te}from"./chunk-DJNAKABM.js";import"./chunk-6AK6BO45.js";import{a as H}from"./chunk-GWTPOTPY.js";import"./chunk-3PGMBZAP.js";import"./chunk-VT7CJSCD.js";import{a as ee}from"./chunk-PNYSZFNB.js";import{A as z,G as I,N as O,O as A,P as x,R as $,V as j,i as W,k as M,m as N,t as V,z as Z}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{t as Q,u as F}from"./chunk-3XCK7DOC.js";import"./chunk-PJWNDC7A.js";import"./chunk-QDFFLVTB.js";import"./chunk-JIVZONLP.js";import"./chunk-S43ITSQ5.js";import{e as J,i as k,k as b}from"./chunk-5FWAKVG3.js";import{z as R}from"./chunk-KAXBUATZ.js";import{Cc as p,Dc as a,Dd as P,Ec as l,Fa as C,Fc as S,Jb as r,Oc as T,Sa as w,Ta as E,Vc as d,Wb as g,Xc as h,bc as D,cc as f,gc as L,jd as m,kd as u,vc as v,xc as y}from"./chunk-XW6AEKHB.js";import{l as Y}from"./chunk-6G35VSEK.js";var oe=i=>!isNaN(parseFloat(i))&&!isNaN(Number(i));var K=(i,s)=>{let e=i?.[s];if(oe(e)){let n=Number(e);return n<9007199254740991?n:e}return e};function ae(i,s,e,n){let t=n(i,e.key),o=n(s,e.key),c=typeof t,q=typeof o;c!==q&&(c==="number"&&(t+=""),q==="number"&&(o+=""));let _=0;return t!=null&&o!=null?t>o?_=1:t<o&&(_=-1):t!=null?_=1:o!=null&&(_=-1),_*(e.direction==="asc"?1:-1)}function U(i,s,e){return s?i.sort((n,t)=>ae(n,t,s,e)):i}var se=i=>[i];function le(i,s){if(i&1){let e=T();a(0,"cnp-button",13),d("click",function(){w(e);let t=h();return E(t.clearSearch())}),m(1," Clear search "),l()}}function ce(i,s){if(i&1&&(a(0,"a",14),m(1),l()),i&2){let e=s.$implicit,n=s.value;p("routerLink",P(2,se,e.domainName)),r(),u(n)}}function pe(i,s){if(i&1&&(a(0,"cnp-status-pill",15),m(1),l()),i&2){let e=h().value,n=h();p("tone",n.statusTone(e)),r(),u(n.statusLabel(e))}}function me(i,s){i&1&&(a(0,"span",16),m(1,"\u2014"),l(),a(2,"span",17),m(3,"Empty"),l())}function de(i,s){if(i&1&&v(0,pe,2,2,"cnp-status-pill",15)(1,me,4,0),i&2){let e=s.value;y(e?0:1)}}function ue(i,s){if(i&1&&(a(0,"cnp-status-pill",15),m(1),l()),i&2){let e=s.value,n=h();p("tone",n.booleanTone(e)),r(),u(n.booleanLabel(e))}}var he="ISSUED",ge=["PENDING_VALIDATION"],Ce=["FAILED","EXPIRED","REVOKED","VALIDATION_TIMED_OUT"],G=(()=>{class i{constructor(e){this.customDomainService=e,this.columns=[{key:"domainName",header:"Domain name",sortable:!0,width:"53%"},{key:"status",header:"Status",sortable:!0,width:"8%"},{key:"validationMethod",header:"Validation method",sortable:!0,width:"13%"},{key:"forwardConfigured",header:"Forward configured",sortable:!0,width:"15%"},{key:"eventUsage",header:"Event usage",sortable:!0,width:"11%"}],this.pageSizeOptions=[25,50,100],this.isLoading=!0,this.visibleRows=[],this.filteredCount=0,this.searchValue="",this.sort=null,this.currentPage=1,this.pageSize=50,this.allRows=[],this.searchFilter="",this.subscription$=[],this.byDomainName=n=>n.domainName}ngOnInit(){this.isLoading=!0,this.subscription$.push(this.customDomainService.onDomainsChanged(e=>{this.allRows=e.map(n=>(n.eventUsage=n.events.length,n)),this.refreshRows(),e.length&&(this.isLoading=!1)})),this.customDomainService.load().finally(()=>this.isLoading=!1)}ngOnDestroy(){this.subscription$.map(e=>e.unsubscribe())}get countLabel(){return`${this.filteredCount} ${this.filteredCount===1?"domain":"domains"}`}get totalCount(){return this.allRows.length}get isFilteredEmpty(){return!!this.searchFilter&&this.totalCount>0}get emptyHeading(){return this.isFilteredEmpty?"No custom domains match your search":"No custom domains yet"}get emptyDescription(){return this.isFilteredEmpty?`Try a different search term, or clear the search to see ${this.totalCount===1?"the only domain":`all ${this.totalCount} domains`}.`:"Domains mapped to Canapii events appear here once one is set up."}get announcement(){let e=this.sort;if(!e)return this.countLabel;let n=e.direction==="asc"?"ascending":"descending";return`${this.countLabel}, sorted by ${this.headerFor(e.key)}, ${n}`}onSearchChange(e){this.searchValue=e,this.searchFilter=e.trim().toLowerCase(),this.currentPage=1,this.refreshRows()}clearSearch(){this.onSearchChange("")}onSortChange(e){this.sort=e,this.refreshRows()}onPageChange(e){this.currentPage=e,this.refreshRows()}onPageSizeChange(e){this.pageSize=e,this.currentPage=1,this.refreshRows()}statusTone(e){return e===he?"success":ge.includes(e)?"neutral":Ce.includes(e)?"danger":"neutral"}statusLabel(e){if(!e)return"";let n=e.replace(/_/g," ").toLowerCase();return n.charAt(0).toUpperCase()+n.slice(1)}booleanLabel(e){return e===!0?"Yes":"No"}booleanTone(e){return e===!0?"success":"neutral"}headerFor(e){return this.columns.find(n=>n.key===e)?.header??e}matchesSearch(e){return Object.keys(e).reduce((t,o)=>t+e[o]+"\u25EC","").toLowerCase().includes(this.searchFilter)}
1refreshRows(){let e=this.searchFilter?this.allRows.filter(o=>this.matchesSearch(o)):[...this.allRows],n=U(e,this.sort,K);this.filteredCount=n.length;let t=(this.currentPage-1)*this.pageSize;this.visibleRows=n.slice(t,t+this.pageSize)}static{this.\u0275fac=function(n){return new(n||i)(g(H))}}static{this.\u0275cmp=D({type:i,selectors:[["app-custom-domains"]],decls:14,vars:17,consts:[[1,"container-fluid","py-3","custom-domains-page"],["heading","Custom domains","description","Domains mapped to Canapii events, newest first."],[1,"list-card"],["ariaLabel","Custom domain list controls",3,"count"],["label","Search custom domains","placeholder","Search domains\u2026",3,"valueChange","value"],["role","status","cnpVisuallyHidden",""],["ariaLabel","Custom domains",3,"sortChange","columns","rows","rowKey","sort","loading"],["cnpTableEmpty","",3,"icon","heading","description","headingLevel"],["cnpEmptyStatePrimary","","variant","secondary","size","sm"],["cnpCell","domainName"],["cnpCell","status"],["cnpCell","forwardConfigured"],["noun","domains",3,"pageChange","pageSizeChange","total","page","pageSize","pageSizeOptions"],["cnpEmptyStatePrimary","","variant","secondary","size","sm",3,"click"],[1,"record",3,"routerLink"],[3,"tone"],["aria-hidden","true"],["cnpVisuallyHidden",""]],template:function(n,t){n&1&&(a(0,"div",0),S(1,"cnp-page-header",1),a(2,"div",2)(3,"cnp-toolbar",3)(4,"cnp-search-field",4),d("valueChange",function(c){return t.onSearchChange(c)}),l()(),a(5,"span",5),m(6),l(),a(7,"cnp-table",6),d("sortChange",function(c){return t.onSortChange(c)}),a(8,"cnp-empty-state",7),v(9,le,2,0,"cnp-button",8),l(),L(10,ce,2,4,"ng-template",9)(11,de,2,1,"ng-template",10)(12,ue,2,2,"ng-template",11),l(),a(13,"cnp-paginator",12),d("pageChange",function(c){return t.onPageChange(c)})("pageSizeChange",function(c){return t.onPageSizeChange(c)}),l()()()),n&2&&(r(3),p("count",t.countLabel),r(),p("value",t.searchValue),r(2),u(t.announcement),r(),p("columns",t.columns)("rows",t.visibleRows)("rowKey",t.byDomainName)("sort",t.sort)("loading",t.isLoading),r(),p("icon",t.isFilteredEmpty?"no-results":"inbox")("heading",t.emptyHeading)("description",t.emptyDescription)("headingLevel",3),r(),y(t.isFilteredEmpty?9:-1),r(4),p("total",t.filteredCount)("page",t.currentPage)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions))},dependencies:[k,M,A,j,z,$,V,N,x,I,O],styles:[".custom-domains-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;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}.record[_ngcontent-%COMP%]{color:var(--cnp-color-link);font-weight:var(--cnp-font-weight-semibold)}.record[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}}return i})();var fe=i=>[i];function _e(i,s){if(i&1){let e=T();a(0,"cnp-button",15),d("click",function(){w(e);let t=h();return E(t.clearSearch())}),m(1," Clear search "),l()}}function ve(i,s){if(i&1&&(a(0,"a",16),m(1),l()),i&2){let e=s.$implicit,n=s.value;p("routerLink",P(2,fe,e.link)),r(),u(n)}}function ye(i,s){if(i&1&&(a(0,"cnp-status-pill",17),m(1),l()),i&2){let e=s.value,n=h();p("tone",n.booleanTone(e)),r(),u(n.booleanLabel(e))}}var X=(()=>{class i{constructor(e,n,t,o){this.domainService=e,this.route=n,this.modal=t,this.toastService=o,this.columns=[{key:"url",header:"Event",sortable:!0,width:"62%"},{key:"activated",header:"Activated",sortable:!0,width:"38%"}],this.pageSizeOptions=[25,50,100],this.trail=[],this.domain={events:[]},this.isLoading=!1,this.visibleRows=[],this.filteredCount=0,this.searchValue="",this.sort=null,this.currentPage=1,this.pageSize=50,this.allRows=[],this.searchFilter="",this.byPk=c=>c.PK}ngOnInit(){this.routerSubscription=this.route.params.subscribe(e=>{e.id&&(this.id=e.id,this.trail=[{label:"Custom domains",route:"/account/admin/custom-domains"},{label:this.id}],this.load())})}ngOnDestroy(){this.routerSubscription.unsubscribe()}load(){return Y(this,null,function*(){this.isLoading=!0,this.domain=yield this.domainService.loadDomain(this.id),this.allRows=this.domain.events.map(e=>(e.link=`../../../../emp/${e.url}/domain`,e)),this.refreshRows(),this.isLoading=!1})}get countLabel(){return`${this.filteredCount} ${this.filteredCount===1?"event":"events"}`}get totalCount(){return this.allRows.length}get isFilteredEmpty(){return!!this.searchFilter&&this.totalCount>0}get emptyHeading(){return this.isFilteredEmpty?"No events match your search":"No events on this domain yet"}
1get emptyDescription(){return this.isFilteredEmpty?`Try a different search term, or clear the search to see ${this.totalCount===1?"the only event":`all ${this.totalCount} events`}.`:"Use Add events to map an event to this domain."}get announcement(){let e=this.sort;if(!e)return this.countLabel;let n=e.direction==="asc"?"ascending":"descending";return`${this.countLabel}, sorted by ${this.headerFor(e.key)}, ${n}`}onSearchChange(e){this.searchValue=e,this.searchFilter=e.trim().toLowerCase(),this.currentPage=1,this.refreshRows()}clearSearch(){this.onSearchChange("")}onSortChange(e){this.sort=e,this.refreshRows()}onPageChange(e){this.currentPage=e,this.refreshRows()}onPageSizeChange(e){this.pageSize=e,this.currentPage=1,this.refreshRows()}booleanLabel(e){return e===!0?"Yes":"No"}booleanTone(e){return e===!0?"success":"neutral"}addEvent(){return Y(this,null,function*(){let e=[];this.domain.events&&this.domain.events.length&&(e=this.domain.events.map(t=>t.PK));let n=this.modal.open(te,{centered:!0,backdrop:!0});n.componentInstance.exclude=e,n.componentInstance.isCentralisedResources=!1;try{let t=yield n.result;yield this.domainService.addEventsToDomain(this.domain,t),yield this.domainService.load(),yield this.load(),this.toastService.showSuccess("Success","Events successfully added.")}catch{}})}headerFor(e){return this.columns.find(n=>n.key===e)?.header??e}matchesSearch(e){return Object.keys(e).reduce((t,o)=>t+e[o]+"\u25EC","").toLowerCase().includes(this.searchFilter)}refreshRows(){let e=this.searchFilter?this.allRows.filter(o=>this.matchesSearch(o)):[...this.allRows],n=U(e,this.sort,K);this.filteredCount=n.length;let t=(this.currentPage-1)*this.pageSize;this.visibleRows=n.slice(t,t+this.pageSize)}static{this.\u0275fac=function(n){return new(n||i)(g(H),g(J),g(Q),g(ee))}}static{this.\u0275cmp=D({type:i,selectors:[["ng-component"]],decls:17,vars:19,consts:[[1,"container-fluid","py-3","domain-events-page"],[3,"trail"],["variant","detail",3,"heading"],[3,"click"],["name","create"],[1,"list-card"],["ariaLabel","Domain event list controls",3,"count"],["label","Search the events on this domain","placeholder","Search...",3,"valueChange","value"],["role","status","cnpVisuallyHidden",""],["ariaLabel","Events on this domain",3,"sortChange","columns","rows","rowKey","sort","loading"],["cnpTableEmpty","",3,"icon","heading","description","headingLevel"],["cnpEmptyStatePrimary","","variant","secondary","size","sm"],["cnpCell","url"],["cnpCell","activated"],["noun","events",3,"pageChange","pageSizeChange","total","page","pageSize","pageSizeOptions"],["cnpEmptyStatePrimary","","variant","secondary","size","sm",3,"click"],["target","_blank",1,"record",3,"routerLink"],[3,"tone"]],template:function(n,t){n&1&&(a(0,"div",0),S(1,"cnp-breadcrumb",1),a(2,"cnp-page-header",2)(3,"cnp-button",3),d("click",function(){return t.addEvent()}),S(4,"cnp-icon",4),m(5," Add events "),l()(),a(6,"div",5)(7,"cnp-toolbar",6)(8,"cnp-search-field",7),d("valueChange",function(c){return t.onSearchChange(c)}),l()(),a(9,"span",8),m(10),l(),a(11,"cnp-table",9),d("sortChange",function(c){return t.onSortChange(c)}),a(12,"cnp-empty-state",10),v(13,_e,2,0,"cnp-button",11),l(),L(14,ve,2,4,"ng-template",12)(15,ye,2,2,"ng-template",13),l(),a(16,"cnp-paginator",14),d("pageChange",function(c){return t.onPageChange(c)})("pageSizeChange",function(c){return t.onPageSizeChange(c)}),l()()()),n&2&&(r(),p("trail",t.trail),r(),p("heading",t.id),r(5),p("count",t.countLabel),r(),p("value",t.searchValue),r(2),u(t.announcement),r(),p("columns",t.columns)("rows",t.visibleRows)("rowKey",t.byPk)("sort",t.sort)("loading",t.isLoading),r(),p("icon",t.isFilteredEmpty?"no-results":"inbox")("heading",t.emptyHeading)("description",t.emptyDescription)("headingLevel",3),r(),y(t.isFilteredEmpty?13:-1),r(3),p("total",t.filteredCount)("page",t.currentPage)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions))},dependencies:[k,Z,M,A,j,W,z,$,V,N,x,I,O],styles:[".domain-events-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;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}.record[_ngcontent-%COMP%]{color:var(--cnp-color-link);font-weight:var(--cnp-font-weight-semibold)}.record[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}}return i})();var Se=[{path:"",component:G},{path:":id",component:X}],ne=(()=>
1{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=f({type:i})}static{this.\u0275inj=C({imports:[b.forChild(Se),b]})}}return i})();var ie=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=f({type:i})}static{this.\u0275inj=C({imports:[R,F,b,X]})}}return i})();var Je=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=f({type:i})}static{this.\u0275inj=C({imports:[R,F,ne,ie,G]})}}return i})();export{Je as CustomDomainsModule};

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.