@vendure/admin-ui-plugin 3.2.2 → 3.2.4

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.
Files changed (31) hide show
  1. package/lib/admin-ui/browser/{chunk-RUXBMYRL.js → chunk-2RICIUGZ.js} +2 -2
  2. package/lib/admin-ui/browser/{chunk-W6ZQH6TM.js → chunk-3KRL6RK5.js} +2 -2
  3. package/lib/admin-ui/browser/{chunk-OD26BEJV.js → chunk-E35EGBE3.js} +2 -2
  4. package/lib/admin-ui/browser/{chunk-PXEUBHZ2.js → chunk-IDLI5JK5.js} +2 -2
  5. package/lib/admin-ui/browser/{chunk-5IAHZUFG.js → chunk-KSERV2BF.js} +40 -40
  6. package/lib/admin-ui/browser/{chunk-5IAHZUFG.js.map → chunk-KSERV2BF.js.map} +3 -3
  7. package/lib/admin-ui/browser/{chunk-KV5QNU55.js → chunk-KZCQDJNF.js} +4 -4
  8. package/lib/admin-ui/browser/{chunk-KV5QNU55.js.map → chunk-KZCQDJNF.js.map} +1 -1
  9. package/lib/admin-ui/browser/{chunk-FDMXWRK5.js → chunk-L5LULX5Y.js} +2 -2
  10. package/lib/admin-ui/browser/{chunk-ZRWMV2P4.js → chunk-MAQEL2PF.js} +2 -2
  11. package/lib/admin-ui/browser/{chunk-MZFFGCAS.js → chunk-NHTRKS2D.js} +2 -2
  12. package/lib/admin-ui/browser/{chunk-65GYL6KV.js → chunk-OZEBZIK7.js} +2 -2
  13. package/lib/admin-ui/browser/i18n-messages/ar.json +65 -65
  14. package/lib/admin-ui/browser/i18n-messages/fr.json +29 -29
  15. package/lib/admin-ui/browser/index.html +1 -1
  16. package/lib/admin-ui/browser/main-GRFJO66A.js +2 -0
  17. package/lib/admin-ui/browser/modal-dialog.component-Y4MYBRQC.css.map +7 -0
  18. package/lib/src/plugin.js +4 -1
  19. package/lib/src/plugin.js.map +1 -1
  20. package/package.json +8 -8
  21. package/lib/admin-ui/browser/main-5VEVQFUE.js +0 -2
  22. package/lib/admin-ui/browser/modal-dialog.component-QEXMY7IS.css.map +0 -7
  23. /package/lib/admin-ui/browser/{chunk-RUXBMYRL.js.map → chunk-2RICIUGZ.js.map} +0 -0
  24. /package/lib/admin-ui/browser/{chunk-W6ZQH6TM.js.map → chunk-3KRL6RK5.js.map} +0 -0
  25. /package/lib/admin-ui/browser/{chunk-OD26BEJV.js.map → chunk-E35EGBE3.js.map} +0 -0
  26. /package/lib/admin-ui/browser/{chunk-PXEUBHZ2.js.map → chunk-IDLI5JK5.js.map} +0 -0
  27. /package/lib/admin-ui/browser/{chunk-FDMXWRK5.js.map → chunk-L5LULX5Y.js.map} +0 -0
  28. /package/lib/admin-ui/browser/{chunk-ZRWMV2P4.js.map → chunk-MAQEL2PF.js.map} +0 -0
  29. /package/lib/admin-ui/browser/{chunk-MZFFGCAS.js.map → chunk-NHTRKS2D.js.map} +0 -0
  30. /package/lib/admin-ui/browser/{chunk-65GYL6KV.js.map → chunk-OZEBZIK7.js.map} +0 -0
  31. /package/lib/admin-ui/browser/{main-5VEVQFUE.js.map → main-GRFJO66A.js.map} +0 -0
@@ -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 K,F as re,Fa as A,Gg as Je,H as me,I as R,L as ge,Le as je,Lg as Y,Ma as F,Me as H,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 J,e as se,ed as Ie,f as ce,fg as Qe,g as pe,h as U,ha as u,id as We,ja as p,jd as ke,jf as lt,la as I,ld as T,ma as o,mg as He,n as M,na as a,nb as E,nd as Q,ng as Ke,o as le,oa as h,rg as Ye,sa as W,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-KV5QNU55.js";var Xe=se(pt());var mt=["portal"],gt=["*"];function ut(i,l){i&1&&_e(0)}function ft(i,l){}var Ze=(()=>{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}
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 K,F as re,Fa as A,Gg as Je,H as me,I as R,L as ge,Le as je,Lg as Y,Ma as F,Me as H,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 J,e as se,ed as Ie,f as ce,fg as Qe,g as pe,h as U,ha as u,id as We,ja as p,jd as ke,jf as lt,la as I,ld as T,ma as o,mg as He,n as M,na as a,nb as E,nd as Q,ng as Ke,o as le,oa as h,rg as Ye,sa as W,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-KZCQDJNF.js";var Xe=se(pt());var mt=["portal"],gt=["*"];function ut(i,l){i&1&&_e(0)}function ft(i,l){}var Ze=(()=>{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=W();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=W();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=W();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=W();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=Ye()}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(J),x(Ie),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,Ke,Ze,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-4N4EKLV3.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 It(i,l){if(i&1&&h(0,"vdr-customer-label",9),i&2){let e=l.item;p("customer",e.customer)}}function Wt(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,H],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-VQA7QKBQ.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(J))}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({imports:[Y,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 Ki=(()=>{class i{constructor(e){this.dataService=e,this.version=Fe,this.brand=Q().brand,this.hideVendureBranding=Q().hideVendureBranding,this.hideVersion=Q().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,K],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})(),Yi=(()=>{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,Ze 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,Ki as WelcomeWidgetComponent,Yi as WelcomeWidgetModule,tt as dashboardRoutes};
52
- //# sourceMappingURL=chunk-RUXBMYRL.js.map
52
+ //# sourceMappingURL=chunk-2RICIUGZ.js.map
@@ -1,4 +1,4 @@
1
- import{a as Ii}from"./chunk-MZFFGCAS.js";import{$ as Xt,$c as Ir,$e as wt,$f as Ie,$g as Vt,Aa as jt,Ac as Tn,Ae as di,Af as ve,Ag as po,B as Ei,Ba as ie,Bc as Sn,Bd as Vn,Bf as ye,Ca as f,Cc as Dn,Cf as be,Da as x,Dc as In,Dd as $n,Ea as C,Ec as xn,Ed as re,Ef as me,Fa as Lt,Fc as Pn,Fd as Et,Fe as Yn,Ff as Fe,Fg as hi,Gc as Bn,Ge as J,H as Mi,Ha as qi,Hc as kn,He as le,Hg as co,I as ft,Ia as Zi,Ic as Ln,Id as ae,Ie as ci,Ig as Ci,Ja as Ui,Jd as he,Je as Xn,Jf as fi,Jg as $,K as St,Kf as xr,L as Qt,La as q,Ld as se,Le as Ce,Lf as Rt,Lg as uo,M as Yt,Ma as W,Md as _t,Me as Mt,Mf as O,Nd as vt,Ne as Jn,Nf as M,O as wi,Oa as Hi,Od as yt,Oe as Wt,Of as V,P as Ni,Pd as Gn,Pf as w,Pg as ue,Q as xt,Qa as a,Qd as qn,Qf as N,Qg as Je,R as Si,Ra as s,S as Ri,Sa as k,Sg as fo,T as b,Ta as zi,Tf as ro,U as F,Ua as ne,Uc as An,Ud as ce,Uf as ao,Ug as Ae,Va as de,Vc as oi,Vd as Zn,Vf as so,W as Ke,Wa as ji,Wc as ri,Wd as Un,We as eo,Wf as Te,Xc as ai,Xe as bt,Xf as Se,Y as Oi,Ya as U,Yc as En,Z as Vi,Za as E,Zf as De,Zg as Ee,_ as r,_c as Mn,_e as Ge,_f as Re,_g as Ot,a as H,aa as v,ae as j,ah as $t,b as ze,bc as ii,bf as Nt,bh as Pe,ca as T,cc as Ji,cd as wn,cf as gt,ch as Dt,da as $i,db as B,dc as en,dd as G,de as Ye,e as ut,ea as Jt,ec as tn,ed as si,ee as Xe,fb as Wi,fc as nn,ff as ui,fg as xe,g as Ct,ga as A,gc as on,gd as Nn,gf as to,h as ki,ha as u,hc as ni,hd as Rn,i as Li,ia as ei,ic as rn,id as ge,if as qe,ja as o,jb as Ki,jc as an,jd as On,jg as Ze,k as Tt,kc as sn,la as Pt,lc as ln,ld as I,ma as l,mc as mn,n as Z,na as m,nb as D,nc as pn,ng as L,o as tt,oa as c,ob as ti,oc as dn,of as io,p as te,pa as Bt,pb as Qi,pc as cn,qa as kt,qc as un,qe as Hn,rb as Yi,rc as fn,re as zn,sa as S,sc as gn,se as jn,sf as no,t as Ht,ta as _,tc as hn,td as Qe,te as X,ua as g,uc as Cn,ud as Q,ue as Wn,uf as oo,ug as gi,vb as Xi,vc as _n,vd as R,ve as Kn,vg as fe,wb as At,wc as vn,wd as Y,we as Qn,xa as Di,xc as yn,xd as oe,xe as li,y as pe,ya as Gi,yc as bn,ye as mi,yg as lo,z as Ai,za as zt,zb as y,zc as Fn,ze as pi,zf as _e,zg as mo}from"./chunk-KV5QNU55.js";var go=(()=>{class t{constructor(e){this.templateRef=e}static{this.\u0275fac=function(n){return new(n||t)(v(Xt))}}static{this.\u0275dir=Jt({type:t,selectors:[["","vdrZoneMemberControls",""]],standalone:!1})}}return t})();var ho=(()=>{class t{constructor(e){this.templateRef=e}static{this.\u0275fac=function(n){return new(n||t)(v(Xt))}}static{this.\u0275dir=Jt({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(),x(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(),x(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 qt=(()=>{class t{constructor(e){this.dataService=e,this.selectedMemberIds=[],this.selectionChange=new Ke,this.filterTermControl=new Vn(""),this.currentPage=1,this.itemsPerPage=10,this.selectionManager=new io({multiSelect:!0,itemsAreEqual:(n,i)=>n.id===i.id,additiveMode:!0}),this.membersInput$=new Ct,this.activeZoneInput$=new ki(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(ii,{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(Mi(""))).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&&(Di(d,ho,5),Di(d,go,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:[Ri],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%}
1
+ import{a as Ii}from"./chunk-NHTRKS2D.js";import{$ as Xt,$c as Ir,$e as wt,$f as Ie,$g as Vt,Aa as jt,Ac as Tn,Ae as di,Af as ve,Ag as po,B as Ei,Ba as ie,Bc as Sn,Bd as Vn,Bf as ye,Ca as f,Cc as Dn,Cf as be,Da as x,Dc as In,Dd as $n,Ea as C,Ec as xn,Ed as re,Ef as me,Fa as Lt,Fc as Pn,Fd as Et,Fe as Yn,Ff as Fe,Fg as hi,Gc as Bn,Ge as J,H as Mi,Ha as qi,Hc as kn,He as le,Hg as co,I as ft,Ia as Zi,Ic as Ln,Id as ae,Ie as ci,Ig as Ci,Ja as Ui,Jd as he,Je as Xn,Jf as fi,Jg as $,K as St,Kf as xr,L as Qt,La as q,Ld as se,Le as Ce,Lf as Rt,Lg as uo,M as Yt,Ma as W,Md as _t,Me as Mt,Mf as O,Nd as vt,Ne as Jn,Nf as M,O as wi,Oa as Hi,Od as yt,Oe as Wt,Of as V,P as Ni,Pd as Gn,Pf as w,Pg as ue,Q as xt,Qa as a,Qd as qn,Qf as N,Qg as Je,R as Si,Ra as s,S as Ri,Sa as k,Sg as fo,T as b,Ta as zi,Tf as ro,U as F,Ua as ne,Uc as An,Ud as ce,Uf as ao,Ug as Ae,Va as de,Vc as oi,Vd as Zn,Vf as so,W as Ke,Wa as ji,Wc as ri,Wd as Un,We as eo,Wf as Te,Xc as ai,Xe as bt,Xf as Se,Y as Oi,Ya as U,Yc as En,Z as Vi,Za as E,Zf as De,Zg as Ee,_ as r,_c as Mn,_e as Ge,_f as Re,_g as Ot,a as H,aa as v,ae as j,ah as $t,b as ze,bc as ii,bf as Nt,bh as Pe,ca as T,cc as Ji,cd as wn,cf as gt,ch as Dt,da as $i,db as B,dc as en,dd as G,de as Ye,e as ut,ea as Jt,ec as tn,ed as si,ee as Xe,fb as Wi,fc as nn,ff as ui,fg as xe,g as Ct,ga as A,gc as on,gd as Nn,gf as to,h as ki,ha as u,hc as ni,hd as Rn,i as Li,ia as ei,ic as rn,id as ge,if as qe,ja as o,jb as Ki,jc as an,jd as On,jg as Ze,k as Tt,kc as sn,la as Pt,lc as ln,ld as I,ma as l,mc as mn,n as Z,na as m,nb as D,nc as pn,ng as L,o as tt,oa as c,ob as ti,oc as dn,of as io,p as te,pa as Bt,pb as Qi,pc as cn,qa as kt,qc as un,qe as Hn,rb as Yi,rc as fn,re as zn,sa as S,sc as gn,se as jn,sf as no,t as Ht,ta as _,tc as hn,td as Qe,te as X,ua as g,uc as Cn,ud as Q,ue as Wn,uf as oo,ug as gi,vb as Xi,vc as _n,vd as R,ve as Kn,vg as fe,wb as At,wc as vn,wd as Y,we as Qn,xa as Di,xc as yn,xd as oe,xe as li,y as pe,ya as Gi,yc as bn,ye as mi,yg as lo,z as Ai,za as zt,zb as y,zc as Fn,ze as pi,zf as _e,zg as mo}from"./chunk-KZCQDJNF.js";var go=(()=>{class t{constructor(e){this.templateRef=e}static{this.\u0275fac=function(n){return new(n||t)(v(Xt))}}static{this.\u0275dir=Jt({type:t,selectors:[["","vdrZoneMemberControls",""]],standalone:!1})}}return t})();var ho=(()=>{class t{constructor(e){this.templateRef=e}static{this.\u0275fac=function(n){return new(n||t)(v(Xt))}}static{this.\u0275dir=Jt({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(),x(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(),x(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 qt=(()=>{class t{constructor(e){this.dataService=e,this.selectedMemberIds=[],this.selectionChange=new Ke,this.filterTermControl=new Vn(""),this.currentPage=1,this.itemsPerPage=10,this.selectionManager=new io({multiSelect:!0,itemsAreEqual:(n,i)=>n.id===i.id,additiveMode:!0}),this.membersInput$=new Ct,this.activeZoneInput$=new ki(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(ii,{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(Mi(""))).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&&(Di(d,ho,5),Di(d,go,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:[Ri],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 _o=t=>({zoneName:t});function Rr(t,p){if(t&1&&(f(0),a(1,"translate")),t&2){let e=g();x(k(1,1,"settings.add-countries-to-zone",W(4,_o,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(),x(s(2,3,"common.cancel")),r(2),o("disabled",!e.selectedMemberIds.length),r(),C(" ",k(5,5,"settings.add-countries-to-zone",W(8,_o,e.zoneName))," ")}}var Hp=D`
3
3
  query GetZoneMembers($zoneId: ID!) {
4
4
  zone(id: $zoneId) {
@@ -392,4 +392,4 @@ import{a as Ii}from"./chunk-MZFFGCAS.js";import{$ as Xt,$c as Ir,$e as wt,$f as
392
392
  }
393
393
  `,Fr=(()=>{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:Ln,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?At.OR:At.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")),Ei(),Qt(()=>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(vo,{locals:{zoneName:e.name,zoneId:e.id},size:"md"}).pipe(ft(n=>n?this.dataService.settings.addMembersToZone(e.id,n).pipe(Ai(n)):Li)).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(Qn))}}static{this.\u0275cmp=T({type:t,selectors:[["vdr-zone-list"]],viewQuery:function(n,i){if(n&1&&Gi(qt,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,po,lo,mo,L,qt,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-NLFW7OUJ.css.map */`],changeDetection:0})}}return t})();var Tr={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,P=p.map(Ve=>Ve.id);i.settings.removeMembersFromZone(h.id,P).subscribe({complete:()=>{d.success("settings.remove-countries-from-zone-success",{countryCount:P.length,zoneName:h.name}),e.refresh(),n()}})}};var mf=(()=>{class t extends fo{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)(xt(Rn),xt(G))}}static{this.\u0275prov=wi({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Dr=ut(Wt());var Sr=t=>[{path:"profile",component:fe,data:{breadcrumb:"breadcrumb.profile"},resolve:{detail:()=>Si(G).query(pn).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:()=>Si(G).query(rn).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(Wo),e.registerBulkAction(xo),e.registerBulkAction(So),e.registerBulkAction(Ho),e.registerBulkAction(or),e.registerBulkAction(rr),e.registerBulkAction(nr),e.registerBulkAction(Oo),e.registerBulkAction(Vo),e.registerBulkAction(Ro),e.registerBulkAction(ur),e.registerBulkAction(hr),e.registerBulkAction(Lo),e.registerBulkAction(yr),e.registerBulkAction(Tr),e.registerBulkAction(mr),e.registerBulkAction(pr),e.registerBulkAction(lr),n.registerPageTab({priority:0,location:"seller-list",tab:"breadcrumb.sellers",route:"",component:Ko}),n.registerPageTab({priority:0,location:"seller-detail",tab:"settings.seller",route:"",component:Je({component:jo,query:un,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:Bo}),n.registerPageTab({priority:0,location:"channel-detail",tab:"settings.channel",route:"",component:Je({component:Io,query:tn,entityKey:"channel",getBreadcrumbs:i=>[{label:i?i.code===Dr.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:Do}),n.registerPageTab({priority:0,location:"administrator-detail",tab:"settings.administrator",route:"",component:Je({component:To,query:Ji,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:zo}),n.registerPageTab({priority:0,location:"role-detail",tab:"settings.role",route:"",component:Je({component:Uo,query:dn,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:ar}),n.registerPageTab({priority:0,location:"shipping-method-detail",tab:"settings.shipping-method",route:"",component:Je({component:ir,query:gn,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:_r}),n.registerPageTab({priority:0,location:"payment-method-list",tab:"breadcrumb.payment-methods",route:"",component:$o}),n.registerPageTab({priority:0,location:"payment-method-detail",tab:"settings.payment-method",route:"",component:Je({component:No,query:an,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:fr}),n.registerPageTab({priority:0,location:"tax-category-detail",tab:"settings.tax-category",route:"",component:Je({component:cr,query:In,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:Cr}),n.registerPageTab({priority:0,location:"tax-rate-detail",tab:"settings.tax-rate",route:"",component:Je({component:gr,query:Pn,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:Ao}),n.registerPageTab({priority:0,location:"country-detail",tab:"settings.country",route:"",component:Je({component:ko,query:on,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:Fr}),n.registerPageTab({priority:0,location:"zone-detail",tab:"settings.zone",route:"",component:Je({component:vr,query:kn,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:Eo}),n.registerPageTab({priority:0,location:"profile",tab:"breadcrumb.profile",route:"",component:Go}),n.registerPageTab({priority:0,location:"stock-location-list",tab:"catalog.stock-locations",route:"",component:dr}),n.registerPageTab({priority:0,location:"stock-location-detail",tab:"catalog.stock-location",route:"",component:Je({component:sr,query:vn,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)(xt(so),xt(gi))}}static{this.\u0275mod=$i({type:t})}static{this.\u0275inj=Ni({providers:[{provide:Nn,useFactory:e=>Sr(e),multi:!0,deps:[gi]}],imports:[uo,On.forChild([])]})}}return t})();export{vo as AddCountryToZoneDialogComponent,To as AdminDetailComponent,Do as AdministratorListComponent,H0 as CREATE_STOCK_LOCATION,Io as ChannelDetailComponent,Bo as ChannelListComponent,ko as CountryDetailComponent,Ao 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,Eo as GlobalSettingsComponent,No as PaymentMethodDetailComponent,$o as PaymentMethodListComponent,_i as PermissionGridComponent,Go as ProfileComponent,mf as ProfileResolver,Uo as RoleDetailComponent,zo as RoleListComponent,jo as SellerDetailComponent,Ko as SellerListComponent,vg as SettingsModule,Yo as ShippingEligibilityTestResultComponent,ir as ShippingMethodDetailComponent,ar as ShippingMethodListComponent,er as ShippingMethodTestResultComponent,sr as StockLocationDetailComponent,dr as StockLocationListComponent,cr as TaxCategoryDetailComponent,fr as TaxCategoryListComponent,gr as TaxRateDetailComponent,Cr as TaxRateListComponent,Fi as TestAddressFormComponent,bi as TestOrderBuilderComponent,_r as TestShippingMethodsComponent,z0 as UPDATE_STOCK_LOCATION,vr as ZoneDetailComponent,Fr as ZoneListComponent,go as ZoneMemberControlsDirective,qt as ZoneMemberListComponent,ho as ZoneMemberListHeaderDirective,Oo as assignPaymentMethodsToChannelBulkAction,or as assignShippingMethodsToChannelBulkAction,mr as assignStockLocationsToChannelBulkAction,Sr as createRoutes,So as deleteAdministratorsBulkAction,xo as deleteChannelsBulkAction,Lo as deleteCountriesBulkAction,Ro as deletePaymentMethodsBulkAction,Ho as deleteRolesBulkAction,Wo as deleteSellersBulkAction,nr as deleteShippingMethodsBulkAction,lr as deleteStockLocationsBulkAction,ur as deleteTaxCategoriesBulkAction,hr as deleteTaxRatesBulkAction,yr as deleteZonesBulkAction,Vo as removePaymentMethodsFromChannelBulkAction,rr as removeShippingMethodsFromChannelBulkAction,pr as removeStockLocationsFromChannelBulkAction,Tr as removeZoneMembersBulkAction};
395
- //# sourceMappingURL=chunk-W6ZQH6TM.js.map
395
+ //# sourceMappingURL=chunk-3KRL6RK5.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-KV5QNU55.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`
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-KZCQDJNF.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-OD26BEJV.js.map
35
+ //# sourceMappingURL=chunk-E35EGBE3.js.map
@@ -1,5 +1,5 @@
1
- import{Ab as me,Ae as Ie,Ba as P,Bd as N,Ca as l,Ce as Se,Da as h,De as Ee,Dg as Fe,Ea as u,Ee as Te,Eg as Je,Fa as L,Fe as je,Ff as Le,Ge as Pe,Hd as he,Jf as De,K as W,La as ie,Le as ke,Lg as Me,Na as ne,Nf as F,Of as J,P as z,Pf as M,Qa as a,Qf as R,Ra as r,Re as Be,Sa as oe,T as X,Tg as Re,U as Z,Ua as k,Wa as ae,Ya as re,Za as x,Zf as we,_ as i,a as G,aa as C,ae as I,ca as y,ce as ve,da as K,db as D,dd as se,de as _e,eb as pe,ee as be,fd as ce,fg as Ne,ga as ee,ha as f,hb as le,hd as de,ia as B,if as S,ja as p,jd as ue,ld as w,ma as n,n as V,na as o,ng as A,oa as d,og as O,pa as T,qa as j,qg as q,s as Q,sa as te,sg as H,ta as b,td as fe,u as Y,ua as g,ub as v,wd as ge,xe as Ce,ye,ze as xe}from"./chunk-KV5QNU55.js";var tt=(e,m)=>({"is-success":e,"is-danger":m});function it(e,m){e&1&&(T(0),l(1),a(2,"translate"),j()),e&2&&(i(),u(" ",r(2,1,"system.health-all-systems-up")," "))}function nt(e,m){e&1&&(l(0),a(1,"translate")),e&2&&u(" ",r(1,1,"system.health-error")," ")}function ot(e,m){if(e&1&&(n(0,"div",9)(1,"div",10),d(2,"clr-icon",11),o(),n(3,"div",12),f(4,it,3,3,"ng-container",13)(5,nt,2,3,"ng-template",null,0,k),n(7,"div",14),l(8),a(9,"translate"),a(10,"async"),a(11,"localeDate"),o()()()),e&2){let t=m.ngIf,s=P(6),c=g();i(2),p("ngClass",ne(13,tt,t==="ok",t!=="ok")),B("shape",t==="ok"?"check-circle":"exclamation-circle"),i(2),p("ngIf",t==="ok")("ngIfElse",s),i(4),L(" ",r(9,6,"system.health-last-checked"),": ",oe(11,10,r(10,8,c.healthCheckService.lastCheck$),"mediumTime")," ")}}function at(e,m){e&1&&(T(0),d(1,"clr-icon",17),l(2),a(3,"translate"),j()),e&2&&(i(2),u(" ",r(3,1,"system.health-status-up")," "))}function rt(e,m){e&1&&(d(0,"clr-icon",18),l(1),a(2,"translate")),e&2&&(i(),u(" ",r(2,1,"system.health-status-down")," "))}function pt(e,m){if(e&1&&(n(0,"tr")(1,"td",15),l(2),o(),n(3,"td",15)(4,"vdr-chip",16),f(5,at,4,3,"ng-container",13)(6,rt,3,3,"ng-template",null,1,k),o()(),n(8,"td",15),l(9),o()()),e&2){let t=m.$implicit,s=P(7);i(2),h(t.key),i(2),p("colorType",t.result.status==="up"?"success":"error"),i(),p("ngIf",t.result.status==="up")("ngIfElse",s),i(4),h(t.result.message)}}var He=(()=>{class e{constructor(t){this.healthCheckService=t}static{this.\u0275fac=function(s){return new(s||e)(C(Be))}}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(s,c){s&1&&(n(0,"vdr-page-header"),d(1,"vdr-page-title"),o(),n(2,"vdr-page-body")(3,"vdr-page-block")(4,"vdr-action-bar")(5,"vdr-ab-left"),f(6,ot,12,16,"div",2),a(7,"async"),o(),n(8,"vdr-ab-right"),d(9,"vdr-action-bar-items",3),n(10,"button",4),b("click",function(){return c.healthCheckService.refresh()}),d(11,"clr-icon",5),l(12),a(13,"translate"),o()()()(),n(14,"vdr-page-block")(15,"table",6)(16,"thead")(17,"tr")(18,"th",7),l(19),a(20,"translate"),o(),n(21,"th",7),l(22),a(23,"translate"),o(),n(24,"th",7),l(25),a(26,"translate"),o()()(),n(27,"tbody"),f(28,pt,10,5,"tr",8),a(29,"async"),o()()()()),s&2&&(i(6),p("ngIf",r(7,6,c.healthCheckService.status$)),i(6),u(" ",r(13,8,"system.health-refresh")," "),i(7),u(" ",r(20,10,"common.name")," "),i(3),u(" ",r(23,12,"system.health-status")," "),i(3),u(" ",r(26,14,"system.health-message")," "),i(3),p("ngForOf",r(29,16,c.healthCheckService.details$)))},dependencies:[I,ae,re,x,R,J,M,S,F,q,H,O,A,D,w,ke],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)}
1
+ import{Ab as me,Ae as Ie,Ba as P,Bd as N,Ca as l,Ce as Se,Da as h,De as Ee,Dg as Fe,Ea as u,Ee as Te,Eg as Je,Fa as L,Fe as je,Ff as Le,Ge as Pe,Hd as he,Jf as De,K as W,La as ie,Le as ke,Lg as Me,Na as ne,Nf as F,Of as J,P as z,Pf as M,Qa as a,Qf as R,Ra as r,Re as Be,Sa as oe,T as X,Tg as Re,U as Z,Ua as k,Wa as ae,Ya as re,Za as x,Zf as we,_ as i,a as G,aa as C,ae as I,ca as y,ce as ve,da as K,db as D,dd as se,de as _e,eb as pe,ee as be,fd as ce,fg as Ne,ga as ee,ha as f,hb as le,hd as de,ia as B,if as S,ja as p,jd as ue,ld as w,ma as n,n as V,na as o,ng as A,oa as d,og as O,pa as T,qa as j,qg as q,s as Q,sa as te,sg as H,ta as b,td as fe,u as Y,ua as g,ub as v,wd as ge,xe as Ce,ye,ze as xe}from"./chunk-KZCQDJNF.js";var tt=(e,m)=>({"is-success":e,"is-danger":m});function it(e,m){e&1&&(T(0),l(1),a(2,"translate"),j()),e&2&&(i(),u(" ",r(2,1,"system.health-all-systems-up")," "))}function nt(e,m){e&1&&(l(0),a(1,"translate")),e&2&&u(" ",r(1,1,"system.health-error")," ")}function ot(e,m){if(e&1&&(n(0,"div",9)(1,"div",10),d(2,"clr-icon",11),o(),n(3,"div",12),f(4,it,3,3,"ng-container",13)(5,nt,2,3,"ng-template",null,0,k),n(7,"div",14),l(8),a(9,"translate"),a(10,"async"),a(11,"localeDate"),o()()()),e&2){let t=m.ngIf,s=P(6),c=g();i(2),p("ngClass",ne(13,tt,t==="ok",t!=="ok")),B("shape",t==="ok"?"check-circle":"exclamation-circle"),i(2),p("ngIf",t==="ok")("ngIfElse",s),i(4),L(" ",r(9,6,"system.health-last-checked"),": ",oe(11,10,r(10,8,c.healthCheckService.lastCheck$),"mediumTime")," ")}}function at(e,m){e&1&&(T(0),d(1,"clr-icon",17),l(2),a(3,"translate"),j()),e&2&&(i(2),u(" ",r(3,1,"system.health-status-up")," "))}function rt(e,m){e&1&&(d(0,"clr-icon",18),l(1),a(2,"translate")),e&2&&(i(),u(" ",r(2,1,"system.health-status-down")," "))}function pt(e,m){if(e&1&&(n(0,"tr")(1,"td",15),l(2),o(),n(3,"td",15)(4,"vdr-chip",16),f(5,at,4,3,"ng-container",13)(6,rt,3,3,"ng-template",null,1,k),o()(),n(8,"td",15),l(9),o()()),e&2){let t=m.$implicit,s=P(7);i(2),h(t.key),i(2),p("colorType",t.result.status==="up"?"success":"error"),i(),p("ngIf",t.result.status==="up")("ngIfElse",s),i(4),h(t.result.message)}}var He=(()=>{class e{constructor(t){this.healthCheckService=t}static{this.\u0275fac=function(s){return new(s||e)(C(Be))}}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(s,c){s&1&&(n(0,"vdr-page-header"),d(1,"vdr-page-title"),o(),n(2,"vdr-page-body")(3,"vdr-page-block")(4,"vdr-action-bar")(5,"vdr-ab-left"),f(6,ot,12,16,"div",2),a(7,"async"),o(),n(8,"vdr-ab-right"),d(9,"vdr-action-bar-items",3),n(10,"button",4),b("click",function(){return c.healthCheckService.refresh()}),d(11,"clr-icon",5),l(12),a(13,"translate"),o()()()(),n(14,"vdr-page-block")(15,"table",6)(16,"thead")(17,"tr")(18,"th",7),l(19),a(20,"translate"),o(),n(21,"th",7),l(22),a(23,"translate"),o(),n(24,"th",7),l(25),a(26,"translate"),o()()(),n(27,"tbody"),f(28,pt,10,5,"tr",8),a(29,"async"),o()()()()),s&2&&(i(6),p("ngIf",r(7,6,c.healthCheckService.status$)),i(6),u(" ",r(13,8,"system.health-refresh")," "),i(7),u(" ",r(20,10,"common.name")," "),i(3),u(" ",r(23,12,"system.health-status")," "),i(3),u(" ",r(26,14,"system.health-message")," "),i(3),p("ngForOf",r(29,16,c.healthCheckService.details$)))},dependencies:[I,ae,re,x,R,J,M,S,F,q,H,O,A,D,w,ke],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 lt(e,m){if(e&1&&(n(0,"span",3),l(1),a(2,"percent"),o()),e&2){let t=g();i(),u(" ",r(2,1,t.job.progress/100)," ")}}var Ge=(()=>{class e{get iconShape(){switch(this.job.state){case v.COMPLETED:return"check-circle";case v.FAILED:return"exclamation-circle";case v.CANCELLED:return"ban";case v.PENDING:case v.RETRYING:return"hourglass";case v.RUNNING:return"sync"}}get colorType(){switch(this.job.state){case v.COMPLETED:return"success";case v.FAILED:case v.CANCELLED:return"error";case v.PENDING:case v.RETRYING:return"";case v.RUNNING:return"warning"}}static{this.\u0275fac=function(s){return new(s||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(s,c){s&1&&(n(0,"vdr-chip",0),d(1,"clr-icon",1),l(2),a(3,"titlecase"),f(4,lt,3,3,"span",2),o()),s&2&&(p("colorType",c.colorType),i(),B("shape",c.iconShape),i(),u(" ",r(3,4,c.job.state)," "),i(2),p("ngIf",c.job.state==="RUNNING"))},dependencies:[I,x,S,le,pe],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 st=()=>["DeleteSettings","DeleteSystem"];function ct(e,m){e&1&&(T(0),n(1,"vdr-chip"),l(2),a(3,"translate"),o(),j()),e&2&&(i(2),h(r(3,1,"system.all-job-queues")))}function dt(e,m){if(e&1&&(n(0,"vdr-chip",20),l(1),o()),e&2){let t=g().item;p("colorFrom",t.name),i(),h(t.name)}}function ut(e,m){if(e&1&&f(0,ct,4,3,"ng-container",19)(1,dt,2,2,"ng-template",null,0,k),e&2){let t=m.item,s=P(2);p("ngIf",t.name==="all")("ngIfElse",s)}}function ft(e,m){if(e&1&&l(0),e&2){let t=m.item;u(" ",t.id," ")}}function gt(e,m){if(e&1&&(l(0),a(1,"timeAgo")),e&2){let t=m.item;u(" ",r(1,1,t.createdAt)," ")}}function ht(e,m){if(e&1&&(n(0,"vdr-chip",20),l(1),o()),e&2){let t=m.item;p("colorFrom",t.queueName),i(),h(t.queueName)}}function vt(e,m){if(e&1&&(n(0,"vdr-dropdown")(1,"button",22),a(2,"translate"),d(3,"clr-icon",23),o(),n(4,"vdr-dropdown-menu")(5,"div",24),d(6,"vdr-object-tree",5),o()()()),e&2){let t=g().item;i(),p("title",r(2,2,"system.job-data")),i(5),p("value",t.data)}}function _t(e,m){if(e&1&&f(0,vt,7,4,"vdr-dropdown",21),e&2){let t=m.item;p("ngIf",t.data)}}function bt(e,m){if(e&1&&(n(0,"div",27),l(1),o()),e&2){let t=g().item;i(),u("after ",t.attempts," attempts")}}function Ct(e,m){if(e&1&&(n(0,"div",27),l(1),o()),e&2){let t=g().item;i(),L(" attempting ",t.attempts," of ",t.retries+1," ")}}function yt(e,m){if(e&1&&(d(0,"vdr-job-state-label",25),f(1,bt,2,1,"div",26)(2,Ct,2,2,"div",26)),e&2){let t=m.item;p("job",t),i(),p("ngIf",t.state==="FAILED"),i(),p("ngIf",t.state==="RUNNING"||t.state==="RETRYING")}}function xt(e,m){if(e&1&&(l(0),a(1,"duration")),e&2){let t=m.item;u(" ",r(1,1,t.duration)," ")}}function It(e,m){if(e&1&&(n(0,"vdr-dropdown")(1,"button",28),d(2,"clr-icon",23),l(3),a(4,"translate"),o(),n(5,"vdr-dropdown-menu")(6,"div",24),d(7,"vdr-object-tree",5),o()()()),e&2){let t=g().item;i(3),u(" ",r(4,2,"system.job-result")," "),i(4),p("value",t.result)}}function St(e,m){if(e&1&&(n(0,"vdr-dropdown")(1,"button",29),d(2,"clr-icon",30),l(3),a(4,"translate"),o(),n(5,"vdr-dropdown-menu")(6,"div",24),l(7),o()()()),e&2){let t=g().item;i(3),u(" ",r(4,2,"system.job-error")," "),i(4),u(" ",t.error," ")}}function Et(e,m){if(e&1){let t=te();n(0,"vdr-dropdown")(1,"button",31),d(2,"clr-icon",32),o(),n(3,"vdr-dropdown-menu",33)(4,"button",34),a(5,"hasPermission"),b("click",function(){X(t);let c=g().item,_=g();return Z(_.cancelJob(c.id))}),d(6,"clr-icon",35),l(7),a(8,"translate"),o()()()}e&2&&(i(4),p("disabled",!r(5,2,ie(6,st))),i(3),u(" ",r(8,4,"common.cancel")," "))}function Tt(e,m){if(e&1&&f(0,It,8,4,"vdr-dropdown",21)(1,St,8,4,"vdr-dropdown",21)(2,Et,9,7,"vdr-dropdown",21),e&2){let t=m.item,s=g();p("ngIf",s.hasResult(t)),i(),p("ngIf",t.error),i(),p("ngIf",!t.isSettled&&t.state!=="FAILED")}}var Ue=(()=>{class e extends Re{constructor(t,s,c){super(s,c),this.dataService=t,this.liveUpdate=new N(!0),this.queueFilter=new N("all"),this.stateFilter=new N(""),super.setQueryFn((..._)=>this.dataService.settings.getAllJobs(..._),_=>_.jobs,(_,E)=>{let Ve=this.queueFilter.value==="all"?null:{queueName:{eq:this.queueFilter.value}},$=this.stateFilter.value;return{options:{skip:_,take:E,filter:G(G({},Ve),$?{state:{eq:$}}:{}),sort:{createdAt:me.DESC}}}})}ngOnInit(){super.ngOnInit(),Q(5e3,2e3).pipe(W(this.destroy$),Y(()=>!!this.liveUpdate.value)).subscribe(()=>{this.refresh()}),this.queues$=this.dataService.settings.getJobQueues().mapStream(t=>t.jobQueues).pipe(V(t=>[{name:"all",running:!0},...t]))}hasResult(t){let s=t.result;return s==null?!1:typeof s=="object"?Object.keys(s).length>0:!0}cancelJob(t){this.dataService.settings.cancelJob(t).subscribe(()=>this.refresh())}static{this.\u0275fac=function(s){return new(s||e)(C(se),C(de),C(ce))}}static{this.\u0275cmp=y({type:e,selectors:[["vdr-job-list"]],standalone:!1,features:[ee],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(s,c){s&1&&(n(0,"vdr-page-header"),d(1,"vdr-page-title"),o(),n(2,"vdr-page-body")(3,"vdr-page-block")(4,"vdr-action-bar")(5,"vdr-ab-left")(6,"clr-checkbox-wrapper",1),d(7,"input",2),n(8,"label"),l(9),a(10,"translate"),o()()(),n(11,"vdr-ab-right"),d(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"),l(16),a(17,"translate"),o()(),n(18,"ng-option",5)(19,"vdr-chip"),l(20),a(21,"translate"),o()(),n(22,"ng-option",5)(23,"vdr-chip",6),l(24),a(25,"translate"),o()(),n(26,"ng-option",5)(27,"vdr-chip",7),l(28),a(29,"translate"),o()(),n(30,"ng-option",5)(31,"vdr-chip",8),l(32),a(33,"translate"),o()(),n(34,"ng-option",5)(35,"vdr-chip",8),l(36),a(37,"translate"),o()()(),n(38,"ng-select",9),a(39,"async"),b("change",function(){return c.refresh()}),f(40,ut,3,2,"ng-template",10),o()()()(),n(41,"vdr-data-table-2",11),a(42,"async"),a(43,"async"),a(44,"async"),a(45,"async"),b("pageChange",function(E){return c.setPageNumber(E)})("itemsPerPageChange",function(E){return c.setItemsPerPage(E)}),n(46,"vdr-dt2-column",12),a(47,"translate"),f(48,ft,1,1,"ng-template"),o(),n(49,"vdr-dt2-column",13),a(50,"translate"),f(51,gt,2,3,"ng-template"),o(),n(52,"vdr-dt2-column",14),a(53,"translate"),f(54,ht,2,2,"ng-template"),o(),n(55,"vdr-dt2-column",15),a(56,"translate"),f(57,_t,1,1,"ng-template"),o(),n(58,"vdr-dt2-column",16),a(59,"translate"),f(60,yt,3,3,"ng-template"),o(),n(61,"vdr-dt2-column",17),a(62,"translate"),f(63,xt,2,3,"ng-template"),o(),n(64,"vdr-dt2-column",18),a(65,"translate"),f(66,Tt,3,3,"ng-template"),o()()()),s&2&&(i(7),p("formControl",c.liveUpdate),i(2),h(r(10,42,"common.live-update")),i(4),p("addTag",!1)("hideSelected",!0)("multiple",!1)("markFirst",!1)("clearable",!1)("searchable",!1)("formControl",c.stateFilter),i(),p("value",""),i(2),h(r(17,44,"system.job-state-all")),i(2),p("value","PENDING"),i(2),h(r(21,46,"system.job-state-pending")),i(2),p("value","RUNNING"),i(2),h(r(25,48,"system.job-state-running")),i(2),p("value","COMPLETED"),i(2),h(r(29,50,"system.job-state-completed")),i(2),p("value","FAILED"),i(2),h(r(33,52,"system.job-state-failed")),i(2),p("value","CANCELLED"),i(2),h(r(37,54,"system.job-state-cancelled")),i(2),p("addTag",!1)("items",r(39,56,c.queues$))("hideSelected",!0)("multiple",!1)("markFirst",!1)("clearable",!1)("searchable",!1)("formControl",c.queueFilter),i(3),p("items",r(42,58,c.items$))("itemsPerPage",r(43,60,c.itemsPerPage$))("totalItems",r(44,62,c.totalItems$))("currentPage",r(45,64,c.currentPage$)),i(5),p("heading",r(47,66,"common.id")),i(3),p("heading",r(50,68,"common.created-at")),i(3),p("heading",r(53,70,"system.job-queue-name"))("optional",!1),i(3),p("heading",r(56,72,"system.job-data"))("optional",!1),i(3),p("heading",r(59,74,"system.job-state")),i(3),p("heading",r(62,76,"system.job-duration")),i(3),p("heading",r(65,78,"system.job-result")))},dependencies:[I,ve,be,_e,x,fe,ge,he,je,Te,Se,Ee,R,J,M,S,Pe,Ce,ye,xe,Ie,De,F,Ne,we,q,H,O,A,Ge,D,w,Le,Je,Fe],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 $e=[{path:"jobs",component:Ue,data:{breadcrumb:"breadcrumb.job-queue"}},{path:"system-status",component:He,data:{breadcrumb:"breadcrumb.system-status"}}];var li=(()=>{class e{static{this.\u0275fac=function(s){return new(s||e)}}static{this.\u0275mod=K({type:e})}static{this.\u0275inj=z({imports:[Me,ue.forChild($e)]})}}return e})();export{He as HealthCheckComponent,Ue as JobListComponent,Ge as JobStateLabelComponent,li as SystemModule,$e as systemRoutes};
5
- //# sourceMappingURL=chunk-PXEUBHZ2.js.map
5
+ //# sourceMappingURL=chunk-IDLI5JK5.js.map