dealpos 12.70.3 → 12.70.5
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/POS/3rdpartylicenses.txt +52 -0
- package/POS/{chunk-6QZQSRUI.js → chunk-2PDETDSV.js} +1 -1
- package/POS/{chunk-GYZUU4RA.js → chunk-2ZV43RNC.js} +1 -1
- package/POS/{chunk-F62HIR5Y.js → chunk-32TQNPTI.js} +1 -1
- package/POS/{chunk-ZV2DQ5GK.js → chunk-36B2BK5B.js} +1 -1
- package/POS/{chunk-HKCA6IDM.js → chunk-3GJ5B4ZN.js} +1 -1
- package/POS/{chunk-BUYLB75Q.js → chunk-4I5COCNT.js} +1 -1
- package/POS/{chunk-E3TTGIHK.js → chunk-4J4ASBEQ.js} +2 -2
- package/POS/{chunk-K5BLQ3AX.js → chunk-56SKPF7Y.js} +1 -1
- package/POS/{chunk-FTFNCKMA.js → chunk-5G7I2RNG.js} +1 -1
- package/POS/{chunk-RSWFO66F.js → chunk-5QEDJP6D.js} +1 -1
- package/POS/{main-VPAR6OBK.css → chunk-6CFIYWKJ.css} +1 -1
- package/POS/{chunk-4JSYDILM.js → chunk-6V7D3RZL.js} +2 -2
- package/POS/{chunk-CNVVOVDF.js → chunk-6Y74XXYJ.js} +1 -1
- package/POS/{chunk-GA5S37TM.js → chunk-7KZPYLRR.js} +1 -1
- package/POS/{chunk-N4FPK7RK.js → chunk-AC6EBNEX.js} +1 -1
- package/POS/{chunk-6THLDCKY.js → chunk-BNM4P2RG.js} +1 -1
- package/POS/{chunk-HUJZ4GR5.js → chunk-BVNVKRO2.js} +1 -1
- package/POS/{chunk-EG2LATQT.js → chunk-CIYKZASH.js} +2 -2
- package/POS/{chunk-NI6LS4ID.js → chunk-CL2T4FYA.js} +1 -1
- package/POS/{chunk-XS3GHAUO.js → chunk-DINDT5O3.js} +2 -2
- package/POS/{chunk-CBQPVCIB.js → chunk-DJBNT26X.js} +1 -1
- package/POS/{chunk-F5HHAUPX.js → chunk-EY2D7U5S.js} +1 -1
- package/POS/{chunk-SMRYFW5T.js → chunk-FFIQ2YBH.js} +1 -1
- package/POS/{chunk-U4YYADFZ.js → chunk-FJ5KLJX2.js} +1 -1
- package/POS/chunk-FP77UDC4.js +25 -0
- package/POS/{chunk-FS46LLSH.js → chunk-HMHVBHFJ.js} +1 -1
- package/POS/{chunk-I2VP6X26.js → chunk-I6STT3FS.js} +2 -2
- package/POS/{chunk-5R7Q5N6V.js → chunk-IDY4MDP7.js} +1 -1
- package/POS/{chunk-BJV6SPXJ.js → chunk-ILW3KHEG.js} +1 -1
- package/POS/{chunk-E3SN6Q4H.js → chunk-IWCWLLRG.js} +1 -1
- package/POS/{chunk-3S66LZSY.js → chunk-J4AX654F.js} +2 -2
- package/POS/{chunk-SWVISOJN.js → chunk-JHRKPIWW.js} +1 -1
- package/POS/{chunk-GVKEWANW.js → chunk-JTUKVAWG.js} +1 -1
- package/POS/{chunk-VPZWAAKA.js → chunk-JZIBWHJY.js} +1 -1
- package/POS/{chunk-WYJ2JUTF.js → chunk-KNVF2HG7.js} +1 -1
- package/POS/{chunk-LFU2MQ5J.js → chunk-LJNDHYUS.js} +1 -1
- package/POS/{chunk-LTNHSFHB.js → chunk-LS4ATQPF.js} +1 -1
- package/POS/{chunk-KAVOVQX4.js → chunk-LVH74CDN.js} +1 -1
- package/POS/{chunk-MGXPTFYZ.js → chunk-LWLQFKOJ.js} +1 -1
- package/POS/{chunk-XK4QNIE5.js → chunk-MGSQ6M6G.js} +1 -1
- package/POS/{chunk-FIRLR5ST.js → chunk-N7G2A7E6.js} +1 -1
- package/POS/{chunk-HTHJPF7O.js → chunk-O7HTODDQ.js} +1 -1
- package/POS/{chunk-ZJ45IPAY.js → chunk-PCXMITYW.js} +1 -1
- package/POS/{chunk-WQPMOQKF.js → chunk-PG4R2OFT.js} +1 -1
- package/POS/{chunk-EIXMTJ2M.js → chunk-PNNRI4NF.js} +1 -1
- package/POS/{chunk-VV2N37L3.js → chunk-Q56FAINK.js} +1 -1
- package/POS/{chunk-TW74IC5O.js → chunk-QJMUNNAM.js} +1 -1
- package/POS/{chunk-RGIAVFZ4.js → chunk-QTQYSPUV.js} +1 -1
- package/POS/{chunk-2AYY3YZP.js → chunk-R3FC67K2.js} +1 -1
- package/POS/{chunk-R2PLU7CF.js → chunk-R7J2FJKN.js} +1 -1
- package/POS/{chunk-AVTZDNHF.js → chunk-RBNWDZTX.js} +1 -1
- package/POS/{chunk-5QTXIXQV.js → chunk-RU5KHJBI.js} +1 -1
- package/POS/{chunk-LKF6G25J.js → chunk-RZ6DYVKX.js} +1 -1
- package/POS/{chunk-OUPM4Y6E.js → chunk-RZPVXOKI.js} +1 -1
- package/POS/{chunk-QCRGOASB.js → chunk-SDXT5Y6W.js} +1 -1
- package/POS/{chunk-FRN7MHMG.js → chunk-SFXHLNAH.js} +1 -1
- package/POS/{chunk-CQ4D3I57.js → chunk-U5OSZGPD.js} +1 -1
- package/POS/{chunk-7RQX6G47.js → chunk-V2DGGFQ6.js} +1 -1
- package/POS/{chunk-Q7PTKDKU.js → chunk-W26GJ3NA.js} +1 -1
- package/POS/{chunk-ZW5ZPRRH.js → chunk-WKDLP2Y5.js} +1 -1
- package/POS/{chunk-DZFDR6KP.js → chunk-WMOUBI6L.js} +1 -1
- package/POS/{chunk-ERSSLTX4.js → chunk-WQFJDCMP.js} +1 -1
- package/POS/{chunk-226WFCAZ.js → chunk-X46G7TP6.js} +1 -1
- package/POS/{chunk-3CIBCPUR.js → chunk-XPQRAWRH.js} +1 -1
- package/POS/chunk-XRVT4FPS.js +1 -0
- package/POS/{chunk-RYB4L7YC.js → chunk-XURFMLEN.js} +1 -1
- package/POS/{chunk-XUKWZJTB.js → chunk-Y6QD2EXL.js} +1 -1
- package/POS/{chunk-NTSSCTD4.js → chunk-ZAWDJ4AR.js} +1 -1
- package/POS/{chunk-CWTKKN5W.js → chunk-ZEOYVRV6.js} +1 -1
- package/POS/{chunk-N26LHZEE.js → chunk-ZKQY6VVJ.js} +1 -1
- package/POS/{chunk-GUPPLW62.js → chunk-ZSGSRNHY.js} +1 -1
- package/POS/index.html +2 -2
- package/POS/{chunk-LY4FOMQ6.css → main-G4UVSRDY.css} +1 -1
- package/POS/{main-CYUJLOZ4.js → main-WIYN6TDK.js} +2 -2
- package/package.json +1 -1
- package/POS/chunk-65UWJZTO.js +0 -1
- package/POS/chunk-FZK64ANT.js +0 -24
package/POS/3rdpartylicenses.txt
CHANGED
|
@@ -634,6 +634,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
634
634
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
635
635
|
THE SOFTWARE.
|
|
636
636
|
|
|
637
|
+
--------------------------------------------------------------------------------
|
|
638
|
+
Package: cropperjs
|
|
639
|
+
License: "MIT"
|
|
640
|
+
|
|
641
|
+
The MIT License (MIT)
|
|
642
|
+
|
|
643
|
+
Copyright 2015-present Chen Fengyuan
|
|
644
|
+
|
|
645
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
646
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
647
|
+
in the Software without restriction, including without limitation the rights
|
|
648
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
649
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
650
|
+
furnished to do so, subject to the following conditions:
|
|
651
|
+
|
|
652
|
+
The above copyright notice and this permission notice shall be included in
|
|
653
|
+
all copies or substantial portions of the Software.
|
|
654
|
+
|
|
655
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
656
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
657
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
658
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
659
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
660
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
661
|
+
THE SOFTWARE.
|
|
662
|
+
|
|
637
663
|
--------------------------------------------------------------------------------
|
|
638
664
|
Package: papaparse
|
|
639
665
|
License: "MIT"
|
|
@@ -1087,6 +1113,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
1087
1113
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1088
1114
|
SOFTWARE.
|
|
1089
1115
|
|
|
1116
|
+
--------------------------------------------------------------------------------
|
|
1117
|
+
Package: @uppy/image-editor
|
|
1118
|
+
License: "MIT"
|
|
1119
|
+
|
|
1120
|
+
The MIT License (MIT)
|
|
1121
|
+
|
|
1122
|
+
Copyright (c) 2020 Transloadit
|
|
1123
|
+
|
|
1124
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1125
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1126
|
+
in the Software without restriction, including without limitation the rights
|
|
1127
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1128
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1129
|
+
furnished to do so, subject to the following conditions:
|
|
1130
|
+
|
|
1131
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1132
|
+
copies or substantial portions of the Software.
|
|
1133
|
+
|
|
1134
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1135
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1136
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1137
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1138
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1139
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1140
|
+
SOFTWARE.
|
|
1141
|
+
|
|
1090
1142
|
--------------------------------------------------------------------------------
|
|
1091
1143
|
Package: autonumeric
|
|
1092
1144
|
License: "MIT"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as te}from"./chunk-ZGUS3UHQ.js";import{g as U,h as re}from"./chunk-ZW5ZPRRH.js";import"./chunk-WQPMOQKF.js";import{a as Q,b as H}from"./chunk-ZV2DQ5GK.js";import"./chunk-KJAXMZ4I.js";import"./chunk-DTMRGXEX.js";import{O as A}from"./chunk-NKPEHX74.js";import"./chunk-SP2LHZKL.js";import{G as ie,O as ne}from"./chunk-EMFGQNNB.js";import"./chunk-BRLHLTUA.js";import"./chunk-TZT4PVW4.js";import"./chunk-2FWFPV5I.js";import"./chunk-6WXIGYEC.js";import"./chunk-TW74IC5O.js";import"./chunk-QCRGOASB.js";import{d as ee}from"./chunk-YCML2WMM.js";import"./chunk-2AYY3YZP.js";import{a as R}from"./chunk-5NUFPZAD.js";import{$b as v,Ab as n,Bb as i,Cb as h,Db as I,Eb as D,Gb as O,Jb as y,Lb as m,Rd as q,Sc as k,Tc as L,Td as Z,Wa as o,Xa as x,Zb as T,_b as r,_c as j,ac as f,ad as B,ba as u,bc as K,d as w,dd as Y,gb as V,ia as M,jb as d,nb as c,pa as $,qa as N,rc as _,sc as C,tc as b,uc as X,wa as g,xa as S,xc as P}from"./chunk-FDOFOXXB.js";import"./chunk-KW4B7WMB.js";function ue(t,a){if(t&1){let e=O();n(0,"a",19),y("click",function(){g(e);let l=m();return S(l.convertToCsv())}),h(1,"i",20),r(2," Export Fail"),i()}}function xe(t,a){if(t&1){let e=O();n(0,"a",21),y("click",function(){g(e);let l=m();return S(l.uploadOrders())}),h(1,"i",22),r(2," Send Transaction"),i()}}function ve(t,a){t&1&&(n(0,"th",23)(1,"i"),r(2,"Actions"),i()())}function ge(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=m().$implicit;o(),v(e==null||e.Variant==null?null:e.Variant.Name)}}function Se(t,a){if(t&1&&(n(0,"div",28),d(1,ge,2,1,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function he(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=m().$implicit;o(),f(" ",e==null?null:e.Quantity," ")}}function Oe(t,a){if(t&1&&(n(0,"div",30),d(1,he,2,1,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function ye(t,a){if(t&1&&(n(0,"span"),r(1),_(2,"number"),i()),t&2){let e=m().$implicit;o(),f(" ",C(2,1,e.Price)," ")}}function Ce(t,a){if(t&1&&(n(0,"div",30),d(1,ye,3,3,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function be(t,a){if(t&1&&(n(0,"span"),r(1),_(2,"number"),i()),t&2){let e=m().$implicit;o(),f(" ",C(2,1,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function Ee(t,a){if(t&1&&(n(0,"div",30),d(1,be,3,3,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function Ie(t,a){if(t&1){let e=O();n(0,"td",31)(1,"i",32),y("click",function(){g(e);let l=m().$implicit,p=m(2);return S(p.removeOrder(l))}),i()()}}function De(t,a){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),_(5,"date"),i(),n(6,"td"),d(7,Se,2,1,"div",25),i(),n(8,"td"),d(9,Oe,2,1,"div",26),i(),n(10,"td"),d(11,Ce,2,1,"div",26),i(),n(12,"td"),d(13,Ee,2,1,"div",26),i(),d(14,Ie,2,0,"td",27),i()),t&2){let e=a.$implicit,s=m(2);o(2),v(e.Order.Number),o(2),v(b(5,7,e.Order.Date,"dd MMM yyyy")),o(3),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(),c("ngIf",s.roleService.sell.Delete)}}function Te(t,a){if(t&1&&(I(0),d(1,De,15,10,"tr",24),D()),t&2){let e=m();o(),c("ngForOf",e.offlineOrders)}}function Pe(t,a){t&1&&(n(0,"td",33)(1,"h4",34),r(2,"There is no Offline Order"),i()())}function Fe(t,a){if(t&1&&(I(0),n(1,"span"),r(2),n(3,"strong"),r(4),i(),n(5,"strong"),r(6),_(7,"number"),i(),n(8,"strong"),r(9),_(10,"number"),i()(),D()),t&2){let e=m().$implicit;o(2),f("",e==null||e.Variant==null?null:e.Variant.Name," "),o(2),f(" ",e.Quantity+" x"," "),o(2),f(" ",C(7,4,e.Price)+" ="," "),o(3),f(" ",C(10,6,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function we(t,a){if(t&1&&(n(0,"div",40),d(1,Fe,11,8,"ng-container",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function Me(t,a){if(t&1&&(n(0,"div",41),r(1),i()),t&2){let e=m().$implicit;o(),f(" ",e.Message," ")}}function $e(t,a){if(t&1){let e=O();I(0),n(1,"a",42),y("click",function(){g(e);let l=m().$implicit,p=m(2);return S(p.removeFailedOrder(l))}),h(2,"i",43),i(),D()}}function Ne(t,a){if(t&1){let e=O();n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),_(5,"date"),i(),n(6,"td"),d(7,we,2,1,"div",35),i(),n(8,"td"),d(9,Me,2,1,"div",36),i(),n(10,"td",37)(11,"a",38),y("click",function(){let l=g(e).$implicit,p=m(2);return S(p.uploadFailedOrder(l))}),h(12,"i",39),i(),d(13,$e,3,0,"ng-container",29),i()()}if(t&2){let e=a.$implicit,s=m(2);o(2),v(e.Order.Number),o(2),v(b(5,5,e.Order.Date,"dd MMM yyyy")),o(3),c("ngForOf",e.CartItems),o(2),c("ngIf",e.Message),o(4),c("ngIf",s.roleService.sell.Delete)}}function Ve(t,a){if(t&1&&(I(0),d(1,Ne,14,8,"tr",24),D()),t&2){let e=m();o(),c("ngForOf",e.failedOrders)}}function ke(t,a){t&1&&(n(0,"td",44)(1,"h4",34),r(2,"There is no Failed Order"),i()())}var G=class t extends Q{constructor(e,s,l,p,E,F){super(e);this.httpService=s;this.localData=l;this.csvConverter=p;this.toastr=E;this.roleService=F;this.destroy$=new w,this.pageData={Header:"Offline Orders"}}pageData;offlineOrders=[];failedOrders=[];destroy$;ngOnInit(){this.menuData$.pipe(u(this.destroy$)).subscribe(()=>{this.getOfflineOrders(),this.getFailedOrders()})}removeOrder(e){this.localData.removeOrder(e.id).subscribe({next:()=>{this.toastr.success("Successfully removed order "+e.Order.Number,"Offline Order Deleted!"),this.getOfflineOrders()},error:s=>{this.toastr.warning("Failed to remove order "+e.Order.Number,"Failed to delete order!")}})}getOfflineOrders(){this.localData.findAllOrders().pipe(u(this.destroy$)).subscribe({next:e=>{this.offlineOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}getFailedOrders(){this.localData.getFailedOrders().pipe(u(this.destroy$)).subscribe({next:e=>{this.failedOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}uploadFailedOrder(e){this.localData.uploadFailedOrder(e).pipe(u(this.destroy$)).subscribe({next:()=>{this.toastr.success("Successfully uploaded order "+e.Order.Number,"Sync Successful!"),this.getFailedOrders()},error:()=>{this.toastr.error("Failed to sync failed order "+e.Order.Number,"Error!")}})}removeFailedOrder(e){this.localData.removeFailedOrder(e.id).pipe(u(this.destroy$)).subscribe({next:s=>{this.toastr.success("Success to remove failed offline order","Error!"),this.getFailedOrders()},error:s=>{this.toastr.error("Failed to remove failed offline order","Error!")}})}uploadOrders(){this.localData.uploadOrders().pipe(u(this.destroy$)).subscribe({next:e=>{e?this.getOfflineOrders():(this.getOfflineOrders(),this.getFailedOrders())},error:e=>{this.getOfflineOrders(),this.getFailedOrders()}})}convertToCsv(){this.csvConverter.convertToCSV(this.getExportData(),"Fail_Transaction.csv")}getExportData(){let e=[["Number","Date","Item","Qty","Price","Total"]];return this.failedOrders.forEach(s=>{s.Items.forEach(l=>{let p=s.Order.Number.toString(),E=s.Order.Date.toLocaleString(),F=l.Quantity.toString(),ae=l.Price.toString(),le=(l.Quantity*l.UnitQuantity*(l.Price*(1-l.Discount/100))-l.DiscountAmount).toString(),se=[p,E,l.Variant.Name,F,ae,le];e.push(se)})}),e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(s){return new(s||t)(x(H),x(R),x(A),x(te),x(Z),x(ee))};static \u0275cmp=$({type:t,selectors:[["pos-orders"]],features:[V],decls:54,vars:10,consts:[["noOrders",""],["noFailedOrders",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary me-6",3,"click",4,"ngIf"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-10","mb-12"],[1,"col-md"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[1,"border-end",2,"width","130px"],[1,"border-end",2,"width","90px"],[1,"border-end"],[1,"border-end","text-end",2,"width","103px"],[1,"border-end","text-end",2,"width","200px"],["class","text-center","style","width: 90px",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"row","mt-12"],[1,"border-end",2,"width","102px"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary","me-6",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-paper-plane"],[1,"text-center",2,"width","90px"],[4,"ngFor","ngForOf"],["class","list-unstyled text-start",4,"ngFor","ngForOf"],["class","list-unstyled text-end",4,"ngFor","ngForOf"],["class","text-center text-danger",4,"ngIf"],[1,"list-unstyled","text-start"],[4,"ngIf"],[1,"list-unstyled","text-end"],[1,"text-center","text-danger"],[1,"fa-solid","fa-xmark","fa-2x","cursor-pointer",3,"click"],["colspan","7"],[1,"text-center","mt-2"],["class","list-inline text-start",4,"ngFor","ngForOf"],["class","text-danger",4,"ngIf"],[1,"d-flex","justify-content-center"],["matTooltipPosition","above","matTooltip","Sync",1,"ms-2","me-2","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-cloud-arrow-up","text-primary","fa-2x"],[1,"list-inline","text-start"],[1,"text-danger"],["matTooltipPosition","above","matTooltip","Remove",1,"ms-5","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-regular","fa-xmark-circle","text-primary","fa-2x"],["colSpan","5"]],template:function(s,l){if(s&1&&(n(0,"mainpanel-cmp",2)(1,"actions"),d(2,ue,3,0,"a",3)(3,xe,3,0,"a",4),i(),n(4,"content")(5,"div",5)(6,"div",6)(7,"div",7)(8,"h5"),r(9,"Offline Orders"),i(),n(10,"i"),r(11,"Waiting to be uploaded to the server!"),i(),n(12,"table",8)(13,"thead",9)(14,"tr")(15,"th",10),r(16,"Number"),i(),n(17,"th",11),r(18,"Date"),i(),n(19,"th",12),r(20,"item"),i(),n(21,"th",13),r(22," Qty "),i(),n(23,"th",14),r(24," Price "),i(),n(25,"th",14),r(26," Total "),i(),d(27,ve,3,0,"th",15),i()(),n(28,"tbody"),d(29,Te,2,1,"ng-container",16)(30,Pe,3,0,"ng-template",null,0,P),i()()()(),n(32,"div",17)(33,"div",7)(34,"h5"),r(35,"Synchronization Errors"),i(),n(36,"i"),r(37,"Exception occured when trying to upload these orders"),i(),n(38,"table",8)(39,"thead",9)(40,"tr")(41,"th",11),r(42,"Number"),i(),n(43,"th",11),r(44,"Date"),i(),n(45,"th",12),r(46,"item"),i(),n(47,"th",12),r(48,"Sync exception"),i(),h(49,"th",18),i()(),n(50,"tbody"),d(51,Ve,2,1,"ng-container",16)(52,ke,3,0,"ng-template",null,1,P),i()()()()()()()),s&2){let p=T(31),E=T(53);c("pageData",l.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),o(2),c("ngIf",(l.failedOrders==null?null:l.failedOrders.length)>0),o(),c("ngIf",l.offlineOrders.length>0),o(24),c("ngIf",l.roleService.sell.Delete),o(2),c("ngIf",l.offlineOrders.length>0)("ngIfElse",p),o(22),c("ngIf",l.failedOrders.length>0)("ngIfElse",E)}},dependencies:[k,L,U,B,j],styles:[".cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}"]})};function Le(t,a){if(t&1&&(n(0,"div",5),h(1,"i",6),r(2),_(3,"date"),i()),t&2){let e=m();o(2),f(" ",b(3,1,e.LastSync,"dd MMM yyyy HH:mm:ss")," ")}}function je(t,a){if(t&1&&(n(0,"tr")(1,"td",15),r(2),i(),n(3,"td",16),r(4),i(),n(5,"td"),r(6),i(),n(7,"td",11),r(8),_(9,"number"),i()()),t&2){let e=a.$implicit,s=m(2);o(2),v(e.ID),o(2),v(e.Name),o(2),v(e.Code),o(2),K(" ",s.currency," ",b(9,5,e.UnitPrice,"1.0-4")," ")}}function Be(t,a){if(t&1&&(n(0,"table",7)(1,"thead",8)(2,"tr",9)(3,"th",10),r(4,"ID"),i(),n(5,"th",10),r(6,"Name"),i(),n(7,"th",10),r(8,"Code"),i(),n(9,"th",11),r(10,"Unit Price"),i()()(),n(11,"tbody"),d(12,je,10,8,"tr",12),_(13,"sortBy"),i(),n(14,"tfoot")(15,"tr",13)(16,"td",14)(17,"strong"),r(18),_(19,"number"),i()()()()()),t&2){let e=m();o(12),c("ngForOf",X(13,2,e.variantList,"asc","Name")),o(6),f("",C(19,6,e.variantList.length)," Product ")}}function Re(t,a){t&1&&(n(0,"h3",17),r(1,"Product has not been synced yet!"),i())}var z=class t extends Q{constructor(e,s,l){super(e);this.httpService=s;this._localDataService=l;this.destroy$=new w}variantList=[];OriginalList=[];LastSync;currency;destroy$;ngOnInit(){this.menuData$.subscribe(e=>{this.getVariants(),this.getSyncDate(),this.getCurrency()})}getVariants(){this._localDataService.findAllVariant().pipe(u(this.destroy$)).subscribe({next:e=>{this.OriginalList=e,this.variantList=this.OriginalList},error:e=>{console.error(e)}})}getSyncDate(){this._localDataService.getSyncTime().pipe(u(this.destroy$)).subscribe(e=>{this.LastSync=new Date(e.time)})}getCurrency(){this._localDataService.getPOSStorage().pipe(u(this.destroy$)).subscribe(e=>{e&&(this.currency=e.Currencies[0].Symbol)})}filterList(e){this.variantList=this.OriginalList.filter(s=>s.Name.includes(e))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(s){return new(s||t)(x(H),x(R),x(A))};static \u0275cmp=$({type:t,selectors:[["pos-products"]],features:[V],decls:8,vars:5,consts:[["noProduct",""],[3,"textChange","pageData","hideSearchDropdown"],["class","h5",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid","class","table",4,"ngIf","ngIfElse"],[1,"h5"],[1,"fa-solid","fa-sync-alt"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-start"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"text-start","empty-column"],[2,"max-width","100px"],[2,"max-width","300px"],[1,"text-center","mt-4"]],template:function(s,l){if(s&1){let p=O();n(0,"mainpanel-cmp",1),y("textChange",function(F){return g(p),S(l.filterList(F))}),n(1,"actions"),d(2,Le,4,4,"div",2),i(),n(3,"content")(4,"div",3),d(5,Be,20,8,"table",4)(6,Re,2,0,"ng-template",null,0,P),i()()()}if(s&2){let p=T(7);c("pageData",l.menuData)("hideSearchDropdown",!0),o(2),c("ngIf",l.LastSync),o(3),c("ngIf",l.variantList.length>0)("ngIfElse",p)}},dependencies:[k,L,U,B,j,ie]})};var Qe=[{path:"Products",component:z},{path:"Orders",component:G},{path:"**",redirectTo:"Products",pathMatch:"full"}],W=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=N({type:t});static \u0275inj=M({imports:[q.forChild(Qe),q]})};var oe=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=N({type:t});static \u0275inj=M({imports:[Y,W,re,ne]})};export{oe as OfflineModule};
|
|
1
|
+
import{a as te}from"./chunk-ZGUS3UHQ.js";import{g as U,h as re}from"./chunk-WKDLP2Y5.js";import"./chunk-PG4R2OFT.js";import{a as Q,b as H}from"./chunk-36B2BK5B.js";import"./chunk-KJAXMZ4I.js";import"./chunk-DTMRGXEX.js";import{O as A}from"./chunk-NKPEHX74.js";import"./chunk-SP2LHZKL.js";import{G as ie,O as ne}from"./chunk-EMFGQNNB.js";import"./chunk-BRLHLTUA.js";import"./chunk-TZT4PVW4.js";import"./chunk-2FWFPV5I.js";import"./chunk-6WXIGYEC.js";import"./chunk-QJMUNNAM.js";import"./chunk-SDXT5Y6W.js";import{d as ee}from"./chunk-YCML2WMM.js";import"./chunk-R3FC67K2.js";import{a as R}from"./chunk-5NUFPZAD.js";import{$b as v,Ab as n,Bb as i,Cb as h,Db as I,Eb as D,Gb as O,Jb as y,Lb as m,Rd as q,Sc as k,Tc as L,Td as Z,Wa as o,Xa as x,Zb as T,_b as r,_c as j,ac as f,ad as B,ba as u,bc as K,d as w,dd as Y,gb as V,ia as M,jb as d,nb as c,pa as $,qa as N,rc as _,sc as C,tc as b,uc as X,wa as g,xa as S,xc as P}from"./chunk-FDOFOXXB.js";import"./chunk-KW4B7WMB.js";function ue(t,a){if(t&1){let e=O();n(0,"a",19),y("click",function(){g(e);let l=m();return S(l.convertToCsv())}),h(1,"i",20),r(2," Export Fail"),i()}}function xe(t,a){if(t&1){let e=O();n(0,"a",21),y("click",function(){g(e);let l=m();return S(l.uploadOrders())}),h(1,"i",22),r(2," Send Transaction"),i()}}function ve(t,a){t&1&&(n(0,"th",23)(1,"i"),r(2,"Actions"),i()())}function ge(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=m().$implicit;o(),v(e==null||e.Variant==null?null:e.Variant.Name)}}function Se(t,a){if(t&1&&(n(0,"div",28),d(1,ge,2,1,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function he(t,a){if(t&1&&(n(0,"span"),r(1),i()),t&2){let e=m().$implicit;o(),f(" ",e==null?null:e.Quantity," ")}}function Oe(t,a){if(t&1&&(n(0,"div",30),d(1,he,2,1,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function ye(t,a){if(t&1&&(n(0,"span"),r(1),_(2,"number"),i()),t&2){let e=m().$implicit;o(),f(" ",C(2,1,e.Price)," ")}}function Ce(t,a){if(t&1&&(n(0,"div",30),d(1,ye,3,3,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function be(t,a){if(t&1&&(n(0,"span"),r(1),_(2,"number"),i()),t&2){let e=m().$implicit;o(),f(" ",C(2,1,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function Ee(t,a){if(t&1&&(n(0,"div",30),d(1,be,3,3,"span",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function Ie(t,a){if(t&1){let e=O();n(0,"td",31)(1,"i",32),y("click",function(){g(e);let l=m().$implicit,p=m(2);return S(p.removeOrder(l))}),i()()}}function De(t,a){if(t&1&&(n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),_(5,"date"),i(),n(6,"td"),d(7,Se,2,1,"div",25),i(),n(8,"td"),d(9,Oe,2,1,"div",26),i(),n(10,"td"),d(11,Ce,2,1,"div",26),i(),n(12,"td"),d(13,Ee,2,1,"div",26),i(),d(14,Ie,2,0,"td",27),i()),t&2){let e=a.$implicit,s=m(2);o(2),v(e.Order.Number),o(2),v(b(5,7,e.Order.Date,"dd MMM yyyy")),o(3),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(2),c("ngForOf",e.CartItems),o(),c("ngIf",s.roleService.sell.Delete)}}function Te(t,a){if(t&1&&(I(0),d(1,De,15,10,"tr",24),D()),t&2){let e=m();o(),c("ngForOf",e.offlineOrders)}}function Pe(t,a){t&1&&(n(0,"td",33)(1,"h4",34),r(2,"There is no Offline Order"),i()())}function Fe(t,a){if(t&1&&(I(0),n(1,"span"),r(2),n(3,"strong"),r(4),i(),n(5,"strong"),r(6),_(7,"number"),i(),n(8,"strong"),r(9),_(10,"number"),i()(),D()),t&2){let e=m().$implicit;o(2),f("",e==null||e.Variant==null?null:e.Variant.Name," "),o(2),f(" ",e.Quantity+" x"," "),o(2),f(" ",C(7,4,e.Price)+" ="," "),o(3),f(" ",C(10,6,e.Quantity*e.UnitQuantity*e.Price*(1-e.Discount/100)-e.DiscountAmount)," ")}}function we(t,a){if(t&1&&(n(0,"div",40),d(1,Fe,11,8,"ng-container",29),i()),t&2){let e=a.$implicit;o(),c("ngIf",e!=null)}}function Me(t,a){if(t&1&&(n(0,"div",41),r(1),i()),t&2){let e=m().$implicit;o(),f(" ",e.Message," ")}}function $e(t,a){if(t&1){let e=O();I(0),n(1,"a",42),y("click",function(){g(e);let l=m().$implicit,p=m(2);return S(p.removeFailedOrder(l))}),h(2,"i",43),i(),D()}}function Ne(t,a){if(t&1){let e=O();n(0,"tr")(1,"td"),r(2),i(),n(3,"td"),r(4),_(5,"date"),i(),n(6,"td"),d(7,we,2,1,"div",35),i(),n(8,"td"),d(9,Me,2,1,"div",36),i(),n(10,"td",37)(11,"a",38),y("click",function(){let l=g(e).$implicit,p=m(2);return S(p.uploadFailedOrder(l))}),h(12,"i",39),i(),d(13,$e,3,0,"ng-container",29),i()()}if(t&2){let e=a.$implicit,s=m(2);o(2),v(e.Order.Number),o(2),v(b(5,5,e.Order.Date,"dd MMM yyyy")),o(3),c("ngForOf",e.CartItems),o(2),c("ngIf",e.Message),o(4),c("ngIf",s.roleService.sell.Delete)}}function Ve(t,a){if(t&1&&(I(0),d(1,Ne,14,8,"tr",24),D()),t&2){let e=m();o(),c("ngForOf",e.failedOrders)}}function ke(t,a){t&1&&(n(0,"td",44)(1,"h4",34),r(2,"There is no Failed Order"),i()())}var G=class t extends Q{constructor(e,s,l,p,E,F){super(e);this.httpService=s;this.localData=l;this.csvConverter=p;this.toastr=E;this.roleService=F;this.destroy$=new w,this.pageData={Header:"Offline Orders"}}pageData;offlineOrders=[];failedOrders=[];destroy$;ngOnInit(){this.menuData$.pipe(u(this.destroy$)).subscribe(()=>{this.getOfflineOrders(),this.getFailedOrders()})}removeOrder(e){this.localData.removeOrder(e.id).subscribe({next:()=>{this.toastr.success("Successfully removed order "+e.Order.Number,"Offline Order Deleted!"),this.getOfflineOrders()},error:s=>{this.toastr.warning("Failed to remove order "+e.Order.Number,"Failed to delete order!")}})}getOfflineOrders(){this.localData.findAllOrders().pipe(u(this.destroy$)).subscribe({next:e=>{this.offlineOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}getFailedOrders(){this.localData.getFailedOrders().pipe(u(this.destroy$)).subscribe({next:e=>{this.failedOrders=e},error:e=>{this.toastr.error(e.message,"Error!")}})}uploadFailedOrder(e){this.localData.uploadFailedOrder(e).pipe(u(this.destroy$)).subscribe({next:()=>{this.toastr.success("Successfully uploaded order "+e.Order.Number,"Sync Successful!"),this.getFailedOrders()},error:()=>{this.toastr.error("Failed to sync failed order "+e.Order.Number,"Error!")}})}removeFailedOrder(e){this.localData.removeFailedOrder(e.id).pipe(u(this.destroy$)).subscribe({next:s=>{this.toastr.success("Success to remove failed offline order","Error!"),this.getFailedOrders()},error:s=>{this.toastr.error("Failed to remove failed offline order","Error!")}})}uploadOrders(){this.localData.uploadOrders().pipe(u(this.destroy$)).subscribe({next:e=>{e?this.getOfflineOrders():(this.getOfflineOrders(),this.getFailedOrders())},error:e=>{this.getOfflineOrders(),this.getFailedOrders()}})}convertToCsv(){this.csvConverter.convertToCSV(this.getExportData(),"Fail_Transaction.csv")}getExportData(){let e=[["Number","Date","Item","Qty","Price","Total"]];return this.failedOrders.forEach(s=>{s.Items.forEach(l=>{let p=s.Order.Number.toString(),E=s.Order.Date.toLocaleString(),F=l.Quantity.toString(),ae=l.Price.toString(),le=(l.Quantity*l.UnitQuantity*(l.Price*(1-l.Discount/100))-l.DiscountAmount).toString(),se=[p,E,l.Variant.Name,F,ae,le];e.push(se)})}),e}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(s){return new(s||t)(x(H),x(R),x(A),x(te),x(Z),x(ee))};static \u0275cmp=$({type:t,selectors:[["pos-orders"]],features:[V],decls:54,vars:10,consts:[["noOrders",""],["noFailedOrders",""],[3,"pageData","hideSearchDropdown","hideSearchBox"],["matTooltipPosition","above","matTooltip","Export","class","btn btn-outline-secondary me-6",3,"click",4,"ngIf"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"container-fluid"],[1,"row","mt-10","mb-12"],[1,"col-md"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[1,"border-end",2,"width","130px"],[1,"border-end",2,"width","90px"],[1,"border-end"],[1,"border-end","text-end",2,"width","103px"],[1,"border-end","text-end",2,"width","200px"],["class","text-center","style","width: 90px",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"row","mt-12"],[1,"border-end",2,"width","102px"],["matTooltipPosition","above","matTooltip","Export",1,"btn","btn-outline-secondary","me-6",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],["value","Send Transaction","matTooltipPosition","above","matTooltip","Send Transaction",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-paper-plane"],[1,"text-center",2,"width","90px"],[4,"ngFor","ngForOf"],["class","list-unstyled text-start",4,"ngFor","ngForOf"],["class","list-unstyled text-end",4,"ngFor","ngForOf"],["class","text-center text-danger",4,"ngIf"],[1,"list-unstyled","text-start"],[4,"ngIf"],[1,"list-unstyled","text-end"],[1,"text-center","text-danger"],[1,"fa-solid","fa-xmark","fa-2x","cursor-pointer",3,"click"],["colspan","7"],[1,"text-center","mt-2"],["class","list-inline text-start",4,"ngFor","ngForOf"],["class","text-danger",4,"ngIf"],[1,"d-flex","justify-content-center"],["matTooltipPosition","above","matTooltip","Sync",1,"ms-2","me-2","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-cloud-arrow-up","text-primary","fa-2x"],[1,"list-inline","text-start"],[1,"text-danger"],["matTooltipPosition","above","matTooltip","Remove",1,"ms-5","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa-regular","fa-xmark-circle","text-primary","fa-2x"],["colSpan","5"]],template:function(s,l){if(s&1&&(n(0,"mainpanel-cmp",2)(1,"actions"),d(2,ue,3,0,"a",3)(3,xe,3,0,"a",4),i(),n(4,"content")(5,"div",5)(6,"div",6)(7,"div",7)(8,"h5"),r(9,"Offline Orders"),i(),n(10,"i"),r(11,"Waiting to be uploaded to the server!"),i(),n(12,"table",8)(13,"thead",9)(14,"tr")(15,"th",10),r(16,"Number"),i(),n(17,"th",11),r(18,"Date"),i(),n(19,"th",12),r(20,"item"),i(),n(21,"th",13),r(22," Qty "),i(),n(23,"th",14),r(24," Price "),i(),n(25,"th",14),r(26," Total "),i(),d(27,ve,3,0,"th",15),i()(),n(28,"tbody"),d(29,Te,2,1,"ng-container",16)(30,Pe,3,0,"ng-template",null,0,P),i()()()(),n(32,"div",17)(33,"div",7)(34,"h5"),r(35,"Synchronization Errors"),i(),n(36,"i"),r(37,"Exception occured when trying to upload these orders"),i(),n(38,"table",8)(39,"thead",9)(40,"tr")(41,"th",11),r(42,"Number"),i(),n(43,"th",11),r(44,"Date"),i(),n(45,"th",12),r(46,"item"),i(),n(47,"th",12),r(48,"Sync exception"),i(),h(49,"th",18),i()(),n(50,"tbody"),d(51,Ve,2,1,"ng-container",16)(52,ke,3,0,"ng-template",null,1,P),i()()()()()()()),s&2){let p=T(31),E=T(53);c("pageData",l.menuData)("hideSearchDropdown",!0)("hideSearchBox",!0),o(2),c("ngIf",(l.failedOrders==null?null:l.failedOrders.length)>0),o(),c("ngIf",l.offlineOrders.length>0),o(24),c("ngIf",l.roleService.sell.Delete),o(2),c("ngIf",l.offlineOrders.length>0)("ngIfElse",p),o(22),c("ngIf",l.failedOrders.length>0)("ngIfElse",E)}},dependencies:[k,L,U,B,j],styles:[".cursor-pointer[_ngcontent-%COMP%]{cursor:pointer}"]})};function Le(t,a){if(t&1&&(n(0,"div",5),h(1,"i",6),r(2),_(3,"date"),i()),t&2){let e=m();o(2),f(" ",b(3,1,e.LastSync,"dd MMM yyyy HH:mm:ss")," ")}}function je(t,a){if(t&1&&(n(0,"tr")(1,"td",15),r(2),i(),n(3,"td",16),r(4),i(),n(5,"td"),r(6),i(),n(7,"td",11),r(8),_(9,"number"),i()()),t&2){let e=a.$implicit,s=m(2);o(2),v(e.ID),o(2),v(e.Name),o(2),v(e.Code),o(2),K(" ",s.currency," ",b(9,5,e.UnitPrice,"1.0-4")," ")}}function Be(t,a){if(t&1&&(n(0,"table",7)(1,"thead",8)(2,"tr",9)(3,"th",10),r(4,"ID"),i(),n(5,"th",10),r(6,"Name"),i(),n(7,"th",10),r(8,"Code"),i(),n(9,"th",11),r(10,"Unit Price"),i()()(),n(11,"tbody"),d(12,je,10,8,"tr",12),_(13,"sortBy"),i(),n(14,"tfoot")(15,"tr",13)(16,"td",14)(17,"strong"),r(18),_(19,"number"),i()()()()()),t&2){let e=m();o(12),c("ngForOf",X(13,2,e.variantList,"asc","Name")),o(6),f("",C(19,6,e.variantList.length)," Product ")}}function Re(t,a){t&1&&(n(0,"h3",17),r(1,"Product has not been synced yet!"),i())}var z=class t extends Q{constructor(e,s,l){super(e);this.httpService=s;this._localDataService=l;this.destroy$=new w}variantList=[];OriginalList=[];LastSync;currency;destroy$;ngOnInit(){this.menuData$.subscribe(e=>{this.getVariants(),this.getSyncDate(),this.getCurrency()})}getVariants(){this._localDataService.findAllVariant().pipe(u(this.destroy$)).subscribe({next:e=>{this.OriginalList=e,this.variantList=this.OriginalList},error:e=>{console.error(e)}})}getSyncDate(){this._localDataService.getSyncTime().pipe(u(this.destroy$)).subscribe(e=>{this.LastSync=new Date(e.time)})}getCurrency(){this._localDataService.getPOSStorage().pipe(u(this.destroy$)).subscribe(e=>{e&&(this.currency=e.Currencies[0].Symbol)})}filterList(e){this.variantList=this.OriginalList.filter(s=>s.Name.includes(e))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(s){return new(s||t)(x(H),x(R),x(A))};static \u0275cmp=$({type:t,selectors:[["pos-products"]],features:[V],decls:8,vars:5,consts:[["noProduct",""],[3,"textChange","pageData","hideSearchDropdown"],["class","h5",4,"ngIf"],[1,"container-fluid","mt-5"],["id","tableGrid","class","table",4,"ngIf","ngIfElse"],[1,"h5"],[1,"fa-solid","fa-sync-alt"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"text-start"],[1,"text-end"],[4,"ngFor","ngForOf"],[1,"table-footer"],["colspan","4",1,"text-start","empty-column"],[2,"max-width","100px"],[2,"max-width","300px"],[1,"text-center","mt-4"]],template:function(s,l){if(s&1){let p=O();n(0,"mainpanel-cmp",1),y("textChange",function(F){return g(p),S(l.filterList(F))}),n(1,"actions"),d(2,Le,4,4,"div",2),i(),n(3,"content")(4,"div",3),d(5,Be,20,8,"table",4)(6,Re,2,0,"ng-template",null,0,P),i()()()}if(s&2){let p=T(7);c("pageData",l.menuData)("hideSearchDropdown",!0),o(2),c("ngIf",l.LastSync),o(3),c("ngIf",l.variantList.length>0)("ngIfElse",p)}},dependencies:[k,L,U,B,j,ie]})};var Qe=[{path:"Products",component:z},{path:"Orders",component:G},{path:"**",redirectTo:"Products",pathMatch:"full"}],W=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=N({type:t});static \u0275inj=M({imports:[q.forChild(Qe),q]})};var oe=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=N({type:t});static \u0275inj=M({imports:[Y,W,re,ne]})};export{oe as OfflineModule};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as be,b as _e,c as Te,d as ye,e as Ce}from"./chunk-OKHUW2BE.js";import{c as Je,d as Xe}from"./chunk-U4YYADFZ.js";import{a as $e}from"./chunk-EIXMTJ2M.js";import{c as qe,d as ge}from"./chunk-4MSAIYQR.js";import{a as ue,b as fe}from"./chunk-ZEJSQR34.js";import{a as me}from"./chunk-OKV3KXFX.js";import{d as Ge}from"./chunk-ZW5ZPRRH.js";import{c as Qe,d as We}from"./chunk-KJAXMZ4I.js";import{a as y,f as Ue,h as he,j as $,k as je,n as h}from"./chunk-TZT4PVW4.js";import{Ab as _,Bb as w,Cb as E,Db as R,Ea as C,Eb as N,Ec as le,Fa as ee,Fb as m,Gb as ie,Gc as T,Hc as O,Ja as te,Jb as P,Lb as u,Ma as Me,Nc as Ke,Qc as pe,Sb as Re,Sc as Be,Tb as x,Tc as j,Ub as S,Vb as I,Wa as c,Wc as ne,Xa as g,Xc as Q,Zb as de,ab as ce,d as K,dd as Ae,ed as oe,gc as Ne,ha as ke,ia as ze,ib as G,ic as U,jb as d,jc as z,kc as H,mb as A,mc as Oe,nb as a,nc as Pe,pa as B,pb as Ve,qa as De,qb as Fe,ra as se,rb as q,va as Le,wa as Z,xa as Y,xc as He}from"./chunk-FDOFOXXB.js";import{a as F,b as Ee}from"./chunk-KW4B7WMB.js";var tt=["container"],it=["resizeHelper"],lt=["reorderIndicatorUp"],nt=["reorderIndicatorDown"],ot=["table"],rt=["scrollableView"],at=["scrollableFrozenView"],st=(t,o,e,i,l)=>({"p-treetable p-component":!0,"p-treetable-hoverable-rows":t,"p-treetable-auto-layout":o,"p-treetable-resizable":e,"p-treetable-resizable-fit":i,"p-treetable-flex-scrollable":l}),M=t=>({$implicit:t}),ct=(t,o)=>({left:t,width:o}),dt=t=>({width:t}),ve=()=>({display:"none"});function pt(t,o){if(t&1&&E(0,"i"),t&2){let e=u(2);q("p-treetable-loading-icon pi-spin "+e.loadingIcon)}}function ht(t,o){t&1&&E(0,"SpinnerIcon",24),t&2&&a("spin",!0)("styleClass","p-treetable-loading-icon")}function ut(t,o){}function ft(t,o){t&1&&d(0,ut,0,0,"ng-template")}function gt(t,o){if(t&1&&(_(0,"span",25),d(1,ft,1,0,null,26),w()),t&2){let e=u(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate)}}function mt(t,o){if(t&1&&(R(0),d(1,ht,1,2,"SpinnerIcon",22)(2,gt,2,1,"span",23),N()),t&2){let e=u(2);c(),a("ngIf",!e.loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate)}}function bt(t,o){if(t&1&&(_(0,"div",18)(1,"div",19),d(2,pt,1,2,"i",20)(3,mt,3,2,"ng-container",21),w()()),t&2){let e=u();c(2),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function _t(t,o){t&1&&m(0)}function Tt(t,o){if(t&1&&(_(0,"div",27),d(1,_t,1,0,"ng-container",26),w()),t&2){let e=u();c(),a("ngTemplateOutlet",e.captionTemplate)}}function yt(t,o){t&1&&m(0)}function Ct(t,o){if(t&1&&d(0,yt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate)}}function wt(t,o){t&1&&d(0,Ct,1,1,"ng-template",29)}function vt(t,o){t&1&&m(0)}function St(t,o){if(t&1&&d(0,vt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate)}}function It(t,o){t&1&&d(0,St,1,1,"ng-template",30)}function xt(t,o){t&1&&m(0)}function Et(t,o){if(t&1&&d(0,xt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate)}}function kt(t,o){t&1&&d(0,Et,1,1,"ng-template",31)}function zt(t,o){t&1&&m(0)}function Dt(t,o){if(t&1&&d(0,zt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate)}}function Lt(t,o){t&1&&d(0,Dt,1,1,"ng-template",32)}function Mt(t,o){if(t&1){let e=ie();_(0,"p-paginator",28),P("onPageChange",function(l){Z(e);let n=u();return Y(n.onPageChange(l))}),d(1,wt,1,0,null,21)(2,It,1,0,null,21)(3,kt,1,0,null,21)(4,Lt,1,0,null,21),w()}if(t&2){let e=u();a("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("styleClass",e.paginatorStyleClass)("locale",e.paginatorLocale),c(),a("ngIf",e.paginatorFirstPageLinkIconTemplate),c(),a("ngIf",e.paginatorPreviousPageLinkIconTemplate),c(),a("ngIf",e.paginatorLastPageLinkIconTemplate),c(),a("ngIf",e.paginatorNextPageLinkIconTemplate)}}function Vt(t,o){t&1&&m(0)}function Ft(t,o){t&1&&m(0)}function Rt(t,o){t&1&&m(0)}function Nt(t,o){if(t&1&&(_(0,"div",33)(1,"table",34,1),d(3,Vt,1,0,"ng-container",35),_(4,"thead",36),d(5,Ft,1,0,"ng-container",35),w(),E(6,"tbody",37),_(7,"tfoot",38),d(8,Rt,1,0,"ng-container",35),w()()()),t&2){let e=u();c(),a("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),c(2),a("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",z(10,M,e.columns)),c(2),a("ngTemplateOutlet",e.headerTemplate)("ngTemplateOutletContext",z(12,M,e.columns)),c(),a("pTreeTableBody",e.columns)("pTreeTableBodyTemplate",e.bodyTemplate),c(2),a("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",z(14,M,e.columns))}}function Ot(t,o){if(t&1&&E(0,"div",42,3),t&2){let e=u(2);a("ttScrollableView",e.frozenColumns)("frozen",!0)("ngStyle",z(4,dt,e.frozenWidth))("scrollHeight",e.scrollHeight)}}function Pt(t,o){if(t&1&&(_(0,"div",39),d(1,Ot,2,6,"div",40),E(2,"div",41,2),w()),t&2){let e=u();c(),a("ngIf",e.frozenColumns||e.frozenBodyTemplate),c(),a("ttScrollableView",e.columns)("frozen",!1)("scrollHeight",e.scrollHeight)("ngStyle",H(5,ct,e.frozenWidth,"calc(100% - "+e.frozenWidth+")"))}}function Ht(t,o){t&1&&m(0)}function Kt(t,o){if(t&1&&d(0,Ht,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate)}}function Bt(t,o){t&1&&d(0,Kt,1,1,"ng-template",29)}function At(t,o){t&1&&m(0)}function Ut(t,o){if(t&1&&d(0,At,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate)}}function jt(t,o){t&1&&d(0,Ut,1,1,"ng-template",30)}function Qt(t,o){t&1&&m(0)}function Wt(t,o){if(t&1&&d(0,Qt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate)}}function Gt(t,o){t&1&&d(0,Wt,1,1,"ng-template",31)}function qt(t,o){t&1&&m(0)}function $t(t,o){if(t&1&&d(0,qt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate)}}function Jt(t,o){t&1&&d(0,$t,1,1,"ng-template",32)}function Xt(t,o){if(t&1){let e=ie();_(0,"p-paginator",43),P("onPageChange",function(l){Z(e);let n=u();return Y(n.onPageChange(l))}),d(1,Bt,1,0,null,21)(2,jt,1,0,null,21)(3,Gt,1,0,null,21)(4,Jt,1,0,null,21),w()}if(t&2){let e=u();a("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("styleClass",e.paginatorStyleClass)("locale",e.paginatorLocale),c(),a("ngIf",e.paginatorFirstPageLinkIconTemplate),c(),a("ngIf",e.paginatorPreviousPageLinkIconTemplate),c(),a("ngIf",e.paginatorLastPageLinkIconTemplate),c(),a("ngIf",e.paginatorNextPageLinkIconTemplate)}}function Zt(t,o){t&1&&m(0)}function Yt(t,o){if(t&1&&(_(0,"div",44),d(1,Zt,1,0,"ng-container",26),w()),t&2){let e=u();c(),a("ngTemplateOutlet",e.summaryTemplate)}}function ei(t,o){t&1&&E(0,"div",45,4),t&2&&a("ngStyle",U(1,ve))}function ti(t,o){t&1&&E(0,"ArrowDownIcon")}function ii(t,o){}function li(t,o){t&1&&d(0,ii,0,0,"ng-template")}function ni(t,o){if(t&1&&(_(0,"span",46,5),d(2,ti,1,0,"ArrowDownIcon",21)(3,li,1,0,null,26),w()),t&2){let e=u();a("ngStyle",U(3,ve)),c(2),a("ngIf",!e.reorderIndicatorUpIconTemplate),c(),a("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate)}}function oi(t,o){t&1&&E(0,"ArrowUpIcon")}function ri(t,o){}function ai(t,o){t&1&&d(0,ri,0,0,"ng-template")}function si(t,o){if(t&1&&(_(0,"span",47,6),d(2,oi,1,0,"ArrowUpIcon",21)(3,ai,1,0,null,26),w()),t&2){let e=u();a("ngStyle",U(3,ve)),c(2),a("ngIf",!e.reorderIndicatorDownIconTemplate),c(),a("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate)}}var ci=["pTreeTableBody",""],di=(t,o,e,i)=>({$implicit:t,node:o,rowData:e,columns:i}),pi=(t,o)=>({$implicit:t,frozen:o});function hi(t,o){t&1&&m(0)}function ui(t,o){if(t&1&&(R(0),d(1,hi,1,0,"ng-container",2),N()),t&2){let e=u().$implicit,i=u();c(),a("ngTemplateOutlet",i.template)("ngTemplateOutletContext",Oe(2,di,e,e.node,e.node.data,i.columns))}}function fi(t,o){if(t&1&&d(0,ui,2,7,"ng-container",1),t&2){let e=o.$implicit;a("ngIf",e.visible)}}function gi(t,o){t&1&&m(0)}function mi(t,o){if(t&1&&(R(0),d(1,gi,1,0,"ng-container",2),N()),t&2){let e=u();c(),a("ngTemplateOutlet",e.tt.emptyMessageTemplate)("ngTemplateOutletContext",H(2,pi,e.columns,e.frozen))}}var bi=["scrollHeader"],_i=["scrollHeaderBox"],Ti=["scrollBody"],yi=["scrollTable"],Ci=["loadingTable"],wi=["scrollFooter"],vi=["scrollFooterBox"],Si=["scrollableAligner"],Ii=["scroller"],xi=["ttScrollableView",""],Ei=t=>({height:t}),Ze=(t,o)=>({$implicit:t,options:o}),ki=t=>({options:t}),zi=(t,o)=>({"max-height":t,"overflow-y":o}),Di=()=>({}),Li=()=>({"background-color":"transparent"});function Mi(t,o){t&1&&m(0)}function Vi(t,o){t&1&&m(0)}function Fi(t,o){t&1&&m(0)}function Ri(t,o){if(t&1&&d(0,Fi,1,0,"ng-container",12),t&2){let e=o.$implicit,i=o.options;u(2);let l=de(11);a("ngTemplateOutlet",l)("ngTemplateOutletContext",H(2,Ze,e,i))}}function Ni(t,o){t&1&&m(0)}function Oi(t,o){if(t&1&&d(0,Ni,1,0,"ng-container",12),t&2){let e=o.options,i=u(3);a("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",z(2,ki,e))}}function Pi(t,o){t&1&&(R(0),d(1,Oi,1,4,"ng-template",19),N())}function Hi(t,o){if(t&1){let e=ie();_(0,"p-scroller",17,3),P("onLazyLoad",function(l){Z(e);let n=u();return Y(n.tt.onLazyItemLoad(l))}),d(2,Ri,1,5,"ng-template",18)(3,Pi,2,0,"ng-container",15),w()}if(t&2){let e=u();Fe(z(8,Ei,e.tt.scrollHeight!=="flex"?e.tt.scrollHeight:void 0)),a("items",e.tt.serializedValue)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.tt.virtualScrollItemSize||e.tt._virtualRowHeight)("lazy",e.tt.lazy)("options",e.tt.virtualScrollOptions),c(3),a("ngIf",e.loaderTemplate)}}function Ki(t,o){t&1&&m(0)}function Bi(t,o){if(t&1&&(R(0),_(1,"div",20,4),d(3,Ki,1,0,"ng-container",12),w(),N()),t&2){let e=u(),i=de(11);c(),a("ngStyle",H(3,zi,e.tt.scrollHeight!=="flex"?e.scrollHeight:void 0,!e.frozen&&e.tt.scrollHeight?"scroll":void 0)),c(2),a("ngTemplateOutlet",i)("ngTemplateOutletContext",H(7,Ze,e.serializedValue,U(6,Di)))}}function Ai(t,o){t&1&&m(0)}function Ui(t,o){t&1&&E(0,"div",24,6),t&2&&a("ngStyle",U(1,Li))}function ji(t,o){if(t&1&&(_(0,"table",21,5),d(2,Ai,1,0,"ng-container",12),E(3,"tbody",22),w(),d(4,Ui,2,2,"div",23)),t&2){let e=o.$implicit,i=o.options,l=u();q(l.tt.tableStyleClass),a("ngClass",i.contentStyleClass)("ngStyle",l.getMergedTableStyles(i.contentStyle)),c(2),a("ngTemplateOutlet",l.frozen&&l.tt.frozenColGroupTemplate||l.tt.colGroupTemplate)("ngTemplateOutletContext",z(11,M,l.columns)),c(),a("pTreeTableBody",l.columns)("pTreeTableBodyTemplate",l.frozen&&l.tt.frozenBodyTemplate||l.tt.bodyTemplate)("serializedNodes",e)("frozen",l.frozen),c(),a("ngIf",l.frozen)}}function Qi(t,o){t&1&&m(0)}function Wi(t,o){t&1&&m(0)}function Gi(t,o){if(t&1&&(_(0,"div",25,7)(2,"div",26,8)(4,"table",27),d(5,Qi,1,0,"ng-container",12),_(6,"tfoot",28),d(7,Wi,1,0,"ng-container",12),w()()()()),t&2){let e=u();c(4),a("ngClass",e.tt.tableStyleClass)("ngStyle",e.tt.tableStyle),c(),a("ngTemplateOutlet",e.frozen&&e.tt.frozenColGroupTemplate||e.tt.colGroupTemplate)("ngTemplateOutletContext",z(6,M,e.columns)),c(2),a("ngTemplateOutlet",e.frozen&&e.tt.frozenFooterTemplate||e.tt.footerTemplate)("ngTemplateOutletContext",z(8,M,e.columns))}}function qi(t,o){t&1&&E(0,"SortAltIcon",3),t&2&&a("styleClass","p-sortable-column-icon")}function $i(t,o){t&1&&E(0,"SortAmountUpAltIcon",3),t&2&&a("styleClass","p-sortable-column-icon")}function Ji(t,o){t&1&&E(0,"SortAmountDownIcon",3),t&2&&a("styleClass","p-sortable-column-icon")}function Xi(t,o){if(t&1&&(R(0),d(1,qi,1,1,"SortAltIcon",2)(2,$i,1,1,"SortAmountUpAltIcon",2)(3,Ji,1,1,"SortAmountDownIcon",2),N()),t&2){let e=u();c(),a("ngIf",e.sortOrder===0),c(),a("ngIf",e.sortOrder===1),c(),a("ngIf",e.sortOrder===-1)}}function Zi(t,o){}function Yi(t,o){t&1&&d(0,Zi,0,0,"ng-template")}function el(t,o){if(t&1&&(_(0,"span",4),d(1,Yi,1,0,null,5),w()),t&2){let e=u();c(),a("ngTemplateOutlet",e.tt.sortIconTemplate)("ngTemplateOutletContext",z(2,M,e.sortOrder))}}var tl=(t,o)=>({visibility:t,"margin-left":o});function il(t,o){t&1&&E(0,"ChevronDownIcon"),t&2&&A("aria-hidden",!0)}function ll(t,o){t&1&&E(0,"ChevronRightIcon"),t&2&&A("aria-hidden",!0)}function nl(t,o){if(t&1&&(R(0),d(1,il,1,1,"ChevronDownIcon",1)(2,ll,1,1,"ChevronRightIcon",1),N()),t&2){let e=u();c(),a("ngIf",e.rowNode.node.expanded),c(),a("ngIf",!e.rowNode.node.expanded)}}function ol(t,o){}function rl(t,o){t&1&&d(0,ol,0,0,"ng-template")}var we=(()=>{class t{sortSource=new K;selectionSource=new K;contextMenuSource=new K;uiUpdateSource=new K;totalRecordsSource=new K;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();uiUpdateSource$=this.uiUpdateSource.asObservable();totalRecordsSource$=this.totalRecordsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onUIUpdate(e){this.uiUpdateSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ke({token:t,factory:t.\u0275fac})}return t})(),W=(()=>{class t{document;renderer;el;cd;zone;tableService;filterService;config;columns;style;styleClass;tableStyle;tableStyleClass;autoLayout;lazy=!1;lazyLoadOnInit=!0;paginator;rows;first=0;pageLinks=5;rowsPerPageOptions;alwaysShowPaginator=!0;paginatorPosition="bottom";paginatorStyleClass;paginatorDropdownAppendTo;currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showJumpToPageDropdown;showFirstLastIcon=!0;showPageLinks=!0;defaultSortOrder=1;sortMode="single";resetPageOnSort=!0;customSort;selectionMode;contextMenuSelection;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;compareSelectionBy="deepEquals";rowHover;loading;loadingIcon;showLoader=!0;scrollable;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=150;frozenWidth;frozenColumns;resizableColumns;columnResizeMode="fit";reorderableColumns;contextMenu;rowTrackBy=(e,i)=>i;filters={};globalFilterFields;filterDelay=300;filterMode="lenient";filterLocale;paginatorLocale;get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get value(){return this._value}set value(e){this._value=e}get virtualRowHeight(){return this._virtualRowHeight}set virtualRowHeight(e){this._virtualRowHeight=e,console.warn("The virtualRowHeight property is deprecated, use virtualScrollItemSize property instead.")}get selectionKeys(){return this._selectionKeys}set selectionKeys(e){this._selectionKeys=e,this.selectionKeysChange.emit(this._selectionKeys)}selectionChange=new C;contextMenuSelectionChange=new C;onFilter=new C;onNodeExpand=new C;onNodeCollapse=new C;onPage=new C;onSort=new C;onLazyLoad=new C;sortFunction=new C;onColResize=new C;onColReorder=new C;onNodeSelect=new C;onNodeUnselect=new C;onContextMenuSelect=new C;onHeaderCheckboxToggle=new C;onEditInit=new C;onEditComplete=new C;onEditCancel=new C;selectionKeysChange=new C;containerViewChild;resizeHelperViewChild;reorderIndicatorUpViewChild;reorderIndicatorDownViewChild;tableViewChild;scrollableViewChild;scrollableFrozenViewChild;templates;_value=[];_virtualRowHeight=28;_selectionKeys;serializedValue;_totalRecords=0;_multiSortMeta;_sortField;_sortOrder=1;filteredNodes;filterTimeout;colGroupTemplate;captionTemplate;headerTemplate;bodyTemplate;footerTemplate;summaryTemplate;emptyMessageTemplate;paginatorLeftTemplate;paginatorRightTemplate;paginatorDropdownItemTemplate;frozenHeaderTemplate;frozenBodyTemplate;frozenFooterTemplate;frozenColGroupTemplate;loadingIconTemplate;reorderIndicatorUpIconTemplate;reorderIndicatorDownIconTemplate;sortIconTemplate;checkboxIconTemplate;headerCheckboxIconTemplate;togglerIconTemplate;paginatorFirstPageLinkIconTemplate;paginatorLastPageLinkIconTemplate;paginatorPreviousPageLinkIconTemplate;paginatorNextPageLinkIconTemplate;lastResizerHelperX;reorderIconWidth;reorderIconHeight;draggedColumn;dropPosition;preventSelectionSetterPropagation;_selection;selectedKeys={};rowTouched;editingCell;editingCellData;editingCellField;editingCellClick;documentEditListener;initialized;toggleRowIndex;ngOnInit(){this.lazy&&this.lazyLoadOnInit&&!this.virtualScroll&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"reorderindicatorupicon":this.reorderIndicatorUpIconTemplate=e.template;break;case"reorderindicatordownicon":this.reorderIndicatorDownIconTemplate=e.template;break;case"sorticon":this.sortIconTemplate=e.template;break;case"checkboxicon":this.checkboxIconTemplate=e.template;break;case"headercheckboxicon":this.headerCheckboxIconTemplate=e.template;break;case"togglericon":this.togglerIconTemplate=e.template;break;case"paginatorfirstpagelinkicon":this.paginatorFirstPageLinkIconTemplate=e.template;break;case"paginatorlastpagelinkicon":this.paginatorLastPageLinkIconTemplate=e.template;break;case"paginatorpreviouspagelinkicon":this.paginatorPreviousPageLinkIconTemplate=e.template;break;case"paginatornextpagelinkicon":this.paginatorNextPageLinkIconTemplate=e.template;break}})}constructor(e,i,l,n,r,s,p,f){this.document=e,this.renderer=i,this.el=l,this.cd=n,this.zone=r,this.tableService=s,this.filterService=p,this.config=f}ngOnChanges(e){e.value&&(this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,this.sortMode=="single"&&this.sortField?this.sortSingle():this.sortMode=="multiple"&&this.multiSortMeta?this.sortMultiple():this.hasFilter()&&this._filter()),this.updateSerializedValue(),this.tableService.onUIUpdate(this.value)),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateselectedKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1)}updateSerializedValue(){this.serializedValue=[],this.paginator?this.serializePageNodes():this.serializeNodes(null,this.filteredNodes||this.value,0,!0)}serializeNodes(e,i,l,n){if(i&&i.length)for(let r of i){r.parent=e;let s={node:r,parent:e,level:l,visible:n&&(e?e.expanded:!0)};this.serializedValue.push(s),s.visible&&r.expanded&&this.serializeNodes(r,r.children,l+1,s.visible)}}serializePageNodes(){let e=this.filteredNodes||this.value;if(this.serializedValue=[],e&&e.length){let i=this.lazy?0:this.first;for(let l=i;l<i+this.rows;l++){let n=e[l];n&&(this.serializedValue.push({node:n,parent:null,level:0,visible:!0}),this.serializeNodes(n,n.children,1,!0))}}}updateselectedKeys(){if(this.dataKey&&this._selection)if(this.selectedKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectedKeys[String(y.resolveFieldData(e.data,this.dataKey))]=1;else this.selectedKeys[String(y.resolveFieldData(this._selection.data,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.serializePageNodes(),this.onPage.emit({first:this.first,rows:this.rows}),this.tableService.onUIUpdate(this.value),this.scrollable&&this.resetScrollTop()}sort(e){let i=e.originalEvent;if(this.sortMode==="single"&&(this._sortOrder=this.sortField===e.field?this.sortOrder*-1:this.defaultSortOrder,this._sortField=e.field,this.sortSingle(),this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()),this.sortMode==="multiple"){let l=i.metaKey||i.ctrlKey,n=this.getSortMeta(e.field);n?l?n.order=n.order*-1:(this._multiSortMeta=[{field:e.field,order:n.order*-1}],this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()):((!l||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()),this.multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}}sortSingle(){if(this.sortField&&this.sortOrder){this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortNodes(this.value),this.hasFilter()&&this._filter());let e={field:this.sortField,order:this.sortOrder};this.onSort.emit(e),this.tableService.onSort(e),this.updateSerializedValue()}}sortNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:e,mode:this.sortMode,field:this.sortField,order:this.sortOrder}):e.sort((i,l)=>{let n=y.resolveFieldData(i.data,this.sortField),r=y.resolveFieldData(l.data,this.sortField),s=null;return n==null&&r!=null?s=-1:n!=null&&r==null?s=1:n==null&&r==null?s=0:typeof n=="string"&&typeof r=="string"?s=n.localeCompare(r,void 0,{numeric:!0}):s=n<r?-1:n>r?1:0,this.sortOrder*s});for(let i of e)this.sortNodes(i.children)}}sortMultiple(){this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortMultipleNodes(this.value),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.updateSerializedValue(),this.tableService.onSort(this.multiSortMeta))}sortMultipleNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):e.sort((i,l)=>this.multisortField(i,l,this.multiSortMeta,0));for(let i of e)this.sortMultipleNodes(i.children)}}multisortField(e,i,l,n){if(y.isEmpty(this.multiSortMeta)||y.isEmpty(l[n]))return 0;let r=y.resolveFieldData(e.data,l[n].field),s=y.resolveFieldData(i.data,l[n].field),p=null;if(r==null&&s!=null?p=-1:r!=null&&s==null?p=1:r==null&&s==null&&(p=0),typeof r=="string"||r instanceof String){if(r.localeCompare&&r!=s)return l[n].order*r.localeCompare(s,void 0,{numeric:!0})}else p=r<s?-1:1;return r==s?l.length-1>n?this.multisortField(e,i,l,n+1):0:l[n].order*p}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let i=0;i<this.multiSortMeta.length;i++)if(this.multiSortMeta[i].field===e)return this.multiSortMeta[i]}return null}isSorted(e){if(this.sortMode==="single")return this.sortField&&this.sortField===e;if(this.sortMode==="multiple"){let i=!1;if(this.multiSortMeta){for(let l=0;l<this.multiSortMeta.length;l++)if(this.multiSortMeta[l].field==e){i=!0;break}}return i}}createLazyLoadMetadata(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta,forceUpdate:()=>this.cd.detectChanges()}}onLazyItemLoad(e){this.onLazyLoad.emit(Ee(F(F({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scrollableViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e)}scrollTo(e){this.scrollableViewChild&&this.scrollableViewChild.scrollTo(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollTo(e)}isEmpty(){let e=this.filteredNodes||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}onColumnResizeBegin(e){let i=h.getOffset(this.containerViewChild?.nativeElement).left;this.lastResizerHelperX=e.pageX-i+this.containerViewChild?.nativeElement.scrollLeft,e.preventDefault()}onColumnResize(e){let i=h.getOffset(this.containerViewChild?.nativeElement).left;h.addClass(this.containerViewChild?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-i+this.containerViewChild?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(e,i){let l=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,n=i.offsetWidth,r=n+l,s=i.style.minWidth||15;if(n+l>parseInt(s)){if(this.columnResizeMode==="fit"){let p=i.nextElementSibling;for(;!p.offsetParent;)p=p.nextElementSibling;if(p){let f=p.offsetWidth-l,b=p.style.minWidth||15;if(r>15&&f>parseInt(b))if(this.scrollable){let k=this.findParentScrollableView(i),v=h.findSingle(k,".p-treetable-scrollable-body table")||h.findSingle(k,".p-scroller-viewport table"),L=h.findSingle(k,"table.p-treetable-scrollable-header-table"),V=h.findSingle(k,"table.p-treetable-scrollable-footer-table"),D=h.index(i);this.resizeColGroup(L,D,r,f),this.resizeColGroup(v,D,r,f),this.resizeColGroup(V,D,r,f)}else i.style.width=r+"px",p&&(p.style.width=f+"px")}}else if(this.columnResizeMode==="expand")if(this.scrollable){let p=this.findParentScrollableView(i),f=h.findSingle(p,".p-treetable-scrollable-body")||h.findSingle(p,".p-scroller-viewport"),b=h.findSingle(p,".p-treetable-scrollable-header"),k=h.findSingle(p,".p-treetable-scrollable-footer"),v=h.findSingle(p,".p-treetable-scrollable-body table")||h.findSingle(p,".p-scroller-viewport table"),L=h.findSingle(p,"table.p-treetable-scrollable-header-table"),V=h.findSingle(p,"table.p-treetable-scrollable-footer-table"),D=h.index(i),J=i?v.offsetWidth+l:r,X=i?L.offsetWidth+l:r,re=this.containerViewChild?.nativeElement.offsetWidth>=J,ae=(Se,Ie,xe,et)=>{Se&&Ie&&(Se.style.width=et?xe+h.calculateScrollbarWidth(f)+"px":"auto",Ie.style.width=xe+"px")};ae(f,v,J,re),ae(b,L,X,re),ae(k,V,X,re),this.resizeColGroup(L,D,r,null),this.resizeColGroup(v,D,r,null),this.resizeColGroup(V,D,r,null)}else{this.tableViewChild.nativeElement.style.width=this.tableViewChild?.nativeElement.offsetWidth+l+"px",i.style.width=r+"px";let p=this.tableViewChild?.nativeElement.style.width;this.containerViewChild.nativeElement.style.width=p+"px"}this.onColResize.emit({element:i,delta:l})}this.resizeHelperViewChild.nativeElement.style.display="none",h.removeClass(this.containerViewChild?.nativeElement,"p-unselectable-text")}findParentScrollableView(e){if(e){let i=e.parentElement;for(;i&&!h.hasClass(i,"p-treetable-scrollable-view");)i=i.parentElement;return i}else return null}resizeColGroup(e,i,l,n){if(e){let r=e.children[0].nodeName==="COLGROUP"?e.children[0]:null;if(r){let s=r.children[i],p=s.nextElementSibling;s.style.width=l+"px",p&&n&&(p.style.width=n+"px")}else throw"Scrollable tables require a colgroup to support resizable columns"}}onColumnDragStart(e,i){this.reorderIconWidth=h.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=h.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=i,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,i){if(this.reorderableColumns&&this.draggedColumn&&i){e.preventDefault();let l=h.getOffset(this.containerViewChild?.nativeElement),n=h.getOffset(i);if(this.draggedColumn!=i){let r=n.left-l.left,s=l.top-n.top,p=n.left+i.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=n.top-l.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=n.top-l.top+i.offsetHeight+"px",e.pageX>p?(this.reorderIndicatorUpViewChild.nativeElement.style.left=r+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=r+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=r-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=r-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,i){if(e.preventDefault(),this.draggedColumn){let l=h.indexWithinGroup(this.draggedColumn,"ttreorderablecolumn"),n=h.indexWithinGroup(i,"ttreorderablecolumn"),r=l!=n;r&&(n-l==1&&this.dropPosition===-1||l-n==1&&this.dropPosition===1)&&(r=!1),r&&n<l&&this.dropPosition===1&&(n=n+1),r&&n>l&&this.dropPosition===-1&&(n=n-1),r&&(y.reorderArray(this.columns,l,n),this.onColReorder.emit({dragIndex:l,dropIndex:n,columns:this.columns})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}handleRowClick(e){let i=e.originalEvent.target.nodeName;if(!(i=="INPUT"||i=="BUTTON"||i=="A"||h.hasClass(e.originalEvent.target,"p-clickable"))){if(this.selectionMode){this.preventSelectionSetterPropagation=!0;let l=e.rowNode,n=this.isSelected(l.node),r=this.rowTouched?!1:this.metaKeySelection,s=this.dataKey?String(y.resolveFieldData(l.node.data,this.dataKey)):null;if(r){let p=e.originalEvent,f=p.metaKey||p.ctrlKey;if(n&&f){if(this.isSingleSelectionMode())this._selection=null,this.selectedKeys={},this.selectionChange.emit(null);else{let b=this.findIndexInSelection(l.node);this._selection=this.selection.filter((k,v)=>v!=b),this.selectionChange.emit(this.selection),s&&delete this.selectedKeys[s]}this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:l.node,type:"row"})}else this.isSingleSelectionMode()?(this._selection=l.node,this.selectionChange.emit(l.node),s&&(this.selectedKeys={},this.selectedKeys[s]=1)):this.isMultipleSelectionMode()&&(f?this._selection=this.selection||[]:(this._selection=[],this.selectedKeys={}),this._selection=[...this.selection,l.node],this.selectionChange.emit(this.selection),s&&(this.selectedKeys[s]=1)),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:l.node,type:"row",index:e.rowIndex})}else if(this.selectionMode==="single")n?(this._selection=null,this.selectedKeys={},this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:l.node,type:"row"})):(this._selection=l.node,this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:l.node,type:"row",index:e.rowIndex}),s&&(this.selectedKeys={},this.selectedKeys[s]=1));else if(this.selectionMode==="multiple")if(n){let p=this.findIndexInSelection(l.node);this._selection=this.selection.filter((f,b)=>b!=p),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:l.node,type:"row"}),s&&delete this.selectedKeys[s]}else this._selection=this.selection?[...this.selection,l.node]:[l.node],this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:l.node,type:"row",index:e.rowIndex}),s&&(this.selectedKeys[s]=1);this.tableService.onSelectionChange()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let i=e.rowNode.node;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=i,this.contextMenuSelectionChange.emit(i),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:i}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(i);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let l=this.isSelected(i),n=this.dataKey?String(y.resolveFieldData(i.data,this.dataKey)):null;l||(this.isSingleSelectionMode()?(this.selection=i,this.selectionChange.emit(i)):this.isMultipleSelectionMode()&&(this.selection=[i],this.selectionChange.emit(this.selection)),n&&(this.selectedKeys[n]=1)),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:i})}}}toggleNodeWithCheckbox(e){this.selection=this.selection||[],this.preventSelectionSetterPropagation=!0;let i=e.rowNode.node;this.isSelected(i)?(this.propagateSelectionDown(i,!1),e.rowNode.parent&&this.propagateSelectionUp(i.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:i})):(this.propagateSelectionDown(i,!0),e.rowNode.parent&&this.propagateSelectionUp(i.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:i})),this.tableService.onSelectionChange()}toggleNodesWithCheckbox(e,i){let l=this.filteredNodes||this.value;this._selection=i&&l?l.slice():[],this.toggleAll(i),i||(this._selection=[],this.selectedKeys={}),this.preventSelectionSetterPropagation=!0,this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:i})}toggleAll(e){let i=this.filteredNodes||this.value;if(this.selectionKeys){if(i&&i.length){for(let l of i)this.propagateDown(l,e);this.selectionKeysChange.emit(this.selectionKeys)}}else if(i&&i.length)for(let l of i)this.propagateSelectionDown(l,e)}propagateSelectionUp(e,i){if(e.children&&e.children.length){let n=0,r=!1,s=this.dataKey?String(y.resolveFieldData(e.data,this.dataKey)):null;for(let p of e.children)this.isSelected(p)?n++:p.partialSelected&&(r=!0);if(i&&n==e.children.length)this._selection=[...this.selection||[],e],e.partialSelected=!1,s&&(this.selectedKeys[s]=1);else{if(!i){let p=this.findIndexInSelection(e);p>=0&&(this._selection=this.selection.filter((f,b)=>b!=p),s&&delete this.selectedKeys[s])}r||n>0&&n!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}}let l=e.parent;e.checked=i,l&&this.propagateSelectionUp(l,i)}propagateSelectionDown(e,i){let l=this.findIndexInSelection(e),n=this.dataKey?String(y.resolveFieldData(e.data,this.dataKey)):null;if(i&&l==-1?(this._selection=[...this.selection||[],e],n&&(this.selectedKeys[n]=1)):!i&&l>-1&&(this._selection=this.selection.filter((r,s)=>s!=l),n&&delete this.selectedKeys[n]),e.partialSelected=!1,e.checked=i,e.children&&e.children.length)for(let r of e.children)this.propagateSelectionDown(r,i)}isSelected(e){return e&&this.selection?this.dataKey?e.hasOwnProperty("checked")?e.checked:this.selectedKeys[y.resolveFieldData(e.data,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}isNodeSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.checked===!0:!1}isNodePartialSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.partialChecked===!0:!1}nodeKey(e){return y.resolveFieldData(e,this.dataKey)||y.resolveFieldData(e?.data,this.dataKey)}toggleCheckbox(e){let{rowNode:i,check:l,originalEvent:n}=e,r=i.node;this.selectionKeys?(this.propagateDown(r,l),r.parent&&this.propagateUp(r.parent,l),this.selectionKeysChange.emit(this.selectionKeys)):this.toggleNodeWithCheckbox({originalEvent:n,rowNode:i}),this.tableService.onSelectionChange()}propagateDown(e,i){if(i?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:delete this.selectionKeys[this.nodeKey(e)],e.children&&e.children.length)for(let l of e.children)this.propagateDown(l,i)}propagateUp(e,i){let l=0,n=!1;for(let s of e.children)this.selectionKeys[this.nodeKey(s)]&&this.selectionKeys[this.nodeKey(s)].checked?l++:this.selectionKeys[this.nodeKey(s)]&&this.selectionKeys[this.nodeKey(s)].partialChecked&&(n=!0);i&&l===e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:(i||delete this.selectionKeys[this.nodeKey(e)],n||l>0&&l!==e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!0}:this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!1});let r=e.parent;r&&this.propagateUp(r,i)}findIndexInSelection(e){let i=-1;if(this.selection&&this.selection.length){for(let l=0;l<this.selection.length;l++)if(this.equals(e,this.selection[l])){i=l;break}}return i}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}equals(e,i){return this.compareSelectionBy==="equals"?y.equals(e,i):y.equals(e.data,i.data,this.dataKey)}filter(e,i,l){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[i]&&delete this.filters[i]:this.filters[i]={value:e,matchMode:l},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay)}filterGlobal(e,i){this.filter(e,"global",i)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredNodes=null,this.paginator&&(this.totalRecords=this.value?this.value.length:0);else{let i;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");i=this.globalFilterFields||this.columns}this.filteredNodes=[];let l=this.filterMode==="strict",n=!1;for(let r of this.value){let s=F({},r),p=!0,f=!1,b;for(let v in this.filters)if(this.filters.hasOwnProperty(v)&&v!=="global"){let L=this.filters[v],V=v,D=L.value,J=L.matchMode||"startsWith",X=this.filterService.filters[J];if(b={filterField:V,filterValue:D,filterConstraint:X,isStrictMode:l},(l&&!(this.findFilteredNodes(s,b)||this.isFilterMatched(s,b))||!l&&!(this.isFilterMatched(s,b)||this.findFilteredNodes(s,b)))&&(p=!1),!p)break}if(this.filters.global&&!f&&i){let v=F({},s),L,V=this.filters.global.value,D=this.filterService.filters[this.filters.global.matchMode];b={filterField:L,filterValue:V,filterConstraint:D,isStrictMode:l,globalFilterFieldsArray:i},(l&&(this.findFilteredNodes(v,b)||this.isFilterMatched(v,b))||!l&&(this.isFilterMatched(v,b)||this.findFilteredNodes(v,b)))&&(f=!0,s=v)}let k=p;this.filters.global&&(k=p&&f),k&&this.filteredNodes.push(s),n=n||!p||f||p&&this.filteredNodes.length>0||!f&&this.filteredNodes.length===0}n||(this.filteredNodes=null),this.paginator&&(this.totalRecords=this.filteredNodes?this.filteredNodes.length:this.value?this.value.length:0)}this.cd.markForCheck()}this.first=0;let e=this.filteredNodes||this.value;this.onFilter.emit({filters:this.filters,filteredValue:e}),this.tableService.onUIUpdate(e),this.updateSerializedValue(),this.scrollable&&this.resetScrollTop()}findFilteredNodes(e,i){if(e){let l=!1;if(e.children){let n=[...e.children];e.children=[];for(let r of n){let s=F({},r);this.isFilterMatched(s,i)&&(l=!0,e.children.push(s))}}if(l)return!0}}isFilterMatched(e,i){let{filterField:l,filterValue:n,filterConstraint:r,isStrictMode:s,globalFilterFieldsArray:p}=i,f=!1,b=k=>r(y.resolveFieldData(e.data,k),n,this.filterLocale);return f=p?.length?p.some(k=>b(k.field||k)):b(l),(!f||s&&!this.isNodeLeaf(e))&&(f=this.findFilteredNodes(e,{filterField:l,filterValue:n,filterConstraint:r,isStrictMode:s,globalFilterFieldsArray:p})||f),f}isNodeLeaf(e){return e.leaf===!1?!1:!(e.children&&e.children.length)}hasFilter(){let e=!0;for(let i in this.filters)if(this.filters.hasOwnProperty(i)){e=!1;break}return!e}reset(){this._sortField=null,this._sortOrder=1,this._multiSortMeta=null,this.tableService.onSort(null),this.filteredNodes=null,this.filters={},this.first=0,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._value?this._value.length:0}updateEditingCell(e,i,l){this.editingCell=e,this.editingCellData=i,this.editingCellField=l,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&h.find(this.editingCell,".ng-invalid.ng-dirty").length===0}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=this.renderer.listen(this.document,"click",e=>{this.editingCell&&!this.editingCellClick&&this.isEditingCellValid()&&(h.removeClass(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData}),this.editingCellField=null,this.editingCellData=null,this.unbindDocumentEditListener()),this.editingCellClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.editingCellField=null,this.editingCellData=null,this.initialized=null}static \u0275fac=function(i){return new(i||t)(g(Ke),g(ce),g(te),g(le),g(ee),g(we),g(Ue),g(he))};static \u0275cmp=B({type:t,selectors:[["p-treeTable"]],contentQueries:function(i,l,n){if(i&1&&Re(n,$,4),i&2){let r;S(r=I())&&(l.templates=r)}},viewQuery:function(i,l){if(i&1&&(x(tt,5),x(it,5),x(lt,5),x(nt,5),x(ot,5),x(rt,5),x(at,5)),i&2){let n;S(n=I())&&(l.containerViewChild=n.first),S(n=I())&&(l.resizeHelperViewChild=n.first),S(n=I())&&(l.reorderIndicatorUpViewChild=n.first),S(n=I())&&(l.reorderIndicatorDownViewChild=n.first),S(n=I())&&(l.tableViewChild=n.first),S(n=I())&&(l.scrollableViewChild=n.first),S(n=I())&&(l.scrollableFrozenViewChild=n.first)}},hostAttrs:[1,"p-element"],inputs:{columns:"columns",style:"style",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",autoLayout:[2,"autoLayout","autoLayout",T],lazy:[2,"lazy","lazy",T],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",T],paginator:[2,"paginator","paginator",T],rows:[2,"rows","rows",O],first:[2,"first","first",O],pageLinks:[2,"pageLinks","pageLinks",O],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",T],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",T],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",T],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",T],showPageLinks:[2,"showPageLinks","showPageLinks",T],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",O],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",T],customSort:[2,"customSort","customSort",T],selectionMode:"selectionMode",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",T],compareSelectionBy:"compareSelectionBy",rowHover:[2,"rowHover","rowHover",T],loading:[2,"loading","loading",T],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",T],scrollable:[2,"scrollable","scrollable",T],scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",T],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",O],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",O],frozenWidth:"frozenWidth",frozenColumns:"frozenColumns",resizableColumns:[2,"resizableColumns","resizableColumns",T],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",T],contextMenu:"contextMenu",rowTrackBy:"rowTrackBy",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",O],filterMode:"filterMode",filterLocale:"filterLocale",paginatorLocale:"paginatorLocale",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",value:"value",virtualRowHeight:"virtualRowHeight",selectionKeys:"selectionKeys"},outputs:{selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onFilter:"onFilter",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onPage:"onPage",onSort:"onSort",onLazyLoad:"onLazyLoad",sortFunction:"sortFunction",onColResize:"onColResize",onColReorder:"onColReorder",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onContextMenuSelect:"onContextMenuSelect",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",selectionKeysChange:"selectionKeysChange"},features:[Ne([we]),G,Le],decls:12,vars:20,consts:[["container",""],["table",""],["scrollableView",""],["scrollableFrozenView",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],["data-scrollselectors",".p-treetable-scrollable-body",3,"ngStyle","ngClass"],["class","p-treetable-loading",4,"ngIf"],["class","p-treetable-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],["class","p-treetable-wrapper",4,"ngIf"],["class","p-treetable-scrollable-wrapper",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],["class","p-treetable-footer",4,"ngIf"],["class","p-column-resizer-helper",3,"ngStyle",4,"ngIf"],["class","p-treetable-reorder-indicator-up",3,"ngStyle",4,"ngIf"],["class","p-treetable-reorder-indicator-down",3,"ngStyle",4,"ngIf"],[1,"p-treetable-loading"],[1,"p-treetable-loading-overlay","p-component-overlay"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"spin","styleClass",4,"ngIf"],["class","p-treetable-loading-icon",4,"ngIf"],[3,"spin","styleClass"],[1,"p-treetable-loading-icon"],[4,"ngTemplateOutlet"],[1,"p-treetable-header"],["styleClass","p-paginator-top",3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],[1,"p-treetable-wrapper"],["role","table",3,"ngClass","ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup",1,"p-treetable-thead"],["role","rowgroup",1,"p-treetable-tbody",3,"pTreeTableBody","pTreeTableBodyTemplate"],["role","rowgroup",1,"p-treetable-tfoot"],[1,"p-treetable-scrollable-wrapper"],["class","p-treetable-scrollable-view p-treetable-frozen-view",3,"ttScrollableView","frozen","ngStyle","scrollHeight",4,"ngIf"],[1,"p-treetable-scrollable-view",3,"ttScrollableView","frozen","scrollHeight","ngStyle"],[1,"p-treetable-scrollable-view","p-treetable-frozen-view",3,"ttScrollableView","frozen","ngStyle","scrollHeight"],["styleClass","p-paginator-bottom",3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale"],[1,"p-treetable-footer"],[1,"p-column-resizer-helper",3,"ngStyle"],[1,"p-treetable-reorder-indicator-up",3,"ngStyle"],[1,"p-treetable-reorder-indicator-down",3,"ngStyle"]],template:function(i,l){i&1&&(_(0,"div",7,0),d(2,bt,4,2,"div",8)(3,Tt,2,1,"div",9)(4,Mt,5,21,"p-paginator",10)(5,Nt,9,16,"div",11)(6,Pt,4,8,"div",12)(7,Xt,5,21,"p-paginator",13)(8,Yt,2,1,"div",14)(9,ei,2,2,"div",15)(10,ni,4,4,"span",16)(11,si,4,4,"span",17),w()),i&2&&(q(l.styleClass),a("ngStyle",l.style)("ngClass",Pe(14,st,l.rowHover||l.selectionMode==="single"||l.selectionMode==="multiple",l.autoLayout,l.resizableColumns,l.resizableColumns&&l.columnResizeMode==="fit",l.scrollable&&l.scrollHeight==="flex")),c(2),a("ngIf",l.loading&&l.showLoader),c(),a("ngIf",l.captionTemplate),c(),a("ngIf",l.paginator&&(l.paginatorPosition==="top"||l.paginatorPosition=="both")),c(),a("ngIf",!l.scrollable),c(),a("ngIf",l.scrollable),c(),a("ngIf",l.paginator&&(l.paginatorPosition==="bottom"||l.paginatorPosition=="both")),c(),a("ngIf",l.summaryTemplate),c(),a("ngIf",l.resizableColumns),c(),a("ngIf",l.reorderableColumns),c(),a("ngIf",l.reorderableColumns))},dependencies:()=>[pe,j,Q,ne,Je,$,fe,be,_e,al,Ye],styles:[`@layer primeng{.p-treetable{position:relative}.p-treetable table{border-collapse:collapse;width:100%;table-layout:fixed}.p-treetable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}.p-treetable .p-sortable-column .p-column-title,.p-treetable .p-sortable-column .p-sortable-column-icon,.p-treetable .p-sortable-column .p-sortable-column-badge{vertical-align:middle}.p-treetable .p-sortable-column .p-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.p-treetable-auto-layout>.p-treetable-wrapper{overflow-x:auto}.p-treetable-auto-layout>.p-treetable-wrapper>table{table-layout:auto}.p-treetable-hoverable-rows .p-treetable-tbody>tr{cursor:pointer}.p-treetable-toggler{cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;overflow:hidden;position:relative}p-treetabletoggler+p-treetablecheckbox .p-checkbox{vertical-align:middle}p-treetabletoggler+p-treetablecheckbox+span{vertical-align:middle}.p-treetable-scrollable-wrapper{position:relative}.p-treetable-scrollable-header,.p-treetable-scrollable-footer{overflow:hidden;flex-shrink:0}.p-treetable-scrollable-body{overflow:auto;position:relative}.p-treetable-scrollable-body>table>.p-treetable-tbody>tr:first-child>td{border-top:0 none}.p-treetable-virtual-table{position:absolute}.p-treetable-frozen-view .p-treetable-scrollable-body{overflow:hidden}.p-treetable-frozen-view>.p-treetable-scrollable-body>table>.p-treetable-tbody>tr>td:last-child{border-right:0 none}.p-treetable-unfrozen-view{position:absolute;top:0}.p-treetable-flex-scrollable,.p-treetable-flex-scrollable .p-treetable-scrollable-wrapper,.p-treetable-flex-scrollable .p-treetable-scrollable-view{display:flex;flex-direction:column;flex:1;height:100%}.p-treetable-flex-scrollable .p-treetable-virtual-scrollable-body{flex:1}.p-treetable-resizable>.p-treetable-wrapper{overflow-x:auto}.p-treetable-resizable .p-treetable-thead>tr>th,.p-treetable-resizable .p-treetable-tfoot>tr>td,.p-treetable-resizable .p-treetable-tbody>tr>td{overflow:hidden}.p-treetable-resizable .p-resizable-column{background-clip:padding-box;position:relative}.p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-treetable .p-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.p-treetable .p-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.p-treetable .p-row-editor-init,.p-treetable .p-row-editor-save,.p-treetable .p-row-editor-cancel,.p-treetable .p-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-treetable-reorder-indicator-up,.p-treetable-reorder-indicator-down{position:absolute;display:none}[ttReorderableColumn]{cursor:move}.p-treetable .p-treetable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}.p-treetable .p-scroller-loading{transform:none!important;min-height:0;position:sticky;top:0;left:0}}
|
|
1
|
+
import{a as be,b as _e,c as Te,d as ye,e as Ce}from"./chunk-OKHUW2BE.js";import{c as Je,d as Xe}from"./chunk-FJ5KLJX2.js";import{a as $e}from"./chunk-PNNRI4NF.js";import{c as qe,d as ge}from"./chunk-4MSAIYQR.js";import{a as ue,b as fe}from"./chunk-ZEJSQR34.js";import{a as me}from"./chunk-OKV3KXFX.js";import{d as Ge}from"./chunk-WKDLP2Y5.js";import{c as Qe,d as We}from"./chunk-KJAXMZ4I.js";import{a as y,f as Ue,h as he,j as $,k as je,n as h}from"./chunk-TZT4PVW4.js";import{Ab as _,Bb as w,Cb as E,Db as R,Ea as C,Eb as N,Ec as le,Fa as ee,Fb as m,Gb as ie,Gc as T,Hc as O,Ja as te,Jb as P,Lb as u,Ma as Me,Nc as Ke,Qc as pe,Sb as Re,Sc as Be,Tb as x,Tc as j,Ub as S,Vb as I,Wa as c,Wc as ne,Xa as g,Xc as Q,Zb as de,ab as ce,d as K,dd as Ae,ed as oe,gc as Ne,ha as ke,ia as ze,ib as G,ic as U,jb as d,jc as z,kc as H,mb as A,mc as Oe,nb as a,nc as Pe,pa as B,pb as Ve,qa as De,qb as Fe,ra as se,rb as q,va as Le,wa as Z,xa as Y,xc as He}from"./chunk-FDOFOXXB.js";import{a as F,b as Ee}from"./chunk-KW4B7WMB.js";var tt=["container"],it=["resizeHelper"],lt=["reorderIndicatorUp"],nt=["reorderIndicatorDown"],ot=["table"],rt=["scrollableView"],at=["scrollableFrozenView"],st=(t,o,e,i,l)=>({"p-treetable p-component":!0,"p-treetable-hoverable-rows":t,"p-treetable-auto-layout":o,"p-treetable-resizable":e,"p-treetable-resizable-fit":i,"p-treetable-flex-scrollable":l}),M=t=>({$implicit:t}),ct=(t,o)=>({left:t,width:o}),dt=t=>({width:t}),ve=()=>({display:"none"});function pt(t,o){if(t&1&&E(0,"i"),t&2){let e=u(2);q("p-treetable-loading-icon pi-spin "+e.loadingIcon)}}function ht(t,o){t&1&&E(0,"SpinnerIcon",24),t&2&&a("spin",!0)("styleClass","p-treetable-loading-icon")}function ut(t,o){}function ft(t,o){t&1&&d(0,ut,0,0,"ng-template")}function gt(t,o){if(t&1&&(_(0,"span",25),d(1,ft,1,0,null,26),w()),t&2){let e=u(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate)}}function mt(t,o){if(t&1&&(R(0),d(1,ht,1,2,"SpinnerIcon",22)(2,gt,2,1,"span",23),N()),t&2){let e=u(2);c(),a("ngIf",!e.loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate)}}function bt(t,o){if(t&1&&(_(0,"div",18)(1,"div",19),d(2,pt,1,2,"i",20)(3,mt,3,2,"ng-container",21),w()()),t&2){let e=u();c(2),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function _t(t,o){t&1&&m(0)}function Tt(t,o){if(t&1&&(_(0,"div",27),d(1,_t,1,0,"ng-container",26),w()),t&2){let e=u();c(),a("ngTemplateOutlet",e.captionTemplate)}}function yt(t,o){t&1&&m(0)}function Ct(t,o){if(t&1&&d(0,yt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate)}}function wt(t,o){t&1&&d(0,Ct,1,1,"ng-template",29)}function vt(t,o){t&1&&m(0)}function St(t,o){if(t&1&&d(0,vt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate)}}function It(t,o){t&1&&d(0,St,1,1,"ng-template",30)}function xt(t,o){t&1&&m(0)}function Et(t,o){if(t&1&&d(0,xt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate)}}function kt(t,o){t&1&&d(0,Et,1,1,"ng-template",31)}function zt(t,o){t&1&&m(0)}function Dt(t,o){if(t&1&&d(0,zt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate)}}function Lt(t,o){t&1&&d(0,Dt,1,1,"ng-template",32)}function Mt(t,o){if(t&1){let e=ie();_(0,"p-paginator",28),P("onPageChange",function(l){Z(e);let n=u();return Y(n.onPageChange(l))}),d(1,wt,1,0,null,21)(2,It,1,0,null,21)(3,kt,1,0,null,21)(4,Lt,1,0,null,21),w()}if(t&2){let e=u();a("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("styleClass",e.paginatorStyleClass)("locale",e.paginatorLocale),c(),a("ngIf",e.paginatorFirstPageLinkIconTemplate),c(),a("ngIf",e.paginatorPreviousPageLinkIconTemplate),c(),a("ngIf",e.paginatorLastPageLinkIconTemplate),c(),a("ngIf",e.paginatorNextPageLinkIconTemplate)}}function Vt(t,o){t&1&&m(0)}function Ft(t,o){t&1&&m(0)}function Rt(t,o){t&1&&m(0)}function Nt(t,o){if(t&1&&(_(0,"div",33)(1,"table",34,1),d(3,Vt,1,0,"ng-container",35),_(4,"thead",36),d(5,Ft,1,0,"ng-container",35),w(),E(6,"tbody",37),_(7,"tfoot",38),d(8,Rt,1,0,"ng-container",35),w()()()),t&2){let e=u();c(),a("ngClass",e.tableStyleClass)("ngStyle",e.tableStyle),c(2),a("ngTemplateOutlet",e.colGroupTemplate)("ngTemplateOutletContext",z(10,M,e.columns)),c(2),a("ngTemplateOutlet",e.headerTemplate)("ngTemplateOutletContext",z(12,M,e.columns)),c(),a("pTreeTableBody",e.columns)("pTreeTableBodyTemplate",e.bodyTemplate),c(2),a("ngTemplateOutlet",e.footerTemplate)("ngTemplateOutletContext",z(14,M,e.columns))}}function Ot(t,o){if(t&1&&E(0,"div",42,3),t&2){let e=u(2);a("ttScrollableView",e.frozenColumns)("frozen",!0)("ngStyle",z(4,dt,e.frozenWidth))("scrollHeight",e.scrollHeight)}}function Pt(t,o){if(t&1&&(_(0,"div",39),d(1,Ot,2,6,"div",40),E(2,"div",41,2),w()),t&2){let e=u();c(),a("ngIf",e.frozenColumns||e.frozenBodyTemplate),c(),a("ttScrollableView",e.columns)("frozen",!1)("scrollHeight",e.scrollHeight)("ngStyle",H(5,ct,e.frozenWidth,"calc(100% - "+e.frozenWidth+")"))}}function Ht(t,o){t&1&&m(0)}function Kt(t,o){if(t&1&&d(0,Ht,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorFirstPageLinkIconTemplate)}}function Bt(t,o){t&1&&d(0,Kt,1,1,"ng-template",29)}function At(t,o){t&1&&m(0)}function Ut(t,o){if(t&1&&d(0,At,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorPreviousPageLinkIconTemplate)}}function jt(t,o){t&1&&d(0,Ut,1,1,"ng-template",30)}function Qt(t,o){t&1&&m(0)}function Wt(t,o){if(t&1&&d(0,Qt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorLastPageLinkIconTemplate)}}function Gt(t,o){t&1&&d(0,Wt,1,1,"ng-template",31)}function qt(t,o){t&1&&m(0)}function $t(t,o){if(t&1&&d(0,qt,1,0,"ng-container",26),t&2){let e=u(3);a("ngTemplateOutlet",e.paginatorNextPageLinkIconTemplate)}}function Jt(t,o){t&1&&d(0,$t,1,1,"ng-template",32)}function Xt(t,o){if(t&1){let e=ie();_(0,"p-paginator",43),P("onPageChange",function(l){Z(e);let n=u();return Y(n.onPageChange(l))}),d(1,Bt,1,0,null,21)(2,jt,1,0,null,21)(3,Gt,1,0,null,21)(4,Jt,1,0,null,21),w()}if(t&2){let e=u();a("rows",e.rows)("first",e.first)("totalRecords",e.totalRecords)("pageLinkSize",e.pageLinks)("alwaysShow",e.alwaysShowPaginator)("rowsPerPageOptions",e.rowsPerPageOptions)("templateLeft",e.paginatorLeftTemplate)("templateRight",e.paginatorRightTemplate)("dropdownAppendTo",e.paginatorDropdownAppendTo)("currentPageReportTemplate",e.currentPageReportTemplate)("showFirstLastIcon",e.showFirstLastIcon)("dropdownItemTemplate",e.paginatorDropdownItemTemplate)("showCurrentPageReport",e.showCurrentPageReport)("showJumpToPageDropdown",e.showJumpToPageDropdown)("showPageLinks",e.showPageLinks)("styleClass",e.paginatorStyleClass)("locale",e.paginatorLocale),c(),a("ngIf",e.paginatorFirstPageLinkIconTemplate),c(),a("ngIf",e.paginatorPreviousPageLinkIconTemplate),c(),a("ngIf",e.paginatorLastPageLinkIconTemplate),c(),a("ngIf",e.paginatorNextPageLinkIconTemplate)}}function Zt(t,o){t&1&&m(0)}function Yt(t,o){if(t&1&&(_(0,"div",44),d(1,Zt,1,0,"ng-container",26),w()),t&2){let e=u();c(),a("ngTemplateOutlet",e.summaryTemplate)}}function ei(t,o){t&1&&E(0,"div",45,4),t&2&&a("ngStyle",U(1,ve))}function ti(t,o){t&1&&E(0,"ArrowDownIcon")}function ii(t,o){}function li(t,o){t&1&&d(0,ii,0,0,"ng-template")}function ni(t,o){if(t&1&&(_(0,"span",46,5),d(2,ti,1,0,"ArrowDownIcon",21)(3,li,1,0,null,26),w()),t&2){let e=u();a("ngStyle",U(3,ve)),c(2),a("ngIf",!e.reorderIndicatorUpIconTemplate),c(),a("ngTemplateOutlet",e.reorderIndicatorUpIconTemplate)}}function oi(t,o){t&1&&E(0,"ArrowUpIcon")}function ri(t,o){}function ai(t,o){t&1&&d(0,ri,0,0,"ng-template")}function si(t,o){if(t&1&&(_(0,"span",47,6),d(2,oi,1,0,"ArrowUpIcon",21)(3,ai,1,0,null,26),w()),t&2){let e=u();a("ngStyle",U(3,ve)),c(2),a("ngIf",!e.reorderIndicatorDownIconTemplate),c(),a("ngTemplateOutlet",e.reorderIndicatorDownIconTemplate)}}var ci=["pTreeTableBody",""],di=(t,o,e,i)=>({$implicit:t,node:o,rowData:e,columns:i}),pi=(t,o)=>({$implicit:t,frozen:o});function hi(t,o){t&1&&m(0)}function ui(t,o){if(t&1&&(R(0),d(1,hi,1,0,"ng-container",2),N()),t&2){let e=u().$implicit,i=u();c(),a("ngTemplateOutlet",i.template)("ngTemplateOutletContext",Oe(2,di,e,e.node,e.node.data,i.columns))}}function fi(t,o){if(t&1&&d(0,ui,2,7,"ng-container",1),t&2){let e=o.$implicit;a("ngIf",e.visible)}}function gi(t,o){t&1&&m(0)}function mi(t,o){if(t&1&&(R(0),d(1,gi,1,0,"ng-container",2),N()),t&2){let e=u();c(),a("ngTemplateOutlet",e.tt.emptyMessageTemplate)("ngTemplateOutletContext",H(2,pi,e.columns,e.frozen))}}var bi=["scrollHeader"],_i=["scrollHeaderBox"],Ti=["scrollBody"],yi=["scrollTable"],Ci=["loadingTable"],wi=["scrollFooter"],vi=["scrollFooterBox"],Si=["scrollableAligner"],Ii=["scroller"],xi=["ttScrollableView",""],Ei=t=>({height:t}),Ze=(t,o)=>({$implicit:t,options:o}),ki=t=>({options:t}),zi=(t,o)=>({"max-height":t,"overflow-y":o}),Di=()=>({}),Li=()=>({"background-color":"transparent"});function Mi(t,o){t&1&&m(0)}function Vi(t,o){t&1&&m(0)}function Fi(t,o){t&1&&m(0)}function Ri(t,o){if(t&1&&d(0,Fi,1,0,"ng-container",12),t&2){let e=o.$implicit,i=o.options;u(2);let l=de(11);a("ngTemplateOutlet",l)("ngTemplateOutletContext",H(2,Ze,e,i))}}function Ni(t,o){t&1&&m(0)}function Oi(t,o){if(t&1&&d(0,Ni,1,0,"ng-container",12),t&2){let e=o.options,i=u(3);a("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",z(2,ki,e))}}function Pi(t,o){t&1&&(R(0),d(1,Oi,1,4,"ng-template",19),N())}function Hi(t,o){if(t&1){let e=ie();_(0,"p-scroller",17,3),P("onLazyLoad",function(l){Z(e);let n=u();return Y(n.tt.onLazyItemLoad(l))}),d(2,Ri,1,5,"ng-template",18)(3,Pi,2,0,"ng-container",15),w()}if(t&2){let e=u();Fe(z(8,Ei,e.tt.scrollHeight!=="flex"?e.tt.scrollHeight:void 0)),a("items",e.tt.serializedValue)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.tt.virtualScrollItemSize||e.tt._virtualRowHeight)("lazy",e.tt.lazy)("options",e.tt.virtualScrollOptions),c(3),a("ngIf",e.loaderTemplate)}}function Ki(t,o){t&1&&m(0)}function Bi(t,o){if(t&1&&(R(0),_(1,"div",20,4),d(3,Ki,1,0,"ng-container",12),w(),N()),t&2){let e=u(),i=de(11);c(),a("ngStyle",H(3,zi,e.tt.scrollHeight!=="flex"?e.scrollHeight:void 0,!e.frozen&&e.tt.scrollHeight?"scroll":void 0)),c(2),a("ngTemplateOutlet",i)("ngTemplateOutletContext",H(7,Ze,e.serializedValue,U(6,Di)))}}function Ai(t,o){t&1&&m(0)}function Ui(t,o){t&1&&E(0,"div",24,6),t&2&&a("ngStyle",U(1,Li))}function ji(t,o){if(t&1&&(_(0,"table",21,5),d(2,Ai,1,0,"ng-container",12),E(3,"tbody",22),w(),d(4,Ui,2,2,"div",23)),t&2){let e=o.$implicit,i=o.options,l=u();q(l.tt.tableStyleClass),a("ngClass",i.contentStyleClass)("ngStyle",l.getMergedTableStyles(i.contentStyle)),c(2),a("ngTemplateOutlet",l.frozen&&l.tt.frozenColGroupTemplate||l.tt.colGroupTemplate)("ngTemplateOutletContext",z(11,M,l.columns)),c(),a("pTreeTableBody",l.columns)("pTreeTableBodyTemplate",l.frozen&&l.tt.frozenBodyTemplate||l.tt.bodyTemplate)("serializedNodes",e)("frozen",l.frozen),c(),a("ngIf",l.frozen)}}function Qi(t,o){t&1&&m(0)}function Wi(t,o){t&1&&m(0)}function Gi(t,o){if(t&1&&(_(0,"div",25,7)(2,"div",26,8)(4,"table",27),d(5,Qi,1,0,"ng-container",12),_(6,"tfoot",28),d(7,Wi,1,0,"ng-container",12),w()()()()),t&2){let e=u();c(4),a("ngClass",e.tt.tableStyleClass)("ngStyle",e.tt.tableStyle),c(),a("ngTemplateOutlet",e.frozen&&e.tt.frozenColGroupTemplate||e.tt.colGroupTemplate)("ngTemplateOutletContext",z(6,M,e.columns)),c(2),a("ngTemplateOutlet",e.frozen&&e.tt.frozenFooterTemplate||e.tt.footerTemplate)("ngTemplateOutletContext",z(8,M,e.columns))}}function qi(t,o){t&1&&E(0,"SortAltIcon",3),t&2&&a("styleClass","p-sortable-column-icon")}function $i(t,o){t&1&&E(0,"SortAmountUpAltIcon",3),t&2&&a("styleClass","p-sortable-column-icon")}function Ji(t,o){t&1&&E(0,"SortAmountDownIcon",3),t&2&&a("styleClass","p-sortable-column-icon")}function Xi(t,o){if(t&1&&(R(0),d(1,qi,1,1,"SortAltIcon",2)(2,$i,1,1,"SortAmountUpAltIcon",2)(3,Ji,1,1,"SortAmountDownIcon",2),N()),t&2){let e=u();c(),a("ngIf",e.sortOrder===0),c(),a("ngIf",e.sortOrder===1),c(),a("ngIf",e.sortOrder===-1)}}function Zi(t,o){}function Yi(t,o){t&1&&d(0,Zi,0,0,"ng-template")}function el(t,o){if(t&1&&(_(0,"span",4),d(1,Yi,1,0,null,5),w()),t&2){let e=u();c(),a("ngTemplateOutlet",e.tt.sortIconTemplate)("ngTemplateOutletContext",z(2,M,e.sortOrder))}}var tl=(t,o)=>({visibility:t,"margin-left":o});function il(t,o){t&1&&E(0,"ChevronDownIcon"),t&2&&A("aria-hidden",!0)}function ll(t,o){t&1&&E(0,"ChevronRightIcon"),t&2&&A("aria-hidden",!0)}function nl(t,o){if(t&1&&(R(0),d(1,il,1,1,"ChevronDownIcon",1)(2,ll,1,1,"ChevronRightIcon",1),N()),t&2){let e=u();c(),a("ngIf",e.rowNode.node.expanded),c(),a("ngIf",!e.rowNode.node.expanded)}}function ol(t,o){}function rl(t,o){t&1&&d(0,ol,0,0,"ng-template")}var we=(()=>{class t{sortSource=new K;selectionSource=new K;contextMenuSource=new K;uiUpdateSource=new K;totalRecordsSource=new K;sortSource$=this.sortSource.asObservable();selectionSource$=this.selectionSource.asObservable();contextMenuSource$=this.contextMenuSource.asObservable();uiUpdateSource$=this.uiUpdateSource.asObservable();totalRecordsSource$=this.totalRecordsSource.asObservable();onSort(e){this.sortSource.next(e)}onSelectionChange(){this.selectionSource.next(null)}onContextMenu(e){this.contextMenuSource.next(e)}onUIUpdate(e){this.uiUpdateSource.next(e)}onTotalRecordsChange(e){this.totalRecordsSource.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=ke({token:t,factory:t.\u0275fac})}return t})(),W=(()=>{class t{document;renderer;el;cd;zone;tableService;filterService;config;columns;style;styleClass;tableStyle;tableStyleClass;autoLayout;lazy=!1;lazyLoadOnInit=!0;paginator;rows;first=0;pageLinks=5;rowsPerPageOptions;alwaysShowPaginator=!0;paginatorPosition="bottom";paginatorStyleClass;paginatorDropdownAppendTo;currentPageReportTemplate="{currentPage} of {totalPages}";showCurrentPageReport;showJumpToPageDropdown;showFirstLastIcon=!0;showPageLinks=!0;defaultSortOrder=1;sortMode="single";resetPageOnSort=!0;customSort;selectionMode;contextMenuSelection;contextMenuSelectionMode="separate";dataKey;metaKeySelection=!1;compareSelectionBy="deepEquals";rowHover;loading;loadingIcon;showLoader=!0;scrollable;scrollHeight;virtualScroll;virtualScrollItemSize;virtualScrollOptions;virtualScrollDelay=150;frozenWidth;frozenColumns;resizableColumns;columnResizeMode="fit";reorderableColumns;contextMenu;rowTrackBy=(e,i)=>i;filters={};globalFilterFields;filterDelay=300;filterMode="lenient";filterLocale;paginatorLocale;get totalRecords(){return this._totalRecords}set totalRecords(e){this._totalRecords=e,this.tableService.onTotalRecordsChange(this._totalRecords)}get sortField(){return this._sortField}set sortField(e){this._sortField=e}get sortOrder(){return this._sortOrder}set sortOrder(e){this._sortOrder=e}get multiSortMeta(){return this._multiSortMeta}set multiSortMeta(e){this._multiSortMeta=e}get selection(){return this._selection}set selection(e){this._selection=e}get value(){return this._value}set value(e){this._value=e}get virtualRowHeight(){return this._virtualRowHeight}set virtualRowHeight(e){this._virtualRowHeight=e,console.warn("The virtualRowHeight property is deprecated, use virtualScrollItemSize property instead.")}get selectionKeys(){return this._selectionKeys}set selectionKeys(e){this._selectionKeys=e,this.selectionKeysChange.emit(this._selectionKeys)}selectionChange=new C;contextMenuSelectionChange=new C;onFilter=new C;onNodeExpand=new C;onNodeCollapse=new C;onPage=new C;onSort=new C;onLazyLoad=new C;sortFunction=new C;onColResize=new C;onColReorder=new C;onNodeSelect=new C;onNodeUnselect=new C;onContextMenuSelect=new C;onHeaderCheckboxToggle=new C;onEditInit=new C;onEditComplete=new C;onEditCancel=new C;selectionKeysChange=new C;containerViewChild;resizeHelperViewChild;reorderIndicatorUpViewChild;reorderIndicatorDownViewChild;tableViewChild;scrollableViewChild;scrollableFrozenViewChild;templates;_value=[];_virtualRowHeight=28;_selectionKeys;serializedValue;_totalRecords=0;_multiSortMeta;_sortField;_sortOrder=1;filteredNodes;filterTimeout;colGroupTemplate;captionTemplate;headerTemplate;bodyTemplate;footerTemplate;summaryTemplate;emptyMessageTemplate;paginatorLeftTemplate;paginatorRightTemplate;paginatorDropdownItemTemplate;frozenHeaderTemplate;frozenBodyTemplate;frozenFooterTemplate;frozenColGroupTemplate;loadingIconTemplate;reorderIndicatorUpIconTemplate;reorderIndicatorDownIconTemplate;sortIconTemplate;checkboxIconTemplate;headerCheckboxIconTemplate;togglerIconTemplate;paginatorFirstPageLinkIconTemplate;paginatorLastPageLinkIconTemplate;paginatorPreviousPageLinkIconTemplate;paginatorNextPageLinkIconTemplate;lastResizerHelperX;reorderIconWidth;reorderIconHeight;draggedColumn;dropPosition;preventSelectionSetterPropagation;_selection;selectedKeys={};rowTouched;editingCell;editingCellData;editingCellField;editingCellClick;documentEditListener;initialized;toggleRowIndex;ngOnInit(){this.lazy&&this.lazyLoadOnInit&&!this.virtualScroll&&this.onLazyLoad.emit(this.createLazyLoadMetadata()),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"caption":this.captionTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"body":this.bodyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"summary":this.summaryTemplate=e.template;break;case"colgroup":this.colGroupTemplate=e.template;break;case"emptymessage":this.emptyMessageTemplate=e.template;break;case"paginatorleft":this.paginatorLeftTemplate=e.template;break;case"paginatorright":this.paginatorRightTemplate=e.template;break;case"paginatordropdownitem":this.paginatorDropdownItemTemplate=e.template;break;case"frozenheader":this.frozenHeaderTemplate=e.template;break;case"frozenbody":this.frozenBodyTemplate=e.template;break;case"frozenfooter":this.frozenFooterTemplate=e.template;break;case"frozencolgroup":this.frozenColGroupTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"reorderindicatorupicon":this.reorderIndicatorUpIconTemplate=e.template;break;case"reorderindicatordownicon":this.reorderIndicatorDownIconTemplate=e.template;break;case"sorticon":this.sortIconTemplate=e.template;break;case"checkboxicon":this.checkboxIconTemplate=e.template;break;case"headercheckboxicon":this.headerCheckboxIconTemplate=e.template;break;case"togglericon":this.togglerIconTemplate=e.template;break;case"paginatorfirstpagelinkicon":this.paginatorFirstPageLinkIconTemplate=e.template;break;case"paginatorlastpagelinkicon":this.paginatorLastPageLinkIconTemplate=e.template;break;case"paginatorpreviouspagelinkicon":this.paginatorPreviousPageLinkIconTemplate=e.template;break;case"paginatornextpagelinkicon":this.paginatorNextPageLinkIconTemplate=e.template;break}})}constructor(e,i,l,n,r,s,p,f){this.document=e,this.renderer=i,this.el=l,this.cd=n,this.zone=r,this.tableService=s,this.filterService=p,this.config=f}ngOnChanges(e){e.value&&(this._value=e.value.currentValue,this.lazy||(this.totalRecords=this._value?this._value.length:0,this.sortMode=="single"&&this.sortField?this.sortSingle():this.sortMode=="multiple"&&this.multiSortMeta?this.sortMultiple():this.hasFilter()&&this._filter()),this.updateSerializedValue(),this.tableService.onUIUpdate(this.value)),e.sortField&&(this._sortField=e.sortField.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.sortOrder&&(this._sortOrder=e.sortOrder.currentValue,(!this.lazy||this.initialized)&&this.sortMode==="single"&&this.sortSingle()),e.multiSortMeta&&(this._multiSortMeta=e.multiSortMeta.currentValue,this.sortMode==="multiple"&&this.sortMultiple()),e.selection&&(this._selection=e.selection.currentValue,this.preventSelectionSetterPropagation||(this.updateselectedKeys(),this.tableService.onSelectionChange()),this.preventSelectionSetterPropagation=!1)}updateSerializedValue(){this.serializedValue=[],this.paginator?this.serializePageNodes():this.serializeNodes(null,this.filteredNodes||this.value,0,!0)}serializeNodes(e,i,l,n){if(i&&i.length)for(let r of i){r.parent=e;let s={node:r,parent:e,level:l,visible:n&&(e?e.expanded:!0)};this.serializedValue.push(s),s.visible&&r.expanded&&this.serializeNodes(r,r.children,l+1,s.visible)}}serializePageNodes(){let e=this.filteredNodes||this.value;if(this.serializedValue=[],e&&e.length){let i=this.lazy?0:this.first;for(let l=i;l<i+this.rows;l++){let n=e[l];n&&(this.serializedValue.push({node:n,parent:null,level:0,visible:!0}),this.serializeNodes(n,n.children,1,!0))}}}updateselectedKeys(){if(this.dataKey&&this._selection)if(this.selectedKeys={},Array.isArray(this._selection))for(let e of this._selection)this.selectedKeys[String(y.resolveFieldData(e.data,this.dataKey))]=1;else this.selectedKeys[String(y.resolveFieldData(this._selection.data,this.dataKey))]=1}onPageChange(e){this.first=e.first,this.rows=e.rows,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.serializePageNodes(),this.onPage.emit({first:this.first,rows:this.rows}),this.tableService.onUIUpdate(this.value),this.scrollable&&this.resetScrollTop()}sort(e){let i=e.originalEvent;if(this.sortMode==="single"&&(this._sortOrder=this.sortField===e.field?this.sortOrder*-1:this.defaultSortOrder,this._sortField=e.field,this.sortSingle(),this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()),this.sortMode==="multiple"){let l=i.metaKey||i.ctrlKey,n=this.getSortMeta(e.field);n?l?n.order=n.order*-1:(this._multiSortMeta=[{field:e.field,order:n.order*-1}],this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()):((!l||!this.multiSortMeta)&&(this._multiSortMeta=[],this.resetPageOnSort&&this.scrollable&&this.resetScrollTop()),this.multiSortMeta.push({field:e.field,order:this.defaultSortOrder})),this.sortMultiple()}}sortSingle(){if(this.sortField&&this.sortOrder){this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortNodes(this.value),this.hasFilter()&&this._filter());let e={field:this.sortField,order:this.sortOrder};this.onSort.emit(e),this.tableService.onSort(e),this.updateSerializedValue()}}sortNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:e,mode:this.sortMode,field:this.sortField,order:this.sortOrder}):e.sort((i,l)=>{let n=y.resolveFieldData(i.data,this.sortField),r=y.resolveFieldData(l.data,this.sortField),s=null;return n==null&&r!=null?s=-1:n!=null&&r==null?s=1:n==null&&r==null?s=0:typeof n=="string"&&typeof r=="string"?s=n.localeCompare(r,void 0,{numeric:!0}):s=n<r?-1:n>r?1:0,this.sortOrder*s});for(let i of e)this.sortNodes(i.children)}}sortMultiple(){this.multiSortMeta&&(this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.value&&(this.sortMultipleNodes(this.value),this.hasFilter()&&this._filter()),this.onSort.emit({multisortmeta:this.multiSortMeta}),this.updateSerializedValue(),this.tableService.onSort(this.multiSortMeta))}sortMultipleNodes(e){if(!(!e||e.length===0)){this.customSort?this.sortFunction.emit({data:this.value,mode:this.sortMode,multiSortMeta:this.multiSortMeta}):e.sort((i,l)=>this.multisortField(i,l,this.multiSortMeta,0));for(let i of e)this.sortMultipleNodes(i.children)}}multisortField(e,i,l,n){if(y.isEmpty(this.multiSortMeta)||y.isEmpty(l[n]))return 0;let r=y.resolveFieldData(e.data,l[n].field),s=y.resolveFieldData(i.data,l[n].field),p=null;if(r==null&&s!=null?p=-1:r!=null&&s==null?p=1:r==null&&s==null&&(p=0),typeof r=="string"||r instanceof String){if(r.localeCompare&&r!=s)return l[n].order*r.localeCompare(s,void 0,{numeric:!0})}else p=r<s?-1:1;return r==s?l.length-1>n?this.multisortField(e,i,l,n+1):0:l[n].order*p}getSortMeta(e){if(this.multiSortMeta&&this.multiSortMeta.length){for(let i=0;i<this.multiSortMeta.length;i++)if(this.multiSortMeta[i].field===e)return this.multiSortMeta[i]}return null}isSorted(e){if(this.sortMode==="single")return this.sortField&&this.sortField===e;if(this.sortMode==="multiple"){let i=!1;if(this.multiSortMeta){for(let l=0;l<this.multiSortMeta.length;l++)if(this.multiSortMeta[l].field==e){i=!0;break}}return i}}createLazyLoadMetadata(){return{first:this.first,rows:this.rows,sortField:this.sortField,sortOrder:this.sortOrder,filters:this.filters,globalFilter:this.filters&&this.filters.global?this.filters.global.value:null,multiSortMeta:this.multiSortMeta,forceUpdate:()=>this.cd.detectChanges()}}onLazyItemLoad(e){this.onLazyLoad.emit(Ee(F(F({},this.createLazyLoadMetadata()),e),{rows:e.last-e.first}))}resetScrollTop(){this.virtualScroll?this.scrollToVirtualIndex(0):this.scrollTo({top:0})}scrollToVirtualIndex(e){this.scrollableViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollToVirtualIndex(e)}scrollTo(e){this.scrollableViewChild&&this.scrollableViewChild.scrollTo(e),this.scrollableFrozenViewChild&&this.scrollableViewChild.scrollTo(e)}isEmpty(){let e=this.filteredNodes||this.value;return e==null||e.length==0}getBlockableElement(){return this.el.nativeElement.children[0]}onColumnResizeBegin(e){let i=h.getOffset(this.containerViewChild?.nativeElement).left;this.lastResizerHelperX=e.pageX-i+this.containerViewChild?.nativeElement.scrollLeft,e.preventDefault()}onColumnResize(e){let i=h.getOffset(this.containerViewChild?.nativeElement).left;h.addClass(this.containerViewChild?.nativeElement,"p-unselectable-text"),this.resizeHelperViewChild.nativeElement.style.height=this.containerViewChild?.nativeElement.offsetHeight+"px",this.resizeHelperViewChild.nativeElement.style.top="0px",this.resizeHelperViewChild.nativeElement.style.left=e.pageX-i+this.containerViewChild?.nativeElement.scrollLeft+"px",this.resizeHelperViewChild.nativeElement.style.display="block"}onColumnResizeEnd(e,i){let l=this.resizeHelperViewChild.nativeElement.offsetLeft-this.lastResizerHelperX,n=i.offsetWidth,r=n+l,s=i.style.minWidth||15;if(n+l>parseInt(s)){if(this.columnResizeMode==="fit"){let p=i.nextElementSibling;for(;!p.offsetParent;)p=p.nextElementSibling;if(p){let f=p.offsetWidth-l,b=p.style.minWidth||15;if(r>15&&f>parseInt(b))if(this.scrollable){let k=this.findParentScrollableView(i),v=h.findSingle(k,".p-treetable-scrollable-body table")||h.findSingle(k,".p-scroller-viewport table"),L=h.findSingle(k,"table.p-treetable-scrollable-header-table"),V=h.findSingle(k,"table.p-treetable-scrollable-footer-table"),D=h.index(i);this.resizeColGroup(L,D,r,f),this.resizeColGroup(v,D,r,f),this.resizeColGroup(V,D,r,f)}else i.style.width=r+"px",p&&(p.style.width=f+"px")}}else if(this.columnResizeMode==="expand")if(this.scrollable){let p=this.findParentScrollableView(i),f=h.findSingle(p,".p-treetable-scrollable-body")||h.findSingle(p,".p-scroller-viewport"),b=h.findSingle(p,".p-treetable-scrollable-header"),k=h.findSingle(p,".p-treetable-scrollable-footer"),v=h.findSingle(p,".p-treetable-scrollable-body table")||h.findSingle(p,".p-scroller-viewport table"),L=h.findSingle(p,"table.p-treetable-scrollable-header-table"),V=h.findSingle(p,"table.p-treetable-scrollable-footer-table"),D=h.index(i),J=i?v.offsetWidth+l:r,X=i?L.offsetWidth+l:r,re=this.containerViewChild?.nativeElement.offsetWidth>=J,ae=(Se,Ie,xe,et)=>{Se&&Ie&&(Se.style.width=et?xe+h.calculateScrollbarWidth(f)+"px":"auto",Ie.style.width=xe+"px")};ae(f,v,J,re),ae(b,L,X,re),ae(k,V,X,re),this.resizeColGroup(L,D,r,null),this.resizeColGroup(v,D,r,null),this.resizeColGroup(V,D,r,null)}else{this.tableViewChild.nativeElement.style.width=this.tableViewChild?.nativeElement.offsetWidth+l+"px",i.style.width=r+"px";let p=this.tableViewChild?.nativeElement.style.width;this.containerViewChild.nativeElement.style.width=p+"px"}this.onColResize.emit({element:i,delta:l})}this.resizeHelperViewChild.nativeElement.style.display="none",h.removeClass(this.containerViewChild?.nativeElement,"p-unselectable-text")}findParentScrollableView(e){if(e){let i=e.parentElement;for(;i&&!h.hasClass(i,"p-treetable-scrollable-view");)i=i.parentElement;return i}else return null}resizeColGroup(e,i,l,n){if(e){let r=e.children[0].nodeName==="COLGROUP"?e.children[0]:null;if(r){let s=r.children[i],p=s.nextElementSibling;s.style.width=l+"px",p&&n&&(p.style.width=n+"px")}else throw"Scrollable tables require a colgroup to support resizable columns"}}onColumnDragStart(e,i){this.reorderIconWidth=h.getHiddenElementOuterWidth(this.reorderIndicatorUpViewChild?.nativeElement),this.reorderIconHeight=h.getHiddenElementOuterHeight(this.reorderIndicatorDownViewChild?.nativeElement),this.draggedColumn=i,e.dataTransfer.setData("text","b")}onColumnDragEnter(e,i){if(this.reorderableColumns&&this.draggedColumn&&i){e.preventDefault();let l=h.getOffset(this.containerViewChild?.nativeElement),n=h.getOffset(i);if(this.draggedColumn!=i){let r=n.left-l.left,s=l.top-n.top,p=n.left+i.offsetWidth/2;this.reorderIndicatorUpViewChild.nativeElement.style.top=n.top-l.top-(this.reorderIconHeight-1)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.top=n.top-l.top+i.offsetHeight+"px",e.pageX>p?(this.reorderIndicatorUpViewChild.nativeElement.style.left=r+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=r+i.offsetWidth-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=1):(this.reorderIndicatorUpViewChild.nativeElement.style.left=r-Math.ceil(this.reorderIconWidth/2)+"px",this.reorderIndicatorDownViewChild.nativeElement.style.left=r-Math.ceil(this.reorderIconWidth/2)+"px",this.dropPosition=-1),this.reorderIndicatorUpViewChild.nativeElement.style.display="block",this.reorderIndicatorDownViewChild.nativeElement.style.display="block"}else e.dataTransfer.dropEffect="none"}}onColumnDragLeave(e){this.reorderableColumns&&this.draggedColumn&&(e.preventDefault(),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none")}onColumnDrop(e,i){if(e.preventDefault(),this.draggedColumn){let l=h.indexWithinGroup(this.draggedColumn,"ttreorderablecolumn"),n=h.indexWithinGroup(i,"ttreorderablecolumn"),r=l!=n;r&&(n-l==1&&this.dropPosition===-1||l-n==1&&this.dropPosition===1)&&(r=!1),r&&n<l&&this.dropPosition===1&&(n=n+1),r&&n>l&&this.dropPosition===-1&&(n=n-1),r&&(y.reorderArray(this.columns,l,n),this.onColReorder.emit({dragIndex:l,dropIndex:n,columns:this.columns})),this.reorderIndicatorUpViewChild.nativeElement.style.display="none",this.reorderIndicatorDownViewChild.nativeElement.style.display="none",this.draggedColumn.draggable=!1,this.draggedColumn=null,this.dropPosition=null}}handleRowClick(e){let i=e.originalEvent.target.nodeName;if(!(i=="INPUT"||i=="BUTTON"||i=="A"||h.hasClass(e.originalEvent.target,"p-clickable"))){if(this.selectionMode){this.preventSelectionSetterPropagation=!0;let l=e.rowNode,n=this.isSelected(l.node),r=this.rowTouched?!1:this.metaKeySelection,s=this.dataKey?String(y.resolveFieldData(l.node.data,this.dataKey)):null;if(r){let p=e.originalEvent,f=p.metaKey||p.ctrlKey;if(n&&f){if(this.isSingleSelectionMode())this._selection=null,this.selectedKeys={},this.selectionChange.emit(null);else{let b=this.findIndexInSelection(l.node);this._selection=this.selection.filter((k,v)=>v!=b),this.selectionChange.emit(this.selection),s&&delete this.selectedKeys[s]}this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:l.node,type:"row"})}else this.isSingleSelectionMode()?(this._selection=l.node,this.selectionChange.emit(l.node),s&&(this.selectedKeys={},this.selectedKeys[s]=1)):this.isMultipleSelectionMode()&&(f?this._selection=this.selection||[]:(this._selection=[],this.selectedKeys={}),this._selection=[...this.selection,l.node],this.selectionChange.emit(this.selection),s&&(this.selectedKeys[s]=1)),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:l.node,type:"row",index:e.rowIndex})}else if(this.selectionMode==="single")n?(this._selection=null,this.selectedKeys={},this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:l.node,type:"row"})):(this._selection=l.node,this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:l.node,type:"row",index:e.rowIndex}),s&&(this.selectedKeys={},this.selectedKeys[s]=1));else if(this.selectionMode==="multiple")if(n){let p=this.findIndexInSelection(l.node);this._selection=this.selection.filter((f,b)=>b!=p),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e.originalEvent,node:l.node,type:"row"}),s&&delete this.selectedKeys[s]}else this._selection=this.selection?[...this.selection,l.node]:[l.node],this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e.originalEvent,node:l.node,type:"row",index:e.rowIndex}),s&&(this.selectedKeys[s]=1);this.tableService.onSelectionChange()}this.rowTouched=!1}}handleRowTouchEnd(e){this.rowTouched=!0}handleRowRightClick(e){if(this.contextMenu){let i=e.rowNode.node;if(this.contextMenuSelectionMode==="separate")this.contextMenuSelection=i,this.contextMenuSelectionChange.emit(i),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:i}),this.contextMenu.show(e.originalEvent),this.tableService.onContextMenu(i);else if(this.contextMenuSelectionMode==="joint"){this.preventSelectionSetterPropagation=!0;let l=this.isSelected(i),n=this.dataKey?String(y.resolveFieldData(i.data,this.dataKey)):null;l||(this.isSingleSelectionMode()?(this.selection=i,this.selectionChange.emit(i)):this.isMultipleSelectionMode()&&(this.selection=[i],this.selectionChange.emit(this.selection)),n&&(this.selectedKeys[n]=1)),this.contextMenu.show(e.originalEvent),this.onContextMenuSelect.emit({originalEvent:e.originalEvent,node:i})}}}toggleNodeWithCheckbox(e){this.selection=this.selection||[],this.preventSelectionSetterPropagation=!0;let i=e.rowNode.node;this.isSelected(i)?(this.propagateSelectionDown(i,!1),e.rowNode.parent&&this.propagateSelectionUp(i.parent,!1),this.selectionChange.emit(this.selection),this.onNodeUnselect.emit({originalEvent:e,node:i})):(this.propagateSelectionDown(i,!0),e.rowNode.parent&&this.propagateSelectionUp(i.parent,!0),this.selectionChange.emit(this.selection),this.onNodeSelect.emit({originalEvent:e,node:i})),this.tableService.onSelectionChange()}toggleNodesWithCheckbox(e,i){let l=this.filteredNodes||this.value;this._selection=i&&l?l.slice():[],this.toggleAll(i),i||(this._selection=[],this.selectedKeys={}),this.preventSelectionSetterPropagation=!0,this.selectionChange.emit(this._selection),this.tableService.onSelectionChange(),this.onHeaderCheckboxToggle.emit({originalEvent:e,checked:i})}toggleAll(e){let i=this.filteredNodes||this.value;if(this.selectionKeys){if(i&&i.length){for(let l of i)this.propagateDown(l,e);this.selectionKeysChange.emit(this.selectionKeys)}}else if(i&&i.length)for(let l of i)this.propagateSelectionDown(l,e)}propagateSelectionUp(e,i){if(e.children&&e.children.length){let n=0,r=!1,s=this.dataKey?String(y.resolveFieldData(e.data,this.dataKey)):null;for(let p of e.children)this.isSelected(p)?n++:p.partialSelected&&(r=!0);if(i&&n==e.children.length)this._selection=[...this.selection||[],e],e.partialSelected=!1,s&&(this.selectedKeys[s]=1);else{if(!i){let p=this.findIndexInSelection(e);p>=0&&(this._selection=this.selection.filter((f,b)=>b!=p),s&&delete this.selectedKeys[s])}r||n>0&&n!=e.children.length?e.partialSelected=!0:e.partialSelected=!1}}let l=e.parent;e.checked=i,l&&this.propagateSelectionUp(l,i)}propagateSelectionDown(e,i){let l=this.findIndexInSelection(e),n=this.dataKey?String(y.resolveFieldData(e.data,this.dataKey)):null;if(i&&l==-1?(this._selection=[...this.selection||[],e],n&&(this.selectedKeys[n]=1)):!i&&l>-1&&(this._selection=this.selection.filter((r,s)=>s!=l),n&&delete this.selectedKeys[n]),e.partialSelected=!1,e.checked=i,e.children&&e.children.length)for(let r of e.children)this.propagateSelectionDown(r,i)}isSelected(e){return e&&this.selection?this.dataKey?e.hasOwnProperty("checked")?e.checked:this.selectedKeys[y.resolveFieldData(e.data,this.dataKey)]!==void 0:Array.isArray(this.selection)?this.findIndexInSelection(e)>-1:this.equals(e,this.selection):!1}isNodeSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.checked===!0:!1}isNodePartialSelected(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]?.partialChecked===!0:!1}nodeKey(e){return y.resolveFieldData(e,this.dataKey)||y.resolveFieldData(e?.data,this.dataKey)}toggleCheckbox(e){let{rowNode:i,check:l,originalEvent:n}=e,r=i.node;this.selectionKeys?(this.propagateDown(r,l),r.parent&&this.propagateUp(r.parent,l),this.selectionKeysChange.emit(this.selectionKeys)):this.toggleNodeWithCheckbox({originalEvent:n,rowNode:i}),this.tableService.onSelectionChange()}propagateDown(e,i){if(i?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:delete this.selectionKeys[this.nodeKey(e)],e.children&&e.children.length)for(let l of e.children)this.propagateDown(l,i)}propagateUp(e,i){let l=0,n=!1;for(let s of e.children)this.selectionKeys[this.nodeKey(s)]&&this.selectionKeys[this.nodeKey(s)].checked?l++:this.selectionKeys[this.nodeKey(s)]&&this.selectionKeys[this.nodeKey(s)].partialChecked&&(n=!0);i&&l===e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!0,partialChecked:!1}:(i||delete this.selectionKeys[this.nodeKey(e)],n||l>0&&l!==e.children.length?this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!0}:this.selectionKeys[this.nodeKey(e)]={checked:!1,partialChecked:!1});let r=e.parent;r&&this.propagateUp(r,i)}findIndexInSelection(e){let i=-1;if(this.selection&&this.selection.length){for(let l=0;l<this.selection.length;l++)if(this.equals(e,this.selection[l])){i=l;break}}return i}isSingleSelectionMode(){return this.selectionMode==="single"}isMultipleSelectionMode(){return this.selectionMode==="multiple"}equals(e,i){return this.compareSelectionBy==="equals"?y.equals(e,i):y.equals(e.data,i.data,this.dataKey)}filter(e,i,l){this.filterTimeout&&clearTimeout(this.filterTimeout),this.isFilterBlank(e)?this.filters[i]&&delete this.filters[i]:this.filters[i]={value:e,matchMode:l},this.filterTimeout=setTimeout(()=>{this._filter(),this.filterTimeout=null},this.filterDelay)}filterGlobal(e,i){this.filter(e,"global",i)}isFilterBlank(e){return e!=null?!!(typeof e=="string"&&e.trim().length==0||Array.isArray(e)&&e.length==0):!0}_filter(){if(this.lazy)this.onLazyLoad.emit(this.createLazyLoadMetadata());else{if(!this.value)return;if(!this.hasFilter())this.filteredNodes=null,this.paginator&&(this.totalRecords=this.value?this.value.length:0);else{let i;if(this.filters.global){if(!this.columns&&!this.globalFilterFields)throw new Error("Global filtering requires dynamic columns or globalFilterFields to be defined.");i=this.globalFilterFields||this.columns}this.filteredNodes=[];let l=this.filterMode==="strict",n=!1;for(let r of this.value){let s=F({},r),p=!0,f=!1,b;for(let v in this.filters)if(this.filters.hasOwnProperty(v)&&v!=="global"){let L=this.filters[v],V=v,D=L.value,J=L.matchMode||"startsWith",X=this.filterService.filters[J];if(b={filterField:V,filterValue:D,filterConstraint:X,isStrictMode:l},(l&&!(this.findFilteredNodes(s,b)||this.isFilterMatched(s,b))||!l&&!(this.isFilterMatched(s,b)||this.findFilteredNodes(s,b)))&&(p=!1),!p)break}if(this.filters.global&&!f&&i){let v=F({},s),L,V=this.filters.global.value,D=this.filterService.filters[this.filters.global.matchMode];b={filterField:L,filterValue:V,filterConstraint:D,isStrictMode:l,globalFilterFieldsArray:i},(l&&(this.findFilteredNodes(v,b)||this.isFilterMatched(v,b))||!l&&(this.isFilterMatched(v,b)||this.findFilteredNodes(v,b)))&&(f=!0,s=v)}let k=p;this.filters.global&&(k=p&&f),k&&this.filteredNodes.push(s),n=n||!p||f||p&&this.filteredNodes.length>0||!f&&this.filteredNodes.length===0}n||(this.filteredNodes=null),this.paginator&&(this.totalRecords=this.filteredNodes?this.filteredNodes.length:this.value?this.value.length:0)}this.cd.markForCheck()}this.first=0;let e=this.filteredNodes||this.value;this.onFilter.emit({filters:this.filters,filteredValue:e}),this.tableService.onUIUpdate(e),this.updateSerializedValue(),this.scrollable&&this.resetScrollTop()}findFilteredNodes(e,i){if(e){let l=!1;if(e.children){let n=[...e.children];e.children=[];for(let r of n){let s=F({},r);this.isFilterMatched(s,i)&&(l=!0,e.children.push(s))}}if(l)return!0}}isFilterMatched(e,i){let{filterField:l,filterValue:n,filterConstraint:r,isStrictMode:s,globalFilterFieldsArray:p}=i,f=!1,b=k=>r(y.resolveFieldData(e.data,k),n,this.filterLocale);return f=p?.length?p.some(k=>b(k.field||k)):b(l),(!f||s&&!this.isNodeLeaf(e))&&(f=this.findFilteredNodes(e,{filterField:l,filterValue:n,filterConstraint:r,isStrictMode:s,globalFilterFieldsArray:p})||f),f}isNodeLeaf(e){return e.leaf===!1?!1:!(e.children&&e.children.length)}hasFilter(){let e=!0;for(let i in this.filters)if(this.filters.hasOwnProperty(i)){e=!1;break}return!e}reset(){this._sortField=null,this._sortOrder=1,this._multiSortMeta=null,this.tableService.onSort(null),this.filteredNodes=null,this.filters={},this.first=0,this.lazy?this.onLazyLoad.emit(this.createLazyLoadMetadata()):this.totalRecords=this._value?this._value.length:0}updateEditingCell(e,i,l){this.editingCell=e,this.editingCellData=i,this.editingCellField=l,this.bindDocumentEditListener()}isEditingCellValid(){return this.editingCell&&h.find(this.editingCell,".ng-invalid.ng-dirty").length===0}bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=this.renderer.listen(this.document,"click",e=>{this.editingCell&&!this.editingCellClick&&this.isEditingCellValid()&&(h.removeClass(this.editingCell,"p-cell-editing"),this.editingCell=null,this.onEditComplete.emit({field:this.editingCellField,data:this.editingCellData}),this.editingCellField=null,this.editingCellData=null,this.unbindDocumentEditListener()),this.editingCellClick=!1}))}unbindDocumentEditListener(){this.documentEditListener&&(this.documentEditListener(),this.documentEditListener=null)}ngOnDestroy(){this.unbindDocumentEditListener(),this.editingCell=null,this.editingCellField=null,this.editingCellData=null,this.initialized=null}static \u0275fac=function(i){return new(i||t)(g(Ke),g(ce),g(te),g(le),g(ee),g(we),g(Ue),g(he))};static \u0275cmp=B({type:t,selectors:[["p-treeTable"]],contentQueries:function(i,l,n){if(i&1&&Re(n,$,4),i&2){let r;S(r=I())&&(l.templates=r)}},viewQuery:function(i,l){if(i&1&&(x(tt,5),x(it,5),x(lt,5),x(nt,5),x(ot,5),x(rt,5),x(at,5)),i&2){let n;S(n=I())&&(l.containerViewChild=n.first),S(n=I())&&(l.resizeHelperViewChild=n.first),S(n=I())&&(l.reorderIndicatorUpViewChild=n.first),S(n=I())&&(l.reorderIndicatorDownViewChild=n.first),S(n=I())&&(l.tableViewChild=n.first),S(n=I())&&(l.scrollableViewChild=n.first),S(n=I())&&(l.scrollableFrozenViewChild=n.first)}},hostAttrs:[1,"p-element"],inputs:{columns:"columns",style:"style",styleClass:"styleClass",tableStyle:"tableStyle",tableStyleClass:"tableStyleClass",autoLayout:[2,"autoLayout","autoLayout",T],lazy:[2,"lazy","lazy",T],lazyLoadOnInit:[2,"lazyLoadOnInit","lazyLoadOnInit",T],paginator:[2,"paginator","paginator",T],rows:[2,"rows","rows",O],first:[2,"first","first",O],pageLinks:[2,"pageLinks","pageLinks",O],rowsPerPageOptions:"rowsPerPageOptions",alwaysShowPaginator:[2,"alwaysShowPaginator","alwaysShowPaginator",T],paginatorPosition:"paginatorPosition",paginatorStyleClass:"paginatorStyleClass",paginatorDropdownAppendTo:"paginatorDropdownAppendTo",currentPageReportTemplate:"currentPageReportTemplate",showCurrentPageReport:[2,"showCurrentPageReport","showCurrentPageReport",T],showJumpToPageDropdown:[2,"showJumpToPageDropdown","showJumpToPageDropdown",T],showFirstLastIcon:[2,"showFirstLastIcon","showFirstLastIcon",T],showPageLinks:[2,"showPageLinks","showPageLinks",T],defaultSortOrder:[2,"defaultSortOrder","defaultSortOrder",O],sortMode:"sortMode",resetPageOnSort:[2,"resetPageOnSort","resetPageOnSort",T],customSort:[2,"customSort","customSort",T],selectionMode:"selectionMode",contextMenuSelection:"contextMenuSelection",contextMenuSelectionMode:"contextMenuSelectionMode",dataKey:"dataKey",metaKeySelection:[2,"metaKeySelection","metaKeySelection",T],compareSelectionBy:"compareSelectionBy",rowHover:[2,"rowHover","rowHover",T],loading:[2,"loading","loading",T],loadingIcon:"loadingIcon",showLoader:[2,"showLoader","showLoader",T],scrollable:[2,"scrollable","scrollable",T],scrollHeight:"scrollHeight",virtualScroll:[2,"virtualScroll","virtualScroll",T],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",O],virtualScrollOptions:"virtualScrollOptions",virtualScrollDelay:[2,"virtualScrollDelay","virtualScrollDelay",O],frozenWidth:"frozenWidth",frozenColumns:"frozenColumns",resizableColumns:[2,"resizableColumns","resizableColumns",T],columnResizeMode:"columnResizeMode",reorderableColumns:[2,"reorderableColumns","reorderableColumns",T],contextMenu:"contextMenu",rowTrackBy:"rowTrackBy",filters:"filters",globalFilterFields:"globalFilterFields",filterDelay:[2,"filterDelay","filterDelay",O],filterMode:"filterMode",filterLocale:"filterLocale",paginatorLocale:"paginatorLocale",totalRecords:"totalRecords",sortField:"sortField",sortOrder:"sortOrder",multiSortMeta:"multiSortMeta",selection:"selection",value:"value",virtualRowHeight:"virtualRowHeight",selectionKeys:"selectionKeys"},outputs:{selectionChange:"selectionChange",contextMenuSelectionChange:"contextMenuSelectionChange",onFilter:"onFilter",onNodeExpand:"onNodeExpand",onNodeCollapse:"onNodeCollapse",onPage:"onPage",onSort:"onSort",onLazyLoad:"onLazyLoad",sortFunction:"sortFunction",onColResize:"onColResize",onColReorder:"onColReorder",onNodeSelect:"onNodeSelect",onNodeUnselect:"onNodeUnselect",onContextMenuSelect:"onContextMenuSelect",onHeaderCheckboxToggle:"onHeaderCheckboxToggle",onEditInit:"onEditInit",onEditComplete:"onEditComplete",onEditCancel:"onEditCancel",selectionKeysChange:"selectionKeysChange"},features:[Ne([we]),G,Le],decls:12,vars:20,consts:[["container",""],["table",""],["scrollableView",""],["scrollableFrozenView",""],["resizeHelper",""],["reorderIndicatorUp",""],["reorderIndicatorDown",""],["data-scrollselectors",".p-treetable-scrollable-body",3,"ngStyle","ngClass"],["class","p-treetable-loading",4,"ngIf"],["class","p-treetable-header",4,"ngIf"],["styleClass","p-paginator-top",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],["class","p-treetable-wrapper",4,"ngIf"],["class","p-treetable-scrollable-wrapper",4,"ngIf"],["styleClass","p-paginator-bottom",3,"rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale","onPageChange",4,"ngIf"],["class","p-treetable-footer",4,"ngIf"],["class","p-column-resizer-helper",3,"ngStyle",4,"ngIf"],["class","p-treetable-reorder-indicator-up",3,"ngStyle",4,"ngIf"],["class","p-treetable-reorder-indicator-down",3,"ngStyle",4,"ngIf"],[1,"p-treetable-loading"],[1,"p-treetable-loading-overlay","p-component-overlay"],[3,"class",4,"ngIf"],[4,"ngIf"],[3,"spin","styleClass",4,"ngIf"],["class","p-treetable-loading-icon",4,"ngIf"],[3,"spin","styleClass"],[1,"p-treetable-loading-icon"],[4,"ngTemplateOutlet"],[1,"p-treetable-header"],["styleClass","p-paginator-top",3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale"],["pTemplate","firstpagelinkicon"],["pTemplate","previouspagelinkicon"],["pTemplate","lastpagelinkicon"],["pTemplate","nextpagelinkicon"],[1,"p-treetable-wrapper"],["role","table",3,"ngClass","ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup",1,"p-treetable-thead"],["role","rowgroup",1,"p-treetable-tbody",3,"pTreeTableBody","pTreeTableBodyTemplate"],["role","rowgroup",1,"p-treetable-tfoot"],[1,"p-treetable-scrollable-wrapper"],["class","p-treetable-scrollable-view p-treetable-frozen-view",3,"ttScrollableView","frozen","ngStyle","scrollHeight",4,"ngIf"],[1,"p-treetable-scrollable-view",3,"ttScrollableView","frozen","scrollHeight","ngStyle"],[1,"p-treetable-scrollable-view","p-treetable-frozen-view",3,"ttScrollableView","frozen","ngStyle","scrollHeight"],["styleClass","p-paginator-bottom",3,"onPageChange","rows","first","totalRecords","pageLinkSize","alwaysShow","rowsPerPageOptions","templateLeft","templateRight","dropdownAppendTo","currentPageReportTemplate","showFirstLastIcon","dropdownItemTemplate","showCurrentPageReport","showJumpToPageDropdown","showPageLinks","styleClass","locale"],[1,"p-treetable-footer"],[1,"p-column-resizer-helper",3,"ngStyle"],[1,"p-treetable-reorder-indicator-up",3,"ngStyle"],[1,"p-treetable-reorder-indicator-down",3,"ngStyle"]],template:function(i,l){i&1&&(_(0,"div",7,0),d(2,bt,4,2,"div",8)(3,Tt,2,1,"div",9)(4,Mt,5,21,"p-paginator",10)(5,Nt,9,16,"div",11)(6,Pt,4,8,"div",12)(7,Xt,5,21,"p-paginator",13)(8,Yt,2,1,"div",14)(9,ei,2,2,"div",15)(10,ni,4,4,"span",16)(11,si,4,4,"span",17),w()),i&2&&(q(l.styleClass),a("ngStyle",l.style)("ngClass",Pe(14,st,l.rowHover||l.selectionMode==="single"||l.selectionMode==="multiple",l.autoLayout,l.resizableColumns,l.resizableColumns&&l.columnResizeMode==="fit",l.scrollable&&l.scrollHeight==="flex")),c(2),a("ngIf",l.loading&&l.showLoader),c(),a("ngIf",l.captionTemplate),c(),a("ngIf",l.paginator&&(l.paginatorPosition==="top"||l.paginatorPosition=="both")),c(),a("ngIf",!l.scrollable),c(),a("ngIf",l.scrollable),c(),a("ngIf",l.paginator&&(l.paginatorPosition==="bottom"||l.paginatorPosition=="both")),c(),a("ngIf",l.summaryTemplate),c(),a("ngIf",l.resizableColumns),c(),a("ngIf",l.reorderableColumns),c(),a("ngIf",l.reorderableColumns))},dependencies:()=>[pe,j,Q,ne,Je,$,fe,be,_e,al,Ye],styles:[`@layer primeng{.p-treetable{position:relative}.p-treetable table{border-collapse:collapse;width:100%;table-layout:fixed}.p-treetable .p-sortable-column{cursor:pointer;-webkit-user-select:none;user-select:none}.p-treetable .p-sortable-column .p-column-title,.p-treetable .p-sortable-column .p-sortable-column-icon,.p-treetable .p-sortable-column .p-sortable-column-badge{vertical-align:middle}.p-treetable .p-sortable-column .p-sortable-column-badge{display:inline-flex;align-items:center;justify-content:center}.p-treetable-auto-layout>.p-treetable-wrapper{overflow-x:auto}.p-treetable-auto-layout>.p-treetable-wrapper>table{table-layout:auto}.p-treetable-hoverable-rows .p-treetable-tbody>tr{cursor:pointer}.p-treetable-toggler{cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;overflow:hidden;position:relative}p-treetabletoggler+p-treetablecheckbox .p-checkbox{vertical-align:middle}p-treetabletoggler+p-treetablecheckbox+span{vertical-align:middle}.p-treetable-scrollable-wrapper{position:relative}.p-treetable-scrollable-header,.p-treetable-scrollable-footer{overflow:hidden;flex-shrink:0}.p-treetable-scrollable-body{overflow:auto;position:relative}.p-treetable-scrollable-body>table>.p-treetable-tbody>tr:first-child>td{border-top:0 none}.p-treetable-virtual-table{position:absolute}.p-treetable-frozen-view .p-treetable-scrollable-body{overflow:hidden}.p-treetable-frozen-view>.p-treetable-scrollable-body>table>.p-treetable-tbody>tr>td:last-child{border-right:0 none}.p-treetable-unfrozen-view{position:absolute;top:0}.p-treetable-flex-scrollable,.p-treetable-flex-scrollable .p-treetable-scrollable-wrapper,.p-treetable-flex-scrollable .p-treetable-scrollable-view{display:flex;flex-direction:column;flex:1;height:100%}.p-treetable-flex-scrollable .p-treetable-virtual-scrollable-body{flex:1}.p-treetable-resizable>.p-treetable-wrapper{overflow-x:auto}.p-treetable-resizable .p-treetable-thead>tr>th,.p-treetable-resizable .p-treetable-tfoot>tr>td,.p-treetable-resizable .p-treetable-tbody>tr>td{overflow:hidden}.p-treetable-resizable .p-resizable-column{background-clip:padding-box;position:relative}.p-treetable-resizable-fit .p-resizable-column:last-child .p-column-resizer{display:none}.p-treetable .p-column-resizer{display:block;position:absolute!important;top:0;right:0;margin:0;width:.5rem;height:100%;padding:0;cursor:col-resize;border:1px solid transparent}.p-treetable .p-column-resizer-helper{width:1px;position:absolute;z-index:10;display:none}.p-treetable .p-row-editor-init,.p-treetable .p-row-editor-save,.p-treetable .p-row-editor-cancel,.p-treetable .p-row-toggler{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-treetable-reorder-indicator-up,.p-treetable-reorder-indicator-down{position:absolute;display:none}[ttReorderableColumn]{cursor:move}.p-treetable .p-treetable-loading-overlay{position:absolute;display:flex;align-items:center;justify-content:center;z-index:2}.p-treetable .p-scroller-loading{transform:none!important;min-height:0;position:sticky;top:0;left:0}}
|
|
2
2
|
`],encapsulation:2})}return t})(),Ye=(()=>{class t{tt;treeTableService;cd;columns;template;frozen;serializedNodes;scrollerOptions;subscription;constructor(e,i,l){this.tt=e,this.treeTableService=i,this.cd=l,this.subscription=this.tt.tableService.uiUpdateSource$.subscribe(()=>{this.tt.virtualScroll&&this.cd.detectChanges()})}getScrollerOption(e,i){return this.tt.virtualScroll?(i=i||this.scrollerOptions,i?i[e]:null):null}getRowIndex(e){let i=this.getScrollerOption("getItemOptions");return i?i(e).index:e}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(g(W),g(we),g(le))};static \u0275cmp=B({type:t,selectors:[["","pTreeTableBody",""]],hostAttrs:[1,"p-element"],inputs:{columns:[0,"pTreeTableBody","columns"],template:[0,"pTreeTableBodyTemplate","template"],frozen:[2,"frozen","frozen",T],serializedNodes:"serializedNodes",scrollerOptions:"scrollerOptions"},features:[G],attrs:ci,decls:2,vars:3,consts:[["ngFor","",3,"ngForOf","ngForTrackBy"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,l){i&1&&d(0,fi,1,1,"ng-template",0)(1,mi,2,5,"ng-container",1),i&2&&(a("ngForOf",l.serializedNodes||l.tt.serializedValue)("ngForTrackBy",l.tt.rowTrackBy),c(),a("ngIf",l.tt.isEmpty()))},dependencies:[Be,j,Q],encapsulation:2})}return t})(),al=(()=>{class t{platformId;renderer;tt;el;zone;columns;frozen;scrollHeaderViewChild;scrollHeaderBoxViewChild;scrollBodyViewChild;scrollTableViewChild;scrollLoadingTableViewChild;scrollFooterViewChild;scrollFooterBoxViewChild;scrollableAlignerViewChild;scroller;headerScrollListener;bodyScrollListener;footerScrollListener;frozenSiblingBody;totalRecordsSubscription;_scrollHeight;preventBodyScrollPropagation;getMergedTableStyles(e){return F(F({},this.tt.tableStyle),e)}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e,e!=null&&(e.includes("%")||e.includes("calc"))&&console.log('Percentage scroll height calculation is removed in favor of the more performant CSS based flex mode, use scrollHeight="flex" instead.')}constructor(e,i,l,n,r){this.platformId=e,this.renderer=i,this.tt=l,this.el=n,this.zone=r}ngAfterViewInit(){if(oe(this.platformId)){if(this.frozen)this.scrollableAlignerViewChild&&this.scrollableAlignerViewChild.nativeElement&&(this.scrollableAlignerViewChild.nativeElement.style.height=h.calculateScrollbarHeight()+"px");else{(this.tt.frozenColumns||this.tt.frozenBodyTemplate)&&h.addClass(this.el.nativeElement,"p-treetable-unfrozen-view");let e=this.el.nativeElement.previousElementSibling;e&&(this.tt.virtualScroll?this.frozenSiblingBody=h.findSingle(e,".p-scroller-viewport"):this.frozenSiblingBody=h.findSingle(e,".p-treetable-scrollable-body"));let i=h.calculateScrollbarWidth();this.scrollHeaderBoxViewChild.nativeElement.style.paddingRight=i+"px",this.scrollFooterBoxViewChild&&this.scrollFooterBoxViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.paddingRight=i+"px")}this.bindEvents()}}bindEvents(){oe(this.platformId)&&this.zone.runOutsideAngular(()=>{this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.headerScrollListener=this.renderer.listen(this.scrollHeaderBoxViewChild?.nativeElement,"scroll",this.onHeaderScroll.bind(this))),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.footerScrollListener=this.renderer.listen(this.scrollFooterViewChild.nativeElement,"scroll",this.onFooterScroll.bind(this))),this.frozen||(this.tt.virtualScroll?this.bodyScrollListener=this.renderer.listen((this.scroller?.getElementRef()).nativeElement,"scroll",this.onBodyScroll.bind(this)):this.bodyScrollListener=this.renderer.listen(this.scrollBodyViewChild?.nativeElement,"scroll",this.onBodyScroll.bind(this)))})}unbindEvents(){oe(this.platformId)&&(this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&this.headerScrollListener&&(this.headerScrollListener(),this.headerScrollListener=null),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&this.footerScrollListener&&(this.footerScrollListener(),this.footerScrollListener=null),this.scrollBodyViewChild&&this.scrollBodyViewChild.nativeElement&&this.bodyScrollListener&&(this.bodyScrollListener(),this.bodyScrollListener=null),this.scroller&&this.scroller.getElementRef()&&this.bodyScrollListener&&(this.bodyScrollListener(),this.bodyScrollListener=null))}onHeaderScroll(){let e=this.scrollHeaderViewChild?.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0}onFooterScroll(){let e=this.scrollFooterViewChild?.nativeElement.scrollLeft;this.scrollBodyViewChild.nativeElement.scrollLeft=e,this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderViewChild.nativeElement.scrollLeft=e),this.preventBodyScrollPropagation=!0}onBodyScroll(e){if(this.preventBodyScrollPropagation){this.preventBodyScrollPropagation=!1;return}this.scrollHeaderViewChild&&this.scrollHeaderViewChild.nativeElement&&(this.scrollHeaderBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.scrollFooterViewChild&&this.scrollFooterViewChild.nativeElement&&(this.scrollFooterBoxViewChild.nativeElement.style.marginLeft=-1*e.target.scrollLeft+"px"),this.frozenSiblingBody&&(this.frozenSiblingBody.scrollTop=e.target.scrollTop)}scrollToVirtualIndex(e){this.scroller&&this.scroller.scrollToIndex(e)}scrollTo(e){this.scroller?this.scroller.scrollTo(e):this.scrollBodyViewChild?.nativeElement.scrollTo?this.scrollBodyViewChild.nativeElement.scrollTo(e):(this.scrollBodyViewChild.nativeElement.scrollLeft=e.left,this.scrollBodyViewChild.nativeElement.scrollTop=e.top)}ngOnDestroy(){this.unbindEvents(),this.frozenSiblingBody=null}static \u0275fac=function(i){return new(i||t)(g(Me),g(ce),g(W),g(te),g(ee))};static \u0275cmp=B({type:t,selectors:[["","ttScrollableView",""]],viewQuery:function(i,l){if(i&1&&(x(bi,5),x(_i,5),x(Ti,5),x(yi,5),x(Ci,5),x(wi,5),x(vi,5),x(Si,5),x(Ii,5)),i&2){let n;S(n=I())&&(l.scrollHeaderViewChild=n.first),S(n=I())&&(l.scrollHeaderBoxViewChild=n.first),S(n=I())&&(l.scrollBodyViewChild=n.first),S(n=I())&&(l.scrollTableViewChild=n.first),S(n=I())&&(l.scrollLoadingTableViewChild=n.first),S(n=I())&&(l.scrollFooterViewChild=n.first),S(n=I())&&(l.scrollFooterBoxViewChild=n.first),S(n=I())&&(l.scrollableAlignerViewChild=n.first),S(n=I())&&(l.scroller=n.first)}},hostAttrs:[1,"p-element"],inputs:{columns:[0,"ttScrollableView","columns"],frozen:[2,"frozen","frozen",T],scrollHeight:"scrollHeight"},features:[G],attrs:xi,decls:13,vars:13,consts:[["scrollHeader",""],["scrollHeaderBox",""],["buildInItems",""],["scroller",""],["scrollBody",""],["scrollTable",""],["scrollableAligner",""],["scrollFooter",""],["scrollFooterBox",""],[1,"p-treetable-scrollable-header"],[1,"p-treetable-scrollable-header-box"],[1,"p-treetable-scrollable-header-table",3,"ngClass","ngStyle"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["role","rowgroup",1,"p-treetable-thead"],["styleClass","p-treetable-scrollable-body",3,"items","style","scrollHeight","itemSize","lazy","options","onLazyLoad",4,"ngIf"],[4,"ngIf"],["class","p-treetable-scrollable-footer",4,"ngIf"],["styleClass","p-treetable-scrollable-body",3,"onLazyLoad","items","scrollHeight","itemSize","lazy","options"],["pTemplate","content"],["pTemplate","loader"],[1,"p-treetable-scrollable-body",3,"ngStyle"],["role","table",3,"ngClass","ngStyle"],["role","rowgroup",1,"p-treetable-tbody",3,"pTreeTableBody","pTreeTableBodyTemplate","serializedNodes","frozen"],[3,"ngStyle",4,"ngIf"],[3,"ngStyle"],[1,"p-treetable-scrollable-footer"],[1,"p-treetable-scrollable-footer-box"],[1,"p-treetable-scrollable-footer-table",3,"ngClass","ngStyle"],["role","rowgroup",1,"p-treetable-tfoot"]],template:function(i,l){i&1&&(_(0,"div",9,0)(2,"div",10,1)(4,"table",11),d(5,Mi,1,0,"ng-container",12),_(6,"thead",13),d(7,Vi,1,0,"ng-container",12),w()()()(),d(8,Hi,4,10,"p-scroller",14)(9,Bi,4,10,"ng-container",15)(10,ji,5,13,"ng-template",null,2,He)(12,Gi,8,10,"div",16)),i&2&&(c(4),a("ngClass",l.tt.tableStyleClass)("ngStyle",l.tt.tableStyle),c(),a("ngTemplateOutlet",l.frozen&&l.tt.frozenColGroupTemplate||l.tt.colGroupTemplate)("ngTemplateOutletContext",z(9,M,l.columns)),c(2),a("ngTemplateOutlet",l.frozen&&l.tt.frozenHeaderTemplate||l.tt.headerTemplate)("ngTemplateOutletContext",z(11,M,l.columns)),c(),a("ngIf",l.tt.virtualScroll),c(),a("ngIf",!l.tt.virtualScroll),c(3),a("ngIf",l.tt.footerTemplate))},dependencies:[pe,j,Q,ne,$,qe,Ye],encapsulation:2})}return t})(),Wl=(()=>{class t{tt;field;ttSortableColumnDisabled;sorted;subscription;get ariaSorted(){return this.sorted&&this.tt.sortOrder<0?"descending":this.sorted&&this.tt.sortOrder>0?"ascending":"none"}constructor(e){this.tt=e,this.isEnabled()&&(this.subscription=this.tt.tableService.sortSource$.subscribe(i=>{this.updateSortState()}))}ngOnInit(){this.isEnabled()&&this.updateSortState()}updateSortState(){this.sorted=this.tt.isSorted(this.field)}onClick(e){this.isEnabled()&&(this.updateSortState(),this.tt.sort({originalEvent:e,field:this.field}),h.clearSelection())}onEnterKey(e){this.onClick(e)}isEnabled(){return this.ttSortableColumnDisabled!==!0}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(g(W))};static \u0275dir=se({type:t,selectors:[["","ttSortableColumn",""]],hostAttrs:[1,"p-element"],hostVars:7,hostBindings:function(i,l){i&1&&P("click",function(r){return l.onClick(r)})("keydown.enter",function(r){return l.onEnterKey(r)}),i&2&&(A("tabindex",l.isEnabled()?"0":null)("role","columnheader")("aria-sort",l.ariaSorted),Ve("p-sortable-column",l.isEnabled())("p-highlight",l.sorted))},inputs:{field:[0,"ttSortableColumn","field"],ttSortableColumnDisabled:[2,"ttSortableColumnDisabled","ttSortableColumnDisabled",T]},features:[G]})}return t})(),Gl=(()=>{class t{tt;cd;field;ariaLabelDesc;ariaLabelAsc;subscription;sortOrder;constructor(e,i){this.tt=e,this.cd=i,this.subscription=this.tt.tableService.sortSource$.subscribe(l=>{this.updateSortState(),this.cd.markForCheck()})}ngOnInit(){this.updateSortState()}onClick(e){e.preventDefault()}updateSortState(){if(this.tt.sortMode==="single")this.sortOrder=this.tt.isSorted(this.field)?this.tt.sortOrder:0;else if(this.tt.sortMode==="multiple"){let e=this.tt.getSortMeta(this.field);this.sortOrder=e?e.order:0}}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||t)(g(W),g(le))};static \u0275cmp=B({type:t,selectors:[["p-treeTableSortIcon"]],hostAttrs:[1,"p-element"],inputs:{field:"field",ariaLabelDesc:"ariaLabelDesc",ariaLabelAsc:"ariaLabelAsc"},decls:2,vars:2,consts:[[4,"ngIf"],["class","p-sortable-column-icon",4,"ngIf"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-sortable-column-icon"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,l){i&1&&d(0,Xi,4,3,"ng-container",0)(1,el,2,4,"span",1),i&2&&(a("ngIf",!l.tt.sortIconTemplate),c(),a("ngIf",l.tt.sortIconTemplate))},dependencies:()=>[j,Q,Te,Ce,ye],encapsulation:2,changeDetection:0})}return t})();var ql=(()=>{class t{tt;el;zone;get level(){return this.rowNode?.level+1}get styleClass(){return this.rowNode?.node.styleClass||""}get expanded(){return this.rowNode?.node.expanded}rowNode;constructor(e,i,l){this.tt=e,this.el=i,this.zone=l}onKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"Tab":this.onTabKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;default:break}}onArrowDownKey(e){let i=this.el?.nativeElement?.nextElementSibling;i&&this.focusRowChange(e.currentTarget,i),e.preventDefault()}onArrowUpKey(e){let i=this.el?.nativeElement?.previousElementSibling;i&&this.focusRowChange(e.currentTarget,i),e.preventDefault()}onArrowRightKey(e){let i=e.currentTarget;!(h.findSingle(i,"button").style.visibility==="hidden")&&!this.expanded&&this.rowNode.node.children&&(this.expand(e),i.tabIndex=-1),e.preventDefault()}onArrowLeftKey(e){let i=this.tt.containerViewChild?.nativeElement,l=h.find(i,'[aria-expanded="true"]'),n=l[l.length-1];this.expanded&&this.collapse(e),n&&(this.tt.toggleRowIndex=h.index(n)),this.restoreFocus(),e.preventDefault()}onHomeKey(e){let i=h.findSingle(this.tt.containerViewChild?.nativeElement,`tr[aria-level="${this.level}"]`);i&&h.focus(i),e.preventDefault()}onEndKey(e){let i=h.find(this.tt.containerViewChild?.nativeElement,`tr[aria-level="${this.level}"]`),l=i[i.length-1];h.focus(l),e.preventDefault()}onTabKey(e){let i=this.el.nativeElement?[...h.find(this.el.nativeElement.parentNode,"tr")]:void 0;if(i&&y.isNotEmpty(i)){let l=i.some(n=>h.getAttribute(n,"data-p-highlight")||n.getAttribute("aria-checked")==="true");if(i.forEach(n=>{n.tabIndex=-1}),l){let n=i.filter(r=>h.getAttribute(r,"data-p-highlight")||r.getAttribute("aria-checked")==="true");n[0].tabIndex=0;return}i[0].tabIndex=0}}expand(e){this.tt.toggleRowIndex=h.index(this.el.nativeElement),this.rowNode.node.expanded=!0,this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),this.rowNode.node.children?this.restoreFocus(this.tt.toggleRowIndex+1):this.restoreFocus(),this.tt.onNodeExpand.emit({originalEvent:e,node:this.rowNode.node})}collapse(e){this.rowNode.node.expanded=!1,this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),this.tt.onNodeCollapse.emit({originalEvent:e,node:this.rowNode.node})}focusRowChange(e,i,l){e.tabIndex="-1",i.tabIndex="0",h.focus(i)}restoreFocus(e){this.zone.runOutsideAngular(()=>{setTimeout(()=>{let i=this.tt.containerViewChild?.nativeElement,l=h.findSingle(i,".p-treetable-tbody").children[e||this.tt.toggleRowIndex],n=[...h.find(i,"tr")];n&&n.forEach(r=>{l.isSameNode(r)||(r.tabIndex=-1)}),l&&(l.tabIndex=0,l.focus())},25)})}static \u0275fac=function(i){return new(i||t)(g(W),g(te),g(ee))};static \u0275dir=se({type:t,selectors:[["","ttRow",""]],hostAttrs:[1,"p-element"],hostVars:7,hostBindings:function(i,l){i&1&&P("keydown",function(r){return l.onKeyDown(r)}),i&2&&(A("tabindex","0")("aria-expanded",l.expanded)("aria-level",l.level)("data-pc-section",l.row)("role",l.row),q("p-element "+l.styleClass))},inputs:{rowNode:[0,"ttRow","rowNode"]}})}return t})(),$l=(()=>{class t{tt;config;rowNode;constructor(e,i){this.tt=e,this.config=i}get toggleButtonAriaLabel(){return this.config.translation?this.rowNode.expanded?this.config.translation.aria.collapseRow:this.config.translation.aria.expandRow:void 0}onClick(e){this.rowNode.node.expanded=!this.rowNode.node.expanded,this.rowNode.node.expanded?this.tt.onNodeExpand.emit({originalEvent:e,node:this.rowNode.node}):this.tt.onNodeCollapse.emit({originalEvent:e,node:this.rowNode.node}),this.tt.updateSerializedValue(),this.tt.tableService.onUIUpdate(this.tt.value),e.preventDefault()}static \u0275fac=function(i){return new(i||t)(g(W),g(he))};static \u0275cmp=B({type:t,selectors:[["p-treeTableToggler"]],hostAttrs:[1,"p-element"],inputs:{rowNode:"rowNode"},decls:3,vars:12,consts:[["type","button","tabindex","-1","pRipple","",1,"p-treetable-toggler","p-link",3,"click","ngStyle"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,l){i&1&&(_(0,"button",0),P("click",function(r){return l.onClick(r)}),d(1,nl,3,2,"ng-container",1)(2,rl,1,0,null,2),w()),i&2&&(a("ngStyle",H(7,tl,l.rowNode.node.leaf===!1||l.rowNode.node.children&&l.rowNode.node.children.length?"visible":"hidden",l.rowNode.level*16+"px")),A("data-pc-section","rowtoggler")("data-pc-group-section","rowactionbutton")("aria-label",l.toggleButtonAriaLabel),c(),a("ngIf",!l.tt.togglerIconTemplate),c(),a("ngTemplateOutlet",l.tt.togglerIconTemplate)("ngTemplateOutletContext",z(10,M,l.rowNode.node.expanded)))},dependencies:()=>[j,Q,ne,Qe,ue,me],encapsulation:2})}return t})(),Jl=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=De({type:t});static \u0275inj=ze({imports:[Ae,Xe,We,ge,fe,be,_e,Te,Ce,ye,Ge,$e,ue,me,je,ge]})}return t})();export{W as a,Wl as b,Gl as c,ql as d,$l as e,Jl as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as l}from"./chunk-
|
|
1
|
+
import{h as l}from"./chunk-WKDLP2Y5.js";import"./chunk-PG4R2OFT.js";import"./chunk-KJAXMZ4I.js";import"./chunk-DTMRGXEX.js";import"./chunk-NKPEHX74.js";import"./chunk-SP2LHZKL.js";import"./chunk-EMFGQNNB.js";import"./chunk-BRLHLTUA.js";import"./chunk-TZT4PVW4.js";import"./chunk-2FWFPV5I.js";import"./chunk-6WXIGYEC.js";import"./chunk-QJMUNNAM.js";import"./chunk-SDXT5Y6W.js";import"./chunk-YCML2WMM.js";import"./chunk-R3FC67K2.js";import"./chunk-5NUFPZAD.js";import{Ab as o,Bb as m,Cb as p,Rd as d,_b as c,dd as f,ia as n,pa as u,qa as i}from"./chunk-FDOFOXXB.js";import"./chunk-KW4B7WMB.js";var r=class t{menuData={H:"Not Found"};constructor(){}ngOnInit(){}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=u({type:t,selectors:[["POS-not-found-page"]],decls:12,vars:0,consts:[[1,"container-fluid","mt-12"],[1,"row"],[1,"col-1"],[1,"col-6","d-flex","align-items-center","justify-content-center","pe-0"],[1,"ms-12"],[1,"mb-0","fw-normal",2,"margin-top","20px","font-size","55px"],[1,"fs-4"],[1,"col-5","ps-0"],["src","//res.cloudinary.com/pos/image/upload/v1652836870/POS/Images/MicrosoftTeams-image.jpg","alt","",2,"width","50%"]],template:function(e,y){e&1&&(o(0,"content")(1,"div",0)(2,"div",1),p(3,"div",2),o(4,"div",3)(5,"div",4)(6,"h1",5),c(7," Page Not Found "),m(),o(8,"p",6),c(9,"The page you are trying to access cannot be found"),m()()(),o(10,"div",7),p(11,"img",8),m()()()())}})};var M=[{path:"",component:r}],a=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[d.forChild(M),d]})};var N=class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=i({type:t});static \u0275inj=n({imports:[f,a,l]})};export{N as NotFoundModule};
|