marketplacepos 3.6.4 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +62 -62
- package/Marketplace/{chunk-ZO24DBCC.js → chunk-27MFG2V3.js} +1 -1
- package/Marketplace/{chunk-PJIKFDGL.js → chunk-3IE75VB2.js} +1 -1
- package/Marketplace/{chunk-YDJHEKKE.js → chunk-3TBUXGN2.js} +1 -1
- package/Marketplace/chunk-3XIO5MXN.js +1 -0
- package/Marketplace/chunk-3Z7G7454.js +4 -0
- package/Marketplace/{chunk-BVNI7M43.js → chunk-6JZXM3Z4.js} +1 -1
- package/Marketplace/chunk-6TDCWPXI.js +2 -0
- package/Marketplace/chunk-AMNHDM4A.js +2 -0
- package/Marketplace/{chunk-UGPHFJAX.js → chunk-AWF36NII.js} +1 -1
- package/Marketplace/chunk-AZ6WKDZE.js +2 -0
- package/Marketplace/{chunk-HCXIXQ3P.js → chunk-BAHS6OIP.js} +5 -5
- package/Marketplace/{chunk-NP4NUU26.js → chunk-BQZT7VC6.js} +1 -1
- package/Marketplace/chunk-BRQEPBAV.js +39 -0
- package/Marketplace/chunk-BVOYXTEO.js +1 -0
- package/Marketplace/{chunk-YW4ETQW2.js → chunk-C5OKI7IN.js} +1 -1
- package/Marketplace/{chunk-EX7JS5XV.js → chunk-C6CRAPMP.js} +1 -1
- package/Marketplace/{chunk-AYVVAF2D.js → chunk-CEIPUO3T.js} +1 -1
- package/Marketplace/{chunk-WRPFY7PU.js → chunk-DQ556KMX.js} +2 -2
- package/Marketplace/chunk-E5IYLHFK.js +1 -0
- package/Marketplace/{chunk-XLVT5MIX.js → chunk-EAPYNH2I.js} +1 -1
- package/Marketplace/{chunk-JTPNWUC5.js → chunk-EB34X6M5.js} +1 -1
- package/Marketplace/{chunk-C6EE6UMS.js → chunk-EDYL25D7.js} +1 -1
- package/Marketplace/{chunk-WDFNDY2L.js → chunk-F46K5N6V.js} +1 -1
- package/Marketplace/{chunk-O4JO5HBG.js → chunk-F66WSMGF.js} +1 -1
- package/Marketplace/chunk-FHTEX4VI.js +1 -0
- package/Marketplace/{chunk-N5JT3L3P.js → chunk-HNFHD5DZ.js} +1 -1
- package/Marketplace/chunk-IXKXSEUO.js +5 -0
- package/Marketplace/{chunk-TKFPKCG2.js → chunk-JJJFKCNJ.js} +1 -1
- package/Marketplace/{chunk-4XO4E2OI.js → chunk-K4EYVQBL.js} +1 -1
- package/Marketplace/{chunk-5W3D75EL.js → chunk-LZWVYHLU.js} +1 -1
- package/Marketplace/{chunk-FOXV7BI2.js → chunk-NGBU7BOS.js} +1 -1
- package/Marketplace/{chunk-2TNMBZG6.js → chunk-NMVME7V7.js} +1 -1
- package/Marketplace/{chunk-U7J6Y2ZR.js → chunk-P6UO6DX3.js} +1 -1
- package/Marketplace/{chunk-XRYND57F.js → chunk-P7VJZQDH.js} +1 -1
- package/Marketplace/{chunk-EZPFNEBG.js → chunk-PEA3QZNR.js} +1 -1
- package/Marketplace/chunk-PFWK7DXX.js +1 -0
- package/Marketplace/{chunk-LRJDQQMW.js → chunk-PPMANECT.js} +1 -1
- package/Marketplace/chunk-Q3PNFN2P.js +1 -0
- package/Marketplace/chunk-QBGUD5XV.js +1 -0
- package/Marketplace/chunk-QK6IV4IN.js +1 -0
- package/Marketplace/{chunk-TGTYAI7P.js → chunk-RW3P47SS.js} +1 -1
- package/Marketplace/chunk-S4OY7WNR.js +1 -0
- package/Marketplace/{chunk-J6FCA2GC.js → chunk-SFRVPZY5.js} +1 -1
- package/Marketplace/chunk-SHE2HRK4.js +1 -0
- package/Marketplace/{chunk-PO44ILHG.js → chunk-SXEG2MLM.js} +1 -1
- package/Marketplace/{chunk-THMRV5XU.js → chunk-SZYLETKI.js} +1 -1
- package/Marketplace/{chunk-ULL6P5FP.js → chunk-T62ZNA2E.js} +1 -1
- package/Marketplace/chunk-UFDVDRIL.js +1 -0
- package/Marketplace/{chunk-Q2GGNFJX.js → chunk-UJUFXSVW.js} +1 -1
- package/Marketplace/{chunk-4EAH4CVW.js → chunk-URMO6FUH.js} +1 -1
- package/Marketplace/chunk-UWM3HFZE.js +1 -0
- package/Marketplace/{chunk-M7SI7KCP.js → chunk-V4TOR5C3.js} +1 -1
- package/Marketplace/{chunk-CC7AXJ62.js → chunk-VFVGT6W3.js} +1 -1
- package/Marketplace/{chunk-5437ABT5.js → chunk-VQFVU45K.js} +1 -1
- package/Marketplace/chunk-WCDKR3FP.js +1 -0
- package/Marketplace/{chunk-7IYEHG7N.js → chunk-WJEQNHXJ.js} +1 -1
- package/Marketplace/chunk-XA3H6AG7.js +3 -0
- package/Marketplace/{chunk-URMIO2PO.js → chunk-XQLF7ESA.js} +1 -1
- package/Marketplace/{chunk-TM72OVCB.js → chunk-Y5KDY32S.js} +1 -1
- package/Marketplace/{chunk-CSPU7H6P.js → chunk-YBKLOXGJ.js} +1 -1
- package/Marketplace/chunk-YZ2MT7MV.js +1 -0
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-RAPO7M6B.js +1 -0
- package/Marketplace/{styles-5ZLA5BQS.css → styles-BYB6Q4RC.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4JJEXEXD.js +0 -1
- package/Marketplace/chunk-6CMIQC4Z.js +0 -39
- package/Marketplace/chunk-6JF7QYRS.js +0 -2
- package/Marketplace/chunk-7W5OCB74.js +0 -1
- package/Marketplace/chunk-ART3IBLH.js +0 -1
- package/Marketplace/chunk-AUQYI2EA.js +0 -1
- package/Marketplace/chunk-BWTDHNZV.js +0 -1
- package/Marketplace/chunk-C2A52LSM.js +0 -2
- package/Marketplace/chunk-D5NWJJ3K.js +0 -1
- package/Marketplace/chunk-F5TBMY3G.js +0 -1
- package/Marketplace/chunk-G7VXQRNU.js +0 -1
- package/Marketplace/chunk-GGUUOJBM.js +0 -4
- package/Marketplace/chunk-GOLQA2OV.js +0 -1
- package/Marketplace/chunk-IYJYQNSW.js +0 -1
- package/Marketplace/chunk-MWEX4KT3.js +0 -5
- package/Marketplace/chunk-N4KAWMLG.js +0 -1
- package/Marketplace/chunk-PJ55JADV.js +0 -1
- package/Marketplace/chunk-TRPWLPXX.js +0 -1
- package/Marketplace/chunk-UIXUUR3M.js +0 -1
- package/Marketplace/chunk-WAQZNQJA.js +0 -2
- package/Marketplace/chunk-WEPTPOTB.js +0 -1
- package/Marketplace/chunk-XB6JTMTF.js +0 -1
- package/Marketplace/chunk-XGU6OKNN.js +0 -1
- package/Marketplace/chunk-XKSSZDF5.js +0 -1
- package/Marketplace/chunk-YSP6AH3T.js +0 -1
- package/Marketplace/chunk-YZSU7OTN.js +0 -3
- package/Marketplace/main-C2ZAIPC7.js +0 -1
- /package/Marketplace/{chunk-72YRW3ZC.js → chunk-JC2XATFG.js} +0 -0
- /package/Marketplace/{chunk-UTOILVIA.js → chunk-RMAUQHGQ.js} +0 -0
- /package/Marketplace/{chunk-NDVNSHV5.js → chunk-VNDEHKWX.js} +0 -0
- /package/Marketplace/{polyfills-HPRX66LM.js → polyfills-IC53TUFL.js} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as fe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-3Z7G7454.js";import{b as de,e as pe}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-NGBU7BOS.js";import{c as ge,d as ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-CEIPUO3T.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.7.1/Marketplace/chunk-AMNHDM4A.js";import{b as me,h as F,k as U,u as he}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-V4TOR5C3.js";import{b as m,c as B}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.1/Marketplace/chunk-UFDVDRIL.js";import{$ as ne,$a as C,B as Z,Cb as q,Db as J,Fa as s,Ga as f,H as ee,Ja as H,K as te,Lb as N,Na as G,Oa as c,Pa as oe,T as W,Ua as u,V as P,Xb as re,Za as l,Zb as v,_a as r,_b as A,aa as ie,ab as I,bb as M,c as w,ca as K,db as Y,ea as _,ec as se,fa as ae,fc 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.7.1/Marketplace/chunk-3IE75VB2.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
|
+
`],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};
|