marketplacepos 5.48.3 → 5.48.4
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/{chunk-F7I7HQGQ.js → chunk-222XXOAY.js} +1 -1
- package/Marketplace/{chunk-2XYIINPQ.js → chunk-27DJ3M5I.js} +1 -1
- package/Marketplace/{chunk-YF56YLYK.js → chunk-2C2HFRNV.js} +1 -1
- package/Marketplace/{chunk-PHTDDNER.js → chunk-2NVWRVFF.js} +1 -1
- package/Marketplace/{chunk-U6KJZIHD.js → chunk-2VA22SO6.js} +1 -1
- package/Marketplace/{chunk-FQQOS3AF.js → chunk-4M33AWDZ.js} +1 -1
- package/Marketplace/{chunk-Z5D5R7AO.js → chunk-4ZJFRWQN.js} +1 -1
- package/Marketplace/{chunk-QMC2DZIB.js → chunk-5AODAALH.js} +1 -1
- package/Marketplace/{chunk-OR34CB7O.js → chunk-6QQYEBL5.js} +1 -1
- package/Marketplace/{chunk-5QQCKNH2.js → chunk-7SLU6C27.js} +1 -1
- package/Marketplace/{chunk-HCR33US3.js → chunk-B2AJZWCR.js} +1 -1
- package/Marketplace/{chunk-MQRQ3LOB.js → chunk-B3OCJYGA.js} +1 -1
- package/Marketplace/{chunk-IGS6BEII.js → chunk-C3PHFX5T.js} +1 -1
- package/Marketplace/{chunk-4JRHCYVO.js → chunk-CBG4WEYF.js} +1 -1
- package/Marketplace/{chunk-77NAUG5Y.js → chunk-CPZLAKWT.js} +1 -1
- package/Marketplace/{chunk-HF4T6G54.js → chunk-CS6LKY4V.js} +1 -1
- package/Marketplace/{chunk-BNAARI67.js → chunk-CY6E3XTP.js} +1 -1
- package/Marketplace/{chunk-BUY4AAHK.js → chunk-DZPJWQHG.js} +1 -1
- package/Marketplace/{chunk-HANPHNZU.js → chunk-FH4WODGS.js} +1 -1
- package/Marketplace/{chunk-IFP44BTX.js → chunk-G2BBO6GM.js} +1 -1
- package/Marketplace/{chunk-NN6DSN34.js → chunk-GRC7HDKP.js} +2 -2
- package/Marketplace/{chunk-SZVJOKAX.js → chunk-GUL2XBWQ.js} +1 -1
- package/Marketplace/{chunk-YLQKFPMU.js → chunk-HK4GOJ73.js} +1 -1
- package/Marketplace/{chunk-GFVJVBGH.js → chunk-HSA2EDQG.js} +1 -1
- package/Marketplace/{chunk-F7JWZJVZ.js → chunk-IDBG7TAK.js} +1 -1
- package/Marketplace/{chunk-GWYT3CQM.js → chunk-IWHLLPRU.js} +1 -1
- package/Marketplace/{chunk-PL2WVYMI.js → chunk-JPSDIHQS.js} +1 -1
- package/Marketplace/{chunk-B5AYTAZQ.js → chunk-K7L2HJWH.js} +1 -1
- package/Marketplace/{chunk-KNPQ6DPC.js → chunk-LKOXNIF6.js} +1 -1
- package/Marketplace/{chunk-WFXKYFBX.js → chunk-LO7NU25H.js} +1 -1
- package/Marketplace/{chunk-5NFLGFHD.js → chunk-M5M7T3E4.js} +1 -1
- package/Marketplace/{chunk-KOQGQF2L.js → chunk-NMN7TOB5.js} +1 -1
- package/Marketplace/{chunk-DCAYH4J7.js → chunk-NRMQVYZ5.js} +1 -1
- package/Marketplace/{chunk-BTSGHYIF.js → chunk-NVVJMZYV.js} +1 -1
- package/Marketplace/{chunk-HUZZJ34K.js → chunk-OMYXR4JG.js} +2 -2
- package/Marketplace/{chunk-QQY7JGZW.js → chunk-PCKX55VF.js} +1 -1
- package/Marketplace/{chunk-7CYONN5M.js → chunk-PMJQCWXG.js} +1 -1
- package/Marketplace/{chunk-M2FDHHOH.js → chunk-QHN4ATYC.js} +1 -1
- package/Marketplace/{chunk-X2RNU4B3.js → chunk-QHWVLA6O.js} +1 -1
- package/Marketplace/{chunk-A62IPN6W.js → chunk-QINDZ3K2.js} +1 -1
- package/Marketplace/{chunk-YN55P3QH.js → chunk-QJU4F5AN.js} +1 -1
- package/Marketplace/{chunk-X7JNYYQS.js → chunk-RLSTZSKZ.js} +1 -1
- package/Marketplace/{chunk-6FAJM27Z.js → chunk-RPI2RGAE.js} +1 -1
- package/Marketplace/{chunk-4UPWMQJX.js → chunk-UDM6UTHY.js} +1 -1
- package/Marketplace/{chunk-XMN2RKK3.js → chunk-UXCV6LVT.js} +1 -1
- package/Marketplace/{chunk-WPKFNEM6.js → chunk-VEX4VY2R.js} +1 -1
- package/Marketplace/{chunk-T7HRAMHR.js → chunk-VX75I7HA.js} +1 -1
- package/Marketplace/{chunk-YQWENM2M.js → chunk-X3VCSYP4.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-BI4BOJO4.js → main-FO3SINLF.js} +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as S}from"./chunk-4VNQYYVV.js";import{h as u}from"./chunk-
|
|
1
|
+
import{a as S}from"./chunk-4VNQYYVV.js";import{h as u}from"./chunk-CS6LKY4V.js";import{b as h,d as C,i as M,j as v,k as x}from"./chunk-EDEZ3JLR.js";import{F as g}from"./chunk-LNJUGHOX.js";import{Gb as d,Mc as t,gc as f,hc as n,ic as r,jc as c,ma as m,ra as o,vc as p}from"./chunk-ZYJ6LAJ3.js";var y=(()=>{let e=class e{constructor(){this.dialogRef=o(h),this.route=o(g),this.modalConfig=new v,this.modalConfig.title="Switch to modern authorization",this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0,this.modalConfig.headerType=M.Warning,this.modalConfig.okText="Setup"}onClose(){this.dialogRef.close()}onOk(){this.dialogRef.close(),this.route.navigate(["/menu/users"])}};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=d({type:e,selectors:[["app-modal-user-migration-confirmation"]],decls:19,vars:1,consts:[[3,"onOk","onCancel","config"],["content",""],[1,"d-flex","align-items-center","justify-content-between","gap-6"],[1,"text-center",2,"width","300px"],[1,"fa-solid","fa-users-gear","fa-6x"],[1,"lh-base"],["href","https://support.dealpos.com/en/articles/12636364-how-to-migrate-user-in-dealpos-omnichannel","target","_blank"]],template:function(a,s){a&1&&(n(0,"modal-material",0),p("onOk",function(){return s.onOk()})("onCancel",function(){return s.onClose()}),n(1,"div",1)(2,"div",2)(3,"div",3),c(4,"i",4),r(),n(5,"div",5)(6,"p"),t(7," We have introduced a new Modern Authorization, Please switch from "),n(8,"b"),t(9,"legacy"),r(),t(10," to "),n(11,"b"),t(12,"modern"),r(),t(13," authorization by inviting your users. "),r(),n(14,"div"),t(15," Please refer to this "),n(16,"a",6),t(17,"article"),r(),t(18," for more information "),r()()()()()),a&2&&f("config",s.modalConfig)},dependencies:[x],encapsulation:2});let i=e;return i})();var R=(()=>{let e=class e{constructor(){this.dialog=o(C),this.tokenService=o(u),this.dialogRef=null}openDialogMigrationConfirmation(){this.tokenService.getUser()?.AuthorizationMode===S.Legacy&&!this.dialogRef&&(this.dialogRef=this.dialog.open(y),this.dialogRef.afterClosed().subscribe(()=>{this.dialogRef=null}))}resetDialogState(){this.dialogRef&&(this.dialogRef.close(),this.dialogRef=null)}};e.\u0275fac=function(a){return new(a||e)},e.\u0275prov=m({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var q=(i,e)=>(o(R).openDialogMigrationConfirmation(),!0);export{q as a};
|
|
@@ -1,2 +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-GFVJVBGH.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-OR34CB7O.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-4UPWMQJX.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-HF4T6G54.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}
|
|
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-HSA2EDQG.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-6QQYEBL5.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-UDM6UTHY.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-CS6LKY4V.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
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 r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-DZPJWQHG.js";import{a as l,b as u}from"./chunk-A7PUMY67.js";import"./chunk-CS6LKY4V.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as m,I as s}from"./chunk-LNJUGHOX.js";import{Gb as i,gc as p,hc as c,ic as d,jc as n,nb as a}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let e=class e{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=i({type:e,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(o,f){o&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),d()()(),n(4,"router-outlet")),o&2&&(a(3),p("Tabs",f.tabs))},dependencies:[u,l,s,m],encapsulation:2});let t=e;return t})(),O=[{path:"",component:h,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-VEX4VY2R.js").then(t=>t.OrderApiComponent)},canActivate:[r],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-QINDZ3K2.js").then(t=>t.ProductApiComponent)},canActivate:[r],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-CY6E3XTP.js").then(t=>t.EscrowApiComponent)},canActivate:[r],data:{title:"Escrow API"}}]}];export{h as JsonApiComponent,O as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as _}from"./chunk-
|
|
1
|
+
import{f as _}from"./chunk-CS6LKY4V.js";import{c as a}from"./chunk-JBEKD57G.js";import{G as k,I as C}from"./chunk-LNJUGHOX.js";import{$b as I,Gb as v,Mc as u,Oc as p,ad as D,bc as g,gc as s,hc as c,ic as m,lb as b,ma as h,nb as l,od as f,ra as o,td as x,xc as d}from"./chunk-ZYJ6LAJ3.js";var y=(()=>{let e=class e{constructor(){this.localDataService=o(_),this.baseUrl=this.localDataService.getHostName()}getBaseUrl(n){let r="";return a.IsNotEmpty(n.ID)?r=`https://${this.baseUrl}/menu/Orders/Orders/Customer_Invoice/Info?ID=${n.ID}`:r="/menu/Order/detail",r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=h({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var U=(t,e)=>({Number:t,Outlet:e});function L(t,e){if(t&1&&(c(0,"a",0),u(1),m()),t&2){let i,n=d();s("href",n.baseUrl(),b),l(),p(" ",(i=n.order())==null?null:i.Number," ")}}function S(t,e){if(t&1&&(c(0,"a",1),u(1),m()),t&2){let i,n,r=d();s("routerLink",r.baseUrl())("queryParams",D(3,U,(i=r.order())==null?null:i.Number,(i=r.order())==null?null:i.Outlet)),l(),p(" ",(n=r.order())==null?null:n.Number," ")}}var z=(()=>{let e=class e{constructor(){this.order=x(),this.generateLinkService=o(y),this.baseUrl=f(()=>this.generateLinkService.getBaseUrl(this.order())),this.hasOrderID=f(()=>a.IsNotEmpty(this.order()?.ID))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=v({type:e,selectors:[["order-link"]],inputs:{order:[1,"order"]},decls:2,vars:1,consts:[["target","_blank",3,"href"],["target","_blank",3,"routerLink","queryParams"]],template:function(r,N){r&1&&I(0,L,2,2,"a",0)(1,S,2,6,"a",1),r&2&&g(N.hasOrderID()?0:1)},dependencies:[C,k],encapsulation:2});let t=e;return t})();export{z as a};
|