marketplacepos 3.9.4 → 3.9.6

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.
Files changed (70) hide show
  1. package/Marketplace/{chunk-7F3GACIE.js → chunk-2C52VEVY.js} +1 -1
  2. package/Marketplace/{chunk-NFHX3EWZ.js → chunk-2HCFB6E7.js} +1 -1
  3. package/Marketplace/{chunk-5K7YSLKL.js → chunk-2PLDCDZV.js} +1 -1
  4. package/Marketplace/{chunk-XBCSTQJ3.js → chunk-332RC7A4.js} +1 -1
  5. package/Marketplace/{chunk-L72SNBKA.js → chunk-3ITFYH5G.js} +1 -1
  6. package/Marketplace/{chunk-DOMXTGO5.js → chunk-3TM3A3D3.js} +1 -1
  7. package/Marketplace/{chunk-3OMVIKHK.js → chunk-477YGYRZ.js} +1 -1
  8. package/Marketplace/{chunk-LFB6AUP4.js → chunk-4PZMEIGB.js} +1 -1
  9. package/Marketplace/{chunk-V74TRO5C.js → chunk-4W3TWSSW.js} +1 -1
  10. package/Marketplace/{chunk-UYW3YL3H.js → chunk-53BVSUPZ.js} +1 -1
  11. package/Marketplace/{chunk-5YDKDDXQ.js → chunk-5PC5LTIZ.js} +2 -2
  12. package/Marketplace/{chunk-VVTMP7TD.js → chunk-5UNEOFJK.js} +1 -1
  13. package/Marketplace/chunk-5XWQNFBX.js +1 -0
  14. package/Marketplace/chunk-62IMMDNX.js +1 -0
  15. package/Marketplace/{chunk-W2SKBEUZ.js → chunk-6WPY4EOZ.js} +1 -1
  16. package/Marketplace/{chunk-MUDZXRNT.js → chunk-AJD5SEOZ.js} +1 -1
  17. package/Marketplace/{chunk-GVJVVJCU.js → chunk-BABEGVXK.js} +1 -1
  18. package/Marketplace/{chunk-DG2DUPHG.js → chunk-BCRNXYZA.js} +1 -1
  19. package/Marketplace/{chunk-Z7PAAM54.js → chunk-CA4VOEUC.js} +1 -1
  20. package/Marketplace/{chunk-IIGTCNJI.js → chunk-CPDVV764.js} +1 -1
  21. package/Marketplace/{chunk-BZT72IIB.js → chunk-CUST4JCO.js} +1 -1
  22. package/Marketplace/{chunk-5XEX4Z6N.js → chunk-DJBPLDAI.js} +1 -1
  23. package/Marketplace/{chunk-NA7DMV7H.js → chunk-DQB556M4.js} +1 -1
  24. package/Marketplace/{chunk-WTNHPIXD.js → chunk-EATIL2AC.js} +1 -1
  25. package/Marketplace/{chunk-44TEKK34.js → chunk-EL6EJKXF.js} +1 -1
  26. package/Marketplace/{chunk-CXQFJUAW.js → chunk-ELGSBKZC.js} +1 -1
  27. package/Marketplace/{chunk-WHZLZBWD.js → chunk-EQ4ZJ45P.js} +1 -1
  28. package/Marketplace/{chunk-IL3R7THF.js → chunk-FD2RWVNI.js} +1 -1
  29. package/Marketplace/{chunk-BFJBMKDS.js → chunk-FG5VB3SN.js} +1 -1
  30. package/Marketplace/{chunk-ZKY4MRMH.js → chunk-FQUOYC2T.js} +1 -1
  31. package/Marketplace/{chunk-QVEJEIWR.js → chunk-G2EXZS3H.js} +1 -1
  32. package/Marketplace/{chunk-ZIANW63Q.js → chunk-GQQPUSYL.js} +1 -1
  33. package/Marketplace/{chunk-3KO3N6JP.js → chunk-HJWLXLFQ.js} +1 -1
  34. package/Marketplace/{chunk-D4PUISDS.js → chunk-ISOVZHS4.js} +1 -1
  35. package/Marketplace/{chunk-M7ZLTUVL.js → chunk-KEZBQTEU.js} +1 -1
  36. package/Marketplace/{chunk-AI77CZ3S.js → chunk-KFU3EEIJ.js} +1 -1
  37. package/Marketplace/{chunk-SMF6UCR5.js → chunk-KYWR3KZB.js} +1 -1
  38. package/Marketplace/{chunk-W6HDGIZB.js → chunk-L5DJS2Y4.js} +1 -1
  39. package/Marketplace/{chunk-MWOXQU66.js → chunk-M6HIPYJ5.js} +1 -1
  40. package/Marketplace/{chunk-VTLJVEYF.js → chunk-NKGDQMEC.js} +1 -1
  41. package/Marketplace/{chunk-RISMLJLZ.js → chunk-NSEFWK5A.js} +1 -1
  42. package/Marketplace/{chunk-WMKNIYJG.js → chunk-NTGLKKPF.js} +1 -1
  43. package/Marketplace/{chunk-J7N5VFE6.js → chunk-P5CAUBRP.js} +1 -1
  44. package/Marketplace/{chunk-BPOHVA6C.js → chunk-PUT3VRK4.js} +1 -1
  45. package/Marketplace/{chunk-ZNIAYABL.js → chunk-Q2FASLCV.js} +1 -1
  46. package/Marketplace/{chunk-AOQBLGBU.js → chunk-QKIFJRTX.js} +1 -1
  47. package/Marketplace/{chunk-7F4OMKVB.js → chunk-QNAQWHL2.js} +1 -1
  48. package/Marketplace/{chunk-TVKWMJ24.js → chunk-RPFEHRVU.js} +1 -1
  49. package/Marketplace/{chunk-OVSLUEIO.js → chunk-S2CEMSAL.js} +1 -1
  50. package/Marketplace/{chunk-QDC2JFGY.js → chunk-S4WZQ6LU.js} +1 -1
  51. package/Marketplace/{chunk-O6PGRAJA.js → chunk-S7XOA755.js} +1 -1
  52. package/Marketplace/{chunk-MICIQBL4.js → chunk-SR2TZQ7P.js} +1 -1
  53. package/Marketplace/{chunk-6O46WM77.js → chunk-UOPHZWQE.js} +1 -1
  54. package/Marketplace/{chunk-35SISJKC.js → chunk-UWFJ6EKO.js} +1 -1
  55. package/Marketplace/{chunk-YAWRXDGC.js → chunk-WIZOJWIK.js} +1 -1
  56. package/Marketplace/{chunk-673XNROP.js → chunk-WXPZ3RWN.js} +1 -1
  57. package/Marketplace/{chunk-CFWKH54E.js → chunk-XJJCOQ7G.js} +1 -1
  58. package/Marketplace/{chunk-5F2YQ7XL.js → chunk-YWVCQHE6.js} +1 -1
  59. package/Marketplace/{chunk-DR4WIP6T.js → chunk-ZKXVL46E.js} +1 -1
  60. package/Marketplace/index.html +2 -2
  61. package/Marketplace/{main-5EL5X5GA.js → main-NVF65DLF.js} +1 -1
  62. package/Marketplace/{styles-HLURZDLQ.css → styles-NJXMNYSV.css} +1 -1
  63. package/package.json +1 -1
  64. package/Marketplace/chunk-4VWZIBEC.js +0 -1
  65. package/Marketplace/chunk-EEKM3HHQ.js +0 -1
  66. /package/Marketplace/{chunk-KOJSHFZJ.js → chunk-BWIMRM2L.js} +0 -0
  67. /package/Marketplace/{chunk-Y4MB3DWC.js → chunk-NOOE5WCP.js} +0 -0
  68. /package/Marketplace/{chunk-T2YIFX3Q.js → chunk-TIKJQ35R.js} +0 -0
  69. /package/Marketplace/{chunk-WJGIBFHG.js → chunk-U4GUAIS3.js} +0 -0
  70. /package/Marketplace/{polyfills-25D6JJC3.js → polyfills-PQ6SAYXQ.js} +0 -0
@@ -1,2 +1,2 @@
1
- import{e as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5YDKDDXQ.js";import{b as de,e as pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-V74TRO5C.js";import{c as ge,d as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3KO3N6JP.js";import{A as k,q as j,s as x,t as O,z as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import{b as me,h as F,k as U,u as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{b as m,c as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-T2YIFX3Q.js";import{$ as ne,$a as C,$b as A,B as Z,Db as q,Eb as J,Fa as s,Ga as f,H as ee,Ja as H,K as te,Mb as N,Na as G,Oa as c,Pa as oe,T as W,Ua as u,V as P,Yb as re,Za as l,_a as r,_b as v,aa as ie,ab as I,bb as M,c as w,ca as K,db as Y,ea as _,fa as ae,fc as se,gc as ce,hb as g,ja as V,jb as h,ka as $,n as Q,ob as L,pb as d,q as X,qb as y,rb as T,wb as le,za as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";var b=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}(b||{});function Me(i,n){if(i&1&&(I(0),l(1,"tr")(2,"td",11),d(3),r(),l(4,"td",11),d(5),r(),l(6,"td",12)(7,"p",13),d(8,"Product Not in Channel!"),r()()(),M()),i&2){let a=h().$implicit;s(3),T(" ",a==null?null:a.Model,""),s(2),T(" ",a==null?null:a.Code,"")}}function Te(i,n){if(i&1&&(l(0,"td",11),d(1),r()),i&2){let a=h(3).$implicit;G("rowspan",a.Channel.length),s(1),T(" ",a==null?null:a.Model,"")}}function ve(i,n){if(i&1&&(l(0,"td",11),d(1),r()),i&2){let a=h(3).$implicit;G("rowspan",a.Channel.length),s(1),T(" ",a==null?null:a.Code,"")}}var xe=i=>({"is-disabled":i});function Oe(i,n){if(i&1&&(l(0,"tr"),u(1,Te,2,2,"td",14)(2,ve,2,2,"td",14),l(3,"td",11)(4,"div",15)(5,"a",16),C(6,"img",17),r(),l(7,"div",18),d(8),r()()(),l(9,"td",11),d(10),q(11,"number"),r(),l(12,"td",19),d(13),q(14,"number"),r(),l(15,"td",19)(16,"a",20),C(17,"i",21),l(18,"span",22),d(19,"Edit"),r()()()()),i&2){let a=n.$implicit,t=n.index,e=h(3);s(1),c("ngIf",t==0),s(1),c("ngIf",t==0),s(3),c("href",a.Url,S)("title",a.Title),s(1),c("src",e.getChannelLogo(a.TypeID),S),s(1),c("matTooltip",(a==null||a.Name==null?null:a.Name.length)>55?a==null?null:a.Name:""),s(1),T(" ",a.Name," "),s(2),y(J(11,12,a.Price)),s(3),y(J(14,14,a.Inventory)),s(3),c("href",e.getHyperlinkSellerCenter(a),S)("ngClass",le(16,xe,a.TypeID==e.channelType.KalCare))("matTooltip",a.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function De(i,n){if(i&1&&u(0,Oe,20,18,"tr",8),i&2){let a=h().$implicit;c("ngForOf",a==null?null:a.Channel)}}function ke(i,n){if(i&1&&(I(0),u(1,Me,9,2,"ng-container",9)(2,De,1,1,"ng-template",null,10,N),M()),i&2){let a=n.$implicit,t=L(3);s(1),c("ngIf",!a.Channel||a.Channel.length<1)("ngIfElse",t)}}var Re=(()=>{let n=class n{constructor(t,e){this.data=t,this.dialogRef=e,this.channelType=m,this.variants=t.variants,this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new D,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(t){return B.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let e="javascript:void(0)";switch(t.TypeID){case m.ShopeeV2:e=`${b.Shoope}/portal/product/${t.ChannelItemID}`;break;case m.Tiktok:e=`${b.Tiktok}/product/edit/${t.ChannelItemID}`;break;case m.Tokopedia:e=`${b.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case m.WooCommerce:e=`${b.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case m.Lazada:e=`${b.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return e}};n.\u0275fac=function(e){return new(e||n)(f(O),f(x))},n.\u0275cmp=_({type:n,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["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,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[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"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,o){e&1&&(l(0,"modal-material",0),g("onCancel",function(){return o.dialogRef.close()}),l(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),d(6," VARIANT "),l(7,"sup"),C(8,"i",5),r()(),l(9,"th",4),d(10,"SKU"),r(),l(11,"th",4),d(12," PRODUCT "),l(13,"sup"),C(14,"i",6),r()(),l(15,"th",4),d(16,"PRICE"),r(),l(17,"th",7),d(18,"INVENTORY"),r(),C(19,"th",4),r()(),l(20,"tbody"),u(21,ke,4,2,"ng-container",8),r()()()()),e&2&&(c("config",o.modalConfig),s(21),c("ngForOf",o.variants))},dependencies:[re,v,A,j,k,se],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}"]});let i=n;return i})();var R=class{constructor(){this._input$=new w,this._destroy$=new w,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(ee(200),te(),X(n=>(n&&(n=n.toLowerCase()),this.filterData(n))),Z(n=>n!==void 0),P(this._destroy$)).subscribe(n=>{this._dataBuffer=n.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(n){let a=-1,t;return this._data.filter(o=>(t=JSON.stringify(o).toLowerCase(),a=t.indexOf(n),a!==-1||n==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(n){this._data=n||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(n,a){if(B.IsNotEmpty(n)){let t=this._data.filter(e=>e[a].toString().toLowerCase().indexOf(n)!==-1);this._dataBuffer=t.slice(0,this._bufferSize)}}set bufferSize(n){this._bufferSize=n}onScrollToEnd(){this.fetchMore()}fetchMore(){let n=this._dataBuffer.length,a=this._data.slice(n,this._bufferSize+n);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(a)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var be=(()=>{let n=class n{set items(t){this.ngSelectInfiniteScroll.data=t,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(t){this._selected=t,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.width="100%",this.clearable=!0,this.disabled=!1,this.ngSelectInfiniteScroll=new R,this.selectedChange=new H,this.selectedLabel=new H}onSelectChange(t){t?(this.selectedChange.emit(t[this.bindValue]),this.selectedLabel.emit(t[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=_({type:n,selectors:[["ng-select-infinite"]],inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel"},decls:1,vars:12,consts:[[3,"disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable","appendTo","clear","scrollToEnd","change"]],template:function(e,o){e&1&&(l(0,"ng-select",0),g("clear",function(){return o.ngSelectInfiniteScroll.onClear()})("scrollToEnd",function(){return o.ngSelectInfiniteScroll.onScrollToEnd()})("change",function(E){return o.onSelectChange(E)}),r()),e&2&&(oe("width",o.width),c("disabled",o.disabled)("virtualScroll",!0)("typeahead",o.ngSelectInfiniteScroll.input$)("items",o.ngSelectInfiniteScroll.bufferData)("bindLabel",o.bindLabel)("bindValue",o.bindValue)("placeholder",o.placeholder)("ngModel",o.selected)("clearable",o.clearable)("appendTo",o.parent))},dependencies:[ge,F,U]});let i=n;return i})(),ot=(()=>{let n=class n{};n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=ae({type:n}),n.\u0275inj=ie({imports:[ce,ue,he]});let i=n;return i})();var Se=(()=>{let n=class n{constructor(t,e){this.LocalData=t,this.httpService=e}getCategoriesByTypeId(t,e){return this.LocalData.getCategoriesByChannelType(t).pipe(W(o=>o!=null?Q(o):this._getCategoriesByTypeID(t,e)))}_getCategoriesByTypeID(t,e){let o={TypeID:t,ID:e};return this.httpService.post("/api/Channel/getCategoriesByTypeID",o).pipe(W(p=>this.LocalData.saveCategoriesByChannelType(p,t)))}};n.\u0275fac=function(e){return new(e||n)(K(fe),K(pe))},n.\u0275prov=ne({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function Ve(i,n){if(i&1){let a=Y();I(0),l(1,"ng-select-infinite",16),g("selectedChange",function(e){V(a);let o=h().index,p=h();return $(p.onSelectCategory(e,o))}),r(),M()}if(i&2){let a=h().$implicit;s(1),c("items",a.Categories)("clearable",!1)}}function $e(i,n){if(i&1&&(l(0,"div",17),C(1,"input",18),r()),i&2){let a=h().$implicit,t=h();c("matTooltip",t.channelType.WooCommerce==a.TypeID?"":"Product Category is Harcoded, Please Change Product Category in Seller Center"),s(1),c("placeholder",t.getChannelCategory(a.TypeID))}}function Le(i,n){if(i&1){let a=Y();I(0),l(1,"tr")(2,"td",9)(3,"input",10),g("ngModelChange",function(e){let p=V(a).$implicit;return $(p.Selected=e)})("ngModelChange",function(){V(a);let e=h();return $(e.onSelectChannel())}),r()(),l(4,"td")(5,"div",11),C(6,"img",12),l(7,"span",13),d(8),r()()(),l(9,"td"),u(10,Ve,2,2,"ng-container",14)(11,$e,2,2,"ng-template",null,15,N),r()(),M()}if(i&2){let a=n.$implicit,t=L(12);s(3),c("ngModel",a.Selected),s(3),c("src",a.Img,S),s(2),y(a.Name),s(2),c("ngIf",a.Categories.length>0)("ngIfElse",t)}}var ft=(()=>{let n=class n{constructor(t,e,o,p){this.data=t,this.channelService=e,this.dialogRef=o,this.toastrService=p,this.channelOptions=[],this.uploadResponse=[],this.channelType=m,this.enableBtnOk=!1,this.destroy$=new w,this.uploadResponse=[],this.channels=this.data.channels,this.product=t.product}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new D,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(e=>{this.channelService.getCategoriesByTypeId(e.channelType,e.channelId).pipe(P(this.destroy$)).subscribe(o=>{this.setCategoriesChannelOption(e.channelType,o)})})}setCategoriesChannelOption(t,e){this.channelOptions=this.channelOptions.map(o=>(o.TypeID==t&&(o.Categories=e),o))}initChannelOptions(){this.channelOptions=this.channels.map(t=>({Name:t.Name,Img:t.Img,ID:t.ID,Selected:!1,CategoryID:this.initDefaultChannelCategoryId(t.TypeID),TypeID:t.TypeID,Categories:[]}))}initDefaultChannelCategoryId(t){let e=0;switch(t){case m.Lazada:e=6509;break}return e}filterChannelTypeId(){return this.data.channels.map(e=>({channelType:e.TypeID,channelId:e.ID})).filter((e,o,p)=>p.findIndex(E=>e.channelType==E.channelType)==o).filter(e=>e.channelType==m.Tokopedia)}onSelectCategory(t,e){this.channelOptions[e].CategoryID=t,this.channelOptions[e].Selected=!0,this.onSelectChannel()}onSelectAllChannel(t){this.channelOptions=this.channelOptions.map(e=>(e.Selected=t,e)),this.enableBtnOk=t}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return this.channelOptions.findIndex(t=>t.Selected)!==-1}onClose(){this.dialogRef.close()}onSave(){if(!this.validateSelectedCategory()){this.toastrService.warning("Category is required","Warning!");return}let t=this.channelOptions.filter(e=>e.Selected).map(e=>({CategoryID:e.CategoryID,ChannelID:e.ID}));this.dialogRef.close(t)}validateSelectedCategory(){return this.channelOptions.filter(e=>e.Selected).filter(e=>e.TypeID==m.Tokopedia).findIndex(e=>e.CategoryID==0)==-1}getChannelCategory(t){let e;switch(t){case m.ShopeeV2:e="Aksesoris Fashion";break;case m.Tiktok:e="Aksesoris Fashion - Aksesoris Pakaian";break;case m.WooCommerce:e=this.product?.Category?this.product?.Category:"Following the category in POS";break;case m.Lazada:e="Fashion Accessories / Women Accessories / Others";break;default:e="Unavailable Category"}return e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(e){return new(e||n)(f(O),f(Se),f(x),f(de))},n.\u0275cmp=_({type:n,selectors:[["app-modal-uploadMultiple-product"]],decls:15,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[1,"fs-6"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo-size",3,"src"],[1,"ms-3","fs-6"],[4,"ngIf","ngIfElse"],["EMPTY",""],["bindValue","Key","bindLabel","Value","width","100%","parent","body","position","top","placeholder","Select Category",3,"items","clearable","selectedChange"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(e,o){e&1&&(l(0,"modal-material",0),g("onOk",function(){return o.onSave()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),l(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),g("change",function(E){return o.onSelectAllChannel(E.target.checked)}),r()(),l(7,"th",5)(8,"span",6),d(9,"CHANNEL"),r()(),l(10,"th",7)(11,"span",6),d(12,"CATEGORY"),r()()()(),l(13,"tbody"),u(14,Le,13,5,"ng-container",8),r()()()()),e&2&&(c("dynamicValidated",o.enableBtnOk)("config",o.modalConfig),s(14),c("ngForOf",o.channelOptions))},dependencies:[v,A,me,F,U,j,k,be],styles:[`input[type=checkbox]{width:15px;height:15px}img.channel-logo-size{width:24px;height:24px}table>thead>tr{border-top:none!important;border-left:none!important;border-right:none!important}
1
+ import{e as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-5PC5LTIZ.js";import{b as de,e as pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-4W3TWSSW.js";import{c as ge,d as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-HJWLXLFQ.js";import{A as k,q as j,s as x,t as O,z as D}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-ZKXVL46E.js";import{b as me,h as F,k as U,u as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-NKGDQMEC.js";import{b as m,c as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-TIKJQ35R.js";import{$ as ne,$a as C,$b as A,B as Z,Db as q,Eb as J,Fa as s,Ga as f,H as ee,Ja as H,K as te,Mb as N,Na as G,Oa as c,Pa as oe,T as W,Ua as u,V as P,Yb as re,Za as l,_a as r,_b as v,aa as ie,ab as I,bb as M,c as w,ca as K,db as Y,ea as _,fa as ae,fc as se,gc as ce,hb as g,ja as V,jb as h,ka as $,n as Q,ob as L,pb as d,q as X,qb as y,rb as T,wb as le,za as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-GQQPUSYL.js";var b=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}(b||{});function Me(i,n){if(i&1&&(I(0),l(1,"tr")(2,"td",11),d(3),r(),l(4,"td",11),d(5),r(),l(6,"td",12)(7,"p",13),d(8,"Product Not in Channel!"),r()()(),M()),i&2){let a=h().$implicit;s(3),T(" ",a==null?null:a.Model,""),s(2),T(" ",a==null?null:a.Code,"")}}function Te(i,n){if(i&1&&(l(0,"td",11),d(1),r()),i&2){let a=h(3).$implicit;G("rowspan",a.Channel.length),s(1),T(" ",a==null?null:a.Model,"")}}function ve(i,n){if(i&1&&(l(0,"td",11),d(1),r()),i&2){let a=h(3).$implicit;G("rowspan",a.Channel.length),s(1),T(" ",a==null?null:a.Code,"")}}var xe=i=>({"is-disabled":i});function Oe(i,n){if(i&1&&(l(0,"tr"),u(1,Te,2,2,"td",14)(2,ve,2,2,"td",14),l(3,"td",11)(4,"div",15)(5,"a",16),C(6,"img",17),r(),l(7,"div",18),d(8),r()()(),l(9,"td",11),d(10),q(11,"number"),r(),l(12,"td",19),d(13),q(14,"number"),r(),l(15,"td",19)(16,"a",20),C(17,"i",21),l(18,"span",22),d(19,"Edit"),r()()()()),i&2){let a=n.$implicit,t=n.index,e=h(3);s(1),c("ngIf",t==0),s(1),c("ngIf",t==0),s(3),c("href",a.Url,S)("title",a.Title),s(1),c("src",e.getChannelLogo(a.TypeID),S),s(1),c("matTooltip",(a==null||a.Name==null?null:a.Name.length)>55?a==null?null:a.Name:""),s(1),T(" ",a.Name," "),s(2),y(J(11,12,a.Price)),s(3),y(J(14,14,a.Inventory)),s(3),c("href",e.getHyperlinkSellerCenter(a),S)("ngClass",le(16,xe,a.TypeID==e.channelType.KalCare))("matTooltip",a.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function De(i,n){if(i&1&&u(0,Oe,20,18,"tr",8),i&2){let a=h().$implicit;c("ngForOf",a==null?null:a.Channel)}}function ke(i,n){if(i&1&&(I(0),u(1,Me,9,2,"ng-container",9)(2,De,1,1,"ng-template",null,10,N),M()),i&2){let a=n.$implicit,t=L(3);s(1),c("ngIf",!a.Channel||a.Channel.length<1)("ngIfElse",t)}}var Re=(()=>{let n=class n{constructor(t,e){this.data=t,this.dialogRef=e,this.channelType=m,this.variants=t.variants,this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new D,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(t){return B.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let e="javascript:void(0)";switch(t.TypeID){case m.ShopeeV2:e=`${b.Shoope}/portal/product/${t.ChannelItemID}`;break;case m.Tiktok:e=`${b.Tiktok}/product/edit/${t.ChannelItemID}`;break;case m.Tokopedia:e=`${b.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case m.WooCommerce:e=`${b.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case m.Lazada:e=`${b.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return e}};n.\u0275fac=function(e){return new(e||n)(f(O),f(x))},n.\u0275cmp=_({type:n,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["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,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["printChannelModal",""],[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"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,o){e&1&&(l(0,"modal-material",0),g("onCancel",function(){return o.dialogRef.close()}),l(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),d(6," VARIANT "),l(7,"sup"),C(8,"i",5),r()(),l(9,"th",4),d(10,"SKU"),r(),l(11,"th",4),d(12," PRODUCT "),l(13,"sup"),C(14,"i",6),r()(),l(15,"th",4),d(16,"PRICE"),r(),l(17,"th",7),d(18,"INVENTORY"),r(),C(19,"th",4),r()(),l(20,"tbody"),u(21,ke,4,2,"ng-container",8),r()()()()),e&2&&(c("config",o.modalConfig),s(21),c("ngForOf",o.variants))},dependencies:[re,v,A,j,k,se],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}"]});let i=n;return i})();var R=class{constructor(){this._input$=new w,this._destroy$=new w,this._loading=!1,this._bufferSize=50,this.data=[]}onSearch(){this._input$.pipe(ee(200),te(),X(n=>(n&&(n=n.toLowerCase()),this.filterData(n))),Z(n=>n!==void 0),P(this._destroy$)).subscribe(n=>{this._dataBuffer=n.slice(0,this._bufferSize)})}onClear(){this._dataBuffer=this._data.slice(0,this._bufferSize)}filterData(n){let a=-1,t;return this._data.filter(o=>(t=JSON.stringify(o).toLowerCase(),a=t.indexOf(n),a!==-1||n==null))}get input$(){return this._input$}get bufferData(){return this._dataBuffer}get loading(){return this._loading}set data(n){this._data=n||[],this._dataBuffer=this._data.slice(0,this._bufferSize),this.onSearch()}initSelectedValue(n,a){if(B.IsNotEmpty(n)){let t=this._data.filter(e=>e[a].toString().toLowerCase().indexOf(n)!==-1);this._dataBuffer=t.slice(0,this._bufferSize)}}set bufferSize(n){this._bufferSize=n}onScrollToEnd(){this.fetchMore()}fetchMore(){let n=this._dataBuffer.length,a=this._data.slice(n,this._bufferSize+n);this._loading=!0,setTimeout(()=>{this._loading=!1,this._dataBuffer=this._dataBuffer.concat(a)},200)}destroy(){this._destroy$.next(!0),this._destroy$.complete()}};var be=(()=>{let n=class n{set items(t){this.ngSelectInfiniteScroll.data=t,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}get selected(){return this._selected}set selected(t){this._selected=t,this.ngSelectInfiniteScroll.initSelectedValue(this.selected,this.bindValue)}constructor(){this.width="100%",this.clearable=!0,this.disabled=!1,this.ngSelectInfiniteScroll=new R,this.selectedChange=new H,this.selectedLabel=new H}onSelectChange(t){t?(this.selectedChange.emit(t[this.bindValue]),this.selectedLabel.emit(t[this.bindLabel])):(this.selectedChange.emit(null),this.selectedLabel.emit(null))}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=_({type:n,selectors:[["ng-select-infinite"]],inputs:{placeholder:"placeholder",bindValue:"bindValue",bindLabel:"bindLabel",width:"width",clearable:"clearable",parent:"parent",disabled:"disabled",items:"items",selected:"selected"},outputs:{selectedChange:"selectedChange",selectedLabel:"selectedLabel"},decls:1,vars:12,consts:[[3,"disabled","virtualScroll","typeahead","items","bindLabel","bindValue","placeholder","ngModel","clearable","appendTo","clear","scrollToEnd","change"]],template:function(e,o){e&1&&(l(0,"ng-select",0),g("clear",function(){return o.ngSelectInfiniteScroll.onClear()})("scrollToEnd",function(){return o.ngSelectInfiniteScroll.onScrollToEnd()})("change",function(E){return o.onSelectChange(E)}),r()),e&2&&(oe("width",o.width),c("disabled",o.disabled)("virtualScroll",!0)("typeahead",o.ngSelectInfiniteScroll.input$)("items",o.ngSelectInfiniteScroll.bufferData)("bindLabel",o.bindLabel)("bindValue",o.bindValue)("placeholder",o.placeholder)("ngModel",o.selected)("clearable",o.clearable)("appendTo",o.parent))},dependencies:[ge,F,U]});let i=n;return i})(),ot=(()=>{let n=class n{};n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=ae({type:n}),n.\u0275inj=ie({imports:[ce,ue,he]});let i=n;return i})();var Se=(()=>{let n=class n{constructor(t,e){this.LocalData=t,this.httpService=e}getCategoriesByTypeId(t,e){return this.LocalData.getCategoriesByChannelType(t).pipe(W(o=>o!=null?Q(o):this._getCategoriesByTypeID(t,e)))}_getCategoriesByTypeID(t,e){let o={TypeID:t,ID:e};return this.httpService.post("/api/Channel/getCategoriesByTypeID",o).pipe(W(p=>this.LocalData.saveCategoriesByChannelType(p,t)))}};n.\u0275fac=function(e){return new(e||n)(K(fe),K(pe))},n.\u0275prov=ne({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function Ve(i,n){if(i&1){let a=Y();I(0),l(1,"ng-select-infinite",16),g("selectedChange",function(e){V(a);let o=h().index,p=h();return $(p.onSelectCategory(e,o))}),r(),M()}if(i&2){let a=h().$implicit;s(1),c("items",a.Categories)("clearable",!1)}}function $e(i,n){if(i&1&&(l(0,"div",17),C(1,"input",18),r()),i&2){let a=h().$implicit,t=h();c("matTooltip",t.channelType.WooCommerce==a.TypeID?"":"Product Category is Harcoded, Please Change Product Category in Seller Center"),s(1),c("placeholder",t.getChannelCategory(a.TypeID))}}function Le(i,n){if(i&1){let a=Y();I(0),l(1,"tr")(2,"td",9)(3,"input",10),g("ngModelChange",function(e){let p=V(a).$implicit;return $(p.Selected=e)})("ngModelChange",function(){V(a);let e=h();return $(e.onSelectChannel())}),r()(),l(4,"td")(5,"div",11),C(6,"img",12),l(7,"span",13),d(8),r()()(),l(9,"td"),u(10,Ve,2,2,"ng-container",14)(11,$e,2,2,"ng-template",null,15,N),r()(),M()}if(i&2){let a=n.$implicit,t=L(12);s(3),c("ngModel",a.Selected),s(3),c("src",a.Img,S),s(2),y(a.Name),s(2),c("ngIf",a.Categories.length>0)("ngIfElse",t)}}var ft=(()=>{let n=class n{constructor(t,e,o,p){this.data=t,this.channelService=e,this.dialogRef=o,this.toastrService=p,this.channelOptions=[],this.uploadResponse=[],this.channelType=m,this.enableBtnOk=!1,this.destroy$=new w,this.uploadResponse=[],this.channels=this.data.channels,this.product=t.product}ngOnInit(){this.initModalConfig(),this.initChannelOptions(),this.initCategories()}initModalConfig(){this.modalConfig=new D,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0}initCategories(){this.filterChannelTypeId().forEach(e=>{this.channelService.getCategoriesByTypeId(e.channelType,e.channelId).pipe(P(this.destroy$)).subscribe(o=>{this.setCategoriesChannelOption(e.channelType,o)})})}setCategoriesChannelOption(t,e){this.channelOptions=this.channelOptions.map(o=>(o.TypeID==t&&(o.Categories=e),o))}initChannelOptions(){this.channelOptions=this.channels.map(t=>({Name:t.Name,Img:t.Img,ID:t.ID,Selected:!1,CategoryID:this.initDefaultChannelCategoryId(t.TypeID),TypeID:t.TypeID,Categories:[]}))}initDefaultChannelCategoryId(t){let e=0;switch(t){case m.Lazada:e=6509;break}return e}filterChannelTypeId(){return this.data.channels.map(e=>({channelType:e.TypeID,channelId:e.ID})).filter((e,o,p)=>p.findIndex(E=>e.channelType==E.channelType)==o).filter(e=>e.channelType==m.Tokopedia)}onSelectCategory(t,e){this.channelOptions[e].CategoryID=t,this.channelOptions[e].Selected=!0,this.onSelectChannel()}onSelectAllChannel(t){this.channelOptions=this.channelOptions.map(e=>(e.Selected=t,e)),this.enableBtnOk=t}onSelectChannel(){this.enableBtnOk=this.hasSelectedChannel()}hasSelectedChannel(){return this.channelOptions.findIndex(t=>t.Selected)!==-1}onClose(){this.dialogRef.close()}onSave(){if(!this.validateSelectedCategory()){this.toastrService.warning("Category is required","Warning!");return}let t=this.channelOptions.filter(e=>e.Selected).map(e=>({CategoryID:e.CategoryID,ChannelID:e.ID}));this.dialogRef.close(t)}validateSelectedCategory(){return this.channelOptions.filter(e=>e.Selected).filter(e=>e.TypeID==m.Tokopedia).findIndex(e=>e.CategoryID==0)==-1}getChannelCategory(t){let e;switch(t){case m.ShopeeV2:e="Aksesoris Fashion";break;case m.Tiktok:e="Aksesoris Fashion - Aksesoris Pakaian";break;case m.WooCommerce:e=this.product?.Category?this.product?.Category:"Following the category in POS";break;case m.Lazada:e="Fashion Accessories / Women Accessories / Others";break;default:e="Unavailable Category"}return e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};n.\u0275fac=function(e){return new(e||n)(f(O),f(Se),f(x),f(de))},n.\u0275cmp=_({type:n,selectors:[["app-modal-uploadMultiple-product"]],decls:15,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"table"],[1,"text-center",2,"width","6%"],["type","checkbox",3,"change"],[2,"width","30%"],[1,"fs-6"],[2,"width","60%"],[4,"ngFor","ngForOf"],[1,"text-center"],["type","checkbox",3,"ngModel","ngModelChange"],[1,"d-flex","align-items-center"],["alt","",1,"channel-logo-size",3,"src"],[1,"ms-3","fs-6"],[4,"ngIf","ngIfElse"],["EMPTY",""],["bindValue","Key","bindLabel","Value","width","100%","parent","body","position","top","placeholder","Select Category",3,"items","clearable","selectedChange"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],["type","text","disabled","",1,"form-control","rounded",2,"height","40px",3,"placeholder"]],template:function(e,o){e&1&&(l(0,"modal-material",0),g("onOk",function(){return o.onSave()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),l(1,"div",1)(2,"table",2)(3,"thead")(4,"tr")(5,"th",3)(6,"input",4),g("change",function(E){return o.onSelectAllChannel(E.target.checked)}),r()(),l(7,"th",5)(8,"span",6),d(9,"CHANNEL"),r()(),l(10,"th",7)(11,"span",6),d(12,"CATEGORY"),r()()()(),l(13,"tbody"),u(14,Le,13,5,"ng-container",8),r()()()()),e&2&&(c("dynamicValidated",o.enableBtnOk)("config",o.modalConfig),s(14),c("ngForOf",o.channelOptions))},dependencies:[v,A,me,F,U,j,k,be],styles:[`input[type=checkbox]{width:15px;height:15px}img.channel-logo-size{width:24px;height:24px}table>thead>tr{border-top:none!important;border-left:none!important;border-right:none!important}
2
2
  `],encapsulation:2});let i=n;return i})();function Ne(i,n){if(i&1&&(l(0,"tr")(1,"td"),d(2),r(),l(3,"td"),d(4),r()()),i&2){let a=n.$implicit;s(2),y(a==null?null:a.Name),s(2),y(a==null?null:a.ChannelVariationSKU)}}var _t=(()=>{let n=class n{constructor(t,e){this.data=t,this.dialogRef=e}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new D,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}};n.\u0275fac=function(e){return new(e||n)(f(O),f(x))},n.\u0275cmp=_({type:n,selectors:[["app-modal-variants"]],decls:11,vars:2,consts:[[3,"config","onCancel"],["content",""],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"]],template:function(e,o){e&1&&(l(0,"modal-material",0),g("onCancel",function(){return o.dialogRef.close()}),l(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th"),d(6,"Variant"),r(),l(7,"th"),d(8,"SKU"),r()()(),l(9,"tbody"),u(10,Ne,5,2,"tr",4),r()()()()),e&2&&(c("config",o.modalConfig),s(10),c("ngForOf",o.data.variants))},dependencies:[v,k],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}"]});let i=n;return i})();export{Re as a,ot as b,ft as c,_t as d};
@@ -1 +1 @@
1
- import{a as ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3OMVIKHK.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5F2YQ7XL.js";import{b as xe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-GVJVVJCU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-W2SKBEUZ.js";import{b as Ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-UYW3YL3H.js";import{a as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-WJGIBFHG.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-IIGTCNJI.js";import{c as Oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-7F3GACIE.js";import{a as ae,f as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5YDKDDXQ.js";import{a as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-D4PUISDS.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-V74TRO5C.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-AOQBLGBU.js";import{b as re,c as se}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-WMKNIYJG.js";import{c as be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-BPOHVA6C.js";import{b as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-6O46WM77.js";import{h as Ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-NFHX3EWZ.js";import{d as me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3KO3N6JP.js";import{a as p}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-35SISJKC.js";import{A as _e,C as ve,a as de,q as he,r as k,x as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import{E as fe,J as z,t as pe,w as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{u as oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-T2YIFX3Q.js";import{$a as _,$b as X,Ba as V,Da as G,Db as B,Eb as R,Fa as r,Ga as d,Ic as te,Ka as W,Kc as ie,Lc as ne,Ma as q,Mb as I,Mc as L,Oa as m,Qa as M,Ra as D,Tb as y,Ua as u,Wb as Z,Yb as Y,Za as s,_a as l,_b as Q,aa as f,ab as x,bb as O,cc as J,da as w,dc as K,ea as $,fa as h,ga as j,gc as P,hb as N,jb as c,ob as E,pb as g,q as U,qb as A,rb as b,va as F,za as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-KOJSHFZJ.js";var S=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[C.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[C.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[C.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[C.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fas fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${ae.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var De=0,Ie="mat-badge-content",ye=(()=>{let i=class i{get color(){return this._color}set color(t){this._setColor(t),this._color=t}get content(){return this._content}set content(t){this._updateRenderedContent(t)}get description(){return this._description}set description(t){this._updateDescription(t)}constructor(t,n,o,v,we){this._ngZone=t,this._elementRef=n,this._ariaDescriber=o,this._renderer=v,this._animationMode=we,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=De++,this._isInitialized=!1,this._interactivityChecker=w(ge),this._document=w(Z)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let t=this._renderer.createElement("span"),n="mat-badge-active";return t.setAttribute("id",`mat-badge-content-${this._id}`),t.setAttribute("aria-hidden","true"),t.classList.add(Ie),this._animationMode==="NoopAnimations"&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(n)})}):t.classList.add(n),t}_updateRenderedContent(t){let n=`${t??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),t&&n.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Ie}`);for(let n of Array.from(t))n!==this._badgeElement&&n.remove()}};i.\u0275fac=function(n){return new(n||i)(d(W),d(V),d(pe),d(G),d(F,8))},i.\u0275dir=j({type:i,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,o){n&2&&M("mat-badge-overlap",o.overlap)("mat-badge-above",o.isAbove())("mat-badge-below",!o.isAbove())("mat-badge-before",!o.isAfter())("mat-badge-after",o.isAfter())("mat-badge-small",o.size==="small")("mat-badge-medium",o.size==="medium")("mat-badge-large",o.size==="large")("mat-badge-hidden",o.hidden||!o.content)("mat-badge-disabled",o.disabled)},inputs:{color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap",y],disabled:["matBadgeDisabled","disabled",y],position:["matBadgePosition","position"],content:["matBadge","content"],description:["matBadgeDescription","description"],size:["matBadgeSize","size"],hidden:["matBadgeHidden","hidden",y]},features:[q]});let e=i;return e})(),Pe=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[fe,z,z]});let e=i;return e})();function Ae(e,i){if(e&1&&(x(0),s(1,"p",22),g(2),l(),O()),e&2){let a=c(3).$implicit;r(2),A(a.Title)}}function Be(e,i){if(e&1&&(s(0,"p"),g(1),l()),e&2){let a=c(3).$implicit;r(1),b("",a.Title," ")}}function Re(e,i){if(e&1&&(s(0,"a",20),_(1,"i"),u(2,Ae,3,1,"ng-container",17)(3,Be,2,1,"ng-template",null,21,I),l()),e&2){let a=E(4),t=c(2).$implicit;m("href",t.Url,H),r(1),D(t.Icon),r(1),m("ngIf",t.Badge)("ngIfElse",a)}}function Le(e,i){if(e&1&&(x(0),u(1,Re,5,5,"a",19),O()),e&2){let a=c().$implicit;r(1),m("ngxPermissionsOnly",a.Roles)}}function ze(e,i){if(e&1&&(x(0),s(1,"p",26),B(2,"async"),g(3),l(),O()),e&2){let a=c(3).$implicit,t=c();r(1),m("matBadgeHidden",R(2,2,t.notifications$)==0),r(2),A(a.Title)}}function Ue(e,i){if(e&1&&(s(0,"p"),g(1),l()),e&2){let a=c(3).$implicit;r(1),b("",a.Title," ")}}function $e(e,i){if(e&1&&(s(0,"a",24),_(1,"i"),u(2,ze,4,4,"ng-container",17)(3,Ue,2,1,"ng-template",null,25,I),l()),e&2){let a=E(4),t=c(2).$implicit,n=c();m("matTooltip",n.isCollapseSidebar?t.Title:"")("routerLink",t.Url),r(1),D(t.Icon),r(1),m("ngIf",t.Badge)("ngIfElse",a)}}function je(e,i){if(e&1&&u(0,$e,5,6,"a",23),e&2){let a=c().$implicit;m("ngxPermissionsOnly",a.Roles)}}function Fe(e,i){if(e&1&&(s(0,"li",16),u(1,Le,2,1,"ng-container",17)(2,je,1,1,"ng-template",null,18,I),l()),e&2){let a=i.$implicit,t=E(3);r(1),m("ngIf",a.ExternalLink)("ngIfElse",t)}}var ke=(()=>{let i=class i{constructor(t,n,o,v){this.toggleSidebarService=t,this.notificationService=n,this.decodeTokenService=o,this.authService=v,this.Menu={},this.isCollapseSidebar=!1,this.token=o.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new S().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(U(t=>t.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(t){if(t){let n,o=t.split(" ");return o.length==1?n=o[0].substring(0,2):n=o.shift().charAt(0)+o.pop().charAt(0),n}}};i.\u0275fac=function(n){return new(n||i)(d(de),d(ce),d(ee),d(le))},i.\u0275cmp=$({type:i,selectors:[["app-menu"]],decls:23,vars:9,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["DEFAULT_ROUTE",""],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["NO_BADGE",""],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["WITHOUT_BADGE",""],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation",3,"matBadgeHidden"]],template:function(n,o){n&1&&(s(0,"div",0),B(1,"async"),s(2,"div",1)(3,"button",2),N("click",function(){return o.onCallapseSidebar()}),_(4,"i",3),l(),s(5,"div",4)(6,"div",5)(7,"a",6),g(8),l(),s(9,"div",7)(10,"div",8),g(11),l(),_(12,"div",9),s(13,"a",10),N("click",function(){return o.onLogout()}),_(14,"i",11),g(15,"\xA0 "),s(16,"span"),g(17," Log Out"),l()()()()(),s(18,"div",12)(19,"ul",13),u(20,Fe,4,2,"li",14),l()()(),s(21,"div",15),_(22,"router-outlet"),l()()),n&2&&(M("nav-open",R(1,7,o.toggleState$)),r(2),m("ngClass",o.isCollapseSidebar?"collapses":""),r(2),m("ngClass",o.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),b(" ",o.storeName," "),r(3),b("",o.token==null?null:o.token.LID," "),r(9),m("ngForOf",o.Menu))},dependencies:[Y,Q,X,te,ie,ne,he,ye,re,J],styles:[".top-initial[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:initial!important}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=i;return e})();var He=[{path:"",component:ke,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-QVEJEIWR.js").then(e=>e.DashboardModule),canActivate:[p],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-IL3R7THF.js").then(e=>e.ProductModule),canActivate:[p],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-AI77CZ3S.js").then(e=>e.InventoryModule),canActivate:[p],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-QDC2JFGY.js").then(e=>e.PriceModule),canActivate:[p],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-RISMLJLZ.js").then(e=>e.OrdersModule),canActivate:[p],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-4VWZIBEC.js").then(e=>e.ReportModule),canActivate:[p],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VVTMP7TD.js").then(e=>e.LogisticModule),canActivate:[p],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-MUDZXRNT.js").then(e=>e.ChannelsModule),canActivate:[p],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZNIAYABL.js").then(e=>e.LogsModule),canActivate:[p],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-Z7PAAM54.js").then(e=>e.NotificationModule),canActivate:[p],data:{title:"Push Notification"}}]}],Se=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[L.forChild(He),L]});let e=i;return e})();var Te=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[P,oe,ue,be,Oe,Ce,Me,Ee,k,_e,xe,me]});let e=i;return e})();var di=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({providers:[K],imports:[P,Se,ve,k,Te,Pe,se.forChild()]});let e=i;return e})();export{di as MenuModule};
1
+ import{a as ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-477YGYRZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-YWVCQHE6.js";import{b as xe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-BABEGVXK.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-6WPY4EOZ.js";import{b as Ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-53BVSUPZ.js";import{a as C}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-U4GUAIS3.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-CPDVV764.js";import{c as Oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-2C52VEVY.js";import{a as ae,f as le}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-5PC5LTIZ.js";import{a as ee}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-ISOVZHS4.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-4W3TWSSW.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-QKIFJRTX.js";import{b as re,c as se}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-NTGLKKPF.js";import{c as be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-PUT3VRK4.js";import{b as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-UOPHZWQE.js";import{h as Ce}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-2HCFB6E7.js";import{d as me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-HJWLXLFQ.js";import{a as p}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-UWFJ6EKO.js";import{A as _e,C as ve,a as de,q as he,r as k,x as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-ZKXVL46E.js";import{E as fe,J as z,t as pe,w as ge}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-S2CEMSAL.js";import{u as oe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-NKGDQMEC.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-TIKJQ35R.js";import{$a as _,$b as X,Ba as V,Da as G,Db as B,Eb as R,Fa as r,Ga as d,Ic as te,Ka as W,Kc as ie,Lc as ne,Ma as q,Mb as I,Mc as L,Oa as m,Qa as M,Ra as D,Tb as y,Ua as u,Wb as Z,Yb as Y,Za as s,_a as l,_b as Q,aa as f,ab as x,bb as O,cc as J,da as w,dc as K,ea as $,fa as h,ga as j,gc as P,hb as N,jb as c,ob as E,pb as g,q as U,qb as A,rb as b,va as F,za as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-GQQPUSYL.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-BWIMRM2L.js";var S=class{constructor(){this.menus=[{Icon:"fa-solid fa-chart-pie",Title:"Dashboard",Url:"/menu/dashboard",Roles:[C.dashboardView]},{Icon:"fas fa-tag",Title:"Products",Url:"/menu/products",Roles:[]},{Icon:"fas fa-archive",Title:"Inventory",Url:"/menu/inventory",Roles:[]},{Icon:"fas fa-money-bill-alt",Title:"Price",Url:"/menu/price",Roles:[]},{Icon:"fas fa-shopping-cart",Title:"Order",Url:"/menu/Order",Roles:[C.orderView]},{Icon:"fas fa-clipboard-list",Title:"Sync Log",Url:"/menu/sync-log",Roles:[C.orderView]},{Icon:"fas fa-dolly",Title:"Logistic",Url:"/menu/Logistic",Roles:[]},{Icon:"fas fa-cog",Title:"Channel",Url:"/menu/channel",Roles:[C.channelView]},{Icon:"fas fa-file-alt",Title:"Logs",Url:"/menu/log",Roles:[]},{Icon:"fas fa-bell",Title:"Notification",Url:"/menu/notification",Badge:!0,Roles:[]},{Icon:"fas fa-wand-magic-sparkles",Title:"What`s New",Url:`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${ae.version}`,ExternalLink:!0,CustomColor:"#ff2323",Badge:!0,Roles:[]}]}get getMenu(){return this.menus}};var De=0,Ie="mat-badge-content",ye=(()=>{let i=class i{get color(){return this._color}set color(t){this._setColor(t),this._color=t}get content(){return this._content}set content(t){this._updateRenderedContent(t)}get description(){return this._description}set description(t){this._updateDescription(t)}constructor(t,n,o,v,we){this._ngZone=t,this._elementRef=n,this._ariaDescriber=o,this._renderer=v,this._animationMode=we,this._color="primary",this.overlap=!0,this.position="above after",this.size="medium",this._id=De++,this._isInitialized=!1,this._interactivityChecker=w(ge),this._document=w(Z)}isAbove(){return this.position.indexOf("below")===-1}isAfter(){return this.position.indexOf("before")===-1}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&(this._renderer.destroyNode(this._badgeElement),this._inlineBadgeDescription?.remove()),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_isHostInteractive(){return this._interactivityChecker.isFocusable(this._elementRef.nativeElement,{ignoreVisibility:!0})}_createBadgeElement(){let t=this._renderer.createElement("span"),n="mat-badge-active";return t.setAttribute("id",`mat-badge-content-${this._id}`),t.setAttribute("aria-hidden","true"),t.classList.add(Ie),this._animationMode==="NoopAnimations"&&t.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(t),typeof requestAnimationFrame=="function"&&this._animationMode!=="NoopAnimations"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add(n)})}):t.classList.add(n),t}_updateRenderedContent(t){let n=`${t??""}`.trim();this._isInitialized&&n&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=n),this._content=n}_updateDescription(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),(!t||this._isHostInteractive())&&this._removeInlineDescription(),this._description=t,this._isHostInteractive()?this._ariaDescriber.describe(this._elementRef.nativeElement,t):this._updateInlineDescription()}_updateInlineDescription(){this._inlineBadgeDescription||(this._inlineBadgeDescription=this._document.createElement("span"),this._inlineBadgeDescription.classList.add("cdk-visually-hidden")),this._inlineBadgeDescription.textContent=this.description,this._badgeElement?.appendChild(this._inlineBadgeDescription)}_removeInlineDescription(){this._inlineBadgeDescription?.remove(),this._inlineBadgeDescription=void 0}_setColor(t){let n=this._elementRef.nativeElement.classList;n.remove(`mat-badge-${this._color}`),t&&n.add(`mat-badge-${t}`)}_clearExistingBadges(){let t=this._elementRef.nativeElement.querySelectorAll(`:scope > .${Ie}`);for(let n of Array.from(t))n!==this._badgeElement&&n.remove()}};i.\u0275fac=function(n){return new(n||i)(d(W),d(V),d(pe),d(G),d(F,8))},i.\u0275dir=j({type:i,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(n,o){n&2&&M("mat-badge-overlap",o.overlap)("mat-badge-above",o.isAbove())("mat-badge-below",!o.isAbove())("mat-badge-before",!o.isAfter())("mat-badge-after",o.isAfter())("mat-badge-small",o.size==="small")("mat-badge-medium",o.size==="medium")("mat-badge-large",o.size==="large")("mat-badge-hidden",o.hidden||!o.content)("mat-badge-disabled",o.disabled)},inputs:{color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap",y],disabled:["matBadgeDisabled","disabled",y],position:["matBadgePosition","position"],content:["matBadge","content"],description:["matBadgeDescription","description"],size:["matBadgeSize","size"],hidden:["matBadgeHidden","hidden",y]},features:[q]});let e=i;return e})(),Pe=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[fe,z,z]});let e=i;return e})();function Ae(e,i){if(e&1&&(x(0),s(1,"p",22),g(2),l(),O()),e&2){let a=c(3).$implicit;r(2),A(a.Title)}}function Be(e,i){if(e&1&&(s(0,"p"),g(1),l()),e&2){let a=c(3).$implicit;r(1),b("",a.Title," ")}}function Re(e,i){if(e&1&&(s(0,"a",20),_(1,"i"),u(2,Ae,3,1,"ng-container",17)(3,Be,2,1,"ng-template",null,21,I),l()),e&2){let a=E(4),t=c(2).$implicit;m("href",t.Url,H),r(1),D(t.Icon),r(1),m("ngIf",t.Badge)("ngIfElse",a)}}function Le(e,i){if(e&1&&(x(0),u(1,Re,5,5,"a",19),O()),e&2){let a=c().$implicit;r(1),m("ngxPermissionsOnly",a.Roles)}}function ze(e,i){if(e&1&&(x(0),s(1,"p",26),B(2,"async"),g(3),l(),O()),e&2){let a=c(3).$implicit,t=c();r(1),m("matBadgeHidden",R(2,2,t.notifications$)==0),r(2),A(a.Title)}}function Ue(e,i){if(e&1&&(s(0,"p"),g(1),l()),e&2){let a=c(3).$implicit;r(1),b("",a.Title," ")}}function $e(e,i){if(e&1&&(s(0,"a",24),_(1,"i"),u(2,ze,4,4,"ng-container",17)(3,Ue,2,1,"ng-template",null,25,I),l()),e&2){let a=E(4),t=c(2).$implicit,n=c();m("matTooltip",n.isCollapseSidebar?t.Title:"")("routerLink",t.Url),r(1),D(t.Icon),r(1),m("ngIf",t.Badge)("ngIfElse",a)}}function je(e,i){if(e&1&&u(0,$e,5,6,"a",23),e&2){let a=c().$implicit;m("ngxPermissionsOnly",a.Roles)}}function Fe(e,i){if(e&1&&(s(0,"li",16),u(1,Le,2,1,"ng-container",17)(2,je,1,1,"ng-template",null,18,I),l()),e&2){let a=i.$implicit,t=E(3);r(1),m("ngIf",a.ExternalLink)("ngIfElse",t)}}var ke=(()=>{let i=class i{constructor(t,n,o,v){this.toggleSidebarService=t,this.notificationService=n,this.decodeTokenService=o,this.authService=v,this.Menu={},this.isCollapseSidebar=!1,this.token=o.getParseToken(),this.storeName=this.token.StoreName,this.Menu=new S().getMenu,this.toggleState$=this.toggleSidebarService.toggleState$}ngOnInit(){this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotification().pipe(U(t=>t.length))}onLogout(){this.authService.logout()}onCallapseSidebar(){this.isCollapseSidebar=!this.isCollapseSidebar,this.storeName=this.token.StoreName,this.isCollapseSidebar&&(this.storeName=this.getInitialTitle(this.token.StoreName))}getInitialTitle(t){if(t){let n,o=t.split(" ");return o.length==1?n=o[0].substring(0,2):n=o.shift().charAt(0)+o.pop().charAt(0),n}}};i.\u0275fac=function(n){return new(n||i)(d(de),d(ce),d(ee),d(le))},i.\u0275cmp=$({type:i,selectors:[["app-menu"]],decls:23,vars:9,consts:[[1,"wrapper"],["data-color","green",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-md-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fas","cursor",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-bs-toggle","dropdown","aria-expanded","false",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center","cursor-pointer"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fas","fa-sign-out-alt"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",4,"ngFor","ngForOf"],[1,"main-panel"],["routerLinkActive","active"],[4,"ngIf","ngIfElse"],["DEFAULT_ROUTE",""],["class","nav-link position-relative d-block changelog","target","_blank",3,"href",4,"ngxPermissionsOnly"],["target","_blank",1,"nav-link","position-relative","d-block","changelog",3,"href"],["NO_BADGE",""],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation"],["class","nav-link position-relative d-block","matTooltipPosition","right",3,"matTooltip","routerLink",4,"ngxPermissionsOnly"],["matTooltipPosition","right",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"],["WITHOUT_BADGE",""],["matBadge","!","matBadgeColor","warn","matBadgeSize","small",1,"shake-animation",3,"matBadgeHidden"]],template:function(n,o){n&1&&(s(0,"div",0),B(1,"async"),s(2,"div",1)(3,"button",2),N("click",function(){return o.onCallapseSidebar()}),_(4,"i",3),l(),s(5,"div",4)(6,"div",5)(7,"a",6),g(8),l(),s(9,"div",7)(10,"div",8),g(11),l(),_(12,"div",9),s(13,"a",10),N("click",function(){return o.onLogout()}),_(14,"i",11),g(15,"\xA0 "),s(16,"span"),g(17," Log Out"),l()()()()(),s(18,"div",12)(19,"ul",13),u(20,Fe,4,2,"li",14),l()()(),s(21,"div",15),_(22,"router-outlet"),l()()),n&2&&(M("nav-open",R(1,7,o.toggleState$)),r(2),m("ngClass",o.isCollapseSidebar?"collapses":""),r(2),m("ngClass",o.isCollapseSidebar?"fa-angle-left":"fa-angle-right"),r(4),b(" ",o.storeName," "),r(3),b("",o.token==null?null:o.token.LID," "),r(9),m("ngForOf",o.Menu))},dependencies:[Y,Q,X,te,ie,ne,he,ye,re,J],styles:[".top-initial[_ngcontent-%COMP%] .dropdown-menu.show[_ngcontent-%COMP%]{top:initial!important}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}.full-container[_ngcontent-%COMP%]{padding-top:0!important}} p.shake-animation.mat-badge>span.mat-badge-content{animation:_ngcontent-%COMP%_shake-animation 4.72s ease infinite;font-size:12px;transform-origin:50% 50%;right:-14px!important}@keyframes _ngcontent-%COMP%_shake-animation{0%{transform:translate(0)}1.78571%{transform:translate(5px)}3.57143%{transform:translate(0)}5.35714%{transform:translate(5px)}7.14286%{transform:translate(0)}8.92857%{transform:translate(5px)}10.71429%{transform:translate(0)}to{transform:translate(0)}} .changelog:visited p.shake-animation.mat-badge>span.mat-badge-content{color:#77c425;background-color:#77c425;z-index:-1}@media print{.main-panel[_ngcontent-%COMP%]{padding:0!important}}"]});let e=i;return e})();var He=[{path:"",component:ke,children:[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"dashboard",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-G2EXZS3H.js").then(e=>e.DashboardModule),canActivate:[p],data:{title:"Dashboard"}},{path:"products",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-FD2RWVNI.js").then(e=>e.ProductModule),canActivate:[p],data:{title:"Products"}},{path:"inventory",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-KFU3EEIJ.js").then(e=>e.InventoryModule),canActivate:[p],data:{title:"Inventory"}},{path:"price",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-S4WZQ6LU.js").then(e=>e.PriceModule),canActivate:[p],data:{title:"Price"}},{path:"Order",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-NSEFWK5A.js").then(e=>e.OrdersModule),canActivate:[p],data:{title:"Order"}},{path:"sync-log",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-62IMMDNX.js").then(e=>e.ReportModule),canActivate:[p],data:{title:"Report"}},{path:"Logistic",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-5UNEOFJK.js").then(e=>e.LogisticModule),canActivate:[p],data:{title:"Logistic"}},{path:"channel",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-AJD5SEOZ.js").then(e=>e.ChannelsModule),canActivate:[p],data:{title:"Marketplace"}},{path:"log",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-Q2FASLCV.js").then(e=>e.LogsModule),canActivate:[p],data:{title:"Orders"}},{path:"notification",loadChildren:()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-CA4VOEUC.js").then(e=>e.NotificationModule),canActivate:[p],data:{title:"Push Notification"}}]}],Se=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[L.forChild(He),L]});let e=i;return e})();var Te=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({imports:[P,oe,ue,be,Oe,Ce,Me,Ee,k,_e,xe,me]});let e=i;return e})();var di=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=h({type:i}),i.\u0275inj=f({providers:[K],imports:[P,Se,ve,k,Te,Pe,se.forChild()]});let e=i;return e})();export{di as MenuModule};
@@ -1 +1 @@
1
- import{a as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3OMVIKHK.js";import{a as dt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-Y4MB3DWC.js";import{a as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-44TEKK34.js";import{f as lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-5YDKDDXQ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-D4PUISDS.js";import{e as et}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-V74TRO5C.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-AOQBLGBU.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-WMKNIYJG.js";import{a as mt,c as ct,d as pt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-3KO3N6JP.js";import{B as k,C as st}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{h as nt,k as ot,u as at}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{c as rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-T2YIFX3Q.js";import{$a as D,$b as M,Db as d,Eb as _,Fa as m,Fb as S,Ga as v,Hc as it,Kc as R,Mb as Y,Mc as $,Oa as c,Q as j,T as z,Ua as u,V as q,Yb as Z,Za as r,_a as o,_b as tt,aa as I,ab as g,bb as h,c as A,cc as P,db as G,dc as w,ea as y,fa as N,fc as L,gc as F,hb as T,ja as b,jb as f,ka as E,mb as J,ob as K,pb as l,q as C,qb as s,rb as x,vb as Q,wb as W,xb as X,ya as U,za as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-KOJSHFZJ.js";function It(t,e){if(t&1&&(r(0,"span",12),D(1,"img",13),o(),l(2)),t&2){let n=e.item;m(1),c("src",n.logo,H),m(1),x(" ",n.Name," ")}}function yt(t,e){if(t&1&&(g(0),l(1),d(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(1),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Nt(t,e){t&1&&l(0," - ")}var bt=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Et=()=>["/menu/notification/detail"],Dt=t=>({ID:t});function Tt(t,e){if(t&1&&(g(0),r(1,"tr",14)(2,"td")(3,"a",15),D(4,"img",16),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",17),o(),r(11,"td"),u(12,yt,5,4,"ng-container",18)(13,Nt,1,0,"ng-template",null,19,Y),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),d(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(1),c("ngClass",X(14,bt,n.Status==1,n.Status==0)),m(2),c("routerLink",Q(17,Et))("queryParams",W(18,Dt,n.ID)),m(1),J("src",n.Img,H),m(2),s(n.Name),m(3),s(n.Label),m(1),c("innerHTML",n.Message,U),m(2),c("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),s(n.StatusLabel),m(2),s(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Mt(t,e){if(t&1){let n=G();g(0),r(1,"div",4)(2,"div",20)(3,"app-custom-paginator",21),T("total",function(){b(n);let i=f(2);return E(i.getRowCount())})("next",function(){b(n);let i=f(2);return E(i.onNextPage())})("previous",function(){b(n);let i=f(2);return E(i.onPreviousPage())}),d(4,"async"),d(5,"async"),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),c("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Pt(t,e){if(t&1&&(g(0),u(1,Mt,6,8,"ng-container",11),h()),t&2){let n=e.ngIf;m(1),c("ngIf",n.length>0)}}var ft=(()=>{let e=class e{constructor(a,i,p){this.http=a,this.notificationService=i,this.authService=p,this.filter=new dt,this.destroy$=new A,this.channelOptions=p.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(q(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=rt.getChannelLogoByTypeId(i.TypeID),i)),a}onNextPage(){this.filter.PageNumber+=1,this.getNotifications()}onPreviousPage(){this.filter.PageNumber-=1,this.getNotifications()}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(et),v(B),v(lt))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["timeNotAvailable",""],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(i,p){i&1&&(r(0,"mainpanel",0),T("onSubmit",function(){return p.onFilter()}),r(1,"filters")(2,"div")(3,"h6"),l(4,"Channel"),o(),r(5,"ng-select",1),T("ngModelChange",function(vt){return p.filter.ChannelID=vt}),u(6,It,3,2,"ng-template",2),o()()(),r(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"table",7)(13,"thead",8)(14,"tr",9)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Tt,20,20,"ng-container",10),d(27,"async"),o()()()()(),u(28,Pt,2,1,"ng-container",11),d(29,"async"),o()()()),i&2&&(m(5),c("clearable",!0)("items",p.channelOptions)("ngModel",p.filter.ChannelID),m(21),c("ngForOf",_(27,5,p.notifications$)),m(2),c("ngIf",_(29,7,p.notifications$)))},dependencies:[Z,tt,M,ct,mt,nt,ot,k,R,O,P,L,w]});let t=e;return t})();function wt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),s(n.Perflog)}}function Lt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),s(n==null?null:n.StackTrace)}}function Ft(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),d(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),d(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,wt,10,1,"div",16)(58,Lt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(1),c("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),s(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),s(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),s(n.Label),m(11),s(n.Message),m(1),c("ngIf",n==null?null:n.Perflog),m(1),c("ngIf",n==null?null:n.StackTrace)}}var ut=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(z(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(p=>(p.DurationInSecond=parseInt(p.Duration)/1e3,p)))}))}};e.\u0275fac=function(i){return new(i||e)(v(it),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,p){i&1&&(u(0,Ft,59,16,"ng-container",0),d(1,"async")),i&2&&c("ngIf",_(1,1,p.notification$))},dependencies:[M,k,R,P,L,w]});let t=e;return t})();var Rt=[{path:"",component:ft},{path:"detail",component:ut}],gt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[F,$.forChild(Rt)]});let t=e;return t})();var me=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[F,gt,pt,at,st,$,O]});let t=e;return t})();export{me as NotificationModule};
1
+ import{a as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-477YGYRZ.js";import{a as dt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-NOOE5WCP.js";import{a as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-EL6EJKXF.js";import{f as lt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-5PC5LTIZ.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-ISOVZHS4.js";import{e as et}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-4W3TWSSW.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-QKIFJRTX.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-NTGLKKPF.js";import{a as mt,c as ct,d as pt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-HJWLXLFQ.js";import{B as k,C as st}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-ZKXVL46E.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-S2CEMSAL.js";import{h as nt,k as ot,u as at}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-NKGDQMEC.js";import{c as rt}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-TIKJQ35R.js";import{$a as D,$b as M,Db as d,Eb as _,Fa as m,Fb as S,Ga as v,Hc as it,Kc as R,Mb as Y,Mc as $,Oa as c,Q as j,T as z,Ua as u,V as q,Yb as Z,Za as r,_a as o,_b as tt,aa as I,ab as g,bb as h,c as A,cc as P,db as G,dc as w,ea as y,fa as N,fc as L,gc as F,hb as T,ja as b,jb as f,ka as E,mb as J,ob as K,pb as l,q as C,qb as s,rb as x,vb as Q,wb as W,xb as X,ya as U,za as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-GQQPUSYL.js";import"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-BWIMRM2L.js";function It(t,e){if(t&1&&(r(0,"span",12),D(1,"img",13),o(),l(2)),t&2){let n=e.item;m(1),c("src",n.logo,H),m(1),x(" ",n.Name," ")}}function yt(t,e){if(t&1&&(g(0),l(1),d(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(1),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Nt(t,e){t&1&&l(0," - ")}var bt=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Et=()=>["/menu/notification/detail"],Dt=t=>({ID:t});function Tt(t,e){if(t&1&&(g(0),r(1,"tr",14)(2,"td")(3,"a",15),D(4,"img",16),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",17),o(),r(11,"td"),u(12,yt,5,4,"ng-container",18)(13,Nt,1,0,"ng-template",null,19,Y),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),d(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(1),c("ngClass",X(14,bt,n.Status==1,n.Status==0)),m(2),c("routerLink",Q(17,Et))("queryParams",W(18,Dt,n.ID)),m(1),J("src",n.Img,H),m(2),s(n.Name),m(3),s(n.Label),m(1),c("innerHTML",n.Message,U),m(2),c("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),s(n.StatusLabel),m(2),s(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Mt(t,e){if(t&1){let n=G();g(0),r(1,"div",4)(2,"div",20)(3,"app-custom-paginator",21),T("total",function(){b(n);let i=f(2);return E(i.getRowCount())})("next",function(){b(n);let i=f(2);return E(i.onNextPage())})("previous",function(){b(n);let i=f(2);return E(i.onPreviousPage())}),d(4,"async"),d(5,"async"),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),c("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Pt(t,e){if(t&1&&(g(0),u(1,Mt,6,8,"ng-container",11),h()),t&2){let n=e.ngIf;m(1),c("ngIf",n.length>0)}}var ft=(()=>{let e=class e{constructor(a,i,p){this.http=a,this.notificationService=i,this.authService=p,this.filter=new dt,this.destroy$=new A,this.channelOptions=p.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(q(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=rt.getChannelLogoByTypeId(i.TypeID),i)),a}onNextPage(){this.filter.PageNumber+=1,this.getNotifications()}onPreviousPage(){this.filter.PageNumber-=1,this.getNotifications()}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(et),v(B),v(lt))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text","mt-2",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["timeNotAvailable",""],[1,"col-12"],[3,"filter","totaldata","paginationTotal","hasClicked","total","next","previous"]],template:function(i,p){i&1&&(r(0,"mainpanel",0),T("onSubmit",function(){return p.onFilter()}),r(1,"filters")(2,"div")(3,"h6"),l(4,"Channel"),o(),r(5,"ng-select",1),T("ngModelChange",function(vt){return p.filter.ChannelID=vt}),u(6,It,3,2,"ng-template",2),o()()(),r(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"table",7)(13,"thead",8)(14,"tr",9)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Tt,20,20,"ng-container",10),d(27,"async"),o()()()()(),u(28,Pt,2,1,"ng-container",11),d(29,"async"),o()()()),i&2&&(m(5),c("clearable",!0)("items",p.channelOptions)("ngModel",p.filter.ChannelID),m(21),c("ngForOf",_(27,5,p.notifications$)),m(2),c("ngIf",_(29,7,p.notifications$)))},dependencies:[Z,tt,M,ct,mt,nt,ot,k,R,O,P,L,w]});let t=e;return t})();function wt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),s(n.Perflog)}}function Lt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),s(n==null?null:n.StackTrace)}}function Ft(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),d(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),d(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,wt,10,1,"div",16)(58,Lt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(1),c("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),s(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),s(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),s(n.Label),m(11),s(n.Message),m(1),c("ngIf",n==null?null:n.Perflog),m(1),c("ngIf",n==null?null:n.StackTrace)}}var ut=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(z(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(p=>(p.DurationInSecond=parseInt(p.Duration)/1e3,p)))}))}};e.\u0275fac=function(i){return new(i||e)(v(it),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,p){i&1&&(u(0,Ft,59,16,"ng-container",0),d(1,"async")),i&2&&c("ngIf",_(1,1,p.notification$))},dependencies:[M,k,R,P,L,w]});let t=e;return t})();var Rt=[{path:"",component:ft},{path:"detail",component:ut}],gt=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[F,$.forChild(Rt)]});let t=e;return t})();var me=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=N({type:e}),e.\u0275inj=I({imports:[F,gt,pt,at,st,$,O]});let t=e;return t})();export{me as NotificationModule};
@@ -1 +1 @@
1
- import{a as j,b as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-BPOHVA6C.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-6O46WM77.js";import{g as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-NFHX3EWZ.js";import{A as B,q as A,s as V,t as R,z as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-DR4WIP6T.js";import{_ as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-OVSLUEIO.js";import{h as N,k as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-VTLJVEYF.js";import{b as d,c as h}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-T2YIFX3Q.js";import{$a as D,$b as P,Db as O,Fa as n,Fb as w,Ga as _,Jc as x,Oa as o,Ua as v,Za as l,_a as s,_b as E,db as y,dc as U,ea as b,hb as u,ja as C,jb as c,ka as g,pb as p,qb as M,rb as T,za as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.4/Marketplace/chunk-ZIANW63Q.js";function W(r,m){if(r&1&&(l(0,"mat-option",9)(1,"div",10),D(2,"img",11),l(3,"span"),p(4),s()()()),r&2){let t=m.$implicit;o("value",t.ID)("disabled",t.disabled),n(1),o("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),n(1),o("src",t.Img,I),n(2),M(t.Name)}}function J(r,m){if(r&1){let t=y();l(0,"div",12)(1,"label",13),p(2,"Scan Type"),s(),l(3,"mat-radio-group",14),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.ScanFull=a)}),l(4,"mat-radio-button",15),p(5," Full (Include Inactive Products) "),s(),l(6,"mat-radio-button",16),p(7," Active "),s()()()}if(r&2){let t=c();n(3),o("ngModel",t.filter.ScanFull),n(1),o("value",!0),n(2),o("value",!1)}}function K(r,m){if(r&1){let t=y();l(0,"div",17)(1,"label",3),p(2),O(3,"date"),s(),l(4,"mat-radio-group",18),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.UpdatedProduct=a)}),l(5,"mat-radio-button",19),p(6," Scan All Products "),s(),l(7,"mat-radio-button",20),p(8),s()()()}if(r&2){let t=c();n(2),T(" Last Scan: ",w(3,6,t.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),n(2),o("ngModel",t.filter.UpdatedProduct),n(1),o("value",!1),n(2),o("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"),n(1),T(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function $(r,m){if(r&1){let t=y();l(0,"div",17)(1,"label",3),p(2," Scan Option "),s(),l(3,"mat-radio-group",21),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.Async=a)}),l(4,"mat-radio-button",22),p(5," Asynchronous (Get Notified when Complete) "),s(),l(6,"mat-radio-button",23),p(7," Synchronous (Wait until Complete) "),s()()()}if(r&2){let t=c();n(3),o("ngModel",t.filter.Async),n(1),o("value",!0),n(2),o("value",!1)}}var pe=(()=>{let m=class m{constructor(i,a,e){this.dialogRef=i,this.data=a,this.router=e,this.channelType=d,this.disabledChannelOption=!1,this.filter={ChannelID:h.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=h.IsNotEmpty(a.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=h.IsEmpty(a.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new L,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(i=>(i.disabled=!0,(i.TypeID==d.Tiktok||i.TypeID==d.Tokopedia||i.TypeID==d.Lazada||i.TypeID==d.WooCommerce)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let a=this.filterChannelById(i);this.selectedChannel=a,this.filter.Async=!0,this.iniHasScanUpdate(),this.setDefaultConfigUpdate()}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&h.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==d.ShopeeV2||this.selectedChannel.TypeID==d.Tiktok||this.selectedChannel.TypeID==d.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=d.WooCommerce&&this.selectedChannel?.TypeID!=d.KalCare&&this.selectedChannel?.TypeID!=d.None&&h.IsNotEmpty(this.selectedChannel?.LastSync)&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(i){let a;return this.channelOptions&&(a=this.channelOptions.find(e=>e.ID==i)),a}submit(){this.selectedChannel.TypeID==d.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(i){return h.IsNotEmpty(i)}onClose(){this.dialogRef.close()}};m.\u0275fac=function(a){return new(a||m)(_(V),_(R),_(x))},m.\u0275cmp=b({type:m,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["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"],["class","mt-4",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,"mt-4"],[1,"mb-2","fw-bold","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",1,"me-5",3,"value","matTooltip"],["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(a,e){a&1&&(l(0,"modal-material",0),u("onOk",function(){return e.submit()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),l(1,"div",1)(2,"div",2)(3,"label",3),p(4,"Select a Channel"),s(),l(5,"mat-form-field",4)(6,"mat-select",5),u("ngModelChange",function(S){return e.filter.ChannelID=S})("ngModelChange",function(S){return e.onSelectChannel(S)}),v(7,W,5,5,"mat-option",6),s()(),v(8,J,8,3,"div",7)(9,K,9,9,"div",8)(10,$,8,3,"div",8),s()()()),a&2&&(o("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),n(6),o("disabled",e.disabledChannelOption)("ngModel",e.filter.ChannelID),n(1),o("ngForOf",e.channelOptions),n(1),o("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),n(1),o("ngIf",e.hasScanUpdate),n(1),o("ngIf",!(e.filter!=null&&e.filter.UpdatedProduct)&&!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[E,P,N,F,j,G,H,z,k,A,B,U],encapsulation:2});let r=m;return r})();export{pe as a};
1
+ import{a as j,b as G}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-PUT3VRK4.js";import{a as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-UOPHZWQE.js";import{g as H}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-2HCFB6E7.js";import{A as B,q as A,s as V,t as R,z as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-ZKXVL46E.js";import{_ as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-S2CEMSAL.js";import{h as N,k as F}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-NKGDQMEC.js";import{b as d,c as h}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-TIKJQ35R.js";import{$a as D,$b as P,Db as O,Fa as n,Fb as w,Ga as _,Jc as x,Oa as o,Ua as v,Za as l,_a as s,_b as E,db as y,dc as U,ea as b,hb as u,ja as C,jb as c,ka as g,pb as p,qb as M,rb as T,za as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.9.6/Marketplace/chunk-GQQPUSYL.js";function W(r,m){if(r&1&&(l(0,"mat-option",9)(1,"div",10),D(2,"img",11),l(3,"span"),p(4),s()()()),r&2){let t=m.$implicit;o("value",t.ID)("disabled",t.disabled),n(1),o("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),n(1),o("src",t.Img,I),n(2),M(t.Name)}}function J(r,m){if(r&1){let t=y();l(0,"div",12)(1,"label",13),p(2,"Scan Type"),s(),l(3,"mat-radio-group",14),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.ScanFull=a)}),l(4,"mat-radio-button",15),p(5," Full (Include Inactive Products) "),s(),l(6,"mat-radio-button",16),p(7," Active "),s()()()}if(r&2){let t=c();n(3),o("ngModel",t.filter.ScanFull),n(1),o("value",!0),n(2),o("value",!1)}}function K(r,m){if(r&1){let t=y();l(0,"div",17)(1,"label",3),p(2),O(3,"date"),s(),l(4,"mat-radio-group",18),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.UpdatedProduct=a)}),l(5,"mat-radio-button",19),p(6," Scan All Products "),s(),l(7,"mat-radio-button",20),p(8),s()()()}if(r&2){let t=c();n(2),T(" Last Scan: ",w(3,6,t.selectedChannel.LastSync,"dd MMMM yyyy HH:mm")," "),n(2),o("ngModel",t.filter.UpdatedProduct),n(1),o("value",!1),n(2),o("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"),n(1),T(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function $(r,m){if(r&1){let t=y();l(0,"div",17)(1,"label",3),p(2," Scan Option "),s(),l(3,"mat-radio-group",21),u("ngModelChange",function(a){C(t);let e=c();return g(e.filter.Async=a)}),l(4,"mat-radio-button",22),p(5," Asynchronous (Get Notified when Complete) "),s(),l(6,"mat-radio-button",23),p(7," Synchronous (Wait until Complete) "),s()()()}if(r&2){let t=c();n(3),o("ngModel",t.filter.Async),n(1),o("value",!0),n(2),o("value",!1)}}var pe=(()=>{let m=class m{constructor(i,a,e){this.dialogRef=i,this.data=a,this.router=e,this.channelType=d,this.disabledChannelOption=!1,this.filter={ChannelID:h.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=h.IsNotEmpty(a.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=h.IsEmpty(a.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new L,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(i=>(i.disabled=!0,(i.TypeID==d.Tiktok||i.TypeID==d.Tokopedia||i.TypeID==d.Lazada||i.TypeID==d.WooCommerce)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let a=this.filterChannelById(i);this.selectedChannel=a,this.filter.Async=!0,this.iniHasScanUpdate(),this.setDefaultConfigUpdate()}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&h.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==d.ShopeeV2||this.selectedChannel.TypeID==d.Tiktok||this.selectedChannel.TypeID==d.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=d.WooCommerce&&this.selectedChannel?.TypeID!=d.KalCare&&this.selectedChannel?.TypeID!=d.None&&h.IsNotEmpty(this.selectedChannel?.LastSync)&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(i){let a;return this.channelOptions&&(a=this.channelOptions.find(e=>e.ID==i)),a}submit(){this.selectedChannel.TypeID==d.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(i){return h.IsNotEmpty(i)}onClose(){this.dialogRef.close()}};m.\u0275fac=function(a){return new(a||m)(_(V),_(R),_(x))},m.\u0275cmp=b({type:m,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["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"],["class","mt-4",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,"mt-4"],[1,"mb-2","fw-bold","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",1,"me-5",3,"value","matTooltip"],["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(a,e){a&1&&(l(0,"modal-material",0),u("onOk",function(){return e.submit()})("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()}),l(1,"div",1)(2,"div",2)(3,"label",3),p(4,"Select a Channel"),s(),l(5,"mat-form-field",4)(6,"mat-select",5),u("ngModelChange",function(S){return e.filter.ChannelID=S})("ngModelChange",function(S){return e.onSelectChannel(S)}),v(7,W,5,5,"mat-option",6),s()(),v(8,J,8,3,"div",7)(9,K,9,9,"div",8)(10,$,8,3,"div",8),s()()()),a&2&&(o("dynamicValidated",e.isNotEmpty(e.filter.ChannelID))("config",e.modalConfig),n(6),o("disabled",e.disabledChannelOption)("ngModel",e.filter.ChannelID),n(1),o("ngForOf",e.channelOptions),n(1),o("ngIf",!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)),n(1),o("ngIf",e.hasScanUpdate),n(1),o("ngIf",!(e.filter!=null&&e.filter.UpdatedProduct)&&!e.isSingleChannel&&e.isNotEmpty(e.filter.ChannelID)))},dependencies:[E,P,N,F,j,G,H,z,k,A,B,U],encapsulation:2});let r=m;return r})();export{pe as a};