@vendure/admin-ui-plugin 3.8.0 → 3.8.1-master-202610140211
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-L4T3UAHB.js → chunk-2EC7E3GL.js} +2 -2
- package/lib/admin-ui/browser/{chunk-KCOKP7TM.js → chunk-5OECGTAM.js} +2 -2
- package/lib/admin-ui/browser/{chunk-Y55M4F5Y.js → chunk-6NHPZKGT.js} +2 -2
- package/lib/admin-ui/browser/{chunk-IWFA46M4.js → chunk-DJVZZFTP.js} +2 -2
- package/lib/admin-ui/browser/{chunk-MEZOWMXC.js → chunk-IAPGIKQD.js} +2 -2
- package/lib/admin-ui/browser/{chunk-EGKRCM5I.js → chunk-KF5R3OEM.js} +2 -2
- package/lib/admin-ui/browser/{chunk-EGKRCM5I.js.map → chunk-KF5R3OEM.js.map} +1 -1
- package/lib/admin-ui/browser/{chunk-SH5M3BJI.js → chunk-LG3K5JIF.js} +2 -2
- package/lib/admin-ui/browser/{chunk-NPLWVR7B.js → chunk-OP4GJHDJ.js} +2 -2
- package/lib/admin-ui/browser/{chunk-XEHXBITP.js → chunk-R6O47WNV.js} +2 -2
- package/lib/admin-ui/browser/{chunk-FSSGIU45.js → chunk-SRNLD6QJ.js} +2 -2
- package/lib/admin-ui/browser/index.html +1 -1
- package/lib/admin-ui/browser/main-T4ECEZ2U.js +2 -0
- package/package.json +6 -5
- package/lib/admin-ui/browser/main-WG27YQAN.js +0 -2
- /package/lib/admin-ui/browser/{chunk-L4T3UAHB.js.map → chunk-2EC7E3GL.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-KCOKP7TM.js.map → chunk-5OECGTAM.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-Y55M4F5Y.js.map → chunk-6NHPZKGT.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-IWFA46M4.js.map → chunk-DJVZZFTP.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-MEZOWMXC.js.map → chunk-IAPGIKQD.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-SH5M3BJI.js.map → chunk-LG3K5JIF.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-NPLWVR7B.js.map → chunk-OP4GJHDJ.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-XEHXBITP.js.map → chunk-R6O47WNV.js.map} +0 -0
- /package/lib/admin-ui/browser/{chunk-FSSGIU45.js.map → chunk-SRNLD6QJ.js.map} +0 -0
- /package/lib/admin-ui/browser/{main-WG27YQAN.js.map → main-T4ECEZ2U.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Di}from"./chunk-
|
|
1
|
+
import{a as Di}from"./chunk-SRNLD6QJ.js";import{$ as Yt,$c as Mn,$e,$f as Re,$g as Gt,Aa as jt,Ac as Fn,Ae as mi,Af as _e,Ag as mo,B as Ai,Ba as ie,Bc as Tn,Be as pi,Bf as ve,Bg as po,Ca as f,Cc as Sn,Cd as Vn,Cf as ye,Da as P,Dc as Dn,Df as be,Ea as C,Ec as In,Ed as $n,Fa as Mt,Fc as xn,Fd as re,Ff as me,Gc as Pn,Gd as Nt,Ge as Yn,Gf as Fe,Gg as gi,H as Ei,Ha as Gi,Hc as Bn,He as J,I as ft,Ia as qi,Ic as kn,Ie as le,Ig as co,Ja as Zi,Jd as ae,Je as di,Jg as hi,K as It,Kd as he,Ke as Xn,Kf as ui,Kg as $,L as Kt,La as q,Lf as Pr,M as Qt,Ma as W,Md as se,Me as Ce,Mf as $t,Mg as uo,Nd as vt,Ne as Rt,Nf as O,O as Mi,Oa as Ui,Od as yt,Oe as Jn,Of as M,P as wi,Pd as bt,Pe as Wt,Pf as V,Q as kt,Qa as a,Qd as Gn,Qf as w,Qg as ue,R as Ti,Ra as s,Rd as qn,Rf as N,Rg as et,S as Ni,Sa as k,T as b,Ta as Hi,Tg as fo,U as F,Ua as ne,Uc as Ln,Uf as ro,Va as de,Vc as ni,Vd as ce,Vf as ao,Vg as Ae,W as Qe,Wa as zi,Wc as oi,Wd as Zn,Wf as so,Xc as ri,Xd as Un,Xe as eo,Xf as Te,Y as Ri,Ya as U,Yc as An,Ye as Ft,Yf as Se,Z as Oi,Za as E,Zc as En,_ as r,_f as De,_g as Ee,a as H,aa as v,ad as xr,af as Ot,ag as Ie,ah as qt,b as ze,bc as ti,be as j,bh as Tt,ca as T,cc as Xi,cf as Vt,ch as Pe,da as Vi,db as B,dc as Ji,dd as wn,df as gt,dh as ht,e as ut,ea as Xt,ec as en,ed as G,ee as Xe,fb as ji,fc as tn,fd as ai,fe as Je,g as _t,ga as A,gc as nn,gf as ci,gg as xe,h as Bi,ha as u,hc as ii,hd as Nn,hf as to,i as ki,ia as Jt,ic as on,id as Rn,ja as o,jb as Wi,jc as rn,jd as ge,jf as Ze,k as Dt,kc as an,kd as On,kg as Ge,la as Lt,lc as sn,ma as l,mc as ln,md as I,n as Z,na as m,nb as D,nc as mn,o as je,oa as c,ob as ei,oc as pn,og as L,p as te,pa as At,pb as Ki,pc as dn,pf as io,qa as Et,qc as cn,rb as Qi,rc as un,re as Hn,sa as S,sc as fn,se as zn,t as Ht,ta as _,tc as gn,te as jn,tf as no,ua as g,uc as hn,ud as Ye,ue as X,vb as Yi,vc as Cn,vd as Q,ve as Wn,vf as oo,vg as fi,wb as wt,wc as _n,wd as R,we as Kn,wg as fe,xa as Si,xc as vn,xd as Y,xe as Qn,y as pe,ya as $i,yc as yn,yd as oe,ye as si,z as Li,za as zt,zb as y,zc as bn,ze as li,zg as lo}from"./chunk-KF5R3OEM.js";var go=(()=>{class t{constructor(e){this.templateRef=e}static{this.\u0275fac=function(n){return new(n||t)(v(Yt))}}static{this.\u0275dir=Xt({type:t,selectors:[["","vdrZoneMemberControls",""]],standalone:!1})}}return t})();var ho=(()=>{class t{constructor(e){this.templateRef=e}static{this.\u0275fac=function(n){return new(n||t)(v(Yt))}}static{this.\u0275dir=Xt({type:t,selectors:[["","vdrZoneMemberListHeader",""]],standalone:!1})}}return t})();var Br=t=>["/settings/countries",t];function kr(t,p){if(t&1&&f(0),t&2){let e=p.item;C(" ",e.id," ")}}function Lr(t,p){if(t&1&&(f(0),a(1,"localeDate")),t&2){let e=p.item;C(" ",k(1,1,e.createdAt,"short")," ")}}function Ar(t,p){if(t&1&&(f(0),a(1,"localeDate")),t&2){let e=p.item;C(" ",k(1,1,e.createdAt,"short")," ")}}function Er(t,p){if(t&1&&(l(0,"a",9)(1,"span"),f(2),m(),c(3,"clr-icon",10),m()),t&2){let e=p.item;o("routerLink",W(2,Br,e.id)),r(2),C(" ",e.name,"")}}function Mr(t,p){if(t&1&&f(0),t&2){let e=p.item;C(" ",e.code," ")}}function wr(t,p){t&1&&(l(0,"vdr-chip",13),f(1),a(2,"translate"),m()),t&2&&(r(),P(s(2,1,"common.enabled")))}function Nr(t,p){t&1&&(l(0,"vdr-chip",14),f(1),a(2,"translate"),m()),t&2&&(r(),P(s(2,1,"common.disabled")))}function Rr(t,p){if(t&1&&u(0,wr,3,3,"vdr-chip",11)(1,Nr,3,3,"vdr-chip",12),t&2){let e=p.item;o("ngIf",e.enabled),r(),o("ngIf",!e.enabled)}}var Ut=(()=>{class t{constructor(e){this.dataService=e,this.selectedMemberIds=[],this.selectionChange=new Qe,this.filterTermControl=new Vn(""),this.currentPage=1,this.itemsPerPage=10,this.selectionManager=new io({multiSelect:!0,itemsAreEqual:(n,i)=>n.id===i.id,additiveMode:!0}),this.membersInput$=new _t,this.activeZoneInput$=new Bi(void 0),this.destroy$=new _t,this.refresh$=new _t}ngOnInit(){let e=Ht(this.activeZoneInput$,this.refresh$).pipe(ft(n=>this.activeZone?this.dataService.query(ti,{zoneId:this.activeZone.id}).mapSingle(({zone:i})=>i?.members??[]):Dt([])));this.members$=Ht(e,this.membersInput$),this.members$.pipe(pe(1)).subscribe(n=>{this.selectionManager.setCurrentItems(n?.filter(i=>this.selectedMemberIds.includes(i.id))??[])}),this.selectionManager.selectionChanges$.pipe(It(this.destroy$)).subscribe(n=>{this.selectionChange.emit(n.map(i=>i.id))}),this.filteredMembers$=je(this.members$,this.filterTermControl.valueChanges.pipe(Ei(""))).pipe(Z(([n,i])=>{if(i){let d=i?.toLocaleLowerCase()??"";return n.filter(h=>h.name.toLocaleLowerCase().includes(d)||h.code.toLocaleLowerCase().includes(d))}else return n})),this.totalItems$=this.filteredMembers$.pipe(Z(n=>n.length))}ngOnChanges(e){"members"in e&&this.membersInput$.next(this.members??[]),"activeZone"in e&&this.activeZoneInput$.next(this.activeZone)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}refresh(){this.refresh$.next()}static{this.\u0275fac=function(n){return new(n||t)(v(G))}}static{this.\u0275cmp=T({type:t,selectors:[["vdr-zone-member-list"]],contentQueries:function(n,i,d){if(n&1&&(Si(d,ho,5),Si(d,go,5)),n&2){let h;zt(h=jt())&&(i.headerTemplate=h.first),zt(h=jt())&&(i.controlsTemplate=h.first)}},inputs:{locationId:"locationId",members:"members",selectedMemberIds:"selectedMemberIds",activeZone:"activeZone"},outputs:{selectionChange:"selectionChange"},standalone:!1,features:[Ni],decls:24,vars:38,consts:[[3,"itemsPerPageChange","pageChange","id","items","totalItems","itemsPerPage","currentPage"],[3,"locationId","hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault"],["id","updated-at",3,"heading","hiddenByDefault"],["id","name",3,"heading","optional"],["id","code",3,"heading"],["id","enabled",3,"heading"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],["colorType","success",4,"ngIf"],["colorType","warning",4,"ngIf"],["colorType","success"],["colorType","warning"]],template:function(n,i){n&1&&(l(0,"vdr-data-table-2",0),a(1,"async"),a(2,"async"),_("itemsPerPageChange",function(h){return i.itemsPerPage=h})("pageChange",function(h){return i.currentPage=h}),c(3,"vdr-bulk-action-menu",1)(4,"vdr-dt2-search",2),a(5,"translate"),l(6,"vdr-dt2-column",3),a(7,"translate"),u(8,kr,1,1,"ng-template"),m(),l(9,"vdr-dt2-column",4),a(10,"translate"),u(11,Lr,2,4,"ng-template"),m(),l(12,"vdr-dt2-column",5),a(13,"translate"),u(14,Ar,2,4,"ng-template"),m(),l(15,"vdr-dt2-column",6),a(16,"translate"),u(17,Er,4,4,"ng-template"),m(),l(18,"vdr-dt2-column",7),a(19,"translate"),u(20,Mr,1,1,"ng-template"),m(),l(21,"vdr-dt2-column",8),a(22,"translate"),u(23,Rr,2,2,"ng-template"),m()()),n&2&&(o("id",i.locationId)("items",s(1,20,i.filteredMembers$))("totalItems",s(2,22,i.totalItems$))("itemsPerPage",i.itemsPerPage)("currentPage",i.currentPage),r(3),o("locationId",i.locationId)("hostComponent",i)("selectionManager",i.selectionManager),r(),o("searchTermControl",i.filterTermControl)("searchTermPlaceholder",s(5,24,"common.search-by-name")),r(2),o("heading",s(7,26,"common.id"))("hiddenByDefault",!0),r(3),o("heading",s(10,28,"common.created-at"))("hiddenByDefault",!0),r(3),o("heading",s(13,30,"common.updated-at"))("hiddenByDefault",!0),r(3),o("heading",s(16,32,"common.name"))("optional",!1),r(3),o("heading",s(19,34,"common.code")),r(3),o("heading",s(22,36,"common.enabled")))},dependencies:[j,E,ge,Ze,Te,xe,De,Ie,B,I,Ce],styles:[`.members-header[_ngcontent-%COMP%]{background-color:var(--color-component-bg-100);position:sticky;top:0;padding:6px;z-index:5;border-bottom:1px solid var(--color-component-border-200)}.members-header[_ngcontent-%COMP%] .header-title-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.members-header[_ngcontent-%COMP%] .clr-input[_ngcontent-%COMP%]{width:100%}
|
|
2
2
|
/*# sourceMappingURL=zone-member-list.component-LZVI4I6F.css.map */`],changeDetection:0})}}return t})();var _o=t=>({zoneName:t});function Or(t,p){if(t&1&&(f(0),a(1,"translate")),t&2){let e=g();P(k(1,1,"settings.add-countries-to-zone",W(4,_o,e.zoneName)))}}function Vr(t,p){if(t&1){let e=S();l(0,"button",3),_("click",function(){b(e);let i=g();return F(i.cancel())}),f(1),a(2,"translate"),m(),l(3,"button",4),_("click",function(){b(e);let i=g();return F(i.add())}),f(4),a(5,"translate"),m()}if(t&2){let e=g();r(),P(s(2,3,"common.cancel")),r(2),o("disabled",!e.selectedMemberIds.length),r(),C(" ",k(5,5,"settings.add-countries-to-zone",W(8,_o,e.zoneName))," ")}}var zp=D`
|
|
3
3
|
query GetZoneMembers($zoneId: ID!) {
|
|
4
4
|
zone(id: $zoneId) {
|
|
@@ -387,4 +387,4 @@ import{a as Di}from"./chunk-FSSGIU45.js";import{$ as Yt,$c as Mn,$e,$f as Re,$g
|
|
|
387
387
|
}
|
|
388
388
|
`,Fr=(()=>{class t extends Ae{constructor(e,n,i){super(),this.dataService=e,this.notificationService=n,this.modalService=i,this.dataTableListId="zone-list",this.selectedMemberIds=[],this.customFields=this.serverConfigService.getCustomFieldsFor("Zone"),this.filters=this.createFilterCollection().addIdFilter().addDateFilters().addFilter({name:"name",type:{kind:"text"},label:"common.name",filterField:"name"}).addCustomFieldFilters(this.customFields).connectToRoute(this.route),this.sorts=this.createSortCollection().defaultSort("createdAt","DESC").addSort({name:"createdAt"}).addSort({name:"updatedAt"}).addSort({name:"name"}).addCustomFieldSorts(this.customFields).connectToRoute(this.route),super.configure({document:kn,getItems:d=>d.zones,setVariables:(d,h)=>({options:{skip:d,take:h,filter:H({name:{contains:this.searchTermControl.value}},this.filters.createFilterInput()),filterOperator:this.searchTermControl.value?wt.OR:wt.AND,sort:this.sorts.createSortInput()}}),refreshListOnChanges:[this.filters.valueChanges,this.sorts.valueChanges]})}ngOnInit(){super.ngOnInit();let e=this.route.paramMap.pipe(Z(n=>n.get("contents")),Ai(),Kt(()=>this.selectedMemberIds=[]));this.activeZone$=je(this.items$,e).pipe(Z(([n,i])=>{if(i)return n.find(d=>d.id===i)})),this.activeIndex$=je(this.items$,e).pipe(Z(([n,i])=>i?n.findIndex(d=>d.id===i):-1))}setLanguage(e){this.dataService.client.setContentLanguage(e).subscribe()}closeMembers(){let e=H({},this.route.snapshot.params);delete e.contents,this.router.navigate(["./",e],{relativeTo:this.route,queryParamsHandling:"preserve"})}addToZone(e){this.modalService.fromComponent(vo,{locals:{zoneName:e.name,zoneId:e.id},size:"md"}).pipe(ft(n=>n?this.dataService.settings.addMembersToZone(e.id,n).pipe(Li(n)):ki)).subscribe({next:n=>{this.notificationService.success("settings.add-countries-to-zone-success",{countryCount:n.length,zoneName:e.name}),this.refreshMemberList()},error:n=>{this.notificationService.error(n)}})}refreshMemberList(){this.zoneMemberList?.refresh()}static{this.\u0275fac=function(n){return new(n||t)(v(G),v(X),v(Qn))}}static{this.\u0275cmp=T({type:t,selectors:[["vdr-zone-list"]],viewQuery:function(n,i){if(n&1&&$i(Ut,5),n&2){let d;zt(d=jt())&&(i.zoneMemberList=d.first)}},standalone:!1,features:[A],decls:15,vars:14,consts:[[3,"languageCodeChange","availableLanguageCodes","currentLanguageCode"],["locationId","zone-list"],["class","btn btn-primary",3,"routerLink",4,"vdrIfPermissions"],[3,"closeClicked","rightPanelOpen"],["vdrSplitViewLeft",""],["vdrSplitViewRight","",3,"splitViewTitle"],[1,"btn","btn-primary",3,"routerLink"],["shape","plus"],[3,"pageChange","itemsPerPageChange","visibleColumnsChange","id","items","itemsPerPage","totalItems","currentPage","filters","activeIndex"],["locationId","zone-list",3,"hostComponent","selectionManager"],[3,"searchTermControl","searchTermPlaceholder"],["id","id",3,"heading","hiddenByDefault"],["id","created-at",3,"heading","hiddenByDefault","sort"],["id","updated-at",3,"heading","hiddenByDefault","sort"],["id","name",3,"heading","optional","sort"],["id","view-contents",3,"heading","optional"],[3,"customField","sort",4,"ngFor","ngForOf"],[1,"button-ghost",3,"routerLink"],["shape","arrow right"],["queryParamsHandling","preserve",1,"button-small","bg-weight-150",3,"routerLink"],["shape","file-group"],[3,"customField","sort"],[4,"ngIf"],[1,"button-ghost","ml-4",3,"click"],["locationId","zone-members-list",3,"selectedMemberIds","activeZone","selectionChange",4,"ngIf"],["locationId","zone-members-list",3,"selectionChange","selectedMemberIds","activeZone"]],template:function(n,i){if(n&1&&(l(0,"vdr-page-block")(1,"vdr-action-bar")(2,"vdr-ab-left")(3,"vdr-language-selector",0),a(4,"async"),a(5,"async"),_("languageCodeChange",function(h){return i.setLanguage(h)}),m()(),l(6,"vdr-ab-right"),c(7,"vdr-action-bar-items",1),u(8,hp,4,5,"a",2),c(9,"vdr-action-bar-dropdown-menu",1),m()()(),l(10,"vdr-split-view",3),a(11,"async"),_("closeClicked",function(){return i.closeMembers()}),u(12,Tp,25,47,"ng-template",4)(13,Ip,2,3,"ng-template",5),a(14,"async"),m()),n&2){let d;r(3),o("availableLanguageCodes",s(4,5,i.availableLanguages$))("currentLanguageCode",s(5,7,i.contentLanguage$)),r(5),o("vdrIfPermissions",q(13,cp)),r(2),o("rightPanelOpen",s(11,9,i.activeZone$)),r(3),o("splitViewTitle",(d=s(14,11,i.activeZone$))==null?null:d.name)}},dependencies:[j,U,E,ge,N,V,w,$,Ge,O,M,Te,xe,De,Ie,Re,po,lo,mo,L,Ut,B,I,Ce],styles:[`.zone-wrapper[_ngcontent-%COMP%]{display:flex;height:calc(100% - 50px)}.zone-wrapper[_ngcontent-%COMP%] .zone-list[_ngcontent-%COMP%]{flex:1;overflow:auto;margin-top:0}.zone-wrapper[_ngcontent-%COMP%] .zone-list[_ngcontent-%COMP%] tr.active[_ngcontent-%COMP%]{background-color:var(--color-component-bg-200)}.zone-members[_ngcontent-%COMP%]{height:100%;width:0;opacity:0;visibility:hidden;overflow:auto;transition:width .3s,opacity .2s .3s,visibility 0s .3s}.zone-members.expanded[_ngcontent-%COMP%]{width:40vw;visibility:visible;opacity:1;padding-inline-start:12px}.zone-members[_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{margin:0;background:none;border:none;cursor:pointer}.zone-members[_ngcontent-%COMP%] table.table{margin-top:0}.zone-members[_ngcontent-%COMP%] table.table th{top:0}.zone-members[_ngcontent-%COMP%] .controls[_ngcontent-%COMP%]{display:flex;justify-content:space-between}
|
|
389
389
|
/*# sourceMappingURL=zone-list.component-3Y7UHMX7.css.map */`],changeDetection:0})}}return t})();var Tr={location:"zone-members-list",label:"settings.remove-from-zone",icon:"trash",iconClass:"is-danger",requiresPermission:y.UpdateCustomerGroup,onClick:({injector:t,selection:p,hostComponent:e,clearSelection:n})=>{let i=t.get(G),d=t.get(X),h=e.activeZone,x=p.map(Ve=>Ve.id);i.settings.removeMembersFromZone(h.id,x).subscribe({complete:()=>{d.success("settings.remove-countries-from-zone-success",{countryCount:x.length,zoneName:h.name}),e.refresh(),n()}})}};var df=(()=>{class t extends fo{constructor(e,n){super(e,{__typename:"Administrator",id:"",createdAt:"",updatedAt:"",emailAddress:"",firstName:"",lastName:"",user:{roles:[]}},i=>n.administrator.getActiveAdministrator().mapStream(d=>d.activeAdministrator))}static{this.\u0275fac=function(n){return new(n||t)(kt(Rn),kt(G))}}static{this.\u0275prov=Mi({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Dr=ut(Wt());var Sr=t=>[{path:"profile",component:fe,data:{breadcrumb:"breadcrumb.profile"},resolve:{detail:()=>Ti(G).query(mn).mapSingle(p=>({entity:Dt(p.activeAdministrator)}))},children:t.getPageTabRoutes("profile")},{path:"administrators",component:fe,data:{locationId:"administrator-list",breadcrumb:"breadcrumb.administrators"},children:t.getPageTabRoutes("administrator-list")},{path:"administrators/:id",component:fe,data:{locationId:"administrator-detail",breadcrumb:{label:"breadcrumb.administrators",link:["../","administrators"]}},children:t.getPageTabRoutes("administrator-detail")},{path:"channels",component:fe,data:{locationId:"channel-list",breadcrumb:"breadcrumb.channels"},children:t.getPageTabRoutes("channel-list")},{path:"channels/:id",component:fe,data:{locationId:"channel-detail",breadcrumb:{label:"breadcrumb.channels",link:["../","channels"]}},children:t.getPageTabRoutes("channel-detail")},{path:"stock-locations",component:fe,data:{locationId:"stock-location-list",breadcrumb:"breadcrumb.stock-locations"},children:t.getPageTabRoutes("stock-location-list")},{path:"stock-locations/:id",component:fe,data:{locationId:"stock-location-detail",breadcrumb:{label:"breadcrumb.stock-locations",link:["../","stock-locations"]}},children:t.getPageTabRoutes("stock-location-detail")},{path:"sellers",component:fe,data:{locationId:"seller-list",breadcrumb:"breadcrumb.sellers"},children:t.getPageTabRoutes("seller-list")},{path:"sellers/:id",component:fe,data:{locationId:"seller-detail",breadcrumb:{label:"breadcrumb.sellers",link:["../","sellers"]}},children:t.getPageTabRoutes("seller-detail")},{path:"roles",component:fe,data:{locationId:"role-list",breadcrumb:"breadcrumb.roles"},children:t.getPageTabRoutes("role-list")},{path:"roles/:id",component:fe,data:{locationId:"role-detail",breadcrumb:{label:"breadcrumb.roles",link:["../","roles"]}},children:t.getPageTabRoutes("role-detail")},{path:"tax-categories",component:fe,data:{locationId:"tax-category-list",breadcrumb:"breadcrumb.tax-categories"},children:t.getPageTabRoutes("tax-category-list")},{path:"tax-categories/:id",component:fe,data:{locationId:"tax-category-detail",breadcrumb:{label:"breadcrumb.tax-categories",link:["../","tax-categories"]}},children:t.getPageTabRoutes("tax-category-detail")},{path:"tax-rates",component:fe,data:{locationId:"tax-rate-list",breadcrumb:"breadcrumb.tax-rates"},children:t.getPageTabRoutes("tax-rate-list")},{path:"tax-rates/:id",component:fe,data:{locationId:"tax-rate-detail",breadcrumb:{label:"breadcrumb.tax-rates",link:["../","tax-rates"]}},children:t.getPageTabRoutes("tax-rate-detail")},{path:"countries",component:fe,data:{locationId:"country-list",breadcrumb:"breadcrumb.countries"},children:t.getPageTabRoutes("country-list")},{path:"countries/:id",component:fe,data:{locationId:"country-detail",breadcrumb:{label:"breadcrumb.countries",link:["../","countries"]}},children:t.getPageTabRoutes("country-detail")},{path:"zones",component:fe,data:{locationId:"zone-list",breadcrumb:"breadcrumb.zones"},children:t.getPageTabRoutes("zone-list")},{path:"zones/:id",component:fe,data:{locationId:"zone-detail",breadcrumb:{label:"breadcrumb.zones",link:["../","zones"]}},children:t.getPageTabRoutes("zone-detail")},{path:"shipping-methods",component:fe,data:{locationId:"shipping-method-list",breadcrumb:"breadcrumb.shipping-methods"},children:t.getPageTabRoutes("shipping-method-list")},{path:"shipping-methods/:id",component:fe,data:{locationId:"shipping-method-detail",breadcrumb:{label:"breadcrumb.shipping-methods",link:["../","shipping-methods"]}},children:t.getPageTabRoutes("shipping-method-detail")},{path:"payment-methods",component:fe,data:{locationId:"payment-method-list",breadcrumb:"breadcrumb.payment-methods"},children:t.getPageTabRoutes("payment-method-list")},{path:"payment-methods/:id",component:fe,data:{locationId:"payment-method-detail",breadcrumb:{label:"breadcrumb.payment-methods",link:["../","payment-methods"]}},children:t.getPageTabRoutes("payment-method-detail")},{path:"global-settings",component:fe,data:{breadcrumb:"breadcrumb.global-settings",locationId:"global-setting-detail"},resolve:{detail:()=>Ti(G).query(on).mapSingle(p=>({entity:Dt(p.globalSettings)}))},children:t.getPageTabRoutes("global-setting-detail")}];var bg=(()=>{class t{static{this.hasRegisteredTabsAndBulkActions=!1}constructor(e,n){t.hasRegisteredTabsAndBulkActions||(e.registerBulkAction(Wo),e.registerBulkAction(xo),e.registerBulkAction(So),e.registerBulkAction(Ho),e.registerBulkAction(or),e.registerBulkAction(rr),e.registerBulkAction(nr),e.registerBulkAction(Oo),e.registerBulkAction(Vo),e.registerBulkAction(Ro),e.registerBulkAction(ur),e.registerBulkAction(hr),e.registerBulkAction(Lo),e.registerBulkAction(yr),e.registerBulkAction(Tr),e.registerBulkAction(mr),e.registerBulkAction(pr),e.registerBulkAction(lr),n.registerPageTab({priority:0,location:"seller-list",tab:"breadcrumb.sellers",route:"",component:Ko}),n.registerPageTab({priority:0,location:"seller-detail",tab:"settings.seller",route:"",component:et({component:jo,query:cn,entityKey:"seller",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-seller",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"channel-list",tab:"breadcrumb.channels",route:"",component:Bo}),n.registerPageTab({priority:0,location:"channel-detail",tab:"settings.channel",route:"",component:et({component:Io,query:en,entityKey:"channel",getBreadcrumbs:i=>[{label:i?i.code===Dr.DEFAULT_CHANNEL_CODE?"common.default-channel":i.code:"settings.create-new-channel",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"administrator-list",tab:"breadcrumb.administrators",route:"",component:Do}),n.registerPageTab({priority:0,location:"administrator-detail",tab:"settings.administrator",route:"",component:et({component:To,query:Xi,entityKey:"administrator",getBreadcrumbs:i=>[{label:i?`${i.firstName} ${i.lastName}`:"admin.create-new-administrator",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"role-list",tab:"breadcrumb.roles",route:"",component:zo}),n.registerPageTab({priority:0,location:"role-detail",tab:"settings.role",route:"",component:et({component:Uo,query:pn,entityKey:"role",getBreadcrumbs:i=>[{label:i?i.description:"settings.create-new-role",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"shipping-method-list",tab:"breadcrumb.shipping-methods",route:"",component:ar}),n.registerPageTab({priority:0,location:"shipping-method-detail",tab:"settings.shipping-method",route:"",component:et({component:ir,query:fn,entityKey:"shippingMethod",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-shipping-method",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"shipping-method-list",tab:"settings.test-shipping-methods",route:"test",component:_r}),n.registerPageTab({priority:0,location:"payment-method-list",tab:"breadcrumb.payment-methods",route:"",component:$o}),n.registerPageTab({priority:0,location:"payment-method-detail",tab:"settings.payment-method",route:"",component:et({component:No,query:rn,entityKey:"paymentMethod",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-payment-method",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"tax-category-list",tab:"breadcrumb.tax-categories",route:"",component:fr}),n.registerPageTab({priority:0,location:"tax-category-detail",tab:"settings.tax-category",route:"",component:et({component:cr,query:Dn,entityKey:"taxCategory",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-tax-category",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"tax-rate-list",tab:"breadcrumb.tax-rates",route:"",component:Cr}),n.registerPageTab({priority:0,location:"tax-rate-detail",tab:"settings.tax-rate",route:"",component:et({component:gr,query:xn,entityKey:"taxRate",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-tax-rate",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"country-list",tab:"breadcrumb.countries",route:"",component:Ao}),n.registerPageTab({priority:0,location:"country-detail",tab:"settings.country",route:"",component:et({component:ko,query:nn,entityKey:"country",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-country",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"zone-list",tab:"breadcrumb.zones",route:"",component:Fr}),n.registerPageTab({priority:0,location:"zone-detail",tab:"settings.zone",route:"",component:et({component:vr,query:Bn,entityKey:"zone",getBreadcrumbs:i=>[{label:i?i.name:"settings.create-new-zone",link:[i?.id]}]})}),n.registerPageTab({priority:0,location:"global-setting-detail",tab:"breadcrumb.global-settings",route:"",component:Eo}),n.registerPageTab({priority:0,location:"profile",tab:"breadcrumb.profile",route:"",component:Go}),n.registerPageTab({priority:0,location:"stock-location-list",tab:"catalog.stock-locations",route:"",component:dr}),n.registerPageTab({priority:0,location:"stock-location-detail",tab:"catalog.stock-location",route:"",component:et({component:sr,query:_n,entityKey:"stockLocation",getBreadcrumbs:i=>[{label:i?i.name:"catalog.create-new-stock-location",link:[i?.id]}]})}),t.hasRegisteredTabsAndBulkActions=!0)}static{this.\u0275fac=function(n){return new(n||t)(kt(so),kt(fi))}}static{this.\u0275mod=Vi({type:t})}static{this.\u0275inj=wi({providers:[{provide:Nn,useFactory:e=>Sr(e),multi:!0,deps:[fi]}],imports:[uo,On.forChild([])]})}}return t})();export{vo as AddCountryToZoneDialogComponent,To as AdminDetailComponent,Do as AdministratorListComponent,j0 as CREATE_STOCK_LOCATION,Io as ChannelDetailComponent,Bo as ChannelListComponent,ko as CountryDetailComponent,Ao as CountryListComponent,rd as GET_ADMINISTRATOR_DETAIL,cd as GET_ADMINISTRATOR_LIST,Td as GET_CHANNEL_DETAIL,kd as GET_CHANNEL_LIST,Od as GET_COUNTRY_DETAIL,Hd as GET_COUNTRY_LIST,Xd as GET_GLOBAL_SETTINGS_DETAIL,rc as GET_PAYMENT_METHOD_DETAIL,hc as GET_PAYMENT_METHOD_LIST,Tc as GET_PROFILE_DETAIL,kc as GET_ROLE_DETAIL,Vc as GET_ROLE_LIST,jc as GET_SELLER_DETAIL,P0 as GET_SHIPPING_METHOD_DETAIL,V0 as GET_SHIPPING_METHOD_LIST,z0 as GET_STOCK_LOCATION_DETAIL,ru as GET_STOCK_LOCATION_LIST,cu as GET_TAX_CATEGORY_DETAIL,vu as GET_TAX_CATEGORY_LIST,xu as GET_TAX_RATE_DETAIL,Mu as GET_TAX_RATE_LIST,Hu as GET_ZONE_DETAIL,rf as GET_ZONE_LIST,zp as GET_ZONE_MEMBERS,Eo as GlobalSettingsComponent,No as PaymentMethodDetailComponent,$o as PaymentMethodListComponent,Ci as PermissionGridComponent,Go as ProfileComponent,df as ProfileResolver,Uo as RoleDetailComponent,zo as RoleListComponent,jo as SellerDetailComponent,Ko as SellerListComponent,bg as SettingsModule,Yo as ShippingEligibilityTestResultComponent,ir as ShippingMethodDetailComponent,ar as ShippingMethodListComponent,er as ShippingMethodTestResultComponent,sr as StockLocationDetailComponent,dr as StockLocationListComponent,cr as TaxCategoryDetailComponent,fr as TaxCategoryListComponent,gr as TaxRateDetailComponent,Cr as TaxRateListComponent,bi as TestAddressFormComponent,yi as TestOrderBuilderComponent,_r as TestShippingMethodsComponent,W0 as UPDATE_STOCK_LOCATION,vr as ZoneDetailComponent,Fr as ZoneListComponent,go as ZoneMemberControlsDirective,Ut as ZoneMemberListComponent,ho as ZoneMemberListHeaderDirective,Oo as assignPaymentMethodsToChannelBulkAction,or as assignShippingMethodsToChannelBulkAction,mr as assignStockLocationsToChannelBulkAction,Sr as createRoutes,So as deleteAdministratorsBulkAction,xo as deleteChannelsBulkAction,Lo as deleteCountriesBulkAction,Ro as deletePaymentMethodsBulkAction,Ho as deleteRolesBulkAction,Wo as deleteSellersBulkAction,nr as deleteShippingMethodsBulkAction,lr as deleteStockLocationsBulkAction,ur as deleteTaxCategoriesBulkAction,hr as deleteTaxRatesBulkAction,yr as deleteZonesBulkAction,Vo as removePaymentMethodsFromChannelBulkAction,rr as removeShippingMethodsFromChannelBulkAction,pr as removeStockLocationsFromChannelBulkAction,Tr as removeZoneMembersBulkAction};
|
|
390
|
-
//# sourceMappingURL=chunk-
|
|
390
|
+
//# sourceMappingURL=chunk-LG3K5JIF.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as oi}from"./chunk-FSSGIU45.js";import{$ as Io,$d as ma,$e as Ht,$f as ti,$g as In,A as vo,Aa as Xe,Ab as Mo,Ad as Ci,Ae as qt,Af as ut,Ag as ja,B as Se,Ba as U,Bb as No,Be as It,Bf as Dt,Bg as Wa,C as Xi,Ca as f,Cb as Lo,Cc as Yo,Cd as vt,Cf as zt,Da as T,Db as an,Dd as At,De as _a,Df as Zt,Dg as qa,Ea as v,Eb as Uo,Ed as tt,Ef as Sa,F as Ot,Fa as Nt,Fb as $o,Fd as mt,Ff as _t,G as Co,Ga as Vo,Gb as Go,Gd as Ut,Ge as Ii,Gf as qe,H as Ke,Ha as Le,Hb as jo,He as Q,Hf as Fa,I as A,Ia as Ue,Ib as Wo,Id as Pt,Ie as me,If as Ea,J as bo,Ja as $e,Jb as qo,Jc as Al,Jd as Ce,Jf as Oa,K as Vt,Ka as tn,Kb as Ho,Kc as rn,Kd as $t,Ke as ga,Kg as Ae,L as Ze,La as W,Lb as Ko,Lc as Qo,Ld as bi,Le as Ti,Lf as Jt,Lg as ki,Ma as j,Mc as zo,Md as be,Me as nt,Mf as bn,Mg as Ha,N as yo,Na as Rt,Nc as Zo,Nd as cn,Ne as Tt,Nf as xe,O as hi,Oa as nn,Oc as Jo,Od as pn,Of as ke,P as xo,Pa as ko,Pd as dn,Pe as Bl,Pf as Pe,Pg as Ka,Q as Mt,Qa as s,Qd as sa,Qf as Ie,Qg as Ft,R as Po,Ra as d,Rd as yi,Re as fa,Rf as Te,Rg as Ri,S as yt,Sa as O,Sc as ln,Sd as mn,Sg as Ya,T as b,Ta as Ro,Td as ca,Te as ha,Tf as Oi,Tg as Qa,U as y,Ua as K,Ud as pa,Ue as va,Uf as Vi,Ug as za,Va as pe,Vd as je,Vf as Va,Vg as ii,W as ht,Wa as Lt,Wd as un,We as Ca,Wf as ka,X as en,Xa as Ao,Xe as ba,Xf as Xt,Xg as Ai,Ya as $,Yd as da,Ye as Cn,Yf as ei,Yg as xn,Z as vi,Za as B,Zd as _n,Zg as Za,_ as o,_d as xi,_f as He,_g as Pn,a as X,aa as P,ad as sn,ae as Pi,af as Bn,ag as ot,ah as ni,b as fe,be as J,bf as ya,bg as Ra,bh as ue,ca as E,cb as on,cg as Aa,ch as gt,d as Rl,da as To,db as G,dd as Xo,de as Ee,dg as Ba,dh as rt,e as se,ed as k,ee as it,eg as wa,f as _o,fa as Do,fd as ea,fe as ye,fg as Ma,g as ft,ga as ce,gd as xt,ge as ua,gf as xa,gg as at,h as Be,ha as _,hd as ta,he as gn,hh as Tn,i as le,ia as An,id as dt,ie as Gt,if as Kt,j as Ui,ja as a,jb as Bo,jd as Fe,jf as Ve,k as he,ka as So,kd as ia,kg as Re,l as go,la as w,m as Zi,ma as c,md as R,mf as Yt,n as S,na as p,nb as ne,nf as Di,o as ee,oa as h,of as Pa,og as de,p as Ne,pa as M,pd as na,pf as Ia,pg as Na,q as Ji,qa as N,qd as oa,qf as Si,qg as La,r as bt,ra as kt,rb as et,rd as aa,re as fn,rf as Qt,rg as Ua,sa as D,sb as Gi,se as hn,sf as Fi,t as fo,ta as C,td as ra,te as vn,tg as $a,u as $i,ua as u,ub as wo,ud as Ge,ue as Y,uf as Ei,ug as wn,v as ho,va as Fo,vd as ie,ve as We,vg as yn,wa as Eo,wb as mi,wd as Ye,we as Oe,wf as Ta,wg as St,x as lt,xa as Oo,xd as Z,xe as te,xf as Da,y as st,ya as pt,yd as ve,ye as jt,za as Je,zb as V,zd as la,ze as Wt,zg as Ga}from"./chunk-EGKRCM5I.js";var Mn=Rl(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.StockMovementType=q.SortOrder=q.SettingsStoreScopeType=q.Permission=q.OrderType=q.MetricType=q.MetricInterval=q.LogicalOperator=q.LanguageCode=q.JobState=q.HistoryEntryType=q.GlobalFlag=q.ErrorCode=q.DeletionResult=q.CurrencyCode=q.AssetType=q.AdjustmentType=void 0;var Ja=function(e){return e.DISTRIBUTED_ORDER_PROMOTION="DISTRIBUTED_ORDER_PROMOTION",e.OTHER="OTHER",e.PROMOTION="PROMOTION",e}(Ja||(q.AdjustmentType=Ja={})),Xa=function(e){return e.BINARY="BINARY",e.IMAGE="IMAGE",e.VIDEO="VIDEO",e}(Xa||(q.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||(q.CurrencyCode=er={})),tr=function(e){return e.DELETED="DELETED",e.NOT_DELETED="NOT_DELETED",e}(tr||(q.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.MISSING_PASSWORD_ERROR="MISSING_PASSWORD_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.PASSWORD_ALREADY_SET_ERROR="PASSWORD_ALREADY_SET_ERROR",e.PASSWORD_RESET_TOKEN_EXPIRED_ERROR="PASSWORD_RESET_TOKEN_EXPIRED_ERROR",e.PASSWORD_RESET_TOKEN_INVALID_ERROR="PASSWORD_RESET_TOKEN_INVALID_ERROR",e.PASSWORD_VALIDATION_ERROR="PASSWORD_VALIDATION_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_GROUP_IN_USE_ERROR="PRODUCT_OPTION_GROUP_IN_USE_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_DESTINATION_ERROR="REFUND_DESTINATION_ERROR",e.REFUND_INCOMPLETE_ERROR="REFUND_INCOMPLETE_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||(q.ErrorCode=ir={})),nr=function(e){return e.FALSE="FALSE",e.INHERIT="INHERIT",e.TRUE="TRUE",e}(nr||(q.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_CURRENCY_UPDATED="ORDER_CURRENCY_UPDATED",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||(q.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||(q.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||(q.LanguageCode=rr={})),lr=function(e){return e.AND="AND",e.OR="OR",e}(lr||(q.LogicalOperator=lr={})),sr=function(e){return e.Daily="Daily",e}(sr||(q.MetricInterval=sr={})),cr=function(e){return e.AverageOrderValue="AverageOrderValue",e.OrderCount="OrderCount",e.OrderTotal="OrderTotal",e}(cr||(q.MetricType=cr={})),pr=function(e){return e.Aggregate="Aggregate",e.Regular="Regular",e.Seller="Seller",e}(pr||(q.OrderType=pr={})),dr=function(e){return e.Authenticated="Authenticated",e.CreateAdministrator="CreateAdministrator",e.CreateApiKey="CreateApiKey",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.DeleteApiKey="DeleteApiKey",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.ReadApiKey="ReadApiKey",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.ReadSecret="ReadSecret",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.UpdateApiKey="UpdateApiKey",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||(q.Permission=dr={})),mr=function(e){return e.CHANNEL="CHANNEL",e.CUSTOM="CUSTOM",e.GLOBAL="GLOBAL",e.USER="USER",e.USER_AND_CHANNEL="USER_AND_CHANNEL",e}(mr||(q.SettingsStoreScopeType=mr={})),ur=function(e){return e.ASC="ASC",e.DESC="DESC",e}(ur||(q.SortOrder=ur={})),_r=function(e){return e.ADJUSTMENT="ADJUSTMENT",e.ALLOCATION="ALLOCATION",e.CANCELLATION="CANCELLATION",e.RELEASE="RELEASE",e.RETURN="RETURN",e.SALE="SALE",e}(_r||(q.StockMovementType=_r={}))});var Vl=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),g=this.createProductOptionGroups(m,i);return bt(r,g).pipe(Ne(([{createProduct:x},I])=>(I.length?bt(I.map(L=>this.dataService.product.addOptionGroupToProduct({productId:x.id,optionGroupId:L.id}))):he([])).pipe(S(()=>({createProduct:x,optionGroups:I})))),Ne(({createProduct:x,optionGroups:I})=>{let F=n.variants.map(z=>{let re=I.length?z.optionValues.map((ge,we)=>{let Me=I[we].options.find(fi=>fi.name===ge);if(!Me)throw new Error(`Could not find a matching ProductOption "${ge}" 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,F,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(S(r=>r.createProductOptionGroup)))):he([])}createProductVariants(t,n,i,r,m){let g=n.map(x=>{let I=i.length?`${t.name} ${x.optionIds.map(F=>i.find(L=>L.id===F)).filter(gr.notNullOrUndefined).map(F=>F.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(g).pipe(S(({createProductVariants:x})=>({createProductVariants:x,productId:t.id})))}updateProduct(t){let{product:n,languageCode:i,autoUpdate:r,productInput:m,variantsInput:g}=t,x=[],I=g||[];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 ge of L){let we=ue(ge,i)?.name||"",Me,fi=I.find(Rn=>Rn.id===ge.id);fi?Me=fi:(Me={id:ge.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,...ge.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:g})=>g.items):he([])).pipe(Ne(g=>{let x=he([]);if(n){let I=new Map;for(let L of t){let z=ue(L,r)?.name,re;for(let ge of g)re||ge.options.map(we=>we.id).includes(L.id)&&(re||(re=ue(ge.options.find(we=>we.id===L.id),r)?.name));re&&z&&I.set(re,z)}let F=[];if(I.size){let L=Array.from(I.keys());for(let z of g){let re=ue(z,r)?.name;if(!re||!L.some(we=>re.includes(we)))continue;let ge=L.reduce((we,Me)=>Nn(we,Me,I.get(Me)),re);F.push({id:z.id,translations:[{languageCode:r,name:ge}]})}}F.length?x=this.dataService.product.updateProductVariants(F):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===et.DELETED?this.dataService.product.getProduct(n).single$:go(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 wl(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 Ml(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 Nl(e,l){if(e&1&&f(0),e&2){let t=l.item;v(" ",t.value.id," ")}}function Ll(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 Ul(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 $l(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 Gl(e,l){if(e&1&&h(0,"input",29),e&2){let t=l.item;a("formControl",t.get("code"))}}function jl(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 Wl(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"),_(3,Nl,1,1,"ng-template"),p(),c(4,"vdr-dt2-column",23),s(5,"translate"),_(6,Ll,2,4,"ng-template"),p(),c(7,"vdr-dt2-column",24),s(8,"translate"),_(9,Ul,2,4,"ng-template"),p(),c(10,"vdr-dt2-column",25),s(11,"translate"),_(12,$l,2,4,"ng-template"),p(),c(13,"vdr-dt2-column",26),s(14,"translate"),_(15,Gl,1,1,"ng-template"),p(),c(16,"vdr-dt2-column",27),s(17,"translate"),_(18,jl,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 ql(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()(),_(11,Ml,3,5,"ng-container",17)(12,Wl,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 Hl(e,l){if(e&1&&(c(0,"form",7)(1,"div",8),_(2,ql,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 Ka{constructor(t,n,i,r,m,g,x,I,F){super(t,n,i,r,m),this.route=t,this.router=n,this.serverConfigService=i,this.dataService=r,this.permissionsService=m,this.productDetailService=g,this.formBuilder=x,this.changeDetector=I,this.notificationService=F,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(S(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(st(1),Ne(([{optionGroups:n},i,r])=>{let m=[],g=[];for(let x of this.getOptionGroups()){if(x.dirty){let I=n.find(F=>F.id===x.value.id);if(I){let F=this.getUpdatedOptionGroup(I,x,i);m.push(this.dataService.product.updateProductOptionGroup(F))}}for(let I of this.getOptions(x))if(I.dirty){let F=n.find(L=>L.id===x.value.id)?.options.find(L=>L.id===I.value.id);if(F){let L=this.getUpdatedOption(F,I,i);g.push(L)}}}return g.length&&m.push(this.productDetailService.updateProductOptions(g,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 rt({translatable:t,updatedFields:n.value,customFieldConfig:this.optionGroupCustomFields,languageCode:i,defaultTranslation:{languageCode:i,name:t.name||""}})}getUpdatedOption(t,n,i){return rt({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),g=this.setOptionGroupForm(r,i,m);this.setCustomFieldsForm(this.optionGroupCustomFields,g,r,m);let x=g.get("options");x||(x=this.formBuilder.array([]),g.addControl("options",x));for(let I of r.options){let F=ue(I,n),L=this.setOptionForm(I,x,F);this.setCustomFieldsForm(this.optionCustomFields,L,I,F)}}}setCustomFieldsForm(t,n,i,r){if(t.length){let m=n.get(["customFields"]);m||(m=this.formBuilder.group(t.reduce((g,x)=>fe(X({},g),{[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(g=>g.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(g=>g.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(Y))}}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()()(),_(20,wl,3,4,"button",4),p()()()(),c(21,"vdr-page-block"),_(22,Hl,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,it,$,B,mt,ie,Ge,Z,ve,tt,Pt,Ce,be,$t,bi,Te,Pe,Ie,me,Q,Re,xe,ut,at,He,Ua,$a,La,Na,de,Dt,_t,G,R,qe,nt],styles:[`.option-group-header[_ngcontent-%COMP%]{display:flex;align-items:baseline}
|
|
1
|
+
import{a as oi}from"./chunk-SRNLD6QJ.js";import{$ as Io,$d as ma,$e as Ht,$f as ti,$g as In,A as vo,Aa as Xe,Ab as Mo,Ad as Ci,Ae as qt,Af as ut,Ag as ja,B as Se,Ba as U,Bb as No,Be as It,Bf as Dt,Bg as Wa,C as Xi,Ca as f,Cb as Lo,Cc as Yo,Cd as vt,Cf as zt,Da as T,Db as an,Dd as At,De as _a,Df as Zt,Dg as qa,Ea as v,Eb as Uo,Ed as tt,Ef as Sa,F as Ot,Fa as Nt,Fb as $o,Fd as mt,Ff as _t,G as Co,Ga as Vo,Gb as Go,Gd as Ut,Ge as Ii,Gf as qe,H as Ke,Ha as Le,Hb as jo,He as Q,Hf as Fa,I as A,Ia as Ue,Ib as Wo,Id as Pt,Ie as me,If as Ea,J as bo,Ja as $e,Jb as qo,Jc as Al,Jd as Ce,Jf as Oa,K as Vt,Ka as tn,Kb as Ho,Kc as rn,Kd as $t,Ke as ga,Kg as Ae,L as Ze,La as W,Lb as Ko,Lc as Qo,Ld as bi,Le as Ti,Lf as Jt,Lg as ki,Ma as j,Mc as zo,Md as be,Me as nt,Mf as bn,Mg as Ha,N as yo,Na as Rt,Nc as Zo,Nd as cn,Ne as Tt,Nf as xe,O as hi,Oa as nn,Oc as Jo,Od as pn,Of as ke,P as xo,Pa as ko,Pd as dn,Pe as Bl,Pf as Pe,Pg as Ka,Q as Mt,Qa as s,Qd as sa,Qf as Ie,Qg as Ft,R as Po,Ra as d,Rd as yi,Re as fa,Rf as Te,Rg as Ri,S as yt,Sa as O,Sc as ln,Sd as mn,Sg as Ya,T as b,Ta as Ro,Td as ca,Te as ha,Tf as Oi,Tg as Qa,U as y,Ua as K,Ud as pa,Ue as va,Uf as Vi,Ug as za,Va as pe,Vd as je,Vf as Va,Vg as ii,W as ht,Wa as Lt,Wd as un,We as Ca,Wf as ka,X as en,Xa as Ao,Xe as ba,Xf as Xt,Xg as Ai,Ya as $,Yd as da,Ye as Cn,Yf as ei,Yg as xn,Z as vi,Za as B,Zd as _n,Zg as Za,_ as o,_d as xi,_f as He,_g as Pn,a as X,aa as P,ad as sn,ae as Pi,af as Bn,ag as ot,ah as ni,b as fe,be as J,bf as ya,bg as Ra,bh as ue,ca as E,cb as on,cg as Aa,ch as gt,d as Rl,da as To,db as G,dd as Xo,de as Ee,dg as Ba,dh as rt,e as se,ed as k,ee as it,eg as wa,f as _o,fa as Do,fd as ea,fe as ye,fg as Ma,g as ft,ga as ce,gd as xt,ge as ua,gf as xa,gg as at,h as Be,ha as _,hd as ta,he as gn,hh as Tn,i as le,ia as An,id as dt,ie as Gt,if as Kt,j as Ui,ja as a,jb as Bo,jd as Fe,jf as Ve,k as he,ka as So,kd as ia,kg as Re,l as go,la as w,m as Zi,ma as c,md as R,mf as Yt,n as S,na as p,nb as ne,nf as Di,o as ee,oa as h,of as Pa,og as de,p as Ne,pa as M,pd as na,pf as Ia,pg as Na,q as Ji,qa as N,qd as oa,qf as Si,qg as La,r as bt,ra as kt,rb as et,rd as aa,re as fn,rf as Qt,rg as Ua,sa as D,sb as Gi,se as hn,sf as Fi,t as fo,ta as C,td as ra,te as vn,tg as $a,u as $i,ua as u,ub as wo,ud as Ge,ue as Y,uf as Ei,ug as wn,v as ho,va as Fo,vd as ie,ve as We,vg as yn,wa as Eo,wb as mi,wd as Ye,we as Oe,wf as Ta,wg as St,x as lt,xa as Oo,xd as Z,xe as te,xf as Da,y as st,ya as pt,yd as ve,ye as jt,za as Je,zb as V,zd as la,ze as Wt,zg as Ga}from"./chunk-KF5R3OEM.js";var Mn=Rl(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.StockMovementType=q.SortOrder=q.SettingsStoreScopeType=q.Permission=q.OrderType=q.MetricType=q.MetricInterval=q.LogicalOperator=q.LanguageCode=q.JobState=q.HistoryEntryType=q.GlobalFlag=q.ErrorCode=q.DeletionResult=q.CurrencyCode=q.AssetType=q.AdjustmentType=void 0;var Ja=function(e){return e.DISTRIBUTED_ORDER_PROMOTION="DISTRIBUTED_ORDER_PROMOTION",e.OTHER="OTHER",e.PROMOTION="PROMOTION",e}(Ja||(q.AdjustmentType=Ja={})),Xa=function(e){return e.BINARY="BINARY",e.IMAGE="IMAGE",e.VIDEO="VIDEO",e}(Xa||(q.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||(q.CurrencyCode=er={})),tr=function(e){return e.DELETED="DELETED",e.NOT_DELETED="NOT_DELETED",e}(tr||(q.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.MISSING_PASSWORD_ERROR="MISSING_PASSWORD_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.PASSWORD_ALREADY_SET_ERROR="PASSWORD_ALREADY_SET_ERROR",e.PASSWORD_RESET_TOKEN_EXPIRED_ERROR="PASSWORD_RESET_TOKEN_EXPIRED_ERROR",e.PASSWORD_RESET_TOKEN_INVALID_ERROR="PASSWORD_RESET_TOKEN_INVALID_ERROR",e.PASSWORD_VALIDATION_ERROR="PASSWORD_VALIDATION_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_GROUP_IN_USE_ERROR="PRODUCT_OPTION_GROUP_IN_USE_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_DESTINATION_ERROR="REFUND_DESTINATION_ERROR",e.REFUND_INCOMPLETE_ERROR="REFUND_INCOMPLETE_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||(q.ErrorCode=ir={})),nr=function(e){return e.FALSE="FALSE",e.INHERIT="INHERIT",e.TRUE="TRUE",e}(nr||(q.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_CURRENCY_UPDATED="ORDER_CURRENCY_UPDATED",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||(q.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||(q.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||(q.LanguageCode=rr={})),lr=function(e){return e.AND="AND",e.OR="OR",e}(lr||(q.LogicalOperator=lr={})),sr=function(e){return e.Daily="Daily",e}(sr||(q.MetricInterval=sr={})),cr=function(e){return e.AverageOrderValue="AverageOrderValue",e.OrderCount="OrderCount",e.OrderTotal="OrderTotal",e}(cr||(q.MetricType=cr={})),pr=function(e){return e.Aggregate="Aggregate",e.Regular="Regular",e.Seller="Seller",e}(pr||(q.OrderType=pr={})),dr=function(e){return e.Authenticated="Authenticated",e.CreateAdministrator="CreateAdministrator",e.CreateApiKey="CreateApiKey",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.DeleteApiKey="DeleteApiKey",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.ReadApiKey="ReadApiKey",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.ReadSecret="ReadSecret",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.UpdateApiKey="UpdateApiKey",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||(q.Permission=dr={})),mr=function(e){return e.CHANNEL="CHANNEL",e.CUSTOM="CUSTOM",e.GLOBAL="GLOBAL",e.USER="USER",e.USER_AND_CHANNEL="USER_AND_CHANNEL",e}(mr||(q.SettingsStoreScopeType=mr={})),ur=function(e){return e.ASC="ASC",e.DESC="DESC",e}(ur||(q.SortOrder=ur={})),_r=function(e){return e.ADJUSTMENT="ADJUSTMENT",e.ALLOCATION="ALLOCATION",e.CANCELLATION="CANCELLATION",e.RELEASE="RELEASE",e.RETURN="RETURN",e.SALE="SALE",e}(_r||(q.StockMovementType=_r={}))});var Vl=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),g=this.createProductOptionGroups(m,i);return bt(r,g).pipe(Ne(([{createProduct:x},I])=>(I.length?bt(I.map(L=>this.dataService.product.addOptionGroupToProduct({productId:x.id,optionGroupId:L.id}))):he([])).pipe(S(()=>({createProduct:x,optionGroups:I})))),Ne(({createProduct:x,optionGroups:I})=>{let F=n.variants.map(z=>{let re=I.length?z.optionValues.map((ge,we)=>{let Me=I[we].options.find(fi=>fi.name===ge);if(!Me)throw new Error(`Could not find a matching ProductOption "${ge}" 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,F,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(S(r=>r.createProductOptionGroup)))):he([])}createProductVariants(t,n,i,r,m){let g=n.map(x=>{let I=i.length?`${t.name} ${x.optionIds.map(F=>i.find(L=>L.id===F)).filter(gr.notNullOrUndefined).map(F=>F.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(g).pipe(S(({createProductVariants:x})=>({createProductVariants:x,productId:t.id})))}updateProduct(t){let{product:n,languageCode:i,autoUpdate:r,productInput:m,variantsInput:g}=t,x=[],I=g||[];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 ge of L){let we=ue(ge,i)?.name||"",Me,fi=I.find(Rn=>Rn.id===ge.id);fi?Me=fi:(Me={id:ge.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,...ge.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:g})=>g.items):he([])).pipe(Ne(g=>{let x=he([]);if(n){let I=new Map;for(let L of t){let z=ue(L,r)?.name,re;for(let ge of g)re||ge.options.map(we=>we.id).includes(L.id)&&(re||(re=ue(ge.options.find(we=>we.id===L.id),r)?.name));re&&z&&I.set(re,z)}let F=[];if(I.size){let L=Array.from(I.keys());for(let z of g){let re=ue(z,r)?.name;if(!re||!L.some(we=>re.includes(we)))continue;let ge=L.reduce((we,Me)=>Nn(we,Me,I.get(Me)),re);F.push({id:z.id,translations:[{languageCode:r,name:ge}]})}}F.length?x=this.dataService.product.updateProductVariants(F):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===et.DELETED?this.dataService.product.getProduct(n).single$:go(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 wl(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 Ml(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 Nl(e,l){if(e&1&&f(0),e&2){let t=l.item;v(" ",t.value.id," ")}}function Ll(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 Ul(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 $l(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 Gl(e,l){if(e&1&&h(0,"input",29),e&2){let t=l.item;a("formControl",t.get("code"))}}function jl(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 Wl(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"),_(3,Nl,1,1,"ng-template"),p(),c(4,"vdr-dt2-column",23),s(5,"translate"),_(6,Ll,2,4,"ng-template"),p(),c(7,"vdr-dt2-column",24),s(8,"translate"),_(9,Ul,2,4,"ng-template"),p(),c(10,"vdr-dt2-column",25),s(11,"translate"),_(12,$l,2,4,"ng-template"),p(),c(13,"vdr-dt2-column",26),s(14,"translate"),_(15,Gl,1,1,"ng-template"),p(),c(16,"vdr-dt2-column",27),s(17,"translate"),_(18,jl,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 ql(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()(),_(11,Ml,3,5,"ng-container",17)(12,Wl,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 Hl(e,l){if(e&1&&(c(0,"form",7)(1,"div",8),_(2,ql,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 Ka{constructor(t,n,i,r,m,g,x,I,F){super(t,n,i,r,m),this.route=t,this.router=n,this.serverConfigService=i,this.dataService=r,this.permissionsService=m,this.productDetailService=g,this.formBuilder=x,this.changeDetector=I,this.notificationService=F,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(S(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(st(1),Ne(([{optionGroups:n},i,r])=>{let m=[],g=[];for(let x of this.getOptionGroups()){if(x.dirty){let I=n.find(F=>F.id===x.value.id);if(I){let F=this.getUpdatedOptionGroup(I,x,i);m.push(this.dataService.product.updateProductOptionGroup(F))}}for(let I of this.getOptions(x))if(I.dirty){let F=n.find(L=>L.id===x.value.id)?.options.find(L=>L.id===I.value.id);if(F){let L=this.getUpdatedOption(F,I,i);g.push(L)}}}return g.length&&m.push(this.productDetailService.updateProductOptions(g,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 rt({translatable:t,updatedFields:n.value,customFieldConfig:this.optionGroupCustomFields,languageCode:i,defaultTranslation:{languageCode:i,name:t.name||""}})}getUpdatedOption(t,n,i){return rt({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),g=this.setOptionGroupForm(r,i,m);this.setCustomFieldsForm(this.optionGroupCustomFields,g,r,m);let x=g.get("options");x||(x=this.formBuilder.array([]),g.addControl("options",x));for(let I of r.options){let F=ue(I,n),L=this.setOptionForm(I,x,F);this.setCustomFieldsForm(this.optionCustomFields,L,I,F)}}}setCustomFieldsForm(t,n,i,r){if(t.length){let m=n.get(["customFields"]);m||(m=this.formBuilder.group(t.reduce((g,x)=>fe(X({},g),{[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(g=>g.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(g=>g.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(Y))}}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()()(),_(20,wl,3,4,"button",4),p()()()(),c(21,"vdr-page-block"),_(22,Hl,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,it,$,B,mt,ie,Ge,Z,ve,tt,Pt,Ce,be,$t,bi,Te,Pe,Ie,me,Q,Re,xe,ut,at,He,Ua,$a,La,Na,de,Dt,_t,G,R,qe,nt],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 xr=se(oi()),Pr=se(Jt());var fr=se(oi());function Kl(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,fr.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&&(_(0,Kl,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()(),_(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,Q,We,Oe,R],encapsulation:2,changeDetection:0})}}return e})();var vr=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 zl(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 Jl(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 Xl(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(g=>g==null)&&n&&i&&!i.dirty){let g=Object.entries(n).map(([x,I])=>this.product.optionGroups.find(F=>F.code===x)?.options.find(F=>F.id===I)?.name).join(" ");i.setValue(`${this.product.name} ${g}`)}Object.values(n).every(g=>g!=null)&&(this.existingVariant=this.product.variants.find(g=>Object.entries(n).every(([x,I])=>g.options.find(F=>F.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(vr.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&&(_(0,Ql,2,3,"ng-template",0),c(1,"form",1)(2,"div",2),_(3,zl,2,3,"vdr-form-field",3)(4,Zl,5,4,"clr-alert",4),p(),_(5,Jl,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()()(),_(16,Xl,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,Kt,me,Q,We,Oe,R],encapsulation:2,changeDetection:0})}}return e})();var Cr=se(Jt());var es=["textArea"],ts=["editNameInput"];function is(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 ns(e,l){if(e&1&&(c(0,"div",5),_(1,is,6,12,"vdr-chip",6),p()),e&2){let t=u();o(),a("ngForOf",t.optionValues)}}var os={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,Cr.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(es,7),pt(ts,5,en)),n&2){let r;Je(r=Xe())&&(i.textArea=r.first),Je(r=Xe())&&(i.nameInputs=r)}},inputs:{groupName:"groupName",options:"options",disabled:"disabled"},outputs:{add:"add",remove:"remove",edit:"edit"},standalone:!1,features:[tn([os])],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 g=U(3);return y(g.focus())}),_(1,ns,2,1,"div",3),c(2,"textarea",4,0),C("keyup",function(g){return b(r),y(i.handleKey(g))})("focus",function(){return b(r),y(i.isFocussed=!0)})("blur",function(){return b(r),y(i.handleBlur())}),$e("ngModelChange",function(g){return b(r),Ue(i.input,g)||(i.input=g),y(g)}),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,tt,Ve,Q],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-FSSGIU45.js";import{$ as Io,$d as ma,$e as Ht,$f as
|
|
|
356
356
|
}
|
|
357
357
|
${T0}
|
|
358
358
|
`;export{P_ as ASSET_DETAIL_QUERY,Hi as ApplyFacetDialogComponent,Dr as AssetDetailComponent,Er as AssetListComponent,di as AssignProductsToChannelDialogComponent,Ki as BulkAddFacetValuesDialogComponent,bg as COLLECTION_DETAIL_QUERY,ph as CatalogModule,zi as CollectionBreadcrumbPipe,Yi as CollectionContentsComponent,Qi as CollectionDataTableComponent,$r as CollectionDetailComponent,Qr as CollectionListComponent,fd as CollectionTreeComponent,oo as CollectionTreeNodeComponent,Ni as CollectionTreeService,bd as ConfirmVariantDeletionDialogComponent,ao as CreateFacetValueDialogComponent,$n as CreateProductOptionGroupDialogComponent,jn as CreateProductVariantDialogComponent,$d as FACET_DETAIL_QUERY,Cf as FACET_LIST_QUERY,tl as FacetDetailComponent,ll as FacetListComponent,Vr as GET_PRODUCTS_WITH_FACET_VALUES_BY_IDS,Lf as GET_PRODUCT_DETAIL,kr as GET_VARIANTS_WITH_FACET_VALUES_BY_IDS,so as GenerateProductVariantsComponent,yr as GeneratedVariant,to as MoveCollectionsDialogComponent,os as OPTION_VALUE_INPUT_VALUE_ACCESSOR,wi as OptionValueInputComponent,uh as PRODUCT_LIST_QUERY,hh as PRODUCT_VARIANT_DETAIL_QUERY,kl as PRODUCT_VARIANT_DETAIL_QUERY_PRODUCT_VARIANT_FRAGMENT,xh as PRODUCT_VARIANT_LIST_QUERY,vh as PRODUCT_VARIANT_UPDATE_MUTATION,fl as ProductDetailComponent,ai as ProductDetailService,xl as ProductListComponent,Un as ProductOptionsEditorComponent,Tl as ProductVariantDetailComponent,On as ProductVariantListComponent,mo as ProductVariantQuickJumpComponent,Wn as ProductVariantsEditorComponent,Ir as ProductVariantsResolver,v0 as ProductVariantsTableComponent,Rr as UPDATE_PRODUCTS_BULK,Ar as UPDATE_VARIANTS_BULK,P0 as UpdateProductOptionDialogComponent,co as VariantPriceDetailComponent,po as VariantPriceStrategyDetailComponent,Zr as arrayToTree,qr as assignCollectionsToChannelBulkAction,El as assignFacetValuesToProductVariantsBulkAction,bl as assignFacetValuesToProductsBulkAction,ol as assignFacetsToChannelBulkAction,Dl as assignProductVariantsToChannelBulkAction,vl as assignProductsToChannelBulkAction,Tr as createRoutes,jr as deleteCollectionsBulkAction,nl as deleteFacetsBulkAction,Fl as deleteProductVariantsBulkAction,hl as deleteProductsBulkAction,Kr as duplicateCollectionsBulkAction,rl as duplicateFacetsBulkAction,yl as duplicateProductsBulkAction,Wr as moveCollectionsBulkAction,vs as productOptionsEditorBreadcrumb,Hr as removeCollectionsFromChannelBulkAction,al as removeFacetsFromChannelBulkAction,gf as removeFacetsFromChannelBulkAction2,Sl as removeProductVariantsFromChannelBulkAction,Cl as removeProductsFromChannelBulkAction,Nn as replaceLast};
|
|
359
|
-
//# sourceMappingURL=chunk-
|
|
359
|
+
//# sourceMappingURL=chunk-OP4GJHDJ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$a as qn,$b as Xn,$f as Ai,A as Dn,Aa as Ct,Ab as vt,Ad as me,Ae as we,Af as nt,B as ni,Ba as J,Be as We,Bf as Ei,Ca as u,Cd as H,Cf as wt,Cg as $i,Da as v,Dd as pe,De as Di,Df as Pt,E as wn,Ea as g,Ed as oe,Ee as ur,Ef as rt,F as Pn,Fa as ie,Fd as St,Ff as ye,Fg as Er,Ga as di,Gd as $e,Ge as He,Gf as Fi,H as ri,Ha as R,Hd as nr,He as U,I as L,Ia as N,Id as Ot,Ie as ve,Ja as $,Jc as ko,Jd as Ze,Je as Y,K as pn,Kf as Ue,Kg as kt,L as Ye,La as Gt,Ma as A,Mb as zn,Md as It,Me as he,Mg as Fr,Na as Fe,Nd as rr,Ne as k,Nf as Bi,O as oi,Oa as sn,Od as or,Of as Mt,P as Mn,Pa as Rn,Pc as Kn,Pd as ar,Pe as Ao,Pf as Et,Q as Le,Qa as d,Qd as et,Qf as ot,Qg as Lt,Ra as s,Rd as je,Rf as at,Rg as ji,S as Ae,Sa as x,Sd as gi,Sf as ki,T as h,Tc as Zn,U as y,Ua as ee,Ud as un,Ue as fr,V as ai,Va as Re,Vd as lr,Ve as wi,Vg as Br,W as X,Wa as Nn,Wd as Tt,X as En,Xa as $n,Xd as Ci,Xf as Sr,Ya as M,Yb as Yn,Yf as Li,Z as xe,Za as w,Zb as Jn,Zf as Ft,_ as r,_a as jn,_b as mi,_f as Ge,a as G,aa as P,ab as Wn,ac as ui,ad as mt,ag as Or,b as se,ba as Fn,bb as pi,bd as Lo,be as B,bg as Ir,c as In,ca as O,cb as si,cd as er,ce as vi,cf as _r,cg as Tr,ch as kr,da as Bn,db as W,dd as ht,de as Ce,df as gr,dg as Dr,e as Be,ed as K,ee as dr,ef as Cr,fe as tt,fh as qi,g as ke,ga as Ie,gb as Hn,gf as vr,gg as lt,h as Ut,ha as f,hb as ci,hd as tr,he as pr,hf as hr,hg as wr,i as Ee,ia as Ve,ib as Un,id as fi,ie as sr,if as Dt,ig as Qe,ja as o,jd as Ne,je as hi,jf as ue,jg as Pr,k as ce,ka as kn,kd as ir,ke as yi,la as Q,le as xi,lg as fe,ma as a,md as I,me as bi,mg as Mr,n as _e,na as l,nb as be,ne as Si,ng as dt,o as Tn,oa as _,od as _i,oe as Oi,og as pt,pa as T,pe as cr,q as Zt,qa as D,qb as Gn,qe as mr,r as ei,ra as Xe,rb as Qn,rd as yt,re as Ii,rf as yr,sa as S,sb as cn,se as Ti,ta as b,tb as q,tf as xr,ua as m,ud as xt,ue as it,uf as Pe,v as ti,va as Ln,vd as ne,ve as ae,vf as Pi,vg as Vi,wa as An,wb as mn,wd as re,we as te,wg as Bt,x as _t,xa as Vn,xd as z,xe as qe,xg as Ri,y as Oe,ya as li,yb as ct,yd as Ke,ye as Te,yf as br,yg as Ni,z as ii,za as gt,zd as bt,ze as De,zf as Mi}from"./chunk-
|
|
1
|
+
import{$a as qn,$b as Xn,$f as Ai,A as Dn,Aa as Ct,Ab as vt,Ad as me,Ae as we,Af as nt,B as ni,Ba as J,Be as We,Bf as Ei,Ca as u,Cd as H,Cf as wt,Cg as $i,Da as v,Dd as pe,De as Di,Df as Pt,E as wn,Ea as g,Ed as oe,Ee as ur,Ef as rt,F as Pn,Fa as ie,Fd as St,Ff as ye,Fg as Er,Ga as di,Gd as $e,Ge as He,Gf as Fi,H as ri,Ha as R,Hd as nr,He as U,I as L,Ia as N,Id as Ot,Ie as ve,Ja as $,Jc as ko,Jd as Ze,Je as Y,K as pn,Kf as Ue,Kg as kt,L as Ye,La as Gt,Ma as A,Mb as zn,Md as It,Me as he,Mg as Fr,Na as Fe,Nd as rr,Ne as k,Nf as Bi,O as oi,Oa as sn,Od as or,Of as Mt,P as Mn,Pa as Rn,Pc as Kn,Pd as ar,Pe as Ao,Pf as Et,Q as Le,Qa as d,Qd as et,Qf as ot,Qg as Lt,Ra as s,Rd as je,Rf as at,Rg as ji,S as Ae,Sa as x,Sd as gi,Sf as ki,T as h,Tc as Zn,U as y,Ua as ee,Ud as un,Ue as fr,V as ai,Va as Re,Vd as lr,Ve as wi,Vg as Br,W as X,Wa as Nn,Wd as Tt,X as En,Xa as $n,Xd as Ci,Xf as Sr,Ya as M,Yb as Yn,Yf as Li,Z as xe,Za as w,Zb as Jn,Zf as Ft,_ as r,_a as jn,_b as mi,_f as Ge,a as G,aa as P,ab as Wn,ac as ui,ad as mt,ag as Or,b as se,ba as Fn,bb as pi,bd as Lo,be as B,bg as Ir,c as In,ca as O,cb as si,cd as er,ce as vi,cf as _r,cg as Tr,ch as kr,da as Bn,db as W,dd as ht,de as Ce,df as gr,dg as Dr,e as Be,ed as K,ee as dr,ef as Cr,fe as tt,fh as qi,g as ke,ga as Ie,gb as Hn,gf as vr,gg as lt,h as Ut,ha as f,hb as ci,hd as tr,he as pr,hf as hr,hg as wr,i as Ee,ia as Ve,ib as Un,id as fi,ie as sr,if as Dt,ig as Qe,ja as o,jd as Ne,je as hi,jf as ue,jg as Pr,k as ce,ka as kn,kd as ir,ke as yi,la as Q,le as xi,lg as fe,ma as a,md as I,me as bi,mg as Mr,n as _e,na as l,nb as be,ne as Si,ng as dt,o as Tn,oa as _,od as _i,oe as Oi,og as pt,pa as T,pe as cr,q as Zt,qa as D,qb as Gn,qe as mr,r as ei,ra as Xe,rb as Qn,rd as yt,re as Ii,rf as yr,sa as S,sb as cn,se as Ti,ta as b,tb as q,tf as xr,ua as m,ud as xt,ue as it,uf as Pe,v as ti,va as Ln,vd as ne,ve as ae,vf as Pi,vg as Vi,wa as An,wb as mn,wd as re,we as te,wg as Bt,x as _t,xa as Vn,xd as z,xe as qe,xg as Ri,y as Oe,ya as li,yb as ct,yd as Ke,ye as Te,yf as br,yg as Ni,z as ii,za as gt,zd as bt,ze as De,zf as Mi}from"./chunk-KF5R3OEM.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 Xn,$f as Ai,A as Dn,Aa as Ct,Ab as vt,Ad as me,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:E})=>this.router.parseUrl(`/orders/draft/${E.id}`))):!0:this.dataService.query(Lm,{id:C}).single$.pipe(_e(({order:E})=>E?.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:Fo}),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:Xr,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:Eo,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:[Fr,ir.forChild([])]})}}return t})();export{Ar as AddManualPaymentDialogComponent,Vr as CancelOrderDialogComponent,Ui as CouponCodeSelectorComponent,Xr 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,Ji 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,Eo as OrderEditorComponent,Po as OrderEditsPreviewDialogComponent,Kt as OrderGuard,So as OrderHistoryComponent,ho as OrderHistoryEntryHostComponent,Fo 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,Xi 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-R6O47WNV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as u}from"./chunk-KF5R3OEM.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-SRNLD6QJ.js.map
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
<link rel="stylesheet" href="styles-66Q4VSBH.css"></head>
|
|
11
11
|
<body>
|
|
12
12
|
<vdr-root></vdr-root>
|
|
13
|
-
<link rel="modulepreload" href="chunk-
|
|
13
|
+
<link rel="modulepreload" href="chunk-KF5R3OEM.js"><script src="polyfills-BIMCQJWN.js" type="module"></script><script src="main-T4ECEZ2U.js" type="module"></script></body>
|
|
14
14
|
</html>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Og as d,P as t,Ze as m,da as r,gh as l,kb as e,kd as p,lb as i,ld as a,nd as n}from"./chunk-KF5R3OEM.js";var h=[{path:"login",loadChildren:()=>import("./chunk-6NHPZKGT.js").then(o=>o.LoginModule)},{path:"",canActivate:[l],component:m,data:{breadcrumb:"breadcrumb.dashboard"},children:[{path:"",pathMatch:"full",loadChildren:()=>import("./chunk-IAPGIKQD.js").then(o=>o.DashboardModule)},{path:"catalog",loadChildren:()=>import("./chunk-OP4GJHDJ.js").then(o=>o.CatalogModule)},{path:"customer",loadChildren:()=>import("./chunk-2EC7E3GL.js").then(o=>o.CustomerModule)},{path:"orders",loadChildren:()=>import("./chunk-R6O47WNV.js").then(o=>o.OrderModule)},{path:"marketing",loadChildren:()=>import("./chunk-5OECGTAM.js").then(o=>o.MarketingModule)},{path:"settings",loadChildren:()=>import("./chunk-LG3K5JIF.js").then(o=>o.SettingsModule)},{path:"system",loadChildren:()=>import("./chunk-DJVZZFTP.js").then(o=>o.SystemModule)}]}];var s=(()=>{class o{static{this.\u0275fac=function(c){return new(c||o)}}static{this.\u0275mod=r({type:o,bootstrap:[a]})}static{this.\u0275inj=t({imports:[e,d,p.forRoot(h,{useHash:!1})]})}}return o})();var u={production:!0};u.production&&void 0;n().then(()=>i().bootstrapModule(s)).catch(o=>{console.log(o)});
|
|
2
|
+
//# sourceMappingURL=main-T4ECEZ2U.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/admin-ui-plugin",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.1-master-202610140211",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
],
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/vendurehq/vendure"
|
|
11
|
+
"url": "git+https://github.com/vendurehq/vendure.git",
|
|
12
|
+
"directory": "packages/admin-ui-plugin"
|
|
12
13
|
},
|
|
13
14
|
"license": "GPL-3.0-or-later",
|
|
14
15
|
"scripts": {
|
|
@@ -25,9 +26,9 @@
|
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"@types/express": "^5.0.1",
|
|
27
28
|
"@types/fs-extra": "^11.0.4",
|
|
28
|
-
"@vendure/admin-ui": "3.8.
|
|
29
|
-
"@vendure/common": "3.8.
|
|
30
|
-
"@vendure/core": "3.8.
|
|
29
|
+
"@vendure/admin-ui": "^3.8.1-master-202610140211",
|
|
30
|
+
"@vendure/common": "^3.8.1-master-202610140211",
|
|
31
|
+
"@vendure/core": "^3.8.1-master-202610140211",
|
|
31
32
|
"express": "^5.1.0",
|
|
32
33
|
"rimraf": "^5.0.5",
|
|
33
34
|
"typescript": "5.8.2"
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Og as d,P as t,Ze as m,da as r,gh as l,kb as e,kd as p,lb as i,ld as a,nd as n}from"./chunk-EGKRCM5I.js";var h=[{path:"login",loadChildren:()=>import("./chunk-Y55M4F5Y.js").then(o=>o.LoginModule)},{path:"",canActivate:[l],component:m,data:{breadcrumb:"breadcrumb.dashboard"},children:[{path:"",pathMatch:"full",loadChildren:()=>import("./chunk-MEZOWMXC.js").then(o=>o.DashboardModule)},{path:"catalog",loadChildren:()=>import("./chunk-NPLWVR7B.js").then(o=>o.CatalogModule)},{path:"customer",loadChildren:()=>import("./chunk-L4T3UAHB.js").then(o=>o.CustomerModule)},{path:"orders",loadChildren:()=>import("./chunk-XEHXBITP.js").then(o=>o.OrderModule)},{path:"marketing",loadChildren:()=>import("./chunk-KCOKP7TM.js").then(o=>o.MarketingModule)},{path:"settings",loadChildren:()=>import("./chunk-SH5M3BJI.js").then(o=>o.SettingsModule)},{path:"system",loadChildren:()=>import("./chunk-IWFA46M4.js").then(o=>o.SystemModule)}]}];var s=(()=>{class o{static{this.\u0275fac=function(c){return new(c||o)}}static{this.\u0275mod=r({type:o,bootstrap:[a]})}static{this.\u0275inj=t({imports:[e,d,p.forRoot(h,{useHash:!1})]})}}return o})();var u={production:!0};u.production&&void 0;n().then(()=>i().bootstrapModule(s)).catch(o=>{console.log(o)});
|
|
2
|
-
//# sourceMappingURL=main-WG27YQAN.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|