dealposbarcode 25.49.0 → 25.50.0

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.
@@ -1 +1 @@
1
- import{g as k,i as A,j as H,k as O}from"./chunk-SPKFLYGU.js";import{t as N}from"./chunk-G2JXUY7S.js";import"./chunk-X4PZGB4F.js";import"./chunk-TRX4W32W.js";import{Q as z,a as F}from"./chunk-RH3ZV23S.js";import"./chunk-CARY4E7O.js";import{l as E}from"./chunk-LTVGOJEF.js";import{Ad as R,C as d,Da as l,Ec as T,Ha as S,I as _,J as u,Nc as I,Rb as f,Vb as a,Xa as v,Z as g,ac as b,cc as y,dc as w,ec as D,fc as L,gc as p,hc as s,ic as m,qd as P,rd as x,sd as $,ta as C,td as M,zb as c}from"./chunk-UE2JJIFL.js";function U(t,i){t&1&&(s(0),p(1,"choose-product"),m())}function V(t,i){t&1&&p(0,"div",7)}function j(t,i){if(t&1&&(p(0,"app-label-preview",5),f(1,V,1,0,"div",6)),t&2){let e=i.$implicit,n=i.$index,r=i.$count;a("item",e),c(),a("ngIf",n!==r-1)}}function q(t,i){if(t&1&&y(0,j,2,2,null,null,b),t&2){let e=i.$implicit;w(e)}}function B(t,i){t&1&&(s(0),D(1,"app-customize-label",4),f(2,q,2,0,"ng-template",null,0,I),L(),m())}function G(t,i){t&1&&(s(0),p(1,"app-print-preview"),m())}var pe=(()=>{class t{constructor(){this.store=l(N),this.httpService=l(z),this.destroyRef=l(v),this.routes=l(E)}get printMode(){let e=this.routes.snapshot.queryParamMap.get("printMode");return console.log("printMode",e),e}ngOnInit(){this.store.onReset(),console.log(localStorage.getItem("Domain"))}ngAfterViewInit(){let e=this.getHostFromDomain();this.loadInitialData(e)}getHostFromDomain(){let e=localStorage.getItem("Domain");return e?this.hasProtocol(e)?new URL(e).hostname:e:null}hasProtocol(e){return/^(https?):\/\//.test(e)}loadInitialData(e){if(!e){console.warn("No domain found in localStorage");return}let n=this.httpService.post("api/ConfigShelf/PaperConfig",{SubDomain:e}).pipe(g(o=>d({error:o}))),r=this.httpService.get("/API/V3/Tax",void 0,`https://${e}`).pipe(g(o=>d({error:o})));u([n,r]).pipe(F(this.destroyRef),_(([o,h])=>this.normalizeResponses(o,h)),C(({paperConfig:o,taxs:h})=>this.applyDataToStore(o,h))).subscribe()}normalizeResponses(e,n){let r=o=>o&&"error"in o;return{paperConfig:r(e)?null:e,taxs:r(n)?null:n}}applyDataToStore(e,n){e&&this.store.onChangeShelfLabelConfig(e),n&&this.store.onChangeTaxs(n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-shelf-label"]],standalone:!0,features:[T],decls:4,vars:3,consts:[["content",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["sidebarConfig","label"],[3,"item"],["class","divider",4,"ngIf"],[1,"divider"]],template:function(n,r){n&1&&(s(0,1),f(1,U,2,0,"ng-container",2)(2,B,4,0,"ng-container",2)(3,G,2,0,"ng-container",3),m()),n&2&&(a("ngSwitch",r.store.stepper$().state),c(),a("ngSwitchCase",0),c(),a("ngSwitchCase",1))},dependencies:[k,A,O,R,P,x,$,M,H],styles:["[_nghost-%COMP%]{display:block}.divider[_ngcontent-%COMP%]{border:1px dashed #000;width:100%}"],changeDetection:0})}}return t})();export{pe as ShelfLabelComponent};
1
+ import{g as k,i as A,j as H,k as O}from"./chunk-7V3KH6IR.js";import{t as N}from"./chunk-G2JXUY7S.js";import"./chunk-X4PZGB4F.js";import"./chunk-UBR4JEV7.js";import{Q as z,a as F}from"./chunk-RH3ZV23S.js";import"./chunk-CARY4E7O.js";import{l as E}from"./chunk-LTVGOJEF.js";import{Ad as R,C as d,Da as l,Ec as T,Ha as S,I as _,J as u,Nc as I,Rb as f,Vb as a,Xa as v,Z as g,ac as b,cc as y,dc as w,ec as D,fc as L,gc as p,hc as s,ic as m,qd as P,rd as x,sd as $,ta as C,td as M,zb as c}from"./chunk-UE2JJIFL.js";function U(t,i){t&1&&(s(0),p(1,"choose-product"),m())}function V(t,i){t&1&&p(0,"div",7)}function j(t,i){if(t&1&&(p(0,"app-label-preview",5),f(1,V,1,0,"div",6)),t&2){let e=i.$implicit,n=i.$index,r=i.$count;a("item",e),c(),a("ngIf",n!==r-1)}}function q(t,i){if(t&1&&y(0,j,2,2,null,null,b),t&2){let e=i.$implicit;w(e)}}function B(t,i){t&1&&(s(0),D(1,"app-customize-label",4),f(2,q,2,0,"ng-template",null,0,I),L(),m())}function G(t,i){t&1&&(s(0),p(1,"app-print-preview"),m())}var pe=(()=>{class t{constructor(){this.store=l(N),this.httpService=l(z),this.destroyRef=l(v),this.routes=l(E)}get printMode(){let e=this.routes.snapshot.queryParamMap.get("printMode");return console.log("printMode",e),e}ngOnInit(){this.store.onReset(),console.log(localStorage.getItem("Domain"))}ngAfterViewInit(){let e=this.getHostFromDomain();this.loadInitialData(e)}getHostFromDomain(){let e=localStorage.getItem("Domain");return e?this.hasProtocol(e)?new URL(e).hostname:e:null}hasProtocol(e){return/^(https?):\/\//.test(e)}loadInitialData(e){if(!e){console.warn("No domain found in localStorage");return}let n=this.httpService.post("api/ConfigShelf/PaperConfig",{SubDomain:e}).pipe(g(o=>d({error:o}))),r=this.httpService.get("/API/V3/Tax",void 0,`https://${e}`).pipe(g(o=>d({error:o})));u([n,r]).pipe(F(this.destroyRef),_(([o,h])=>this.normalizeResponses(o,h)),C(({paperConfig:o,taxs:h})=>this.applyDataToStore(o,h))).subscribe()}normalizeResponses(e,n){let r=o=>o&&"error"in o;return{paperConfig:r(e)?null:e,taxs:r(n)?null:n}}applyDataToStore(e,n){e&&this.store.onChangeShelfLabelConfig(e),n&&this.store.onChangeTaxs(n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-shelf-label"]],standalone:!0,features:[T],decls:4,vars:3,consts:[["content",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["sidebarConfig","label"],[3,"item"],["class","divider",4,"ngIf"],[1,"divider"]],template:function(n,r){n&1&&(s(0,1),f(1,U,2,0,"ng-container",2)(2,B,4,0,"ng-container",2)(3,G,2,0,"ng-container",3),m()),n&2&&(a("ngSwitch",r.store.stepper$().state),c(),a("ngSwitchCase",0),c(),a("ngSwitchCase",1))},dependencies:[k,A,O,R,P,x,$,M,H],styles:["[_nghost-%COMP%]{display:block}.divider[_ngcontent-%COMP%]{border:1px dashed #000;width:100%}"],changeDetection:0})}}return t})();export{pe as ShelfLabelComponent};