marketplacepos 6.29.0 → 6.31.0
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-4CT7CBRW.js → chunk-266EEWSE.js} +1 -1
- package/Marketplace/{chunk-QUY3OMUB.js → chunk-26I3WOHT.js} +1 -1
- package/Marketplace/{chunk-GO5WQM2U.js → chunk-2GKHARPI.js} +1 -1
- package/Marketplace/{chunk-ZFUCZBEK.js → chunk-2HR6ZBIJ.js} +1 -1
- package/Marketplace/{chunk-OSRUSLIZ.js → chunk-33TDKUXQ.js} +1 -1
- package/Marketplace/{chunk-FQLAWEGT.js → chunk-3BV4FPZE.js} +1 -1
- package/Marketplace/{chunk-QSMDXTAY.js → chunk-3I7S5TZI.js} +1 -1
- package/Marketplace/{chunk-YAUELLS3.js → chunk-3NYF3MRZ.js} +1 -1
- package/Marketplace/{chunk-M2R2YNQF.js → chunk-3OJXLC33.js} +1 -1
- package/Marketplace/{chunk-TNEEOMHX.js → chunk-42YIIYI7.js} +1 -1
- package/Marketplace/chunk-46ZRW5ZA.js +1 -0
- package/Marketplace/{chunk-5XMVVQBT.js → chunk-47GECTL6.js} +1 -1
- package/Marketplace/chunk-47X3WRYV.js +1 -0
- package/Marketplace/{chunk-OZL6LZZW.js → chunk-4TF3XWRL.js} +1 -1
- package/Marketplace/{chunk-SEX4VJEZ.js → chunk-52BVJZIG.js} +1 -1
- package/Marketplace/{chunk-WKU7TEKD.js → chunk-5J6UA4BV.js} +1 -1
- package/Marketplace/{chunk-OBB6ZQHB.js → chunk-5SV6WZXH.js} +1 -1
- package/Marketplace/{chunk-RMWAYIJL.js → chunk-625TQFQL.js} +1 -1
- package/Marketplace/{chunk-K6DXVJ5E.js → chunk-6GSJBXEE.js} +1 -1
- package/Marketplace/{chunk-NULYWB7T.js → chunk-6PXRJOVB.js} +1 -1
- package/Marketplace/{chunk-VICDTVX6.js → chunk-6T2JNOIL.js} +2 -2
- package/Marketplace/{chunk-6V4QU6J7.js → chunk-6VOSRCWX.js} +1 -1
- package/Marketplace/{chunk-RESQMXKD.js → chunk-6YKQJSJX.js} +1 -1
- package/Marketplace/{chunk-5DOBCXKU.js → chunk-7LJVTZAG.js} +1 -1
- package/Marketplace/{chunk-WVTZ3R4Z.js → chunk-7P7PKIQT.js} +1 -1
- package/Marketplace/{chunk-MOG4SYJE.js → chunk-A32JPG5P.js} +1 -1
- package/Marketplace/{chunk-HYGCXNVV.js → chunk-AEACJ7IT.js} +1 -1
- package/Marketplace/{chunk-4W3TACBY.js → chunk-AQG3WSR3.js} +1 -1
- package/Marketplace/{chunk-QEDHPH5V.js → chunk-ATZHWHIP.js} +1 -1
- package/Marketplace/{chunk-UJJ6DXG3.js → chunk-BMX7EBGZ.js} +1 -1
- package/Marketplace/{chunk-WFHEQIDZ.js → chunk-BRMEWMES.js} +1 -1
- package/Marketplace/chunk-BUBQQEYA.js +1 -0
- package/Marketplace/{chunk-USM6HESV.js → chunk-BXBABE4R.js} +1 -1
- package/Marketplace/{chunk-ZQZIHSDL.js → chunk-BZQNZCRX.js} +1 -1
- package/Marketplace/{chunk-HEO6A7EN.js → chunk-CHCLLSOR.js} +1 -1
- package/Marketplace/{chunk-2HDFLC5K.js → chunk-D4PB7CKB.js} +1 -1
- package/Marketplace/{chunk-GTMHYTTP.js → chunk-DBH7LDYB.js} +1 -1
- package/Marketplace/{chunk-DYLH5K52.js → chunk-DEC32FB2.js} +1 -1
- package/Marketplace/{chunk-BXTSOA2W.js → chunk-DM53TQG3.js} +1 -1
- package/Marketplace/{chunk-S7LFGFHM.js → chunk-DUQEV7V7.js} +1 -1
- package/Marketplace/{chunk-PHJBC5R3.js → chunk-E2UCWDAO.js} +1 -1
- package/Marketplace/{chunk-VGNEDVS5.js → chunk-E4UF3SPF.js} +1 -1
- package/Marketplace/{chunk-6P6G7QWW.js → chunk-EBCT2DN2.js} +1 -1
- package/Marketplace/{chunk-GM2BUPNR.js → chunk-ENV5ILJK.js} +1 -1
- package/Marketplace/{chunk-SGTHXNHB.js → chunk-F5RRHQJJ.js} +1 -1
- package/Marketplace/{chunk-JWPJJXOB.js → chunk-F5T43RIS.js} +1 -1
- package/Marketplace/{chunk-AEMKWZVV.js → chunk-FFU3JAIJ.js} +1 -1
- package/Marketplace/chunk-FKR5LVJP.js +2 -0
- package/Marketplace/{chunk-GSGIBJDK.js → chunk-FYUBZFJK.js} +1 -1
- package/Marketplace/{chunk-JFKDWXKW.js → chunk-G2XGQFY4.js} +1 -1
- package/Marketplace/{chunk-HKSZ4D5H.js → chunk-GJAJLHPZ.js} +1 -1
- package/Marketplace/{chunk-SZNMIESM.js → chunk-H6XSK7GB.js} +1 -1
- package/Marketplace/{chunk-Q7MTS26W.js → chunk-HD5N3GUK.js} +1 -1
- package/Marketplace/{chunk-HHEHGFXR.js → chunk-HQLLBSXS.js} +1 -1
- package/Marketplace/{chunk-6AP5LR6M.js → chunk-HZKA6DGO.js} +1 -1
- package/Marketplace/{chunk-L24E226F.js → chunk-I4XJB7OG.js} +1 -1
- package/Marketplace/{chunk-QLY33AKV.js → chunk-IBZCREPJ.js} +1 -1
- package/Marketplace/{chunk-LCDZVI4S.js → chunk-II7DLNVF.js} +1 -1
- package/Marketplace/chunk-IPMCCZZW.js +1 -0
- package/Marketplace/{chunk-YGXBMXX2.js → chunk-J5PTSESV.js} +1 -1
- package/Marketplace/{chunk-EF5LYKAK.js → chunk-JMO7SQDX.js} +1 -1
- package/Marketplace/{chunk-RF2EWEGM.js → chunk-JOQC5TET.js} +1 -1
- package/Marketplace/{chunk-TPUICAQW.js → chunk-K2LH5OES.js} +1 -1
- package/Marketplace/{chunk-CFBU64JO.js → chunk-KI4TY5N5.js} +1 -1
- package/Marketplace/{chunk-KQPEFZPV.js → chunk-KW7FOF5D.js} +1 -1
- package/Marketplace/{chunk-ZZ7HSVKU.js → chunk-KXLYQDZR.js} +1 -1
- package/Marketplace/{chunk-YKSTPPJN.js → chunk-KYXIG6CF.js} +1 -1
- package/Marketplace/{chunk-N54LZIRM.js → chunk-L7K2JAJV.js} +1 -1
- package/Marketplace/{chunk-HT2Y27RB.js → chunk-LAIRVUNP.js} +1 -1
- package/Marketplace/{chunk-DJ426GKH.js → chunk-LFRV2RDU.js} +1 -1
- package/Marketplace/{chunk-YSPV644S.js → chunk-LWSYEG4D.js} +1 -1
- package/Marketplace/{chunk-X7PBJAFL.js → chunk-M63VP7TS.js} +1 -1
- package/Marketplace/{chunk-6TTDPTXL.js → chunk-MEJ26HC4.js} +1 -1
- package/Marketplace/{chunk-6BPO7B4Q.js → chunk-MM2TEPZZ.js} +1 -1
- package/Marketplace/{chunk-XI37PNRD.js → chunk-MU7RI22T.js} +1 -1
- package/Marketplace/{chunk-GHLABPFB.js → chunk-MV6SQJHJ.js} +1 -1
- package/Marketplace/{chunk-DAGGBVVW.js → chunk-MYDVMG67.js} +1 -1
- package/Marketplace/{chunk-NMINHVRP.js → chunk-MYT3P6BY.js} +1 -1
- package/Marketplace/{chunk-ETH4AAKD.js → chunk-N2HFKC4A.js} +1 -1
- package/Marketplace/{chunk-JEUWKV3T.js → chunk-N77Q2Q3K.js} +1 -1
- package/Marketplace/{chunk-IPA3OOUY.js → chunk-NWPQV6XP.js} +1 -1
- package/Marketplace/{chunk-SJ6Z2ADB.js → chunk-O6RJOU3C.js} +1 -1
- package/Marketplace/{chunk-V24SRZ7O.js → chunk-OEISJXA5.js} +1 -1
- package/Marketplace/{chunk-TBQAAZKJ.js → chunk-OESZXCMJ.js} +1 -1
- package/Marketplace/{chunk-2C54GNWH.js → chunk-OGUH5X2R.js} +1 -1
- package/Marketplace/{chunk-2TG7MEQ5.js → chunk-OH43UVFL.js} +1 -1
- package/Marketplace/{chunk-XXK374KV.js → chunk-OIYTXYLO.js} +1 -1
- package/Marketplace/chunk-OPRZQ3AF.js +2 -0
- package/Marketplace/{chunk-ZLU3DUBY.js → chunk-PDDRD4EU.js} +5 -5
- package/Marketplace/{chunk-FCSLH5Z4.js → chunk-PXM25OET.js} +1 -1
- package/Marketplace/{chunk-PN7IVNMM.js → chunk-Q5H2PXZY.js} +1 -1
- package/Marketplace/{chunk-OMF3AB4P.js → chunk-QJ4D3KFN.js} +1 -1
- package/Marketplace/{chunk-AZ6LV2JW.js → chunk-QUJT3Y6X.js} +1 -1
- package/Marketplace/{chunk-A5XMT7ZB.js → chunk-QXY4FOJP.js} +1 -1
- package/Marketplace/{chunk-6KHFHPAM.js → chunk-R2KLMLVT.js} +1 -1
- package/Marketplace/{chunk-SY56DEXZ.js → chunk-RWB2N7TQ.js} +1 -1
- package/Marketplace/{chunk-IFHQPJQM.js → chunk-S5FQJLG5.js} +1 -1
- package/Marketplace/{chunk-WTUKJT4T.js → chunk-SBLTWRFW.js} +1 -1
- package/Marketplace/{chunk-KAO5YCJZ.js → chunk-SEB36UUD.js} +1 -1
- package/Marketplace/{chunk-RG24XPVA.js → chunk-SSK4EUDM.js} +1 -1
- package/Marketplace/{chunk-XBJ3AIIM.js → chunk-TTNG3MHW.js} +1 -1
- package/Marketplace/chunk-TW6YICUO.js +278 -0
- package/Marketplace/{chunk-TUTJGFDI.js → chunk-TWWHVZXS.js} +1 -1
- package/Marketplace/{chunk-NTAJMMK3.js → chunk-TYR2ZFLG.js} +1 -1
- package/Marketplace/{chunk-6HEQOCAL.js → chunk-UB6CUSGA.js} +1 -1
- package/Marketplace/{chunk-2VDYYAK6.js → chunk-UGJ5XNLS.js} +1 -1
- package/Marketplace/chunk-UJFPQVWX.js +5 -0
- package/Marketplace/{chunk-5B7SG3J3.js → chunk-ULBNBY4R.js} +1 -1
- package/Marketplace/{chunk-HC762TVU.js → chunk-UR7KQQE3.js} +1 -1
- package/Marketplace/{chunk-IP2DQDRF.js → chunk-UZQ5WKV4.js} +1 -1
- package/Marketplace/{chunk-YHJNCAG6.js → chunk-VAYLCOBC.js} +1 -1
- package/Marketplace/{chunk-ZVCNMOKL.js → chunk-VDNUDZOQ.js} +1 -1
- package/Marketplace/{chunk-M3XAI5VN.js → chunk-VINT75RU.js} +1 -1
- package/Marketplace/{chunk-Q5ELJGUF.js → chunk-WMYEGCCH.js} +1 -1
- package/Marketplace/{chunk-J6OMFAUA.js → chunk-WZDFB7PP.js} +1 -1
- package/Marketplace/{chunk-GAECPRA5.js → chunk-Y5RUW5VE.js} +1 -1
- package/Marketplace/{chunk-WU3VRNRG.js → chunk-YGVY3X52.js} +1 -1
- package/Marketplace/{chunk-4F6RQG4Z.js → chunk-YJZNPYOF.js} +1 -1
- package/Marketplace/{chunk-VOEKDRNB.js → chunk-Z445HYT7.js} +1 -1
- package/Marketplace/chunk-ZAAQHZQ4.js +1 -0
- package/Marketplace/{chunk-24Q33PBZ.js → chunk-ZEALEXSH.js} +1 -1
- package/Marketplace/{chunk-IXBR3WKA.js → chunk-ZKMREYB7.js} +1 -1
- package/Marketplace/{chunk-4HHY4EKW.js → chunk-ZWW4JHZV.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-ZZ2N25E4.js → main-W5NHRKAQ.js} +2 -2
- package/package.json +1 -1
- package/Marketplace/chunk-45QTRO26.js +0 -278
- package/Marketplace/chunk-4JVYHBV4.js +0 -1
- package/Marketplace/chunk-D7S7RUIP.js +0 -2
- package/Marketplace/chunk-EWWYRIYD.js +0 -1
- package/Marketplace/chunk-FPTGFROB.js +0 -1
- package/Marketplace/chunk-HBSTLOE2.js +0 -5
- package/Marketplace/chunk-JUXE7GQZ.js +0 -1
- package/Marketplace/chunk-O7TI5UYZ.js +0 -2
- package/Marketplace/chunk-YWLXJVUQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as _}from"./chunk-MIMZDUDP.js";import{b as I}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-MIMZDUDP.js";import{b as I}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{c as f}from"./chunk-NNVT5X6O.js";import"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import{e as D}from"./chunk-45DFJJAO.js";import{b,e as E}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as y,C}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as v,Ga as l,Oc as i,Pc as d,bc as c,dc as h,ic as u,jc as e,kc as t,kd as p,ld as g,mb as a,md as x,na as s,zc as S}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function R(r,M){if(r&1&&(e(0,"div",4)(1,"div",7)(2,"div",8)(3,"h5"),i(4,"General"),t()(),e(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",11)(9,"label"),i(10,"Date"),t(),e(11,"div")(12,"span"),i(13),p(14,"date"),t()()()(),e(15,"div",6)(16,"div",11)(17,"label"),i(18,"SKU"),t(),e(19,"div")(20,"span"),i(21),t()()()(),e(22,"div",6)(23,"div",11)(24,"label"),i(25,"Channel"),t(),e(26,"div")(27,"span"),i(28),t()()()(),e(29,"div",6)(30,"div",11)(31,"label"),i(32,"Response Code"),t(),e(33,"div")(34,"span"),i(35),t()()()()()()()()),r&2){let o=S();a(13),d(x(14,4,o.data().Created,"dd MMM yyyy")),a(8),d(o.data().Sku),a(7),d(o.data().ChannelName),a(7),d(o.data().ResponseCode)}}var G=(()=>{class r{constructor(){this.route=s(b),this.http=s(D),this._RawLogService=s(_),this.data=l({Created:"",Sku:"",ChannelName:"",ResponseCode:""}),this.request=l(""),this.response=l(""),this.route.queryParams.subscribe(o=>{this.ID=o.ID,this.Load()})}ngOnInit(){}Load(){var o={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",o).subscribe(n=>{this.data.set({Created:n.hits[0]._source["@timestamp_received"],Sku:n.hits[0]._source.log.sku,ChannelName:n.hits[0]._source.log.channelName,ResponseCode:n.hits[0]._source.log.responseCode}),this.request.set(f.IsNotEmpty(n.hits[0]?._source.log?.request)?JSON.parse(n.hits[0]?._source?.log?.request):""),this.response.set(n.hits[0]._source.log.response)})}static{this.\u0275fac=function(n){return new(n||r)}}static{this.\u0275cmp=v({type:r,selectors:[["app-inventory-detail"]],decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"form-group"],[1,"info-label-group"]],template:function(n,m){n&1&&(e(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Back"),t()(),e(4,"content")(5,"div",2)(6,"div",3),c(7,R,36,7,"div",4),t(),e(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),i(13,"Request"),t()(),e(14,"div",9)(15,"div",4)(16,"div",10)(17,"pre"),i(18),p(19,"json"),t()()()()()(),e(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),i(24,"Response"),t()(),e(25,"div",9)(26,"div",4)(27,"div",10)(28,"pre"),i(29),t()()()()()()()()()()),n&2&&(u("hideSearchBox",!0)("hideSearchDropdown",!0),a(7),h(m.data()?7:-1),a(11),d(g(19,5,m.request())),a(11),d(m.response()))},dependencies:[I,E,C,y],encapsulation:2})}}return r})();export{G as InventoryDetailComponent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as Re}from"./chunk-72AE6737.js";import{a as Pe,b as Le,c as We,d as Be,e as Ne,f as q}from"./chunk-7BEOEYAC.js";import{a as we}from"./chunk-JY726AM5.js";import{c as Oe,d as Me,g as Fe}from"./chunk-TTMPMWUQ.js";import{a as Ve}from"./chunk-QGNTUEVO.js";import{$ as K,A as N,C as be,D as ve,H as Ce,K as Ie,L as Te,S as Ae,aa as z,ba as Ee,e as me,t as _e,v as ge,w as S,x as fe,z as ye}from"./chunk-7KKV4BRH.js";import{e as ke,g as Se,k as xe,s as De}from"./chunk-JUXE7GQZ.js";import{r as ue}from"./chunk-4NAKX6WQ.js";import{$c as de,Ac as re,Bc as V,Ca as w,Cc as ne,Cd as pe,D as O,Dc as le,E as D,Eb as ee,Ec as m,Fb as te,Fc as u,Ga as U,Hd as c,Id as B,Jc as oe,Kb as ie,L as j,Lc as P,Ma as $,Nc as se,Oc as L,Pa as J,Pc as W,X as I,Xb as k,Y as T,Zc as ce,_ as g,bc as A,d as C,dc as E,ic as R,ja as Q,jc as s,kc as p,la as M,lc as ae,mb as h,na as l,sc as F,t as x,td as he,ua as f,va as y,wa as Y,wb as Z,xc as v,y as H,ya as X,zc as b}from"./chunk-ZPV56E2J.js";var Xe=["trigger"],Ue=["panel"],$e=[[["mat-select-trigger"]],"*"],Je=["mat-select-trigger","*"];function Ze(r,_){if(r&1&&(s(0,"span",4),L(1),p()),r&2){let e=b();h(),W(e.placeholder)}}function et(r,_){r&1&&V(0)}function tt(r,_){if(r&1&&(s(0,"span",11),L(1),p()),r&2){let e=b(2);h(),W(e.triggerValue)}}function it(r,_){if(r&1&&(s(0,"span",5),A(1,et,1,0)(2,tt,2,1,"span",11),p()),r&2){let e=b();h(),E(e.customTrigger?1:2)}}function at(r,_){if(r&1){let e=F();s(0,"div",12,1),v("keydown",function(i){f(e);let a=b();return y(a._handleKeydown(i))}),V(2,1),p()}if(r&2){let e=b();se(ce("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme())),P("mat-select-panel-animations-enabled",!e._animationsDisabled),R("ngClass",e.panelClass),k("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var rt=new M("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let r=l(X);return()=>Ae(r)}}),nt=new M("MAT_SELECT_CONFIG"),lt=new M("MatSelectTrigger"),G=class{source;value;constructor(_,e){this.source=_,this.value=e}},Wt=(()=>{class r{_viewportRuler=l(Ie);_changeDetectorRef=l(pe);_elementRef=l(J);_dir=l(be,{optional:!0});_idGenerator=l(ge);_renderer=l(Z);_parentFormField=l(Me,{optional:!0});ngControl=l(Se,{self:!0,optional:!0});_liveAnnouncer=l(_e);_defaultOptions=l(nt,{optional:!0});_animationsDisabled=Ce();_initialized=new C;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let i=this.panel.nativeElement,a=Be(e,this.options,this.optionGroups),n=t._getHostElement();e===0&&a===1?i.scrollTop=0:i.scrollTop=Ne(n.offsetTop,n.offsetHeight,i.scrollTop,i.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new G(this,e)}_scrollStrategyFactory=l(rt);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new C;_errorStateTracker;stateChanges=new C;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=U(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(ke.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=H(()=>{let e=this.options;return e?e.changes.pipe(I(e),T(()=>O(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(T(()=>this.optionSelectionChanges))});openedChange=new w;_openedStream=this.openedChange.pipe(D(e=>e),x(()=>{}));_closedStream=this.openedChange.pipe(D(e=>!e),x(()=>{}));selectionChange=new w;valueChange=new w;constructor(){let e=l(Ve),t=l(xe,{optional:!0}),i=l(De,{optional:!0}),a=l(new he("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Fe(e,this.ngControl,i,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=a==null?0:parseInt(a)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Re(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(g(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(g(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(I(null),g(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let i=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?i.setAttribute("aria-labelledby",e):i.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(j(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&N(this._trackedModal,"aria-owns",t),ye(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;N(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(i),this._cleanupDetach=void 0};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",a=>{a.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),i=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,i=t===40||t===38||t===37||t===39,a=t===13||t===32,n=this._keyManager;if(!n.isTyping()&&a&&!S(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let d=this.selected;n.onKeydown(e);let o=this.selected;o&&d!==o&&this._liveAnnouncer.announce(o.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,a=i===40||i===38,n=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!n&&(i===13||i===32)&&t.activeItem&&!S(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!n&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let d=this.options.some(o=>!o.disabled&&!o.selected);this.options.forEach(o=>{o.disabled||(d?o.select():o.deselect())})}else{let d=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==d&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!S(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(i=>{if(this._selectionModel.isSelected(i))return!1;try{return(i.value!=null||this.canSelectNullableOptions)&&this._compareWith(i.value,e)}catch{return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof K?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new fe(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=O(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(g(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),O(...this.options.map(t=>t._stateChanges)).pipe(g(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let i=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(i!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,i)=>this.sortComparator?this.sortComparator(t,i,e):e.indexOf(t)-e.indexOf(i)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(i=>i.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(e){let t=me(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open())}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=ee({type:r,selectors:[["mat-select"]],contentQueries:function(t,i,a){if(t&1&&ne(a,lt,5)(a,We,5)(a,Le,5),t&2){let n;m(n=u())&&(i.customTrigger=n.first),m(n=u())&&(i.options=n),m(n=u())&&(i.optionGroups=n)}},viewQuery:function(t,i){if(t&1&&le(Xe,5)(Ue,5)(z,5),t&2){let a;m(a=u())&&(i.trigger=a.first),m(a=u())&&(i.panel=a.first),m(a=u())&&(i._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,i){t&1&&v("keydown",function(n){return i._handleKeydown(n)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(k("id",i.id)("tabindex",i.disabled?-1:i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),P("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple)("mat-select-open",i.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",c],disableRipple:[2,"disableRipple","disableRipple",c],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:B(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",c],placeholder:"placeholder",required:[2,"required","required",c],multiple:[2,"multiple","multiple",c],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",c],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",B],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",c]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[de([{provide:Oe,useExisting:r},{provide:Pe,useExisting:r}]),$],ngContentSelectors:Je,decls:11,vars:9,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop","cdkConnectedOverlayUsePopover","inline",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(t,i){if(t&1){let a=F();re($e),s(0,"div",2,0),v("click",function(){return f(a),y(i.open())}),s(3,"div",3),A(4,Ze,2,1,"span",4)(5,it,3,1,"span",5),p(),s(6,"div",6)(7,"div",7),Y(),s(8,"svg",8),ae(9,"path",9),p()()()(),ie(10,at,3,10,"ng-template",10),v("detach",function(){return f(a),y(i.close())})("backdropClick",function(){return f(a),y(i.close())})("overlayKeydown",function(d){return f(a),y(i._handleOverlayKeydown(d))})}if(t&2){let a=oe(1);h(3),k("id",i._valueId),h(),E(i.empty?4:5),h(6),R("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||a)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)}},dependencies:[K,z,ue],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-form-field-animations-enabled .mat-mdc-select-arrow{transition:transform 80ms linear}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}
|
|
1
|
+
import{b as Re}from"./chunk-72AE6737.js";import{a as Pe,b as Le,c as We,d as Be,e as Ne,f as q}from"./chunk-7BEOEYAC.js";import{a as we}from"./chunk-JY726AM5.js";import{c as Oe,d as Me,g as Fe}from"./chunk-TTMPMWUQ.js";import{a as Ve}from"./chunk-QGNTUEVO.js";import{$ as K,A as N,C as be,D as ve,H as Ce,K as Ie,L as Te,S as Ae,aa as z,ba as Ee,e as me,t as _e,v as ge,w as S,x as fe,z as ye}from"./chunk-7KKV4BRH.js";import{e as ke,g as Se,k as xe,s as De}from"./chunk-BUBQQEYA.js";import{r as ue}from"./chunk-4NAKX6WQ.js";import{$c as de,Ac as re,Bc as V,Ca as w,Cc as ne,Cd as pe,D as O,Dc as le,E as D,Eb as ee,Ec as m,Fb as te,Fc as u,Ga as U,Hd as c,Id as B,Jc as oe,Kb as ie,L as j,Lc as P,Ma as $,Nc as se,Oc as L,Pa as J,Pc as W,X as I,Xb as k,Y as T,Zc as ce,_ as g,bc as A,d as C,dc as E,ic as R,ja as Q,jc as s,kc as p,la as M,lc as ae,mb as h,na as l,sc as F,t as x,td as he,ua as f,va as y,wa as Y,wb as Z,xc as v,y as H,ya as X,zc as b}from"./chunk-ZPV56E2J.js";var Xe=["trigger"],Ue=["panel"],$e=[[["mat-select-trigger"]],"*"],Je=["mat-select-trigger","*"];function Ze(r,_){if(r&1&&(s(0,"span",4),L(1),p()),r&2){let e=b();h(),W(e.placeholder)}}function et(r,_){r&1&&V(0)}function tt(r,_){if(r&1&&(s(0,"span",11),L(1),p()),r&2){let e=b(2);h(),W(e.triggerValue)}}function it(r,_){if(r&1&&(s(0,"span",5),A(1,et,1,0)(2,tt,2,1,"span",11),p()),r&2){let e=b();h(),E(e.customTrigger?1:2)}}function at(r,_){if(r&1){let e=F();s(0,"div",12,1),v("keydown",function(i){f(e);let a=b();return y(a._handleKeydown(i))}),V(2,1),p()}if(r&2){let e=b();se(ce("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme())),P("mat-select-panel-animations-enabled",!e._animationsDisabled),R("ngClass",e.panelClass),k("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var rt=new M("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let r=l(X);return()=>Ae(r)}}),nt=new M("MAT_SELECT_CONFIG"),lt=new M("MatSelectTrigger"),G=class{source;value;constructor(_,e){this.source=_,this.value=e}},Wt=(()=>{class r{_viewportRuler=l(Ie);_changeDetectorRef=l(pe);_elementRef=l(J);_dir=l(be,{optional:!0});_idGenerator=l(ge);_renderer=l(Z);_parentFormField=l(Me,{optional:!0});ngControl=l(Se,{self:!0,optional:!0});_liveAnnouncer=l(_e);_defaultOptions=l(nt,{optional:!0});_animationsDisabled=Ce();_initialized=new C;_cleanupDetach;options;optionGroups;customTrigger;_positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}];_scrollOptionIntoView(e){let t=this.options.toArray()[e];if(t){let i=this.panel.nativeElement,a=Be(e,this.options,this.optionGroups),n=t._getHostElement();e===0&&a===1?i.scrollTop=0:i.scrollTop=Ne(n.offsetTop,n.offsetHeight,i.scrollTop,i.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new G(this,e)}_scrollStrategyFactory=l(rt);_panelOpen=!1;_compareWith=(e,t)=>e===t;_uid=this._idGenerator.getId("mat-select-");_triggerAriaLabelledBy=null;_previousControl;_destroy=new C;_errorStateTracker;stateChanges=new C;disableAutomaticLabeling=!0;userAriaDescribedBy;_selectionModel;_keyManager;_preferredOverlayOrigin;_overlayWidth;_onChange=()=>{};_onTouched=()=>{};_valueId=this._idGenerator.getId("mat-select-value-");_scrollStrategy;_overlayPanelClass=this._defaultOptions?.overlayPanelClass||"";get focused(){return this._focused||this._panelOpen}_focused=!1;controlType="mat-select";trigger;panel;_overlayDir;panelClass;disabled=!1;get disableRipple(){return this._disableRipple()}set disableRipple(e){this._disableRipple.set(e)}_disableRipple=U(!1);tabIndex=0;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1;get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get required(){return this._required??this.ngControl?.control?.hasValidator(ke.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}_multiple=!1;disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1;get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}_value;ariaLabel="";ariaLabelledby;get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}typeaheadDebounceInterval;sortComparator;get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}_id;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto";canSelectNullableOptions=this._defaultOptions?.canSelectNullableOptions??!1;optionSelectionChanges=H(()=>{let e=this.options;return e?e.changes.pipe(I(e),T(()=>O(...e.map(t=>t.onSelectionChange)))):this._initialized.pipe(T(()=>this.optionSelectionChanges))});openedChange=new w;_openedStream=this.openedChange.pipe(D(e=>e),x(()=>{}));_closedStream=this.openedChange.pipe(D(e=>!e),x(()=>{}));selectionChange=new w;valueChange=new w;constructor(){let e=l(Ve),t=l(xe,{optional:!0}),i=l(De,{optional:!0}),a=l(new he("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Fe(e,this.ngControl,i,t,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=a==null?0:parseInt(a)||0,this.id=this.id}ngOnInit(){this._selectionModel=new Re(this.multiple),this.stateChanges.next(),this._viewportRuler.change().pipe(g(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(g(this._destroy)).subscribe(e=>{e.added.forEach(t=>t.select()),e.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(I(null),g(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),t=this.ngControl;if(e!==this._triggerAriaLabelledBy){let i=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?i.setAttribute("aria-labelledby",e):i.removeAttribute("aria-labelledby")}t&&(this._previousControl!==t.control&&(this._previousControl!==void 0&&t.disabled!==null&&t.disabled!==this.disabled&&(this.disabled=t.disabled),this._previousControl=t.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._cleanupDetach?.(),this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._cleanupDetach?.(),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._overlayDir.positionChange.pipe(j(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()}),this._overlayDir.attachOverlay(),this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!0)))}_trackedModal=null;_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let t=`${this.id}-panel`;this._trackedModal&&N(this._trackedModal,"aria-owns",t),ye(e,"aria-owns",t),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;N(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._exitAndDetach(),this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next(),Promise.resolve().then(()=>this.openedChange.emit(!1)))}_exitAndDetach(){if(this._animationsDisabled||!this.panel){this._detachOverlay();return}this._cleanupDetach?.(),this._cleanupDetach=()=>{t(),clearTimeout(i),this._cleanupDetach=void 0};let e=this.panel.nativeElement,t=this._renderer.listen(e,"animationend",a=>{a.animationName==="_mat-select-exit"&&(this._cleanupDetach?.(),this._detachOverlay())}),i=setTimeout(()=>{this._cleanupDetach?.(),this._detachOverlay()},200);e.classList.add("mat-select-panel-exit")}_detachOverlay(){this._overlayDir.detachOverlay(),this._changeDetectorRef.markForCheck()}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let t=e.keyCode,i=t===40||t===38||t===37||t===39,a=t===13||t===32,n=this._keyManager;if(!n.isTyping()&&a&&!S(e)||(this.multiple||e.altKey)&&i)e.preventDefault(),this.open();else if(!this.multiple){let d=this.selected;n.onKeydown(e);let o=this.selected;o&&d!==o&&this._liveAnnouncer.announce(o.viewValue,1e4)}}_handleOpenKeydown(e){let t=this._keyManager,i=e.keyCode,a=i===40||i===38,n=t.isTyping();if(a&&e.altKey)e.preventDefault(),this.close();else if(!n&&(i===13||i===32)&&t.activeItem&&!S(e))e.preventDefault(),t.activeItem._selectViaInteraction();else if(!n&&this._multiple&&i===65&&e.ctrlKey){e.preventDefault();let d=this.options.some(o=>!o.disabled&&!o.selected);this.options.forEach(o=>{o.disabled||(d?o.select():o.deselect())})}else{let d=t.activeItemIndex;t.onKeydown(e),this._multiple&&a&&e.shiftKey&&t.activeItem&&t.activeItemIndex!==d&&t.activeItem._selectViaInteraction()}}_handleOverlayKeydown(e){e.keyCode===27&&!S(e)&&(e.preventDefault(),this.close())}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(t=>t.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(t=>this._selectOptionByValue(t)),this._sortValues();else{let t=this._selectOptionByValue(e);t?this._keyManager.updateActiveItem(t):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let t=this.options.find(i=>{if(this._selectionModel.isSelected(i))return!1;try{return(i.value!=null||this.canSelectNullableOptions)&&this._compareWith(i.value,e)}catch{return!1}});return t&&this._selectionModel.select(t),t}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_skipPredicate=e=>this.panelOpen?!1:e.disabled;_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof K?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new fe(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=O(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(g(e)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),O(...this.options.map(t=>t._stateChanges)).pipe(g(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,t){let i=this._selectionModel.isSelected(e);!this.canSelectNullableOptions&&e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(i!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),t&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),t&&this.focus())),i!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((t,i)=>this.sortComparator?this.sortComparator(t,i,e):e.indexOf(t)-e.indexOf(i)),this.stateChanges.next()}}_propagateChanges(e){let t;this.multiple?t=this.selected.map(i=>i.value):t=this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this._onChange(t),this.selectionChange.emit(this._getChangeEvent(t)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let t=0;t<this.options.length;t++)if(!this.options.get(t).disabled){e=t;break}this._keyManager.setActiveItem(e)}else this._keyManager.setActiveItem(this._selectionModel.selected[0])}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0&&!!this._overlayDir}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||"";return this.ariaLabelledby&&(e+=" "+this.ariaLabelledby),e||(e=this._valueId),e}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(e){let t=me(e);t&&(t.tagName==="MAT-OPTION"||t.classList.contains("cdk-overlay-backdrop")||t.closest(".mat-mdc-select-panel"))||(this.focus(),this.open())}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=ee({type:r,selectors:[["mat-select"]],contentQueries:function(t,i,a){if(t&1&&ne(a,lt,5)(a,We,5)(a,Le,5),t&2){let n;m(n=u())&&(i.customTrigger=n.first),m(n=u())&&(i.options=n),m(n=u())&&(i.optionGroups=n)}},viewQuery:function(t,i){if(t&1&&le(Xe,5)(Ue,5)(z,5),t&2){let a;m(a=u())&&(i.trigger=a.first),m(a=u())&&(i.panel=a.first),m(a=u())&&(i._overlayDir=a.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:21,hostBindings:function(t,i){t&1&&v("keydown",function(n){return i._handleKeydown(n)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),t&2&&(k("id",i.id)("tabindex",i.disabled?-1:i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),P("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple)("mat-select-open",i.panelOpen))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",c],disableRipple:[2,"disableRipple","disableRipple",c],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:B(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",c],placeholder:"placeholder",required:[2,"required","required",c],multiple:[2,"multiple","multiple",c],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",c],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",B],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth",canSelectNullableOptions:[2,"canSelectNullableOptions","canSelectNullableOptions",c]},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[de([{provide:Oe,useExisting:r},{provide:Pe,useExisting:r}]),$],ngContentSelectors:Je,decls:11,vars:9,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop","cdkConnectedOverlayUsePopover","inline",3,"detach","backdropClick","overlayKeydown","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","cdkConnectedOverlayFlexibleDimensions"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(t,i){if(t&1){let a=F();re($e),s(0,"div",2,0),v("click",function(){return f(a),y(i.open())}),s(3,"div",3),A(4,Ze,2,1,"span",4)(5,it,3,1,"span",5),p(),s(6,"div",6)(7,"div",7),Y(),s(8,"svg",8),ae(9,"path",9),p()()()(),ie(10,at,3,10,"ng-template",10),v("detach",function(){return f(a),y(i.close())})("backdropClick",function(){return f(a),y(i.close())})("overlayKeydown",function(d){return f(a),y(i._handleOverlayKeydown(d))})}if(t&2){let a=oe(1);h(3),k("id",i._valueId),h(),E(i.empty?4:5),h(6),R("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||a)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)("cdkConnectedOverlayFlexibleDimensions",!0)}},dependencies:[K,z,ue],styles:[`@keyframes _mat-select-enter{from{opacity:0;transform:scaleY(0.8)}to{opacity:1;transform:none}}@keyframes _mat-select-exit{from{opacity:1}to{opacity:0}}.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-disabled .mat-mdc-select-placeholder{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-select-open .mat-mdc-select-arrow{transform:rotate(180deg)}.mat-form-field-animations-enabled .mat-mdc-select-arrow{transition:transform 80ms linear}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:relative;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-select-panel-animations-enabled{animation:_mat-select-enter 120ms cubic-bezier(0, 0, 0.2, 1)}.mat-select-panel-animations-enabled.mat-select-panel-exit{animation:_mat-select-exit 100ms linear}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field:not(.mat-form-field-animations-enabled) .mat-mdc-select-placeholder,._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return r})();var Bt=(()=>{class r{static \u0275fac=function(t){return new(t||r)};static \u0275mod=te({type:r});static \u0275inj=Q({imports:[Ee,q,ve,Te,we,q]})}return r})();export{Wt as a,Bt as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-2GINYFUG.js";import{b as ce}from"./chunk-RBYZVK4L.js";import{a as re,b as de,c as O,d as le,j as h}from"./chunk-
|
|
1
|
+
import{a as pe}from"./chunk-2GINYFUG.js";import{b as ce}from"./chunk-RBYZVK4L.js";import{a as re,b as de,c as O,d as le,j as h}from"./chunk-625TQFQL.js";import{a as oe,c as A}from"./chunk-EDNKI3WA.js";import{a as ie,b as V,c as ae,d as F}from"./chunk-CM45JN3C.js";import{a as ne,b as H}from"./chunk-A32JPG5P.js";import{a as S}from"./chunk-JY726AM5.js";import{a as W,b as X,f as Z}from"./chunk-TTMPMWUQ.js";import{c as ee}from"./chunk-NNVT5X6O.js";import{a as te}from"./chunk-BUBQQEYA.js";import{F as T,z as Q}from"./chunk-4NAKX6WQ.js";import{$c as U,Cd as K,Eb as v,Fb as w,Jc as x,Kc as Y,Ma as P,Oc as R,Pc as z,Xb as j,Yc as $,_ as N,bc as f,d as B,dc as u,e as I,ia as L,ic as _,ja as y,jc as o,kc as c,kd as G,lc as C,ld as q,mb as l,na as p,sc as M,ua as r,va as d,vd as J,wd as s,xc as m,zc as k}from"./chunk-ZPV56E2J.js";var E=(()=>{class t{constructor(){this._calendarHeaderConfig=new I({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var he=["class","component ts"];function ge(t,D){if(t&1){let e=M();o(0,"button",2),m("click",function(){r(e);let a=k(2);return d(a.todayClicked())}),C(1,"i",3),c()}}function _e(t,D){if(t&1){let e=M();o(0,"button",4),m("click",function(){r(e);let a=k(2);return d(a.clearClicked())}),C(1,"i",5),c()}}function Ce(t,D){if(t&1&&(f(0,ge,2,0,"button",0),f(1,_e,2,0,"button",1)),t&2){let e=D;u(e.hideBtnToday?-1:0),l(),u(e.hideBtnClear?-1:1)}}var me=(()=>{class t{constructor(){this._datePicker=p(O),this._calendar=p(de),this._dateAdapter=p(V),this.calendarService=p(E),this._destroyed=new B;let e=this._calendar,i=p(K);e.stateChanges.pipe(N(this._destroyed)).subscribe(a=>i.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(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["POS-DatepickerHeader",8,"component","ts"]],standalone:!1,features:[P],attrs:he,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(i,a){if(i&1&&(o(0,"mat-calendar-header"),f(1,Ce,2,2),G(2,"async"),c()),i&2){let n;l(),u((n=q(2,1,a.calendarConfig$))?1:-1,n)}},dependencies:[oe,re,Q],encapsulation:2})}}return t})(),fe=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=y({providers:[h],imports:[T,A,F,h,S,H]})}}return t})();function Me(t,D){if(t&1&&(o(0,"mat-label",2)(1,"span"),R(2),c()()),t&2){let e=k();_("show",e.placeholder),l(2),z(e.placeholder)}}var ke={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"dddd, D MMMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"dddd, D MMMM YYYY",monthYearA11yLabel:"MMMM YYYY"}},rt=(()=>{class t{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let i=null;e&&(i=e.toDate(),i.setHours(0,0,0,0)),this.onChange(i),this.dateChange.emit(i)}constructor(){this.calendarService=p(E),this.headerComponent=me,this.data_cy=s(void 0),this.appearance=s("outline"),this.width=s(void 0),this.isFloatingLabel=s(!0),this.disabled=!1,this.readOnly=s(!1),this.minDateValidation=s(void 0),this.maxDateValidation=s(void 0),this.dateChange=J(),this.minDate=ee.MinDate,this.onChange=e=>{},this.displayToggle=!0}writeValue(e){this.date=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,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:[U([{provide:V,useClass:pe,deps:[ie]},{provide:ae,useValue:ke},{provide:te,multi:!0,useExisting:t}])],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(i,a){if(i&1){let n=M();o(0,"mat-form-field",1),f(1,Me,3,2,"mat-label",2),o(2,"input",3),m("dateChange",function(g){return r(n),d(a.change(g.value))})("click",function(){r(n);let g=x(6);return d(g.open())}),c(),o(3,"span",4),m("click",function(){r(n);let g=x(6);return d(g.open())}),C(4,"i",5),c(),o(5,"mat-datepicker",6,0),m("opened",function(){return r(n),d(a.onOpenDatepicker())})("closed",function(){return r(n),d(a.onCloseDatepicker())}),c()()}if(i&2){let n=x(6);Y("width",a.width()||100,"%"),_("disabled",a.disabled)("appearance",a.appearance()),l(),u(a.isFloatingLabel()&&a.placeholder?1:-1),l(),_("placeholder",$(a.placeholder||""))("matDatepicker",n)("min",a.minDateValidation())("max",a.maxDateValidation())("value",a.date==a.minDate?null:a.date)("disabled",a.disabled)("readonly",a.readOnly()),j("data-cy",a.data_cy()),l(),Y("display",a.displayToggle?"unset":"none"),l(2),_("calendarHeaderComponent",a.headerComponent)}},dependencies:[O,le,Z,W,X,ne],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,changeDetection:0})}}return t})(),dt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=w({type:t})}static{this.\u0275inj=y({providers:[h],imports:[T,A,F,h,S,H,fe,ce]})}}return t})();export{ke as a,rt as b,dt as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as q}from"./chunk-4XJV3CJ7.js";import{a as O,b as H}from"./chunk-
|
|
1
|
+
import{a as q}from"./chunk-4XJV3CJ7.js";import{a as O,b as H}from"./chunk-ZEALEXSH.js";import{a as x}from"./chunk-J5PTSESV.js";import"./chunk-26I3WOHT.js";import"./chunk-72AE6737.js";import"./chunk-ACIMXBIC.js";import{b as J}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-2GINYFUG.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-BXA5YUTN.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import{c as w,h as B,m as N,z as $}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-45DFJJAO.js";import{e as R,g as k}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{B as D,D as T,z as A}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as b,Ga as S,Nc as E,Oc as a,Qc as c,V as C,ad as P,bd as F,fc as I,gc as M,hc as L,ic as m,jc as n,kc as i,kd as s,ld as g,mb as r,md as h,na as _,t as f,xc as d}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import{a as y,b as v}from"./chunk-66YHNWRR.js";var j=()=>["/menu/log/inventory/detail"],V=l=>({ID:l});function G(l,z){if(l&1&&(n(0,"tr")(1,"td")(2,"a",17),a(3),s(4,"date"),i()(),n(5,"td"),a(6),s(7,"number"),i(),n(8,"td")(9,"span",18),a(10),i()()()),l&2){let t=z.$implicit;r(2),m("routerLink",P(13,j))("queryParams",F(14,V,t._id)),r(),c(" ",h(4,7,t==null?null:t._source["@timestamp"],"dd MMM yyyy HH:mm:ss")," "),r(3),c("",h(7,10,t.DurationInSecond,"1.1-1")," s"),r(3),E((t==null?null:t.respCode)===200||(t==null?null:t.respCode)===202?"bg-success":"bg-warning"),r(),c(" ",t==null?null:t.respCode," ")}}var me=(()=>{class l{constructor(){this.inventoryAsyncServiceLog=_(q),this.filters=S({PageNumber:1,RowCount:100,From:null,To:null,StatusCode:"",JobID:""})}ngOnInit(){this.initInventoryLog()}initInventoryLog(){let t=this.inventoryAsyncServiceLog.getInventoryAsyncLog(this.filters()).pipe(C(1));this.inventoryLog$=t.pipe(f(o=>o?.hits)),this.totalPagination$=t.pipe(f(o=>o?.total.value))}onPaginationChange(t){this.filters.update(o=>v(y({},o),{PageNumber:t.pageIndex+1})),this.initInventoryLog()}onSubmitFilter(){this.initInventoryLog()}updateFilter(t,o){this.filters.update(e=>v(y({},e),{[t]:o}))}static{this.\u0275fac=function(o){return new(o||l)}}static{this.\u0275cmp=b({type:l,selectors:[["app-inventory-async-log"]],decls:43,vars:16,consts:[["headerTitle","Order Inventory Sync Job",3,"onSubmit","hideSearchBox"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"mt-5"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","JobID",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(o,e){o&1&&(n(0,"mainpanel",0),d("onSubmit",function(){return e.onSubmitFilter()}),n(1,"actions")(2,"a",1),a(3," Channel Inventory Sync "),i()(),n(4,"filters")(5,"div",2)(6,"div")(7,"label",3),a(8,"From/To"),i(),n(9,"div",4)(10,"datepicker",5),d("dateChange",function(p){return e.updateFilter("From",p)}),i()(),n(11,"div")(12,"datepicker",6),d("dateChange",function(p){return e.updateFilter("To",p)}),i()()(),n(13,"div",7)(14,"label"),a(15,"Response Code"),i(),n(16,"input",8),d("ngModelChange",function(p){return e.updateFilter("StatusCode",p)}),i()(),n(17,"div",7)(18,"label"),a(19,"JobID"),i(),n(20,"input",9),d("ngModelChange",function(p){return e.updateFilter("JobID",p)}),i()()()(),n(21,"content")(22,"div",10)(23,"div",11)(24,"div",12)(25,"div",13)(26,"table",14)(27,"thead")(28,"tr",15)(29,"th"),a(30,"Created"),i(),n(31,"th"),a(32,"Duration"),i(),n(33,"th"),a(34,"Response code"),i()()(),n(35,"tbody"),M(36,G,11,16,"tr",null,I),s(38,"async"),i()(),n(39,"mat-paginator",16),s(40,"async"),s(41,"async"),s(42,"async"),d("page",function(p){return e.onPaginationChange(p)}),i()()()()()()()),o&2&&(m("hideSearchBox",!0),r(10),m("date",e.filters().From),r(2),m("date",e.filters().To),r(4),m("ngModel",e.filters().StatusCode),r(4),m("ngModel",e.filters().JobID),r(16),L(g(38,8,e.inventoryLog$)),r(3),m("length",g(40,10,e.totalPagination$))("pageSize",e.filters().RowCount>g(41,12,e.totalPagination$)?g(42,14,e.totalPagination$):e.filters().RowCount)("pageIndex",e.filters().PageNumber==0?0:e.filters().PageNumber-1))},dependencies:[$,w,B,N,J,H,O,x,k,R,A,D,T],encapsulation:2})}}return l})();export{me as InventoryAsyncLogComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Kt}from"./chunk-XXK374KV.js";import"./chunk-EN7FW6EW.js";import{a as Wt,b as Yt}from"./chunk-KAO5YCJZ.js";import{b as jt}from"./chunk-VGNEDVS5.js";import"./chunk-WXQUJZQY.js";import{a as Gt}from"./chunk-HI5QPKQM.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-FQLAWEGT.js";import{a as Bt}from"./chunk-YWLXJVUQ.js";import{a as lt,b as $t,c as Rt,d as ct,e as st}from"./chunk-TBQAAZKJ.js";import"./chunk-GIPWMAZL.js";import"./chunk-7ES2Z445.js";import{a as Lt}from"./chunk-WTUKJT4T.js";import"./chunk-RG24XPVA.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6V4QU6J7.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-DAGGBVVW.js";import"./chunk-ACIMXBIC.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import{d as L,e as $}from"./chunk-ZZ7HSVKU.js";import{b as wt}from"./chunk-N54LZIRM.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import{a as Ut}from"./chunk-RDXDKWLL.js";import{b as Ht,c as Xt}from"./chunk-GO5WQM2U.js";import"./chunk-2GINYFUG.js";import"./chunk-RBYZVK4L.js";import"./chunk-RMWAYIJL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-MOG4SYJE.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import{b as Vt}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-ZSUWHVKX.js";import"./chunk-ZVCNMOKL.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import{b as _t,c as f}from"./chunk-NNVT5X6O.js";import{A as Z,B as w,c as z,e as ot,h as U,i as G,l as at,m as Et,n as j,q as kt,r as W,s as Y,t as Ot,u as Dt,v as Mt,z as H}from"./chunk-JUXE7GQZ.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as Nt,e as Q}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{z as S}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as x,Eb as T,I as xt,K as St,Ma as O,Oc as _,Pc as nt,Qc as K,Sc as At,Tc as Ft,Uc as Pt,V as q,X as It,_ as ut,aa as P,ad as rt,bc as h,d as Tt,dc as C,ec as D,gc as M,hc as V,ia as N,ic as p,jc as s,kc as l,kd as y,lc as u,ld as v,mb as m,na as d,sc as B,t as F,ua as E,va as k,vd as A,wd as g,xc as I,zc as a}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var X=(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})(X||{});var tt=(function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e})(tt||{});var et=(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})(et||{});var ft=class extends at{setValue(c,t){if(c instanceof Date){let i=Math.floor(c.getTime()/1e3);super.setValue(i,t)}else super.setValue(c,t)}},ht=(()=>{class e{constructor(){this.shopeeUploadService=d(lt),this.formBuilder=d(H)}getAttributes(t){return this.shopeeUploadService.getAttributes(t.channelId,t.categoryId).pipe(F(i=>this.setLabelToIndonesian(i)))}setLabelToIndonesian(t=[]){let i,n;return t=t.map(o=>(i=o?.multi_lang?.find(r=>r.language=="id"),o.attribute_value_list=o?.attribute_value_list?.map(r=>(n=r?.multi_lang?.find(b=>b.language=="id"),r.name=n?.value,r)),o.name=i?.value?i?.value:o.name,o)),t}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{if(n=[],o.mandatory&&n.push(ot.required),o?.attribute_info?.format_type==tt.FORMAT_QUANTITATIVE_WITH_UNIT&&o?.attribute_info?.input_type==X.FREE_TEXT_FILED){let r=this.formBuilder.group({unit:new at(null),value:new at(null,n)});i.addControl(JSON.stringify(o.attribute_id),r)}else o?.attribute_info?.input_type==X.FREE_TEXT_FILED&&o?.attribute_info?.input_validation_type==et.VALIDATOR_DATE_TYPE?i.addControl(JSON.stringify(o.attribute_id),new ft(null,n)):i.addControl(JSON.stringify(o.attribute_id),this.formBuilder.control(null,n))}),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(b=>o.findIndex(dt=>parseInt(dt)==b.attribute_id||b.mandatory)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>{switch(o.attribute_info.input_type){case X.MULTI_COMBO_BOX:f.IsNotEmpty(i[o.attribute_id])?o.attribute_value_list=o.attribute_value_list.filter(r=>i[o.attribute_id]?.findIndex(b=>b==r.value_id)!=-1):o.attribute_value_list=[];break;case X.FREE_TEXT_FILED:o.attribute_info.format_type==tt.FORMAT_QUANTITATIVE_WITH_UNIT?o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]?.value,i[o.attribute_id]?.unit):o.attribute_info.input_validation_type==et.VALIDATOR_DATE_TYPE?o.attribute_value_list=this.setSelectedDateAttr(i[o.attribute_id]):o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]);break;default:o.attribute_value_list=o.attribute_value_list.filter(r=>r.value_id==i[o.attribute_id])}return o}).filter(o=>o?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(t,i){let n=[];if(f.IsNotEmpty(t)){let o={value_id:0,original_value_name:JSON.stringify(t)};f.IsNotEmpty(i)&&(o.value_unit=i),n=[o]}return n}setSelectedDateAttr(t){let i=[];return f.IsNotEmpty(t)&&(i=[{value_id:0,original_value_name:JSON.stringify(t)}]),i}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();var Ct=()=>[];function te(e,c){e&1&&(s(0,"span",4),_(1,"*"),l())}function ee(e,c){if(e&1&&u(0,"ng-select",5),e&2){let t=a().$implicit;p("multiple",!0)("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:rt(4,Ct))("placeholder","Pilih "+(t==null?null:t.name))}}function ie(e,c){if(e&1&&u(0,"input",7),e&2){let t=a(2).$implicit;p("formControlName",t.attribute_id)("placeholder","Isi "+(t==null?null:t.name))}}function oe(e,c){if(e&1&&(s(0,"option",14),_(1),l()),e&2){let t=c.$implicit;p("value",t),m(),nt(t)}}function ne(e,c){if(e&1&&(s(0,"div",9),u(1,"input",11),s(2,"select",12)(3,"option",13),_(4,"Unit"),l(),M(5,oe,2,2,"option",14,D),l()()),e&2){let t=a(3).$implicit;p("formGroupName",t.attribute_id),m(),p("placeholder","Isi "+(t==null?null:t.name)),m(2),p("value",null),m(2),V(t==null||t.attribute_info==null?null:t.attribute_info.attribute_unit_list)}}function re(e,c){if(e&1&&u(0,"input",10),e&2){let t=a(3).$implicit;p("formControlName",t.attribute_id)("placeholder","Isi "+(t==null?null:t.name))}}function ae(e,c){if(e&1&&h(0,ne,7,3,"div",9)(1,re,1,2,"input",10),e&2){let t=a(2).$implicit,i=a(2);C((t==null||t.attribute_info==null?null:t.attribute_info.format_type)==i.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function le(e,c){if(e&1&&u(0,"datepicker",8),e&2){let t=a(2).$implicit;p("formControlName",t.attribute_id)}}function ce(e,c){if(e&1&&h(0,ie,1,2,"input",7)(1,ae,2,1)(2,le,1,1,"datepicker",8),e&2){let t,i=a().$implicit,n=a(2);C((t=i==null||i.attribute_info==null?null:i.attribute_info.input_validation_type)===n.validationType.VALIDATOR_STRING_TYPE?0:t===n.validationType.VALIDATOR_FLOAT_TYPE?1:t===n.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function se(e,c){if(e&1&&u(0,"ng-select",6),e&2){let t=a().$implicit;p("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:rt(3,Ct))("placeholder","Pilih "+(t==null?null:t.name))}}function me(e,c){if(e&1&&u(0,"ng-select",6),e&2){let t=a().$implicit;p("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:rt(3,Ct))("placeholder","Pilih "+(t==null?null:t.name))}}function pe(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),h(2,te,2,0,"span",4),s(3,"span"),_(4),l()(),h(5,ee,1,5,"ng-select",5)(6,ce,3,1)(7,se,1,4,"ng-select",6)(8,me,1,4,"ng-select",6),l()),e&2){let t,i=c.$implicit,n=a(2);m(2),C(i.mandatory?2:-1),m(2),K(" ",i==null?null:i.name," "),m(),C((t=i==null||i.attribute_info==null?null:i.attribute_info.input_type)===n.inputType.MULTI_COMBO_BOX?5:t===n.inputType.FREE_TEXT_FILED?6:t===n.inputType.SINGLE_COMBO_BOX?7:8)}}function de(e,c){if(e&1&&(s(0,"form",0)(1,"div",1),M(2,pe,9,3,"div",2,D),l()()),e&2){let t=a();p("formGroup",t.form),m(2),V(c)}}var Jt=(()=>{class e{constructor(){this.formCategoryService=d(ht),this.channelType=g(void 0),this.categoryId=g(void 0),this.channelId=g(void 0),this.channelProductUpload=g(void 0),this.attributesChanges=A(),this.inputType=X,this.formatType=tt,this.validationType=et}ngOnChanges(){let t=this.categoryId(),i=this.channelId();f.IsNotEmpty(t)&&f.IsNotEmpty(i)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:t,channelId:i,channelType:this.channelType()}).pipe(P(n=>{this.form=this.formCategoryService.createFormGroup(n),this.listenToFormChange(n)}),q(1)))}listenToFormChange(t){let i=[];this.formSubscription=this.form.valueChanges.subscribe(n=>{i=this.formCategoryService.getFilteredAttributes(t,n),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["shopee-attribute-form"]],inputs:{channelType:[1,"channelType"],categoryId:[1,"categoryId"],channelId:[1,"channelId"],channelProductUpload:[1,"channelProductUpload"]},outputs:{attributesChanges:"attributesChanges"},features:[x([ht]),O],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(i,n){if(i&1&&(h(0,de,4,1,"form",0),y(1,"async")),i&2){let o;C((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[$,L,w,j,Dt,Mt,z,Ot,U,G,Y,W,kt,Lt,Xt,Ht,S],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}"],changeDetection:0})}}return e})();var J=(function(e){return e.TIKTOK_SHOP="TIKTOK_SHOP",e.TOKOPEDIA="TOKOPEDIA",e})(J||{});var gt=(()=>{class e{constructor(){this.httpService=d(Q),this.formBuilder=d(H),this.uploadProductService=d(st)}getAttributes(t,i){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:i}]).pipe(xt(o=>this.uploadProductService.selectedProduct$.pipe(F(r=>(o=this.mappingAttributeSalesProperty(o,r),o)))))}mappingAttributeSalesProperty(t,i){let n=0;return t.filter(o=>(o.type=="SALES_PROPERTY"&&(n+=1),n>1?(n=0,!1):!0)).map(o=>(o.type=="SALES_PROPERTY"&&(o.name="Jenis Variant",o.is_multiple_selection=!1,o.is_required=this.isProductHasMoreVariant(i),o.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),o))}isProductHasMoreVariant(t){let i=!1,n=[];return t.forEach(o=>{o.Variants&&n.push(o.Variants.length)}),i=n.some(o=>o>1),i}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{n=[],o.is_required&&n.push(ot.required),i.addControl(o.id,this.formBuilder.control(null,n))}),i.addControl("listingPlatform",this.formBuilder.control([J.TIKTOK_SHOP,J.TOKOPEDIA],[ot.required])),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(b=>o.findIndex(dt=>parseInt(dt)==b.id)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>(f.IsNotEmpty(o.values)?o.is_multiple_selection?o.values=o.values.filter(r=>i[o.id]?.includes(r.id)):o.values=o.values.filter(r=>r.id==i[o.id]):i[o.id]&&(o.values=[{id:null,name:i[o.id]}]),o)).filter(o=>o?.values?.length>0)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();function ue(e,c){e&1&&(s(0,"small",5),_(1," Platform is required "),l())}function _e(e,c){e&1&&(s(0,"span",5),_(1,"*"),l())}function fe(e,c){if(e&1&&u(0,"ng-select",6),e&2){let t=a().$implicit;p("multiple",!0)("formControlName",t.id)("items",t.values)("placeholder","Pilih "+(t==null?null:t.name))}}function he(e,c){if(e&1&&u(0,"ng-select",7),e&2){let t=a().$implicit;p("formControlName",t.id)("items",t.values)("placeholder","Pilih "+(t==null?null:t.name))}}function Ce(e,c){if(e&1&&u(0,"input",8),e&2){let t=a().$implicit;p("formControlName",t.id)("placeholder",t==null?null:t.name)}}function ge(e,c){if(e&1&&(s(0,"small",5),_(1),l()),e&2){let t=a().$implicit;m(),K(" ",t==null?null:t.name," is mandatory ")}}function be(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),h(2,_e,2,0,"span",5),s(3,"span"),_(4),l()(),h(5,fe,1,4,"ng-select",6)(6,he,1,3,"ng-select",7)(7,Ce,1,2,"input",8),h(8,ge,2,1,"small",5),l()),e&2){let t=c.$implicit;m(2),C(t.is_required?2:-1),m(2),K(" ",t==null?null:t.name," "),m(),C(t.is_multiple_selection?5:t.values!==null&&t.values.length>0?6:7),m(3),C(t.is_required?8:-1)}}function ye(e,c){if(e&1&&(s(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),_(5," Platform Options"),l()(),u(6,"ng-select",4),h(7,ue,2,0,"small",5),l(),M(8,be,9,4,"div",2,D),l()()),e&2){let t,i=a();p("formGroup",i.form),m(6),p("multiple",!0)("items",i.platformOptions)("clearable",!1),m(),C(!(i.form==null||(t=i.form.get("listingPlatform").errors)==null)&&t.required?7:-1),m(),V(c)}}var qt=(()=>{class e{constructor(){this.tiktokAttributeFormService=d(gt),this.channelId=g(void 0),this.categoryId=g(void 0),this.platformChange=A({alias:"onPlatformChanges"}),this.formSubscription=new Tt,this.attributesChanges=A(),this.platformOptions=[{label:"TikTok Shop",value:J.TIKTOK_SHOP},{label:"Tokopedia",value:J.TOKOPEDIA}]}ngOnChanges(){let t=this.categoryId(),i=this.channelId();f.IsNotEmpty(t)&&f.IsNotEmpty(i)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(i,t).pipe(F(n=>n.filter(o=>!(o.type=="PRODUCT_PROPERTY"&&(f.IsEmpty(o.values)||o.values?.length==0)&&o.is_customizable==!1))),P(n=>{this.form=this.tiktokAttributeFormService.createFormGroup(n),this.listenToFormChange(n)}),q(1)))}listenToFormChange(t){let i=[];this.form.valueChanges.pipe(ut(this.formSubscription)).subscribe(n=>{delete n.listingPlatform,i=this.tiktokAttributeFormService.getFilteredAttributes(t,n),this.attributesChanges.emit(i)}),this.form.get("listingPlatform").valueChanges.pipe(It(this.form.get("listingPlatform").value),ut(this.formSubscription)).subscribe(n=>{this.platformChange.emit(n)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["tiktok-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{platformChange:"onPlatformChanges",attributesChanges:"attributesChanges"},features:[x([gt]),O],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(i,n){if(i&1&&(h(0,ye,10,5,"form",0),y(1,"async")),i&2){let o;C((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[$,L,w,j,z,U,G,Y,W,Z,S],encapsulation:2,changeDetection:0})}}return e})();var bt=(()=>{class e{constructor(){this.woocommerceUploadService=d(ct)}getAttributes(t,i){return this.woocommerceUploadService.getAttributes(t,i).pipe(F(n=>n.map(o=>({key:o.name,label:o.name}))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();var Qt=(()=>{class e{constructor(){this.wooAttributeFormService=d(bt),this.channelId=g(),this.categoryId=g(),this.attributesChanges=A()}ngOnChanges(){f.IsNotEmpty(this.categoryId())&&f.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(t){this.attributesChanges.emit([t.key])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[x([bt]),O],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(i,n){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),_(3,"Atribut"),l(),s(4,"ng-select",3),y(5,"async"),I("change",function(r){return n.onSelectAttribute(r)}),l()()()),i&2&&(m(4),p("items",v(5,1,n.attributes$)))},dependencies:[Z,$,L,w,S],encapsulation:2,changeDetection:0})}}return e})();var yt=(()=>{class e{constructor(){this.httpService=d(Q),this.formBuilder=d(H)}getAttributes(t,i){return this.httpService.get("api/product/tokopedia/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:i}]).pipe(F(o=>o))}createFormGroup(t){let i=this.formBuilder.group({});return t.forEach(n=>{i.addControl(n.variant,this.formBuilder.control(null))}),i}convertAttributes(t={}){return Object.values(t).filter(n=>n!==null).map(n=>JSON.stringify(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();function ve(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),_(2),l(),u(3,"ng-select",4),l()),e&2){let t=c.$implicit;m(2),K(" ",t==null?null:t.variant," "),m(),p("formControlName",t.variant)("items",t.values)("placeholder","Pilih "+(t==null?null:t.variant))}}function Te(e,c){if(e&1&&(s(0,"form",0)(1,"div",1),M(2,ve,4,4,"div",2,D),l()()),e&2){let t=a();p("formGroup",t.form),m(2),V(c)}}var zt=(()=>{class e{constructor(){this.tokpedAttrFormService=d(yt),this.channelId=g(void 0),this.categoryId=g(void 0),this.attributesChanges=A()}ngOnChanges(t){let i=this.categoryId(),n=this.channelId();f.IsNotEmpty(i)&&f.IsNotEmpty(n)&&(this.attributes$=this.tokpedAttrFormService.getAttributes(n,i).pipe(P(o=>{this.form=this.tokpedAttrFormService.createFormGroup(o),this.listenToFormChange()})))}listenToFormChange(){let t=[];this.formSubscription=this.form.valueChanges.subscribe(i=>{t=this.tokpedAttrFormService.convertAttributes(i),this.attributesChanges.emit(t)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["tokopedia-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[x([yt]),O],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(i,n){if(i&1&&(h(0,Te,4,1,"form",0),y(1,"async")),i&2){let o;C((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[$,L,w,j,U,G,Y,W,S],encapsulation:2,changeDetection:0})}}return e})();var vt=(()=>{class e{constructor(){this.httpService=d(Q),this.formBuilder=d(H)}getAttributes(t){return this.httpService.get("api/product/ShopifyV2/GetAttributes",[{key:"ID",value:t}]).pipe(P(n=>(n.Options.StatusOptions=n.Options.Status.map(o=>({id:o,name:o})),n)))}createFormGroup(t){let i=this.formBuilder.group({});return Object.keys(t.Attribute).forEach(o=>{i.addControl(o,this.formBuilder.control(null))}),i}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();function xe(e,c){if(e&1&&(s(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3),_(4," Brand "),l(),u(5,"input",4),l(),s(6,"div",5)(7,"div",3),_(8," Product Type "),l(),u(9,"input",6),l(),s(10,"div",5)(11,"div",3),_(12," Status "),l(),u(13,"ng-select",7),l()()()),e&2){let t=a();p("formGroup",t.form),m(13),p("items",c.Options.StatusOptions)}}var Zt=(()=>{class e{constructor(){this.channelId=g(void 0),this.attributesChanges=A(),this.shopifyFormService=d(vt)}ngOnChanges(t){t.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId()).pipe(P(i=>{this.form=this.shopifyFormService.createFormGroup(i),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe(St(500)).subscribe(t=>{this.attributesChanges.emit([t])})}ngOnDestroy(){this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["shopify-attribute-form"]],inputs:{channelId:[1,"channelId"]},outputs:{attributesChanges:"attributesChanges"},features:[x([vt]),O],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(i,n){if(i&1&&(h(0,xe,14,2,"form",0),y(1,"async")),i&2){let o;C((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[w,j,z,U,G,Y,W,$,L,S],encapsulation:2,changeDetection:0})}}return e})();function Se(e,c){if(e&1&&(s(0,"div",6),u(1,"app-product-card",9),l()),e&2){let t=c.$implicit;m(),p("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("imageForZoom",t==null?null:t.ImageUrl)("code",t==null||t.Variants[0]==null?null:t.Variants[0].Code)("showFooter",!1)}}function Ie(e,c){if(e&1){let t=B();s(0,"mat-checkbox",21),Pt("ngModelChange",function(n){E(t);let o=a().$implicit;return Ft(o.selected,n)||(o.selected=n),k(n)}),I("ngModelChange",function(){let n=E(t),o=a(),r=o.$implicit,b=o.$index,it=a();return k(it.onSelectChannel(r,b,n))}),l()}if(e&2){let t=a().$implicit;At("ngModel",t.selected)}}function Ae(e,c){if(e&1&&(s(0,"div",18),u(1,"input",22),l()),e&2){let t=a().$implicit,i=a();p("matTooltip",t.type==i.channelType.Shopify||t.type==i.channelType.ShopifyV2?"Cannot change category, please change category in admin.shopify.com":t.type==i.channelType.Plugo?"You can change the category after the product has been uploaded to the Plugo Dashboard.":"")}}function Fe(e,c){if(e&1){let t=B();s(0,"app-channel-category-select",23),I("selectedCategory",function(n){E(t);let o=a().$index,r=a();return k(r.onCategoryChange(o,n))}),l()}if(e&2){let t=a().$implicit,i=a();p("disabled",!t.selected||t.selected&&t.type==i.channelType.Lazada)("channelId",t.id)("channelType",t.type)("categoryId",t.categoryId)}}function Pe(e,c){if(e&1){let t=B();s(0,"shopee-attribute-form",27),I("attributesChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)("channelType",t.type)}}function Ne(e,c){if(e&1){let t=B();s(0,"tiktok-attribute-form",28),I("attributesChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onAttributesChange(o,n))})("onPlatformChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onPlatformChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Ee(e,c){if(e&1){let t=B();s(0,"wooocommerce-attribute-form",29),I("attributesChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function ke(e,c){if(e&1){let t=B();s(0,"tokopedia-attribute-form",29),I("attributesChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Oe(e,c){if(e&1&&(s(0,"div",20)(1,"div",24),h(2,Pe,1,3,"shopee-attribute-form",25)(3,Ne,1,2,"tiktok-attribute-form",26)(4,Ee,1,2,"wooocommerce-attribute-form",26)(5,ke,1,2,"tokopedia-attribute-form",26),l()()),e&2){let t,i=a().$implicit,n=a();m(2),C((t=i.type)===n.channelType.Shopee?2:t===n.channelType.Tiktok?3:t===n.channelType.WooCommerce?4:t===n.channelType.Tokopedia?5:-1)}}function De(e,c){if(e&1){let t=B();s(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",30),I("attributesChanges",function(n){E(t);let o=a().$index,r=a();return k(r.onAttributesChange(o,n))}),l()()()}if(e&2){let t=a().$implicit;m(2),p("channelId",t.id)}}function Me(e,c){if(e&1&&(s(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),h(6,Ie,1,1,"mat-checkbox",14),y(7,"async"),l(),s(8,"div"),u(9,"app-channel-logo",15),l(),s(10,"div",16)(11,"span"),_(12),l()()()(),s(13,"div",12)(14,"div",17),h(15,Ae,2,1,"div",18)(16,Fe,1,4,"app-channel-category-select",19),l()()(),h(17,Oe,6,1,"div",20)(18,De,3,1,"div",20),l()()),e&2){let t,i=c.$implicit,n=a();m(6),C((t=v(7,8,n.defaultCategories$))?6:-1,t),m(3),p("typeId",i.type)("showChannelName",!1),m(),p("matTooltip",i.name)("matTooltipShowDelay",2500),m(2),nt(i.name),m(3),C(i.type==n.channelType.Shopify||i.type==n.channelType.Plugo||i.type==n.channelType.ShopifyV2?15:16),m(2),C(i.categoryId&&n.channelType.Lazada!=i.type&&i.selected?17:(n.channelType.Shopify==i.type||i.type==n.channelType.ShopifyV2)&&i.selected?18:-1)}}var zo=(()=>{class e{constructor(){this.toastr=d(Nt),this.uploadProductService=d(st),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=_t,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(q(1))}onCategoryChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.categoryId=i,o.attributes=[]),o)))}onPlatformChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.listing_platforms=i),o)))}onAttributesChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.attributes=i),o)))}tiktokPlatformChanges(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.listing_platforms=i),o)))}onSelectChannel(t,i,n){this.channelProductUploads.update(o=>o.map((r,b)=>{if(b==i&&t.selected){let it=this.findCategoryByChannelId(t.id,n);r.categoryId=it?.DefaultCategoryID}return b==i&&!t.selected&&(r.categoryId=null),r}))}findCategoryByChannelId(t,i){return i.find(n=>n.ID===t)}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(i=>i.type==_t.Tiktok&&f.IsNotEmpty(i?.categoryId)?i.listing_platforms.length>0:!0)}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["app-product-upload"]],features:[x([lt,$t,Rt,ct])],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(i,n){if(i&1&&(s(0,"mainpanel",0)(1,"actions")(2,"button",1),I("click",function(){return n.onUploadProduct()}),u(3,"i",2),_(4," Upload "),l()(),s(5,"content")(6,"div",3)(7,"h3",4),_(8,"Product To Upload"),l(),s(9,"div",5),M(10,Se,2,7,"div",6,D),y(12,"async"),l(),s(13,"h3",7),_(14,"Channel To Upload"),l(),M(15,Me,19,10,"div",8,D),l()()()),i&2){let o;p("hideSearchBox",!0)("hideSearchDropdown",!0),m(2),p("disabled",((o=n.channelProductUploads())==null?null:o.length)==0),m(8),V(v(12,3,n.selectedProducts$)),m(5),V(n.channelProductUploads())}},dependencies:[jt,wt,Yt,Wt,Gt,Z,U,Et,Ut,Vt,qt,Qt,zt,Zt,Bt,Kt,Jt,S],encapsulation:2,changeDetection:0})}}return e})();export{zo as ProductUploadComponent};
|
|
1
|
+
import{a as Kt}from"./chunk-OIYTXYLO.js";import"./chunk-EN7FW6EW.js";import{a as Wt,b as Yt}from"./chunk-SEB36UUD.js";import{b as jt}from"./chunk-E4UF3SPF.js";import"./chunk-WXQUJZQY.js";import{a as Gt}from"./chunk-HI5QPKQM.js";import"./chunk-2C6XBRGE.js";import"./chunk-RUHYZ275.js";import"./chunk-3BV4FPZE.js";import{a as Bt}from"./chunk-ZAAQHZQ4.js";import{a as lt,b as $t,c as Rt,d as ct,e as st}from"./chunk-OESZXCMJ.js";import"./chunk-GIPWMAZL.js";import"./chunk-7ES2Z445.js";import{a as Lt}from"./chunk-SBLTWRFW.js";import"./chunk-SSK4EUDM.js";import"./chunk-6PI5PUIQ.js";import"./chunk-6VOSRCWX.js";import"./chunk-XSXHGAXP.js";import"./chunk-W2CSYQ6H.js";import"./chunk-ODW7HQHU.js";import"./chunk-TWIWWZUD.js";import"./chunk-MYDVMG67.js";import"./chunk-ACIMXBIC.js";import"./chunk-5QG5PZ7U.js";import"./chunk-KYK2ZFUZ.js";import{d as L,e as $}from"./chunk-KXLYQDZR.js";import{b as wt}from"./chunk-L7K2JAJV.js";import"./chunk-DEQSZUMF.js";import"./chunk-NIRJAWTX.js";import{a as Ut}from"./chunk-RDXDKWLL.js";import{b as Ht,c as Xt}from"./chunk-2GKHARPI.js";import"./chunk-2GINYFUG.js";import"./chunk-RBYZVK4L.js";import"./chunk-625TQFQL.js";import"./chunk-EDNKI3WA.js";import"./chunk-CM45JN3C.js";import"./chunk-7BEOEYAC.js";import"./chunk-WU3SNCIC.js";import"./chunk-A32JPG5P.js";import"./chunk-JY726AM5.js";import"./chunk-2BS4VK45.js";import"./chunk-TTMPMWUQ.js";import"./chunk-5RV2CJGS.js";import"./chunk-QGNTUEVO.js";import"./chunk-GJXDRPAS.js";import"./chunk-GBUDZCXK.js";import"./chunk-S3MYFAWN.js";import"./chunk-SPNVH2ST.js";import"./chunk-BXA5YUTN.js";import{b as Vt}from"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-ZSUWHVKX.js";import"./chunk-VDNUDZOQ.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import{b as _t,c as f}from"./chunk-NNVT5X6O.js";import{A as w,c as z,e as ot,h as U,i as G,l as at,m as Et,n as j,q as kt,r as W,s as Y,t as Ot,u as Dt,v as Mt,y as H,z as Z}from"./chunk-BUBQQEYA.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import{b as Nt,e as Q}from"./chunk-45DFJJAO.js";import"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import{z as S}from"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{$c as x,Eb as T,I as xt,K as St,Ma as O,Oc as _,Pc as nt,Qc as K,Sc as At,Tc as Ft,Uc as Pt,V as q,X as It,_ as ut,aa as P,ad as rt,bc as h,d as Tt,dc as C,ec as D,gc as M,hc as V,ia as N,ic as p,jc as s,kc as l,kd as y,lc as u,ld as v,mb as m,na as d,sc as B,t as F,ua as E,va as k,vd as A,wd as g,xc as I,zc as a}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var X=(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})(X||{});var tt=(function(e){return e[e.FORMAT_NORMAL=1]="FORMAT_NORMAL",e[e.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",e})(tt||{});var et=(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})(et||{});var ft=class extends at{setValue(c,t){if(c instanceof Date){let i=Math.floor(c.getTime()/1e3);super.setValue(i,t)}else super.setValue(c,t)}},ht=(()=>{class e{constructor(){this.shopeeUploadService=d(lt),this.formBuilder=d(H)}getAttributes(t){return this.shopeeUploadService.getAttributes(t.channelId,t.categoryId).pipe(F(i=>this.setLabelToIndonesian(i)))}setLabelToIndonesian(t=[]){let i,n;return t=t.map(o=>(i=o?.multi_lang?.find(r=>r.language=="id"),o.attribute_value_list=o?.attribute_value_list?.map(r=>(n=r?.multi_lang?.find(b=>b.language=="id"),r.name=n?.value,r)),o.name=i?.value?i?.value:o.name,o)),t}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{if(n=[],o.mandatory&&n.push(ot.required),o?.attribute_info?.format_type==tt.FORMAT_QUANTITATIVE_WITH_UNIT&&o?.attribute_info?.input_type==X.FREE_TEXT_FILED){let r=this.formBuilder.group({unit:new at(null),value:new at(null,n)});i.addControl(JSON.stringify(o.attribute_id),r)}else o?.attribute_info?.input_type==X.FREE_TEXT_FILED&&o?.attribute_info?.input_validation_type==et.VALIDATOR_DATE_TYPE?i.addControl(JSON.stringify(o.attribute_id),new ft(null,n)):i.addControl(JSON.stringify(o.attribute_id),this.formBuilder.control(null,n))}),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(b=>o.findIndex(dt=>parseInt(dt)==b.attribute_id||b.mandatory)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>{switch(o.attribute_info.input_type){case X.MULTI_COMBO_BOX:f.IsNotEmpty(i[o.attribute_id])?o.attribute_value_list=o.attribute_value_list.filter(r=>i[o.attribute_id]?.findIndex(b=>b==r.value_id)!=-1):o.attribute_value_list=[];break;case X.FREE_TEXT_FILED:o.attribute_info.format_type==tt.FORMAT_QUANTITATIVE_WITH_UNIT?o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]?.value,i[o.attribute_id]?.unit):o.attribute_info.input_validation_type==et.VALIDATOR_DATE_TYPE?o.attribute_value_list=this.setSelectedDateAttr(i[o.attribute_id]):o.attribute_value_list=this.setSelectedQuantitativeAttr(i[o.attribute_id]);break;default:o.attribute_value_list=o.attribute_value_list.filter(r=>r.value_id==i[o.attribute_id])}return o}).filter(o=>o?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(t,i){let n=[];if(f.IsNotEmpty(t)){let o={value_id:0,original_value_name:JSON.stringify(t)};f.IsNotEmpty(i)&&(o.value_unit=i),n=[o]}return n}setSelectedDateAttr(t){let i=[];return f.IsNotEmpty(t)&&(i=[{value_id:0,original_value_name:JSON.stringify(t)}]),i}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();var Ct=()=>[];function te(e,c){e&1&&(s(0,"span",4),_(1,"*"),l())}function ee(e,c){if(e&1&&u(0,"ng-select",5),e&2){let t=a().$implicit;p("multiple",!0)("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:rt(4,Ct))("placeholder","Pilih "+(t==null?null:t.name))}}function ie(e,c){if(e&1&&u(0,"input",7),e&2){let t=a(2).$implicit;p("formControlName",t.attribute_id)("placeholder","Isi "+(t==null?null:t.name))}}function oe(e,c){if(e&1&&(s(0,"option",14),_(1),l()),e&2){let t=c.$implicit;p("value",t),m(),nt(t)}}function ne(e,c){if(e&1&&(s(0,"div",9),u(1,"input",11),s(2,"select",12)(3,"option",13),_(4,"Unit"),l(),M(5,oe,2,2,"option",14,D),l()()),e&2){let t=a(3).$implicit;p("formGroupName",t.attribute_id),m(),p("placeholder","Isi "+(t==null?null:t.name)),m(2),p("value",null),m(2),V(t==null||t.attribute_info==null?null:t.attribute_info.attribute_unit_list)}}function re(e,c){if(e&1&&u(0,"input",10),e&2){let t=a(3).$implicit;p("formControlName",t.attribute_id)("placeholder","Isi "+(t==null?null:t.name))}}function ae(e,c){if(e&1&&h(0,ne,7,3,"div",9)(1,re,1,2,"input",10),e&2){let t=a(2).$implicit,i=a(2);C((t==null||t.attribute_info==null?null:t.attribute_info.format_type)==i.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function le(e,c){if(e&1&&u(0,"datepicker",8),e&2){let t=a(2).$implicit;p("formControlName",t.attribute_id)}}function ce(e,c){if(e&1&&h(0,ie,1,2,"input",7)(1,ae,2,1)(2,le,1,1,"datepicker",8),e&2){let t,i=a().$implicit,n=a(2);C((t=i==null||i.attribute_info==null?null:i.attribute_info.input_validation_type)===n.validationType.VALIDATOR_STRING_TYPE?0:t===n.validationType.VALIDATOR_FLOAT_TYPE?1:t===n.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function se(e,c){if(e&1&&u(0,"ng-select",6),e&2){let t=a().$implicit;p("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:rt(3,Ct))("placeholder","Pilih "+(t==null?null:t.name))}}function me(e,c){if(e&1&&u(0,"ng-select",6),e&2){let t=a().$implicit;p("formControlName",t.attribute_id)("items",t.attribute_value_list?t.attribute_value_list:rt(3,Ct))("placeholder","Pilih "+(t==null?null:t.name))}}function pe(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),h(2,te,2,0,"span",4),s(3,"span"),_(4),l()(),h(5,ee,1,5,"ng-select",5)(6,ce,3,1)(7,se,1,4,"ng-select",6)(8,me,1,4,"ng-select",6),l()),e&2){let t,i=c.$implicit,n=a(2);m(2),C(i.mandatory?2:-1),m(2),K(" ",i==null?null:i.name," "),m(),C((t=i==null||i.attribute_info==null?null:i.attribute_info.input_type)===n.inputType.MULTI_COMBO_BOX?5:t===n.inputType.FREE_TEXT_FILED?6:t===n.inputType.SINGLE_COMBO_BOX?7:8)}}function de(e,c){if(e&1&&(s(0,"form",0)(1,"div",1),M(2,pe,9,3,"div",2,D),l()()),e&2){let t=a();p("formGroup",t.form),m(2),V(c)}}var Jt=(()=>{class e{constructor(){this.formCategoryService=d(ht),this.channelType=g(void 0),this.categoryId=g(void 0),this.channelId=g(void 0),this.channelProductUpload=g(void 0),this.attributesChanges=A(),this.inputType=X,this.formatType=tt,this.validationType=et}ngOnChanges(){let t=this.categoryId(),i=this.channelId();f.IsNotEmpty(t)&&f.IsNotEmpty(i)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:t,channelId:i,channelType:this.channelType()}).pipe(P(n=>{this.form=this.formCategoryService.createFormGroup(n),this.listenToFormChange(n)}),q(1)))}listenToFormChange(t){let i=[];this.formSubscription=this.form.valueChanges.subscribe(n=>{i=this.formCategoryService.getFilteredAttributes(t,n),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["shopee-attribute-form"]],inputs:{channelType:[1,"channelType"],categoryId:[1,"categoryId"],channelId:[1,"channelId"],channelProductUpload:[1,"channelProductUpload"]},outputs:{attributesChanges:"attributesChanges"},features:[x([ht]),O],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(i,n){if(i&1&&(h(0,de,4,1,"form",0),y(1,"async")),i&2){let o;C((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[$,L,w,j,Dt,Mt,z,Ot,U,G,Y,W,kt,Lt,Xt,Ht,S],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}"],changeDetection:0})}}return e})();var J=(function(e){return e.TIKTOK_SHOP="TIKTOK_SHOP",e.TOKOPEDIA="TOKOPEDIA",e})(J||{});var gt=(()=>{class e{constructor(){this.httpService=d(Q),this.formBuilder=d(H),this.uploadProductService=d(st)}getAttributes(t,i){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:i}]).pipe(xt(o=>this.uploadProductService.selectedProduct$.pipe(F(r=>(o=this.mappingAttributeSalesProperty(o,r),o)))))}mappingAttributeSalesProperty(t,i){let n=0;return t.filter(o=>(o.type=="SALES_PROPERTY"&&(n+=1),n>1?(n=0,!1):!0)).map(o=>(o.type=="SALES_PROPERTY"&&(o.name="Jenis Variant",o.is_multiple_selection=!1,o.is_required=this.isProductHasMoreVariant(i),o.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),o))}isProductHasMoreVariant(t){let i=!1,n=[];return t.forEach(o=>{o.Variants&&n.push(o.Variants.length)}),i=n.some(o=>o>1),i}createFormGroup(t){let i=this.formBuilder.group({}),n=[];return t.forEach(o=>{n=[],o.is_required&&n.push(ot.required),i.addControl(o.id,this.formBuilder.control(null,n))}),i.addControl("listingPlatform",this.formBuilder.control([J.TIKTOK_SHOP,J.TOKOPEDIA],[ot.required])),i}getFilteredAttributes(t,i){let n=JSON.parse(JSON.stringify(t)),o=Object.keys(i),r=n.filter(b=>o.findIndex(dt=>parseInt(dt)==b.id)!=-1);return r=this.filterSelectedAttributes(r,i),r}filterSelectedAttributes(t,i){return t.map(o=>(f.IsNotEmpty(o.values)?o.is_multiple_selection?o.values=o.values.filter(r=>i[o.id]?.includes(r.id)):o.values=o.values.filter(r=>r.id==i[o.id]):i[o.id]&&(o.values=[{id:null,name:i[o.id]}]),o)).filter(o=>o?.values?.length>0)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();function ue(e,c){e&1&&(s(0,"small",5),_(1," Platform is required "),l())}function _e(e,c){e&1&&(s(0,"span",5),_(1,"*"),l())}function fe(e,c){if(e&1&&u(0,"ng-select",6),e&2){let t=a().$implicit;p("multiple",!0)("formControlName",t.id)("items",t.values)("placeholder","Pilih "+(t==null?null:t.name))}}function he(e,c){if(e&1&&u(0,"ng-select",7),e&2){let t=a().$implicit;p("formControlName",t.id)("items",t.values)("placeholder","Pilih "+(t==null?null:t.name))}}function Ce(e,c){if(e&1&&u(0,"input",8),e&2){let t=a().$implicit;p("formControlName",t.id)("placeholder",t==null?null:t.name)}}function ge(e,c){if(e&1&&(s(0,"small",5),_(1),l()),e&2){let t=a().$implicit;m(),K(" ",t==null?null:t.name," is mandatory ")}}function be(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),h(2,_e,2,0,"span",5),s(3,"span"),_(4),l()(),h(5,fe,1,4,"ng-select",6)(6,he,1,3,"ng-select",7)(7,Ce,1,2,"input",8),h(8,ge,2,1,"small",5),l()),e&2){let t=c.$implicit;m(2),C(t.is_required?2:-1),m(2),K(" ",t==null?null:t.name," "),m(),C(t.is_multiple_selection?5:t.values!==null&&t.values.length>0?6:7),m(3),C(t.is_required?8:-1)}}function ye(e,c){if(e&1&&(s(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),_(5," Platform Options"),l()(),u(6,"ng-select",4),h(7,ue,2,0,"small",5),l(),M(8,be,9,4,"div",2,D),l()()),e&2){let t,i=a();p("formGroup",i.form),m(6),p("multiple",!0)("items",i.platformOptions)("clearable",!1),m(),C(!(i.form==null||(t=i.form.get("listingPlatform").errors)==null)&&t.required?7:-1),m(),V(c)}}var qt=(()=>{class e{constructor(){this.tiktokAttributeFormService=d(gt),this.channelId=g(void 0),this.categoryId=g(void 0),this.platformChange=A({alias:"onPlatformChanges"}),this.formSubscription=new Tt,this.attributesChanges=A(),this.platformOptions=[{label:"TikTok Shop",value:J.TIKTOK_SHOP},{label:"Tokopedia",value:J.TOKOPEDIA}]}ngOnChanges(){let t=this.categoryId(),i=this.channelId();f.IsNotEmpty(t)&&f.IsNotEmpty(i)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(i,t).pipe(F(n=>n.filter(o=>!(o.type=="PRODUCT_PROPERTY"&&(f.IsEmpty(o.values)||o.values?.length==0)&&o.is_customizable==!1))),P(n=>{this.form=this.tiktokAttributeFormService.createFormGroup(n),this.listenToFormChange(n)}),q(1)))}listenToFormChange(t){let i=[];this.form.valueChanges.pipe(ut(this.formSubscription)).subscribe(n=>{delete n.listingPlatform,i=this.tiktokAttributeFormService.getFilteredAttributes(t,n),this.attributesChanges.emit(i)}),this.form.get("listingPlatform").valueChanges.pipe(It(this.form.get("listingPlatform").value),ut(this.formSubscription)).subscribe(n=>{this.platformChange.emit(n)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["tiktok-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{platformChange:"onPlatformChanges",attributesChanges:"attributesChanges"},features:[x([gt]),O],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(i,n){if(i&1&&(h(0,ye,10,5,"form",0),y(1,"async")),i&2){let o;C((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[$,L,w,j,z,U,G,Y,W,Z,S],encapsulation:2,changeDetection:0})}}return e})();var bt=(()=>{class e{constructor(){this.woocommerceUploadService=d(ct)}getAttributes(t,i){return this.woocommerceUploadService.getAttributes(t,i).pipe(F(n=>n.map(o=>({key:o.name,label:o.name}))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();var Qt=(()=>{class e{constructor(){this.wooAttributeFormService=d(bt),this.channelId=g(),this.categoryId=g(),this.attributesChanges=A()}ngOnChanges(){f.IsNotEmpty(this.categoryId())&&f.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(t){this.attributesChanges.emit([t.key])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[x([bt]),O],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(i,n){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2),_(3,"Atribut"),l(),s(4,"ng-select",3),y(5,"async"),I("change",function(r){return n.onSelectAttribute(r)}),l()()()),i&2&&(m(4),p("items",v(5,1,n.attributes$)))},dependencies:[Z,$,L,w,S],encapsulation:2,changeDetection:0})}}return e})();var yt=(()=>{class e{constructor(){this.httpService=d(Q),this.formBuilder=d(H)}getAttributes(t,i){return this.httpService.get("api/product/tokopedia/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:i}]).pipe(F(o=>o))}createFormGroup(t){let i=this.formBuilder.group({});return t.forEach(n=>{i.addControl(n.variant,this.formBuilder.control(null))}),i}convertAttributes(t={}){return Object.values(t).filter(n=>n!==null).map(n=>JSON.stringify(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();function ve(e,c){if(e&1&&(s(0,"div",2)(1,"div",3),_(2),l(),u(3,"ng-select",4),l()),e&2){let t=c.$implicit;m(2),K(" ",t==null?null:t.variant," "),m(),p("formControlName",t.variant)("items",t.values)("placeholder","Pilih "+(t==null?null:t.variant))}}function Te(e,c){if(e&1&&(s(0,"form",0)(1,"div",1),M(2,ve,4,4,"div",2,D),l()()),e&2){let t=a();p("formGroup",t.form),m(2),V(c)}}var zt=(()=>{class e{constructor(){this.tokpedAttrFormService=d(yt),this.channelId=g(void 0),this.categoryId=g(void 0),this.attributesChanges=A()}ngOnChanges(t){let i=this.categoryId(),n=this.channelId();f.IsNotEmpty(i)&&f.IsNotEmpty(n)&&(this.attributes$=this.tokpedAttrFormService.getAttributes(n,i).pipe(P(o=>{this.form=this.tokpedAttrFormService.createFormGroup(o),this.listenToFormChange()})))}listenToFormChange(){let t=[];this.formSubscription=this.form.valueChanges.subscribe(i=>{t=this.tokpedAttrFormService.convertAttributes(i),this.attributesChanges.emit(t)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["tokopedia-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[x([yt]),O],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(i,n){if(i&1&&(h(0,Te,4,1,"form",0),y(1,"async")),i&2){let o;C((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[$,L,w,j,U,G,Y,W,S],encapsulation:2,changeDetection:0})}}return e})();var vt=(()=>{class e{constructor(){this.httpService=d(Q),this.formBuilder=d(H)}getAttributes(t){return this.httpService.get("api/product/ShopifyV2/GetAttributes",[{key:"ID",value:t}]).pipe(P(n=>(n.Options.StatusOptions=n.Options.Status.map(o=>({id:o,name:o})),n)))}createFormGroup(t){let i=this.formBuilder.group({});return Object.keys(t.Attribute).forEach(o=>{i.addControl(o,this.formBuilder.control(null))}),i}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac})}}return e})();function xe(e,c){if(e&1&&(s(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3),_(4," Brand "),l(),u(5,"input",4),l(),s(6,"div",5)(7,"div",3),_(8," Product Type "),l(),u(9,"input",6),l(),s(10,"div",5)(11,"div",3),_(12," Status "),l(),u(13,"ng-select",7),l()()()),e&2){let t=a();p("formGroup",t.form),m(13),p("items",c.Options.StatusOptions)}}var Zt=(()=>{class e{constructor(){this.channelId=g(void 0),this.attributesChanges=A(),this.shopifyFormService=d(vt)}ngOnChanges(t){t.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId()).pipe(P(i=>{this.form=this.shopifyFormService.createFormGroup(i),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe(St(500)).subscribe(t=>{this.attributesChanges.emit([t])})}ngOnDestroy(){this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["shopify-attribute-form"]],inputs:{channelId:[1,"channelId"]},outputs:{attributesChanges:"attributesChanges"},features:[x([vt]),O],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(i,n){if(i&1&&(h(0,xe,14,2,"form",0),y(1,"async")),i&2){let o;C((o=v(1,1,n.attributes$))?0:-1,o)}},dependencies:[w,j,z,U,G,Y,W,$,L,S],encapsulation:2,changeDetection:0})}}return e})();function Se(e,c){if(e&1&&(s(0,"div",6),u(1,"app-product-card",9),l()),e&2){let t=c.$implicit;m(),p("productId",t==null?null:t.ID)("title",t==null?null:t.Name)("image",t==null?null:t.ThumbnailUrl)("description",(t==null||t.Variants==null?null:t.Variants.length)>1?(t==null||t.Variants==null?null:t.Variants.length)+" Variants":null)("imageForZoom",t==null?null:t.ImageUrl)("code",t==null||t.Variants[0]==null?null:t.Variants[0].Code)("showFooter",!1)}}function Ie(e,c){if(e&1){let t=B();s(0,"mat-checkbox",21),Pt("ngModelChange",function(n){E(t);let o=a().$implicit;return Ft(o.selected,n)||(o.selected=n),k(n)}),I("ngModelChange",function(){let n=E(t),o=a(),r=o.$implicit,b=o.$index,it=a();return k(it.onSelectChannel(r,b,n))}),l()}if(e&2){let t=a().$implicit;At("ngModel",t.selected)}}function Ae(e,c){if(e&1&&(s(0,"div",18),u(1,"input",22),l()),e&2){let t=a().$implicit,i=a();p("matTooltip",t.type==i.channelType.Shopify||t.type==i.channelType.ShopifyV2?"Cannot change category, please change category in admin.shopify.com":t.type==i.channelType.Plugo?"You can change the category after the product has been uploaded to the Plugo Dashboard.":"")}}function Fe(e,c){if(e&1){let t=B();s(0,"app-channel-category-select",23),I("selectedCategory",function(n){E(t);let o=a().$index,r=a();return k(r.onCategoryChange(o,n))}),l()}if(e&2){let t=a().$implicit,i=a();p("disabled",!t.selected||t.selected&&t.type==i.channelType.Lazada)("channelId",t.id)("channelType",t.type)("categoryId",t.categoryId)}}function Pe(e,c){if(e&1){let t=B();s(0,"shopee-attribute-form",27),I("attributesChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)("channelType",t.type)}}function Ne(e,c){if(e&1){let t=B();s(0,"tiktok-attribute-form",28),I("attributesChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onAttributesChange(o,n))})("onPlatformChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onPlatformChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Ee(e,c){if(e&1){let t=B();s(0,"wooocommerce-attribute-form",29),I("attributesChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function ke(e,c){if(e&1){let t=B();s(0,"tokopedia-attribute-form",29),I("attributesChanges",function(n){E(t);let o=a(2).$index,r=a();return k(r.onAttributesChange(o,n))}),l()}if(e&2){let t=a(2).$implicit;p("categoryId",t.categoryId)("channelId",t.id)}}function Oe(e,c){if(e&1&&(s(0,"div",20)(1,"div",24),h(2,Pe,1,3,"shopee-attribute-form",25)(3,Ne,1,2,"tiktok-attribute-form",26)(4,Ee,1,2,"wooocommerce-attribute-form",26)(5,ke,1,2,"tokopedia-attribute-form",26),l()()),e&2){let t,i=a().$implicit,n=a();m(2),C((t=i.type)===n.channelType.Shopee?2:t===n.channelType.Tiktok?3:t===n.channelType.WooCommerce?4:t===n.channelType.Tokopedia?5:-1)}}function De(e,c){if(e&1){let t=B();s(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",30),I("attributesChanges",function(n){E(t);let o=a().$index,r=a();return k(r.onAttributesChange(o,n))}),l()()()}if(e&2){let t=a().$implicit;m(2),p("channelId",t.id)}}function Me(e,c){if(e&1&&(s(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),h(6,Ie,1,1,"mat-checkbox",14),y(7,"async"),l(),s(8,"div"),u(9,"app-channel-logo",15),l(),s(10,"div",16)(11,"span"),_(12),l()()()(),s(13,"div",12)(14,"div",17),h(15,Ae,2,1,"div",18)(16,Fe,1,4,"app-channel-category-select",19),l()()(),h(17,Oe,6,1,"div",20)(18,De,3,1,"div",20),l()()),e&2){let t,i=c.$implicit,n=a();m(6),C((t=v(7,8,n.defaultCategories$))?6:-1,t),m(3),p("typeId",i.type)("showChannelName",!1),m(),p("matTooltip",i.name)("matTooltipShowDelay",2500),m(2),nt(i.name),m(3),C(i.type==n.channelType.Shopify||i.type==n.channelType.Plugo||i.type==n.channelType.ShopifyV2?15:16),m(2),C(i.categoryId&&n.channelType.Lazada!=i.type&&i.selected?17:(n.channelType.Shopify==i.type||i.type==n.channelType.ShopifyV2)&&i.selected?18:-1)}}var zo=(()=>{class e{constructor(){this.toastr=d(Nt),this.uploadProductService=d(st),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=_t,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(q(1))}onCategoryChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.categoryId=i,o.attributes=[]),o)))}onPlatformChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.listing_platforms=i),o)))}onAttributesChange(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.attributes=i),o)))}tiktokPlatformChanges(t,i){this.channelProductUploads.update(n=>n.map((o,r)=>(r==t&&(o.listing_platforms=i),o)))}onSelectChannel(t,i,n){this.channelProductUploads.update(o=>o.map((r,b)=>{if(b==i&&t.selected){let it=this.findCategoryByChannelId(t.id,n);r.categoryId=it?.DefaultCategoryID}return b==i&&!t.selected&&(r.categoryId=null),r}))}findCategoryByChannelId(t,i){return i.find(n=>n.ID===t)}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(i=>i.type==_t.Tiktok&&f.IsNotEmpty(i?.categoryId)?i.listing_platforms.length>0:!0)}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=T({type:e,selectors:[["app-product-upload"]],features:[x([lt,$t,Rt,ct])],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(i,n){if(i&1&&(s(0,"mainpanel",0)(1,"actions")(2,"button",1),I("click",function(){return n.onUploadProduct()}),u(3,"i",2),_(4," Upload "),l()(),s(5,"content")(6,"div",3)(7,"h3",4),_(8,"Product To Upload"),l(),s(9,"div",5),M(10,Se,2,7,"div",6,D),y(12,"async"),l(),s(13,"h3",7),_(14,"Channel To Upload"),l(),M(15,Me,19,10,"div",8,D),l()()()),i&2){let o;p("hideSearchBox",!0)("hideSearchDropdown",!0),m(2),p("disabled",((o=n.channelProductUploads())==null?null:o.length)==0),m(8),V(v(12,3,n.selectedProducts$)),m(5),V(n.channelProductUploads())}},dependencies:[jt,wt,Yt,Wt,Gt,Z,U,Et,Ut,Vt,qt,Qt,zt,Zt,Bt,Kt,Jt,S],encapsulation:2,changeDetection:0})}}return e})();export{zo as ProductUploadComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as le}from"./chunk-W2CSYQ6H.js";import{b as de}from"./chunk-ODW7HQHU.js";import{a as se}from"./chunk-TWIWWZUD.js";import{c as ae,e as f,f as re}from"./chunk-KYK2ZFUZ.js";import{$ as ne,Aa as oe,_ as ee,ra as te,sa as V}from"./chunk-SPNVH2ST.js";import{a as ie,g as ce}from"./chunk-
|
|
1
|
+
import{a as le}from"./chunk-W2CSYQ6H.js";import{b as de}from"./chunk-ODW7HQHU.js";import{a as se}from"./chunk-TWIWWZUD.js";import{c as ae,e as f,f as re}from"./chunk-KYK2ZFUZ.js";import{$ as ne,Aa as oe,_ as ee,ra as te,sa as V}from"./chunk-SPNVH2ST.js";import{a as ie,g as ce}from"./chunk-BUBQQEYA.js";import{F as Y,r as Z,u as J,y as W}from"./chunk-4NAKX6WQ.js";import{$c as G,Ca as _,Cc as H,Dc as R,Eb as C,Ec as w,Fb as O,Fc as B,Ga as P,Hd as x,Ib as $,Id as U,Jb as y,Kb as k,Mc as q,Na as b,Nc as l,Xb as s,dd as K,ha as N,ia as z,ic as c,ja as D,jc as M,kc as T,la as A,lc as I,mb as d,na as m,oc as L,pc as E,qc as S,sc as Q,sd as X,ua as g,va as v,wa as u,wd as F,xc as j,zc as h}from"./chunk-ZPV56E2J.js";var fe=["data-p-icon","minus"],he=(()=>{class e extends se{static \u0275fac=(()=>{let n;return function(t){return(n||(n=b(e)))(t||e)}})();static \u0275cmp=C({type:e,selectors:[["","data-p-icon","minus"]],features:[y],attrs:fe,decls:1,vars:0,consts:[["d","M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z","fill","currentColor"]],template:function(o,t){o&1&&(u(),L(0,"path",0))},encapsulation:2})}return e})();var pe=`
|
|
2
2
|
.p-checkbox {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: inline-flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-DCKVIQWI.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-DCKVIQWI.js";import"./chunk-4VNQYYVV.js";import{a as n}from"./chunk-S5FQJLG5.js";import{a as u}from"./chunk-J3PHESB2.js";import"./chunk-NIRJAWTX.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-VDNUDZOQ.js";import"./chunk-4JTBEEYK.js";import"./chunk-QXRG5XYP.js";import"./chunk-P5OAPFNC.js";import"./chunk-7R55YTL6.js";import"./chunk-NNVT5X6O.js";import"./chunk-BMVBJQDF.js";import"./chunk-34FX4M3J.js";import"./chunk-45DFJJAO.js";import{c as s}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import"./chunk-4NAKX6WQ.js";import"./chunk-ASFPLYOZ.js";import{Eb as r,ic as c,jc as l,kc as p,lc as a,mb as i}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{class t{constructor(){this.productTabs=[{Title:"Sold in Channel",Url:"/menu/products/status/sold-in-channel",Description:"SKU has been mapped between dealpos and marketplace"},{Title:"Not in POS",Url:"/menu/products/status/not-in-pos",Description:"SKU sold in Marketplace but not exist in DEALPOS"},{Title:"Not in Channel",Url:"/menu/products/status/not-in-channel",Description:"SKU has not been sold on one of channels"},{Title:"In POS",Url:"/menu/products/status/in-pos",Description:"All products which is already available in POS"},{Title:"Multiple Listing",Url:"/menu/products/status/duplicate-sku",Description:"SKU(s) which is listed more than one time (one to many)"},{Title:"Channel Statistic",Url:"/menu/products/status/channel-statistic",Description:"Product statistic from each channel obtained from the last product scan"},{Title:"Scan History",Url:"/menu/products/status/notificationV2",Description:"Scan results for each channel, including product counts and synchronization status"}]}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=r({type:t,selectors:[["app-status"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"]],template:function(o,h){o&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),p()()(),a(4,"router-outlet")),o&2&&(i(3),c("Tabs",h.productTabs))},dependencies:[u,s],encapsulation:2})}}return t})();var T=[{component:d,path:"",children:[{path:"",redirectTo:"sold-in-channel",pathMatch:"full"},{path:"in-pos",loadComponent(){return import("./chunk-7P7PKIQT.js").then(t=>t.InPosComponent)},canActivate:[n,e],data:{title:"Products in POS"}},{path:"sold-in-channel",loadComponent(){return import("./chunk-TW6YICUO.js").then(t=>t.SoldInChannelComponent)},canActivate:[n,e],data:{title:"Products Sold in Channel"}},{path:"not-in-channel",loadComponent(){return import("./chunk-JOQC5TET.js").then(t=>t.NotInChannelComponent)},canActivate:[n,e],data:{title:"Products not in Channel"}},{path:"not-in-pos",loadComponent(){return import("./chunk-BRMEWMES.js").then(t=>t.NotInPosComponent)},canActivate:[n,e],data:{title:"Products not in POS"}},{path:"duplicate-sku",loadComponent(){return import("./chunk-YGVY3X52.js").then(t=>t.DuplicateSkuComponent)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"duplicate-sku/table",loadComponent(){return import("./chunk-DEC32FB2.js").then(t=>t.DuplicateSkuV2Component)},canActivate:[n,e],data:{title:"Duplicate Sku in Channel"}},{path:"channel-statistic",loadComponent(){return import("./chunk-OH43UVFL.js").then(t=>t.ChannelStatisticComponent)},canActivate:[n,e],data:{title:"Channel Statistic"}},{path:"notification",loadComponent(){return import("./chunk-ZWW4JHZV.js").then(t=>t.NotificationComponent)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2",loadComponent(){return import("./chunk-O6RJOU3C.js").then(t=>t.NotificationV2Component)},canActivate:[n,e],data:{title:"Notification"}},{path:"notificationV2/detailV2",loadComponent(){return import("./chunk-DUQEV7V7.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}},{path:"notification/detail",loadComponent(){return import("./chunk-NWPQV6XP.js").then(t=>t.DetailComponent)},canActivate:[n,e],data:{title:"Notification Detail"}}]}];export{T as routes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as yt,b as bt}from"./chunk-QUY3OMUB.js";import{a as P,b as E,d as ft,e as ut,f as _t,g as ht,i as R,j as Ct}from"./chunk-NIRJAWTX.js";import{a as N}from"./chunk-RDXDKWLL.js";import{c as Mt}from"./chunk-7BEOEYAC.js";import{a as at}from"./chunk-JY726AM5.js";import{f as ot}from"./chunk-TTMPMWUQ.js";import{b as gt}from"./chunk-47Z3CNAW.js";import{a as ct}from"./chunk-P5OAPFNC.js";import{b as v,c as lt}from"./chunk-NNVT5X6O.js";import{A as pt,h as mt,m as st}from"./chunk-JUXE7GQZ.js";import{b as rt,e as dt}from"./chunk-45DFJJAO.js";import{B as et,D as nt,F as it,r as tt}from"./chunk-4NAKX6WQ.js";import{Ac as q,Bc as F,Ca as D,Eb as k,Ga as w,Kb as A,Kc as J,Lc as Q,Oc as r,Pc as y,Qc as b,Xb as j,bc as u,bd as V,cd as L,dc as _,ec as H,ed as X,fc as K,gc as S,hc as I,ic as c,jb as U,jc as i,kb as O,kc as a,kd as $,lc as p,ld as W,mb as l,md as Z,na as h,pc as G,qc as Y,sc as x,ua as C,va as M,xc as g,zc as m}from"./chunk-ZPV56E2J.js";var T=(function(n){return n.Tokopedia="https://seller.tokopedia.com",n.Shoope="https://seller.shopee.co.id",n.Tiktok="https://seller-id.tiktok.com",n.WooCommerce="https://woocommerce.dealpos.app",n.Lazada="https://sellercenter.lazada.co.id",n})(T||{});var z={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var Tt=[[["header"]],[["content"]],[["footer"]]],Ot=["header","content","footer"],kt=(n,d)=>({bodyScrollable:n,hideScrollbar:d}),Dt=(n,d,t,o)=>({"bg-success":n,"bg-warning":d,"bg-info":t,"bg-danger":o}),wt=n=>({"mx-auto":n}),St=(n,d)=>({"show-footer":n,"p-0":d});function It(n,d){if(n&1){let t=x();i(0,"div",7),g("click",function(){C(t);let e=m();return M(e.onBack.emit())}),i(1,"a",8),p(2,"i",9),a()()}}function Pt(n,d){if(n&1){let t=x();i(0,"div")(1,"a",10),g("click",function(){C(t);let e=m();return M(e.onClose.emit())}),p(2,"i",11),a()()}}function Et(n,d){if(n&1){let t=x();i(0,"a",14),g("click",function(){C(t);let e=m(2);return M(e.onCancel.emit())}),r(1),a()}if(n&2){let t=m(2);l(),b(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel")}}function Ft(n,d){if(n&1){let t=x();i(0,"button",15),g("click",function(){C(t);let e=m(2);return M(e.onOk.emit())})("keyup.F2",function(){C(t);let e=m(2);return M(e.onOk.emit())}),a()}if(n&2){let t=m(2);c("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",U)}}function Vt(n,d){if(n&1&&(i(0,"mat-dialog-actions",6),F(1,2),u(2,Et,2,1,"a",12),u(3,Ft,1,2,"button",13),a()),n&2){let t=m();l(2),_(t.config!=null&&t.config.hideCancel?-1:2),l(),_(t.config!=null&&t.config.hideOk?-1:3)}}var B=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=z.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},vt=(()=>{class n{constructor(){this.dynamicValidated=!0,this.onOk=new D,this.onCancel=new D,this.onClose=new D,this.onBack=new D,this.headerType=z}ngOnInit(){this.config==null&&(this.config=new B)}onKeyup(t){this.config?.disableKeyup||(t.code=="F2"&&this.onOk.emit("F2"),(t.code=="Enter"||t.code=="NumpadEnter")&&this.onOk.emit("Enter"))}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=k({type:n,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:Ot,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],[1,"back-button","position-absolute","pointer","d-print-none"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[1,"modal-body","w-100",3,"ngClass"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"disabled","innerHTML"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(o,e){o&1&&(q(Tt),i(0,"div",0),g("keyup",function(f){return e.onKeyup(f)}),i(1,"div",1),u(2,It,3,0,"div",2),i(3,"div",3)(4,"h4",4),r(5),a(),F(6),a(),u(7,Pt,3,0,"div"),a(),i(8,"mat-dialog-content",5),F(9,1),a(),u(10,Vt,4,2,"mat-dialog-actions",6),a()),o&2&&(J("width",e.config==null?null:e.config.customWidth),c("ngClass",L(10,kt,e.config==null?null:e.config.bodyScrollable,e.config==null?null:e.config.hideScrollbar)),l(),c("ngClass",X(13,Dt,e.headerType.Success==(e.config==null?null:e.config.headerType),e.headerType.Warning==(e.config==null?null:e.config.headerType),e.headerType.Info==(e.config==null?null:e.config.headerType),e.headerType.Error==(e.config==null?null:e.config.headerType))),l(),_(e.config!=null&&e.config.eMoney?2:-1),l(),c("ngClass",V(18,wt,e.config==null?null:e.config.eMoney)),l(2),y(e.config==null?null:e.config.title),l(2),_(e.config!=null&&e.config.hideClose?-1:7),l(),c("ngClass",L(20,St,!(e.config!=null&&e.config.hideFooter),e.config==null?null:e.config.noPadding)),l(2),_(e.config!=null&&e.config.hideFooter?-1:10))},dependencies:[it,tt,ht,ft,_t,ut],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media(max-width:992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media(max-width:576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})}}return n})();var $t=n=>[n];function Nt(n,d){if(n&1&&(i(0,"tr")(1,"td",11),r(2),a(),i(3,"td",11),r(4),a(),i(5,"td",12)(6,"p",13),r(7,"Product Not in Channel!"),a()()()),n&2){let t=m().$implicit;l(2),b(" ",t==null?null:t.Model," "),l(2),b(" ",t==null?null:t.Code," ")}}function Rt(n,d){if(n&1&&(i(0,"td",11),r(1),a()),n&2){let t=m(3).$implicit;j("rowspan",t.Channel.length),l(),b(" ",t==null?null:t.Model," ")}}function At(n,d){if(n&1&&(i(0,"td",11),r(1),a()),n&2){let t=m(3).$implicit;j("rowspan",t.Channel.length),l(),b(" ",t==null?null:t.Code," ")}}function jt(n,d){if(n&1){let t=x();G(0),i(1,"button",25),g("click",function(){C(t);let e=m().$implicit,s=m(2).$implicit,f=m();return M(f.onDetach(e,s))}),p(2,"i",26),i(3,"span",24),r(4,"Detach"),a()(),Y()}}function Ht(n,d){if(n&1&&(i(0,"tr"),u(1,Rt,2,2,"td",11),u(2,At,2,2,"td",11),i(3,"td",11)(4,"div",14)(5,"a",15),p(6,"img",16),a(),i(7,"div",17),r(8),a()()(),i(9,"td",11),r(10),$(11,"number"),a(),i(12,"td",18),r(13),$(14,"number"),a(),i(15,"td",18),r(16),$(17,"date"),a(),i(18,"td",19)(19,"div",20),A(20,jt,5,0,"ng-container",21),i(21,"a",22),p(22,"i",23),i(23,"span",24),r(24,"Edit"),a()()()()()),n&2){let t=d.$implicit,o=d.$index,e=m(3);l(),_(o==0?1:-1),l(),_(o==0?2:-1),l(3),c("href",t.Url,O)("title",t.Title),l(),c("src",e.getChannelLogo(t.TypeID),O),l(),c("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),l(),b(" ",t.Name," "),l(2),y(W(11,15,t.Price)),l(3),y(W(14,17,t.Inventory)),l(3),y(Z(17,19,t.Created,"short")),l(4),c("ngxPermissionsOnly",V(22,$t,e.detachProductRole)),l(),Q("is-disabled",t.TypeID==e.channelType.KalCare),c("href",e.getHyperlinkSellerCenter(t),O)("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Lt(n,d){if(n&1&&S(0,Ht,25,24,"tr",null,H),n&2){let t=m().$implicit;I(t==null?null:t.Channel)}}function Wt(n,d){if(n&1&&u(0,Nt,8,2,"tr")(1,Lt,2,0),n&2){let t=d.$implicit;_(!t.Channel||t.Channel.length<1?0:1)}}var be=(()=>{class n{constructor(){this.data=h(E),this.dialogRef=h(P),this.httpService=h(dt),this.toastr=h(rt),this.variants=w([]),this.channelType=v;let t=this.data;this.variants.set(this.data.variants),this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new R,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="1000px"}onDetach(t,o){let e={ChannelID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariationID:t.ChannelVariationID};this.httpService.post(ct.DetachVariant,[e]).subscribe(s=>{this.toastr.success(s.Message,"Success"),this.updateVariantAfterDetach(o,t.ChannelVariationID)})}updateVariantAfterDetach(t,o){this.variants.update(e=>{let s=e.findIndex(f=>f.ID===t.ID);return s!==-1&&(e[s].Channel=e[s].Channel.filter(f=>f.ChannelVariationID!==o)),[...e]})}getChannelLogo(t){return lt.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let o="javascript:void(0)";switch(t.TypeID){case v.Shopee:o=`${T.Shoope}/portal/product/${t.ChannelItemID}`;break;case v.Tiktok:o=`${T.Tiktok}/product/edit/${t.ChannelItemID}`;break;case v.Tokopedia:o=`${T.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case v.WooCommerce:o=`${T.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case v.Lazada:o=`${T.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return o}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=k({type:n,selectors:[["app-modal-variant"]],decls:29,vars:1,consts:[[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top",2,"width","15%"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","10%"],[1,"text-start","sticky-top",2,"width","30%"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","18%"],[1,"text-start","sticky-top",2,"width","7%"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[4,"ngxPermissionsOnly"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"],[1,"fs-6"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"]],template:function(o,e){o&1&&(i(0,"modal-material",0),g("onClose",function(){return e.dialogRef.close()})("onCancel",function(){return e.dialogRef.close()}),i(1,"content")(2,"table",1)(3,"thead",2)(4,"tr")(5,"th",3)(6,"div",4)(7,"span"),r(8,"VARIANT"),a(),i(9,"sup"),p(10,"i",5),a()()(),i(11,"th",6),r(12,"SKU"),a(),i(13,"th",7)(14,"div",4)(15,"span"),r(16,"PRODUCT"),a(),i(17,"sup"),p(18,"i",8),a()()(),i(19,"th",6),r(20,"PRICE"),a(),i(21,"th",6),r(22,"INVENTORY"),a(),i(23,"th",9),r(24,"SYNCED ON"),a(),p(25,"th",10),a()(),i(26,"tbody"),S(27,Wt,2,1,null,null,H),a()()()()),o&2&&(c("config",e.modalConfig),l(27),I(e.variants()))},dependencies:[N,gt,vt,nt,et],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"],changeDetection:0})}}return n})();function zt(n,d){if(n&1&&(i(0,"mat-option",5)(1,"div"),p(2,"img",6),i(3,"span"),r(4),a()()()),n&2){let t=d.$implicit;c("value",t.ChannelID),l(2),c("src",t.logo,O),l(2),y(t.Title)}}var Re=(()=>{class n{constructor(){this.dialogRef=h(P),this.channels=h(E),this.channelIds=w([]),this.channelOptions=w([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((o,e,s)=>s.findIndex(f=>f.ChannelID===o.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new R,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(o=>this.channelIds().includes(o.ChannelID)).map(o=>({ChannelID:o.ChannelID,ChannelItemID:o.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=k({type:n,selectors:[["app-modal-detach-product"]],decls:9,vars:4,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(o,e){o&1&&(i(0,"modal-material",0),g("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),i(1,"div",1)(2,"div")(3,"label",2),r(4,"Select a Channel"),a(),i(5,"mat-form-field",3)(6,"mat-select",4),g("ngModelChange",function(f){return e.channelIds.set(f)}),S(7,zt,5,3,"mat-option",5,K),a()()()()()),o&2&&(c("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),l(6),c("ngModel",e.channelIds())("multiple",!0),l(),I(e.channelOptions()))},dependencies:[Ct,at,ot,bt,yt,Mt,pt,mt,st,N],encapsulation:2,changeDetection:0})}}return n})();export{be as a,Re as b};
|
|
1
|
+
import{a as yt,b as bt}from"./chunk-26I3WOHT.js";import{a as P,b as E,d as ft,e as ut,f as _t,g as ht,i as R,j as Ct}from"./chunk-NIRJAWTX.js";import{a as N}from"./chunk-RDXDKWLL.js";import{c as Mt}from"./chunk-7BEOEYAC.js";import{a as at}from"./chunk-JY726AM5.js";import{f as ot}from"./chunk-TTMPMWUQ.js";import{b as gt}from"./chunk-47Z3CNAW.js";import{a as ct}from"./chunk-P5OAPFNC.js";import{b as v,c as lt}from"./chunk-NNVT5X6O.js";import{h as mt,m as st,z as pt}from"./chunk-BUBQQEYA.js";import{b as rt,e as dt}from"./chunk-45DFJJAO.js";import{B as et,D as nt,F as it,r as tt}from"./chunk-4NAKX6WQ.js";import{Ac as q,Bc as F,Ca as D,Eb as k,Ga as w,Kb as A,Kc as J,Lc as Q,Oc as r,Pc as y,Qc as b,Xb as j,bc as u,bd as V,cd as L,dc as _,ec as H,ed as X,fc as K,gc as S,hc as I,ic as c,jb as U,jc as i,kb as O,kc as a,kd as $,lc as p,ld as W,mb as l,md as Z,na as h,pc as G,qc as Y,sc as x,ua as C,va as M,xc as g,zc as m}from"./chunk-ZPV56E2J.js";var T=(function(n){return n.Tokopedia="https://seller.tokopedia.com",n.Shoope="https://seller.shopee.co.id",n.Tiktok="https://seller-id.tiktok.com",n.WooCommerce="https://woocommerce.dealpos.app",n.Lazada="https://sellercenter.lazada.co.id",n})(T||{});var z={Success:"Success",Info:"Info",Warning:"Warning",Error:"Error"};var Tt=[[["header"]],[["content"]],[["footer"]]],Ot=["header","content","footer"],kt=(n,d)=>({bodyScrollable:n,hideScrollbar:d}),Dt=(n,d,t,o)=>({"bg-success":n,"bg-warning":d,"bg-info":t,"bg-danger":o}),wt=n=>({"mx-auto":n}),St=(n,d)=>({"show-footer":n,"p-0":d});function It(n,d){if(n&1){let t=x();i(0,"div",7),g("click",function(){C(t);let e=m();return M(e.onBack.emit())}),i(1,"a",8),p(2,"i",9),a()()}}function Pt(n,d){if(n&1){let t=x();i(0,"div")(1,"a",10),g("click",function(){C(t);let e=m();return M(e.onClose.emit())}),p(2,"i",11),a()()}}function Et(n,d){if(n&1){let t=x();i(0,"a",14),g("click",function(){C(t);let e=m(2);return M(e.onCancel.emit())}),r(1),a()}if(n&2){let t=m(2);l(),b(" ",t.config!=null&&t.config.cancelText?t.config==null?null:t.config.cancelText:"Cancel")}}function Ft(n,d){if(n&1){let t=x();i(0,"button",15),g("click",function(){C(t);let e=m(2);return M(e.onOk.emit())})("keyup.F2",function(){C(t);let e=m(2);return M(e.onOk.emit())}),a()}if(n&2){let t=m(2);c("disabled",!(t.config!=null&&t.config.validated)||!t.dynamicValidated)("innerHTML",t.config!=null&&t.config.okText?t.config==null?null:t.config.okText:"Ok (F2)",U)}}function Vt(n,d){if(n&1&&(i(0,"mat-dialog-actions",6),F(1,2),u(2,Et,2,1,"a",12),u(3,Ft,1,2,"button",13),a()),n&2){let t=m();l(2),_(t.config!=null&&t.config.hideCancel?-1:2),l(),_(t.config!=null&&t.config.hideOk?-1:3)}}var B=class{constructor(){this.title="New Modal",this.okText="Ok (F2)",this.cancelText="Cancel",this.hideFooter=!1,this.hideCancel=!1,this.hideOk=!1,this.hideClose=!1,this.eMoney=!1,this.headerType=z.Success,this.validated=!0,this.customWidth="initial",this.bodyScrollable=!1,this.hideScrollbar=!1,this.disableKeyup=!1,this.noPadding=!1}},vt=(()=>{class n{constructor(){this.dynamicValidated=!0,this.onOk=new D,this.onCancel=new D,this.onClose=new D,this.onBack=new D,this.headerType=z}ngOnInit(){this.config==null&&(this.config=new B)}onKeyup(t){this.config?.disableKeyup||(t.code=="F2"&&this.onOk.emit("F2"),(t.code=="Enter"||t.code=="NumpadEnter")&&this.onOk.emit("Enter"))}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=k({type:n,selectors:[["modal-material"]],inputs:{config:"config",dynamicValidated:"dynamicValidated"},outputs:{onOk:"onOk",onCancel:"onCancel",onClose:"onClose",onBack:"onBack"},ngContentSelectors:Ot,decls:11,vars:23,consts:[["id","modal_material",1,"modal-material","d-flex","align-items-start","flex-column","position-relative","maxHeight",3,"keyup","ngClass"],["mat-dialog-title","",1,"d-flex","w-100","justify-content-between","modal-header","position-relative",3,"ngClass"],[1,"back-button","position-absolute","pointer","d-print-none"],[1,"d-flex","flex-row","d-print-none","align-items-center",3,"ngClass"],[1,"fw-normal"],[1,"modal-body","w-100",3,"ngClass"],[1,"w-100","py-7","border-top","d-flex","justify-content-end","d-print-none"],[1,"back-button","position-absolute","pointer","d-print-none",3,"click"],[1,"btn","back-button"],[1,"fa-solid","fa-arrow-left"],[1,"btn-light-blue","btn-sm","pointer","close",3,"click"],[1,"fa-solid","fa-xmark","fa-lg","text-primary"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"disabled","innerHTML"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],["data-cy","btn-ok",1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click","keyup.F2","disabled","innerHTML"]],template:function(o,e){o&1&&(q(Tt),i(0,"div",0),g("keyup",function(f){return e.onKeyup(f)}),i(1,"div",1),u(2,It,3,0,"div",2),i(3,"div",3)(4,"h4",4),r(5),a(),F(6),a(),u(7,Pt,3,0,"div"),a(),i(8,"mat-dialog-content",5),F(9,1),a(),u(10,Vt,4,2,"mat-dialog-actions",6),a()),o&2&&(J("width",e.config==null?null:e.config.customWidth),c("ngClass",L(10,kt,e.config==null?null:e.config.bodyScrollable,e.config==null?null:e.config.hideScrollbar)),l(),c("ngClass",X(13,Dt,e.headerType.Success==(e.config==null?null:e.config.headerType),e.headerType.Warning==(e.config==null?null:e.config.headerType),e.headerType.Info==(e.config==null?null:e.config.headerType),e.headerType.Error==(e.config==null?null:e.config.headerType))),l(),_(e.config!=null&&e.config.eMoney?2:-1),l(),c("ngClass",V(18,wt,e.config==null?null:e.config.eMoney)),l(2),y(e.config==null?null:e.config.title),l(2),_(e.config!=null&&e.config.hideClose?-1:7),l(),c("ngClass",L(20,St,!(e.config!=null&&e.config.hideFooter),e.config==null?null:e.config.noPadding)),l(2),_(e.config!=null&&e.config.hideFooter?-1:10))},dependencies:[it,tt,ht,ft,_t,ut],styles:[".mat-mdc-dialog-container{padding:0!important;border-radius:4px!important;overflow:visible!important} .mat-mdc-dialog-container [mat-dialog-title]{color:#fff;padding:15px;border:none}@media print{ .mat-mdc-dialog-container{box-shadow:unset;width:100vw}}@media print{ .cdk-overlay-pane{position:absolute!important;top:-30px;max-width:100vw!important}.modal-body[_ngcontent-%COMP%]{width:100vw!important}}body.modal-body[_ngcontent-%COMP%]{height:100%;overflow-y:hidden}mat-dialog-actions[_ngcontent-%COMP%]{bottom:15px}mat-dialog-actions[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{padding:15px!important;margin-right:12px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:15px!important}mat-dialog-actions[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin-right:auto;margin-top:-1rem;padding-top:.4rem!important;margin-left:1rem}.back-button[_ngcontent-%COMP%]{top:5px;left:0}.close[_ngcontent-%COMP%]{padding:.4rem .5rem}.no-padding[_ngcontent-%COMP%]{padding:0}.modal-material[_ngcontent-%COMP%]{width:40vw}@media(max-width:992px){.modal-material[_ngcontent-%COMP%]{width:50vw!important}}@media(max-width:576px){ .dialog-filter .modal-material{width:100%!important} .dialog-filter mat-dialog-actions{position:sticky;bottom:0;background:#fff} .dialog-filter .modal-material.d-flex.align-items-start.flex-column.position-relative.maxHeight.bodyScrollable.maxHeight.bodyScrollable .modal-body{max-height:100%!important;overflow-y:auto}}.maxHeight.bodyScrollable[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow-y:auto}.modal-header[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%], .modal-footer[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{padding:15px}.modal-dialog[_ngcontent-%COMP%]{max-width:none}.modal-content[_ngcontent-%COMP%]{width:auto;margin:auto;max-width:850px}.maxHeight[_ngcontent-%COMP%] .modal-body[_ngcontent-%COMP%]{max-height:450px;overflow:auto}.modal-body[_ngcontent-%COMP%]{padding:1rem}.modal-body[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block}.modal-body[_ngcontent-%COMP%] .more[_ngcontent-%COMP%]{margin:0;position:absolute;bottom:-20px}.modal-body[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], .modal-body[_ngcontent-%COMP%] input[type=password][_ngcontent-%COMP%]{border:1px solid #c8d3df;padding:5px 7px}.modal-body[_ngcontent-%COMP%] table[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:330px;height:90px}"]})}}return n})();var $t=n=>[n];function Nt(n,d){if(n&1&&(i(0,"tr")(1,"td",11),r(2),a(),i(3,"td",11),r(4),a(),i(5,"td",12)(6,"p",13),r(7,"Product Not in Channel!"),a()()()),n&2){let t=m().$implicit;l(2),b(" ",t==null?null:t.Model," "),l(2),b(" ",t==null?null:t.Code," ")}}function Rt(n,d){if(n&1&&(i(0,"td",11),r(1),a()),n&2){let t=m(3).$implicit;j("rowspan",t.Channel.length),l(),b(" ",t==null?null:t.Model," ")}}function At(n,d){if(n&1&&(i(0,"td",11),r(1),a()),n&2){let t=m(3).$implicit;j("rowspan",t.Channel.length),l(),b(" ",t==null?null:t.Code," ")}}function jt(n,d){if(n&1){let t=x();G(0),i(1,"button",25),g("click",function(){C(t);let e=m().$implicit,s=m(2).$implicit,f=m();return M(f.onDetach(e,s))}),p(2,"i",26),i(3,"span",24),r(4,"Detach"),a()(),Y()}}function Ht(n,d){if(n&1&&(i(0,"tr"),u(1,Rt,2,2,"td",11),u(2,At,2,2,"td",11),i(3,"td",11)(4,"div",14)(5,"a",15),p(6,"img",16),a(),i(7,"div",17),r(8),a()()(),i(9,"td",11),r(10),$(11,"number"),a(),i(12,"td",18),r(13),$(14,"number"),a(),i(15,"td",18),r(16),$(17,"date"),a(),i(18,"td",19)(19,"div",20),A(20,jt,5,0,"ng-container",21),i(21,"a",22),p(22,"i",23),i(23,"span",24),r(24,"Edit"),a()()()()()),n&2){let t=d.$implicit,o=d.$index,e=m(3);l(),_(o==0?1:-1),l(),_(o==0?2:-1),l(3),c("href",t.Url,O)("title",t.Title),l(),c("src",e.getChannelLogo(t.TypeID),O),l(),c("matTooltip",(t==null||t.Name==null?null:t.Name.length)>40?t==null?null:t.Name:""),l(),b(" ",t.Name," "),l(2),y(W(11,15,t.Price)),l(3),y(W(14,17,t.Inventory)),l(3),y(Z(17,19,t.Created,"short")),l(4),c("ngxPermissionsOnly",V(22,$t,e.detachProductRole)),l(),Q("is-disabled",t.TypeID==e.channelType.KalCare),c("href",e.getHyperlinkSellerCenter(t),O)("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Lt(n,d){if(n&1&&S(0,Ht,25,24,"tr",null,H),n&2){let t=m().$implicit;I(t==null?null:t.Channel)}}function Wt(n,d){if(n&1&&u(0,Nt,8,2,"tr")(1,Lt,2,0),n&2){let t=d.$implicit;_(!t.Channel||t.Channel.length<1?0:1)}}var be=(()=>{class n{constructor(){this.data=h(E),this.dialogRef=h(P),this.httpService=h(dt),this.toastr=h(rt),this.variants=w([]),this.channelType=v;let t=this.data;this.variants.set(this.data.variants),this.title=t.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new R,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideFooter=!0,this.modalConfig.customWidth="1000px"}onDetach(t,o){let e={ChannelID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariationID:t.ChannelVariationID};this.httpService.post(ct.DetachVariant,[e]).subscribe(s=>{this.toastr.success(s.Message,"Success"),this.updateVariantAfterDetach(o,t.ChannelVariationID)})}updateVariantAfterDetach(t,o){this.variants.update(e=>{let s=e.findIndex(f=>f.ID===t.ID);return s!==-1&&(e[s].Channel=e[s].Channel.filter(f=>f.ChannelVariationID!==o)),[...e]})}getChannelLogo(t){return lt.getChannelLogoByTypeId(t)}getHyperlinkSellerCenter(t){let o="javascript:void(0)";switch(t.TypeID){case v.Shopee:o=`${T.Shoope}/portal/product/${t.ChannelItemID}`;break;case v.Tiktok:o=`${T.Tiktok}/product/edit/${t.ChannelItemID}`;break;case v.Tokopedia:o=`${T.Tokopedia}/edit-product/${t.ChannelItemID}`;break;case v.WooCommerce:o=`${T.WooCommerce}/wp-admin/post.php?post=${t.ChannelItemID}&action=edit`;break;case v.Lazada:o=`${T.Lazada}/apps/product/publish?productId=${t.ChannelItemID}`;break}return o}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=k({type:n,selectors:[["app-modal-variant"]],decls:29,vars:1,consts:[[3,"onClose","onCancel","config"],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top",2,"width","15%"],[1,"d-flex","align-items-center"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","10%"],[1,"text-start","sticky-top",2,"width","30%"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","18%"],[1,"text-start","sticky-top",2,"width","7%"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],[1,"text-end"],[1,"d-flex","align-items-center","justify-content-end"],[4,"ngxPermissionsOnly"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","matTooltip"],[1,"fa-solid","fa-edit","me-2",2,"font-size","10px"],[1,"fs-6"],[1,"btn","btn-small","btn-light","px-4","py-2","me-3",3,"click"],[1,"fa-sharp","fa-link-slash","me-2",2,"font-size","10px"]],template:function(o,e){o&1&&(i(0,"modal-material",0),g("onClose",function(){return e.dialogRef.close()})("onCancel",function(){return e.dialogRef.close()}),i(1,"content")(2,"table",1)(3,"thead",2)(4,"tr")(5,"th",3)(6,"div",4)(7,"span"),r(8,"VARIANT"),a(),i(9,"sup"),p(10,"i",5),a()()(),i(11,"th",6),r(12,"SKU"),a(),i(13,"th",7)(14,"div",4)(15,"span"),r(16,"PRODUCT"),a(),i(17,"sup"),p(18,"i",8),a()()(),i(19,"th",6),r(20,"PRICE"),a(),i(21,"th",6),r(22,"INVENTORY"),a(),i(23,"th",9),r(24,"SYNCED ON"),a(),p(25,"th",10),a()(),i(26,"tbody"),S(27,Wt,2,1,null,null,H),a()()()()),o&2&&(c("config",e.modalConfig),l(27),I(e.variants()))},dependencies:[N,gt,vt,nt,et],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"],changeDetection:0})}}return n})();function zt(n,d){if(n&1&&(i(0,"mat-option",5)(1,"div"),p(2,"img",6),i(3,"span"),r(4),a()()()),n&2){let t=d.$implicit;c("value",t.ChannelID),l(2),c("src",t.logo,O),l(2),y(t.Title)}}var Re=(()=>{class n{constructor(){this.dialogRef=h(P),this.channels=h(E),this.channelIds=w([]),this.channelOptions=w([])}ngOnInit(){this.initModalConfig();let t=this.channels.filter((o,e,s)=>s.findIndex(f=>f.ChannelID===o.ChannelID)===e);this.channelOptions.set(t)}initModalConfig(){this.modalConfig=new R,this.modalConfig.title="Detach Product",this.modalConfig.okText="Save"}onClose(){this.dialogRef.close()}onSave(){let t=this.channels.filter(o=>this.channelIds().includes(o.ChannelID)).map(o=>({ChannelID:o.ChannelID,ChannelItemID:o.ChannelItemID}));this.dialogRef.close(t)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=k({type:n,selectors:[["app-modal-detach-product"]],decls:9,vars:4,consts:[[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","ngModel","multiple"],[1,"channel-option",3,"value"],[2,"width","18px","margin-right","10px",3,"src"]],template:function(o,e){o&1&&(i(0,"modal-material",0),g("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSave()}),i(1,"div",1)(2,"div")(3,"label",2),r(4,"Select a Channel"),a(),i(5,"mat-form-field",3)(6,"mat-select",4),g("ngModelChange",function(f){return e.channelIds.set(f)}),S(7,zt,5,3,"mat-option",5,K),a()()()()()),o&2&&(c("dynamicValidated",e.channelIds().length>0)("config",e.modalConfig),l(6),c("ngModel",e.channelIds())("multiple",!0),l(),I(e.channelOptions()))},dependencies:[Ct,at,ot,bt,yt,Mt,pt,mt,st,N],encapsulation:2,changeDetection:0})}}return n})();export{be as a,Re as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-J3PHESB2.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-7R55YTL6.js";import{c as l,g as m}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import"./chunk-4NAKX6WQ.js";import{Eb as r,Ga as n,ic as a,jc as s,kc as p,lc as o,mb as i}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{class e{constructor(){this.tabs=n([{Title:"Roles",Url:"/menu/profile/roles"}])}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=r({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(t,u){t&1&&(s(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),p()()(),o(4,"router-outlet")),t&2&&(i(3),a("Tabs",u.tabs())("usePermissions",!0))},dependencies:[c,m,l],encapsulation:2,changeDetection:0})}}return e})();var P=[{path:"",component:d,children:[{path:"",redirectTo:"roles",pathMatch:"full"},{path:"roles",loadComponent:()=>import("./chunk-
|
|
1
|
+
import{a as c}from"./chunk-J3PHESB2.js";import"./chunk-RDXDKWLL.js";import"./chunk-47Z3CNAW.js";import"./chunk-7KKV4BRH.js";import"./chunk-7R55YTL6.js";import{c as l,g as m}from"./chunk-OF426VSL.js";import"./chunk-K5XOH3VV.js";import"./chunk-4NAKX6WQ.js";import{Eb as r,Ga as n,ic as a,jc as s,kc as p,lc as o,mb as i}from"./chunk-ZPV56E2J.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var d=(()=>{class e{constructor(){this.tabs=n([{Title:"Roles",Url:"/menu/profile/roles"}])}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=r({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(t,u){t&1&&(s(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),p()()(),o(4,"router-outlet")),t&2&&(i(3),a("Tabs",u.tabs())("usePermissions",!0))},dependencies:[c,m,l],encapsulation:2,changeDetection:0})}}return e})();var P=[{path:"",component:d,children:[{path:"",redirectTo:"roles",pathMatch:"full"},{path:"roles",loadComponent:()=>import("./chunk-ENV5ILJK.js").then(e=>e.RolesInfoComponent),data:{title:"Roles Info"}}]}];export{P as routes};
|