@vendure/admin-ui-plugin 3.6.0-minor-202512162029 → 3.6.0-minor-202512170238
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/admin-ui/browser/{chunk-QYJIFAEX.js → chunk-4LSWVXPN.js} +2 -2
- package/lib/admin-ui/browser/{chunk-7QMSUUDN.js → chunk-6625ZZRO.js} +2 -2
- package/lib/admin-ui/browser/{chunk-NWD2CF6C.js → chunk-6UWQNINH.js} +2 -2
- package/lib/admin-ui/browser/{chunk-N6P5KBJN.js → chunk-7QHJ4GJC.js} +2 -2
- package/lib/admin-ui/browser/{chunk-RI6URANX.js → chunk-BNW64AHL.js} +2 -2
- package/lib/admin-ui/browser/{chunk-4NPJBE3F.js → chunk-CXBC3APS.js} +2 -2
- package/lib/admin-ui/browser/{chunk-7O25KKKR.js → chunk-EIPXVV3G.js} +2 -2
- package/lib/admin-ui/browser/{chunk-B5KDGWDF.js → chunk-QJJH2BHW.js} +2 -2
- package/lib/admin-ui/browser/{chunk-B5KDGWDF.js.map → chunk-QJJH2BHW.js.map} +1 -1
- package/lib/admin-ui/browser/{chunk-FSQUD3VY.js → chunk-YIGI2BWJ.js} +2 -2
- package/lib/admin-ui/browser/{chunk-CSO7EYTC.js → chunk-ZA4HMI74.js} +2 -2
- package/lib/admin-ui/browser/index.html +1 -1
- package/lib/admin-ui/browser/main-NCLVNPAC.js +2 -0
- package/package.json +4 -4
- package/lib/admin-ui/browser/main-HLG52IHX.js +0 -2
- /package/lib/admin-ui/browser/{chunk-QYJIFAEX.js.map → chunk-4LSWVXPN.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-7QMSUUDN.js.map → chunk-6625ZZRO.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-NWD2CF6C.js.map → chunk-6UWQNINH.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-N6P5KBJN.js.map → chunk-7QHJ4GJC.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-RI6URANX.js.map → chunk-BNW64AHL.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-4NPJBE3F.js.map → chunk-CXBC3APS.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-7O25KKKR.js.map → chunk-EIPXVV3G.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-FSQUD3VY.js.map → chunk-YIGI2BWJ.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-CSO7EYTC.js.map → chunk-ZA4HMI74.js.map} +0 -0
- /package/lib/admin-ui/browser/{main-HLG52IHX.js.map → main-NCLVNPAC.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Di}from"./chunk-
|
|
1
|
+
import{a as Di}from"./chunk-6UWQNINH.js";import{$ as Yt,$c as Ir,$e as Nt,$f as Ie,$g as $t,Aa as jt,Ac as Fn,Ae as pi,Af as ve,Ag as mo,B as Ai,Ba as ie,Bc as Tn,Bd as On,Bf as ye,Ca as f,Cc as Sn,Cf as be,Da as P,Dc as Dn,Dd as Vn,Ea as C,Ec as In,Ed as re,Ef as me,Fa as At,Fc as xn,Fd as Mt,Fe as Qn,Ff as Fe,Fg as gi,Gc as Pn,Ge as J,H as Ei,Ha as Gi,Hc as Bn,He as le,Hg as po,I as ft,Ia as qi,Ic as kn,Id as ae,Ie as di,Ig as hi,Ja as Zi,Jd as he,Je as Yn,Jf as ui,Jg as $,K as St,Kf as xr,L as Kt,La as q,Ld as se,Le as Ce,Lf as Ot,Lg as co,M as Qt,Ma as W,Md as _t,Me as wt,Mf as O,Nd as vt,Ne as Xn,Nf as M,O as Mi,Oa as Ui,Od as yt,Oe as Wt,Of as V,P as wi,Pd as $n,Pf as w,Pg as ue,Q as Pt,Qa as a,Qd as Gn,Qf as N,Qg as Je,R as Ti,Ra as s,S as Ni,Sa as k,Sg as uo,T as b,Ta as Hi,Tf as oo,U as F,Ua as ne,Uc as Ln,Ud as ce,Uf as ro,Ug as Ae,Va as de,Vc as ni,Vd as qn,Vf as ao,W as Ke,Wa as zi,Wc as oi,Wd as Zn,We as Jn,Wf as Te,Xc as ri,Xe as bt,Xf as Se,Y as Ri,Ya as U,Yc as An,Z as Oi,Za as E,Zf as De,Zg as Ee,_ as r,_c as En,_e as $e,_f as Re,_g as Vt,a as H,aa as v,ae as j,ah as Gt,b as ze,bc as ti,bf as Rt,bh as Pe,ca as T,cc as Xi,cd as Mn,cf as gt,ch as Dt,da as Vi,db as B,dc as Ji,dd as G,de as Ye,e as ut,ea as Xt,ec as en,ed as ai,ee as Xe,fb as ji,fc as tn,ff as ci,fg as xe,g as Ct,ga as A,gc as nn,gd as wn,gf as eo,h as Bi,ha as u,hc as ii,hd as Nn,i as ki,ia as Jt,ic as on,id as ge,if as qe,ja as o,jb as Wi,jc as rn,jd as Rn,jg as Ze,k as Tt,kc as an,la as Bt,lc as sn,ld as I,ma as l,mc as ln,n as Z,na as m,nb as D,nc as mn,ng as L,o as tt,oa as c,ob as ei,oc as pn,of as to,p as te,pa as kt,pb as Ki,pc as dn,qa as Lt,qc as cn,qe as Un,rb as Qi,rc as un,re as Hn,sa as S,sc as fn,se as zn,sf as io,t as Ht,ta as _,tc as gn,td as Qe,te as X,ua as g,uc as hn,ud as Q,ue as jn,uf as no,ug as fi,vb as Yi,vc as Cn,vd as R,ve as Wn,vg as fe,wb as Et,wc as _n,wd as Y,we as Kn,xa as Si,xc as vn,xd as oe,xe as si,y as pe,ya as $i,yc as yn,ye as li,yg as so,z as Li,za as zt,zb as y,zc as bn,ze as mi,zf as _e,zg as lo}from"./chunk-QJJH2BHW.js";var fo=(()=>{class t{constructor(e){this.templateRef=e}static{this.\u0275fac=function(n){return new(n||t)(v(Yt))}}static{this.\u0275dir=Xt({type:t,selectors:[["","vdrZoneMemberControls",""]],standalone:!1})}}return t})();var go=(()=>{class t{constructor(e){this.templateRef=e}static{this.\u0275fac=function(n){return new(n||t)(v(Yt))}}static{this.\u0275dir=Xt({type:t,selectors:[["","vdrZoneMemberListHeader",""]],standalone:!1})}}return t})();var Pr=t=>["/settings/countries",t];function Br(t,p){if(t&1&&f(0),t&2){let e=p.item;C(" ",e.id," ")}}function kr(t,p){if(t&1&&(f(0),a(1,"localeDate")),t&2){let e=p.item;C(" ",k(1,1,e.createdAt,"short")," ")}}function Lr(t,p){if(t&1&&(f(0),a(1,"localeDate")),t&2){let e=p.item;C(" ",k(1,1,e.createdAt,"short")," ")}}function Ar(t,p){if(t&1&&(l(0,"a",9)(1,"span"),f(2),m(),c(3,"clr-icon",10),m()),t&2){let e=p.item;o("routerLink",W(2,Pr,e.id)),r(2),C(" ",e.name,"")}}function Er(t,p){if(t&1&&f(0),t&2){let e=p.item;C(" ",e.code," ")}}function Mr(t,p){t&1&&(l(0,"vdr-chip",13),f(1),a(2,"translate"),m()),t&2&&(r(),P(s(2,1,"common.enabled")))}function wr(t,p){t&1&&(l(0,"vdr-chip",14),f(1),a(2,"translate"),m()),t&2&&(r(),P(s(2,1,"common.disabled")))}function Nr(t,p){if(t&1&&u(0,Mr,3,3,"vdr-chip",11)(1,wr,3,3,"vdr-chip",12),t&2){let e=p.item;o("ngIf",e.enabled),r(),o("ngIf",!e.enabled)}}var Zt=(()=>{class t{constructor(e){this.dataService=e,this.selectedMemberIds=[],this.selectionChange=new Ke,this.filterTermControl=new On(""),this.currentPage=1,this.itemsPerPage=10,this.selectionManager=new to({multiSelect:!0,itemsAreEqual:(n,i)=>n.id===i.id,additiveMode:!0}),this.membersInput$=new Ct,this.activeZoneInput$=new Bi(void 0),this.destroy$=new Ct,this.refresh$=new Ct}ngOnInit(){let e=Ht(this.activeZoneInput$,this.refresh$).pipe(ft(n=>this.activeZone?this.dataService.query(ti,{zoneId:this.activeZone.id}).mapSingle(({zone:i})=>i?.members??[]):Tt([])));this.members$=Ht(e,this.membersInput$),this.members$.pipe(pe(1)).subscribe(n=>{this.selectionManager.setCurrentItems(n?.filter(i=>this.selectedMemberIds.includes(i.id))??[])}),this.selectionManager.selectionChanges$.pipe(St(this.destroy$)).subscribe(n=>{this.selectionChange.emit(n.map(i=>i.id))}),this.filteredMembers$=tt(this.members$,this.filterTermControl.valueChanges.pipe(Ei(""))).pipe(Z(([n,i])=>{if(i){let d=i?.toLocaleLowerCase()??"";return n.filter(h=>h.name.toLocaleLowerCase().includes(d)||h.code.toLocaleLowerCase().includes(d))}else return n})),this.totalItems$=this.filteredMembers$.pipe(Z(n=>n.length))}ngOnChanges(e){"members"in e&&this.membersInput$.next(this.members??[]),"activeZone"in e&&this.activeZoneInput$.next(this.activeZone)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}refresh(){this.refresh$.next()}static{this.\u0275fac=function(n){return new(n||t)(v(G))}}static{this.\u0275cmp=T({type:t,selectors:[["vdr-zone-member-list"]],contentQueries:function(n,i,d){if(n&1&&(Si(d,go,5),Si(d,fo,5)),n&2){let h;zt(h=jt())&&(i.headerTemplate=h.first),zt(h=jt())&&(i.controlsTemplate=h.first)}},inputs:{locationId:"locationId",members:"members",selectedMemberIds:"selectedMemberIds",activeZone:"activeZone"},outputs:{selectionChange:"selectionChange"},standalone:!1,features:[Ni],decls:24,vars:38,consts:[[3,"itemsPerPageChange","pageChange","id","items","totalItems","itemsPerPage","currentPage"],[3,"locationId","hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault"],["id","updated-at",3,"heading","hiddenByDefault"],["id","name",3,"heading","optional"],["id","code",3,"heading"],["id","enabled",3,"heading"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],["colorType","success",4,"ngIf"],["colorType","warning",4,"ngIf"],["colorType","success"],["colorType","warning"]],template:function(n,i){n&1&&(l(0,"vdr-data-table-2",0),a(1,"async"),a(2,"async"),_("itemsPerPageChange",function(h){return i.itemsPerPage=h})("pageChange",function(h){return i.currentPage=h}),c(3,"vdr-bulk-action-menu",1)(4,"vdr-dt2-search",2),a(5,"translate"),l(6,"vdr-dt2-column",3),a(7,"translate"),u(8,Br,1,1,"ng-template"),m(),l(9,"vdr-dt2-column",4),a(10,"translate"),u(11,kr,2,4,"ng-template"),m(),l(12,"vdr-dt2-column",5),a(13,"translate"),u(14,Lr,2,4,"ng-template"),m(),l(15,"vdr-dt2-column",6),a(16,"translate"),u(17,Ar,4,4,"ng-template"),m(),l(18,"vdr-dt2-column",7),a(19,"translate"),u(20,Er,1,1,"ng-template"),m(),l(21,"vdr-dt2-column",8),a(22,"translate"),u(23,Nr,2,2,"ng-template"),m()()),n&2&&(o("id",i.locationId)("items",s(1,20,i.filteredMembers$))("totalItems",s(2,22,i.totalItems$))("itemsPerPage",i.itemsPerPage)("currentPage",i.currentPage),r(3),o("locationId",i.locationId)("hostComponent",i)("selectionManager",i.selectionManager),r(),o("searchTermControl",i.filterTermControl)("searchTermPlaceholder",s(5,24,"common.search-by-name")),r(2),o("heading",s(7,26,"common.id"))("hiddenByDefault",!0),r(3),o("heading",s(10,28,"common.created-at"))("hiddenByDefault",!0),r(3),o("heading",s(13,30,"common.updated-at"))("hiddenByDefault",!0),r(3),o("heading",s(16,32,"common.name"))("optional",!1),r(3),o("heading",s(19,34,"common.code")),r(3),o("heading",s(22,36,"common.enabled")))},dependencies:[j,E,ge,qe,Te,xe,De,Ie,B,I,Ce],styles:[`.members-header[_ngcontent-%COMP%]{background-color:var(--color-component-bg-100);position:sticky;top:0;padding:6px;z-index:5;border-bottom:1px solid var(--color-component-border-200)}.members-header[_ngcontent-%COMP%] .header-title-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.members-header[_ngcontent-%COMP%] .clr-input[_ngcontent-%COMP%]{width:100%}
|
|
2
2
|
/*# sourceMappingURL=zone-member-list.component-LZVI4I6F.css.map */`],changeDetection:0})}}return t})();var Co=t=>({zoneName:t});function Rr(t,p){if(t&1&&(f(0),a(1,"translate")),t&2){let e=g();P(k(1,1,"settings.add-countries-to-zone",W(4,Co,e.zoneName)))}}function Or(t,p){if(t&1){let e=S();l(0,"button",3),_("click",function(){b(e);let i=g();return F(i.cancel())}),f(1),a(2,"translate"),m(),l(3,"button",4),_("click",function(){b(e);let i=g();return F(i.add())}),f(4),a(5,"translate"),m()}if(t&2){let e=g();r(),P(s(2,3,"common.cancel")),r(2),o("disabled",!e.selectedMemberIds.length),r(),C(" ",k(5,5,"settings.add-countries-to-zone",W(8,Co,e.zoneName))," ")}}var Hp=D`
|
|
3
3
|
query GetZoneMembers($zoneId: ID!) {
|
|
4
4
|
zone(id: $zoneId) {
|
|
@@ -392,4 +392,4 @@ import{a as Di}from"./chunk-NWD2CF6C.js";import{$ as Yt,$c as Ir,$e as Nt,$f as
|
|
|
392
392
|
}
|
|
393
393
|
`,br=(()=>{class t extends Ae{constructor(e,n,i){super(),this.dataService=e,this.notificationService=n,this.modalService=i,this.dataTableListId="zone-list",this.selectedMemberIds=[],this.customFields=this.serverConfigService.getCustomFieldsFor("Zone"),this.filters=this.createFilterCollection().addIdFilter().addDateFilters().addFilter({name:"name",type:{kind:"text"},label:"common.name",filterField:"name"}).addCustomFieldFilters(this.customFields).connectToRoute(this.route),this.sorts=this.createSortCollection().defaultSort("createdAt","DESC").addSort({name:"createdAt"}).addSort({name:"updatedAt"}).addSort({name:"name"}).addCustomFieldSorts(this.customFields).connectToRoute(this.route),super.configure({document:kn,getItems:d=>d.zones,setVariables:(d,h)=>({options:{skip:d,take:h,filter:H({name:{contains:this.searchTermControl.value}},this.filters.createFilterInput()),filterOperator:this.searchTermControl.value?Et.OR:Et.AND,sort:this.sorts.createSortInput()}}),refreshListOnChanges:[this.filters.valueChanges,this.sorts.valueChanges]})}ngOnInit(){super.ngOnInit();let e=this.route.paramMap.pipe(Z(n=>n.get("contents")),Ai(),Kt(()=>this.selectedMemberIds=[]));this.activeZone$=tt(this.items$,e).pipe(Z(([n,i])=>{if(i)return n.find(d=>d.id===i)})),this.activeIndex$=tt(this.items$,e).pipe(Z(([n,i])=>i?n.findIndex(d=>d.id===i):-1))}setLanguage(e){this.dataService.client.setContentLanguage(e).subscribe()}closeMembers(){let e=H({},this.route.snapshot.params);delete e.contents,this.router.navigate(["./",e],{relativeTo:this.route,queryParamsHandling:"preserve"})}addToZone(e){this.modalService.fromComponent(_o,{locals:{zoneName:e.name,zoneId:e.id},size:"md"}).pipe(ft(n=>n?this.dataService.settings.addMembersToZone(e.id,n).pipe(Li(n)):ki)).subscribe({next:n=>{this.notificationService.success("settings.add-countries-to-zone-success",{countryCount:n.length,zoneName:e.name}),this.refreshMemberList()},error:n=>{this.notificationService.error(n)}})}refreshMemberList(){this.zoneMemberList?.refresh()}static{this.\u0275fac=function(n){return new(n||t)(v(G),v(X),v(Kn))}}static{this.\u0275cmp=T({type:t,selectors:[["vdr-zone-list"]],viewQuery:function(n,i){if(n&1&&$i(Zt,5),n&2){let d;zt(d=jt())&&(i.zoneMemberList=d.first)}},standalone:!1,features:[A],decls:15,vars:14,consts:[[3,"languageCodeChange","availableLanguageCodes","currentLanguageCode"],["locationId","zone-list"],["class","btn btn-primary",3,"routerLink",4,"vdrIfPermissions"],[3,"closeClicked","rightPanelOpen"],["vdrSplitViewLeft",""],["vdrSplitViewRight","",3,"splitViewTitle"],[1,"btn","btn-primary",3,"routerLink"],["shape","plus"],[3,"pageChange","itemsPerPageChange","visibleColumnsChange","id","items","itemsPerPage","totalItems","currentPage","filters","activeIndex"],["locationId","zone-list",3,"hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault","sort"],["id","updated-at",3,"heading","hiddenByDefault","sort"],["id","name",3,"heading","optional","sort"],["id","view-contents",3,"heading","optional"],[3,"customField","sort",4,"ngFor","ngForOf"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],["queryParamsHandling","preserve",1,"button-small","bg-weight-150",3,"routerLink"],["shape","file-group"],[3,"customField","sort"],[4,"ngIf"],[1,"button-ghost","ml-4",3,"click"],["locationId","zone-members-list",3,"selectedMemberIds","activeZone","selectionChange",4,"ngIf"],["locationId","zone-members-list",3,"selectionChange","selectedMemberIds","activeZone"]],template:function(n,i){if(n&1&&(l(0,"vdr-page-block")(1,"vdr-action-bar")(2,"vdr-ab-left")(3,"vdr-language-selector",0),a(4,"async"),a(5,"async"),_("languageCodeChange",function(h){return i.setLanguage(h)}),m()(),l(6,"vdr-ab-right"),c(7,"vdr-action-bar-items",1),u(8,gp,4,5,"a",2),c(9,"vdr-action-bar-dropdown-menu",1),m()()(),l(10,"vdr-split-view",3),a(11,"async"),_("closeClicked",function(){return i.closeMembers()}),u(12,Fp,25,47,"ng-template",4)(13,Dp,2,3,"ng-template",5),a(14,"async"),m()),n&2){let d;r(3),o("availableLanguageCodes",s(4,5,i.availableLanguages$))("currentLanguageCode",s(5,7,i.contentLanguage$)),r(5),o("vdrIfPermissions",q(13,dp)),r(2),o("rightPanelOpen",s(11,9,i.activeZone$)),r(3),o("splitViewTitle",(d=s(14,11,i.activeZone$))==null?null:d.name)}},dependencies:[j,U,E,ge,N,V,w,$,Ze,O,M,Te,xe,De,Ie,Re,mo,so,lo,L,Zt,B,I,Ce],styles:[`.zone-wrapper[_ngcontent-%COMP%]{display:flex;height:calc(100% - 50px)}.zone-wrapper[_ngcontent-%COMP%] .zone-list[_ngcontent-%COMP%]{flex:1;overflow:auto;margin-top:0}.zone-wrapper[_ngcontent-%COMP%] .zone-list[_ngcontent-%COMP%] tr.active[_ngcontent-%COMP%]{background-color:var(--color-component-bg-200)}.zone-members[_ngcontent-%COMP%]{height:100%;width:0;opacity:0;visibility:hidden;overflow:auto;transition:width .3s,opacity .2s .3s,visibility 0s .3s}.zone-members.expanded[_ngcontent-%COMP%]{width:40vw;visibility:visible;opacity:1;padding-inline-start:12px}.zone-members[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{margin:0;background:none;border:none;cursor:pointer}.zone-members[_ngcontent-%COMP%] table.table{margin-top:0}.zone-members[_ngcontent-%COMP%] table.table th{top:0}.zone-members[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%]{display:flex;justify-content:space-between}
|
|
394
394
|
/*# sourceMappingURL=zone-list.component-ZHNTYEX6.css.map */`],changeDetection:0})}}return t})();var Fr={location:"zone-members-list",label:"settings.remove-from-zone",icon:"trash",iconClass:"is-danger",requiresPermission:y.UpdateCustomerGroup,onClick:({injector:t,selection:p,hostComponent:e,clearSelection:n})=>{let i=t.get(G),d=t.get(X),h=e.activeZone,x=p.map(Ve=>Ve.id);i.settings.removeMembersFromZone(h.id,x).subscribe({complete:()=>{d.success("settings.remove-countries-from-zone-success",{countryCount:x.length,zoneName:h.name}),e.refresh(),n()}})}};var mf=(()=>{class t extends uo{constructor(e,n){super(e,{__typename:"Administrator",id:"",createdAt:"",updatedAt:"",emailAddress:"",firstName:"",lastName:"",user:{roles:[]}},i=>n.administrator.getActiveAdministrator().mapStream(d=>d.activeAdministrator))}static{this.\u0275fac=function(n){return new(n||t)(Pt(Nn),Pt(G))}}static{this.\u0275prov=Mi({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Sr=ut(Wt());var Tr=t=>[{path:"profile",component:fe,data:{breadcrumb:"breadcrumb.profile"},resolve:{detail:()=>Ti(G).query(mn).mapSingle(p=>({entity:Tt(p.activeAdministrator)}))},children:t.getPageTabRoutes("profile")},{path:"administrators",component:fe,data:{locationId:"administrator-list",breadcrumb:"breadcrumb.administrators"},children:t.getPageTabRoutes("administrator-list")},{path:"administrators/:id",component:fe,data:{locationId:"administrator-detail",breadcrumb:{label:"breadcrumb.administrators",link:["../","administrators"]}},children:t.getPageTabRoutes("administrator-detail")},{path:"channels",component:fe,data:{locationId:"channel-list",breadcrumb:"breadcrumb.channels"},children:t.getPageTabRoutes("channel-list")},{path:"channels/:id",component:fe,data:{locationId:"channel-detail",breadcrumb:{label:"breadcrumb.channels",link:["../","channels"]}},children:t.getPageTabRoutes("channel-detail")},{path:"stock-locations",component:fe,data:{locationId:"stock-location-list",breadcrumb:"breadcrumb.stock-locations"},children:t.getPageTabRoutes("stock-location-list")},{path:"stock-locations/:id",component:fe,data:{locationId:"stock-location-detail",breadcrumb:{label:"breadcrumb.stock-locations",link:["../","stock-locations"]}},children:t.getPageTabRoutes("stock-location-detail")},{path:"sellers",component:fe,data:{locationId:"seller-list",breadcrumb:"breadcrumb.sellers"},children:t.getPageTabRoutes("seller-list")},{path:"sellers/:id",component:fe,data:{locationId:"seller-detail",breadcrumb:{label:"breadcrumb.sellers",link:["../","sellers"]}},children:t.getPageTabRoutes("seller-detail")},{path:"roles",component:fe,data:{locationId:"role-list",breadcrumb:"breadcrumb.roles"},children:t.getPageTabRoutes("role-list")},{path:"roles/:id",component:fe,data:{locationId:"role-detail",breadcrumb:{label:"breadcrumb.roles",link:["../","roles"]}},children:t.getPageTabRoutes("role-detail")},{path:"tax-categories",component:fe,data:{locationId:"tax-category-list",breadcrumb:"breadcrumb.tax-categories"},children:t.getPageTabRoutes("tax-category-list")},{path:"tax-categories/:id",component:fe,data:{locationId:"tax-category-detail",breadcrumb:{label:"breadcrumb.tax-categories",link:["../","tax-categories"]}},children:t.getPageTabRoutes("tax-category-detail")},{path:"tax-rates",component:fe,data:{locationId:"tax-rate-list",breadcrumb:"breadcrumb.tax-rates"},children:t.getPageTabRoutes("tax-rate-list")},{path:"tax-rates/:id",component:fe,data:{locationId:"tax-rate-detail",breadcrumb:{label:"breadcrumb.tax-rates",link:["../","tax-rates"]}},children:t.getPageTabRoutes("tax-rate-detail")},{path:"countries",component:fe,data:{locationId:"country-list",breadcrumb:"breadcrumb.countries"},children:t.getPageTabRoutes("country-list")},{path:"countries/:id",component:fe,data:{locationId:"country-detail",breadcrumb:{label:"breadcrumb.countries",link:["../","countries"]}},children:t.getPageTabRoutes("country-detail")},{path:"zones",component:fe,data:{locationId:"zone-list",breadcrumb:"breadcrumb.zones"},children:t.getPageTabRoutes("zone-list")},{path:"zones/:id",component:fe,data:{locationId:"zone-detail",breadcrumb:{label:"breadcrumb.zones",link:["../","zones"]}},children:t.getPageTabRoutes("zone-detail")},{path:"shipping-methods",component:fe,data:{locationId:"shipping-method-list",breadcrumb:"breadcrumb.shipping-methods"},children:t.getPageTabRoutes("shipping-method-list")},{path:"shipping-methods/:id",component:fe,data:{locationId:"shipping-method-detail",breadcrumb:{label:"breadcrumb.shipping-methods",link:["../","shipping-methods"]}},children:t.getPageTabRoutes("shipping-method-detail")},{path:"payment-methods",component:fe,data:{locationId:"payment-method-list",breadcrumb:"breadcrumb.payment-methods"},children:t.getPageTabRoutes("payment-method-list")},{path:"payment-methods/:id",component:fe,data:{locationId:"payment-method-detail",breadcrumb:{label:"breadcrumb.payment-methods",link:["../","payment-methods"]}},children:t.getPageTabRoutes("payment-method-detail")},{path:"global-settings",component:fe,data:{breadcrumb:"breadcrumb.global-settings",locationId:"global-setting-detail"},resolve:{detail:()=>Ti(G).query(on).mapSingle(p=>({entity:Tt(p.globalSettings)}))},children:t.getPageTabRoutes("global-setting-detail")}];var vg=(()=>{class t{static{this.hasRegisteredTabsAndBulkActions=!1}constructor(e,n){t.hasRegisteredTabsAndBulkActions||(e.registerBulkAction(jo),e.registerBulkAction(Io),e.registerBulkAction(To),e.registerBulkAction(Uo),e.registerBulkAction(nr),e.registerBulkAction(or),e.registerBulkAction(ir),e.registerBulkAction(Ro),e.registerBulkAction(Oo),e.registerBulkAction(No),e.registerBulkAction(cr),e.registerBulkAction(gr),e.registerBulkAction(ko),e.registerBulkAction(vr),e.registerBulkAction(Fr),e.registerBulkAction(lr),e.registerBulkAction(mr),e.registerBulkAction(sr),n.registerPageTab({priority:0,location:"seller-list",tab:"breadcrumb.sellers",route:"",component:Wo}),n.registerPageTab({priority:0,location:"seller-detail",tab:"settings.seller",route:"",component:Je({component:zo,query:cn,entityKey:"seller",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-seller",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"channel-list",tab:"breadcrumb.channels",route:"",component:Po}),n.registerPageTab({priority:0,location:"channel-detail",tab:"settings.channel",route:"",component:Je({component:Do,query:en,entityKey:"channel",getBreadcrumbs:i=>[{label:i?i.code===Sr.DEFAULT_CHANNEL_CODE?"common.default-channel":i.code:"settings.create-new-channel",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"administrator-list",tab:"breadcrumb.administrators",route:"",component:So}),n.registerPageTab({priority:0,location:"administrator-detail",tab:"settings.administrator",route:"",component:Je({component:Fo,query:Xi,entityKey:"administrator",getBreadcrumbs:i=>[{label:i?`${i.firstName} ${i.lastName}`:"admin.create-new-administrator",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"role-list",tab:"breadcrumb.roles",route:"",component:Ho}),n.registerPageTab({priority:0,location:"role-detail",tab:"settings.role",route:"",component:Je({component:Zo,query:pn,entityKey:"role",getBreadcrumbs:i=>[{label:i?i.description:"settings.create-new-role",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"shipping-method-list",tab:"breadcrumb.shipping-methods",route:"",component:rr}),n.registerPageTab({priority:0,location:"shipping-method-detail",tab:"settings.shipping-method",route:"",component:Je({component:tr,query:fn,entityKey:"shippingMethod",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-shipping-method",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"shipping-method-list",tab:"settings.test-shipping-methods",route:"test",component:Cr}),n.registerPageTab({priority:0,location:"payment-method-list",tab:"breadcrumb.payment-methods",route:"",component:Vo}),n.registerPageTab({priority:0,location:"payment-method-detail",tab:"settings.payment-method",route:"",component:Je({component:wo,query:rn,entityKey:"paymentMethod",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-payment-method",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"tax-category-list",tab:"breadcrumb.tax-categories",route:"",component:ur}),n.registerPageTab({priority:0,location:"tax-category-detail",tab:"settings.tax-category",route:"",component:Je({component:dr,query:Dn,entityKey:"taxCategory",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-tax-category",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"tax-rate-list",tab:"breadcrumb.tax-rates",route:"",component:hr}),n.registerPageTab({priority:0,location:"tax-rate-detail",tab:"settings.tax-rate",route:"",component:Je({component:fr,query:xn,entityKey:"taxRate",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-tax-rate",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"country-list",tab:"breadcrumb.countries",route:"",component:Lo}),n.registerPageTab({priority:0,location:"country-detail",tab:"settings.country",route:"",component:Je({component:Bo,query:nn,entityKey:"country",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-country",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"zone-list",tab:"breadcrumb.zones",route:"",component:br}),n.registerPageTab({priority:0,location:"zone-detail",tab:"settings.zone",route:"",component:Je({component:_r,query:Bn,entityKey:"zone",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-zone",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"global-setting-detail",tab:"breadcrumb.global-settings",route:"",component:Ao}),n.registerPageTab({priority:0,location:"profile",tab:"breadcrumb.profile",route:"",component:$o}),n.registerPageTab({priority:0,location:"stock-location-list",tab:"catalog.stock-locations",route:"",component:pr}),n.registerPageTab({priority:0,location:"stock-location-detail",tab:"catalog.stock-location",route:"",component:Je({component:ar,query:_n,entityKey:"stockLocation",getBreadcrumbs:i=>[{label:i?i.name:"catalog.create-new-stock-location",link:[i?.id]}]})}),t.hasRegisteredTabsAndBulkActions=!0)}static{this.\u0275fac=function(n){return new(n||t)(Pt(ao),Pt(fi))}}static{this.\u0275mod=Vi({type:t})}static{this.\u0275inj=wi({providers:[{provide:wn,useFactory:e=>Tr(e),multi:!0,deps:[fi]}],imports:[co,Rn.forChild([])]})}}return t})();export{_o as AddCountryToZoneDialogComponent,Fo as AdminDetailComponent,So as AdministratorListComponent,H0 as CREATE_STOCK_LOCATION,Do as ChannelDetailComponent,Po as ChannelListComponent,Bo as CountryDetailComponent,Lo as CountryListComponent,od as GET_ADMINISTRATOR_DETAIL,dd as GET_ADMINISTRATOR_LIST,Fd as GET_CHANNEL_DETAIL,Bd as GET_CHANNEL_LIST,Rd as GET_COUNTRY_DETAIL,Ud as GET_COUNTRY_LIST,Yd as GET_GLOBAL_SETTINGS_DETAIL,oc as GET_PAYMENT_METHOD_DETAIL,gc as GET_PAYMENT_METHOD_LIST,Fc as GET_PROFILE_DETAIL,Bc as GET_ROLE_DETAIL,Oc as GET_ROLE_LIST,Hc as GET_SELLER_DETAIL,I0 as GET_SHIPPING_METHOD_DETAIL,R0 as GET_SHIPPING_METHOD_LIST,U0 as GET_STOCK_LOCATION_DETAIL,nu as GET_STOCK_LOCATION_LIST,pu as GET_TAX_CATEGORY_DETAIL,Cu as GET_TAX_CATEGORY_LIST,Du as GET_TAX_RATE_DETAIL,Au as GET_TAX_RATE_LIST,Zu as GET_ZONE_DETAIL,nf as GET_ZONE_LIST,Hp as GET_ZONE_MEMBERS,Ao as GlobalSettingsComponent,wo as PaymentMethodDetailComponent,Vo as PaymentMethodListComponent,Ci as PermissionGridComponent,$o as ProfileComponent,mf as ProfileResolver,Zo as RoleDetailComponent,Ho as RoleListComponent,zo as SellerDetailComponent,Wo as SellerListComponent,vg as SettingsModule,Qo as ShippingEligibilityTestResultComponent,tr as ShippingMethodDetailComponent,rr as ShippingMethodListComponent,Jo as ShippingMethodTestResultComponent,ar as StockLocationDetailComponent,pr as StockLocationListComponent,dr as TaxCategoryDetailComponent,ur as TaxCategoryListComponent,fr as TaxRateDetailComponent,hr as TaxRateListComponent,bi as TestAddressFormComponent,yi as TestOrderBuilderComponent,Cr as TestShippingMethodsComponent,z0 as UPDATE_STOCK_LOCATION,_r as ZoneDetailComponent,br as ZoneListComponent,fo as ZoneMemberControlsDirective,Zt as ZoneMemberListComponent,go as ZoneMemberListHeaderDirective,Ro as assignPaymentMethodsToChannelBulkAction,nr as assignShippingMethodsToChannelBulkAction,lr as assignStockLocationsToChannelBulkAction,Tr as createRoutes,To as deleteAdministratorsBulkAction,Io as deleteChannelsBulkAction,ko as deleteCountriesBulkAction,No as deletePaymentMethodsBulkAction,Uo as deleteRolesBulkAction,jo as deleteSellersBulkAction,ir as deleteShippingMethodsBulkAction,sr as deleteStockLocationsBulkAction,cr as deleteTaxCategoriesBulkAction,gr as deleteTaxRatesBulkAction,vr as deleteZonesBulkAction,Oo as removePaymentMethodsFromChannelBulkAction,or as removeShippingMethodsFromChannelBulkAction,mr as removeStockLocationsFromChannelBulkAction,Fr as removeZoneMembersBulkAction};
|
|
395
|
-
//# sourceMappingURL=chunk-
|
|
395
|
+
//# sourceMappingURL=chunk-4LSWVXPN.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$c as pt,$d as Be,Aa as ye,Ab as Se,Ae,B as G,Be as Fe,Ca as m,Da as k,Df as Ne,Ea as f,Ef as Ue,Eg as Y,F as re,Fa as A,Gg as Ze,H as me,I as R,L as ge,Le as je,Lg as K,Ma as F,Me as Q,Mf as Ge,Mg as V,P as b,Q as ue,Qa as d,Ra as c,Rb as Oe,Sa as $,Sb as Te,T as _,Tb as Me,U as v,Ua as xe,Va as we,Wa as be,Ya as De,Yd as Le,Yf as qe,Za as B,Zd as Pe,Zf as ze,_ as n,_d as $e,a as ae,aa as x,ae as L,b as de,ba as fe,ca as y,da as D,db as S,dd as O,dh as Z,e as se,ed as We,f as ce,fg as He,g as pe,h as U,ha as u,id as Ie,ja as p,jd as ke,jf as lt,la as W,ld as T,ma as o,mg as Qe,n as M,na as a,nb as E,nd as H,ng as Ye,o as le,oa as h,rg as Ke,sa as I,ta as C,ua as g,va as he,wa as _e,xb as q,xe as Ee,ya as ve,ye as Ve,za as Ce,zb as z,ze as Re}from"./chunk-
|
|
1
|
+
import{$c as pt,$d as Be,Aa as ye,Ab as Se,Ae,B as G,Be as Fe,Ca as m,Da as k,Df as Ne,Ea as f,Ef as Ue,Eg as Y,F as re,Fa as A,Gg as Ze,H as me,I as R,L as ge,Le as je,Lg as K,Ma as F,Me as Q,Mf as Ge,Mg as V,P as b,Q as ue,Qa as d,Ra as c,Rb as Oe,Sa as $,Sb as Te,T as _,Tb as Me,U as v,Ua as xe,Va as we,Wa as be,Ya as De,Yd as Le,Yf as qe,Za as B,Zd as Pe,Zf as ze,_ as n,_d as $e,a as ae,aa as x,ae as L,b as de,ba as fe,ca as y,da as D,db as S,dd as O,dh as Z,e as se,ed as We,f as ce,fg as He,g as pe,h as U,ha as u,id as Ie,ja as p,jd as ke,jf as lt,la as W,ld as T,ma as o,mg as Qe,n as M,na as a,nb as E,nd as H,ng as Ye,o as le,oa as h,rg as Ke,sa as I,ta as C,ua as g,va as he,wa as _e,xb as q,xe as Ee,ya as ve,ye as Ve,za as Ce,zb as z,ze as Re}from"./chunk-QJJH2BHW.js";var Xe=se(pt());var mt=["portal"],gt=["*"];function ut(i,l){i&1&&_e(0)}function ft(i,l){}var Je=(()=>{class i{ngAfterViewInit(){this.loadWidget()}loadWidget(){return ce(this,null,function*(){let e=this.widgetConfig.loadComponent(),t=e instanceof Promise?yield e:e;this.componentRef=this.portal.createComponent(t),this.componentRef.changeDetectorRef.detectChanges()})}ngOnDestroy(){this.componentRef&&this.componentRef.destroy()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-dashboard-widget"]],viewQuery:function(t,r){if(t&1&&ve(mt,5,fe),t&2){let s;Ce(s=ye())&&(r.portal=s.first)}},inputs:{widgetConfig:"widgetConfig"},standalone:!1,ngContentSelectors:gt,decls:5,vars:3,consts:[["portal",""],[3,"title"],["vdrCardControls",""]],template:function(t,r){if(t&1&&(he(),o(0,"vdr-card",1),d(1,"translate"),u(2,ut,1,0,"ng-template",2)(3,ft,0,0,"ng-template",null,0,xe),a()),t&2){let s;p("title",c(1,1,(s=r.widgetConfig.title)!==null&&s!==void 0?s:""))}},dependencies:[Ue,Ne,T],styles:[`[_nghost-%COMP%]{display:block}.card[_ngcontent-%COMP%]{margin-top:0;min-height:200px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between}
|
|
2
2
|
/*# sourceMappingURL=dashboard-widget.component-QZMAFGFD.css.map */`],changeDetection:0})}}return i})();var _t=i=>({index:i}),vt=i=>({width:i});function Ct(i,l){if(i&1){let e=I();o(0,"button",8),C("click",function(){let r=_(e).$implicit,s=g();return v(s.addWidget(r.id))}),m(1),d(2,"translate"),a()}if(i&2){let e,t=l.$implicit;n(),f(" ",c(2,1,(e=t.config.title)!==null&&e!==void 0?e:t.id)," ")}}function yt(i,l){if(i&1){let e=I();o(0,"button",22),C("click",function(){let r=_(e).$implicit,s=g(2).$implicit,w=g(2);return v(w.setWidgetWidth(s,r))}),m(1),d(2,"translate"),a()}if(i&2){let e=l.$implicit,t=g(2).$implicit;p("disabled",e===t.width),n(),f(" ",$(2,2,"dashboard.widget-width",F(5,vt,e))," ")}}function xt(i,l){if(i&1){let e=I();o(0,"vdr-dashboard-widget",13)(1,"div",14)(2,"div",15),h(3,"clr-icon",16),a(),o(4,"vdr-dropdown")(5,"button",17),h(6,"clr-icon",3),a(),o(7,"vdr-dropdown-menu",4)(8,"h4",18),m(9),d(10,"translate"),a(),u(11,yt,3,7,"button",19),h(12,"div",20),o(13,"button",8),C("click",function(){_(e);let r=g().$implicit,s=g(2);return v(s.removeWidget(r))}),h(14,"clr-icon",21),m(15),d(16,"translate"),a()()()()()}if(i&2){let e=g().$implicit,t=g(2);p("widgetConfig",e.config),n(9),k(c(10,4,"dashboard.widget-resize")),n(2),p("ngForOf",t.getSupportedWidths(e.config)),n(4),f(" ",c(16,6,"dashboard.remove-widget")," ")}}function wt(i,l){if(i&1&&(o(0,"div",11),u(1,xt,17,8,"vdr-dashboard-widget",12),a()),i&2){let e=l.$implicit,t=g(2);p("ngClass",t.getClassForWidth(e.width))("cdkDragData",e),n(),p("vdrIfPermissions",e.config.requiresPermissions||null)}}function bt(i,l){if(i&1){let e=I();o(0,"div",9),C("cdkDropListDropped",function(r){_(e);let s=g();return v(s.drop(r))}),u(1,wt,2,3,"div",10),a()}if(i&2){let e=l.$implicit,t=l.index,r=g();p("cdkDropListData",F(3,_t,t)),n(),p("ngForOf",e)("ngForTrackBy",r.trackRowItem)}}var et=(()=>{class i{constructor(e,t,r,s){this.dashboardWidgetService=e,this.localStorageService=t,this.changedDetectorRef=r,this.dataService=s,this.deletionMarker="__delete__",this.setTitle=Ke()}ngOnInit(){this.availableWidgets$=this.dataService.client.userStatus().stream$.pipe(M(({userStatus:e})=>e.permissions),M(e=>this.dashboardWidgetService.getAvailableWidgets(e)),ge(e=>this.widgetLayout=this.initLayout(e.map(t=>t.id)))),this.setTitle("breadcrumb.dashboard")}getClassForWidth(e){switch(e){case 3:return"clr-col-12 clr-col-sm-6 clr-col-lg-3";case 4:return"clr-col-12 clr-col-sm-6 clr-col-lg-4";case 6:return"clr-col-12 clr-col-lg-6";case 8:return"clr-col-12 clr-col-lg-8";case 12:return"clr-col-12";default:(0,Xe.assertNever)(e)}}getSupportedWidths(e){return e.supportedWidths||[3,4,6,8,12]}setWidgetWidth(e,t){e.width=t,this.recalculateLayout()}trackRow(e,t){return t.map(s=>`${s.id}:${s.width}`).join("|")}trackRowItem(e,t){return t.config}addWidget(e){let t=this.dashboardWidgetService.getWidgetById(e);if(t){let r=this.getSupportedWidths(t)[0],s={id:e,config:t,width:r},w;this.widgetLayout&&this.widgetLayout.length?w=this.widgetLayout[this.widgetLayout.length-1]:(w=[],this.widgetLayout?.push(w)),w.push(s),this.recalculateLayout()}}removeWidget(e){e.id=this.deletionMarker,this.recalculateLayout()}drop(e){let{currentIndex:t,previousIndex:r,previousContainer:s,container:w}=e;if(!(r===t&&s.data.index===w.data.index)&&this.widgetLayout){let N=this.widgetLayout[s.data.index],ee=this.widgetLayout[w.data.index];N.splice(r,1),ee.splice(t,0,e.item.data),this.recalculateLayout()}}initLayout(e){let t=this.localStorageService.get("dashboardWidgetLayout"),r;return t&&(r=t.filter(s=>e.includes(s.id))),this.dashboardWidgetService.getWidgetLayout(r)}recalculateLayout(){if(this.widgetLayout){let t=this.widgetLayout.reduce((r,s)=>[...r,...s],[]).filter(r=>r.id!==this.deletionMarker).map(r=>({id:r.id,width:r.width}));this.widgetLayout=this.dashboardWidgetService.getWidgetLayout(t),this.localStorageService.set("dashboardWidgetLayout",t),setTimeout(()=>this.changedDetectorRef.markForCheck())}}static{this.\u0275fac=function(t){return new(t||i)(x(Z),x(We),x(we),x(O))}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-dashboard"]],standalone:!1,decls:13,vars:8,consts:[[1,"widget-header","mb-1"],["vdrDropdownTrigger","",1,"btn","btn-secondary","btn-sm"],["shape","plus"],["shape","ellipsis-vertical"],["vdrPosition","bottom-right"],["vdrDropdownItem","",3,"click",4,"ngFor","ngForOf"],["cdkDropListGroup",""],["class","clr-row dashboard-row","cdkDropList","","cdkDropListOrientation","horizontal",3,"cdkDropListData","cdkDropListDropped",4,"ngFor","ngForOf","ngForTrackBy"],["vdrDropdownItem","",3,"click"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"clr-row","dashboard-row",3,"cdkDropListDropped","cdkDropListData"],["class","dashboard-item","cdkDrag","",3,"ngClass","cdkDragData",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"dashboard-item",3,"ngClass","cdkDragData"],[3,"widgetConfig",4,"vdrIfPermissions"],[3,"widgetConfig"],[1,"flex"],["cdkDragHandle","",1,"drag-handle"],["shape","drag-handle","size","24"],["vdrDropdownTrigger","",1,"icon-button"],[1,"dropdown-header"],["vdrDropdownItem","",3,"disabled","click",4,"ngFor","ngForOf"],["role","separator",1,"dropdown-divider"],["shape","trash",1,"is-danger"],["vdrDropdownItem","",3,"click","disabled"]],template:function(t,r){t&1&&(o(0,"vdr-page-block")(1,"div",0)(2,"vdr-dropdown")(3,"button",1),h(4,"clr-icon",2),m(5),d(6,"translate"),h(7,"clr-icon",3),a(),o(8,"vdr-dropdown-menu",4),u(9,Ct,3,3,"button",5),d(10,"async"),a()()(),o(11,"div",6),u(12,bt,2,5,"div",7),a()()),t&2&&(n(5),f(" ",c(6,4,"dashboard.add-widget")," "),n(4),p("ngForOf",c(10,6,r.availableWidgets$)),n(3),p("ngForOf",r.widgetLayout)("ngForTrackBy",r.trackRow))},dependencies:[L,be,De,Be,$e,Pe,Le,Ee,Ve,Re,Ae,Ge,Ye,Je,S,T],styles:[`.widget-header[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.placeholder[_ngcontent-%COMP%]{color:var(--color-grey-300);text-align:center}.placeholder[_ngcontent-%COMP%] .version[_ngcontent-%COMP%]{font-size:3em;margin:24px;line-height:1em}.placeholder[_ngcontent-%COMP%] .clr-i-outline{fill:var(--color-grey-200)}vdr-dashboard-widget[_ngcontent-%COMP%]{margin-bottom:24px}.drag-handle[_ngcontent-%COMP%]{cursor:move}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.dashboard-row[_ngcontent-%COMP%]{padding:0;border-width:1;margin-bottom:6px;transition:padding .2s,margin .2s}.dashboard-row.cdk-drop-list-dragging[_ngcontent-%COMP%], .dashboard-row.cdk-drop-list-receiving[_ngcontent-%COMP%]{border:2px dashed var(--color-component-border-200);border-radius:var(--border-radius);padding:6px}.dashboard-row.cdk-drop-list-dragging[_ngcontent-%COMP%] .dashboard-item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}
|
|
3
3
|
/*# sourceMappingURL=dashboard.component-D6WHUZ2N.css.map */`],changeDetection:0})}}return i})();var tt=[{path:"",component:et,pathMatch:"full"}];var Ot=i=>["/orders/",i];function Tt(i,l){if(i&1&&(o(0,"a",6)(1,"span"),m(2),a(),h(3,"clr-icon",7),a()),i&2){let e=l.item;p("routerLink",F(2,Ot,e.id)),n(2),k(e.code)}}function Mt(i,l){if(i&1&&h(0,"vdr-order-state-label",8),i&2){let e=l.item;p("state",e.state)}}function Wt(i,l){if(i&1&&h(0,"vdr-customer-label",9),i&2){let e=l.item;p("customer",e.customer)}}function It(i,l){if(i&1&&(m(0),d(1,"localeCurrency")),i&2){let e=l.item;f(" ",$(1,1,e.totalWithTax,e.currencyCode)," ")}}function kt(i,l){if(i&1&&(m(0),d(1,"timeAgo")),i&2){let e=l.item;f(" ",c(1,1,e.orderPlacedAt)," ")}}var ci=E`
|
|
4
4
|
query GetLatestOrders($options: OrderListOptions) {
|
|
@@ -49,4 +49,4 @@ import{$c as pt,$d as Be,Aa as ye,Ab as Se,Ae,B as G,Be as Fe,Ca as m,Da as k,Df
|
|
|
49
49
|
`,nt=(()=>{class i{constructor(e){this.dataService=e,this.today=new Date,this.yesterday=new Date(new Date().setDate(this.today.getDate()-1)),this.selection$=new U({timeframe:"day",date:this.today})}ngOnInit(){this.dateRange$=this.selection$.pipe(G(),M(t=>({start:(0,oe.default)(t.date).startOf(t.timeframe).toDate(),end:(0,oe.default)(t.date).endOf(t.timeframe).toDate()})),re(1));let e=this.dateRange$.pipe(R(({start:t,end:r})=>this.dataService.query(Me,{start:t.toISOString(),end:r.toISOString()}).refetchOnChannelChange().mapStream(s=>s.orders)),re(1));this.totalOrderCount$=e.pipe(M(t=>t.totalItems)),this.totalOrderValue$=e.pipe(M(t=>t.items.reduce((r,s)=>r+s.totalWithTax,0))),this.currencyCode$=this.dataService.settings.getActiveChannel().refetchOnChannelChange().mapStream(t=>t.activeChannel.defaultCurrencyCode||void 0)}static{this.\u0275fac=function(t){return new(t||i)(x(O))}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-order-summary-widget"]],standalone:!1,decls:22,vars:23,consts:[[1,"stats"],[1,"stat"],[1,"stat-figure"],[1,"stat-label"],[1,"footer"],["class","flex",4,"ngIf"],["class","date-range",4,"ngIf"],[1,"flex"],[1,"button-small",3,"click"],[1,"ml-1","button-small",3,"click"],[1,"date-range"]],template:function(t,r){t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),m(3),d(4,"async"),a(),o(5,"div",3),m(6),d(7,"translate"),a()(),o(8,"div",1)(9,"div",2),m(10),d(11,"async"),d(12,"async"),d(13,"localeCurrency"),a(),o(14,"div",3),m(15),d(16,"translate"),a()()(),o(17,"div",4),u(18,Pt,13,20,"div",5),d(19,"async"),u(20,$t,4,6,"div",6),d(21,"async"),a()),t&2&&(n(3),k(c(4,6,r.totalOrderCount$)),n(3),k(c(7,8,"dashboard.total-orders")),n(4),f(" ",$(13,14,c(11,10,r.totalOrderValue$),c(12,12,r.currencyCode$)||void 0)," "),n(5),k(c(16,17,"dashboard.total-order-value")),n(3),p("ngIf",c(19,19,r.selection$)),n(2),p("ngIf",c(21,21,r.dateRange$)))},dependencies:[B,S,T,je,Q],styles:[`.stats[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.stat[_ngcontent-%COMP%]{text-align:center}.stat-figure[_ngcontent-%COMP%]{font-size:2rem;line-height:3rem}.stat-label[_ngcontent-%COMP%]{text-transform:uppercase}.date-range[_ngcontent-%COMP%]{margin-top:calc(var(--space-unit) * 3);font-size:var(--font-size-xs)}.footer[_ngcontent-%COMP%]{margin-top:24px;display:flex;flex-direction:column;justify-content:space-between}.button-small.active[_ngcontent-%COMP%]{background-color:var(--color-primary-200);color:var(--color-primary-900)}
|
|
50
50
|
/*# sourceMappingURL=order-summary-widget.component-AEWYOKYB.css.map */`],changeDetection:0})}}return i})(),Oi=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({imports:[V]})}}return i})();var ot=[{id:"metrics",width:12},{id:"orderSummary",width:6},{id:"latestOrders",width:6}],at={metrics:{title:"dashboard.metrics",supportedWidths:[6,8,12],loadComponent:()=>rt,requiresPermissions:[z.ReadOrder]},orderSummary:{title:"dashboard.orders-summary",loadComponent:()=>nt,supportedWidths:[4,6,8,12],requiresPermissions:[z.ReadOrder]},latestOrders:{title:"dashboard.latest-orders",loadComponent:()=>it,supportedWidths:[6,8,12],requiresPermissions:[z.ReadOrder]}};var Ui=(()=>{class i{constructor(e){Object.entries(at).map(([t,r])=>{e.getWidgetById(t)||e.registerWidget(t,r)}),e.getDefaultLayout().length===0&&e.setDefaultLayout(ot)}static{this.\u0275fac=function(t){return new(t||i)(ue(Z))}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({imports:[K,ke.forChild(tt)]})}}return i})();var qi=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-test-widget"]],standalone:!1,decls:2,vars:0,template:function(t,r){t&1&&(o(0,"p"),m(1,"This is a test widget!"),a())},encapsulation:2,changeDetection:0})}}return i})(),zi=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({})}}return i})();function Bt(i,l){if(i&1&&(o(0,"p",4),m(1),a()),i&2){let e=g(2);n(),A(" ",e.hideVendureBranding?"":"Vendure"," ",e.hideVersion?"":"Admin UI v"+e.version," ")}}function Et(i,l){if(i&1&&(o(0,"div")(1,"h4",3),m(2),h(3,"br"),o(4,"small",4),m(5),d(6,"timeAgo"),a()(),u(7,Bt,2,2,"p",5),a()),i&2){let e=l.ngIf,t=g();n(2),A(" Welcome, ",e.firstName," ",e.lastName,""),n(3),f("Last login: ",c(6,4,e.user.lastLogin),""),n(2),p("ngIf",!t.hideVendureBranding||!t.hideVersion)}}var Yi=(()=>{class i{constructor(e){this.dataService=e,this.version=Fe,this.brand=H().brand,this.hideVendureBranding=H().hideVendureBranding,this.hideVersion=H().hideVersion}ngOnInit(){this.administrator$=this.dataService.administrator.getActiveAdministrator().mapStream(e=>e.activeAdministrator||null)}static{this.\u0275fac=function(t){return new(t||i)(x(O))}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-welcome-widget"]],standalone:!1,decls:4,vars:3,consts:[[4,"ngIf"],[1,"placeholder"],["shape","line-chart","size","128"],[1,""],[1,"p5"],["class","p5",4,"ngIf"]],template:function(t,r){t&1&&(u(0,Et,8,6,"div",0),d(1,"async"),o(2,"div",1),h(3,"clr-icon",2),a()),t&2&&p("ngIf",c(1,1,r.administrator$))},dependencies:[L,B,S,Y],styles:[`[_nghost-%COMP%]{display:flex;justify-content:space-between}.placeholder[_ngcontent-%COMP%]{color:var(--color-grey-200)}
|
|
51
51
|
/*# sourceMappingURL=welcome-widget.component-KGZCKLMD.css.map */`],changeDetection:0})}}return i})(),Ki=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({imports:[V]})}}return i})();export{ot as DEFAULT_DASHBOARD_WIDGET_LAYOUT,at as DEFAULT_WIDGETS,et as DashboardComponent,Ui as DashboardModule,Je as DashboardWidgetComponent,_i as GET_ORDER_CHART_DATA,Si as GET_ORDER_SUMMARY,it as LatestOrdersWidgetComponent,pi as LatestOrdersWidgetModule,rt as OrderChartWidgetComponent,nt as OrderSummaryWidgetComponent,Oi as OrderSummaryWidgetModule,qi as TestWidgetComponent,zi as TestWidgetModule,Yi as WelcomeWidgetComponent,Ki as WelcomeWidgetModule,tt as dashboardRoutes};
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
52
|
+
//# sourceMappingURL=chunk-6625ZZRO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as u}from"./chunk-QJJH2BHW.js";var g=u(r=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.normalizeString=n;function n(l,e=" "){let t=new RegExp(`([${e}]){2,}`,"g");return(l||"").normalize("NFD").replace(/[\u00df]/g,"ss").replace(/[\u1e9e]/g,"SS").replace(/[\u0308]/g,"e").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[!"£$%^&*()+[\]{};:@#~?\\/,|><`¬'=‘’©®™]/g,"").replace(/\s+/g,e).replace(t,e)}});export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6UWQNINH.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$a as ri,$c as ln,$f as Le,Aa as ii,Ab as Ue,Ae as rt,Af as at,Ag as Gi,B as Re,Ba as K,Bd as fi,Bf as st,Bg as ct,Ca as d,Ce as hi,Cf as mt,D as Wt,Da as S,Dd as Ze,De as vi,Ea as f,Ed as Be,Ef as pt,Eg as ki,F as Qt,Fe as yi,Ff as ke,Ga as Ye,Ge as le,H as Te,Ha as ze,He as we,Hf as Di,I as U,Ia as Ke,Id as ae,Ie as ot,Ja as Je,Jd as Ae,Jf as Si,Jg as ye,K as yt,L as Yt,La as ee,Ld as Pe,Le as de,Lg as Ni,Ma as P,Me as xi,Mf as Q,Nb as He,Nf as ue,Ob as ai,Of as _e,P as zt,Pb as si,Pf as fe,Pg as ut,Q as xt,Qa as a,Qb as mi,Qc as pi,Qf as ge,Qg as St,Ra as l,Rc as li,Rf as Ii,S as Kt,Sa as B,T as h,Td as Dt,U as v,Ua as J,Ud as et,Ug as _t,Va as Ee,Vd as gi,Vf as Ti,Vg as Mi,W as $,Wf as Ne,Xf as lt,Ya as te,Za as G,Zf as Ce,Zg as ft,_ as r,_a as ni,_f as Me,a as k,aa as x,ab as oi,ae as O,b as be,ba as Jt,bh as Oe,c as Ot,ca as F,cd as di,ce as Ci,da as Xt,db as N,dd as L,e as pn,eh as gt,fd as ci,fg as he,g as $e,ga as Z,gd as ui,gg as Ei,h as z,ha as _,hd as Xe,hg as Fi,i as De,id as ne,if as ce,ig as Bi,j as Vt,ja as o,jd as _i,k as $t,la as Zt,ld as A,ma as s,mg as Ai,n as E,na as p,nb as ie,ng as ve,o as Ie,oa as g,of as bi,p as Rt,pa as I,qa as T,r as Ut,sa as D,ta as y,tb as M,te as se,u as We,ua as c,ud as re,ue as me,ug as dt,vd as X,ve as pe,vg as je,w as Ht,wb as bt,wd as q,we as W,x as jt,xd as oe,xe as tt,y as Qe,ya as ei,ye as it,yg as Pi,z as qt,za as ti,zb as Fe,ze as nt,zf as Ge,zg as wi}from"./chunk-
|
|
1
|
+
import{$a as ri,$c as ln,$f as Le,Aa as ii,Ab as Ue,Ae as rt,Af as at,Ag as Gi,B as Re,Ba as K,Bd as fi,Bf as st,Bg as ct,Ca as d,Ce as hi,Cf as mt,D as Wt,Da as S,Dd as Ze,De as vi,Ea as f,Ed as Be,Ef as pt,Eg as ki,F as Qt,Fe as yi,Ff as ke,Ga as Ye,Ge as le,H as Te,Ha as ze,He as we,Hf as Di,I as U,Ia as Ke,Id as ae,Ie as ot,Ja as Je,Jd as Ae,Jf as Si,Jg as ye,K as yt,L as Yt,La as ee,Ld as Pe,Le as de,Lg as Ni,Ma as P,Me as xi,Mf as Q,Nb as He,Nf as ue,Ob as ai,Of as _e,P as zt,Pb as si,Pf as fe,Pg as ut,Q as xt,Qa as a,Qb as mi,Qc as pi,Qf as ge,Qg as St,Ra as l,Rc as li,Rf as Ii,S as Kt,Sa as B,T as h,Td as Dt,U as v,Ua as J,Ud as et,Ug as _t,Va as Ee,Vd as gi,Vf as Ti,Vg as Mi,W as $,Wf as Ne,Xf as lt,Ya as te,Za as G,Zf as Ce,Zg as ft,_ as r,_a as ni,_f as Me,a as k,aa as x,ab as oi,ae as O,b as be,ba as Jt,bh as Oe,c as Ot,ca as F,cd as di,ce as Ci,da as Xt,db as N,dd as L,e as pn,eh as gt,fd as ci,fg as he,g as $e,ga as Z,gd as ui,gg as Ei,h as z,ha as _,hd as Xe,hg as Fi,i as De,id as ne,if as ce,ig as Bi,j as Vt,ja as o,jd as _i,k as $t,la as Zt,ld as A,ma as s,mg as Ai,n as E,na as p,nb as ie,ng as ve,o as Ie,oa as g,of as bi,p as Rt,pa as I,qa as T,r as Ut,sa as D,ta as y,tb as M,te as se,u as We,ua as c,ud as re,ue as me,ug as dt,vd as X,ve as pe,vg as je,w as Ht,wb as bt,wd as q,we as W,x as jt,xd as oe,xe as tt,y as Qe,ya as ei,ye as it,yg as Pi,z as qt,za as ti,zb as Fe,ze as nt,zf as Ge,zg as wi}from"./chunk-QJJH2BHW.js";function dn(t,m){t&1&&(I(0),g(1,"clr-icon",1),d(2),a(3,"translate"),T()),t&2&&(r(2),f(" ",l(3,1,"customer.verified")," "))}function cn(t,m){t&1&&(I(0),g(1,"clr-icon",2),d(2),a(3,"translate"),T()),t&2&&(r(2),f(" ",l(3,1,"customer.registered")," "))}function un(t,m){if(t&1&&(s(0,"vdr-chip"),_(1,dn,4,3,"ng-container",0)(2,cn,4,3,"ng-container",0),p()),t&2){let e=c();r(),o("ngIf",e.customer.user==null?null:e.customer.user.verified),r(),o("ngIf",!(e.customer.user!=null&&e.customer.user.verified))}}function _n(t,m){t&1&&(s(0,"vdr-chip"),d(1),a(2,"translate"),p()),t&2&&(r(),S(l(2,1,"customer.guest")))}var Ve=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-customer-status-label"]],inputs:{customer:"customer"},standalone:!1,decls:2,vars:2,consts:[[4,"ngIf"],["shape","check-circle",1,"verified-user-icon"],["shape","check-circle",1,"registered-user-icon"]],template:function(i,n){i&1&&_(0,un,3,2,"vdr-chip",0)(1,_n,3,3,"vdr-chip",0),i&2&&(o("ngIf",n.customer.user==null?null:n.customer.user.id),r(),o("ngIf",!(n.customer.user!=null&&n.customer.user.id)))},dependencies:[O,G,ce,A],styles:[`.registered-user-icon[_ngcontent-%COMP%]{color:var(--color-grey-300)}.verified-user-icon[_ngcontent-%COMP%]{color:var(--color-success-500)}
|
|
2
2
|
/*# sourceMappingURL=customer-status-label.component-GVVEEFRV.css.map */`],changeDetection:0})}}return t})();var fn=t=>["/customer/customers",t];function gn(t,m){if(t&1&&d(0),t&2){let e=m.item;f(" ",e.id," ")}}function Cn(t,m){if(t&1&&(d(0),a(1,"localeDate")),t&2){let e=m.item;f(" ",B(1,1,e.createdAt,"short")," ")}}function hn(t,m){if(t&1&&(d(0),a(1,"localeDate")),t&2){let e=m.item;f(" ",B(1,1,e.createdAt,"short")," ")}}function vn(t,m){if(t&1&&(s(0,"a",9)(1,"span"),d(2),p(),g(3,"clr-icon",10),p()),t&2){let e=m.item;o("routerLink",P(4,fn,e.id)),r(2),Ye(" ",e.title," ",e.firstName," ",e.lastName," ")}}function yn(t,m){if(t&1&&g(0,"vdr-customer-status-label",11),t&2){let e=m.item;o("customer",e)}}function xn(t,m){if(t&1&&d(0),t&2){let e=m.item;f(" ",e.emailAddress," ")}}var Ct=(()=>{class t{constructor(e,i){this.router=e,this.dataService=i,this.selectedMemberIds=[],this.selectionChange=new $,this.fetchParamsChange=new $,this.filterTermControl=new fi(""),this.selectionManager=new bi({multiSelect:!0,itemsAreEqual:(n,u)=>n.id===u.id,additiveMode:!0}),this.refresh$=new z(!0),this.destroy$=new $e}ngOnInit(){this.membersCurrentPage$=this.route.paramMap.pipe(E(i=>i.get("membersPage")),E(i=>i?+i:1),Te(1),Re()),this.membersItemsPerPage$=this.route.paramMap.pipe(E(i=>i.get("membersPerPage")),E(i=>i?+i:10),Te(10),Re());let e=this.filterTermControl.valueChanges.pipe(jt(250),Yt(()=>this.setContentsPageNumber(1)),Te(""));Ie(this.membersCurrentPage$,this.membersItemsPerPage$,e,this.refresh$).pipe(yt(this.destroy$)).subscribe(([i,n,u])=>{let C=n,b=(i-1)*n;this.fetchParamsChange.emit({filterTerm:u??"",skip:b,take:C})}),this.selectionManager.setCurrentItems(this.members?.filter(i=>this.selectedMemberIds.includes(i.id))??[]),this.selectionManager.selectionChanges$.pipe(yt(this.destroy$)).subscribe(i=>{this.selectionChange.emit(i.map(n=>n.id))})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setContentsPageNumber(e){this.setParam("membersPage",e)}setContentsItemsPerPage(e){this.setParam("membersPerPage",e)}refresh(){this.refresh$.next(!0)}setParam(e,i){this.router.navigate(["./",be(k({},this.route.snapshot.params),{[e]:i})],{relativeTo:this.route,queryParamsHandling:"merge"})}static{this.\u0275fac=function(i){return new(i||t)(x(Xe),x(L))}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-customer-group-member-list"]],inputs:{locationId:"locationId",members:"members",totalItems:"totalItems",route:"route",selectedMemberIds:"selectedMemberIds",activeGroup:"activeGroup"},outputs:{selectionChange:"selectionChange",fetchParamsChange:"fetchParamsChange"},standalone:!1,decls:24,vars:39,consts:[[3,"pageChange","itemsPerPageChange","id","items","itemsPerPage","totalItems","currentPage"],[3,"locationId","hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault"],["id","updated-at",3,"heading","hiddenByDefault"],["id","name",3,"heading","optional"],["id","status",3,"heading","hiddenByDefault"],["id","email-address",3,"heading"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],[3,"customer"]],template:function(i,n){i&1&&(s(0,"vdr-data-table-2",0),a(1,"async"),a(2,"async"),y("pageChange",function(C){return n.setContentsPageNumber(C)})("itemsPerPageChange",function(C){return n.setContentsItemsPerPage(C)}),g(3,"vdr-bulk-action-menu",1)(4,"vdr-dt2-search",2),a(5,"translate"),s(6,"vdr-dt2-column",3),a(7,"translate"),_(8,gn,1,1,"ng-template"),p(),s(9,"vdr-dt2-column",4),a(10,"translate"),_(11,Cn,2,4,"ng-template"),p(),s(12,"vdr-dt2-column",5),a(13,"translate"),_(14,hn,2,4,"ng-template"),p(),s(15,"vdr-dt2-column",6),a(16,"translate"),_(17,vn,4,6,"ng-template"),p(),s(18,"vdr-dt2-column",7),a(19,"translate"),_(20,yn,1,1,"ng-template"),p(),s(21,"vdr-dt2-column",8),a(22,"translate"),_(23,xn,1,1,"ng-template"),p()()),i&2&&(o("id",n.locationId)("items",n.members)("itemsPerPage",l(1,21,n.membersItemsPerPage$))("totalItems",n.totalItems)("currentPage",l(2,23,n.membersCurrentPage$)),r(3),o("locationId",n.locationId)("hostComponent",n)("selectionManager",n.selectionManager),r(),o("searchTermControl",n.filterTermControl)("searchTermPlaceholder",l(5,25,"customer.search-customers-by-email")),r(2),o("heading",l(7,27,"common.id"))("hiddenByDefault",!0),r(3),o("heading",l(10,29,"common.created-at"))("hiddenByDefault",!0),r(3),o("heading",l(13,31,"common.updated-at"))("hiddenByDefault",!0),r(3),o("heading",l(16,33,"customer.name"))("optional",!1),r(3),o("heading",l(19,35,"common.status"))("hiddenByDefault",!0),r(3),o("heading",l(22,37,"customer.email-address")))},dependencies:[O,ne,Ne,he,Ce,Le,Ve,N,A,de],encapsulation:2,changeDetection:0})}}return t})();var bn=t=>({groupName:t}),Dn=t=>({count:t});function Sn(t,m){if(t&1&&(d(0),a(1,"translate")),t&2){let e=c();f(" ",B(1,1,"customer.add-customers-to-group-with-name",P(4,bn,e.group.name)),`
|
|
3
3
|
`)}}function In(t,m){if(t&1){let e=D();s(0,"button",3),y("click",function(){h(e);let n=c();return v(n.cancel())}),d(1),a(2,"translate"),p(),s(3,"button",4),y("click",function(){h(e);let n=c();return v(n.add())}),d(4),a(5,"translate"),p()}if(t&2){let e=c();r(),S(l(2,3,"common.cancel")),r(2),o("disabled",!e.selectedCustomerIds.length),r(),f(" ",B(5,5,"customer.add-customers-to-group-with-count",P(8,Dn,e.selectedCustomerIds.length))," ")}}var $i=(()=>{class t{constructor(e){this.dataService=e,this.selectedCustomerIds=[],this.fetchGroupMembers$=new z({skip:0,take:10,filterTerm:""})}ngOnInit(){let e=this.fetchGroupMembers$.pipe(U(({skip:i,take:n,filterTerm:u})=>this.dataService.customer.getCustomerList(n,i,u).mapStream(C=>C.customers)));this.customers$=e.pipe(E(i=>i.items)),this.customersTotal$=e.pipe(E(i=>i.totalItems))}cancel(){this.resolveWith()}add(){this.resolveWith(this.selectedCustomerIds)}static{this.\u0275fac=function(i){return new(i||t)(x(L))}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-add-customer-to-group-dialog"]],standalone:!1,decls:5,vars:8,consts:[["vdrDialogTitle",""],["locationId","customer-group-members-picker-list",3,"fetchParamsChange","selectionChange","members","totalItems","route","selectedMemberIds"],["vdrDialogButtons",""],["type","button",1,"btn",3,"click"],["type","submit",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(_(0,Sn,2,6,"ng-template",0),s(1,"vdr-customer-group-member-list",1),a(2,"async"),a(3,"async"),y("fetchParamsChange",function(C){return n.fetchGroupMembers$.next(C)})("selectionChange",function(C){return n.selectedCustomerIds=C}),p(),_(4,In,6,10,"ng-template",2)),i&2&&(r(),o("members",l(2,4,n.customers$))("totalItems",l(3,6,n.customersTotal$))("route",n.route)("selectedMemberIds",n.selectedCustomerIds))},dependencies:[me,pe,Ct,N,A],encapsulation:2,changeDetection:0})}}return t})();function Tn(t,m){if(t&1&&(s(0,"span"),d(1),p()),t&2){let e=m.ngIf;r(),f("",e,",")}}function En(t,m){if(t&1&&(s(0,"span"),d(1),p()),t&2){let e=m.ngIf;r(),f(" ",e,"")}}function Fn(t,m){if(t&1&&_(0,Tn,2,1,"span",3)(1,En,2,1,"span",3),t&2){let e,i,n=c();o("ngIf",(e=n.addressForm.get("streetLine1"))==null?null:e.value),r(),o("ngIf",(i=n.addressForm.get("countryCode"))==null?null:i.value)}}function Bn(t,m){if(t&1){let e=D();s(0,"button",4),y("click",function(){h(e);let n=c();return v(n.cancel())}),d(1),a(2,"translate"),p(),s(3,"button",5),y("click",function(){h(e);let n=c();return v(n.save())}),d(4),a(5,"translate"),p()}if(t&2){let e=c();r(),S(l(2,3,"common.cancel")),r(2),o("disabled",!e.addressForm.valid||!e.addressForm.touched),r(),f(" ",l(5,5,"common.update")," ")}}var Ri=(()=>{class t{constructor(e){this.changeDetector=e,this.availableCountries=[]}ngOnInit(){this.addressForm.valueChanges.subscribe(()=>this.changeDetector.markForCheck())}cancel(){this.resolveWith()}save(){this.resolveWith(this.addressForm)}static{this.\u0275fac=function(i){return new(i||t)(x(Ee))}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-address-detail-dialog"]],standalone:!1,decls:3,vars:3,consts:[["vdrDialogTitle",""],[3,"formGroup","availableCountries","customFields"],["vdrDialogButtons",""],[4,"ngIf"],["type","button",1,"btn",3,"click"],["type","submit",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(_(0,Fn,2,2,"ng-template",0),g(1,"vdr-address-form",1),_(2,Bn,6,7,"ng-template",2)),i&2&&(r(),o("formGroup",n.addressForm)("availableCountries",n.availableCountries)("customFields",n.customFields))},dependencies:[G,oe,ae,me,pe,Ii,A],styles:[`clr-input-container[_ngcontent-%COMP%]{margin-bottom:12px}
|
|
4
4
|
/*# sourceMappingURL=address-detail-dialog.component-EMCAD2FV.css.map */`],changeDetection:0})}}return t})();function kn(t,m){if(t&1&&(s(0,"span",14),d(1),p()),t&2){let e=c().ngIf;r(),f("",e.streetLine1,",")}}function Nn(t,m){t&1&&(s(0,"vdr-chip",15),g(1,"clr-icon",16),d(2),a(3,"translate"),p()),t&2&&(r(2),f(" ",l(3,1,"customer.default-shipping-address")," "))}function Mn(t,m){t&1&&(s(0,"vdr-chip",15),g(1,"clr-icon",17),d(2),a(3,"translate"),p()),t&2&&(r(2),f(" ",l(3,1,"customer.default-billing-address")," "))}function Ln(t,m){if(t&1){let e=D();I(0),s(1,"button",18),y("click",function(){h(e);let n=c(2);return v(n.editAddress())}),d(2),a(3,"translate"),p(),s(4,"vdr-dropdown")(5,"button",19),d(6),a(7,"translate"),g(8,"clr-icon",20),p(),s(9,"vdr-dropdown-menu")(10,"button",21),y("click",function(){h(e);let n=c(2);return v(n.setAsDefaultShippingAddress())}),d(11),a(12,"translate"),p(),s(13,"button",21),y("click",function(){h(e);let n=c(2);return v(n.setAsDefaultBillingAddress())}),d(14),a(15,"translate"),p(),g(16,"div",22),s(17,"button",23),y("click",function(){h(e);let n=c(2);return v(n.delete())}),g(18,"clr-icon",24),d(19),a(20,"translate"),p()()(),T()}if(t&2){let e=c(2);r(2),f(" ",l(3,7,"common.edit")," "),r(4),f(" ",l(7,9,"common.more")," "),r(4),o("disabled",e.isDefaultShipping),r(),f(" ",l(12,11,"customer.set-as-default-shipping-address")," "),r(2),o("disabled",e.isDefaultBilling),r(),f(" ",l(15,13,"customer.set-as-default-billing-address")," "),r(5),f(" ",l(20,15,"common.delete")," ")}}function On(t,m){if(t&1&&(s(0,"div",1)(1,"div",2)(2,"div",3),_(3,kn,2,1,"span",4),d(4),p(),s(5,"div",5),_(6,Nn,4,3,"vdr-chip",6)(7,Mn,4,3,"vdr-chip",6),p()(),s(8,"div",7)(9,"div",8),g(10,"vdr-formatted-address",9),p()(),s(11,"div",10)(12,"div",11),g(13,"vdr-entity-info",12),_(14,Ln,21,17,"ng-container",13),p()()()),t&2){let e=m.ngIf,i=c();r(3),o("ngIf",e.streetLine1),r(),f(" ",e.countryCode," "),r(2),o("ngIf",i.isDefaultShipping),r(),o("ngIf",i.isDefaultBilling),r(3),o("address",e),r(3),o("entity",e),r(),o("ngIf",i.editable)}}var Ui=(()=>{class t{constructor(e,i){this.modalService=e,this.changeDetector=i,this.availableCountries=[],this.editable=!0,this.setAsDefaultShipping=new $,this.setAsDefaultBilling=new $,this.deleteAddress=new $,this.dataDependenciesPopulated=new z(!1)}ngOnInit(){this.addressForm.get("streetLine1").value||this.dataDependenciesPopulated.pipe(We(i=>i),Qe(1)).subscribe(()=>{this.editAddress()})}ngOnChanges(e){this.customFields!=null&&this.availableCountries!=null&&this.dataDependenciesPopulated.next(!0)}getCountryName(e){if(!this.availableCountries)return"";let i=this.availableCountries.find(n=>n.code===e);return i?i.name:""}setAsDefaultBillingAddress(){this.setAsDefaultBilling.emit(this.addressForm.value.id),this.addressForm.markAsDirty()}setAsDefaultShippingAddress(){this.setAsDefaultShipping.emit(this.addressForm.value.id),this.addressForm.markAsDirty()}delete(){this.deleteAddress.emit(this.addressForm.value.id),this.addressForm.markAsDirty()}editAddress(){this.modalService.fromComponent(Ri,{locals:{addressForm:this.addressForm,customFields:this.customFields,availableCountries:this.availableCountries},size:"md",closable:!0}).subscribe(()=>{this.changeDetector.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)(x(W),x(Ee))}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-address-card"]],inputs:{addressForm:"addressForm",customFields:"customFields",availableCountries:"availableCountries",isDefaultBilling:"isDefaultBilling",isDefaultShipping:"isDefaultShipping",editable:"editable"},outputs:{setAsDefaultShipping:"setAsDefaultShipping",setAsDefaultBilling:"setAsDefaultBilling",deleteAddress:"deleteAddress"},standalone:!1,features:[Kt],decls:1,vars:1,consts:[["class","card",4,"ngIf"],[1,"card"],[1,"card-header"],[1,"address-title"],["class","street-line",4,"ngIf"],[1,"default-controls"],["class","is-default p8",4,"ngIf"],[1,"card-block"],[1,"card-text"],[3,"address"],[1,"card-footer"],[1,"address-actions"],[3,"entity"],[4,"ngIf"],[1,"street-line"],[1,"is-default","p8"],["shape","truck"],["shape","credit-card"],[1,"button-small",3,"click"],["type","button","vdrDropdownTrigger","",1,"button-small"],["shape","ellipsis-vertical","size","12"],["vdrDropdownItem","",3,"click","disabled"],[1,"dropdown-divider"],["type","button","vdrDropdownItem","",3,"click"],["shape","trash",1,"is-danger"]],template:function(i,n){i&1&&_(0,On,15,7,"div",0),i&2&&o("ngIf",n.addressForm.value)},dependencies:[O,G,ce,tt,it,nt,rt,Fi,Di,A],styles:[`[_nghost-%COMP%]{display:block;max-width:360px}clr-input-container[_ngcontent-%COMP%]{margin-bottom:12px}.defaul-controls[_ngcontent-%COMP%]{display:flex}.is-default[_ngcontent-%COMP%]{margin:0;color:var(--color-success-500)}.address-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--space-unit)}.address-actions[_ngcontent-%COMP%] vdr-entity-info[_ngcontent-%COMP%]{margin-top:1px}
|
|
@@ -79,4 +79,4 @@ import{$a as ri,$c as ln,$f as Le,Aa as ii,Ab as Ue,Ae as rt,Af as at,Ag as Gi,B
|
|
|
79
79
|
}
|
|
80
80
|
`,sn=(()=>{class t extends _t{constructor(){super(),this.dataTableListId="customer-list",this.customFields=this.getCustomFieldConfig("Customer"),this.filters=this.createFilterCollection().addIdFilter().addDateFilters().addFilter({name:"firstName",type:{kind:"text"},label:"customer.first-name",filterField:"firstName"}).addFilter({name:"lastName",type:{kind:"text"},label:"customer.last-name",filterField:"lastName"}).addFilter({name:"emailAddress",type:{kind:"text"},label:"customer.email-address",filterField:"emailAddress"}).addCustomFieldFilters(this.customFields).connectToRoute(this.route),this.sorts=this.createSortCollection().defaultSort("createdAt","DESC").addSort({name:"createdAt"}).addSort({name:"updatedAt"}).addSort({name:"lastName"}).addSort({name:"emailAddress"}).addCustomFieldSorts(this.customFields).connectToRoute(this.route),this.configure({document:mi,getItems:e=>e.customers,setVariables:(e,i)=>({options:{skip:e,take:i,filter:k(k({},this.searchTermControl.value?{emailAddress:{contains:this.searchTermControl.value},lastName:{contains:this.searchTermControl.value},postalCode:{contains:this.searchTermControl.value}}:{}),this.filters.createFilterInput()),filterOperator:this.searchTermControl.value?bt.OR:bt.AND,sort:this.sorts.createSortInput()}}),refreshListOnChanges:[this.sorts.valueChanges,this.filters.valueChanges]})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-customer-list"]],standalone:!1,features:[Z],decls:34,vars:48,consts:[["locationId","customer-list"],["class","btn btn-primary",3,"routerLink",4,"vdrIfPermissions"],[1,"mt-2",3,"pageChange","itemsPerPageChange","visibleColumnsChange","id","items","itemsPerPage","totalItems","currentPage","filters"],["locationId","customer-list",3,"hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault","sort"],["id","updated-at",3,"heading","hiddenByDefault","sort"],["id","name",3,"heading","optional","sort"],["id","status",3,"heading"],["id","email-address",3,"heading","sort"],[3,"customField","sorts",4,"ngFor","ngForOf"],[1,"btn","btn-primary",3,"routerLink"],["shape","plus"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],[3,"customer"],[3,"customField","sorts"]],template:function(i,n){i&1&&(s(0,"vdr-page-block")(1,"vdr-action-bar"),g(2,"vdr-ab-left"),s(3,"vdr-ab-right"),g(4,"vdr-action-bar-items",0),_(5,Eo,4,5,"a",1),g(6,"vdr-action-bar-dropdown-menu",0),p()()(),s(7,"vdr-data-table-2",2),a(8,"async"),a(9,"async"),a(10,"async"),a(11,"async"),y("pageChange",function(C){return n.setPageNumber(C)})("itemsPerPageChange",function(C){return n.setItemsPerPage(C)})("visibleColumnsChange",function(C){return n.setVisibleColumns(C)}),g(12,"vdr-bulk-action-menu",3)(13,"vdr-dt2-search",4),a(14,"translate"),s(15,"vdr-dt2-column",5),a(16,"translate"),_(17,Fo,1,1,"ng-template"),p(),s(18,"vdr-dt2-column",6),a(19,"translate"),_(20,Bo,2,4,"ng-template"),p(),s(21,"vdr-dt2-column",7),a(22,"translate"),_(23,Ao,2,4,"ng-template"),p(),s(24,"vdr-dt2-column",8),a(25,"translate"),_(26,Po,4,6,"ng-template"),p(),s(27,"vdr-dt2-column",9),a(28,"translate"),_(29,wo,1,1,"ng-template"),p(),s(30,"vdr-dt2-column",10),a(31,"translate"),_(32,Go,1,1,"ng-template"),p(),_(33,ko,1,2,"vdr-dt2-custom-field-column",11),p()),i&2&&(r(5),o("vdrIfPermissions","CreateCustomer"),r(2),o("id",n.dataTableListId)("items",l(8,26,n.items$))("itemsPerPage",l(9,28,n.itemsPerPage$))("totalItems",l(10,30,n.totalItems$))("currentPage",l(11,32,n.currentPage$))("filters",n.filters),r(5),o("hostComponent",n)("selectionManager",n.selectionManager),r(),o("searchTermControl",n.searchTermControl)("searchTermPlaceholder",l(14,34,"customer.search-customers-by-email-last-name-postal-code")),r(2),o("heading",l(16,36,"common.id"))("hiddenByDefault",!0),r(3),o("heading",l(19,38,"common.created-at"))("hiddenByDefault",!0)("sort",n.sorts.get("createdAt")),r(3),o("heading",l(22,40,"common.updated-at"))("hiddenByDefault",!0)("sort",n.sorts.get("updatedAt")),r(3),o("heading",l(25,42,"customer.name"))("optional",!1)("sort",n.sorts.get("lastName")),r(3),o("heading",l(28,44,"common.status")),r(3),o("heading",l(31,46,"customer.email-address"))("sort",n.sorts.get("emailAddress")),r(3),o("ngForOf",n.customFields))},dependencies:[O,te,ne,ge,_e,fe,ye,Q,ue,Ne,he,Ce,Le,Me,ve,Ve,N,A,de],styles:[`.search-input[_ngcontent-%COMP%]{margin-top:6px;min-width:300px}
|
|
81
81
|
/*# sourceMappingURL=customer-list.component-ERAUGAUO.css.map */`]})}}return t})();var mn=t=>[{path:"customers",component:je,data:{locationId:"customer-list",breadcrumb:"breadcrumb.customers"},children:t.getPageTabRoutes("customer-list")},{path:"customers/:id",component:je,data:{locationId:"customer-detail",breadcrumb:{label:"breadcrumb.customers",link:["../","customers"]}},children:t.getPageTabRoutes("customer-detail")},{path:"groups",component:je,data:{locationId:"customer-group-list",breadcrumb:"breadcrumb.customer-groups"},children:t.getPageTabRoutes("customer-group-list")},{path:"groups/:id",component:je,data:{locationId:"customer-group-detail",breadcrumb:{label:"breadcrumb.customer-groups",link:["../","groups"]}},children:t.getPageTabRoutes("customer-group-detail")}];function cs(t,m){return Mi({entity:t.entity,id:m.id,breadcrumbKey:"breadcrumb.customers",getName:e=>`${e.firstName} ${e.lastName}`,route:"customers"})}var Us=(()=>{class t{static{this.hasRegisteredTabsAndBulkActions=!1}constructor(e,i){t.hasRegisteredTabsAndBulkActions||(e.registerBulkAction(an),e.registerBulkAction(tn),e.registerBulkAction(on),i.registerPageTab({priority:0,location:"customer-list",tab:"customer.customers",route:"",component:sn}),i.registerPageTab({priority:0,location:"customer-detail",tab:"customer.customer",route:"",component:St({component:Zi,query:He,entityKey:"customer",variables:{orderListOptions:{sort:{orderPlacedAt:Ue.DESC}}},getBreadcrumbs:n=>[{label:n?`${n?.firstName} ${n?.lastName}`:"customer.create-new-customer",link:[n?.id]}]})}),i.registerPageTab({priority:0,location:"customer-group-list",tab:"customer.customer-groups",route:"",component:rn}),i.registerPageTab({priority:0,location:"customer-group-detail",tab:"customer.customer-group",route:"",component:St({component:en,query:ai,entityKey:"customerGroup",getBreadcrumbs:n=>[{label:n?n.name:"customer.create-new-customer-group",link:[n?.id]}]})}),t.hasRegisteredTabsAndBulkActions=!0)}static{this.\u0275fac=function(i){return new(i||t)(xt(Ti),xt(dt))}}static{this.\u0275mod=Xt({type:t})}static{this.\u0275inj=zt({providers:[{provide:ui,useFactory:e=>mn(e),multi:!0,deps:[dt]}],imports:[Ni,_i.forChild([])]})}}return t})();export{$i as AddCustomerToGroupDialogComponent,Ui as AddressCardComponent,Ri as AddressDetailDialogComponent,Aa as CUSTOMER_DETAIL_QUERY,Na as CUSTOMER_GROUP_DETAIL_QUERY,ms as CUSTOMER_LIST_QUERY,Zi as CustomerDetailComponent,en as CustomerGroupDetailComponent,$a as CustomerGroupDetailDialogComponent,rn as CustomerGroupListComponent,Ct as CustomerGroupMemberListComponent,Yi as CustomerHistoryComponent,ji as CustomerHistoryEntryHostComponent,sn as CustomerListComponent,Us as CustomerModule,Ve as CustomerStatusLabelComponent,Xa as GET_CUSTOMER_GROUP_LIST,Hi as SelectCustomerGroupDialogComponent,mn as createRoutes,cs as customerBreadcrumb,tn as deleteCustomerGroupsBulkAction,an as deleteCustomersBulkAction,on as removeCustomerGroupMembersBulkAction};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-7QHJ4GJC.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$e as Z,$f as st,$g as _t,Ae as Ue,Af as Ye,Ba as ae,Bf as ze,Ca as f,Cf as Ze,Da as F,Ea as C,Ed as Fe,Ef as et,Fd as Be,Ff as tt,Ge,He as qe,Id as De,Jd as ke,Jg as Q,Kd as Te,Kg as lt,La as me,Ld as xe,Le as je,Lf as it,Lg as W,Ma as se,Mf as R,Nf as $,Of as M,P as ne,Pd as Ie,Pf as U,Pg as dt,Q as Y,Qa as a,Qd as Le,Qf as G,Qg as ct,Ra as s,Sa as D,T as b,U as y,Ua as pe,Ub as de,Ud as Se,Ug as ut,Va as le,Vb as ce,Vf as ot,Vg as gt,Wb as ue,Wf as nt,Xb as ge,Xf as rt,Ya as L,Za as S,Zc as O,Zf as at,Zg as ft,_ as n,_f as mt,_g as Ct,a as K,aa as B,ae as V,af as He,ah as ht,b as X,bh as vt,ca as x,ce as Ee,ch as bt,da as re,db as E,dd as fe,de as we,ee as Oe,ef as Qe,ff as We,fg as pt,ga as I,gd as Ce,ha as u,id as _e,if as Je,ja as r,jd as he,jg as q,kf as Ke,ld as N,ma as p,n as T,na as l,nb as A,ng as j,o as te,oa as g,p as ie,sa as P,ta as v,td as ve,te as Ne,ua as _,ud as be,ug as H,vd as ye,vg as ee,wb as z,wd as Pe,we as Ve,xd as Ae,xe as Re,y as oe,ye as $e,zb as w,ze as Me,zf as Xe}from"./chunk-
|
|
1
|
+
import{$e as Z,$f as st,$g as _t,Ae as Ue,Af as Ye,Ba as ae,Bf as ze,Ca as f,Cf as Ze,Da as F,Ea as C,Ed as Fe,Ef as et,Fd as Be,Ff as tt,Ge,He as qe,Id as De,Jd as ke,Jg as Q,Kd as Te,Kg as lt,La as me,Ld as xe,Le as je,Lf as it,Lg as W,Ma as se,Mf as R,Nf as $,Of as M,P as ne,Pd as Ie,Pf as U,Pg as dt,Q as Y,Qa as a,Qd as Le,Qf as G,Qg as ct,Ra as s,Sa as D,T as b,U as y,Ua as pe,Ub as de,Ud as Se,Ug as ut,Va as le,Vb as ce,Vf as ot,Vg as gt,Wb as ue,Wf as nt,Xb as ge,Xf as rt,Ya as L,Za as S,Zc as O,Zf as at,Zg as ft,_ as n,_f as mt,_g as Ct,a as K,aa as B,ae as V,af as He,ah as ht,b as X,bh as vt,ca as x,ce as Ee,ch as bt,da as re,db as E,dd as fe,de as we,ee as Oe,ef as Qe,ff as We,fg as pt,ga as I,gd as Ce,ha as u,id as _e,if as Je,ja as r,jd as he,jg as q,kf as Ke,ld as N,ma as p,n as T,na as l,nb as A,ng as j,o as te,oa as g,p as ie,sa as P,ta as v,td as ve,te as Ne,ua as _,ud as be,ug as H,vd as ye,vg as ee,wb as z,wd as Pe,we as Ve,xd as Ae,xe as Re,y as oe,ye as $e,zb as w,ze as Me,zf as Xe}from"./chunk-QJJH2BHW.js";function $t(t,m){if(t&1){let e=P();p(0,"button",27),v("click",function(){b(e);let i=_();return y(i.create())}),f(1),a(2,"translate"),l()}if(t&2){let e=_();r("disabled",!e.saveButtonEnabled()),n(),C(" ",s(2,2,"common.create")," ")}}function Mt(t,m){if(t&1){let e=P();p(0,"button",27),v("click",function(){b(e);let i=_(2);return y(i.save())}),f(1),a(2,"translate"),l()}if(t&2){let e=_(2);r("disabled",!e.saveButtonEnabled()),n(),C(" ",s(2,2,"common.update")," ")}}function Ut(t,m){t&1&&u(0,Mt,3,4,"button",28),t&2&&r("vdrIfPermissions","UpdatePromotion")}function Gt(t,m){t&1&&(p(0,"vdr-card")(1,"clr-toggle-wrapper"),g(2,"input",29),p(3,"label"),f(4),a(5,"translate"),l()()()),t&2&&(n(4),F(s(5,1,"common.enabled")))}function qt(t,m){if(t&1&&(p(0,"vdr-card"),g(1,"vdr-page-entity-info",30),l()),t&2){let e=m.ngIf;n(),r("entity",e)}}function jt(t,m){if(t&1&&(p(0,"vdr-card",31),a(1,"translate"),g(2,"vdr-tabbed-custom-fields",32),a(3,"hasPermission"),l()),t&2){let e=_();r("title",s(1,4,"common.custom-fields")),n(2),r("customFields",e.customFields)("customFieldsFormGroup",e.detailForm.get("customFields"))("readonly",!s(3,6,"UpdatePromotion"))}}function Ht(t,m){if(t&1){let e=P();p(0,"div")(1,"vdr-configurable-input",33),a(2,"hasPermission"),v("remove",function(i){b(e);let d=_();return y(d.removeCondition(i))}),l()()}if(t&2){let e=m.$implicit,o=m.index,i=_();n(),r("position",o)("readonly",!s(2,5,"UpdatePromotion"))("operation",e)("operationDefinition",i.getConditionDefinition(e))("formControlName",o)}}function Qt(t,m){if(t&1){let e=P();p(0,"button",38),v("click",function(){let i=b(e).$implicit,d=_(2);return y(d.addCondition(i))}),f(1),l()}if(t&2){let e=m.$implicit;n(),C(" ",e.description," ")}}function Wt(t,m){if(t&1&&(p(0,"vdr-dropdown")(1,"button",34),g(2,"clr-icon",35),f(3),a(4,"translate"),l(),p(5,"vdr-dropdown-menu",36),u(6,Qt,2,1,"button",37),l()()),t&2){let e=_();n(3),C(" ",s(4,2,"marketing.add-condition")," "),n(3),r("ngForOf",e.getAvailableConditions())}}function Jt(t,m){if(t&1){let e=P();p(0,"div")(1,"vdr-configurable-input",39),a(2,"hasPermission"),v("remove",function(i){b(e);let d=_();return y(d.removeAction(i))}),l()()}if(t&2){let e=m.$implicit,o=m.index,i=_();n(),r("position",o)("operation",e)("readonly",!s(2,5,"UpdatePromotion"))("operationDefinition",i.getActionDefinition(e))("formControlName",o)}}function Kt(t,m){if(t&1){let e=P();p(0,"button",38),v("click",function(){let i=b(e).$implicit,d=_(2);return y(d.addAction(i))}),f(1),l()}if(t&2){let e=m.$implicit;n(),C(" ",e.description," ")}}function Xt(t,m){if(t&1&&(p(0,"vdr-dropdown")(1,"button",34),g(2,"clr-icon",35),f(3),a(4,"translate"),l(),p(5,"vdr-dropdown-menu",36),u(6,Kt,2,1,"button",37),l()()),t&2){let e=_();n(3),C(" ",s(4,2,"marketing.add-action")," "),n(3),r("ngForOf",e.getAvailableActions())}}var Oi=A`
|
|
2
2
|
query GetPromotionDetail($id: ID!) {
|
|
3
3
|
promotion(id: $id) {
|
|
4
4
|
...Promotion
|
|
@@ -32,4 +32,4 @@ import{$e as Z,$f as st,$g as _t,Ae as Ue,Af as Ye,Ba as ae,Bf as ze,Ca as f,Cf
|
|
|
32
32
|
${O}
|
|
33
33
|
`,kt=(()=>{class t extends ut{constructor(){super(),this.dataTableListId="promotion-list",this.customFields=this.getCustomFieldConfig("Promotion"),this.filters=this.createFilterCollection().addIdFilter().addDateFilters().addFilters([{name:"startsAt",type:{kind:"dateRange"},label:"marketing.starts-at",filterField:"startsAt"},{name:"endsAt",type:{kind:"dateRange"},label:"marketing.ends-at",filterField:"endsAt"},{name:"enabled",type:{kind:"boolean"},label:"common.enabled",filterField:"enabled"},{name:"name",type:{kind:"text"},label:"common.name",filterField:"name"},{name:"couponCode",type:{kind:"text"},label:"marketing.coupon-code",filterField:"couponCode"},{name:"desc",type:{kind:"text"},label:"common.description",filterField:"description"},{name:"perCustomerUsageLimit",type:{kind:"number"},label:"marketing.per-customer-limit",filterField:"perCustomerUsageLimit"},{name:"usageLimit",type:{kind:"number"},label:"marketing.usage-limit",filterField:"usageLimit"}]).addCustomFieldFilters(this.customFields).connectToRoute(this.route),this.sorts=this.createSortCollection().defaultSort("createdAt","DESC").addSorts([{name:"createdAt"},{name:"updatedAt"},{name:"startsAt"},{name:"endsAt"},{name:"name"},{name:"couponCode"},{name:"perCustomerUsageLimit"},{name:"usageLimit"}]).addCustomFieldSorts(this.customFields).connectToRoute(this.route),super.configure({document:ge,getItems:e=>e.promotions,setVariables:(e,o)=>this.createQueryOptions(e,o,this.searchTermControl.value),refreshListOnChanges:[this.filters.valueChanges,this.sorts.valueChanges]})}createQueryOptions(e,o,i){let d=this.filters.createFilterInput(),c=this.sorts.createSortInput(),h=z.AND;return i&&(d.couponCode={contains:i},d.name={contains:i},h=z.OR),{options:{skip:e,take:o,filter:d,filterOperator:h,sort:c}}}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["vdr-promotion-list"]],standalone:!1,features:[I],decls:49,vars:72,consts:[[3,"languageCodeChange","availableLanguageCodes","currentLanguageCode"],["locationId","promotion-list"],["class","btn btn-primary",3,"routerLink",4,"vdrIfPermissions"],[3,"pageChange","itemsPerPageChange","visibleColumnsChange","id","items","itemsPerPage","totalItems","currentPage","filters"],["locationId","promotion-list",3,"hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault","sort"],["id","updated-at",3,"heading","hiddenByDefault","sort"],["id","name",3,"heading","optional","sort"],["id","enabled",3,"heading"],["id","coupon-code",3,"heading","sort"],["id","starts-at",3,"heading","sort"],["id","ends-at",3,"heading","sort"],["id","per-customer-limit",3,"heading","sort","hiddenByDefault"],["id","usage-limit",3,"heading","sort","hiddenByDefault"],[3,"customField","sorts",4,"ngFor","ngForOf"],[1,"btn","btn-primary",3,"routerLink"],["shape","plus"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],["colorType","success",4,"ngIf"],["colorType","warning",4,"ngIf"],["colorType","success"],["colorType","warning"],[3,"customField","sorts"]],template:function(o,i){o&1&&(p(0,"vdr-page-block")(1,"vdr-action-bar")(2,"vdr-ab-left")(3,"vdr-language-selector",0),a(4,"async"),a(5,"async"),v("languageCodeChange",function(c){return i.setLanguage(c)}),l()(),p(6,"vdr-ab-right"),g(7,"vdr-action-bar-items",1),u(8,Zt,4,5,"a",2),g(9,"vdr-action-bar-dropdown-menu",1),l()()(),p(10,"vdr-data-table-2",3),a(11,"async"),a(12,"async"),a(13,"async"),a(14,"async"),v("pageChange",function(c){return i.setPageNumber(c)})("itemsPerPageChange",function(c){return i.setItemsPerPage(c)})("visibleColumnsChange",function(c){return i.setVisibleColumns(c)}),g(15,"vdr-bulk-action-menu",4)(16,"vdr-dt2-search",5),a(17,"translate"),p(18,"vdr-dt2-column",6),a(19,"translate"),u(20,ei,1,1,"ng-template"),l(),p(21,"vdr-dt2-column",7),a(22,"translate"),u(23,ti,2,4,"ng-template"),l(),p(24,"vdr-dt2-column",8),a(25,"translate"),u(26,ii,2,4,"ng-template"),l(),p(27,"vdr-dt2-column",9),a(28,"translate"),u(29,oi,4,4,"ng-template"),l(),p(30,"vdr-dt2-column",10),a(31,"translate"),u(32,ai,2,2,"ng-template"),l(),p(33,"vdr-dt2-column",11),a(34,"translate"),u(35,mi,1,1,"ng-template"),l(),p(36,"vdr-dt2-column",12),a(37,"translate"),u(38,si,2,4,"ng-template"),l(),p(39,"vdr-dt2-column",13),a(40,"translate"),u(41,pi,2,4,"ng-template"),l(),p(42,"vdr-dt2-column",14),a(43,"translate"),u(44,li,1,1,"ng-template"),l(),p(45,"vdr-dt2-column",15),a(46,"translate"),u(47,di,1,1,"ng-template"),l(),u(48,ci,1,2,"vdr-dt2-custom-field-column",16),l()),o&2&&(n(3),r("availableLanguageCodes",s(4,38,i.availableLanguages$))("currentLanguageCode",s(5,40,i.contentLanguage$)),n(5),r("vdrIfPermissions","CreatePromotion"),n(2),r("id",i.dataTableListId)("items",s(11,42,i.items$))("itemsPerPage",s(12,44,i.itemsPerPage$))("totalItems",s(13,46,i.totalItems$))("currentPage",s(14,48,i.currentPage$))("filters",i.filters),n(5),r("hostComponent",i)("selectionManager",i.selectionManager),n(),r("searchTermControl",i.searchTermControl)("searchTermPlaceholder",s(17,50,"marketing.search-by-name-or-coupon-code")),n(2),r("heading",s(19,52,"common.id"))("hiddenByDefault",!0),n(3),r("heading",s(22,54,"common.created-at"))("hiddenByDefault",!0)("sort",i.sorts.get("createdAt")),n(3),r("heading",s(25,56,"common.updated-at"))("hiddenByDefault",!0)("sort",i.sorts.get("updatedAt")),n(3),r("heading",s(28,58,"common.name"))("optional",!1)("sort",i.sorts.get("name")),n(3),r("heading",s(31,60,"common.enabled")),n(3),r("heading",s(34,62,"marketing.coupon-code"))("sort",i.sorts.get("couponCode")),n(3),r("heading",s(37,64,"marketing.starts-at"))("sort",i.sorts.get("startsAt")),n(3),r("heading",s(40,66,"marketing.ends-at"))("sort",i.sorts.get("endsAt")),n(3),r("heading",s(43,68,"marketing.per-customer-limit"))("sort",i.sorts.get("perCustomerUsageLimit"))("hiddenByDefault",!0),n(3),r("heading",s(46,70,"marketing.usage-limit"))("sort",i.sorts.get("usageLimit"))("hiddenByDefault",!0),n(3),r("ngForOf",i.customFields))},dependencies:[V,L,S,_e,G,M,U,Q,Je,q,R,$,nt,pt,at,st,mt,j,E,N,je],styles:[`.search-form[_ngcontent-%COMP%]{padding:0}.search-input[_ngcontent-%COMP%]{margin:6px 8px 0 0;min-width:200px}
|
|
34
34
|
/*# sourceMappingURL=promotion-list.component-JSB66AXJ.css.map */`],changeDetection:0})}}return t})();var Tt=t=>[{path:"promotions",component:ee,data:{locationId:"promotion-list",breadcrumb:"breadcrumb.promotions"},children:t.getPageTabRoutes("promotion-list")},{path:"promotions/:id",component:ee,data:{locationId:"promotion-detail",breadcrumb:{label:"breadcrumb.promotions",link:["../","promotions"]}},children:t.getPageTabRoutes("promotion-detail")}];function oo(t,m){return gt({entity:t.entity,id:m.id,breadcrumbKey:"breadcrumb.promotions",getName:e=>e.name,route:"promotions"})}var co=(()=>{class t{static{this.hasRegisteredTabsAndBulkActions=!1}constructor(e,o){t.hasRegisteredTabsAndBulkActions||(e.registerBulkAction(Ft),e.registerBulkAction(Dt),e.registerBulkAction(Bt),e.registerBulkAction(At),o.registerPageTab({priority:0,location:"promotion-list",tab:"breadcrumb.promotions",route:"",component:kt}),o.registerPageTab({priority:0,location:"promotion-detail",tab:"marketing.promotion",route:"",component:ct({component:Pt,query:de,entityKey:"promotion",getBreadcrumbs:i=>[{label:i?i.name:"marketing.create-new-promotion",link:[i?.id]}]})}),t.hasRegisteredTabsAndBulkActions=!0)}static{this.\u0275fac=function(o){return new(o||t)(Y(ot),Y(H))}}static{this.\u0275mod=re({type:t})}static{this.\u0275inj=ne({providers:[{provide:Ce,useFactory:e=>Tt(e),multi:!0,deps:[H]}],imports:[W,he.forChild([]),W,W]})}}return t})();export{Oi as GET_PROMOTION_DETAIL,eo as GET_PROMOTION_LIST,co as MarketingModule,Pt as PromotionDetailComponent,kt as PromotionListComponent,Ft as assignPromotionsToChannelBulkAction,Tt as createRoutes,At as deletePromotionsBulkAction,Dt as duplicatePromotionsBulkAction,oo as promotionBreadcrumb,Bt as removePromotionsFromChannelBulkAction};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-BNW64AHL.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ab as Te,Ae as W,Ba as U,Bd as D,Ca as s,Ce as Fe,Da as f,De as Ae,Dg as Ue,Ea as u,Ee as Je,Eg as ae,Fa as $,Fe as Re,Ff as Z,Ge as Me,Hd as Be,Jf as ee,K as _e,La as H,Le as X,Lg as He,Na as he,Nf as te,Of as B,P as ge,Pf as w,Qa as r,Qf as P,Ra as p,Re as Oe,Sa as be,T as R,Tg as qe,U as M,Ua as q,Wa as Ce,Ya as ye,Za as T,Zf as ie,_ as i,a as re,aa as C,ae as I,ca as y,ce as we,da as fe,db as E,dd as Y,de as Pe,eb as xe,ee as je,fd as Ie,fg as ne,ga as ve,ha as d,hb as Se,hd as ke,ia as G,if as k,ja as o,jd as Ee,ld as L,ma as n,n as de,na as a,nb as V,ng as j,oa as _,og as N,pa as x,qa as S,qg as F,s as ce,sa as O,sg as A,ta as b,td as Le,te as Ne,u as ue,ua as g,ub as h,wd as De,xe as Q,ye as z,ze as K}from"./chunk-
|
|
1
|
+
import{Ab as Te,Ae as W,Ba as U,Bd as D,Ca as s,Ce as Fe,Da as f,De as Ae,Dg as Ue,Ea as u,Ee as Je,Eg as ae,Fa as $,Fe as Re,Ff as Z,Ge as Me,Hd as Be,Jf as ee,K as _e,La as H,Le as X,Lg as He,Na as he,Nf as te,Of as B,P as ge,Pf as w,Qa as r,Qf as P,Ra as p,Re as Oe,Sa as be,T as R,Tg as qe,U as M,Ua as q,Wa as Ce,Ya as ye,Za as T,Zf as ie,_ as i,a as re,aa as C,ae as I,ca as y,ce as we,da as fe,db as E,dd as Y,de as Pe,eb as xe,ee as je,fd as Ie,fg as ne,ga as ve,ha as d,hb as Se,hd as ke,ia as G,if as k,ja as o,jd as Ee,ld as L,ma as n,n as de,na as a,nb as V,ng as j,oa as _,og as N,pa as x,qa as S,qg as F,s as ce,sa as O,sg as A,ta as b,td as Le,te as Ne,u as ue,ua as g,ub as h,wd as De,xe as Q,ye as z,ze as K}from"./chunk-QJJH2BHW.js";var rt=(e,l)=>({"is-success":e,"is-danger":l});function pt(e,l){e&1&&(x(0),s(1),r(2,"translate"),S()),e&2&&(i(),u(" ",p(2,1,"system.health-all-systems-up")," "))}function lt(e,l){e&1&&(s(0),r(1,"translate")),e&2&&u(" ",p(1,1,"system.health-error")," ")}function st(e,l){if(e&1&&(n(0,"div",9)(1,"div",10),_(2,"clr-icon",11),a(),n(3,"div",12),d(4,pt,3,3,"ng-container",13)(5,lt,2,3,"ng-template",null,0,q),n(7,"div",14),s(8),r(9,"translate"),r(10,"async"),r(11,"localeDate"),a()()()),e&2){let t=l.ngIf,m=U(6),c=g();i(2),o("ngClass",he(13,rt,t==="ok",t!=="ok")),G("shape",t==="ok"?"check-circle":"exclamation-circle"),i(2),o("ngIf",t==="ok")("ngIfElse",m),i(4),$(" ",p(9,6,"system.health-last-checked"),": ",be(11,10,p(10,8,c.healthCheckService.lastCheck$),"mediumTime")," ")}}function mt(e,l){e&1&&(x(0),_(1,"clr-icon",17),s(2),r(3,"translate"),S()),e&2&&(i(2),u(" ",p(3,1,"system.health-status-up")," "))}function dt(e,l){e&1&&(_(0,"clr-icon",18),s(1),r(2,"translate")),e&2&&(i(),u(" ",p(2,1,"system.health-status-down")," "))}function ct(e,l){if(e&1&&(n(0,"tr")(1,"td",15),s(2),a(),n(3,"td",15)(4,"vdr-chip",16),d(5,mt,4,3,"ng-container",13)(6,dt,3,3,"ng-template",null,1,q),a()(),n(8,"td",15),s(9),a()()),e&2){let t=l.$implicit,m=U(7);i(2),f(t.key),i(2),o("colorType",t.result.status==="up"?"success":"error"),i(),o("ngIf",t.result.status==="up")("ngIfElse",m),i(4),f(t.result.message)}}var We=(()=>{class e{constructor(t){this.healthCheckService=t}static{this.\u0275fac=function(m){return new(m||e)(C(Oe))}}static{this.\u0275cmp=y({type:e,selectors:[["vdr-health-check"]],standalone:!1,decls:30,vars:18,consts:[["error",""],["down",""],["class","system-status-header",4,"ngIf"],["locationId","system-status"],[1,"btn","btn-secondary",3,"click"],["shape","refresh"],[1,"table"],[1,"left"],[4,"ngFor","ngForOf"],[1,"system-status-header"],[1,"status-icon"],["size","48",3,"ngClass"],[1,"status-detail"],[4,"ngIf","ngIfElse"],[1,"last-checked"],[1,"align-middle","left"],[3,"colorType"],["shape","check-circle"],["shape","exclamation-circle"]],template:function(m,c){m&1&&(n(0,"vdr-page-header"),_(1,"vdr-page-title"),a(),n(2,"vdr-page-body")(3,"vdr-page-block")(4,"vdr-action-bar")(5,"vdr-ab-left"),d(6,st,12,16,"div",2),r(7,"async"),a(),n(8,"vdr-ab-right"),_(9,"vdr-action-bar-items",3),n(10,"button",4),b("click",function(){return c.healthCheckService.refresh()}),_(11,"clr-icon",5),s(12),r(13,"translate"),a()()()(),n(14,"vdr-page-block")(15,"table",6)(16,"thead")(17,"tr")(18,"th",7),s(19),r(20,"translate"),a(),n(21,"th",7),s(22),r(23,"translate"),a(),n(24,"th",7),s(25),r(26,"translate"),a()()(),n(27,"tbody"),d(28,ct,10,5,"tr",8),r(29,"async"),a()()()()),m&2&&(i(6),o("ngIf",p(7,6,c.healthCheckService.status$)),i(6),u(" ",p(13,8,"system.health-refresh")," "),i(7),u(" ",p(20,10,"common.name")," "),i(3),u(" ",p(23,12,"system.health-status")," "),i(3),u(" ",p(26,14,"system.health-message")," "),i(3),o("ngForOf",p(29,16,c.healthCheckService.details$)))},dependencies:[I,Ce,ye,T,P,B,w,k,te,F,A,N,j,E,L,X],styles:[`.system-status-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start}.system-status-header[_ngcontent-%COMP%] .status-detail[_ngcontent-%COMP%]{font-weight:700;margin-inline-end:6px}.system-status-header[_ngcontent-%COMP%] .last-checked[_ngcontent-%COMP%]{font-weight:400;color:var(--color-grey-500)}
|
|
2
2
|
/*# sourceMappingURL=health-check.component-PPMZ7QYE.css.map */`],changeDetection:0})}}return e})();function ut(e,l){if(e&1&&(n(0,"span",3),s(1),r(2,"percent"),a()),e&2){let t=g();i(),u(" ",p(2,1,t.job.progress/100)," ")}}var Xe=(()=>{class e{get iconShape(){switch(this.job.state){case h.COMPLETED:return"check-circle";case h.FAILED:return"exclamation-circle";case h.CANCELLED:return"ban";case h.PENDING:case h.RETRYING:return"hourglass";case h.RUNNING:return"sync"}}get colorType(){switch(this.job.state){case h.COMPLETED:return"success";case h.FAILED:case h.CANCELLED:return"error";case h.PENDING:case h.RETRYING:return"";case h.RUNNING:return"warning"}}static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275cmp=y({type:e,selectors:[["vdr-job-state-label"]],inputs:{job:"job"},standalone:!1,decls:5,vars:6,consts:[[3,"colorType"],[1,"mr1"],["class","progress",4,"ngIf"],[1,"progress"]],template:function(m,c){m&1&&(n(0,"vdr-chip",0),_(1,"clr-icon",1),s(2),r(3,"titlecase"),d(4,ut,3,3,"span",2),a()),m&2&&(o("colorType",c.colorType),i(),G("shape",c.iconShape),i(),u(" ",p(3,4,c.job.state)," "),i(2),o("ngIf",c.job.state==="RUNNING"))},dependencies:[I,T,k,Se,xe],styles:[`.progress[_ngcontent-%COMP%]{margin-inline-start:3px}clr-icon[_ngcontent-%COMP%]{min-width:12px}
|
|
3
3
|
/*# sourceMappingURL=job-state-label.component-DW5FXGFX.css.map */`],changeDetection:0})}}return e})();var Tt=()=>["DeleteSettings","DeleteSystem"];function It(e,l){e&1&&(x(0),n(1,"vdr-chip"),s(2),r(3,"translate"),a(),S()),e&2&&(i(2),f(p(3,1,"system.all-job-queues")))}function kt(e,l){if(e&1&&(n(0,"vdr-chip",20),s(1),a()),e&2){let t=g().item;o("colorFrom",t.name),i(),f(t.name)}}function Et(e,l){if(e&1&&d(0,It,4,3,"ng-container",19)(1,kt,2,2,"ng-template",null,0,q),e&2){let t=l.item,m=U(2);o("ngIf",t.name==="all")("ngIfElse",m)}}function Lt(e,l){if(e&1&&s(0),e&2){let t=l.item;u(" ",t.id," ")}}function Dt(e,l){if(e&1&&(s(0),r(1,"timeAgo")),e&2){let t=l.item;u(" ",p(1,1,t.createdAt)," ")}}function Bt(e,l){if(e&1&&(n(0,"vdr-chip",20),s(1),a()),e&2){let t=l.item;o("colorFrom",t.queueName),i(),f(t.queueName)}}function wt(e,l){if(e&1&&(n(0,"vdr-dropdown")(1,"button",22),r(2,"translate"),_(3,"clr-icon",23),a(),n(4,"vdr-dropdown-menu")(5,"div",24),_(6,"vdr-object-tree",5),a()()()),e&2){let t=g().item;i(),o("title",p(2,2,"system.job-data")),i(5),o("value",t.data)}}function Pt(e,l){if(e&1&&d(0,wt,7,4,"vdr-dropdown",21),e&2){let t=l.item;o("ngIf",t.data)}}function jt(e,l){if(e&1&&(n(0,"div",27),s(1),a()),e&2){let t=g().item;i(),u("after ",t.attempts," attempts")}}function Nt(e,l){if(e&1&&(n(0,"div",27),s(1),a()),e&2){let t=g().item;i(),$(" attempting ",t.attempts," of ",t.retries+1," ")}}function Ft(e,l){if(e&1&&(_(0,"vdr-job-state-label",25),d(1,jt,2,1,"div",26)(2,Nt,2,2,"div",26)),e&2){let t=l.item;o("job",t),i(),o("ngIf",t.state==="FAILED"),i(),o("ngIf",t.state==="RUNNING"||t.state==="RETRYING")}}function At(e,l){if(e&1&&(s(0),r(1,"duration")),e&2){let t=l.item;u(" ",p(1,1,t.duration)," ")}}function Jt(e,l){if(e&1&&(n(0,"vdr-dropdown")(1,"button",28),_(2,"clr-icon",23),s(3),r(4,"translate"),a(),n(5,"vdr-dropdown-menu")(6,"div",24),_(7,"vdr-object-tree",5),a()()()),e&2){let t=g().item;i(3),u(" ",p(4,2,"system.job-result")," "),i(4),o("value",t.result)}}function Rt(e,l){if(e&1&&(n(0,"vdr-dropdown")(1,"button",29),_(2,"clr-icon",30),s(3),r(4,"translate"),a(),n(5,"vdr-dropdown-menu")(6,"div",24),s(7),a()()()),e&2){let t=g().item;i(3),u(" ",p(4,2,"system.job-error")," "),i(4),u(" ",t.error," ")}}function Mt(e,l){if(e&1){let t=O();n(0,"vdr-dropdown")(1,"button",31),_(2,"clr-icon",32),a(),n(3,"vdr-dropdown-menu",33)(4,"button",34),r(5,"hasPermission"),b("click",function(){R(t);let c=g().item,v=g();return M(v.cancelJob(c.id))}),_(6,"clr-icon",35),s(7),r(8,"translate"),a()()()}e&2&&(i(4),o("disabled",!p(5,2,H(6,Tt))),i(3),u(" ",p(8,4,"common.cancel")," "))}function Ot(e,l){if(e&1&&d(0,Jt,8,4,"vdr-dropdown",21)(1,Rt,8,4,"vdr-dropdown",21)(2,Mt,9,7,"vdr-dropdown",21),e&2){let t=l.item,m=g();o("ngIf",m.hasResult(t)),i(),o("ngIf",t.error),i(),o("ngIf",!t.isSettled&&t.state!=="FAILED")}}var Ze=(()=>{class e extends qe{constructor(t,m,c){super(m,c),this.dataService=t,this.liveUpdate=new D(!0),this.queueFilter=new D("all"),this.stateFilter=new D(""),super.setQueryFn((...v)=>this.dataService.settings.getAllJobs(...v),v=>v.jobs,(v,J)=>{let nt=this.queueFilter.value==="all"?null:{queueName:{eq:this.queueFilter.value}},me=this.stateFilter.value;return{options:{skip:v,take:J,filter:re(re({},nt),me?{state:{eq:me}}:{}),sort:{createdAt:Te.DESC}}}})}ngOnInit(){super.ngOnInit(),ce(5e3,2e3).pipe(_e(this.destroy$),ue(()=>!!this.liveUpdate.value)).subscribe(()=>{this.refresh()}),this.queues$=this.dataService.settings.getJobQueues().mapStream(t=>t.jobQueues).pipe(de(t=>[{name:"all",running:!0},...t]))}hasResult(t){let m=t.result;return m==null?!1:typeof m=="object"?Object.keys(m).length>0:!0}cancelJob(t){this.dataService.settings.cancelJob(t).subscribe(()=>this.refresh())}static{this.\u0275fac=function(m){return new(m||e)(C(Y),C(ke),C(Ie))}}static{this.\u0275cmp=y({type:e,selectors:[["vdr-job-list"]],standalone:!1,features:[ve],decls:67,vars:80,consts:[["others",""],[1,"mr-2"],["type","checkbox","clrCheckbox","","name","live-update",3,"formControl"],["locationId","job-list"],[1,"mr-2",3,"change","addTag","hideSelected","multiple","markFirst","clearable","searchable","formControl"],[3,"value"],["colorType","warning"],["colorType","success"],["colorType","error"],["bindValue","name",3,"change","addTag","items","hideSelected","multiple","markFirst","clearable","searchable","formControl"],["ng-label-tmp","","ng-option-tmp",""],["id","job-list",3,"pageChange","itemsPerPageChange","items","itemsPerPage","totalItems","currentPage"],["id","id",3,"heading"],["id","created-at",3,"heading"],["id","job-queue-name",3,"heading","optional"],["id","job-data",3,"heading","optional"],["id","job-state",3,"heading"],["id","job-duration",3,"heading"],["id","job-result",3,"heading"],[4,"ngIf","ngIfElse"],[3,"colorFrom"],[4,"ngIf"],["vdrDropdownTrigger","",1,"button-small",3,"title"],["shape","details"],[1,"result-detail"],[3,"job"],["class","retry-info",4,"ngIf"],[1,"retry-info"],["vdrDropdownTrigger","",1,"button-small","mr-1"],["vdrDropdownTrigger","",1,"button-small"],["shape","exclamation-circle"],["vdrDropdownTrigger","",1,"icon-button"],["shape","ellipsis-vertical","size","12"],["vdrPosition","bottom-right"],["type","button","vdrDropdownItem","",1,"delete-button",3,"click","disabled"],["shape","ban",1,"is-danger"]],template:function(m,c){m&1&&(n(0,"vdr-page-header"),_(1,"vdr-page-title"),a(),n(2,"vdr-page-body")(3,"vdr-page-block")(4,"vdr-action-bar")(5,"vdr-ab-left")(6,"clr-checkbox-wrapper",1),_(7,"input",2),n(8,"label"),s(9),r(10,"translate"),a()()(),n(11,"vdr-ab-right"),_(12,"vdr-action-bar-items",3),n(13,"ng-select",4),b("change",function(){return c.refresh()}),n(14,"ng-option",5)(15,"vdr-chip"),s(16),r(17,"translate"),a()(),n(18,"ng-option",5)(19,"vdr-chip"),s(20),r(21,"translate"),a()(),n(22,"ng-option",5)(23,"vdr-chip",6),s(24),r(25,"translate"),a()(),n(26,"ng-option",5)(27,"vdr-chip",7),s(28),r(29,"translate"),a()(),n(30,"ng-option",5)(31,"vdr-chip",8),s(32),r(33,"translate"),a()(),n(34,"ng-option",5)(35,"vdr-chip",8),s(36),r(37,"translate"),a()()(),n(38,"ng-select",9),r(39,"async"),b("change",function(){return c.refresh()}),d(40,Et,3,2,"ng-template",10),a()()()(),n(41,"vdr-data-table-2",11),r(42,"async"),r(43,"async"),r(44,"async"),r(45,"async"),b("pageChange",function(J){return c.setPageNumber(J)})("itemsPerPageChange",function(J){return c.setItemsPerPage(J)}),n(46,"vdr-dt2-column",12),r(47,"translate"),d(48,Lt,1,1,"ng-template"),a(),n(49,"vdr-dt2-column",13),r(50,"translate"),d(51,Dt,2,3,"ng-template"),a(),n(52,"vdr-dt2-column",14),r(53,"translate"),d(54,Bt,2,2,"ng-template"),a(),n(55,"vdr-dt2-column",15),r(56,"translate"),d(57,Pt,1,1,"ng-template"),a(),n(58,"vdr-dt2-column",16),r(59,"translate"),d(60,Ft,3,3,"ng-template"),a(),n(61,"vdr-dt2-column",17),r(62,"translate"),d(63,At,2,3,"ng-template"),a(),n(64,"vdr-dt2-column",18),r(65,"translate"),d(66,Ot,3,3,"ng-template"),a()()()),m&2&&(i(7),o("formControl",c.liveUpdate),i(2),f(p(10,42,"common.live-update")),i(4),o("addTag",!1)("hideSelected",!0)("multiple",!1)("markFirst",!1)("clearable",!1)("searchable",!1)("formControl",c.stateFilter),i(),o("value",""),i(2),f(p(17,44,"system.job-state-all")),i(2),o("value","PENDING"),i(2),f(p(21,46,"system.job-state-pending")),i(2),o("value","RUNNING"),i(2),f(p(25,48,"system.job-state-running")),i(2),o("value","COMPLETED"),i(2),f(p(29,50,"system.job-state-completed")),i(2),o("value","FAILED"),i(2),f(p(33,52,"system.job-state-failed")),i(2),o("value","CANCELLED"),i(2),f(p(37,54,"system.job-state-cancelled")),i(2),o("addTag",!1)("items",p(39,56,c.queues$))("hideSelected",!0)("multiple",!1)("markFirst",!1)("clearable",!1)("searchable",!1)("formControl",c.queueFilter),i(3),o("items",p(42,58,c.items$))("itemsPerPage",p(43,60,c.itemsPerPage$))("totalItems",p(44,62,c.totalItems$))("currentPage",p(45,64,c.currentPage$)),i(5),o("heading",p(47,66,"common.id")),i(3),o("heading",p(50,68,"common.created-at")),i(3),o("heading",p(53,70,"system.job-queue-name"))("optional",!1),i(3),o("heading",p(56,72,"system.job-data"))("optional",!1),i(3),o("heading",p(59,74,"system.job-state")),i(3),o("heading",p(62,76,"system.job-duration")),i(3),o("heading",p(65,78,"system.job-result")))},dependencies:[I,we,je,Pe,T,Le,De,Be,Re,Je,Fe,Ae,P,B,w,k,Me,Q,z,K,W,ee,te,ne,ie,F,A,N,j,Xe,E,L,Z,ae,Ue],styles:[`.result-detail[_ngcontent-%COMP%]{margin:0 12px}.retry-info[_ngcontent-%COMP%]{margin-inline-start:6px;color:var(--color-grey-400)}
|
|
4
4
|
/*# sourceMappingURL=job-list.component-EORJPWOH.css.map */`],changeDetection:0})}}return e})();var et=()=>["UpdateSettings","UpdateSystem"];function Ut(e,l){if(e&1&&s(0),e&2){let t=l.item;u(" ",t.id," ")}}function Ht(e,l){if(e&1&&s(0),e&2){let t=l.item;u(" ",t.description," ")}}function qt(e,l){if(e&1&&(n(0,"div",9),s(1),a()),e&2){let t=l.item;i(),f(t.scheduleDescription)}}function Gt(e,l){if(e&1&&(n(0,"span",11),r(1,"localeDate"),s(2),r(3,"timeAgo"),a()),e&2){let t=g().item;o("title",p(1,2,t.lastExecutedAt)),i(2),u(" ",p(3,4,t.lastExecutedAt)," ")}}function $t(e,l){if(e&1&&d(0,Gt,4,6,"span",10),e&2){let t=l.item;o("ngIf",t.lastExecutedAt)}}function Vt(e,l){if(e&1&&(s(0),r(1,"localeDate")),e&2){let t=l.item;u(" ",p(1,1,t.nextExecutionAt)," ")}}function Yt(e,l){if(e&1&&(n(0,"vdr-dropdown")(1,"button",13),_(2,"clr-icon",14),s(3),r(4,"translate"),a(),n(5,"vdr-dropdown-menu")(6,"div",15),_(7,"vdr-object-tree",16),a()()()),e&2){let t=g().item;i(3),u(" ",p(4,2,"system.last-result")," "),i(4),o("value",t.lastResult)}}function Qt(e,l){if(e&1&&d(0,Yt,8,4,"vdr-dropdown",12),e&2){let t=l.item;o("ngIf",t.lastResult)}}function zt(e,l){e&1&&(x(0),n(1,"vdr-chip",17),s(2),r(3,"translate"),a(),S()),e&2&&(i(),o("colorType","success"),i(),f(p(3,2,"common.enabled")))}function Kt(e,l){e&1&&(x(0),n(1,"vdr-chip",17),s(2),r(3,"translate"),a(),S()),e&2&&(i(),o("colorType","warning"),i(),f(p(3,2,"common.disabled")))}function Wt(e,l){if(e&1&&d(0,zt,4,4,"ng-container",12)(1,Kt,4,4,"ng-container",12),e&2){let t=l.item;o("ngIf",t.enabled),i(),o("ngIf",!t.enabled)}}function Xt(e,l){if(e&1){let t=O();n(0,"button",24),r(1,"hasPermission"),b("click",function(){R(t);let c=g(2).item,v=g();return M(v.runTask(c))}),_(2,"clr-icon",25),n(3,"div"),s(4),r(5,"translate"),a()()}e&2&&(o("disabled",!p(1,2,H(6,et))),i(4),u(" ",p(5,4,"system.run-task")," "))}function Zt(e,l){e&1&&(n(0,"div"),s(1),r(2,"translate"),a()),e&2&&(i(),u(" ",p(2,1,"common.disable")," "))}function ei(e,l){e&1&&(n(0,"div"),s(1),r(2,"translate"),a()),e&2&&(i(),u(" ",p(2,1,"common.enable")," "))}function ti(e,l){if(e&1){let t=O();n(0,"vdr-dropdown")(1,"button",18),_(2,"clr-icon",19),a(),n(3,"vdr-dropdown-menu",20),d(4,Xt,6,7,"button",21),n(5,"button",22),r(6,"hasPermission"),b("click",function(){R(t);let c=g().item,v=g();return M(v.toggleEnabled(c))}),_(7,"clr-icon",23),d(8,Zt,3,3,"div",12)(9,ei,3,3,"div",12),a()()()}if(e&2){let t=g().item;i(4),o("ngIf",t.enabled),i(),o("disabled",!p(6,4,H(6,et))),i(3),o("ngIf",t.enabled),i(),o("ngIf",!t.enabled)}}function ii(e,l){if(e&1&&d(0,ti,10,7,"vdr-dropdown",12),e&2){let t=l.item;o("ngIf",!t.isSettled&&t.state!=="FAILED")}}var ni=V`
|
|
@@ -30,4 +30,4 @@ import{Ab as Te,Ae as W,Ba as U,Bd as D,Ca as s,Ce as Fe,Da as f,De as Ae,Dg as
|
|
|
30
30
|
}
|
|
31
31
|
`,tt=(()=>{class e{constructor(t,m){this.dataService=t,this.notificationService=m,this.liveUpdate=new D(!0)}ngOnInit(){this.tasks$=this.dataService.query(ni).mapStream(t=>t.scheduledTasks)}toggleEnabled(t){this.dataService.mutate(ai,{input:{id:t.id,enabled:!t.enabled}}).subscribe()}runTask(t){this.dataService.mutate(oi,{id:t.id}).subscribe(m=>{m.runScheduledTask.success?this.notificationService.success("system.task-will-be-triggered"):this.notificationService.error("system.could-not-trigger-task")})}static{this.\u0275fac=function(m){return new(m||e)(C(Y),C(Ne))}}static{this.\u0275cmp=y({type:e,selectors:[["vdr-scheduled-task-list"]],standalone:!1,decls:32,vars:26,consts:[["id","scheduled-task-list",3,"items"],["id","task-id",3,"heading","optional"],["id","description",3,"heading"],["id","schedule",3,"heading"],["id","last-executed-at",3,"heading"],["id","next-execution-at",3,"heading","hiddenByDefault"],["id","last-result",3,"heading"],["id","enabled",3,"heading"],["id","actions"],[1,""],[3,"title",4,"ngIf"],[3,"title"],[4,"ngIf"],["vdrDropdownTrigger","",1,"button-small","mr-1"],["shape","details"],[1,"result-detail"],[3,"value"],[3,"colorType"],["vdrDropdownTrigger","",1,"icon-button"],["shape","ellipsis-vertical","size","12"],["vdrPosition","bottom-right"],["type","button","class","","vdrDropdownItem","",3,"disabled","click",4,"ngIf"],["type","button","vdrDropdownItem","",1,"delete-button",3,"click","disabled"],["shape","ban",1,"is-danger"],["type","button","vdrDropdownItem","",1,"",3,"click","disabled"],["shape","play",1,""]],template:function(m,c){m&1&&(n(0,"vdr-page-header"),_(1,"vdr-page-title"),a(),n(2,"vdr-page-body")(3,"vdr-page-block")(4,"vdr-action-bar"),_(5,"vdr-ab-left")(6,"vdr-ab-right"),a()(),n(7,"vdr-data-table-2",0),r(8,"async"),n(9,"vdr-dt2-column",1),r(10,"translate"),d(11,Ut,1,1,"ng-template"),a(),n(12,"vdr-dt2-column",2),r(13,"translate"),d(14,Ht,1,1,"ng-template"),a(),n(15,"vdr-dt2-column",3),r(16,"translate"),d(17,qt,2,1,"ng-template"),a(),n(18,"vdr-dt2-column",4),r(19,"translate"),d(20,$t,1,1,"ng-template"),a(),n(21,"vdr-dt2-column",5),r(22,"translate"),d(23,Vt,2,3,"ng-template"),a(),n(24,"vdr-dt2-column",6),r(25,"translate"),d(26,Qt,1,1,"ng-template"),a(),n(27,"vdr-dt2-column",7),r(28,"translate"),d(29,Wt,2,2,"ng-template"),a(),n(30,"vdr-dt2-column",8),d(31,ii,1,1,"ng-template"),a()()()),m&2&&(i(7),o("items",p(8,10,c.tasks$)),i(2),o("heading",p(10,12,"system.task-id"))("optional",!1),i(3),o("heading",p(13,14,"common.description")),i(3),o("heading",p(16,16,"system.schedule")),i(3),o("heading",p(19,18,"system.last-executed-at")),i(3),o("heading",p(22,20,"system.next-execution-at"))("hiddenByDefault",!0),i(3),o("heading",p(25,22,"system.last-result")),i(3),o("heading",p(28,24,"common.enabled")))},dependencies:[I,T,P,B,w,k,Q,z,K,W,ee,ne,ie,F,A,N,j,E,L,Z,ae,X],styles:[`.result-detail[_ngcontent-%COMP%]{margin:0 12px}.retry-info[_ngcontent-%COMP%]{margin-inline-start:6px;color:var(--color-grey-400)}
|
|
32
32
|
/*# sourceMappingURL=scheduled-task-list.component-FCGVY4SU.css.map */`],changeDetection:0})}}return e})();var it=[{path:"jobs",component:Ze,data:{breadcrumb:"breadcrumb.job-queue"}},{path:"system-status",component:We,data:{breadcrumb:"breadcrumb.system-status"}},{path:"scheduled-tasks",component:tt,data:{breadcrumb:"breadcrumb.scheduled-tasks"}}];var Ji=(()=>{class e{static{this.\u0275fac=function(m){return new(m||e)}}static{this.\u0275mod=fe({type:e})}static{this.\u0275inj=ge({imports:[He,Ee.forChild(it)]})}}return e})();export{ni as GET_SCHEDULED_TASKS_LIST,We as HealthCheckComponent,Ze as JobListComponent,Xe as JobStateLabelComponent,tt as ScheduledTaskListComponent,Ji as SystemModule,it as systemRoutes};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
33
|
+
//# sourceMappingURL=chunk-CXBC3APS.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$a as qn,$b as Jn,$c as mt,$f as Or,A as Dn,Aa as Ct,Ab as vt,Ae as We,Af as Fi,B as ni,Ba as X,Bd as H,Bf as wt,Bg as $i,Ca as u,Cd as pe,Ce as Di,Cf as Pt,Da as v,Dd as oe,De as ur,Df as rt,E as wn,Ea as g,Ed as St,Ef as ye,Eg as Fr,F as Pn,Fa as ie,Fd as $e,Fe as He,Ff as Ei,Ga as di,Gd as nr,Ge as U,H as ri,Ha as R,Hd as Ot,He as ve,I as L,Ia as N,Id as Ze,Ie as Y,Ja as $,Jc as ko,Jf as Ue,Jg as kt,K as pn,L as Ye,La as Gt,Ld as It,Le as he,Lg as Er,Ma as A,Mb as zn,Md as rr,Me as k,Mf as Bi,Na as Ee,Nd as or,Nf as Mt,O as oi,Oa as sn,Od as ar,Oe as Ao,Of as Ft,P as Mn,Pa as Rn,Pc as Kn,Pd as et,Pf as ot,Pg as Lt,Q as Le,Qa as d,Qd as je,Qf as at,Qg as ji,Ra as s,Rd as gi,Rf as ki,S as Ae,Sa as x,T as h,Tc as Zn,Td as un,Te as fr,U as y,Ua as ee,Ud as lr,Ue as wi,Ug as Br,V as ai,Va as Re,Vd as Tt,W as J,Wa as Nn,Wd as Ci,Wf as Sr,X as Fn,Xa as $n,Xf as Li,Ya as M,Yb as Yn,Yf as Et,Z as xe,Za as w,Zb as Xn,Zf as Ge,_ as r,_a as jn,_b as mi,_f as Ai,a as G,aa as P,ab as Wn,ac as ui,ad as Lo,ae as B,ag as Ir,b as se,ba as En,bb as pi,bd as er,be as vi,bf as _r,bg as Tr,bh as kr,c as In,ca as O,cb as si,cd as ht,ce as Ce,cf as gr,cg as Dr,da as Bn,db as W,dd as K,de as dr,df as Cr,e as Be,ee as tt,eh as qi,ff as vr,fg as lt,g as ke,ga as Ie,gb as Hn,gd as tr,ge as pr,gf as hr,gg as wr,h as Ut,ha as f,hb as ci,hd as fi,he as sr,hf as Dt,hg as Qe,i as Fe,ia as Ve,ib as Un,id as Ne,ie as hi,if as ue,ig as Pr,ja as o,jd as ir,je as yi,k as ce,ka as kn,ke as xi,kg as fe,la as Q,ld as I,le as bi,lg as Mr,ma as a,me as Si,mg as dt,n as _e,na as l,nb as be,nd as _i,ne as Oi,ng as pt,o as Tn,oa as _,oe as cr,pa as T,pe as mr,q as Zt,qa as D,qb as Gn,qd as yt,qe as Ii,qf as yr,r as ei,ra as Je,rb as Qn,re as Ti,sa as S,sb as cn,sf as xr,ta as b,tb as q,td as xt,te as it,tf as Pe,ua as m,ud as ne,ue as ae,uf as Pi,ug as Vi,v as ti,va as Ln,vd as re,ve as te,vg as Bt,wa as An,wb as mn,wd as z,we as qe,wg as Ri,x as _t,xa as Vn,xd as Ke,xe as Te,xf as br,xg as Ni,y as Oe,ya as li,yb as ct,yd as bt,ye as De,yf as Mi,z as ii,za as gt,zd as me,ze as we,zf as nt}from"./chunk-
|
|
1
|
+
import{$a as qn,$b as Jn,$c as mt,$f as Or,A as Dn,Aa as Ct,Ab as vt,Ae as We,Af as Fi,B as ni,Ba as X,Bd as H,Bf as wt,Bg as $i,Ca as u,Cd as pe,Ce as Di,Cf as Pt,Da as v,Dd as oe,De as ur,Df as rt,E as wn,Ea as g,Ed as St,Ef as ye,Eg as Fr,F as Pn,Fa as ie,Fd as $e,Fe as He,Ff as Ei,Ga as di,Gd as nr,Ge as U,H as ri,Ha as R,Hd as Ot,He as ve,I as L,Ia as N,Id as Ze,Ie as Y,Ja as $,Jc as ko,Jf as Ue,Jg as kt,K as pn,L as Ye,La as Gt,Ld as It,Le as he,Lg as Er,Ma as A,Mb as zn,Md as rr,Me as k,Mf as Bi,Na as Ee,Nd as or,Nf as Mt,O as oi,Oa as sn,Od as ar,Oe as Ao,Of as Ft,P as Mn,Pa as Rn,Pc as Kn,Pd as et,Pf as ot,Pg as Lt,Q as Le,Qa as d,Qd as je,Qf as at,Qg as ji,Ra as s,Rd as gi,Rf as ki,S as Ae,Sa as x,T as h,Tc as Zn,Td as un,Te as fr,U as y,Ua as ee,Ud as lr,Ue as wi,Ug as Br,V as ai,Va as Re,Vd as Tt,W as J,Wa as Nn,Wd as Ci,Wf as Sr,X as Fn,Xa as $n,Xf as Li,Ya as M,Yb as Yn,Yf as Et,Z as xe,Za as w,Zb as Xn,Zf as Ge,_ as r,_a as jn,_b as mi,_f as Ai,a as G,aa as P,ab as Wn,ac as ui,ad as Lo,ae as B,ag as Ir,b as se,ba as En,bb as pi,bd as er,be as vi,bf as _r,bg as Tr,bh as kr,c as In,ca as O,cb as si,cd as ht,ce as Ce,cf as gr,cg as Dr,da as Bn,db as W,dd as K,de as dr,df as Cr,e as Be,ee as tt,eh as qi,ff as vr,fg as lt,g as ke,ga as Ie,gb as Hn,gd as tr,ge as pr,gf as hr,gg as wr,h as Ut,ha as f,hb as ci,hd as fi,he as sr,hf as Dt,hg as Qe,i as Fe,ia as Ve,ib as Un,id as Ne,ie as hi,if as ue,ig as Pr,ja as o,jd as ir,je as yi,k as ce,ka as kn,ke as xi,kg as fe,la as Q,ld as I,le as bi,lg as Mr,ma as a,me as Si,mg as dt,n as _e,na as l,nb as be,nd as _i,ne as Oi,ng as pt,o as Tn,oa as _,oe as cr,pa as T,pe as mr,q as Zt,qa as D,qb as Gn,qd as yt,qe as Ii,qf as yr,r as ei,ra as Je,rb as Qn,re as Ti,sa as S,sb as cn,sf as xr,ta as b,tb as q,td as xt,te as it,tf as Pe,ua as m,ud as ne,ue as ae,uf as Pi,ug as Vi,v as ti,va as Ln,vd as re,ve as te,vg as Bt,wa as An,wb as mn,wd as z,we as qe,wg as Ri,x as _t,xa as Vn,xd as Ke,xe as Te,xf as br,xg as Ni,y as Oe,ya as li,yb as ct,yd as bt,ye as De,yf as Mi,z as ii,za as gt,zd as me,ze as we,zf as nt}from"./chunk-QJJH2BHW.js";var Lr=Be(mt());function Wi(t){return(t||[]).filter(e=>e.state==="Settled").map((e,i)=>{let n=e.amount-(0,Lr.summate)(e.refunds.filter(c=>c.state!=="Failed"),"total");return se(G({},e),{refundableAmount:n,amountToRefundControl:new H(0,{nonNullable:!0,validators:[re.min(0),re.max(n)]}),selected:i===0})})}function Vo(t,p){t&1&&(u(0),d(1,"translate")),t&2&&v(s(1,1,"order.add-payment-to-order"))}function Ro(t,p){if(t&1){let e=S();a(0,"button",7),b("click",function(){h(e);let n=m();return y(n.cancel())}),u(1),d(2,"translate"),l(),a(3,"button",8),b("click",function(){h(e);let n=m();return y(n.submit())}),u(4),d(5,"translate"),d(6,"localeCurrency"),l()}if(t&2){let e=m();r(),v(s(2,4,"common.cancel")),r(2),o("disabled",e.form.invalid||e.form.pristine),r(),ie(" ",s(5,6,"order.add-payment")," (",x(6,8,e.outstandingAmount,e.currencyCode),") ")}}var qm=be`
|
|
2
2
|
query GetAddManualPaymentMethodList($options: PaymentMethodListOptions!) {
|
|
3
3
|
paymentMethods(options: $options) {
|
|
4
4
|
items {
|
|
@@ -127,4 +127,4 @@ import{$a as qn,$b as Jn,$c as mt,$f as Or,A as Dn,Aa as Ct,Ab as vt,Ae as We,Af
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
`,Kt=(()=>{class t{constructor(e,i){this.dataService=e,this.router=i}canActivate(e,i){let n=i.url.includes("orders/draft"),c=i.url.includes("/modify"),C=e.paramMap.get("id");return n?C==="create"?this.dataService.order.createDraftOrder().pipe(_e(({createDraftOrder:F})=>this.router.parseUrl(`/orders/draft/${F.id}`))):!0:this.dataService.query(Lm,{id:C}).single$.pipe(_e(({order:F})=>F?.state==="Modifying"&&!c?this.router.parseUrl(`/orders/${C}/modify`):!0))}static{this.\u0275fac=function(i){return new(i||t)(Le(K),Le(fi))}}static{this.\u0275prov=oi({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Bo=t=>[{path:"",component:Bt,data:{locationId:"order-list",breadcrumb:"breadcrumb.orders"},children:t.getPageTabRoutes("order-list")},{path:"draft/:id",component:Bt,canActivate:[Kt],data:{locationId:"draft-order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("draft-order-detail")},{path:":id",component:Bt,canActivate:[Kt],data:{locationId:"order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("order-detail")},{path:":aggregateOrderId/seller-orders/:id",component:Bt,canActivate:[Kt],data:{locationId:"order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("order-detail")},{path:":id/modify",component:Bt,canActivate:[Kt],data:{locationId:"modify-order",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("modify-order")}];var Sg=(()=>{class t{static{this.hasRegisteredTabsAndBulkActions=!1}constructor(e){t.hasRegisteredTabsAndBulkActions||(e.registerPageTab({priority:0,location:"order-list",tab:"order.orders",route:"",component:Eo}),e.registerPageTab({priority:0,location:"order-detail",tab:"order.order",route:"",component:ji({component:Do,query:mi,entityKey:"order",getBreadcrumbs:i=>i?.type!==ct.Seller||!i?.aggregateOrder?[{label:`${i?.code}`,link:[i?.id]}]:[{label:`${i?.aggregateOrder?.code}`,link:["/orders/",i?.aggregateOrder?.id]},{label:"breadcrumb.seller-orders",link:["/orders/",i?.aggregateOrder?.id]},{label:`${i?.code}`,link:[i?.id]}]})}),e.registerPageTab({priority:0,location:"draft-order-detail",tab:"order.order",route:"",component:ji({component:Jr,query:mi,entityKey:"order",getBreadcrumbs:i=>[{label:"order.draft-order",link:[i?.id]}]})}),e.registerPageTab({priority:0,location:"modify-order",tab:"order.order",route:"",component:ji({component:Fo,query:mi,entityKey:"order",getBreadcrumbs:i=>[{label:i?.code||"order",link:["/orders/",i?.id]},{label:"breadcrumb.modifying-order",link:[i?.id]}]})}),t.hasRegisteredTabsAndBulkActions=!0)}static{this.\u0275fac=function(i){return new(i||t)(Le(Vi))}}static{this.\u0275mod=Bn({type:t})}static{this.\u0275inj=Mn({providers:[{provide:tr,useFactory:e=>Bo(e),multi:!0,deps:[Vi]}],imports:[Er,ir.forChild([])]})}}return t})();export{Ar as AddManualPaymentDialogComponent,Vr as CancelOrderDialogComponent,Ui as CouponCodeSelectorComponent,Jr as DraftOrderDetailComponent,Ur as DraftOrderVariantSelectorComponent,Kr as FulfillOrderDialogComponent,no as FulfillmentCardComponent,Zi as FulfillmentDetailComponent,to as FulfillmentStateLabelComponent,n0 as GET_COUPON_CODE_SELECTOR_PROMOTION_LIST,qf as GET_CUSTOMER_ADDRESSES,Lm as GET_ORDER_STATE,Oo as GET_SELLER_ORDERS,Xi as LineFulfillmentComponent,Nt as LineRefundsComponent,ro as ModificationDetailComponent,en as NODE_HEIGHT,_f as ORDER_DETAIL_QUERY,jr as OrderCustomFieldsCardComponent,Hr as OrderDataTableComponent,Do as OrderDetailComponent,st as OrderEditResultType,Fo as OrderEditorComponent,Po as OrderEditsPreviewDialogComponent,Kt as OrderGuard,So as OrderHistoryComponent,ho as OrderHistoryEntryHostComponent,Eo as OrderListComponent,an as OrderModificationSummaryComponent,Sg as OrderModule,vo as OrderPaymentCardComponent,oo as OrderProcessEdgeComponent,ao as OrderProcessGraphComponent,lo as OrderProcessGraphDialogComponent,tn as OrderProcessNodeComponent,$r as OrderStateSelectDialogComponent,$t as OrderTableComponent,Ji as OrderTotalColumnComponent,Vt as OrderTransitionService,rn as PaymentDetailComponent,nn as PaymentForRefundSelectorComponent,_o as PaymentStateLabelComponent,Rf as RefundDetailComponent,uo as RefundOrderDialogComponent,go as RefundStateLabelComponent,gf as SET_ORDER_CUSTOMER_MUTATION,fn as SelectAddressDialogComponent,Qi as SelectCustomerDialogComponent,Yi as SelectShippingMethodDialogComponent,To as SellerOrdersCardComponent,fo as SettleRefundDialogComponent,qt as SimpleItemListComponent,Bo as createRoutes,Wi as getRefundablePayments};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-EIPXVV3G.js.map
|