@vendure/admin-ui-plugin 3.5.3-master-202512300243 → 3.5.3-master-202601050252
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/admin-ui/browser/{chunk-3L3RSJRH.js → chunk-2PATBXUB.js} +2 -2
- package/lib/admin-ui/browser/{chunk-VMWNI22C.js → chunk-76BIVGNF.js} +2 -2
- package/lib/admin-ui/browser/{chunk-JLPZD733.js → chunk-FGYOZRAU.js} +2 -2
- package/lib/admin-ui/browser/{chunk-6IJRVO43.js → chunk-HALOMDXR.js} +2 -2
- package/lib/admin-ui/browser/{chunk-NMJCRDXV.js → chunk-HXII46JU.js} +2 -2
- package/lib/admin-ui/browser/{chunk-WYCAFO6O.js → chunk-MJPETYNC.js} +2 -2
- package/lib/admin-ui/browser/{chunk-BK4RJWX4.js → chunk-NIYR32ZH.js} +2 -2
- package/lib/admin-ui/browser/{chunk-ZLJJWZSL.js → chunk-QBEIWJLR.js} +2 -2
- package/lib/admin-ui/browser/{chunk-EJZ7A52F.js → chunk-TLYU7OIG.js} +2 -2
- package/lib/admin-ui/browser/{chunk-ZKCUFE4K.js → chunk-WTLUBTCI.js} +2 -2
- package/lib/admin-ui/browser/{chunk-ZKCUFE4K.js.map → chunk-WTLUBTCI.js.map} +1 -1
- package/lib/admin-ui/browser/index.html +1 -1
- package/lib/admin-ui/browser/main-SIJE5LID.js +2 -0
- package/package.json +4 -4
- package/lib/admin-ui/browser/main-MMFL3H2N.js +0 -2
- /package/lib/admin-ui/browser/{chunk-3L3RSJRH.js.map → chunk-2PATBXUB.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-VMWNI22C.js.map → chunk-76BIVGNF.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-JLPZD733.js.map → chunk-FGYOZRAU.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-6IJRVO43.js.map → chunk-HALOMDXR.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-NMJCRDXV.js.map → chunk-HXII46JU.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-WYCAFO6O.js.map → chunk-MJPETYNC.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-BK4RJWX4.js.map → chunk-NIYR32ZH.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-ZLJJWZSL.js.map → chunk-QBEIWJLR.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-EJZ7A52F.js.map → chunk-TLYU7OIG.js.map} +0 -0
- /package/lib/admin-ui/browser/{main-MMFL3H2N.js.map → main-SIJE5LID.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$a as ri,$c as ln,$f as Le,Aa as ii,Ab as Ue,Ae as rt,Af as at,Ag as Gi,B as Re,Ba as K,Bd as fi,Bf as st,Bg as ct,Ca as d,Ce as hi,Cf as mt,D as Wt,Da as S,Dd as Ze,De as vi,Ea as f,Ed as Be,Ef as pt,Eg as ki,F as Qt,Fe as yi,Ff as ke,Ga as Ye,Ge as le,H as Te,Ha as ze,He as we,Hf as Di,I as U,Ia as Ke,Id as ae,Ie as ot,Ja as Je,Jd as Ae,Jf as Si,Jg as ye,K as yt,L as Yt,La as ee,Ld as Pe,Le as de,Lg as Ni,Ma as P,Me as xi,Mf as Q,Nb as He,Nf as ue,Ob as ai,Of as _e,P as zt,Pb as si,Pf as fe,Pg as ut,Q as xt,Qa as a,Qb as mi,Qc as pi,Qf as ge,Qg as St,Ra as l,Rc as li,Rf as Ii,S as Kt,Sa as B,T as h,Td as Dt,U as v,Ua as J,Ud as et,Ug as _t,Va as Ee,Vd as gi,Vf as Ti,Vg as Mi,W as $,Wf as Ne,Xf as lt,Ya as te,Za as G,Zf as Ce,Zg as ft,_ as r,_a as ni,_f as Me,a as k,aa as x,ab as oi,ae as O,b as be,ba as Jt,bh as Oe,c as Ot,ca as F,cd as di,ce as Ci,da as Xt,db as N,dd as L,e as pn,eh as gt,fd as ci,fg as he,g as $e,ga as Z,gd as ui,gg as Ei,h as z,ha as _,hd as Xe,hg as Fi,i as De,id as ne,if as ce,ig as Bi,j as Vt,ja as o,jd as _i,k as $t,la as Zt,ld as A,ma as s,mg as Ai,n as E,na as p,nb as ie,ng as ve,o as Ie,oa as g,of as bi,p as Rt,pa as I,qa as T,r as Ut,sa as D,ta as y,tb as M,te as se,u as We,ua as c,ud as re,ue as me,ug as dt,vd as X,ve as pe,vg as je,w as Ht,wb as bt,wd as q,we as W,x as jt,xd as oe,xe as tt,y as Qe,ya as ei,ye as it,yg as Pi,z as qt,za as ti,zb as Fe,ze as nt,zf as Ge,zg as wi}from"./chunk-
|
|
1
|
+
import{$a as ri,$c as ln,$f as Le,Aa as ii,Ab as Ue,Ae as rt,Af as at,Ag as Gi,B as Re,Ba as K,Bd as fi,Bf as st,Bg as ct,Ca as d,Ce as hi,Cf as mt,D as Wt,Da as S,Dd as Ze,De as vi,Ea as f,Ed as Be,Ef as pt,Eg as ki,F as Qt,Fe as yi,Ff as ke,Ga as Ye,Ge as le,H as Te,Ha as ze,He as we,Hf as Di,I as U,Ia as Ke,Id as ae,Ie as ot,Ja as Je,Jd as Ae,Jf as Si,Jg as ye,K as yt,L as Yt,La as ee,Ld as Pe,Le as de,Lg as Ni,Ma as P,Me as xi,Mf as Q,Nb as He,Nf as ue,Ob as ai,Of as _e,P as zt,Pb as si,Pf as fe,Pg as ut,Q as xt,Qa as a,Qb as mi,Qc as pi,Qf as ge,Qg as St,Ra as l,Rc as li,Rf as Ii,S as Kt,Sa as B,T as h,Td as Dt,U as v,Ua as J,Ud as et,Ug as _t,Va as Ee,Vd as gi,Vf as Ti,Vg as Mi,W as $,Wf as Ne,Xf as lt,Ya as te,Za as G,Zf as Ce,Zg as ft,_ as r,_a as ni,_f as Me,a as k,aa as x,ab as oi,ae as O,b as be,ba as Jt,bh as Oe,c as Ot,ca as F,cd as di,ce as Ci,da as Xt,db as N,dd as L,e as pn,eh as gt,fd as ci,fg as he,g as $e,ga as Z,gd as ui,gg as Ei,h as z,ha as _,hd as Xe,hg as Fi,i as De,id as ne,if as ce,ig as Bi,j as Vt,ja as o,jd as _i,k as $t,la as Zt,ld as A,ma as s,mg as Ai,n as E,na as p,nb as ie,ng as ve,o as Ie,oa as g,of as bi,p as Rt,pa as I,qa as T,r as Ut,sa as D,ta as y,tb as M,te as se,u as We,ua as c,ud as re,ue as me,ug as dt,vd as X,ve as pe,vg as je,w as Ht,wb as bt,wd as q,we as W,x as jt,xd as oe,xe as tt,y as Qe,ya as ei,ye as it,yg as Pi,z as qt,za as ti,zb as Fe,ze as nt,zf as Ge,zg as wi}from"./chunk-WTLUBTCI.js";function dn(t,m){t&1&&(I(0),g(1,"clr-icon",1),d(2),a(3,"translate"),T()),t&2&&(r(2),f(" ",l(3,1,"customer.verified")," "))}function cn(t,m){t&1&&(I(0),g(1,"clr-icon",2),d(2),a(3,"translate"),T()),t&2&&(r(2),f(" ",l(3,1,"customer.registered")," "))}function un(t,m){if(t&1&&(s(0,"vdr-chip"),_(1,dn,4,3,"ng-container",0)(2,cn,4,3,"ng-container",0),p()),t&2){let e=c();r(),o("ngIf",e.customer.user==null?null:e.customer.user.verified),r(),o("ngIf",!(e.customer.user!=null&&e.customer.user.verified))}}function _n(t,m){t&1&&(s(0,"vdr-chip"),d(1),a(2,"translate"),p()),t&2&&(r(),S(l(2,1,"customer.guest")))}var Ve=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-customer-status-label"]],inputs:{customer:"customer"},standalone:!1,decls:2,vars:2,consts:[[4,"ngIf"],["shape","check-circle",1,"verified-user-icon"],["shape","check-circle",1,"registered-user-icon"]],template:function(i,n){i&1&&_(0,un,3,2,"vdr-chip",0)(1,_n,3,3,"vdr-chip",0),i&2&&(o("ngIf",n.customer.user==null?null:n.customer.user.id),r(),o("ngIf",!(n.customer.user!=null&&n.customer.user.id)))},dependencies:[O,G,ce,A],styles:[`.registered-user-icon[_ngcontent-%COMP%]{color:var(--color-grey-300)}.verified-user-icon[_ngcontent-%COMP%]{color:var(--color-success-500)}
|
|
2
2
|
/*# sourceMappingURL=customer-status-label.component-GVVEEFRV.css.map */`],changeDetection:0})}}return t})();var fn=t=>["/customer/customers",t];function gn(t,m){if(t&1&&d(0),t&2){let e=m.item;f(" ",e.id," ")}}function Cn(t,m){if(t&1&&(d(0),a(1,"localeDate")),t&2){let e=m.item;f(" ",B(1,1,e.createdAt,"short")," ")}}function hn(t,m){if(t&1&&(d(0),a(1,"localeDate")),t&2){let e=m.item;f(" ",B(1,1,e.createdAt,"short")," ")}}function vn(t,m){if(t&1&&(s(0,"a",9)(1,"span"),d(2),p(),g(3,"clr-icon",10),p()),t&2){let e=m.item;o("routerLink",P(4,fn,e.id)),r(2),Ye(" ",e.title," ",e.firstName," ",e.lastName," ")}}function yn(t,m){if(t&1&&g(0,"vdr-customer-status-label",11),t&2){let e=m.item;o("customer",e)}}function xn(t,m){if(t&1&&d(0),t&2){let e=m.item;f(" ",e.emailAddress," ")}}var Ct=(()=>{class t{constructor(e,i){this.router=e,this.dataService=i,this.selectedMemberIds=[],this.selectionChange=new $,this.fetchParamsChange=new $,this.filterTermControl=new fi(""),this.selectionManager=new bi({multiSelect:!0,itemsAreEqual:(n,u)=>n.id===u.id,additiveMode:!0}),this.refresh$=new z(!0),this.destroy$=new $e}ngOnInit(){this.membersCurrentPage$=this.route.paramMap.pipe(E(i=>i.get("membersPage")),E(i=>i?+i:1),Te(1),Re()),this.membersItemsPerPage$=this.route.paramMap.pipe(E(i=>i.get("membersPerPage")),E(i=>i?+i:10),Te(10),Re());let e=this.filterTermControl.valueChanges.pipe(jt(250),Yt(()=>this.setContentsPageNumber(1)),Te(""));Ie(this.membersCurrentPage$,this.membersItemsPerPage$,e,this.refresh$).pipe(yt(this.destroy$)).subscribe(([i,n,u])=>{let C=n,b=(i-1)*n;this.fetchParamsChange.emit({filterTerm:u??"",skip:b,take:C})}),this.selectionManager.setCurrentItems(this.members?.filter(i=>this.selectedMemberIds.includes(i.id))??[]),this.selectionManager.selectionChanges$.pipe(yt(this.destroy$)).subscribe(i=>{this.selectionChange.emit(i.map(n=>n.id))})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}setContentsPageNumber(e){this.setParam("membersPage",e)}setContentsItemsPerPage(e){this.setParam("membersPerPage",e)}refresh(){this.refresh$.next(!0)}setParam(e,i){this.router.navigate(["./",be(k({},this.route.snapshot.params),{[e]:i})],{relativeTo:this.route,queryParamsHandling:"merge"})}static{this.\u0275fac=function(i){return new(i||t)(x(Xe),x(L))}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-customer-group-member-list"]],inputs:{locationId:"locationId",members:"members",totalItems:"totalItems",route:"route",selectedMemberIds:"selectedMemberIds",activeGroup:"activeGroup"},outputs:{selectionChange:"selectionChange",fetchParamsChange:"fetchParamsChange"},standalone:!1,decls:24,vars:39,consts:[[3,"pageChange","itemsPerPageChange","id","items","itemsPerPage","totalItems","currentPage"],[3,"locationId","hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault"],["id","updated-at",3,"heading","hiddenByDefault"],["id","name",3,"heading","optional"],["id","status",3,"heading","hiddenByDefault"],["id","email-address",3,"heading"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],[3,"customer"]],template:function(i,n){i&1&&(s(0,"vdr-data-table-2",0),a(1,"async"),a(2,"async"),y("pageChange",function(C){return n.setContentsPageNumber(C)})("itemsPerPageChange",function(C){return n.setContentsItemsPerPage(C)}),g(3,"vdr-bulk-action-menu",1)(4,"vdr-dt2-search",2),a(5,"translate"),s(6,"vdr-dt2-column",3),a(7,"translate"),_(8,gn,1,1,"ng-template"),p(),s(9,"vdr-dt2-column",4),a(10,"translate"),_(11,Cn,2,4,"ng-template"),p(),s(12,"vdr-dt2-column",5),a(13,"translate"),_(14,hn,2,4,"ng-template"),p(),s(15,"vdr-dt2-column",6),a(16,"translate"),_(17,vn,4,6,"ng-template"),p(),s(18,"vdr-dt2-column",7),a(19,"translate"),_(20,yn,1,1,"ng-template"),p(),s(21,"vdr-dt2-column",8),a(22,"translate"),_(23,xn,1,1,"ng-template"),p()()),i&2&&(o("id",n.locationId)("items",n.members)("itemsPerPage",l(1,21,n.membersItemsPerPage$))("totalItems",n.totalItems)("currentPage",l(2,23,n.membersCurrentPage$)),r(3),o("locationId",n.locationId)("hostComponent",n)("selectionManager",n.selectionManager),r(),o("searchTermControl",n.filterTermControl)("searchTermPlaceholder",l(5,25,"customer.search-customers-by-email")),r(2),o("heading",l(7,27,"common.id"))("hiddenByDefault",!0),r(3),o("heading",l(10,29,"common.created-at"))("hiddenByDefault",!0),r(3),o("heading",l(13,31,"common.updated-at"))("hiddenByDefault",!0),r(3),o("heading",l(16,33,"customer.name"))("optional",!1),r(3),o("heading",l(19,35,"common.status"))("hiddenByDefault",!0),r(3),o("heading",l(22,37,"customer.email-address")))},dependencies:[O,ne,Ne,he,Ce,Le,Ve,N,A,de],encapsulation:2,changeDetection:0})}}return t})();var bn=t=>({groupName:t}),Dn=t=>({count:t});function Sn(t,m){if(t&1&&(d(0),a(1,"translate")),t&2){let e=c();f(" ",B(1,1,"customer.add-customers-to-group-with-name",P(4,bn,e.group.name)),`
|
|
3
3
|
`)}}function In(t,m){if(t&1){let e=D();s(0,"button",3),y("click",function(){h(e);let n=c();return v(n.cancel())}),d(1),a(2,"translate"),p(),s(3,"button",4),y("click",function(){h(e);let n=c();return v(n.add())}),d(4),a(5,"translate"),p()}if(t&2){let e=c();r(),S(l(2,3,"common.cancel")),r(2),o("disabled",!e.selectedCustomerIds.length),r(),f(" ",B(5,5,"customer.add-customers-to-group-with-count",P(8,Dn,e.selectedCustomerIds.length))," ")}}var $i=(()=>{class t{constructor(e){this.dataService=e,this.selectedCustomerIds=[],this.fetchGroupMembers$=new z({skip:0,take:10,filterTerm:""})}ngOnInit(){let e=this.fetchGroupMembers$.pipe(U(({skip:i,take:n,filterTerm:u})=>this.dataService.customer.getCustomerList(n,i,u).mapStream(C=>C.customers)));this.customers$=e.pipe(E(i=>i.items)),this.customersTotal$=e.pipe(E(i=>i.totalItems))}cancel(){this.resolveWith()}add(){this.resolveWith(this.selectedCustomerIds)}static{this.\u0275fac=function(i){return new(i||t)(x(L))}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-add-customer-to-group-dialog"]],standalone:!1,decls:5,vars:8,consts:[["vdrDialogTitle",""],["locationId","customer-group-members-picker-list",3,"fetchParamsChange","selectionChange","members","totalItems","route","selectedMemberIds"],["vdrDialogButtons",""],["type","button",1,"btn",3,"click"],["type","submit",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(_(0,Sn,2,6,"ng-template",0),s(1,"vdr-customer-group-member-list",1),a(2,"async"),a(3,"async"),y("fetchParamsChange",function(C){return n.fetchGroupMembers$.next(C)})("selectionChange",function(C){return n.selectedCustomerIds=C}),p(),_(4,In,6,10,"ng-template",2)),i&2&&(r(),o("members",l(2,4,n.customers$))("totalItems",l(3,6,n.customersTotal$))("route",n.route)("selectedMemberIds",n.selectedCustomerIds))},dependencies:[me,pe,Ct,N,A],encapsulation:2,changeDetection:0})}}return t})();function Tn(t,m){if(t&1&&(s(0,"span"),d(1),p()),t&2){let e=m.ngIf;r(),f("",e,",")}}function En(t,m){if(t&1&&(s(0,"span"),d(1),p()),t&2){let e=m.ngIf;r(),f(" ",e,"")}}function Fn(t,m){if(t&1&&_(0,Tn,2,1,"span",3)(1,En,2,1,"span",3),t&2){let e,i,n=c();o("ngIf",(e=n.addressForm.get("streetLine1"))==null?null:e.value),r(),o("ngIf",(i=n.addressForm.get("countryCode"))==null?null:i.value)}}function Bn(t,m){if(t&1){let e=D();s(0,"button",4),y("click",function(){h(e);let n=c();return v(n.cancel())}),d(1),a(2,"translate"),p(),s(3,"button",5),y("click",function(){h(e);let n=c();return v(n.save())}),d(4),a(5,"translate"),p()}if(t&2){let e=c();r(),S(l(2,3,"common.cancel")),r(2),o("disabled",!e.addressForm.valid||!e.addressForm.touched),r(),f(" ",l(5,5,"common.update")," ")}}var Ri=(()=>{class t{constructor(e){this.changeDetector=e,this.availableCountries=[]}ngOnInit(){this.addressForm.valueChanges.subscribe(()=>this.changeDetector.markForCheck())}cancel(){this.resolveWith()}save(){this.resolveWith(this.addressForm)}static{this.\u0275fac=function(i){return new(i||t)(x(Ee))}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-address-detail-dialog"]],standalone:!1,decls:3,vars:3,consts:[["vdrDialogTitle",""],[3,"formGroup","availableCountries","customFields"],["vdrDialogButtons",""],[4,"ngIf"],["type","button",1,"btn",3,"click"],["type","submit",1,"btn","btn-primary",3,"click","disabled"]],template:function(i,n){i&1&&(_(0,Fn,2,2,"ng-template",0),g(1,"vdr-address-form",1),_(2,Bn,6,7,"ng-template",2)),i&2&&(r(),o("formGroup",n.addressForm)("availableCountries",n.availableCountries)("customFields",n.customFields))},dependencies:[G,oe,ae,me,pe,Ii,A],styles:[`clr-input-container[_ngcontent-%COMP%]{margin-bottom:12px}
|
|
4
4
|
/*# sourceMappingURL=address-detail-dialog.component-EMCAD2FV.css.map */`],changeDetection:0})}}return t})();function kn(t,m){if(t&1&&(s(0,"span",14),d(1),p()),t&2){let e=c().ngIf;r(),f("",e.streetLine1,",")}}function Nn(t,m){t&1&&(s(0,"vdr-chip",15),g(1,"clr-icon",16),d(2),a(3,"translate"),p()),t&2&&(r(2),f(" ",l(3,1,"customer.default-shipping-address")," "))}function Mn(t,m){t&1&&(s(0,"vdr-chip",15),g(1,"clr-icon",17),d(2),a(3,"translate"),p()),t&2&&(r(2),f(" ",l(3,1,"customer.default-billing-address")," "))}function Ln(t,m){if(t&1){let e=D();I(0),s(1,"button",18),y("click",function(){h(e);let n=c(2);return v(n.editAddress())}),d(2),a(3,"translate"),p(),s(4,"vdr-dropdown")(5,"button",19),d(6),a(7,"translate"),g(8,"clr-icon",20),p(),s(9,"vdr-dropdown-menu")(10,"button",21),y("click",function(){h(e);let n=c(2);return v(n.setAsDefaultShippingAddress())}),d(11),a(12,"translate"),p(),s(13,"button",21),y("click",function(){h(e);let n=c(2);return v(n.setAsDefaultBillingAddress())}),d(14),a(15,"translate"),p(),g(16,"div",22),s(17,"button",23),y("click",function(){h(e);let n=c(2);return v(n.delete())}),g(18,"clr-icon",24),d(19),a(20,"translate"),p()()(),T()}if(t&2){let e=c(2);r(2),f(" ",l(3,7,"common.edit")," "),r(4),f(" ",l(7,9,"common.more")," "),r(4),o("disabled",e.isDefaultShipping),r(),f(" ",l(12,11,"customer.set-as-default-shipping-address")," "),r(2),o("disabled",e.isDefaultBilling),r(),f(" ",l(15,13,"customer.set-as-default-billing-address")," "),r(5),f(" ",l(20,15,"common.delete")," ")}}function On(t,m){if(t&1&&(s(0,"div",1)(1,"div",2)(2,"div",3),_(3,kn,2,1,"span",4),d(4),p(),s(5,"div",5),_(6,Nn,4,3,"vdr-chip",6)(7,Mn,4,3,"vdr-chip",6),p()(),s(8,"div",7)(9,"div",8),g(10,"vdr-formatted-address",9),p()(),s(11,"div",10)(12,"div",11),g(13,"vdr-entity-info",12),_(14,Ln,21,17,"ng-container",13),p()()()),t&2){let e=m.ngIf,i=c();r(3),o("ngIf",e.streetLine1),r(),f(" ",e.countryCode," "),r(2),o("ngIf",i.isDefaultShipping),r(),o("ngIf",i.isDefaultBilling),r(3),o("address",e),r(3),o("entity",e),r(),o("ngIf",i.editable)}}var Ui=(()=>{class t{constructor(e,i){this.modalService=e,this.changeDetector=i,this.availableCountries=[],this.editable=!0,this.setAsDefaultShipping=new $,this.setAsDefaultBilling=new $,this.deleteAddress=new $,this.dataDependenciesPopulated=new z(!1)}ngOnInit(){this.addressForm.get("streetLine1").value||this.dataDependenciesPopulated.pipe(We(i=>i),Qe(1)).subscribe(()=>{this.editAddress()})}ngOnChanges(e){this.customFields!=null&&this.availableCountries!=null&&this.dataDependenciesPopulated.next(!0)}getCountryName(e){if(!this.availableCountries)return"";let i=this.availableCountries.find(n=>n.code===e);return i?i.name:""}setAsDefaultBillingAddress(){this.setAsDefaultBilling.emit(this.addressForm.value.id),this.addressForm.markAsDirty()}setAsDefaultShippingAddress(){this.setAsDefaultShipping.emit(this.addressForm.value.id),this.addressForm.markAsDirty()}delete(){this.deleteAddress.emit(this.addressForm.value.id),this.addressForm.markAsDirty()}editAddress(){this.modalService.fromComponent(Ri,{locals:{addressForm:this.addressForm,customFields:this.customFields,availableCountries:this.availableCountries},size:"md",closable:!0}).subscribe(()=>{this.changeDetector.markForCheck()})}static{this.\u0275fac=function(i){return new(i||t)(x(W),x(Ee))}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-address-card"]],inputs:{addressForm:"addressForm",customFields:"customFields",availableCountries:"availableCountries",isDefaultBilling:"isDefaultBilling",isDefaultShipping:"isDefaultShipping",editable:"editable"},outputs:{setAsDefaultShipping:"setAsDefaultShipping",setAsDefaultBilling:"setAsDefaultBilling",deleteAddress:"deleteAddress"},standalone:!1,features:[Kt],decls:1,vars:1,consts:[["class","card",4,"ngIf"],[1,"card"],[1,"card-header"],[1,"address-title"],["class","street-line",4,"ngIf"],[1,"default-controls"],["class","is-default p8",4,"ngIf"],[1,"card-block"],[1,"card-text"],[3,"address"],[1,"card-footer"],[1,"address-actions"],[3,"entity"],[4,"ngIf"],[1,"street-line"],[1,"is-default","p8"],["shape","truck"],["shape","credit-card"],[1,"button-small",3,"click"],["type","button","vdrDropdownTrigger","",1,"button-small"],["shape","ellipsis-vertical","size","12"],["vdrDropdownItem","",3,"click","disabled"],[1,"dropdown-divider"],["type","button","vdrDropdownItem","",3,"click"],["shape","trash",1,"is-danger"]],template:function(i,n){i&1&&_(0,On,15,7,"div",0),i&2&&o("ngIf",n.addressForm.value)},dependencies:[O,G,ce,tt,it,nt,rt,Fi,Di,A],styles:[`[_nghost-%COMP%]{display:block;max-width:360px}clr-input-container[_ngcontent-%COMP%]{margin-bottom:12px}.defaul-controls[_ngcontent-%COMP%]{display:flex}.is-default[_ngcontent-%COMP%]{margin:0;color:var(--color-success-500)}.address-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--space-unit)}.address-actions[_ngcontent-%COMP%] vdr-entity-info[_ngcontent-%COMP%]{margin-top:1px}
|
|
@@ -79,4 +79,4 @@ import{$a as ri,$c as ln,$f as Le,Aa as ii,Ab as Ue,Ae as rt,Af as at,Ag as Gi,B
|
|
|
79
79
|
}
|
|
80
80
|
`,sn=(()=>{class t extends _t{constructor(){super(),this.dataTableListId="customer-list",this.customFields=this.getCustomFieldConfig("Customer"),this.filters=this.createFilterCollection().addIdFilter().addDateFilters().addFilter({name:"firstName",type:{kind:"text"},label:"customer.first-name",filterField:"firstName"}).addFilter({name:"lastName",type:{kind:"text"},label:"customer.last-name",filterField:"lastName"}).addFilter({name:"emailAddress",type:{kind:"text"},label:"customer.email-address",filterField:"emailAddress"}).addCustomFieldFilters(this.customFields).connectToRoute(this.route),this.sorts=this.createSortCollection().defaultSort("createdAt","DESC").addSort({name:"createdAt"}).addSort({name:"updatedAt"}).addSort({name:"lastName"}).addSort({name:"emailAddress"}).addCustomFieldSorts(this.customFields).connectToRoute(this.route),this.configure({document:mi,getItems:e=>e.customers,setVariables:(e,i)=>({options:{skip:e,take:i,filter:k(k({},this.searchTermControl.value?{emailAddress:{contains:this.searchTermControl.value},lastName:{contains:this.searchTermControl.value},postalCode:{contains:this.searchTermControl.value}}:{}),this.filters.createFilterInput()),filterOperator:this.searchTermControl.value?bt.OR:bt.AND,sort:this.sorts.createSortInput()}}),refreshListOnChanges:[this.sorts.valueChanges,this.filters.valueChanges]})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=F({type:t,selectors:[["vdr-customer-list"]],standalone:!1,features:[Z],decls:34,vars:48,consts:[["locationId","customer-list"],["class","btn btn-primary",3,"routerLink",4,"vdrIfPermissions"],[1,"mt-2",3,"pageChange","itemsPerPageChange","visibleColumnsChange","id","items","itemsPerPage","totalItems","currentPage","filters"],["locationId","customer-list",3,"hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault","sort"],["id","updated-at",3,"heading","hiddenByDefault","sort"],["id","name",3,"heading","optional","sort"],["id","status",3,"heading"],["id","email-address",3,"heading","sort"],[3,"customField","sorts",4,"ngFor","ngForOf"],[1,"btn","btn-primary",3,"routerLink"],["shape","plus"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],[3,"customer"],[3,"customField","sorts"]],template:function(i,n){i&1&&(s(0,"vdr-page-block")(1,"vdr-action-bar"),g(2,"vdr-ab-left"),s(3,"vdr-ab-right"),g(4,"vdr-action-bar-items",0),_(5,Eo,4,5,"a",1),g(6,"vdr-action-bar-dropdown-menu",0),p()()(),s(7,"vdr-data-table-2",2),a(8,"async"),a(9,"async"),a(10,"async"),a(11,"async"),y("pageChange",function(C){return n.setPageNumber(C)})("itemsPerPageChange",function(C){return n.setItemsPerPage(C)})("visibleColumnsChange",function(C){return n.setVisibleColumns(C)}),g(12,"vdr-bulk-action-menu",3)(13,"vdr-dt2-search",4),a(14,"translate"),s(15,"vdr-dt2-column",5),a(16,"translate"),_(17,Fo,1,1,"ng-template"),p(),s(18,"vdr-dt2-column",6),a(19,"translate"),_(20,Bo,2,4,"ng-template"),p(),s(21,"vdr-dt2-column",7),a(22,"translate"),_(23,Ao,2,4,"ng-template"),p(),s(24,"vdr-dt2-column",8),a(25,"translate"),_(26,Po,4,6,"ng-template"),p(),s(27,"vdr-dt2-column",9),a(28,"translate"),_(29,wo,1,1,"ng-template"),p(),s(30,"vdr-dt2-column",10),a(31,"translate"),_(32,Go,1,1,"ng-template"),p(),_(33,ko,1,2,"vdr-dt2-custom-field-column",11),p()),i&2&&(r(5),o("vdrIfPermissions","CreateCustomer"),r(2),o("id",n.dataTableListId)("items",l(8,26,n.items$))("itemsPerPage",l(9,28,n.itemsPerPage$))("totalItems",l(10,30,n.totalItems$))("currentPage",l(11,32,n.currentPage$))("filters",n.filters),r(5),o("hostComponent",n)("selectionManager",n.selectionManager),r(),o("searchTermControl",n.searchTermControl)("searchTermPlaceholder",l(14,34,"customer.search-customers-by-email-last-name-postal-code")),r(2),o("heading",l(16,36,"common.id"))("hiddenByDefault",!0),r(3),o("heading",l(19,38,"common.created-at"))("hiddenByDefault",!0)("sort",n.sorts.get("createdAt")),r(3),o("heading",l(22,40,"common.updated-at"))("hiddenByDefault",!0)("sort",n.sorts.get("updatedAt")),r(3),o("heading",l(25,42,"customer.name"))("optional",!1)("sort",n.sorts.get("lastName")),r(3),o("heading",l(28,44,"common.status")),r(3),o("heading",l(31,46,"customer.email-address"))("sort",n.sorts.get("emailAddress")),r(3),o("ngForOf",n.customFields))},dependencies:[O,te,ne,ge,_e,fe,ye,Q,ue,Ne,he,Ce,Le,Me,ve,Ve,N,A,de],styles:[`.search-input[_ngcontent-%COMP%]{margin-top:6px;min-width:300px}
|
|
81
81
|
/*# sourceMappingURL=customer-list.component-ERAUGAUO.css.map */`]})}}return t})();var mn=t=>[{path:"customers",component:je,data:{locationId:"customer-list",breadcrumb:"breadcrumb.customers"},children:t.getPageTabRoutes("customer-list")},{path:"customers/:id",component:je,data:{locationId:"customer-detail",breadcrumb:{label:"breadcrumb.customers",link:["../","customers"]}},children:t.getPageTabRoutes("customer-detail")},{path:"groups",component:je,data:{locationId:"customer-group-list",breadcrumb:"breadcrumb.customer-groups"},children:t.getPageTabRoutes("customer-group-list")},{path:"groups/:id",component:je,data:{locationId:"customer-group-detail",breadcrumb:{label:"breadcrumb.customer-groups",link:["../","groups"]}},children:t.getPageTabRoutes("customer-group-detail")}];function cs(t,m){return Mi({entity:t.entity,id:m.id,breadcrumbKey:"breadcrumb.customers",getName:e=>`${e.firstName} ${e.lastName}`,route:"customers"})}var Us=(()=>{class t{static{this.hasRegisteredTabsAndBulkActions=!1}constructor(e,i){t.hasRegisteredTabsAndBulkActions||(e.registerBulkAction(an),e.registerBulkAction(tn),e.registerBulkAction(on),i.registerPageTab({priority:0,location:"customer-list",tab:"customer.customers",route:"",component:sn}),i.registerPageTab({priority:0,location:"customer-detail",tab:"customer.customer",route:"",component:St({component:Zi,query:He,entityKey:"customer",variables:{orderListOptions:{sort:{orderPlacedAt:Ue.DESC}}},getBreadcrumbs:n=>[{label:n?`${n?.firstName} ${n?.lastName}`:"customer.create-new-customer",link:[n?.id]}]})}),i.registerPageTab({priority:0,location:"customer-group-list",tab:"customer.customer-groups",route:"",component:rn}),i.registerPageTab({priority:0,location:"customer-group-detail",tab:"customer.customer-group",route:"",component:St({component:en,query:ai,entityKey:"customerGroup",getBreadcrumbs:n=>[{label:n?n.name:"customer.create-new-customer-group",link:[n?.id]}]})}),t.hasRegisteredTabsAndBulkActions=!0)}static{this.\u0275fac=function(i){return new(i||t)(xt(Ti),xt(dt))}}static{this.\u0275mod=Xt({type:t})}static{this.\u0275inj=zt({providers:[{provide:ui,useFactory:e=>mn(e),multi:!0,deps:[dt]}],imports:[Ni,_i.forChild([])]})}}return t})();export{$i as AddCustomerToGroupDialogComponent,Ui as AddressCardComponent,Ri as AddressDetailDialogComponent,Aa as CUSTOMER_DETAIL_QUERY,Na as CUSTOMER_GROUP_DETAIL_QUERY,ms as CUSTOMER_LIST_QUERY,Zi as CustomerDetailComponent,en as CustomerGroupDetailComponent,$a as CustomerGroupDetailDialogComponent,rn as CustomerGroupListComponent,Ct as CustomerGroupMemberListComponent,Yi as CustomerHistoryComponent,ji as CustomerHistoryEntryHostComponent,sn as CustomerListComponent,Us as CustomerModule,Ve as CustomerStatusLabelComponent,Xa as GET_CUSTOMER_GROUP_LIST,Hi as SelectCustomerGroupDialogComponent,mn as createRoutes,cs as customerBreadcrumb,tn as deleteCustomerGroupsBulkAction,an as deleteCustomersBulkAction,on as removeCustomerGroupMembersBulkAction};
|
|
82
|
-
//# sourceMappingURL=chunk-
|
|
82
|
+
//# sourceMappingURL=chunk-2PATBXUB.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as oi}from"./chunk-NMJCRDXV.js";import{$ as Io,$c as sn,$d as Pi,$e as Bn,$f as nt,$g as ni,A as vo,Aa as Je,Ab as Mo,Ae as It,Af as Dt,Ag as Wa,B as Fe,Ba as U,Bb as No,Bd as vt,Bf as zt,C as Xi,Ca as f,Cb as Lo,Cc as Qo,Cd as At,Ce as ga,Cf as Zt,Cg as qa,Da as T,Db as an,Dd as et,Df as Fa,Ea as v,Eb as Uo,Ed as mt,Ef as gt,F as Ot,Fa as Nt,Fb as $o,Fd as Ut,Fe as Ii,Ff as qe,G as Co,Ga as Vo,Gb as Go,Ge as K,Gf as Sa,H as st,Ha as Le,Hb as jo,Hd as Pt,He as me,Hf as Ea,I as A,Ia as Ue,Ib as Wo,Id as Ce,If as Oa,J as bo,Ja as $e,Jb as qo,Jc as Rl,Jd as $t,Je as _a,Jg as Ae,K as Vt,Ka as tn,Kb as Ho,Kc as rn,Kd as bi,Ke as Ti,Kf as Jt,Kg as ki,L as ze,La as W,Lb as Yo,Lc as Ko,Ld as be,Le as it,Lf as bn,Lg as Ha,Ma as j,Mc as zo,Md as cn,Me as Tt,Mf as xe,N as yo,Na as Rt,Nc as Zo,Nd as pn,Nf as ke,O as hi,Oa as nn,Oc as Jo,Od as dn,Oe as Al,Of as Pe,Og as Ya,P as xo,Pa as ko,Pd as sa,Pf as Ie,Pg as St,Q as Mt,Qa as s,Qd as yi,Qe as fa,Qf as Te,Qg as Ri,R as Po,Ra as d,Rd as mn,Rg as Qa,S as yt,Sa as O,Sc as ln,Sd as ca,Se as ha,Sf as Oi,Sg as Ka,T as b,Ta as Ro,Td as pa,Te as va,Tf as Vi,Tg as za,U as y,Ua as Y,Ud as je,Uf as Va,Ug as ii,Va as pe,Vd as un,Ve as Ca,Vf as ka,W as ht,Wa as Lt,We as ba,Wf as Xt,Wg as Ai,X as en,Xa as Ao,Xd as da,Xe as Cn,Xf as ei,Xg as xn,Ya as $,Yd as gn,Yg as Za,Z as vi,Za as B,Zd as xi,Zf as He,Zg as Pn,_ as o,_d as ma,_e as Ht,_f as ti,_g as In,a as X,aa as P,ae as J,af as ya,ag as Ra,ah as ue,b as fe,bg as Aa,bh as _t,ca as E,cb as on,cd as Xo,ce as Ee,cg as Ba,ch as at,d as kl,da as To,db as G,dd as k,de as tt,dg as wa,e as se,ed as ea,ee as ye,eg as Ma,f as go,fa as Do,fd as xt,fe as ua,ff as xa,fg as ot,g as ft,ga as ce,gd as ta,ge as _n,gh as Tn,h as Be,ha as g,hd as dt,he as Gt,hf as Yt,i as le,ia as An,id as Se,if as Ve,j as Ui,ja as a,jb as Bo,jd as ia,jg as Re,k as he,ka as Fo,l as _o,la as w,ld as R,lf as Qt,m as Zi,ma as c,mf as Di,n as F,na as p,nb as ne,nf as Pa,ng as de,o as ee,oa as h,od as na,of as Ia,og as Na,p as Ne,pa as M,pd as oa,pf as Fi,pg as La,q as Ji,qa as N,qd as aa,qe as fn,qf as Kt,qg as Ua,r as bt,ra as kt,rb as Xe,re as hn,rf as Si,sa as D,sb as Gi,sd as ra,se as vn,sg as $a,t as fo,ta as C,td as Ge,te as Q,tf as Ei,tg as wn,u as $i,ua as u,ub as wo,ud as ie,ue as We,ug as yn,v as ho,va as So,vd as Ye,ve as Oe,vf as Ta,vg as Ft,wa as Eo,wb as mi,wd as Z,we as te,wf as Da,x as rt,xa as Oo,xd as ve,xe as jt,y as lt,ya as pt,yd as la,ye as Wt,yg as Ga,za as Ze,zb as V,zd as Ci,ze as qt,zf as ut,zg as ja}from"./chunk-ZKCUFE4K.js";var Mn=kl(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.StockMovementType=H.SortOrder=H.Permission=H.OrderType=H.MetricType=H.MetricInterval=H.LogicalOperator=H.LanguageCode=H.JobState=H.HistoryEntryType=H.GlobalFlag=H.ErrorCode=H.DeletionResult=H.CurrencyCode=H.AssetType=H.AdjustmentType=void 0;var Ja=function(e){return e.DISTRIBUTED_ORDER_PROMOTION="DISTRIBUTED_ORDER_PROMOTION",e.OTHER="OTHER",e.PROMOTION="PROMOTION",e}(Ja||(H.AdjustmentType=Ja={})),Xa=function(e){return e.BINARY="BINARY",e.IMAGE="IMAGE",e.VIDEO="VIDEO",e}(Xa||(H.AssetType=Xa={})),er=function(e){return e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYN="BYN",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUC="CUC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRU="MRU",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SRD="SRD",e.SSP="SSP",e.STN="STN",e.SVC="SVC",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VES="VES",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWL="ZWL",e}(er||(H.CurrencyCode=er={})),tr=function(e){return e.DELETED="DELETED",e.NOT_DELETED="NOT_DELETED",e}(tr||(H.DeletionResult=tr={})),ir=function(e){return e.ALREADY_REFUNDED_ERROR="ALREADY_REFUNDED_ERROR",e.CANCEL_ACTIVE_ORDER_ERROR="CANCEL_ACTIVE_ORDER_ERROR",e.CANCEL_PAYMENT_ERROR="CANCEL_PAYMENT_ERROR",e.CHANNEL_DEFAULT_LANGUAGE_ERROR="CHANNEL_DEFAULT_LANGUAGE_ERROR",e.COUPON_CODE_EXPIRED_ERROR="COUPON_CODE_EXPIRED_ERROR",e.COUPON_CODE_INVALID_ERROR="COUPON_CODE_INVALID_ERROR",e.COUPON_CODE_LIMIT_ERROR="COUPON_CODE_LIMIT_ERROR",e.CREATE_FULFILLMENT_ERROR="CREATE_FULFILLMENT_ERROR",e.DUPLICATE_ENTITY_ERROR="DUPLICATE_ENTITY_ERROR",e.EMAIL_ADDRESS_CONFLICT_ERROR="EMAIL_ADDRESS_CONFLICT_ERROR",e.EMPTY_ORDER_LINE_SELECTION_ERROR="EMPTY_ORDER_LINE_SELECTION_ERROR",e.FACET_IN_USE_ERROR="FACET_IN_USE_ERROR",e.FULFILLMENT_STATE_TRANSITION_ERROR="FULFILLMENT_STATE_TRANSITION_ERROR",e.GUEST_CHECKOUT_ERROR="GUEST_CHECKOUT_ERROR",e.INELIGIBLE_SHIPPING_METHOD_ERROR="INELIGIBLE_SHIPPING_METHOD_ERROR",e.INSUFFICIENT_STOCK_ERROR="INSUFFICIENT_STOCK_ERROR",e.INSUFFICIENT_STOCK_ON_HAND_ERROR="INSUFFICIENT_STOCK_ON_HAND_ERROR",e.INVALID_CREDENTIALS_ERROR="INVALID_CREDENTIALS_ERROR",e.INVALID_FULFILLMENT_HANDLER_ERROR="INVALID_FULFILLMENT_HANDLER_ERROR",e.ITEMS_ALREADY_FULFILLED_ERROR="ITEMS_ALREADY_FULFILLED_ERROR",e.LANGUAGE_NOT_AVAILABLE_ERROR="LANGUAGE_NOT_AVAILABLE_ERROR",e.MANUAL_PAYMENT_STATE_ERROR="MANUAL_PAYMENT_STATE_ERROR",e.MIME_TYPE_ERROR="MIME_TYPE_ERROR",e.MISSING_CONDITIONS_ERROR="MISSING_CONDITIONS_ERROR",e.MULTIPLE_ORDER_ERROR="MULTIPLE_ORDER_ERROR",e.NATIVE_AUTH_STRATEGY_ERROR="NATIVE_AUTH_STRATEGY_ERROR",e.NEGATIVE_QUANTITY_ERROR="NEGATIVE_QUANTITY_ERROR",e.NOTHING_TO_REFUND_ERROR="NOTHING_TO_REFUND_ERROR",e.NO_ACTIVE_ORDER_ERROR="NO_ACTIVE_ORDER_ERROR",e.NO_CHANGES_SPECIFIED_ERROR="NO_CHANGES_SPECIFIED_ERROR",e.ORDER_INTERCEPTOR_ERROR="ORDER_INTERCEPTOR_ERROR",e.ORDER_LIMIT_ERROR="ORDER_LIMIT_ERROR",e.ORDER_MODIFICATION_ERROR="ORDER_MODIFICATION_ERROR",e.ORDER_MODIFICATION_STATE_ERROR="ORDER_MODIFICATION_STATE_ERROR",e.ORDER_STATE_TRANSITION_ERROR="ORDER_STATE_TRANSITION_ERROR",e.PAYMENT_METHOD_MISSING_ERROR="PAYMENT_METHOD_MISSING_ERROR",e.PAYMENT_ORDER_MISMATCH_ERROR="PAYMENT_ORDER_MISMATCH_ERROR",e.PAYMENT_STATE_TRANSITION_ERROR="PAYMENT_STATE_TRANSITION_ERROR",e.PRODUCT_OPTION_IN_USE_ERROR="PRODUCT_OPTION_IN_USE_ERROR",e.QUANTITY_TOO_GREAT_ERROR="QUANTITY_TOO_GREAT_ERROR",e.REFUND_AMOUNT_ERROR="REFUND_AMOUNT_ERROR",e.REFUND_ORDER_STATE_ERROR="REFUND_ORDER_STATE_ERROR",e.REFUND_PAYMENT_ID_MISSING_ERROR="REFUND_PAYMENT_ID_MISSING_ERROR",e.REFUND_STATE_TRANSITION_ERROR="REFUND_STATE_TRANSITION_ERROR",e.SETTLE_PAYMENT_ERROR="SETTLE_PAYMENT_ERROR",e.UNKNOWN_ERROR="UNKNOWN_ERROR",e}(ir||(H.ErrorCode=ir={})),nr=function(e){return e.FALSE="FALSE",e.INHERIT="INHERIT",e.TRUE="TRUE",e}(nr||(H.GlobalFlag=nr={})),or=function(e){return e.CUSTOMER_ADDED_TO_GROUP="CUSTOMER_ADDED_TO_GROUP",e.CUSTOMER_ADDRESS_CREATED="CUSTOMER_ADDRESS_CREATED",e.CUSTOMER_ADDRESS_DELETED="CUSTOMER_ADDRESS_DELETED",e.CUSTOMER_ADDRESS_UPDATED="CUSTOMER_ADDRESS_UPDATED",e.CUSTOMER_DETAIL_UPDATED="CUSTOMER_DETAIL_UPDATED",e.CUSTOMER_EMAIL_UPDATE_REQUESTED="CUSTOMER_EMAIL_UPDATE_REQUESTED",e.CUSTOMER_EMAIL_UPDATE_VERIFIED="CUSTOMER_EMAIL_UPDATE_VERIFIED",e.CUSTOMER_NOTE="CUSTOMER_NOTE",e.CUSTOMER_PASSWORD_RESET_REQUESTED="CUSTOMER_PASSWORD_RESET_REQUESTED",e.CUSTOMER_PASSWORD_RESET_VERIFIED="CUSTOMER_PASSWORD_RESET_VERIFIED",e.CUSTOMER_PASSWORD_UPDATED="CUSTOMER_PASSWORD_UPDATED",e.CUSTOMER_REGISTERED="CUSTOMER_REGISTERED",e.CUSTOMER_REMOVED_FROM_GROUP="CUSTOMER_REMOVED_FROM_GROUP",e.CUSTOMER_VERIFIED="CUSTOMER_VERIFIED",e.ORDER_CANCELLATION="ORDER_CANCELLATION",e.ORDER_COUPON_APPLIED="ORDER_COUPON_APPLIED",e.ORDER_COUPON_REMOVED="ORDER_COUPON_REMOVED",e.ORDER_CUSTOMER_UPDATED="ORDER_CUSTOMER_UPDATED",e.ORDER_FULFILLMENT="ORDER_FULFILLMENT",e.ORDER_FULFILLMENT_TRANSITION="ORDER_FULFILLMENT_TRANSITION",e.ORDER_MODIFIED="ORDER_MODIFIED",e.ORDER_NOTE="ORDER_NOTE",e.ORDER_PAYMENT_TRANSITION="ORDER_PAYMENT_TRANSITION",e.ORDER_REFUND_TRANSITION="ORDER_REFUND_TRANSITION",e.ORDER_STATE_TRANSITION="ORDER_STATE_TRANSITION",e}(or||(H.HistoryEntryType=or={})),ar=function(e){return e.CANCELLED="CANCELLED",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.PENDING="PENDING",e.RETRYING="RETRYING",e.RUNNING="RUNNING",e}(ar||(H.JobState=ar={})),rr=function(e){return e.af="af",e.ak="ak",e.am="am",e.ar="ar",e.as="as",e.az="az",e.be="be",e.bg="bg",e.bm="bm",e.bn="bn",e.bo="bo",e.br="br",e.bs="bs",e.ca="ca",e.ce="ce",e.co="co",e.cs="cs",e.cu="cu",e.cy="cy",e.da="da",e.de="de",e.de_AT="de_AT",e.de_CH="de_CH",e.dz="dz",e.ee="ee",e.el="el",e.en="en",e.en_AU="en_AU",e.en_CA="en_CA",e.en_GB="en_GB",e.en_US="en_US",e.eo="eo",e.es="es",e.es_ES="es_ES",e.es_MX="es_MX",e.et="et",e.eu="eu",e.fa="fa",e.fa_AF="fa_AF",e.ff="ff",e.fi="fi",e.fo="fo",e.fr="fr",e.fr_CA="fr_CA",e.fr_CH="fr_CH",e.fy="fy",e.ga="ga",e.gd="gd",e.gl="gl",e.gu="gu",e.gv="gv",e.ha="ha",e.he="he",e.hi="hi",e.hr="hr",e.ht="ht",e.hu="hu",e.hy="hy",e.ia="ia",e.id="id",e.ig="ig",e.ii="ii",e.is="is",e.it="it",e.ja="ja",e.jv="jv",e.ka="ka",e.ki="ki",e.kk="kk",e.kl="kl",e.km="km",e.kn="kn",e.ko="ko",e.ks="ks",e.ku="ku",e.kw="kw",e.ky="ky",e.la="la",e.lb="lb",e.lg="lg",e.ln="ln",e.lo="lo",e.lt="lt",e.lu="lu",e.lv="lv",e.mg="mg",e.mi="mi",e.mk="mk",e.ml="ml",e.mn="mn",e.mr="mr",e.ms="ms",e.mt="mt",e.my="my",e.nb="nb",e.nd="nd",e.ne="ne",e.nl="nl",e.nl_BE="nl_BE",e.nn="nn",e.ny="ny",e.om="om",e.or="or",e.os="os",e.pa="pa",e.pl="pl",e.ps="ps",e.pt="pt",e.pt_BR="pt_BR",e.pt_PT="pt_PT",e.qu="qu",e.rm="rm",e.rn="rn",e.ro="ro",e.ro_MD="ro_MD",e.ru="ru",e.rw="rw",e.sa="sa",e.sd="sd",e.se="se",e.sg="sg",e.si="si",e.sk="sk",e.sl="sl",e.sm="sm",e.sn="sn",e.so="so",e.sq="sq",e.sr="sr",e.st="st",e.su="su",e.sv="sv",e.sw="sw",e.sw_CD="sw_CD",e.ta="ta",e.te="te",e.tg="tg",e.th="th",e.ti="ti",e.tk="tk",e.to="to",e.tr="tr",e.tt="tt",e.ug="ug",e.uk="uk",e.ur="ur",e.uz="uz",e.vi="vi",e.vo="vo",e.wo="wo",e.xh="xh",e.yi="yi",e.yo="yo",e.zh="zh",e.zh_Hans="zh_Hans",e.zh_Hant="zh_Hant",e.zu="zu",e}(rr||(H.LanguageCode=rr={})),lr=function(e){return e.AND="AND",e.OR="OR",e}(lr||(H.LogicalOperator=lr={})),sr=function(e){return e.Daily="Daily",e}(sr||(H.MetricInterval=sr={})),cr=function(e){return e.AverageOrderValue="AverageOrderValue",e.OrderCount="OrderCount",e.OrderTotal="OrderTotal",e}(cr||(H.MetricType=cr={})),pr=function(e){return e.Aggregate="Aggregate",e.Regular="Regular",e.Seller="Seller",e}(pr||(H.OrderType=pr={})),dr=function(e){return e.Authenticated="Authenticated",e.CreateAdministrator="CreateAdministrator",e.CreateAsset="CreateAsset",e.CreateCatalog="CreateCatalog",e.CreateChannel="CreateChannel",e.CreateCollection="CreateCollection",e.CreateCountry="CreateCountry",e.CreateCustomer="CreateCustomer",e.CreateCustomerGroup="CreateCustomerGroup",e.CreateFacet="CreateFacet",e.CreateOrder="CreateOrder",e.CreatePaymentMethod="CreatePaymentMethod",e.CreateProduct="CreateProduct",e.CreatePromotion="CreatePromotion",e.CreateSeller="CreateSeller",e.CreateSettings="CreateSettings",e.CreateShippingMethod="CreateShippingMethod",e.CreateStockLocation="CreateStockLocation",e.CreateSystem="CreateSystem",e.CreateTag="CreateTag",e.CreateTaxCategory="CreateTaxCategory",e.CreateTaxRate="CreateTaxRate",e.CreateZone="CreateZone",e.DeleteAdministrator="DeleteAdministrator",e.DeleteAsset="DeleteAsset",e.DeleteCatalog="DeleteCatalog",e.DeleteChannel="DeleteChannel",e.DeleteCollection="DeleteCollection",e.DeleteCountry="DeleteCountry",e.DeleteCustomer="DeleteCustomer",e.DeleteCustomerGroup="DeleteCustomerGroup",e.DeleteFacet="DeleteFacet",e.DeleteOrder="DeleteOrder",e.DeletePaymentMethod="DeletePaymentMethod",e.DeleteProduct="DeleteProduct",e.DeletePromotion="DeletePromotion",e.DeleteSeller="DeleteSeller",e.DeleteSettings="DeleteSettings",e.DeleteShippingMethod="DeleteShippingMethod",e.DeleteStockLocation="DeleteStockLocation",e.DeleteSystem="DeleteSystem",e.DeleteTag="DeleteTag",e.DeleteTaxCategory="DeleteTaxCategory",e.DeleteTaxRate="DeleteTaxRate",e.DeleteZone="DeleteZone",e.Owner="Owner",e.Public="Public",e.ReadAdministrator="ReadAdministrator",e.ReadAsset="ReadAsset",e.ReadCatalog="ReadCatalog",e.ReadChannel="ReadChannel",e.ReadCollection="ReadCollection",e.ReadCountry="ReadCountry",e.ReadCustomer="ReadCustomer",e.ReadCustomerGroup="ReadCustomerGroup",e.ReadFacet="ReadFacet",e.ReadOrder="ReadOrder",e.ReadPaymentMethod="ReadPaymentMethod",e.ReadProduct="ReadProduct",e.ReadPromotion="ReadPromotion",e.ReadSeller="ReadSeller",e.ReadSettings="ReadSettings",e.ReadShippingMethod="ReadShippingMethod",e.ReadStockLocation="ReadStockLocation",e.ReadSystem="ReadSystem",e.ReadTag="ReadTag",e.ReadTaxCategory="ReadTaxCategory",e.ReadTaxRate="ReadTaxRate",e.ReadZone="ReadZone",e.SuperAdmin="SuperAdmin",e.UpdateAdministrator="UpdateAdministrator",e.UpdateAsset="UpdateAsset",e.UpdateCatalog="UpdateCatalog",e.UpdateChannel="UpdateChannel",e.UpdateCollection="UpdateCollection",e.UpdateCountry="UpdateCountry",e.UpdateCustomer="UpdateCustomer",e.UpdateCustomerGroup="UpdateCustomerGroup",e.UpdateFacet="UpdateFacet",e.UpdateGlobalSettings="UpdateGlobalSettings",e.UpdateOrder="UpdateOrder",e.UpdatePaymentMethod="UpdatePaymentMethod",e.UpdateProduct="UpdateProduct",e.UpdatePromotion="UpdatePromotion",e.UpdateSeller="UpdateSeller",e.UpdateSettings="UpdateSettings",e.UpdateShippingMethod="UpdateShippingMethod",e.UpdateStockLocation="UpdateStockLocation",e.UpdateSystem="UpdateSystem",e.UpdateTag="UpdateTag",e.UpdateTaxCategory="UpdateTaxCategory",e.UpdateTaxRate="UpdateTaxRate",e.UpdateZone="UpdateZone",e}(dr||(H.Permission=dr={})),mr=function(e){return e.ASC="ASC",e.DESC="DESC",e}(mr||(H.SortOrder=mr={})),ur=function(e){return e.ADJUSTMENT="ADJUSTMENT",e.ALLOCATION="ALLOCATION",e.CANCELLATION="CANCELLATION",e.RELEASE="RELEASE",e.RETURN="RETURN",e.SALE="SALE",e}(ur||(H.StockMovementType=ur={}))});var Ol=se(Mn());var Ln=se(oi()),gr=se(sn());function Nn(e,l,t){if(!e)return"";let n=e.lastIndexOf(l);if(n===-1)return e;let i=e.substr(0,n),r=e.substr(n).replace(l,t);return i+r}var ai=(()=>{class e{constructor(t){this.dataService=t}getTaxCategories(){return this.dataService.settings.getTaxCategories().mapSingle(t=>t.taxCategories.items).pipe(Ot(1))}createProductWithVariants(t,n,i){let r=this.dataService.product.createProduct(t),m=n.groups.filter(x=>0<x.values.length),_=this.createProductOptionGroups(m,i);return bt(r,_).pipe(Ne(([{createProduct:x},I])=>(I.length?bt(I.map(L=>this.dataService.product.addOptionGroupToProduct({productId:x.id,optionGroupId:L.id}))):he([])).pipe(F(()=>({createProduct:x,optionGroups:I})))),Ne(({createProduct:x,optionGroups:I})=>{let S=n.variants.map(z=>{let re=I.length?z.optionValues.map((_e,we)=>{let Me=I[we].options.find(fi=>fi.name===_e);if(!Me)throw new Error(`Could not find a matching ProductOption "${_e}" when creating variant`);return Me.id}):[];return fe(X({},z),{optionIds:re})}),L=I.map(z=>z.options).reduce((z,re)=>[...z,...re],[]);return this.createProductVariants(x,S,L,i,n.stockLocationId)}))}createProductOptionGroups(t,n){return t.length?bt(t.map(i=>this.dataService.product.createProductOptionGroups({code:(0,Ln.normalizeString)(i.name,"-"),translations:[{languageCode:n,name:i.name}],options:i.values.map(r=>({code:(0,Ln.normalizeString)(r,"-"),translations:[{languageCode:n,name:r}]}))}).pipe(F(r=>r.createProductOptionGroup)))):he([])}createProductVariants(t,n,i,r,m){let _=n.map(x=>{let I=i.length?`${t.name} ${x.optionIds.map(S=>i.find(L=>L.id===S)).filter(gr.notNullOrUndefined).map(S=>S.name).join(" ")}`:t.name;return{productId:t.id,price:x.price,sku:x.sku,translations:[{languageCode:r,name:I}],stockLevels:[{stockLocationId:m,stockOnHand:x.stock}],optionIds:x.optionIds}});return this.dataService.product.createProductVariants(_).pipe(F(({createProductVariants:x})=>({createProductVariants:x,productId:t.id})))}updateProduct(t){let{product:n,languageCode:i,autoUpdate:r,productInput:m,variantsInput:_}=t,x=[],I=_||[];return(r?this.dataService.product.getProductVariantsForProduct({},n.id).mapSingle(({productVariants:L})=>L.items):he([])).pipe(Ne(L=>{if(m){x.push(this.dataService.product.updateProduct(m));let z=ue(n,i)?.name??"",re=ue(m,i)?.name;if(re&&z!==re&&r)for(let _e of L){let we=ue(_e,i)?.name||"",Me,fi=I.find(Rn=>Rn.id===_e.id);fi?Me=fi:(Me={id:_e.id,translations:[{languageCode:i,name:we}]},I.push(Me));let Li=ue(Me,i);Li&&(Li.name?Li.name=Nn(Li.name,z,re):Li.name=[re,..._e.options.map(Rn=>Rn.name)].join(" "))}}return I.length&&x.push(this.dataService.product.updateProductVariants(I)),bt(x)}))}updateProductOptions(t,n,i,r){return(n?this.dataService.product.getProductVariantsForProduct({},i.id).mapSingle(({productVariants:_})=>_.items):he([])).pipe(Ne(_=>{let x=he([]);if(n){let I=new Map;for(let L of t){let z=ue(L,r)?.name,re;for(let _e of _)re||_e.options.map(we=>we.id).includes(L.id)&&(re||(re=ue(_e.options.find(we=>we.id===L.id),r)?.name));re&&z&&I.set(re,z)}let S=[];if(I.size){let L=Array.from(I.keys());for(let z of _){let re=ue(z,r)?.name;if(!re||!L.some(we=>re.includes(we)))continue;let _e=L.reduce((we,Me)=>Nn(we,Me,I.get(Me)),re);S.push({id:z.id,translations:[{languageCode:r,name:_e}]})}}S.length?x=this.dataService.product.updateProductVariants(S):x=he([])}return bt(t.map(I=>this.dataService.product.updateProductOption(I))).pipe(Ne(()=>x))}))}deleteProductVariant(t,n){return this.dataService.product.deleteProductVariant(t).pipe(A(i=>i.deleteProductVariant.result===Xe.DELETED?this.dataService.product.getProduct(n).single$:_o(i.deleteProductVariant.message)))}static{this.\u0275fac=function(n){return new(n||e)(Mt(k))}}static{this.\u0275prov=hi({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Bl(e,l){if(e&1){let t=D();c(0,"button",6),C("click",function(){b(t);let i=u();return y(i.save())}),f(1),s(2,"translate"),p()}if(e&2){let t=u();a("disabled",t.detailForm.pristine||t.detailForm.invalid),o(),v(" ",d(2,2,"common.update")," ")}}function wl(e,l){if(e&1&&(M(0,19),h(1,"vdr-tabbed-custom-fields",20),s(2,"hasPermission"),N()),e&2){let t=u().$implicit,n=u(2);o(),a("customFields",n.optionGroupCustomFields)("customFieldsFormGroup",t.get("customFields"))("readonly",!d(2,3,n.updatePermission))}}function Ml(e,l){if(e&1&&f(0),e&2){let t=l.item;v(" ",t.value.id," ")}}function Nl(e,l){if(e&1&&(f(0),s(1,"localeDate")),e&2){let t=l.item;v(" ",O(1,1,t.value.createdAt,"short")," ")}}function Ll(e,l){if(e&1&&(f(0),s(1,"localeDate")),e&2){let t=l.item;v(" ",O(1,1,t.value.updatedAt,"short")," ")}}function Ul(e,l){if(e&1&&(h(0,"input",28),s(1,"hasPermission")),e&2){let t=l.item,n=u(4);a("formControl",t.get("name"))("readonly",!d(1,2,n.updatePermission))}}function $l(e,l){if(e&1&&h(0,"input",29),e&2){let t=l.item;a("formControl",t.get("code"))}}function Gl(e,l){if(e&1&&(h(0,"vdr-tabbed-custom-fields",30),s(1,"hasPermission")),e&2){let t=l.item,n=u(4);a("customFields",n.optionCustomFields)("compact",!0)("customFieldsFormGroup",t.get("customFields"))("readonly",!d(1,4,n.updatePermission))}}function jl(e,l){if(e&1){let t=D();c(0,"vdr-data-table-2",21),C("pageChange",function(i){b(t);let r=u().$implicit,m=u(2);return y(m.paginationSettings[r.value.id].currentPage=i)})("itemsPerPageChange",function(i){b(t);let r=u().$implicit,m=u(2);return y(m.paginationSettings[r.value.id].itemsPerPage=i)}),c(1,"vdr-dt2-column",22),s(2,"translate"),g(3,Ml,1,1,"ng-template"),p(),c(4,"vdr-dt2-column",23),s(5,"translate"),g(6,Nl,2,4,"ng-template"),p(),c(7,"vdr-dt2-column",24),s(8,"translate"),g(9,Ll,2,4,"ng-template"),p(),c(10,"vdr-dt2-column",25),s(11,"translate"),g(12,Ul,2,4,"ng-template"),p(),c(13,"vdr-dt2-column",26),s(14,"translate"),g(15,$l,1,1,"ng-template"),p(),c(16,"vdr-dt2-column",27),s(17,"translate"),g(18,Gl,2,6,"ng-template"),p()()}if(e&2){let t=l.ngIf,n=u().$implicit,i=u(2);a("items",t)("trackByPath","value.id")("itemsPerPage",i.paginationSettings[n.value.id]==null?null:i.paginationSettings[n.value.id].itemsPerPage)("currentPage",i.paginationSettings[n.value.id]==null?null:i.paginationSettings[n.value.id].currentPage)("totalItems",t.length),o(),a("heading",d(2,17,"common.id"))("hiddenByDefault",!0),o(3),a("heading",d(5,19,"common.created-at"))("hiddenByDefault",!0),o(3),a("heading",d(8,21,"common.updated-at"))("hiddenByDefault",!0),o(3),a("heading",d(11,23,"common.name"))("optional",!1),o(3),a("heading",d(14,25,"common.code"))("optional",!1),o(3),a("heading",d(17,27,"common.custom-fields"))("hiddenByDefault",i.optionCustomFields.length===0)}}function Wl(e,l){if(e&1&&(c(0,"vdr-card",10),h(1,"vdr-page-entity-info",11),c(2,"div",12)(3,"vdr-form-field",13),s(4,"translate"),h(5,"input",14),s(6,"hasPermission"),p(),c(7,"vdr-form-field",15),s(8,"translate"),h(9,"input",16),s(10,"hasPermission"),p()(),g(11,wl,3,5,"ng-container",17)(12,jl,19,29,"vdr-data-table-2",18),p()),e&2){let t=l.$implicit,n=l.index,i=u(2);a("formArrayName",n)("title",t.value.code),o(),a("entity",t.value),o(2),a("label",d(4,11,"common.name")),o(2),a("id","name-"+n)("readonly",!d(6,13,i.updatePermission)),o(2),a("label",d(8,15,"common.code")),o(2),a("id","code-"+n)("readonly",!d(10,17,i.updatePermission)),o(2),a("ngIf",i.optionGroupCustomFields.length),o(),a("ngIf",i.getOptions(t))}}function ql(e,l){if(e&1&&(c(0,"form",7)(1,"div",8),g(2,Wl,13,19,"vdr-card",9),p()()),e&2){let t=u();a("formGroup",t.detailForm),o(2),a("ngForOf",t.getOptionGroups())}}var Un=(()=>{class e extends Ya{constructor(t,n,i,r,m,_,x,I,S){super(t,n,i,r,m),this.route=t,this.router=n,this.serverConfigService=i,this.dataService=r,this.permissionsService=m,this.productDetailService=_,this.formBuilder=x,this.changeDetector=I,this.notificationService=S,this.autoUpdateVariantNames=!0,this.paginationSettings={},this.updatePermission=[V.UpdateCatalog,V.UpdateProduct],this.optionGroupCustomFields=this.getCustomFieldConfig("ProductOptionGroup"),this.optionCustomFields=this.getCustomFieldConfig("ProductOption")}ngOnInit(){this.optionGroups$=this.route.snapshot.data.entity.pipe(F(t=>t.optionGroups),ze(t=>{for(let n of t)this.paginationSettings[n.id]={currentPage:1,itemsPerPage:10}})),this.detailForm=new Ci({optionGroups:new pa([])}),super.init()}getOptionGroups(){return this.detailForm.get("optionGroups").controls}getOptions(t){return t.get("options").controls}save(){if(this.detailForm.invalid||this.detailForm.pristine)return;let t=this.dataService.product.getProduct(this.id).mapSingle(n=>n.product);ee(this.entity$,this.languageCode$,t).pipe(lt(1),Ne(([{optionGroups:n},i,r])=>{let m=[],_=[];for(let x of this.getOptionGroups()){if(x.dirty){let I=n.find(S=>S.id===x.value.id);if(I){let S=this.getUpdatedOptionGroup(I,x,i);m.push(this.dataService.product.updateProductOptionGroup(S))}}for(let I of this.getOptions(x))if(I.dirty){let S=n.find(L=>L.id===x.value.id)?.options.find(L=>L.id===I.value.id);if(S){let L=this.getUpdatedOption(S,I,i);_.push(L)}}}return _.length&&m.push(this.productDetailService.updateProductOptions(_,this.autoUpdateVariantNames,r,i)),bt(m)})).subscribe(()=>{this.detailForm.markAsPristine(),this.changeDetector.markForCheck(),this.notificationService.success("common.notify-update-success",{entity:"ProductOptionGroup"})},n=>{this.notificationService.error("common.notify-update-error",{entity:"ProductOptionGroup"})})}getUpdatedOptionGroup(t,n,i){return at({translatable:t,updatedFields:n.value,customFieldConfig:this.optionGroupCustomFields,languageCode:i,defaultTranslation:{languageCode:i,name:t.name||""}})}getUpdatedOption(t,n,i){return at({translatable:t,updatedFields:n.value,customFieldConfig:this.optionCustomFields,languageCode:i,defaultTranslation:{languageCode:i,name:t.name||""}})}setFormValues(t,n){let i=this.detailForm.get("optionGroups");for(let r of t.optionGroups){let m=ue(r,n),_=this.setOptionGroupForm(r,i,m);this.setCustomFieldsForm(this.optionGroupCustomFields,_,r,m);let x=_.get("options");x||(x=this.formBuilder.array([]),_.addControl("options",x));for(let I of r.options){let S=ue(I,n),L=this.setOptionForm(I,x,S);this.setCustomFieldsForm(this.optionCustomFields,L,I,S)}}}setCustomFieldsForm(t,n,i,r){if(t.length){let m=n.get(["customFields"]);m||(m=this.formBuilder.group(t.reduce((_,x)=>fe(X({},_),{[x.name]:""}),{})),n.addControl("customFields",m)),this.setCustomFieldFormValues(t,m,i,r)}}setOptionGroupForm(t,n,i){let r={id:t.id,createdAt:t.createdAt,updatedAt:t.updatedAt,code:t.code,name:i?.name??""},m=n.controls.find(_=>_.value.id===t.id);return m?(m.get("id")?.setValue(r.id),m.get("code")?.setValue(r.code),m.get("name")?.setValue(r.name),m.get("createdAt")?.setValue(r.createdAt),m.get("updatedAt")?.setValue(r.updatedAt)):(m=this.formBuilder.group(r),n.push(m)),m}setOptionForm(t,n,i){let r={id:t.id,createdAt:t.createdAt,updatedAt:t.updatedAt,code:t.code,name:i?.name??""},m=n.controls.find(_=>_.value.id===t.id);return m?(m.get("id")?.setValue(r.id),m.get("code")?.setValue(r.code),m.get("name")?.setValue(r.name),m.get("createdAt")?.setValue(r.createdAt),m.get("updatedAt")?.setValue(r.updatedAt)):(m=this.formBuilder.group(r),n.push(m)),m}static{this.\u0275fac=function(n){return new(n||e)(P(xt),P(dt),P(Xo),P(k),P(oa),P(ai),P(un),P(pe),P(Q))}}static{this.\u0275cmp=E({type:e,selectors:[["vdr-product-options-editor"]],standalone:!1,features:[ce],decls:24,vars:17,consts:[[3,"languageCodeChange","availableLanguageCodes","currentLanguageCode"],[1,"flex","center"],[1,"mr-2"],["clrCheckbox","","type","checkbox","id","auto-update",3,"ngModelChange","ngModel"],["class","btn btn-primary",3,"disabled","click",4,"vdrIfPermissions"],["class","form",3,"formGroup",4,"ngIf"],[1,"btn","btn-primary",3,"click","disabled"],[1,"form",3,"formGroup"],["formGroupName","optionGroups"],[3,"formArrayName","title",4,"ngFor","ngForOf"],[3,"formArrayName","title"],[3,"entity"],[1,"form-grid"],["for","name",3,"label"],["type","text","formControlName","name",3,"id","readonly"],["for","code",3,"label"],["type","text","formControlName","code",3,"id","readonly"],["formGroupName","customFields",4,"ngIf"],["id","edit-options-list",3,"items","trackByPath","itemsPerPage","currentPage","totalItems","pageChange","itemsPerPageChange",4,"ngIf"],["formGroupName","customFields"],["entityName","ProductOptionGroup",3,"customFields","customFieldsFormGroup","readonly"],["id","edit-options-list",3,"pageChange","itemsPerPageChange","items","trackByPath","itemsPerPage","currentPage","totalItems"],["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","optional"],["id","custom-fields",3,"heading","hiddenByDefault"],["type","text",3,"formControl","readonly"],["type","text",3,"formControl"],["entityName","ProductOption",3,"customFields","compact","customFieldsFormGroup","readonly"]],template:function(n,i){n&1&&(c(0,"vdr-page-header"),h(1,"vdr-page-title"),c(2,"vdr-page-header-description"),f(3),s(4,"translate"),p()(),c(5,"vdr-page-body")(6,"vdr-page-block")(7,"vdr-action-bar")(8,"vdr-ab-left")(9,"vdr-language-selector",0),s(10,"async"),s(11,"async"),C("languageCodeChange",function(m){return i.setLanguage(m)}),p()(),c(12,"vdr-ab-right")(13,"div",1)(14,"div",2)(15,"clr-checkbox-wrapper")(16,"input",3),$e("ngModelChange",function(m){return Ue(i.autoUpdateVariantNames,m)||(i.autoUpdateVariantNames=m),m}),p(),c(17,"label"),f(18),s(19,"translate"),p()()(),g(20,Bl,3,4,"button",4),p()()()(),c(21,"vdr-page-block"),g(22,ql,3,2,"form",5),s(23,"async"),p()()),n&2&&(o(3),T(d(4,7,"catalog.page-description-options-editor")),o(6),a("availableLanguageCodes",d(10,9,i.availableLanguages$))("currentLanguageCode",d(11,11,i.languageCode$)),o(7),Le("ngModel",i.autoUpdateVariantNames),o(2),T(d(19,13,"catalog.auto-update-product-variant-name")),o(2),a("vdrIfPermissions",i.updatePermission),o(2),a("ngIf",d(23,15,i.optionGroups$)))},dependencies:[Ee,ye,tt,$,B,mt,ie,Ge,Z,ve,et,Pt,Ce,be,$t,bi,Te,Pe,Ie,me,K,Re,xe,ut,ot,He,Ua,$a,La,Na,de,Dt,gt,G,R,qe,it],styles:[`.option-group-header[_ngcontent-%COMP%]{display:flex;align-items:baseline}
|
|
1
|
+
import{a as oi}from"./chunk-HXII46JU.js";import{$ as Io,$c as sn,$d as Pi,$e as Bn,$f as nt,$g as ni,A as vo,Aa as Je,Ab as Mo,Ae as It,Af as Dt,Ag as Wa,B as Fe,Ba as U,Bb as No,Bd as vt,Bf as zt,C as Xi,Ca as f,Cb as Lo,Cc as Qo,Cd as At,Ce as ga,Cf as Zt,Cg as qa,Da as T,Db as an,Dd as et,Df as Fa,Ea as v,Eb as Uo,Ed as mt,Ef as gt,F as Ot,Fa as Nt,Fb as $o,Fd as Ut,Fe as Ii,Ff as qe,G as Co,Ga as Vo,Gb as Go,Ge as K,Gf as Sa,H as st,Ha as Le,Hb as jo,Hd as Pt,He as me,Hf as Ea,I as A,Ia as Ue,Ib as Wo,Id as Ce,If as Oa,J as bo,Ja as $e,Jb as qo,Jc as Rl,Jd as $t,Je as _a,Jg as Ae,K as Vt,Ka as tn,Kb as Ho,Kc as rn,Kd as bi,Ke as Ti,Kf as Jt,Kg as ki,L as ze,La as W,Lb as Yo,Lc as Ko,Ld as be,Le as it,Lf as bn,Lg as Ha,Ma as j,Mc as zo,Md as cn,Me as Tt,Mf as xe,N as yo,Na as Rt,Nc as Zo,Nd as pn,Nf as ke,O as hi,Oa as nn,Oc as Jo,Od as dn,Oe as Al,Of as Pe,Og as Ya,P as xo,Pa as ko,Pd as sa,Pf as Ie,Pg as St,Q as Mt,Qa as s,Qd as yi,Qe as fa,Qf as Te,Qg as Ri,R as Po,Ra as d,Rd as mn,Rg as Qa,S as yt,Sa as O,Sc as ln,Sd as ca,Se as ha,Sf as Oi,Sg as Ka,T as b,Ta as Ro,Td as pa,Te as va,Tf as Vi,Tg as za,U as y,Ua as Y,Ud as je,Uf as Va,Ug as ii,Va as pe,Vd as un,Ve as Ca,Vf as ka,W as ht,Wa as Lt,We as ba,Wf as Xt,Wg as Ai,X as en,Xa as Ao,Xd as da,Xe as Cn,Xf as ei,Xg as xn,Ya as $,Yd as gn,Yg as Za,Z as vi,Za as B,Zd as xi,Zf as He,Zg as Pn,_ as o,_d as ma,_e as Ht,_f as ti,_g as In,a as X,aa as P,ae as J,af as ya,ag as Ra,ah as ue,b as fe,bg as Aa,bh as _t,ca as E,cb as on,cd as Xo,ce as Ee,cg as Ba,ch as at,d as kl,da as To,db as G,dd as k,de as tt,dg as wa,e as se,ed as ea,ee as ye,eg as Ma,f as go,fa as Do,fd as xt,fe as ua,ff as xa,fg as ot,g as ft,ga as ce,gd as ta,ge as _n,gh as Tn,h as Be,ha as g,hd as dt,he as Gt,hf as Yt,i as le,ia as An,id as Se,if as Ve,j as Ui,ja as a,jb as Bo,jd as ia,jg as Re,k as he,ka as Fo,l as _o,la as w,ld as R,lf as Qt,m as Zi,ma as c,mf as Di,n as F,na as p,nb as ne,nf as Pa,ng as de,o as ee,oa as h,od as na,of as Ia,og as Na,p as Ne,pa as M,pd as oa,pf as Fi,pg as La,q as Ji,qa as N,qd as aa,qe as fn,qf as Kt,qg as Ua,r as bt,ra as kt,rb as Xe,re as hn,rf as Si,sa as D,sb as Gi,sd as ra,se as vn,sg as $a,t as fo,ta as C,td as Ge,te as Q,tf as Ei,tg as wn,u as $i,ua as u,ub as wo,ud as ie,ue as We,ug as yn,v as ho,va as So,vd as Ye,ve as Oe,vf as Ta,vg as Ft,wa as Eo,wb as mi,wd as Z,we as te,wf as Da,x as rt,xa as Oo,xd as ve,xe as jt,y as lt,ya as pt,yd as la,ye as Wt,yg as Ga,za as Ze,zb as V,zd as Ci,ze as qt,zf as ut,zg as ja}from"./chunk-WTLUBTCI.js";var Mn=kl(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.StockMovementType=H.SortOrder=H.Permission=H.OrderType=H.MetricType=H.MetricInterval=H.LogicalOperator=H.LanguageCode=H.JobState=H.HistoryEntryType=H.GlobalFlag=H.ErrorCode=H.DeletionResult=H.CurrencyCode=H.AssetType=H.AdjustmentType=void 0;var Ja=function(e){return e.DISTRIBUTED_ORDER_PROMOTION="DISTRIBUTED_ORDER_PROMOTION",e.OTHER="OTHER",e.PROMOTION="PROMOTION",e}(Ja||(H.AdjustmentType=Ja={})),Xa=function(e){return e.BINARY="BINARY",e.IMAGE="IMAGE",e.VIDEO="VIDEO",e}(Xa||(H.AssetType=Xa={})),er=function(e){return e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYN="BYN",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUC="CUC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRU="MRU",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SRD="SRD",e.SSP="SSP",e.STN="STN",e.SVC="SVC",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VES="VES",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWL="ZWL",e}(er||(H.CurrencyCode=er={})),tr=function(e){return e.DELETED="DELETED",e.NOT_DELETED="NOT_DELETED",e}(tr||(H.DeletionResult=tr={})),ir=function(e){return e.ALREADY_REFUNDED_ERROR="ALREADY_REFUNDED_ERROR",e.CANCEL_ACTIVE_ORDER_ERROR="CANCEL_ACTIVE_ORDER_ERROR",e.CANCEL_PAYMENT_ERROR="CANCEL_PAYMENT_ERROR",e.CHANNEL_DEFAULT_LANGUAGE_ERROR="CHANNEL_DEFAULT_LANGUAGE_ERROR",e.COUPON_CODE_EXPIRED_ERROR="COUPON_CODE_EXPIRED_ERROR",e.COUPON_CODE_INVALID_ERROR="COUPON_CODE_INVALID_ERROR",e.COUPON_CODE_LIMIT_ERROR="COUPON_CODE_LIMIT_ERROR",e.CREATE_FULFILLMENT_ERROR="CREATE_FULFILLMENT_ERROR",e.DUPLICATE_ENTITY_ERROR="DUPLICATE_ENTITY_ERROR",e.EMAIL_ADDRESS_CONFLICT_ERROR="EMAIL_ADDRESS_CONFLICT_ERROR",e.EMPTY_ORDER_LINE_SELECTION_ERROR="EMPTY_ORDER_LINE_SELECTION_ERROR",e.FACET_IN_USE_ERROR="FACET_IN_USE_ERROR",e.FULFILLMENT_STATE_TRANSITION_ERROR="FULFILLMENT_STATE_TRANSITION_ERROR",e.GUEST_CHECKOUT_ERROR="GUEST_CHECKOUT_ERROR",e.INELIGIBLE_SHIPPING_METHOD_ERROR="INELIGIBLE_SHIPPING_METHOD_ERROR",e.INSUFFICIENT_STOCK_ERROR="INSUFFICIENT_STOCK_ERROR",e.INSUFFICIENT_STOCK_ON_HAND_ERROR="INSUFFICIENT_STOCK_ON_HAND_ERROR",e.INVALID_CREDENTIALS_ERROR="INVALID_CREDENTIALS_ERROR",e.INVALID_FULFILLMENT_HANDLER_ERROR="INVALID_FULFILLMENT_HANDLER_ERROR",e.ITEMS_ALREADY_FULFILLED_ERROR="ITEMS_ALREADY_FULFILLED_ERROR",e.LANGUAGE_NOT_AVAILABLE_ERROR="LANGUAGE_NOT_AVAILABLE_ERROR",e.MANUAL_PAYMENT_STATE_ERROR="MANUAL_PAYMENT_STATE_ERROR",e.MIME_TYPE_ERROR="MIME_TYPE_ERROR",e.MISSING_CONDITIONS_ERROR="MISSING_CONDITIONS_ERROR",e.MULTIPLE_ORDER_ERROR="MULTIPLE_ORDER_ERROR",e.NATIVE_AUTH_STRATEGY_ERROR="NATIVE_AUTH_STRATEGY_ERROR",e.NEGATIVE_QUANTITY_ERROR="NEGATIVE_QUANTITY_ERROR",e.NOTHING_TO_REFUND_ERROR="NOTHING_TO_REFUND_ERROR",e.NO_ACTIVE_ORDER_ERROR="NO_ACTIVE_ORDER_ERROR",e.NO_CHANGES_SPECIFIED_ERROR="NO_CHANGES_SPECIFIED_ERROR",e.ORDER_INTERCEPTOR_ERROR="ORDER_INTERCEPTOR_ERROR",e.ORDER_LIMIT_ERROR="ORDER_LIMIT_ERROR",e.ORDER_MODIFICATION_ERROR="ORDER_MODIFICATION_ERROR",e.ORDER_MODIFICATION_STATE_ERROR="ORDER_MODIFICATION_STATE_ERROR",e.ORDER_STATE_TRANSITION_ERROR="ORDER_STATE_TRANSITION_ERROR",e.PAYMENT_METHOD_MISSING_ERROR="PAYMENT_METHOD_MISSING_ERROR",e.PAYMENT_ORDER_MISMATCH_ERROR="PAYMENT_ORDER_MISMATCH_ERROR",e.PAYMENT_STATE_TRANSITION_ERROR="PAYMENT_STATE_TRANSITION_ERROR",e.PRODUCT_OPTION_IN_USE_ERROR="PRODUCT_OPTION_IN_USE_ERROR",e.QUANTITY_TOO_GREAT_ERROR="QUANTITY_TOO_GREAT_ERROR",e.REFUND_AMOUNT_ERROR="REFUND_AMOUNT_ERROR",e.REFUND_ORDER_STATE_ERROR="REFUND_ORDER_STATE_ERROR",e.REFUND_PAYMENT_ID_MISSING_ERROR="REFUND_PAYMENT_ID_MISSING_ERROR",e.REFUND_STATE_TRANSITION_ERROR="REFUND_STATE_TRANSITION_ERROR",e.SETTLE_PAYMENT_ERROR="SETTLE_PAYMENT_ERROR",e.UNKNOWN_ERROR="UNKNOWN_ERROR",e}(ir||(H.ErrorCode=ir={})),nr=function(e){return e.FALSE="FALSE",e.INHERIT="INHERIT",e.TRUE="TRUE",e}(nr||(H.GlobalFlag=nr={})),or=function(e){return e.CUSTOMER_ADDED_TO_GROUP="CUSTOMER_ADDED_TO_GROUP",e.CUSTOMER_ADDRESS_CREATED="CUSTOMER_ADDRESS_CREATED",e.CUSTOMER_ADDRESS_DELETED="CUSTOMER_ADDRESS_DELETED",e.CUSTOMER_ADDRESS_UPDATED="CUSTOMER_ADDRESS_UPDATED",e.CUSTOMER_DETAIL_UPDATED="CUSTOMER_DETAIL_UPDATED",e.CUSTOMER_EMAIL_UPDATE_REQUESTED="CUSTOMER_EMAIL_UPDATE_REQUESTED",e.CUSTOMER_EMAIL_UPDATE_VERIFIED="CUSTOMER_EMAIL_UPDATE_VERIFIED",e.CUSTOMER_NOTE="CUSTOMER_NOTE",e.CUSTOMER_PASSWORD_RESET_REQUESTED="CUSTOMER_PASSWORD_RESET_REQUESTED",e.CUSTOMER_PASSWORD_RESET_VERIFIED="CUSTOMER_PASSWORD_RESET_VERIFIED",e.CUSTOMER_PASSWORD_UPDATED="CUSTOMER_PASSWORD_UPDATED",e.CUSTOMER_REGISTERED="CUSTOMER_REGISTERED",e.CUSTOMER_REMOVED_FROM_GROUP="CUSTOMER_REMOVED_FROM_GROUP",e.CUSTOMER_VERIFIED="CUSTOMER_VERIFIED",e.ORDER_CANCELLATION="ORDER_CANCELLATION",e.ORDER_COUPON_APPLIED="ORDER_COUPON_APPLIED",e.ORDER_COUPON_REMOVED="ORDER_COUPON_REMOVED",e.ORDER_CUSTOMER_UPDATED="ORDER_CUSTOMER_UPDATED",e.ORDER_FULFILLMENT="ORDER_FULFILLMENT",e.ORDER_FULFILLMENT_TRANSITION="ORDER_FULFILLMENT_TRANSITION",e.ORDER_MODIFIED="ORDER_MODIFIED",e.ORDER_NOTE="ORDER_NOTE",e.ORDER_PAYMENT_TRANSITION="ORDER_PAYMENT_TRANSITION",e.ORDER_REFUND_TRANSITION="ORDER_REFUND_TRANSITION",e.ORDER_STATE_TRANSITION="ORDER_STATE_TRANSITION",e}(or||(H.HistoryEntryType=or={})),ar=function(e){return e.CANCELLED="CANCELLED",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.PENDING="PENDING",e.RETRYING="RETRYING",e.RUNNING="RUNNING",e}(ar||(H.JobState=ar={})),rr=function(e){return e.af="af",e.ak="ak",e.am="am",e.ar="ar",e.as="as",e.az="az",e.be="be",e.bg="bg",e.bm="bm",e.bn="bn",e.bo="bo",e.br="br",e.bs="bs",e.ca="ca",e.ce="ce",e.co="co",e.cs="cs",e.cu="cu",e.cy="cy",e.da="da",e.de="de",e.de_AT="de_AT",e.de_CH="de_CH",e.dz="dz",e.ee="ee",e.el="el",e.en="en",e.en_AU="en_AU",e.en_CA="en_CA",e.en_GB="en_GB",e.en_US="en_US",e.eo="eo",e.es="es",e.es_ES="es_ES",e.es_MX="es_MX",e.et="et",e.eu="eu",e.fa="fa",e.fa_AF="fa_AF",e.ff="ff",e.fi="fi",e.fo="fo",e.fr="fr",e.fr_CA="fr_CA",e.fr_CH="fr_CH",e.fy="fy",e.ga="ga",e.gd="gd",e.gl="gl",e.gu="gu",e.gv="gv",e.ha="ha",e.he="he",e.hi="hi",e.hr="hr",e.ht="ht",e.hu="hu",e.hy="hy",e.ia="ia",e.id="id",e.ig="ig",e.ii="ii",e.is="is",e.it="it",e.ja="ja",e.jv="jv",e.ka="ka",e.ki="ki",e.kk="kk",e.kl="kl",e.km="km",e.kn="kn",e.ko="ko",e.ks="ks",e.ku="ku",e.kw="kw",e.ky="ky",e.la="la",e.lb="lb",e.lg="lg",e.ln="ln",e.lo="lo",e.lt="lt",e.lu="lu",e.lv="lv",e.mg="mg",e.mi="mi",e.mk="mk",e.ml="ml",e.mn="mn",e.mr="mr",e.ms="ms",e.mt="mt",e.my="my",e.nb="nb",e.nd="nd",e.ne="ne",e.nl="nl",e.nl_BE="nl_BE",e.nn="nn",e.ny="ny",e.om="om",e.or="or",e.os="os",e.pa="pa",e.pl="pl",e.ps="ps",e.pt="pt",e.pt_BR="pt_BR",e.pt_PT="pt_PT",e.qu="qu",e.rm="rm",e.rn="rn",e.ro="ro",e.ro_MD="ro_MD",e.ru="ru",e.rw="rw",e.sa="sa",e.sd="sd",e.se="se",e.sg="sg",e.si="si",e.sk="sk",e.sl="sl",e.sm="sm",e.sn="sn",e.so="so",e.sq="sq",e.sr="sr",e.st="st",e.su="su",e.sv="sv",e.sw="sw",e.sw_CD="sw_CD",e.ta="ta",e.te="te",e.tg="tg",e.th="th",e.ti="ti",e.tk="tk",e.to="to",e.tr="tr",e.tt="tt",e.ug="ug",e.uk="uk",e.ur="ur",e.uz="uz",e.vi="vi",e.vo="vo",e.wo="wo",e.xh="xh",e.yi="yi",e.yo="yo",e.zh="zh",e.zh_Hans="zh_Hans",e.zh_Hant="zh_Hant",e.zu="zu",e}(rr||(H.LanguageCode=rr={})),lr=function(e){return e.AND="AND",e.OR="OR",e}(lr||(H.LogicalOperator=lr={})),sr=function(e){return e.Daily="Daily",e}(sr||(H.MetricInterval=sr={})),cr=function(e){return e.AverageOrderValue="AverageOrderValue",e.OrderCount="OrderCount",e.OrderTotal="OrderTotal",e}(cr||(H.MetricType=cr={})),pr=function(e){return e.Aggregate="Aggregate",e.Regular="Regular",e.Seller="Seller",e}(pr||(H.OrderType=pr={})),dr=function(e){return e.Authenticated="Authenticated",e.CreateAdministrator="CreateAdministrator",e.CreateAsset="CreateAsset",e.CreateCatalog="CreateCatalog",e.CreateChannel="CreateChannel",e.CreateCollection="CreateCollection",e.CreateCountry="CreateCountry",e.CreateCustomer="CreateCustomer",e.CreateCustomerGroup="CreateCustomerGroup",e.CreateFacet="CreateFacet",e.CreateOrder="CreateOrder",e.CreatePaymentMethod="CreatePaymentMethod",e.CreateProduct="CreateProduct",e.CreatePromotion="CreatePromotion",e.CreateSeller="CreateSeller",e.CreateSettings="CreateSettings",e.CreateShippingMethod="CreateShippingMethod",e.CreateStockLocation="CreateStockLocation",e.CreateSystem="CreateSystem",e.CreateTag="CreateTag",e.CreateTaxCategory="CreateTaxCategory",e.CreateTaxRate="CreateTaxRate",e.CreateZone="CreateZone",e.DeleteAdministrator="DeleteAdministrator",e.DeleteAsset="DeleteAsset",e.DeleteCatalog="DeleteCatalog",e.DeleteChannel="DeleteChannel",e.DeleteCollection="DeleteCollection",e.DeleteCountry="DeleteCountry",e.DeleteCustomer="DeleteCustomer",e.DeleteCustomerGroup="DeleteCustomerGroup",e.DeleteFacet="DeleteFacet",e.DeleteOrder="DeleteOrder",e.DeletePaymentMethod="DeletePaymentMethod",e.DeleteProduct="DeleteProduct",e.DeletePromotion="DeletePromotion",e.DeleteSeller="DeleteSeller",e.DeleteSettings="DeleteSettings",e.DeleteShippingMethod="DeleteShippingMethod",e.DeleteStockLocation="DeleteStockLocation",e.DeleteSystem="DeleteSystem",e.DeleteTag="DeleteTag",e.DeleteTaxCategory="DeleteTaxCategory",e.DeleteTaxRate="DeleteTaxRate",e.DeleteZone="DeleteZone",e.Owner="Owner",e.Public="Public",e.ReadAdministrator="ReadAdministrator",e.ReadAsset="ReadAsset",e.ReadCatalog="ReadCatalog",e.ReadChannel="ReadChannel",e.ReadCollection="ReadCollection",e.ReadCountry="ReadCountry",e.ReadCustomer="ReadCustomer",e.ReadCustomerGroup="ReadCustomerGroup",e.ReadFacet="ReadFacet",e.ReadOrder="ReadOrder",e.ReadPaymentMethod="ReadPaymentMethod",e.ReadProduct="ReadProduct",e.ReadPromotion="ReadPromotion",e.ReadSeller="ReadSeller",e.ReadSettings="ReadSettings",e.ReadShippingMethod="ReadShippingMethod",e.ReadStockLocation="ReadStockLocation",e.ReadSystem="ReadSystem",e.ReadTag="ReadTag",e.ReadTaxCategory="ReadTaxCategory",e.ReadTaxRate="ReadTaxRate",e.ReadZone="ReadZone",e.SuperAdmin="SuperAdmin",e.UpdateAdministrator="UpdateAdministrator",e.UpdateAsset="UpdateAsset",e.UpdateCatalog="UpdateCatalog",e.UpdateChannel="UpdateChannel",e.UpdateCollection="UpdateCollection",e.UpdateCountry="UpdateCountry",e.UpdateCustomer="UpdateCustomer",e.UpdateCustomerGroup="UpdateCustomerGroup",e.UpdateFacet="UpdateFacet",e.UpdateGlobalSettings="UpdateGlobalSettings",e.UpdateOrder="UpdateOrder",e.UpdatePaymentMethod="UpdatePaymentMethod",e.UpdateProduct="UpdateProduct",e.UpdatePromotion="UpdatePromotion",e.UpdateSeller="UpdateSeller",e.UpdateSettings="UpdateSettings",e.UpdateShippingMethod="UpdateShippingMethod",e.UpdateStockLocation="UpdateStockLocation",e.UpdateSystem="UpdateSystem",e.UpdateTag="UpdateTag",e.UpdateTaxCategory="UpdateTaxCategory",e.UpdateTaxRate="UpdateTaxRate",e.UpdateZone="UpdateZone",e}(dr||(H.Permission=dr={})),mr=function(e){return e.ASC="ASC",e.DESC="DESC",e}(mr||(H.SortOrder=mr={})),ur=function(e){return e.ADJUSTMENT="ADJUSTMENT",e.ALLOCATION="ALLOCATION",e.CANCELLATION="CANCELLATION",e.RELEASE="RELEASE",e.RETURN="RETURN",e.SALE="SALE",e}(ur||(H.StockMovementType=ur={}))});var Ol=se(Mn());var Ln=se(oi()),gr=se(sn());function Nn(e,l,t){if(!e)return"";let n=e.lastIndexOf(l);if(n===-1)return e;let i=e.substr(0,n),r=e.substr(n).replace(l,t);return i+r}var ai=(()=>{class e{constructor(t){this.dataService=t}getTaxCategories(){return this.dataService.settings.getTaxCategories().mapSingle(t=>t.taxCategories.items).pipe(Ot(1))}createProductWithVariants(t,n,i){let r=this.dataService.product.createProduct(t),m=n.groups.filter(x=>0<x.values.length),_=this.createProductOptionGroups(m,i);return bt(r,_).pipe(Ne(([{createProduct:x},I])=>(I.length?bt(I.map(L=>this.dataService.product.addOptionGroupToProduct({productId:x.id,optionGroupId:L.id}))):he([])).pipe(F(()=>({createProduct:x,optionGroups:I})))),Ne(({createProduct:x,optionGroups:I})=>{let S=n.variants.map(z=>{let re=I.length?z.optionValues.map((_e,we)=>{let Me=I[we].options.find(fi=>fi.name===_e);if(!Me)throw new Error(`Could not find a matching ProductOption "${_e}" when creating variant`);return Me.id}):[];return fe(X({},z),{optionIds:re})}),L=I.map(z=>z.options).reduce((z,re)=>[...z,...re],[]);return this.createProductVariants(x,S,L,i,n.stockLocationId)}))}createProductOptionGroups(t,n){return t.length?bt(t.map(i=>this.dataService.product.createProductOptionGroups({code:(0,Ln.normalizeString)(i.name,"-"),translations:[{languageCode:n,name:i.name}],options:i.values.map(r=>({code:(0,Ln.normalizeString)(r,"-"),translations:[{languageCode:n,name:r}]}))}).pipe(F(r=>r.createProductOptionGroup)))):he([])}createProductVariants(t,n,i,r,m){let _=n.map(x=>{let I=i.length?`${t.name} ${x.optionIds.map(S=>i.find(L=>L.id===S)).filter(gr.notNullOrUndefined).map(S=>S.name).join(" ")}`:t.name;return{productId:t.id,price:x.price,sku:x.sku,translations:[{languageCode:r,name:I}],stockLevels:[{stockLocationId:m,stockOnHand:x.stock}],optionIds:x.optionIds}});return this.dataService.product.createProductVariants(_).pipe(F(({createProductVariants:x})=>({createProductVariants:x,productId:t.id})))}updateProduct(t){let{product:n,languageCode:i,autoUpdate:r,productInput:m,variantsInput:_}=t,x=[],I=_||[];return(r?this.dataService.product.getProductVariantsForProduct({},n.id).mapSingle(({productVariants:L})=>L.items):he([])).pipe(Ne(L=>{if(m){x.push(this.dataService.product.updateProduct(m));let z=ue(n,i)?.name??"",re=ue(m,i)?.name;if(re&&z!==re&&r)for(let _e of L){let we=ue(_e,i)?.name||"",Me,fi=I.find(Rn=>Rn.id===_e.id);fi?Me=fi:(Me={id:_e.id,translations:[{languageCode:i,name:we}]},I.push(Me));let Li=ue(Me,i);Li&&(Li.name?Li.name=Nn(Li.name,z,re):Li.name=[re,..._e.options.map(Rn=>Rn.name)].join(" "))}}return I.length&&x.push(this.dataService.product.updateProductVariants(I)),bt(x)}))}updateProductOptions(t,n,i,r){return(n?this.dataService.product.getProductVariantsForProduct({},i.id).mapSingle(({productVariants:_})=>_.items):he([])).pipe(Ne(_=>{let x=he([]);if(n){let I=new Map;for(let L of t){let z=ue(L,r)?.name,re;for(let _e of _)re||_e.options.map(we=>we.id).includes(L.id)&&(re||(re=ue(_e.options.find(we=>we.id===L.id),r)?.name));re&&z&&I.set(re,z)}let S=[];if(I.size){let L=Array.from(I.keys());for(let z of _){let re=ue(z,r)?.name;if(!re||!L.some(we=>re.includes(we)))continue;let _e=L.reduce((we,Me)=>Nn(we,Me,I.get(Me)),re);S.push({id:z.id,translations:[{languageCode:r,name:_e}]})}}S.length?x=this.dataService.product.updateProductVariants(S):x=he([])}return bt(t.map(I=>this.dataService.product.updateProductOption(I))).pipe(Ne(()=>x))}))}deleteProductVariant(t,n){return this.dataService.product.deleteProductVariant(t).pipe(A(i=>i.deleteProductVariant.result===Xe.DELETED?this.dataService.product.getProduct(n).single$:_o(i.deleteProductVariant.message)))}static{this.\u0275fac=function(n){return new(n||e)(Mt(k))}}static{this.\u0275prov=hi({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Bl(e,l){if(e&1){let t=D();c(0,"button",6),C("click",function(){b(t);let i=u();return y(i.save())}),f(1),s(2,"translate"),p()}if(e&2){let t=u();a("disabled",t.detailForm.pristine||t.detailForm.invalid),o(),v(" ",d(2,2,"common.update")," ")}}function wl(e,l){if(e&1&&(M(0,19),h(1,"vdr-tabbed-custom-fields",20),s(2,"hasPermission"),N()),e&2){let t=u().$implicit,n=u(2);o(),a("customFields",n.optionGroupCustomFields)("customFieldsFormGroup",t.get("customFields"))("readonly",!d(2,3,n.updatePermission))}}function Ml(e,l){if(e&1&&f(0),e&2){let t=l.item;v(" ",t.value.id," ")}}function Nl(e,l){if(e&1&&(f(0),s(1,"localeDate")),e&2){let t=l.item;v(" ",O(1,1,t.value.createdAt,"short")," ")}}function Ll(e,l){if(e&1&&(f(0),s(1,"localeDate")),e&2){let t=l.item;v(" ",O(1,1,t.value.updatedAt,"short")," ")}}function Ul(e,l){if(e&1&&(h(0,"input",28),s(1,"hasPermission")),e&2){let t=l.item,n=u(4);a("formControl",t.get("name"))("readonly",!d(1,2,n.updatePermission))}}function $l(e,l){if(e&1&&h(0,"input",29),e&2){let t=l.item;a("formControl",t.get("code"))}}function Gl(e,l){if(e&1&&(h(0,"vdr-tabbed-custom-fields",30),s(1,"hasPermission")),e&2){let t=l.item,n=u(4);a("customFields",n.optionCustomFields)("compact",!0)("customFieldsFormGroup",t.get("customFields"))("readonly",!d(1,4,n.updatePermission))}}function jl(e,l){if(e&1){let t=D();c(0,"vdr-data-table-2",21),C("pageChange",function(i){b(t);let r=u().$implicit,m=u(2);return y(m.paginationSettings[r.value.id].currentPage=i)})("itemsPerPageChange",function(i){b(t);let r=u().$implicit,m=u(2);return y(m.paginationSettings[r.value.id].itemsPerPage=i)}),c(1,"vdr-dt2-column",22),s(2,"translate"),g(3,Ml,1,1,"ng-template"),p(),c(4,"vdr-dt2-column",23),s(5,"translate"),g(6,Nl,2,4,"ng-template"),p(),c(7,"vdr-dt2-column",24),s(8,"translate"),g(9,Ll,2,4,"ng-template"),p(),c(10,"vdr-dt2-column",25),s(11,"translate"),g(12,Ul,2,4,"ng-template"),p(),c(13,"vdr-dt2-column",26),s(14,"translate"),g(15,$l,1,1,"ng-template"),p(),c(16,"vdr-dt2-column",27),s(17,"translate"),g(18,Gl,2,6,"ng-template"),p()()}if(e&2){let t=l.ngIf,n=u().$implicit,i=u(2);a("items",t)("trackByPath","value.id")("itemsPerPage",i.paginationSettings[n.value.id]==null?null:i.paginationSettings[n.value.id].itemsPerPage)("currentPage",i.paginationSettings[n.value.id]==null?null:i.paginationSettings[n.value.id].currentPage)("totalItems",t.length),o(),a("heading",d(2,17,"common.id"))("hiddenByDefault",!0),o(3),a("heading",d(5,19,"common.created-at"))("hiddenByDefault",!0),o(3),a("heading",d(8,21,"common.updated-at"))("hiddenByDefault",!0),o(3),a("heading",d(11,23,"common.name"))("optional",!1),o(3),a("heading",d(14,25,"common.code"))("optional",!1),o(3),a("heading",d(17,27,"common.custom-fields"))("hiddenByDefault",i.optionCustomFields.length===0)}}function Wl(e,l){if(e&1&&(c(0,"vdr-card",10),h(1,"vdr-page-entity-info",11),c(2,"div",12)(3,"vdr-form-field",13),s(4,"translate"),h(5,"input",14),s(6,"hasPermission"),p(),c(7,"vdr-form-field",15),s(8,"translate"),h(9,"input",16),s(10,"hasPermission"),p()(),g(11,wl,3,5,"ng-container",17)(12,jl,19,29,"vdr-data-table-2",18),p()),e&2){let t=l.$implicit,n=l.index,i=u(2);a("formArrayName",n)("title",t.value.code),o(),a("entity",t.value),o(2),a("label",d(4,11,"common.name")),o(2),a("id","name-"+n)("readonly",!d(6,13,i.updatePermission)),o(2),a("label",d(8,15,"common.code")),o(2),a("id","code-"+n)("readonly",!d(10,17,i.updatePermission)),o(2),a("ngIf",i.optionGroupCustomFields.length),o(),a("ngIf",i.getOptions(t))}}function ql(e,l){if(e&1&&(c(0,"form",7)(1,"div",8),g(2,Wl,13,19,"vdr-card",9),p()()),e&2){let t=u();a("formGroup",t.detailForm),o(2),a("ngForOf",t.getOptionGroups())}}var Un=(()=>{class e extends Ya{constructor(t,n,i,r,m,_,x,I,S){super(t,n,i,r,m),this.route=t,this.router=n,this.serverConfigService=i,this.dataService=r,this.permissionsService=m,this.productDetailService=_,this.formBuilder=x,this.changeDetector=I,this.notificationService=S,this.autoUpdateVariantNames=!0,this.paginationSettings={},this.updatePermission=[V.UpdateCatalog,V.UpdateProduct],this.optionGroupCustomFields=this.getCustomFieldConfig("ProductOptionGroup"),this.optionCustomFields=this.getCustomFieldConfig("ProductOption")}ngOnInit(){this.optionGroups$=this.route.snapshot.data.entity.pipe(F(t=>t.optionGroups),ze(t=>{for(let n of t)this.paginationSettings[n.id]={currentPage:1,itemsPerPage:10}})),this.detailForm=new Ci({optionGroups:new pa([])}),super.init()}getOptionGroups(){return this.detailForm.get("optionGroups").controls}getOptions(t){return t.get("options").controls}save(){if(this.detailForm.invalid||this.detailForm.pristine)return;let t=this.dataService.product.getProduct(this.id).mapSingle(n=>n.product);ee(this.entity$,this.languageCode$,t).pipe(lt(1),Ne(([{optionGroups:n},i,r])=>{let m=[],_=[];for(let x of this.getOptionGroups()){if(x.dirty){let I=n.find(S=>S.id===x.value.id);if(I){let S=this.getUpdatedOptionGroup(I,x,i);m.push(this.dataService.product.updateProductOptionGroup(S))}}for(let I of this.getOptions(x))if(I.dirty){let S=n.find(L=>L.id===x.value.id)?.options.find(L=>L.id===I.value.id);if(S){let L=this.getUpdatedOption(S,I,i);_.push(L)}}}return _.length&&m.push(this.productDetailService.updateProductOptions(_,this.autoUpdateVariantNames,r,i)),bt(m)})).subscribe(()=>{this.detailForm.markAsPristine(),this.changeDetector.markForCheck(),this.notificationService.success("common.notify-update-success",{entity:"ProductOptionGroup"})},n=>{this.notificationService.error("common.notify-update-error",{entity:"ProductOptionGroup"})})}getUpdatedOptionGroup(t,n,i){return at({translatable:t,updatedFields:n.value,customFieldConfig:this.optionGroupCustomFields,languageCode:i,defaultTranslation:{languageCode:i,name:t.name||""}})}getUpdatedOption(t,n,i){return at({translatable:t,updatedFields:n.value,customFieldConfig:this.optionCustomFields,languageCode:i,defaultTranslation:{languageCode:i,name:t.name||""}})}setFormValues(t,n){let i=this.detailForm.get("optionGroups");for(let r of t.optionGroups){let m=ue(r,n),_=this.setOptionGroupForm(r,i,m);this.setCustomFieldsForm(this.optionGroupCustomFields,_,r,m);let x=_.get("options");x||(x=this.formBuilder.array([]),_.addControl("options",x));for(let I of r.options){let S=ue(I,n),L=this.setOptionForm(I,x,S);this.setCustomFieldsForm(this.optionCustomFields,L,I,S)}}}setCustomFieldsForm(t,n,i,r){if(t.length){let m=n.get(["customFields"]);m||(m=this.formBuilder.group(t.reduce((_,x)=>fe(X({},_),{[x.name]:""}),{})),n.addControl("customFields",m)),this.setCustomFieldFormValues(t,m,i,r)}}setOptionGroupForm(t,n,i){let r={id:t.id,createdAt:t.createdAt,updatedAt:t.updatedAt,code:t.code,name:i?.name??""},m=n.controls.find(_=>_.value.id===t.id);return m?(m.get("id")?.setValue(r.id),m.get("code")?.setValue(r.code),m.get("name")?.setValue(r.name),m.get("createdAt")?.setValue(r.createdAt),m.get("updatedAt")?.setValue(r.updatedAt)):(m=this.formBuilder.group(r),n.push(m)),m}setOptionForm(t,n,i){let r={id:t.id,createdAt:t.createdAt,updatedAt:t.updatedAt,code:t.code,name:i?.name??""},m=n.controls.find(_=>_.value.id===t.id);return m?(m.get("id")?.setValue(r.id),m.get("code")?.setValue(r.code),m.get("name")?.setValue(r.name),m.get("createdAt")?.setValue(r.createdAt),m.get("updatedAt")?.setValue(r.updatedAt)):(m=this.formBuilder.group(r),n.push(m)),m}static{this.\u0275fac=function(n){return new(n||e)(P(xt),P(dt),P(Xo),P(k),P(oa),P(ai),P(un),P(pe),P(Q))}}static{this.\u0275cmp=E({type:e,selectors:[["vdr-product-options-editor"]],standalone:!1,features:[ce],decls:24,vars:17,consts:[[3,"languageCodeChange","availableLanguageCodes","currentLanguageCode"],[1,"flex","center"],[1,"mr-2"],["clrCheckbox","","type","checkbox","id","auto-update",3,"ngModelChange","ngModel"],["class","btn btn-primary",3,"disabled","click",4,"vdrIfPermissions"],["class","form",3,"formGroup",4,"ngIf"],[1,"btn","btn-primary",3,"click","disabled"],[1,"form",3,"formGroup"],["formGroupName","optionGroups"],[3,"formArrayName","title",4,"ngFor","ngForOf"],[3,"formArrayName","title"],[3,"entity"],[1,"form-grid"],["for","name",3,"label"],["type","text","formControlName","name",3,"id","readonly"],["for","code",3,"label"],["type","text","formControlName","code",3,"id","readonly"],["formGroupName","customFields",4,"ngIf"],["id","edit-options-list",3,"items","trackByPath","itemsPerPage","currentPage","totalItems","pageChange","itemsPerPageChange",4,"ngIf"],["formGroupName","customFields"],["entityName","ProductOptionGroup",3,"customFields","customFieldsFormGroup","readonly"],["id","edit-options-list",3,"pageChange","itemsPerPageChange","items","trackByPath","itemsPerPage","currentPage","totalItems"],["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","optional"],["id","custom-fields",3,"heading","hiddenByDefault"],["type","text",3,"formControl","readonly"],["type","text",3,"formControl"],["entityName","ProductOption",3,"customFields","compact","customFieldsFormGroup","readonly"]],template:function(n,i){n&1&&(c(0,"vdr-page-header"),h(1,"vdr-page-title"),c(2,"vdr-page-header-description"),f(3),s(4,"translate"),p()(),c(5,"vdr-page-body")(6,"vdr-page-block")(7,"vdr-action-bar")(8,"vdr-ab-left")(9,"vdr-language-selector",0),s(10,"async"),s(11,"async"),C("languageCodeChange",function(m){return i.setLanguage(m)}),p()(),c(12,"vdr-ab-right")(13,"div",1)(14,"div",2)(15,"clr-checkbox-wrapper")(16,"input",3),$e("ngModelChange",function(m){return Ue(i.autoUpdateVariantNames,m)||(i.autoUpdateVariantNames=m),m}),p(),c(17,"label"),f(18),s(19,"translate"),p()()(),g(20,Bl,3,4,"button",4),p()()()(),c(21,"vdr-page-block"),g(22,ql,3,2,"form",5),s(23,"async"),p()()),n&2&&(o(3),T(d(4,7,"catalog.page-description-options-editor")),o(6),a("availableLanguageCodes",d(10,9,i.availableLanguages$))("currentLanguageCode",d(11,11,i.languageCode$)),o(7),Le("ngModel",i.autoUpdateVariantNames),o(2),T(d(19,13,"catalog.auto-update-product-variant-name")),o(2),a("vdrIfPermissions",i.updatePermission),o(2),a("ngIf",d(23,15,i.optionGroups$)))},dependencies:[Ee,ye,tt,$,B,mt,ie,Ge,Z,ve,et,Pt,Ce,be,$t,bi,Te,Pe,Ie,me,K,Re,xe,ut,ot,He,Ua,$a,La,Na,de,Dt,gt,G,R,qe,it],styles:[`.option-group-header[_ngcontent-%COMP%]{display:flex;align-items:baseline}
|
|
2
2
|
/*# sourceMappingURL=product-options-editor.component-TKPTWXC4.css.map */`],changeDetection:0})}}return e})();var yr=se(oi()),xr=se(Jt());var _r=se(oi());function Hl(e,l){e&1&&(f(0),s(1,"translate")),e&2&&v(" ",d(1,1,"catalog.create-product-option-group"),`
|
|
3
3
|
`)}function Yl(e,l){if(e&1){let t=D();c(0,"button",7),C("click",function(){b(t);let i=u();return y(i.cancel())}),f(1),s(2,"translate"),p(),c(3,"button",8),C("click",function(){b(t);let i=u();return y(i.confirm())}),f(4),s(5,"translate"),p()}if(e&2){let t=u();o(),T(d(2,3,"common.cancel")),o(2),a("disabled",t.form.invalid),o(),v(" ",d(5,5,"common.confirm")," ")}}var $n=(()=>{class e{constructor(t){this.formBuilder=t,this.form=this.formBuilder.group({name:["",Ye.required],code:["",Ye.required]})}updateCode(){let t=this.form.get("name"),n=this.form.get("code");t&&n&&n.pristine&&n.setValue((0,_r.normalizeString)(`${t.value}`,"-"))}confirm(){let{name:t,code:n}=this.form.value;!t||!n||this.resolveWith({code:n,options:[],translations:[{languageCode:this.languageCode,name:t}]})}cancel(){this.resolveWith()}static{this.\u0275fac=function(n){return new(n||e)(P(je))}}static{this.\u0275cmp=E({type:e,selectors:[["vdr-create-product-option-group-dialog"]],standalone:!1,decls:9,vars:7,consts:[["vdrDialogTitle",""],[1,"form-grid",3,"formGroup"],["for","name",3,"label"],["id","name","type","text","formControlName","name",3,"input"],["for","code",3,"label"],["id","code","type","text","formControlName","code"],["vdrDialogButtons",""],["type","button",1,"btn",3,"click"],["type","submit",1,"btn","btn-primary",3,"click","disabled"]],template:function(n,i){n&1&&(g(0,Hl,2,3,"ng-template",0),c(1,"div",1)(2,"vdr-form-field",2),s(3,"translate"),c(4,"input",3),C("input",function(){return i.updateCode()}),p()(),c(5,"vdr-form-field",4),s(6,"translate"),h(7,"input",5),p()(),g(8,Yl,6,7,"ng-template",6)),n&2&&(o(),a("formGroup",i.form),o(),a("label",d(3,3,"common.name")),o(3),a("label",d(6,5,"common.code")))},dependencies:[ie,Z,ve,Ce,be,me,K,We,Oe,R],encapsulation:2,changeDetection:0})}}return e})();var hr=se(sn());function Ql(e,l){e&1&&(f(0),s(1,"translate")),e&2&&v(" ",d(1,1,"catalog.create-product-variant"),`
|
|
4
4
|
`)}function Kl(e,l){if(e&1&&(c(0,"vdr-form-field",7),h(1,"ng-select",12),p()),e&2){let t=l.$implicit;a("label",t.name),o(),a("items",t.options)("formControlName",t.code)}}function zl(e,l){e&1&&(c(0,"clr-alert",13)(1,"clr-alert-item")(2,"span",14),f(3),s(4,"translate"),p()()()),e&2&&(a("clrAlertClosable",!1),o(3),v(" ",d(4,2,"catalog.cannot-create-variants-without-options")," "))}function Zl(e,l){if(e&1&&(c(0,"div",15)(1,"clr-alert",16)(2,"clr-alert-item")(3,"span",14),f(4),s(5,"translate"),p()()()()),e&2){let t=u();o(),a("clrAlertClosable",!1),o(3),Vo(" ",d(5,4,"catalog.product-variant-exists"),": ",t.existingVariant.name," (",t.existingVariant.sku,") ")}}function Jl(e,l){if(e&1){let t=D();c(0,"button",17),C("click",function(){b(t);let i=u();return y(i.cancel())}),f(1),s(2,"translate"),p(),c(3,"button",18),C("click",function(){b(t);let i=u();return y(i.confirm())}),f(4),s(5,"translate"),p()}if(e&2){let t=u();o(),T(d(2,3,"common.cancel")),o(2),a("disabled",t.form.invalid||t.existingVariant||t.product.optionGroups.length===0),o(),v(" ",d(5,5,"common.confirm")," ")}}var jn=(()=>{class e{constructor(t){this.formBuilder=t,this.form=this.formBuilder.group({name:["",Ye.required],sku:[""],price:[""],options:this.formBuilder.record({})})}ngOnInit(){this.currencyCode=this.product.variants[0]?.currencyCode;for(let n of this.product.optionGroups)this.form.get("options").addControl(n.code,new vt("",Ye.required));this.form.get("options").valueChanges.subscribe(n=>{let i=this.form.get("name");if(!Object.values(n).every(_=>_==null)&&n&&i&&!i.dirty){let _=Object.entries(n).map(([x,I])=>this.product.optionGroups.find(S=>S.code===x)?.options.find(S=>S.id===I)?.name).join(" ");i.setValue(`${this.product.name} ${_}`)}Object.values(n).every(_=>_!=null)&&(this.existingVariant=this.product.variants.find(_=>Object.entries(n).every(([x,I])=>_.options.find(S=>S.groupId===this.getGroupIdFromCode(x))?.id===I)))})}confirm(){let{name:t,sku:n,options:i,price:r}=this.form.value;if(!t||!i||r==null)return;let m=Object.values(i).filter(hr.notNullOrUndefined);this.resolveWith({productId:this.product.id,sku:n||"",price:Number(r),optionIds:m,translations:[{languageCode:this.product.languageCode,name:t}]})}cancel(){this.resolveWith()}getGroupCodeFromId(t){return this.product.optionGroups.find(n=>n.id===t)?.code??""}getGroupIdFromCode(t){return this.product.optionGroups.find(n=>n.code===t)?.id??""}static{this.\u0275fac=function(n){return new(n||e)(P(je))}}static{this.\u0275cmp=E({type:e,selectors:[["vdr-create-product-variant-dialog"]],standalone:!1,decls:17,vars:14,consts:[["vdrDialogTitle",""],[3,"formGroup"],["formGroupName","options",1,"form-grid"],[3,"label",4,"ngFor","ngForOf"],["clrAlertType","warning","class","form-grid-span",3,"clrAlertClosable",4,"ngIf"],["class","mt-2",4,"ngIf"],[1,"form-grid","mt-2"],[3,"label"],["type","text","formControlName","name"],["type","text","formControlName","sku"],["name","price","formControlName","price",3,"currencyCode"],["vdrDialogButtons",""],["bindLabel","name","bindValue","id","appendTo","body",3,"items","formControlName"],["clrAlertType","warning",1,"form-grid-span",3,"clrAlertClosable"],[1,"alert-text"],[1,"mt-2"],["clrAlertType","warning",1,"",3,"clrAlertClosable"],["type","button",1,"btn",3,"click"],["type","submit",1,"btn","btn-primary",3,"click","disabled"]],template:function(n,i){n&1&&(g(0,Ql,2,3,"ng-template",0),c(1,"form",1)(2,"div",2),g(3,Kl,2,3,"vdr-form-field",3)(4,zl,5,4,"clr-alert",4),p(),g(5,Zl,6,6,"div",5),c(6,"div",6)(7,"vdr-form-field",7),s(8,"translate"),h(9,"input",8),p(),c(10,"vdr-form-field",7),s(11,"translate"),h(12,"input",9),p(),c(13,"vdr-form-field",7),s(14,"translate"),h(15,"vdr-currency-input",10),p()()(),g(16,Jl,6,7,"ng-template",11)),n&2&&(o(),a("formGroup",i.form),o(2),a("ngForOf",i.product.optionGroups),o(),a("ngIf",i.product.optionGroups.length===0),o(),a("ngIf",i.existingVariant),o(2),a("label",d(8,8,"common.name")),o(3),a("label",d(11,10,"catalog.sku")),o(3),a("label",d(14,12,"catalog.price")),o(2),a("currencyCode",i.currencyCode))},dependencies:[fn,hn,vn,$,B,mt,ie,Z,ve,Ce,be,$t,Ii,Yt,me,K,We,Oe,R],encapsulation:2,changeDetection:0})}}return e})();var vr=se(Jt());var Xl=["textArea"],es=["editNameInput"];function ts(e,l){if(e&1){let t=D();c(0,"vdr-chip",7),C("iconClick",function(){let i=b(t).$implicit,r=u(2);return y(r.removeOption(i))}),c(1,"span",8)(2,"input",9,1),C("blur",function(i){let r=b(t).index,m=u(2);return y(m.updateOption(r,i))})("click",function(i){return b(t),y(i.cancelBubble=!0)}),p()(),c(4,"span",10),C("click",function(i){let r=b(t).index,m=u(2);return y(m.editName(r,i))}),f(5),p()()}if(e&2){let t=l.$implicit,n=l.last,i=l.index,r=u(2);w("selected",n&&r.lastSelected)("locked",t.locked),a("icon",t.locked?"lock":"times")("colorFrom",r.groupName),o(),a("hidden",r.editingIndex!==i),o(),a("ngModel",t.name),o(2),w("editable",!t.locked&&!t.id),a("hidden",r.editingIndex===i),o(),T(t.name)}}function is(e,l){if(e&1&&(c(0,"div",5),g(1,ts,6,12,"vdr-chip",6),p()),e&2){let t=u();o(),a("ngForOf",t.optionValues)}}var ns={provide:ra,useExisting:yo(()=>wi),multi:!0},wi=(()=>{class e{get optionValues(){return this.formValue??this.options??[]}constructor(t){this.changeDetector=t,this.groupName="",this.add=new ht,this.remove=new ht,this.edit=new ht,this.disabled=!1,this.input="",this.isFocussed=!1,this.lastSelected=!1,this.editingIndex=-1}registerOnChange(t){this.onChangeFn=t}registerOnTouched(t){this.onTouchFn=t}setDisabledState(t){this.disabled=t,this.changeDetector.markForCheck()}writeValue(t){this.formValue=t||[]}focus(){this.textArea.nativeElement.focus()}editName(t,n){let i=this.optionValues[t];if(!i.locked&&!i.id){n.cancelBubble=!0,this.editingIndex=t;let r=this.nameInputs.get(t)?.nativeElement;setTimeout(()=>r?.focus())}}updateOption(t,n){let i=this.optionValues[t],r=n.target.value;i&&(r&&(i.name=r,this.edit.emit({index:t,option:i})),this.editingIndex=-1)}removeOption(t){t.locked||(this.formValue?(this.formValue=this.formValue?.filter(n=>n.name!==t.name),this.onChangeFn(this.formValue)):this.remove.emit(t))}handleKey(t){switch(t.key){case",":case"Enter":this.addOptionValue(),t.preventDefault();break;case"Backspace":this.lastSelected?(this.removeLastOption(),this.lastSelected=!1):this.input===""&&(this.lastSelected=!0);break;default:this.lastSelected=!1}}handleBlur(){this.isFocussed=!1,this.addOptionValue()}addOptionValue(){let t=this.parseInputIntoOptions(this.input).filter(n=>!(this.options??this.formValue)?.find(r=>r?.name===n.name));if(!this.formValue&&this.options)for(let n of t)this.add.emit(n);else this.formValue=(0,vr.unique)([...this.formValue,...t]),this.onChangeFn(this.formValue);this.input=""}parseInputIntoOptions(t){return t.split(/[,\n]/).map(n=>n.trim()).filter(n=>n!=="").map(n=>({name:n,locked:!1}))}removeLastOption(){if(this.optionValues.length){let t=this.optionValues[this.optionValues.length-1];this.removeOption(t)}}static{this.\u0275fac=function(n){return new(n||e)(P(pe))}}static{this.\u0275cmp=E({type:e,selectors:[["vdr-option-value-input"]],viewQuery:function(n,i){if(n&1&&(pt(Xl,7),pt(es,5,en)),n&2){let r;Ze(r=Je())&&(i.textArea=r.first),Ze(r=Je())&&(i.nameInputs=r)}},inputs:{groupName:"groupName",options:"options",disabled:"disabled"},outputs:{add:"add",remove:"remove",edit:"edit"},standalone:!1,features:[tn([ns])],decls:4,vars:5,consts:[["textArea",""],["editNameInput",""],[1,"input-wrapper",3,"click"],["class","chips",4,"ngIf"],[3,"keyup","focus","blur","ngModelChange","ngModel","disabled"],[1,"chips"],[3,"icon","selected","locked","colorFrom","iconClick",4,"ngFor","ngForOf"],[3,"iconClick","icon","colorFrom"],[3,"hidden"],["type","text",3,"blur","click","ngModel"],[1,"option-name",3,"click","hidden"]],template:function(n,i){if(n&1){let r=D();c(0,"div",2),C("click",function(){b(r);let _=U(3);return y(_.focus())}),g(1,is,2,1,"div",3),c(2,"textarea",4,0),C("keyup",function(_){return b(r),y(i.handleKey(_))})("focus",function(){return b(r),y(i.isFocussed=!0)})("blur",function(){return b(r),y(i.handleBlur())}),$e("ngModelChange",function(_){return b(r),Ue(i.input,_)||(i.input=_),y(_)}),p()()}n&2&&(w("focus",i.isFocussed),o(),a("ngIf",0<i.optionValues.length),o(),Le("ngModel",i.input),a("disabled",i.disabled))},dependencies:[$,B,ie,Z,et,Ve,K],styles:[`.input-wrapper[_ngcontent-%COMP%]{background-color:var(--color-form-input-bg);border-radius:3px!important;border:1px solid var(--color-grey-300)!important;cursor:text}.input-wrapper.focus[_ngcontent-%COMP%]{border-color:var(--color-primary-500)!important;box-shadow:0 0 1px 1px var(--color-primary-100)}.input-wrapper[_ngcontent-%COMP%] .chips[_ngcontent-%COMP%]{padding:5px}.input-wrapper[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{border:none;width:100%;height:24px;margin-top:3px;padding:0 6px}.input-wrapper[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.input-wrapper[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:disabled{background-color:var(--color-component-bg-100)}vdr-chip[_ngcontent-%COMP%] .wrapper{margin:0 3px}vdr-chip.locked[_ngcontent-%COMP%]{opacity:.8}vdr-chip.selected[_ngcontent-%COMP%] .wrapper{border-color:var(--color-warning-500)!important;box-shadow:0 0 1px 1px var(--color-warning-400);opacity:.6}vdr-chip[_ngcontent-%COMP%] .option-name.editable[_ngcontent-%COMP%]:hover{outline:1px solid var(--color-component-bg-300);outline-offset:1px;border-radius:1px}vdr-chip[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:0!important;margin-top:-2px;margin-bottom:-2px}
|
|
@@ -356,4 +356,4 @@ import{a as oi}from"./chunk-NMJCRDXV.js";import{$ as Io,$c as sn,$d as Pi,$e as
|
|
|
356
356
|
}
|
|
357
357
|
${I0}
|
|
358
358
|
`;export{xg as ASSET_DETAIL_QUERY,Hi as ApplyFacetDialogComponent,Tr as AssetDetailComponent,Sr as AssetListComponent,di as AssignProductsToChannelDialogComponent,Yi as BulkAddFacetValuesDialogComponent,C_ as COLLECTION_DETAIL_QUERY,ch as CatalogModule,zi as CollectionBreadcrumbPipe,Qi as CollectionContentsComponent,Ki as CollectionDataTableComponent,Ur as CollectionDetailComponent,Qr as CollectionListComponent,_d as CollectionTreeComponent,oo as CollectionTreeNodeComponent,Ni as CollectionTreeService,Cd as ConfirmVariantDeletionDialogComponent,ao as CreateFacetValueDialogComponent,$n as CreateProductOptionGroupDialogComponent,jn as CreateProductVariantDialogComponent,Ud as FACET_DETAIL_QUERY,vf as FACET_LIST_QUERY,el as FacetDetailComponent,rl as FacetListComponent,Or as GET_PRODUCTS_WITH_FACET_VALUES_BY_IDS,Nf as GET_PRODUCT_DETAIL,Vr as GET_VARIANTS_WITH_FACET_VALUES_BY_IDS,so as GenerateProductVariantsComponent,br as GeneratedVariant,to as MoveCollectionsDialogComponent,ns as OPTION_VALUE_INPUT_VALUE_ACCESSOR,wi as OptionValueInputComponent,mh as PRODUCT_LIST_QUERY,fh as PRODUCT_VARIANT_DETAIL_QUERY,Vl as PRODUCT_VARIANT_DETAIL_QUERY_PRODUCT_VARIANT_FRAGMENT,yh as PRODUCT_VARIANT_LIST_QUERY,hh as PRODUCT_VARIANT_UPDATE_MUTATION,_l as ProductDetailComponent,ai as ProductDetailService,yl as ProductListComponent,Un as ProductOptionsEditorComponent,Il as ProductVariantDetailComponent,On as ProductVariantListComponent,mo as ProductVariantQuickJumpComponent,Wn as ProductVariantsEditorComponent,Pr as ProductVariantsResolver,h0 as ProductVariantsTableComponent,kr as UPDATE_PRODUCTS_BULK,Rr as UPDATE_VARIANTS_BULK,x0 as UpdateProductOptionDialogComponent,co as VariantPriceDetailComponent,po as VariantPriceStrategyDetailComponent,zr as arrayToTree,Wr as assignCollectionsToChannelBulkAction,Sl as assignFacetValuesToProductVariantsBulkAction,Cl as assignFacetValuesToProductsBulkAction,nl as assignFacetsToChannelBulkAction,Tl as assignProductVariantsToChannelBulkAction,hl as assignProductsToChannelBulkAction,Ir as createRoutes,Gr as deleteCollectionsBulkAction,il as deleteFacetsBulkAction,Fl as deleteProductVariantsBulkAction,fl as deleteProductsBulkAction,Hr as duplicateCollectionsBulkAction,al as duplicateFacetsBulkAction,bl as duplicateProductsBulkAction,jr as moveCollectionsBulkAction,hs as productOptionsEditorBreadcrumb,qr as removeCollectionsFromChannelBulkAction,ol as removeFacetsFromChannelBulkAction,gf as removeFacetsFromChannelBulkAction2,Dl as removeProductVariantsFromChannelBulkAction,vl as removeProductsFromChannelBulkAction,Nn as replaceLast};
|
|
359
|
-
//# sourceMappingURL=chunk-
|
|
359
|
+
//# sourceMappingURL=chunk-76BIVGNF.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$e as Z,$f as st,$g as _t,Ae as Ue,Af as Ye,Ba as ae,Bf as ze,Ca as f,Cf as Ze,Da as F,Ea as C,Ed as Fe,Ef as et,Fd as Be,Ff as tt,Ge,He as qe,Id as De,Jd as ke,Jg as Q,Kd as Te,Kg as lt,La as me,Ld as xe,Le as je,Lf as it,Lg as W,Ma as se,Mf as R,Nf as $,Of as M,P as ne,Pd as Ie,Pf as U,Pg as dt,Q as Y,Qa as a,Qd as Le,Qf as G,Qg as ct,Ra as s,Sa as D,T as b,U as y,Ua as pe,Ub as de,Ud as Se,Ug as ut,Va as le,Vb as ce,Vf as ot,Vg as gt,Wb as ue,Wf as nt,Xb as ge,Xf as rt,Ya as L,Za as S,Zc as O,Zf as at,Zg as ft,_ as n,_f as mt,_g as Ct,a as K,aa as B,ae as V,af as He,ah as ht,b as X,bh as vt,ca as x,ce as Ee,ch as bt,da as re,db as E,dd as fe,de as we,ee as Oe,ef as Qe,ff as We,fg as pt,ga as I,gd as Ce,ha as u,id as _e,if as Je,ja as r,jd as he,jg as q,kf as Ke,ld as N,ma as p,n as T,na as l,nb as A,ng as j,o as te,oa as g,p as ie,sa as P,ta as v,td as ve,te as Ne,ua as _,ud as be,ug as H,vd as ye,vg as ee,wb as z,wd as Pe,we as Ve,xd as Ae,xe as Re,y as oe,ye as $e,zb as w,ze as Me,zf as Xe}from"./chunk-
|
|
1
|
+
import{$e as Z,$f as st,$g as _t,Ae as Ue,Af as Ye,Ba as ae,Bf as ze,Ca as f,Cf as Ze,Da as F,Ea as C,Ed as Fe,Ef as et,Fd as Be,Ff as tt,Ge,He as qe,Id as De,Jd as ke,Jg as Q,Kd as Te,Kg as lt,La as me,Ld as xe,Le as je,Lf as it,Lg as W,Ma as se,Mf as R,Nf as $,Of as M,P as ne,Pd as Ie,Pf as U,Pg as dt,Q as Y,Qa as a,Qd as Le,Qf as G,Qg as ct,Ra as s,Sa as D,T as b,U as y,Ua as pe,Ub as de,Ud as Se,Ug as ut,Va as le,Vb as ce,Vf as ot,Vg as gt,Wb as ue,Wf as nt,Xb as ge,Xf as rt,Ya as L,Za as S,Zc as O,Zf as at,Zg as ft,_ as n,_f as mt,_g as Ct,a as K,aa as B,ae as V,af as He,ah as ht,b as X,bh as vt,ca as x,ce as Ee,ch as bt,da as re,db as E,dd as fe,de as we,ee as Oe,ef as Qe,ff as We,fg as pt,ga as I,gd as Ce,ha as u,id as _e,if as Je,ja as r,jd as he,jg as q,kf as Ke,ld as N,ma as p,n as T,na as l,nb as A,ng as j,o as te,oa as g,p as ie,sa as P,ta as v,td as ve,te as Ne,ua as _,ud as be,ug as H,vd as ye,vg as ee,wb as z,wd as Pe,we as Ve,xd as Ae,xe as Re,y as oe,ye as $e,zb as w,ze as Me,zf as Xe}from"./chunk-WTLUBTCI.js";function $t(t,m){if(t&1){let e=P();p(0,"button",27),v("click",function(){b(e);let i=_();return y(i.create())}),f(1),a(2,"translate"),l()}if(t&2){let e=_();r("disabled",!e.saveButtonEnabled()),n(),C(" ",s(2,2,"common.create")," ")}}function Mt(t,m){if(t&1){let e=P();p(0,"button",27),v("click",function(){b(e);let i=_(2);return y(i.save())}),f(1),a(2,"translate"),l()}if(t&2){let e=_(2);r("disabled",!e.saveButtonEnabled()),n(),C(" ",s(2,2,"common.update")," ")}}function Ut(t,m){t&1&&u(0,Mt,3,4,"button",28),t&2&&r("vdrIfPermissions","UpdatePromotion")}function Gt(t,m){t&1&&(p(0,"vdr-card")(1,"clr-toggle-wrapper"),g(2,"input",29),p(3,"label"),f(4),a(5,"translate"),l()()()),t&2&&(n(4),F(s(5,1,"common.enabled")))}function qt(t,m){if(t&1&&(p(0,"vdr-card"),g(1,"vdr-page-entity-info",30),l()),t&2){let e=m.ngIf;n(),r("entity",e)}}function jt(t,m){if(t&1&&(p(0,"vdr-card",31),a(1,"translate"),g(2,"vdr-tabbed-custom-fields",32),a(3,"hasPermission"),l()),t&2){let e=_();r("title",s(1,4,"common.custom-fields")),n(2),r("customFields",e.customFields)("customFieldsFormGroup",e.detailForm.get("customFields"))("readonly",!s(3,6,"UpdatePromotion"))}}function Ht(t,m){if(t&1){let e=P();p(0,"div")(1,"vdr-configurable-input",33),a(2,"hasPermission"),v("remove",function(i){b(e);let d=_();return y(d.removeCondition(i))}),l()()}if(t&2){let e=m.$implicit,o=m.index,i=_();n(),r("position",o)("readonly",!s(2,5,"UpdatePromotion"))("operation",e)("operationDefinition",i.getConditionDefinition(e))("formControlName",o)}}function Qt(t,m){if(t&1){let e=P();p(0,"button",38),v("click",function(){let i=b(e).$implicit,d=_(2);return y(d.addCondition(i))}),f(1),l()}if(t&2){let e=m.$implicit;n(),C(" ",e.description," ")}}function Wt(t,m){if(t&1&&(p(0,"vdr-dropdown")(1,"button",34),g(2,"clr-icon",35),f(3),a(4,"translate"),l(),p(5,"vdr-dropdown-menu",36),u(6,Qt,2,1,"button",37),l()()),t&2){let e=_();n(3),C(" ",s(4,2,"marketing.add-condition")," "),n(3),r("ngForOf",e.getAvailableConditions())}}function Jt(t,m){if(t&1){let e=P();p(0,"div")(1,"vdr-configurable-input",39),a(2,"hasPermission"),v("remove",function(i){b(e);let d=_();return y(d.removeAction(i))}),l()()}if(t&2){let e=m.$implicit,o=m.index,i=_();n(),r("position",o)("operation",e)("readonly",!s(2,5,"UpdatePromotion"))("operationDefinition",i.getActionDefinition(e))("formControlName",o)}}function Kt(t,m){if(t&1){let e=P();p(0,"button",38),v("click",function(){let i=b(e).$implicit,d=_(2);return y(d.addAction(i))}),f(1),l()}if(t&2){let e=m.$implicit;n(),C(" ",e.description," ")}}function Xt(t,m){if(t&1&&(p(0,"vdr-dropdown")(1,"button",34),g(2,"clr-icon",35),f(3),a(4,"translate"),l(),p(5,"vdr-dropdown-menu",36),u(6,Kt,2,1,"button",37),l()()),t&2){let e=_();n(3),C(" ",s(4,2,"marketing.add-action")," "),n(3),r("ngForOf",e.getAvailableActions())}}var Oi=A`
|
|
2
2
|
query GetPromotionDetail($id: ID!) {
|
|
3
3
|
promotion(id: $id) {
|
|
4
4
|
...Promotion
|
|
@@ -32,4 +32,4 @@ import{$e as Z,$f as st,$g as _t,Ae as Ue,Af as Ye,Ba as ae,Bf as ze,Ca as f,Cf
|
|
|
32
32
|
${O}
|
|
33
33
|
`,kt=(()=>{class t extends ut{constructor(){super(),this.dataTableListId="promotion-list",this.customFields=this.getCustomFieldConfig("Promotion"),this.filters=this.createFilterCollection().addIdFilter().addDateFilters().addFilters([{name:"startsAt",type:{kind:"dateRange"},label:"marketing.starts-at",filterField:"startsAt"},{name:"endsAt",type:{kind:"dateRange"},label:"marketing.ends-at",filterField:"endsAt"},{name:"enabled",type:{kind:"boolean"},label:"common.enabled",filterField:"enabled"},{name:"name",type:{kind:"text"},label:"common.name",filterField:"name"},{name:"couponCode",type:{kind:"text"},label:"marketing.coupon-code",filterField:"couponCode"},{name:"desc",type:{kind:"text"},label:"common.description",filterField:"description"},{name:"perCustomerUsageLimit",type:{kind:"number"},label:"marketing.per-customer-limit",filterField:"perCustomerUsageLimit"},{name:"usageLimit",type:{kind:"number"},label:"marketing.usage-limit",filterField:"usageLimit"}]).addCustomFieldFilters(this.customFields).connectToRoute(this.route),this.sorts=this.createSortCollection().defaultSort("createdAt","DESC").addSorts([{name:"createdAt"},{name:"updatedAt"},{name:"startsAt"},{name:"endsAt"},{name:"name"},{name:"couponCode"},{name:"perCustomerUsageLimit"},{name:"usageLimit"}]).addCustomFieldSorts(this.customFields).connectToRoute(this.route),super.configure({document:ge,getItems:e=>e.promotions,setVariables:(e,o)=>this.createQueryOptions(e,o,this.searchTermControl.value),refreshListOnChanges:[this.filters.valueChanges,this.sorts.valueChanges]})}createQueryOptions(e,o,i){let d=this.filters.createFilterInput(),c=this.sorts.createSortInput(),h=z.AND;return i&&(d.couponCode={contains:i},d.name={contains:i},h=z.OR),{options:{skip:e,take:o,filter:d,filterOperator:h,sort:c}}}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["vdr-promotion-list"]],standalone:!1,features:[I],decls:49,vars:72,consts:[[3,"languageCodeChange","availableLanguageCodes","currentLanguageCode"],["locationId","promotion-list"],["class","btn btn-primary",3,"routerLink",4,"vdrIfPermissions"],[3,"pageChange","itemsPerPageChange","visibleColumnsChange","id","items","itemsPerPage","totalItems","currentPage","filters"],["locationId","promotion-list",3,"hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault","sort"],["id","updated-at",3,"heading","hiddenByDefault","sort"],["id","name",3,"heading","optional","sort"],["id","enabled",3,"heading"],["id","coupon-code",3,"heading","sort"],["id","starts-at",3,"heading","sort"],["id","ends-at",3,"heading","sort"],["id","per-customer-limit",3,"heading","sort","hiddenByDefault"],["id","usage-limit",3,"heading","sort","hiddenByDefault"],[3,"customField","sorts",4,"ngFor","ngForOf"],[1,"btn","btn-primary",3,"routerLink"],["shape","plus"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],["colorType","success",4,"ngIf"],["colorType","warning",4,"ngIf"],["colorType","success"],["colorType","warning"],[3,"customField","sorts"]],template:function(o,i){o&1&&(p(0,"vdr-page-block")(1,"vdr-action-bar")(2,"vdr-ab-left")(3,"vdr-language-selector",0),a(4,"async"),a(5,"async"),v("languageCodeChange",function(c){return i.setLanguage(c)}),l()(),p(6,"vdr-ab-right"),g(7,"vdr-action-bar-items",1),u(8,Zt,4,5,"a",2),g(9,"vdr-action-bar-dropdown-menu",1),l()()(),p(10,"vdr-data-table-2",3),a(11,"async"),a(12,"async"),a(13,"async"),a(14,"async"),v("pageChange",function(c){return i.setPageNumber(c)})("itemsPerPageChange",function(c){return i.setItemsPerPage(c)})("visibleColumnsChange",function(c){return i.setVisibleColumns(c)}),g(15,"vdr-bulk-action-menu",4)(16,"vdr-dt2-search",5),a(17,"translate"),p(18,"vdr-dt2-column",6),a(19,"translate"),u(20,ei,1,1,"ng-template"),l(),p(21,"vdr-dt2-column",7),a(22,"translate"),u(23,ti,2,4,"ng-template"),l(),p(24,"vdr-dt2-column",8),a(25,"translate"),u(26,ii,2,4,"ng-template"),l(),p(27,"vdr-dt2-column",9),a(28,"translate"),u(29,oi,4,4,"ng-template"),l(),p(30,"vdr-dt2-column",10),a(31,"translate"),u(32,ai,2,2,"ng-template"),l(),p(33,"vdr-dt2-column",11),a(34,"translate"),u(35,mi,1,1,"ng-template"),l(),p(36,"vdr-dt2-column",12),a(37,"translate"),u(38,si,2,4,"ng-template"),l(),p(39,"vdr-dt2-column",13),a(40,"translate"),u(41,pi,2,4,"ng-template"),l(),p(42,"vdr-dt2-column",14),a(43,"translate"),u(44,li,1,1,"ng-template"),l(),p(45,"vdr-dt2-column",15),a(46,"translate"),u(47,di,1,1,"ng-template"),l(),u(48,ci,1,2,"vdr-dt2-custom-field-column",16),l()),o&2&&(n(3),r("availableLanguageCodes",s(4,38,i.availableLanguages$))("currentLanguageCode",s(5,40,i.contentLanguage$)),n(5),r("vdrIfPermissions","CreatePromotion"),n(2),r("id",i.dataTableListId)("items",s(11,42,i.items$))("itemsPerPage",s(12,44,i.itemsPerPage$))("totalItems",s(13,46,i.totalItems$))("currentPage",s(14,48,i.currentPage$))("filters",i.filters),n(5),r("hostComponent",i)("selectionManager",i.selectionManager),n(),r("searchTermControl",i.searchTermControl)("searchTermPlaceholder",s(17,50,"marketing.search-by-name-or-coupon-code")),n(2),r("heading",s(19,52,"common.id"))("hiddenByDefault",!0),n(3),r("heading",s(22,54,"common.created-at"))("hiddenByDefault",!0)("sort",i.sorts.get("createdAt")),n(3),r("heading",s(25,56,"common.updated-at"))("hiddenByDefault",!0)("sort",i.sorts.get("updatedAt")),n(3),r("heading",s(28,58,"common.name"))("optional",!1)("sort",i.sorts.get("name")),n(3),r("heading",s(31,60,"common.enabled")),n(3),r("heading",s(34,62,"marketing.coupon-code"))("sort",i.sorts.get("couponCode")),n(3),r("heading",s(37,64,"marketing.starts-at"))("sort",i.sorts.get("startsAt")),n(3),r("heading",s(40,66,"marketing.ends-at"))("sort",i.sorts.get("endsAt")),n(3),r("heading",s(43,68,"marketing.per-customer-limit"))("sort",i.sorts.get("perCustomerUsageLimit"))("hiddenByDefault",!0),n(3),r("heading",s(46,70,"marketing.usage-limit"))("sort",i.sorts.get("usageLimit"))("hiddenByDefault",!0),n(3),r("ngForOf",i.customFields))},dependencies:[V,L,S,_e,G,M,U,Q,Je,q,R,$,nt,pt,at,st,mt,j,E,N,je],styles:[`.search-form[_ngcontent-%COMP%]{padding:0}.search-input[_ngcontent-%COMP%]{margin:6px 8px 0 0;min-width:200px}
|
|
34
34
|
/*# sourceMappingURL=promotion-list.component-JSB66AXJ.css.map */`],changeDetection:0})}}return t})();var Tt=t=>[{path:"promotions",component:ee,data:{locationId:"promotion-list",breadcrumb:"breadcrumb.promotions"},children:t.getPageTabRoutes("promotion-list")},{path:"promotions/:id",component:ee,data:{locationId:"promotion-detail",breadcrumb:{label:"breadcrumb.promotions",link:["../","promotions"]}},children:t.getPageTabRoutes("promotion-detail")}];function oo(t,m){return gt({entity:t.entity,id:m.id,breadcrumbKey:"breadcrumb.promotions",getName:e=>e.name,route:"promotions"})}var co=(()=>{class t{static{this.hasRegisteredTabsAndBulkActions=!1}constructor(e,o){t.hasRegisteredTabsAndBulkActions||(e.registerBulkAction(Ft),e.registerBulkAction(Dt),e.registerBulkAction(Bt),e.registerBulkAction(At),o.registerPageTab({priority:0,location:"promotion-list",tab:"breadcrumb.promotions",route:"",component:kt}),o.registerPageTab({priority:0,location:"promotion-detail",tab:"marketing.promotion",route:"",component:ct({component:Pt,query:de,entityKey:"promotion",getBreadcrumbs:i=>[{label:i?i.name:"marketing.create-new-promotion",link:[i?.id]}]})}),t.hasRegisteredTabsAndBulkActions=!0)}static{this.\u0275fac=function(o){return new(o||t)(Y(ot),Y(H))}}static{this.\u0275mod=re({type:t})}static{this.\u0275inj=ne({providers:[{provide:Ce,useFactory:e=>Tt(e),multi:!0,deps:[H]}],imports:[W,he.forChild([]),W,W]})}}return t})();export{Oi as GET_PROMOTION_DETAIL,eo as GET_PROMOTION_LIST,co as MarketingModule,Pt as PromotionDetailComponent,kt as PromotionListComponent,Ft as assignPromotionsToChannelBulkAction,Tt as createRoutes,At as deletePromotionsBulkAction,Dt as duplicatePromotionsBulkAction,oo as promotionBreadcrumb,Bt as removePromotionsFromChannelBulkAction};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-FGYOZRAU.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$a as qn,$b as Jn,$c as mt,$f as Or,A as Dn,Aa as Ct,Ab as vt,Ae as We,Af as Fi,B as ni,Ba as X,Bd as H,Bf as wt,Bg as $i,Ca as u,Cd as pe,Ce as Di,Cf as Pt,Da as v,Dd as oe,De as ur,Df as rt,E as wn,Ea as g,Ed as St,Ef as ye,Eg as Fr,F as Pn,Fa as ie,Fd as $e,Fe as He,Ff as Ei,Ga as di,Gd as nr,Ge as U,H as ri,Ha as R,Hd as Ot,He as ve,I as L,Ia as N,Id as Ze,Ie as Y,Ja as $,Jc as ko,Jf as Ue,Jg as kt,K as pn,L as Ye,La as Gt,Ld as It,Le as he,Lg as Er,Ma as A,Mb as zn,Md as rr,Me as k,Mf as Bi,Na as Ee,Nd as or,Nf as Mt,O as oi,Oa as sn,Od as ar,Oe as Ao,Of as Ft,P as Mn,Pa as Rn,Pc as Kn,Pd as et,Pf as ot,Pg as Lt,Q as Le,Qa as d,Qd as je,Qf as at,Qg as ji,Ra as s,Rd as gi,Rf as ki,S as Ae,Sa as x,T as h,Tc as Zn,Td as un,Te as fr,U as y,Ua as ee,Ud as lr,Ue as wi,Ug as Br,V as ai,Va as Re,Vd as Tt,W as J,Wa as Nn,Wd as Ci,Wf as Sr,X as Fn,Xa as $n,Xf as Li,Ya as M,Yb as Yn,Yf as Et,Z as xe,Za as w,Zb as Xn,Zf as Ge,_ as r,_a as jn,_b as mi,_f as Ai,a as G,aa as P,ab as Wn,ac as ui,ad as Lo,ae as B,ag as Ir,b as se,ba as En,bb as pi,bd as er,be as vi,bf as _r,bg as Tr,bh as kr,c as In,ca as O,cb as si,cd as ht,ce as Ce,cf as gr,cg as Dr,da as Bn,db as W,dd as K,de as dr,df as Cr,e as Be,ee as tt,eh as qi,ff as vr,fg as lt,g as ke,ga as Ie,gb as Hn,gd as tr,ge as pr,gf as hr,gg as wr,h as Ut,ha as f,hb as ci,hd as fi,he as sr,hf as Dt,hg as Qe,i as Fe,ia as Ve,ib as Un,id as Ne,ie as hi,if as ue,ig as Pr,ja as o,jd as ir,je as yi,k as ce,ka as kn,ke as xi,kg as fe,la as Q,ld as I,le as bi,lg as Mr,ma as a,me as Si,mg as dt,n as _e,na as l,nb as be,nd as _i,ne as Oi,ng as pt,o as Tn,oa as _,oe as cr,pa as T,pe as mr,q as Zt,qa as D,qb as Gn,qd as yt,qe as Ii,qf as yr,r as ei,ra as Je,rb as Qn,re as Ti,sa as S,sb as cn,sf as xr,ta as b,tb as q,td as xt,te as it,tf as Pe,ua as m,ud as ne,ue as ae,uf as Pi,ug as Vi,v as ti,va as Ln,vd as re,ve as te,vg as Bt,wa as An,wb as mn,wd as z,we as qe,wg as Ri,x as _t,xa as Vn,xd as Ke,xe as Te,xf as br,xg as Ni,y as Oe,ya as li,yb as ct,yd as bt,ye as De,yf as Mi,z as ii,za as gt,zd as me,ze as we,zf as nt}from"./chunk-
|
|
1
|
+
import{$a as qn,$b as Jn,$c as mt,$f as Or,A as Dn,Aa as Ct,Ab as vt,Ae as We,Af as Fi,B as ni,Ba as X,Bd as H,Bf as wt,Bg as $i,Ca as u,Cd as pe,Ce as Di,Cf as Pt,Da as v,Dd as oe,De as ur,Df as rt,E as wn,Ea as g,Ed as St,Ef as ye,Eg as Fr,F as Pn,Fa as ie,Fd as $e,Fe as He,Ff as Ei,Ga as di,Gd as nr,Ge as U,H as ri,Ha as R,Hd as Ot,He as ve,I as L,Ia as N,Id as Ze,Ie as Y,Ja as $,Jc as ko,Jf as Ue,Jg as kt,K as pn,L as Ye,La as Gt,Ld as It,Le as he,Lg as Er,Ma as A,Mb as zn,Md as rr,Me as k,Mf as Bi,Na as Ee,Nd as or,Nf as Mt,O as oi,Oa as sn,Od as ar,Oe as Ao,Of as Ft,P as Mn,Pa as Rn,Pc as Kn,Pd as et,Pf as ot,Pg as Lt,Q as Le,Qa as d,Qd as je,Qf as at,Qg as ji,Ra as s,Rd as gi,Rf as ki,S as Ae,Sa as x,T as h,Tc as Zn,Td as un,Te as fr,U as y,Ua as ee,Ud as lr,Ue as wi,Ug as Br,V as ai,Va as Re,Vd as Tt,W as J,Wa as Nn,Wd as Ci,Wf as Sr,X as Fn,Xa as $n,Xf as Li,Ya as M,Yb as Yn,Yf as Et,Z as xe,Za as w,Zb as Xn,Zf as Ge,_ as r,_a as jn,_b as mi,_f as Ai,a as G,aa as P,ab as Wn,ac as ui,ad as Lo,ae as B,ag as Ir,b as se,ba as En,bb as pi,bd as er,be as vi,bf as _r,bg as Tr,bh as kr,c as In,ca as O,cb as si,cd as ht,ce as Ce,cf as gr,cg as Dr,da as Bn,db as W,dd as K,de as dr,df as Cr,e as Be,ee as tt,eh as qi,ff as vr,fg as lt,g as ke,ga as Ie,gb as Hn,gd as tr,ge as pr,gf as hr,gg as wr,h as Ut,ha as f,hb as ci,hd as fi,he as sr,hf as Dt,hg as Qe,i as Fe,ia as Ve,ib as Un,id as Ne,ie as hi,if as ue,ig as Pr,ja as o,jd as ir,je as yi,k as ce,ka as kn,ke as xi,kg as fe,la as Q,ld as I,le as bi,lg as Mr,ma as a,me as Si,mg as dt,n as _e,na as l,nb as be,nd as _i,ne as Oi,ng as pt,o as Tn,oa as _,oe as cr,pa as T,pe as mr,q as Zt,qa as D,qb as Gn,qd as yt,qe as Ii,qf as yr,r as ei,ra as Je,rb as Qn,re as Ti,sa as S,sb as cn,sf as xr,ta as b,tb as q,td as xt,te as it,tf as Pe,ua as m,ud as ne,ue as ae,uf as Pi,ug as Vi,v as ti,va as Ln,vd as re,ve as te,vg as Bt,wa as An,wb as mn,wd as z,we as qe,wg as Ri,x as _t,xa as Vn,xd as Ke,xe as Te,xf as br,xg as Ni,y as Oe,ya as li,yb as ct,yd as bt,ye as De,yf as Mi,z as ii,za as gt,zd as me,ze as we,zf as nt}from"./chunk-WTLUBTCI.js";var Lr=Be(mt());function Wi(t){return(t||[]).filter(e=>e.state==="Settled").map((e,i)=>{let n=e.amount-(0,Lr.summate)(e.refunds.filter(c=>c.state!=="Failed"),"total");return se(G({},e),{refundableAmount:n,amountToRefundControl:new H(0,{nonNullable:!0,validators:[re.min(0),re.max(n)]}),selected:i===0})})}function Vo(t,p){t&1&&(u(0),d(1,"translate")),t&2&&v(s(1,1,"order.add-payment-to-order"))}function Ro(t,p){if(t&1){let e=S();a(0,"button",7),b("click",function(){h(e);let n=m();return y(n.cancel())}),u(1),d(2,"translate"),l(),a(3,"button",8),b("click",function(){h(e);let n=m();return y(n.submit())}),u(4),d(5,"translate"),d(6,"localeCurrency"),l()}if(t&2){let e=m();r(),v(s(2,4,"common.cancel")),r(2),o("disabled",e.form.invalid||e.form.pristine),r(),ie(" ",s(5,6,"order.add-payment")," (",x(6,8,e.outstandingAmount,e.currencyCode),") ")}}var qm=be`
|
|
2
2
|
query GetAddManualPaymentMethodList($options: PaymentMethodListOptions!) {
|
|
3
3
|
paymentMethods(options: $options) {
|
|
4
4
|
items {
|
|
@@ -127,4 +127,4 @@ import{$a as qn,$b as Jn,$c as mt,$f as Or,A as Dn,Aa as Ct,Ab as vt,Ae as We,Af
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
`,Kt=(()=>{class t{constructor(e,i){this.dataService=e,this.router=i}canActivate(e,i){let n=i.url.includes("orders/draft"),c=i.url.includes("/modify"),C=e.paramMap.get("id");return n?C==="create"?this.dataService.order.createDraftOrder().pipe(_e(({createDraftOrder:F})=>this.router.parseUrl(`/orders/draft/${F.id}`))):!0:this.dataService.query(Lm,{id:C}).single$.pipe(_e(({order:F})=>F?.state==="Modifying"&&!c?this.router.parseUrl(`/orders/${C}/modify`):!0))}static{this.\u0275fac=function(i){return new(i||t)(Le(K),Le(fi))}}static{this.\u0275prov=oi({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Bo=t=>[{path:"",component:Bt,data:{locationId:"order-list",breadcrumb:"breadcrumb.orders"},children:t.getPageTabRoutes("order-list")},{path:"draft/:id",component:Bt,canActivate:[Kt],data:{locationId:"draft-order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("draft-order-detail")},{path:":id",component:Bt,canActivate:[Kt],data:{locationId:"order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("order-detail")},{path:":aggregateOrderId/seller-orders/:id",component:Bt,canActivate:[Kt],data:{locationId:"order-detail",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("order-detail")},{path:":id/modify",component:Bt,canActivate:[Kt],data:{locationId:"modify-order",breadcrumb:{label:"breadcrumb.orders",link:["../"]}},children:t.getPageTabRoutes("modify-order")}];var Sg=(()=>{class t{static{this.hasRegisteredTabsAndBulkActions=!1}constructor(e){t.hasRegisteredTabsAndBulkActions||(e.registerPageTab({priority:0,location:"order-list",tab:"order.orders",route:"",component:Eo}),e.registerPageTab({priority:0,location:"order-detail",tab:"order.order",route:"",component:ji({component:Do,query:mi,entityKey:"order",getBreadcrumbs:i=>i?.type!==ct.Seller||!i?.aggregateOrder?[{label:`${i?.code}`,link:[i?.id]}]:[{label:`${i?.aggregateOrder?.code}`,link:["/orders/",i?.aggregateOrder?.id]},{label:"breadcrumb.seller-orders",link:["/orders/",i?.aggregateOrder?.id]},{label:`${i?.code}`,link:[i?.id]}]})}),e.registerPageTab({priority:0,location:"draft-order-detail",tab:"order.order",route:"",component:ji({component:Jr,query:mi,entityKey:"order",getBreadcrumbs:i=>[{label:"order.draft-order",link:[i?.id]}]})}),e.registerPageTab({priority:0,location:"modify-order",tab:"order.order",route:"",component:ji({component:Fo,query:mi,entityKey:"order",getBreadcrumbs:i=>[{label:i?.code||"order",link:["/orders/",i?.id]},{label:"breadcrumb.modifying-order",link:[i?.id]}]})}),t.hasRegisteredTabsAndBulkActions=!0)}static{this.\u0275fac=function(i){return new(i||t)(Le(Vi))}}static{this.\u0275mod=Bn({type:t})}static{this.\u0275inj=Mn({providers:[{provide:tr,useFactory:e=>Bo(e),multi:!0,deps:[Vi]}],imports:[Er,ir.forChild([])]})}}return t})();export{Ar as AddManualPaymentDialogComponent,Vr as CancelOrderDialogComponent,Ui as CouponCodeSelectorComponent,Jr as DraftOrderDetailComponent,Ur as DraftOrderVariantSelectorComponent,Kr as FulfillOrderDialogComponent,no as FulfillmentCardComponent,Zi as FulfillmentDetailComponent,to as FulfillmentStateLabelComponent,n0 as GET_COUPON_CODE_SELECTOR_PROMOTION_LIST,qf as GET_CUSTOMER_ADDRESSES,Lm as GET_ORDER_STATE,Oo as GET_SELLER_ORDERS,Xi as LineFulfillmentComponent,Nt as LineRefundsComponent,ro as ModificationDetailComponent,en as NODE_HEIGHT,_f as ORDER_DETAIL_QUERY,jr as OrderCustomFieldsCardComponent,Hr as OrderDataTableComponent,Do as OrderDetailComponent,st as OrderEditResultType,Fo as OrderEditorComponent,Po as OrderEditsPreviewDialogComponent,Kt as OrderGuard,So as OrderHistoryComponent,ho as OrderHistoryEntryHostComponent,Eo as OrderListComponent,an as OrderModificationSummaryComponent,Sg as OrderModule,vo as OrderPaymentCardComponent,oo as OrderProcessEdgeComponent,ao as OrderProcessGraphComponent,lo as OrderProcessGraphDialogComponent,tn as OrderProcessNodeComponent,$r as OrderStateSelectDialogComponent,$t as OrderTableComponent,Ji as OrderTotalColumnComponent,Vt as OrderTransitionService,rn as PaymentDetailComponent,nn as PaymentForRefundSelectorComponent,_o as PaymentStateLabelComponent,Rf as RefundDetailComponent,uo as RefundOrderDialogComponent,go as RefundStateLabelComponent,gf as SET_ORDER_CUSTOMER_MUTATION,fn as SelectAddressDialogComponent,Qi as SelectCustomerDialogComponent,Yi as SelectShippingMethodDialogComponent,To as SellerOrdersCardComponent,fo as SettleRefundDialogComponent,qt as SimpleItemListComponent,Bo as createRoutes,Wi as getRefundablePayments};
|
|
130
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-HALOMDXR.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as u}from"./chunk-WTLUBTCI.js";var g=u(r=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.normalizeString=n;function n(l,e=" "){let t=new RegExp(`([${e}]){2,}`,"g");return(l||"").normalize("NFD").replace(/[\u00df]/g,"ss").replace(/[\u1e9e]/g,"SS").replace(/[\u0308]/g,"e").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[!"£$%^&*()+[\]{};:@#~?\\/,|><`¬'=‘’©®™]/g,"").replace(/\s+/g,e).replace(t,e)}});export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HXII46JU.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Ad as Z,Be as ie,Ca as l,Da as w,Dd as q,Ea as h,Ed as J,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 K,Z as u,Za as B,Ze as oe,_ as r,aa as d,ca as L,ce as Q,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 F,re as ne,se as te,ta as j,td as D,ua as f,ud as G,wd as H,xd as X}from"./chunk-ZKCUFE4K.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(F))}}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,Q,$,Y,B,J,G,D,H,X,q,Z,K,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 Z,Be as ie,Ca as l,Da as w,Dd as q,Ea as h,Ed as J,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 K,Z as u,Za as B,Ze as oe,_ as r,aa as d,ca as L,ce as Q,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 F,re as ne,se as te,ta as j,td as D,ua as f,ud as G,wd as H,xd as X}from"./chunk-WTLUBTCI.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(F))}}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,Q,$,Y,B,J,G,D,H,X,q,Z,K,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-6SNVXFGV.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-
|
|
3
|
+
//# sourceMappingURL=chunk-MJPETYNC.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$c as pt,$d as Be,Aa as ye,Ab as Se,Ae,B as G,Be as Fe,Ca as m,Da as k,Df as Ne,Ea as f,Ef as Ue,Eg as Y,F as re,Fa as A,Gg as Ze,H as me,I as R,L as ge,Le as je,Lg as K,Ma as F,Me as Q,Mf as Ge,Mg as V,P as b,Q as ue,Qa as d,Ra as c,Rb as Oe,Sa as $,Sb as Te,T as _,Tb as Me,U as v,Ua as xe,Va as we,Wa as be,Ya as De,Yd as Le,Yf as qe,Za as B,Zd as Pe,Zf as ze,_ as n,_d as $e,a as ae,aa as x,ae as L,b as de,ba as fe,ca as y,da as D,db as S,dd as O,dh as Z,e as se,ed as We,f as ce,fg as He,g as pe,h as U,ha as u,id as Ie,ja as p,jd as ke,jf as lt,la as W,ld as T,ma as o,mg as Qe,n as M,na as a,nb as E,nd as H,ng as Ye,o as le,oa as h,rg as Ke,sa as I,ta as C,ua as g,va as he,wa as _e,xb as q,xe as Ee,ya as ve,ye as Ve,za as Ce,zb as z,ze as Re}from"./chunk-
|
|
1
|
+
import{$c as pt,$d as Be,Aa as ye,Ab as Se,Ae,B as G,Be as Fe,Ca as m,Da as k,Df as Ne,Ea as f,Ef as Ue,Eg as Y,F as re,Fa as A,Gg as Ze,H as me,I as R,L as ge,Le as je,Lg as K,Ma as F,Me as Q,Mf as Ge,Mg as V,P as b,Q as ue,Qa as d,Ra as c,Rb as Oe,Sa as $,Sb as Te,T as _,Tb as Me,U as v,Ua as xe,Va as we,Wa as be,Ya as De,Yd as Le,Yf as qe,Za as B,Zd as Pe,Zf as ze,_ as n,_d as $e,a as ae,aa as x,ae as L,b as de,ba as fe,ca as y,da as D,db as S,dd as O,dh as Z,e as se,ed as We,f as ce,fg as He,g as pe,h as U,ha as u,id as Ie,ja as p,jd as ke,jf as lt,la as W,ld as T,ma as o,mg as Qe,n as M,na as a,nb as E,nd as H,ng as Ye,o as le,oa as h,rg as Ke,sa as I,ta as C,ua as g,va as he,wa as _e,xb as q,xe as Ee,ya as ve,ye as Ve,za as Ce,zb as z,ze as Re}from"./chunk-WTLUBTCI.js";var Xe=se(pt());var mt=["portal"],gt=["*"];function ut(i,l){i&1&&_e(0)}function ft(i,l){}var Je=(()=>{class i{ngAfterViewInit(){this.loadWidget()}loadWidget(){return ce(this,null,function*(){let e=this.widgetConfig.loadComponent(),t=e instanceof Promise?yield e:e;this.componentRef=this.portal.createComponent(t),this.componentRef.changeDetectorRef.detectChanges()})}ngOnDestroy(){this.componentRef&&this.componentRef.destroy()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-dashboard-widget"]],viewQuery:function(t,r){if(t&1&&ve(mt,5,fe),t&2){let s;Ce(s=ye())&&(r.portal=s.first)}},inputs:{widgetConfig:"widgetConfig"},standalone:!1,ngContentSelectors:gt,decls:5,vars:3,consts:[["portal",""],[3,"title"],["vdrCardControls",""]],template:function(t,r){if(t&1&&(he(),o(0,"vdr-card",1),d(1,"translate"),u(2,ut,1,0,"ng-template",2)(3,ft,0,0,"ng-template",null,0,xe),a()),t&2){let s;p("title",c(1,1,(s=r.widgetConfig.title)!==null&&s!==void 0?s:""))}},dependencies:[Ue,Ne,T],styles:[`[_nghost-%COMP%]{display:block}.card[_ngcontent-%COMP%]{margin-top:0;min-height:200px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between}
|
|
2
2
|
/*# sourceMappingURL=dashboard-widget.component-QZMAFGFD.css.map */`],changeDetection:0})}}return i})();var _t=i=>({index:i}),vt=i=>({width:i});function Ct(i,l){if(i&1){let e=I();o(0,"button",8),C("click",function(){let r=_(e).$implicit,s=g();return v(s.addWidget(r.id))}),m(1),d(2,"translate"),a()}if(i&2){let e,t=l.$implicit;n(),f(" ",c(2,1,(e=t.config.title)!==null&&e!==void 0?e:t.id)," ")}}function yt(i,l){if(i&1){let e=I();o(0,"button",22),C("click",function(){let r=_(e).$implicit,s=g(2).$implicit,w=g(2);return v(w.setWidgetWidth(s,r))}),m(1),d(2,"translate"),a()}if(i&2){let e=l.$implicit,t=g(2).$implicit;p("disabled",e===t.width),n(),f(" ",$(2,2,"dashboard.widget-width",F(5,vt,e))," ")}}function xt(i,l){if(i&1){let e=I();o(0,"vdr-dashboard-widget",13)(1,"div",14)(2,"div",15),h(3,"clr-icon",16),a(),o(4,"vdr-dropdown")(5,"button",17),h(6,"clr-icon",3),a(),o(7,"vdr-dropdown-menu",4)(8,"h4",18),m(9),d(10,"translate"),a(),u(11,yt,3,7,"button",19),h(12,"div",20),o(13,"button",8),C("click",function(){_(e);let r=g().$implicit,s=g(2);return v(s.removeWidget(r))}),h(14,"clr-icon",21),m(15),d(16,"translate"),a()()()()()}if(i&2){let e=g().$implicit,t=g(2);p("widgetConfig",e.config),n(9),k(c(10,4,"dashboard.widget-resize")),n(2),p("ngForOf",t.getSupportedWidths(e.config)),n(4),f(" ",c(16,6,"dashboard.remove-widget")," ")}}function wt(i,l){if(i&1&&(o(0,"div",11),u(1,xt,17,8,"vdr-dashboard-widget",12),a()),i&2){let e=l.$implicit,t=g(2);p("ngClass",t.getClassForWidth(e.width))("cdkDragData",e),n(),p("vdrIfPermissions",e.config.requiresPermissions||null)}}function bt(i,l){if(i&1){let e=I();o(0,"div",9),C("cdkDropListDropped",function(r){_(e);let s=g();return v(s.drop(r))}),u(1,wt,2,3,"div",10),a()}if(i&2){let e=l.$implicit,t=l.index,r=g();p("cdkDropListData",F(3,_t,t)),n(),p("ngForOf",e)("ngForTrackBy",r.trackRowItem)}}var et=(()=>{class i{constructor(e,t,r,s){this.dashboardWidgetService=e,this.localStorageService=t,this.changedDetectorRef=r,this.dataService=s,this.deletionMarker="__delete__",this.setTitle=Ke()}ngOnInit(){this.availableWidgets$=this.dataService.client.userStatus().stream$.pipe(M(({userStatus:e})=>e.permissions),M(e=>this.dashboardWidgetService.getAvailableWidgets(e)),ge(e=>this.widgetLayout=this.initLayout(e.map(t=>t.id)))),this.setTitle("breadcrumb.dashboard")}getClassForWidth(e){switch(e){case 3:return"clr-col-12 clr-col-sm-6 clr-col-lg-3";case 4:return"clr-col-12 clr-col-sm-6 clr-col-lg-4";case 6:return"clr-col-12 clr-col-lg-6";case 8:return"clr-col-12 clr-col-lg-8";case 12:return"clr-col-12";default:(0,Xe.assertNever)(e)}}getSupportedWidths(e){return e.supportedWidths||[3,4,6,8,12]}setWidgetWidth(e,t){e.width=t,this.recalculateLayout()}trackRow(e,t){return t.map(s=>`${s.id}:${s.width}`).join("|")}trackRowItem(e,t){return t.config}addWidget(e){let t=this.dashboardWidgetService.getWidgetById(e);if(t){let r=this.getSupportedWidths(t)[0],s={id:e,config:t,width:r},w;this.widgetLayout&&this.widgetLayout.length?w=this.widgetLayout[this.widgetLayout.length-1]:(w=[],this.widgetLayout?.push(w)),w.push(s),this.recalculateLayout()}}removeWidget(e){e.id=this.deletionMarker,this.recalculateLayout()}drop(e){let{currentIndex:t,previousIndex:r,previousContainer:s,container:w}=e;if(!(r===t&&s.data.index===w.data.index)&&this.widgetLayout){let N=this.widgetLayout[s.data.index],ee=this.widgetLayout[w.data.index];N.splice(r,1),ee.splice(t,0,e.item.data),this.recalculateLayout()}}initLayout(e){let t=this.localStorageService.get("dashboardWidgetLayout"),r;return t&&(r=t.filter(s=>e.includes(s.id))),this.dashboardWidgetService.getWidgetLayout(r)}recalculateLayout(){if(this.widgetLayout){let t=this.widgetLayout.reduce((r,s)=>[...r,...s],[]).filter(r=>r.id!==this.deletionMarker).map(r=>({id:r.id,width:r.width}));this.widgetLayout=this.dashboardWidgetService.getWidgetLayout(t),this.localStorageService.set("dashboardWidgetLayout",t),setTimeout(()=>this.changedDetectorRef.markForCheck())}}static{this.\u0275fac=function(t){return new(t||i)(x(Z),x(We),x(we),x(O))}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-dashboard"]],standalone:!1,decls:13,vars:8,consts:[[1,"widget-header","mb-1"],["vdrDropdownTrigger","",1,"btn","btn-secondary","btn-sm"],["shape","plus"],["shape","ellipsis-vertical"],["vdrPosition","bottom-right"],["vdrDropdownItem","",3,"click",4,"ngFor","ngForOf"],["cdkDropListGroup",""],["class","clr-row dashboard-row","cdkDropList","","cdkDropListOrientation","horizontal",3,"cdkDropListData","cdkDropListDropped",4,"ngFor","ngForOf","ngForTrackBy"],["vdrDropdownItem","",3,"click"],["cdkDropList","","cdkDropListOrientation","horizontal",1,"clr-row","dashboard-row",3,"cdkDropListDropped","cdkDropListData"],["class","dashboard-item","cdkDrag","",3,"ngClass","cdkDragData",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"dashboard-item",3,"ngClass","cdkDragData"],[3,"widgetConfig",4,"vdrIfPermissions"],[3,"widgetConfig"],[1,"flex"],["cdkDragHandle","",1,"drag-handle"],["shape","drag-handle","size","24"],["vdrDropdownTrigger","",1,"icon-button"],[1,"dropdown-header"],["vdrDropdownItem","",3,"disabled","click",4,"ngFor","ngForOf"],["role","separator",1,"dropdown-divider"],["shape","trash",1,"is-danger"],["vdrDropdownItem","",3,"click","disabled"]],template:function(t,r){t&1&&(o(0,"vdr-page-block")(1,"div",0)(2,"vdr-dropdown")(3,"button",1),h(4,"clr-icon",2),m(5),d(6,"translate"),h(7,"clr-icon",3),a(),o(8,"vdr-dropdown-menu",4),u(9,Ct,3,3,"button",5),d(10,"async"),a()()(),o(11,"div",6),u(12,bt,2,5,"div",7),a()()),t&2&&(n(5),f(" ",c(6,4,"dashboard.add-widget")," "),n(4),p("ngForOf",c(10,6,r.availableWidgets$)),n(3),p("ngForOf",r.widgetLayout)("ngForTrackBy",r.trackRow))},dependencies:[L,be,De,Be,$e,Pe,Le,Ee,Ve,Re,Ae,Ge,Ye,Je,S,T],styles:[`.widget-header[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.placeholder[_ngcontent-%COMP%]{color:var(--color-grey-300);text-align:center}.placeholder[_ngcontent-%COMP%] .version[_ngcontent-%COMP%]{font-size:3em;margin:24px;line-height:1em}.placeholder[_ngcontent-%COMP%] .clr-i-outline{fill:var(--color-grey-200)}vdr-dashboard-widget[_ngcontent-%COMP%]{margin-bottom:24px}.drag-handle[_ngcontent-%COMP%]{cursor:move}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.dashboard-row[_ngcontent-%COMP%]{padding:0;border-width:1;margin-bottom:6px;transition:padding .2s,margin .2s}.dashboard-row.cdk-drop-list-dragging[_ngcontent-%COMP%], .dashboard-row.cdk-drop-list-receiving[_ngcontent-%COMP%]{border:2px dashed var(--color-component-border-200);border-radius:var(--border-radius);padding:6px}.dashboard-row.cdk-drop-list-dragging[_ngcontent-%COMP%] .dashboard-item[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}
|
|
3
3
|
/*# sourceMappingURL=dashboard.component-D6WHUZ2N.css.map */`],changeDetection:0})}}return i})();var tt=[{path:"",component:et,pathMatch:"full"}];var Ot=i=>["/orders/",i];function Tt(i,l){if(i&1&&(o(0,"a",6)(1,"span"),m(2),a(),h(3,"clr-icon",7),a()),i&2){let e=l.item;p("routerLink",F(2,Ot,e.id)),n(2),k(e.code)}}function Mt(i,l){if(i&1&&h(0,"vdr-order-state-label",8),i&2){let e=l.item;p("state",e.state)}}function Wt(i,l){if(i&1&&h(0,"vdr-customer-label",9),i&2){let e=l.item;p("customer",e.customer)}}function It(i,l){if(i&1&&(m(0),d(1,"localeCurrency")),i&2){let e=l.item;f(" ",$(1,1,e.totalWithTax,e.currencyCode)," ")}}function kt(i,l){if(i&1&&(m(0),d(1,"timeAgo")),i&2){let e=l.item;f(" ",c(1,1,e.orderPlacedAt)," ")}}var ci=E`
|
|
4
4
|
query GetLatestOrders($options: OrderListOptions) {
|
|
@@ -49,4 +49,4 @@ import{$c as pt,$d as Be,Aa as ye,Ab as Se,Ae,B as G,Be as Fe,Ca as m,Da as k,Df
|
|
|
49
49
|
`,nt=(()=>{class i{constructor(e){this.dataService=e,this.today=new Date,this.yesterday=new Date(new Date().setDate(this.today.getDate()-1)),this.selection$=new U({timeframe:"day",date:this.today})}ngOnInit(){this.dateRange$=this.selection$.pipe(G(),M(t=>({start:(0,oe.default)(t.date).startOf(t.timeframe).toDate(),end:(0,oe.default)(t.date).endOf(t.timeframe).toDate()})),re(1));let e=this.dateRange$.pipe(R(({start:t,end:r})=>this.dataService.query(Me,{start:t.toISOString(),end:r.toISOString()}).refetchOnChannelChange().mapStream(s=>s.orders)),re(1));this.totalOrderCount$=e.pipe(M(t=>t.totalItems)),this.totalOrderValue$=e.pipe(M(t=>t.items.reduce((r,s)=>r+s.totalWithTax,0))),this.currencyCode$=this.dataService.settings.getActiveChannel().refetchOnChannelChange().mapStream(t=>t.activeChannel.defaultCurrencyCode||void 0)}static{this.\u0275fac=function(t){return new(t||i)(x(O))}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-order-summary-widget"]],standalone:!1,decls:22,vars:23,consts:[[1,"stats"],[1,"stat"],[1,"stat-figure"],[1,"stat-label"],[1,"footer"],["class","flex",4,"ngIf"],["class","date-range",4,"ngIf"],[1,"flex"],[1,"button-small",3,"click"],[1,"ml-1","button-small",3,"click"],[1,"date-range"]],template:function(t,r){t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),m(3),d(4,"async"),a(),o(5,"div",3),m(6),d(7,"translate"),a()(),o(8,"div",1)(9,"div",2),m(10),d(11,"async"),d(12,"async"),d(13,"localeCurrency"),a(),o(14,"div",3),m(15),d(16,"translate"),a()()(),o(17,"div",4),u(18,Pt,13,20,"div",5),d(19,"async"),u(20,$t,4,6,"div",6),d(21,"async"),a()),t&2&&(n(3),k(c(4,6,r.totalOrderCount$)),n(3),k(c(7,8,"dashboard.total-orders")),n(4),f(" ",$(13,14,c(11,10,r.totalOrderValue$),c(12,12,r.currencyCode$)||void 0)," "),n(5),k(c(16,17,"dashboard.total-order-value")),n(3),p("ngIf",c(19,19,r.selection$)),n(2),p("ngIf",c(21,21,r.dateRange$)))},dependencies:[B,S,T,je,Q],styles:[`.stats[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly}.stat[_ngcontent-%COMP%]{text-align:center}.stat-figure[_ngcontent-%COMP%]{font-size:2rem;line-height:3rem}.stat-label[_ngcontent-%COMP%]{text-transform:uppercase}.date-range[_ngcontent-%COMP%]{margin-top:calc(var(--space-unit) * 3);font-size:var(--font-size-xs)}.footer[_ngcontent-%COMP%]{margin-top:24px;display:flex;flex-direction:column;justify-content:space-between}.button-small.active[_ngcontent-%COMP%]{background-color:var(--color-primary-200);color:var(--color-primary-900)}
|
|
50
50
|
/*# sourceMappingURL=order-summary-widget.component-AEWYOKYB.css.map */`],changeDetection:0})}}return i})(),Oi=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({imports:[V]})}}return i})();var ot=[{id:"metrics",width:12},{id:"orderSummary",width:6},{id:"latestOrders",width:6}],at={metrics:{title:"dashboard.metrics",supportedWidths:[6,8,12],loadComponent:()=>rt,requiresPermissions:[z.ReadOrder]},orderSummary:{title:"dashboard.orders-summary",loadComponent:()=>nt,supportedWidths:[4,6,8,12],requiresPermissions:[z.ReadOrder]},latestOrders:{title:"dashboard.latest-orders",loadComponent:()=>it,supportedWidths:[6,8,12],requiresPermissions:[z.ReadOrder]}};var Ui=(()=>{class i{constructor(e){Object.entries(at).map(([t,r])=>{e.getWidgetById(t)||e.registerWidget(t,r)}),e.getDefaultLayout().length===0&&e.setDefaultLayout(ot)}static{this.\u0275fac=function(t){return new(t||i)(ue(Z))}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({imports:[K,ke.forChild(tt)]})}}return i})();var qi=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-test-widget"]],standalone:!1,decls:2,vars:0,template:function(t,r){t&1&&(o(0,"p"),m(1,"This is a test widget!"),a())},encapsulation:2,changeDetection:0})}}return i})(),zi=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({})}}return i})();function Bt(i,l){if(i&1&&(o(0,"p",4),m(1),a()),i&2){let e=g(2);n(),A(" ",e.hideVendureBranding?"":"Vendure"," ",e.hideVersion?"":"Admin UI v"+e.version," ")}}function Et(i,l){if(i&1&&(o(0,"div")(1,"h4",3),m(2),h(3,"br"),o(4,"small",4),m(5),d(6,"timeAgo"),a()(),u(7,Bt,2,2,"p",5),a()),i&2){let e=l.ngIf,t=g();n(2),A(" Welcome, ",e.firstName," ",e.lastName,""),n(3),f("Last login: ",c(6,4,e.user.lastLogin),""),n(2),p("ngIf",!t.hideVendureBranding||!t.hideVersion)}}var Yi=(()=>{class i{constructor(e){this.dataService=e,this.version=Fe,this.brand=H().brand,this.hideVendureBranding=H().hideVendureBranding,this.hideVersion=H().hideVersion}ngOnInit(){this.administrator$=this.dataService.administrator.getActiveAdministrator().mapStream(e=>e.activeAdministrator||null)}static{this.\u0275fac=function(t){return new(t||i)(x(O))}}static{this.\u0275cmp=y({type:i,selectors:[["vdr-welcome-widget"]],standalone:!1,decls:4,vars:3,consts:[[4,"ngIf"],[1,"placeholder"],["shape","line-chart","size","128"],[1,""],[1,"p5"],["class","p5",4,"ngIf"]],template:function(t,r){t&1&&(u(0,Et,8,6,"div",0),d(1,"async"),o(2,"div",1),h(3,"clr-icon",2),a()),t&2&&p("ngIf",c(1,1,r.administrator$))},dependencies:[L,B,S,Y],styles:[`[_nghost-%COMP%]{display:flex;justify-content:space-between}.placeholder[_ngcontent-%COMP%]{color:var(--color-grey-200)}
|
|
51
51
|
/*# sourceMappingURL=welcome-widget.component-KGZCKLMD.css.map */`],changeDetection:0})}}return i})(),Ki=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=D({type:i})}static{this.\u0275inj=b({imports:[V]})}}return i})();export{ot as DEFAULT_DASHBOARD_WIDGET_LAYOUT,at as DEFAULT_WIDGETS,et as DashboardComponent,Ui as DashboardModule,Je as DashboardWidgetComponent,_i as GET_ORDER_CHART_DATA,Si as GET_ORDER_SUMMARY,it as LatestOrdersWidgetComponent,pi as LatestOrdersWidgetModule,rt as OrderChartWidgetComponent,nt as OrderSummaryWidgetComponent,Oi as OrderSummaryWidgetModule,qi as TestWidgetComponent,zi as TestWidgetModule,Yi as WelcomeWidgetComponent,Ki as WelcomeWidgetModule,tt as dashboardRoutes};
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
52
|
+
//# sourceMappingURL=chunk-NIYR32ZH.js.map
|