marketplacepos 5.48.0 → 5.48.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 +26 -26
- package/Marketplace/{chunk-222IOSGU.js → chunk-2F4DTZCZ.js} +1 -1
- package/Marketplace/chunk-2USFVKEX.js +1 -0
- package/Marketplace/{chunk-W7YZT7CH.js → chunk-327AAICB.js} +1 -1
- package/Marketplace/chunk-36U7D4LI.js +1 -0
- package/Marketplace/{chunk-ZV7EHPNJ.js → chunk-3L7Y6LG6.js} +1 -1
- package/Marketplace/chunk-3LTTPECO.js +1 -0
- package/Marketplace/chunk-3TPMCGA5.js +1 -0
- package/Marketplace/chunk-4JDI3AL5.js +1 -0
- package/Marketplace/{chunk-5YBWBAQS.js → chunk-4YCSITNV.js} +1 -1
- package/Marketplace/{chunk-55BTWXFX.js → chunk-5BSPSA4O.js} +1 -1
- package/Marketplace/{chunk-DQOO5YZC.js → chunk-5G3OIF3V.js} +1 -1
- package/Marketplace/{chunk-56BH43Y7.js → chunk-5X2E3W32.js} +1 -1
- package/Marketplace/chunk-64EV3KZS.js +1 -0
- package/Marketplace/chunk-6EORXONU.js +4 -0
- package/Marketplace/{chunk-J2BPOHP6.js → chunk-6OJQRHIZ.js} +1 -1
- package/Marketplace/{chunk-ZAUKG4R6.js → chunk-6PW6S7MI.js} +1 -1
- package/Marketplace/chunk-6XDT56RT.js +2 -0
- package/Marketplace/chunk-6Z2CE7TK.js +1 -0
- package/Marketplace/chunk-6ZE3KI6C.js +2 -0
- package/Marketplace/{chunk-KKB4B7FU.js → chunk-7GY4O2UX.js} +3 -3
- package/Marketplace/{chunk-R6SCDZGW.js → chunk-7WHUYSBD.js} +1 -1
- package/Marketplace/chunk-A7PUMY67.js +1 -0
- package/Marketplace/{chunk-34UF36YY.js → chunk-AAUBUT4Y.js} +1 -1
- package/Marketplace/chunk-AFCA7VVG.js +1 -0
- package/Marketplace/{chunk-NECWUPZQ.js → chunk-AFIF6VRM.js} +1 -1
- package/Marketplace/chunk-AGBJEXIM.js +1 -0
- package/Marketplace/chunk-BJH4EGMC.js +2 -0
- package/Marketplace/{chunk-HERBJRWM.js → chunk-BXYXVBXP.js} +1 -1
- package/Marketplace/chunk-BYTWGXP7.js +1 -0
- package/Marketplace/{chunk-B4QCGMST.js → chunk-C7N6EI73.js} +1 -1
- package/Marketplace/{chunk-PQEXTCFW.js → chunk-CG7UNGPF.js} +10 -10
- package/Marketplace/chunk-CT6UFONR.js +1 -0
- package/Marketplace/chunk-D3VVBQYY.js +1 -0
- package/Marketplace/{chunk-IO2TWJDO.js → chunk-DAUML5UD.js} +1 -1
- package/Marketplace/chunk-DHPNXR6E.js +1 -0
- package/Marketplace/chunk-DTAHV4GM.js +1 -0
- package/Marketplace/{chunk-MQXW3UAW.js → chunk-DXYMG6QK.js} +1 -1
- package/Marketplace/chunk-E3EBAWLJ.js +1 -0
- package/Marketplace/chunk-E66QUDQF.js +1 -0
- package/Marketplace/chunk-E6ZWL77N.js +1 -0
- package/Marketplace/chunk-EDEZ3JLR.js +4 -0
- package/Marketplace/{chunk-OROFEDQN.js → chunk-FCEXPGTK.js} +1 -1
- package/Marketplace/chunk-FHER4TFY.js +1 -0
- package/Marketplace/{chunk-VZSHSSQZ.js → chunk-FKGKMEDE.js} +1 -1
- package/Marketplace/chunk-GF6B54DH.js +5 -0
- package/Marketplace/chunk-GG3MDS4C.js +1 -0
- package/Marketplace/{chunk-ONU4O7N2.js → chunk-GPHNPV7O.js} +1 -1
- package/Marketplace/chunk-GTIJJRTW.js +1 -0
- package/Marketplace/{chunk-J7FL3VT4.js → chunk-GURSK3ZV.js} +1 -1
- package/Marketplace/chunk-HUECAZ5I.js +1 -0
- package/Marketplace/chunk-I3Q5TAIL.js +1 -0
- package/Marketplace/{chunk-PGR6BEOA.js → chunk-I7C6W3RB.js} +1 -1
- package/Marketplace/chunk-ILW6ZFFV.js +1 -0
- package/Marketplace/chunk-IODYBTLK.js +1 -0
- package/Marketplace/{chunk-XBDQR2BA.js → chunk-IU36PH6K.js} +1 -1
- package/Marketplace/chunk-IWFUFVCC.js +1 -0
- package/Marketplace/{chunk-JOKDW6WD.js → chunk-IX6JJ6BJ.js} +1 -1
- package/Marketplace/{chunk-KWNXPX2M.js → chunk-IYDRCUIT.js} +1 -1
- package/Marketplace/{chunk-TCWEUEBR.js → chunk-J6CZKQ53.js} +1 -1
- package/Marketplace/chunk-JBEKD57G.js +1 -0
- package/Marketplace/chunk-JKRH5WGR.js +1 -0
- package/Marketplace/{chunk-G6P2UZU4.js → chunk-JW7NES7L.js} +1 -1
- package/Marketplace/chunk-KB3CRZC5.js +1 -0
- package/Marketplace/chunk-KVDREHOE.js +1 -0
- package/Marketplace/{chunk-76CPUGUB.js → chunk-L76NLJD7.js} +2 -2
- package/Marketplace/{chunk-MAMCOUZ6.js → chunk-M2BYW5SR.js} +1 -1
- package/Marketplace/{chunk-WW7F6LSG.js → chunk-MRT6ZM2A.js} +1 -1
- package/Marketplace/{chunk-NYJPPKGX.js → chunk-NCKPMA6Q.js} +1 -1
- package/Marketplace/{chunk-P6TDS7UT.js → chunk-NSBKRFO7.js} +1 -1
- package/Marketplace/{chunk-TDCMI7YC.js → chunk-O2YF5VGD.js} +1 -1
- package/Marketplace/chunk-O4EO3YBL.js +1 -0
- package/Marketplace/{chunk-Y6WFE3L2.js → chunk-OBF4XVU7.js} +1 -1
- package/Marketplace/chunk-PDCVMSLL.js +1 -0
- package/Marketplace/chunk-PMVDQ2OP.js +1 -0
- package/Marketplace/{chunk-DRTRU4DB.js → chunk-PUUZQ4N5.js} +1 -1
- package/Marketplace/{chunk-5O33CV4F.js → chunk-Q4AWQ7IC.js} +1 -1
- package/Marketplace/chunk-Q4TAOZ73.js +1 -0
- package/Marketplace/{chunk-N3WBRUNI.js → chunk-Q7MU7DBD.js} +1 -1
- package/Marketplace/{chunk-GV3NEJJ6.js → chunk-QFSA7CU4.js} +1 -1
- package/Marketplace/{chunk-UNGNRJ2B.js → chunk-QSBCJIQ3.js} +1 -1
- package/Marketplace/{chunk-XUBQATMN.js → chunk-R2XT5M5F.js} +1 -1
- package/Marketplace/chunk-RASTACH2.js +1 -0
- package/Marketplace/chunk-RDS3OGH2.js +1 -0
- package/Marketplace/{chunk-J5BZDPXE.js → chunk-RQQWNLDZ.js} +1 -1
- package/Marketplace/{chunk-E7FHMF3J.js → chunk-RXZ43ZSY.js} +1 -1
- package/Marketplace/chunk-S5R6MCNP.js +5 -0
- package/Marketplace/{chunk-RJFFTIAO.js → chunk-S7CKRTJV.js} +1 -1
- package/Marketplace/chunk-SFZDUON5.js +2 -0
- package/Marketplace/chunk-SGTGXMFX.js +1 -0
- package/Marketplace/{chunk-PZB3GQWT.js → chunk-SHUYFOQI.js} +1 -1
- package/Marketplace/chunk-SJT5OMJM.js +1 -0
- package/Marketplace/{chunk-SILAIDPV.js → chunk-STYL7ETF.js} +1 -1
- package/Marketplace/chunk-T7HRAMHR.js +1 -0
- package/Marketplace/{chunk-CEXUETT6.js → chunk-TJYYRHZZ.js} +1 -1
- package/Marketplace/{chunk-O4HOLA7Y.js → chunk-TLPRODFI.js} +1 -1
- package/Marketplace/chunk-TOATNIRC.js +1 -0
- package/Marketplace/{chunk-DYQ3BWPB.js → chunk-TXOZULMZ.js} +1 -1
- package/Marketplace/chunk-TYQY4WPY.js +1 -0
- package/Marketplace/chunk-UIZJMH4U.js +1 -0
- package/Marketplace/chunk-VWX2IX64.js +1 -0
- package/Marketplace/{chunk-37NOSLQL.js → chunk-WHHW4IZT.js} +1 -1
- package/Marketplace/chunk-WIYPRMVW.js +266 -0
- package/Marketplace/{chunk-74JHI4MS.js → chunk-WNUTNP6I.js} +1 -1
- package/Marketplace/{chunk-7Y2L4CNS.js → chunk-X5X4R6MJ.js} +1 -1
- package/Marketplace/{chunk-6XT3JSG5.js → chunk-XF2QZL6C.js} +1 -1
- package/Marketplace/{chunk-3I2V337G.js → chunk-XLIPGDSC.js} +1 -1
- package/Marketplace/chunk-XLNRT52E.js +5 -0
- package/Marketplace/{chunk-S32PEKW5.js → chunk-ZEF5FMYQ.js} +1 -1
- package/Marketplace/{chunk-NLSVMXR7.js → chunk-ZKIO2ZQ6.js} +1 -1
- package/Marketplace/chunk-ZME22WYI.js +1 -0
- package/Marketplace/{chunk-3LU2SFN4.js → chunk-ZRTEGBXK.js} +1 -1
- package/Marketplace/{chunk-A7YRNCQP.js → chunk-ZTHO6JJM.js} +1 -1
- package/Marketplace/chunk-ZVTFMONF.js +15 -0
- package/Marketplace/{chunk-UW3UCIOY.js → chunk-ZW2TMVZP.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-T7D6R6TU.js +1 -0
- package/Marketplace/{styles-3SQUCHWS.css → styles-ANCVZJP7.css} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-2FSRCK7Y.js +0 -1
- package/Marketplace/chunk-2LCP6ZFH.js +0 -1
- package/Marketplace/chunk-3YDWTOSL.js +0 -1
- package/Marketplace/chunk-44URQXRM.js +0 -1
- package/Marketplace/chunk-465DKI6M.js +0 -1
- package/Marketplace/chunk-46IROEMV.js +0 -2
- package/Marketplace/chunk-4R746B4G.js +0 -1
- package/Marketplace/chunk-573EEV7X.js +0 -1
- package/Marketplace/chunk-5S7ONNKP.js +0 -1
- package/Marketplace/chunk-6ZEQRKBC.js +0 -1
- package/Marketplace/chunk-7HVOZWYY.js +0 -1
- package/Marketplace/chunk-7U32FNM2.js +0 -2
- package/Marketplace/chunk-7VRLCSNB.js +0 -1
- package/Marketplace/chunk-AL5RTE5M.js +0 -1
- package/Marketplace/chunk-AXC6LM6T.js +0 -1
- package/Marketplace/chunk-BHGEKKCM.js +0 -1
- package/Marketplace/chunk-BLHKSSK6.js +0 -1
- package/Marketplace/chunk-BXOHTPGP.js +0 -1
- package/Marketplace/chunk-CNTLG54D.js +0 -1
- package/Marketplace/chunk-DLXWO2XC.js +0 -1
- package/Marketplace/chunk-DPQMNLFO.js +0 -1
- package/Marketplace/chunk-E5JZCOHZ.js +0 -1
- package/Marketplace/chunk-EMLE4JDW.js +0 -1
- package/Marketplace/chunk-FFTZPZOW.js +0 -5
- package/Marketplace/chunk-FHZNWINZ.js +0 -1
- package/Marketplace/chunk-GLMM3CVD.js +0 -1
- package/Marketplace/chunk-GQCDEPDY.js +0 -1
- package/Marketplace/chunk-GZLXMT7F.js +0 -1
- package/Marketplace/chunk-HG4R6CUP.js +0 -1
- package/Marketplace/chunk-HU7LMMZJ.js +0 -1
- package/Marketplace/chunk-I3IA6MAD.js +0 -1
- package/Marketplace/chunk-IZZQQW5G.js +0 -5
- package/Marketplace/chunk-JLVWTKDH.js +0 -1
- package/Marketplace/chunk-JUO4RKIH.js +0 -1
- package/Marketplace/chunk-L2GMXVN6.js +0 -1
- package/Marketplace/chunk-M7U5T2ZP.js +0 -1
- package/Marketplace/chunk-MEER4VNV.js +0 -1
- package/Marketplace/chunk-N26QQL77.js +0 -1
- package/Marketplace/chunk-NOIKC7TF.js +0 -1
- package/Marketplace/chunk-ODQVHQPB.js +0 -15
- package/Marketplace/chunk-PE7QBBA6.js +0 -1
- package/Marketplace/chunk-PNUEO4J2.js +0 -1
- package/Marketplace/chunk-PS43OK3J.js +0 -1
- package/Marketplace/chunk-SNSROU6N.js +0 -1
- package/Marketplace/chunk-SUTHLGCO.js +0 -266
- package/Marketplace/chunk-TUJHFVOP.js +0 -1
- package/Marketplace/chunk-UI5ITL7Z.js +0 -4
- package/Marketplace/chunk-XFIUNEOU.js +0 -1
- package/Marketplace/chunk-XW2CGM4G.js +0 -5
- package/Marketplace/chunk-YJTPDV4D.js +0 -1
- package/Marketplace/chunk-YKEAAH3N.js +0 -2
- package/Marketplace/chunk-YTUPRTC2.js +0 -1
- package/Marketplace/chunk-ZS465QKM.js +0 -2
- package/Marketplace/main-NBCLYU5Y.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as Ft}from"./chunk-E3EBAWLJ.js";import{a as It}from"./chunk-AFIF6VRM.js";import{a as be,b as pt,c as ut,d as ye,e as ve}from"./chunk-NSBKRFO7.js";import"./chunk-5X2E3W32.js";import{a as st,b as Ce,c as mt,d as ge,f as Ct,g as gt,h as Se,i as bt,o as oe}from"./chunk-ZW2TMVZP.js";import{b as vt}from"./chunk-2F4DTZCZ.js";import{a as _t}from"./chunk-36U7D4LI.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import{b as ht,d as Te}from"./chunk-FCEXPGTK.js";import{b as xt}from"./chunk-3WRXJBHF.js";import"./chunk-UH5C5HXK.js";import{a as Tt,b as St}from"./chunk-O2YF5VGD.js";import{a as yt}from"./chunk-63I3I3MX.js";import"./chunk-ZRTEGBXK.js";import{a as ft,b as xe}from"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import{a as he}from"./chunk-4YCSITNV.js";import{a as lt,b as dt,f as ct}from"./chunk-WHHW4IZT.js";import"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{a as at}from"./chunk-FHER4TFY.js";import"./chunk-AAUBUT4Y.js";import{d as G,e as Y}from"./chunk-6KWG6O5L.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-Q4AWQ7IC.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{b as tt,e as ie}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as Ee,c as b}from"./chunk-JBEKD57G.js";import{m as nt,n as rt}from"./chunk-EDEZ3JLR.js";import{A as te,B as $,a as Je,c as ee,e as de,h as R,i as H,l as _e,m as qe,n as j,q as W,r as ze,s as X,t as Qe,u as Ze,v as et,z as K}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as it,w as ot}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as P,m as I}from"./chunk-LNJUGHOX.js";import{$ as Ge,$b as _,Ad as Ke,Gb as S,Hb as me,Hc as pe,Ic as Me,K as Re,M as $e,Mc as C,Na as N,Nc as Z,Oc as q,Qc as He,Rc as je,Sc as We,Wc as Xe,Z as Q,Zb as Ye,Zc as k,_c as ue,bc as h,ca as le,cc as U,ea as w,ec as L,f as ce,fc as B,g as Be,gc as p,hc as c,hd as F,ic as l,id as A,jc as f,ma as D,na as se,nb as s,qc as M,ra as u,sb as V,sd as fe,td as g,v as O,vc as T,xa as v,xc as d,ya as x}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var J=(function(e){return e[e.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",e[e.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",e[e.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",e[e.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",e[e.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",e})(J||{});var ne=(function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e})(ne||{});var re=(function(e){return e[e.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",e[e.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",e[e.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",e[e.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",e[e.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",e})(re||{});var De=class extends _e{setValue(o,n){if(o instanceof Date){let i=Math.floor(o.getTime()/1e3);super.setValue(i,n)}else super.setValue(o,n)}},Ne=(()=>{let o=class o{constructor(){this.shopeeUploadService=u(be),this.formBuilder=u(K)}getAttributes(i){return this.shopeeUploadService.getAttributes(i.channelId,i.categoryId).pipe(O(t=>this.setLabelToIndonesian(t)))}setLabelToIndonesian(i=[]){let t,a;return i=i.map(r=>(t=r?.multi_lang?.find(m=>m.language=="id"),r.attribute_value_list=r?.attribute_value_list?.map(m=>(a=m?.multi_lang?.find(y=>y.language=="id"),m.name=a?.value,m)),r.name=t?.value?t?.value:r.name,r)),i}createFormGroup(i){let t=this.formBuilder.group({}),a=[];return i.forEach(r=>{if(a=[],r.mandatory&&a.push(de.required),r?.attribute_info?.format_type==ne.FORMAT_QUANTITATIVE_WITH_UNIT&&r?.attribute_info?.input_type==J.FREE_TEXT_FILED){let m=this.formBuilder.group({unit:new _e(null),value:new _e(null,a)});t.addControl(JSON.stringify(r.attribute_id),m)}else r?.attribute_info?.input_type==J.FREE_TEXT_FILED&&r?.attribute_info?.input_validation_type==re.VALIDATOR_DATE_TYPE?t.addControl(JSON.stringify(r.attribute_id),new De(null,a)):t.addControl(JSON.stringify(r.attribute_id),this.formBuilder.control(null,a))}),t}getFilteredAttributes(i,t){let a=JSON.parse(JSON.stringify(i)),r=Object.keys(t),m=a.filter(y=>r.findIndex(Pe=>parseInt(Pe)==y.attribute_id||y.mandatory)!=-1);return m=this.filterSelectedAttributes(m,t),m}filterSelectedAttributes(i,t){return i.map(r=>{switch(r.attribute_info.input_type){case J.MULTI_COMBO_BOX:b.IsNotEmpty(t[r.attribute_id])?r.attribute_value_list=r.attribute_value_list.filter(m=>t[r.attribute_id]?.findIndex(y=>y==m.value_id)!=-1):r.attribute_value_list=[];break;case J.FREE_TEXT_FILED:r.attribute_info.format_type==ne.FORMAT_QUANTITATIVE_WITH_UNIT?r.attribute_value_list=this.setSelectedQuantitativeAttr(t[r.attribute_id]?.value,t[r.attribute_id]?.unit):r.attribute_info.input_validation_type==re.VALIDATOR_DATE_TYPE?r.attribute_value_list=this.setSelectedDateAttr(t[r.attribute_id]):r.attribute_value_list=this.setSelectedQuantitativeAttr(t[r.attribute_id]);break;default:r.attribute_value_list=r.attribute_value_list.filter(m=>m.value_id==t[r.attribute_id])}return r}).filter(r=>r?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(i,t){let a=[];if(b.IsNotEmpty(i)){let r={value_id:0,original_value_name:JSON.stringify(i)};b.IsNotEmpty(t)&&(r.value_unit=t),a=[r]}return a}setSelectedDateAttr(i){let t=[];return b.IsNotEmpty(i)&&(t=[{value_id:0,original_value_name:JSON.stringify(i)}]),t}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();var Ie=(()=>{let o=class o{constructor(){this._calendarHeaderConfig=new Be({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(i){this._calendarHeaderConfig.next(i)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let e=o;return e})();var Ut=["class","component ts"];function Lt(e,o){if(e&1){let n=M();c(0,"button",2),T("click",function(){v(n);let t=d(2);return x(t.todayClicked())}),f(1,"i",3),l()}}function Bt(e,o){if(e&1){let n=M();c(0,"button",4),T("click",function(){v(n);let t=d(2);return x(t.clearClicked())}),f(1,"i",5),l()}}function Rt(e,o){if(e&1&&(_(0,Lt,2,0,"button",0),_(1,Bt,2,0,"button",1)),e&2){let n=o;h(n.hideBtnToday?-1:0),s(),h(n.hideBtnClear?-1:1)}}var At=(()=>{let o=class o{constructor(){this._datePicker=u(Se),this._calendar=u(gt),this._dateAdapter=u(Ce),this.calendarService=u(Ie),this._destroyed=new ce;let i=this._calendar,t=u(Ke);i.stateChanges.pipe(le(this._destroyed)).subscribe(a=>t.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(i){this._calendar.ngOnChanges(i)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["POS-DatepickerHeader",8,"component","ts"]],standalone:!1,features:[N],attrs:Ut,decls:3,vars:3,consts:[["mat-icon-button","","title","Today"],["mat-icon-button","","title","Clear"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,a){if(t&1&&(c(0,"mat-calendar-header"),_(1,Rt,2,2),F(2,"async"),l()),t&2){let r;s(),h((r=A(2,1,a.calendarConfig$))?1:-1,r)}},dependencies:[ht,Ct,P],encapsulation:2});let e=o;return e})(),kt=(()=>{let o=class o{};o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=me({type:o}),o.\u0275inj=se({providers:[oe],imports:[I,Te,ge,oe,he,xe]});let e=o;return e})();function $t(e,o){if(e&1&&(c(0,"mat-label",2)(1,"span"),C(2),l()()),e&2){let n=d();p("show",n.placeholder),s(2),Z(n.placeholder)}}var Gt={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"dddd, D MMMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"dddd, D MMMM YYYY",monthYearA11yLabel:"MMMM YYYY"}},Pt=(()=>{let o=class o{set hidelClearBtn(i){this.calendarService.setHeaderConfig({hideBtnClear:i,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(i){let t=null;i&&(t=i.toDate(),t.setHours(0,0,0,0)),this.onChange(t),this.dateChange.emit(t)}constructor(){this.calendarService=u(Ie),this.headerComponent=At,this.data_cy=g(void 0),this.appearance=g("outline"),this.width=g(void 0),this.isFloatingLabel=g(!0),this.disabled=!1,this.readOnly=g(!1),this.minDateValidation=g(void 0),this.maxDateValidation=g(void 0),this.dateChange=fe(),this.minDate=b.MinDate,this.onChange=i=>{},this.displayToggle=!0}writeValue(i){this.date=i}registerOnChange(i){this.onChange=i}registerOnTouched(i){}setDisabledState(i){this.disabled=i}onOpenDatepicker(){let i=document.getElementById("dropdown-filter");if(i){var t=new bootstrap.Dropdown(i);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let i=document.getElementById("dropdown-filter");if(i){var t=new bootstrap.Dropdown(i);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["datepicker"]],inputs:{data_cy:[1,"data_cy"],placeholder:"placeholder",displayToggle:"displayToggle",appearance:[1,"appearance"],width:[1,"width"],isFloatingLabel:[1,"isFloatingLabel"],date:"date",disabled:"disabled",readOnly:[1,"readOnly"],minDateValidation:[1,"minDateValidation"],maxDateValidation:[1,"maxDateValidation"],hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},standalone:!1,features:[k([{provide:Ce,useClass:It,deps:[st]},{provide:mt,useValue:Gt},{provide:Je,multi:!0,useExisting:o}])],decls:7,vars:17,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","","aria-hidden","true",1,"datepicker-toggle-icon",3,"click"],[1,"fa-regular","fa-angle-down"],[3,"opened","closed","calendarHeaderComponent"]],template:function(t,a){if(t&1){let r=M();c(0,"mat-form-field",1),_(1,$t,3,2,"mat-label",2),c(2,"input",3),T("dateChange",function(y){return v(r),x(a.change(y.value))})("click",function(){v(r);let y=pe(6);return x(y.open())}),l(),c(3,"span",4),T("click",function(){v(r);let y=pe(6);return x(y.open())}),f(4,"i",5),l(),c(5,"mat-datepicker",6,0),T("opened",function(){return v(r),x(a.onOpenDatepicker())})("closed",function(){return v(r),x(a.onCloseDatepicker())}),l()()}if(t&2){let r=pe(6);Me("width",a.width()||100,"%"),p("disabled",a.disabled)("appearance",a.appearance()),s(),h(a.isFloatingLabel()&&a.placeholder?1:-1),s(),p("placeholder",Xe(a.placeholder||""))("matDatepicker",r)("min",a.minDateValidation())("max",a.maxDateValidation())("value",a.date==a.minDate?null:a.date)("disabled",a.disabled)("readonly",a.readOnly()),Ye("data-cy",a.data_cy()),s(),Me("display",a.displayToggle?"unset":"none"),s(2),p("calendarHeaderComponent",a.headerComponent)}},dependencies:[Se,bt,ct,lt,dt,ft],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:3px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}.datepicker .datepicker-toggle-icon{width:28px;height:36px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin-right:6px}.datepicker .datepicker-toggle-icon i{font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:400;font-size:16px;line-height:1;color:#6b7280}
|
|
2
|
+
`],encapsulation:2});let e=o;return e})(),Mt=(()=>{let o=class o{};o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=me({type:o}),o.\u0275inj=se({providers:[oe],imports:[I,Te,ge,oe,he,xe,kt,vt]});let e=o;return e})();var Oe=()=>[];function Ht(e,o){e&1&&(c(0,"span",4),C(1,"*"),l())}function jt(e,o){if(e&1&&f(0,"ng-select",5),e&2){let n=d().$implicit;p("multiple",!0)("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:ue(4,Oe))("placeholder","Pilih "+(n==null?null:n.name))}}function Wt(e,o){if(e&1&&f(0,"input",7),e&2){let n=d(2).$implicit;p("formControlName",n.attribute_id)("placeholder","Isi "+(n==null?null:n.name))}}function Xt(e,o){if(e&1&&(c(0,"option",14),C(1),l()),e&2){let n=o.$implicit;p("value",n),s(),Z(n)}}function Kt(e,o){if(e&1&&(c(0,"div",9),f(1,"input",11),c(2,"select",12)(3,"option",13),C(4,"Unit"),l(),L(5,Xt,2,2,"option",14,U),l()()),e&2){let n=d(3).$implicit;p("formGroupName",n.attribute_id),s(),p("placeholder","Isi "+(n==null?null:n.name)),s(2),p("value",null),s(2),B(n==null||n.attribute_info==null?null:n.attribute_info.attribute_unit_list)}}function Jt(e,o){if(e&1&&f(0,"input",10),e&2){let n=d(3).$implicit;p("formControlName",n.attribute_id)("placeholder","Isi "+(n==null?null:n.name))}}function qt(e,o){if(e&1&&_(0,Kt,7,3,"div",9)(1,Jt,1,2,"input",10),e&2){let n=d(2).$implicit,i=d(2);h((n==null||n.attribute_info==null?null:n.attribute_info.format_type)==i.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function zt(e,o){if(e&1&&f(0,"datepicker",8),e&2){let n=d(2).$implicit;p("formControlName",n.attribute_id)}}function Qt(e,o){if(e&1&&_(0,Wt,1,2,"input",7)(1,qt,2,1)(2,zt,1,1,"datepicker",8),e&2){let n,i=d().$implicit,t=d(2);h((n=i==null||i.attribute_info==null?null:i.attribute_info.input_validation_type)===t.validationType.VALIDATOR_STRING_TYPE?0:n===t.validationType.VALIDATOR_FLOAT_TYPE?1:n===t.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function Zt(e,o){if(e&1&&f(0,"ng-select",6),e&2){let n=d().$implicit;p("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:ue(3,Oe))("placeholder","Pilih "+(n==null?null:n.name))}}function ei(e,o){if(e&1&&f(0,"ng-select",6),e&2){let n=d().$implicit;p("formControlName",n.attribute_id)("items",n.attribute_value_list?n.attribute_value_list:ue(3,Oe))("placeholder","Pilih "+(n==null?null:n.name))}}function ti(e,o){if(e&1&&(c(0,"div",2)(1,"div",3),_(2,Ht,2,0,"span",4),c(3,"span"),C(4),l()(),_(5,jt,1,5,"ng-select",5)(6,Qt,3,1)(7,Zt,1,4,"ng-select",6)(8,ei,1,4,"ng-select",6),l()),e&2){let n,i=o.$implicit,t=d(2);s(2),h(i.mandatory?2:-1),s(2),q(" ",i==null?null:i.name," "),s(),h((n=i==null||i.attribute_info==null?null:i.attribute_info.input_type)===t.inputType.MULTI_COMBO_BOX?5:n===t.inputType.FREE_TEXT_FILED?6:n===t.inputType.SINGLE_COMBO_BOX?7:8)}}function ii(e,o){if(e&1&&(c(0,"form",0)(1,"div",1),L(2,ti,9,3,"div",2,U),l()()),e&2){let n=d();p("formGroup",n.form),s(2),B(o)}}var Et=(()=>{let o=class o{constructor(){this.formCategoryService=u(Ne),this.channelType=g(void 0),this.categoryId=g(void 0),this.channelId=g(void 0),this.channelProductUpload=g(void 0),this.attributesChanges=new V,this.inputType=J,this.formatType=ne,this.validationType=re}ngOnChanges(){let i=this.categoryId(),t=this.channelId();b.IsNotEmpty(i)&&b.IsNotEmpty(t)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:i,channelId:t,channelType:this.channelType()}).pipe(w(a=>{this.form=this.formCategoryService.createFormGroup(a),this.listenToFormChange(a)}),Q(1)))}listenToFormChange(i){let t=[];this.formSubscription=this.form.valueChanges.subscribe(a=>{t=this.formCategoryService.getFilteredAttributes(i,a),this.attributesChanges.emit(t)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["shopee-attribute-form"]],inputs:{channelType:[1,"channelType"],categoryId:[1,"categoryId"],channelId:[1,"channelId"],channelProductUpload:[1,"channelProductUpload"]},outputs:{attributesChanges:"attributesChanges"},features:[k([Ne]),N],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","value_id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","value_id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"],[1,"attribute-datepicker",3,"formControlName"],[1,"d-flex","align-items-center",3,"formGroupName"],["type","text","autoNum","",1,"form-control",3,"formControlName","placeholder"],["formControlName","value","type","text","autoNum","",1,"form-control","me-1",2,"width","200px",3,"placeholder"],["name","unit","id","unit","formControlName","unit",1,"form-control"],["disabled","","selected","",3,"value"],[3,"value"]],template:function(t,a){if(t&1&&(_(0,ii,4,1,"form",0),F(1,"async")),t&2){let r;h((r=A(1,1,a.attributes$))?0:-1,r)}},dependencies:[I,Y,G,$,j,Ze,et,ee,Qe,R,H,W,X,ze,yt,Mt,Pt,P],styles:["input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:36px;border-radius:4px} datepicker.attribute-datepicker>mat-form-field.mat-mdc-form-field>.mat-mdc-text-field-wrapper{height:36px} datepicker.attribute-datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:11px!important;padding-bottom:11px!important;height:36px;min-height:36px!important} datepicker.attribute-datepicker mat-datepicker-toggle>button.mat-mdc-icon-button.mat-mdc-button-base{--mat-icon-button-state-layer-size: 36px}"]});let e=o;return e})();var z=(function(e){return e.TIKTOK_SHOP="TIKTOK_SHOP",e.TOKOPEDIA="TOKOPEDIA",e})(z||{});var we=(()=>{let o=class o{constructor(){this.httpService=u(ie),this.formBuilder=u(K),this.uploadProductService=u(ve)}getAttributes(i,t){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:i},{key:"CategoryID",value:t}]).pipe(Re(r=>this.uploadProductService.selectedProduct$.pipe(O(m=>(r=this.mappingAttributeSalesProperty(r,m),r)))))}mappingAttributeSalesProperty(i,t){let a=0;return i.filter(r=>(r.type=="SALES_PROPERTY"&&(a+=1),a>1?(a=0,!1):!0)).map(r=>(r.type=="SALES_PROPERTY"&&(r.name="Jenis Variant",r.is_multiple_selection=!1,r.is_required=this.isProductHasMoreVariant(t),r.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),r))}isProductHasMoreVariant(i){let t=!1,a=[];return i.forEach(r=>{r.Variants&&a.push(r.Variants.length)}),t=a.some(r=>r>1),t}createFormGroup(i){let t=this.formBuilder.group({}),a=[];return i.forEach(r=>{a=[],r.is_required&&a.push(de.required),t.addControl(r.id,this.formBuilder.control(null,a))}),t.addControl("listingPlatform",this.formBuilder.control([z.TIKTOK_SHOP,z.TOKOPEDIA],[de.required])),t}getFilteredAttributes(i,t){let a=JSON.parse(JSON.stringify(i)),r=Object.keys(t),m=a.filter(y=>r.findIndex(Pe=>parseInt(Pe)==y.id)!=-1);return m=this.filterSelectedAttributes(m,t),m}filterSelectedAttributes(i,t){return i.map(r=>(b.IsNotEmpty(r.values)?r.is_multiple_selection?r.values=r.values.filter(m=>t[r.id]?.includes(m.id)):r.values=r.values.filter(m=>m.id==t[r.id]):t[r.id]&&(r.values=[{id:null,name:t[r.id]}]),r)).filter(r=>r?.values?.length>0)}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();function oi(e,o){e&1&&(c(0,"small",5),C(1," Platform is required "),l())}function ni(e,o){e&1&&(c(0,"span",5),C(1,"*"),l())}function ri(e,o){if(e&1&&f(0,"ng-select",6),e&2){let n=d().$implicit;p("multiple",!0)("formControlName",n.id)("items",n.values)("placeholder","Pilih "+(n==null?null:n.name))}}function ai(e,o){if(e&1&&f(0,"ng-select",7),e&2){let n=d().$implicit;p("formControlName",n.id)("items",n.values)("placeholder","Pilih "+(n==null?null:n.name))}}function li(e,o){if(e&1&&f(0,"input",8),e&2){let n=d().$implicit;p("formControlName",n.id)("placeholder",n==null?null:n.name)}}function di(e,o){if(e&1&&(c(0,"small",5),C(1),l()),e&2){let n=d().$implicit;s(),q(" ",n==null?null:n.name," is mandatory ")}}function ci(e,o){if(e&1&&(c(0,"div",2)(1,"div",3),_(2,ni,2,0,"span",5),c(3,"span"),C(4),l()(),_(5,ri,1,4,"ng-select",6)(6,ai,1,3,"ng-select",7)(7,li,1,2,"input",8),_(8,di,2,1,"small",5),l()),e&2){let n=o.$implicit;s(2),h(n.is_required?2:-1),s(2),q(" ",n==null?null:n.name," "),s(),h(n.is_multiple_selection?5:n.values!==null&&n.values.length>0?6:7),s(3),h(n.is_required?8:-1)}}function si(e,o){if(e&1&&(c(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),C(5," Platform Options"),l()(),f(6,"ng-select",4),_(7,oi,2,0,"small",5),l(),L(8,ci,9,4,"div",2,U),l()()),e&2){let n,i=d();p("formGroup",i.form),s(6),p("multiple",!0)("items",i.platformOptions)("clearable",!1),s(),h(!(i.form==null||(n=i.form.get("listingPlatform").errors)==null)&&n.required?7:-1),s(),B(o)}}var Dt=(()=>{let o=class o{constructor(){this.tiktokAttributeFormService=u(we),this.channelId=g(void 0),this.categoryId=g(void 0),this.platformChange=fe({alias:"onPlatformChanges"}),this.formSubscription=new ce,this.attributesChanges=new V,this.platformOptions=[{label:"TikTok Shop",value:z.TIKTOK_SHOP},{label:"Tokopedia",value:z.TOKOPEDIA}]}ngOnChanges(){let i=this.categoryId(),t=this.channelId();b.IsNotEmpty(i)&&b.IsNotEmpty(t)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(t,i).pipe(O(a=>a.filter(r=>!(r.type=="PRODUCT_PROPERTY"&&(b.IsEmpty(r.values)||r.values?.length==0)&&r.is_customizable==!1))),w(a=>{this.form=this.tiktokAttributeFormService.createFormGroup(a),this.listenToFormChange(a)}),Q(1)))}listenToFormChange(i){let t=[];this.form.valueChanges.pipe(le(this.formSubscription)).subscribe(a=>{delete a.listingPlatform,t=this.tiktokAttributeFormService.getFilteredAttributes(i,a),this.attributesChanges.emit(t)}),this.form.get("listingPlatform").valueChanges.pipe(Ge(this.form.get("listingPlatform").value),le(this.formSubscription)).subscribe(a=>{this.platformChange.emit(a)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["tiktok-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{platformChange:"onPlatformChanges",attributesChanges:"attributesChanges"},features:[k([we]),N],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","listingPlatform","bindLabel","label","bindValue","value","placeholder","Platform Options",3,"multiple","items","clearable"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"]],template:function(t,a){if(t&1&&(_(0,si,10,5,"form",0),F(1,"async")),t&2){let r;h((r=A(1,1,a.attributes$))?0:-1,r)}},dependencies:[I,Y,G,$,j,ee,R,H,W,X,te,P],encapsulation:2});let e=o;return e})();var Ve=(()=>{let o=class o{constructor(){this.woocommerceUploadService=u(ye)}getAttributes(i,t){return this.woocommerceUploadService.getAttributes(i,t).pipe(O(a=>a.map(r=>({key:r.name,label:r.name}))))}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();var Nt=(()=>{let o=class o{constructor(){this.wooAttributeFormService=u(Ve),this.channelId=g(),this.categoryId=g(),this.attributesChanges=new V}ngOnChanges(){b.IsNotEmpty(this.categoryId())&&b.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(i){this.attributesChanges.emit([i.key])}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[k([Ve]),N],decls:6,vars:3,consts:[[1,"row"],[1,"col-6"],[1,"mb-1"],["bindLabel","label","bindValue","id","placeholder","Pilih Atribut",3,"change","items"]],template:function(t,a){t&1&&(c(0,"div",0)(1,"div",1)(2,"div",2),C(3,"Atribut"),l(),c(4,"ng-select",3),F(5,"async"),T("change",function(m){return a.onSelectAttribute(m)}),l()()()),t&2&&(s(4),p("items",A(5,1,a.attributes$)))},dependencies:[I,te,Y,G,$,P],encapsulation:2});let e=o;return e})();var Ue=(()=>{let o=class o{constructor(){this.httpService=u(ie),this.formBuilder=u(K)}getAttributes(i,t){return this.httpService.get("api/product/tokopedia/GetAttributes",[{key:"ID",value:i},{key:"CategoryID",value:t}]).pipe(O(r=>r))}createFormGroup(i){let t=this.formBuilder.group({});return i.forEach(a=>{t.addControl(a.variant,this.formBuilder.control(null))}),t}convertAttributes(i={}){return Object.values(i).filter(a=>a!==null).map(a=>JSON.stringify(a))}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();function mi(e,o){if(e&1&&(c(0,"div",2)(1,"div",3),C(2),l(),f(3,"ng-select",4),l()),e&2){let n=o.$implicit;s(2),q(" ",n==null?null:n.variant," "),s(),p("formControlName",n.variant)("items",n.values)("placeholder","Pilih "+(n==null?null:n.variant))}}function pi(e,o){if(e&1&&(c(0,"form",0)(1,"div",1),L(2,mi,4,4,"div",2,U),l()()),e&2){let n=d();p("formGroup",n.form),s(2),B(o)}}var Ot=(()=>{let o=class o{constructor(){this.tokpedAttrFormService=u(Ue),this.channelId=g(void 0),this.categoryId=g(void 0),this.attributesChanges=new V}ngOnInit(){}ngOnChanges(i){let t=this.categoryId(),a=this.channelId();b.IsNotEmpty(t)&&b.IsNotEmpty(a)&&(this.attributes$=this.tokpedAttrFormService.getAttributes(a,t).pipe(w(r=>{this.form=this.tokpedAttrFormService.createFormGroup(r),this.listenToFormChange()})))}listenToFormChange(){let i=[];this.formSubscription=this.form.valueChanges.subscribe(t=>{i=this.tokpedAttrFormService.convertAttributes(t),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["tokopedia-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[k([Ue]),N],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"]],template:function(t,a){if(t&1&&(_(0,pi,4,1,"form",0),F(1,"async")),t&2){let r;h((r=A(1,1,a.attributes$))?0:-1,r)}},dependencies:[I,Y,G,$,j,R,H,W,X,P],encapsulation:2});let e=o;return e})();var Le=(()=>{let o=class o{constructor(){this.httpService=u(ie),this.formBuilder=u(K)}getAttributes(i){return this.httpService.get("api/product/shopify/GetAttributes",[{key:"ID",value:i}]).pipe(w(a=>(a.Options.StatusOptions=a.Options.Status.map(r=>({id:r,name:r})),a)))}createFormGroup(i){let t=this.formBuilder.group({});return Object.keys(i.Attribute).forEach(r=>{t.addControl(r,this.formBuilder.control(null))}),t}};o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac});let e=o;return e})();function ui(e,o){if(e&1&&(c(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3),C(4," Brand "),l(),f(5,"input",4),l(),c(6,"div",5)(7,"div",3),C(8," Product Type "),l(),f(9,"input",6),l(),c(10,"div",5)(11,"div",3),C(12," Status "),l(),f(13,"ng-select",7),l()()()),e&2){let n=d();p("formGroup",n.form),s(13),p("items",o.Options.StatusOptions)}}var wt=(()=>{let o=class o{constructor(){this.channelId=g(void 0),this.attributesChanges=new V,this.shopifyFormService=u(Le)}ngOnChanges(i){i.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId()).pipe(w(t=>{this.form=this.shopifyFormService.createFormGroup(t),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe($e(500)).subscribe(i=>{this.attributesChanges.emit([i])})}ngOnDestroy(){this.formSubscription.unsubscribe()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["shopify-attribute-form"]],inputs:{channelId:[1,"channelId"]},outputs:{attributesChanges:"attributesChanges"},features:[k([Le]),N],decls:2,vars:3,consts:[[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","Brand","type","text","placeholder","brand",1,"form-control"],[1,"col-6"],["formControlName","ProductType","type","text","placeholder","Product Type",1,"form-control"],["formControlName","Status","bindLabel","name","bindValue","id","placeholder","Status",3,"items"]],template:function(t,a){if(t&1&&(_(0,ui,14,2,"form",0),F(1,"async")),t&2){let r;h((r=A(1,1,a.attributes$))?0:-1,r)}},dependencies:[I,$,j,ee,R,H,W,X,Y,G,P],encapsulation:2});let e=o;return e})();function fi(e,o){if(e&1&&(c(0,"div",6),f(1,"app-product-card",9),l()),e&2){let n=o.$implicit;s(),p("productId",n==null?null:n.ID)("title",n==null?null:n.Name)("image",n==null?null:n.ThumbnailUrl)("description",(n==null||n.Variants==null?null:n.Variants.length)>1?(n==null||n.Variants==null?null:n.Variants.length)+" Variants":null)("imageForZoom",n==null?null:n.ImageUrl)("code",n==null||n.Variants[0]==null?null:n.Variants[0].Code)("showFooter",!1)}}function _i(e,o){if(e&1){let n=M();c(0,"mat-checkbox",21),We("ngModelChange",function(t){v(n);let a=d().$implicit;return je(a.selected,t)||(a.selected=t),x(t)}),T("ngModelChange",function(){let t=v(n),a=d(),r=a.$implicit,m=a.$index,y=d();return x(y.onSelectChannel(r,m,t))}),l()}if(e&2){let n=d().$implicit;He("ngModel",n.selected)}}function hi(e,o){if(e&1&&(c(0,"div",18),f(1,"input",22),l()),e&2){let n=d().$implicit,i=d();p("matTooltip",n.type==i.channelType.Shopify||n.type==i.channelType.ShopifyV2?"Cannot change category, please change category in admin.shopify.com":n.type==i.channelType.Plugo?"You can change the category after the product has been uploaded to the Plugo Dashboard.":"")}}function Ci(e,o){if(e&1){let n=M();c(0,"app-channel-category-select",23),T("selectedCategory",function(t){v(n);let a=d().$index,r=d();return x(r.onCategoryChange(a,t))}),l()}if(e&2){let n=d().$implicit,i=d();p("disabled",!n.selected||n.selected&&n.type==i.channelType.Lazada)("channelId",n.id)("channelType",n.type)("categoryId",n.categoryId)}}function gi(e,o){if(e&1){let n=M();c(0,"shopee-attribute-form",27),T("attributesChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onAttributesChange(a,t))}),l()}if(e&2){let n=d(2).$implicit;p("categoryId",n.categoryId)("channelId",n.id)("channelType",n.type)}}function bi(e,o){if(e&1){let n=M();c(0,"tiktok-attribute-form",28),T("attributesChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onAttributesChange(a,t))})("onPlatformChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onPlatformChange(a,t))}),l()}if(e&2){let n=d(2).$implicit;p("categoryId",n.categoryId)("channelId",n.id)}}function yi(e,o){if(e&1){let n=M();c(0,"wooocommerce-attribute-form",29),T("attributesChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onAttributesChange(a,t))}),l()}if(e&2){let n=d(2).$implicit;p("categoryId",n.categoryId)("channelId",n.id)}}function vi(e,o){if(e&1){let n=M();c(0,"tokopedia-attribute-form",29),T("attributesChanges",function(t){v(n);let a=d(2).$index,r=d();return x(r.onAttributesChange(a,t))}),l()}if(e&2){let n=d(2).$implicit;p("categoryId",n.categoryId)("channelId",n.id)}}function xi(e,o){if(e&1&&(c(0,"div",20)(1,"div",24),_(2,gi,1,3,"shopee-attribute-form",25)(3,bi,1,2,"tiktok-attribute-form",26)(4,yi,1,2,"wooocommerce-attribute-form",26)(5,vi,1,2,"tokopedia-attribute-form",26),l()()),e&2){let n,i=d().$implicit,t=d();s(2),h((n=i.type)===t.channelType.Shopee?2:n===t.channelType.Tiktok?3:n===t.channelType.WooCommerce?4:n===t.channelType.Tokopedia?5:-1)}}function Ti(e,o){if(e&1){let n=M();c(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",30),T("attributesChanges",function(t){v(n);let a=d().$index,r=d();return x(r.onAttributesChange(a,t))}),l()()()}if(e&2){let n=d().$implicit;s(2),p("channelId",n.id)}}function Si(e,o){if(e&1&&(c(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),_(6,_i,1,1,"mat-checkbox",14),F(7,"async"),l(),c(8,"div"),f(9,"app-channel-logo",15),l(),c(10,"div",16)(11,"span"),C(12),l()()()(),c(13,"div",12)(14,"div",17),_(15,hi,2,1,"div",18)(16,Ci,1,4,"app-channel-category-select",19),l()()(),_(17,xi,6,1,"div",20)(18,Ti,3,1,"div",20),l()()),e&2){let n,i=o.$implicit,t=d();s(6),h((n=A(7,8,t.defaultCategories$))?6:-1,n),s(3),p("typeId",i.type)("showChannelName",!1),s(),p("matTooltip",i.name)("matTooltipShowDelay",2500),s(2),Z(i.name),s(3),h(i.type==t.channelType.Shopify||i.type==t.channelType.Plugo||i.type==t.channelType.ShopifyV2?15:16),s(2),h(i.categoryId&&t.channelType.Lazada!=i.type&&i.selected?17:(t.channelType.Shopify==i.type||i.type==t.channelType.ShopifyV2)&&i.selected?18:-1)}}var Sr=(()=>{let o=class o{constructor(){this.toastr=u(tt),this.uploadProductService=u(ve),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=Ee,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(Q(1))}onCategoryChange(i,t){this.channelProductUploads.update(a=>a.map((r,m)=>(m==i&&(r.categoryId=t,r.attributes=[]),r)))}onPlatformChange(i,t){this.channelProductUploads.update(a=>a.map((r,m)=>(m==i&&(r.listing_platforms=t),r)))}onAttributesChange(i,t){this.channelProductUploads.update(a=>a.map((r,m)=>(m==i&&(r.attributes=t),r)))}tiktokPlatformChanges(i,t){this.channelProductUploads.update(a=>a.map((r,m)=>(m==i&&(r.listing_platforms=t),r)))}onSelectChannel(i,t,a){this.channelProductUploads.update(r=>r.map((m,y)=>{if(y==t&&i.selected){let ke=this.findCategoryByChannelId(i.id,a);m.categoryId=ke?.DefaultCategoryID}return y==t&&!i.selected&&(m.categoryId=null),m}))}findCategoryByChannelId(i,t){return t.find(a=>a.ID===i)}onUploadProduct(){if(this.checkTiktokPlatform()==!1){this.toastr.error("Please select at least one platform for TikTok channel","Platform is Required");return}this.uploadProductService.onUploadProduct(this.channelProductUploads())}checkTiktokPlatform(){return this.channelProductUploads().every(t=>t.type==Ee.Tiktok&&b.IsNotEmpty(t?.categoryId)?t.listing_platforms.length>0:!0)}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}};o.\u0275fac=function(t){return new(t||o)},o.\u0275cmp=S({type:o,selectors:[["app-product-upload"]],features:[k([be,pt,ut,ye])],decls:17,vars:5,consts:[["headerTitle","Upload Product To Channel",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click","disabled"],["aria-hidden","true",1,"fa","fa-upload"],[1,"container-fluid","mt-6"],[1,"ps-3","mt-8","pb-5","fw-medium"],[1,"row","mb-10","ps-3"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"ps-3","mb-8","border-bottom","pb-5","fw-medium"],[1,"row","mb-6"],[3,"productId","title","image","description","imageForZoom","code","showFooter"],[1,"col-12"],[1,"row"],[1,"col-3"],[1,"d-flex","align-items-center"],["color","primary",1,"example-margin",3,"ngModel"],[3,"typeId","showChannelName"],[2,"overflow","hidden","text-overflow","ellipsis","white-space","nowrap",3,"matTooltip","matTooltipShowDelay"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip"],[3,"disabled","channelId","channelType","categoryId"],[1,"row","my-3"],["color","primary",1,"example-margin",3,"ngModelChange","ngModel"],["disabled","","type","text","placeholder","Category Unavailable",1,"form-control","rounded-1",2,"height","35px"],[3,"selectedCategory","disabled","channelId","channelType","categoryId"],[1,"col-12","ps-11"],[3,"categoryId","channelId","channelType"],[3,"categoryId","channelId"],[3,"attributesChanges","categoryId","channelId","channelType"],[3,"attributesChanges","onPlatformChanges","categoryId","channelId"],[3,"attributesChanges","categoryId","channelId"],[3,"attributesChanges","channelId"]],template:function(t,a){if(t&1&&(c(0,"mainpanel",0)(1,"actions")(2,"button",1),T("click",function(){return a.onUploadProduct()}),f(3,"i",2),C(4," Upload "),l()(),c(5,"content")(6,"div",3)(7,"h3",4),C(8,"Product To Upload"),l(),c(9,"div",5),L(10,fi,2,7,"div",6,U),F(12,"async"),l(),c(13,"h3",7),C(14,"Channel To Upload"),l(),L(15,Si,19,10,"div",8,U),l()()()),t&2){let r;p("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p("disabled",((r=a.channelProductUploads())==null?null:r.length)==0),s(8),B(A(12,3,a.selectedProducts$)),s(5),B(a.channelProductUploads())}},dependencies:[I,xt,rt,nt,St,Tt,at,te,R,qe,ot,it,Dt,Nt,Ot,wt,_t,Ft,Et,P],encapsulation:2});let e=o;return e})();export{Sr as ProductUploadComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c,b as d}from"./chunk-
|
|
1
|
+
import{a as c,b as d}from"./chunk-A7PUMY67.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as l,I as m}from"./chunk-LNJUGHOX.js";import{Gb as i,gc as r,hc as s,ic as p,jc as n,nb as a}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var v=(()=>{let e=class e{constructor(){this.tabs=[{Title:"Roles",Url:"/menu/profile/roles"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=i({type:e,selectors:[["app-my-profile"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(o,f){o&1&&(s(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),p()()(),n(4,"router-outlet")),o&2&&(a(3),r("Tabs",f.tabs)("usePermissions",!0))},dependencies:[d,c,m,l],encapsulation:2});let t=e;return t})(),M=[{path:"",component:v,children:[{path:"",redirectTo:"roles",pathMatch:"full"},{path:"roles",loadComponent:()=>import("./chunk-JW7NES7L.js").then(t=>t.RolesInfoComponent),data:{title:"Roles Info"}}]}];export{v as MyProfileComponent,M as routes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as W,b as A,c as U}from"./chunk-3JRUKSV3.js";import{a as z,b as B}from"./chunk-SJ5MC42H.js";import{b as j}from"./chunk-NWB7EVME.js";import{a as I}from"./chunk-A6QXXKPR.js";import{i as E}from"./chunk-Q4AWQ7IC.js";import{ra as P}from"./chunk-5PMKN6PM.js";import{A as k,a as D,h as N,m as F}from"./chunk-L3W6SG2T.js";import{$b as T,Gb as V,Kb as v,Mb as _,Mc as x,Nc as S,Qc as w,Rc as b,Sc as y,Zc as O,bc as L,gc as p,hc as c,ic as u,jc as g,lb as h,nb as m,qc as f,ra as M,td as d,vc as C,xa as r,xc as a,ya as s}from"./chunk-ZYJ6LAJ3.js";function G(n,o){if(n&1&&(c(0,"div",6),g(1,"img",7),c(2,"div"),x(3),u()()),n&2){let e=o.$implicit;m(),p("src",e.logo,h),m(2),S(e.Name)}}function R(n,o){if(n&1){let e=f();c(0,"p-multiselect",4,0),C("click",function(){r(e);let i=a();return s(i.onClickSelect())}),y("ngModelChange",function(i){r(e);let l=a();return b(l.selectedChannels,i)||(l.selectedChannels=i),s(i)}),C("ngModelChange",function(i){r(e);let l=a();return s(l.onChannelChange(i))}),_(2,G,4,2,"ng-template",5),u()}if(n&2){let e=a();p("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),p("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())}}function q(n,o){if(n&1&&(c(0,"div",6),g(1,"img",7),c(2,"div"),x(3),u()()),n&2){let e=o.$implicit;m(),p("src",e.logo,h),m(2),S(e.Name)}}function H(n,o){if(n&1){let e=f();c(0,"p-select",8,1),C("click",function(){r(e);let i=a();return s(i.onClickSelect())}),y("ngModelChange",function(i){r(e);let l=a();return b(l.selectedChannels,i)||(l.selectedChannels=i),s(i)}),C("ngModelChange",function(i){r(e);let l=a();return s(l.onChannelChange(i))}),_(2,q,4,2,"ng-template",5),u()}if(n&2){let e=a();p("options",e.options())("placeholder",e.placeholder()),w("ngModel",e.selectedChannels),p("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var re=(()=>{let o=class o extends U{constructor(){super(),this.authService=M(E),this.multiple=d(!1),this.clearable=d(!0),this.placeholder=d("Select Channels"),this.options=d(this.authService.getChannels()),this.maxSelectedLabels=d(6),this.onChange=t=>{}}onChannelChange(t){this.multiple()?t=t||[]:t=t||I.GuidEmpty,this.onChange(t)}onClickSelect(){this.initTopPosition(),setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(t){this.selectedChannels=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){}setDisabledState(t){}};o.\u0275fac=function(i){return new(i||o)},o.\u0275cmp=V({type:o,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],options:[1,"options"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[O([{provide:D,multi:!0,useExisting:o}]),v],decls:2,vars:1,consts:[["multiSelect",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["pTemplate","item"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"]],template:function(i,l){i&1&&T(0,R,3,6,"p-multiselect",2)(1,H,3,6,"p-select",3),i&2&&L(l.multiple()?0:1)},dependencies:[B,z,P,j,k,N,F,A,W],encapsulation:2});let n=o;return n})();export{re as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{O as o}from"./chunk-XLIPGDSC.js";import{Hb as i,na as t}from"./chunk-ZYJ6LAJ3.js";var p=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=i({type:e});static \u0275inj=t({imports:[o,o]})}return e})();export{p as a};
|