marketplacepos 5.41.2 → 5.41.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 +123 -123
- package/Marketplace/chunk-2BBMPSAE.js +93 -0
- package/Marketplace/chunk-3CZJUTLZ.js +1 -0
- package/Marketplace/chunk-4ASUM4N5.js +1 -0
- package/Marketplace/chunk-4G3QN54S.js +193 -0
- package/Marketplace/chunk-4S4G5UPJ.js +1 -0
- package/Marketplace/{chunk-4DV4IT7R.js → chunk-5FEQZAWX.js} +1 -1
- package/Marketplace/{chunk-UMY6NG57.js → chunk-5GX2GLRY.js} +1 -1
- package/Marketplace/{chunk-25OT4I3W.js → chunk-5MRT2EFE.js} +1 -1
- package/Marketplace/chunk-62PFQNHJ.js +1 -0
- package/Marketplace/chunk-6ALHX2I4.js +1 -0
- package/Marketplace/{chunk-SYENQYR7.js → chunk-6IAGGRZN.js} +1 -1
- package/Marketplace/{chunk-FWG4H3QG.js → chunk-6NNAICJE.js} +1 -1
- package/Marketplace/{chunk-WGXUKTYP.js → chunk-6XFYITUD.js} +1 -1
- package/Marketplace/chunk-742J5UZZ.js +1 -0
- package/Marketplace/{chunk-4CTORK4F.js → chunk-7477X7LJ.js} +1 -1
- package/Marketplace/{chunk-R76V3PTN.js → chunk-75BDXSG3.js} +10 -10
- package/Marketplace/{chunk-ACIMXBIC.js → chunk-77IUCPIQ.js} +1 -1
- package/Marketplace/{chunk-ZR5IXNXB.js → chunk-7FUVW73P.js} +1 -1
- package/Marketplace/chunk-7G53KEUW.js +1 -0
- package/Marketplace/chunk-7GQIIDFF.js +4 -0
- package/Marketplace/chunk-7P3SGW2P.js +1 -0
- package/Marketplace/{chunk-PO7JVKK3.js → chunk-7TWBIV3T.js} +1 -1
- package/Marketplace/chunk-AIIRPK4M.js +1 -0
- package/Marketplace/chunk-B54QGLED.js +2 -0
- package/Marketplace/chunk-BG6DO7RW.js +5 -0
- package/Marketplace/{chunk-4M63ID5T.js → chunk-BUFEIJAI.js} +1 -1
- package/Marketplace/{chunk-SIYMMMKQ.js → chunk-CH2MLZU7.js} +1 -1
- package/Marketplace/{chunk-KX5AWR75.js → chunk-COBHWPGI.js} +1 -1
- package/Marketplace/chunk-D54NUPYF.js +153 -0
- package/Marketplace/chunk-DPLEMBB4.js +1 -0
- package/Marketplace/{chunk-R5TTZPDX.js → chunk-DVE7IIN7.js} +11 -11
- package/Marketplace/{chunk-PBGDP6XV.js → chunk-E3HHEPKQ.js} +1 -1
- package/Marketplace/chunk-E3HMIPER.js +2 -0
- package/Marketplace/{chunk-KQQCKHF3.js → chunk-E6HA2AGS.js} +1 -1
- package/Marketplace/{chunk-JOBWFOGC.js → chunk-EGTYAIU5.js} +1 -1
- package/Marketplace/chunk-EYNCNJ3I.js +1 -0
- package/Marketplace/chunk-FX6CFPPN.js +1 -0
- package/Marketplace/chunk-G5CQLP7H.js +1 -0
- package/Marketplace/{chunk-OKAPL3YZ.js → chunk-G6EG5QJS.js} +1 -1
- package/Marketplace/{chunk-IKPRRD5D.js → chunk-GBABJLPQ.js} +1 -1
- package/Marketplace/{chunk-MCJRJUAO.js → chunk-GCJBQRHI.js} +1 -1
- package/Marketplace/{chunk-ZIOAOUAM.js → chunk-GHQH62TZ.js} +1 -1
- package/Marketplace/chunk-GPEVUTDI.js +2 -0
- package/Marketplace/chunk-HMB7FZD7.js +1 -0
- package/Marketplace/chunk-HNYOBOEW.js +4 -0
- package/Marketplace/chunk-HUMGZRJQ.js +1 -0
- package/Marketplace/{chunk-GPC4DECX.js → chunk-ICSMRW7O.js} +1 -1
- package/Marketplace/chunk-IIJMZKPL.js +1 -0
- package/Marketplace/{chunk-6X2OBNJQ.js → chunk-ITTRZMEX.js} +4 -4
- package/Marketplace/{chunk-A2YNWIX6.js → chunk-IYYVZ6B6.js} +1 -1
- package/Marketplace/{chunk-XQGRC7V2.js → chunk-J3P46Z53.js} +1 -1
- package/Marketplace/{chunk-LHD7CYML.js → chunk-J7AGLBPL.js} +1 -1
- package/Marketplace/{chunk-NRCXYGO3.js → chunk-JBKHY4HH.js} +5 -5
- package/Marketplace/chunk-JTZJTXCN.js +1 -0
- package/Marketplace/chunk-K2H6WANG.js +1 -0
- package/Marketplace/chunk-K3FQGMAY.js +1 -0
- package/Marketplace/chunk-KC2DJUBC.js +1 -0
- package/Marketplace/{chunk-HPYTL6TX.js → chunk-KHWTOD6H.js} +1 -1
- package/Marketplace/chunk-KOJ2R5XW.js +1 -0
- package/Marketplace/chunk-KVP6OL4J.js +2 -0
- package/Marketplace/{chunk-2TZBEYNY.js → chunk-KXZCGKQW.js} +1 -1
- package/Marketplace/chunk-L4JWBBBC.js +1 -0
- package/Marketplace/chunk-LEMNVA5V.js +3 -0
- package/Marketplace/chunk-LFJIZAV2.js +15 -0
- package/Marketplace/chunk-LJTMOYLO.js +1 -0
- package/Marketplace/chunk-LPXBSHUI.js +180 -0
- package/Marketplace/{chunk-LSXUXG54.js → chunk-M3SJUKTG.js} +1 -1
- package/Marketplace/chunk-MATSRG2L.js +447 -0
- package/Marketplace/{chunk-XEMNZHW6.js → chunk-MNFHFW3E.js} +1 -1
- package/Marketplace/chunk-O5SSMLCS.js +1 -0
- package/Marketplace/{chunk-YPVYJUXS.js → chunk-OAS72QB2.js} +1 -1
- package/Marketplace/chunk-OAVAVDIP.js +1 -0
- package/Marketplace/{chunk-TNKPTRB3.js → chunk-OE2JYQHN.js} +1 -1
- package/Marketplace/{chunk-6MPSYC77.js → chunk-OLSC6KHB.js} +1 -1
- package/Marketplace/{chunk-JRWFZQ5K.js → chunk-PPDHTO44.js} +1 -1
- package/Marketplace/chunk-PQ6Z7K5L.js +1 -0
- package/Marketplace/chunk-PXB4YEY3.js +1 -0
- package/Marketplace/chunk-PZTMYAA7.js +1 -0
- package/Marketplace/{chunk-M5IQRAHV.js → chunk-Q2OEJFVT.js} +1 -1
- package/Marketplace/{chunk-6LH7FSOW.js → chunk-Q72ZXPDP.js} +1 -1
- package/Marketplace/{chunk-SXLKJLAE.js → chunk-QCZIDOKW.js} +1 -1
- package/Marketplace/chunk-QJFAPDI7.js +1 -0
- package/Marketplace/chunk-REYGC4GG.js +1 -0
- package/Marketplace/{chunk-FBZW4Y3J.js → chunk-RGR34QZ3.js} +1 -1
- package/Marketplace/{chunk-MQXPOHBV.js → chunk-RIHLYYZU.js} +1 -1
- package/Marketplace/{chunk-55OI2SUF.js → chunk-RVYGL22E.js} +1 -1
- package/Marketplace/chunk-S7LCZRSD.js +1 -0
- package/Marketplace/chunk-SL4ID42P.js +1 -0
- package/Marketplace/chunk-SZ6MQ6EW.js +1 -0
- package/Marketplace/chunk-T5ONJF63.js +7 -0
- package/Marketplace/chunk-T6QOFDEE.js +1 -0
- package/Marketplace/{chunk-HFKKITEW.js → chunk-TMFFA26Y.js} +1 -1
- package/Marketplace/chunk-TXPNZLOJ.js +5 -0
- package/Marketplace/chunk-TZXF4K2V.js +1 -0
- package/Marketplace/{chunk-GHBGGQNM.js → chunk-UBMI3NQH.js} +1 -1
- package/Marketplace/chunk-UUUVVJG4.js +2 -0
- package/Marketplace/{chunk-5XI7HWS5.js → chunk-V2OJQHE3.js} +2 -2
- package/Marketplace/{chunk-TGMCGROM.js → chunk-V5WYSCVT.js} +1 -1
- package/Marketplace/chunk-VDSO2BHA.js +1 -0
- package/Marketplace/chunk-VETHPEVU.js +1 -0
- package/Marketplace/{chunk-SH7KN2AS.js → chunk-VGXQU74M.js} +1 -1
- package/Marketplace/chunk-VSEWXNVC.js +291 -0
- package/Marketplace/{chunk-OZ77CAJD.js → chunk-WAW37FIG.js} +1 -1
- package/Marketplace/chunk-XFCMKJV6.js +1 -0
- package/Marketplace/chunk-XM6GN4VF.js +1 -0
- package/Marketplace/chunk-Y7VC2AGS.js +1 -0
- package/Marketplace/chunk-YIUQQGOQ.js +1 -0
- package/Marketplace/chunk-YPM6IC2W.js +1 -0
- package/Marketplace/{chunk-UPYS4A4M.js → chunk-YXFTLQ5M.js} +1 -1
- package/Marketplace/chunk-Z46DDENN.js +1 -0
- package/Marketplace/{chunk-E2CS7ZMC.js → chunk-ZD5LURJS.js} +1 -1
- package/Marketplace/{chunk-WHZ44BAL.js → chunk-ZZVNB72Q.js} +1 -1
- package/Marketplace/index.html +3 -3
- package/Marketplace/main-5HHAD6NX.js +1 -0
- package/Marketplace/{styles-X3FXEB7T.css → styles-NJFTKO3E.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2BUABOHG.js +0 -1
- package/Marketplace/chunk-2SXRC4IG.js +0 -1
- package/Marketplace/chunk-2ZTDLZVZ.js +0 -1
- package/Marketplace/chunk-33IXC6UG.js +0 -1
- package/Marketplace/chunk-4HZR3O3W.js +0 -1
- package/Marketplace/chunk-4JG3ZRYP.js +0 -5
- package/Marketplace/chunk-4PZ5Q3HI.js +0 -1
- package/Marketplace/chunk-4YOHPIVG.js +0 -1
- package/Marketplace/chunk-5B4KSPFM.js +0 -1
- package/Marketplace/chunk-5DIRXS7I.js +0 -1
- package/Marketplace/chunk-5EQNOCXP.js +0 -1
- package/Marketplace/chunk-5JYR3YJW.js +0 -1
- package/Marketplace/chunk-5QAURMZF.js +0 -222
- package/Marketplace/chunk-5ZX2OVBB.js +0 -1
- package/Marketplace/chunk-66YHNWRR.js +0 -1
- package/Marketplace/chunk-6IFZ2TO6.js +0 -1
- package/Marketplace/chunk-6RSAOZUV.js +0 -1
- package/Marketplace/chunk-6SBCWEJJ.js +0 -1
- package/Marketplace/chunk-6UEHSA6E.js +0 -1
- package/Marketplace/chunk-7H5ILTTK.js +0 -1
- package/Marketplace/chunk-A4F37V57.js +0 -1
- package/Marketplace/chunk-AGRVVEIR.js +0 -397
- package/Marketplace/chunk-ALKC77XL.js +0 -78
- package/Marketplace/chunk-AVEGIEYT.js +0 -193
- package/Marketplace/chunk-BBVWQJ7M.js +0 -1
- package/Marketplace/chunk-BM4KX73T.js +0 -1
- package/Marketplace/chunk-BQTUAYGY.js +0 -1
- package/Marketplace/chunk-C7QA2BEN.js +0 -3
- package/Marketplace/chunk-CEQA4PTY.js +0 -1
- package/Marketplace/chunk-CMZW5QAE.js +0 -1
- package/Marketplace/chunk-CSSG7NAJ.js +0 -1
- package/Marketplace/chunk-DG32XLYI.js +0 -1
- package/Marketplace/chunk-DJILLV4M.js +0 -1
- package/Marketplace/chunk-DS4AAABV.js +0 -1
- package/Marketplace/chunk-EL2JACEW.js +0 -1
- package/Marketplace/chunk-EU2KAMEK.js +0 -1
- package/Marketplace/chunk-EVLYO3HX.js +0 -1
- package/Marketplace/chunk-F4GMWHYJ.js +0 -33
- package/Marketplace/chunk-FFAZ3Q3F.js +0 -1
- package/Marketplace/chunk-FUWROOE4.js +0 -265
- package/Marketplace/chunk-GCECFUOP.js +0 -1
- package/Marketplace/chunk-GOS4RIF2.js +0 -1
- package/Marketplace/chunk-GZXQUJKX.js +0 -1
- package/Marketplace/chunk-H4PA2O6O.js +0 -1
- package/Marketplace/chunk-H6WIS2HR.js +0 -2
- package/Marketplace/chunk-HPGFBOM4.js +0 -1
- package/Marketplace/chunk-HTQJCQ32.js +0 -1
- package/Marketplace/chunk-IARG7PLL.js +0 -1
- package/Marketplace/chunk-IIMHYIRJ.js +0 -1
- package/Marketplace/chunk-JS55A2RS.js +0 -7
- package/Marketplace/chunk-JV4MMNGD.js +0 -79
- package/Marketplace/chunk-K6YEZYU4.js +0 -5
- package/Marketplace/chunk-KJHSB4A2.js +0 -1
- package/Marketplace/chunk-KOKHDU4I.js +0 -1
- package/Marketplace/chunk-KTIKLSOU.js +0 -1
- package/Marketplace/chunk-KTXS7IPU.js +0 -1
- package/Marketplace/chunk-KWQS4KX7.js +0 -1
- package/Marketplace/chunk-KXS76PRS.js +0 -70
- package/Marketplace/chunk-KYIY3VQ6.js +0 -141
- package/Marketplace/chunk-LOPJ3O56.js +0 -1
- package/Marketplace/chunk-LR4UZ2OS.js +0 -30
- package/Marketplace/chunk-LWSRD5LF.js +0 -1
- package/Marketplace/chunk-MGVYUYPC.js +0 -15
- package/Marketplace/chunk-MP43HA4R.js +0 -1
- package/Marketplace/chunk-MTUIRWOB.js +0 -2
- package/Marketplace/chunk-MZI5AYCE.js +0 -1
- package/Marketplace/chunk-NTW6FBP5.js +0 -1
- package/Marketplace/chunk-NZA4BEER.js +0 -102
- package/Marketplace/chunk-O55KM5KY.js +0 -1
- package/Marketplace/chunk-OZ7LWNOK.js +0 -15
- package/Marketplace/chunk-P5FCWMYK.js +0 -1
- package/Marketplace/chunk-PE5AFID4.js +0 -1
- package/Marketplace/chunk-PEA6KVUS.js +0 -252
- package/Marketplace/chunk-PW42BQIY.js +0 -1
- package/Marketplace/chunk-Q6V3IOGL.js +0 -1
- package/Marketplace/chunk-REL734JM.js +0 -1
- package/Marketplace/chunk-RHRJXX4W.js +0 -1
- package/Marketplace/chunk-S3YMF63V.js +0 -1
- package/Marketplace/chunk-SD7M7HOB.js +0 -1
- package/Marketplace/chunk-SLQA5QBT.js +0 -1
- package/Marketplace/chunk-SRJREA2O.js +0 -5
- package/Marketplace/chunk-T4K3CJ2R.js +0 -1
- package/Marketplace/chunk-TQ4ZLZ7C.js +0 -1
- package/Marketplace/chunk-TQIIWFRF.js +0 -1
- package/Marketplace/chunk-UDQBFSOV.js +0 -1
- package/Marketplace/chunk-UF4FKEE7.js +0 -93
- package/Marketplace/chunk-UJYSVGLV.js +0 -1
- package/Marketplace/chunk-UYW53K3I.js +0 -1
- package/Marketplace/chunk-VRI3CYGG.js +0 -1
- package/Marketplace/chunk-WTAJSWM2.js +0 -4
- package/Marketplace/chunk-WX5S3HCU.js +0 -1
- package/Marketplace/chunk-XGYBJAFE.js +0 -1
- package/Marketplace/chunk-YP2IPJ2O.js +0 -1
- package/Marketplace/chunk-Z3ITXK3D.js +0 -1
- package/Marketplace/chunk-Z3KD73SP.js +0 -2
- package/Marketplace/chunk-ZAVDOMSW.js +0 -1
- package/Marketplace/chunk-ZGZ74AJR.js +0 -1
- package/Marketplace/chunk-ZIUDNFYT.js +0 -1
- package/Marketplace/chunk-ZLNGASME.js +0 -1
- package/Marketplace/chunk-ZNDU44GH.js +0 -51
- package/Marketplace/main-SPNULRF2.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as He}from"./chunk-PQ6Z7K5L.js";import{a as Te}from"./chunk-4S4G5UPJ.js";import"./chunk-MS4AQ6UA.js";import{a as K}from"./chunk-ZD5LURJS.js";import{a as De,b as Oe}from"./chunk-VSEWXNVC.js";import{a as ze}from"./chunk-PPDHTO44.js";import{a as at}from"./chunk-7KG3DC5J.js";import{b as Ge}from"./chunk-ICSMRW7O.js";import"./chunk-YXFTLQ5M.js";import{a as we,b as Me}from"./chunk-OE2JYQHN.js";import{e as xt}from"./chunk-AIIRPK4M.js";import{a as Ne}from"./chunk-VETHPEVU.js";import{i as Re,j as Be,k as je,l as $e,m as We}from"./chunk-75BDXSG3.js";import"./chunk-6NNAICJE.js";import"./chunk-LPXBSHUI.js";import"./chunk-D54NUPYF.js";import{a as H}from"./chunk-EGTYAIU5.js";import"./chunk-7TWBIV3T.js";import"./chunk-J7AGLBPL.js";import"./chunk-6ALHX2I4.js";import"./chunk-4G3QN54S.js";import"./chunk-3RK6DDJD.js";import{a as Gt}from"./chunk-J3P46Z53.js";import{a as q}from"./chunk-4ASUM4N5.js";import{b as Ke}from"./chunk-7FUVW73P.js";import{a as Ae,b as Ue}from"./chunk-M3SJUKTG.js";import{a as $t,b as Wt,c as Ee}from"./chunk-GHQH62TZ.js";import"./chunk-CH2MLZU7.js";import{a as st}from"./chunk-YPM6IC2W.js";import{a as rt}from"./chunk-62PFQNHJ.js";import{c as Fe,f as Ve}from"./chunk-Q72ZXPDP.js";import"./chunk-MNFHFW3E.js";import"./chunk-ZZVNB72Q.js";import{a as Le}from"./chunk-VGXQU74M.js";import"./chunk-SDUUFQUI.js";import"./chunk-G6EG5QJS.js";import{a as jt}from"./chunk-RIHLYYZU.js";import{f as ke}from"./chunk-Q2OEJFVT.js";import{a as gt,b as Lt,d as nt,e as xe}from"./chunk-6IAGGRZN.js";import"./chunk-T6QOFDEE.js";import"./chunk-KXZCGKQW.js";import"./chunk-QCZIDOKW.js";import{j as Se,l as G}from"./chunk-LEMNVA5V.js";import{b as $,e as W}from"./chunk-BUFEIJAI.js";import"./chunk-K5XRGNWG.js";import"./chunk-V5WYSCVT.js";import"./chunk-KHWTOD6H.js";import{b as Ct,c as ft,d as Z,e as ye,f as ve,g as be,h as Pe,i as Rt,j as St,k as Bt,m as z,n as Ie}from"./chunk-ITTRZMEX.js";import{r as it,s as ot}from"./chunk-TMFFA26Y.js";import"./chunk-WAW37FIG.js";import{b as fe,c as ht,h as U,m as L,y as _t}from"./chunk-DPLEMBB4.js";import{b as I,c as f}from"./chunk-PXB4YEY3.js";import{E as At,F as ge,G as et,H as Ut,J as Ce,d as Nt,f as A,g as V,j as mt,k as _e,m as ut,n as Y}from"./chunk-GPEVUTDI.js";import{$c as he,Dc as B,Eb as M,Ec as p,Fb as de,Fc as N,G as F,Gc as y,Ic as T,Jc as D,Ka as It,Kb as C,Kc as O,Pc as ct,Qa as wt,Qc as Q,Rc as Xt,Tc as ue,Vb as Yt,Wb as l,Xb as pe,Z as re,Zc as k,_c as E,aa as Ft,ad as j,bc as lt,ca as Jt,cc as Zt,ea as le,ec as qt,f as ae,fc as Qt,gc as o,hc as a,ic as _,jc as b,ka as ce,kc as P,mc as x,nb as se,ob as w,pa as tt,qb as r,rc as g,sc as s,tc as me,uc as Vt,v as Et,wb as S,ya as m,za as u}from"./chunk-T5ONJF63.js";import"./chunk-K2H6WANG.js";var ln=()=>["/menu/products/download/by-url"],Je=(()=>{class i{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"}]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-status"]],standalone:!1,decls:13,vars:3,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-flex"],[1,"dropdown-item",3,"routerLink"]],template:function(n,e){n&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),_(3,"nav-tab",2),a()(),o(4,"div")(5,"div",3)(6,"a",4),_(7,"i",5),a(),o(8,"div",6)(9,"div",7)(10,"a",8),p(11,"Download Product By Url"),a()()()()()(),_(12,"router-outlet")),n&2&&(r(3),l("Tabs",e.productTabs),r(7),l("routerLink",ct(2,ln)))},dependencies:[we,ge,Ut],encapsulation:2})}}return i})();function cn(i,d){if(i&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),p(3),a()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),r(),l("src",t.Img,w),r(2),N(t.Name)}}function sn(i,d){if(i&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),p(3),a()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),r(),l("src",t.Img,w),r(2),N(t.Name)}}function dn(i,d){if(i&1&&(o(0,"div",10),_(1,"img",11),o(2,"span"),p(3),a()()),i&2){let t=d.$implicit;l("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),r(),l("src",t.Img,w),r(2),N(t.Name)}}function pn(i,d){if(i&1){let t=x();o(0,"div",12)(1,"label",13),p(2,"Scan Type"),a(),o(3,"mat-radio-group",14),O("ngModelChange",function(e){m(t);let c=s();return D(c.filter.ScanFull,e)||(c.filter.ScanFull=e),u(e)}),o(4,"mat-radio-button",15),p(5," Full (Include Inactive Products) "),a(),o(6,"mat-radio-button",16),p(7," Active "),a()()()}if(i&2){let t=s();r(3),T("ngModel",t.filter.ScanFull),r(),l("value",!0),r(2),l("value",!1)}}function mn(i,d){i&1&&(o(0,"span"),p(1,"Never"),a())}function un(i,d){if(i&1&&(o(0,"span"),p(1),k(2,"async"),a()),i&2){let t=s(2);r(),N(E(2,1,t.lastSync$))}}function hn(i,d){if(i&1){let t=x();o(0,"div",8)(1,"label",5)(2,"span",17),p(3,"Last Scan:"),a(),C(4,mn,2,0,"span"),k(5,"async"),C(6,un,3,3,"span"),a(),o(7,"mat-radio-group",18),O("ngModelChange",function(e){m(t);let c=s();return D(c.filter.UpdatedProduct,e)||(c.filter.UpdatedProduct=e),u(e)}),o(8,"mat-radio-button",19),p(9," Scan All Products "),a(),o(10,"mat-radio-button",20),p(11),a()()()}if(i&2){let t=s();r(4),lt(E(5,6,t.lastSync$)==null?4:6),r(3),T("ngModel",t.filter.UpdatedProduct),r(),l("value",!1),r(2),l("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"),r(),y(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function _n(i,d){if(i&1){let t=x();o(0,"div",8)(1,"label",5),p(2," Scan Option "),a(),o(3,"mat-radio-group",21),O("ngModelChange",function(e){m(t);let c=s();return D(c.filter.Async,e)||(c.filter.Async=e),u(e)}),o(4,"mat-radio-button",22),p(5," Asynchronous (Get Notified when Complete) "),a(),o(6,"mat-radio-button",23),p(7," Synchronous (Wait until Complete) "),a()()()}if(i&2){let t=s();r(3),T("ngModel",t.filter.Async),r(),l("value",!0),r(2),l("value",!1)}}var R=(()=>{class i{constructor(t,n,e){this.dialogRef=t,this.data=n,this.router=e,this.channelService=tt(Te),this.channelType=I,this.disabledChannelOption=!1,this.filter={ChannelID:f.GuidEMpty,ScanFull:!1,UpdatedProduct:!1,Async:!1},this.isSingleChannel=f.IsNotEmpty(n.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=f.IsEmpty(n.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new St,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==I.Tiktok||t.TypeID==I.Tokopedia||t.TypeID==I.Lazada||t.TypeID==I.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(Et(n=>(this.selectedChannel.LastSync=n.LastSync,this.setDefaultConfigUpdate(),f.IsNotEmpty(n.LastSync)?f.convertToReadableDate(n.LastSync):null)),re(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&f.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==I.Shopee||this.selectedChannel.TypeID==I.Tiktok||this.selectedChannel.TypeID==I.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=I.WooCommerce&&this.selectedChannel?.TypeID!=I.KalCare&&this.selectedChannel?.TypeID!=I.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==I.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(t){return f.IsNotEmpty(t)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(n){return new(n||i)(S(Ct),S(ft),S(et))}}static{this.\u0275cmp=M({type:i,selectors:[["app-scan-dialog"]],decls:15,vars:8,consts:[["selectedItem",""],["item",""],[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["optionLabel","Name","optionValue","ID","placeholder","Select a Channel","appendTo","body","filterBy","Name",1,"w-100",2,"--p-select-padding-y","0.75rem",3,"ngModelChange","options","ngModel","filter"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],["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","rounded-1",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","rounded-1",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","rounded-1",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){if(n&1){let c=x();o(0,"modal-material",2),g("onOk",function(){return m(c),u(e.submit())})("onClose",function(){return m(c),u(e.onClose())})("onCancel",function(){return m(c),u(e.onClose())}),o(1,"div",3)(2,"div",4)(3,"label",5),p(4,"Select a Channel"),a(),o(5,"p-select",6),O("ngModelChange",function(v){return m(c),D(e.filter.ChannelID,v)||(e.filter.ChannelID=v),u(v)}),g("ngModelChange",function(v){return m(c),u(e.onSelectChannel(v))}),C(6,cn,4,3,"ng-template",null,0,j)(8,sn,4,3,"ng-template",null,1,j)(10,dn,4,3,"ng-template",null,1,j),a(),C(12,pn,8,3,"div",7)(13,hn,12,8,"div",8)(14,_n,8,3,"div",9),a()()()}n&2&&(l("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),r(5),l("options",e.channelOptions),T("ngModel",e.filter.ChannelID),l("filter",!0),r(7),l("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),r(),lt(e.hasScanUpdate&&e.selectedChannel?13:-1),r(),l("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[Y,V,mt,Oe,De,_t,U,L,Bt,jt,Wt,ot,it,Ve,$t],encapsulation:2})}}return i})();var pt=function(i){return i.Tokopedia="https://seller.tokopedia.com",i.Shoope="https://seller.shopee.co.id",i.Tiktok="https://seller-id.tiktok.com",i.WooCommerce="https://woocommerce.dealpos.app",i.Lazada="https://sellercenter.lazada.co.id",i}(pt||{});var ee={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var gn=[[["header"]],[["content"]],[["footer"]]],Cn=["header","content","footer"],fn=(i,d)=>({bodyScrollable:i,hideScrollbar:d}),Sn=(i,d,t,n)=>({"bg-success":i,"bg-warning":d,"bg-info":t,"bg-danger":n}),xn=i=>({"mx-auto":i}),yn=(i,d)=>({"show-footer":i,"p-0":d});function vn(i,d){if(i&1){let t=x();o(0,"div",8),g("click",function(){m(t);let e=s();return u(e.onBack.emit())}),o(1,"a",9),_(2,"i",10),a()()}}function bn(i,d){if(i&1){let t=x();o(0,"div")(1,"a",11),g("click",function(){m(t);let e=s();return u(e.onClose.emit())}),_(2,"i",12),a()()}}function Pn(i,d){if(i&1){let t=x();o(0,"a",16),g("click",function(){m(t);let e=s(2);return u(e.onCancel.emit())}),p(1),a()}if(i&2){let t=s(2);r(),y(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel","")}}function In(i,d){if(i&1){let t=x();o(0,"button",17),g("click",function(){m(t);let e=s(2);return u(e.onOk.emit())})("keyup.F2",function(){m(t);let e=s(2);return u(e.onOk.emit())}),a()}if(i&2){let t=s(2);l("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",se)}}function wn(i,d){if(i&1&&(o(0,"mat-dialog-actions",13),Vt(1,2),C(2,Pn,2,1,"a",14)(3,In,1,2,"button",15),a()),i&2){let t=s();r(2),l("ngIf",!(t.config!=null&&t.config.hideCancel)),r(),l("ngIf",!(t.config!=null&&t.config.hideOk))}}var ne=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=ee.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},Ye=(()=>{class i{constructor(){this.dynamicValidated=!0,this.onOk=new It,this.onCancel=new It,this.onClose=new It,this.onBack=new It,this.headerType=ee}ngOnInit(){this.config==null&&(this.config=new ne)}onKeyup(t){this.config?.disableKeyup||(t.code=="F2"&&this.onOk.emit("F2"),(t.code=="Enter"||t.code=="NumpadEnter")&&this.onOk.emit("Enter"))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=M({type:i,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:Cn,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],["class","back-button position-absolute pointer d-print-none",3,"click",4,"ngIf"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[4,"ngIf"],[1,"modal-body","w-100",3,"ngClass"],["class","w-100 py-7 border-top d-flex justify-content-end d-print-none",4,"ngIf"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],["class","btn btn-light-blue text-primary btn-lg fw-bold mx-3",3,"click",4,"ngIf"],["class","btn btn-light-blue me-6 text-primary btn-lg fw-bold mx-3","data-cy","btn-ok",3,"disabled","innerHTML","click","keyup.F2",4,"ngIf"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(n,e){n&1&&(me(gn),o(0,"div",0),g("keyup",function(h){return e.onKeyup(h)}),o(1,"div",1),C(2,vn,3,0,"div",2),o(3,"div",3)(4,"h4",4),p(5),a(),Vt(6),a(),C(7,bn,3,0,"div",5),a(),o(8,"mat-dialog-content",6),Vt(9,1),a(),C(10,wn,4,2,"mat-dialog-actions",7),a()),n&2&&(pe("width",e.config==null?null:e.config.customWidth),l("ngClass",Xt(10,fn,e.config==null?null:e.config.bodyScrollable,e.config==null?null:e.config.hideScrollbar)),r(),l("ngClass",ue(13,Sn,e.headerType.Success==(e.config==null?null:e.config.headerType),e.headerType.Warning==(e.config==null?null:e.config.headerType),e.headerType.Info==(e.config==null?null:e.config.headerType),e.headerType.Error==(e.config==null?null:e.config.headerType))),r(),l("ngIf",e.config==null?null:e.config.eMoney),r(),l("ngClass",Q(18,xn,e.config==null?null:e.config.eMoney)),r(2),N(e.config==null?null:e.config.title),r(2),l("ngIf",!(e.config!=null&&e.config.hideClose)),r(),l("ngClass",Xt(20,yn,!(e.config!=null&&e.config.hideFooter),e.config==null?null:e.config.noPadding)),r(2),l("ngIf",!(e.config!=null&&e.config.hideFooter)))},dependencies:[Y,Nt,V,Pe,ye,be,ve],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media (max-width: 992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media (max-width: 576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})}}return i})();var Mn=i=>({"is-disabled":i});function Tn(i,d){if(i&1&&(b(0),o(1,"tr")(2,"td",10),p(3),a(),o(4,"td",10),p(5),a(),o(6,"td",11)(7,"p",12),p(8,"Product Not in Channel!"),a()()(),P()),i&2){let t=s().$implicit;r(3),y(" ",t==null?null:t.Model," "),r(2),y(" ",t==null?null:t.Code," ")}}function Dn(i,d){if(i&1&&(o(0,"td",10),p(1),a()),i&2){let t=s(3).$implicit;Yt("rowspan",t.Channel.length),r(),y(" ",t==null?null:t.Model," ")}}function On(i,d){if(i&1&&(o(0,"td",10),p(1),a()),i&2){let t=s(3).$implicit;Yt("rowspan",t.Channel.length),r(),y(" ",t==null?null:t.Code," ")}}function kn(i,d){if(i&1){let t=x();o(0,"tr"),C(1,Dn,2,2,"td",13)(2,On,2,2,"td",13),o(3,"td",10)(4,"div",14)(5,"a",15),_(6,"img",16),a(),o(7,"div",17),p(8),a()()(),o(9,"td",10),p(10),k(11,"number"),a(),o(12,"td",18),p(13),k(14,"number"),a(),o(15,"td",19)(16,"div",20)(17,"button",21),g("click",function(){let e=m(t).$implicit,c=s(2).$implicit,h=s();return u(h.onDetach(e,c))}),_(18,"i",22),o(19,"span",23),p(20,"Detach"),a()(),o(21,"a",24),_(22,"i",25),o(23,"span",23),p(24,"Edit"),a()()()()()}if(i&2){let t=d.$implicit,n=d.$index,e=s(3);r(),l("ngIf",n==0),r(),l("ngIf",n==0),r(3),l("href",t.Url,w)("title",t.Title),r(),l("src",e.getChannelLogo(t.TypeID),w),r(),l("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),r(),y(" ",t.Name," "),r(2),N(E(11,12,t.Price)),r(3),N(E(14,14,t.Inventory)),r(8),l("href",e.getHyperlinkSellerCenter(t),w)("ngClass",Q(16,Mn,t.TypeID==e.channelType.KalCare))("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function En(i,d){if(i&1&&qt(0,kn,25,18,"tr",null,Zt),i&2){let t=s().$implicit;Qt(t==null?null:t.Channel)}}function Fn(i,d){if(i&1&&C(0,Tn,9,2,"ng-container",9)(1,En,2,0,"ng-template",null,0,j),i&2){let t=d.$implicit,n=B(2);l("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",n)}}var zt=(()=>{class i{constructor(t,n){this.data=t,this.dialogRef=n,this.httpService=tt(W),this.toastr=tt($),this.variants=wt([]),this.channelType=I,this.variants.set(this.data.variants),this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new St,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="850px"}onDetach(t,n){let e={ChannelID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariationID:t.ChannelVariationID};this.httpService.post(Se.DetachVariant,[e]).subscribe(c=>{this.toastr.success(c.Message,"Success"),this.updateVariantAfterDetach(n,t.ChannelVariationID)})}updateVariantAfterDetach(t,n){this.variants.update(e=>{let c=e.findIndex(h=>h.ID===t.ID);return c!==-1&&(e[c].Channel=e[c].Channel.filter(h=>h.ChannelVariationID!==n)),[...e]})}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let n="javascript:void(0)";switch(t.TypeID){case I.Shopee:n=`${pt.Shoope}/portal/product/${t.ChannelItemID}`;break;case I.Tiktok:n=`${pt.Tiktok}/product/edit/${t.ChannelItemID}`;break;case I.Tokopedia:n=`${pt.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case I.WooCommerce:n=`${pt.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case I.Lazada:n=`${pt.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return n}static{this.\u0275fac=function(n){return new(n||i)(S(ft),S(Ct))}}static{this.\u0275cmp=M({type:i,selectors:[["app-modal-variant"]],decls:27,vars:1,consts:[["printChannelModal",""],[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngIf","ngIfElse"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"],[1,"fs-6"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"]],template:function(n,e){n&1&&(o(0,"modal-material",1),g("onClose",function(){return e.dialogRef.close()})("onCancel",function(){return e.dialogRef.close()}),o(1,"content")(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4)(6,"div",5)(7,"span"),p(8,"VARIANT"),a(),o(9,"sup"),_(10,"i",6),a()()(),o(11,"th",4),p(12,"SKU"),a(),o(13,"th",4)(14,"div",5)(15,"span"),p(16,"PRODUCT"),a(),o(17,"sup"),_(18,"i",7),a()()(),o(19,"th",4),p(20,"PRICE"),a(),o(21,"th",8),p(22,"INVENTORY"),a(),_(23,"th",4),a()(),o(24,"tbody"),qt(25,Fn,3,2,null,null,Zt),a()()()()),n&2&&(l("config",e.modalConfig),r(25),Qt(e.variants()))},dependencies:[Y,Nt,V,ut,ot,it,Ye],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:#fff!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}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]})}}return i})();function Vn(i,d){if(i&1&&(o(0,"mat-option",6)(1,"div"),_(2,"img",7),o(3,"span"),p(4),a()()()),i&2){let t=d.$implicit;l("value",t.ChannelID),r(2),l("src",t.logo,w),r(2),N(t.Title)}}var bt=(()=>{class i{constructor(){this.dialogRef=tt(Ct),this.channels=tt(ft),this.channelIds=wt([]),this.channelOptions=wt([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((n,e,c)=>c.findIndex(h=>h.ChannelID===n.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new St,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(n=>this.channelIds().includes(n.ChannelID)).map(n=>({ChannelID:n.ChannelID,ChannelItemID:n.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-modal-detach-product"]],decls:8,vars:5,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],["class","channel-option",3,"value",4,"ngFor","ngForOf"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(n,e){n&1&&(o(0,"modal-material",0),g("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),o(1,"div",1)(2,"div")(3,"label",2),p(4,"Select a Channel"),a(),o(5,"mat-form-field",3)(6,"mat-select",4),O("ngModelChange",function(h){return D(e.channelIds,h)||(e.channelIds=h),h}),C(7,Vn,5,3,"mat-option",5),a()()()()()),n&2&&(l("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),r(6),T("ngModel",e.channelIds),l("multiple",!0),r(),l("ngForOf",e.channelOptions()))},dependencies:[Y,A,Bt,jt,ke,Ue,Ae,Fe,_t,U,L,ot],encapsulation:2})}}return i})();function Nn(i,d){if(i&1){let t=x();o(0,"button",13),g("click",function(){m(t);let e=s();return u(e.onDetachMultipleProduct())}),_(1,"i",14),p(2),a()}if(i&2){let t,n=s();r(2),y("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function An(i,d){if(i&1){let t=x();o(0,"button",16),g("click",function(){m(t);let e=s(2);return u(e.onOpenScanDialog())}),_(1,"i",17),p(2," Scan Channel "),a()}}function Un(i,d){if(i&1&&(b(0),C(1,An,3,0,"button",15),P()),i&2){let t=s();r(),l("ngIf",!t.productService.hasSelection(t.products))}}function Ln(i,d){if(i&1){let t=x();b(0),o(1,"button",18),g("click",function(){m(t);let e=s();return u(e.onScanMultipleProduct())}),_(2,"i",17),p(3),a(),P()}if(i&2){let t,n=s();r(3),y(" Scan (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Rn(i,d){if(i&1){let t=x();b(0),o(1,"button",19),g("click",function(){m(t);let e=s();return u(e.onUploadMultipleProduct())}),_(2,"i",20),p(3),a(),P()}if(i&2){let t,n=s();r(3),y(" Upload (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Bn(i,d){if(i&1){let t=x();o(0,"div",21)(1,"app-product-card",22),g("onUpload",function(){let e=m(t).$implicit,c=s();return u(c.onUploadToMultipleChannel(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanSingleProduct(e))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onOpenDialogVariant(e))})("onCheckBoxChange",function(e){let c=m(t).$implicit;return u(c.selected=e)})("onDetach",function(){let e=m(t).$implicit,c=s();return u(c.onDetachProduct([e]))}),a()()}if(i&2){let t=d.$implicit,n=s();r(),l("productId",t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",(t==null?null:t.Channel.length)<n.channelOptions.length)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function jn(i,d){i&1&&(b(0),o(1,"div",23),_(2,"app-empty-state"),a(),P())}function $n(i,d){if(i&1){let t=x();b(0),o(1,"div",24)(2,"div",25)(3,"app-custom-paginator",26),g("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),a()()(),P()}if(i&2){let t=s();r(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var Qe=(()=>{class i{constructor(t,n,e,c,h,v,Pt){this.http=t,this.toastr=n,this.dialog=e,this.productService=c,this.authService=h,this.uploadProductService=v,this.route=Pt,this.searchFilter=new at,this.products=[],this.rowCount=0,this.multipeScanChannels=[],this.getLoaderPage(),this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(t=>{this.Categories=t.Options.Categories,this.searchFilter.PageNumber=t.Filter.PageNumber,this.searchFilter.RowCount=t.Filter.RowCount,this.searchFilter.ChannelID=null,this.searchFilter.Category=t.Filter.Category,this.searchFilter.PageSize=100,this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let t={PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Category:this.searchFilter.Category,From:this.startDate,To:this.endDate};this.http.post("/api/product/GetInPOS",t).subscribe(n=>{this.products=n.Data,this.rowCount=n.Total==null?this.searchFilter.RowCount:n.Total.toString(),this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions)})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter.ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(t=>{if(this.searchFilter.Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.successToastrScanAllProduct(t,n,!this.searchFilter.UpdatedProduct)}})}onOpenDialogVariant(t){let n=this.products[t]?.Variants||[];this.dialog.open(zt,{data:{title:this.products[t].Name,variants:n}})}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}searchProduct(t){this.searchFilter.text=t,this.getProducts()}onScanMultipleProduct(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok]);this.dialog.open(R,{data:{filter:t,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(c=>f.IsNotEmpty(c))).subscribe(c=>{this.searchFilter.ChannelID=c.ChannelID,this.searchFilter.ScanFull=c.ScanFull,this.searchFilter.UpdatedProduct=c.UpdatedProduct;let h=this.productService.selectedProduct(this.products),v=this.productService.getVariantCodesProducts(h);this.scanSingleProduct(v)})}onScanSingleProduct(t){let n=JSON.parse(JSON.stringify(this.searchFilter));n.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let c=this.productService.getVariantCodesProduct(t);this.scanSingleProduct(c)})}scanSingleProduct(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.toastr.error(`This product is not existed in ${e?.Name} `,"Error")}this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(t=[]){let n;return t?.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t?.length==1&&(n=t[0].Code),n}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=f.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(bt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>f.IsNotEmpty(e)),Ft(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Rt.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(W),S($),S(Z),S(H),S(G),S(xt),S(et))}}static{this.\u0275cmp=M({type:i,selectors:[["app-in-pos"]],standalone:!1,decls:23,vars:14,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,e){if(n&1){let c=x();o(0,"mainpanel",1),g("onSubmit",function(v){return m(c),u(e.searchProduct(v))}),o(1,"actions"),C(2,Nn,3,1,"button",2)(3,Un,2,1,"ng-container",3)(4,Ln,4,1,"ng-container",3)(5,Rn,4,1,"ng-container",3),a(),o(6,"filters")(7,"div")(8,"label",4),p(9,"Category"),a(),o(10,"ng-select",5),g("ngModelChange",function(v){return m(c),u(e.searchFilter.Category=v)}),a()(),o(11,"div",6)(12,"mat-date-range-input",7)(13,"input",8),O("ngModelChange",function(v){return m(c),D(e.startDate,v)||(e.startDate=v),u(v)}),g("click",function(){m(c);let v=B(16);return u(v.open())}),a(),o(14,"input",9),O("ngModelChange",function(v){return m(c),D(e.endDate,v)||(e.endDate=v),u(v)}),g("click",function(){m(c);let v=B(16);return u(v.open())}),a()(),_(15,"mat-date-range-picker",null,0),a()(),o(17,"content")(18,"div",10)(19,"div",11),C(20,Bn,2,11,"div",12)(21,jn,3,0,"ng-container",3),a(),C(22,$n,4,5,"ng-container",3),a()()()}if(n&2){let c=B(16);l("headerTitle","In POS ("+e.rowCount+")"),r(2),lt(e.productService.hasSelection(e.products)?2:-1),r(),l("ngIf",!e.productService.hasSelection(e.products)),r(),l("ngIf",e.productService.hasSelection(e.products)&&e.multipeScanChannels.length>0),r(),l("ngIf",e.productService.hasSelection(e.products)),r(5),l("clearable",!0)("items",e.Categories)("ngModel",e.searchFilter.Category),r(2),l("rangePicker",c),r(),T("ngModel",e.startDate),r(),T("ngModel",e.endDate),r(6),l("ngForOf",e.products),r(),l("ngIf",e.products.length==0),r(),l("ngIf",e.products.length>0)}},dependencies:[A,V,ht,U,L,z,nt,q,rt,K,Re,Be,je,$e],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"]})}}return i})();function Wn(i,d){if(i&1){let t=x();o(0,"button",11),g("click",function(){m(t);let e=s();return u(e.onDetachMultipleProduct())}),_(1,"i",12),p(2),a()}if(i&2){let t,n=s();r(2),y("Detach (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function Gn(i,d){if(i&1){let t=x();b(0),o(1,"button",13),g("click",function(){m(t);let e=s();return u(e.onOpenScanDialog())}),_(2,"i",14),p(3," Scan Channel "),a(),P()}}function zn(i,d){if(i&1){let t=x();b(0),o(1,"button",15),g("click",function(){m(t);let e=s();return u(e.onScanMultipleProduct())}),_(2,"i",14),p(3),a(),P()}if(i&2){let t=s();r(3),y(" Scan (",t.productService.selectedProduct(t.products).length,") ")}}function Hn(i,d){if(i&1){let t=x();b(0),o(1,"button",16),g("click",function(){m(t);let e=s();return u(e.onUploadMultipleProduct())}),_(2,"i",17),p(3),a(),P()}if(i&2){let t=s();r(3),y(" Upload (",t.productService.selectedProduct(t.products).length,") ")}}function Kn(i,d){if(i&1&&(o(0,"span",18),_(1,"img",19),a(),p(2)),i&2){let t=d.item;r(),l("src",t.Img,w)("alt",t.Name),r(),y(" ",t.Name," ")}}function Jn(i,d){if(i&1){let t=x();o(0,"div",20)(1,"label",21),p(2,"Item ID"),a(),o(3,"input",22),O("ngModelChange",function(e){m(t);let c=s();return D(c.searchFilter.Item_id,e)||(c.searchFilter.Item_id=e),u(e)}),a()()}if(i&2){let t=s();r(3),T("ngModel",t.searchFilter.Item_id)}}function Yn(i,d){if(i&1){let t=x();o(0,"div",23)(1,"app-product-card",24),g("onUpload",function(){let e=m(t).$implicit,c=s();return u(c.onUploadToMultipleChannel(e))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onOpenVariantDetail(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanSingleProduct(e))})("onCheckBoxChange",function(e){let c=m(t).$implicit;return u(c.selected=e)})("onDetach",function(){let e=m(t).$implicit,c=s();return u(c.onDetachProduct([e]))}),a()()}if(i&2){let t=d.$implicit,n=s();r(),l("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(t))("code",n.getVariantCode(t==null?null:t.Variants))("showCheckBox",t==null?null:t.hasScan)("scanButton",!0)("uploadButton",t==null?null:t.hasUpload)("imageForZoom",t==null?null:t.ImageUrl)("detachButton",(t==null||t.Channel==null?null:t.Channel.length)>0)}}function Zn(i,d){i&1&&(b(0),o(1,"div",25),_(2,"app-empty-state"),a(),P())}function qn(i,d){if(i&1){let t=x();o(0,"div",26)(1,"div",27)(2,"app-custom-paginator",28),g("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),a()()()}if(i&2){let t=s();r(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var Xe=(()=>{class i{constructor(t,n,e,c,h,v,Pt,kt){this.http=t,this.dialog=n,this.toastr=e,this.productService=c,this.activateRouter=h,this.authService=v,this.route=Pt,this.uploadProductService=kt,this.searchFilter=new at,this.products=[],this.rowCount=0,this.hasClickRowCount=!1,this.guidEmpty=f.GuidEMpty,this.multipeScanChannels=[],this.channelOptions=this.authService.getChannels(),this.initMultiScanChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,n.Filter.ChannelID!=f.GuidEMpty&&(this.searchFilter.ListChannelID=[],this.searchFilter.ListChannelID.push(n.Filter.ChannelID)),this.searchFilter.PageSize=n.Filter.RowCount,this.searchFilter.Item_id="",this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels=this.productService.filterChannelByTypeId(this.channelOptions,[I.Tokopedia,I.Tiktok])}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount,text:this.searchFilter.text,Item_id:this.searchFilter.Item_id};this.productService.findAllSoldInChannel(t).subscribe(n=>{this.products=n.Data,this.products=this.productService.checkProductHasUploadBtn(this.products,this.channelOptions),this.products=this.productService.checkProductHasScanButton(this.products,this.channelOptions)})}searchProduct(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onOpenVariantDetail(t){let n=this.products[t].Variants;this.dialog.open(zt,{data:{variants:n,title:this.products[t].Name}})}onOpenScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.Async=e.Async,this.scanAllProduct()})}scanAllProduct(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).pipe(F(n=>n)).subscribe(n=>{this.searchFilter.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct),this.initPageLoader(f.GuidEMpty))})}onScanSingleProduct(t){t.Channel=this.productService.getChannelProduct(t);let n=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(R,{data:{filter:n,channelOptions:this.channelOptions,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID;let c=this.productService.getVariantCodesProduct(t);this.scanProducts(c)})}onUploadToMultipleChannel(t){this.uploadProductService.setSelectedProduct([t]),this.route.navigate(["/menu/products/upload"])}onScanMultipleProduct(){this.searchFilter.ChannelID=f.GuidEMpty;let t=JSON.parse(JSON.stringify(this.searchFilter));this.dialog.open(R,{data:{filter:t,channelOptions:this.multipeScanChannels,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.UpdatedProduct=e.UpdatedProduct;let c=this.productService.selectedProduct(this.products),h=this.productService.getVariantCodesProducts(c);this.scanProducts(h)})}scanProducts(t){this.productService.scanSingle(this.searchFilter.ChannelID,t).subscribe({next:n=>{let e=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);n?this.toastr.success(`Product Successfully scan with ${e?.Name}`,"Success"):this.toastr.error(`This product is not existed in ${e?.Name} `,"Error"),this.searchFilter.ChannelID=f.GuidEMpty,n&&this.getProducts()},error:n=>{this.searchFilter.ChannelID=f.GuidEMpty}})}getVariantCode(t){let n;return t.length>1&&(n=(t[0].model?t[0].model:"")+t[0].Code),t.length==1&&(n=t[0].Code),n}onClearFilterChannel(){this.searchFilter.ChannelID=f.GuidEMpty,this.searchFilter.Item_id=""}onUploadMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.uploadProductService.setSelectedProduct(t),this.route.navigate(["/menu/products/upload"])}getRowCount(){let t={ListChannelID:this.searchFilter.ListChannelID,text:this.searchFilter.text};this.http.post("/api/product/GetSoldInChannelRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Total})}onDetachProduct(t){let n=[];t.forEach(e=>{e.Channel=f.assignChannelLogo(e.Channel),n.push(...e.Channel)}),this.dialog.open(bt,{width:"600px",data:[...n]}).afterClosed().pipe(F(e=>f.IsNotEmpty(e)),Ft(e=>this.productService.detachProduct(e))).subscribe(e=>{this.toastr.success(e.Message,Rt.Success),this.getProducts()})}onDetachMultipleProduct(){let t=this.productService.selectedProduct(this.products);this.onDetachProduct(t)}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(Z),S($),S(H),S(At),S(G),S(et),S(xt))}}static{this.\u0275cmp=M({type:i,selectors:[["app-sold-in-channel"]],standalone:!1,decls:19,vars:13,consts:[["description","SKU has been mapped between dealpos and marketplace",3,"onSubmit","headerTitle"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],["class","mt-5",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanSoldinChannel",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"mt-5"],[1,"fw-bold"],["type","text","name","Item_id","id","Item_id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onUpload","onDescEvent","onScan","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),g("onSubmit",function(h){return e.searchProduct(h)}),o(1,"actions"),C(2,Wn,3,1,"button",1)(3,Gn,4,0,"ng-container",2)(4,zn,4,1,"ng-container",2)(5,Hn,4,1,"ng-container",2),a(),o(6,"filters")(7,"div")(8,"label",3),p(9,"Channel"),a(),o(10,"ng-select",4),g("ngModelChange",function(h){return e.searchFilter.ListChannelID=h})("clear",function(){return e.onClearFilterChannel()}),C(11,Kn,3,3,"ng-template",5),a()(),C(12,Jn,4,1,"div",6),a(),o(13,"content")(14,"div",7)(15,"div",8),C(16,Yn,2,11,"div",9)(17,Zn,3,0,"ng-container",2),a(),C(18,qn,3,4,"div",10),a()()()),n&2&&(l("headerTitle","Sold in Channel"),r(2),lt(e.productService.hasSelection(e.products)?2:-1),r(),l("ngIf",!e.productService.hasSelection(e.products)),r(),l("ngIf",e.multipeScanChannels.length>0&&e.productService.hasSelection(e.products)),r(),l("ngIf",e.productService.hasSelection(e.products)),r(5),l("clearable",!0)("multiple",!0)("items",e.channelOptions)("ngModel",e.searchFilter.ListChannelID),r(2),l("ngIf",e.searchFilter.ListChannelID!=null),r(4),l("ngForOf",e.products),r(),l("ngIf",e.products.length==0),r(),l("ngIf",e.products==null?null:e.products.length))},dependencies:[A,V,ht,U,L,z,nt,gt,Lt,q,rt,K],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]})}}return i})();function Qn(i,d){if(i&1){let t=x();o(0,"button",13),g("click",function(){m(t);let e=s(2);return u(e.uploadMultipleProduct())}),_(1,"i",14),p(2),a()}if(i&2){let t=s(2);r(2),y(" upload (",t.selectedProducts==null?null:t.selectedProducts.length,") ")}}function Xn(i,d){if(i&1){let t=x();b(0),o(1,"td",29)(2,"input",30),O("ngModelChange",function(e){m(t);let c=s(2).$implicit;return D(c.selected,e)||(c.selected=e),u(e)}),g("ngModelChange",function(){m(t);let e=s(3).ngIf,c=s(3);return u(c.onSelectProduct(e))}),a()(),P()}if(i&2){let t=s(2).$implicit;r(),l("rowSpan",t==null?null:t.Variants.length),r(),T("ngModel",t.selected)}}function ti(i,d){if(i&1){let t=x();b(0),o(1,"img",35),g("click",function(e){m(t);let c=s(3).$implicit,h=s(4);return u(h.onZoomImage(e,c==null?null:c.ImageUrl))}),a(),P()}if(i&2){let t=s(3).$implicit;r(),l("src",t==null?null:t.ImageUrl,w)}}function ei(i,d){i&1&&_(0,"img",36)}function ni(i,d){if(i&1&&(b(0),o(1,"td",29)(2,"div",31),C(3,ti,2,1,"ng-container",11)(4,ei,1,0,"ng-template",null,1,j),a()(),o(6,"td",32)(7,"h4",33)(8,"span",34),p(9),a()()(),P()),i&2){let t=B(5),n=s(2).$implicit;r(),l("rowSpan",n==null?null:n.Variants.length),r(2),l("ngIf",n==null?null:n.ImageUrl)("ngIfElse",t),r(3),l("rowSpan",n==null?null:n.Variants.length),r(2),l("matTooltip",(n==null||n.Name==null?null:n.Name.length)>50?n==null?null:n.Name:""),r(),y(" ",n==null?null:n.Name," ")}}function ii(i,d){if(i&1&&(o(0,"div")(1,"a",25),_(2,"img",37),a()()),i&2){let t=d.$implicit;r(),l("href",t.URL,w),r(),l("src",t.Img,w)("matTooltip",t.Name)}}function oi(i,d){if(i&1&&(o(0,"div"),_(1,"img",37),a()),i&2){let t=d.$implicit;r(),l("src",t.Img,w)("matTooltip",t.Name)}}function ai(i,d){if(i&1&&(o(0,"tr"),C(1,Xn,3,2,"ng-container",12)(2,ni,10,6,"ng-container",12),o(3,"td"),p(4),a(),o(5,"td")(6,"span"),p(7),a(),o(8,"span",24)(9,"a",25),_(10,"i",26),a()()(),o(11,"td",27)(12,"div",28),C(13,ii,3,3,"div",23),a()(),o(14,"td",27)(15,"div",28),C(16,oi,2,2,"div",23),a()()()),i&2){let t=d.$implicit,n=d.index,e=s(5);r(),l("ngIf",n==0),r(),l("ngIf",n==0),r(2),y(" ",t.Name," "),r(3),y(" ",t.Code," "),r(2),l("href",e.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(t==null?null:t.ID),w),r(4),l("ngForOf",t==null?null:t.Available),r(3),l("ngForOf",t==null?null:t.NotAvailable)}}function ri(i,d){if(i&1&&(b(0),C(1,ai,17,7,"tr",23),P()),i&2){let t=d.$implicit;r(),l("ngForOf",t.Variants)}}function li(i,d){if(i&1&&(o(0,"tbody"),C(1,ri,2,1,"ng-container",23),a()),i&2){let t=d.ngIf;r(),l("ngForOf",t)}}function ci(i,d){if(i&1&&(b(0),o(1,"div",15)(2,"table",16)(3,"thead",17)(4,"tr"),_(5,"th",18),o(6,"th",19),p(7,"Product"),a(),o(8,"th",20),p(9,"Variant"),a(),o(10,"th",20),p(11,"SKU"),a(),o(12,"th",21),p(13,"Available In"),a(),o(14,"th",22),p(15,"Not Available In"),a()()(),C(16,li,2,1,"tbody",12),k(17,"async"),a()(),P()),i&2){let t=s(2);r(16),l("ngIf",E(17,1,t.data$))}}function si(i,d){i&1&&(o(0,"div",38),_(1,"app-empty-state"),a())}function di(i,d){if(i&1){let t=x();o(0,"span",46),g("click",function(){m(t);let e=s(4);return u(e.getRowCount())}),o(1,"i",47),p(2,"?"),a()()}}function pi(i,d){if(i&1&&(o(0,"span"),p(1),k(2,"number"),a()),i&2){let t=d.ngIf;r(),N(E(2,1,t==null?null:t.Count))}}function mi(i,d){if(i&1){let t=x();o(0,"a",48),g("click",function(){m(t);let e=s(4);return u(e.onNextPage())}),_(1,"i",49),p(2," Next"),a()}}function ui(i,d){if(i&1){let t=x();o(0,"a",50),g("click",function(){m(t);let e=s(4);return u(e.onLastPage())}),_(1,"i",51),p(2," Last"),a()}}function hi(i,d){if(i&1&&(b(0),o(1,"div",39)(2,"div",40)(3,"div",41),p(4),k(5,"number"),C(6,di,3,0,"span",42)(7,pi,3,3,"span",12),k(8,"async"),p(9),a()(),o(10,"div",43),C(11,mi,3,0,"a",44)(12,ui,3,0,"a",45),a()(),P()),i&2){let t=s().ngIf,n=s(2);r(4),y(" Showing 1 - ",E(5,6,t==null?null:t.length)," of "),r(2),l("ngIf",n.paginationService.hideCount),r(),l("ngIf",!n.paginationService.hideCount&&E(8,8,n.rowCount$)),r(2),y(" records ~ ",n.paginationService.footerPageNumber," Page "),r(2),l("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage),r(),l("ngIf",n.paginationService.disableNextButton&&!n.paginationService.goToLastPage)}}function _i(i,d){if(i&1&&(b(0),C(1,hi,13,10,"ng-container",12),P()),i&2){let t=d.ngIf;r(),l("ngIf",(t==null?null:t.length)>0)}}function gi(i,d){if(i&1){let t=x();o(0,"mainpanel",3),g("onSubmit",function(e){m(t);let c=s();return u(c.searchProduct(e))}),o(1,"actions"),C(2,Qn,3,1,"button",4),o(3,"button",5),g("click",function(){m(t);let e=s();return u(e.openScanDialog())}),_(4,"i",6),p(5," Scan Channel "),a(),o(6,"button",7),g("click",function(){m(t);let e=s();return u(e.openExportDialog())}),_(7,"i",8),o(8,"span"),p(9,"Export"),a()()(),o(10,"content")(11,"div",9)(12,"div",10),C(13,ci,18,3,"ng-container",11),k(14,"async"),C(15,si,2,0,"ng-template",null,0,j),a(),C(17,_i,2,1,"ng-container",12),k(18,"async"),a()()()}if(i&2){let t,n=B(16),e=s();l("hideSearchDropdown",!0),r(2),l("ngIf",e.hasSelectionProduct),r(11),l("ngIf",((t=E(14,5,e.data$))==null?null:t.length)>0)("ngIfElse",n),r(4),l("ngIf",E(18,7,e.data$))}}var tn=(()=>{class i{constructor(t,n,e,c,h,v,Pt,kt,rn){this.http=t,this.dialog=n,this.toastr=e,this.route=c,this.productService=h,this.paginationService=v,this.biggerPictureService=Pt,this.authService=kt,this.uploadProductService=rn,this.loaderAPI="product/Load",this.rowCountAPI="product/GetNotInChannelRowCount",this.notChannelAPI="product/GetNotInChannelV2",this.hasSelectionProduct=!1,this.selectedProducts=[],this.channelOptions=kt.getChannels(),this.hostName=this.authService.getDomain()}ngOnInit(){this.initPageLoader(),this.iniData()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.notChannelAPI,this.loader$=this.http.post(`api/${this.loaderAPI}`,{}).pipe(le(t=>{this.filterSearch=t.Filter,this.paginationService.reloadPagination(t.Filter)}))}iniData(){this.data$=this.paginationService.data$.pipe(Et(t=>(t=t.map(n=>(n.Variants=n.Variants.map(e=>(e.Available=this.productService.sortChannel(e.Available),e.NotAvailable=this.productService.sortChannel(e.NotAvailable),e.Available=this.assignLogoChannel(e.Available),e.NotAvailable=this.assignLogoChannel(e.NotAvailable),e)),n.Channel=n?.Variants[0]?.Available,n)),t)))}assignLogoChannel(t){return t=t.map(n=>(n.Img=f.getChannelLogoByTypeId(n.TypeID),n)),t}searchProduct(t){this.filterSearch.text=t,this.paginationService.reloadPagination(this.filterSearch)}scanAllProduct(){let t=this.productService.findChannelById(this.filterSearch.ChannelID,this.channelOptions);this.productService.scanAll(this.filterSearch.ChannelID,this.filterSearch.ScanFull,this.filterSearch.UpdatedProduct,this.filterSearch.Async).subscribe(n=>{this.filterSearch.Async?this.toastr.success("You will be notified when the scan is completed.","Scan Asynchronous"):(this.productService.successToastrScanAllProduct(n,t,!this.filterSearch.UpdatedProduct),this.initPageLoader())})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.filterSearch));t.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.filterSearch.ChannelID=e.ChannelID,this.filterSearch.ScanFull=e.ScanFull,this.filterSearch.UpdatedProduct=e.UpdatedProduct,this.filterSearch.Async=e.Async,this.scanAllProduct()})}getRowCount(){this.paginationService.hideCount=!1,this.rowCount$=this.http.post(`/api/${this.rowCountAPI}`,this.filterSearch)}onNextPage(){this.paginationService.onNextPage(this.filterSearch)}onLastPage(){this.http.post(`/api/${this.rowCountAPI}`,{}).subscribe({next:t=>{this.filterSearch.PageNumber=1,this.paginationService.getAllData(this.filterSearch,t.Count)}})}onZoomImage(t,n){this.biggerPictureService.openBiggerPicture(t,n)}onSelectProduct(t){this.hasSelectionProduct=this.productService.hasSelection(t),this.selectedProducts=this.productService.selectedProduct(t)}uploadMultipleProduct(){this.uploadProductService.setSelectedProduct(this.selectedProducts),this.route.navigate(["/menu/products/upload"])}ngOnDestroy(){this.paginationService.destroy()}openExportDialog(){this.dialog.open(Ge,{data:{title:"Export Not In Channel",pageNumber:this.filterSearch.PageNumber,rowCount:this.filterSearch.RowCount,filterExport:this.filterSearch,getRowCountApi:"product/GetNotInChannelRowCount",exportApi:"product/GetNotInChannelExport"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(Z),S($),S(et),S(H),S(ze),S(Le),S(G),S(xt))}}static{this.\u0275cmp=M({type:i,selectors:[["app-not-in-channel"]],standalone:!1,decls:2,vars:3,consts:[["EMPTY",""],["elsePic",""],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"hideSearchDropdown","onSubmit",4,"ngIf"],["headerTitle","Not in Channel","description","SKU has not been sold on one of channels",3,"onSubmit","hideSearchDropdown"],["class","btn btn-light shadow rounded ms-2",3,"click",4,"ngIf"],["data-cy","scanNotinChannel","type","button",1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[1,"col-md-12"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],["colspan","2",1,"ms-5","text-center",2,"width","450px"],[2,"width","150px"],[2,"width","20%"],[2,"width","16%"],[4,"ngFor","ngForOf"],[1,"ms-1"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"padding-left","0px"],[1,"d-flex","flex-wrap","mb-1"],[1,"text-center",3,"rowSpan"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"padding-right","0px"],[1,"text-start",3,"rowSpan"],[1,"ms-5","fw-normal","text-ellipsis",2,"max-width","26vw !important"],[3,"matTooltip"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],["alt","",1,"channel-logo","cursor-pointer","ms-4","mt-3",3,"src","matTooltip"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[1,"btn-group"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load more for 20 products",3,"click",4,"ngIf"],["role","button","class","btn btn-outline-secondary btn-sm text-primary","title","Load all products",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-share"]],template:function(n,e){n&1&&(C(0,gi,19,9,"mainpanel",2),k(1,"async")),n&2&&l("ngIf",E(1,1,e.loader$))},dependencies:[A,V,fe,U,L,z,it,K,mt,ut],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}thead[_ngcontent-%COMP%]{position:sticky;top:0}.channel-logo[_ngcontent-%COMP%]{width:20px}.w-img[_ngcontent-%COMP%]{width:100%}"]})}}return i})();var Ci=i=>[i],fi=()=>[];function Si(i,d){if(i&1){let t=x();o(0,"button",15),g("click",function(){m(t);let e=s();return u(e.openScanDialog())}),_(1,"i",16),p(2," Scan Channel "),a()}}function xi(i,d){if(i&1){let t=x();b(0),o(1,"button",17),g("click",function(){m(t);let e=s();return u(e.onDownloadAllProduct("SELECTED"))}),_(2,"i",18),p(3),a(),P()}if(i&2){let t,n=s();r(3),y(" Download (",(t=n.productService.selectedProduct(n.products))==null?null:t.length,") ")}}function yi(i,d){if(i&1&&(o(0,"span",19),_(1,"img",20),a(),p(2)),i&2){let t=d.item;r(),l("src",t.Img,w)("alt",t.Name),r(),y(" ",t.Name," ")}}function vi(i,d){if(i&1){let t=x();o(0,"div",21)(1,"app-product-card",22),g("onCheckBoxChange",function(e){let c=m(t).index,h=s();return u(h.onSelectProduct(e,c))})("onDescEvent",function(){let e=m(t).index,c=s();return u(c.onShowVariantDetail(e))})("onDownload",function(){let e=m(t).$implicit,c=s();return u(c.onDownloadProduct(e))})("onScan",function(){let e=m(t).$implicit,c=s();return u(c.onScanChannel(e))}),a()()}if(i&2){let t=d.$implicit;r(),l("showRedirectIcon",!1)("title",t==null?null:t.Name)("image",t==null?null:t.Image)("imageForZoom",t==null?null:t.Image)("code",t==null?null:t.SKU)("description",(t==null||t.Variant==null?null:t.Variant.length)>0?(t==null||t.Variant==null?null:t.Variant.length)+" Variants":null)("downloadButton",!0)("channels",t!=null&&t.Channel?Q(10,Ci,t==null?null:t.Channel):ct(12,fi))("showCheckBox",!0)("scanButton",!0)}}function bi(i,d){i&1&&(b(0),o(1,"div",23),_(2,"app-empty-state"),a(),P())}function Pi(i,d){if(i&1){let t=x();o(0,"div",24)(1,"div",25)(2,"app-custom-paginator",26),g("total",function(){m(t);let e=s();return u(e.getRowCount())})("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())}),a()()()}if(i&2){let t=s();r(2),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickRowCount)}}var en=(()=>{class i{constructor(t,n,e,c,h,v){this.http=t,this.dialog=n,this.productService=e,this.toastrService=c,this.activateRouter=h,this.authService=v,this.searchFilter=new at,this.products=[],this.hasClickRowCount=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.activateRouter.queryParams.subscribe(t=>{t.ID?this.initPageLoader(t.ID):this.initPageLoader(f.GuidEMpty)})}initPageLoader(t){this.productService.loader(t).subscribe(n=>{this.searchFilter=n.Filter,this.searchFilter.PageSize=n.Filter.RowCount,this.getProducts()})}getProducts(){this.http.post("/api/product/GetProductChannelNotPOS",this.searchFilter).subscribe(t=>{this.products=t.Data,this.mapChannelToProduct(),this.setSkuProduct()})}mapChannelToProduct(){let t;this.products=this.products.map(n=>(t=this.channelOptions.find(e=>e.ID==n.ChannelID),t?n.Channel=JSON.parse(JSON.stringify(t)):n.Channel=null,n)).map(n=>(n.Channel&&(n.Channel.Url=n.Url),n))}setSkuProduct(){this.products=this.products.map(t=>(t?.Variant?.length==0?f.IsNotEmpty(t?.ChannelItemSKU)?t.SKU=t?.ChannelItemSKU:t.SKU="SKU not assigned":t.SKU=t?.Variant[0]?.ChannelVariationSKU?t?.Variant[0]?.ChannelVariationSKU:"SKU not assigned",t))}onSearch(t){this.searchFilter.text=t,this.hasClickRowCount=!1,this.getProducts()}onClearChannelFilter(){this.searchFilter.ChannelID=f.GuidEMpty}onScanAll(){let t=this.productService.findChannelById(this.searchFilter.ChannelID,this.channelOptions);this.productService.scanAll(this.searchFilter.ChannelID,this.searchFilter.ScanFull,this.searchFilter.UpdatedProduct,this.searchFilter.Async).subscribe(n=>{this.searchFilter.Async?this.toastrService.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.initPageLoader(f.GuidEMpty),this.productService.successToastrScanAllProduct(n,t,!this.searchFilter.UpdatedProduct)),this.searchFilter.ChannelID=f.GuidEMpty})}openScanDialog(){let t=JSON.parse(JSON.stringify(this.searchFilter));t.ChannelID=f.GuidEMpty,this.dialog.open(R,{data:{filter:t,channelOptions:this.channelOptions},width:"600px"}).afterClosed().pipe(F(e=>f.IsNotEmpty(e))).subscribe(e=>{this.searchFilter.ChannelID=e.ChannelID,this.searchFilter.UpdatedProduct=e.UpdatedProduct,this.searchFilter.ScanFull=e.ScanFull,this.searchFilter.Async=e.Async,this.onScanAll()})}onDownloadAllProduct(t){let n;t=="ALL"?n=this.products:n=this.productService.selectedProduct(this.products),n.length>0&&this.productService.downloadMultipleProduct(n).subscribe({next:()=>{this.getProducts()}})}onSelectProduct(t,n){this.products[n].selected=t}onDownloadProduct(t){confirm(`Are you sure you want to Retrieve product ${t?.Name} from ${t?.Channel.Name} to POS?`)&&this.productService.downloadProduct(t).subscribe({next:()=>{this.getProducts()}})}onScanChannel(t){let n=JSON.parse(JSON.stringify(t));delete n.Channel,this.productService.scanCompareToPos([n]).subscribe(e=>{e.Status?(this.initPageLoader(f.GuidEMpty),this.toastrService.success(`product ${t.Name} have been successfully scanned and synchronized with POS`,"Success")):this.toastrService.error(`Product ${t.Name} is not existed in POS`,"Error")})}onShowVariantDetail(t){let n=this.products[t].Variant;n.length>0&&this.dialog.open(He,{data:{title:this.products[t].Name,variants:n},width:"30%"})}getRowCount(){let t={ChannelID:this.searchFilter.ChannelID,text:this.searchFilter.text,HaveSku:parseInt(this.searchFilter.HaveSku)};this.http.post("/api/product/GetProductChannelNotPOSRowCount",t).subscribe(n=>{this.hasClickRowCount=!0,this.rowCount=n.Count})}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(Z),S(H),S($),S(At),S(G))}}static{this.\u0275cmp=M({type:i,selectors:[["app-not-in-pos"]],standalone:!1,decls:30,vars:13,consts:[["headerTitle","Not in POS","textButton","Search","description","SKU sold in Marketplace but not exist in DEALPOS",3,"onSubmit"],["type","button","data-cy","scanNotInPos","class","btn btn-outline-secondary shadow rounded",3,"click",4,"ngIf"],[4,"ngIf"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp",""],[1,"mt-5"],[1,"fw-bold"],["name","haveSKU",1,"form-control","h-100","pt-3","rounded","mt-2",3,"ngModelChange","ngModel"],[1,"me-5",3,"value"],["type","text","name","Item_id","id","Item_id","placeholder","item id",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row","mt-8"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],["class","row",4,"ngIf"],["type","button","data-cy","scanNotInPos",1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],["type","button",1,"btn","btn-success","shadow-sm","rounded","ms-3",3,"click"],[1,"fa","fa-download"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"onCheckBoxChange","onDescEvent","onDownload","onScan","showRedirectIcon","title","image","imageForZoom","code","description","downloadButton","channels","showCheckBox","scanButton"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),g("onSubmit",function(h){return e.onSearch(h)}),o(1,"actions"),C(2,Si,3,0,"button",1)(3,xi,4,1,"ng-container",2),a(),o(4,"filters")(5,"div")(6,"label",3),p(7,"Channel"),a(),o(8,"ng-select",4),O("ngModelChange",function(h){return D(e.searchFilter.ChannelID,h)||(e.searchFilter.ChannelID=h),h}),C(9,yi,3,3,"ng-template",5),a()(),o(10,"div",6)(11,"label",7),p(12,"SKU Assigned"),a(),o(13,"mat-radio-group",8),O("ngModelChange",function(h){return D(e.searchFilter.HaveSku,h)||(e.searchFilter.HaveSku=h),h}),o(14,"mat-radio-button",9),p(15," All "),a(),o(16,"mat-radio-button",9),p(17," Yes "),a(),o(18,"mat-radio-button",9),p(19," No "),a()()(),o(20,"div",6)(21,"label",7),p(22,"Item ID"),a(),o(23,"input",10),O("ngModelChange",function(h){return D(e.searchFilter.Item_id,h)||(e.searchFilter.Item_id=h),h}),a()()(),o(24,"content")(25,"div",11)(26,"div",12),C(27,vi,2,13,"div",13)(28,bi,3,0,"ng-container",2),a(),C(29,Pi,3,4,"div",14),a()()()),n&2&&(r(2),l("ngIf",!e.productService.hasSelection(e.products)),r(),l("ngIf",e.productService.hasSelection(e.products)),r(5),l("clearable",!0)("items",e.channelOptions),T("ngModel",e.searchFilter.ChannelID),r(5),T("ngModel",e.searchFilter.HaveSku),r(),l("value",0),r(2),l("value",1),r(2),l("value",2),r(5),T("ngModel",e.searchFilter.Item_id),r(4),l("ngForOf",e.products),r(),l("ngIf",e.products.length==0),r(),l("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[A,V,ht,U,L,z,nt,gt,$t,Wt,q,rt,K],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.itemTitle[_ngcontent-%COMP%]{cursor:pointer}"]})}}return i})();function Ii(i,d){if(i&1&&(o(0,"span",9),_(1,"img",10),a(),p(2)),i&2){let t=d.item,n=s();r(),l("src",n.getChannelLogo(t.TypeID),w),r(),y(" ",t.Name," ")}}function wi(i,d){if(i&1&&(o(0,"div",11),_(1,"app-duplicate-product-card",12),a()),i&2){let t=d.$implicit,n=d.index;r(),l("imageForZoom",t.ImageUrl)("title",t.Name)("code",t.Code)("id",n)("image",t.ThumbnailURL)("channels",t.Channels)}}function Mi(i,d){i&1&&(b(0),o(1,"div",13),_(2,"app-empty-state"),a(),P())}function Ti(i,d){if(i&1){let t=x();b(0),o(1,"div",14)(2,"div",15)(3,"app-custom-paginator",16),g("next",function(){m(t);let e=s();return u(e.getProducts())})("previous",function(){m(t);let e=s();return u(e.getProducts())})("total",function(){m(t);let e=s();return u(e.getRowCount())}),a()()(),P()}if(i&2){let t=s();r(3),l("filter",t.searchFilter)("totaldata",t.products==null?null:t.products.length)("paginationTotal",t.rowCount)("hasClicked",t.hasClickedRowCount)}}var nn=(()=>{class i{constructor(t,n,e){this.httpService=t,this.productService=n,this.authService=e,this.searchFilter=new at,this.products=[],this.hasClickedRowCount=!1,this.getPageLoader(),this.channelOptions=e.getChannels()}getPageLoader(){this.productService.loader().subscribe(t=>{this.searchFilter=t.Filter,this.searchFilter.PageSize=t.Filter.RowCount,this.getProducts()})}getProducts(){let t={ListChannelID:this.searchFilter.ListChannelID,RowCount:this.searchFilter.RowCount,PageNumber:this.searchFilter.PageNumber,text:this.searchFilter.text};this.httpService.post("/api/product/GetDuplicateInChannel",t).subscribe(n=>{this.products=n.Data})}onSearch(t){this.searchFilter.text=t,this.hasClickedRowCount=!1,this.getProducts()}onClearFilter(){this.searchFilter.ChannelID=f.GuidEMpty}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}getRowCount(){let t={text:this.searchFilter.text,ChannelID:this.searchFilter.ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",t).subscribe(n=>{this.hasClickedRowCount=!0,this.rowCount=n.Total})}static{this.\u0275fac=function(n){return new(n||i)(S(W),S(H),S(G))}}static{this.\u0275cmp=M({type:i,selectors:[["app-duplicate-sku"]],standalone:!1,decls:14,vars:7,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["container",""],[1,"mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clear","multiple","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid"],[1,"row","mt-8","mx-1"],["class","col-12 col-md-6 col-xl-4 px-3 my-3",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[3,"imageForZoom","title","code","id","image","channels"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(n,e){n&1&&(o(0,"mainpanel",0),g("onSubmit",function(h){return e.onSearch(h)}),o(1,"filters")(2,"div",1)(3,"div")(4,"h6",2),p(5,"Channel"),a(),o(6,"ng-select",3),O("ngModelChange",function(h){return D(e.searchFilter.ListChannelID,h)||(e.searchFilter.ListChannelID=h),h}),g("clear",function(){return e.onClearFilter()}),C(7,Ii,3,2,"ng-template",4),a()()()(),o(8,"content")(9,"div",5)(10,"div",6),C(11,wi,2,6,"div",7)(12,Mi,3,0,"ng-container",8),a(),C(13,Ti,4,4,"ng-container",8),a()()()),n&2&&(r(6),l("multiple",!0)("clearable",!0)("items",e.channelOptions),T("ngModel",e.searchFilter.ListChannelID),r(5),l("ngForOf",e.products),r(),l("ngIf",(e.products==null?null:e.products.length)==0),r(),l("ngIf",(e.products==null?null:e.products.length)>0))},dependencies:[A,V,U,L,z,nt,gt,Lt,Gt,q,K],encapsulation:2})}}return i})();var Di=()=>["/menu/products/status/sold-in-channel"],on=i=>({ID:i}),Oi=()=>["/menu/products/status/not-in-pos"];function ki(i,d){if(i&1&&(b(0),p(1),P()),i&2){let t=s().$implicit;r(),y(" ",t.Count," ")}}function Ei(i,d){if(i&1){let t=x();o(0,"span",26),g("click",function(){m(t);let e=s().$implicit,c=s(2);return u(c.getLiveProductCount(e.ID,e))}),_(1,"i",27),a()}}function Fi(i,d){if(i&1){let t=x();o(0,"tr")(1,"td"),_(2,"img",17),o(3,"span",18),p(4),a()(),o(5,"td",19),C(6,ki,2,1,"ng-container",6)(7,Ei,2,0,"ng-template",null,1,j),a(),o(9,"td",19)(10,"a",20),p(11),k(12,"number"),a()(),o(13,"td",19)(14,"a",20),p(15),k(16,"number"),a()(),o(17,"td"),p(18),k(19,"date"),a(),o(20,"td")(21,"div",21)(22,"button",22),g("click",function(){let e=m(t).$implicit,c=s(2);return u(c.onScanChannel(e))}),_(23,"i",23),p(24," Scan "),a(),o(25,"button",24),g("click",function(){let e=m(t).$implicit,c=s(2);return u(c.onClearCache(e.ID))}),_(26,"i",25),p(27," Clear "),a()()()()}if(i&2){let t=d.$implicit,n=B(8),e=s(2);r(2),l("src",e.getChannelLogo(t.TypeID),w),r(2),N(t.Name),r(2),l("ngIf",t.Count!==void 0)("ngIfElse",n),r(4),l("routerLink",ct(18,Di))("queryParams",Q(19,on,t.ID)),r(),y(" ",E(12,11,t.SoldInChannel)," "),r(3),l("routerLink",ct(21,Oi))("queryParams",Q(22,on,t.ID)),r(),y(" ",E(16,13,t.NotInPOS)," "),r(3),y("",t.LastSync?he(19,15,t.LastSync,"dd MMM yyyy HH:mm"):"Never"," ")}}function Vi(i,d){if(i&1&&(b(0),o(1,"div",7)(2,"table",8)(3,"thead",9)(4,"tr",10)(5,"th"),p(6,"Channel"),a(),o(7,"th",11),p(8,"Live Product"),a(),o(9,"th",12),p(10,"Sold In Channel"),a(),o(11,"th",13),p(12,"Product Not in POS"),a(),o(13,"th",14),p(14,"Last Sync"),a(),_(15,"th",15),a()(),o(16,"tbody"),C(17,Fi,28,24,"tr",16),k(18,"async"),a()()(),P()),i&2){let t,n=s();r(17),l("ngForOf",(t=E(18,1,n.channels$))==null?null:t.Data)}}function Ni(i,d){i&1&&(o(0,"div",28),_(1,"app-empty-state"),a())}var an=(()=>{class i{constructor(t,n,e,c){this.productService=t,this.toastr=n,this.dialog=e,this.authService=c,this.destroy$=new ae,this.channelOptions=c.getChannels()}ngOnInit(){this.setObsProductStatistic()}setObsProductStatistic(){this.channels$=this.productService.getProductStatistic()}getLiveProductCount(t,n){this.productService.getTotalProductLive(t).pipe(Jt(this.destroy$)).subscribe(e=>{n.Count=e.Count})}onScanChannel(t){this.dialog.open(R,{width:"700px",data:{channelOptions:this.channelOptions,filter:{ChannelID:t.ID},disabledChannelOption:!0}}).afterClosed().pipe(F(n=>f.IsNotEmpty(n))).subscribe(n=>{this.scanAllProduct(t.ID,n)})}scanAllProduct(t,n){let e=this.productService.findChannelById(t,this.channelOptions);this.productService.scanAll(n.ChannelID,n.ScanFull,n.UpdatedProduct,n.Async).pipe(F(c=>c)).subscribe(c=>{n.Async?this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"}):(this.productService.successToastrScanAllProduct(c,e,!n.UpdatedProduct),this.setObsProductStatistic())})}onClearCache(t){confirm("Are you sure you want to Clear Cache? This Process will remove your product integration to marketplace")&&this.productService.clearCacheChannel(t).pipe(Jt(this.destroy$)).subscribe(e=>{this.toastr.success("Successfully cleared cache","Success"),this.setObsProductStatistic()})}getChannelLogo(t){return f.getChannelLogoByTypeId(t)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(n){return new(n||i)(S(H),S($),S(Z),S(G))}}static{this.\u0275cmp=M({type:i,selectors:[["app-channel-statistic"]],standalone:!1,decls:9,vars:6,consts:[["EMPTY",""],["QUESTION",""],["headerTitle","Products Statistic",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[1,"text-center",2,"width","13rem"],[1,"text-center",2,"width","9rem"],[1,"text-center",2,"width","14rem"],[2,"width","10rem"],[2,"width","12rem"],[4,"ngFor","ngForOf"],[2,"width","24px","height","24px",3,"src"],[1,"ms-3"],[1,"text-center"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-sm","btn-secondary","fs-6",3,"click"],[1,"fa","fa-spinner"],[1,"btn","btn-sm","btn-secondary","fs-6","ms-3",3,"click"],[1,"fa","fa-trash"],["matTooltip","Click to see total live product",1,"cursor-pointer","fs-5","text-primary",3,"click"],[1,"fa-solid","fa-circle-question","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(n,e){if(n&1&&(o(0,"mainpanel",2)(1,"content")(2,"div",3)(3,"div",4)(4,"div",5),C(5,Vi,19,3,"ng-container",6),k(6,"async"),C(7,Ni,2,0,"ng-template",null,0,j),a()()()()()),n&2){let c,h=B(8);l("hideSearchBox",!0)("hideSearchDropdown",!0),r(5),l("ngIf",((c=E(6,4,e.channels$))==null||c.Data==null?null:c.Data.length)>0)("ngIfElse",h)}},dependencies:[A,V,z,it,Ut,K,mt,ut,_e],encapsulation:2})}}return i})();var Ai=[{component:Je,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",component:Qe,canActivate:[st],data:{title:"Products in POS"}},{path:"sold-in-channel",component:Xe,canActivate:[st],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",component:tn,canActivate:[st],data:{title:"Products not in Channel"}},{path:"not-in-pos",component:en,canActivate:[st],data:{title:"Products not in POS"}},{path:"duplicate-sku",component:nn,canActivate:[st],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",component:an,canActivate:[st],data:{title:"Channel Statistic"}}]}],nr=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=de({type:i})}static{this.\u0275inj=ce({imports:[Y,_t,Ie,ot,xe,Ke,Ee,Me,Gt,q,rt,Ce.forChild(Ai),We,Ne,bt]})}}return i})();export{nr as StatusModule};
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import{a as G,b as mt,c as Ut,f as xt,h as Yt,l as ut,n as zt}from"./chunk-D54NUPYF.js";import{A as et,B as kt,C as it,S as Kt,W as Gt,Y as Tt,Z as q,b as Mt,d as Nt,ea as K,p as Zt,q as Rt,t as tt,z as qt}from"./chunk-4G3QN54S.js";import{c as Qt,d as Et,f as Vt,i as Lt,j as Dt,k as Ft}from"./chunk-K5XRGNWG.js";import{d as wt,f as Wt,g as St,h as It,i as bt,n as Z,o as pt}from"./chunk-GPEVUTDI.js";import{Aa as _t,Ac as I,Ca as C,Dc as ct,Eb as z,Fb as lt,Ib as O,Ka as x,Kb as _,La as yt,Oc as N,Pc as At,Qc as F,Rc as ht,Sc as Ct,Vb as D,Wb as c,Xb as Bt,Yb as vt,Yc as $t,Zb as jt,_b as w,ad as dt,gc as E,hc as V,ic as B,ja as P,jc as j,ka as st,kc as A,lc as $,mc as rt,pa as H,qb as g,rc as at,sc as u,tc as W,uc as Q,wb as ot,xa as Ht,xc as k,ya as J,yc as nt,za as X,zc as S}from"./chunk-T5ONJF63.js";import{a as R,b as Ot}from"./chunk-K2H6WANG.js";var ii=(()=>{class i extends xt{static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275cmp=z({type:i,selectors:[["CheckIcon"]],features:[O],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(e,n){e&1&&(_t(),E(0,"svg",0),B(1,"path",1),V()),e&2&&(w(n.getClassNames()),D("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role))},encapsulation:2})}return i})();var Jt=["content"],le=["overlay"],re=["*"],ae=(i,r,t,e,n,s,o,l,f,p,d,b,y,T)=>({"p-overlay p-component":!0,"p-overlay-modal p-overlay-mask p-overlay-mask-enter":i,"p-overlay-center":r,"p-overlay-top":t,"p-overlay-top-start":e,"p-overlay-top-end":n,"p-overlay-bottom":s,"p-overlay-bottom-start":o,"p-overlay-bottom-end":l,"p-overlay-left":f,"p-overlay-left-start":p,"p-overlay-left-end":d,"p-overlay-right":b,"p-overlay-right-start":y,"p-overlay-right-end":T}),ce=(i,r,t)=>({showTransitionParams:i,hideTransitionParams:r,transform:t}),he=i=>({value:"visible",params:i}),de=i=>({mode:i}),pe=i=>({$implicit:i});function me(i,r){i&1&&$(0)}function ue(i,r){if(i&1){let t=rt();E(0,"div",3,1),at("click",function(n){J(t);let s=u(2);return X(s.onOverlayContentClick(n))})("@overlayContentAnimation.start",function(n){J(t);let s=u(2);return X(s.onOverlayContentAnimationStart(n))})("@overlayContentAnimation.done",function(n){J(t);let s=u(2);return X(s.onOverlayContentAnimationDone(n))}),Q(2),_(3,me,1,0,"ng-container",4),V()}if(i&2){let t=u(2);w(t.contentStyleClass),c("ngStyle",t.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",F(11,he,Ct(7,ce,t.showTransitionOptions,t.hideTransitionOptions,t.transformOptions[t.modal?t.overlayResponsiveDirection:"default"]))),g(3),c("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",F(15,pe,F(13,de,t.overlayMode)))}}function fe(i,r){if(i&1){let t=rt();E(0,"div",3,0),at("click",function(){J(t);let n=u();return X(n.onOverlayClick())}),_(2,ue,4,17,"div",2),V()}if(i&2){let t=u();w(t.styleClass),c("ngStyle",t.style)("ngClass",$t(5,ae,[t.modal,t.modal&&t.overlayResponsiveDirection==="center",t.modal&&t.overlayResponsiveDirection==="top",t.modal&&t.overlayResponsiveDirection==="top-start",t.modal&&t.overlayResponsiveDirection==="top-end",t.modal&&t.overlayResponsiveDirection==="bottom",t.modal&&t.overlayResponsiveDirection==="bottom-start",t.modal&&t.overlayResponsiveDirection==="bottom-end",t.modal&&t.overlayResponsiveDirection==="left",t.modal&&t.overlayResponsiveDirection==="left-start",t.modal&&t.overlayResponsiveDirection==="left-end",t.modal&&t.overlayResponsiveDirection==="right",t.modal&&t.overlayResponsiveDirection==="right-start",t.modal&&t.overlayResponsiveDirection==="right-end"])),g(2),c("ngIf",t.visible)}}var ge=({dt:i})=>`
|
|
2
|
+
.p-overlay {
|
|
3
|
+
position: absolute;
|
|
4
|
+
top: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.p-overlay-modal {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
position: fixed;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.p-overlay-content {
|
|
19
|
+
transform-origin: inherit;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.p-overlay-modal > .p-overlay-content {
|
|
23
|
+
z-index: 1;
|
|
24
|
+
width: 90%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Position */
|
|
28
|
+
/* top */
|
|
29
|
+
.p-overlay-top {
|
|
30
|
+
align-items: flex-start;
|
|
31
|
+
}
|
|
32
|
+
.p-overlay-top-start {
|
|
33
|
+
align-items: flex-start;
|
|
34
|
+
justify-content: flex-start;
|
|
35
|
+
}
|
|
36
|
+
.p-overlay-top-end {
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
justify-content: flex-end;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* bottom */
|
|
42
|
+
.p-overlay-bottom {
|
|
43
|
+
align-items: flex-end;
|
|
44
|
+
}
|
|
45
|
+
.p-overlay-bottom-start {
|
|
46
|
+
align-items: flex-end;
|
|
47
|
+
justify-content: flex-start;
|
|
48
|
+
}
|
|
49
|
+
.p-overlay-bottom-end {
|
|
50
|
+
align-items: flex-end;
|
|
51
|
+
justify-content: flex-end;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* left */
|
|
55
|
+
.p-overlay-left {
|
|
56
|
+
justify-content: flex-start;
|
|
57
|
+
}
|
|
58
|
+
.p-overlay-left-start {
|
|
59
|
+
justify-content: flex-start;
|
|
60
|
+
align-items: flex-start;
|
|
61
|
+
}
|
|
62
|
+
.p-overlay-left-end {
|
|
63
|
+
justify-content: flex-start;
|
|
64
|
+
align-items: flex-end;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* right */
|
|
68
|
+
.p-overlay-right {
|
|
69
|
+
justify-content: flex-end;
|
|
70
|
+
}
|
|
71
|
+
.p-overlay-right-start {
|
|
72
|
+
justify-content: flex-end;
|
|
73
|
+
align-items: flex-start;
|
|
74
|
+
}
|
|
75
|
+
.p-overlay-right-end {
|
|
76
|
+
justify-content: flex-end;
|
|
77
|
+
align-items: flex-end;
|
|
78
|
+
}
|
|
79
|
+
`,Xt=(()=>{class i extends K{name="overlay";theme=ge;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275prov=P({token:i,factory:i.\u0275fac})}return i})(),_e=Dt([Vt({transform:"{{transform}}",opacity:0}),Et("{{showTransitionParams}}")]),ye=Dt([Et("{{hideTransitionParams}}",Vt({transform:"{{transform}}",opacity:0}))]),bi=(()=>{class i extends G{overlayService;zone;get visible(){return this._visible}set visible(t){this._visible=t,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(t){this._mode=t}get style(){return ut.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(t){this._style=t}get styleClass(){return ut.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(t){this._styleClass=t}get contentStyle(){return ut.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(t){this._contentStyle=t}get contentStyleClass(){return ut.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(t){this._contentStyleClass=t}get target(){let t=this._target||this.overlayOptions?.target;return t===void 0?"@prev":t}set target(t){this._target=t}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(t){this._appendTo=t}get autoZIndex(){let t=this._autoZIndex||this.overlayOptions?.autoZIndex;return t===void 0?!0:t}set autoZIndex(t){this._autoZIndex=t}get baseZIndex(){let t=this._baseZIndex||this.overlayOptions?.baseZIndex;return t===void 0?0:t}set baseZIndex(t){this._baseZIndex=t}get showTransitionOptions(){let t=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return t===void 0?".12s cubic-bezier(0, 0, 0.2, 1)":t}set showTransitionOptions(t){this._showTransitionOptions=t}get hideTransitionOptions(){let t=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return t===void 0?".1s linear":t}set hideTransitionOptions(t){this._hideTransitionOptions=t}get listener(){return this._listener||this.overlayOptions?.listener}set listener(t){this._listener=t}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(t){this._responsive=t}get options(){return this._options}set options(t){this._options=t}visibleChange=new x;onBeforeShow=new x;onShow=new x;onBeforeHide=new x;onHide=new x;onAnimationStart=new x;onAnimationDone=new x;overlayViewChild;contentViewChild;contentTemplate;templates;_contentTemplate;_visible=!1;_mode;_style;_styleClass;_contentStyle;_contentStyleClass;_target;_appendTo;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_listener;_responsive;_options;modalVisible=!1;isOverlayClicked=!1;isOverlayContentClicked=!1;scrollHandler;documentClickListener;documentResizeListener;_componentStyle=H(Xt);documentKeyboardListener;window;transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"};get modal(){if(pt(this.platformId))return this.mode==="modal"||this.overlayResponsiveOptions&&this.document.defaultView?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return R(R({},this.config?.overlayOptions),this.options)}get overlayResponsiveOptions(){return R(R({},this.overlayOptions?.responsive),this.responsive)}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return qt(this.target,this.el?.nativeElement)}constructor(t,e){super(),this.overlayService=t,this.zone=e}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"content":this._contentTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}show(t,e=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),e&&Rt(this.targetEl),this.modal&&Mt(this.document?.body,"p-overflow-hidden")}hide(t,e=!1){if(this.visible)this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),e&&Rt(this.targetEl),this.modal&&Nt(this.document?.body,"p-overflow-hidden");else return}alignOverlay(){!this.modal&&mt.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(t){this._visible=t,this.visibleChange.emit(t)}onOverlayClick(){this.isOverlayClicked=!0}onOverlayContentClick(t){this.overlayService.add({originalEvent:t,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(t){switch(t.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&zt.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),mt.appendOverlay(this.overlayEl,this.appendTo==="body"?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&Mt(this.overlayEl,"p-overlay-mask-leave");break}this.handleEvents("onAnimationStart",t)}onOverlayContentAnimationDone(t){let e=this.overlayEl||t.element.parentElement;switch(t.toState){case"visible":this.visible&&(this.show(e,!0),this.bindListeners());break;case"void":if(!this.visible){this.hide(e,!0),this.modalVisible=!1,this.unbindListeners(),mt.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),zt.clear(e),this.cd.markForCheck();break}}this.handleEvents("onAnimationDone",t)}handleEvents(t,e){this[t].emit(e),this.options&&this.options[t]&&this.options[t](e),this.config?.overlayOptions&&(this.config?.overlayOptions)[t]&&(this.config?.overlayOptions)[t](e)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Ut(this.targetEl,t=>{(this.listener?this.listener(t,{type:"scroll",mode:this.overlayMode,valid:!0}):!0)&&this.hide(t,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",t=>{let n=!(this.targetEl&&(this.targetEl.isSameNode(t.target)||!this.isOverlayClicked&&this.targetEl.contains(t.target)))&&!this.isOverlayContentClicked;(this.listener?this.listener(t,{type:"outside",mode:this.overlayMode,valid:t.which!==3&&n}):n)&&this.hide(t),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.document.defaultView,"resize",t=>{(this.listener?this.listener(t,{type:"resize",mode:this.overlayMode,valid:!it()}):!it())&&this.hide(t,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.document.defaultView,"keydown",t=>{if(this.overlayOptions.hideOnEscape===!1||t.code!=="Escape")return;(this.listener?this.listener(t,{type:"keydown",mode:this.overlayMode,valid:!it()}):!it())&&this.zone.run(()=>{this.hide(t,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(mt.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),zt.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners(),super.ngOnDestroy()}static \u0275fac=function(e){return new(e||i)(ot(Gt),ot(yt))};static \u0275cmp=z({type:i,selectors:[["p-overlay"]],contentQueries:function(e,n,s){if(e&1&&(k(s,Jt,4),k(s,Tt,4)),e&2){let o;S(o=I())&&(n.contentTemplate=o.first),S(o=I())&&(n.templates=o)}},viewQuery:function(e,n){if(e&1&&(nt(le,5),nt(Jt,5)),e&2){let s;S(s=I())&&(n.overlayViewChild=s.first),S(s=I())&&(n.contentViewChild=s.first)}},inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[N([Xt]),O],ngContentSelectors:re,decls:1,vars:1,consts:[["overlay",""],["content",""],[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"click","ngStyle","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){e&1&&(W(),_(0,fe,3,20,"div",2)),e&2&&c("ngIf",n.modalVisible)},dependencies:[Z,wt,St,bt,It,q],encapsulation:2,data:{animation:[Qt("overlayContentAnimation",[Lt(":enter",[Ft(_e)]),Lt(":leave",[Ft(ye)])])]},changeDetection:0})}return i})();var Ei=(()=>{class i extends xt{pathId;ngOnInit(){this.pathId="url(#"+Kt()+")"}static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275cmp=z({type:i,selectors:[["SearchIcon"]],features:[O],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(e,n){e&1&&(_t(),E(0,"svg",0)(1,"g"),B(2,"path",1),V(),E(3,"defs")(4,"clipPath",2),B(5,"rect",3),V()()()),e&2&&(w(n.getClassNames()),D("aria-label",n.ariaLabel)("aria-hidden",n.ariaHidden)("role",n.role),g(),D("clip-path",n.pathId),g(3),c("id",n.pathId))},encapsulation:2})}return i})();var te=["content"],ve=["item"],Ce=["loader"],we=["loadericon"],Se=["element"],Ie=["*"],be=(i,r,t)=>({"p-virtualscroller":!0,"p-virtualscroller-inline":i,"p-virtualscroller-both p-both-scroll":r,"p-virtualscroller-horizontal p-horizontal-scroll":t}),Pt=(i,r)=>({$implicit:i,options:r}),Te=i=>({"p-virtualscroller-content":!0,"p-virtualscroller-loading ":i}),xe=i=>({"p-virtualscroller-loader-mask":i}),ze=i=>({numCols:i}),ie=i=>({options:i}),Oe=()=>({styleClass:"p-virtualscroller-loading-icon"}),Ee=(i,r)=>({rows:i,columns:r});function Ve(i,r){i&1&&$(0)}function Le(i,r){if(i&1&&(j(0),_(1,Ve,1,0,"ng-container",10),A()),i&2){let t=u(2);g(),c("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",ht(2,Pt,t.loadedItems,t.getContentOptions()))}}function De(i,r){i&1&&$(0)}function Fe(i,r){if(i&1&&(j(0),_(1,De,1,0,"ng-container",10),A()),i&2){let t=r.$implicit,e=r.index,n=u(3);g(),c("ngTemplateOutlet",n.itemTemplate||n._itemTemplate)("ngTemplateOutletContext",ht(2,Pt,t,n.getOptions(e)))}}function Me(i,r){if(i&1&&(E(0,"div",11,3),_(2,Fe,2,5,"ng-container",12),V()),i&2){let t=u(2);jt(t.contentStyle),w(t.contentStyleClass),c("ngClass",F(8,Te,t.d_loading)),D("data-pc-section","content"),g(2),c("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy)}}function Re(i,r){if(i&1&&B(0,"div",13),i&2){let t=u(2);c("ngStyle",t.spacerStyle),D("data-pc-section","spacer")}}function ke(i,r){i&1&&$(0)}function Pe(i,r){if(i&1&&(j(0),_(1,ke,1,0,"ng-container",10),A()),i&2){let t=r.index,e=u(4);g(),c("ngTemplateOutlet",e.loaderTemplate||e._loaderTemplate)("ngTemplateOutletContext",F(4,ie,e.getLoaderOptions(t,e.both&&F(2,ze,e.numItemsInViewport.cols))))}}function He(i,r){if(i&1&&(j(0),_(1,Pe,2,6,"ng-container",15),A()),i&2){let t=u(3);g(),c("ngForOf",t.loaderArr)}}function Be(i,r){i&1&&$(0)}function je(i,r){if(i&1&&(j(0),_(1,Be,1,0,"ng-container",10),A()),i&2){let t=u(4);g(),c("ngTemplateOutlet",t.loaderIconTemplate||t._loaderIconTemplate)("ngTemplateOutletContext",F(3,ie,At(2,Oe)))}}function Ae(i,r){i&1&&B(0,"SpinnerIcon",16),i&2&&(c("styleClass","p-virtualscroller-loading-icon pi-spin"),D("data-pc-section","loadingIcon"))}function $e(i,r){if(i&1&&_(0,je,2,5,"ng-container",6)(1,Ae,1,2,"ng-template",null,5,dt),i&2){let t=ct(2),e=u(3);c("ngIf",e.loaderIconTemplate||e._loaderIconTemplate)("ngIfElse",t)}}function We(i,r){if(i&1&&(E(0,"div",14),_(1,He,2,1,"ng-container",6)(2,$e,3,2,"ng-template",null,4,dt),V()),i&2){let t=ct(3),e=u(2);c("ngClass",F(4,xe,!e.loaderTemplate)),D("data-pc-section","loader"),g(),c("ngIf",e.loaderTemplate||e._loaderTemplate)("ngIfElse",t)}}function Qe(i,r){if(i&1){let t=rt();j(0),E(1,"div",7,1),at("scroll",function(n){J(t);let s=u();return X(s.onContainerScroll(n))}),_(3,Le,2,5,"ng-container",6)(4,Me,3,10,"ng-template",null,2,dt)(6,Re,1,2,"div",8)(7,We,4,6,"div",9),V(),A()}if(i&2){let t=ct(5),e=u();g(),w(e._styleClass),c("ngStyle",e._style)("ngClass",Ct(12,be,e.inline,e.both,e.horizontal)),D("id",e._id)("tabindex",e.tabindex)("data-pc-name","scroller")("data-pc-section","root"),g(2),c("ngIf",e.contentTemplate||e._contentTemplate)("ngIfElse",t),g(3),c("ngIf",e._showSpacer),g(),c("ngIf",!e.loaderDisabled&&e._showLoader&&e.d_loading)}}function Ne(i,r){i&1&&$(0)}function Ze(i,r){if(i&1&&(j(0),_(1,Ne,1,0,"ng-container",10),A()),i&2){let t=u(2);g(),c("ngTemplateOutlet",t.contentTemplate||t._contentTemplate)("ngTemplateOutletContext",ht(5,Pt,t.items,ht(2,Ee,t._items,t.loadedColumns)))}}function qe(i,r){if(i&1&&(Q(0),_(1,Ze,2,8,"ng-container",17)),i&2){let t=u();g(),c("ngIf",t.contentTemplate||t._contentTemplate)}}var Ke=({dt:i})=>`
|
|
80
|
+
.p-virtualscroller {
|
|
81
|
+
position: relative;
|
|
82
|
+
overflow: auto;
|
|
83
|
+
contain: strict;
|
|
84
|
+
transform: translateZ(0);
|
|
85
|
+
will-change: scroll-position;
|
|
86
|
+
outline: 0 none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.p-virtualscroller-content {
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 0;
|
|
92
|
+
left: 0;
|
|
93
|
+
min-height: 100%;
|
|
94
|
+
min-width: 100%;
|
|
95
|
+
will-change: transform;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.p-virtualscroller-spacer {
|
|
99
|
+
position: absolute;
|
|
100
|
+
top: 0;
|
|
101
|
+
left: 0;
|
|
102
|
+
height: 1px;
|
|
103
|
+
width: 1px;
|
|
104
|
+
transform-origin: 0 0;
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.p-virtualscroller-loader {
|
|
109
|
+
position: sticky;
|
|
110
|
+
top: 0;
|
|
111
|
+
left: 0;
|
|
112
|
+
width: 100%;
|
|
113
|
+
height: 100%;
|
|
114
|
+
background: ${i("virtualscroller.loader.mask.background")};
|
|
115
|
+
color: ${i("virtualscroller.loader.mask.color")};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.p-virtualscroller-loader-mask {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.p-virtualscroller-loading-icon {
|
|
125
|
+
font-size: ${i("virtualscroller.loader.icon.size")};
|
|
126
|
+
width: ${i("virtualscroller.loader.icon.size")};
|
|
127
|
+
height: ${i("virtualscroller.loader.icon.size")};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.p-virtualscroller-horizontal > .p-virtualscroller-content {
|
|
131
|
+
display: flex;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.p-virtualscroller-inline .p-virtualscroller-content {
|
|
135
|
+
position: static;
|
|
136
|
+
}
|
|
137
|
+
`,ee=(()=>{class i extends K{name="virtualscroller";theme=Ke;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275prov=P({token:i,factory:i.\u0275fac})}return i})();var Ge=(()=>{class i extends G{zone;get id(){return this._id}set id(t){this._id=t}get style(){return this._style}set style(t){this._style=t}get styleClass(){return this._styleClass}set styleClass(t){this._styleClass=t}get tabindex(){return this._tabindex}set tabindex(t){this._tabindex=t}get items(){return this._items}set items(t){this._items=t}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t}get scrollHeight(){return this._scrollHeight}set scrollHeight(t){this._scrollHeight=t}get scrollWidth(){return this._scrollWidth}set scrollWidth(t){this._scrollWidth=t}get orientation(){return this._orientation}set orientation(t){this._orientation=t}get step(){return this._step}set step(t){this._step=t}get delay(){return this._delay}set delay(t){this._delay=t}get resizeDelay(){return this._resizeDelay}set resizeDelay(t){this._resizeDelay=t}get appendOnly(){return this._appendOnly}set appendOnly(t){this._appendOnly=t}get inline(){return this._inline}set inline(t){this._inline=t}get lazy(){return this._lazy}set lazy(t){this._lazy=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(t){this._loaderDisabled=t}get columns(){return this._columns}set columns(t){this._columns=t}get showSpacer(){return this._showSpacer}set showSpacer(t){this._showSpacer=t}get showLoader(){return this._showLoader}set showLoader(t){this._showLoader=t}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(t){this._numToleratedItems=t}get loading(){return this._loading}set loading(t){this._loading=t}get autoSize(){return this._autoSize}set autoSize(t){this._autoSize=t}get trackBy(){return this._trackBy}set trackBy(t){this._trackBy=t}get options(){return this._options}set options(t){this._options=t,t&&typeof t=="object"&&(Object.entries(t).forEach(([e,n])=>this[`_${e}`]!==n&&(this[`_${e}`]=n)),Object.entries(t).forEach(([e,n])=>this[`${e}`]!==n&&(this[`${e}`]=n)))}onLazyLoad=new x;onScroll=new x;onScrollIndexChange=new x;elementViewChild;contentViewChild;height;_id;_style;_styleClass;_tabindex=0;_items;_itemSize=0;_scrollHeight;_scrollWidth;_orientation="vertical";_step=0;_delay=0;_resizeDelay=10;_appendOnly=!1;_inline=!1;_lazy=!1;_disabled=!1;_loaderDisabled=!1;_columns;_showSpacer=!0;_showLoader=!1;_numToleratedItems;_loading;_autoSize=!1;_trackBy;_options;d_loading=!1;d_numToleratedItems;contentEl;contentTemplate;itemTemplate;loaderTemplate;loaderIconTemplate;templates;_contentTemplate;_itemTemplate;_loaderTemplate;_loaderIconTemplate;first=0;last=0;page=0;isRangeChanged=!1;numItemsInViewport=0;lastScrollPos=0;lazyLoadState={};loaderArr=[];spacerStyle={};contentStyle={};scrollTimeout;resizeTimeout;initialized=!1;windowResizeListener;defaultWidth;defaultHeight;defaultContentWidth;defaultContentHeight;_contentStyleClass;get contentStyleClass(){return this._contentStyleClass}set contentStyleClass(t){this._contentStyleClass=t}get vertical(){return this._orientation==="vertical"}get horizontal(){return this._orientation==="horizontal"}get both(){return this._orientation==="both"}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(t=>this._columns?t:t.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}_componentStyle=H(ee);constructor(t){super(),this.zone=t}ngOnInit(){super.ngOnInit(),this.setInitialState()}ngOnChanges(t){super.ngOnChanges(t);let e=!1;if(this.scrollHeight=="100%"&&(this.height="100%"),t.loading){let{previousValue:n,currentValue:s}=t.loading;this.lazy&&n!==s&&s!==this.d_loading&&(this.d_loading=s,e=!0)}if(t.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),t.numToleratedItems){let{previousValue:n,currentValue:s}=t.numToleratedItems;n!==s&&s!==this.d_numToleratedItems&&(this.d_numToleratedItems=s)}if(t.options){let{previousValue:n,currentValue:s}=t.options;this.lazy&&n?.loading!==s?.loading&&s?.loading!==this.d_loading&&(this.d_loading=s.loading,e=!0),n?.numToleratedItems!==s?.numToleratedItems&&s?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=s.numToleratedItems)}this.initialized&&!e&&(t.items?.previousValue?.length!==t.items?.currentValue?.length||t.itemSize||t.scrollHeight||t.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"content":this._contentTemplate=t.template;break;case"item":this._itemTemplate=t.template;break;case"loader":this._loaderTemplate=t.template;break;case"loadericon":this._loaderIconTemplate=t.template;break;default:this._itemTemplate=t.template;break}})}ngAfterViewInit(){super.ngAfterViewInit(),Promise.resolve().then(()=>{this.viewInit()})}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1,super.ngOnDestroy()}viewInit(){pt(this.platformId)&&!this.initialized&&kt(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=et(this.elementViewChild?.nativeElement),this.defaultHeight=tt(this.elementViewChild?.nativeElement),this.defaultContentWidth=et(this.contentEl),this.defaultContentHeight=tt(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(t){this.contentEl=t||this.contentViewChild?.nativeElement||Zt(this.elementViewChild?.nativeElement,".p-virtualscroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[]}getElementRef(){return this.elementViewChild}getPageByFirst(t){return Math.floor(((t??this.first)+this.d_numToleratedItems*4)/(this._step||1))}isPageChanged(t){return this._step?this.page!==this.getPageByFirst(t??this.first):!0}scrollTo(t){this.elementViewChild?.nativeElement?.scrollTo(t)}scrollToIndex(t,e="auto"){if(this.both?t.every(s=>s>-1):t>-1){let s=this.first,{scrollTop:o=0,scrollLeft:l=0}=this.elementViewChild?.nativeElement,{numToleratedItems:f}=this.calculateNumItems(),p=this.getContentPosition(),d=this.itemSize,b=(h=0,m)=>h<=m?0:h,y=(h,m,L)=>h*m+L,T=(h=0,m=0)=>this.scrollTo({left:h,top:m,behavior:e}),v=this.both?{rows:0,cols:0}:0,U=!1,a=!1;this.both?(v={rows:b(t[0],f[0]),cols:b(t[1],f[1])},T(y(v.cols,d[1],p.left),y(v.rows,d[0],p.top)),a=this.lastScrollPos.top!==o||this.lastScrollPos.left!==l,U=v.rows!==s.rows||v.cols!==s.cols):(v=b(t,f),this.horizontal?T(y(v,d,p.left),o):T(l,y(v,d,p.top)),a=this.lastScrollPos!==(this.horizontal?l:o),U=v!==s),this.isRangeChanged=U,a&&(this.first=v)}}scrollInView(t,e,n="auto"){if(e){let{first:s,viewport:o}=this.getRenderedRange(),l=(d=0,b=0)=>this.scrollTo({left:d,top:b,behavior:n}),f=e==="to-start",p=e==="to-end";if(f){if(this.both)o.first.rows-s.rows>t[0]?l(o.first.cols*this._itemSize[1],(o.first.rows-1)*this._itemSize[0]):o.first.cols-s.cols>t[1]&&l((o.first.cols-1)*this._itemSize[1],o.first.rows*this._itemSize[0]);else if(o.first-s>t){let d=(o.first-1)*this._itemSize;this.horizontal?l(d,0):l(0,d)}}else if(p){if(this.both)o.last.rows-s.rows<=t[0]+1?l(o.first.cols*this._itemSize[1],(o.first.rows+1)*this._itemSize[0]):o.last.cols-s.cols<=t[1]+1&&l((o.first.cols+1)*this._itemSize[1],o.first.rows*this._itemSize[0]);else if(o.last-s<=t+1){let d=(o.first+1)*this._itemSize;this.horizontal?l(d,0):l(0,d)}}}else this.scrollToIndex(t,n)}getRenderedRange(){let t=(s,o)=>o||s?Math.floor(s/(o||s)):0,e=this.first,n=0;if(this.elementViewChild?.nativeElement){let{scrollTop:s,scrollLeft:o}=this.elementViewChild.nativeElement;if(this.both)e={rows:t(s,this._itemSize[0]),cols:t(o,this._itemSize[1])},n={rows:e.rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else{let l=this.horizontal?o:s;e=t(l,this._itemSize),n=e+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:e,last:n}}}calculateNumItems(){let t=this.getContentPosition(),e=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-t.left:0)||0,n=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-t.top:0)||0,s=(p,d)=>d||p?Math.ceil(p/(d||p)):0,o=p=>Math.ceil(p/2),l=this.both?{rows:s(n,this._itemSize[0]),cols:s(e,this._itemSize[1])}:s(this.horizontal?e:n,this._itemSize),f=this.d_numToleratedItems||(this.both?[o(l.rows),o(l.cols)]:o(l));return{numItemsInViewport:l,numToleratedItems:f}}calculateOptions(){let{numItemsInViewport:t,numToleratedItems:e}=this.calculateNumItems(),n=(l,f,p,d=!1)=>this.getLast(l+f+(l<p?2:3)*p,d),s=this.first,o=this.both?{rows:n(this.first.rows,t.rows,e[0]),cols:n(this.first.cols,t.cols,e[1],!0)}:n(this.first,t,e);this.last=o,this.numItemsInViewport=t,this.d_numToleratedItems=e,this.showLoader&&(this.loaderArr=this.both?Array.from({length:t.rows}).map(()=>Array.from({length:t.cols})):Array.from({length:t})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:s.cols}:0:s,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";let[t,e]=[et(this.contentEl),tt(this.contentEl)];t!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),e!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[n,s]=[et(this.elementViewChild.nativeElement),tt(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=n<this.defaultWidth?n+"px":this._scrollWidth||this.defaultWidth+"px"),(this.both||this.vertical)&&(this.elementViewChild.nativeElement.style.height=s<this.defaultHeight?s+"px":this._scrollHeight||this.defaultHeight+"px"),this.contentEl.style.minHeight=this.contentEl.style.minWidth="",this.contentEl.style.position="",this.elementViewChild.nativeElement.style.contain=""}})}getLast(t=0,e=!1){return this._items?Math.min(e?(this._columns||this._items[0]).length:this._items.length,t):0}getContentPosition(){if(this.contentEl){let t=getComputedStyle(this.contentEl),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),n=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:n,top:s,bottom:o,x:e+n,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}}setSize(){if(this.elementViewChild?.nativeElement){let t=this.elementViewChild.nativeElement.parentElement.parentElement,e=this._scrollWidth||`${this.elementViewChild.nativeElement.offsetWidth||t.offsetWidth}px`,n=this._scrollHeight||`${this.elementViewChild.nativeElement.offsetHeight||t.offsetHeight}px`,s=(o,l)=>this.elementViewChild.nativeElement.style[o]=l;this.both||this.horizontal?(s("height",n),s("width",e)):s("height",n)}}setSpacerSize(){if(this._items){let t=this.getContentPosition(),e=(n,s,o,l=0)=>this.spacerStyle=Ot(R({},this.spacerStyle),{[`${n}`]:(s||[]).length*o+l+"px"});this.both?(e("height",this._items,this._itemSize[0],t.y),e("width",this._columns||this._items[1],this._itemSize[1],t.x)):this.horizontal?e("width",this._columns||this._items,this._itemSize,t.x):e("height",this._items,this._itemSize,t.y)}}setContentPosition(t){if(this.contentEl&&!this._appendOnly){let e=t?t.first:this.first,n=(o,l)=>o*l,s=(o=0,l=0)=>this.contentStyle=Ot(R({},this.contentStyle),{transform:`translate3d(${o}px, ${l}px, 0)`});if(this.both)s(n(e.cols,this._itemSize[1]),n(e.rows,this._itemSize[0]));else{let o=n(e,this._itemSize);this.horizontal?s(o,0):s(0,o)}}}onScrollPositionChange(t){let e=t.target,n=this.getContentPosition(),s=(a,h)=>a?a>h?a-h:a:0,o=(a,h)=>h||a?Math.floor(a/(h||a)):0,l=(a,h,m,L,M,Y)=>a<=M?M:Y?m-L-M:h+M-1,f=(a,h,m,L,M,Y,gt)=>a<=Y?0:Math.max(0,gt?a<h?m:a-Y:a>h?m:a-2*Y),p=(a,h,m,L,M,Y=!1)=>{let gt=h+L+2*M;return a>=M&&(gt+=M+1),this.getLast(gt,Y)},d=s(e.scrollTop,n.top),b=s(e.scrollLeft,n.left),y=this.both?{rows:0,cols:0}:0,T=this.last,v=!1,U=this.lastScrollPos;if(this.both){let a=this.lastScrollPos.top<=d,h=this.lastScrollPos.left<=b;if(!this._appendOnly||this._appendOnly&&(a||h)){let m={rows:o(d,this._itemSize[0]),cols:o(b,this._itemSize[1])},L={rows:l(m.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],a),cols:l(m.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],h)};y={rows:f(m.rows,L.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],a),cols:f(m.cols,L.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],h)},T={rows:p(m.rows,y.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:p(m.cols,y.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},v=y.rows!==this.first.rows||T.rows!==this.last.rows||y.cols!==this.first.cols||T.cols!==this.last.cols||this.isRangeChanged,U={top:d,left:b}}}else{let a=this.horizontal?b:d,h=this.lastScrollPos<=a;if(!this._appendOnly||this._appendOnly&&h){let m=o(a,this._itemSize),L=l(m,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,h);y=f(m,L,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,h),T=p(m,y,this.last,this.numItemsInViewport,this.d_numToleratedItems),v=y!==this.first||T!==this.last||this.isRangeChanged,U=a}}return{first:y,last:T,isRangeChanged:v,scrollPos:U}}onScrollChange(t){let{first:e,last:n,isRangeChanged:s,scrollPos:o}=this.onScrollPositionChange(t);if(s){let l={first:e,last:n};if(this.setContentPosition(l),this.first=e,this.last=n,this.lastScrollPos=o,this.handleEvents("onScrollIndexChange",l),this._lazy&&this.isPageChanged(e)){let f={first:this._step?Math.min(this.getPageByFirst(e)*this._step,this.items.length-this._step):e,last:Math.min(this._step?(this.getPageByFirst(e)+1)*this._step:n,this.items.length)};(this.lazyLoadState.first!==f.first||this.lazyLoadState.last!==f.last)&&this.handleEvents("onLazyLoad",f),this.lazyLoadState=f}}}onContainerScroll(t){if(this.handleEvents("onScroll",{originalEvent:t}),this._delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){let{isRangeChanged:e}=this.onScrollPositionChange(t);(e||(this._step?this.isPageChanged():!1))&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&(!this._lazy||this._loading===void 0)&&(this.d_loading=!1,this.page=this.getPageByFirst()),this.cd.detectChanges()},this._delay)}else!this.d_loading&&this.onScrollChange(t)}bindResizeListener(){pt(this.platformId)&&(this.windowResizeListener||this.zone.runOutsideAngular(()=>{let t=this.document.defaultView,e=it()?"orientationchange":"resize";this.windowResizeListener=this.renderer.listen(t,e,this.onWindowResize.bind(this))}))}unbindResizeListener(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(kt(this.elementViewChild?.nativeElement)){let[t,e]=[et(this.elementViewChild?.nativeElement),tt(this.elementViewChild?.nativeElement)],[n,s]=[t!==this.defaultWidth,e!==this.defaultHeight];(this.both?n||s:this.horizontal?n:this.vertical?s:!1)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=t,this.defaultHeight=e,this.defaultContentWidth=et(this.contentEl),this.defaultContentHeight=tt(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(t,e){return this.options&&this.options[t]?this.options[t](e):this[t].emit(e)}getContentOptions(){return{contentStyleClass:`p-virtualscroller-content ${this.d_loading?"p-virtualscroller-loading":""}`,items:this.loadedItems,getItemOptions:t=>this.getOptions(t),loading:this.d_loading,getLoaderOptions:(t,e)=>this.getLoaderOptions(t,e),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(t){let e=(this._items||[]).length,n=this.both?this.first.rows+t:this.first+t;return{index:n,count:e,first:n===0,last:n===e-1,even:n%2===0,odd:n%2!==0}}getLoaderOptions(t,e){let n=this.loaderArr.length;return R({index:t,count:n,first:t===0,last:t===n-1,even:t%2===0,odd:t%2!==0},e)}static \u0275fac=function(e){return new(e||i)(ot(yt))};static \u0275cmp=z({type:i,selectors:[["p-scroller"],["p-virtualscroller"],["p-virtual-scroller"],["p-virtualScroller"]],contentQueries:function(e,n,s){if(e&1&&(k(s,te,4),k(s,ve,4),k(s,Ce,4),k(s,we,4),k(s,Tt,4)),e&2){let o;S(o=I())&&(n.contentTemplate=o.first),S(o=I())&&(n.itemTemplate=o.first),S(o=I())&&(n.loaderTemplate=o.first),S(o=I())&&(n.loaderIconTemplate=o.first),S(o=I())&&(n.templates=o)}},viewQuery:function(e,n){if(e&1&&(nt(Se,5),nt(te,5)),e&2){let s;S(s=I())&&(n.elementViewChild=s.first),S(s=I())&&(n.contentViewChild=s.first)}},hostVars:2,hostBindings:function(e,n){e&2&&Bt("height",n.height)},inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[N([ee]),O,Ht],ngContentSelectors:Ie,decls:3,vars:2,consts:[["disabledContainer",""],["element",""],["buildInContent",""],["content",""],["buildInLoader",""],["buildInLoaderIcon",""],[4,"ngIf","ngIfElse"],[3,"scroll","ngStyle","ngClass"],["class","p-virtualscroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-virtualscroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-virtualscroller-spacer",3,"ngStyle"],[1,"p-virtualscroller-loader",3,"ngClass"],[4,"ngFor","ngForOf"],[3,"styleClass"],[4,"ngIf"]],template:function(e,n){if(e&1&&(W(),_(0,Qe,8,16,"ng-container",6)(1,qe,2,1,"ng-template",null,0,dt)),e&2){let s=ct(2);c("ngIf",!n._disabled)("ngIfElse",s)}},dependencies:[Z,wt,Wt,St,bt,It,Yt,q],encapsulation:2})}return i})(),Gi=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=lt({type:i});static \u0275inj=st({imports:[Ge,q,q]})}return i})();var Ue=["*"],Ye=({dt:i})=>`
|
|
138
|
+
.p-iconfield {
|
|
139
|
+
position: relative;
|
|
140
|
+
display: block;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.p-inputicon {
|
|
144
|
+
position: absolute;
|
|
145
|
+
top: 50%;
|
|
146
|
+
margin-top: calc(-1 * (${i("icon.size")} / 2));
|
|
147
|
+
color: ${i("iconfield.icon.color")};
|
|
148
|
+
line-height: 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.p-iconfield .p-inputicon:first-child {
|
|
152
|
+
inset-inline-start: ${i("form.field.padding.x")};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.p-iconfield .p-inputicon:last-child {
|
|
156
|
+
inset-inline-end: ${i("form.field.padding.x")};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.p-iconfield .p-inputtext:not(:first-child) {
|
|
160
|
+
padding-inline-start: calc((${i("form.field.padding.x")} * 2) + ${i("icon.size")});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.p-iconfield .p-inputtext:not(:last-child) {
|
|
164
|
+
padding-inline-end: calc((${i("form.field.padding.x")} * 2) + ${i("icon.size")});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.p-iconfield:has(.p-inputfield-sm) .p-inputicon {
|
|
168
|
+
font-size: ${i("form.field.sm.font.size")};
|
|
169
|
+
width: ${i("form.field.sm.font.size")};
|
|
170
|
+
height: ${i("form.field.sm.font.size")};
|
|
171
|
+
margin-top: calc(-1 * (${i("form.field.sm.font.size")} / 2));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.p-iconfield:has(.p-inputfield-lg) .p-inputicon {
|
|
175
|
+
font-size: ${i("form.field.lg.font.size")};
|
|
176
|
+
width: ${i("form.field.lg.font.size")};
|
|
177
|
+
height: ${i("form.field.lg.font.size")};
|
|
178
|
+
margin-top: calc(-1 * (${i("form.field.lg.font.size")} / 2));
|
|
179
|
+
}
|
|
180
|
+
`,Je={root:"p-iconfield"},ne=(()=>{class i extends K{name="iconfield";theme=Ye;classes=Je;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275prov=P({token:i,factory:i.\u0275fac})}return i})();var hn=(()=>{class i extends G{iconPosition="left";get _styleClass(){return this.styleClass}styleClass;_componentStyle=H(ne);static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275cmp=z({type:i,selectors:[["p-iconfield"],["p-iconField"],["p-icon-field"]],hostAttrs:[1,"p-iconfield"],hostVars:6,hostBindings:function(e,n){e&2&&(w(n._styleClass),vt("p-iconfield-left",n.iconPosition==="left")("p-iconfield-right",n.iconPosition==="right"))},inputs:{iconPosition:"iconPosition",styleClass:"styleClass"},features:[N([ne]),O],ngContentSelectors:Ue,decls:1,vars:0,template:function(e,n){e&1&&(W(),Q(0))},dependencies:[Z],encapsulation:2,changeDetection:0})}return i})();var Xe=["*"],ti={root:"p-inputicon"},se=(()=>{class i extends K{name="inputicon";classes=ti;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275prov=P({token:i,factory:i.\u0275fac})}return i})(),bn=(()=>{class i extends G{styleClass;get hostClasses(){return this.styleClass}_componentStyle=H(se);static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(i)))(n||i)}})();static \u0275cmp=z({type:i,selectors:[["p-inputicon"],["p-inputIcon"]],hostVars:4,hostBindings:function(e,n){e&2&&(w(n.hostClasses),vt("p-inputicon",!0))},inputs:{styleClass:"styleClass"},features:[N([se]),O],ngContentSelectors:Xe,decls:1,vars:0,template:function(e,n){e&1&&(W(),Q(0))},dependencies:[Z,q],encapsulation:2,changeDetection:0})}return i})();export{hn as a,ii as b,Ei as c,bn as d,bi as e,Ge as f,Gi as g};
|