marketplacepos 5.38.2 → 5.38.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.
- package/Marketplace/3rdpartylicenses.txt +8 -8
- package/Marketplace/chunk-2ESOTQPW.js +1 -0
- package/Marketplace/chunk-2JKSMF3I.js +1 -0
- package/Marketplace/chunk-2OL4XZXJ.js +1 -0
- package/Marketplace/chunk-3C4M544Q.js +1 -0
- package/Marketplace/{chunk-TCRZNHID.js → chunk-3LQNSF7T.js} +1 -1
- package/Marketplace/chunk-3NDNZO2L.js +2 -0
- package/Marketplace/{chunk-FMXSAVJ5.js → chunk-3SDQ2PXY.js} +1 -1
- package/Marketplace/chunk-4ASUM4N5.js +1 -0
- package/Marketplace/chunk-4RXCRDWF.js +2 -0
- package/Marketplace/chunk-54RFAHSK.js +1 -0
- package/Marketplace/{chunk-YNZOWISG.js → chunk-5MRT2EFE.js} +1 -1
- package/Marketplace/chunk-5X6GYYIM.js +1 -0
- package/Marketplace/chunk-5XVUQWLZ.js +2 -0
- package/Marketplace/{chunk-LWDDTE3V.js → chunk-62PFQNHJ.js} +1 -1
- package/Marketplace/chunk-662ELWF5.js +1 -0
- package/Marketplace/chunk-6ALHX2I4.js +1 -0
- package/Marketplace/{chunk-LIQRQYKZ.js → chunk-6IAGGRZN.js} +1 -1
- package/Marketplace/{chunk-4BKQVHMV.js → chunk-7477X7LJ.js} +1 -1
- package/Marketplace/{chunk-ACIMXBIC.js → chunk-77IUCPIQ.js} +1 -1
- package/Marketplace/{chunk-ZX5YQUYQ.js → chunk-7AVVOGZA.js} +1 -1
- package/Marketplace/{chunk-FZDXTSZF.js → chunk-7TWBIV3T.js} +1 -1
- package/Marketplace/{chunk-67IT7XVS.js → chunk-AL3REAHH.js} +1 -1
- package/Marketplace/{chunk-XMUA7ACY.js → chunk-BUFEIJAI.js} +1 -1
- package/Marketplace/chunk-BXKAE7Z3.js +1 -0
- package/Marketplace/{chunk-4YVLPJDF.js → chunk-CH2MLZU7.js} +1 -1
- package/Marketplace/{chunk-3SYZKYR6.js → chunk-CLKCSTGQ.js} +1 -1
- package/Marketplace/{chunk-THCM5TEN.js → chunk-COBHWPGI.js} +1 -1
- package/Marketplace/{chunk-I5QRFRRD.js → chunk-CRC6ZWYT.js} +1 -1
- package/Marketplace/{chunk-S4HBPSOW.js → chunk-CVQMAWML.js} +1 -1
- package/Marketplace/{chunk-RXP4QJHL.js → chunk-CZWNWUW2.js} +1 -1
- package/Marketplace/{chunk-CHBBBCQU.js → chunk-DP3Z5OLA.js} +1 -1
- package/Marketplace/{chunk-5JWYKH72.js → chunk-DPLEMBB4.js} +1 -1
- package/Marketplace/chunk-DYBAGP7P.js +1 -0
- package/Marketplace/{chunk-DWDTKK42.js → chunk-E6HA2AGS.js} +1 -1
- package/Marketplace/chunk-EA52MAWA.js +1 -0
- package/Marketplace/{chunk-K7HUCVG7.js → chunk-EGTYAIU5.js} +1 -1
- package/Marketplace/{chunk-CDAB4RAT.js → chunk-EOPCFNMW.js} +1 -1
- package/Marketplace/chunk-EU6PHSKS.js +1 -0
- package/Marketplace/{chunk-SG52OFBZ.js → chunk-G35YVLFO.js} +1 -1
- package/Marketplace/{chunk-JNXIAVS4.js → chunk-G6EG5QJS.js} +1 -1
- package/Marketplace/{chunk-634DNHPF.js → chunk-GBABJLPQ.js} +1 -1
- package/Marketplace/{chunk-HPX77FXZ.js → chunk-GBD4FIF3.js} +1 -1
- package/Marketplace/{chunk-MFZLTVCS.js → chunk-GHQH62TZ.js} +1 -1
- package/Marketplace/chunk-GPEVUTDI.js +2 -0
- package/Marketplace/{chunk-UX7JCPZZ.js → chunk-GQZES4UF.js} +1 -1
- package/Marketplace/chunk-GZIXVRJT.js +1 -0
- package/Marketplace/chunk-H55YXRO5.js +1 -0
- package/Marketplace/chunk-HQL6WPF6.js +1 -0
- package/Marketplace/chunk-HTVSJFUP.js +5 -0
- package/Marketplace/chunk-IIJMZKPL.js +1 -0
- package/Marketplace/{chunk-5SXUJ5XH.js → chunk-ITTRZMEX.js} +4 -4
- package/Marketplace/{chunk-2UZPOENK.js → chunk-IYYVZ6B6.js} +1 -1
- package/Marketplace/{chunk-RTUTYVTE.js → chunk-J3P46Z53.js} +1 -1
- package/Marketplace/chunk-JTZJTXCN.js +1 -0
- package/Marketplace/{chunk-V6IICLFE.js → chunk-JYLQJCDT.js} +1 -1
- package/Marketplace/chunk-K2H6WANG.js +1 -0
- package/Marketplace/{chunk-WAGDS532.js → chunk-KHWTOD6H.js} +1 -1
- package/Marketplace/{chunk-PQZGUDGJ.js → chunk-KXZCGKQW.js} +1 -1
- package/Marketplace/chunk-KZTPUAO4.js +1 -0
- package/Marketplace/{chunk-EAU6FVQT.js → chunk-LEHTNMIE.js} +1 -1
- package/Marketplace/{chunk-IPYYFOPE.js → chunk-LLZSSV5A.js} +1 -1
- package/Marketplace/chunk-LMYPSQJN.js +1 -0
- package/Marketplace/{chunk-SZ22GHDY.js → chunk-LOJPRXKZ.js} +1 -1
- package/Marketplace/chunk-LQQ67QXG.js +2 -0
- package/Marketplace/{chunk-NB5JKHKF.js → chunk-MNFHFW3E.js} +1 -1
- package/Marketplace/{chunk-KP7SEM5B.js → chunk-OAS72QB2.js} +1 -1
- package/Marketplace/{chunk-HCZDLZLY.js → chunk-OE2JYQHN.js} +1 -1
- package/Marketplace/{chunk-I44JKLRE.js → chunk-OLSC6KHB.js} +1 -1
- package/Marketplace/{chunk-GJLXEA4Q.js → chunk-PPDHTO44.js} +1 -1
- package/Marketplace/chunk-PUJ4JVT2.js +4 -0
- package/Marketplace/chunk-PXB4YEY3.js +1 -0
- package/Marketplace/{chunk-7Q6UDUDK.js → chunk-PXU3DWYL.js} +1 -1
- package/Marketplace/chunk-PZTMYAA7.js +1 -0
- package/Marketplace/{chunk-V27YSSV4.js → chunk-Q2OEJFVT.js} +1 -1
- package/Marketplace/{chunk-ZUFLZMHT.js → chunk-Q72ZXPDP.js} +1 -1
- package/Marketplace/{chunk-LLXJSB37.js → chunk-QCZIDOKW.js} +1 -1
- package/Marketplace/{chunk-JAC62SW3.js → chunk-QRJDRFNS.js} +1 -1
- package/Marketplace/{chunk-NQV7LHIV.js → chunk-RGR34QZ3.js} +1 -1
- package/Marketplace/{chunk-PRVOIBMJ.js → chunk-RIHLYYZU.js} +1 -1
- package/Marketplace/{chunk-APOFECEW.js → chunk-RVYGL22E.js} +1 -1
- package/Marketplace/chunk-SA573BZL.js +1 -0
- package/Marketplace/{chunk-LHKT5TT3.js → chunk-SVCUTNSP.js} +2 -2
- package/Marketplace/chunk-T3VPBK5Q.js +1 -0
- package/Marketplace/chunk-T5ONJF63.js +7 -0
- package/Marketplace/chunk-T6QOFDEE.js +1 -0
- package/Marketplace/{chunk-ELDNUVIH.js → chunk-TB6SAKPJ.js} +1 -1
- package/Marketplace/{chunk-3S7C3CCV.js → chunk-TMFFA26Y.js} +1 -1
- package/Marketplace/chunk-TTKPJA6M.js +1 -0
- package/Marketplace/chunk-TZXF4K2V.js +1 -0
- package/Marketplace/{chunk-3FCJ4HSW.js → chunk-U2ZMUFQ6.js} +1 -1
- package/Marketplace/{chunk-HSHDGVNA.js → chunk-UBMI3NQH.js} +1 -1
- package/Marketplace/{chunk-IZCEOKBE.js → chunk-UDOCTVWA.js} +1 -1
- package/Marketplace/chunk-UIM3W5B7.js +1 -0
- package/Marketplace/{chunk-TGMCGROM.js → chunk-V5WYSCVT.js} +1 -1
- package/Marketplace/{chunk-FFM752SB.js → chunk-VGXQU74M.js} +1 -1
- package/Marketplace/{chunk-PHCYCYXH.js → chunk-WAW37FIG.js} +1 -1
- package/Marketplace/chunk-WCAHHXUG.js +1 -0
- package/Marketplace/{chunk-BTW46HYC.js → chunk-XDUYDX35.js} +2 -2
- package/Marketplace/{chunk-IQEG7SF6.js → chunk-XFCMKJV6.js} +1 -1
- package/Marketplace/chunk-YCXXSKHC.js +1 -0
- package/Marketplace/chunk-YIUQQGOQ.js +1 -0
- package/Marketplace/chunk-YSHR4I3P.js +5 -0
- package/Marketplace/{chunk-ZEAT7ZWR.js → chunk-YXFTLQ5M.js} +1 -1
- package/Marketplace/{chunk-CXIBIPS5.js → chunk-ZD5LURJS.js} +1 -1
- package/Marketplace/chunk-ZGL7PBN6.js +8 -0
- package/Marketplace/{chunk-YOGRCIUI.js → chunk-ZZVNB72Q.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-DFBPCCHZ.js +1 -0
- package/Marketplace/{styles-FQFG5OHY.css → styles-6IZYQNTO.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2FSWKVW2.js +0 -5
- package/Marketplace/chunk-2WX4KRTS.js +0 -1
- package/Marketplace/chunk-3H6MA53M.js +0 -1
- package/Marketplace/chunk-66YHNWRR.js +0 -1
- package/Marketplace/chunk-6BGGLLB3.js +0 -1
- package/Marketplace/chunk-7SLPBFFW.js +0 -1
- package/Marketplace/chunk-AHLRE6UG.js +0 -1
- package/Marketplace/chunk-B2EMWVNF.js +0 -1
- package/Marketplace/chunk-BLEP5X4N.js +0 -1
- package/Marketplace/chunk-CDNNFRZK.js +0 -1
- package/Marketplace/chunk-D7HXHNZ2.js +0 -1
- package/Marketplace/chunk-E7PTAPC2.js +0 -1
- package/Marketplace/chunk-ECT4LXWX.js +0 -1
- package/Marketplace/chunk-EU2KAMEK.js +0 -1
- package/Marketplace/chunk-F7GZCBBK.js +0 -1
- package/Marketplace/chunk-FDTSK7U4.js +0 -1
- package/Marketplace/chunk-FZZFKUA6.js +0 -1
- package/Marketplace/chunk-GCECFUOP.js +0 -1
- package/Marketplace/chunk-GJ35EMJI.js +0 -1
- package/Marketplace/chunk-GQH7OSVY.js +0 -1
- package/Marketplace/chunk-HP3XWVNT.js +0 -1
- package/Marketplace/chunk-IFLSHEST.js +0 -1
- package/Marketplace/chunk-ISBNY3BW.js +0 -1
- package/Marketplace/chunk-IURGBAYA.js +0 -1
- package/Marketplace/chunk-KEJE3NY3.js +0 -2
- package/Marketplace/chunk-KESNVJB4.js +0 -1
- package/Marketplace/chunk-KFBOPHX3.js +0 -1
- package/Marketplace/chunk-KLK56V5W.js +0 -5
- package/Marketplace/chunk-L532YTS3.js +0 -1
- package/Marketplace/chunk-LWGJZHI6.js +0 -1
- package/Marketplace/chunk-LXSQIECO.js +0 -1
- package/Marketplace/chunk-N5FUA6YZ.js +0 -8
- package/Marketplace/chunk-N5J4Q6XU.js +0 -1
- package/Marketplace/chunk-NLMYFEYT.js +0 -1
- package/Marketplace/chunk-ODYALJ4L.js +0 -1
- package/Marketplace/chunk-OQ6GAJZC.js +0 -1
- package/Marketplace/chunk-OQCIFQ6E.js +0 -1
- package/Marketplace/chunk-PW42BQIY.js +0 -1
- package/Marketplace/chunk-RH3MWQCS.js +0 -1
- package/Marketplace/chunk-RP5BC3NS.js +0 -1
- package/Marketplace/chunk-S6JH7OX2.js +0 -1
- package/Marketplace/chunk-SNSUFM3F.js +0 -1
- package/Marketplace/chunk-T2QY5RTH.js +0 -1
- package/Marketplace/chunk-TO3EP6I2.js +0 -1
- package/Marketplace/chunk-U5FRJVIW.js +0 -2
- package/Marketplace/chunk-UPA7TFVG.js +0 -2
- package/Marketplace/chunk-VFLAHRB4.js +0 -7
- package/Marketplace/chunk-VHIGKLLN.js +0 -5
- package/Marketplace/chunk-VQIOJJQU.js +0 -1
- package/Marketplace/chunk-WLZKVYHT.js +0 -1
- package/Marketplace/chunk-YZTAHFSS.js +0 -1
- package/Marketplace/chunk-ZBQYXB3O.js +0 -1
- package/Marketplace/chunk-ZJ33U67R.js +0 -1
- package/Marketplace/chunk-ZNZULA6U.js +0 -1
- package/Marketplace/main-NTODVC3B.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as tt,d as F,f as R,g as j,i as k}from"./chunk-K5XRGNWG.js";import{C as yt,a as W,g as X,v as gt,w as _t,x as Tt}from"./chunk-UPA7TFVG.js";import{$b as m,Ea as P,Fb as q,Fc as v,Gb as ft,Hc as b,J as lt,La as U,Lb as A,Ra as D,Vb as B,Wb as O,Xb as c,Yb as M,c as rt,f as g,hc as h,ic as f,ja as I,jc as E,ka as ut,kc as Q,lc as J,m as ct,ma as dt,nb as pt,nc as K,oa as p,ob as Y,pa as w,pc as vt,rb as a,sa as ht,sc as H,tc as l,u as Z,ub as mt,xb as y,ya as $,za as G}from"./chunk-VFLAHRB4.js";import{a as u,b as C}from"./chunk-66YHNWRR.js";var bt=["toast-component",""];function At(s,n){if(s&1){let t=K();h(0,"button",5),H("click",function(){$(t);let i=l();return G(i.remove())}),h(1,"span",6),v(2,"\xD7"),f()()}}function Ot(s,n){if(s&1&&(Q(0),v(1),J()),s&2){let t=l(2);a(),b("[",t.duplicatesCount+1,"]")}}function Mt(s,n){if(s&1&&(h(0,"div"),v(1),A(2,Ot,2,1,"ng-container",4),f()),s&2){let t=l();m(t.options.titleClass),O("aria-label",t.title),a(),b(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Et(s,n){if(s&1&&E(0,"div",7),s&2){let t=l();m(t.options.messageClass),c("innerHTML",t.message,Y)}}function Ht(s,n){if(s&1&&(h(0,"div",8),v(1),f()),s&2){let t=l();m(t.options.messageClass),O("aria-label",t.message),a(),b(" ",t.message," ")}}function Rt(s,n){if(s&1&&(h(0,"div"),E(1,"div",9),f()),s&2){let t=l();a(),M("width",t.width()+"%")}}function jt(s,n){if(s&1){let t=K();h(0,"button",5),H("click",function(){$(t);let i=l();return G(i.remove())}),h(1,"span",6),v(2,"\xD7"),f()()}}function Nt(s,n){if(s&1&&(Q(0),v(1),J()),s&2){let t=l(2);a(),b("[",t.duplicatesCount+1,"]")}}function St(s,n){if(s&1&&(h(0,"div"),v(1),A(2,Nt,2,1,"ng-container",4),f()),s&2){let t=l();m(t.options.titleClass),O("aria-label",t.title),a(),b(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Pt(s,n){if(s&1&&E(0,"div",7),s&2){let t=l();m(t.options.messageClass),c("innerHTML",t.message,Y)}}function Bt(s,n){if(s&1&&(h(0,"div",8),v(1),f()),s&2){let t=l();m(t.options.messageClass),O("aria-label",t.message),a(),b(" ",t.message," ")}}function Ft(s,n){if(s&1&&(h(0,"div"),E(1,"div",9),f()),s&2){let t=l();a(),M("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},it=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},x=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(n,t,e,i,o,d){this.toastId=n,this.config=t,this.message=e,this.title=i,this.toastType=o,this.toastRef=d,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},Ct={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},It=new dt("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,e){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(n,t){let e=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=e.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},kt=(()=>{class s{_document=w(W);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),ot=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class s{_overlayContainer=w(kt);_componentFactoryResolver=w(mt);_appRef=w(B);_document=w(W);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let i=this._document.createElement("div");return i.id="toast-container",i.classList.add(t),i.classList.add("toast-container"),e?e.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),V=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,i,o,d){this.overlay=e,this._injector=i,this.sanitizer=o,this.ngZone=d,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,i={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(i))}success(t,e,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}error(t,e,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}info(t,e,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}warning(t,e,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(t="",e="",i,o){let{includeTitleDuplicates:d}=this.toastrConfig;for(let r of this.toasts){let _=d&&r.title===t;if((!d||_)&&r.message===e)return r.toastRef.onDuplicate(i,o),r}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,i,o)):this._buildNotification(t,e,i,o)}_buildNotification(t,e,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let d=this.findDuplicate(i,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||e)&&this.toastrConfig.preventDuplicates&&d!==null)return d;this.previousToastMessage=e;let r=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(r=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let _=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let N=e;e&&o.enableHtml&&(N=this.sanitizer.sanitize(pt.HTML,e));let T=new st(_),S=new x(this.index,o,N,i,t,T),L=[{provide:x,useValue:S}],wt=P.create({providers:L,parent:this._injector}),xt=new et(o.toastComponent,wt),at=_.attach(xt,o.newestOnTop);T.componentInstance=at.instance;let z={toastId:this.index,title:i||"",message:e||"",toastRef:T,onShown:T.afterActivate(),onHidden:T.afterClosed(),onTap:S.onTap(),onAction:S.onAction(),portal:at};return r||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{z.toastRef.activate()})),this.toasts.push(z),z}static \u0275fac=function(e){return new(e||s)(p(It),p(Vt),p(P),p(yt),p(U))};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Lt=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=D(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.ngZone=i,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=D({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>C(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>C(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>C(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||s)(y(V),y(x),y(U))};static \u0275cmp=q({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,i){e&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(vt("@flyInOut",i._state),m(i.toastClasses),M("display",i.displayStyle))},attrs:bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,i){e&1&&A(0,At,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Et,1,3,"div",2)(3,Ht,2,4,"div",3)(4,Rt,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[X],encapsulation:2,data:{animation:[tt("flyInOut",[j("inactive",R({opacity:0})),j("active",R({opacity:1})),j("removed",R({opacity:0})),k("inactive => active",F("{{ easeTime }}ms {{ easing }}")),k("active => removed",F("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return s})(),zt=C(u({},Ct),{toastComponent:Lt}),Zt=(s={})=>ht([{provide:It,useValue:{default:zt,config:s}}]),be=(()=>{class s{static forRoot(t={}){return{ngModule:s,providers:[Zt(t)]}}static \u0275fac=function(e){return new(e||s)};static \u0275mod=ft({type:s});static \u0275inj=ut({})}return s})();var $t=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=D(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=D("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.appRef=i,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||s)(y(V),y(x),y(B))};static \u0275cmp=q({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,i){e&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(m(i.toastClasses),M("display",i.displayStyle))},attrs:bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,i){e&1&&A(0,jt,3,0,"button",0)(1,St,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,Ft,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[X],encapsulation:2,changeDetection:0})}return s})(),Ce=C(u({},Ct),{toastComponent:$t});var Oe=(()=>{class s{constructor(t,e){this.http=t,this.toastr=e}get(t,e){let i=this.generateQueryParams(e);return this.http.get(t,{params:i}).pipe(lt(o=>ct))}generateQueryParams(t=[]){let e=new _t;return t.forEach(i=>{e=e.append(i.key,i.value)}),e}post(t,e={},i={},o=1e5){return this.http.post(t,e,i).pipe(Z(o))}postFile(t,e,i=1e5){return new rt(o=>{let d=new gt({"Content-Type":"application/json","Cache-Control":"no-cache"});this.http.post(t,e,{headers:d,observe:"response",responseType:"blob"}).pipe(Z(i)).subscribe({next:r=>{o.next({title:r.headers.get("Content-Disposition"),file:r.body}),o.complete()},error:r=>{if(r.headers.get("Content-Type")==="application/json; charset=utf-8"){let _=new FileReader;_.addEventListener("loadend",N=>{let T=JSON.parse(N.srcElement.result)?.Message;if(!this.unauthorizedErrorHandling(r)){let L=this.errorMessageHandling(r);this.toastr.error(T??"An unknown error has occured!",L.header,{enableHtml:!0})}}),_.readAsText(r.error)}o.error(r)}})})}unauthorizedErrorHandling(t){let e=!1;return(t.status==401||t.status==403)&&(localStorage.getItem("Token")?this.toastr.error("Your session has expired. Please login again.","Unauthorized",{enableHtml:!0}):window.location.href="/",e=!0),e}errorMessageHandling(t){let e="API Error",i="Exception Message";return t.error?(e="API Error - "+t.status,t.status==451&&(e="Error"),t.error&&(i=t.error.Message)):t.Message&&(e="API Error - "+t.name,i=t.Message),{header:e,Message:i}}delete(t,e){return this.http.delete(t,e)}static{this.\u0275fac=function(e){return new(e||s)(p(Tt),p(V))}}static{this.\u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{x as a,V as b,Lt as c,be as d,Oe as e};
|
|
1
|
+
import{c as tt,d as F,f as R,g as j,i as k}from"./chunk-K5XRGNWG.js";import{C as yt,a as W,g as X,v as gt,w as _t,x as Tt}from"./chunk-GPEVUTDI.js";import{Ea as P,Eb as q,Ec as v,Fb as ft,Gc as b,J as lt,Kb as A,La as U,Qa as D,Ub as B,Vb as O,Wb as c,Xb as M,_b as m,c as rt,f as g,gc as h,hc as f,ic as E,ja as I,jc as Q,ka as ut,kc as J,m as ct,ma as dt,mb as pt,mc as K,nb as Y,oa as p,oc as vt,pa as w,qb as a,rc as H,sa as ht,sc as l,tb as mt,u as Z,wb as y,ya as $,za as G}from"./chunk-T5ONJF63.js";import{a as u,b as C}from"./chunk-K2H6WANG.js";var bt=["toast-component",""];function At(s,n){if(s&1){let t=K();h(0,"button",5),H("click",function(){$(t);let i=l();return G(i.remove())}),h(1,"span",6),v(2,"\xD7"),f()()}}function Ot(s,n){if(s&1&&(Q(0),v(1),J()),s&2){let t=l(2);a(),b("[",t.duplicatesCount+1,"]")}}function Mt(s,n){if(s&1&&(h(0,"div"),v(1),A(2,Ot,2,1,"ng-container",4),f()),s&2){let t=l();m(t.options.titleClass),O("aria-label",t.title),a(),b(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Et(s,n){if(s&1&&E(0,"div",7),s&2){let t=l();m(t.options.messageClass),c("innerHTML",t.message,Y)}}function Ht(s,n){if(s&1&&(h(0,"div",8),v(1),f()),s&2){let t=l();m(t.options.messageClass),O("aria-label",t.message),a(),b(" ",t.message," ")}}function Rt(s,n){if(s&1&&(h(0,"div"),E(1,"div",9),f()),s&2){let t=l();a(),M("width",t.width()+"%")}}function jt(s,n){if(s&1){let t=K();h(0,"button",5),H("click",function(){$(t);let i=l();return G(i.remove())}),h(1,"span",6),v(2,"\xD7"),f()()}}function Nt(s,n){if(s&1&&(Q(0),v(1),J()),s&2){let t=l(2);a(),b("[",t.duplicatesCount+1,"]")}}function St(s,n){if(s&1&&(h(0,"div"),v(1),A(2,Nt,2,1,"ng-container",4),f()),s&2){let t=l();m(t.options.titleClass),O("aria-label",t.title),a(),b(" ",t.title," "),a(),c("ngIf",t.duplicatesCount)}}function Pt(s,n){if(s&1&&E(0,"div",7),s&2){let t=l();m(t.options.messageClass),c("innerHTML",t.message,Y)}}function Bt(s,n){if(s&1&&(h(0,"div",8),v(1),f()),s&2){let t=l();m(t.options.messageClass),O("aria-label",t.message),a(),b(" ",t.message," ")}}function Ft(s,n){if(s&1&&(h(0,"div"),E(1,"div",9),f()),s&2){let t=l();a(),M("width",t.width()+"%")}}var et=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},it=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},st=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new g;_activate=new g;_manualClose=new g;_resetTimeout=new g;_countDuplicate=new g;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},x=class{toastId;config;message;title;toastType;toastRef;_onTap=new g;_onAction=new g;constructor(n,t,e,i,o,d){this.toastId=n,this.config=t,this.message=e,this.title=i,this.toastType=o,this.toastRef=d,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},Ct={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},It=new dt("ToastConfig"),nt=class extends it{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,e){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=e}attachComponentPortal(n,t){let e=this._componentFactoryResolver.resolveComponentFactory(n.component),i;return i=e.create(n.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},kt=(()=>{class s{_document=w(W);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(e){return new(e||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),ot=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Vt=(()=>{class s{_overlayContainer=w(kt);_componentFactoryResolver=w(mt);_appRef=w(B);_document=w(W);_paneElements=new Map;create(t,e){return this._createOverlayRef(this.getPaneElement(t,e))}getPaneElement(t="",e){return this._paneElements.get(e)||this._paneElements.set(e,{}),this._paneElements.get(e)[t]||(this._paneElements.get(e)[t]=this._createPaneElement(t,e)),this._paneElements.get(e)[t]}_createPaneElement(t,e){let i=this._document.createElement("div");return i.id="toast-container",i.classList.add(t),i.classList.add("toast-container"),e?e.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i}_createPortalHost(t){return new nt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new ot(this._createPortalHost(t))}static \u0275fac=function(e){return new(e||s)};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),V=(()=>{class s{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,e,i,o,d){this.overlay=e,this._injector=i,this.sanitizer=o,this.ngZone=d,this.toastrConfig=u(u({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=u(u({},t.default.iconClasses),t.config.iconClasses))}show(t,e,i={},o=""){return this._preBuildNotification(o,t,e,this.applyConfig(i))}success(t,e,i={}){let o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}error(t,e,i={}){let o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}info(t,e,i={}){let o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}warning(t,e,i={}){let o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))}clear(t){for(let e of this.toasts)if(t!==void 0){if(e.toastId===t){e.toastRef.manualClose();return}}else e.toastRef.manualClose()}remove(t){let e=this._findToast(t);if(!e||(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0}findDuplicate(t="",e="",i,o){let{includeTitleDuplicates:d}=this.toastrConfig;for(let r of this.toasts){let _=d&&r.title===t;if((!d||_)&&r.message===e)return r.toastRef.onDuplicate(i,o),r}return null}applyConfig(t={}){return u(u({},this.toastrConfig),t)}_findToast(t){for(let e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null}_preBuildNotification(t,e,i,o){return o.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,e,i,o)):this._buildNotification(t,e,i,o)}_buildNotification(t,e,i,o){if(!o.toastComponent)throw new Error("toastComponent required");let d=this.findDuplicate(i,e,this.toastrConfig.resetTimeoutOnDuplicate&&o.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&i||e)&&this.toastrConfig.preventDuplicates&&d!==null)return d;this.previousToastMessage=e;let r=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(r=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let _=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;let N=e;e&&o.enableHtml&&(N=this.sanitizer.sanitize(pt.HTML,e));let T=new st(_),S=new x(this.index,o,N,i,t,T),L=[{provide:x,useValue:S}],wt=P.create({providers:L,parent:this._injector}),xt=new et(o.toastComponent,wt),at=_.attach(xt,o.newestOnTop);T.componentInstance=at.instance;let z={toastId:this.index,title:i||"",message:e||"",toastRef:T,onShown:T.afterActivate(),onHidden:T.afterClosed(),onTap:S.onTap(),onAction:S.onAction(),portal:at};return r||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{z.toastRef.activate()})),this.toasts.push(z),z}static \u0275fac=function(e){return new(e||s)(p(It),p(Vt),p(P),p(yt),p(U))};static \u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})(),Lt=(()=>{class s{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=D(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.ngZone=i,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o}),this.state=D({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>C(u({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>C(u({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>C(u({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),e)):this.timeout=setTimeout(()=>t(),e)}outsideInterval(t,e){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),e)):this.intervalId=setInterval(()=>t(),e)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(e){return new(e||s)(y(V),y(x),y(U))};static \u0275cmp=q({type:s,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,i){e&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(vt("@flyInOut",i._state),m(i.toastClasses),M("display",i.displayStyle))},attrs:bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,i){e&1&&A(0,At,3,0,"button",0)(1,Mt,3,5,"div",1)(2,Et,1,3,"div",2)(3,Ht,2,4,"div",3)(4,Rt,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[X],encapsulation:2,data:{animation:[tt("flyInOut",[j("inactive",R({opacity:0})),j("active",R({opacity:1})),j("removed",R({opacity:0})),k("inactive => active",F("{{ easeTime }}ms {{ easing }}")),k("active => removed",F("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return s})(),zt=C(u({},Ct),{toastComponent:Lt}),Zt=(s={})=>ht([{provide:It,useValue:{default:zt,config:s}}]),be=(()=>{class s{static forRoot(t={}){return{ngModule:s,providers:[Zt(t)]}}static \u0275fac=function(e){return new(e||s)};static \u0275mod=ft({type:s});static \u0275inj=ut({})}return s})();var $t=(()=>{class s{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=D(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=D("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,e,i){this.toastrService=t,this.toastPackage=e,this.appRef=i,this.message=e.message,this.title=e.title,this.options=e.config,this.originalTimeout=e.config.timeOut,this.toastClasses=`${e.toastType} ${e.config.toastClass}`,this.sub=e.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=e.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=e.toastRef.countDuplicate().subscribe(o=>{this.duplicatesCount=o})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),e=this.hideTime-t;this.width.set(e/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(i=>100-i),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(e){return new(e||s)(y(V),y(x),y(B))};static \u0275cmp=q({type:s,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(e,i){e&1&&H("click",function(){return i.tapToast()})("mouseenter",function(){return i.stickAround()})("mouseleave",function(){return i.delayedHideToast()}),e&2&&(m(i.toastClasses),M("display",i.displayStyle))},attrs:bt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(e,i){e&1&&A(0,jt,3,0,"button",0)(1,St,3,5,"div",1)(2,Pt,1,3,"div",2)(3,Bt,2,4,"div",3)(4,Ft,2,2,"div",4),e&2&&(c("ngIf",i.options.closeButton),a(),c("ngIf",i.title),a(),c("ngIf",i.message&&i.options.enableHtml),a(),c("ngIf",i.message&&!i.options.enableHtml),a(),c("ngIf",i.options.progressBar))},dependencies:[X],encapsulation:2,changeDetection:0})}return s})(),Ce=C(u({},Ct),{toastComponent:$t});var Oe=(()=>{class s{constructor(t,e){this.http=t,this.toastr=e}get(t,e){let i=this.generateQueryParams(e);return this.http.get(t,{params:i}).pipe(lt(o=>ct))}generateQueryParams(t=[]){let e=new _t;return t.forEach(i=>{e=e.append(i.key,i.value)}),e}post(t,e,i={},o=1e5){return this.http.post(t,e,i).pipe(Z(o))}postFile(t,e,i=1e5){return new rt(o=>{let d=new gt({"Content-Type":"application/json","Cache-Control":"no-cache"});this.http.post(t,e,{headers:d,observe:"response",responseType:"blob"}).pipe(Z(i)).subscribe({next:r=>{o.next({title:r.headers.get("Content-Disposition"),file:r.body}),o.complete()},error:r=>{if(r.headers.get("Content-Type")==="application/json; charset=utf-8"){let _=new FileReader;_.addEventListener("loadend",N=>{let T=JSON.parse(N.srcElement.result)?.Message;if(!this.unauthorizedErrorHandling(r)){let L=this.errorMessageHandling(r);this.toastr.error(T??"An unknown error has occured!",L.header,{enableHtml:!0})}}),_.readAsText(r.error)}o.error(r)}})})}unauthorizedErrorHandling(t){let e=!1;return(t.status==401||t.status==403)&&(localStorage.getItem("Token")?this.toastr.error("Your session has expired. Please login again.","Unauthorized",{enableHtml:!0}):window.location.href="/",e=!0),e}errorMessageHandling(t){let e="API Error",i="Exception Message";return t.error?(e="API Error - "+t.status,t.status==451&&(e="Error"),t.error&&(i=t.error.Message)):t.Message&&(e="API Error - "+t.name,i=t.Message),{header:e,Message:i}}delete(t,e){return this.http.delete(t,e)}static{this.\u0275fac=function(e){return new(e||s)(p(Tt),p(V))}}static{this.\u0275prov=I({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{x as a,V as b,Lt as c,be as d,Oe as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as it}from"./chunk-JYLQJCDT.js";import{a as st}from"./chunk-LEHTNMIE.js";import{a as at,b as ot}from"./chunk-GHQH62TZ.js";import{c as rt}from"./chunk-Q72ZXPDP.js";import{f as lt}from"./chunk-Q2OEJFVT.js";import{b as w,c as x,j as E,k as U}from"./chunk-ITTRZMEX.js";import{r as P}from"./chunk-TMFFA26Y.js";import{h as et,m as nt}from"./chunk-DPLEMBB4.js";import{b as m,c}from"./chunk-PXB4YEY3.js";import{G as tt,d as X,f as Y,g as Z,j as $}from"./chunk-GPEVUTDI.js";import{Eb as D,Ec as s,Fc as u,Gc as q,Ic as v,Jc as M,Kb as S,Kc as T,Qa as K,Qc as Q,Wb as r,Z as R,Zc as k,_c as A,bc as N,cc as G,ec as z,fc as H,gc as a,hc as l,ic as J,mc as O,ob as j,pa as B,qb as o,rc as y,sc as f,v as W,wb as C,ya as b,za as I}from"./chunk-T5ONJF63.js";function Ct(i,h){if(i&1&&(a(0,"mat-option",10)(1,"div",11),J(2,"img",12),a(3,"span"),s(4),l()()()),i&2){let t=h.$implicit;r("value",t.ID)("disabled",t.disabled),o(),r("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),o(),r("src",t.Img,j),o(2),u(t.Name)}}function gt(i,h){if(i&1){let t=O();a(0,"div",13)(1,"label",14),s(2,"Scan Type"),l(),a(3,"mat-radio-group",15),T("ngModelChange",function(e){b(t);let p=f();return M(p.filter.ScanFull,e)||(p.filter.ScanFull=e),I(e)}),a(4,"mat-radio-button",16),s(5," Full (Include Inactive Products) "),l(),a(6,"mat-radio-button",17),s(7," Active "),l()()()}if(i&2){let t=f();o(3),v("ngModel",t.filter.ScanFull),o(),r("value",!0),o(2),r("value",!1)}}function ut(i,h){i&1&&(a(0,"span"),s(1,"Never"),l())}function _t(i,h){if(i&1&&(a(0,"span"),s(1),k(2,"async"),l()),i&2){let t=f(2);o(),u(A(2,1,t.lastSync$))}}function St(i,h){if(i&1){let t=O();a(0,"div",8)(1,"label",3)(2,"span",18),s(3,"Last Scan:"),l(),S(4,ut,2,0,"span"),k(5,"async"),S(6,_t,3,3,"span"),l(),a(7,"mat-radio-group",19),T("ngModelChange",function(e){b(t);let p=f();return M(p.filter.UpdatedProduct,e)||(p.filter.UpdatedProduct=e),I(e)}),a(8,"mat-radio-button",20),s(9," Scan All Products "),l(),a(10,"mat-radio-button",21),s(11),l()()()}if(i&2){let t=f();o(4),N(A(5,6,t.lastSync$)==null?4:6),o(3),v("ngModel",t.filter.UpdatedProduct),o(),r("value",!1),o(2),r("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),o(),q(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function yt(i,h){if(i&1){let t=O();a(0,"div",8)(1,"label",3),s(2," Scan Option "),l(),a(3,"mat-radio-group",22),T("ngModelChange",function(e){b(t);let p=f();return M(p.filter.Async,e)||(p.filter.Async=e),I(e)}),a(4,"mat-radio-button",23),s(5," Asynchronous (Get Notified when Complete) "),l(),a(6,"mat-radio-button",24),s(7," Synchronous (Wait until Complete) "),l()()()}if(i&2){let t=f();o(3),v("ngModel",t.filter.Async),o(),r("value",!0),o(2),r("value",!1)}}var Lt=(()=>{class i{constructor(t,n,e){this.dialogRef=t,this.data=n,this.router=e,this.channelService=B(it),this.channelType=m,this.disabledChannelOption=!1,this.filter={ChannelID:c.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=c.IsNotEmpty(n.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=c.IsEmpty(n.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new E,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(t=>(t.disabled=!0,(t.TypeID==m.Tiktok||t.TypeID==m.Tokopedia||t.TypeID==m.Lazada||t.TypeID==m.WooCommerce)&&(t.disabled=!1),t)).sort(t=>t.disabled?1:-1))}onSelectChannel(t){let n=this.filterChannelById(t);this.selectedChannel=n,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(t)}getLastSync(t){this.lastSync$=this.channelService.getLastSync(t).pipe(W(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),c.IsNotEmpty(n.LastSync)?c.convertToReadableDate(n.LastSync):null)),R(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&c.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==m.Shopee||this.selectedChannel.TypeID==m.Tiktok||this.selectedChannel.TypeID==m.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=m.WooCommerce&&this.selectedChannel?.TypeID!=m.KalCare&&this.selectedChannel?.TypeID!=m.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(t){let n;return this.channelOptions&&(n=this.channelOptions.find(e=>e.ID==t)),n}submit(){this.selectedChannel.TypeID==m.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return c.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)(C(w),C(x),C(tt))}}static{this.\u0275cmp=D({type:i,selectors:[["app-scan-dialog"]],standalone:!1,decls:11,vars:8,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","disabled","ngModel"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(n,e){n&1&&(a(0,"modal-material",0),y("onOk",function(){return e.submit()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),a(1,"div",1)(2,"div",2)(3,"label",3),s(4,"Select a Channel"),l(),a(5,"mat-form-field",4)(6,"mat-select",5),T("ngModelChange",function(d){return M(e.filter.ChannelID,d)||(e.filter.ChannelID=d),d}),y("ngModelChange",function(d){return e.onSelectChannel(d)}),S(7,Ct,5,5,"mat-option",6),l()(),S(8,gt,8,3,"div",7)(9,St,12,8,"div",8)(10,yt,8,3,"div",9),l()()()),n&2&&(r("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),o(6),r("disabled",e.disabledChannelOption),v("ngModel",e.filter.ChannelID),o(),r("ngForOf",e.channelOptions),o(),r("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),o(),N(e.hasScanUpdate&&e.selectedChannel?9:-1),o(),r("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[Y,Z,et,nt,at,ot,lt,st,rt,P,U,$],encapsulation:2})}}return i})();var vt=i=>({"bg-gradient-warning":i});function Mt(i,h){if(i&1&&(a(0,"tr",5)(1,"td"),s(2),l(),a(3,"td",6),s(4),l()()),i&2){let t=h.$implicit;r("matTooltip",t.duplicateMessage),o(2),u(t==null?null:t.Name),o(),r("ngClass",Q(4,vt,t.isDuplicate)),o(),u(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var Ht=(()=>{class i{constructor(t,n){this.data=t,this.dialogRef=n,this.variants=K([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,n={},e=[],p=t.filter(d=>c.IsEmpty(d.ChannelVariationSKU));t.filter(d=>c.IsNotEmpty(d.ChannelVariationSKU)).forEach((d,g,F)=>{n[d.ChannelVariationSKU]=F.filter(_=>_.ChannelVariationSKU===d.ChannelVariationSKU)}),Object.keys(n).forEach(d=>{n[d].length>1&&(n[d]=n[d].map((g,F,_)=>{let L=`SKU ${g.ChannelVariationSKU} is duplicated with variant`;return _.forEach((V,dt)=>{V.Name!==g.Name&&(L+=` ${_.length>2?V.Name+(dt!==_.length-1?",":""):V.Name}`)}),g.duplicateMessage=L,g.isDuplicate=!0,g})),e.push(...n[d])}),e.push(...p),this.variants.set(e)}initModalConfig(){this.modalConfig=new E,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}static{this.\u0275fac=function(n){return new(n||i)(C(x),C(w))}}static{this.\u0275cmp=D({type:i,selectors:[["app-modal-variants"]],standalone:!1,decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(n,e){n&1&&(a(0,"modal-material",0),y("onCancel",function(){return e.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),s(6,"Variant"),l(),a(7,"th",4),s(8,"SKU"),l()()(),a(9,"tbody"),z(10,Mt,5,6,"tr",5,G),l()()()()),n&2&&(r("config",e.modalConfig),o(10),H(e.variants()))},dependencies:[X,P,U],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]})}}return i})();export{Lt as a,Ht as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as o,ja as l}from"./chunk-
|
|
1
|
+
import{f as o,ja as l}from"./chunk-T5ONJF63.js";var c=(()=>{class r{_listeners=[];notify(t,s){for(let n of this._listeners)n(t,s)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(s=>t!==s)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(s){return new(s||r)};static \u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var h=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new o;constructor(e=!1,t,s=!0,n){this._multiple=e,this._emitChanges=s,this.compareWith=n,t&&t.length&&(e?t.forEach(i=>this._markSelected(i)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...e){this._verifyValueAssignment(e),e.forEach(s=>this._markSelected(s));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...e){this._verifyValueAssignment(e),e.forEach(s=>this._unmarkSelected(s));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...e){this._verifyValueAssignment(e);let t=this.selected,s=new Set(e.map(i=>this._getConcreteValue(i)));e.forEach(i=>this._markSelected(i)),t.filter(i=>!s.has(this._getConcreteValue(i,s))).forEach(i=>this._unmarkSelected(i));let n=this._hasQueuedChanges();return this._emitChangeEvent(),n}toggle(e){return this.isSelected(e)?this.deselect(e):this.select(e)}clear(e=!0){this._unmarkAll();let t=this._hasQueuedChanges();return e&&this._emitChangeEvent(),t}isSelected(e){return this._selection.has(this._getConcreteValue(e))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(e){this._multiple&&this.selected&&this._selected.sort(e)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(e){e=this._getConcreteValue(e),this.isSelected(e)||(this._multiple||this._unmarkAll(),this.isSelected(e)||this._selection.add(e),this._emitChanges&&this._selectedToEmit.push(e))}_unmarkSelected(e){e=this._getConcreteValue(e),this.isSelected(e)&&(this._selection.delete(e),this._emitChanges&&this._deselectedToEmit.push(e))}_unmarkAll(){this.isEmpty()||this._selection.forEach(e=>this._unmarkSelected(e))}_verifyValueAssignment(e){e.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(e,t){if(this.compareWith){t=t??this._selection;for(let s of t)if(this.compareWith(e,s))return s;return e}else return e}};export{c as a,h as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as f}from"./chunk-
|
|
1
|
+
import{b as f}from"./chunk-BUFEIJAI.js";import{c as r}from"./chunk-PXB4YEY3.js";import{ja as c,pa as h}from"./chunk-T5ONJF63.js";var v=(()=>{class o{constructor(){this.toastrService=h(f)}showToastrUploadMultiple(l,e){let s=[],i=[],a=this.getResponseList(l);if(l.filter(t=>r.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,a.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,a.length>1?this.setHtmlli(e?e(n,t.Channel):`
|
|
2
2
|
<div>
|
|
3
3
|
Product ${n.Name} was <div class="d-inline fw-bold">successfully</div> uploaded to ${t.Channel}
|
|
4
4
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,c as L}from"./chunk-
|
|
1
|
+
import{b as t,c as L}from"./chunk-PXB4YEY3.js";import{n as y}from"./chunk-GPEVUTDI.js";import{Eb as h,Ec as N,Fb as p,Fc as k,Kb as d,Na as r,Wb as C,bc as f,gc as i,hc as s,ic as u,ka as l,ob as c,qb as o,sc as g}from"./chunk-T5ONJF63.js";function x(e,v){if(e&1&&(i(0,"span",2),N(1),s()),e&2){let n=g();o(),k(n.channelName)}}var z=(()=>{class e{set typeId(n){this.channelLogo=L.getChannelLogoByTypeId(n),this.initChannelName(n)}constructor(){this.showChannelName=r(!0)}initChannelName(n){switch(n){case t.Tokopedia:this.channelName="Tokopedia";break;case t.Tiktok:this.channelName="Tiktok";break;case t.WooCommerce:this.channelName="WooCommerce";break;case t.Shopee:this.channelName="Shopee";break;case t.Lazada:this.channelName="Lazada";break;case t.KalCare:this.channelName="Kalcare";break}}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=h({type:e,selectors:[["app-channel-logo"]],inputs:{showChannelName:[1,"showChannelName"],typeId:"typeId"},standalone:!1,decls:3,vars:2,consts:[[1,"d-flex","align-items-center"],[1,"me-3",2,"width","20px",3,"src"],[1,"fw-normal"]],template:function(a,m){a&1&&(i(0,"div",0),u(1,"img",1),d(2,x,2,1,"span",2),s()),a&2&&(o(),C("src",m.channelLogo,c),o(),f(m.showChannelName()?2:-1))},encapsulation:2})}}return e})();var F=(()=>{class e{static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275mod=p({type:e})}static{this.\u0275inj=l({imports:[y]})}}return e})();export{z as a,F as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ht}from"./chunk-CDNNFRZK.js";import{b as tt,c as at,d as Wt}from"./chunk-NB5JKHKF.js";import{a as jt}from"./chunk-SDUUFQUI.js";import{c as zt,d as et}from"./chunk-V27YSSV4.js";import{a as Kt}from"./chunk-PQZGUDGJ.js";import{a as Bt}from"./chunk-WAGDS532.js";import{d as Rt,e as Ze,h as Je,i as Tt,j as Ot,m as Yt,n as Ye,q as Pt}from"./chunk-3S7C3CCV.js";import{E as Q,K as Nt,M as Lt,d as Ue,f as P,g as It,l as Xe,m as ce,n as Oe,s as xt,u as Ft,v as he,w as z}from"./chunk-PHCYCYXH.js";import{a as Re,d as Te,e as le,f as Mt,g as St,k as Vt,p as Et}from"./chunk-5JWYKH72.js";import{a as At,d as kt}from"./chunk-UPA7TFVG.js";import{$ as ye,$b as Ge,Aa as ne,Ac as V,Ba as Ke,Bc as E,Ca as re,Ea as Ae,F as ie,Fa as ft,Fb as A,Fc as b,G as mt,Gb as vt,Gc as F,Hb as O,Hc as q,Ic as $e,Jb as B,Jc as Ie,Ka as p,Kc as xe,La as je,Lb as H,Lc as Fe,O as _t,Pa as L,Pc as Y,Ra as We,Wb as D,Xa as bt,Xb as m,Yb as ke,Zb as M,a as w,cb as qe,cc as se,f as k,fc as Me,fd as wt,gc as Se,hc as l,ia as ze,ic as c,id as I,ja as j,jc as S,ka as gt,ma as W,nc as oe,nd as R,oa as ve,oc as Ve,pa as o,q as De,qa as Ce,ra as we,rb as d,sc as g,tc as u,uc as Ee,vc as de,wb as Qe,xa as T,ya as y,yb as Dt,yc as Ct,za as v,zb as yt,zc as x}from"./chunk-VFLAHRB4.js";var ti=new W("MAT_DATE_LOCALE",{providedIn:"root",factory:ca});function ca(){return o(wt)}var G="Method not implemented",f=class{locale;_localeChanges=new k;localeChanges=this._localeChanges;setTime(s,e,a,t){throw new Error(G)}getHours(s){throw new Error(G)}getMinutes(s){throw new Error(G)}getSeconds(s){throw new Error(G)}parseTime(s,e){throw new Error(G)}addSeconds(s,e){throw new Error(G)}getValidDateOrNull(s){return this.isDateInstance(s)&&this.isValid(s)?s:null}deserialize(s){return s==null||this.isDateInstance(s)&&this.isValid(s)?s:this.invalid()}setLocale(s){this.locale=s,this._localeChanges.next()}compareDate(s,e){return this.getYear(s)-this.getYear(e)||this.getMonth(s)-this.getMonth(e)||this.getDate(s)-this.getDate(e)}compareTime(s,e){return this.getHours(s)-this.getHours(e)||this.getMinutes(s)-this.getMinutes(e)||this.getSeconds(s)-this.getSeconds(e)}sameDate(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareDate(s,e):a==t}return s==e}sameTime(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareTime(s,e):a==t}return s==e}clampDate(s,e,a){return e&&this.compareDate(s,e)<0?e:a&&this.compareDate(s,a)>0?a:s}},$=new W("mat-date-formats");var pa=["mat-calendar-body",""];function ua(n,s){return this._trackRow(s)}var Jt=(n,s)=>s.id;function ma(n,s){if(n&1&&(l(0,"tr",0)(1,"td",3),b(2),c()()),n&2){let e=u();d(),ke("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),D("colspan",e.numCols),d(),q(" ",e.label," ")}}function _a(n,s){if(n&1&&(l(0,"td",3),b(1),c()),n&2){let e=u(2);ke("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),D("colspan",e._firstRowOffset),d(),q(" ",e._firstRowOffset>=e.labelMinRequiredCells?e.label:""," ")}}function ga(n,s){if(n&1){let e=oe();l(0,"td",6)(1,"button",7),g("click",function(t){let i=y(e).$implicit,r=u(2);return v(r._cellClicked(i,t))})("focus",function(t){let i=y(e).$implicit,r=u(2);return v(r._emitActiveDateChange(i,t))}),l(2,"span",8),b(3),c(),S(4,"span",9),c()()}if(n&2){let e=s.$implicit,a=s.$index,t=u().$index,i=u();ke("width",i._cellWidth)("padding-top",i._cellPadding)("padding-bottom",i._cellPadding),D("data-mat-row",t)("data-mat-col",a),d(),M("mat-calendar-body-disabled",!e.enabled)("mat-calendar-body-active",i._isActiveCell(t,a))("mat-calendar-body-range-start",i._isRangeStart(e.compareValue))("mat-calendar-body-range-end",i._isRangeEnd(e.compareValue))("mat-calendar-body-in-range",i._isInRange(e.compareValue))("mat-calendar-body-comparison-bridge-start",i._isComparisonBridgeStart(e.compareValue,t,a))("mat-calendar-body-comparison-bridge-end",i._isComparisonBridgeEnd(e.compareValue,t,a))("mat-calendar-body-comparison-start",i._isComparisonStart(e.compareValue))("mat-calendar-body-comparison-end",i._isComparisonEnd(e.compareValue))("mat-calendar-body-in-comparison-range",i._isInComparisonRange(e.compareValue))("mat-calendar-body-preview-start",i._isPreviewStart(e.compareValue))("mat-calendar-body-preview-end",i._isPreviewEnd(e.compareValue))("mat-calendar-body-in-preview",i._isInPreview(e.compareValue)),m("ngClass",e.cssClasses)("tabindex",i._isActiveCell(t,a)?0:-1),D("aria-label",e.ariaLabel)("aria-disabled",!e.enabled||null)("aria-pressed",i._isSelected(e.compareValue))("aria-current",i.todayValue===e.compareValue?"date":null)("aria-describedby",i._getDescribedby(e.compareValue)),d(),M("mat-calendar-body-selected",i._isSelected(e.compareValue))("mat-calendar-body-comparison-identical",i._isComparisonIdentical(e.compareValue))("mat-calendar-body-today",i.todayValue===e.compareValue),d(),q(" ",e.displayValue," ")}}function fa(n,s){if(n&1&&(l(0,"tr",1),H(1,_a,2,6,"td",4),Me(2,ga,5,48,"td",5,Jt),c()),n&2){let e=s.$implicit,a=s.$index,t=u();d(),se(a===0&&t._firstRowOffset?1:-1),d(),Se(e)}}function ba(n,s){if(n&1&&(l(0,"th",2)(1,"span",6),b(2),c(),l(3,"span",3),b(4),c()()),n&2){let e=s.$implicit;d(2),F(e.long),d(2),F(e.narrow)}}var Da=["*"];function ya(n,s){}function va(n,s){if(n&1){let e=oe();l(0,"mat-month-view",4),Fe("activeDateChange",function(t){y(e);let i=u();return xe(i.activeDate,t)||(i.activeDate=t),v(t)}),g("_userSelection",function(t){y(e);let i=u();return v(i._dateSelected(t))})("dragStarted",function(t){y(e);let i=u();return v(i._dragStarted(t))})("dragEnded",function(t){y(e);let i=u();return v(i._dragEnded(t))}),c()}if(n&2){let e=u();Ie("activeDate",e.activeDate),m("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("startDateAccessibleName",e.startDateAccessibleName)("endDateAccessibleName",e.endDateAccessibleName)("activeDrag",e._activeDrag)}}function Ca(n,s){if(n&1){let e=oe();l(0,"mat-year-view",5),Fe("activeDateChange",function(t){y(e);let i=u();return xe(i.activeDate,t)||(i.activeDate=t),v(t)}),g("monthSelected",function(t){y(e);let i=u();return v(i._monthSelectedInYearView(t))})("selectedChange",function(t){y(e);let i=u();return v(i._goToDateInView(t,"month"))}),c()}if(n&2){let e=u();Ie("activeDate",e.activeDate),m("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function wa(n,s){if(n&1){let e=oe();l(0,"mat-multi-year-view",6),Fe("activeDateChange",function(t){y(e);let i=u();return xe(i.activeDate,t)||(i.activeDate=t),v(t)}),g("yearSelected",function(t){y(e);let i=u();return v(i._yearSelectedInMultiYearView(t))})("selectedChange",function(t){y(e);let i=u();return v(i._goToDateInView(t,"year"))}),c()}if(n&2){let e=u();Ie("activeDate",e.activeDate),m("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function Aa(n,s){}var ka=["button"],Ma=[[["","matDatepickerToggleIcon",""]]],Sa=["[matDatepickerToggleIcon]"];function Va(n,s){n&1&&(ne(),l(0,"svg",2),S(1,"path",3),c())}var Ea=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Ia=["input[matStartDate]","input[matEndDate]"];var ae=(()=>{class n{changes=new k;calendarLabel="Calendar";openCalendarLabel="Open calendar";closeCalendarLabel="Close calendar";prevMonthLabel="Previous month";nextMonthLabel="Next month";prevYearLabel="Previous year";nextYearLabel="Next year";prevMultiYearLabel="Previous 24 years";nextMultiYearLabel="Next 24 years";switchToMonthViewLabel="Choose date";switchToMultiYearViewLabel="Choose month and year";startDateLabel="Start date";endDateLabel="End date";comparisonDateLabel="Comparison range";formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}static \u0275fac=function(a){return new(a||n)};static \u0275prov=j({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),xa=0,me=class{value;displayValue;ariaLabel;enabled;cssClasses;compareValue;rawValue;id=xa++;constructor(s,e,a,t,i={},r=s,h){this.value=s,this.displayValue=e,this.ariaLabel=a,this.enabled=t,this.cssClasses=i,this.compareValue=r,this.rawValue=h}},Fa={passive:!1,capture:!0},Pe={passive:!0,capture:!0},qt={passive:!0},J=(()=>{class n{_elementRef=o(L);_ngZone=o(je);_platform=o(It);_intl=o(ae);_eventCleanups;_skipNextFocus;_focusActiveCellAfterViewChecked=!1;label;rows;todayValue;startValue;endValue;labelMinRequiredCells;numCols=7;activeCell=0;ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}isRange=!1;cellAspectRatio=1;comparisonStart;comparisonEnd;previewStart=null;previewEnd=null;startDateAccessibleName;endDateAccessibleName;selectedValueChange=new p;previewChange=new p;activeDateChange=new p;dragStarted=new p;dragEnded=new p;_firstRowOffset;_cellPadding;_cellWidth;_startDateLabelId;_endDateLabelId;_comparisonStartDateLabelId;_comparisonEndDateLabelId;_didDragSinceMouseDown=!1;_injector=o(Ae);comparisonDateAccessibleName=this._intl.comparisonDateLabel;_trackRow=e=>e;constructor(){let e=o(Qe),a=o(he);this._startDateLabelId=a.getId("mat-calendar-body-start-"),this._endDateLabelId=a.getId("mat-calendar-body-end-"),this._comparisonStartDateLabelId=a.getId("mat-calendar-body-comparison-start-"),this._comparisonEndDateLabelId=a.getId("mat-calendar-body-comparison-end-"),o(ce).load(Bt),this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,i=[P(e,t,"touchmove",this._touchmoveHandler,Fa),P(e,t,"mouseenter",this._enterHandler,Pe),P(e,t,"focus",this._enterHandler,Pe),P(e,t,"mouseleave",this._leaveHandler,Pe),P(e,t,"blur",this._leaveHandler,Pe),P(e,t,"mousedown",this._mousedownHandler,qt),P(e,t,"touchstart",this._mousedownHandler,qt)];this._platform.isBrowser&&i.push(e.listen("window","mouseup",this._mouseupHandler),e.listen("window","touchend",this._touchendHandler)),this._eventCleanups=i})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:i}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?i-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/i}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/i}%`)}ngOnDestroy(){this._eventCleanups.forEach(e=>e())}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){qe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})},{injector:this._injector})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return rt(e,this.startValue,this.endValue)}_isRangeEnd(e){return st(e,this.startValue,this.endValue)}_isInRange(e){return ot(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return rt(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let i=this.rows[a][t-1];if(!i){let r=this.rows[a-1];i=r&&r[r.length-1]}return i&&!this._isRangeEnd(i.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let i=this.rows[a][t+1];if(!i){let r=this.rows[a+1];i=r&&r[0]}return i&&!this._isRangeStart(i.compareValue)}_isComparisonEnd(e){return st(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return ot(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return rt(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return st(e,this.previewStart,this.previewEnd)}_isInPreview(e){return ot(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){if(!this.isRange)return null;if(this.startValue===e&&this.endValue===e)return`${this._startDateLabelId} ${this._endDateLabelId}`;if(this.startValue===e)return this._startDateLabelId;if(this.endValue===e)return this._endDateLabelId;if(this.comparisonStart!==null&&this.comparisonEnd!==null){if(e===this.comparisonStart&&e===this.comparisonEnd)return`${this._comparisonStartDateLabelId} ${this._comparisonEndDateLabelId}`;if(e===this.comparisonStart)return this._comparisonStartDateLabelId;if(e===this.comparisonEnd)return this._comparisonEndDateLabelId}return null}_enterHandler=e=>{if(this._skipNextFocus&&e.type==="focus"){this._skipNextFocus=!1;return}if(e.target&&this.isRange){let a=this._getCellFromElement(e.target);a&&this._ngZone.run(()=>this.previewChange.emit({value:a.enabled?a:null,event:e}))}};_touchmoveHandler=e=>{if(!this.isRange)return;let a=Qt(e),t=a?this._getCellFromElement(a):null;a!==e.target&&(this._didDragSinceMouseDown=!0),nt(e.target)&&e.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:t?.enabled?t:null,event:e}))};_leaveHandler=e=>{this.previewEnd!==null&&this.isRange&&(e.type!=="blur"&&(this._didDragSinceMouseDown=!0),e.target&&this._getCellFromElement(e.target)&&!(e.relatedTarget&&this._getCellFromElement(e.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:e})))};_mousedownHandler=e=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let a=e.target&&this._getCellFromElement(e.target);!a||!this._isInRange(a.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:a.rawValue,event:e})})};_mouseupHandler=e=>{if(!this.isRange)return;let a=nt(e.target);if(!a){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:e})});return}a.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let t=this._getCellFromElement(a);this.dragEnded.emit({value:t?.rawValue??null,event:e})})};_touchendHandler=e=>{let a=Qt(e);a&&this._mouseupHandler({target:a})};_getCellFromElement(e){let a=nt(e);if(a){let t=a.getAttribute("data-mat-row"),i=a.getAttribute("data-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=A({type:n,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],features:[T],attrs:pa,decls:11,vars:11,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(a,t){a&1&&(H(0,ma,3,6,"tr",0),Me(1,fa,4,1,"tr",1,ua,!0),l(3,"span",2),b(4),c(),l(5,"span",2),b(6),c(),l(7,"span",2),b(8),c(),l(9,"span",2),b(10),c()),a&2&&(se(t._firstRowOffset<t.labelMinRequiredCells?0:-1),d(),Se(t.rows),d(2),m("id",t._startDateLabelId),d(),q(" ",t.startDateAccessibleName,`
|
|
1
|
+
import{a as Ht}from"./chunk-6ALHX2I4.js";import{b as tt,c as at,d as Wt}from"./chunk-MNFHFW3E.js";import{a as jt}from"./chunk-SDUUFQUI.js";import{c as zt,d as et}from"./chunk-Q2OEJFVT.js";import{a as Kt}from"./chunk-KXZCGKQW.js";import{a as Bt}from"./chunk-KHWTOD6H.js";import{d as Rt,e as Ze,h as Je,i as Tt,j as Ot,m as Yt,n as Ye,q as Pt}from"./chunk-TMFFA26Y.js";import{E as Q,K as Nt,M as Lt,d as Ue,f as P,g as It,l as Xe,m as ce,n as Oe,s as xt,u as Ft,v as he,w as z}from"./chunk-WAW37FIG.js";import{a as Re,d as Te,e as le,f as Mt,g as St,k as Vt,p as Et}from"./chunk-DPLEMBB4.js";import{a as At,d as kt}from"./chunk-GPEVUTDI.js";import{$ as ye,Aa as ne,Ac as E,Ba as Ke,Ca as re,Ea as Ae,Eb as A,Ec as b,F as ie,Fa as ft,Fb as vt,Fc as F,G as mt,Gb as O,Gc as q,Hc as $e,Ib as B,Ic as Ie,Jc as xe,Ka as p,Kb as H,Kc as Fe,La as je,O as _t,Oa as L,Oc as Y,Qa as We,Vb as D,Wa as bt,Wb as m,Xb as ke,Yb as M,_b as Ge,a as w,bb as qe,bc as se,ec as Me,ed as wt,f as k,fc as Se,gc as l,hc as c,hd as I,ia as ze,ic as S,ja as j,ka as gt,ma as W,mc as oe,md as R,nc as Ve,oa as ve,pa as o,q as De,qa as Ce,qb as d,ra as we,rc as g,sc as u,tc as Ee,uc as de,vb as Qe,xa as T,xb as Dt,xc as Ct,ya as y,yb as yt,yc as x,za as v,zc as V}from"./chunk-T5ONJF63.js";var ti=new W("MAT_DATE_LOCALE",{providedIn:"root",factory:ca});function ca(){return o(wt)}var G="Method not implemented",f=class{locale;_localeChanges=new k;localeChanges=this._localeChanges;setTime(s,e,a,t){throw new Error(G)}getHours(s){throw new Error(G)}getMinutes(s){throw new Error(G)}getSeconds(s){throw new Error(G)}parseTime(s,e){throw new Error(G)}addSeconds(s,e){throw new Error(G)}getValidDateOrNull(s){return this.isDateInstance(s)&&this.isValid(s)?s:null}deserialize(s){return s==null||this.isDateInstance(s)&&this.isValid(s)?s:this.invalid()}setLocale(s){this.locale=s,this._localeChanges.next()}compareDate(s,e){return this.getYear(s)-this.getYear(e)||this.getMonth(s)-this.getMonth(e)||this.getDate(s)-this.getDate(e)}compareTime(s,e){return this.getHours(s)-this.getHours(e)||this.getMinutes(s)-this.getMinutes(e)||this.getSeconds(s)-this.getSeconds(e)}sameDate(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareDate(s,e):a==t}return s==e}sameTime(s,e){if(s&&e){let a=this.isValid(s),t=this.isValid(e);return a&&t?!this.compareTime(s,e):a==t}return s==e}clampDate(s,e,a){return e&&this.compareDate(s,e)<0?e:a&&this.compareDate(s,a)>0?a:s}},$=new W("mat-date-formats");var pa=["mat-calendar-body",""];function ua(n,s){return this._trackRow(s)}var Jt=(n,s)=>s.id;function ma(n,s){if(n&1&&(l(0,"tr",0)(1,"td",3),b(2),c()()),n&2){let e=u();d(),ke("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),D("colspan",e.numCols),d(),q(" ",e.label," ")}}function _a(n,s){if(n&1&&(l(0,"td",3),b(1),c()),n&2){let e=u(2);ke("padding-top",e._cellPadding)("padding-bottom",e._cellPadding),D("colspan",e._firstRowOffset),d(),q(" ",e._firstRowOffset>=e.labelMinRequiredCells?e.label:""," ")}}function ga(n,s){if(n&1){let e=oe();l(0,"td",6)(1,"button",7),g("click",function(t){let i=y(e).$implicit,r=u(2);return v(r._cellClicked(i,t))})("focus",function(t){let i=y(e).$implicit,r=u(2);return v(r._emitActiveDateChange(i,t))}),l(2,"span",8),b(3),c(),S(4,"span",9),c()()}if(n&2){let e=s.$implicit,a=s.$index,t=u().$index,i=u();ke("width",i._cellWidth)("padding-top",i._cellPadding)("padding-bottom",i._cellPadding),D("data-mat-row",t)("data-mat-col",a),d(),M("mat-calendar-body-disabled",!e.enabled)("mat-calendar-body-active",i._isActiveCell(t,a))("mat-calendar-body-range-start",i._isRangeStart(e.compareValue))("mat-calendar-body-range-end",i._isRangeEnd(e.compareValue))("mat-calendar-body-in-range",i._isInRange(e.compareValue))("mat-calendar-body-comparison-bridge-start",i._isComparisonBridgeStart(e.compareValue,t,a))("mat-calendar-body-comparison-bridge-end",i._isComparisonBridgeEnd(e.compareValue,t,a))("mat-calendar-body-comparison-start",i._isComparisonStart(e.compareValue))("mat-calendar-body-comparison-end",i._isComparisonEnd(e.compareValue))("mat-calendar-body-in-comparison-range",i._isInComparisonRange(e.compareValue))("mat-calendar-body-preview-start",i._isPreviewStart(e.compareValue))("mat-calendar-body-preview-end",i._isPreviewEnd(e.compareValue))("mat-calendar-body-in-preview",i._isInPreview(e.compareValue)),m("ngClass",e.cssClasses)("tabindex",i._isActiveCell(t,a)?0:-1),D("aria-label",e.ariaLabel)("aria-disabled",!e.enabled||null)("aria-pressed",i._isSelected(e.compareValue))("aria-current",i.todayValue===e.compareValue?"date":null)("aria-describedby",i._getDescribedby(e.compareValue)),d(),M("mat-calendar-body-selected",i._isSelected(e.compareValue))("mat-calendar-body-comparison-identical",i._isComparisonIdentical(e.compareValue))("mat-calendar-body-today",i.todayValue===e.compareValue),d(),q(" ",e.displayValue," ")}}function fa(n,s){if(n&1&&(l(0,"tr",1),H(1,_a,2,6,"td",4),Me(2,ga,5,48,"td",5,Jt),c()),n&2){let e=s.$implicit,a=s.$index,t=u();d(),se(a===0&&t._firstRowOffset?1:-1),d(),Se(e)}}function ba(n,s){if(n&1&&(l(0,"th",2)(1,"span",6),b(2),c(),l(3,"span",3),b(4),c()()),n&2){let e=s.$implicit;d(2),F(e.long),d(2),F(e.narrow)}}var Da=["*"];function ya(n,s){}function va(n,s){if(n&1){let e=oe();l(0,"mat-month-view",4),Fe("activeDateChange",function(t){y(e);let i=u();return xe(i.activeDate,t)||(i.activeDate=t),v(t)}),g("_userSelection",function(t){y(e);let i=u();return v(i._dateSelected(t))})("dragStarted",function(t){y(e);let i=u();return v(i._dragStarted(t))})("dragEnded",function(t){y(e);let i=u();return v(i._dragEnded(t))}),c()}if(n&2){let e=u();Ie("activeDate",e.activeDate),m("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("startDateAccessibleName",e.startDateAccessibleName)("endDateAccessibleName",e.endDateAccessibleName)("activeDrag",e._activeDrag)}}function Ca(n,s){if(n&1){let e=oe();l(0,"mat-year-view",5),Fe("activeDateChange",function(t){y(e);let i=u();return xe(i.activeDate,t)||(i.activeDate=t),v(t)}),g("monthSelected",function(t){y(e);let i=u();return v(i._monthSelectedInYearView(t))})("selectedChange",function(t){y(e);let i=u();return v(i._goToDateInView(t,"month"))}),c()}if(n&2){let e=u();Ie("activeDate",e.activeDate),m("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function wa(n,s){if(n&1){let e=oe();l(0,"mat-multi-year-view",6),Fe("activeDateChange",function(t){y(e);let i=u();return xe(i.activeDate,t)||(i.activeDate=t),v(t)}),g("yearSelected",function(t){y(e);let i=u();return v(i._yearSelectedInMultiYearView(t))})("selectedChange",function(t){y(e);let i=u();return v(i._goToDateInView(t,"year"))}),c()}if(n&2){let e=u();Ie("activeDate",e.activeDate),m("selected",e.selected)("dateFilter",e.dateFilter)("maxDate",e.maxDate)("minDate",e.minDate)("dateClass",e.dateClass)}}function Aa(n,s){}var ka=["button"],Ma=[[["","matDatepickerToggleIcon",""]]],Sa=["[matDatepickerToggleIcon]"];function Va(n,s){n&1&&(ne(),l(0,"svg",2),S(1,"path",3),c())}var Ea=[[["input","matStartDate",""]],[["input","matEndDate",""]]],Ia=["input[matStartDate]","input[matEndDate]"];var ae=(()=>{class n{changes=new k;calendarLabel="Calendar";openCalendarLabel="Open calendar";closeCalendarLabel="Close calendar";prevMonthLabel="Previous month";nextMonthLabel="Next month";prevYearLabel="Previous year";nextYearLabel="Next year";prevMultiYearLabel="Previous 24 years";nextMultiYearLabel="Next 24 years";switchToMonthViewLabel="Choose date";switchToMultiYearViewLabel="Choose month and year";startDateLabel="Start date";endDateLabel="End date";comparisonDateLabel="Comparison range";formatYearRange(e,a){return`${e} \u2013 ${a}`}formatYearRangeLabel(e,a){return`${e} to ${a}`}static \u0275fac=function(a){return new(a||n)};static \u0275prov=j({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),xa=0,me=class{value;displayValue;ariaLabel;enabled;cssClasses;compareValue;rawValue;id=xa++;constructor(s,e,a,t,i={},r=s,h){this.value=s,this.displayValue=e,this.ariaLabel=a,this.enabled=t,this.cssClasses=i,this.compareValue=r,this.rawValue=h}},Fa={passive:!1,capture:!0},Pe={passive:!0,capture:!0},qt={passive:!0},J=(()=>{class n{_elementRef=o(L);_ngZone=o(je);_platform=o(It);_intl=o(ae);_eventCleanups;_skipNextFocus;_focusActiveCellAfterViewChecked=!1;label;rows;todayValue;startValue;endValue;labelMinRequiredCells;numCols=7;activeCell=0;ngAfterViewChecked(){this._focusActiveCellAfterViewChecked&&(this._focusActiveCell(),this._focusActiveCellAfterViewChecked=!1)}isRange=!1;cellAspectRatio=1;comparisonStart;comparisonEnd;previewStart=null;previewEnd=null;startDateAccessibleName;endDateAccessibleName;selectedValueChange=new p;previewChange=new p;activeDateChange=new p;dragStarted=new p;dragEnded=new p;_firstRowOffset;_cellPadding;_cellWidth;_startDateLabelId;_endDateLabelId;_comparisonStartDateLabelId;_comparisonEndDateLabelId;_didDragSinceMouseDown=!1;_injector=o(Ae);comparisonDateAccessibleName=this._intl.comparisonDateLabel;_trackRow=e=>e;constructor(){let e=o(Qe),a=o(he);this._startDateLabelId=a.getId("mat-calendar-body-start-"),this._endDateLabelId=a.getId("mat-calendar-body-end-"),this._comparisonStartDateLabelId=a.getId("mat-calendar-body-comparison-start-"),this._comparisonEndDateLabelId=a.getId("mat-calendar-body-comparison-end-"),o(ce).load(Bt),this._ngZone.runOutsideAngular(()=>{let t=this._elementRef.nativeElement,i=[P(e,t,"touchmove",this._touchmoveHandler,Fa),P(e,t,"mouseenter",this._enterHandler,Pe),P(e,t,"focus",this._enterHandler,Pe),P(e,t,"mouseleave",this._leaveHandler,Pe),P(e,t,"blur",this._leaveHandler,Pe),P(e,t,"mousedown",this._mousedownHandler,qt),P(e,t,"touchstart",this._mousedownHandler,qt)];this._platform.isBrowser&&i.push(e.listen("window","mouseup",this._mouseupHandler),e.listen("window","touchend",this._touchendHandler)),this._eventCleanups=i})}_cellClicked(e,a){this._didDragSinceMouseDown||e.enabled&&this.selectedValueChange.emit({value:e.value,event:a})}_emitActiveDateChange(e,a){e.enabled&&this.activeDateChange.emit({value:e.value,event:a})}_isSelected(e){return this.startValue===e||this.endValue===e}ngOnChanges(e){let a=e.numCols,{rows:t,numCols:i}=this;(e.rows||a)&&(this._firstRowOffset=t&&t.length&&t[0].length?i-t[0].length:0),(e.cellAspectRatio||a||!this._cellPadding)&&(this._cellPadding=`${50*this.cellAspectRatio/i}%`),(a||!this._cellWidth)&&(this._cellWidth=`${100/i}%`)}ngOnDestroy(){this._eventCleanups.forEach(e=>e())}_isActiveCell(e,a){let t=e*this.numCols+a;return e&&(t-=this._firstRowOffset),t==this.activeCell}_focusActiveCell(e=!0){qe(()=>{setTimeout(()=>{let a=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");a&&(e||(this._skipNextFocus=!0),a.focus())})},{injector:this._injector})}_scheduleFocusActiveCellAfterViewChecked(){this._focusActiveCellAfterViewChecked=!0}_isRangeStart(e){return rt(e,this.startValue,this.endValue)}_isRangeEnd(e){return st(e,this.startValue,this.endValue)}_isInRange(e){return ot(e,this.startValue,this.endValue,this.isRange)}_isComparisonStart(e){return rt(e,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(e,a,t){if(!this._isComparisonStart(e)||this._isRangeStart(e)||!this._isInRange(e))return!1;let i=this.rows[a][t-1];if(!i){let r=this.rows[a-1];i=r&&r[r.length-1]}return i&&!this._isRangeEnd(i.compareValue)}_isComparisonBridgeEnd(e,a,t){if(!this._isComparisonEnd(e)||this._isRangeEnd(e)||!this._isInRange(e))return!1;let i=this.rows[a][t+1];if(!i){let r=this.rows[a+1];i=r&&r[0]}return i&&!this._isRangeStart(i.compareValue)}_isComparisonEnd(e){return st(e,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(e){return ot(e,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(e){return this.comparisonStart===this.comparisonEnd&&e===this.comparisonStart}_isPreviewStart(e){return rt(e,this.previewStart,this.previewEnd)}_isPreviewEnd(e){return st(e,this.previewStart,this.previewEnd)}_isInPreview(e){return ot(e,this.previewStart,this.previewEnd,this.isRange)}_getDescribedby(e){if(!this.isRange)return null;if(this.startValue===e&&this.endValue===e)return`${this._startDateLabelId} ${this._endDateLabelId}`;if(this.startValue===e)return this._startDateLabelId;if(this.endValue===e)return this._endDateLabelId;if(this.comparisonStart!==null&&this.comparisonEnd!==null){if(e===this.comparisonStart&&e===this.comparisonEnd)return`${this._comparisonStartDateLabelId} ${this._comparisonEndDateLabelId}`;if(e===this.comparisonStart)return this._comparisonStartDateLabelId;if(e===this.comparisonEnd)return this._comparisonEndDateLabelId}return null}_enterHandler=e=>{if(this._skipNextFocus&&e.type==="focus"){this._skipNextFocus=!1;return}if(e.target&&this.isRange){let a=this._getCellFromElement(e.target);a&&this._ngZone.run(()=>this.previewChange.emit({value:a.enabled?a:null,event:e}))}};_touchmoveHandler=e=>{if(!this.isRange)return;let a=Qt(e),t=a?this._getCellFromElement(a):null;a!==e.target&&(this._didDragSinceMouseDown=!0),nt(e.target)&&e.preventDefault(),this._ngZone.run(()=>this.previewChange.emit({value:t?.enabled?t:null,event:e}))};_leaveHandler=e=>{this.previewEnd!==null&&this.isRange&&(e.type!=="blur"&&(this._didDragSinceMouseDown=!0),e.target&&this._getCellFromElement(e.target)&&!(e.relatedTarget&&this._getCellFromElement(e.relatedTarget))&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:e})))};_mousedownHandler=e=>{if(!this.isRange)return;this._didDragSinceMouseDown=!1;let a=e.target&&this._getCellFromElement(e.target);!a||!this._isInRange(a.compareValue)||this._ngZone.run(()=>{this.dragStarted.emit({value:a.rawValue,event:e})})};_mouseupHandler=e=>{if(!this.isRange)return;let a=nt(e.target);if(!a){this._ngZone.run(()=>{this.dragEnded.emit({value:null,event:e})});return}a.closest(".mat-calendar-body")===this._elementRef.nativeElement&&this._ngZone.run(()=>{let t=this._getCellFromElement(a);this.dragEnded.emit({value:t?.rawValue??null,event:e})})};_touchendHandler=e=>{let a=Qt(e);a&&this._mouseupHandler({target:a})};_getCellFromElement(e){let a=nt(e);if(a){let t=a.getAttribute("data-mat-row"),i=a.getAttribute("data-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}static \u0275fac=function(a){return new(a||n)};static \u0275cmp=A({type:n,selectors:[["","mat-calendar-body",""]],hostAttrs:[1,"mat-calendar-body"],inputs:{label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",previewStart:"previewStart",previewEnd:"previewEnd",startDateAccessibleName:"startDateAccessibleName",endDateAccessibleName:"endDateAccessibleName"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange",activeDateChange:"activeDateChange",dragStarted:"dragStarted",dragEnded:"dragEnded"},exportAs:["matCalendarBody"],features:[T],attrs:pa,decls:11,vars:11,consts:[["aria-hidden","true"],["role","row"],[1,"mat-calendar-body-hidden-label",3,"id"],[1,"mat-calendar-body-label"],[1,"mat-calendar-body-label",3,"paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container",3,"width","paddingTop","paddingBottom"],["role","gridcell",1,"mat-calendar-body-cell-container"],["type","button",1,"mat-calendar-body-cell",3,"click","focus","ngClass","tabindex"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],["aria-hidden","true",1,"mat-calendar-body-cell-preview"]],template:function(a,t){a&1&&(H(0,ma,3,6,"tr",0),Me(1,fa,4,1,"tr",1,ua,!0),l(3,"span",2),b(4),c(),l(5,"span",2),b(6),c(),l(7,"span",2),b(8),c(),l(9,"span",2),b(10),c()),a&2&&(se(t._firstRowOffset<t.labelMinRequiredCells?0:-1),d(),Se(t.rows),d(2),m("id",t._startDateLabelId),d(),q(" ",t.startDateAccessibleName,`
|
|
2
2
|
`),d(),m("id",t._endDateLabelId),d(),q(" ",t.endDateAccessibleName,`
|
|
3
3
|
`),d(),m("id",t._comparisonStartDateLabelId),d(),$e(" ",t.comparisonDateAccessibleName," ",t.startDateAccessibleName,`
|
|
4
4
|
`),d(),m("id",t._comparisonEndDateLabelId),d(),$e(" ",t.comparisonDateAccessibleName," ",t.endDateAccessibleName,`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as K,b as Q}from"./chunk-EAU6FVQT.js";import{c as J}from"./chunk-ZUFLZMHT.js";import{b as W,d as X}from"./chunk-NB5JKHKF.js";import{f as q}from"./chunk-V27YSSV4.js";import{r as Y,s as Z}from"./chunk-3S7C3CCV.js";import{v as H}from"./chunk-PHCYCYXH.js";import{Aa as h,Ba as F,Ec as j,Fb as E,Fc as x,Gb as R,Gc as $,Hc as y,Ka as A,Lb as f,Wb as m,Xb as p,cc as c,ec as N,f as M,fc as V,gc as G,h as D,hc as n,ic as r,id as U,ja as O,jc as v,ka as w,ma as L,nc as z,nd as I,od as P,pa as u,qa as k,ra as B,rb as o,sc as d,tc as l,ya as _,za as b}from"./chunk-VFLAHRB4.js";function tt(i,g){if(i&1&&(n(0,"mat-option",17),x(1),r()),i&2){let t=g.$implicit;p("value",t),o(),y(" ",t," ")}}function et(i,g){if(i&1){let t=z();n(0,"mat-form-field",14)(1,"mat-select",16,0),d("selectionChange",function(e){_(t);let s=l(2);return b(s._changePageSize(e.value))}),V(3,tt,2,2,"mat-option",17,N),r(),n(5,"div",18),d("click",function(){_(t);let e=j(2);return b(e.open())}),r()()}if(i&2){let t=l(2);p("appearance",t._formFieldAppearance)("color",t.color),o(),p("value",t.pageSize)("disabled",t.disabled)("aria-labelledby",t._pageSizeLabelId)("panelClass",t.selectConfig.panelClass||"")("disableOptionCentering",t.selectConfig.disableOptionCentering),o(2),G(t._displayedPageSizeOptions)}}function it(i,g){if(i&1&&(n(0,"div",15),x(1),r()),i&2){let t=l(2);o(),$(t.pageSize)}}function at(i,g){if(i&1&&(n(0,"div",3)(1,"div",13),x(2),r(),f(3,et,6,7,"mat-form-field",14)(4,it,2,1,"div",15),r()),i&2){let t=l();o(),m("id",t._pageSizeLabelId),o(),y(" ",t._intl.itemsPerPageLabel," "),o(),c(t._displayedPageSizeOptions.length>1?3:-1),o(),c(t._displayedPageSizeOptions.length<=1?4:-1)}}function nt(i,g){if(i&1){let t=z();n(0,"button",19),d("click",function(){_(t);let e=l();return b(e._buttonClicked(0,e._previousButtonsDisabled()))}),h(),n(1,"svg",8),v(2,"path",20),r()()}if(i&2){let t=l();p("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("disabled",t._previousButtonsDisabled())("tabindex",t._previousButtonsDisabled()?-1:null),m("aria-label",t._intl.firstPageLabel)}}function ot(i,g){if(i&1){let t=z();n(0,"button",21),d("click",function(){_(t);let e=l();return b(e._buttonClicked(e.getNumberOfPages()-1,e._nextButtonsDisabled()))}),h(),n(1,"svg",8),v(2,"path",22),r()()}if(i&2){let t=l();p("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("disabled",t._nextButtonsDisabled())("tabindex",t._nextButtonsDisabled()?-1:null),m("aria-label",t._intl.lastPageLabel)}}var T=(()=>{class i{changes=new M;itemsPerPageLabel="Items per page:";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(t,a,e)=>{if(e==0||a==0)return`0 of ${e}`;e=Math.max(e,0);let s=t*a,S=s<e?Math.min(s+a,e):s+a;return`${s+1} \u2013 ${S} of ${e}`};static \u0275fac=function(a){return new(a||i)};static \u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function rt(i){return i||new T}var st={provide:T,deps:[[new k,new B,T]],useFactory:rt},lt=50;var pt=new L("MAT_PAGINATOR_DEFAULT_OPTIONS"),dt=(()=>{class i{_intl=u(T);_changeDetectorRef=u(U);_formFieldAppearance;_pageSizeLabelId=u(H).getId("mat-paginator-page-size-label-");_intlChanges;_isInitialized=!1;_initializedStream=new D(1);color;get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(t||0,0),this._changeDetectorRef.markForCheck()}_pageIndex=0;get length(){return this._length}set length(t){this._length=t||0,this._changeDetectorRef.markForCheck()}_length=0;get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(t||0,0),this._updateDisplayedPageSizeOptions()}_pageSize;get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(a=>P(a,0)),this._updateDisplayedPageSizeOptions()}_pageSizeOptions=[];hidePageSize=!1;showFirstLastButtons=!1;selectConfig={};disabled=!1;page=new A;_displayedPageSizeOptions;initialized=this._initializedStream;constructor(){let t=this._intl,a=u(pt,{optional:!0});if(this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),a){let{pageSize:e,pageSizeOptions:s,hidePageSize:S,showFirstLastButtons:C}=a;e!=null&&(this._pageSize=e),s!=null&&(this._pageSizeOptions=s),S!=null&&(this.hidePageSize=S),C!=null&&(this.showFirstLastButtons=C)}this._formFieldAppearance=a?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){this.hasNextPage()&&this._navigate(this.pageIndex+1)}previousPage(){this.hasPreviousPage()&&this._navigate(this.pageIndex-1)}firstPage(){this.hasPreviousPage()&&this._navigate(0)}lastPage(){this.hasNextPage()&&this._navigate(this.getNumberOfPages()-1)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let t=this.getNumberOfPages()-1;return this.pageIndex<t&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){let a=this.pageIndex*this.pageSize,e=this.pageIndex;this.pageIndex=Math.floor(a/t)||0,this.pageSize=t,this._emitPageEvent(e)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._isInitialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:lt),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,a)=>t-a),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}_navigate(t){let a=this.pageIndex;t!==a&&(this.pageIndex=t,this._emitPageEvent(a))}_buttonClicked(t,a){a||this._navigate(t)}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=E({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",P],length:[2,"length","length",P],pageSize:[2,"pageSize","pageSize",P],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",I],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",I],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",I]},outputs:{page:"page"},exportAs:["matPaginator"],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(a,e){a&1&&(n(0,"div",1)(1,"div",2),f(2,at,5,4,"div",3),n(3,"div",4)(4,"div",5),x(5),r(),f(6,nt,3,5,"button",6),n(7,"button",7),d("click",function(){return e._buttonClicked(e.pageIndex-1,e._previousButtonsDisabled())}),h(),n(8,"svg",8),v(9,"path",9),r()(),F(),n(10,"button",10),d("click",function(){return e._buttonClicked(e.pageIndex+1,e._nextButtonsDisabled())}),h(),n(11,"svg",8),v(12,"path",11),r()(),f(13,ot,3,5,"button",12),r()()()),a&2&&(o(2),c(e.hidePageSize?-1:2),o(3),y(" ",e._intl.getRangeLabel(e.pageIndex,e.pageSize,e.length)," "),o(),c(e.showFirstLastButtons?6:-1),o(),p("matTooltip",e._intl.previousPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("disabled",e._previousButtonsDisabled())("tabindex",e._previousButtonsDisabled()?-1:null),m("aria-label",e._intl.previousPageLabel),o(3),p("matTooltip",e._intl.nextPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("disabled",e._nextButtonsDisabled())("tabindex",e._nextButtonsDisabled()?-1:null),m("aria-label",e._intl.nextPageLabel),o(3),c(e.showFirstLastButtons?13:-1))},dependencies:[q,K,J,W,Y],styles:[`.mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height:var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding, 8px)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors: active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display, block);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}
|
|
1
|
+
import{a as K,b as Q}from"./chunk-LEHTNMIE.js";import{c as J}from"./chunk-Q72ZXPDP.js";import{b as W,d as X}from"./chunk-MNFHFW3E.js";import{f as q}from"./chunk-Q2OEJFVT.js";import{r as Y,s as Z}from"./chunk-TMFFA26Y.js";import{v as H}from"./chunk-WAW37FIG.js";import{Aa as h,Ba as F,Dc as j,Eb as E,Ec as x,Fb as R,Fc as $,Gc as y,Ka as A,Kb as f,Vb as m,Wb as p,bc as c,dc as N,ec as V,f as M,fc as G,gc as n,h as D,hc as r,hd as U,ic as v,ja as O,ka as w,ma as L,mc as z,md as I,nd as P,pa as u,qa as k,qb as o,ra as B,rc as d,sc as l,ya as _,za as b}from"./chunk-T5ONJF63.js";function tt(i,g){if(i&1&&(n(0,"mat-option",17),x(1),r()),i&2){let t=g.$implicit;p("value",t),o(),y(" ",t," ")}}function et(i,g){if(i&1){let t=z();n(0,"mat-form-field",14)(1,"mat-select",16,0),d("selectionChange",function(e){_(t);let s=l(2);return b(s._changePageSize(e.value))}),V(3,tt,2,2,"mat-option",17,N),r(),n(5,"div",18),d("click",function(){_(t);let e=j(2);return b(e.open())}),r()()}if(i&2){let t=l(2);p("appearance",t._formFieldAppearance)("color",t.color),o(),p("value",t.pageSize)("disabled",t.disabled)("aria-labelledby",t._pageSizeLabelId)("panelClass",t.selectConfig.panelClass||"")("disableOptionCentering",t.selectConfig.disableOptionCentering),o(2),G(t._displayedPageSizeOptions)}}function it(i,g){if(i&1&&(n(0,"div",15),x(1),r()),i&2){let t=l(2);o(),$(t.pageSize)}}function at(i,g){if(i&1&&(n(0,"div",3)(1,"div",13),x(2),r(),f(3,et,6,7,"mat-form-field",14)(4,it,2,1,"div",15),r()),i&2){let t=l();o(),m("id",t._pageSizeLabelId),o(),y(" ",t._intl.itemsPerPageLabel," "),o(),c(t._displayedPageSizeOptions.length>1?3:-1),o(),c(t._displayedPageSizeOptions.length<=1?4:-1)}}function nt(i,g){if(i&1){let t=z();n(0,"button",19),d("click",function(){_(t);let e=l();return b(e._buttonClicked(0,e._previousButtonsDisabled()))}),h(),n(1,"svg",8),v(2,"path",20),r()()}if(i&2){let t=l();p("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("disabled",t._previousButtonsDisabled())("tabindex",t._previousButtonsDisabled()?-1:null),m("aria-label",t._intl.firstPageLabel)}}function ot(i,g){if(i&1){let t=z();n(0,"button",21),d("click",function(){_(t);let e=l();return b(e._buttonClicked(e.getNumberOfPages()-1,e._nextButtonsDisabled()))}),h(),n(1,"svg",8),v(2,"path",22),r()()}if(i&2){let t=l();p("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("disabled",t._nextButtonsDisabled())("tabindex",t._nextButtonsDisabled()?-1:null),m("aria-label",t._intl.lastPageLabel)}}var T=(()=>{class i{changes=new M;itemsPerPageLabel="Items per page:";nextPageLabel="Next page";previousPageLabel="Previous page";firstPageLabel="First page";lastPageLabel="Last page";getRangeLabel=(t,a,e)=>{if(e==0||a==0)return`0 of ${e}`;e=Math.max(e,0);let s=t*a,S=s<e?Math.min(s+a,e):s+a;return`${s+1} \u2013 ${S} of ${e}`};static \u0275fac=function(a){return new(a||i)};static \u0275prov=O({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function rt(i){return i||new T}var st={provide:T,deps:[[new k,new B,T]],useFactory:rt},lt=50;var pt=new L("MAT_PAGINATOR_DEFAULT_OPTIONS"),dt=(()=>{class i{_intl=u(T);_changeDetectorRef=u(U);_formFieldAppearance;_pageSizeLabelId=u(H).getId("mat-paginator-page-size-label-");_intlChanges;_isInitialized=!1;_initializedStream=new D(1);color;get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(t||0,0),this._changeDetectorRef.markForCheck()}_pageIndex=0;get length(){return this._length}set length(t){this._length=t||0,this._changeDetectorRef.markForCheck()}_length=0;get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(t||0,0),this._updateDisplayedPageSizeOptions()}_pageSize;get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(a=>P(a,0)),this._updateDisplayedPageSizeOptions()}_pageSizeOptions=[];hidePageSize=!1;showFirstLastButtons=!1;selectConfig={};disabled=!1;page=new A;_displayedPageSizeOptions;initialized=this._initializedStream;constructor(){let t=this._intl,a=u(pt,{optional:!0});if(this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),a){let{pageSize:e,pageSizeOptions:s,hidePageSize:S,showFirstLastButtons:C}=a;e!=null&&(this._pageSize=e),s!=null&&(this._pageSizeOptions=s),S!=null&&(this.hidePageSize=S),C!=null&&(this.showFirstLastButtons=C)}this._formFieldAppearance=a?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){this.hasNextPage()&&this._navigate(this.pageIndex+1)}previousPage(){this.hasPreviousPage()&&this._navigate(this.pageIndex-1)}firstPage(){this.hasPreviousPage()&&this._navigate(0)}lastPage(){this.hasNextPage()&&this._navigate(this.getNumberOfPages()-1)}hasPreviousPage(){return this.pageIndex>=1&&this.pageSize!=0}hasNextPage(){let t=this.getNumberOfPages()-1;return this.pageIndex<t&&this.pageSize!=0}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){let a=this.pageIndex*this.pageSize,e=this.pageIndex;this.pageIndex=Math.floor(a/t)||0,this.pageSize=t,this._emitPageEvent(e)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._isInitialized&&(this.pageSize||(this._pageSize=this.pageSizeOptions.length!=0?this.pageSizeOptions[0]:lt),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),this._displayedPageSizeOptions.indexOf(this.pageSize)===-1&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,a)=>t-a),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}_navigate(t){let a=this.pageIndex;t!==a&&(this.pageIndex=t,this._emitPageEvent(a))}_buttonClicked(t,a){a||this._navigate(t)}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=E({type:i,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[2,"pageIndex","pageIndex",P],length:[2,"length","length",P],pageSize:[2,"pageSize","pageSize",P],pageSizeOptions:"pageSizeOptions",hidePageSize:[2,"hidePageSize","hidePageSize",I],showFirstLastButtons:[2,"showFirstLastButtons","showFirstLastButtons",I],selectConfig:"selectConfig",disabled:[2,"disabled","disabled",I]},outputs:{page:"page"},exportAs:["matPaginator"],decls:14,vars:14,consts:[["selectRef",""],[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","disabled","tabindex"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],[1,"mat-mdc-paginator-touch-target",3,"click"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button","matTooltipPosition","above","disabledInteractive","",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","disabled","tabindex"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(a,e){a&1&&(n(0,"div",1)(1,"div",2),f(2,at,5,4,"div",3),n(3,"div",4)(4,"div",5),x(5),r(),f(6,nt,3,5,"button",6),n(7,"button",7),d("click",function(){return e._buttonClicked(e.pageIndex-1,e._previousButtonsDisabled())}),h(),n(8,"svg",8),v(9,"path",9),r()(),F(),n(10,"button",10),d("click",function(){return e._buttonClicked(e.pageIndex+1,e._nextButtonsDisabled())}),h(),n(11,"svg",8),v(12,"path",11),r()(),f(13,ot,3,5,"button",12),r()()()),a&2&&(o(2),c(e.hidePageSize?-1:2),o(3),y(" ",e._intl.getRangeLabel(e.pageIndex,e.pageSize,e.length)," "),o(),c(e.showFirstLastButtons?6:-1),o(),p("matTooltip",e._intl.previousPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("disabled",e._previousButtonsDisabled())("tabindex",e._previousButtonsDisabled()?-1:null),m("aria-label",e._intl.previousPageLabel),o(3),p("matTooltip",e._intl.nextPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("disabled",e._nextButtonsDisabled())("tabindex",e._nextButtonsDisabled()?-1:null),m("aria-label",e._intl.nextPageLabel),o(3),c(e.showFirstLastButtons?13:-1))},dependencies:[q,K,J,W,Y],styles:[`.mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height:var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding, 8px)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors: active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}.mat-mdc-paginator-touch-target{display:var(--mat-paginator-touch-target-display, block);position:absolute;top:50%;left:50%;width:84px;height:48px;background-color:rgba(0,0,0,0);transform:translate(-50%, -50%);cursor:pointer}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return i})(),Mt=(()=>{class i{static \u0275fac=function(a){return new(a||i)};static \u0275mod=R({type:i});static \u0275inj=w({providers:[st],imports:[X,Q,Z,dt]})}return i})();export{dt as a,Mt as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-G35YVLFO.js";import{e as G}from"./chunk-6IAGGRZN.js";import{h as H}from"./chunk-XDUYDX35.js";import{b as j,e as F}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import{m as J,n as U}from"./chunk-ITTRZMEX.js";import"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{c as D,h as I,m as R,y as k}from"./chunk-DPLEMBB4.js";import"./chunk-PXB4YEY3.js";import{j as T,l as W,n as B}from"./chunk-GPEVUTDI.js";import{Eb as w,Ec as n,Gc as N,Ic as u,Jc as g,Kb as b,Kc as f,Lc as E,Mc as V,Nc as P,Qa as h,Wb as M,Z as S,Zc as C,_c as v,bc as L,gc as e,hc as t,ic as y,mc as O,pa as c,qb as l,rc as x,sc as A,ya as p,za as s}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";function z(i,q){if(i&1&&(e(0,"pre"),n(1),C(2,"json"),t()),i&2){A();let d=P(25);l(),N(" ",d?v(2,1,d):"",`
|
|
2
2
|
`)}}function K(i,q){i&1&&(e(0,"p",20),n(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class i{constructor(){this.httpService=c(F),this.toastr=c(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(S(1))}static{this.\u0275fac=function(m){return new(m||i)}}static{this.\u0275cmp=w({type:i,selectors:[["app-order-api-log"]],decls:38,vars:8,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"text-center","my-12","text-muted"]],template:function(m,r){if(m&1){let a=O();e(0,"mainpanel",0)(1,"actions")(2,"button",1),x("click",function(){return p(a),s(r.fetchLog())}),y(3,"i",2),n(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),n(12,"Channel"),t(),e(13,"p",8),n(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"channel-select-options",10),f("ngModelChange",function(o){return p(a),g(r.selectedChannel,o)||(r.selectedChannel=o),s(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),n(20,"Order Number"),t(),e(21,"p",8),n(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),f("ngModelChange",function(o){return p(a),g(r.orderNumber,o)||(r.orderNumber=o),s(o)}),t()()()()(),E(25),C(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),n(32,"Response"),t()(),e(33,"div",17)(34,"div",18)(35,"div",19),b(36,z,3,3,"pre")(37,K,2,0,"p",20),t()()()()()()()()()}if(m&2){M("hideSearchBox",!0)("hideSearchDropdown",!0),l(16),u("ngModel",r.selectedChannel),l(8),u("ngModel",r.orderNumber),l();let a=V(v(26,5,r.orderLog$));l(11),L(a?36:37)}},dependencies:[B,T,W,U,J,G,k,D,I,R,Y],encapsulation:2})}}return i})();export{ce as OrderApiLogComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as W,b as B,c as L}from"./chunk-
|
|
1
|
+
import{a as W,b as B,c as L}from"./chunk-3SDQ2PXY.js";import{X as j}from"./chunk-GBD4FIF3.js";import{e as x}from"./chunk-BUFEIJAI.js";import{h as D,m as F,y as E}from"./chunk-DPLEMBB4.js";import{d as I,k as O,n as N}from"./chunk-GPEVUTDI.js";import{Dc as y,Eb as S,Ic as T,Jc as v,Ka as C,Kc as b,Pc as M,Qc as V,Wb as u,ea as g,gc as h,hc as _,ja as c,mc as k,oa as d,rc as f,v as m,wb as w,ya as s,za as l}from"./chunk-T5ONJF63.js";var G=(()=>{class i{constructor(){}convertToCSV(e,t){let o;if(typeof e=="string")o=e;else{var n=typeof e=="object"?e:JSON.parse(e);o=this.transformToCSVStringFormat(n)}this.downloadCSV(o,t)}transformToCSVStringFormat(e){if(!e||!e.length)return;let t=",",o=Object.keys(e[0]);return e.map(a=>o.map(r=>{let p=a[r]===null||a[r]===void 0?"":a[r];return p=p instanceof Date?p.toLocaleString():p.toString().replace(/"/g,'""'),p.search(/("|,|\n)/g)>=0&&(p=`"${p}"`),p}).join(t)).join(`
|
|
2
2
|
`)}downloadCSV(e,t){var o=new Blob([e],{type:"text/csv;charset=utf8;"}),n=document.createElement("a");n.setAttribute("href",window.URL.createObjectURL(o)),n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var q=(()=>{class i{constructor(e,t){this.http=e,this.exportService=t}loadInitialPage(){return this.http.post("/api/ordersLoader/GetOrder",{})}getNewOrders(e){return this.http.post("/api/orders/GetNewOrder",e).pipe(m(t=>t.Data))}getTotalNewOrders(e,t,o){let n={ListChannelID:e,From:t,To:o};return this.http.post("/api/orders/GetCountNewOrder",n).pipe(m(a=>a.Count))}exportOrders(e,t){return this.http.post("api/Orders/ExportOrder",e).pipe(g(o=>{this.exportService.convertToCSV(o,t)}))}static{this.\u0275fac=function(t){return new(t||i)(d(x),d(G))}}static{this.\u0275prov=c({token:i,factory:i.\u0275fac})}}return i})();var P=i=>({"full-width":i}),R=()=>({standalone:!0}),pe=(()=>{class i{constructor(e){this.datePipe=e,this.fullWidth=!1,this.timeChange=new C}ngOnInit(){}onTimeChange(e){let t=null;e&&(t=this.datePipe.transform(e,"HH:mm")),this.timeChange.emit(t),this.onTimePickerChange()}onShowCalendar(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onTimePickerChange(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}static{this.\u0275fac=function(t){return new(t||i)(w(O))}}static{this.\u0275cmp=S({type:i,selectors:[["app-timepicker"]],inputs:{time:"time",fullWidth:"fullWidth"},outputs:{timeChange:"timeChange"},decls:4,vars:8,consts:[["myCalendar",""],["styleClass","custom-height","id","shippingTime","appendTo","body",3,"ngModelChange","onSelect","ngClass","baseZIndex","ngModel","timeOnly","ngModelOptions"],["size","small","label","Close",3,"click"]],template:function(t,o){if(t&1){let n=k();h(0,"p-datepicker",1,0),b("ngModelChange",function(r){return s(n),v(o.time,r)||(o.time=r),l(r)}),f("ngModelChange",function(r){return s(n),l(o.onTimeChange(r))})("onSelect",function(){return s(n),l(o.onShowCalendar())}),h(2,"p-footer")(3,"p-button",2),f("click",function(){return s(n),y(1).hideOverlay(),l(o.onShowCalendar())}),_()()()}t&2&&(u("ngClass",V(5,P,o.fullWidth))("baseZIndex",1100),T("ngModel",o.time),u("timeOnly",!0)("ngModelOptions",M(7,R)))},dependencies:[N,I,E,D,F,L,B,W,j],styles:["p-datepicker span.p-datepicker.custom-height{height:44px;width:70px} p-datepicker.full-width span.p-datepicker.custom-height{height:44px;width:100%!important}"]})}}return i})();var Z=function(i){return i[i.DoNothing=0]="DoNothing",i[i.New=1]="New",i[i.Update=2]="Update",i}(Z||{});export{q as a,Z as b,pe as c};
|