@vendure/admin-ui-plugin 3.4.1 → 3.4.2-master-202508260231

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 (25) hide show
  1. package/lib/admin-ui/browser/{chunk-DGK7UMUT.js → chunk-773M6YMW.js} +2 -2
  2. package/lib/admin-ui/browser/{chunk-OKY3W63V.js → chunk-DOBUOM7N.js} +2 -2
  3. package/lib/admin-ui/browser/{chunk-3APGNBCN.js → chunk-ENLNZ624.js} +2 -2
  4. package/lib/admin-ui/browser/{chunk-5WYZPGNT.js → chunk-HQV4OZS5.js} +2 -2
  5. package/lib/admin-ui/browser/{chunk-HPYMS4R2.js → chunk-N24AOM3G.js} +2 -2
  6. package/lib/admin-ui/browser/{chunk-HPYMS4R2.js.map → chunk-N24AOM3G.js.map} +1 -1
  7. package/lib/admin-ui/browser/{chunk-NF7FAUX4.js → chunk-NO4TUTUV.js} +2 -2
  8. package/lib/admin-ui/browser/{chunk-6DEOIDLK.js → chunk-PSOQWKYY.js} +2 -2
  9. package/lib/admin-ui/browser/{chunk-2MGNLIHH.js → chunk-QOUWHJBD.js} +2 -2
  10. package/lib/admin-ui/browser/{chunk-7JPLS52G.js → chunk-QRAGMIKN.js} +2 -2
  11. package/lib/admin-ui/browser/{chunk-MUE6HPQT.js → chunk-WBDTHR2Z.js} +2 -2
  12. package/lib/admin-ui/browser/index.html +1 -1
  13. package/lib/admin-ui/browser/main-VH5EWMD5.js +2 -0
  14. package/package.json +5 -5
  15. package/lib/admin-ui/browser/main-3UP6PESZ.js +0 -2
  16. /package/lib/admin-ui/browser/{chunk-DGK7UMUT.js.map → chunk-773M6YMW.js.map} +0 -0
  17. /package/lib/admin-ui/browser/{chunk-OKY3W63V.js.map → chunk-DOBUOM7N.js.map} +0 -0
  18. /package/lib/admin-ui/browser/{chunk-3APGNBCN.js.map → chunk-ENLNZ624.js.map} +0 -0
  19. /package/lib/admin-ui/browser/{chunk-5WYZPGNT.js.map → chunk-HQV4OZS5.js.map} +0 -0
  20. /package/lib/admin-ui/browser/{chunk-NF7FAUX4.js.map → chunk-NO4TUTUV.js.map} +0 -0
  21. /package/lib/admin-ui/browser/{chunk-6DEOIDLK.js.map → chunk-PSOQWKYY.js.map} +0 -0
  22. /package/lib/admin-ui/browser/{chunk-2MGNLIHH.js.map → chunk-QOUWHJBD.js.map} +0 -0
  23. /package/lib/admin-ui/browser/{chunk-7JPLS52G.js.map → chunk-QRAGMIKN.js.map} +0 -0
  24. /package/lib/admin-ui/browser/{chunk-MUE6HPQT.js.map → chunk-WBDTHR2Z.js.map} +0 -0
  25. /package/lib/admin-ui/browser/{main-3UP6PESZ.js.map → main-VH5EWMD5.js.map} +0 -0
@@ -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 Y,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 Ke,Ie as X,Ja as $,Jc as ko,Jf as Ue,Jg as kt,K as pn,L as Xe,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 Zn,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 Kn,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 Xn,Yf as Et,Z as xe,Za as w,Zb as Yn,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 Z,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 Kt,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 Ze,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-HPYMS4R2.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`
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 Y,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 Ke,Ie as X,Ja as $,Jc as ko,Jf as Ue,Jg as kt,K as pn,L as Xe,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 Zn,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 Kn,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 Xn,Yf as Et,Z as xe,Za as w,Zb as Yn,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 Z,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 Kt,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 Ze,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-N24AOM3G.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
  `,Zt=(()=>{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(Z),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:[Zt],data:{locationId:"draft-order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("draft-order-detail")},{path:":id",component:Bt,canActivate:[Zt],data:{locationId:"order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("order-detail")},{path:":aggregateOrderId/seller-orders/:id",component:Bt,canActivate:[Zt],data:{locationId:"order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("order-detail")},{path:":id/modify",component:Bt,canActivate:[Zt],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,Zr as FulfillOrderDialogComponent,no as FulfillmentCardComponent,Ki 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,Yi 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,Zt 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,Xi as SelectShippingMethodDialogComponent,To as SellerOrdersCardComponent,fo as SettleRefundDialogComponent,qt as SimpleItemListComponent,Bo as createRoutes,Wi as getRefundablePayments};
130
- //# sourceMappingURL=chunk-DGK7UMUT.js.map
130
+ //# sourceMappingURL=chunk-773M6YMW.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 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-HPYMS4R2.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-N24AOM3G.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-OKY3W63V.js.map
52
+ //# sourceMappingURL=chunk-DOBUOM7N.js.map
@@ -1,3 +1,3 @@
1
- import{Ad as J,Be as ie,Ca as l,Da as w,Dd as q,Ea as h,Ed as K,Ge as re,Ha as _,Ia as M,Ja as P,Lg as ae,Ma as T,O as k,P as U,Pe as b,Q as y,Qa as c,Ra as m,Sa as R,Wd as Q,Z as u,Za as B,Ze as oe,_ as r,aa as d,ca as L,ce as X,da as A,db as z,de as Y,ee as $,ha as C,hd as O,ja as p,jd as V,la as E,ld as W,ma as o,mb as N,n as S,na as a,nd as x,oa as I,qe as ee,rd as D,re as ne,se as te,ta as j,td as F,ua as f,ud as G,wd as H,xd as Z}from"./chunk-HPYMS4R2.js";var de=t=>({brand:t});function he(t,v){if(t&1&&(o(0,"p",20),l(1," Photo by "),o(2,"a",21),l(3),a(),l(4," on "),o(5,"a",21),l(6,"Unsplash"),a()()),t&2){let e=f();r(2),p("href",e.imageCreatorUrl,u),r(),w(e.imageCreator),r(2),p("href",e.imageUnsplashUrl,u)}}function ue(t,v){if(t&1&&(o(0,"p",22),l(1),a()),t&2){let e=f();r(),w(e.imageLocation)}}function Ce(t,v){if(t&1&&I(0,"img",23),t&2){let e=f();p("src",e.imageUrl,u)("alt",e.imageUrl)}}function fe(t,v){t&1&&I(0,"img",24)}var ge=(()=>{class t{constructor(e,i,n,s){this.authService=e,this.router=i,this.httpClient=n,this.localizationService=s,this.username="",this.password="",this.rememberMe=!1,this.version=ie,this.brand=x().brand,this.hideVendureBranding=x().hideVendureBranding,this.customImageUrl=x().loginImageUrl,this.imageUrl="",this.imageUnsplashUrl="",this.imageLocation="",this.imageCreator="",this.imageCreatorUrl="",this.customImageUrl?this.imageUrl=this.customImageUrl:this.loadImage()}ngOnInit(){this.direction$=this.localizationService.direction$}logIn(){this.errorMessage=void 0,this.authService.logIn(this.username,this.password,this.rememberMe).subscribe(e=>{switch(e.__typename){case"CurrentUser":let i=this.getRedirectRoute();this.router.navigateByUrl(i||"/");break;case"InvalidCredentialsError":case"NativeAuthStrategyError":this.errorMessage=e.message;break}})}loadImage(){this.httpClient.get("https://login-image.vendure.io").toPromise().then(e=>{this.updateImage(e)})}updateImage(e){let i=e.user,n=e.location;this.imageUrl=e.urls.regular+"?utm_source=Vendure+Login+Image&utm_medium=referral",this.imageCreator=i.name,this.imageLocation=n.name,this.imageCreatorUrl=i.links.html+"?utm_source=Vendure+Login+Image&utm_medium=referral",this.imageUnsplashUrl=e.links.html}getRedirectRoute(){let e,i=new RegExp(`${oe}=(.*)`);try{let n=window.location.search.match(i);n&&1<n.length&&(e=atob(decodeURIComponent(n[1])))}catch{}return e}static{this.\u0275fac=function(i){return new(i||t)(d(b),d(O),d(N),d(D))}}static{this.\u0275cmp=L({type:t,selectors:[["vdr-login"]],standalone:!1,decls:36,vars:37,consts:[[1,"login-wrapper",3,"dir"],[1,"login-wrapper-inner"],[1,"login-wrapper-image"],[1,"login-wrapper-image-content"],[1,"login-wrapper-image-title"],[1,"login-wrapper-image-copyright"],["class","creator",4,"ngIf"],["class","location",4,"ngIf"],[3,"src","alt",4,"ngIf"],[1,"login-wrapper-form"],[1,"login-title"],[1,"login-form"],[1,"login-group"],["type","text","name","username","id","login_username",1,"username",3,"ngModelChange","ngModel","placeholder"],["name","password","type","password","id","login_password",1,"password",3,"ngModelChange","ngModel","placeholder"],[1,"login-error",3,"clrAlertType","clrAlertClosable"],[1,"alert-text"],["type","checkbox","clrCheckbox","","id","rememberme","name","rememberme",3,"ngModelChange","ngModel"],["type","submit",1,"button","primary","login-button",3,"click","disabled"],["class","login-wrapper-logo","src","assets/logo-login.webp",4,"ngIf"],[1,"creator"],["target","_blank",3,"href"],[1,"location"],[3,"src","alt"],["src","assets/logo-login.webp",1,"login-wrapper-logo"]],template:function(i,n){i&1&&(o(0,"div",0),c(1,"async"),o(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4),l(6),c(7,"translate"),a(),o(8,"div",5),C(9,he,7,3,"p",6)(10,ue,2,1,"p",7),a()(),C(11,Ce,1,2,"img",8),a(),o(12,"div",9)(13,"p",10),l(14),c(15,"translate"),a(),o(16,"form",11)(17,"div",12)(18,"input",13),c(19,"translate"),P("ngModelChange",function(g){return M(n.username,g)||(n.username=g),g}),a(),o(20,"input",14),c(21,"translate"),P("ngModelChange",function(g){return M(n.password,g)||(n.password=g),g}),a(),o(22,"clr-alert",15)(23,"clr-alert-item")(24,"span",16),l(25),a()()(),o(26,"clr-checkbox-wrapper")(27,"input",17),P("ngModelChange",function(g){return M(n.rememberMe,g)||(n.rememberMe=g),g}),a(),o(28,"label"),l(29),c(30,"translate"),a()(),o(31,"div")(32,"button",18),j("click",function(){return n.logIn()}),l(33),c(34,"translate"),a()()()()(),C(35,fe,1,0,"img",19),a()()),i&2&&(p("dir",m(1,20,n.direction$)),r(6),h(" ",m(7,22,"common.login-image-title")," "),r(3),p("ngIf",n.imageCreator),r(),p("ngIf",n.imageLocation),r(),p("ngIf",n.imageUrl),r(3),h(" ",R(15,24,"common.login-title",T(35,de,n.hideVendureBranding?n.brand:"Vendure"))," "),r(4),_("ngModel",n.username),p("placeholder",m(19,27,"common.username")),r(2),_("ngModel",n.password),p("placeholder",m(21,29,"common.password")),r(2),E("visible",n.errorMessage),p("clrAlertType","danger")("clrAlertClosable",!1),r(3),h(" ",n.errorMessage," "),r(2),_("ngModel",n.rememberMe),r(2),w(m(30,31,"common.remember-me")),r(3),p("disabled",!n.username||!n.password),r(),h(" ",m(34,33,"common.login")," "),r(2),p("ngIf",!n.hideVendureBranding))},dependencies:[ee,ne,te,X,$,Y,B,K,G,F,H,Z,q,J,Q,re,z,W],styles:[`.login-wrapper[_ngcontent-%COMP%]{background:var(--color-weight-100);background-image:none;height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%]{background:var(--login-wrapper-inner-bg);width:1120px;height:590px;display:flex;justify-content:flex-start;align-items:stretch;position:relative;border-radius:var(--border-radius);border:1px solid var(--color-weight-150);overflow:hidden}@media (max-width: 992px){.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%]{flex-direction:column;height:auto;width:100%}}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%]{height:100%;flex-grow:1;position:relative}@media (max-width: 992px){.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%]{height:300px}}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;height:100%;object-fit:cover;object-position:center;position:relative;z-index:1}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;left:0;bottom:0;z-index:10;background:#020024;background:linear-gradient(180deg,#02002400,#000000bf);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;padding:30px}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-title[_ngcontent-%COMP%]{font-size:1.6rem;font-weight:700;color:#fff;margin-bottom:20px}@media (max-width: 992px){.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-title[_ngcontent-%COMP%]{font-size:1.2rem}}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-copyright[_ngcontent-%COMP%]{opacity:.8}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-copyright[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:.6rem;color:#fff;margin:0!important}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff;text-decoration:underline}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%]{height:100%;width:400px;padding:40px;display:flex;flex-direction:column;align-items:stretch;justify-content:center;box-shadow:0 20px 25px #0000001a;overflow:hidden;flex-shrink:0}@media (max-width: 992px){.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%]{height:auto;width:100%;padding:20px}}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%] .login-title[_ngcontent-%COMP%]{font-weight:700;font-size:1.2rem;margin-bottom:20px;color:var(--color-weight-600)}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%] .login-group[_ngcontent-%COMP%] input.username[_ngcontent-%COMP%], .login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%] .login-group[_ngcontent-%COMP%] input.password[_ngcontent-%COMP%]{display:block;width:100%;margin-bottom:15px;padding:12px 16px!important;background:#fff;font-size:14px;line-height:22px;color:#52667a;outline:none;-webkit-appearance:none}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%] .login-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{width:100%!important;margin-top:20px!important}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-logo[_ngcontent-%COMP%]{width:60px;height:auto;position:absolute;right:20px;top:20px}.login-button[_ngcontent-%COMP%]{width:100%;margin-top:var(--space-unit);justify-content:center}.version[_ngcontent-%COMP%]{flex:1;flex-grow:1;display:flex;align-items:flex-end;justify-content:center;color:var(--color-grey-300)}.version[_ngcontent-%COMP%] span[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{margin-inline-start:5px}.login-error[_ngcontent-%COMP%]{max-height:0;overflow:hidden;display:block}.login-error.visible[_ngcontent-%COMP%]{max-height:46px;transition:max-height .2s;animation:_ngcontent-%COMP%_shake .82s cubic-bezier(.36,.07,.19,.97) both;animation-delay:.2s;transform:translateZ(0);backface-visibility:hidden;perspective:1000px}@keyframes _ngcontent-%COMP%_shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}.login-wrapper[dir=rtl][_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-logo[_ngcontent-%COMP%]{right:auto;left:20px}.login-wrapper[dir=rtl][_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%]{left:auto;right:0}
1
+ import{Ad as J,Be as ie,Ca as l,Da as w,Dd as q,Ea as h,Ed as K,Ge as re,Ha as _,Ia as M,Ja as P,Lg as ae,Ma as T,O as k,P as U,Pe as b,Q as y,Qa as c,Ra as m,Sa as R,Wd as Q,Z as u,Za as B,Ze as oe,_ as r,aa as d,ca as L,ce as X,da as A,db as z,de as Y,ee as $,ha as C,hd as O,ja as p,jd as V,la as E,ld as W,ma as o,mb as N,n as S,na as a,nd as x,oa as I,qe as ee,rd as D,re as ne,se as te,ta as j,td as F,ua as f,ud as G,wd as H,xd as Z}from"./chunk-N24AOM3G.js";var de=t=>({brand:t});function he(t,v){if(t&1&&(o(0,"p",20),l(1," Photo by "),o(2,"a",21),l(3),a(),l(4," on "),o(5,"a",21),l(6,"Unsplash"),a()()),t&2){let e=f();r(2),p("href",e.imageCreatorUrl,u),r(),w(e.imageCreator),r(2),p("href",e.imageUnsplashUrl,u)}}function ue(t,v){if(t&1&&(o(0,"p",22),l(1),a()),t&2){let e=f();r(),w(e.imageLocation)}}function Ce(t,v){if(t&1&&I(0,"img",23),t&2){let e=f();p("src",e.imageUrl,u)("alt",e.imageUrl)}}function fe(t,v){t&1&&I(0,"img",24)}var ge=(()=>{class t{constructor(e,i,n,s){this.authService=e,this.router=i,this.httpClient=n,this.localizationService=s,this.username="",this.password="",this.rememberMe=!1,this.version=ie,this.brand=x().brand,this.hideVendureBranding=x().hideVendureBranding,this.customImageUrl=x().loginImageUrl,this.imageUrl="",this.imageUnsplashUrl="",this.imageLocation="",this.imageCreator="",this.imageCreatorUrl="",this.customImageUrl?this.imageUrl=this.customImageUrl:this.loadImage()}ngOnInit(){this.direction$=this.localizationService.direction$}logIn(){this.errorMessage=void 0,this.authService.logIn(this.username,this.password,this.rememberMe).subscribe(e=>{switch(e.__typename){case"CurrentUser":let i=this.getRedirectRoute();this.router.navigateByUrl(i||"/");break;case"InvalidCredentialsError":case"NativeAuthStrategyError":this.errorMessage=e.message;break}})}loadImage(){this.httpClient.get("https://login-image.vendure.io").toPromise().then(e=>{this.updateImage(e)})}updateImage(e){let i=e.user,n=e.location;this.imageUrl=e.urls.regular+"?utm_source=Vendure+Login+Image&utm_medium=referral",this.imageCreator=i.name,this.imageLocation=n.name,this.imageCreatorUrl=i.links.html+"?utm_source=Vendure+Login+Image&utm_medium=referral",this.imageUnsplashUrl=e.links.html}getRedirectRoute(){let e,i=new RegExp(`${oe}=(.*)`);try{let n=window.location.search.match(i);n&&1<n.length&&(e=atob(decodeURIComponent(n[1])))}catch{}return e}static{this.\u0275fac=function(i){return new(i||t)(d(b),d(O),d(N),d(D))}}static{this.\u0275cmp=L({type:t,selectors:[["vdr-login"]],standalone:!1,decls:36,vars:37,consts:[[1,"login-wrapper",3,"dir"],[1,"login-wrapper-inner"],[1,"login-wrapper-image"],[1,"login-wrapper-image-content"],[1,"login-wrapper-image-title"],[1,"login-wrapper-image-copyright"],["class","creator",4,"ngIf"],["class","location",4,"ngIf"],[3,"src","alt",4,"ngIf"],[1,"login-wrapper-form"],[1,"login-title"],[1,"login-form"],[1,"login-group"],["type","text","name","username","id","login_username",1,"username",3,"ngModelChange","ngModel","placeholder"],["name","password","type","password","id","login_password",1,"password",3,"ngModelChange","ngModel","placeholder"],[1,"login-error",3,"clrAlertType","clrAlertClosable"],[1,"alert-text"],["type","checkbox","clrCheckbox","","id","rememberme","name","rememberme",3,"ngModelChange","ngModel"],["type","submit",1,"button","primary","login-button",3,"click","disabled"],["class","login-wrapper-logo","src","assets/logo-login.webp",4,"ngIf"],[1,"creator"],["target","_blank",3,"href"],[1,"location"],[3,"src","alt"],["src","assets/logo-login.webp",1,"login-wrapper-logo"]],template:function(i,n){i&1&&(o(0,"div",0),c(1,"async"),o(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4),l(6),c(7,"translate"),a(),o(8,"div",5),C(9,he,7,3,"p",6)(10,ue,2,1,"p",7),a()(),C(11,Ce,1,2,"img",8),a(),o(12,"div",9)(13,"p",10),l(14),c(15,"translate"),a(),o(16,"form",11)(17,"div",12)(18,"input",13),c(19,"translate"),P("ngModelChange",function(g){return M(n.username,g)||(n.username=g),g}),a(),o(20,"input",14),c(21,"translate"),P("ngModelChange",function(g){return M(n.password,g)||(n.password=g),g}),a(),o(22,"clr-alert",15)(23,"clr-alert-item")(24,"span",16),l(25),a()()(),o(26,"clr-checkbox-wrapper")(27,"input",17),P("ngModelChange",function(g){return M(n.rememberMe,g)||(n.rememberMe=g),g}),a(),o(28,"label"),l(29),c(30,"translate"),a()(),o(31,"div")(32,"button",18),j("click",function(){return n.logIn()}),l(33),c(34,"translate"),a()()()()(),C(35,fe,1,0,"img",19),a()()),i&2&&(p("dir",m(1,20,n.direction$)),r(6),h(" ",m(7,22,"common.login-image-title")," "),r(3),p("ngIf",n.imageCreator),r(),p("ngIf",n.imageLocation),r(),p("ngIf",n.imageUrl),r(3),h(" ",R(15,24,"common.login-title",T(35,de,n.hideVendureBranding?n.brand:"Vendure"))," "),r(4),_("ngModel",n.username),p("placeholder",m(19,27,"common.username")),r(2),_("ngModel",n.password),p("placeholder",m(21,29,"common.password")),r(2),E("visible",n.errorMessage),p("clrAlertType","danger")("clrAlertClosable",!1),r(3),h(" ",n.errorMessage," "),r(2),_("ngModel",n.rememberMe),r(2),w(m(30,31,"common.remember-me")),r(3),p("disabled",!n.username||!n.password),r(),h(" ",m(34,33,"common.login")," "),r(2),p("ngIf",!n.hideVendureBranding))},dependencies:[ee,ne,te,X,$,Y,B,K,G,F,H,Z,q,J,Q,re,z,W],styles:[`.login-wrapper[_ngcontent-%COMP%]{background:var(--color-weight-100);background-image:none;height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%]{background:var(--login-wrapper-inner-bg);width:1120px;height:590px;display:flex;justify-content:flex-start;align-items:stretch;position:relative;border-radius:var(--border-radius);border:1px solid var(--color-weight-150);overflow:hidden}@media (max-width: 992px){.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%]{flex-direction:column;height:auto;width:100%}}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%]{height:100%;flex-grow:1;position:relative}@media (max-width: 992px){.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%]{height:300px}}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;height:100%;object-fit:cover;object-position:center;position:relative;z-index:1}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%]{width:100%;height:100%;position:absolute;left:0;bottom:0;z-index:10;background:#020024;background:linear-gradient(180deg,#02002400,#000000bf);display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;padding:30px}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-title[_ngcontent-%COMP%]{font-size:1.6rem;font-weight:700;color:#fff;margin-bottom:20px}@media (max-width: 992px){.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-title[_ngcontent-%COMP%]{font-size:1.2rem}}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-copyright[_ngcontent-%COMP%]{opacity:.8}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-copyright[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:.6rem;color:#fff;margin:0!important}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%] .login-wrapper-image-copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff;text-decoration:underline}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%]{height:100%;width:400px;padding:40px;display:flex;flex-direction:column;align-items:stretch;justify-content:center;box-shadow:0 20px 25px #0000001a;overflow:hidden;flex-shrink:0}@media (max-width: 992px){.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%]{height:auto;width:100%;padding:20px}}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%] .login-title[_ngcontent-%COMP%]{font-weight:700;font-size:1.2rem;margin-bottom:20px;color:var(--color-weight-600)}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%] .login-group[_ngcontent-%COMP%] input.username[_ngcontent-%COMP%], .login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%] .login-group[_ngcontent-%COMP%] input.password[_ngcontent-%COMP%]{display:block;width:100%;margin-bottom:15px;padding:12px 16px!important;background:#fff;font-size:14px;line-height:22px;color:#52667a;outline:none;-webkit-appearance:none}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-form[_ngcontent-%COMP%] .login-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{width:100%!important;margin-top:20px!important}.login-wrapper[_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-logo[_ngcontent-%COMP%]{width:60px;height:auto;position:absolute;right:20px;top:20px}.login-button[_ngcontent-%COMP%]{width:100%;margin-top:var(--space-unit);justify-content:center}.version[_ngcontent-%COMP%]{flex:1;flex-grow:1;display:flex;align-items:flex-end;justify-content:center;color:var(--color-grey-300)}.version[_ngcontent-%COMP%] span[_ngcontent-%COMP%] + span[_ngcontent-%COMP%]{margin-inline-start:5px}.login-error[_ngcontent-%COMP%]{max-height:0;overflow:hidden;display:block}.login-error.visible[_ngcontent-%COMP%]{max-height:46px;transition:max-height .2s;animation:_ngcontent-%COMP%_shake .82s cubic-bezier(.36,.07,.19,.97) both;animation-delay:.2s;transform:translateZ(0);backface-visibility:hidden;perspective:1000px}@keyframes _ngcontent-%COMP%_shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}.login-wrapper[dir=rtl][_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-logo[_ngcontent-%COMP%]{right:auto;left:20px}.login-wrapper[dir=rtl][_ngcontent-%COMP%] .login-wrapper-inner[_ngcontent-%COMP%] .login-wrapper-image[_ngcontent-%COMP%] .login-wrapper-image-content[_ngcontent-%COMP%]{left:auto;right:0}
2
2
  /*# sourceMappingURL=login.component-WIN2MJ3Z.css.map */`]})}}return t})();var le=(()=>{class t{constructor(e,i){this.router=e,this.authService=i}canActivate(e){return this.authService.checkAuthenticatedStatus().pipe(S(i=>(i&&this.router.navigate(["/"]),!i)))}static{this.\u0275fac=function(i){return new(i||t)(y(O),y(b))}}static{this.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ce=[{path:"",component:ge,pathMatch:"full",canActivate:[le]}];var Be=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=U({imports:[ae,V.forChild(ce)]})}}return t})();export{ge as LoginComponent,le as LoginGuard,Be as LoginModule,ce as loginRoutes};
3
- //# sourceMappingURL=chunk-3APGNBCN.js.map
3
+ //# sourceMappingURL=chunk-ENLNZ624.js.map
@@ -1,4 +1,4 @@
1
- import{a as Di}from"./chunk-7JPLS52G.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-HPYMS4R2.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%}
1
+ import{a as Di}from"./chunk-QRAGMIKN.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-N24AOM3G.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-7JPLS52G.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-NLFW7OUJ.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-5WYZPGNT.js.map
395
+ //# sourceMappingURL=chunk-HQV4OZS5.js.map