marketplacepos 6.17.0 → 6.19.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/3rdpartylicenses.txt +5 -5
- package/Marketplace/{chunk-T6DQK4NF.js → chunk-2DV24JBD.js} +2 -2
- package/Marketplace/{chunk-2V7MNEUM.js → chunk-2G2ZG7P4.js} +1 -1
- package/Marketplace/chunk-2LTHZRWP.js +1 -0
- package/Marketplace/{chunk-O25VE5LE.js → chunk-2SUANHOV.js} +1 -1
- package/Marketplace/{chunk-VNHCKVBS.js → chunk-2ZZNLHWW.js} +1 -1
- package/Marketplace/{chunk-6PB45QZ6.js → chunk-32HSZCBG.js} +1 -1
- package/Marketplace/{chunk-KOGQHIDC.js → chunk-32OSPXJU.js} +1 -1
- package/Marketplace/{chunk-K5BJGBUJ.js → chunk-34ILCW6U.js} +1 -1
- package/Marketplace/{chunk-VUYPSK3A.js → chunk-365O4SS2.js} +1 -1
- package/Marketplace/chunk-36LKCSM2.js +4 -0
- package/Marketplace/{chunk-R2ULTKA5.js → chunk-37OESP7B.js} +1 -1
- package/Marketplace/{chunk-7FNQ2GQS.js → chunk-3GYZZ3EG.js} +1 -1
- package/Marketplace/{chunk-UZBNAFOW.js → chunk-4JJE5JHZ.js} +1 -1
- package/Marketplace/{chunk-TF3XKSU7.js → chunk-4LHR7JAU.js} +3 -3
- package/Marketplace/{chunk-IEDJTOMP.js → chunk-4NNXFIUJ.js} +1 -1
- package/Marketplace/{chunk-BEILTIPT.js → chunk-4WC3IZRX.js} +1 -1
- package/Marketplace/{chunk-CSKWOS5O.js → chunk-54L2OUK3.js} +1 -1
- package/Marketplace/chunk-56C34CV5.js +1 -0
- package/Marketplace/{chunk-AKBZT5IA.js → chunk-5D44RPPS.js} +1 -1
- package/Marketplace/{chunk-4NJQ2IME.js → chunk-5NEIE5HB.js} +1 -1
- package/Marketplace/{chunk-3OQULH4O.js → chunk-63LSQDMA.js} +1 -1
- package/Marketplace/{chunk-S4BKNFXC.js → chunk-7BQYN4GT.js} +1 -1
- package/Marketplace/{chunk-OUK3PRAJ.js → chunk-7EVPQZ6Q.js} +1 -1
- package/Marketplace/{chunk-Z2DNU7GV.js → chunk-7N33NRDX.js} +1 -1
- package/Marketplace/{chunk-TAPLTW2W.js → chunk-7UHWXWA2.js} +1 -1
- package/Marketplace/{chunk-3LRU75PM.js → chunk-7Y3NVT7M.js} +1 -1
- package/Marketplace/{chunk-EYUFYH5J.js → chunk-A5JZTVK5.js} +1 -1
- package/Marketplace/{chunk-TZUM4ZLW.js → chunk-A664VTNX.js} +1 -1
- package/Marketplace/{chunk-O5RZ2MVP.js → chunk-A7RDSABB.js} +2 -2
- package/Marketplace/chunk-ANUE2E7J.js +1 -0
- package/Marketplace/{chunk-2PZ6CJXM.js → chunk-BATP3UT2.js} +1 -1
- package/Marketplace/{chunk-GUUW43WS.js → chunk-BBDEOGZB.js} +1 -1
- package/Marketplace/{chunk-THQBY3F5.js → chunk-BFIQ4SOP.js} +1 -1
- package/Marketplace/{chunk-6TX26J3J.js → chunk-BLDOT3XP.js} +2 -2
- package/Marketplace/{chunk-L77Z3QKG.js → chunk-BX3QTIHM.js} +1 -1
- package/Marketplace/{chunk-6N43GVXM.js → chunk-CLJK4GVI.js} +1 -1
- package/Marketplace/{chunk-3HXHU3WO.js → chunk-CN7KD52R.js} +1 -1
- package/Marketplace/{chunk-TWMDEAOZ.js → chunk-COWHSAON.js} +1 -1
- package/Marketplace/{chunk-RJIE3C6S.js → chunk-CXQKMNR2.js} +1 -1
- package/Marketplace/{chunk-CPZTM7IY.js → chunk-D5FA3NGH.js} +1 -1
- package/Marketplace/{chunk-AIEBXZIK.js → chunk-DCHKF6RJ.js} +1 -1
- package/Marketplace/{chunk-4DL2VMP3.js → chunk-DDSBZSY4.js} +1 -1
- package/Marketplace/{chunk-QQTGBJTB.js → chunk-DW5H6W2C.js} +1 -1
- package/Marketplace/{chunk-DGUHZAEF.js → chunk-ECSX5ZE4.js} +1 -1
- package/Marketplace/{chunk-3IFI3DA7.js → chunk-ESO5REBW.js} +1 -1
- package/Marketplace/chunk-F3P5RHY4.js +1 -0
- package/Marketplace/chunk-FDTKJPLI.js +1 -0
- package/Marketplace/{chunk-JFD33K4G.js → chunk-FHIF25KA.js} +1 -1
- package/Marketplace/chunk-FNTPBTTV.js +1 -0
- package/Marketplace/chunk-FUTK6QMY.js +7 -0
- package/Marketplace/chunk-G75V2E4K.js +2 -0
- package/Marketplace/{chunk-2SLUX5IP.js → chunk-GBMLCFTT.js} +1 -1
- package/Marketplace/{chunk-RVIAPUFN.js → chunk-GCSJ6NJM.js} +1 -1
- package/Marketplace/{chunk-HGW7I5IX.js → chunk-GGZDFRFZ.js} +1 -1
- package/Marketplace/{chunk-V3HBIN5L.js → chunk-H726YK3G.js} +1 -1
- package/Marketplace/{chunk-C5B5J463.js → chunk-HRWFHHKF.js} +1 -1
- package/Marketplace/{chunk-6DLMY2CE.js → chunk-HTOHEGB7.js} +1 -1
- package/Marketplace/{chunk-PFT7FFT2.js → chunk-IQR2WEDT.js} +1 -1
- package/Marketplace/chunk-IYZVUNAY.js +1 -0
- package/Marketplace/{chunk-YM2R62TX.js → chunk-IZAH5TUX.js} +1 -1
- package/Marketplace/{chunk-KUDGADGS.js → chunk-JJKP3GRX.js} +1 -1
- package/Marketplace/{chunk-UD7O7OMH.js → chunk-JK3YUTMR.js} +1 -1
- package/Marketplace/chunk-K5T4OQRD.js +2 -0
- package/Marketplace/{chunk-7OD22M3E.js → chunk-LWQZVL5N.js} +1 -1
- package/Marketplace/{chunk-CZWCG4XL.js → chunk-LZMNV472.js} +1 -1
- package/Marketplace/{chunk-PTZOQ2QK.js → chunk-M7NBK4HY.js} +1 -1
- package/Marketplace/{chunk-GIK2G4XA.js → chunk-NDIBZOU6.js} +1 -1
- package/Marketplace/{chunk-6AT43CWE.js → chunk-NDRU6FBJ.js} +1 -1
- package/Marketplace/{chunk-7NB32HQO.js → chunk-NRLFWA4W.js} +1 -1
- package/Marketplace/{chunk-B67MU32B.js → chunk-NWHKY2P7.js} +1 -1
- package/Marketplace/{chunk-RSZD2W7L.js → chunk-NXRGI7CZ.js} +1 -1
- package/Marketplace/{chunk-GWTBS7JO.js → chunk-OCT64TN4.js} +1 -1
- package/Marketplace/{chunk-KOQCUDJP.js → chunk-OKKGHENO.js} +1 -1
- package/Marketplace/{chunk-NPSFAAOD.js → chunk-OMH57KD7.js} +1 -1
- package/Marketplace/{chunk-3KBCOKLA.js → chunk-OPYTMXMU.js} +1 -1
- package/Marketplace/{chunk-GFWH2QRZ.js → chunk-OSVST5NN.js} +1 -1
- package/Marketplace/{chunk-ORMNHQPL.js → chunk-OW72HS7D.js} +2 -2
- package/Marketplace/{chunk-IBG7FC22.js → chunk-OZQZGYOJ.js} +1 -1
- package/Marketplace/{chunk-QWRGY7GQ.js → chunk-P2PEXPLR.js} +1 -1
- package/Marketplace/{chunk-6X4DXODE.js → chunk-P32P7ZKJ.js} +1 -1
- package/Marketplace/{chunk-SQBMRR3H.js → chunk-PKFPPYOR.js} +1 -1
- package/Marketplace/{chunk-QLE45R2S.js → chunk-PUFSSODE.js} +1 -1
- package/Marketplace/chunk-QJBMZORV.js +1 -0
- package/Marketplace/{chunk-TEROB6SI.js → chunk-QJEZSBZH.js} +1 -1
- package/Marketplace/{chunk-DFUNNDYJ.js → chunk-QOMGXG3D.js} +1 -1
- package/Marketplace/{chunk-5UTHBN4S.js → chunk-QTPHQFF6.js} +1 -1
- package/Marketplace/{chunk-LAWTMIGQ.js → chunk-QWTYBPTC.js} +1 -1
- package/Marketplace/chunk-RCAFDVFQ.js +2 -0
- package/Marketplace/chunk-REDZXDT4.js +1 -0
- package/Marketplace/{chunk-57YAHKSG.js → chunk-RMM4HPQP.js} +1 -1
- package/Marketplace/{chunk-33KT5YKU.js → chunk-RSIF3XW6.js} +1 -1
- package/Marketplace/{chunk-LMPEFINE.js → chunk-RUUPFOQL.js} +1 -1
- package/Marketplace/{chunk-CDM2TOJL.js → chunk-RZ7XRGOD.js} +1 -1
- package/Marketplace/{chunk-5PDKID4R.js → chunk-S556CT7K.js} +2 -2
- package/Marketplace/{chunk-SVCHYSQL.js → chunk-S5RARZKI.js} +1 -1
- package/Marketplace/{chunk-2HJPRGPE.js → chunk-SGB73VYO.js} +1 -1
- package/Marketplace/{chunk-JDVIHJTE.js → chunk-SZPHSLCO.js} +2 -2
- package/Marketplace/{chunk-YJ5IKHSO.js → chunk-T33JLUIT.js} +1 -1
- package/Marketplace/{chunk-6DMPONYO.js → chunk-T6KWZJ5S.js} +1 -1
- package/Marketplace/{chunk-C63EIRLC.js → chunk-TACHWGFG.js} +1 -1
- package/Marketplace/{chunk-WUN3TOT7.js → chunk-TAUSJXWP.js} +1 -1
- package/Marketplace/{chunk-Y7LL5UP5.js → chunk-TLJY2ATV.js} +1 -1
- package/Marketplace/{chunk-EWQJIV56.js → chunk-TOEAJ56H.js} +1 -1
- package/Marketplace/{chunk-P76E2LDH.js → chunk-TT3DAJWO.js} +1 -1
- package/Marketplace/{chunk-T2662ZTD.js → chunk-TT6CCLM2.js} +1 -1
- package/Marketplace/{chunk-75OJU4OV.js → chunk-UMLUJN5P.js} +1 -1
- package/Marketplace/chunk-USQRFHZB.js +1 -0
- package/Marketplace/{chunk-K55YWORT.js → chunk-VSMFVCAN.js} +1 -1
- package/Marketplace/chunk-VTOHO6GD.js +1 -0
- package/Marketplace/{chunk-6M6TTQHG.js → chunk-VVW65V7P.js} +1 -1
- package/Marketplace/{chunk-CRUK4B3B.js → chunk-WBJ6ZGVS.js} +2 -2
- package/Marketplace/{chunk-4J2W5534.js → chunk-XBEUN56L.js} +1 -1
- package/Marketplace/{chunk-WFZFCP74.js → chunk-XMFNGNU5.js} +1 -1
- package/Marketplace/{chunk-HIZ6BMXD.js → chunk-Y3RBQXHH.js} +1 -1
- package/Marketplace/{chunk-BJOTP6SW.js → chunk-YG4NUBEY.js} +1 -1
- package/Marketplace/{chunk-WXGLHRHV.js → chunk-YZL5QTHK.js} +1 -1
- package/Marketplace/chunk-YZVMGFZA.js +1 -0
- package/Marketplace/{chunk-4L4F4YDJ.js → chunk-Z2JUFVEC.js} +1 -1
- package/Marketplace/{chunk-XTA2FHBE.js → chunk-Z7W2JO3S.js} +1 -1
- package/Marketplace/{chunk-RJKR3IQP.js → chunk-ZDZED34Z.js} +1 -1
- package/Marketplace/{chunk-GTFV3ZPW.js → chunk-ZU7IFJTM.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/{main-IPQOTDK6.js → main-TEMA7UIC.js} +2 -2
- package/package.json +1 -1
- package/Marketplace/chunk-65RTUXHR.js +0 -1
- package/Marketplace/chunk-A3AORE6F.js +0 -1
- package/Marketplace/chunk-CUHQVRXW.js +0 -2
- package/Marketplace/chunk-G74QFY62.js +0 -1
- package/Marketplace/chunk-H55PZBCT.js +0 -1
- package/Marketplace/chunk-LDWSSQUQ.js +0 -1
- package/Marketplace/chunk-NSH3XZXC.js +0 -1
- package/Marketplace/chunk-OBQF757V.js +0 -4
- package/Marketplace/chunk-PV6PZQ5L.js +0 -1
- package/Marketplace/chunk-PXMRNUFQ.js +0 -1
- package/Marketplace/chunk-QVQK7ZHE.js +0 -1
- package/Marketplace/chunk-RZVVHDQ5.js +0 -1
- package/Marketplace/chunk-VMJQJV6R.js +0 -2
- package/Marketplace/chunk-VZSU7T3T.js +0 -1
- package/Marketplace/chunk-WWUWKWE2.js +0 -1
- package/Marketplace/chunk-XC7OQBOZ.js +0 -1
- package/Marketplace/chunk-XYJFKYWS.js +0 -7
- package/Marketplace/chunk-YQLGG4VE.js +0 -1
|
@@ -169,6 +169,11 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
169
169
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
170
170
|
THE SOFTWARE.
|
|
171
171
|
|
|
172
|
+
--------------------------------------------------------------------------------
|
|
173
|
+
Package: bigger-picture
|
|
174
|
+
License: "MIT"
|
|
175
|
+
|
|
176
|
+
|
|
172
177
|
--------------------------------------------------------------------------------
|
|
173
178
|
Package: autonumeric
|
|
174
179
|
License: "MIT"
|
|
@@ -197,11 +202,6 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
197
202
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
198
203
|
OTHER DEALINGS IN THE SOFTWARE.
|
|
199
204
|
|
|
200
|
-
--------------------------------------------------------------------------------
|
|
201
|
-
Package: bigger-picture
|
|
202
|
-
License: "MIT"
|
|
203
|
-
|
|
204
|
-
|
|
205
205
|
--------------------------------------------------------------------------------
|
|
206
206
|
Package: @primeuix/motion
|
|
207
207
|
License: "MIT"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as Ot}from"./chunk-42F2XHMN.js";import{a as Ft}from"./chunk-7HJRODVG.js";import{b as Et}from"./chunk-KHG2CM5S.js";import{a as St,b as Tt,g as It,i as Rt,j as Bt}from"./chunk-TZKJPNYV.js";import{a as Ct}from"./chunk-3ZLKAFXU.js";import{b as Vt}from"./chunk-3LRU75PM.js";import{a as At}from"./chunk-GVNUAV72.js";import{a as vt}from"./chunk-FWUEMMUS.js";import{a as Nt}from"./chunk-POKR5NDC.js";import{d as Gt}from"./chunk-LR2HY6YC.js";import{a as Dt}from"./chunk-JFGCW6ML.js";import{C as bt,D as ht,H as ft,j as ut,l as pt,v as P,w as mt}from"./chunk-2JS4LVCG.js";import{c as _t}from"./chunk-SH7PSBLU.js";import{A as wt,a as yt,c as kt,h as xt,m as Mt}from"./chunk-IOSMSIMJ.js";import{e as I}from"./chunk-UB4NDUUT.js";import{B as ct,x as gt}from"./chunk-BI4K5Y2V.js";import{$b as x,Ac as tt,Bc as et,Ca as _,Cc as V,Dc as O,Eb as y,Ed as d,Fb as J,Ga as c,Gb as K,Hc as ot,Jc as F,Mc as p,Nc as at,Pa as q,Pc as nt,Qc as it,Rc as lt,Sc as rt,V as z,Xb as k,Zc as st,aa as H,bc as M,gc as m,ha as W,hc as r,hd as S,ia as Q,ic as s,id as T,ja as X,jc as b,la as A,ma as $,mb as g,na as l,qc as w,qd as dt,t as N,ua as f,va as v,vc as u,xc as C,yc as Z,zc as Y,zd as L}from"./chunk-32SEKQJM.js";import{a as E,b as G}from"./chunk-66YHNWRR.js";var Jt=["button"],Kt=["*"];function Zt(n,D){if(n&1&&(r(0,"div",2),b(1,"mat-pseudo-checkbox",6),s()),n&2){let t=C();g(),m("disabled",t.disabled)}}var Pt=new A("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:()=>({hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1})}),jt=new A("MatButtonToggleGroup"),Yt={provide:yt,useExisting:W(()=>j),multi:!0},R=class{source;value;constructor(D,t){this.source=D,this.value=t}},j=(()=>{class n{_changeDetector=l(L);_dir=l(bt,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(t){this._name=t,this._markButtonsForCheck()}_name=l(P).getId("mat-button-toggle-group-");vertical;get value(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(o=>o.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}valueChange=new _;get selected(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=t,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new _;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(t){this._hideMultipleSelectionIndicator=t,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let t=l(Pt,{optional:!0});this.appearance=t&&t.appearance?t.appearance:"standard",this.hideSingleSelectionIndicator=t?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=t?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new Et(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked)),this.multiple||this._initializeTabIndex()}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_keydown(t){if(this.multiple||this.disabled||mt(t))return;let e=t.target.id,a=this._buttonToggles.toArray().findIndex(h=>h.buttonId===e),i=null;switch(t.keyCode){case 32:case 13:i=this._buttonToggles.get(a)||null;break;case 38:i=this._getNextButton(a,-1);break;case 37:i=this._getNextButton(a,this.dir==="ltr"?-1:1);break;case 40:i=this._getNextButton(a,1);break;case 39:i=this._getNextButton(a,this.dir==="ltr"?1:-1);break;default:return}i&&(t.preventDefault(),i._onButtonClick(),i.focus())}_emitChangeEvent(t){let o=new R(t,this.value);this._rawValue=o.value,this._controlValueAccessorChangeFn(o.value),this.change.emit(o)}_syncButtonToggle(t,o,e=!1,a=!1){!this.multiple&&this.selected&&!t.checked&&(this.selected.checked=!1),this._selectionModel?o?this._selectionModel.select(t):this._selectionModel.deselect(t):a=!0,a?Promise.resolve().then(()=>this._updateModelValue(t,e)):this._updateModelValue(t,e)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(o=>t.value!=null&&o===t.value):t.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(t=>{t.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let t=0;t<this._buttonToggles.length;t++){let o=this._buttonToggles.get(t);if(!o.disabled){o.tabIndex=0;break}}}_getNextButton(t,o){let e=this._buttonToggles;for(let a=1;a<=e.length;a++){let i=(t+o*a+e.length)%e.length,h=e.get(i);if(h&&!h.disabled)return h}return null}_setSelectionByValue(t){if(this._rawValue=t,!this._buttonToggles)return;let o=this._buttonToggles.toArray();if(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(e=>this._selectValue(e,o))):(this._clearSelection(),this._selectValue(t,o)),!this.multiple&&o.every(e=>e.tabIndex===-1)){for(let e of o)if(!e.disabled){e.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>{t.checked=!1,this.multiple||(t.tabIndex=-1)})}_selectValue(t,o){for(let e of o)if(e.value===t){e.checked=!0,this._selectionModel.select(e),this.multiple||(e.tabIndex=0);break}}_updateModelValue(t,o){o&&this._emitChangeEvent(t),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(t=>t._markForCheck())}static \u0275fac=function(o){return new(o||n)};static \u0275dir=K({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(o,e,a){if(o&1&&tt(a,B,5),o&2){let i;V(i=O())&&(e._buttonToggles=i)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(o,e){o&1&&u("keydown",function(i){return e._keydown(i)}),o&2&&(k("role",e.multiple?"group":"radiogroup")("aria-disabled",e.disabled),F("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard",e.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",d],value:"value",multiple:[2,"multiple","multiple",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",d],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",d]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[st([Yt,{provide:jt,useExisting:n}])]})}return n})(),B=(()=>{class n{_changeDetectorRef=l(L);_elementRef=l(q);_focusMonitor=l(ut);_idGenerator=l(P);_animationDisabled=ft();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(t){this._tabIndex.set(t)}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=t}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new _;constructor(){l(pt).load(Dt);let t=l(jt,{optional:!0}),o=l(new dt("tabindex"),{optional:!0})||"",e=l(Pt,{optional:!0});this._tabIndex=c(parseInt(o)||0),this.buttonToggleGroup=t,this.appearance=e&&e.appearance?e.appearance:"standard",this.disabledInteractive=e?.disabledInteractive??!1}ngOnInit(){let t=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){if(this.disabled)return;let t=this.isSingleSelector()?!0:!this._checked;if(t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let o=this.buttonToggleGroup._buttonToggles.find(e=>e.tabIndex===0);o&&(o.tabIndex=-1),this.tabIndex=0}this.change.emit(new R(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=y({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(o,e){if(o&1&&et(Jt,5),o&2){let a;V(a=O())&&(e._buttonElement=a.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(o,e){o&1&&u("focus",function(){return e.focus()}),o&2&&(k("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),F("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-disabled-interactive",e.disabledInteractive)("mat-button-toggle-appearance-standard",e.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",d],appearance:"appearance",checked:[2,"checked","checked",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Kt,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(o,e){if(o&1){let a=w();Z(),r(0,"button",1,0),u("click",function(){return f(a),v(e._onButtonClick())}),x(2,Zt,2,1,"div",2),r(3,"span",3),Y(4),s()(),b(5,"span",4)(6,"span",5)}if(o&2){let a=ot(1);m("id",e.buttonId)("disabled",e.disabled&&!e.disabledInteractive||null),k("role",e.isSingleSelector()?"radio":"button")("tabindex",e.disabled&&!e.disabledInteractive?-1:e.tabIndex)("aria-pressed",e.isSingleSelector()?null:e.checked)("aria-checked",e.isSingleSelector()?e.checked:null)("name",e._getButtonName())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-disabled",e.disabled&&e.disabledInteractive?"true":null),g(2),M(e.buttonToggleGroup&&(!e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideSingleSelectionIndicator||e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),g(4),m("matRippleTrigger",a)("matRippleDisabled",e.disableRipple||e.disabled)}},dependencies:[Gt,At],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-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)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
2
|
-
`],encapsulation:2,changeDetection:0})}return n})(),Ut=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=J({type:n});static \u0275inj=X({imports:[Nt,B,ht]})}return n})();var U=(function(n){return n[n.CSV=0]="CSV",n[n.XLSX=1]="XLSX",n})(U||{}),zt=(()=>{class n{constructor(t){this.http=t}exportCSV(t,o){let e=G(E({},o),{Export:!0,FormatType:U.CSV});this.downloadFile(t,e)}exportCSVIds(t,o){this.downloadFile(t,o)}exportXlsx(t,o){let e=G(E({},o),{FormatType:U.XLSX});this.downloadFile(t,e)}downloadFile(t,o){this.http.postFile(`/api/${t}`,o).subscribe(e=>{let a=window.URL.createObjectURL(e.file),i=document.createElement("a");i.download=this.getFilenameFromContentDisposition(e.title),i.href=a,i.click(),URL.revokeObjectURL(a),i.remove()})}getFilenameFromContentDisposition(t){let e=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(t);return e!=null&&e[1]?e[1].replace(/['"]/g,""):""}exportJSON(t,o,e){this.http.post(`/api/${t}`,e).subscribe(a=>{var i=JSON.stringify(a,null," ");this.downloadJSON(i,o+".json")})}downloadJSON(t,o){var e=new Blob([t],{type:"data:application/json;charset=utf-8"}),a=document.createElement("a");a.setAttribute("href",window.URL.createObjectURL(e)),a.setAttribute("download",o),document.body.appendChild(a),a.click(),document.body.removeChild(a)}static{this.\u0275fac=function(o){return new(o||n)($(I))}}static{this.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function ee(n,D){if(n&1){let t=w();r(0,"i",18),u("click",function(){f(t);let e=C();return v(e.getTotalRowCount())}),s()}}var We=(()=>{class n{constructor(){this.dialogRef=l(St),this.item=l(Tt),this.exportService=l(zt),this.httpService=l(I),this.displayedMinRangeRow=c(1),this.displayedMaxRangeRow=c(1e4),this.pageNumber=c(1),this.rowCount=c(1e4),this.isShowTotalRowCount=c(!1),this.filter=c({}),this.filter.set(this.item.filterExport)}ngOnInit(){this.initModalConfig()}getTotalRowCount(){this.totalRowCount$=this.httpService.post(`/api/${this.item.getRowCountApi}`,this.item.filterExport).pipe(N(t=>t.Total!=null?t.Total:t.Count||0),H(t=>{this.isShowTotalRowCount.set(!0),t<this.displayedMaxRangeRow()&&this.setMinMaxRangeDisplayedRow(t)}),N(t=>Math.floor(t/this.rowCount())+(t%this.rowCount()>0?1:0)),z(1))}initModalConfig(){this.modalConfig=new Rt,this.modalConfig.title=`${this.item?.title}`,this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0}onSubmit(){this.filter.update(t=>(t.RowCount=this.rowCount(),t.PageNumber=this.pageNumber(),t)),this.exportService.exportCSV(this.item.exportApi,this.filter()),this.dialogRef.close()}onClose(){this.dialogRef.close()}onPageNumberChange(t){this.pageNumber.set(t),this.setDisplayedMinMaxRangeRow()}setMinMaxRangeDisplayedRow(t){for(;this.displayedMaxRangeRow()>t&&this.pageNumber()>1;)this.pageNumber.update(o=>(o-=1,o)),this.setDisplayedMinMaxRangeRow();this.displayedMaxRangeRow.set(t)}setDisplayedMinMaxRangeRow(){let t=this.pageNumber()*this.rowCount()-this.rowCount()+1;this.displayedMinRangeRow.set(t),this.displayedMaxRangeRow.set(this.pageNumber()*this.rowCount())}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=y({type:n,selectors:[["app-modal-export"]],decls:30,vars:13,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"container-fluid"],[1,"row"],[1,"col-3","fw-bold",2,"display","flex","align-items","center"],[1,"col-9"],["value","CSV",3,"checked"],[1,"fa-solid","fa-file-csv","me-3","mb-1"],[1,"row","mt-8"],[1,"col-3","d-flex","align-items-center","fw-bold"],[1,"col-auto","d-flex","align-items-center"],["type","text","autoNum","","name","pageNumber","id","pageNumber",1,"form-control","text-center",2,"width","50px",3,"ngModelChange","ngModel"],[1,"ms-3"],[1,"fa-solid","fa-circle-question","mx-3"],[1,"fw-bold"],[1,"col-12","mt-8"],[1,"p-5",2,"background-color","#add8e6","border-radius","4px"],[1,"fa-solid","fa-circle-exclamation","mx-3"],[1,"fa-solid","fa-circle-question","mx-3",3,"click"]],template:function(o,e){o&1&&(r(0,"modal-material",0),u("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),r(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),p(5," Format "),s(),r(6,"div",5)(7,"mat-button-toggle-group")(8,"mat-button-toggle",6),b(9,"i",7),p(10,"CSV "),s()()()(),r(11,"div",8)(12,"div",9),p(13,"Page"),s(),r(14,"div",10)(15,"input",11),rt("ngModelChange",function(i){return lt(e.item.pageNumber,i)||(e.item.pageNumber=i),i}),u("ngModelChange",function(i){return e.onPageNumberChange(i)}),s(),r(16,"span",12),p(17,"of "),x(18,ee,1,0,"i",13),r(19,"span",14),p(20),S(21,"async"),s(),p(22," page(s)"),s()()(),r(23,"div",3)(24,"div",15)(25,"div",16),b(26,"i",17),p(27),S(28,"number"),S(29,"number"),s()()()()()()),o&2&&(m("config",e.modalConfig),g(8),m("checked",!0),g(7),it("ngModel",e.item.pageNumber),g(3),M(e.isShowTotalRowCount()==!1?18:-1),g(2),at(T(21,7,e.totalRowCount$)),g(7),nt(" Exporting data from ",T(28,9,e.displayedMinRangeRow())," - ",T(29,11,e.displayedMaxRangeRow())," "))},dependencies:[wt,kt,xt,Mt,
|
|
1
|
+
import{b as Ft}from"./chunk-42F2XHMN.js";import{b as Et}from"./chunk-KHG2CM5S.js";import{a as Ot}from"./chunk-7HJRODVG.js";import{a as St,b as Tt,g as It,i as Rt,j as Bt}from"./chunk-TZKJPNYV.js";import{a as Ct}from"./chunk-3ZLKAFXU.js";import{a as At}from"./chunk-GVNUAV72.js";import{b as Vt}from"./chunk-7Y3NVT7M.js";import{a as vt}from"./chunk-FWUEMMUS.js";import{a as Nt}from"./chunk-POKR5NDC.js";import{d as Gt}from"./chunk-LR2HY6YC.js";import{a as Dt}from"./chunk-JFGCW6ML.js";import{C as bt,D as ht,H as ft,j as ut,l as pt,v as P,w as mt}from"./chunk-2JS4LVCG.js";import{c as _t}from"./chunk-SH7PSBLU.js";import{A as wt,a as yt,c as kt,h as xt,m as Mt}from"./chunk-IOSMSIMJ.js";import{e as I}from"./chunk-UB4NDUUT.js";import{B as ct,x as gt}from"./chunk-BI4K5Y2V.js";import{$b as x,Ac as tt,Bc as et,Ca as _,Cc as V,Dc as O,Eb as y,Ed as d,Fb as J,Ga as c,Gb as K,Hc as ot,Jc as F,Mc as p,Nc as at,Pa as q,Pc as nt,Qc as it,Rc as lt,Sc as rt,V as z,Xb as k,Zc as st,aa as H,bc as M,gc as m,ha as W,hc as r,hd as S,ia as Q,ic as s,id as T,ja as X,jc as b,la as A,ma as $,mb as g,na as l,qc as w,qd as dt,t as N,ua as f,va as v,vc as u,xc as C,yc as Z,zc as Y,zd as L}from"./chunk-32SEKQJM.js";import{a as E,b as G}from"./chunk-66YHNWRR.js";var Jt=["button"],Kt=["*"];function Zt(n,D){if(n&1&&(r(0,"div",2),b(1,"mat-pseudo-checkbox",6),s()),n&2){let t=C();g(),m("disabled",t.disabled)}}var Pt=new A("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:()=>({hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1})}),jt=new A("MatButtonToggleGroup"),Yt={provide:yt,useExisting:W(()=>j),multi:!0},R=class{source;value;constructor(D,t){this.source=D,this.value=t}},j=(()=>{class n{_changeDetector=l(L);_dir=l(bt,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(t){this._name=t,this._markButtonsForCheck()}_name=l(P).getId("mat-button-toggle-group-");vertical;get value(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(o=>o.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}valueChange=new _;get selected(){let t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=t,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new _;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(t){this._hideMultipleSelectionIndicator=t,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let t=l(Pt,{optional:!0});this.appearance=t&&t.appearance?t.appearance:"standard",this.hideSingleSelectionIndicator=t?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=t?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new Et(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked)),this.multiple||this._initializeTabIndex()}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_keydown(t){if(this.multiple||this.disabled||mt(t))return;let e=t.target.id,a=this._buttonToggles.toArray().findIndex(h=>h.buttonId===e),i=null;switch(t.keyCode){case 32:case 13:i=this._buttonToggles.get(a)||null;break;case 38:i=this._getNextButton(a,-1);break;case 37:i=this._getNextButton(a,this.dir==="ltr"?-1:1);break;case 40:i=this._getNextButton(a,1);break;case 39:i=this._getNextButton(a,this.dir==="ltr"?1:-1);break;default:return}i&&(t.preventDefault(),i._onButtonClick(),i.focus())}_emitChangeEvent(t){let o=new R(t,this.value);this._rawValue=o.value,this._controlValueAccessorChangeFn(o.value),this.change.emit(o)}_syncButtonToggle(t,o,e=!1,a=!1){!this.multiple&&this.selected&&!t.checked&&(this.selected.checked=!1),this._selectionModel?o?this._selectionModel.select(t):this._selectionModel.deselect(t):a=!0,a?Promise.resolve().then(()=>this._updateModelValue(t,e)):this._updateModelValue(t,e)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(o=>t.value!=null&&o===t.value):t.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(t=>{t.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let t=0;t<this._buttonToggles.length;t++){let o=this._buttonToggles.get(t);if(!o.disabled){o.tabIndex=0;break}}}_getNextButton(t,o){let e=this._buttonToggles;for(let a=1;a<=e.length;a++){let i=(t+o*a+e.length)%e.length,h=e.get(i);if(h&&!h.disabled)return h}return null}_setSelectionByValue(t){if(this._rawValue=t,!this._buttonToggles)return;let o=this._buttonToggles.toArray();if(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(e=>this._selectValue(e,o))):(this._clearSelection(),this._selectValue(t,o)),!this.multiple&&o.every(e=>e.tabIndex===-1)){for(let e of o)if(!e.disabled){e.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>{t.checked=!1,this.multiple||(t.tabIndex=-1)})}_selectValue(t,o){for(let e of o)if(e.value===t){e.checked=!0,this._selectionModel.select(e),this.multiple||(e.tabIndex=0);break}}_updateModelValue(t,o){o&&this._emitChangeEvent(t),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(t=>t._markForCheck())}static \u0275fac=function(o){return new(o||n)};static \u0275dir=K({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(o,e,a){if(o&1&&tt(a,B,5),o&2){let i;V(i=O())&&(e._buttonToggles=i)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(o,e){o&1&&u("keydown",function(i){return e._keydown(i)}),o&2&&(k("role",e.multiple?"group":"radiogroup")("aria-disabled",e.disabled),F("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard",e.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",d],value:"value",multiple:[2,"multiple","multiple",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",d],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",d]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[st([Yt,{provide:jt,useExisting:n}])]})}return n})(),B=(()=>{class n{_changeDetectorRef=l(L);_elementRef=l(q);_focusMonitor=l(ut);_idGenerator=l(P);_animationDisabled=ft();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(t){this._tabIndex.set(t)}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=t}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new _;constructor(){l(pt).load(Dt);let t=l(jt,{optional:!0}),o=l(new dt("tabindex"),{optional:!0})||"",e=l(Pt,{optional:!0});this._tabIndex=c(parseInt(o)||0),this.buttonToggleGroup=t,this.appearance=e&&e.appearance?e.appearance:"standard",this.disabledInteractive=e?.disabledInteractive??!1}ngOnInit(){let t=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){if(this.disabled)return;let t=this.isSingleSelector()?!0:!this._checked;if(t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let o=this.buttonToggleGroup._buttonToggles.find(e=>e.tabIndex===0);o&&(o.tabIndex=-1),this.tabIndex=0}this.change.emit(new R(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=y({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(o,e){if(o&1&&et(Jt,5),o&2){let a;V(a=O())&&(e._buttonElement=a.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(o,e){o&1&&u("focus",function(){return e.focus()}),o&2&&(k("aria-label",null)("aria-labelledby",null)("id",e.id)("name",null),F("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-disabled-interactive",e.disabledInteractive)("mat-button-toggle-appearance-standard",e.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",d],appearance:"appearance",checked:[2,"checked","checked",d],disabled:[2,"disabled","disabled",d],disabledInteractive:[2,"disabledInteractive","disabledInteractive",d]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:Kt,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(o,e){if(o&1){let a=w();Z(),r(0,"button",1,0),u("click",function(){return f(a),v(e._onButtonClick())}),x(2,Zt,2,1,"div",2),r(3,"span",3),Y(4),s()(),b(5,"span",4)(6,"span",5)}if(o&2){let a=ot(1);m("id",e.buttonId)("disabled",e.disabled&&!e.disabledInteractive||null),k("role",e.isSingleSelector()?"radio":"button")("tabindex",e.disabled&&!e.disabledInteractive?-1:e.tabIndex)("aria-pressed",e.isSingleSelector()?null:e.checked)("aria-checked",e.isSingleSelector()?e.checked:null)("name",e._getButtonName())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-disabled",e.disabled&&e.disabledInteractive?"true":null),g(2),M(e.buttonToggleGroup&&(!e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideSingleSelectionIndicator||e.buttonToggleGroup.multiple&&!e.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),g(4),m("matRippleTrigger",a)("matRippleDisabled",e.disableRipple||e.disabled)}},dependencies:[Gt,At],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-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)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
2
|
+
`],encapsulation:2,changeDetection:0})}return n})(),Ut=(()=>{class n{static \u0275fac=function(o){return new(o||n)};static \u0275mod=J({type:n});static \u0275inj=X({imports:[Nt,B,ht]})}return n})();var U=(function(n){return n[n.CSV=0]="CSV",n[n.XLSX=1]="XLSX",n})(U||{}),zt=(()=>{class n{constructor(t){this.http=t}exportCSV(t,o){let e=G(E({},o),{Export:!0,FormatType:U.CSV});this.downloadFile(t,e)}exportCSVIds(t,o){this.downloadFile(t,o)}exportXlsx(t,o){let e=G(E({},o),{FormatType:U.XLSX});this.downloadFile(t,e)}downloadFile(t,o){this.http.postFile(`/api/${t}`,o).subscribe(e=>{let a=window.URL.createObjectURL(e.file),i=document.createElement("a");i.download=this.getFilenameFromContentDisposition(e.title),i.href=a,i.click(),URL.revokeObjectURL(a),i.remove()})}getFilenameFromContentDisposition(t){let e=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(t);return e!=null&&e[1]?e[1].replace(/['"]/g,""):""}exportJSON(t,o,e){this.http.post(`/api/${t}`,e).subscribe(a=>{var i=JSON.stringify(a,null," ");this.downloadJSON(i,o+".json")})}downloadJSON(t,o){var e=new Blob([t],{type:"data:application/json;charset=utf-8"}),a=document.createElement("a");a.setAttribute("href",window.URL.createObjectURL(e)),a.setAttribute("download",o),document.body.appendChild(a),a.click(),document.body.removeChild(a)}static{this.\u0275fac=function(o){return new(o||n)($(I))}}static{this.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();function ee(n,D){if(n&1){let t=w();r(0,"i",18),u("click",function(){f(t);let e=C();return v(e.getTotalRowCount())}),s()}}var We=(()=>{class n{constructor(){this.dialogRef=l(St),this.item=l(Tt),this.exportService=l(zt),this.httpService=l(I),this.displayedMinRangeRow=c(1),this.displayedMaxRangeRow=c(1e4),this.pageNumber=c(1),this.rowCount=c(1e4),this.isShowTotalRowCount=c(!1),this.filter=c({}),this.filter.set(this.item.filterExport)}ngOnInit(){this.initModalConfig()}getTotalRowCount(){this.totalRowCount$=this.httpService.post(`/api/${this.item.getRowCountApi}`,this.item.filterExport).pipe(N(t=>t.Total!=null?t.Total:t.Count||0),H(t=>{this.isShowTotalRowCount.set(!0),t<this.displayedMaxRangeRow()&&this.setMinMaxRangeDisplayedRow(t)}),N(t=>Math.floor(t/this.rowCount())+(t%this.rowCount()>0?1:0)),z(1))}initModalConfig(){this.modalConfig=new Rt,this.modalConfig.title=`${this.item?.title}`,this.modalConfig.customWidth="450px",this.modalConfig.hideCancel=!0}onSubmit(){this.filter.update(t=>(t.RowCount=this.rowCount(),t.PageNumber=this.pageNumber(),t)),this.exportService.exportCSV(this.item.exportApi,this.filter()),this.dialogRef.close()}onClose(){this.dialogRef.close()}onPageNumberChange(t){this.pageNumber.set(t),this.setDisplayedMinMaxRangeRow()}setMinMaxRangeDisplayedRow(t){for(;this.displayedMaxRangeRow()>t&&this.pageNumber()>1;)this.pageNumber.update(o=>(o-=1,o)),this.setDisplayedMinMaxRangeRow();this.displayedMaxRangeRow.set(t)}setDisplayedMinMaxRangeRow(){let t=this.pageNumber()*this.rowCount()-this.rowCount()+1;this.displayedMinRangeRow.set(t),this.displayedMaxRangeRow.set(this.pageNumber()*this.rowCount())}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=y({type:n,selectors:[["app-modal-export"]],decls:30,vars:13,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"container-fluid"],[1,"row"],[1,"col-3","fw-bold",2,"display","flex","align-items","center"],[1,"col-9"],["value","CSV",3,"checked"],[1,"fa-solid","fa-file-csv","me-3","mb-1"],[1,"row","mt-8"],[1,"col-3","d-flex","align-items-center","fw-bold"],[1,"col-auto","d-flex","align-items-center"],["type","text","autoNum","","name","pageNumber","id","pageNumber",1,"form-control","text-center",2,"width","50px",3,"ngModelChange","ngModel"],[1,"ms-3"],[1,"fa-solid","fa-circle-question","mx-3"],[1,"fw-bold"],[1,"col-12","mt-8"],[1,"p-5",2,"background-color","#add8e6","border-radius","4px"],[1,"fa-solid","fa-circle-exclamation","mx-3"],[1,"fa-solid","fa-circle-question","mx-3",3,"click"]],template:function(o,e){o&1&&(r(0,"modal-material",0),u("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),r(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),p(5," Format "),s(),r(6,"div",5)(7,"mat-button-toggle-group")(8,"mat-button-toggle",6),b(9,"i",7),p(10,"CSV "),s()()()(),r(11,"div",8)(12,"div",9),p(13,"Page"),s(),r(14,"div",10)(15,"input",11),rt("ngModelChange",function(i){return lt(e.item.pageNumber,i)||(e.item.pageNumber=i),i}),u("ngModelChange",function(i){return e.onPageNumberChange(i)}),s(),r(16,"span",12),p(17,"of "),x(18,ee,1,0,"i",13),r(19,"span",14),p(20),S(21,"async"),s(),p(22," page(s)"),s()()(),r(23,"div",3)(24,"div",15)(25,"div",16),b(26,"i",17),p(27),S(28,"number"),S(29,"number"),s()()()()()()),o&2&&(m("config",e.modalConfig),g(8),m("checked",!0),g(7),it("ngModel",e.item.pageNumber),g(3),M(e.isShowTotalRowCount()==!1?18:-1),g(2),at(T(21,7,e.totalRowCount$)),g(7),nt(" Exporting data from ",T(28,9,e.displayedMinRangeRow())," - ",T(29,11,e.displayedMaxRangeRow())," "))},dependencies:[wt,kt,xt,Mt,Ft,It,vt,Vt,Ot,Bt,_t,Ct,Ut,j,B,gt,ct],encapsulation:2,changeDetection:0})}}return n})();export{We as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E,b as W,c as k}from"./chunk-
|
|
1
|
+
import{a as E,b as W,c as k}from"./chunk-RSIF3XW6.js";import{a as N}from"./chunk-32HSZCBG.js";import"./chunk-ACIMXBIC.js";import{b as V}from"./chunk-G5DPFGUC.js";import"./chunk-OKMFQVL4.js";import"./chunk-TZKJPNYV.js";import"./chunk-3ZLKAFXU.js";import"./chunk-JU6FJIOF.js";import"./chunk-4LHR7JAU.js";import"./chunk-YJQOSNK6.js";import"./chunk-7X3SWRGG.js";import"./chunk-D5XV3F5J.js";import"./chunk-GVNUAV72.js";import"./chunk-7Y3NVT7M.js";import"./chunk-FWUEMMUS.js";import"./chunk-V66GUTDK.js";import"./chunk-AYV5TW7O.js";import"./chunk-SW3PJVJ6.js";import"./chunk-2QSN46Q7.js";import"./chunk-LTASTRU4.js";import"./chunk-POKR5NDC.js";import"./chunk-LR2HY6YC.js";import"./chunk-JFGCW6ML.js";import"./chunk-L63YO3M7.js";import"./chunk-A2ISS3K6.js";import"./chunk-2JS4LVCG.js";import{c as S}from"./chunk-TACHWGFG.js";import"./chunk-IOSMSIMJ.js";import"./chunk-MMOZES77.js";import"./chunk-UB4NDUUT.js";import"./chunk-JLWI4DHM.js";import"./chunk-ZTKWKQRJ.js";import{z as x}from"./chunk-BI4K5Y2V.js";import"./chunk-ASFPLYOZ.js";import{$b as D,Eb as T,Ga as a,Mc as M,Qc as C,Rc as _,Sc as y,Tc as O,Uc as P,Vc as u,bc as w,gc as f,hc as o,ic as s,jc as v,mb as l,na as g,qc as b,ua as h,va as c,vc as F,xc as L}from"./chunk-32SEKQJM.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function B(r,R){if(r&1&&(o(0,"div",6)(1,"div",7),v(2,"app-table-report",8),s()()),r&2){let e=L(),t=u(0);l(2),f("result",e.result())("header",e.header())("from",t.From)("to",t.To)("type",0)}}var Y=(()=>{class r{constructor(){this.http=g(W),this.datePipe=g(x),this.filter=a(new E),this.maxDate=a(null),this.minDate=a(null),this.result=a([]),this.header=a([]),this.pageTitle=a("New Order");let e=new Date;this.maxDate.set(e),this.minDate.set(S.addDays(e,6)),this.filter.update(t=>(t.From=e,t.To=e,t)),this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=this.filter(),t=S.formatTitleFromDate(e.From,e.To),d=this.datePipe.transform(e.From,t),i=this.datePipe.transform(e.To,"dd MMM yyyy");this.pageTitle.set(`New Order (${t==null?"":d+"-"} ${i})`)}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter.set(e),this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncOrder(this.filter()).then(e=>{this.header.set(e.Header),this.result.set(e.Body)})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275cmp=T({type:r,selectors:[["app-sales-order"]],decls:13,vars:6,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,d){if(t&1){let i=b();O(0),o(1,"mainpanel",0),F("onSubmit",function(){return h(i),c(d.getChannelLogs())}),o(2,"filters")(3,"div")(4,"label",1),M(5,"From/To"),s(),o(6,"div",2)(7,"datepicker",3),y("dateChange",function(n){h(i);let p=u(0);return _(p.From,n)||(p.From=n),c(n)}),s()(),o(8,"div")(9,"datepicker",4),y("dateChange",function(n){h(i);let p=u(0);return _(p.To,n)||(p.To=n),c(n)}),s()()()(),o(10,"content")(11,"div",5),D(12,B,3,5,"div",6),s()()()}if(t&2){let i,m=P(d.filter());l(),f("headerTitle",d.pageTitle())("hideSearchBox",!0),l(6),C("date",m.From),l(2),C("date",m.To),l(3),w((i=d.result())!=null&&i.length?12:-1)}},dependencies:[V,N,k],encapsulation:2,changeDetection:0})}}return r})();export{Y as SalesOrderComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ne,b as Fe}from"./chunk-CXQKMNR2.js";import{a as Pe,b as De,c as Ae}from"./chunk-56C34CV5.js";import{a as Ve}from"./chunk-HTOHEGB7.js";import{a as B}from"./chunk-G75V2E4K.js";import{a as Ee}from"./chunk-32HSZCBG.js";import{a as Me,b as Le}from"./chunk-XA2GD2PT.js";import"./chunk-65B3CW4H.js";import"./chunk-UPP7PYWV.js";import{a as Te}from"./chunk-BX3QTIHM.js";import"./chunk-OENELFWU.js";import"./chunk-Q2SYKVKJ.js";import"./chunk-VFDR5NPN.js";import"./chunk-24WQV4GR.js";import{a as ke}from"./chunk-VHZANZHX.js";import"./chunk-2SUANHOV.js";import{a as ye}from"./chunk-TEPGHGSB.js";import"./chunk-42BVLTJ4.js";import"./chunk-LU4HPRNF.js";import"./chunk-F5Z5UY7J.js";import"./chunk-EGTLH4SZ.js";import"./chunk-ISJ4LKGT.js";import"./chunk-CO4RYE2Z.js";import"./chunk-R4E2KUA4.js";import"./chunk-TCEDNSUD.js";import"./chunk-ZF5KQSJ4.js";import"./chunk-IRD67CHJ.js";import"./chunk-ACIMXBIC.js";import"./chunk-AKXKYRV4.js";import"./chunk-JE2WUBFR.js";import"./chunk-U5MTAUWW.js";import"./chunk-5TH35CMP.js";import{b as xe}from"./chunk-G5DPFGUC.js";import"./chunk-OKMFQVL4.js";import{a as _e,c as be,e as Se,f as we,g as ve}from"./chunk-TZKJPNYV.js";import{a as Ce}from"./chunk-3ZLKAFXU.js";import"./chunk-JU6FJIOF.js";import"./chunk-4LHR7JAU.js";import"./chunk-YJQOSNK6.js";import"./chunk-7X3SWRGG.js";import"./chunk-D5XV3F5J.js";import"./chunk-GVNUAV72.js";import"./chunk-7Y3NVT7M.js";import"./chunk-FWUEMMUS.js";import"./chunk-V66GUTDK.js";import"./chunk-AYV5TW7O.js";import"./chunk-SW3PJVJ6.js";import"./chunk-2QSN46Q7.js";import"./chunk-LTASTRU4.js";import"./chunk-POKR5NDC.js";import"./chunk-LR2HY6YC.js";import"./chunk-NGMSEBXY.js";import"./chunk-JFGCW6ML.js";import"./chunk-L63YO3M7.js";import{b as fe}from"./chunk-A2ISS3K6.js";import"./chunk-2JS4LVCG.js";import"./chunk-A664VTNX.js";import"./chunk-5NEIE5HB.js";import"./chunk-QXRG5XYP.js";import{a as S}from"./chunk-FDTKJPLI.js";import"./chunk-SH7PSBLU.js";import{b as c,c as E}from"./chunk-TACHWGFG.js";import{A as z,b as ue,c as he,h as W,m as R,o as ge}from"./chunk-IOSMSIMJ.js";import"./chunk-MMOZES77.js";import"./chunk-34FX4M3J.js";import{b as M,e as O}from"./chunk-UB4NDUUT.js";import"./chunk-JLWI4DHM.js";import"./chunk-ZTKWKQRJ.js";import{B as de,x as ce,z as me}from"./chunk-BI4K5Y2V.js";import"./chunk-ASFPLYOZ.js";import{$b as y,$c as le,Bc as ee,Cc as te,Dc as ie,E as K,Eb as N,Ga as L,Lc as ne,Mc as s,Nc as P,Oc as D,Qc as w,Rc as v,Sc as x,Tc as oe,Uc as re,V as G,Vc as F,Y as J,Zc as ae,bc as k,cc as Y,ec as Z,fc as $,gc as _,hc as n,hd as A,ia as V,ic as r,id as I,jc as f,jd as pe,kb as X,mb as p,na as g,pd as se,qc as T,t as q,ua as d,va as u,vc as C,xc as h}from"./chunk-32SEKQJM.js";import"./chunk-WFMAM73Y.js";import{a as U,b as Q}from"./chunk-66YHNWRR.js";var Ie=(()=>{class o{constructor(){this.http=g(O),this.toastr=g(M)}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(S.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.ShopeePrintShippingLabel,i).pipe(q(a=>(a&&(a.Number=e),a)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(S.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case c.Tokopedia:let m=window.open("about:blank","_blank");m.document.write(e.File),m.document.close();break;case c.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case c.Shopee:var i=Uint8Array.from(atob(e.File),l=>l.charCodeAt(0)),a=new Blob([i],{type:"octet/stream"});E.openDownloadFile(a,`${e?.Number}.pdf`);break;case c.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Oe=(()=>{class o{constructor(){this.dialogRef=g(_e),this.tandaiSudahDicetak=L(!1)}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak()?1:0)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),s(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),C("ngModelChange",function(m){return i.tandaiSudahDicetak.set(m)}),r(),n(10,"span",7),s(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),C("click",function(){return i.onCancel()}),s(14,"Cancel"),r(),n(15,"button",10),C("click",function(){return i.onPrint()}),s(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),_("ngModel",i.tandaiSudahDicetak()))},dependencies:[z,W,R,ve,we,Se,Le,Me],encapsulation:2,changeDetection:0})}}return o})();var H=(()=>{class o{constructor(){this.httpService=g(O),this.shippingLabelService=g(Ie),this.toastrService=g(M),this.dialog=g(be)}printShippingLabel(e){switch(e?.MarketType){case c.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Shopee));break;case c.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tiktok));break;case c.Tokopedia:this.dialog.open(Oe).afterClosed().pipe(K(t=>E.IsNotEmpty(t)),J(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Tokopedia));break;case c.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,c.Lazada));break;case c.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(a=>({OrderNumber:a.Number,ShopID:a.ShopID})),i="";switch(e[0]?.MarketType){case c.Shopee:i=S.ShopeePrintMultipleShippingLabel;break;case c.Tiktok:i=S.TiktokPrintMultipleShippingLabel;break;case c.Lazada:i=S.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(a=>{var m=Uint8Array.from(atob(a.File),We=>We.charCodeAt(0)),l=new Blob([m],{type:"octet/stream"});E.openDownloadFile(l,`${a?.Name}.pdf`)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=V({token:o,factory:o.\u0275fac})}}return o})();var ze=["contextMenu"],Be=o=>({"td-cell-hover":o});function je(o,b){if(o&1){let e=T();n(0,"button",20),C("click",function(){d(e);let i=h(),a=F(0);return u(i.onDowloadShippingLabel(a))}),f(1,"i",21),n(2,"span"),s(3,"Download Shipping Label"),r()()}}function He(o,b){if(o&1){let e=T();n(0,"input",47),x("ngModelChange",function(i){d(e);let a=h().$implicit;return v(a.selected,i)||(a.selected=i),u(i)}),C("ngModelChange",function(){d(e);let i=h(3),a=F(0);return u(i.onSelectOrders(a))}),r()}if(o&2){let e=h().$implicit,t=h(2);w("ngModel",e.selected),_("disabled",t.selectedChannelType()!=null&&t.selectedChannelType()!=e.MarketType)}}function Ue(o,b){if(o&1&&f(0,"variants-dropdown",39),o&2){let e=h().$implicit;_("variants",e==null?null:e.Variants)}}function Qe(o,b){if(o&1&&f(0,"variant-with-image",40),o&2){let e=h().$implicit;_("variant",e==null?null:e.Variants[0])}}function qe(o,b){if(o&1&&(n(0,"span"),s(1),r()),o&2){let e=h().$implicit;p(),D("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Ke(o,b){if(o&1){let e=T();n(0,"button",48),C("click",function(){d(e);let i=h().$implicit,a=h(2);return u(a.onPrintShippingLabel(i))}),f(1,"i",49),r()}}function Ge(o,b){if(o&1){let e=T();n(0,"tr")(1,"td"),y(2,He,1,2,"input",31),r(),n(3,"td")(4,"div",32),f(5,"img",33),A(6,"channelImage"),n(7,"div",34)(8,"div"),s(9),r(),n(10,"small",35)(11,"span"),s(12),r()()()()(),n(13,"td")(14,"div",36)(15,"div"),f(16,"order-link",37),r(),n(17,"small"),s(18),A(19,"date"),r(),f(20,"br"),n(21,"small"),f(22,"i",38),s(23),r()()(),n(24,"td"),y(25,Ue,1,1,"variants-dropdown",39)(26,Qe,1,1,"variant-with-image",40),r(),n(27,"td",41),s(28),A(29,"number"),r(),n(30,"td",42),C("mouseenter",function(i){let a=d(e).$implicit,m=h(2);return u(m.onMouseEnter(i,a))}),n(31,"div",43)(32,"div",36)(33,"div",44)(34,"span"),s(35),r(),y(36,qe,2,1,"span"),r(),n(37,"small"),s(38),r()()()(),n(39,"td",45),y(40,Ke,2,0,"button",46),r()()}if(o&2){let e=b.$implicit,t=h(2);p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?2:-1),p(3),_("src",I(6,16,e==null?null:e.MarketType),X)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(4),P(e.Outlet),p(3),P(e.ChannelName),p(4),_("order",e),p(2),D(" ",pe(19,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(5),D(" ",e.Customer," "),p(),ne(le(23,Be,(e.Variants==null?null:e.Variants.length)>1)),p(),k((e.Variants==null?null:e.Variants.length)>1?25:26),p(3),P(I(29,21,e.Amount)),p(7),P(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),k(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),p(2),D(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?40:-1)}}function Je(o,b){if(o&1){let e=T();n(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),f(4,"th",25),n(5,"th",26),s(6,"Outlet"),r(),n(7,"th",26),s(8,"Number"),r(),n(9,"th"),s(10,"Items"),r(),n(11,"th",27),s(12,"Amount"),r(),n(13,"th",28),s(14,"Shipping"),r(),f(15,"th",29),r()(),n(16,"tbody"),Z(17,Ge,41,25,"tr",null,Y),r()(),n(19,"app-custom-paginator",30),C("next",function(){d(e);let i=h();return u(i.initAwaitingCollection())})("previous",function(){d(e);let i=h();return u(i.initAwaitingCollection())}),r()()}if(o&2){let e=h(),t=F(0);p(17),$(t),p(2),_("filter",e.filter())("totaldata",t==null?null:t.length)}}function Xe(o,b){o&1&&(n(0,"div",18),f(1,"app-empty-state"),r())}var Zt=(()=>{class o{constructor(){this.printShippingService=g(H),this.orderService=g(B),this.toastr=g(M),this.fulfillmentService=g(Ne),this.channelType=c,this.selectedOrders=L([]),this.selectedChannelType=se(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=L({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(t=>Q(U({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(G(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=N({type:o,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&ee(ze,5),t&2){let a;te(a=ie())&&(i.contextMenuEl=a.first)}},features:[ae([B,H])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-3"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","150px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let a=T();oe(0),A(1,"async"),n(2,"mainpanel",1),C("onSubmit",function(){return d(a),u(i.initAwaitingCollection())}),x("textChange",function(l){return d(a),v(i.filter().Number,l)||(i.filter().Number=l),u(l)}),n(3,"actions"),y(4,je,4,0,"button",2),n(5,"a",3),f(6,"i",4),n(7,"span"),s(8,"Order Fulfillment Display"),r()()(),n(9,"filters")(10,"div")(11,"label",5),s(12,"Channel"),r(),n(13,"app-channel-options-v2",6),x("ngModelChange",function(l){return d(a),v(i.filter().ListChannelID,l)||(i.filter().ListChannelID=l),u(l)}),r()(),n(14,"div",7)(15,"label",5),s(16,"From/To"),r(),n(17,"div",8)(18,"datepicker",9),x("dateChange",function(l){return d(a),v(i.filter().From,l)||(i.filter().From=l),u(l)}),r()(),n(19,"div")(20,"datepicker",10),x("dateChange",function(l){return d(a),v(i.filter().To,l)||(i.filter().To=l),u(l)}),r()()(),n(21,"div",7)(22,"label",11),s(23,"Page Number"),r(),n(24,"input",12),x("ngModelChange",function(l){return d(a),v(i.filter().PageNumber,l)||(i.filter().PageNumber=l),u(l)}),r()(),n(25,"div",7)(26,"label",11),s(27,"Page Size"),r(),n(28,"input",13),x("ngModelChange",function(l){return d(a),v(i.filter().PageSize,l)||(i.filter().PageSize=l),u(l)}),r()()(),n(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),y(33,Je,20,2,"div",17)(34,Xe,2,0,"div",18),r()()()()(),n(35,"app-context-menu",19,0),C("onSelectItem",function(l){return d(a),u(i.onSelectContextItem(l))}),r()}if(t&2){let a=re(I(1,10,i.awaitingCollections$));p(2),w("text",i.filter().Number),p(2),k(i.selectedOrders().length>0?4:-1),p(9),_("multiple",!0),w("ngModel",i.filter().ListChannelID),p(5),w("date",i.filter().From),p(2),w("date",i.filter().To),p(4),w("ngModel",i.filter().PageNumber),p(4),w("ngModel",i.filter().PageSize),p(5),k((a==null?null:a.length)>0?33:34),p(2),_("items",i.contextMenuItems)}},dependencies:[xe,ye,ke,z,he,ge,ue,W,R,De,Ae,Ee,Ce,fe,Ve,Fe,Te,Pe,ce,me,de],encapsulation:2,changeDetection:0})}}return o})();export{Zt as AwaitingCollectionComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as mt}from"./chunk-
|
|
1
|
+
import{c as mt}from"./chunk-TACHWGFG.js";import{ia as dt}from"./chunk-32SEKQJM.js";import{a as We,b as ut,i as at}from"./chunk-66YHNWRR.js";function L(){}var Ge=e=>e;function pt(e,t){for(let n in t)e[n]=t[n];return e}function Mt(e){return e()}function Y(e){e.forEach(Mt)}function Ye(e){return typeof e=="function"}function oe(e,t){return e!=e?t==t:e!==t}function Ot(e){return Object.keys(e).length===0}function Rt(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Rt(t,n))}function Ce(e){return e&&Ye(e.destroy)?e.destroy:L}var Qe=()=>globalThis.performance.now(),xe=e=>requestAnimationFrame(e),he=new Set;function Et(e){he.forEach(t=>{t.c(e)||(he.delete(t),t.f())}),he.size!==0&&xe(Et)}function et(e){let t;return he.size===0&&xe(Et),{promise:new Promise(n=>{he.add(t={c:e,f:n})}),abort(){he.delete(t)}}}function ge(e,t){e.appendChild(t)}function P(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function At(e){return document.createTextNode(e)}function Ee(){return At("")}function N(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function I(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function E(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function R(e,t,n){e.classList[n?"add":"remove"](t)}function Nt(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var pe,tt=0,Ze={};function $t(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
|
|
2
2
|
`;for(let a=0;a<=1;a+=l){let p=t+(n-t)*r(a);f+=a*100+`%{${s(p,1-p)}}
|
|
3
3
|
`}let d=f+`100% {${s(n,1-n)}}
|
|
4
4
|
}`,u=`_bp_${Math.round(Math.random()*1e9)}_${c}`;if(!Ze[u]){if(!pe){let a=C("style");document.head.appendChild(a),pe=a.sheet}Ze[u]=!0,pe.insertRule(`@keyframes ${u} ${d}`,pe.cssRules.length)}let h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${u} ${i}ms linear ${o}ms 1 both`,tt+=1,u}function qe(e,t){e.style.animation=(e.style.animation||"").split(", ").filter(t?n=>n.indexOf(t)<0:n=>n.indexOf("_bp")===-1).join(", "),t&&!--tt&&Yt()}function Yt(){xe(()=>{if(tt)return;let e=pe.cssRules.length;for(;e--;)pe.deleteRule(e);Ze={}})}var nt;function Ie(e){nt=e}var ze=[],ht=[],Oe=[],gt=[],Xt=Promise.resolve(),je=!1;function Wt(){je||(je=!0,Xt.then(Ct))}function ee(e){Oe.push(e)}var Fe=new Set,Le=0;function Ct(){let e=nt;do{for(;Le<ze.length;){let t=ze[Le];Le++,Ie(t),Ft(t.$$)}for(Ie(null),ze.length=0,Le=0;ht.length;)ht.pop()();for(let t=0;t<Oe.length;t+=1){let n=Oe[t];Fe.has(n)||(Fe.add(n),n())}Oe.length=0}while(ze.length);for(;gt.length;)gt.pop()();je=!1,Fe.clear(),Ie(e)}function Ft(e){if(e.fragment!==null){e.update(),Y(e.before_update);let t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ee)}}var Te;function Dt(){return Te||(Te=Promise.resolve(),Te.then(()=>{Te=null})),Te}function Ae(e,t,n){e.dispatchEvent(Nt(`${t?"intro":"outro"}${n}`))}var Re=new Set,U;function te(){U={r:0,c:[],p:U}}function ne(){U.r||Y(U.c),U=U.p}function v(e,t){e&&e.i&&(Re.delete(e),e.i(t))}function $(e,t,n,i){if(e&&e.o){if(Re.has(e))return;Re.add(e),U.c.push(()=>{Re.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}var Pt={duration:0};function St(e,t,n){let i=t(e,n),o=!1,r,s,c=0;function l(){r&&qe(e,r)}function f(){let{delay:u=0,duration:h=300,easing:a=Ge,tick:p=L,css:g}=i||Pt;g&&(r=$t(e,0,1,h,u,a,g,c++)),p(0,1);let k=Qe()+u,H=k+h;s&&s.abort(),o=!0,ee(()=>Ae(e,!0,"start")),s=et(X=>{if(o){if(X>=H)return p(1,0),Ae(e,!0,"end"),l(),o=!1;if(X>=k){let y=a((X-k)/h);p(y,1-y)}}return o})}let d=!1;return{start(){d||(d=!0,qe(e),Ye(i)?(i=i(),Dt().then(f)):f())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function _e(e,t,n){let i=t(e,n),o=!0,r,s=U;s.r+=1;function c(){let{delay:l=0,duration:f=300,easing:d=Ge,tick:u=L,css:h}=i||Pt;h&&(r=$t(e,1,0,f,l,d,h));let a=Qe()+l,p=a+f;ee(()=>Ae(e,!1,"start")),et(g=>{if(o){if(g>=p)return u(0,1),Ae(e,!1,"end"),--s.r||Y(s.c),!1;if(g>=a){let k=d((g-a)/f);u(1-k,k)}}return o})}return Ye(i)?Dt().then(()=>{i=i(),c()}):c(),{end(l){l&&i.tick&&i.tick(1,0),o&&(r&&qe(e,r),o=!1)}}}function ke(e){e&&e.c()}function re(e,t,n,i){let{fragment:o,on_mount:r,on_destroy:s,after_update:c}=e.$$;o&&o.m(t,n),i||ee(()=>{let l=r.map(Mt).filter(Ye);s?s.push(...l):Y(l),e.$$.on_mount=[]}),c.forEach(ee)}function se(e,t){let n=e.$$;n.fragment!==null&&(Y(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Bt(e,t){e.$$.dirty[0]===-1&&(ze.push(e),Wt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function De(e,t,n,i,o,r,s,c=[-1]){let l=nt;Ie(e);let f=e.$$={fragment:null,ctx:null,props:r,update:L,not_equal:o,bound:{},on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:{},dirty:c,skip_bound:!1,root:t.target||l.$$.root};s&&s(f.root);let d=!1;f.ctx=n?n(e,t.props||{},(u,h,...a)=>{let p=a.length?a[0]:h;return f.ctx&&o(f.ctx[u],f.ctx[u]=p)&&(!f.skip_bound&&f.bound[u]&&f.bound[u](p),d&&Bt(e,u)),h}):[],f.update(),d=!0,Y(f.before_update),f.fragment=i?i(f.ctx):!1,t.target&&(f.fragment&&f.fragment.c(),re(e,t.target,t.anchor,t.customElement),Ct()),Ie(l)}var ie=class{$destroy(){se(this,1),this.$destroy=L}$on(t,n){let i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Ot(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function it(e){let t=e-1;return t*t*t+1}function V(e,{delay:t=0,duration:n=400,easing:i=it,x:o=0,y:r=0,opacity:s=0}={}){let c=getComputedStyle(e),l=+c.opacity,f=c.transform==="none"?"":c.transform,d=l*(1-s);return{delay:t,duration:n,easing:i,css:(u,h)=>`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-365O4SS2.js";import{a as F}from"./chunk-FUTK6QMY.js";import{h as T}from"./chunk-A664VTNX.js";import{a as w}from"./chunk-FDTKJPLI.js";import{b as i,c as m}from"./chunk-TACHWGFG.js";import{b as j,e as s}from"./chunk-UB4NDUUT.js";import{d as D}from"./chunk-JLWI4DHM.js";import{E as I,Ga as C,H as u,e as b,ia as c,na as a,o as d,t as A,z as U}from"./chunk-32SEKQJM.js";var x=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var R=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var S=class{};var V=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/shopify/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var N=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(w.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Mt=(()=>{class r{constructor(){this.authService=a(T),this.productService=a(F),this.shoppeUploadService=a(x),this.tiktokUploadService=a(H),this.lazadaUploadService=a(R),this.tokopediaUploadService=a(V),this.wooUploadService=a(z),this.shopifyUploadService=a(G),this.plugoUploadService=a(N),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(D),this.httpService=a(s),this._selectedProduct=new b(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(I(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return C(t.map(o=>{let p=new g;return p.id=o.ID,p.name=o.Name,p.type=o.TypeID,p.categoryId=null,p.attributes=[],p.selected=!1,p}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.ShopifyV2||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);U(e).pipe(A(o=>{let p=[];return o.filter(h=>m.IsNotEmpty(h)).forEach(h=>{p=[...p,...h]}),p})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],p=[],h=[],v=[],y=[],P=[],k=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:p.push(l);break;case i.Tokopedia:h.push(l);break;case i.WooCommerce:v.push(l);break;case i.Shopify:y.push(l);break;case i.ShopifyV2:P.push(l);break;case i.Plugo:k.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:p},{type:i.Tokopedia,data:h},{type:i.WooCommerce,data:v},{type:i.Shopify,data:y},{type:i.ShopifyV2,data:P},{type:i.Plugo,data:k}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(p));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(h));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(v));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.ShopifyV2:n.push(this.shopifyUploadService.uploadProduct(P));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(k));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let p=new S;p.ChannelID=o.id,p.ChannelType=o.type,p.Products=this._selectedProduct.getValue(),o.type==i.Shopify||o.type==i.ShopifyV2?delete p.CategoryID:p.CategoryID=o.categoryId,p=this.generateAttributeHttpRequest(o,p),e.push(p)}),e}generateAttributeHttpRequest(t,e){return t.type==i.WooCommerce||t.type==i.Shopify||t.type==i.ShopifyV2?e.Attribute=t.attributes[0]:t.type==i.Tiktok?(e.Attributes=this.formatAttributes(t.type,t.attributes),e.listing_platforms=t.listing_platforms):e.Attributes=this.formatAttributes(t.type,t.attributes),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;case i.ShopifyV2:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{x as a,H as b,R as c,z as d,Mt as e};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as X}from"./chunk-ACIMXBIC.js";import{a as de}from"./chunk-JU6FJIOF.js";import{a as
|
|
1
|
+
import{a as X}from"./chunk-ACIMXBIC.js";import{a as de}from"./chunk-JU6FJIOF.js";import{a as ae,b as ne,c as O,d as oe,e as re,j as D}from"./chunk-4LHR7JAU.js";import{a as ie,c as H}from"./chunk-YJQOSNK6.js";import{a as Z,b as y,c as ee,d as S}from"./chunk-7X3SWRGG.js";import{a as te,b as V}from"./chunk-7Y3NVT7M.js";import{a as T}from"./chunk-FWUEMMUS.js";import{a as J,b as K,f as Q}from"./chunk-AYV5TW7O.js";import{a as W}from"./chunk-IOSMSIMJ.js";import{D as q,x as G}from"./chunk-BI4K5Y2V.js";import{$b as f,Ca as F,Eb as v,Hc as M,Ic as w,Ma as L,Mc as j,Nc as R,Wc as z,Xb as P,Zc as x,_ as A,bc as u,d as E,e as I,gc as s,ha as Y,hc as r,hd as $,ia as B,ic as p,id as N,jc as g,mb as o,qc as k,ua as d,va as l,vc as h,xb as c,xc as b,zd as U}from"./chunk-32SEKQJM.js";var ce=["class","component ts"];function pe(a,_){if(a&1){let e=k();r(0,"button",2),h("click",function(){d(e);let i=b(2);return l(i.todayClicked())}),g(1,"i",3),p()}}function se(a,_){if(a&1){let e=k();r(0,"button",4),h("click",function(){d(e);let i=b(2);return l(i.clearClicked())}),g(1,"i",5),p()}}function me(a,_){if(a&1&&(f(0,pe,2,0,"button",0),f(1,se,2,0,"button",1)),a&2){let e=_;u(e.hideBtnToday?-1:0),o(),u(e.hideBtnClear?-1:1)}}function fe(a,_){if(a&1&&(r(0,"mat-label",2)(1,"span"),j(2),p()()),a&2){let e=b();s("show",e.placeholder),o(2),R(e.placeholder)}}var le=(()=>{class a{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(t){return new(t||a)}}static{this.\u0275prov=B({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})(),ue=(()=>{class a{constructor(e,t,i,n,m){this._datePicker=e,this._calendar=t,this._dateAdapter=i,this.calendarService=n,this._destroyed=new E,t.stateChanges.pipe(A(this._destroyed)).subscribe(C=>m.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(t){return new(t||a)(c(O),c(ne),c(y),c(le),c(U))}}static{this.\u0275cmp=v({type:a,selectors:[["POS-DatepickerHeader",8,"component","ts"]],features:[x([D]),L],attrs:ce,decls:3,vars:3,consts:[["mat-icon-button","","title","Today"],["mat-icon-button","","title","Clear"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(t,i){if(t&1&&(r(0,"mat-calendar-header"),f(1,me,2,2),$(2,"async"),p()),t&2){let n;o(),u((n=N(2,1,i.calendarConfig$))?1:-1,n)}},dependencies:[q,H,ie,S,D,ae,T,V,G],encapsulation:2})}}return a})(),he={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"DD MMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY"}},je=(()=>{class a{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let t=null;e&&(t=e.toDate(),t.setHours(0,0,0,0)),this.dateChange.emit(t),this.onChange(t)}constructor(e){this.calendarService=e,this.headerComponent=ue,this.appearance="outline",this.isFloatingLabel=!0,this.disabled=!1,this.readOnly=!1,this.dateChange=new F,this.minDate=X.MinDate,this.onChange=t=>{},this.displayToggle=!0}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var t=new bootstrap.Dropdown(e);t&&(t._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}writeValue(e){e&&(this.date=e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(t){return new(t||a)(c(le))}}static{this.\u0275cmp=v({type:a,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},features:[x([{provide:y,useClass:de,deps:[Z]},{provide:ee,useValue:he},{provide:W,useExisting:Y(()=>a),multi:!0}])],decls:6,vars:18,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","",3,"for"],[3,"opened","closed","calendarHeaderComponent"]],template:function(t,i){if(t&1){let n=k();r(0,"mat-form-field",1),f(1,fe,3,2,"mat-label",2),r(2,"input",3),h("dateChange",function(C){return d(n),l(i.change(C.value))})("click",function(){d(n);let C=M(5);return l(C.open())}),p(),g(3,"mat-datepicker-toggle",4),r(4,"mat-datepicker",5,0),h("opened",function(){return d(n),l(i.onOpenDatepicker())})("closed",function(){return d(n),l(i.onCloseDatepicker())}),p()()}if(t&2){let n=M(5);w("width",i.width||100,"%"),s("disabled",i.disabled)("appearance",i.appearance),o(),u(i.isFloatingLabel&&i.placeholder?1:-1),o(),s("placeholder",z(i.placeholder||""))("matDatepicker",n)("min",i.minDateValidation)("max",i.maxDateValidation)("value",i.date==i.minDate?null:i.date)("disabled",i.disabled)("readonly",i.readOnly),P("data-cy",i.data_cy),o(),w("display",i.displayToggle?"unset":"none"),s("for",n),o(),s("calendarHeaderComponent",i.headerComponent)}},dependencies:[H,S,D,O,oe,re,T,Q,J,K,V,te],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:33px;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}div.form-floating-outline>datepicker .datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:57px!important;padding-top:20px!important;padding-bottom:13px!important;font-size:.875rem!important}div.form-floating-outline>datepicker .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:26px!important;font-size:.875rem!important}
|
|
2
2
|
`],encapsulation:2})}}return a})();export{je as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as we}from"./chunk-XA2GD2PT.js";import{a as Ie,b as Me}from"./chunk-2HJPRGPE.js";import{a as ye,b as Se}from"./chunk-42F2XHMN.js";import{a as Te}from"./chunk-O25VE5LE.js";import{a as he,b as ue,c as Ce,g as xe,i as fe,j as be}from"./chunk-TZKJPNYV.js";import{a as ge}from"./chunk-3ZLKAFXU.js";import{b as ve}from"./chunk-3LRU75PM.js";import{a as ae}from"./chunk-FWUEMMUS.js";import{b as pe}from"./chunk-A2ISS3K6.js";import{a as E}from"./chunk-ZSUWHVKX.js";import{h as de}from"./chunk-TZUM4ZLW.js";import{a as le,b as re,c as ce}from"./chunk-SH7PSBLU.js";import{c as Z}from"./chunk-C63EIRLC.js";import{A as V,b as se,h as me,m as _e}from"./chunk-IOSMSIMJ.js";import{B as oe,w as ie}from"./chunk-BI4K5Y2V.js";import{$b as p,$c as k,Ca as B,E as G,Eb as D,Ga as b,Hc as A,Jc as L,Kb as T,Lc as Y,Mc as m,Nc as M,Oc as F,Qc as j,Rc as z,Sc as W,Wc as J,_ as K,ad as Q,bc as g,cc as I,d as q,dc as X,ec as y,fc as S,gc as s,hc as l,hd as O,ic as d,id as H,jc as w,jd as ee,kb as v,ld as te,mb as r,na as f,pc as R,pd as ne,qc as x,td as P,ua as h,va as u,vc as C,xc as a}from"./chunk-32SEKQJM.js";import{a as U,b as $}from"./chunk-66YHNWRR.js";function ke(t,c){if(t&1){let e=x();l(0,"span")(1,"mat-checkbox",4),C("change",function(n){h(e);let o=a();return u(o.onSelectAll(n==null?null:n.checked))}),l(2,"h5",5),m(3,"Select All"),d()()()}}function Ee(t,c){if(t&1){let e=x();l(0,"li")(1,"mat-checkbox",6),C("change",function(n){let o=h(e).$implicit,_=a();return u(_.onChannelChange(o,n.checked))}),l(2,"div",7),w(3,"img",8),l(4,"h5",9),m(5),d()()()()}if(t&2){let e=c.$implicit;r(),s("checked",e.selected),r(2),s("src",e.Img,v),r(2),M(e.Name)}}var mt=(()=>{class t{constructor(){this.data=f(ue),this.dialogRef=f(he),this.channels=b([]),this.getSelectedChannel=ne(()=>this.channels().filter(e=>e.selected)),this.selectedItems=this.data.selectedItems,this.channels.set(this.data.channels)}ngOnInit(){this.initModalConfig()}initModalConfig(){let e=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new fe,this.modalConfig.title=e}onSelectAll(e){this.channels.update(i=>i.map(n=>$(U({},n),{selected:e})))}onOk(){this.dialogRef.close(this.channels())}onClose(){this.dialogRef.close()}onChannelChange(e,i){this.channels.update(n=>n.map(o=>o.ID===e.ID?$(U({},o),{selected:i}):o))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-modal-update-channels"]],decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"change","checked"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(i,n){i&1&&(l(0,"modal-material",0),C("onOk",function(){return n.onOk()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),l(1,"div",1)(2,"div",2),p(3,ke,4,0,"span"),l(4,"ul",3),y(5,Ee,6,3,"li",null,I),d()()()()),i&2&&(s("dynamicValidated",n.getSelectedChannel().length>0)("config",n.modalConfig),r(3),g(n.channels().length>1?3:-1),r(2),S(n.channels()))},dependencies:[be,we,V],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"],changeDetection:0})}}return t})();var N=t=>[t],De=(t,c)=>({"bg-gradient-warning":t,"cell-hover pointer":c});function Oe(t,c){if(t&1){let e=x();l(0,"mat-slide-toggle",10),C("toggleChange",function(){h(e);let n=a();return u(n.onToggle())}),l(1,"small",11),m(2),d()()}if(t&2){let e=a();s("checked",e.toggleStatus()),r(2),F(" ",e.productToggleTitle()?e.productToggleTitle():"FILTER DIFFERENT INVENTORY"," ")}}function Ve(t,c){if(t&1){let e=x();l(0,"th")(1,"input",13),C("change",function(n){h(e);let o=a(2);return o.checkboxState.set(n.target.checked),u(o.onCheckboxStateChange())}),d()()}if(t&2){let e=a(2);r(),s("checked",e.checkboxState())}}function Ne(t,c){if(t&1&&(T(0,Ve,2,1,"ng-template",12),l(1,"th",8),m(2,"POS"),d()),t&2){let e=a();s("ngxPermissionsOnly",k(1,N,e.rolePriceEdit))}}function Ue(t,c){if(t&1&&(l(0,"th",9)(1,"div",14)(2,"div",15),w(3,"img",16),l(4,"div",17),m(5),O(6,"stringLimit"),d()()()()),t&2){let e=c.$implicit;r(2),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,v),r(2),F(" ",ee(6,3,e.Name,20)," ")}}function $e(t,c){t&1&&R(0)}function Be(t,c){if(t&1&&T(0,$e,1,0,"ng-container",28),t&2){a(2);let e=A(5);s("ngTemplateOutlet",e)}}function Re(t,c){if(t&1&&T(0,Be,1,1,"ng-template",12),t&2){let e=a(4);s("ngxPermissionsOnly",k(1,N,e.roleInventoryUpdate))}}function Ae(t,c){t&1&&R(0)}function Le(t,c){if(t&1&&T(0,Ae,1,0,"ng-container",28),t&2){a(2);let e=A(5);s("ngTemplateOutlet",e)}}function je(t,c){if(t&1&&T(0,Le,1,1,"ng-template",12),t&2){let e=a(4);s("ngxPermissionsOnly",k(1,N,e.rolePriceEdit))}}function ze(t,c){if(t&1){let e=x();l(0,"div")(1,"input",29),W("ngModelChange",function(n){h(e);let o=a(4).$implicit;return z(o.selected,n)||(o.selected=n),u(n)}),C("ngModelChange",function(){h(e);let n=a(4).$implicit,o=a();return u(o.onCheckboxStateProduct(n.ID))}),d()()}if(t&2){let e=a(4).$implicit;r(),j("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function We(t,c){if(t&1&&p(0,ze,2,2,"div"),t&2){let e=a(3).$implicit;g((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function He(t,c){if(t&1){let e=x();l(0,"img",30),C("click",function(n){h(e);let o=a(3).$implicit,_=a();return u(_.onZoomImage(n,o==null?null:o.ImageUrl))}),d()}if(t&2){let e=a(3).$implicit;s("src",J(e==null?null:e.ThumbnailUrl),v)}}function Ze(t,c){t&1&&w(0,"img",25)}function qe(t,c){if(t&1&&(l(0,"td",22)(1,"div",23),p(2,Re,1,3,null,12)(3,je,1,3,null,12),T(4,We,1,1,"ng-template",null,0,te),l(6,"div"),p(7,He,1,2,"img",24)(8,Ze,1,0,"img",25),d()()(),l(9,"td",26)(10,"div"),m(11),d(),l(12,"small",27),m(13),d()()),t&2){let e=a(2).$implicit,i=a();s("rowSpan",e==null?null:e.Variants.length),r(2),g(i.table()=="inventory"?2:3),r(5),g(e!=null&&e.ThumbnailUrl?7:8),r(2),s("rowSpan",e==null?null:e.Variants.length),r(2),M(e==null?null:e.Name),r(),L("text-danger",!(e!=null&&e.Category)),r(),F("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Ge(t,c){if(t&1&&(l(0,"a",21),w(1,"i",31),d()),t&2){let e=a().$implicit,i=a(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),v)}}function Ke(t,c){if(t&1){let e=x();l(0,"input",34),W("ngModelChange",function(n){h(e);let o=a(3).$implicit;return z(o.selected,n)||(o.selected=n),u(n)}),d()}if(t&2){let e=a(3).$implicit,i=a().$implicit;j("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function Xe(t,c){if(t&1&&(l(0,"td",32),p(1,Ke,1,2,"input",33),d()),t&2){let e=a(2).$implicit,i=a(2);r(),g(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Ye(t,c){if(t&1&&(T(0,Xe,2,1,"ng-template",12),l(1,"td",19),m(2),O(3,"number"),d()),t&2){let e=a().$implicit,i=a(2);s("ngxPermissionsOnly",k(4,N,i.rolePriceEdit)),r(2),M(H(3,2,i.printPOS(e)))}}function Je(t,c){if(t&1){let e=x();l(0,"td",37),C("click",function(){h(e);let n=a().$implicit,o=a().$implicit,_=a().$implicit,Fe=a();return u(Fe.onUpdateData(_.Name,o,n.ID,_.ChannelItemID))}),l(1,"div",38)(2,"div",39),m(3),O(4,"number"),d(),l(5,"a",40),C("click",function(n){return h(e),u(n==null?null:n.stopPropagation())}),w(6,"i",31),d()()()}if(t&2){let e=c,i=a(2).$implicit,n=a(2);Y(Q(6,De,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),r(3),F(" ",H(4,4,n.printItem(e))," "),r(2),s("href",e.Url,v)}}function Qe(t,c){t&1&&(l(0,"td",36)(1,"div",38)(2,"span"),m(3,"X"),d()()())}function et(t,c){if(t&1&&p(0,Je,7,9,"td",35)(1,Qe,4,0,"td",36),t&2){let e,i=c.$implicit,n=a().$implicit,o=a(2);g((e=o.getItemFromChannel(n,i))?0:1,e)}}function tt(t,c){if(t&1&&(l(0,"tr"),p(1,qe,14,8),l(2,"td",18),m(3),d(),l(4,"td",19)(5,"div",20)(6,"div"),m(7),d(),l(8,"div",17),p(9,Ge,2,1,"a",21),d()()(),p(10,Ye,4,6),y(11,et,2,1,null,null,I),d()),t&2){let e=c.$implicit,i=c.$index,n=a().$implicit,o=a();r(),g(i==0?1:-1),r(2),M(e==null?null:e.Model),r(2),s("matTooltip",e.Discontinued?o.discontinuedVariantMsg:""),r(),L("text-decoration-line-through",e.Discontinued),r(),F(" ",e.Code," "),r(2),g(n.Category?9:-1),r(),g(o.hiddenIPOSInventory()==!1?10:-1),r(),S(o.channel())}}function nt(t,c){if(t&1&&(l(0,"tbody"),y(1,tt,13,8,"tr",null,I),d()),t&2){let e=c.$implicit;r(),S(e.Variants)}}var Bt=(()=>{class t{constructor(){this.dialog=f(Ce),this.biggerPictureService=f(Te),this.authService=f(de),this.permissionsService=f(le),this.table=P(void 0),this.channel=P(void 0),this.showProductToggle=P(!1),this.productToggleTitle=P(void 0),this.hiddenIPOSInventory=P(!1),this.toggleStatus=b(!1),this.stockHeader=b(void 0),this.checkboxState=b(!1),this.rolePriceEdit=E.PriceUpdate,this.roleInventoryUpdate=E.InventoryUpdate,this.hasPriceEdit=b(!1),this.hasInventoryEdit=b(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new B,this.destroy$=new q,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let e=this.table();e=="inventory"?this.stockHeader.set("Stock"):e=="price"&&this.stockHeader.set("Price")}initRoles(){this.permissionsService.hasPermission(E.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e)),this.permissionsService.hasPermission(E.PriceUpdate).then(e=>this.hasPriceEdit.set(e))}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(o=>(o.selected=n.selected,o)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState(),i)),e))}getItemFromChannel(e,i){return e.Channel.find(o=>Z.IsNotEmpty(i.LocationID)?o.LocationID==i.LocationID:o.ChannelID==i.ID)}printItem(e){let i=this.table();if(i=="inventory")return e.Inventory;if(i=="price")return e.Price}onUpdateData(e,i,n,o){let _=this.table();this.hasPriceEdit()&&_=="price"&&this.onOpenDialogUpdate(e,i,n,o),this.hasInventoryEdit()&&_=="inventory"&&this.onOpenDialogUpdate(e,i,n,o)}onOpenDialogUpdate(e,i,n,o){this.dialog.open(Ie,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table(),ChannelItemID:o}}).afterClosed().pipe(G(_=>Z.IsNotEmpty(_)),K(this.destroy$)).subscribe(_=>{this.onSubmit.emit(_)})}printPOS(e){let i=this.table();return i=="inventory"?e.Inventory?e.Inventory:0:i=="price"?e.UnitPrice:null}onToggle(){this.toggleStatus.update(e=>!e),this.toggle.emit(this.toggleStatus())}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:[1,"productToggleTitle"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px",3,"checked"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange","checked"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"change","checked"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"class"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(i,n){i&1&&(l(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),m(7,"Product"),d(),p(8,Oe,3,2,"mat-slide-toggle",6),d()(),l(9,"th",7),m(10,"Variant"),d(),l(11,"th",8),m(12,"SKU"),d(),p(13,Ne,3,3),y(14,Ue,7,6,"th",9,X),d()(),y(16,nt,3,0,"tbody",null,I),d()()),i&2&&(r(8),g(n.showProductToggle()?8:-1),r(5),g(n.hiddenIPOSInventory()==!1?13:-1),r(),S(n.channel()),r(2),S(n.data))},dependencies:[V,se,me,_e,Se,ye,xe,ae,ve,ce,re,ge,pe,ie,Me,oe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"],changeDetection:0})}}return t})();export{mt as a,Bt as b};
|
|
1
|
+
import{a as we}from"./chunk-XA2GD2PT.js";import{a as Ie,b as Me}from"./chunk-SGB73VYO.js";import{a as ye,b as Se}from"./chunk-42F2XHMN.js";import{a as ve}from"./chunk-2SUANHOV.js";import{a as he,b as ue,c as Ce,g as xe,i as fe,j as be}from"./chunk-TZKJPNYV.js";import{a as ge}from"./chunk-3ZLKAFXU.js";import{b as Te}from"./chunk-7Y3NVT7M.js";import{a as ae}from"./chunk-FWUEMMUS.js";import{b as pe}from"./chunk-A2ISS3K6.js";import{a as E}from"./chunk-ZSUWHVKX.js";import{h as de}from"./chunk-A664VTNX.js";import{a as le,b as re,c as ce}from"./chunk-SH7PSBLU.js";import{c as Z}from"./chunk-TACHWGFG.js";import{A as V,b as se,h as me,m as _e}from"./chunk-IOSMSIMJ.js";import{B as oe,w as ie}from"./chunk-BI4K5Y2V.js";import{$b as p,$c as k,Ca as B,E as G,Eb as D,Ga as b,Hc as A,Jc as L,Kb as T,Lc as Y,Mc as m,Nc as M,Oc as F,Qc as j,Rc as z,Sc as W,Wc as J,_ as K,ad as Q,bc as g,cc as I,d as q,dc as X,ec as y,fc as S,gc as s,hc as l,hd as O,ic as d,id as H,jc as w,jd as ee,kb as v,ld as te,mb as r,na as f,pc as R,pd as ne,qc as x,td as P,ua as h,va as u,vc as C,xc as a}from"./chunk-32SEKQJM.js";import{a as U,b as $}from"./chunk-66YHNWRR.js";function ke(t,c){if(t&1){let e=x();l(0,"span")(1,"mat-checkbox",4),C("change",function(n){h(e);let o=a();return u(o.onSelectAll(n==null?null:n.checked))}),l(2,"h5",5),m(3,"Select All"),d()()()}}function Ee(t,c){if(t&1){let e=x();l(0,"li")(1,"mat-checkbox",6),C("change",function(n){let o=h(e).$implicit,_=a();return u(_.onChannelChange(o,n.checked))}),l(2,"div",7),w(3,"img",8),l(4,"h5",9),m(5),d()()()()}if(t&2){let e=c.$implicit;r(),s("checked",e.selected),r(2),s("src",e.Img,v),r(2),M(e.Name)}}var mt=(()=>{class t{constructor(){this.data=f(ue),this.dialogRef=f(he),this.channels=b([]),this.getSelectedChannel=ne(()=>this.channels().filter(e=>e.selected)),this.selectedItems=this.data.selectedItems,this.channels.set(this.data.channels)}ngOnInit(){this.initModalConfig()}initModalConfig(){let e=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new fe,this.modalConfig.title=e}onSelectAll(e){this.channels.update(i=>i.map(n=>$(U({},n),{selected:e})))}onOk(){this.dialogRef.close(this.channels())}onClose(){this.dialogRef.close()}onChannelChange(e,i){this.channels.update(n=>n.map(o=>o.ID===e.ID?$(U({},o),{selected:i}):o))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-modal-update-channels"]],decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"change","checked"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(i,n){i&1&&(l(0,"modal-material",0),C("onOk",function(){return n.onOk()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),l(1,"div",1)(2,"div",2),p(3,ke,4,0,"span"),l(4,"ul",3),y(5,Ee,6,3,"li",null,I),d()()()()),i&2&&(s("dynamicValidated",n.getSelectedChannel().length>0)("config",n.modalConfig),r(3),g(n.channels().length>1?3:-1),r(2),S(n.channels()))},dependencies:[be,we,V],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"],changeDetection:0})}}return t})();var N=t=>[t],De=(t,c)=>({"bg-gradient-warning":t,"cell-hover pointer":c});function Oe(t,c){if(t&1){let e=x();l(0,"mat-slide-toggle",10),C("toggleChange",function(){h(e);let n=a();return u(n.onToggle())}),l(1,"small",11),m(2),d()()}if(t&2){let e=a();s("checked",e.toggleStatus()),r(2),F(" ",e.productToggleTitle()?e.productToggleTitle():"FILTER DIFFERENT INVENTORY"," ")}}function Ve(t,c){if(t&1){let e=x();l(0,"th")(1,"input",13),C("change",function(n){h(e);let o=a(2);return o.checkboxState.set(n.target.checked),u(o.onCheckboxStateChange())}),d()()}if(t&2){let e=a(2);r(),s("checked",e.checkboxState())}}function Ne(t,c){if(t&1&&(T(0,Ve,2,1,"ng-template",12),l(1,"th",8),m(2,"POS"),d()),t&2){let e=a();s("ngxPermissionsOnly",k(1,N,e.rolePriceEdit))}}function Ue(t,c){if(t&1&&(l(0,"th",9)(1,"div",14)(2,"div",15),w(3,"img",16),l(4,"div",17),m(5),O(6,"stringLimit"),d()()()()),t&2){let e=c.$implicit;r(2),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),s("src",e==null?null:e.Img,v),r(2),F(" ",ee(6,3,e.Name,20)," ")}}function $e(t,c){t&1&&R(0)}function Be(t,c){if(t&1&&T(0,$e,1,0,"ng-container",28),t&2){a(2);let e=A(5);s("ngTemplateOutlet",e)}}function Re(t,c){if(t&1&&T(0,Be,1,1,"ng-template",12),t&2){let e=a(4);s("ngxPermissionsOnly",k(1,N,e.roleInventoryUpdate))}}function Ae(t,c){t&1&&R(0)}function Le(t,c){if(t&1&&T(0,Ae,1,0,"ng-container",28),t&2){a(2);let e=A(5);s("ngTemplateOutlet",e)}}function je(t,c){if(t&1&&T(0,Le,1,1,"ng-template",12),t&2){let e=a(4);s("ngxPermissionsOnly",k(1,N,e.rolePriceEdit))}}function ze(t,c){if(t&1){let e=x();l(0,"div")(1,"input",29),W("ngModelChange",function(n){h(e);let o=a(4).$implicit;return z(o.selected,n)||(o.selected=n),u(n)}),C("ngModelChange",function(){h(e);let n=a(4).$implicit,o=a();return u(o.onCheckboxStateProduct(n.ID))}),d()()}if(t&2){let e=a(4).$implicit;r(),j("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function We(t,c){if(t&1&&p(0,ze,2,2,"div"),t&2){let e=a(3).$implicit;g((e==null||e.Variants==null?null:e.Variants.length)>1?0:-1)}}function He(t,c){if(t&1){let e=x();l(0,"img",30),C("click",function(n){h(e);let o=a(3).$implicit,_=a();return u(_.onZoomImage(n,o==null?null:o.ImageUrl))}),d()}if(t&2){let e=a(3).$implicit;s("src",J(e==null?null:e.ThumbnailUrl),v)}}function Ze(t,c){t&1&&w(0,"img",25)}function qe(t,c){if(t&1&&(l(0,"td",22)(1,"div",23),p(2,Re,1,3,null,12)(3,je,1,3,null,12),T(4,We,1,1,"ng-template",null,0,te),l(6,"div"),p(7,He,1,2,"img",24)(8,Ze,1,0,"img",25),d()()(),l(9,"td",26)(10,"div"),m(11),d(),l(12,"small",27),m(13),d()()),t&2){let e=a(2).$implicit,i=a();s("rowSpan",e==null?null:e.Variants.length),r(2),g(i.table()=="inventory"?2:3),r(5),g(e!=null&&e.ThumbnailUrl?7:8),r(2),s("rowSpan",e==null?null:e.Variants.length),r(2),M(e==null?null:e.Name),r(),L("text-danger",!(e!=null&&e.Category)),r(),F("(",e!=null&&e.Category?e==null?null:e.Category:"Not Found In POS",")")}}function Ge(t,c){if(t&1&&(l(0,"a",21),w(1,"i",31),d()),t&2){let e=a().$implicit,i=a(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),v)}}function Ke(t,c){if(t&1){let e=x();l(0,"input",34),W("ngModelChange",function(n){h(e);let o=a(3).$implicit;return z(o.selected,n)||(o.selected=n),u(n)}),d()}if(t&2){let e=a(3).$implicit,i=a().$implicit;j("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function Xe(t,c){if(t&1&&(l(0,"td",32),p(1,Ke,1,2,"input",33),d()),t&2){let e=a(2).$implicit,i=a(2);r(),g(i.printPOS(e)>=0||i.table()=="price"?1:-1)}}function Ye(t,c){if(t&1&&(T(0,Xe,2,1,"ng-template",12),l(1,"td",19),m(2),O(3,"number"),d()),t&2){let e=a().$implicit,i=a(2);s("ngxPermissionsOnly",k(4,N,i.rolePriceEdit)),r(2),M(H(3,2,i.printPOS(e)))}}function Je(t,c){if(t&1){let e=x();l(0,"td",37),C("click",function(){h(e);let n=a().$implicit,o=a().$implicit,_=a().$implicit,Fe=a();return u(Fe.onUpdateData(_.Name,o,n.ID,_.ChannelItemID))}),l(1,"div",38)(2,"div",39),m(3),O(4,"number"),d(),l(5,"a",40),C("click",function(n){return h(e),u(n==null?null:n.stopPropagation())}),w(6,"i",31),d()()()}if(t&2){let e=c,i=a(2).$implicit,n=a(2);Y(Q(6,De,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table()=="price"||n.hasInventoryEdit()&&n.table()=="inventory")),r(3),F(" ",H(4,4,n.printItem(e))," "),r(2),s("href",e.Url,v)}}function Qe(t,c){t&1&&(l(0,"td",36)(1,"div",38)(2,"span"),m(3,"X"),d()()())}function et(t,c){if(t&1&&p(0,Je,7,9,"td",35)(1,Qe,4,0,"td",36),t&2){let e,i=c.$implicit,n=a().$implicit,o=a(2);g((e=o.getItemFromChannel(n,i))?0:1,e)}}function tt(t,c){if(t&1&&(l(0,"tr"),p(1,qe,14,8),l(2,"td",18),m(3),d(),l(4,"td",19)(5,"div",20)(6,"div"),m(7),d(),l(8,"div",17),p(9,Ge,2,1,"a",21),d()()(),p(10,Ye,4,6),y(11,et,2,1,null,null,I),d()),t&2){let e=c.$implicit,i=c.$index,n=a().$implicit,o=a();r(),g(i==0?1:-1),r(2),M(e==null?null:e.Model),r(2),s("matTooltip",e.Discontinued?o.discontinuedVariantMsg:""),r(),L("text-decoration-line-through",e.Discontinued),r(),F(" ",e.Code," "),r(2),g(n.Category?9:-1),r(),g(o.hiddenIPOSInventory()==!1?10:-1),r(),S(o.channel())}}function nt(t,c){if(t&1&&(l(0,"tbody"),y(1,tt,13,8,"tr",null,I),d()),t&2){let e=c.$implicit;r(),S(e.Variants)}}var Bt=(()=>{class t{constructor(){this.dialog=f(Ce),this.biggerPictureService=f(ve),this.authService=f(de),this.permissionsService=f(le),this.table=P(void 0),this.channel=P(void 0),this.showProductToggle=P(!1),this.productToggleTitle=P(void 0),this.hiddenIPOSInventory=P(!1),this.toggleStatus=b(!1),this.stockHeader=b(void 0),this.checkboxState=b(!1),this.rolePriceEdit=E.PriceUpdate,this.roleInventoryUpdate=E.InventoryUpdate,this.hasPriceEdit=b(!1),this.hasInventoryEdit=b(!1),this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.onSubmit=new B,this.destroy$=new q,this.toggle=new B,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles();let e=this.table();e=="inventory"?this.stockHeader.set("Stock"):e=="price"&&this.stockHeader.set("Price")}initRoles(){this.permissionsService.hasPermission(E.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e)),this.permissionsService.hasPermission(E.PriceUpdate).then(e=>this.hasPriceEdit.set(e))}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(o=>(o.selected=n.selected,o)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState(),i)),e))}getItemFromChannel(e,i){return e.Channel.find(o=>Z.IsNotEmpty(i.LocationID)?o.LocationID==i.LocationID:o.ChannelID==i.ID)}printItem(e){let i=this.table();if(i=="inventory")return e.Inventory;if(i=="price")return e.Price}onUpdateData(e,i,n,o){let _=this.table();this.hasPriceEdit()&&_=="price"&&this.onOpenDialogUpdate(e,i,n,o),this.hasInventoryEdit()&&_=="inventory"&&this.onOpenDialogUpdate(e,i,n,o)}onOpenDialogUpdate(e,i,n,o){this.dialog.open(Ie,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table(),ChannelItemID:o}}).afterClosed().pipe(G(_=>Z.IsNotEmpty(_)),K(this.destroy$)).subscribe(_=>{this.onSubmit.emit(_)})}printPOS(e){let i=this.table();return i=="inventory"?e.Inventory?e.Inventory:0:i=="price"?e.UnitPrice:null}onToggle(){this.toggleStatus.update(e=>!e),this.toggle.emit(this.toggleStatus())}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=D({type:t,selectors:[["app-table"]],inputs:{data:"data",table:[1,"table"],channel:[1,"channel"],showProductToggle:[1,"showProductToggle"],productToggleTitle:[1,"productToggleTitle"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:18,vars:2,consts:[["checkbox_update",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px",3,"checked"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],["scope","col"],[2,"width","200px",3,"toggleChange","checked"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"change","checked"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[1,"border","rounded","w-img","cursor-pointer",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"class"],[1,"table-white","text-center",2,"color","red"],[1,"p-0",3,"click"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"]],template:function(i,n){i&1&&(l(0,"div",1)(1,"table",2)(2,"thead",3)(3,"tr")(4,"th",4)(5,"div",5)(6,"div"),m(7,"Product"),d(),p(8,Oe,3,2,"mat-slide-toggle",6),d()(),l(9,"th",7),m(10,"Variant"),d(),l(11,"th",8),m(12,"SKU"),d(),p(13,Ne,3,3),y(14,Ue,7,6,"th",9,X),d()(),y(16,nt,3,0,"tbody",null,I),d()()),i&2&&(r(8),g(n.showProductToggle()?8:-1),r(5),g(n.hiddenIPOSInventory()==!1?13:-1),r(),S(n.channel()),r(2),S(n.data))},dependencies:[V,se,me,_e,Se,ye,xe,ae,Te,ce,re,ge,pe,ie,Me,oe],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"],changeDetection:0})}}return t})();export{mt as a,Bt as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as X}from"./chunk-ZSUWHVKX.js";import{a as G,h as J}from"./chunk-TZUM4ZLW.js";import"./chunk-4NJQ2IME.js";import"./chunk-QXRG5XYP.js";import"./chunk-NSH3XZXC.js";import{a as Y}from"./chunk-SH7PSBLU.js";import{a as b,c as W}from"./chunk-C63EIRLC.js";import{A as le,c as Z,h as ee,i as te,k as ne,m as ie,n as oe,t as re,u as ae,v as se,w as de}from"./chunk-IOSMSIMJ.js";import"./chunk-MMOZES77.js";import"./chunk-34FX4M3J.js";import{b as Q}from"./chunk-UB4NDUUT.js";import{d as K}from"./chunk-JLWI4DHM.js";import"./chunk-ZTKWKQRJ.js";import{x as H}from"./chunk-BI4K5Y2V.js";import"./chunk-ASFPLYOZ.js";import{$b as _,Bc as A,Cc as U,Dc as F,Eb as y,Ga as f,Hc as S,Lc as T,Mc as s,Nc as N,Oc as R,Pc as j,V as I,ad as z,bc as h,dc as O,ec as P,fc as E,gc as x,hc as o,hd as $,ia as D,ic as r,id as q,jc as m,kb as C,kc as v,lc as M,mb as a,mc as V,qc as k,rc as L,td as B,ua as p,va as g,vc as u,xb as w,xc as d}from"./chunk-32SEKQJM.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function ue(t,c){if(t&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),V(3,"img",2),M()(),v(4,"a",3),s(5),M(),v(6,"p",4),s(7),M()()),t&2){let e=c.$implicit;a(2),L("href",e.href,C),a(),L("src",e.imgSrc,C),a(),L("href",e.href,C),a(),N(e.title),a(2),N(e.description)}}var me=(()=>{class t{constructor(){this.newsList=B([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=y({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(n,i){n&1&&(v(0,"swiper-container",0),P(1,ue,8,5,"swiper-slide",null,O),M()),n&2&&(a(),E(i.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"],changeDetection:0})}}return t})();var pe=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _e=["subdomainEl"],he=(t,c)=>({"rounded-end":t,"border-end-0":c});function xe(t,c){if(t&1&&(o(0,"div",33),m(1,"img",34),r()),t&2){let e=c.$implicit;a(),x("src",e.img,C)("title",e.title)("alt",e.title)}}function be(t,c){if(t&1){let e=k();o(0,"div",15)(1,"h3",16),s(2,"DealPOS Omnichannel"),r(),o(3,"small",17),s(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),u("ngModelChange",function(i){p(e);let l=d();return g(l.subdomain.set(i))}),r(),o(13,"div")(14,"select",24),u("ngModelChange",function(i){p(e);let l=d();return g(l.domain.set(i))}),o(15,"option",25),s(16," .dealpos.co.id "),r(),o(17,"option",26),s(18,".dealpos.net"),r(),o(19,"option",27),s(20,".dealpos.com"),r(),o(21,"option",28),s(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),u("click",function(){p(e);let i=d();return g(i.onNextState())}),s(25," Next "),r()(),o(26,"div",31)(27,"div",32),P(28,xe,2,3,"div",33,O),r()()()()}if(t&2){let e=d();a(11),x("ngModel",e.subdomain()),a(3),x("ngModel",e.domain()),a(14),E(e.channels)}}function Ce(t,c){t&1&&(o(0,"p"),s(1,"Username is required"),r())}function we(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Ce,2,0,"p"),r()()),t&2){d();let e=S(14);a(3),h(e.errors.required?3:-1)}}function ve(t,c){if(t&1){let e=k();o(0,"i",57),u("click",function(){p(e);let i=d(3);return g(i.hideShowPassword())}),r()}if(t&2){let e=d(3);T("fa "+e.passwordIcon())}}function Me(t,c){if(t&1&&(o(0,"span",47),_(1,ve,1,2,"i",56),r()),t&2){let e=d(2);a(),h(e.password()?1:-1)}}function Se(t,c){t&1&&(o(0,"p"),s(1,"Password is required"),r())}function ye(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Se,2,0,"p"),r()()),t&2){d();let e=S(21);a(3),h(e.errors.required?3:-1)}}function Oe(t,c){if(t&1){let e=k();o(0,"div",35)(1,"h3",36),s(2,"Sign in"),r(),o(3,"h3",37),s(4," to "),o(5,"h6",38),s(6),r(),o(7,"i",39),u("click",function(){p(e);let i=d();return g(i.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),u("ngModelChange",function(i){p(e);let l=d();return g(l.username.set(i))}),r()(),_(15,we,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),u("ngModelChange",function(i){p(e);let l=d();return g(l.password.set(i))}),r(),_(22,Me,2,1,"span",47),r(),_(23,ye,4,1,"div",44),o(24,"div",48)(25,"button",49),u("click",function(){p(e);let i=d();return g(i.onLogin())}),s(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),s(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),u("click",function(i){p(e);let l=d();return g(l.onLoginByGoogle(i))}),m(34,"i",53),s(35," Sign In with Google "),r()()()}if(t&2){let e=S(14),n=S(21),i=d();a(6),j(" (",i.subdomain(),"",i.domain(),") "),a(7),x("ngModel",i.username()),a(2),h(e.invalid&&(e.dirty||e.touched)?15:-1),a(5),T(z(10,he,i.browser()=="edge",i.browser()!="edge")),x("type",i.passwordType())("ngModel",i.password()),a(2),h(i.browser()!="edge"?22:-1),a(),h(n.invalid&&(n.dirty||n.touched)?23:-1)}}var He=(()=>{class t{constructor(e,n,i,l,ge){this._router=e,this.toastr=n,this.checkBrowser=i,this.authService=l,this.ngxPermission=ge,this.username=f(""),this.password=f(""),this.subdomain=f(""),this.domain=f(".dealpos.co.id"),this.loginState=f("FORM_DOMAIN"),this.passwordType=f("password"),this.passwordIcon=f("fa-eye"),this.browser=f(""),this.channels=[{title:"Shopee",img:b.SHOOPE},{title:"Tokopedia",img:b.TOKOPEDIA},{title:"Tiktok",img:b.TIKTOK},{title:"Woocommerce",img:b.WOOCOMMERCE},{title:"Lazada",img:b.LAZADA},{title:"Shopify",img:b.SHOPIFY},{title:"Plugo",img:b.PLUGONEW}],this.version=G.version,this.news$=l.getNews().pipe(I(1))}ngOnInit(){this.initLogin(),this.browser.set(this.checkBrowser.getBrowserName()),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username.set(e?.username||""),this.subdomain.set(e?.Host?.split(".")[0]||"");let n=e?.Host?.split("dealpos");this.domain.set(`.dealpos${n[1]}`),this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(W.IsEmpty(this.subdomain())){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState.set("FORM_AUTH")}parseSubdomain(){let e=this.subdomain(),n=e.indexOf(".dealpos");n!=-1&&this.subdomain.set(e.substring(0,n))}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onLogin(){let e={Host:`${this.subdomain()}${this.domain()}`,Username:this.username(),Password:this.password()};this.authService.login(e).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){let n=`${this.subdomain()}${this.domain()}`;this.authService.loginWithGoogle(e,n).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([X.DashboardView]).then(n=>{n?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType.set(this.passwordType()==="text"?"password":"text"),this.passwordIcon.set(this.passwordIcon()==="fa-eye"?"fa-eye-slash":"fa-eye")}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||t)(w(K),w(Q),w(pe),w(J),w(Y))}}static{this.\u0275cmp=y({type:t,selectors:[["app-login"]],viewQuery:function(n,i){if(n&1&&A(_e,5),n&2){let l;U(l=F())&&(i.subdomainEl=l.first)}},decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),s(4,"New Features"),r(),m(5,"POS-news-swiper",7),$(6,"async"),r(),o(7,"div",8),_(8,be,30,2)(9,Oe,36,13),r()(),o(10,"div",9)(11,"span",10),s(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),s(16),m(17,"i",14),r()()()),n&2&&(a(5),x("newsList",q(6,4,i.news$)),a(3),h(i.loginState()=="FORM_DOMAIN"?8:9),a(7),x("href",i.changelogUrl,C),a(),R("version ",i.version))},dependencies:[me,le,oe,ae,se,Z,re,ee,te,de,ie,ne,H],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media(max-width:768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:1300px)and (min-width:1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media(max-width:820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media(max-width:768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media(min-width:1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media(max-width:768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media(min-width:1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media(max-width:768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"],changeDetection:0})}}return t})();export{He as LoginComponent};
|
|
1
|
+
import{a as X}from"./chunk-ZSUWHVKX.js";import{a as G,h as J}from"./chunk-A664VTNX.js";import"./chunk-5NEIE5HB.js";import"./chunk-QXRG5XYP.js";import"./chunk-FDTKJPLI.js";import{a as Y}from"./chunk-SH7PSBLU.js";import{a as b,c as W}from"./chunk-TACHWGFG.js";import{A as le,c as Z,h as ee,i as te,k as ne,m as ie,n as oe,t as re,u as ae,v as se,w as de}from"./chunk-IOSMSIMJ.js";import"./chunk-MMOZES77.js";import"./chunk-34FX4M3J.js";import{b as Q}from"./chunk-UB4NDUUT.js";import{d as K}from"./chunk-JLWI4DHM.js";import"./chunk-ZTKWKQRJ.js";import{x as H}from"./chunk-BI4K5Y2V.js";import"./chunk-ASFPLYOZ.js";import{$b as _,Bc as A,Cc as U,Dc as F,Eb as y,Ga as f,Hc as S,Lc as T,Mc as s,Nc as N,Oc as R,Pc as j,V as I,ad as z,bc as h,dc as O,ec as P,fc as E,gc as x,hc as o,hd as $,ia as D,ic as r,id as q,jc as m,kb as C,kc as v,lc as M,mb as a,mc as V,qc as k,rc as L,td as B,ua as p,va as g,vc as u,xb as w,xc as d}from"./chunk-32SEKQJM.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function ue(t,c){if(t&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),V(3,"img",2),M()(),v(4,"a",3),s(5),M(),v(6,"p",4),s(7),M()()),t&2){let e=c.$implicit;a(2),L("href",e.href,C),a(),L("src",e.imgSrc,C),a(),L("href",e.href,C),a(),N(e.title),a(2),N(e.description)}}var me=(()=>{class t{constructor(){this.newsList=B([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=y({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(n,i){n&1&&(v(0,"swiper-container",0),P(1,ue,8,5,"swiper-slide",null,O),M()),n&2&&(a(),E(i.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"],changeDetection:0})}}return t})();var pe=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _e=["subdomainEl"],he=(t,c)=>({"rounded-end":t,"border-end-0":c});function xe(t,c){if(t&1&&(o(0,"div",33),m(1,"img",34),r()),t&2){let e=c.$implicit;a(),x("src",e.img,C)("title",e.title)("alt",e.title)}}function be(t,c){if(t&1){let e=k();o(0,"div",15)(1,"h3",16),s(2,"DealPOS Omnichannel"),r(),o(3,"small",17),s(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),u("ngModelChange",function(i){p(e);let l=d();return g(l.subdomain.set(i))}),r(),o(13,"div")(14,"select",24),u("ngModelChange",function(i){p(e);let l=d();return g(l.domain.set(i))}),o(15,"option",25),s(16," .dealpos.co.id "),r(),o(17,"option",26),s(18,".dealpos.net"),r(),o(19,"option",27),s(20,".dealpos.com"),r(),o(21,"option",28),s(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),u("click",function(){p(e);let i=d();return g(i.onNextState())}),s(25," Next "),r()(),o(26,"div",31)(27,"div",32),P(28,xe,2,3,"div",33,O),r()()()()}if(t&2){let e=d();a(11),x("ngModel",e.subdomain()),a(3),x("ngModel",e.domain()),a(14),E(e.channels)}}function Ce(t,c){t&1&&(o(0,"p"),s(1,"Username is required"),r())}function we(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Ce,2,0,"p"),r()()),t&2){d();let e=S(14);a(3),h(e.errors.required?3:-1)}}function ve(t,c){if(t&1){let e=k();o(0,"i",57),u("click",function(){p(e);let i=d(3);return g(i.hideShowPassword())}),r()}if(t&2){let e=d(3);T("fa "+e.passwordIcon())}}function Me(t,c){if(t&1&&(o(0,"span",47),_(1,ve,1,2,"i",56),r()),t&2){let e=d(2);a(),h(e.password()?1:-1)}}function Se(t,c){t&1&&(o(0,"p"),s(1,"Password is required"),r())}function ye(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Se,2,0,"p"),r()()),t&2){d();let e=S(21);a(3),h(e.errors.required?3:-1)}}function Oe(t,c){if(t&1){let e=k();o(0,"div",35)(1,"h3",36),s(2,"Sign in"),r(),o(3,"h3",37),s(4," to "),o(5,"h6",38),s(6),r(),o(7,"i",39),u("click",function(){p(e);let i=d();return g(i.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),u("ngModelChange",function(i){p(e);let l=d();return g(l.username.set(i))}),r()(),_(15,we,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),u("ngModelChange",function(i){p(e);let l=d();return g(l.password.set(i))}),r(),_(22,Me,2,1,"span",47),r(),_(23,ye,4,1,"div",44),o(24,"div",48)(25,"button",49),u("click",function(){p(e);let i=d();return g(i.onLogin())}),s(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),s(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),u("click",function(i){p(e);let l=d();return g(l.onLoginByGoogle(i))}),m(34,"i",53),s(35," Sign In with Google "),r()()()}if(t&2){let e=S(14),n=S(21),i=d();a(6),j(" (",i.subdomain(),"",i.domain(),") "),a(7),x("ngModel",i.username()),a(2),h(e.invalid&&(e.dirty||e.touched)?15:-1),a(5),T(z(10,he,i.browser()=="edge",i.browser()!="edge")),x("type",i.passwordType())("ngModel",i.password()),a(2),h(i.browser()!="edge"?22:-1),a(),h(n.invalid&&(n.dirty||n.touched)?23:-1)}}var He=(()=>{class t{constructor(e,n,i,l,ge){this._router=e,this.toastr=n,this.checkBrowser=i,this.authService=l,this.ngxPermission=ge,this.username=f(""),this.password=f(""),this.subdomain=f(""),this.domain=f(".dealpos.co.id"),this.loginState=f("FORM_DOMAIN"),this.passwordType=f("password"),this.passwordIcon=f("fa-eye"),this.browser=f(""),this.channels=[{title:"Shopee",img:b.SHOOPE},{title:"Tokopedia",img:b.TOKOPEDIA},{title:"Tiktok",img:b.TIKTOK},{title:"Woocommerce",img:b.WOOCOMMERCE},{title:"Lazada",img:b.LAZADA},{title:"Shopify",img:b.SHOPIFY},{title:"Plugo",img:b.PLUGONEW}],this.version=G.version,this.news$=l.getNews().pipe(I(1))}ngOnInit(){this.initLogin(),this.browser.set(this.checkBrowser.getBrowserName()),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username.set(e?.username||""),this.subdomain.set(e?.Host?.split(".")[0]||"");let n=e?.Host?.split("dealpos");this.domain.set(`.dealpos${n[1]}`),this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(W.IsEmpty(this.subdomain())){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState.set("FORM_AUTH")}parseSubdomain(){let e=this.subdomain(),n=e.indexOf(".dealpos");n!=-1&&this.subdomain.set(e.substring(0,n))}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onLogin(){let e={Host:`${this.subdomain()}${this.domain()}`,Username:this.username(),Password:this.password()};this.authService.login(e).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){let n=`${this.subdomain()}${this.domain()}`;this.authService.loginWithGoogle(e,n).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([X.DashboardView]).then(n=>{n?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType.set(this.passwordType()==="text"?"password":"text"),this.passwordIcon.set(this.passwordIcon()==="fa-eye"?"fa-eye-slash":"fa-eye")}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||t)(w(K),w(Q),w(pe),w(J),w(Y))}}static{this.\u0275cmp=y({type:t,selectors:[["app-login"]],viewQuery:function(n,i){if(n&1&&A(_e,5),n&2){let l;U(l=F())&&(i.subdomainEl=l.first)}},decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),s(4,"New Features"),r(),m(5,"POS-news-swiper",7),$(6,"async"),r(),o(7,"div",8),_(8,be,30,2)(9,Oe,36,13),r()(),o(10,"div",9)(11,"span",10),s(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),s(16),m(17,"i",14),r()()()),n&2&&(a(5),x("newsList",q(6,4,i.news$)),a(3),h(i.loginState()=="FORM_DOMAIN"?8:9),a(7),x("href",i.changelogUrl,C),a(),R("version ",i.version))},dependencies:[me,le,oe,ae,se,Z,re,ee,te,de,ie,ne,H],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media(max-width:768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:1300px)and (min-width:1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media(max-width:820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media(max-width:768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media(min-width:1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media(max-width:768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media(min-width:1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media(max-width:768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"],changeDetection:0})}}return t})();export{He as LoginComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c}from"./chunk-
|
|
1
|
+
import{c}from"./chunk-TACHWGFG.js";import{b as d}from"./chunk-UB4NDUUT.js";import{ia as h,na as f}from"./chunk-32SEKQJM.js";var w=(()=>{class a{constructor(){this.toastrService=f(d)}showToastrUploadMultiple(l,e){let s=[],i=[],o=null,r=this.getResponseList(l);if(l.filter(t=>c.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,r.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,r.length>1?this.setHtmlli(e?e(n,t.Channel):`
|
|
2
2
|
<div>
|
|
3
3
|
Product ${n.Name} was <div class="d-inline fw-bold">successfully</div> uploaded to ${t.Channel}
|
|
4
4
|
</div>
|