marketplacepos 2.9.8 → 2.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[527],{2383:(b,O,i)=>{i.d(O,{j:()=>N});var f=i(7700),m=i(5802),g=i(754),T=i(2965),t=i(5879),M=i(9790),I=i(6814),D=i(6223),C=i(7466),E=i(4170),U=i(8525),e=i(3680),n=i(2596),a=i(7380);function o(u,p){if(1&u&&(t.TgZ(0,"mat-option",9)(1,"div",10),t._UZ(2,"img",11),t.TgZ(3,"span"),t._uU(4),t.qZA()()()),2&u){const c=p.$implicit;t.Q6J("value",c.ID)("disabled",c.disabled),t.xp6(1),t.Q6J("matTooltip",c.disabled?"Single Product Scan disabled for this type of Channel":null),t.xp6(1),t.Q6J("src",c.Img,t.LSH),t.xp6(2),t.Oqu(c.Name)}}function s(u,p){if(1&u){const c=t.EpF();t.TgZ(0,"div")(1,"h5",12),t._uU(2,"Scan Type"),t.qZA(),t.TgZ(3,"mat-radio-group",13),t.NdJ("ngModelChange",function(l){t.CHM(c);const r=t.oxw();return t.KtG(r.filter.ScanFull=l)}),t.TgZ(4,"mat-radio-button",14),t._uU(5," Full (Include Inactive Products) "),t.qZA(),t.TgZ(6,"mat-radio-button",15),t._uU(7," Active "),t.qZA()()()}if(2&u){const c=t.oxw();t.xp6(3),t.Q6J("ngModel",c.filter.ScanFull),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}function d(u,p){if(1&u){const c=t.EpF();t.TgZ(0,"div",16)(1,"h5",3),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"mat-radio-group",17),t.NdJ("ngModelChange",function(l){t.CHM(c);const r=t.oxw();return t.KtG(r.filter.UpdatedProduct=l)}),t.TgZ(5,"mat-radio-button",18),t._uU(6," Scan All Products "),t.qZA(),t.TgZ(7,"mat-radio-button",19),t._uU(8," Scan Updated Products "),t.qZA()()()}if(2&u){const c=t.oxw();t.xp6(2),t.hij(" Last Scan: ",t.xi3(3,4,c.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),t.xp6(2),t.Q6J("ngModel",c.filter.UpdatedProduct),t.xp6(1),t.Q6J("value",!1),t.xp6(2),t.Q6J("value",!0)}}function S(u,p){if(1&u){const c=t.EpF();t.TgZ(0,"div",16)(1,"h5",3),t._uU(2," Scan Option "),t.qZA(),t.TgZ(3,"mat-radio-group",20),t.NdJ("ngModelChange",function(l){t.CHM(c);const r=t.oxw();return t.KtG(r.filter.Async=l)}),t.TgZ(4,"mat-radio-button",21),t._uU(5," Asynchronous (Get Notified when Complete) "),t.qZA(),t.TgZ(6,"mat-radio-button",22),t._uU(7," Synchronous (Wait until Complete) "),t.qZA()()()}if(2&u){const c=t.oxw();t.xp6(3),t.Q6J("ngModel",c.filter.Async),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1)}}let N=(()=>{var u;class p{constructor(h,l,r){this.dialogRef=h,this.data=l,this.router=r,this.channelType=g.x,this.disabledChannelOption=!1,this.filter={ChannelID:m.g.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=!!m.g.IsNotEmpty(l.isSingleChannel)&&this.data.isSingleChannel,this.disabledChannelOption=!m.g.IsEmpty(l.disabledChannelOption)&&this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new T.O,this.modalConfig.title="Scan Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID,this.filter.ScanFull=!1}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(h=>(h.disabled=!0,(h.TypeID==g.x.Tiktok||h.TypeID==g.x.Tokopedia||h.TypeID==g.x.Lazada)&&(h.disabled=!1),h)).sort(h=>h.disabled?1:-1))}onSelectChannel(h){let l=this.filterChannelById(h);this.selectedChannel=l,this.filter.Async=!0,l&&l.TypeID==g.x.Tokopedia?(this.filter.ScanFull=!0,this.isTokopedia=!0):(this.filter.ScanFull=!1,this.isTokopedia=!1),this.iniHasScanUpdate(),this.setDefaultConfigUpdate()}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&m.g.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==g.x.ShopeeV2||this.selectedChannel.TypeID==g.x.Tiktok||this.selectedChannel.TypeID==g.x.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.hasScanUpdate=!(this.selectedChannel?.TypeID==g.x.WooCommerce||this.selectedChannel?.TypeID==g.x.KalCare||this.selectedChannel?.TypeID==g.x.None||!m.g.IsNotEmpty(this.selectedChannel?.LastSync)||this.isSingleChannel)}filterChannelById(h){let l;return this.channelOptions&&(l=this.channelOptions.find(r=>r.ID==h)),l}submit(){this.selectedChannel.TypeID==g.x.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):(this.beforeSubmit(),this.dialogRef.close(this.filter))}beforeSubmit(){this.filter.UpdatedProduct&&(this.filter.Async=!1)}isNotEmpty(h){return m.g.IsNotEmpty(h)}onClose(){this.dialogRef.close()}}return(u=p).\u0275fac=function(h){return new(h||u)(t.Y36(f.so),t.Y36(f.WI),t.Y36(M.F0))},u.\u0275cmp=t.Xpm({type:u,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"mb-3","fw-normal"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"disabled","ngModel","ngModelChange"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],[4,"ngIf"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mb-3","fw-normal","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModel","ngModelChange"],["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,"mt-8"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["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","matTooltip","Scan only products that have been updated since the last channel scan",1,"me-5",3,"value"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModel","ngModelChange"],["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(h,l){1&h&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return l.submit()})("onClose",function(){return l.onClose()})("onCancel",function(){return l.onClose()}),t.TgZ(1,"div",1)(2,"div",2)(3,"h5",3),t._uU(4,"Select a Channel"),t.qZA(),t.TgZ(5,"mat-form-field",4)(6,"mat-select",5),t.NdJ("ngModelChange",function(P){return l.filter.ChannelID=P})("ngModelChange",function(P){return l.onSelectChannel(P)}),t.YNc(7,o,5,5,"mat-option",6),t.qZA()(),t.YNc(8,s,8,3,"div",7),t.YNc(9,d,9,7,"div",8),t.YNc(10,S,8,3,"div",8),t.qZA()()()),2&h&&(t.Q6J("dynamicValidated",l.isNotEmpty(l.filter.ChannelID))("config",l.modalConfig),t.xp6(6),t.Q6J("disabled",l.disabledChannelOption)("ngModel",l.filter.ChannelID),t.xp6(1),t.Q6J("ngForOf",l.channelOptions),t.xp6(1),t.Q6J("ngIf",!l.isSingleChannel&&!l.isTokopedia&&l.isNotEmpty(l.filter.ChannelID)),t.xp6(1),t.Q6J("ngIf",l.hasScanUpdate),t.xp6(1),t.Q6J("ngIf",!(null!=l.filter&&l.filter.UpdatedProduct)&&!l.isSingleChannel&&l.isNotEmpty(l.filter.ChannelID)))},dependencies:[I.sg,I.O5,D.JJ,D.On,C.VQ,C.U0,E.KE,U.gD,e.ey,n.gM,a.M,I.uU],encapsulation:2}),p})()},8695:(b,O,i)=>{i.d(O,{b:()=>u});var f=i(5619),m=i(8645),g=i(9773),T=i(2181),t=i(6328),M=i(7398),I=i(9360),D=i(8251),C=i(4829),E=i(2737),U=i(2420),e=i(9940),a=i(6699),o=i(9397),s=i(7081),d=i(5802),S=i(5879),N=i(9659);let u=(()=>{var p;class c{constructor(l){this.http=l,this.pagination$=new f.X(null),this.destroy$=new m.x,this.data$=this.paginationFunction()}onNextPage(l){l.PageNumber+=1,this.pagination$.next(l)}setPageNumberFooter(l){this.footerPageNumber=l.PageNumber}setPaginationButtonState(l,r){this.disableNextButton=0==r||!(r<l.RowCount*l.PageNumber)}reloadPagination(l){d.g.IsEmpty(l.PageNumber)&&(l.PageNumber=1),this.pagination$.next(l),this.hideCount=!0,this.goToLastPage=!1}getAllData(l,r){l.RowCount=r,this.pagination$.next(l),this.goToLastPage=!0}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.pagination$=null,this.pagination$=new f.X(null),this.data$=this.paginationFunction()}paginationFunction(){return this.pagination$.pipe((0,g.R)(this.destroy$),(0,T.h)(l=>null!=l),(0,t.b)(l=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(l)).pipe((0,M.U)(r=>r.Data))),function n(...p){const c=(0,e.jO)(p);return(0,I.e)((h,l)=>{const r=p.length,P=new Array(r);let v=p.map(()=>!1),y=!1;for(let _=0;_<r;_++)(0,C.Xf)(p[_]).subscribe((0,D.x)(l,A=>{P[_]=A,!y&&!v[_]&&(v[_]=!0,(y=v.every(E.y))&&(v=null))},U.Z));h.subscribe((0,D.x)(l,_=>{if(y){const A=[_,...P];l.next(c?c(...A):A)}}))})}(this.pagination$),(0,a.R)((l,r)=>{const[P,v]=l,[y]=r;return 1==v.PageNumber?[y,v]:[P.concat(y),v]}),(0,o.b)(([l,r])=>{this.setPageNumberFooter(r),this.setPaginationButtonState(r,l.length)}),(0,M.U)(([l])=>l),(0,s.d)())}}return(p=c).\u0275fac=function(l){return new(l||p)(S.LFG(N.O))},p.\u0275prov=S.Yz7({token:p,factory:p.\u0275fac,providedIn:"root"}),c})()},5993:(b,O,i)=>{i.d(O,{M:()=>D});var f=i(9397),m=i(6306),g=i(8504),T=i(5802),t=i(5879),M=i(9659),I=i(9229);let D=(()=>{var C;class E{constructor(e,n){this.httpService=e,this.toastrService=n}loader(e=T.g.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=T.g.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,n){return e.filter(a=>-1!==n.findIndex(o=>a.TypeID==o))}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){return this.httpService.post("/api/product/TotalProductLive",{ID:e})}clearCacheChannel(e){return this.httpService.post("/api/Channel/ClearCacheChannel",{ID:e})}uploadSingleProduct(e,n){return this.httpService.post("api/product/UploadMultipleChannel",{Channel:n,Products:e}).pipe((0,f.b)(o=>{this.showToastrSuccessUploadSingle(o,e[0])}),(0,m.K)(o=>(this.showToastErrorUploadSingle(o,e[0]),(0,g._)(()=>new Error(o)))))}uploadMultipleProduct(e,n){return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",{Channel:n,Products:e}).pipe((0,f.b)(o=>{this.showToastrUploadMultiple(o.Message)}),(0,m.K)(o=>(this.showToastrUploadMultiple(o.error?.Message),(0,g._)(()=>new Error(o)))))}uploadNotInChannel(e,n){return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",{Products:e,Channel:n}).pipe((0,f.b)(o=>{this.showToastrUploadMultiple(o)}),(0,m.K)(o=>(this.showToastrUploadMultiple(o.error?.Message),(0,g._)(()=>new Error(o)))))}scanSingle(e,n){return this.httpService.post("/api/product/ScanSingle",{ID:e,SKU:n})}scanNotInChannel(e){return this.httpService.post("/api/product/ScanNotinChannel",{ID:e})}findAllSoldInChannel(e){return this.httpService.post("/api/product/GetSoldInChannel",e)}scanAll(e,n,a,o=!1){return this.httpService.post("/api/product/ScanOptimized",{ID:e,ScanFull:n,UpdatedProduct:a,Async:o})}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return e.Variants.map(a=>a.Code)}downloadMultipleProduct(e){let n=e.map(a=>({ChannelItemID:a.ChannelItemID,ChannelID:a.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",n).pipe((0,f.b)(a=>{this.toastrService.success(`${a.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){return this.httpService.post("/api/product/DownloadProductFromChannel",{ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID}).pipe((0,f.b)(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let n=[];return e.forEach(a=>{a.Variants.forEach(o=>{n=[...n,o.Code]})}),n}filterUnselectedChannel(e,n){let o,a=[];if(e.forEach(s=>{a=[...a,...s.Channel]}),a&&0!=a.length){let s=[];o=n.filter(d=>(s=a.filter(S=>S.ChannelID==d.ID),s.length!==e.length))}else o=n;return o}findChannelById(e,n){return n.find(a=>a.ID==e)}sortChannel(e=[]){return e.sort((n,a)=>n.TypeID<a.TypeID?1:n.TypeID===a.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(n=>n.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let n=[];return e.forEach(a=>{n=[...n,...null!=a.Variants?a.Variants.filter(o=>o.selected):""]}),n}getChannelProduct(e){const n=e.Variants;let a=[];for(let o of n)if(null!=o.Channel)for(let s of o.Channel)0==a.filter(d=>d.ChannelID==s.ChannelID).length&&a.push(s);return this.sortChannel(a)}successToastrScanAllProduct(e,n,a){if(a){const o=e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,s=e?.InChannel?.Product?e?.InChannel?.Product:0;this.toastrService.success(`\n ${o+s} found in ${n.Name} </br>\n (${s} In POS + ${o} Not In Pos)\n `,"Scan Complete!",{enableHtml:!0})}else this.toastrService.success(`${e.InChannel?e.InChannel.Product:0} product updates in ${n.Name} </br> \n since ${e.LastUpdate}`,"Scan Complete!",{enableHtml:!0})}checkProductHasScanButton(e,n){let a;return e.map(o=>(o.Channel=this.getChannelProduct(o),a=this.filterUnselectedChannel([o],n),o.hasScan=a.length>0,o))}checkProductHasUploadBtn(e,n){let a;return e.map(o=>(o.Channel=this.getChannelProduct(o),a=this.filterUnselectedChannel([o],n),o.hasUpload=a.length>0,o))}showToastrUploadMultiple(e=[]){let n=[],a=[];const o=this.getResponseList(e);if(e.forEach(s=>{"string"==typeof s?.Response?a=[...a,o.length>1?this.setHtmlli(s.Response):this.setHtmlli(s.Response,!1)]:(s?.Response?.Success.forEach(d=>{n=[...n,o.length>1?this.setHtmlli(`Product ${d} was <b>successfully</b> uploaded to ${s.Name}`):this.setHtmlli(`Product ${d} was <b>successfully</b> uploaded to ${s.Name}`,!1)]}),s?.Response.Fail.forEach(d=>{a=[...a,o.length>1?this.setHtmlli(d):this.setHtmlli(d,!1)]}))}),a.length>0&&n.length>0){const s=[...n,...a];this.toastrService.warning(this.concatMessage(s),"Warning!",{enableHtml:!0})}else n.length>0&&0==a.length?this.toastrService.success(this.concatMessage(n),"Success",{enableHtml:!0}):this.toastrService.error(this.concatMessage(a),"Error",{enableHtml:!0})}setHtmlli(e,n=!0){return n?`<li>${e}</li>`:e}getResponseList(e){let n=[];return e.forEach(a=>{"string"==typeof a?.Response?n=[...n,a.Response]:(a?.Response?.Success.forEach(o=>{n=[...n,a.Name]}),a?.Response.Fail.forEach(o=>{n=[...n,o]}))}),n}concatMessage(e=[]){let n="";return e.forEach(a=>{n+=a}),e.length>1?`<ol>${n}</ol>`:n}showToastrSuccessUploadSingle(e,n){let a=e.filter(d=>0==d.Status),o=e.filter(d=>1==d.Status),s=this.generateToastrMessage(a,o,n);this.toastrService.success(s.message,"Success",{enableHtml:!0})}showToastErrorUploadSingle(e,n){let a=e?.error?.Message.filter(d=>0==d.Status),o=e?.error?.Message.filter(d=>1==d.Status),s=this.generateToastrMessage(a,o,n);"WARNING"==s.status?this.toastrService.warning(s.message,"Warning!",{enableHtml:!0}):this.toastrService.error(s.message,`Error - ${e.status}`,{enableHtml:!0})}generateToastrMessage(e,n,a){let s,o="",d=[...e,...n];return 0==e.length&&n.length>0?(s="SUCCESS",o=this.createSuccessResponse(n,a)):e.length>0&&0==n.length?(s="ERROR",o=this.createErrResponse(e,a)):(s="WARNING",o=`${this.createSuccessResponse(n,a)} ${this.createErrResponse(e,a)}`),d.length>1&&(o=`<ol>${o}</ol>`),{status:s,message:o}}createErrResponse(e,n){let a="";return e.length>1?e.forEach((o,s)=>{a+=`<li>${o.Response}</li>`}):1==e.length&&(a+=`${e[0].Response}`),a}createSuccessResponse(e,n){let a="";return e.length>1?e.forEach((o,s)=>{a+=`<li>Product ${n.Name} was <b>successfully</b> uploaded to ${o.Name}</li>`}):1==e.length&&(a+=`Product ${n.Name} was <b>successfully</b> uploaded to ${e[0].Name}`),a}getHostName(){if(T.g.IsEmpty(this.hostName)){const e=localStorage.getItem("Authorization");this.hostName=JSON.parse(e)?.Host}return this.hostName}}return(C=E).\u0275fac=function(e){return new(e||C)(t.LFG(M.O),t.LFG(I._W))},C.\u0275prov=t.Yz7({token:C,factory:C.\u0275fac,providedIn:"root"}),E})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[592],{5149:(v,g,n)=>{n.d(g,{T:()=>o});var a=n(9397),e=n(5802),s=n(5879),m=n(9659),u=n(9229);let o=(()=>{var i;class p{constructor(t,_){this.httpService=t,this.toastr=_}getChannel(t){return this.httpService.post("/api/Channel/GetChannel",t)}getChannelLoader(){return this.httpService.get("/api/ChannelLoader/GetChannelLoader")}testShopID(t){return this.httpService.post("/api/Channel/TestShopID",t).pipe((0,a.b)(_=>{this.showTostrSuccessTestShopID(_)}))}updateChannelIndex(t){return this.httpService.post("/api/Channel/UpdateChannelIndex",t)}deleteChannel(t){return this.httpService.post("/api/Channel/DeleteChannel",t)}mapChannelImage(t){return t.map(_=>(_.img=e.g.getChannelLogoByTypeId(_.TypeID),_))}showTostrSuccessTestShopID(t){let _="";for(var f in t)_+=f+" : "+t[f]+"<br/>";this.toastr.success(_,"Success",{enableHtml:!0,closeButton:!0,positionClass:"toast-bottom-right"})}}return(i=p).\u0275fac=function(t){return new(t||i)(s.LFG(m.O),s.LFG(u._W))},i.\u0275prov=s.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),p})()},5623:(v,g,n)=>{n.d(g,{k:()=>a});class a{}},8558:(v,g,n)=>{n.d(g,{y:()=>u});var a=n(6814),e=n(5879);function s(o,i){if(1&o){const p=e.EpF();e.TgZ(0,"span",10),e.NdJ("click",function(){e.CHM(p);const t=e.oxw();return e.KtG(t.getTotal())}),e.TgZ(1,"i",11),e._uU(2,"?"),e.qZA()()}}function m(o,i){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&o){const p=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,p.paginationTotal))}}let u=(()=>{var o;class i{constructor(){this.get=new e.vpe,this.change=new e.vpe,this.next=new e.vpe,this.previous=new e.vpe,this.total=new e.vpe,this.hasClicked=!1}changePage(c){this.filter.PageNumber=c.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}}return(o=i).\u0275fac=function(c){return new(c||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-custom-paginator"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[e.jDz],decls:16,vars:11,consts:[[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"],[4,"ngIf"],[1,"btn-group"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-left"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"hidden","click"],[1,"fas","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(c,t){1&c&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3),e.ALo(4,"number"),e.ALo(5,"number"),e.YNc(6,s,3,0,"span",3),e.YNc(7,m,3,3,"span",4),e._uU(8),e.qZA()(),e.TgZ(9,"div",5)(10,"a",6),e.NdJ("click",function(){return t.PreviousPage()}),e._UZ(11,"i",7),e._uU(12," Prev"),e.qZA(),e.TgZ(13,"a",8),e.NdJ("click",function(){return t.NextPage()}),e._UZ(14,"i",9),e._uU(15," Next"),e.qZA()()()),2&c&&(e.xp6(3),e.AsE(" Showing ",e.lcZ(4,7,t.filter.PageSize*(t.filter.PageNumber-1)+1)," - ",e.lcZ(5,9,t.filter.PageSize*(t.filter.PageNumber-1)+t.totaldata)," of "),e.xp6(3),e.Q6J("ngIf",!t.hasClicked),e.xp6(1),e.Q6J("ngIf",t.hasClicked),e.xp6(1),e.hij(" records ~ ",t.filter.PageNumber," Page "),e.xp6(2),e.Q6J("hidden",1==t.filter.PageNumber),e.xp6(3),e.Q6J("hidden",t.filter.PageSize*(t.filter.PageNumber-1)+t.totaldata==t.paginationTotal||t.totaldata<t.filter.PageSize))},dependencies:[a.ez,a.O5,a.JJ]}),i})()},7801:(v,g,n)=>{n.d(g,{P:()=>f});var a=n(6814),e=n(5879),s=n(6223),m=n(3445),u=n(2296),o=n(3680),i=n(8034),p=n(4170),c=n(2032);function t(h,M){if(1&h){const d=e.EpF();e.ynx(0),e.TgZ(1,"mat-date-range-picker-actions")(2,"button",8),e._uU(3,"Cancel"),e.qZA(),e.TgZ(4,"button",9),e.NdJ("click",function(){e.CHM(d);const l=e.oxw();return e.KtG(l.onSelectDate())}),e._uU(5,"Search"),e.qZA()(),e.BQk()}}const _={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let f=(()=>{var h;class M{constructor(){this.disabled=!1,this.widthClass="w-100",this.showButtonConfirm=!1,this.dateChange=new e.vpe}fromDateChange(r){let l=r?.toDate();this.from=l}toDateChange(r){if(r){let l=r.toDate();this.to=l,this.showButtonConfirm||this.emitDateChange()}}onOpenDatepicker(){console.log("open");const r=document.getElementById("dropdown-filter");if(r){var l=new bootstrap.Dropdown(r);l&&(l._config.autoClose="inside")}}onCloseDatepicker(){console.log("close");const r=document.getElementById("dropdown-filter");if(r){var l=new bootstrap.Dropdown(r);l&&(l._config.autoClose="outside")}}emitDateChange(){this.dateChange.emit({from:this.from,to:this.to})}onSelectDate(){this.emitDateChange()}}return(h=M).\u0275fac=function(r){return new(r||h)},h.\u0275cmp=e.Xpm({type:h,selectors:[["app-datepicker-range"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",minDate:"minDate",widthClass:"widthClass",showButtonConfirm:"showButtonConfirm",from:"from",to:"to"},outputs:{dateChange:"dateChange"},standalone:!0,features:[e._Bn([{provide:o._A,useClass:m.t7,deps:[o.Ad]},{provide:o.sG,useValue:_}]),e.jDz],decls:8,vars:8,consts:[["appearance","outline",1,"date-range"],["id","dates",3,"min","rangePicker"],["matStartDate","","placeholder","Start date",3,"value","dateChange","click"],["matEndDate","","placeholder","End date",3,"value","dateChange","click"],["matPrefix","",3,"for"],[3,"opened","closed"],["picker",""],[4,"ngIf"],["mat-button","","matDateRangePickerCancel",""],["mat-raised-button","","color","primary","matDateRangePickerApply","",3,"click"]],template:function(r,l){if(1&r){const C=e.EpF();e.TgZ(0,"mat-form-field",0)(1,"mat-date-range-input",1)(2,"input",2),e.NdJ("dateChange",function(P){return l.fromDateChange(P.value)})("click",function(){e.CHM(C);const P=e.MAs(6);return e.KtG(P.open())}),e.qZA(),e.TgZ(3,"input",3),e.NdJ("dateChange",function(P){return l.toDateChange(P.value)})("click",function(){e.CHM(C);const P=e.MAs(6);return e.KtG(P.open())}),e.qZA()(),e._UZ(4,"mat-datepicker-toggle",4),e.TgZ(5,"mat-date-range-picker",5,6),e.NdJ("opened",function(){return l.onOpenDatepicker()})("closed",function(){return l.onCloseDatepicker()}),e.YNc(7,t,6,0,"ng-container",7),e.qZA()()}if(2&r){const C=e.MAs(6);e.Tol(l.widthClass),e.xp6(1),e.Q6J("min",l.minDate)("rangePicker",C),e.xp6(1),e.Q6J("value",l.from),e.xp6(1),e.Q6J("value",l.to),e.xp6(1),e.Q6J("for",C),e.xp6(3),e.Q6J("ngIf",l.showButtonConfirm)}},dependencies:[a.ez,a.O5,o.XK,i.FA,i.nW,i.wx,i.zY,i.By,i._g,i.M5,i.dp,i.DK,p.lN,p.KE,p.qo,c.c,s.u5,u.ot,u.lW],styles:["mat-form-field.date-range.mat-mdc-form-field-type-mat-date-range-input .mat-mdc-form-field-infix{padding-top:12px!important;padding-bottom:12px!important;min-height:45px!important;font-size:14px!important}"]}),M})()},4126:(v,g,n)=>{n.d(g,{Q:()=>_});var a=n(5879),e=n(3680),s=n(8034),m=n(4170),u=n(2032),o=n(3445);n(6676);const t={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}};let _=(()=>{var f;class h{ngAfterViewInit(){}change(d){console.log(d);let r=d.toDate();console.log(r),this.dateChange.emit(r)}constructor(){this.disabled=!1,this.dateChange=new a.vpe,this.width="100%",this.displayToggle=!0}onOpenDatepicker(){var d=new bootstrap.Dropdown(document.getElementById("dropdown-filter"));d&&(d._config.autoClose="inside")}onCloseDatepicker(){var d=new bootstrap.Dropdown(document.getElementById("dropdown-filter"));d&&(d._config.autoClose="outside")}}return(f=h).\u0275fac=function(d){return new(d||f)},f.\u0275cmp=a.Xpm({type:f,selectors:[["datepicker"]],inputs:{placeholder:"placeholder",displayToggle:"displayToggle",date:"date",disabled:"disabled",width:"width"},outputs:{dateChange:"dateChange"},standalone:!0,features:[a._Bn([s.FA,{provide:e._A,useClass:o.t7,deps:[e.Ad]},{provide:e.sG,useValue:t}]),a.jDz],decls:5,vars:6,consts:[[1,"date-picker"],["matInput","",3,"matDatepicker","placeholder","value","dateChange","click"],["matSuffix","",3,"for"],[3,"opened","closed"],["picker1",""]],template:function(d,r){if(1&d){const l=a.EpF();a.TgZ(0,"mat-form-field",0)(1,"input",1),a.NdJ("dateChange",function(D){return r.change(D.value)})("click",function(){a.CHM(l);const D=a.MAs(4);return a.KtG(D.open())}),a.qZA(),a._UZ(2,"mat-datepicker-toggle",2),a.TgZ(3,"mat-datepicker",3,4),a.NdJ("opened",function(){return r.onOpenDatepicker()})("closed",function(){return r.onCloseDatepicker()}),a.qZA()()}if(2&d){const l=a.MAs(4);a.Udp("width",r.width),a.xp6(1),a.s9C("placeholder",r.placeholder||""),a.Q6J("matDatepicker",l)("value",r.date),a.xp6(1),a.Q6J("for",l)}},dependencies:[e.XK,s.FA,s.Mq,s.hl,s.nW,m.lN,m.KE,m.R9,u.c,u.Nt],styles:["mat-form-field.date-picker.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{background-color:#fff!important;height:45px!important;font-size:14px;padding-left:4px}\n"],encapsulation:2}),h})()},5439:(v,g,n)=>{n.d(g,{s:()=>e});var a=n(5879);let e=(()=>{var s;class m{constructor(){this.emptyStateImg="https://res.cloudinary.com/pos/image/upload/v1683772105/icons/marketplace_icons/emptyrecord.svg"}ngOnInit(){}}return(s=m).\u0275fac=function(o){return new(o||s)},s.\u0275cmp=a.Xpm({type:s,selectors:[["app-empty-state"]],standalone:!0,features:[a.jDz],decls:4,vars:1,consts:[["alt","",2,"width","225px",3,"src"],[1,"text-center","fs-2","text-secondary","mt-4"]],template:function(o,i){1&o&&(a.TgZ(0,"div"),a._UZ(1,"img",0),a.TgZ(2,"div",1),a._uU(3," No records found "),a.qZA()()),2&o&&(a.xp6(1),a.Q6J("src",i.emptyStateImg,a.LSH))}}),m})()},6930:(v,g,n)=>{n.d(g,{n:()=>u});var a=n(6814),e=n(5879);function s(o,i){if(1&o){const p=e.EpF();e.TgZ(0,"span",10),e.NdJ("click",function(){e.CHM(p);const t=e.oxw();return t.getTotal(),e.KtG(t.hasClicked=!0)}),e.TgZ(1,"i",11),e._uU(2,"?"),e.qZA()()}}function m(o,i){if(1&o&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"number"),e.qZA()),2&o){const p=e.oxw();e.xp6(1),e.Oqu(e.lcZ(2,1,p.paginationTotal))}}let u=(()=>{var o;class i{constructor(){this.get=new e.vpe,this.change=new e.vpe,this.next=new e.vpe,this.previous=new e.vpe,this.total=new e.vpe,this.hasClicked=!1}changePage(c){this.filter.PageNumber=c.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}}return(o=i).\u0275fac=function(c){return new(c||o)},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-mat-paginator-no-count"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[e.jDz],decls:13,vars:10,consts:[[1,"d-flex","justify-content-end","mt-5"],[1,"d-sm-block","collapse","mt-3","me-5"],[1,"text-dark","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-sm","me-3","border-0",3,"disabled","click"],[1,"fas","fa-chevron-left"],["role","button",1,"btn","btn-outline-secondary","btn-sm","border-0",3,"disabled","click"],[1,"fas","fa-chevron-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(c,t){1&c&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._uU(3),e.ALo(4,"number"),e.ALo(5,"number"),e.YNc(6,s,3,0,"span",3),e.YNc(7,m,3,3,"span",4),e.qZA()(),e.TgZ(8,"div",5)(9,"button",6),e.NdJ("click",function(){return t.PreviousPage()}),e._UZ(10,"i",7),e.qZA(),e.TgZ(11,"button",8),e.NdJ("click",function(){return t.NextPage()}),e._UZ(12,"i",9),e.qZA()()()),2&c&&(e.xp6(3),e.AsE(" Showing ",e.lcZ(4,6,t.filter.PageSize*(t.filter.PageNumber-1)+1)," - ",e.lcZ(5,8,t.filter.PageSize*(t.filter.PageNumber-1)+t.totaldata)," of "),e.xp6(3),e.Q6J("ngIf",!t.hasClicked),e.xp6(1),e.Q6J("ngIf",t.hasClicked),e.xp6(2),e.Q6J("disabled",1==t.filter.PageNumber),e.xp6(2),e.Q6J("disabled",t.filter.PageSize*(t.filter.PageNumber-1)+t.totaldata==t.paginationTotal||t.totaldata<t.filter.PageSize))},dependencies:[a.ez,a.O5,a.JJ]}),i})()}}]);
@@ -1 +0,0 @@
1
- (()=>{"use strict";var e,h={},v={};function r(e){var n=v[e];if(void 0!==n)return n.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return h[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=h,e=[],r.O=(n,t,f,o)=>{if(!t){var a=1/0;for(c=0;c<e.length;c++){for(var[t,f,o]=e[c],b=!0,i=0;i<t.length;i++)(!1&o||a>=o)&&Object.keys(r.O).every(u=>r.O[u](t[i]))?t.splice(i--,1):(b=!1,o<a&&(a=o));if(b){e.splice(c--,1);var s=f();void 0!==s&&(n=s)}}return n}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[t,f,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,f){if(1&f&&(t=this(t)),8&f||"object"==typeof t&&t&&(4&f&&t.__esModule||16&f&&"function"==typeof t.then))return t;var o=Object.create(null);r.r(o);var c={};n=n||[null,e({}),e([]),e(e)];for(var a=2&f&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(b=>c[b]=()=>t[b]);return c.default=()=>t,r.d(o,c),o}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(592===e?"common":e)+"."+{56:"0432dfcbb3e04e39",62:"4f9a8ca2692bdd97",103:"bc1f4c51ca99f04f",168:"d7091401728e4304",231:"0c7ab993977632a2",257:"d1592e885695ba4b",278:"e89610409641d910",296:"93310f70e5f9d3a9",299:"86cba892502ce6e4",307:"3b0b22bc69fa61d7",311:"afcc0c4a03ea0076",389:"f73b3c5db7bdf654",445:"8f1497373c95bb64",452:"1f277c2ba13eb80d",476:"d08ef7b92327904d",478:"a63c640a3e971a16",500:"c2e6963e4771761e",527:"e23646167d384e97",556:"5d624cfb73f161b2",592:"91711b840b02b984",599:"8de0c2b4c7af0f9d",617:"4db1b737553fe58b",671:"8d5ec5d95df1c8e5",699:"d68a917277dbe11a",726:"40535ee28a35e978",810:"af61302495e16f98",877:"bbdea3b04cc75780",900:"b7de175b628a8dbe",967:"2b39f548c7f4eb30"}[e]+".js",r.miniCssF=e=>{},r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="pos-marketplace:";r.l=(t,f,o,c)=>{if(e[t])e[t].push(f);else{var a,b;if(void 0!==o)for(var i=document.getElementsByTagName("script"),s=0;s<i.length;s++){var d=i[s];if(d.getAttribute("src")==t||d.getAttribute("data-webpack")==n+o){a=d;break}}a||(b=!0,(a=document.createElement("script")).type="module",a.charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",n+o),a.src=r.tu(t)),e[t]=[f];var p=(g,u)=>{a.onerror=a.onload=null,clearTimeout(l);var _=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),_&&_.forEach(y=>y(u)),g)return g(u)},l=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),b&&document.head.appendChild(a)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="https://cdn.jsdelivr.net/npm/marketplacepos@2.9.8/Marketplace/",(()=>{var e={666:0};r.f.j=(f,o)=>{var c=r.o(e,f)?e[f]:void 0;if(0!==c)if(c)o.push(c[2]);else if(666!=f){var a=new Promise((d,p)=>c=e[f]=[d,p]);o.push(c[2]=a);var b=r.p+r.u(f),i=new Error;r.l(b,d=>{if(r.o(e,f)&&(0!==(c=e[f])&&(e[f]=void 0),c)){var p=d&&("load"===d.type?"missing":d.type),l=d&&d.target&&d.target.src;i.message="Loading chunk "+f+" failed.\n("+p+": "+l+")",i.name="ChunkLoadError",i.type=p,i.request=l,c[1](i)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,o)=>{var i,s,[c,a,b]=o,d=0;if(c.some(l=>0!==e[l])){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);if(b)var p=b(r)}for(f&&f(o);d<c.length;d++)r.o(e,s=c[d])&&e[s]&&e[s][0](),e[s]=0;return r.O(p)},t=self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))})()})();