dealposbarcode 1.8.3 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{a as ne,b as ie,c as oe,d as re}from"./chunk-WV652PSI.js";import{a as A}from"./chunk-BNR2GQKE.js";import{A as K,D as J,F as Q,G as X,H as Y,J as ee,da as te,ja as E,n as O,v as $,w as y,y as W,z as Z}from"./chunk-AJDEWWQT.js";import{$b as v,C as U,Da as g,Ec as R,Fc as I,Ha as N,I as V,Jc as j,Kb as C,Kc as q,Rb as _,Sa as x,Ta as b,Vb as p,bc as T,cc as P,dc as L,ec as i,fc as o,gc as d,kc as w,nc as h,oc as c,od as G,q as F,qd as H,ra as D,sa as M,ub as k,wd as B,xc as l,yc as z,zb as a,zc as S}from"./chunk-PNNBJ4WR.js";var ae=n=>({"is-invalid":n});function de(n,m){if(n&1&&(i(0,"swiper-slide")(1,"div",17),d(2,"img",18),i(3,"div",19)(4,"h4",20),l(5),o(),i(6,"div",21)(7,"p",22),l(8),o()()()()()),n&2){let e=m.$implicit;a(2),p("src",e.properties.imgSrc,k),a(3),S(" ",e.properties.title," "),a(3),S(" ",e.properties.description," ")}}function me(n,m){if(n&1&&(i(0,"ng-option",33)(1,"span",35),l(2),o()()),n&2){let e=m.$implicit;p("value",e),a(2),z(e)}}function pe(n,m){if(n&1){let e=w();i(0,"div",8)(1,"div",19)(2,"h3",23),l(3," DealPOS Barcode Apps "),o(),i(4,"p",24),l(5," Print Barcode label from your product catalog "),o()(),i(6,"div",25)(7,"div",26)(8,"div",27)(9,"span",28),d(10,"i",29),o(),d(11,"input",30),i(12,"span",31)(13,"ng-select",32),P(14,me,3,2,"ng-option",33,T),o()()()()(),i(16,"button",34),h("click",function(){x(e);let r=c();return b(r.onLoginState())}),l(17," Next "),o()()}if(n&2){let e=c();a(13),p("clearable",!1),a(),L(e.domains())}}function ce(n,m){n&1&&(i(0,"span"),l(1,"Username is required."),o())}function ue(n,m){if(n&1&&(i(0,"div",47),_(1,ce,2,0,"span",63),d(2,"span"),o()),n&2){let e,t=c(2);a(),p("ngIf",(e=t.form.get("username"))==null||e.errors==null?null:e.errors.required)}}function fe(n,m){if(n&1){let e=w();i(0,"i",66),h("click",function(){x(e);let r=c(3);return b(r.passwordInputType.set("text"))}),o()}}function ge(n,m){if(n&1){let e=w();i(0,"i",67),h("click",function(){x(e);let r=c(3);return b(r.passwordInputType.set("password"))}),o()}}function _e(n,m){if(n&1&&_(0,fe,1,0,"i",64)(1,ge,1,0,"i",65),n&2){let e=c(2);v(e.passwordInputType()==="password"?0:1)}}function he(n,m){n&1&&(i(0,"span"),l(1,"Password is required."),o())}function xe(n,m){if(n&1&&(i(0,"div",47),_(1,he,2,0,"span",63),d(2,"span"),o()),n&2){let e,t=c(2);a(),p("ngIf",(e=t.form.get("password"))==null||e.errors==null?null:e.errors.required)}}function be(n,m){if(n&1){let e=w();i(0,"div",9)(1,"div",36)(2,"h3",37),l(3,"Sign in"),o(),i(4,"p",38),l(5,"to"),o(),i(6,"div",39)(7,"p",40),l(8),o(),i(9,"a",41)(10,"i",42),h("click",function(){x(e);let r=c();return b(r.onLoginState())}),o()()()(),i(11,"div",19)(12,"div",43)(13,"span",44),d(14,"i",45),o(),d(15,"input",46),o(),_(16,ue,3,1,"div",47),o(),i(17,"div",19)(18,"div",48)(19,"span",44),d(20,"i",49),o(),i(21,"div",50),_(22,_e,2,1),d(23,"input",51),o()(),_(24,xe,3,1,"div",47),i(25,"div",52)(26,"a",53),l(27,"Forgot Password?"),o()()(),i(28,"button",54),l(29," Login "),o(),i(30,"div",55)(31,"div",56),d(32,"hr",57),i(33,"p",58),l(34,"or"),o(),d(35,"hr",57),o(),i(36,"button",59),h("click",function(){x(e);let r=c();return b(r.onSigninWithGoogle())}),i(37,"div",60),d(38,"i",61),i(39,"span",62),l(40,"Sign In with Google"),o()()()()()}if(n&2){let e,t,r,u,f,s=c();a(8),S(" (",s.hostFormField," ) "),a(7),p("ngClass",I(8,ae,((e=s.form.get("username"))==null?null:e.invalid)&&!((e=s.form.get("username"))!=null&&e.untouched))),a(),v((t=s.form.get("username"))!=null&&t.invalid&&!((t=s.form.get("username"))!=null&&t.untouched)?16:-1),a(6),v((r=s.form.get("password"))!=null&&r.value.length?22:-1),a(),p("ngClass",I(10,ae,((u=s.form.get("password"))==null?null:u.invalid)&&!((u=s.form.get("password"))!=null&&u.untouched)))("type",s.passwordInputType()),a(),v((f=s.form.get("password"))!=null&&f.invalid&&!((f=s.form.get("password"))!=null&&f.untouched)?24:-1),a(2),p("href","https://"+s.host+"/ForgotPassword",k)}}var le=(()=>{class n{constructor(){this.form=new K({}),this.loginState=C("FORM_DOMAIN"),this.news$=U([]),this.domains=C([".dealpos.co.id",".dealpos.net",".dealpos.com",".dealpos.app"]),this.passwordInputType=C("password"),this.onsubmit=onsubmit,this._destroy=new F,this.authService=g(E),this.fb=g(Y),this.httpService=g(te),this.version=C(""),this.router=g(O),this.regexSanitizeHostname=/^(https?):\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/}get hostFormField(){let e=this.form?.get("subDomain")?.value,t=this.form?.get("domain")?.value;if(e.match(this.regexSanitizeHostname)){let r=new URL(e);return r.origin.slice(0,r.origin.indexOf(".")).concat(t)}else return e.concat(t)}get domainStorage(){let e=this.authService.getDomain(),t=e.indexOf(".");return e.substring(t,e.length)}get host(){let{subDomain:e,domain:t}=this.form.value;return e+t}ngOnInit(){this.initForm(),this.news$=this.httpService.get("v2/content?fetch=children:barcode&sort=sortOrder:asc",void 0,"https://changelog.dealpos.app/umbraco/delivery/api/").pipe(V(e=>e.items))}initForm(){let e=this.authService.getDomain(),[t,r]=e.split("."),u=localStorage.getItem("Username")??"";this.form=this.fb.group({subDomain:[t??"",y.required],domain:[e.substring(e.indexOf(".dealpos"))||this.domains()[0],y.required],username:[u,y.required],password:["",y.required]})}isValidUrl(e){try{return!!new URL(e)}catch{return!1}}onLogin(){let{subDomain:e,domain:t,username:r,password:u}=this.form.value,f="";e.match(this.regexSanitizeHostname)?f=e.replace(t,t):f=e.concat(t);let s={Host:this.isValidUrl(f)?new URL(f).hostname:f,Username:r,Password:u};this.authService.login(s).pipe(re("login"),M(this._destroy)).subscribe(()=>{this.router.navigate(["/pages/v2/print-mode"])})}onSigninWithGoogle(){let{subDomain:e,domain:t,username:r,password:u}=this.form.value;this.authService.signInWithPopup(e+t).pipe(M(this._destroy),D(()=>this.authService.redirectUrl())).subscribe()}onLoginState(){let e=this.loginState();if(e==="FORM_DOMAIN")this.loginState.set("FORM_AUTH");else if(e==="FORM_AUTH"){let t=this.form.get("subDomain").value;this.form.patchValue({subDomain:t.slice(0,t.indexOf("."))}),this.loginState.set("FORM_DOMAIN")}}ngOnDestroy(){this._destroy.next(),this._destroy.complete()}isAppVersionUpdated(){let e=localStorage.getItem("appVersion"),t=A.version;return!!(e&&t&&e.replaceAll(".","")!==t.replaceAll(".",""))}ngAfterViewInit(){this.version.set(A.version)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=N({type:n,selectors:[["app-login"]],standalone:!0,features:[R],decls:23,vars:6,consts:[[1,"container-fluid","border","my-auto","d-flex","flex-column"],[1,"flex-grow-1","d-flex","align-items-center","justify-content-center"],[1,"row",2,"background","#ffffff","max-width","57rem","border-radius","4px"],[1,"p-0","col-12","col-md-6","border-end","d-flex","flex-column","align-items-center","py-4"],[1,"font-robotoslab","fw-normal","fs-6","text-dark"],["pagination","true","pagination-clickable","true","slides-per-view","1"],[1,"p-0","col-12","col-md-6","py-4"],[1,"h-100","d-flex","flex-column","gap-4","my-2","mx-5",3,"ngSubmit","formGroup"],[1,"d-flex","flex-column","justify-content-center","gap-3","h-100",2,"margin-top","-55px"],[1,"d-flex","flex-column","gap-3"],[1,"row","d-md-flex","py-3","px-4"],[1,"col-12","col-md-6","d-flex","align-items-center","gap-2"],[1,"m-0","h-100","d-flex","align-items-center","fs-2","fw-normal"],["alt","dealpos-logo","src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png",1,"img-fluid"],[1,"cursor-pointer","col-12","col-md-6","d-flex","justify-content-center","gap-2","justify-content-md-end","align-items-center"],["target","_blank",1,"d-flex","gap-1",3,"href"],[1,"fst-italic","m-0","fs-2","fw-normal","text-dark","cursor-pointer"],[1,"d-flex","flex-column","gap-4"],["alt","",1,"img-fluid",3,"src"],[1,"d-flex","flex-column"],[1,"text-dark",2,"font-size","16px","font-weight","700"],[1,"d-flex","flex-wrap",2,"max-width","22rem"],[1,"fw-normal","text-dark"],[1,"m-0","font-robotoslab","text-dark","fs-6"],[1,"fst-italic","fw-normal","text-secondary-emphasis",2,"font-size","11px"],[1,"row",2,"height","50px"],[1,"col-12","h-100","mb-2","mb-md-0"],[1,"input-group","mb-3","border","rounded"],[1,"input-group-text","border-0","text-dark"],[1,"fas","fa-cloud"],["id","subDomain","formControlName","subDomain","type","text","placeholder","Store Address","aria-label","Username","aria-describedby","basic-addon1",1,"form-control","form-control-lg","text-dark",2,"border-radius","0","font-size","14px"],[1,"input-group-text","p-0",2,"z-index","99"],["formControlName","domain",1,"custom",2,"font-size","14px",3,"clearable"],[3,"value"],["type","button",1,"btn","btn-primary","btn-lg","w-100","font-robotoslab","fs-4",3,"click"],[2,"font-size","14px"],[1,"d-flex","align-baseline","gap-2"],[1,"m-0"],[1,"m-0","d-flex","align-items-end"],[1,"d-flex"],[1,"m-0","d-flex","align-items-end","fw-bold","me-2","font-robotoslab","d-inline-block","text-primary"],["href","#",1,"pe-auto","d-flex","align-items-center"],[1,"fas","fa-edit","d-flex","align-items-center","link-primary","fs-3",3,"click"],[1,"input-group","border","rounded",2,"height","50px"],[1,"input-group-text","text-dark"],[1,"fas","fa-user"],["formControlName","username","type","text","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1",1,"form-control","form-control-lg","text-dark",3,"ngClass"],[1,"invalid-feedback"],[1,"input-group","d-flex","border","rounded",2,"height","50px"],[1,"fas","fa-key"],[1,"position-relative","flex-grow-1","h-100"],["formControlName","password","placeholder","Password","aria-label","Username","aria-describedby","basic-addon1",1,"form-control","form-control-lg","h-100","text-dark",3,"ngClass","type"],[1,"w-100","d-flex","justify-content-end"],[1,"link-underline-light","fs-2","fw-normal",3,"href"],["type","submit",1,"btn","btn-primary","btn-lg","fs-4","font-robotoslab"],[1,"d-flex","flex-column","align-items-center","gap-2"],[1,"d-flex","justify-content-center","gap-2"],[2,"width","150px","border","1px solid rgba(0, 0, 0, 0.85)"],[1,"m-0",2,"line-height","30px"],["type","button",1,"btn","btn-outline-primary","btn-lg","w-100",3,"click"],[1,"h-100","d-flex","align-items-center","justify-content-center","gap-2"],[1,"fab","fa-google","fs-3"],[1,"fw-medium","fs-3"],[4,"ngIf"],[1,"fas","fa-eye","position-absolute","top-0","end-0",2,"transform","translate(-50%, 90%)"],[1,"fas","fa-eye-slash","position-absolute","top-0","end-0",2,"transform","translate(-50%, 90%)"],[1,"fas","fa-eye","position-absolute","top-0","end-0",2,"transform","translate(-50%, 90%)",3,"click"],[1,"fas","fa-eye-slash","position-absolute","top-0","end-0",2,"transform","translate(-50%, 90%)",3,"click"]],template:function(t,r){t&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h4",4),l(5,"New Features"),o(),i(6,"swiper-container",5),P(7,de,9,3,"swiper-slide",null,T),j(9,"async"),o()(),i(10,"div",6)(11,"form",7),h("ngSubmit",function(){return r.onLogin()}),_(12,pe,18,1,"div",8)(13,be,41,12,"div",9),o()()()(),i(14,"div",10)(15,"div",11)(16,"p",12),l(17," Powered by: "),o(),d(18,"img",13),o(),i(19,"div",14)(20,"a",15)(21,"span",16),l(22),o()()()()()),t&2&&(a(7),L(q(9,4,r.news$)),a(4),p("formGroup",r.form),a(),v(r.loginState()==="FORM_DOMAIN"?12:13),a(8),p("href","https://changelog.dealpos.com/?categories=cat_IOl3P9ko0ayhv&view=complete&v"+r.version().replaceAll(".",""),k),a(2),S("Version ",r.version(),""))},dependencies:[H,G,ee,J,$,W,Z,Q,X,oe,ie,ne,B],styles:[".auth-wrapper[_ngcontent-%COMP%]{min-height:100vh;position:relative}.container-fluid[_ngcontent-%COMP%]{height:100vh}.grid__container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,50%);width:50vw;height:50vh;background:#fff;box-shadow:0 10px 15px -3px #0000001a;border-radius:15px;overflow:hidden}.container[_ngcontent-%COMP%]{height:400px}swiper-container[_ngcontent-%COMP%]{height:100%;width:100%}swiper-slide[_ngcontent-%COMP%]{text-align:center;font-size:12px;background:#fff;display:flex;justify-content:center;align-items:center}swiper-slide[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:250px;height:150px;object-fit:cover;margin:0 auto}.btn[_ngcontent-%COMP%]:hover{background:transparent;color:#337ab7;box-shadow:none}.invalid-feedback[_ngcontent-%COMP%]{display:block}.btn[_ngcontent-%COMP%]{padding:.8rem 0}input[_ngcontent-%COMP%]::placeholder{color:gray;font-size:15px;opacity:.8}input[_ngcontent-%COMP%]{font-size:15px;border-color:#dee2e6}.input-group-text[_ngcontent-%COMP%]{background:transparent;border:none!important}.ng-touched.ng-valid[_ngcontent-%COMP%]{border-color:#dee2e6!important}.form-control[_ngcontent-%COMP%]{border:none!important}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}[_nghost-%COMP%] .ng-select .ng-select-container{border:1px solid #e9edf2;border-radius:0!important}[_nghost-%COMP%] .ng-dropdown-panel.ng-select-bottom{border-radius:4px;overflow:hidden} .ng-select.custom{height:100%!important;border:none!important} .ng-select.custom .ng-select-container{height:100%!important;border-top:none!important;border-right:none!important;border-bottom:none!important;border-radius:4px!important}"]})}}return n})();var se=(n,m)=>{let e=g(E),t=g(O);if(e.isAuthenticated()&&!e.isTokenExpired()&&e.checkAuthKeysExists())switch(localStorage.getItem("PrintMode")){case"barcode":return t.createUrlTree(["/pages/shelf/barcode"],{queryParams:{step:0}});case"priceLabel":return t.createUrlTree(["/pages/shelf/price-label"],{queryParams:{step:0}});default:return t.createUrlTree(["/"])}return!0};var Ge=[{path:"",component:le,canActivate:[se]}];export{Ge as AUTH_ROUTES};
1
+ import{a as ne,b as ie,c as oe,d as re}from"./chunk-WV652PSI.js";import{a as A}from"./chunk-Y7ZU5TZX.js";import{A as K,D as J,F as Q,G as X,H as Y,J as ee,da as te,ja as E,n as O,v as $,w as y,y as W,z as Z}from"./chunk-AJDEWWQT.js";import{$b as v,C as U,Da as g,Ec as R,Fc as I,Ha as N,I as V,Jc as j,Kb as C,Kc as q,Rb as _,Sa as x,Ta as b,Vb as p,bc as T,cc as P,dc as L,ec as i,fc as o,gc as d,kc as w,nc as h,oc as c,od as G,q as F,qd as H,ra as D,sa as M,ub as k,wd as B,xc as l,yc as z,zb as a,zc as S}from"./chunk-PNNBJ4WR.js";var ae=n=>({"is-invalid":n});function de(n,m){if(n&1&&(i(0,"swiper-slide")(1,"div",17),d(2,"img",18),i(3,"div",19)(4,"h4",20),l(5),o(),i(6,"div",21)(7,"p",22),l(8),o()()()()()),n&2){let e=m.$implicit;a(2),p("src",e.properties.imgSrc,k),a(3),S(" ",e.properties.title," "),a(3),S(" ",e.properties.description," ")}}function me(n,m){if(n&1&&(i(0,"ng-option",33)(1,"span",35),l(2),o()()),n&2){let e=m.$implicit;p("value",e),a(2),z(e)}}function pe(n,m){if(n&1){let e=w();i(0,"div",8)(1,"div",19)(2,"h3",23),l(3," DealPOS Barcode Apps "),o(),i(4,"p",24),l(5," Print Barcode label from your product catalog "),o()(),i(6,"div",25)(7,"div",26)(8,"div",27)(9,"span",28),d(10,"i",29),o(),d(11,"input",30),i(12,"span",31)(13,"ng-select",32),P(14,me,3,2,"ng-option",33,T),o()()()()(),i(16,"button",34),h("click",function(){x(e);let r=c();return b(r.onLoginState())}),l(17," Next "),o()()}if(n&2){let e=c();a(13),p("clearable",!1),a(),L(e.domains())}}function ce(n,m){n&1&&(i(0,"span"),l(1,"Username is required."),o())}function ue(n,m){if(n&1&&(i(0,"div",47),_(1,ce,2,0,"span",63),d(2,"span"),o()),n&2){let e,t=c(2);a(),p("ngIf",(e=t.form.get("username"))==null||e.errors==null?null:e.errors.required)}}function fe(n,m){if(n&1){let e=w();i(0,"i",66),h("click",function(){x(e);let r=c(3);return b(r.passwordInputType.set("text"))}),o()}}function ge(n,m){if(n&1){let e=w();i(0,"i",67),h("click",function(){x(e);let r=c(3);return b(r.passwordInputType.set("password"))}),o()}}function _e(n,m){if(n&1&&_(0,fe,1,0,"i",64)(1,ge,1,0,"i",65),n&2){let e=c(2);v(e.passwordInputType()==="password"?0:1)}}function he(n,m){n&1&&(i(0,"span"),l(1,"Password is required."),o())}function xe(n,m){if(n&1&&(i(0,"div",47),_(1,he,2,0,"span",63),d(2,"span"),o()),n&2){let e,t=c(2);a(),p("ngIf",(e=t.form.get("password"))==null||e.errors==null?null:e.errors.required)}}function be(n,m){if(n&1){let e=w();i(0,"div",9)(1,"div",36)(2,"h3",37),l(3,"Sign in"),o(),i(4,"p",38),l(5,"to"),o(),i(6,"div",39)(7,"p",40),l(8),o(),i(9,"a",41)(10,"i",42),h("click",function(){x(e);let r=c();return b(r.onLoginState())}),o()()()(),i(11,"div",19)(12,"div",43)(13,"span",44),d(14,"i",45),o(),d(15,"input",46),o(),_(16,ue,3,1,"div",47),o(),i(17,"div",19)(18,"div",48)(19,"span",44),d(20,"i",49),o(),i(21,"div",50),_(22,_e,2,1),d(23,"input",51),o()(),_(24,xe,3,1,"div",47),i(25,"div",52)(26,"a",53),l(27,"Forgot Password?"),o()()(),i(28,"button",54),l(29," Login "),o(),i(30,"div",55)(31,"div",56),d(32,"hr",57),i(33,"p",58),l(34,"or"),o(),d(35,"hr",57),o(),i(36,"button",59),h("click",function(){x(e);let r=c();return b(r.onSigninWithGoogle())}),i(37,"div",60),d(38,"i",61),i(39,"span",62),l(40,"Sign In with Google"),o()()()()()}if(n&2){let e,t,r,u,f,s=c();a(8),S(" (",s.hostFormField," ) "),a(7),p("ngClass",I(8,ae,((e=s.form.get("username"))==null?null:e.invalid)&&!((e=s.form.get("username"))!=null&&e.untouched))),a(),v((t=s.form.get("username"))!=null&&t.invalid&&!((t=s.form.get("username"))!=null&&t.untouched)?16:-1),a(6),v((r=s.form.get("password"))!=null&&r.value.length?22:-1),a(),p("ngClass",I(10,ae,((u=s.form.get("password"))==null?null:u.invalid)&&!((u=s.form.get("password"))!=null&&u.untouched)))("type",s.passwordInputType()),a(),v((f=s.form.get("password"))!=null&&f.invalid&&!((f=s.form.get("password"))!=null&&f.untouched)?24:-1),a(2),p("href","https://"+s.host+"/ForgotPassword",k)}}var le=(()=>{class n{constructor(){this.form=new K({}),this.loginState=C("FORM_DOMAIN"),this.news$=U([]),this.domains=C([".dealpos.co.id",".dealpos.net",".dealpos.com",".dealpos.app"]),this.passwordInputType=C("password"),this.onsubmit=onsubmit,this._destroy=new F,this.authService=g(E),this.fb=g(Y),this.httpService=g(te),this.version=C(""),this.router=g(O),this.regexSanitizeHostname=/^(https?):\/\/([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/}get hostFormField(){let e=this.form?.get("subDomain")?.value,t=this.form?.get("domain")?.value;if(e.match(this.regexSanitizeHostname)){let r=new URL(e);return r.origin.slice(0,r.origin.indexOf(".")).concat(t)}else return e.concat(t)}get domainStorage(){let e=this.authService.getDomain(),t=e.indexOf(".");return e.substring(t,e.length)}get host(){let{subDomain:e,domain:t}=this.form.value;return e+t}ngOnInit(){this.initForm(),this.news$=this.httpService.get("v2/content?fetch=children:barcode&sort=sortOrder:asc",void 0,"https://changelog.dealpos.app/umbraco/delivery/api/").pipe(V(e=>e.items))}initForm(){let e=this.authService.getDomain(),[t,r]=e.split("."),u=localStorage.getItem("Username")??"";this.form=this.fb.group({subDomain:[t??"",y.required],domain:[e.substring(e.indexOf(".dealpos"))||this.domains()[0],y.required],username:[u,y.required],password:["",y.required]})}isValidUrl(e){try{return!!new URL(e)}catch{return!1}}onLogin(){let{subDomain:e,domain:t,username:r,password:u}=this.form.value,f="";e.match(this.regexSanitizeHostname)?f=e.replace(t,t):f=e.concat(t);let s={Host:this.isValidUrl(f)?new URL(f).hostname:f,Username:r,Password:u};this.authService.login(s).pipe(re("login"),M(this._destroy)).subscribe(()=>{this.router.navigate(["/pages/v2/print-mode"])})}onSigninWithGoogle(){let{subDomain:e,domain:t,username:r,password:u}=this.form.value;this.authService.signInWithPopup(e+t).pipe(M(this._destroy),D(()=>this.authService.redirectUrl())).subscribe()}onLoginState(){let e=this.loginState();if(e==="FORM_DOMAIN")this.loginState.set("FORM_AUTH");else if(e==="FORM_AUTH"){let t=this.form.get("subDomain").value;this.form.patchValue({subDomain:t.slice(0,t.indexOf("."))}),this.loginState.set("FORM_DOMAIN")}}ngOnDestroy(){this._destroy.next(),this._destroy.complete()}isAppVersionUpdated(){let e=localStorage.getItem("appVersion"),t=A.version;return!!(e&&t&&e.replaceAll(".","")!==t.replaceAll(".",""))}ngAfterViewInit(){this.version.set(A.version)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=N({type:n,selectors:[["app-login"]],standalone:!0,features:[R],decls:23,vars:6,consts:[[1,"container-fluid","border","my-auto","d-flex","flex-column"],[1,"flex-grow-1","d-flex","align-items-center","justify-content-center"],[1,"row",2,"background","#ffffff","max-width","57rem","border-radius","4px"],[1,"p-0","col-12","col-md-6","border-end","d-flex","flex-column","align-items-center","py-4"],[1,"font-robotoslab","fw-normal","fs-6","text-dark"],["pagination","true","pagination-clickable","true","slides-per-view","1"],[1,"p-0","col-12","col-md-6","py-4"],[1,"h-100","d-flex","flex-column","gap-4","my-2","mx-5",3,"ngSubmit","formGroup"],[1,"d-flex","flex-column","justify-content-center","gap-3","h-100",2,"margin-top","-55px"],[1,"d-flex","flex-column","gap-3"],[1,"row","d-md-flex","py-3","px-4"],[1,"col-12","col-md-6","d-flex","align-items-center","gap-2"],[1,"m-0","h-100","d-flex","align-items-center","fs-2","fw-normal"],["alt","dealpos-logo","src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png",1,"img-fluid"],[1,"cursor-pointer","col-12","col-md-6","d-flex","justify-content-center","gap-2","justify-content-md-end","align-items-center"],["target","_blank",1,"d-flex","gap-1",3,"href"],[1,"fst-italic","m-0","fs-2","fw-normal","text-dark","cursor-pointer"],[1,"d-flex","flex-column","gap-4"],["alt","",1,"img-fluid",3,"src"],[1,"d-flex","flex-column"],[1,"text-dark",2,"font-size","16px","font-weight","700"],[1,"d-flex","flex-wrap",2,"max-width","22rem"],[1,"fw-normal","text-dark"],[1,"m-0","font-robotoslab","text-dark","fs-6"],[1,"fst-italic","fw-normal","text-secondary-emphasis",2,"font-size","11px"],[1,"row",2,"height","50px"],[1,"col-12","h-100","mb-2","mb-md-0"],[1,"input-group","mb-3","border","rounded"],[1,"input-group-text","border-0","text-dark"],[1,"fas","fa-cloud"],["id","subDomain","formControlName","subDomain","type","text","placeholder","Store Address","aria-label","Username","aria-describedby","basic-addon1",1,"form-control","form-control-lg","text-dark",2,"border-radius","0","font-size","14px"],[1,"input-group-text","p-0",2,"z-index","99"],["formControlName","domain",1,"custom",2,"font-size","14px",3,"clearable"],[3,"value"],["type","button",1,"btn","btn-primary","btn-lg","w-100","font-robotoslab","fs-4",3,"click"],[2,"font-size","14px"],[1,"d-flex","align-baseline","gap-2"],[1,"m-0"],[1,"m-0","d-flex","align-items-end"],[1,"d-flex"],[1,"m-0","d-flex","align-items-end","fw-bold","me-2","font-robotoslab","d-inline-block","text-primary"],["href","#",1,"pe-auto","d-flex","align-items-center"],[1,"fas","fa-edit","d-flex","align-items-center","link-primary","fs-3",3,"click"],[1,"input-group","border","rounded",2,"height","50px"],[1,"input-group-text","text-dark"],[1,"fas","fa-user"],["formControlName","username","type","text","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1",1,"form-control","form-control-lg","text-dark",3,"ngClass"],[1,"invalid-feedback"],[1,"input-group","d-flex","border","rounded",2,"height","50px"],[1,"fas","fa-key"],[1,"position-relative","flex-grow-1","h-100"],["formControlName","password","placeholder","Password","aria-label","Username","aria-describedby","basic-addon1",1,"form-control","form-control-lg","h-100","text-dark",3,"ngClass","type"],[1,"w-100","d-flex","justify-content-end"],[1,"link-underline-light","fs-2","fw-normal",3,"href"],["type","submit",1,"btn","btn-primary","btn-lg","fs-4","font-robotoslab"],[1,"d-flex","flex-column","align-items-center","gap-2"],[1,"d-flex","justify-content-center","gap-2"],[2,"width","150px","border","1px solid rgba(0, 0, 0, 0.85)"],[1,"m-0",2,"line-height","30px"],["type","button",1,"btn","btn-outline-primary","btn-lg","w-100",3,"click"],[1,"h-100","d-flex","align-items-center","justify-content-center","gap-2"],[1,"fab","fa-google","fs-3"],[1,"fw-medium","fs-3"],[4,"ngIf"],[1,"fas","fa-eye","position-absolute","top-0","end-0",2,"transform","translate(-50%, 90%)"],[1,"fas","fa-eye-slash","position-absolute","top-0","end-0",2,"transform","translate(-50%, 90%)"],[1,"fas","fa-eye","position-absolute","top-0","end-0",2,"transform","translate(-50%, 90%)",3,"click"],[1,"fas","fa-eye-slash","position-absolute","top-0","end-0",2,"transform","translate(-50%, 90%)",3,"click"]],template:function(t,r){t&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h4",4),l(5,"New Features"),o(),i(6,"swiper-container",5),P(7,de,9,3,"swiper-slide",null,T),j(9,"async"),o()(),i(10,"div",6)(11,"form",7),h("ngSubmit",function(){return r.onLogin()}),_(12,pe,18,1,"div",8)(13,be,41,12,"div",9),o()()()(),i(14,"div",10)(15,"div",11)(16,"p",12),l(17," Powered by: "),o(),d(18,"img",13),o(),i(19,"div",14)(20,"a",15)(21,"span",16),l(22),o()()()()()),t&2&&(a(7),L(q(9,4,r.news$)),a(4),p("formGroup",r.form),a(),v(r.loginState()==="FORM_DOMAIN"?12:13),a(8),p("href","https://changelog.dealpos.com/?categories=cat_IOl3P9ko0ayhv&view=complete&v"+r.version().replaceAll(".",""),k),a(2),S("Version ",r.version(),""))},dependencies:[H,G,ee,J,$,W,Z,Q,X,oe,ie,ne,B],styles:[".auth-wrapper[_ngcontent-%COMP%]{min-height:100vh;position:relative}.container-fluid[_ngcontent-%COMP%]{height:100vh}.grid__container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,50%);width:50vw;height:50vh;background:#fff;box-shadow:0 10px 15px -3px #0000001a;border-radius:15px;overflow:hidden}.container[_ngcontent-%COMP%]{height:400px}swiper-container[_ngcontent-%COMP%]{height:100%;width:100%}swiper-slide[_ngcontent-%COMP%]{text-align:center;font-size:12px;background:#fff;display:flex;justify-content:center;align-items:center}swiper-slide[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:250px;height:150px;object-fit:cover;margin:0 auto}.btn[_ngcontent-%COMP%]:hover{background:transparent;color:#337ab7;box-shadow:none}.invalid-feedback[_ngcontent-%COMP%]{display:block}.btn[_ngcontent-%COMP%]{padding:.8rem 0}input[_ngcontent-%COMP%]::placeholder{color:gray;font-size:15px;opacity:.8}input[_ngcontent-%COMP%]{font-size:15px;border-color:#dee2e6}.input-group-text[_ngcontent-%COMP%]{background:transparent;border:none!important}.ng-touched.ng-valid[_ngcontent-%COMP%]{border-color:#dee2e6!important}.form-control[_ngcontent-%COMP%]{border:none!important}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}[_nghost-%COMP%] .ng-select .ng-select-container{border:1px solid #e9edf2;border-radius:0!important}[_nghost-%COMP%] .ng-dropdown-panel.ng-select-bottom{border-radius:4px;overflow:hidden} .ng-select.custom{height:100%!important;border:none!important} .ng-select.custom .ng-select-container{height:100%!important;border-top:none!important;border-right:none!important;border-bottom:none!important;border-radius:4px!important}"]})}}return n})();var se=(n,m)=>{let e=g(E),t=g(O);if(e.isAuthenticated()&&!e.isTokenExpired()&&e.checkAuthKeysExists())switch(localStorage.getItem("PrintMode")){case"barcode":return t.createUrlTree(["/pages/shelf/barcode"],{queryParams:{step:0}});case"priceLabel":return t.createUrlTree(["/pages/shelf/price-label"],{queryParams:{step:0}});default:return t.createUrlTree(["/"])}return!0};var Ge=[{path:"",component:le,canActivate:[se]}];export{Ge as AUTH_ROUTES};
@@ -1 +1 @@
1
- import{b as z,e as k,g as A,h as H,i as O}from"./chunk-DNCCUYS2.js";import"./chunk-BVFPFG2Y.js";import"./chunk-WV652PSI.js";import"./chunk-BNR2GQKE.js";import{da as N,l as E,r as F}from"./chunk-AJDEWWQT.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-PNNBJ4WR.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(z),this.httpService=l(N),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{b as z,e as k,g as A,h as H,i as O}from"./chunk-ZQG3LLIR.js";import"./chunk-BVFPFG2Y.js";import"./chunk-WV652PSI.js";import"./chunk-Y7ZU5TZX.js";import{da as N,l as E,r as F}from"./chunk-AJDEWWQT.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-PNNBJ4WR.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(z),this.httpService=l(N),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 +1 @@
1
- import{a as q,b as v,c as G,d as J,e as K,f as Q,g as X,h as Y,i as Z}from"./chunk-DNCCUYS2.js";import"./chunk-BVFPFG2Y.js";import{d as W}from"./chunk-WV652PSI.js";import"./chunk-BNR2GQKE.js";import{I as j,J as O,R as $,_ as V,da as U,l as P,m as z,n as B,q as N,r as H}from"./chunk-AJDEWWQT.js";import{$b as w,Ab as L,Ad as E,C as k,Da as n,Ec as f,Fc as D,Ha as p,I as y,J as F,Nc as R,Rb as u,Ub as S,Vb as r,Xa as M,Z as g,a as x,b as C,ec as l,fc as m,gc as o,nc as h,oc as b,od as A,ta as T,wb as I,zb as _}from"./chunk-PNNBJ4WR.js";var se=e=>({"show-sidebar":e}),ee=(()=>{class e{constructor(i){this.router=i,this.storeService=n(v)}Logo(){this.storeService.onChangeOptions({expandLogo:!this.storeService.options().expandLogo})}ngOnInit(){this.storeService.onChangeOptions({defaultSidebar:this.storeService.options().sidebartype}),this.handleSidebar()}onResize(i){this.handleSidebar()}handleSidebar(){switch(this.storeService.onChangeOptions({innerWidth:window.innerWidth}),this.storeService.options().defaultSidebar){case"full":case"iconbar":this.storeService.options().innerWidth<1170?this.storeService.onChangeOptions({sidebartype:"mini-sidebar"}):this.storeService.onChangeOptions({sidebartype:this.storeService.options().defaultSidebar});break;case"overlay":this.storeService.options().innerWidth<767?this.storeService.onChangeOptions({sidebartype:"mini-sidebar"}):this.storeService.onChangeOptions({sidebartype:this.storeService.options().defaultSidebar});break;default:}}toggleSidebarType(){switch(this.storeService.options().sidebartype){case"full":case"iconbar":this.storeService.onChangeOptions({sidebartype:"mini-sidebar"});break;case"overlay":this.storeService.onChangeOptions({showMobileMenu:!this.storeService.options().showMobileMenu});break;case"mini-sidebar":this.storeService.options().defaultSidebar==="mini-sidebar"?this.storeService.onChangeOptions({sidebartype:"full"}):this.storeService.onChangeOptions({sidebartype:this.storeService.options().defaultSidebar});break;default:}}handleClick(i){this.storeService.onChangeOptions({showMobileMenu:i})}static{this.\u0275fac=function(a){return new(a||e)(L(B))}}static{this.\u0275cmp=p({type:e,selectors:[["app-full-layout"]],hostBindings:function(a,t){a&1&&h("resize",function(d){return t.onResize(d)},!1,I)},standalone:!0,features:[f],decls:5,vars:12,consts:[["id","main-wrapper",2,"height","100vh",3,"ngClass","dir"],[1,"left-sidebar","pt-0",3,"mouseover","mouseout"],[3,"notify","showClass"],[1,"page-wrapper","flex-grow-1","pt-0","z-0",2,"height","inherit"]],template:function(a,t){a&1&&(l(0,"div",0)(1,"aside",1),h("mouseover",function(){return t.Logo()})("mouseout",function(){return t.Logo()}),l(2,"app-vertical-sidebar",2),h("notify",function(d){return t.handleClick(d)}),m()(),l(3,"div",3),o(4,"router-outlet"),m()()),a&2&&(r("ngClass",D(10,se,t.storeService.options().showMobileMenu))("dir",t.storeService.options().dir),S("data-theme",t.storeService.options().theme)("data-layout",t.storeService.options().layout)("data-sidebartype",t.storeService.options().sidebartype)("data-sidebar-position",t.storeService.options().sidebarpos)("data-header-position",t.storeService.options().headerpos)("data-boxed-layout",t.storeService.options().boxed),_(),S("data-sidebarbg",t.storeService.options().sidebarbg),_(),r("showClass",t.storeService.options().showMobileMenu))},dependencies:[N,z,J,G,V,j,O,E,A,$]})}}return e})();function ne(e,c){e&1&&o(0,"choose-product")}function oe(e,c){if(e&1&&o(0,"app-barcode-preview",1),e&2){let i=b().$implicit;r("items",i)}}function re(e,c){if(e&1&&o(0,"app-label-preview",2),e&2){let i=b(3);r("item",i.storeService.expandProductItem()[0])}}function le(e,c){if(e&1&&u(0,oe,1,1,"app-barcode-preview",1)(1,re,1,1,"app-label-preview",2),e&2){let i=b(2);w(i.printMode==="barcode"?0:1)}}function ce(e,c){e&1&&(l(0,"app-customize-label"),u(1,le,2,1,"ng-template",null,0,R),m())}function de(e,c){e&1&&o(0,"app-print-preview")}var te=(()=>{class e{constructor(){this.storeService=n(v),this.httpService=n(U),this.destroyRef=n(M),this.routes=n(P)}get printMode(){return console.log("printMode",this.routes.snapshot.queryParamMap.get("printMode")),this.routes.snapshot.queryParamMap.get("printMode")}ngOnInit(){this.storeService.onReset(),console.log(localStorage.getItem("Domain"))}checkProtocol(i){return!!i.match(/^(https?):\/\//)}ngAfterViewInit(){let i=localStorage.getItem("Domain"),a=this.checkProtocol(i)?new URL(i).hostname:i;F([this.httpService.post("api/Config/PaperConfig",{SubDomain:a},void 0).pipe(g(t=>k({error:t}))),this.httpService.get("/API/V3/Tax",void 0,`https://${a}`).pipe(g(t=>k({error:t})))]).pipe(H(this.destroyRef),W("response"),y(([t,s])=>"error"in t||"error"in s?(console.warn("Error in one or more requests",{paperConfig:t,taxs:s}),{paperConfig:null,taxs:null}):{paperConfig:t,taxs:s}),T(({paperConfig:t,taxs:s})=>{t&&(this.storeService.onChangePaperConfig(C(x({},t),{PaperFormats:t.PaperFormats.map(d=>C(x({},d),{OutletID:null}))})),t.PaperFormats.length>0&&this.storeService.onChangePaperConfiguration(t.PaperFormats[0])),s&&this.storeService.onChangeTaxs(s)})).subscribe()}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-dashboard"]],standalone:!0,features:[f],decls:3,vars:1,consts:[["content",""],[3,"items"],[3,"item"]],template:function(a,t){if(a&1&&u(0,ne,1,0,"choose-product")(1,ce,3,0,"app-customize-label")(2,de,1,0,"app-print-preview"),a&2){let s;w((s=t.storeService.stepper$().state)===0?0:s===1?1:s===2?2:-1)}},dependencies:[q,K,X,Z,Y,Q]})}}return e})();var lt=[{path:"",children:[{path:"",component:te},{path:"v2/print-mode",loadComponent:()=>import("./chunk-QCOAAL7X.js").then(e=>e.PrintModeSelectorComponent)},{path:"shelf",component:ee,children:[{path:"barcode",loadComponent:()=>import("./chunk-O7SI3M6F.js").then(e=>e.ShelfBarcodeComponent)},{path:"price-label",loadComponent:()=>import("./chunk-54RFLCQO.js").then(e=>e.ShelfLabelComponent)}]}]}];export{lt as dashboardRoutes};
1
+ import{a as q,b as v,c as G,d as J,e as K,f as Q,g as X,h as Y,i as Z}from"./chunk-ZQG3LLIR.js";import"./chunk-BVFPFG2Y.js";import{d as W}from"./chunk-WV652PSI.js";import"./chunk-Y7ZU5TZX.js";import{I as j,J as O,R as $,_ as V,da as U,l as P,m as z,n as B,q as N,r as H}from"./chunk-AJDEWWQT.js";import{$b as w,Ab as L,Ad as E,C as k,Da as n,Ec as f,Fc as D,Ha as p,I as y,J as F,Nc as R,Rb as u,Ub as S,Vb as r,Xa as M,Z as g,a as x,b as C,ec as l,fc as m,gc as o,nc as h,oc as b,od as A,ta as T,wb as I,zb as _}from"./chunk-PNNBJ4WR.js";var se=e=>({"show-sidebar":e}),ee=(()=>{class e{constructor(i){this.router=i,this.storeService=n(v)}Logo(){this.storeService.onChangeOptions({expandLogo:!this.storeService.options().expandLogo})}ngOnInit(){this.storeService.onChangeOptions({defaultSidebar:this.storeService.options().sidebartype}),this.handleSidebar()}onResize(i){this.handleSidebar()}handleSidebar(){switch(this.storeService.onChangeOptions({innerWidth:window.innerWidth}),this.storeService.options().defaultSidebar){case"full":case"iconbar":this.storeService.options().innerWidth<1170?this.storeService.onChangeOptions({sidebartype:"mini-sidebar"}):this.storeService.onChangeOptions({sidebartype:this.storeService.options().defaultSidebar});break;case"overlay":this.storeService.options().innerWidth<767?this.storeService.onChangeOptions({sidebartype:"mini-sidebar"}):this.storeService.onChangeOptions({sidebartype:this.storeService.options().defaultSidebar});break;default:}}toggleSidebarType(){switch(this.storeService.options().sidebartype){case"full":case"iconbar":this.storeService.onChangeOptions({sidebartype:"mini-sidebar"});break;case"overlay":this.storeService.onChangeOptions({showMobileMenu:!this.storeService.options().showMobileMenu});break;case"mini-sidebar":this.storeService.options().defaultSidebar==="mini-sidebar"?this.storeService.onChangeOptions({sidebartype:"full"}):this.storeService.onChangeOptions({sidebartype:this.storeService.options().defaultSidebar});break;default:}}handleClick(i){this.storeService.onChangeOptions({showMobileMenu:i})}static{this.\u0275fac=function(a){return new(a||e)(L(B))}}static{this.\u0275cmp=p({type:e,selectors:[["app-full-layout"]],hostBindings:function(a,t){a&1&&h("resize",function(d){return t.onResize(d)},!1,I)},standalone:!0,features:[f],decls:5,vars:12,consts:[["id","main-wrapper",2,"height","100vh",3,"ngClass","dir"],[1,"left-sidebar","pt-0",3,"mouseover","mouseout"],[3,"notify","showClass"],[1,"page-wrapper","flex-grow-1","pt-0","z-0",2,"height","inherit"]],template:function(a,t){a&1&&(l(0,"div",0)(1,"aside",1),h("mouseover",function(){return t.Logo()})("mouseout",function(){return t.Logo()}),l(2,"app-vertical-sidebar",2),h("notify",function(d){return t.handleClick(d)}),m()(),l(3,"div",3),o(4,"router-outlet"),m()()),a&2&&(r("ngClass",D(10,se,t.storeService.options().showMobileMenu))("dir",t.storeService.options().dir),S("data-theme",t.storeService.options().theme)("data-layout",t.storeService.options().layout)("data-sidebartype",t.storeService.options().sidebartype)("data-sidebar-position",t.storeService.options().sidebarpos)("data-header-position",t.storeService.options().headerpos)("data-boxed-layout",t.storeService.options().boxed),_(),S("data-sidebarbg",t.storeService.options().sidebarbg),_(),r("showClass",t.storeService.options().showMobileMenu))},dependencies:[N,z,J,G,V,j,O,E,A,$]})}}return e})();function ne(e,c){e&1&&o(0,"choose-product")}function oe(e,c){if(e&1&&o(0,"app-barcode-preview",1),e&2){let i=b().$implicit;r("items",i)}}function re(e,c){if(e&1&&o(0,"app-label-preview",2),e&2){let i=b(3);r("item",i.storeService.expandProductItem()[0])}}function le(e,c){if(e&1&&u(0,oe,1,1,"app-barcode-preview",1)(1,re,1,1,"app-label-preview",2),e&2){let i=b(2);w(i.printMode==="barcode"?0:1)}}function ce(e,c){e&1&&(l(0,"app-customize-label"),u(1,le,2,1,"ng-template",null,0,R),m())}function de(e,c){e&1&&o(0,"app-print-preview")}var te=(()=>{class e{constructor(){this.storeService=n(v),this.httpService=n(U),this.destroyRef=n(M),this.routes=n(P)}get printMode(){return console.log("printMode",this.routes.snapshot.queryParamMap.get("printMode")),this.routes.snapshot.queryParamMap.get("printMode")}ngOnInit(){this.storeService.onReset(),console.log(localStorage.getItem("Domain"))}checkProtocol(i){return!!i.match(/^(https?):\/\//)}ngAfterViewInit(){let i=localStorage.getItem("Domain"),a=this.checkProtocol(i)?new URL(i).hostname:i;F([this.httpService.post("api/Config/PaperConfig",{SubDomain:a},void 0).pipe(g(t=>k({error:t}))),this.httpService.get("/API/V3/Tax",void 0,`https://${a}`).pipe(g(t=>k({error:t})))]).pipe(H(this.destroyRef),W("response"),y(([t,s])=>"error"in t||"error"in s?(console.warn("Error in one or more requests",{paperConfig:t,taxs:s}),{paperConfig:null,taxs:null}):{paperConfig:t,taxs:s}),T(({paperConfig:t,taxs:s})=>{t&&(this.storeService.onChangePaperConfig(C(x({},t),{PaperFormats:t.PaperFormats.map(d=>C(x({},d),{OutletID:null}))})),t.PaperFormats.length>0&&this.storeService.onChangePaperConfiguration(t.PaperFormats[0])),s&&this.storeService.onChangeTaxs(s)})).subscribe()}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-dashboard"]],standalone:!0,features:[f],decls:3,vars:1,consts:[["content",""],[3,"items"],[3,"item"]],template:function(a,t){if(a&1&&u(0,ne,1,0,"choose-product")(1,ce,3,0,"app-customize-label")(2,de,1,0,"app-print-preview"),a&2){let s;w((s=t.storeService.stepper$().state)===0?0:s===1?1:s===2?2:-1)}},dependencies:[q,K,X,Z,Y,Q]})}}return e})();var lt=[{path:"",children:[{path:"",component:te},{path:"v2/print-mode",loadComponent:()=>import("./chunk-QCOAAL7X.js").then(e=>e.PrintModeSelectorComponent)},{path:"shelf",component:ee,children:[{path:"barcode",loadComponent:()=>import("./chunk-MPZRXVDV.js").then(e=>e.ShelfBarcodeComponent)},{path:"price-label",loadComponent:()=>import("./chunk-EY3YSL4X.js").then(e=>e.ShelfLabelComponent)}]}]}];export{lt as dashboardRoutes};
@@ -1 +1 @@
1
- import{b as N,e as $,f as z,g as A,i as k}from"./chunk-DNCCUYS2.js";import"./chunk-BVFPFG2Y.js";import"./chunk-WV652PSI.js";import"./chunk-BNR2GQKE.js";import{da as H,l as I,n as B,r as q}from"./chunk-AJDEWWQT.js";import{Ad as F,C as u,Da as i,Ec as b,Ha as P,I as C,J as v,Kb as w,Nc as R,Rb as S,Vb as a,Xa as _,Z as g,a as h,b as f,ec as D,fc as T,gc as c,hc as s,ic as p,rd as x,sd as M,ta as y,td as E,zb as d}from"./chunk-PNNBJ4WR.js";function L(t,m){t&1&&(s(0),c(1,"choose-product"),p())}function O(t,m){if(t&1&&c(0,"app-barcode-preview",4),t&2){let e=m.$implicit;a("items",e)}}function U(t,m){t&1&&(s(0),D(1,"app-customize-label"),S(2,O,1,1,"ng-template",null,0,R),T(),p())}function V(t,m){t&1&&(s(0),c(1,"app-print-preview"),p())}var se=(()=>{class t{constructor(){this.storeService=i(N),this.httpService=i(H),this.destroyRef=i(_),this.routes=i(I),this.router=i(B),this.step=w(0)}get printMode(){let e=this.routes.snapshot.queryParamMap.get("printMode");return console.log("printMode",e),e}ngOnInit(){this.storeService.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 o=this.httpService.post("api/Config/PaperConfig",{SubDomain:e}).pipe(g(n=>u({error:n}))),r=this.httpService.get("/API/V3/Tax",void 0,`https://${e}`).pipe(g(n=>u({error:n})));v([o,r]).pipe(q(this.destroyRef),C(([n,l])=>this.normalizeResponses(n,l)),y(({paperConfig:n,taxs:l})=>this.applyDataToStore(n,l))).subscribe()}normalizeResponses(e,o){let r=n=>n&&"error"in n;return{paperConfig:r(e)?null:e,taxs:r(o)?null:o}}applyDataToStore(e,o){e&&(this.storeService.onChangePaperConfig(f(h({},e),{PaperFormats:e.PaperFormats.map(r=>f(h({},r),{OutletID:null}))})),e.PaperFormats.length>0&&this.storeService.onChangePaperConfiguration(e.PaperFormats[0])),o&&this.storeService.onChangeTaxs(o)}onNext(){if(this.step()>=3){console.warn("Maximum step reached, cannot proceed further.");return}this.router.navigate([],{relativeTo:this.routes,queryParams:{step:this.step()+1},queryParamsHandling:"merge"})}onPrevious(){if(this.step()<=1){console.warn("Already at the first step, cannot go back.");return}this.router.navigate([],{relativeTo:this.routes,queryParams:{step:this.step()-1},queryParamsHandling:"merge"})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-shelf-barcode"]],standalone:!0,features:[b],decls:4,vars:3,consts:[["content",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"items"]],template:function(o,r){o&1&&(s(0,1),S(1,L,2,0,"ng-container",2)(2,U,4,0,"ng-container",2)(3,V,2,0,"ng-container",3),p()),o&2&&(a("ngSwitch",r.storeService.stepper$().state),d(),a("ngSwitchCase",0),d(),a("ngSwitchCase",1))},dependencies:[$,F,x,M,E,A,z,k],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{se as ShelfBarcodeComponent};
1
+ import{b as N,e as $,f as z,g as A,i as k}from"./chunk-ZQG3LLIR.js";import"./chunk-BVFPFG2Y.js";import"./chunk-WV652PSI.js";import"./chunk-Y7ZU5TZX.js";import{da as H,l as I,n as B,r as q}from"./chunk-AJDEWWQT.js";import{Ad as F,C as u,Da as i,Ec as b,Ha as P,I as C,J as v,Kb as w,Nc as R,Rb as S,Vb as a,Xa as _,Z as g,a as h,b as f,ec as D,fc as T,gc as c,hc as s,ic as p,rd as x,sd as M,ta as y,td as E,zb as d}from"./chunk-PNNBJ4WR.js";function L(t,m){t&1&&(s(0),c(1,"choose-product"),p())}function O(t,m){if(t&1&&c(0,"app-barcode-preview",4),t&2){let e=m.$implicit;a("items",e)}}function U(t,m){t&1&&(s(0),D(1,"app-customize-label"),S(2,O,1,1,"ng-template",null,0,R),T(),p())}function V(t,m){t&1&&(s(0),c(1,"app-print-preview"),p())}var se=(()=>{class t{constructor(){this.storeService=i(N),this.httpService=i(H),this.destroyRef=i(_),this.routes=i(I),this.router=i(B),this.step=w(0)}get printMode(){let e=this.routes.snapshot.queryParamMap.get("printMode");return console.log("printMode",e),e}ngOnInit(){this.storeService.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 o=this.httpService.post("api/Config/PaperConfig",{SubDomain:e}).pipe(g(n=>u({error:n}))),r=this.httpService.get("/API/V3/Tax",void 0,`https://${e}`).pipe(g(n=>u({error:n})));v([o,r]).pipe(q(this.destroyRef),C(([n,l])=>this.normalizeResponses(n,l)),y(({paperConfig:n,taxs:l})=>this.applyDataToStore(n,l))).subscribe()}normalizeResponses(e,o){let r=n=>n&&"error"in n;return{paperConfig:r(e)?null:e,taxs:r(o)?null:o}}applyDataToStore(e,o){e&&(this.storeService.onChangePaperConfig(f(h({},e),{PaperFormats:e.PaperFormats.map(r=>f(h({},r),{OutletID:null}))})),e.PaperFormats.length>0&&this.storeService.onChangePaperConfiguration(e.PaperFormats[0])),o&&this.storeService.onChangeTaxs(o)}onNext(){if(this.step()>=3){console.warn("Maximum step reached, cannot proceed further.");return}this.router.navigate([],{relativeTo:this.routes,queryParams:{step:this.step()+1},queryParamsHandling:"merge"})}onPrevious(){if(this.step()<=1){console.warn("Already at the first step, cannot go back.");return}this.router.navigate([],{relativeTo:this.routes,queryParams:{step:this.step()-1},queryParamsHandling:"merge"})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-shelf-barcode"]],standalone:!0,features:[b],decls:4,vars:3,consts:[["content",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"items"]],template:function(o,r){o&1&&(s(0,1),S(1,L,2,0,"ng-container",2)(2,U,4,0,"ng-container",2)(3,V,2,0,"ng-container",3),p()),o&2&&(a("ngSwitch",r.storeService.stepper$().state),d(),a("ngSwitchCase",0),d(),a("ngSwitchCase",1))},dependencies:[$,F,x,M,E,A,z,k],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{se as ShelfBarcodeComponent};
@@ -1 +1 @@
1
- var e={production:!0,firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},version:"1.8.3"};export{e as a};
1
+ var e={production:!0,firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},version:"1.8.4"};export{e as a};