marketplacepos 3.22.7 → 3.22.8

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 (37) hide show
  1. package/Marketplace/{chunk-RXU6CAOP.js → chunk-25B2ZKEV.js} +1 -1
  2. package/Marketplace/{chunk-HDQ264E7.js → chunk-2AZIRD3H.js} +1 -1
  3. package/Marketplace/{chunk-N6NC5NSE.js → chunk-2V4HZYVR.js} +1 -1
  4. package/Marketplace/{chunk-VL6PS3RX.js → chunk-4FFNXVLL.js} +1 -1
  5. package/Marketplace/{chunk-4MEDGUR4.js → chunk-4YGXXQGV.js} +1 -1
  6. package/Marketplace/{chunk-VRAOGJWM.js → chunk-5PPWE4IJ.js} +1 -1
  7. package/Marketplace/{chunk-7IV6AOHI.js → chunk-6QLRN5DC.js} +1 -1
  8. package/Marketplace/{chunk-XIQS2GJ5.js → chunk-6V44GMIW.js} +1 -1
  9. package/Marketplace/{chunk-DLCEDZGK.js → chunk-7NOBCBXC.js} +1 -1
  10. package/Marketplace/{chunk-S4LDJFZS.js → chunk-AKYLFMD3.js} +1 -1
  11. package/Marketplace/{chunk-WUTL4JBG.js → chunk-CBLSX34S.js} +1 -1
  12. package/Marketplace/{chunk-Y6ID7JCT.js → chunk-CDMZ7IPB.js} +1 -1
  13. package/Marketplace/{chunk-LT5ZCJRA.js → chunk-DXB2OHQZ.js} +1 -1
  14. package/Marketplace/{chunk-IOHEOTV2.js → chunk-F2HSZ5BX.js} +11 -11
  15. package/Marketplace/{chunk-FK647DV3.js → chunk-FGAQYUJP.js} +1 -1
  16. package/Marketplace/{chunk-I7SRUSWR.js → chunk-H6FMLR2D.js} +1 -1
  17. package/Marketplace/{chunk-34TFHXOV.js → chunk-HUQ2TRU6.js} +1 -1
  18. package/Marketplace/{chunk-YPE5AC3X.js → chunk-J5K5H4FR.js} +1 -1
  19. package/Marketplace/{chunk-WZVZOQN3.js → chunk-J5QT7AEB.js} +1 -1
  20. package/Marketplace/{chunk-OKZBCK7E.js → chunk-KBJEDIFC.js} +1 -1
  21. package/Marketplace/{chunk-5UKUFSGI.js → chunk-L4SJ72H4.js} +1 -1
  22. package/Marketplace/{chunk-3ATLH2O5.js → chunk-NK2CBWWU.js} +1 -1
  23. package/Marketplace/{chunk-4WRJ4UNZ.js → chunk-QYA5FUMB.js} +1 -1
  24. package/Marketplace/{chunk-5N4FTVPO.js → chunk-S46Y6TZ3.js} +1 -1
  25. package/Marketplace/{chunk-2RZIS7SO.js → chunk-TXZVD3Y2.js} +1 -1
  26. package/Marketplace/{chunk-MC7L2DZA.js → chunk-UP2QCF6N.js} +1 -1
  27. package/Marketplace/chunk-UYJ6AQMM.js +1 -0
  28. package/Marketplace/{chunk-Q653MB6W.js → chunk-VTIM32W5.js} +1 -1
  29. package/Marketplace/{chunk-VJUN2VLY.js → chunk-WU2PACVU.js} +1 -1
  30. package/Marketplace/{chunk-3T6NZ5WH.js → chunk-XVF5C6K3.js} +1 -1
  31. package/Marketplace/{chunk-XEJDB2R3.js → chunk-YH3ET4YX.js} +1 -1
  32. package/Marketplace/{chunk-J3APYGWI.js → chunk-YSYCCLYG.js} +1 -1
  33. package/Marketplace/{chunk-DIGP4L5I.js → chunk-Z3KMYVFY.js} +2 -2
  34. package/Marketplace/index.html +2 -2
  35. package/Marketplace/{main-A5PH6KD3.js → main-T34LUNYS.js} +1 -1
  36. package/package.json +1 -1
  37. package/Marketplace/chunk-ONBGY7D4.js +0 -1
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"marketplacepos","version":"3.22.7"}
1
+ {"name":"marketplacepos","version":"3.22.8"}
@@ -1 +0,0 @@
1
- import{a as K,b as Q}from"./chunk-IJYSJN63.js";import{Y as $}from"./chunk-OULUJ2IO.js";import{e as q}from"./chunk-4SAJUEHO.js";import{t as H,u as J}from"./chunk-HUUFOAKH.js";import{a as B,h as V,m as R,y as U}from"./chunk-BSN7ZAXG.js";import{b as g,c as s}from"./chunk-64G3XLI6.js";import{$b as N,Ca as _,Cd as j,Eb as S,Gb as b,Gc as z,Hc as W,Nb as F,Pa as I,Sb as C,Tb as m,Z as u,aa as d,bc as M,ea as l,g as p,ia as w,ja as T,jb as y,nc as L,pa as h,pc as A,q as c,rc as E,sc as O,ta as k,tc as D,uc as x,vc as P,xb as f,yd as G}from"./chunk-PQDPS2ID.js";var X=(()=>{let o=class o{constructor(){this.httpService=h(q),this.shopeeCategories=new p({data:[],isFirstLoad:!1}),this.tiktokCategories=new p({data:[],isFirstLoad:!1}),this.lazadaCategories=new p({data:[],isFirstLoad:!1}),this.tokopediaCategories=new p({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new p({data:[],isFirstLoad:!1})}getCategories(e,i){switch(e){case g.Shopee:return this.shopeeCategories.asObservable().pipe(d(t=>t.isFirstLoad?c(t.data):this.getShopeeCategories(i)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(d(t=>t.isFirstLoad?c(t.data):this.getTiktokCategories(i)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(d(t=>t.isFirstLoad?c(t.data):this.getLazadaCategories(i)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(d(t=>t.isFirstLoad?c(t.data):this.getTokopediaCategories(i)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(d(t=>t.isFirstLoad?c(t.data):this.getWooCommerceCategories(i)));default:return c([])}}getShopeeCategories(e){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:e}]).pipe(l(t=>{let a={data:t,isFirstLoad:!0};this.shopeeCategories.next(a)}))}getTiktokCategories(e){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:e}]).pipe(l(t=>{let a={data:t,isFirstLoad:!0};this.tiktokCategories.next(a)}))}getLazadaCategories(e){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:e}]).pipe(l(t=>{let a={data:t,isFirstLoad:!0};this.lazadaCategories.next(a)}))}getTokopediaCategories(e){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:e}]).pipe(l(t=>{let a={data:t,isFirstLoad:!0};this.tokopediaCategories.next(a)}))}getWooCommerceCategories(e){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:e}]).pipe(l(t=>{let a={data:t,isFirstLoad:!0};this.wooCommerceCategories.next(a)}))}searchByIdWithParentDFS(e,i){let t=[...e];for(;t.length>0;){let a=t.pop();if(a.id===JSON.stringify(i))return a;if(a.children&&a.children.length>0)for(let n of a.children)n.parent=a,t.push(n)}return null}searchSelectAbleNode(e){let i=null;return e.selectable?i=e:i=(e.children?e.children:[]).find(a=>a.selectable),i}generateCategoryLabel(e){let i="";return e?i=s.getLabelPathTree(e):i="Select a Category",i}};o.\u0275fac=function(i){return new(i||o)},o.\u0275prov=T({token:o,factory:o.\u0275fac,providedIn:"root"});let r=o;return r})();function Z(r,o){if(r&1&&(C(0,"div",3),L(1),m()),r&2){let v=M();b("matTooltip",v.selectedCategoryLabel()),y(),A(" ",v.selectedCategoryLabel()," ")}}function ee(r,o){r&1&&(C(0,"label",2),L(1,"Category"),m())}var Te=(()=>{let o=class o{constructor(){this.categoryService=h(X),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new I,this.selectedCategoryLabel=f("Select a Category"),this.selectedNode=f(null),this.onChange=e=>{},this.onTouched=()=>{}}ngOnChanges(e){let i=e?.categoryId?.previousValue,t=e?.categoryId?.currentValue;s.IsEmpty(i)&&s.IsNotEmpty(t)&&this.initCategories(),s.IsEmpty(t)&&s.IsNotEmpty(i)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(l(e=>this.setDefaultCategory(e)),u(1))}setDefaultCategory(e){try{let i=this.categoryService.searchByIdWithParentDFS(e,this.categoryId);i&&(this.generateCategoryLabel(i),this.selectedNode.set(i))}catch(i){console.error(i)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(u(1)))}onNodeSelect(e){let i=this.categoryService.searchSelectAbleNode(e.node);this.selectedCategoryLabel.set(s.getLabelPathTree(i));let t=parseInt(i.id);this.onChange(t),this.selectedCategory.emit(t)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(e){e?this.selectedCategoryLabel.set(s.getLabelPathTree(e)):this.selectedCategoryLabel.set("Select a Category")}writeValue(e){s.IsNotEmpty(e)&&(this.categoryId=e,this.initCategories())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=k({type:o,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},standalone:!0,features:[x([{provide:B,useExisting:w(()=>o),multi:!0}]),_,P],decls:4,vars:8,consts:[["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["for","selectCategory"],["matTooltipPosition","above",3,"matTooltip"]],template:function(i,t){i&1&&(C(0,"p-treeSelect",0),z(1,"async"),D("ngModelChange",function(n){return O(t.selectedNode,n)||(t.selectedNode=n),n}),N("click",function(){return t.onClickSelect()})("onNodeSelect",function(n){return t.onNodeSelect(n)})("onClear",function(){return t.onNodeUnselect()}),S(2,Z,2,2,"ng-template",1),m(),S(3,ee,2,0,"label",2)),i&2&&(E("ngModel",t.selectedNode),b("filter",!0)("options",W(1,6,t.categories$))("showClear",t.showClear)("disabled",t.disabled),y(3),F(t.showLabel?3:-1))},dependencies:[j,G,Q,K,$,J,H,U,V,R],styles:["[_nghost-%COMP%] .p-treeselect{width:100%;display:inline-flex;border:1px solid #ced4da;font-size:.875rem!important} .p-treeselect-panel{z-index:10002!important} .p-element .p-icon-wrapper{width:14px}"]});let r=o;return r})();export{X as a,Te as b};