dealposbooks 1.9.6 → 1.9.8
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/3rdpartylicenses.txt +26 -26
- package/assets/scss/style.scss +30 -0
- package/{chunk-RBDJZRHY.js → chunk-27P5HOS3.js} +1 -1
- package/chunk-2QWAAI3V.js +1 -0
- package/{chunk-CSMMP7XG.js → chunk-35ER6BC7.js} +1 -1
- package/{chunk-BNI5KUDE.js → chunk-3GHEXAAZ.js} +3 -3
- package/chunk-3OJSEDLY.js +1 -0
- package/{chunk-TC43COAE.js → chunk-3RM5CDGW.js} +1 -1
- package/chunk-46XJU64Z.js +1 -0
- package/chunk-4MEPU7FI.js +1 -0
- package/chunk-4PK4TO7C.js +1 -0
- package/{chunk-46TNY5N4.js → chunk-4V5YFD3N.js} +1 -1
- package/chunk-5RRPJBLN.js +1 -0
- package/chunk-6332DY2I.js +82 -0
- package/{chunk-OVCTOPAO.js → chunk-6PS3NJ62.js} +1 -1
- package/{chunk-J2SK4PGN.js → chunk-77BBQI2T.js} +1 -1
- package/{chunk-PGECEXRR.js → chunk-7ET5CSOO.js} +1 -1
- package/{chunk-6ZZARVQO.js → chunk-7IPVVF6Y.js} +1 -1
- package/chunk-7JGGV5FX.js +1 -0
- package/chunk-7TOJMYLE.js +1 -0
- package/chunk-AZWJMXL6.js +449 -0
- package/chunk-BDJHC5O6.js +2 -0
- package/{chunk-GJXWL5XV.js → chunk-BOVEGMBL.js} +1 -1
- package/{chunk-IIB2DZLA.js → chunk-BPFL7VRT.js} +1 -1
- package/{chunk-EXVUABTO.js → chunk-BX74ZLQG.js} +1 -1
- package/chunk-C3N6HRIE.js +1 -0
- package/{chunk-TFV5QZKR.js → chunk-CEZEYAWZ.js} +1 -1
- package/chunk-CGUMUBB7.js +1 -0
- package/{chunk-OEOAUJY5.js → chunk-CLVUILX2.js} +1 -1
- package/{chunk-JDW35ZB5.js → chunk-CNLYDNON.js} +1 -1
- package/{chunk-JP3F2QND.js → chunk-CZWWMQFD.js} +1 -1
- package/{chunk-BYD3JK4R.js → chunk-DAQCANBV.js} +1 -1
- package/{chunk-OZACNHDP.js → chunk-DJAICZNR.js} +1 -1
- package/chunk-DXIZC3FM.js +87 -0
- package/chunk-EJCLRSB2.js +1 -0
- package/{chunk-4S33ZRKF.js → chunk-FTI2QPWV.js} +1 -1
- package/{chunk-ASK2IVMC.js → chunk-H6BPUKCW.js} +1 -1
- package/{chunk-TK3G2BVM.js → chunk-HFUW7PYZ.js} +1 -1
- package/chunk-I3BTHUK3.js +160 -0
- package/chunk-IL6G454L.js +1 -0
- package/chunk-IY6KCAQ4.js +1 -0
- package/{chunk-JMLETF7Y.js → chunk-J6H5UCJR.js} +1 -1
- package/{chunk-J77A3DFB.js → chunk-JO3SI6HU.js} +1 -1
- package/{chunk-32BR7AQL.js → chunk-JZTK7BS7.js} +1 -1
- package/{chunk-P6CJ2ONT.js → chunk-K4ALA724.js} +1 -1
- package/{chunk-NF3TF3LT.js → chunk-KANHSSLO.js} +1 -1
- package/{chunk-G6FJQBZZ.js → chunk-KHP7E7JG.js} +1 -1
- package/chunk-L66QS3IX.js +81 -0
- package/chunk-LFVBO7JG.js +1 -0
- package/{chunk-YOEPO6LK.js → chunk-LMI4DLB5.js} +1 -1
- package/chunk-LRI7YFKN.js +1 -0
- package/chunk-MPHC4J2R.js +1 -0
- package/chunk-MYLHWS7O.js +1 -0
- package/chunk-NHEN24Y3.js +1 -0
- package/chunk-NOZEL54G.js +1 -0
- package/{chunk-3L7IWFXM.js → chunk-NR3EHEG3.js} +1 -1
- package/chunk-ONMFMNUN.js +129 -0
- package/chunk-OXGCSUUS.js +2 -0
- package/{chunk-LTZA6IIO.js → chunk-PDNXU4MC.js} +1 -1
- package/chunk-R6NK3ROE.js +1 -0
- package/{chunk-54OPMMIM.js → chunk-R6XNFCQM.js} +1 -1
- package/{chunk-HRQJ5DXP.js → chunk-RLR2HFSC.js} +1 -1
- package/{chunk-HFFH2WIX.js → chunk-RNOSD5RO.js} +1 -1
- package/chunk-RQ52IUQY.js +130 -0
- package/{chunk-DOM7WYRM.js → chunk-RSGEQTNJ.js} +1 -1
- package/{chunk-35CWG2OK.js → chunk-RYHNURUZ.js} +2 -2
- package/{chunk-3DN7TZCI.js → chunk-SH4ALZVS.js} +1 -1
- package/chunk-SRNYKRLK.js +1 -0
- package/{chunk-3HW557B7.js → chunk-TDMJ2M6W.js} +1 -1
- package/{chunk-AKMHO3LC.js → chunk-TIX3GAPF.js} +1 -1
- package/{chunk-XKEV5AED.js → chunk-TLLNQB5C.js} +1 -1
- package/chunk-TOYTUB2K.js +1 -0
- package/chunk-U4SERSDK.js +1 -0
- package/{chunk-C5GEP4MM.js → chunk-U75O34AW.js} +1 -1
- package/{chunk-I3HFXOYS.js → chunk-UNWDCLFZ.js} +1 -1
- package/chunk-UUZOSCEV.js +7 -0
- package/chunk-UWWFSGE7.js +1 -0
- package/{chunk-6TA77CRR.js → chunk-V4IY7RIP.js} +1 -1
- package/chunk-VDBXI7BY.js +1 -0
- package/{chunk-RT5PUZ5F.js → chunk-VJLO7GNT.js} +1 -1
- package/chunk-VJVWTOYU.js +1 -0
- package/{chunk-LKZL77YR.js → chunk-W4KTL6Y6.js} +1 -1
- package/{chunk-ZWHB7NI7.js → chunk-W6LBFCQQ.js} +1 -1
- package/{chunk-YVEUYFCE.js → chunk-WCXWWANV.js} +5 -5
- package/{chunk-34XRAZFC.js → chunk-WUPQR4WU.js} +1 -1
- package/{chunk-LR2DJRRL.js → chunk-WWWY3VE7.js} +1 -1
- package/chunk-X26YDRRO.js +1 -0
- package/chunk-XAH4P23E.js +1 -0
- package/{chunk-7WXXPCRV.js → chunk-XYU65DNE.js} +1 -1
- package/chunk-YJ3CWPO4.js +1 -0
- package/{chunk-3WB76KQC.js → chunk-YVGWGEPX.js} +1 -1
- package/{chunk-TQZNJ5WF.js → chunk-Z3SHAW6W.js} +1 -1
- package/{chunk-AOSPVPK7.js → chunk-ZHU3HOWQ.js} +1 -1
- package/index.html +2 -2
- package/{main-U5PC2W2C.js → main-LKLXHNSP.js} +1 -1
- package/package.json +1 -1
- package/{styles-GTUKYMN7.css → styles-XXVTW56A.css} +1 -1
- package/chunk-27SWEVDU.js +0 -1
- package/chunk-2DV653RD.js +0 -1
- package/chunk-2OECREUZ.js +0 -1
- package/chunk-35KDUCM3.js +0 -1
- package/chunk-3G3QSUWH.js +0 -1
- package/chunk-43WCLYRX.js +0 -1
- package/chunk-4FGQ5T64.js +0 -2
- package/chunk-4KXSM3HP.js +0 -1
- package/chunk-4QKRWFW4.js +0 -1
- package/chunk-6HQX2SM2.js +0 -1
- package/chunk-B7JILYJO.js +0 -1
- package/chunk-BX3CRF44.js +0 -1
- package/chunk-C4LZX33Q.js +0 -449
- package/chunk-C7UZ6ZYF.js +0 -1
- package/chunk-CTCQB63H.js +0 -1
- package/chunk-DNK2GUDB.js +0 -1
- package/chunk-ELWFWCNU.js +0 -246
- package/chunk-GNP7WGSH.js +0 -1
- package/chunk-GTGRV7IH.js +0 -1
- package/chunk-HRPP75N7.js +0 -1
- package/chunk-JYNZPVLW.js +0 -1
- package/chunk-K6753MGR.js +0 -7
- package/chunk-LD4G6ND6.js +0 -130
- package/chunk-M7MFX6BW.js +0 -1
- package/chunk-MCDQ2TIS.js +0 -1
- package/chunk-MJVSTWYY.js +0 -1
- package/chunk-N2RYBZK7.js +0 -1
- package/chunk-N6JCA3CN.js +0 -2
- package/chunk-OEJBOFI5.js +0 -1
- package/chunk-QPKNYNLC.js +0 -210
- package/chunk-UEOO2LYA.js +0 -82
- package/chunk-WEWEITR7.js +0 -1
- package/chunk-WGZN6AN2.js +0 -1
- package/chunk-WZO2ZLBL.js +0 -1
- package/chunk-X34Y3TVX.js +0 -1
- package/chunk-XFSZDZPJ.js +0 -1
- package/chunk-XZGFG6E3.js +0 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import{a as Pn,b as Mn}from"./chunk-DXIZC3FM.js";import{a as st}from"./chunk-XYU65DNE.js";import{a as Nn}from"./chunk-NRULEUE7.js";import{a as Fn,b as we,c as Ae}from"./chunk-KANHSSLO.js";import{a as kn,b as On}from"./chunk-ZHU3HOWQ.js";import"./chunk-Z3SHAW6W.js";import{a as Vn,b as Ln}from"./chunk-JZTK7BS7.js";import{a as Dn}from"./chunk-DCKLQNGL.js";import{a as En}from"./chunk-VJLO7GNT.js";import"./chunk-DJAICZNR.js";import{a as nt,b as it}from"./chunk-CZWWMQFD.js";import{a as rt,b as at,c as vn,d as Sn,i as Tn,j as wn,k as An}from"./chunk-CEZEYAWZ.js";import"./chunk-YVGWGEPX.js";import"./chunk-PDNXU4MC.js";import{a as Z}from"./chunk-YJ3CWPO4.js";import{a as E}from"./chunk-C3N6HRIE.js";import{b as fn}from"./chunk-W4KTL6Y6.js";import{a as un}from"./chunk-RNOSD5RO.js";import{a as bn,b as ot}from"./chunk-HFUW7PYZ.js";import"./chunk-WWWY3VE7.js";import"./chunk-35ER6BC7.js";import"./chunk-V4IY7RIP.js";import"./chunk-J6H5UCJR.js";import"./chunk-U75O34AW.js";import"./chunk-3RM5CDGW.js";import{a as tt,b as K}from"./chunk-7IPVVF6Y.js";import{f as yn,h as $}from"./chunk-RYHNURUZ.js";import{b as et,c as fe}from"./chunk-BX74ZLQG.js";import{a as re,b as ae}from"./chunk-CNLYDNON.js";import{a as W,b as gn,c as hn,e as xn,f as Cn,g as In}from"./chunk-FTI2QPWV.js";import{c as Qe,d as Wt,f as Yt}from"./chunk-BDJHC5O6.js";import{a as Ct,f as It,n as Xe,o as Je,p as dn,t as _n,u as yt,w as ie,x as oe}from"./chunk-LMI4DLB5.js";import"./chunk-W6LBFCQQ.js";import{$ as nn,Ba as sn,E as ft,Ea as ln,J as Xt,Ja as cn,L as Jt,Ma as Te,N as en,Na as Ne,Pa as mn,R as We,S as Ye,Va as pn,X as tn,Y as _t,b as te,c as de,e as U,ea as on,f as Ce,g as jt,ha as rn,i as L,j as je,k as Qt,l as Ie,la as an,o as ye,oa as gt,ra as ne,v as be,wa as ht,x as ve,xa as xt,y as Se}from"./chunk-3GHEXAAZ.js";import{a as Zt}from"./chunk-R6NK3ROE.js";import"./chunk-TDMJ2M6W.js";import{C as J,E as ee,F as B,M as V,c as Q,e as Ze,f as R,g as pt,h as Gt,l as Ut,m as N,n as ke}from"./chunk-DAQCANBV.js";import{c as ut,d as dt,f as Oe,h as Fe}from"./chunk-F2X3VGZZ.js";import{Ab as Pe,Ac as w,Bc as Kt,Cb as d,D as Be,Ga as b,J as $e,Jb as P,Jc as qt,Kb as l,Kc as zt,L as Nt,Mc as y,Nb as le,O as Vt,Ob as Me,Ub as a,Vb as r,Vc as ue,Wb as h,Wc as xe,X as D,Xb as ce,Yb as me,Yc as j,Z as S,Zc as Ht,_b as T,aa as Lt,ba as Ke,bb as Ee,c as Re,ca as Dt,cb as Rt,dc as v,ec as c,gb as m,ha as x,jc as ze,kc as pe,lc as H,mb as mt,mc as G,pa as _,pc as X,qa as g,qc as p,rc as A,s as z,sc as ge,t as Ft,ta as qe,uc as $t,vc as He,wb as O,wc as Ge,xb as Bt,xc as Ue,yc as he,za as Y,zc as F}from"./chunk-WCXWWANV.js";import{a as C,b as I}from"./chunk-YQFG5XE2.js";var Qn=["class","page"],Wn=n=>({id:n}),Yn=n=>["fa-solid",n];function Xn(n,s){if(n&1){let e=T();a(0,"div",4)(1,"a",5),p(2,"Cancel"),r(),a(3,"a",6),h(4,"i",7),p(5," Edit"),r(),a(6,"p-button",8),v("onClick",function(){_(e);let i=c();return g(i.onDelete())}),r(),a(7,"a",9),p(8,"Ledger"),r()()}if(n&2){let e,t=c();m(7),l("queryParams",w(1,Wn,(e=t.COAInfo())==null?null:e.id))}}function Jn(n,s){if(n&1&&h(0,"i",18),n&2){let e=s.checked;l("ngClass",w(1,Yn,e?"fa-check":"fa-xmark"))}}function ei(n,s){if(n&1){let e=T();a(0,"div",11)(1,"div",12)(2,"p-card")(3,"div",13)(4,"div",14)(5,"div",15),p(6,"Name"),r(),a(7,"div",16),p(8),r()(),a(9,"div",14)(10,"div",15),p(11,"Code"),r(),a(12,"div",16),p(13),r()(),a(14,"div",14)(15,"div",15),p(16,"Category"),r(),a(17,"div",16),p(18),r()(),a(19,"div",14)(20,"div",15),p(21,"Note"),r(),a(22,"div",16),p(23),r()(),a(24,"div",14)(25,"div",15),p(26,"Outlet"),r(),a(27,"div",16),p(28),r()(),a(29,"div",14)(30,"div",15),p(31,"Discontinued"),r(),a(32,"div",16)(33,"p-toggleswitch",17),v("onChange",function(i){_(e);let o=c(2);return g(o.onDiscontinued(i))}),d(34,Jn,1,3,"ng-template",null,2,y),r()()()()()()()}if(n&2){let e,t,i,o,u,f=c(2);m(8),A((e=f.COAInfo().name)!==null&&e!==void 0?e:"-"),m(5),A((t=f.COAInfo().code)!==null&&t!==void 0?t:"-"),m(5),A((i=f.COAInfo().category)!==null&&i!==void 0?i:"-"),m(5),A((o=f.COAInfo().note)!==null&&o!==void 0?o:"-"),m(5),A((u=f.COAInfo().outletName)!==null&&u!==void 0?u:"-"),m(5),l("ngModel",f.COAInfo().bin)}}function ti(n,s){if(n&1&&d(0,ei,36,6,"div",10),n&2){let e=c();l("ngIf",e.COAInfo())}}var Rn=(()=>{class n{constructor(){this.#e=x(Z),this.#t=x(J),this.router=x(ee),this.COAInfo=b(null),this.checked=b(!1)}#e;#t;ngOnInit(){this.#t.paramMap.pipe(E("params"),D(e=>this.#e.getChartAccountById(e.get("id"))),S(e=>this.COAInfo.set(e)),E("response")).subscribe()}onDelete(){if(!confirm("Are you sure you want to delete this Chart of Accounts?"))return;let t=[this.#t.snapshot.paramMap.get("id")];this.#e.deleteChartAccount(t).pipe(S(()=>{this.router.navigate(["/pages/chart-of-account/account"])})).subscribe()}onDiscontinued(e){this.#e.discountedChartAccounts(this.#t.snapshot.paramMap.get("id"),{Discontinued:e.checked}).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-coa-account-info",8,"page"]],attrs:Qn,decls:5,vars:0,consts:[["actionButton",""],["content",""],["handle",""],["pageTitle","Chart of Account Details"],[1,"d-flex","gap-2"],["routerLink","/pages/chart-of-account/account",1,"p-button","p-button-secondary","p-button-outlined"],["routerLink","edit",1,"p-button","p-button-secondary","p-button-outlined"],[1,"fa-solid","fa-pen-to-square"],["label","Delete","icon","fa-solid fa-trash","severity","secondary","variant","outlined",3,"onClick"],["routerLink","/pages/report/general-ledger",1,"p-button",3,"queryParams"],["class","row justify-content-center mt-3",4,"ngIf"],[1,"row","justify-content-center","mt-3"],[1,"col","col-lg-8"],[1,"d-flex","flex-column","row-gap-4"],[1,"row"],[1,"col","col-lg-3"],[1,"col"],[3,"onChange","ngModel"],[3,"ngClass"]],template:function(t,i){t&1&&(a(0,"app-main-panel",3),d(1,Xn,9,3,"ng-template",null,0,y)(3,ti,1,1,"ng-template",null,1,y),r())},dependencies:[N,Q,R,ve,U,je,Qe,V,B,$,K,tt,oe,ie,vn,En],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var se=(()=>{class n{constructor(){this.httpService=x(Zt)}fetchCOACategories(){return this.httpService.get("","api/ChartOfAccount/Category")}getCOACategoryByID(e){let t={params:e};return this.httpService.get("","api/ChartOfAccount/CategoryInfo",t)}renameCategory(e,t){return this.httpService.put("",`api/ChartOfAccount/RenameCategory/${e}`,t)}updateParentCategory(e,t){return this.httpService.put("",`api/ChartOfAccount/UpdateParentCategory/${e}`,t).pipe()}deleteCategory(e){return this.httpService.delete("",`api/ChartOfAccount/Category/${e}`)}submitCategory(e,t={}){return this.httpService.post("","api/ChartOfAccount/SubmitCategory",e,t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=Ke({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var vt=n=>n?n.reduce((s,e)=>(s.push({label:e.label,data:e.data,key:e.key}),e.children&&e.children.length?s.push(...vt(e.children)):s.push({label:`${e.label} (no children)`,data:e.data,key:`${e.key}-no-children`}),s),[]):[];var St=(n,s,e)=>{let t=Math.ceil(e/s),i=(n-1)*s+1,o=Math.min(n*s,e);return{start:i,end:o,totalRecords:e,totalPages:t}};var ni={filter:{RowCount:20,PageNumber:1,CategoryID:"",Text:"",listOutletID:[],Discontinued:2},options:{entities:[],categories:[]},data:[],count:0,perPages:[{key:20,value:"20 per page"},{key:40,value:"40 per page"},{key:60,value:"60 per page"},{key:80,value:"80 per page"},{key:100,value:"100 per page"}]},Tt=gn(Cn(ni),In("ChartOfAccount"),hn(n=>({isAllChecked:j(()=>n.data().every(s=>s.checked)),checkedItems:j(()=>n.data().filter(s=>s.checked)),IDsChecked:j(()=>n.data().filter(s=>s.checked).map(s=>s.id)),categories:j(()=>vt(n.options.categories())),first:j(()=>{let{start:s}=St(n.filter().PageNumber,n.filter().RowCount,n.count());return s}),last:j(()=>{let{end:s}=St(n.filter().PageNumber,n.filter().RowCount,n.count());return s})})),xn(n=>{let s=x(Z),e=x(se),t={updateFilter(i){W(n,{filter:C({},i)})},checkedItem(i){if(Array.isArray(i))i.forEach(o=>{let u=n.data().map(f=>f.id===o.id?I(C({},f),{checked:!o.checked}):f);W(n,{data:u})});else{let o=i,u=n.data().map(f=>f.id===o.id?I(C({},f),{checked:!o.checked}):f);W(n,{data:u})}},checkAllCheckbox(){let i=n.data().map(o=>I(C({},o),{checked:!o.checked}));W(n,{data:i})},fetchChartOfAccount:nt(Re(Be(()=>!!n.filter()),Nt(300),Vt(),D(i=>s.getPaginatedChartAccounts(i).pipe(z(o=>I(C({},o),{data:o.data.map(u=>I(C({},u),{checked:!1}))})),it({next:o=>W(n,{data:o.data,count:o.count}),error:o=>{W(n,{data:[],count:0}),console.error(o)}}))))),fetchLoader:nt(Re(D(()=>s.getChartOfAccountLoader().pipe(it({next:i=>{W(n,{filter:I(C({},n.filter()),{RowCount:i.filter.rowCount,PageNumber:1,CategoryID:i.filter.categoryID||null,Text:"",listOutletID:[]}),options:i.options}),t.fetchChartOfAccount(n.filter)},error:i=>{console.error(i)}}))))),getCategories:nt(Re($e(()=>e.fetchCOACategories().pipe(it({next:i=>{W(n,{options:{entities:n.options.entities(),categories:i}})},error:i=>{console.error(i)}})))))};return t}));var ri=["class","page"],ai=()=>({height:"calc(100vh - 70px)"}),si=n=>["../account/",n],li=()=>["/pages/report/general-ledger"],ci=n=>({id:n}),mi=()=>({width:"100%"}),pi=()=>({scrollHeight:"200px"});function ui(n,s){if(n&1){let e=T();a(0,"p-button",14),v("onClick",function(){_(e);let i=c(2);return g(i.deleteCOA())}),r()}}function di(n,s){if(n&1){let e=T();a(0,"div",8),d(1,ui,1,0,"p-button",9),a(2,"p-button-group"),h(3,"p-button",10),a(4,"p-button",11),v("onClick",function(){_(e);let i=c();return g(i.onExport())}),r()(),a(5,"a",12),h(6,"i",13),p(7," Add"),r()()}if(n&2){let e=c();m(),l("ngIf",e.store.checkedItems().length)}}function fi(n,s){n&1&&(a(0,"tr")(1,"th",16),h(2,"p-tableHeaderCheckbox"),r(),a(3,"th"),p(4,"Code"),r(),a(5,"th"),p(6,"Name"),r(),a(7,"th"),p(8,"Category"),r(),a(9,"th"),p(10,"Outlet"),r(),a(11,"th",17),p(12,"Balance"),r()())}function _i(n,s){if(n&1&&(a(0,"tr")(1,"td"),h(2,"p-tableCheckbox",18),r(),a(3,"td"),p(4),r(),a(5,"td")(6,"a",19),p(7),r()(),a(8,"td"),p(9),r(),a(10,"td"),p(11),r(),a(12,"td",17)(13,"a",20),p(14),qt(15,"number"),r()()()),n&2){let e,t=s.$implicit;m(2),l("value",t),m(2),A(t.code),m(2),l("routerLink",w(11,si,t.id)),m(),A(t.name),m(2),A(t.category),m(2),A(t.outletName),m(2),l("routerLink",F(13,li))("queryParams",w(14,ci,t.id)),m(),A(zt(15,9,(e=t.balance)!==null&&e!==void 0?e:0))}}function gi(n,s){if(n&1&&p(0),n&2){let e=c(2);$t(" Showing ",e.store.first()," to ",e.store.last()," of ",e.store.count()," entries ")}}function hi(n,s){n&1&&(a(0,"tr")(1,"td",21)(2,"span"),p(3,"No records found."),r()()())}function xi(n,s){if(n&1){let e=T();a(0,"p-panel")(1,"p-table",15),v("onLazyLoad",function(i){_(e);let o=c();return g(o.loadData(i))})("onRowSelect",function(i){_(e);let o=c();return g(o.onRowSelect(i))})("onRowUnselect",function(i){_(e);let o=c();return g(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let o=c();return g(o.onSelectAll(i))})("onPage",function(i){_(e);let o=c();return g(o.onPageChange(i))}),d(2,fi,13,0,"ng-template",null,3,y)(4,_i,16,16,"ng-template",null,4,y)(6,gi,1,3,"ng-template",null,5,y)(8,hi,4,0,"ng-template",null,6,y),r()()}if(n&2){let e=c();le(F(9,ai)),m(),l("lazy",!0)("value",e.store.data())("paginator",!0)("rows",e.store.filter().RowCount)("totalRecords",e.store.count())("scrollable",!0)("scrollHeight","calc(100vh - 142px)")}}function Ci(n,s){if(n&1){let e=T();a(0,"form",23)(1,"div",24)(2,"label",25),p(3,"Outlet"),r(),h(4,"p-multiselect",26),r(),a(5,"div",24)(6,"label",25),p(7,"Category"),r(),a(8,"p-treeselect",27),v("onFocus",function(){_(e);let i=c(2);return g(i.onCategoryFocus())}),r()(),a(9,"div",28)(10,"label",25),p(11,"Page Size"),r(),h(12,"input",29),r(),a(13,"div",28)(14,"label",25),p(15,"Discontinued"),r(),a(16,"div",30)(17,"div",31),h(18,"p-radiobutton",32),a(19,"label",33),p(20,"No"),r()(),a(21,"div",31),h(22,"p-radiobutton",34),a(23,"label",35),p(24,"Yes"),r()(),a(25,"div",31),h(26,"p-radiobutton",34),a(27,"label",35),p(28,"All"),r()()()()()}if(n&2){let e=c(2);l("formGroup",e.formFilter),m(4),l("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.options().entities),m(4),le(F(15,mi)),l("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",F(16,pi))("options",e.categoryNodes()),m(10),l("value",0),m(4),l("value",1),m(4),l("value",2)}}function Ii(n,s){if(n&1&&d(0,Ci,29,17,"form",22),n&2){let e=c();l("ngIf",e.formFilter)}}var $n=(()=>{class n{ngOnInit(){this.store.fetchLoader(),console.log(this.store.filter().RowCount),this.generateFilterForm()}#e;constructor(){this.routeInfo=Kn,this.store=x(Tt),this.#e=x(Z),this.modalService=x(Wt),this.dialogVisible=b(!1),this.categoryNodes=b([]),this.fb=x(be),this.isDialogFilterVisible=b(!1),this.generateFilterForm()}generateFilterForm(){this.formFilter=this.fb.group({outletID:this.fb.control([]),categoryID:this.fb.control(null),pageSize:this.fb.control(this.store.filter().RowCount),discontinued:this.fb.control(2)})}onPageChange(e){console.log("Page changed to: ",e),this.store.updateFilter(I(C({},this.store.filter()),{PageNumber:e.first/e.rows+1}))}onCategoryFocus(){this.#e.getCachedCategoriesOptions().pipe(S(e=>this.categoryNodes.set(e))).subscribe()}onRowSelect(e){console.log("Row select event: ",e),this.store.checkedItem(e.data)}onRowUnselect(e){console.log("Row unselect event: ",e),this.store.checkedItem(e.data)}onSelectAll(e){console.log("Select all event: ",e),this.store.checkAllCheckbox()}loadData(e){console.log("Lazy load event: ",e)}onSearch(e){console.log("Search text: ",e),this.store.updateFilter(I(C({},this.store.filter()),{Text:e}))}updateFilter(e,t){this.store.updateFilter(I(C({},this.store.filter()),{[e]:t}))}checkAllCheckBox(){this.store.checkAllCheckbox()}checkedItem(e){this.store.checkedItem(e)}deleteCOA(){confirm("Are you sure you want to delete selected Chart of Accounts?")&&this.#e.deleteChartAccount(this.store.IDsChecked()).pipe(E("response"),S(e=>{console.log("Delete COA Response: ",e),this.store.updateFilter(C({},this.store.filter()))})).subscribe()}onSearchEvent(e){this.store.updateFilter(I(C({},this.store.filter()),{Text:e.trim()}))}onFilterEvent(){this.dialogVisible.update(e=>!e)}onFilterOKEvent(){let{categoryID:e,pageSize:t,outletID:i,discontinued:o}=this.formFilter.value;this.store.updateFilter(I(C({},this.store.filter()),{listOutletID:i,CategoryID:e?e.key:"",RowCount:+t,Discontinued:o})),this.isDialogFilterVisible.update(u=>!u)}onExport(){let e=I(C({},this.store.filter()),{ExportPageNumber:1,ExportRowCount:1e4});this.#e.exportChartOfAccounts(e).pipe(S(t=>{let i=t.headers;console.log("All headers:",i.keys());let o=i.get("Content-Disposition"),u=i.get("content-disposition"),f=o??u,M="download.csv";if(f){let q=f.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);q&&q[1]&&(M=decodeURIComponent(q[1].replace(/"/g,"")))}let k=t.body;Nn(k,M,k.type)})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-cash-of-account",8,"page"]],features:[he([Tt])],attrs:ri,decls:7,vars:3,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Chart of Account",3,"search","isDialogFilterVisibleChange","filterEmitted","filterConfirmed","isSearchableInput","isDialogFilterVisible","isFilterable"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],["routerLink","import","severity","secondary","outlined","","label","Import","icon","fa-solid fa-download"],["outlined","","severity","secondary","label","Export","icon","fa-solid fa-upload",3,"onClick"],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",1,"",3,"onLazyLoad","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","lazy","value","paginator","rows","totalRecords","scrollable","scrollHeight"],[2,"width","4rem"],[1,"text-end"],[3,"value"],[1,"link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],["colspan","6"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column","position-relative"],["for",""],["appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an Outlet",3,"showClear","virtualScroll","virtualScrollItemSize","options"],["containerStyleClass","w-100","filter","","filterBy","label","appendTo","body","formControlName","categoryID","optionLabel","label","optionValue","key","placeholder","Select a Category",1,"w-100",3,"onFocus","showClear","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],[1,"d-flex","flex-column"],["formControlName","pageSize","type","text","pInputText",""],[1,"d-flex","flex-wrap","gap-4"],[1,"d-flex","align-items-center","gap-2"],["name","discontinued","formControlName","discontinued","inputId","ingredient1",3,"value"],["for","ingredient1",1,"m-0"],["name","discontinued","formControlName","discontinued","inputId","ingredient2",3,"value"],["for","ingredient2",1,"m-0"]],template:function(t,i){if(t&1){let o=T();a(0,"app-main-panel",7),v("search",function(f){return _(o),g(i.onSearchEvent(f))}),Ue("isDialogFilterVisibleChange",function(f){return _(o),Ge(i.isDialogFilterVisible,f)||(i.isDialogFilterVisible=f),g(f)}),v("filterEmitted",function(){return _(o),g(i.onFilterEvent())})("filterConfirmed",function(){return _(o),g(i.onFilterOKEvent())}),d(1,di,8,1,"ng-template",null,0,y)(3,xi,10,10,"ng-template",null,1,y)(5,Ii,1,1,"ng-template",null,2,y),r()}t&2&&(l("isSearchableInput",!0),He("isDialogFilterVisible",i.isDialogFilterVisible),l("isFilterable",!0))},dependencies:[N,R,Ut,$,Yt,Mn,Pn,st,ve,Qt,te,U,Ce,V,B,Se,Ie,ye,Qe,An,Sn,Tn,wn,K,yn,oe,ie,ot,Je,Xe,fe,On,kn,Ae,we,ae,re,at,rt],styles:[".p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return n})();var bi=["class","page"],vi=()=>["../../"],At=n=>({"ng-invalid ng-dirty":n}),Si=n=>({"ng-dirty ng-invalid":n});function Ti(n,s){if(n&1){let e=T();a(0,"div",5)(1,"a",6),p(2,"Cancel"),r(),a(3,"p-button",7),v("onClick",function(){_(e);let i=c();return g(i.onSubmit())}),r()()}n&2&&(m(),l("routerLink",F(1,vi)))}function wi(n,s){n&1&&(a(0,"div",27),p(1," Name is required "),r())}function Ai(n,s){if(n&1&&(a(0,"div"),d(1,wi,2,0,"div",26),r()),n&2){let e=c(2);m(),l("ngIf",e.form.controls.Name.errors.required)}}function Ei(n,s){n&1&&(a(0,"div",28)(1,"p"),p(2," If you assign an outlet for this product, it is only visible for users who has access to that outlet. "),r()())}function Pi(n,s){if(n&1&&(a(0,"span",29),p(1),r()),n&2){let e=s.$implicit;l("pTooltip",e.name),m(),ge(" ",e.name," ")}}function Mi(n,s){n&1&&(a(0,"div",27),p(1," Code is required "),r())}function ki(n,s){if(n&1&&(a(0,"div"),d(1,Mi,2,0,"div",26),r()),n&2){let e=c(2);m(),l("ngIf",e.form.controls.Code.errors.required)}}function Oi(n,s){if(n&1&&p(0),n&2){let e=s.$implicit;ge(" ",(e==null?null:e.fullLabel)||(e==null?null:e.label)||"Select a category"," ")}}function Fi(n,s){n&1&&(a(0,"div",27),p(1," Category is required "),r())}function Ni(n,s){if(n&1&&(a(0,"div"),d(1,Fi,2,0,"div",26),r()),n&2){let e=c(2);m(),l("ngIf",e.form.controls.Category.errors.required)}}function Vi(n,s){n&1&&(a(0,"div",27),p(1," Note is required "),r())}function Li(n,s){if(n&1&&(a(0,"div"),d(1,Vi,2,0,"div",26),r()),n&2){let e=c(2);m(),l("ngIf",e.form.controls.Note.errors.required)}}function Di(n,s){n&1&&(a(0,"div",27),p(1," Note is required "),r())}function Ri(n,s){if(n&1&&(a(0,"div"),d(1,Di,2,0,"div",26),r()),n&2){let e=c(3);m(),l("ngIf",e.form.controls.Note.errors.required)}}function Bi(n,s){if(n&1&&(a(0,"div",12)(1,"div",13)(2,"label",14),p(3,"Discontinued"),r(),a(4,"div",30)(5,"div",31),h(6,"p-radiobutton",32),a(7,"label",33),p(8,"No"),r()(),a(9,"div",31),h(10,"p-radiobutton",34),a(11,"label",35),p(12,"Yes"),r()()(),d(13,Ri,2,1,"div",16),r()()),n&2){let e=c(2);m(6),l("value",!1),m(4),l("value",!0),m(3),l("ngIf",e.form.controls.Note.errors)}}function $i(n,s){if(n&1&&(a(0,"p-panel",8)(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12)(5,"div",13)(6,"label",14),p(7,"Name"),r(),h(8,"input",15),d(9,Ai,2,1,"div",16),r()(),a(10,"div",12)(11,"div",13)(12,"div")(13,"label",14),p(14,"Outlet"),r(),h(15,"p-button",17),d(16,Ei,3,0,"ng-template",null,2,y),r(),a(18,"p-select",18),d(19,Pi,2,2,"ng-template",null,3,y),r()()(),a(21,"div",12)(22,"div",13)(23,"label",14),p(24,"Code"),r(),h(25,"input",19),d(26,ki,2,1,"div",16),r()(),a(27,"div",20)(28,"div",21)(29,"label",14),p(30,"Category"),r(),a(31,"p-treeselect",22),d(32,Oi,1,1,"ng-template",23),r(),d(33,Ni,2,1,"div",16),r()(),a(34,"div",12)(35,"div",13)(36,"label",14),p(37,"Note"),r(),h(38,"textarea",24),d(39,Li,2,1,"div",16),r()(),d(40,Bi,14,3,"div",25),r()()()()),n&2){let e=X(17),t=c();m(),l("formGroup",t.form),m(7),l("ngClass",w(15,At,t.form.controls.Name.invalid&&(t.form.controls.Name.dirty||t.form.controls.Name.touched))),m(),l("ngIf",t.form.controls.Name.invalid&&(t.form.controls.Name.dirty||t.form.controls.Name.touched)),m(6),l("pTooltip",e)("rounded",!0)("text",!0),m(3),l("options",t.outlets()),m(7),l("ngClass",w(17,At,t.form.controls.Code.invalid&&(t.form.controls.Code.dirty||t.form.controls.Code.touched))),m(),l("ngIf",t.form.controls.Code.invalid&&(t.form.controls.Code.dirty||t.form.controls.Code.touched)),m(5),l("options",t.categoryOptions())("ngClass",w(19,Si,t.form.controls.Category.invalid&&(t.form.controls.Category.dirty||t.form.controls.Category.touched))),m(2),l("ngIf",t.form.controls.Category.invalid&&(t.form.controls.Category.dirty||t.form.controls.Category.touched)),m(5),l("ngClass",w(21,At,t.form.controls.Note.invalid&&(t.form.controls.Note.dirty||t.form.controls.Note.touched))),m(),l("ngIf",t.form.controls.Note.errors),m(),l("ngIf",t.hasIdParam&&!t.coa_info().form.bin)}}var Et=(()=>{class n{constructor(){this.route=x(J),this.coa_service=x(Z),this.coa_info=b(null),this.fb=x(be),this.isEdit=b(!1),this.categoryOptions=b([]),this.router=x(ee),this.outlets=j(()=>this.coa_info()?this.coa_info().options.entities:[])}findParenChilds(e,t){function i(o,u=null){for(let f of o){if(f.key===t)return{parent:u,child:f};if(f.children){let M=i(f.children,f);if(M)return M}}return null}return i(e)}generateForm(e){this.form=this.fb.group({ID:new L(e.id||""),Name:new L(e.name||"",[de.required]),Code:new L(e.code||"",[de.required]),Note:new L(e.note||"",[]),Balance:new L(e.balance||0),Outlet:new L(e.outletID||""),AccessType:new L(e.accessTypeID||0),Category:new L(null,[de.required]),Bin:new L(e.bin||!1)})}ngOnInit(){this.generateForm({id:"",name:"",code:"",note:"",balance:0,outletID:"",accessTypeID:0,categoryID:null,bin:!1}),this.fetchLoader(),this.fetchCategoryOptions()}fetchLoader(){this.route.paramMap.pipe($e(e=>{if(e.has("id")){this.isEdit.set(!0);let t=e.get("id");return this.coa_service.getChartAccountFormById(t)}else return this.coa_service.getChartAccountForm()}),E("response"),z(e=>I(C({},e),{form:I(C({},e.form),{categoryID:e.form.categoryID==="00000000-0000-0000-0000-000000000000"?"":e.form.categoryID})})),S(e=>{this.coa_info.set(e),this.generateForm(e.form)})).subscribe()}get hasIdParam(){return this.route.snapshot.paramMap.has("id")}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{AccessType:e,Balance:t,Category:i,Code:o,Name:u,Note:f,Outlet:M}=this.form.value,k;this.hasIdParam?k={id:this.coa_info().form.id,categoryID:i.key,name:u,bin:this.form.value.Bin||!1,code:o,note:f,outletID:M||null,balance:t,accessTypeID:e}:k={id:this.coa_info().form.id,categoryID:i.key,bin:this.form.value.Bin||!1,name:u,code:o,note:f,outletID:M||null,balance:t,accessTypeID:e},this.hasIdParam?this.coa_service.submitChartAccount(k).pipe(E("submitChartAccount"),S(()=>{this.form.reset(),this.router.navigate(["/pages/chart-of-account/account"])})).subscribe():this.coa_service.submitChartAccount(k).pipe(E("submitChartAccount"),S(()=>{this.form.reset(),this.router.navigate(["/pages/chart-of-account/account"])})).subscribe()}fetchCategoryOptions(){this.coa_service.fetchCategoryOptions().pipe(E("response"),S(e=>{this.categoryOptions.set(e);let t=this.findParenChilds(this.categoryOptions(),this.coa_info()?.form?.categoryID);this.form.controls.Category.setValue(t?.child)})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-coa-account-form",8,"page"]],attrs:bi,decls:5,vars:1,consts:[["actionButton",""],["content",""],["tooltipContent",""],["item",""],["pageTitle","Chart Of Account Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit",3,"onClick"],["styleClass","rounded-2"],[1,"row","justify-content-center",3,"formGroup"],[1,"col"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["size","small","formControlName","Name","type","text","pInputText","",3,"ngClass"],[4,"ngIf"],["icon","fa-solid fa-circle-info",3,"pTooltip","rounded","text"],["appendTo","body","formControlName","Outlet","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["size","small","formControlName","Code","type","text","pInputText","",3,"ngClass"],[1,"co","col-lg-6"],[1,"form-group","d-flex","flex-column"],["formControlName","Category","containerStyleClass","w-full","placeholder","Select a Category",1,"w-full",3,"options","ngClass"],["pTemplate","value"],["pSize","small","rows","5","cols","30","pTextarea","","formControlName","Note",3,"ngClass"],["class","col col-lg-6",4,"ngIf"],["class","invalid-feedback text-danger d-block",4,"ngIf"],[1,"invalid-feedback","text-danger","d-block"],[1,"flex","items-center"],[1,"d-inline-block","text-truncate",2,"max-width","200px",3,"pTooltip"],[1,"d-flex","flex-wrap","gap-4"],[1,"d-flex","align-items-center","gap-2"],["name","Bin","formControlName","Bin","inputId","ingredient1",3,"value"],["for","ingredient1",1,"m-0"],["name","Bin","formControlName","Bin","inputId","ingredient2",3,"value"],["for","ingredient2",1,"m-0"]],template:function(t,i){t&1&&(a(0,"app-main-panel",4),d(1,Ti,4,2,"ng-template",null,0,y)(3,$i,41,23,"ng-template",null,1,y),r()),t&2&&l("hasMainWrapperPadding",!0)},dependencies:[$,Se,te,U,Ce,Ie,ye,st,N,Q,R,V,B,Ae,we,Te,K,Je,Xe,Ln,Vn,ot,bn,fe,et,oe,ie,ae,re,at,rt],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-treeselect{width:100%!important}"],changeDetection:0})}}return n})();var Ki=["sublist"],qi=(n,s)=>({"p-contextmenu-submenu":n,"p-contextmenu-root-list":s}),zi=()=>({"p-contextmenu-item-link":!0}),Hn=()=>({class:"p-contextmenu-submenu-icon"}),Hi=()=>({exact:!1}),Gi=n=>({"p-contextmenu-item-link":!0,"p-disabled":n}),Ui=n=>({$implicit:n});function Zi(n,s){if(n&1&&h(0,"li",8),n&2){let e=c().$implicit,t=c(2);le(t.getItemProp(e,"style")),l("ngClass",t.getSeparatorItemClass(e)),P("id",t.getItemId(e))("data-pc-section","separator")}}function ji(n,s){if(n&1&&h(0,"span",19),n&2){let e=c(4).$implicit,t=c(2);l("ngClass",t.getItemProp(e,"icon"))("ngStyle",t.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function Qi(n,s){if(n&1&&(a(0,"span",20),p(1),r()),n&2){let e=c(4).$implicit,t=c(2);P("data-pc-section","label"),m(),ge(" ",t.getItemLabel(e)," ")}}function Wi(n,s){if(n&1&&h(0,"span",21),n&2){let e=c(4).$implicit,t=c(2);l("innerHTML",t.getItemLabel(e),Ee),P("data-pc-section","label")}}function Yi(n,s){if(n&1&&h(0,"p-badge",22),n&2){let e=c(4).$implicit,t=c(2);l("styleClass",t.getItemProp(e,"badgeStyleClass"))("value",t.getItemProp(e,"badge"))}}function Xi(n,s){n&1&&h(0,"AngleRightIcon"),n&2&&(Me("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function Ji(n,s){}function eo(n,s){n&1&&d(0,Ji,0,0,"ng-template",25),n&2&&l("data-pc-section","submenuicon")("aria-hidden",!0)}function to(n,s){if(n&1&&(ce(0),d(1,Xi,1,4,"AngleRightIcon",23)(2,eo,1,2,null,24),me()),n&2){let e=c(6);m(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),m(),l("ngTemplateOutlet",e.contextMenu.submenuIconTemplate||e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",F(3,Hn))}}function no(n,s){if(n&1&&(a(0,"a",15),d(1,ji,1,5,"span",16)(2,Qi,2,2,"span",17)(3,Wi,1,2,"ng-template",null,2,y)(5,Yi,1,2,"p-badge",18)(6,to,3,4,"ng-container",11),r()),n&2){let e=X(4),t=c(3).$implicit,i=c(2);l("target",i.getItemProp(t,"target"))("ngClass",F(12,zi)),P("href",i.getItemProp(t,"url"),Rt)("aria-hidden",!0)("data-automationid",i.getItemProp(t,"automationId"))("data-pc-section","action")("tabindex",-1),m(),l("ngIf",i.getItemProp(t,"icon")),m(),l("ngIf",i.getItemProp(t,"escape"))("ngIfElse",e),m(3),l("ngIf",i.getItemProp(t,"badge")),m(),l("ngIf",i.isItemGroup(t))}}function io(n,s){if(n&1&&h(0,"span",19),n&2){let e=c(4).$implicit,t=c(2);l("ngClass",t.getItemProp(e,"icon"))("ngStyle",t.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function oo(n,s){if(n&1&&(a(0,"span",20),p(1),r()),n&2){let e=c(4).$implicit,t=c(2);P("data-pc-section","label"),m(),ge(" ",t.getItemLabel(e)," ")}}function ro(n,s){if(n&1&&h(0,"span",21),n&2){let e=c(4).$implicit,t=c(2);l("innerHTML",t.getItemLabel(e),Ee),P("data-pc-section","label")}}function ao(n,s){if(n&1&&h(0,"p-badge",22),n&2){let e=c(4).$implicit,t=c(2);l("styleClass",t.getItemProp(e,"badgeStyleClass"))("value",t.getItemProp(e,"badge"))}}function so(n,s){n&1&&h(0,"AngleRightIcon"),n&2&&(Me("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function lo(n,s){}function co(n,s){n&1&&d(0,lo,0,0,"ng-template",25),n&2&&l("data-pc-section","submenuicon")("aria-hidden",!0)}function mo(n,s){if(n&1&&(ce(0),d(1,so,1,4,"AngleRightIcon",23)(2,co,1,2,null,24),me()),n&2){let e=c(6);m(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),m(),l("ngTemplateOutlet",!e.contextMenu.submenuIconTemplate||!e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",F(3,Hn))}}function po(n,s){if(n&1&&(a(0,"a",26),d(1,io,1,5,"span",16)(2,oo,2,2,"span",17)(3,ro,1,2,"ng-template",null,2,y)(5,ao,1,2,"p-badge",18)(6,mo,3,4,"ng-container",11),r()),n&2){let e=X(4),t=c(3).$implicit,i=c(2);l("routerLink",i.getItemProp(t,"routerLink"))("queryParams",i.getItemProp(t,"queryParams"))("routerLinkActiveOptions",i.getItemProp(t,"routerLinkActiveOptions")||F(20,Hi))("target",i.getItemProp(t,"target"))("ngClass",w(21,Gi,i.getItemProp(t,"disabled")))("fragment",i.getItemProp(t,"fragment"))("queryParamsHandling",i.getItemProp(t,"queryParamsHandling"))("preserveFragment",i.getItemProp(t,"preserveFragment"))("skipLocationChange",i.getItemProp(t,"skipLocationChange"))("replaceUrl",i.getItemProp(t,"replaceUrl"))("state",i.getItemProp(t,"state")),P("data-automationid",i.getItemProp(t,"automationId"))("tabindex",-1)("aria-hidden",!0)("data-pc-section","action"),m(),l("ngIf",i.getItemProp(t,"icon")),m(),l("ngIf",i.getItemProp(t,"escape"))("ngIfElse",e),m(3),l("ngIf",i.getItemProp(t,"badge")),m(),l("ngIf",i.isItemGroup(t))}}function uo(n,s){if(n&1&&(ce(0),d(1,no,7,13,"a",13)(2,po,7,23,"a",14),me()),n&2){let e=c(2).$implicit,t=c(2);m(),l("ngIf",!t.getItemProp(e,"routerLink")),m(),l("ngIf",t.getItemProp(e,"routerLink"))}}function fo(n,s){}function _o(n,s){n&1&&d(0,fo,0,0,"ng-template")}function go(n,s){if(n&1&&(ce(0),d(1,_o,1,0,null,24),me()),n&2){let e=c(2).$implicit,t=c(2);m(),l("ngTemplateOutlet",t.itemTemplate)("ngTemplateOutletContext",w(2,Ui,e.item))}}function ho(n,s){if(n&1){let e=T();a(0,"p-contextmenu-sub",27),v("itemClick",function(i){_(e);let o=c(4);return g(o.itemClick.emit(i))})("itemMouseEnter",function(i){_(e);let o=c(4);return g(o.onItemMouseEnter(i))}),r()}if(n&2){let e=c(2).$implicit,t=c(2);l("items",e.items)("itemTemplate",t.itemTemplate)("menuId",t.menuId)("visible",t.isItemActive(e)&&t.isItemGroup(e))("activeItemPath",t.activeItemPath)("focusedItemId",t.focusedItemId)("level",t.level+1)}}function xo(n,s){if(n&1){let e=T();a(0,"li",9,1)(2,"div",10),v("click",function(i){_(e);let o=c().$implicit,u=c(2);return g(u.onItemClick(i,o))})("mouseenter",function(i){_(e);let o=c().$implicit,u=c(2);return g(u.onItemMouseEnter({$event:i,processedItem:o}))}),d(3,uo,3,2,"ng-container",11)(4,go,2,4,"ng-container",11),r(),d(5,ho,1,7,"p-contextmenu-sub",12),r()}if(n&2){let e=c(),t=e.$implicit,i=e.index,o=c(2);Me(o.getItemProp(t,"styleClass")),l("ngStyle",o.getItemProp(t,"style"))("ngClass",o.getItemClass(t))("tooltipOptions",o.getItemProp(t,"tooltipOptions")),P("id",o.getItemId(t))("data-pc-section","menuitem")("data-p-highlight",o.isItemActive(t))("data-p-focused",o.isItemFocused(t))("data-p-disabled",o.isItemDisabled(t))("aria-label",o.getItemLabel(t))("aria-disabled",o.isItemDisabled(t)||void 0)("aria-haspopup",o.isItemGroup(t)&&!o.getItemProp(t,"to")?"menu":void 0)("aria-expanded",o.isItemGroup(t)?o.isItemActive(t):void 0)("aria-level",o.level+1)("aria-setsize",o.getAriaSetSize())("aria-posinset",o.getAriaPosInset(i)),m(2),P("data-pc-section","content"),m(),l("ngIf",!o.itemTemplate),m(),l("ngIf",o.itemTemplate),m(),l("ngIf",o.isItemVisible(t)&&o.isItemGroup(t))}}function Co(n,s){if(n&1&&d(0,Zi,1,5,"li",6)(1,xo,6,21,"li",7),n&2){let e=s.$implicit,t=c(2);l("ngIf",t.isItemVisible(e)&&t.getItemProp(e,"separator")),m(),l("ngIf",t.isItemVisible(e)&&!t.getItemProp(e,"separator"))}}function Io(n,s){if(n&1){let e=T();a(0,"ul",4,0),v("@overlayAnimation.start",function(i){_(e);let o=X(1),u=c();return g(u.onEnter(i,o))})("keydown",function(i){_(e);let o=c();return g(o.menuKeydown.emit(i))})("focus",function(i){_(e);let o=c();return g(o.menuFocus.emit(i))})("blur",function(i){_(e);let o=c();return g(o.menuBlur.emit(i))}),d(2,Co,2,2,"ng-template",5),r()}if(n&2){let e=c();l("ngClass",Kt(10,qi,!e.root,e.root))("@overlayAnimation",e.visible)("tabindex",e.tabindex),P("id",e.menuId+"_list")("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy)("aria-activedescendant",e.focusedItemId)("aria-orientation","vertical")("data-pc-section","menu"),m(2),l("ngForOf",e.items)}}var yo=["item"],bo=["submenuicon"],vo=["rootmenu"],So=["container"],To=n=>({"p-contextmenu p-component":!0,"p-contextmenu-mobile":n}),wo=()=>({value:"visible"});function Ao(n,s){if(n&1){let e=T();a(0,"div",3,0),v("@overlayAnimation.start",function(i){_(e);let o=c();return g(o.onOverlayAnimationStart(i))})("@overlayAnimation.done",function(i){_(e);let o=c();return g(o.onOverlayAnimationEnd(i))}),a(2,"p-contextmenu-sub",4,1),v("itemClick",function(i){_(e);let o=c();return g(o.onItemClick(i))})("menuFocus",function(i){_(e);let o=c();return g(o.onMenuFocus(i))})("menuBlur",function(i){_(e);let o=c();return g(o.onMenuBlur(i))})("menuKeydown",function(i){_(e);let o=c();return g(o.onKeyDown(i))})("itemMouseEnter",function(i){_(e);let o=c();return g(o.onItemMouseEnter(i))}),r()()}if(n&2){let e=c();Me(e.styleClass),l("ngClass",w(20,To,e.queryMatches))("ngStyle",e.style)("@overlayAnimation",F(22,wo)),P("data-pc-section","root")("data-pc-name","contextmenu")("id",e.id),m(2),l("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex)("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy)("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("visible",e.submenuVisible())("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())}}var Eo=({dt:n})=>`
|
|
2
|
+
.p-contextmenu {
|
|
3
|
+
position: absolute;
|
|
4
|
+
background: ${n("contextmenu.background")};
|
|
5
|
+
color: ${n("contextmenu.color")};
|
|
6
|
+
border: 1px solid ${n("contextmenu.border.color")};
|
|
7
|
+
border-radius: ${n("contextmenu.border.radius")};
|
|
8
|
+
box-shadow: ${n("contextmenu.shadow")};
|
|
9
|
+
min-width: 12.5rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.p-contextmenu-root-list,
|
|
13
|
+
.p-contextmenu-submenu {
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: ${n("contextmenu.list.padding")};
|
|
16
|
+
list-style: none;
|
|
17
|
+
outline: 0 none;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: ${n("contextmenu.list.gap")};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.p-contextmenu-submenu {
|
|
24
|
+
position: absolute;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
min-width: 100%;
|
|
28
|
+
z-index: 1;
|
|
29
|
+
background: ${n("contextmenu.background")};
|
|
30
|
+
color: ${n("contextmenu.color")};
|
|
31
|
+
border: 1px solid ${n("contextmenu.border.color")};
|
|
32
|
+
border-radius: ${n("contextmenu.border.radius")};
|
|
33
|
+
box-shadow: ${n("contextmenu.shadow")};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.p-contextmenu-item {
|
|
37
|
+
position: relative;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.p-contextmenu-item-content {
|
|
41
|
+
transition: background ${n("contextmenu.transition.duration")}, color ${n("contextmenu.transition.duration")};
|
|
42
|
+
border-radius: ${n("contextmenu.item.border.radius")};
|
|
43
|
+
color: ${n("contextmenu.item.color")};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.p-contextmenu-item-link {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
position: relative;
|
|
53
|
+
color: inherit;
|
|
54
|
+
padding: ${n("contextmenu.item.padding")};
|
|
55
|
+
gap: ${n("contextmenu.item.gap")};
|
|
56
|
+
user-select: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.p-contextmenu-item-label {
|
|
60
|
+
line-height: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.p-contextmenu-item-icon {
|
|
64
|
+
color: ${n("contextmenu.item.icon.color")};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.p-contextmenu-submenu-icon {
|
|
68
|
+
color: ${n("contextmenu.submenu.icon.color")};
|
|
69
|
+
margin-left: auto;
|
|
70
|
+
font-size: ${n("contextmenu.submenu.icon.size")};
|
|
71
|
+
width: ${n("contextmenu.submenu.icon.size")};
|
|
72
|
+
height: ${n("contextmenu.submenu.icon.size")};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.p-contextmenu-submenu-icon:dir(rtl) {
|
|
76
|
+
margin-left: 0;
|
|
77
|
+
margin-right: auto;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
|
|
81
|
+
color: ${n("contextmenu.item.focus.color")};
|
|
82
|
+
background: ${n("contextmenu.item.focus.background")};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
86
|
+
color: ${n("contextmenu.item.icon.focus.color")};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
90
|
+
color: ${n("contextmenu.submenu.icon.focus.color")};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
|
|
94
|
+
color: ${n("contextmenu.item.focus.color")};
|
|
95
|
+
background: ${n("contextmenu.item.focus.background")};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {
|
|
99
|
+
color: ${n("contextmenu.item.icon.focus.color")};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
|
|
103
|
+
color: ${n("contextmenu.submenu.icon.focus.color")};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content {
|
|
107
|
+
color: ${n("contextmenu.item.active.color")};
|
|
108
|
+
background: ${n("contextmenu.item.active.background")};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
112
|
+
color: ${n("contextmenu.item.icon.active.color")};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
116
|
+
color: ${n("contextmenu.submenu.icon.active.color")};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.p-contextmenu-separator {
|
|
120
|
+
border-top: 1px solid ${n("contextmenu.separator.border.color")};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.p-contextmenu-enter-from,
|
|
124
|
+
.p-contextmenu-leave-active {
|
|
125
|
+
opacity: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.p-contextmenu-enter-active {
|
|
129
|
+
transition: opacity 250ms;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.p-contextmenu-mobile .p-contextmenu-submenu {
|
|
133
|
+
position: static;
|
|
134
|
+
box-shadow: none;
|
|
135
|
+
border: 0 none;
|
|
136
|
+
padding-left: ${n("tieredmenu.submenu.mobile.indent")};
|
|
137
|
+
padding-right: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.p-contextmenu-mobile .p-contextmenu-submenu-icon {
|
|
141
|
+
transition: transform 0.2s;
|
|
142
|
+
transform: rotate(90deg);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.p-contextmenu-mobile .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
146
|
+
transform: rotate(-90deg);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* For PrimeNG */
|
|
150
|
+
.p-contextmenu-submenu-icon.p-iconwrapper {
|
|
151
|
+
margin-left: auto;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.p-contextmenu-submenu-icon.p-iconwrapper:dir(rtl) {
|
|
155
|
+
margin-left: 0;
|
|
156
|
+
margin-right: auto;
|
|
157
|
+
}
|
|
158
|
+
`,Po={root:"p-contextmenu p-component",rootList:"p-contextmenu-root-list",item:({instance:n,processedItem:s})=>["p-contextmenu-item",{"p-contextmenu-item-active":n.isItemActive(s),"p-focus":n.isItemFocused(s),"p-disabled":n.isItemDisabled(s)}],itemContent:"p-contextmenu-item-content",itemLink:"p-contextmenu-item-link",itemIcon:"p-contextmenu-item-icon",itemLabel:"p-contextmenu-item-label",submenuIcon:"p-contextmenu-submenu-icon",submenu:"p-contextmenu-submenu",separator:"p-contextmenu-separator"},zn=(()=>{class n extends pn{name="contextmenu";theme=Eo;classes=Po;static \u0275fac=(()=>{let e;return function(i){return(e||(e=qe(n)))(i||n)}})();static \u0275prov=Ke({token:n,factory:n.\u0275fac})}return n})();var Mo=(()=>{class n extends Ct{contextMenu;visible=!1;items;itemTemplate;root=!1;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath;tabindex=0;itemClick=new Y;itemMouseEnter=new Y;menuFocus=new Y;menuBlur=new Y;menuKeydown=new Y;sublistViewChild;constructor(e){super(),this.contextMenu=e}getItemProp(e,t,i=null){return e&&e.item?xt(e.item[t],i):void 0}getItemId(e){return e.item&&e.item?.id?e.item.id:`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return I(C({},this.getItemProp(e,"class")),{"p-contextmenu-item":!0,"p-contextmenu-item-active":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)})}getItemLabel(e){return this.getItemProp(e,"label")}getSeparatorItemClass(e){return I(C({},this.getItemProp(e,"class")),{"p-contextmenu-separator":!0})}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(t=>this.isItemVisible(t)&&this.getItemProp(t,"separator")).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath)return this.activeItemPath.some(t=>t.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return ne(e.items)}onItemMouseEnter(e){let{event:t,processedItem:i}=e;this.itemMouseEnter.emit({originalEvent:t,processedItem:i})}onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.itemClick.emit({originalEvent:e,processedItem:t,isFocus:!0})}onEnter(e,t){if(e.fromState==="void"&&e.toState){let i=e.element;this.position(i)}}position(e){let t=e.parentElement.parentElement,i=nn(e.parentElement.parentElement),o=ft(),u=e.offsetParent?e.offsetWidth:_t(e),f=Xt(t.children[0]);e.style.top="0px",parseInt(i.left,10)+f+u>o.width-en()?e.style.left=-1*u+"px":e.style.left=f+"px"}static \u0275fac=function(t){return new(t||n)(mt(Lt(()=>ct)))};static \u0275cmp=O({type:n,selectors:[["p-contextMenuSub"],["p-contextmenu-sub"]],viewQuery:function(t,i){if(t&1&&pe(Ki,5),t&2){let o;H(o=G())&&(i.sublistViewChild=o.first)}},inputs:{visible:[2,"visible","visible",ue],items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",ue],autoZIndex:[2,"autoZIndex","autoZIndex",ue],baseZIndex:[2,"baseZIndex","baseZIndex",xe],popup:[2,"popup","popup",ue],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",xe],focusedItemId:"focusedItemId",activeItemPath:"activeItemPath",tabindex:[2,"tabindex","tabindex",xe]},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[Pe],decls:1,vars:1,consts:[["sublist",""],["listItem",""],["htmlLabel",""],["role","menu",3,"ngClass","tabindex","keydown","focus","blur",4,"ngIf"],["role","menu",3,"keydown","focus","blur","ngClass","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"style","ngClass",4,"ngIf"],["role","menuitem","pTooltip","",3,"ngStyle","ngClass","class","tooltipOptions",4,"ngIf"],["role","separator",3,"ngClass"],["role","menuitem","pTooltip","",3,"ngStyle","ngClass","tooltipOptions"],[1,"p-contextmenu-item-content",3,"click","mouseenter"],[4,"ngIf"],[3,"items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level","itemClick","itemMouseEnter",4,"ngIf"],["pRipple","",3,"target","ngClass",4,"ngIf"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state",4,"ngIf"],["pRipple","",3,"target","ngClass"],["class","p-contextmenu-item-icon",3,"ngClass","ngStyle",4,"ngIf"],["class","p-contextmenu-item-label",4,"ngIf","ngIfElse"],[3,"styleClass","value",4,"ngIf"],[1,"p-contextmenu-item-icon",3,"ngClass","ngStyle"],[1,"p-contextmenu-item-label"],[1,"p-contextmenu-item-label",3,"innerHTML"],[3,"styleClass","value"],[3,"class",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"data-pc-section","aria-hidden"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","ngClass","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state"],[3,"itemClick","itemMouseEnter","items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level"]],template:function(t,i){t&1&&d(0,Io,3,13,"ul",3),t&2&&l("ngIf",i.root?!0:i.visible)},dependencies:[n,N,Q,Ze,R,Gt,pt,V,B,dn,fe,et,un,yt,_n,Ne],encapsulation:2,data:{animation:[ut("overlayAnimation",[Fe(":enter",[Oe({opacity:0})]),Fe(":leave",[Oe({opacity:0})])])]}})}return n})(),ct=(()=>{class n extends Ct{overlayService;set model(e){this._model=e,this._processedItems=this.createProcessedItems(this._model||[])}get model(){return this._model}triggerEvent="contextmenu";target;global;style;styleClass;appendTo;autoZIndex=!0;baseZIndex=0;id;breakpoint="960px";ariaLabel;ariaLabelledBy;pressDelay=500;onShow=new Y;onHide=new Y;rootmenu;containerViewChild;container;outsideClickListener;resizeListener;triggerEventListener;documentClickListener;documentTriggerListener;touchEndListener;pageX;pageY;visible=b(!1);relativeAlign;window;focused=!1;activeItemPath=b([]);focusedItemInfo=b({index:-1,level:0,parentKey:"",item:null});submenuVisible=b(!1);searchValue="";searchTimeout;_processedItems;_model;pressTimer;matchMediaListener;query;queryMatches;_componentStyle=x(zn);get visibleItems(){let e=this.activeItemPath().find(t=>t.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item&&e.item?.id?e.item.id:e.index!==-1?`${this.id}${ne(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,Ht(()=>{let t=this.activeItemPath();ne(t)?this.bindGlobalListeners():this.visible()||this.unbindGlobalListeners()})}ngOnInit(){super.ngOnInit(),this.id=this.id||ln("pn_id_"),this.bindMatchMediaListener(),this.bindTriggerEventListener()}isMobile(){return rn()||on()}bindTriggerEventListener(){ke(this.platformId)&&(this.triggerEventListener||(this.isMobile()?this.global?(this.triggerEventListener=this.renderer.listen(this.document,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.document,"touchend",this.onTouchEnd.bind(this))):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.target,"touchend",this.onTouchEnd.bind(this))):this.global?this.triggerEventListener=this.renderer.listen(this.document,this.triggerEvent,e=>{this.show(e)}):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,this.triggerEvent,e=>{this.show(e)}))))}bindGlobalListeners(){if(ke(this.platformId)){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",t=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(t)&&!t.ctrlKey&&t.button!==2&&this.triggerEvent!=="click"&&this.hide()}),this.documentTriggerListener=this.renderer.listen(e,this.triggerEvent,t=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(t)&&this.hide()})}this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()}))}}itemTemplate;submenuIconTemplate;templates;_submenuIconTemplate;_itemTemplate;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"submenuicon":this._submenuIconTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}createProcessedItems(e,t=0,i={},o=""){let u=[];return e&&e.forEach((f,M)=>{let k=(o!==""?o+"_":"")+M,q={item:f,index:M,level:t,key:k,parent:i,parentKey:o};q.items=this.createProcessedItems(f.items,t+1,q,k),u.push(q)}),u}bindMatchMediaListener(){if(ke(this.platformId)&&!this.matchMediaListener){let e=window.matchMedia(`(max-width: ${this.breakpoint})`);this.query=e,this.queryMatches=e.matches,this.matchMediaListener=()=>{this.queryMatches=e.matches},e.addEventListener("change",this.matchMediaListener)}}unbindMatchMediaListener(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)}getItemProp(e,t){return e?xt(e[t]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&ne(e.items)}isSelected(e){return this.activeItemPath().some(t=>t.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&ne(e.items)}onItemClick(e){let{processedItem:t}=e,i=this.isProcessedItemGroup(t);if(this.isSelected(t)){let{index:u,key:f,level:M,parentKey:k,item:q}=t;this.activeItemPath.set(this.activeItemPath().filter(De=>f!==De.key&&f.startsWith(De.key))),this.focusedItemInfo.set({index:u,level:M,parentKey:k,item:q}),Ye(this.rootmenu.sublistViewChild.nativeElement)}else i?this.onItemChange(e):this.hide()}onItemMouseEnter(e){this.onItemChange(e,"hover")}onKeyDown(e){let t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&sn(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let t=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}onArrowRightKey(e){let t=this.visibleItems[this.focusedItemInfo().index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo.set({index:-1,parentKey:t.key,item:t.item}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide(),e.preventDefault()}else{let t=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}}onArrowLeftKey(e){let t=this.visibleItems[this.focusedItemInfo().index],i=this.activeItemPath().find(f=>f.key===t.parentKey);gt(t.parent)||(this.focusedItemInfo.set({index:-1,parentKey:i?i.parentKey:"",item:t.item}),this.searchValue="",this.onArrowDownKey(e));let u=this.activeItemPath().filter(f=>f.parentKey!==this.focusedItemInfo().parentKey);this.activeItemPath.set(u),e.preventDefault()}onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()}onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}onEscapeKey(e){this.hide();let t=this.findVisibleItem(this.findFirstFocusedItemIndex()),i=this.focusedItemInfo();this.focusedItemInfo.set(I(C({},i),{index:this.findFirstFocusedItemIndex(),item:t.item})),e.preventDefault()}onTabKey(e){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let t=We(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),i=t&&We(t,'a[data-pc-section="action"]');i?i.click():t&&t.click();let o=this.visibleItems[this.focusedItemInfo().index];if(!this.isProccessedItemGroup(o)){let f=this.focusedItemInfo();this.focusedItemInfo.set(I(C({},f),{index:this.findFirstFocusedItemIndex()}))}}e.preventDefault()}onItemChange(e,t){let{processedItem:i,isFocus:o}=e;if(gt(i))return;let{index:u,key:f,level:M,parentKey:k,items:q}=i,De=ne(q),kt=this.activeItemPath().filter(Ot=>Ot.parentKey!==k&&Ot.parentKey!==f);De&&(kt.push(i),this.submenuVisible.set(!0)),this.focusedItemInfo.set({index:u,level:M,parentKey:k,item:i.item}),o&&Ye(this.rootmenu.sublistViewChild.nativeElement),!(t==="hover"&&this.queryMatches)&&this.activeItemPath.set(kt)}onMenuFocus(e){this.focused=!0;let t=this.focusedItemInfo().index!==-1?this.focusedItemInfo():{index:-1,level:0,parentKey:"",item:null};this.focusedItemInfo.set(t)}onMenuBlur(e){this.focused=!1,this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.searchValue=""}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.position(),this.moveOnTop(),this.appendOverlay(),this.bindGlobalListeners(),Ye(this.rootmenu.sublistViewChild.nativeElement);break}}onOverlayAnimationEnd(e){switch(e.toState){case"void":this.onOverlayHide();break}}appendOverlay(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.containerViewChild.nativeElement):Jt(this.appendTo,this.containerViewChild.nativeElement))}moveOnTop(){this.autoZIndex&&this.containerViewChild&&It.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}onOverlayHide(){this.unbindGlobalListeners(),this.cd.destroyed||(this.target=null),this.container&&this.autoZIndex&&It.clear(this.container),this.container=null}onTouchStart(e){this.pressTimer=setTimeout(()=>{this.show(e)},this.pressDelay)}onTouchEnd(){clearTimeout(this.pressTimer)}hide(){this.visible.set(!1),this.onHide.emit(),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null})}toggle(e){this.visible()?this.hide():this.show(e)}show(e){this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.pageX=e.pageX,this.pageY=e.pageY,this.onShow.emit(),this.visible()?this.position():this.visible.set(!0),e.stopPropagation(),e.preventDefault()}position(){let e=this.pageX+1,t=this.pageY+1,i=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetWidth:_t(this.containerViewChild.nativeElement),o=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetHeight:tn(this.containerViewChild.nativeElement),u=ft();e+i-this.document.scrollingElement.scrollLeft>u.width&&(e-=i),t+o-this.document.scrollingElement.scrollTop>u.height&&(t-=o),e<this.document.scrollingElement.scrollLeft&&(e=this.document.scrollingElement.scrollLeft),t<this.document.scrollingElement.scrollTop&&(t=this.document.scrollingElement.scrollTop),this.containerViewChild.nativeElement.style.left=e+"px",this.containerViewChild.nativeElement.style.top=t+"px"}searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,o=!1;return this.focusedItemInfo().index!==-1?(i=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(u=>this.isItemMatched(u)),i=i===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(u=>this.isItemMatched(u)):i+this.focusedItemInfo().index):i=this.visibleItems.findIndex(u=>this.isItemMatched(u)),i!==-1&&(o=!0),i===-1&&this.focusedItemInfo().index===-1&&(i=this.findFirstFocusedItemIndex()),i!==-1&&this.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}findVisibleItem(e){return ne(this.visibleItems)?this.visibleItems[e]:null}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return ht(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let t=e>0?ht(this.visibleItems.slice(0,e),i=>this.isValidItem(i)):-1;return t>-1?t:e}findNextItemIndex(e){let t=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(i=>this.isValidItem(i)):-1;return t>-1?t+e+1:e}findFirstFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e}findFirstItemIndex(){return this.visibleItems.findIndex(e=>this.isValidItem(e))}findSelectedItemIndex(){return this.visibleItems.findIndex(e=>this.isValidSelectedItem(e))}changeFocusedItemIndex(e,t){let i=this.findVisibleItem(t),o=this.focusedItemInfo();o.index!==t&&(this.focusedItemInfo.set(I(C({},o),{index:t,item:i.item})),this.scrollInView())}scrollInView(e=-1){let t=e!==-1?`${this.id}_${e}`:this.focusedItemId,i=We(this.rootmenu.el.nativeElement,`li[id="${t}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}bindResizeListener(){ke(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()})))}isOutsideClicked(e){return!(this.containerViewChild.nativeElement.isSameNode(e.target)||this.containerViewChild.nativeElement.contains(e.target))}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}unbindGlobalListeners(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null),this.documentTriggerListener&&(this.documentTriggerListener(),this.documentTriggerListener=null),this.resizeListener&&(this.resizeListener(),this.resizeListener=null),this.touchEndListener&&(this.touchEndListener(),this.touchEndListener=null)}unbindTriggerEventListener(){this.triggerEventListener&&(this.triggerEventListener(),this.triggerEventListener=null)}removeAppendedElements(){this.appendTo&&this.containerViewChild&&(this.appendTo==="body"?this.renderer.removeChild(this.document.body,this.containerViewChild.nativeElement):an(this.containerViewChild.nativeElement,this.appendTo))}ngOnDestroy(){this.unbindGlobalListeners(),this.unbindTriggerEventListener(),this.unbindMatchMediaListener(),this.removeAppendedElements(),super.ngOnDestroy()}static \u0275fac=function(t){return new(t||n)(mt(cn))};static \u0275cmp=O({type:n,selectors:[["p-contextMenu"],["p-contextmenu"],["p-context-menu"]],contentQueries:function(t,i,o){if(t&1&&(ze(o,yo,4),ze(o,bo,4),ze(o,Te,4)),t&2){let u;H(u=G())&&(i.itemTemplate=u.first),H(u=G())&&(i.submenuIconTemplate=u.first),H(u=G())&&(i.templates=u)}},viewQuery:function(t,i){if(t&1&&(pe(vo,5),pe(So,5)),t&2){let o;H(o=G())&&(i.rootmenu=o.first),H(o=G())&&(i.containerViewChild=o.first)}},inputs:{model:"model",triggerEvent:"triggerEvent",target:"target",global:[2,"global","global",ue],style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:[2,"autoZIndex","autoZIndex",ue],baseZIndex:[2,"baseZIndex","baseZIndex",xe],id:"id",breakpoint:"breakpoint",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",pressDelay:[2,"pressDelay","pressDelay",xe]},outputs:{onShow:"onShow",onHide:"onHide"},features:[he([zn]),Pe],decls:1,vars:1,consts:[["container",""],["rootmenu",""],[3,"ngClass","class","ngStyle",4,"ngIf"],[3,"ngClass","ngStyle"],[3,"itemClick","menuFocus","menuBlur","menuKeydown","itemMouseEnter","root","items","itemTemplate","menuId","tabindex","ariaLabel","ariaLabelledBy","baseZIndex","autoZIndex","visible","focusedItemId","activeItemPath"]],template:function(t,i){t&1&&d(0,Ao,4,23,"div",2),t&2&&l("ngIf",i.visible())},dependencies:[N,Q,R,pt,Mo,V,fe,yt,Ne],encapsulation:2,data:{animation:[ut("overlayAnimation",[Fe(":enter",[Oe({opacity:0}),dt("250ms")]),Fe(":leave",[dt(".1s linear",Oe({opacity:0}))])])]},changeDetection:0})}return n})(),Gn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=Bt({type:n});static \u0275inj=Dt({imports:[ct,Ne,Ne]})}return n})();var Oo=["editInput"],Fo=["tree"],No=["class","page"],Vo=()=>({height:"calc(100vh - 70px)"});function Lo(n,s){n&1&&(a(0,"a",6),h(1,"i",7),p(2," Add"),r())}function Do(n,s){if(n&1){let e=T();a(0,"input",14,4),Ue("ngModelChange",function(i){let o=_(e).$implicit;return Ge(o.label,i)||(o.label=i),g(i)}),v("keydown",function(i){_(e);let o=c(2);return g(o.handleEditKeydown(i))})("blur",function(i){_(e);let o=c(2);return g(o.onNodeEditBlur(i))}),r()}if(n&2){let e=s.$implicit;He("ngModel",e.label)}}function Ro(n,s){if(n&1){let e=T();a(0,"div",8)(1,"div",9)(2,"p-panel",10)(3,"p-tree",11,2),v("onNodeContextMenuSelect",function(i){_(e);let o=c();return g(o.onNodeContextMenuSelect(i))})("onNodeSelect",function(i){_(e);let o=c();return g(o.onNodeSelect(i))})("onNodeUnselect",function(i){_(e);let o=c();return g(o.onNodeUnselect(i))})("onNodeDrop",function(i){_(e);let o=c();return g(o.onNodeDrop(i))}),d(5,Do,2,1,"ng-template",12),r(),h(6,"p-contextmenu",13,3),r()()()}if(n&2){let e=X(7),t=c();m(2),le(F(14,Vo)),l("showHeader",!1),m(),l("virtualScroll",!0)("virtualScrollItemSize",40)("scrollHeight","calc(100vh - 110px)")("value",t.categoryTree())("contextMenu",e)("selection",t.selectedCategory)("draggableNodes",!0)("droppableNodes",!0)("propagateSelectionUp",!1)("propagateSelectionDown",!1),m(3),l("model",t.contextMenuItems())}}var Un=(()=>{class n{constructor(){this._coaTypesService=x(se),this._router=x(ee),this.contextMenuItems=b([]),this.categoryTree=b([]),this.selectedCategory=null,this._shouldAutoFocus=b(!1)}ngOnInit(){this._loadCategories().subscribe(),this._initializeContextMenuItems(),this.expandAllNodes()}ngAfterViewChecked(){this.selectedCategory&&!this._shouldAutoFocus()&&this.editInputRef&&(this.editInputRef.nativeElement.focus(),this.editInputRef.nativeElement.select(),this._shouldAutoFocus.set(!0))}_loadCategories(){return this._coaTypesService.fetchCOACategories().pipe(E("COA Categories"),S(e=>{this.categoryTree.set(e),this.expandAllNodes()}))}_assignTreeIcons(e){return e.map(t=>{let i=!!t.children?.length;return I(C({},t),{icon:void 0,expandedIcon:i?"fa-solid fa-folder-open":void 0,collapsedIcon:i?"fa-solid fa-folder":"fa-solid fa-file",children:i?this._assignTreeIcons(t.children):[]})})}_initializeContextMenuItems(){this.contextMenuItems.set([{label:"Add",icon:"fa-light fa-plus",disabled:!1,command:()=>this._createChildCategory()},{label:"Edit",icon:"fa-light fa-pen-to-square",disabled:!1,command:()=>this._setSelectedNodeToEditMode()},{label:"Delete",icon:"fa-light fa-trash",disabled:!1,command:()=>this._deleteSelectedCategory()},{label:"Properties",icon:"fa-light fa-file",disabled:!1,command:()=>{this._router.navigate(["/pages/chart-of-account/coa-types/info"],{queryParams:{ID:this.selectedCategory?.key}})}}])}_findNodeByKey(e){return this.treeComponent.getNodeWithKey(e,this.categoryTree())??null}_setSelectedNodeToEditMode(){let e=this._findNodeByKey(this.selectedCategory?.key);e&&(this.selectedCategory=e,e.type="edit")}_createChildCategory(){this.selectedCategory?.parent?.key&&this._coaTypesService.submitCategory({Name:"New Child Node",ParentID:this.selectedCategory.key,Code:"",Note:""}).pipe(D(e=>this._loadCategories().pipe(z(()=>e))),S(e=>{let t=this._findNodeByKey(e.id);t&&(this.selectedCategory=t,this._shouldAutoFocus.set(!1),t.type="edit")}),E("Created COA Node")).subscribe()}_deleteSelectedCategory(){this.selectedCategory?.key&&this._coaTypesService.deleteCategory(this.selectedCategory.key).pipe(D(()=>this._loadCategories())).subscribe()}renameNode(e,t=this.selectedCategory){this._coaTypesService.renameCategory(t.key,{Name:e}).pipe(D(()=>this._loadCategories())).subscribe()}onNodeSelect(e){this.selectedCategory=e.node,this._shouldAutoFocus.set(!1),e.node.children?.length&&(e.node.icon="fa-solid fa-folder-open")}onNodeUnselect(e){e.node.children?.length&&(e.node.icon="fa-solid fa-folder")}onNodeContextMenuSelect(e){this.selectedCategory=e.node;let t=["Asset","Liability","Equity","Revenue","Expense"];e.node.parent?t.includes(e.node.label)?this.contextMenuItems.set(this.contextMenuItems().map(i=>["Edit","Delete"].includes(i.label)?I(C({},i),{disabled:!0}):I(C({},i),{disabled:!1}))):this.contextMenuItems.set(this.contextMenuItems().map(i=>I(C({},i),{disabled:!1}))):this.contextMenuItems.set(this.contextMenuItems().map(i=>i.label==="Add"?I(C({},i),{disabled:!0}):I(C({},i),{disabled:!1})))}onNodeDrop(e){let{dragNode:t,dropNode:i}=e;this._coaTypesService.updateParentCategory(t.key,{ParentID:i.key}).pipe(S(()=>this._loadCategories())).subscribe()}onNodeEditBlur(e){let t=e.target;this.renameNode(t.value);let i=this._findNodeByKey(this.selectedCategory?.key);i&&delete i.type}handleEditKeydown(e){let t=e.target;if([" ","Enter"].includes(e.key)&&e.stopPropagation(),e.key==="Enter"){this.renameNode(t.value);let i=this._findNodeByKey(this.selectedCategory?.key);i&&(delete i.type,this.treeComponent.updateSerializedValue?.())}}expandAllNodes(){this.categoryTree().forEach(e=>this._expandRecursive(e,!0))}collapseAllNodes(){this.categoryTree().forEach(e=>this._expandRecursive(e,!1))}_expandRecursive(e,t){e.expanded=t,e.children?.forEach(i=>this._expandRecursive(i,t))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-coa-type",8,"page"]],viewQuery:function(t,i){if(t&1&&(pe(Oo,5),pe(Fo,5)),t&2){let o;H(o=G())&&(i.editInputRef=o.first),H(o=G())&&(i.treeComponent=o.first)}},features:[he([mn])],attrs:No,decls:5,vars:0,consts:[["actionButton",""],["content",""],["tree",""],["cm",""],["editInput",""],["pageTitle",`Chart of Accounts Category
|
|
159
|
+
`],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],[1,"row","justify-content-center"],[1,"col"],[3,"showHeader"],["selectionMode","single","draggableScope","self","droppableScope","self",3,"onNodeContextMenuSelect","onNodeSelect","onNodeUnselect","onNodeDrop","virtualScroll","virtualScrollItemSize","scrollHeight","value","contextMenu","selection","draggableNodes","droppableNodes","propagateSelectionUp","propagateSelectionDown"],["pTemplate","edit"],["appendTo","body",3,"model"],["type","text",1,"form-control",3,"ngModelChange","keydown","blur","ngModel"]],template:function(t,i){t&1&&(a(0,"app-main-panel",5),d(1,Lo,3,0,"ng-template",null,0,y)(3,Ro,8,15,"ng-template",null,1,y),r())},dependencies:[$,Fn,V,B,Gn,ct,Te,N,ve,te,U,je,K,fn,ae,re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var Bo=["class","page"],Pt=n=>({"is-invalid":n}),$o=n=>({"ng-invalid ng-dirty":n});function Ko(n,s){if(n&1){let e=T();a(0,"div",3)(1,"p-button",4),v("onClick",function(){_(e);let i=c();return g(i.goBack())}),r(),a(2,"p-button",5),v("onClick",function(){_(e);let i=c();return g(i.onSubmit())}),r()()}}function qo(n,s){n&1&&(a(0,"div",20),p(1," Name is required "),r())}function zo(n,s){n&1&&(a(0,"div",20),p(1," Code is required "),r())}function Ho(n,s){n&1&&(a(0,"div",20),p(1," Note is required "),r())}function Go(n,s){if(n&1&&(a(0,"div")(1,"span",22),p(2),r()()),n&2){let e=s.$implicit;m(2),A(e)}}function Uo(n,s){if(n&1&&(a(0,"div"),d(1,Go,3,1,"div",21),r()),n&2){let e=c(2);m(),l("ngForOf",e.getErrors("Category"))}}function Zo(n,s){if(n&1){let e=T();a(0,"p-panel")(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9)(5,"div",10)(6,"label",11),p(7,"Name"),r(),h(8,"input",12),d(9,qo,2,0,"div",13),r()(),a(10,"div",14)(11,"div",10)(12,"label",11),p(13,"Code"),r(),h(14,"input",15),d(15,zo,2,0,"div",13),r()(),a(16,"div",9)(17,"div",10)(18,"label",11),p(19,"Note"),r(),h(20,"textarea",16),d(21,Ho,2,0,"div",13),r()(),a(22,"div",9)(23,"div",17)(24,"label",11),p(25,"Category"),r(),a(26,"p-treeselect",18),v("onFocus",function(){_(e);let i=c();return g(i.loadCategories())}),r(),d(27,Uo,2,1,"div",19),r()()()()()()}if(n&2){let e=c();m(3),l("formGroup",e.form),m(5),l("ngClass",w(10,Pt,e.form.controls.Name.invalid&&(e.form.controls.Name.dirty||e.form.controls.Name.touched))),m(),l("ngIf",e.form.controls.Name.errors==null?null:e.form.controls.Name.errors.required),m(5),l("ngClass",w(12,Pt,e.form.controls.Code.invalid&&(e.form.controls.Code.dirty||e.form.controls.Code.touched))),m(),l("ngIf",e.form.controls.Code==null||e.form.controls.Code.errors==null?null:e.form.controls.Code.errors.required),m(5),l("ngClass",w(14,Pt,e.form.controls.Note.invalid&&(e.form.controls.Note.dirty||e.form.controls.Note.touched))),m(),l("ngIf",e.form.controls.Note.errors==null?null:e.form.controls.Note.errors.required),m(5),l("ngClass",w(16,$o,e.isInvalid("Category")))("options",e.categories()),m(),l("ngIf",e.isInvalid("Category"))}}var Mt=(()=>{class n extends Dn{constructor(){super(...arguments),this.categories=b([]),this.COATypeService=x(se),this.COAService=x(Z),this.info=b(null),this.route=x(J),this.router=x(ee),this.fb=x(be)}goBack(){this.router.navigate(["/pages/chart-of-account/coa-types"])}ngOnInit(){this.generateForm(),Ft([this.route.paramMap.pipe(z(e=>e.get("id")),Be(e=>!!e)),this.COATypeService.fetchCOACategories()]).pipe(E("fetchCOACategories"),D(([e,t])=>{let i=this.findNodeByKeyInArray(t,e);return this.categories.set(t),this.COATypeService.getCOACategoryByID({ID:e}).pipe(S(o=>{this.form.patchValue({Name:o.name,Code:o.code,Note:o.note,Category:i.parent}),["Asset","Liability","Equity","Revenue","Expense"].includes(o.name)&&this.form.controls.Category.disable()}))})).subscribe()}loadCategories(){this.COAService.getCachedCategoriesOptions().pipe(S(e=>this.categories.set(e))).subscribe()}generateForm(){this.form=new jt({Name:new L("",[de.required]),Code:new L("",[]),Category:new L(null,[de.required]),Note:new L("",[])})}findNodeByKeyInArray(e,t){for(let i of e){let o=this.findNodeByKey(i,t);if(o)return o}return null}findNodeByKey(e,t,i=null){if(e.key===t||e.label===t)return i&&(e.parent=i),e;if(e.children&&e.children.length>0)for(let o of e.children){let u=this.findNodeByKey(o,t,e);if(u)return u}return null}onSubmit(){let{Name:e,Code:t,Note:i,Category:o}=this.form.value,u=null,f=null;if(this.form.invalid){this.form.markAllAsTouched();return}this.route.snapshot.params.id?(u=this.findNodeByKeyInArray(this.categories(),this.route.snapshot.params.id),f={Name:e,Code:t,ParentID:u&&u.parent?u.parent.key:u.key,Note:i,ID:this.route.snapshot.params.id||null}):(u=this.findNodeByKeyInArray(this.categories(),o.key),f={Name:e,Code:t,ParentID:u&&u.parent?u.parent.key:u.key,Note:i}),this.COATypeService.submitCategory(f,{observe:"response"}).pipe(E("response"),S(()=>{this.router.navigate(["/pages/chart-of-account/coa-types"])})).subscribe()}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=qe(n)))(i||n)}})()}static{this.\u0275cmp=O({type:n,selectors:[["app-coa-type-form",8,"page"]],features:[Pe],attrs:Bo,decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Category Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["label","Cancel","variant","outlined","severity","secondary",3,"onClick"],["label","Submit",3,"onClick"],[1,"row","justify-content-center"],[1,"col"],[1,"row","row-gap-2",3,"formGroup"],[1,"ol-12","col-md-6","col-lg-6"],[1,"form-group","has-validation"],["for",""],["formControlName","Name",1,"form-control",3,"ngClass"],["id","validationServer03Feedback","class","invalid-feedback",4,"ngIf"],[1,"col-12","col-md-6","col-lg-6"],["formControlName","Code",1,"form-control",3,"ngClass"],["formControlName","Note","placeholder","Enter a description for this COA category","id","floatingTextarea2",1,"form-control",2,"height","100px",3,"ngClass"],[1,"form-group","has-validation","d-flex","flex-column"],["showClear","","placeholder","Select a Category","formControlName","Category",1,"ng-invalid","ng-dirty",3,"onFocus","ngClass","options"],[4,"ngIf"],["id","validationServer03Feedback",1,"invalid-feedback"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(t,i){t&1&&(a(0,"app-main-panel",2),d(1,Ko,3,0,"ng-template",null,0,y)(3,Zo,28,18,"ng-template",null,1,y),r()),t&2&&l("hasMainWrapperPadding",!0)},dependencies:[$,V,Ae,we,Se,te,U,Ce,Ie,ye,N,Q,Ze,R,K,oe,ie,ae,re],styles:["[_nghost-%COMP%]{display:block} .p-treeselect{width:100%}"],changeDetection:0})}}return n})();var jo=n=>[n];function Qo(n,s){if(n&1&&(a(0,"a",4),h(1,"i",5),a(2,"span"),p(3,"Edit"),r()()),n&2){let e=c(2);l("routerLink",w(1,jo,"/pages/chart-of-account/coa-types/"+e.info().id+"/edit"))}}function Wo(n,s){if(n&1&&(a(0,"div",6)(1,"div",7)(2,"p-card")(3,"div",8)(4,"div",9)(5,"div",10),p(6,"Name"),r(),a(7,"div",11),p(8),r()(),a(9,"div",9)(10,"div",10),p(11,"Code"),r(),a(12,"div",11),p(13),r()(),a(14,"div",9)(15,"div",10),p(16,"Category"),r(),a(17,"div",11),p(18),r()(),a(19,"div",9)(20,"div",10),p(21,"Note"),r(),a(22,"div",11),h(23,"div",12),r()()()()()()),n&2){let e=c(2);m(8),A(e.info().name),m(5),A(e.info().code),m(5),A(e.info().parentName),m(5),l("innerHTML",e.info().note,Ee)}}function Yo(n,s){n&1&&(ce(0),a(1,"app-main-panel",3),d(2,Qo,4,3,"ng-template",null,0,y)(4,Wo,24,4,"ng-template",null,1,y),r(),me())}var Zn=(()=>{class n{constructor(){this.COATypeService=x(se),this.route=x(J),this.info=b(null)}ngOnInit(){this.route.queryParamMap.pipe(z(e=>e.get("ID")),D(e=>this.COATypeService.getCOACategoryByID({ID:e})),E("getCOACategoryByID"),S(e=>this.info.set(e))).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-coa-type-info"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],[4,"ngIf"],["pageTitle",`Type of Account Info
|
|
160
|
+
`],["type","button",1,"p-button","p-button-success",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],[1,"row","justify-content-center","mt-3"],[1,"col-12","col-lg-8"],[1,"d-flex","flex-column","gap-3"],[1,"d-flex"],[1,"col-3"],[1,"col"],[3,"innerHTML"]],template:function(t,i){t&1&&d(0,Yo,6,0,"ng-container",2),t&2&&l("ngIf",i.info())},dependencies:[N,R,$,K,tt,V,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var rl=[{path:"",redirectTo:"account",pathMatch:"full"},{path:"",children:[{path:"account",component:$n},{path:"account/add",component:Et},{path:"account/import",loadComponent:()=>import("./chunk-AZWJMXL6.js").then(n=>n.CoaImportComponent)},{path:"account/:id",component:Rn},{path:"account/:id/edit",component:Et},{path:"coa-types",component:Un},{path:"coa-types/add",component:Mt},{path:"coa-types/info",component:Zn},{path:"coa-types/:id/edit",component:Mt}]}],Kn={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[{path:"account",title:"Ticket List",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[]},{path:"coa-types",title:"Ticket Details",iconName:"solar:stop-circle-line-duotone",class:"",label:"",labelClass:"",extralink:!1,submenu:[]}]};export{rl as CHART_OF_ACCOUNT_ROUTES,Kn as CHART_OF_ACCOUNT_ROUTE_PAGE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-K4ALA724.js";import"./chunk-R6NK3ROE.js";import"./chunk-TDMJ2M6W.js";import{E as n}from"./chunk-DAQCANBV.js";import"./chunk-F2X3VGZZ.js";import{ha as o}from"./chunk-WCXWWANV.js";import"./chunk-YQFG5XE2.js";var i=(t,a)=>{let e=o(r),p=o(n);return e.isAuthenticated()&&!e.isTokenExpired()?(console.warn("User is already authenticated, redirecting to dashboard",t,a),p.navigate(["/pages/dashboard"]),!1):!0};var s=[{path:"",canActivate:[i],loadComponent:()=>import("./chunk-CLVUILX2.js").then(t=>t.LoginComponent)},{path:"404",loadComponent:()=>import("./chunk-BPFL7VRT.js").then(t=>t.NotfoundComponent)},{path:"signup",loadComponent:()=>import("./chunk-TLLNQB5C.js").then(t=>t.SignupComponent)},{path:"504",loadComponent:()=>import("./chunk-7ET5CSOO.js").then(t=>t.TimeoutComponent)}];export{s as AuthenticationRoutes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-RSGEQTNJ.js";import{a as Te,b as Fe}from"./chunk-CZWWMQFD.js";import{d as ne,e as qe,i as we,j as Me,k as oe}from"./chunk-CEZEYAWZ.js";import"./chunk-YVGWGEPX.js";import"./chunk-PDNXU4MC.js";import{a as Ae}from"./chunk-C3N6HRIE.js";import{a as ee,b as pe}from"./chunk-W4KTL6Y6.js";import"./chunk-RNOSD5RO.js";import{a as K,b as J}from"./chunk-HFUW7PYZ.js";import"./chunk-WWWY3VE7.js";import"./chunk-35ER6BC7.js";import"./chunk-V4IY7RIP.js";import"./chunk-J6H5UCJR.js";import"./chunk-U75O34AW.js";import"./chunk-3RM5CDGW.js";import{a as Ee,b as Y}from"./chunk-7IPVVF6Y.js";import{h as M}from"./chunk-RYHNURUZ.js";import"./chunk-BX74ZLQG.js";import{a as z,b as U}from"./chunk-CNLYDNON.js";import{a as te,b as ye,c as Pe,d as be,e as Oe,f as Ie,g as Je}from"./chunk-FTI2QPWV.js";import"./chunk-BDJHC5O6.js";import{o as Ke,w as B,x as V}from"./chunk-LMI4DLB5.js";import"./chunk-W6LBFCQQ.js";import{e as H,f as _e,j as re,k as ge,l as xe,m as he,n as Ye,o as Ce,v as Se,x as Z,y as ve}from"./chunk-3GHEXAAZ.js";import{a as fe}from"./chunk-R6NK3ROE.js";import"./chunk-TDMJ2M6W.js";import{C as ae,E as ze,F as G,M as k,f as L,j as He,m as w}from"./chunk-DAQCANBV.js";import"./chunk-F2X3VGZZ.js";import{Ac as ie,Cb as _,Ga as R,Jc as Ue,Kb as s,Kc as je,Mc as u,Nb as F,Pb as $e,Qb as P,Sb as b,Tb as O,Ub as a,Vb as i,Wb as $,X as j,Yc as X,Z as D,_b as v,ba as ue,bb as Ve,c as se,dc as y,ec as c,gb as p,ha as h,pa as C,qa as S,qc as m,rc as d,s as Q,sc as I,uc as We,wb as T,yc as de,zc as E}from"./chunk-WCXWWANV.js";import{a as f,b as x}from"./chunk-YQFG5XE2.js";var A=(()=>{class t{constructor(){this.httpService=h(fe)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(e){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration",{params:e})}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(e){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration",{params:e})}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ue({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var N=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(N||{});var it={[N.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"}],[N.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[N.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[N.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[N.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:27,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[N.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[N.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[N.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[N.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function gt(t,r){if(t&1){let e=v();a(0,"div",5)(1,"p-button",6),y("onClick",function(){C(e);let o=c();return S(o.onSubmit())}),i()()}}function xt(t,r){if(t&1&&(a(0,"p-tab",10),m(1),i()),t&2){let e=r.$implicit;s("value",e.value),p(),d(e.label)}}function ht(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),i()(),a(4,"div")(5,"span"),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function Ct(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),i()(),a(4,"div")(5,"span"),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function St(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),i(),a(5,"span",17),m(6),i()(),a(7,"p-select",18),_(8,ht,7,2,"ng-template",null,2,u)(10,Ct,7,2,"ng-template",null,3,u),i()()()),t&2){let e=r.$implicit,n=c(4);s("formGroupName",e.index),p(4),d(e.entry.value.label),p(2),d(e.entry.value.side),p(),s("options",n.posIntegration().options.accounts)}}function vt(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),i()(),a(4,"div")(5,"span"),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function yt(t,r){if(t&1&&(a(0,"div",19)(1,"div")(2,"span"),m(3),i()(),a(4,"div")(5,"span"),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function Pt(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),i(),a(5,"span",20),m(6),i()(),a(7,"p-select",18),_(8,vt,7,2,"ng-template",null,2,u)(10,yt,7,2,"ng-template",null,3,u),i()()()),t&2){let e=r.$implicit,n=c(4);s("formGroupName",e.index),p(4),d(e.entry.value.label),p(2),d(e.entry.value.side),p(),s("options",n.posIntegration().options.accounts)}}function bt(t,r){if(t&1&&(a(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),b(4,St,12,4,"div",14,P),i()(),a(6,"div",12)(7,"div",13),b(8,Pt,12,4,"div",14,P),i()()()()),t&2){let e=r.$implicit,n=c(3);s("value",e.value),p(),s("formGroupName",e.value),p(3),O(n.getDebitEntries(e.value)),p(4),O(n.getCreditEntries(e.value))}}function Ot(t,r){if(t&1){let e=v();a(0,"form",8),y("ngSubmit",function(){C(e);let o=c(2);return S(o.onSubmit())}),a(1,"p-tabs",9)(2,"p-tablist"),b(3,xt,2,2,"p-tab",10,P),i(),a(5,"p-tabpanels"),b(6,bt,10,2,"p-tabpanel",10,P),i()()()}if(t&2){let e=c(2);s("formGroup",e.accountForm),p(),s("value",e.tab())("lazy",!0),p(2),O(e.tabs()),p(3),O(e.tabs())}}function It(t,r){if(t&1&&_(0,Ot,8,3,"form",7),t&2){let e=c();s("ngIf",e.posIntegration()&&e.accountForm)}}var at=(()=>{class t{constructor(){this.posConfigService=h(A),this.fb=h(Se),this.tab=R(N.POSGLOBAL_SELL),this.tabs=R(Object.values(N).map(e=>({label:e,value:e}))),this.posIntegration=R(null),this.form=R([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=N}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(D(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let o=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,o),e[n.value]=this.fb.array(o.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){let n=this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]});return n.get("accountID").valueChanges.subscribe(o=>{this.syncAccountIDs(e.typeID,o,n)}),n}getAccountIDByTypeID(e){return this.form().find(o=>o.typeID===e)?.accountID||""}getEntriesForTab(e){return it[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],o=new Set;for(let l of Object.values(e))for(let{typeID:g,accountID:W}of l){let Be=`${g}_${W}`;o.has(Be)||(o.add(Be),n.push({typeID:g,accountID:W||Qe}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,o){Object.values(this.accountForm.controls).forEach(l=>{l.controls.forEach(g=>{g!==o&&g.get("typeID")?.value===e&&g.get("accountID")?.value!==n&&g.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,gt,2,0,"ng-template",null,0,u)(3,It,1,1,"ng-template",null,1,u),i())},dependencies:[M,ot,nt,tt,et,Xe,Ze,Ke,J,K,Z,ge,H,_e,w,L,k,V,B,ve,xe,Ce,he],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Et=t=>[t];function Tt(t,r){if(t&1&&(a(0,"th",7),m(1),i()),t&2){let e=r.$implicit;p(),d(e.name.slice(0,10))}}function Ft(t,r){if(t&1&&(a(0,"tr")(1,"th",6),m(2,"Method"),i()(),a(3,"tr"),b(4,Tt,2,1,"th",7,P),i()),t&2){let e=c(3);p(4),O(e.paymentConfiguration().outlets)}}function wt(t,r){if(t&1&&(a(0,"td"),m(1),i()),t&2){let e=r.$implicit;p(),d(e.accountName)}}function Mt(t,r){if(t&1&&(a(0,"tr")(1,"td",8)(2,"a",9),m(3),i()(),b(4,wt,2,1,"td",null,P),i()),t&2){let e=r.$implicit;p(2),s("routerLink",ie(2,Et,e.id)),p(),d(e.name),p(),O(e.accounts)}}function Dt(t,r){if(t&1&&(a(0,"p-table",5),_(1,Ft,6,0,"ng-template",null,1,u)(3,Mt,6,4,"ng-template",null,2,u),i()),t&2){let e=c(2);s("scrollable",!0)("scrollHeight","calc(100vh - 70px)")("value",e.paymentConfiguration().payment)}}function Rt(t,r){if(t&1){let e=v();a(0,"app-main-panel",4),y("search",function(o){C(e);let l=c();return S(l.onSearch(o))}),_(1,Dt,5,3,"ng-template",null,0,u),i()}t&2&&s("isSearchableInput",!0)}var rt=(()=>{class t{constructor(){this.POSSetupService=h(A),this.paymentConfiguration=R(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(D(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(D(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput"],[3,"scrollable","scrollHeight","value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&_(0,Rt,3,1,"app-main-panel",3),n&2&&s("ngIf",o.paymentConfiguration())},dependencies:[M,oe,ne,qe,w,L,k,G],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var kt={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Le=ye(Ie(kt),Pe(t=>({first:X(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:X(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount))})),Oe(t=>{let r=h(A);return{updateFilter:n=>{te(t,o=>x(f({},o),{filter:f(f({},o.filter),n)}))},getPOSOutlets:Te(se(j(n=>r.fetchPOSOutletConfiguration(n).pipe(Fe({next:o=>{te(t,l=>x(f({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),be(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var At=()=>({height:"calc(100vh - 70px)"}),Nt=t=>[t];function Lt(t,r){if(t&1&&(a(0,"th"),m(1),i()),t&2){let e=r.$implicit;p(),d(e.value)}}function Gt(t,r){if(t&1&&(a(0,"tr")(1,"th"),m(2,"Name"),i(),b(3,Lt,2,1,"th",null,P),i()),t&2){let e=c(2);p(3),O(e.store.data().listCOAType)}}function Bt(t,r){if(t&1&&(a(0,"td"),m(1),i()),t&2){let e=r.$implicit;p(),d(e)}}function Vt(t,r){if(t&1&&(a(0,"tr")(1,"td")(2,"a",7),m(3),i()(),b(4,Bt,2,1,"td",null,P),i()),t&2){let e=r.$implicit;p(2),s("routerLink",ie(2,Nt,e.OutletID)),p(),I(" ",e.OutletName,""),p(),O(e.Accounts)}}function $t(t,r){if(t&1&&m(0),t&2){let e=c(2);We(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Wt(t,r){t&1&&(a(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),i()()())}function Ut(t,r){if(t&1){let e=v();a(0,"p-panel")(1,"p-table",6),y("onPage",function(o){C(e);let l=c();return S(l.onPage(o))}),_(2,Gt,5,0,"ng-template",null,1,u)(4,Vt,6,4,"ng-template",null,2,u)(6,$t,1,3,"ng-template",null,3,u)(8,Wt,4,0,"ng-template",null,4,u),i()()}if(t&2){let e=c();F(E(11,At)),p(),s("scrollable",!0)("scrollHeight","calc(100vh - 100px)")("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("scrollable",!0)("scrollHeight","calc(100vh - 142px)")("totalRecords",e.store.data().totalCount)}}var pt=(()=>{class t{constructor(){this.store=h(Le)}onSearch(e){this.store.updateFilter({PageNumber:1,PageSize:20,Search:e})}onPage(e){let n=e.first/e.rows+1;this.store.updateFilter(x(f({},this.store.filter()),{PageSize:e.rows,PageNumber:n}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet"]],features:[de([Le])],decls:3,vars:1,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","scrollable","scrollHeight","value","paginator","rows","lazy","totalRecords"],[1,"link","link-primary",3,"routerLink"],["colspan","8"]],template:function(n,o){if(n&1){let l=v();a(0,"app-main-panel",5),y("search",function(W){return C(l),S(o.onSearch(W))}),_(1,Ut,10,12,"ng-template",null,0,u),i()}n&2&&s("isSearchableInput",!0)},dependencies:[M,w,Y,oe,ne,k,G,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var jt=()=>({height:"calc(100vh - 100px)"}),Ht=()=>({height:"calc(100vh - 150px)"});function zt(t,r){if(t&1){let e=v();a(0,"a",5),m(1,"Cancel"),i(),a(2,"p-button",6),y("onClick",function(){C(e);let o=c();return S(o.updatePOsOutletConfiguration())}),i()}}function Yt(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),i()(),a(4,"div",17)(5,"span",17),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function Kt(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),i()(),a(4,"div",18)(5,"span",17),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function Jt(t,r){if(t&1&&(a(0,"div",12)(1,"span",14),m(2),i(),a(3,"p-select",15),_(4,Yt,7,2,"ng-template",null,2,u)(6,Kt,7,2,"ng-template",null,3,u),i()()),t&2){let e,n=r.$implicit,o=r.$index,l=c(3);s("formGroupName",o),p(2),d((e=n.get("TypeName"))==null?null:e.value),p(),s("options",l.options.accounts)}}function qt(t,r){t&1&&$(0,"hr")}function Qt(t,r){if(t&1&&(a(0,"div",9)(1,"h3",10),m(2),Ue(3,"titlecase"),i(),a(4,"div",11),b(5,Jt,8,3,"div",12,P),i()(),_(7,qt,1,0,"hr",13)),t&2){let e,n=r.$implicit,o=r.$index,l=r.$index,g=r.$count,W=c(2);s("formGroupName",o),p(2),I(" ",je(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(W.getAccountsFormArray(l).controls),p(2),s("ngIf",l!==g-1)}}function Xt(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),b(4,Qt,8,5,null,null,P),i()()()()),t&2){let e=c();F(E(5,jt)),p(),F(E(6,Ht)),p(),s("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var lt=(()=>{class t{constructor(){this.route=h(ae),this.POSSetupService=h(A),this.outletForm=R(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.fb=h(Se)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(Q(e=>e.get("id")),j(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),D(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(o=>{o.accounts=this.allAccounts.filter(l=>o.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(o=>{n.push(this.createAccountGroupControl(o))})})).subscribe()}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(o=>o.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/pages/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["formControlName","AccountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,zt,3,0,"ng-template",null,0,u)(3,Xt,6,7,"ng-template",null,1,u),i()),n&2&&s("pageTitle","Edit "+o.outletName)("hasMainWrapperPadding",!0)},dependencies:[M,w,L,He,Y,ve,ge,H,_e,xe,Ce,he,Ye,J,K,U,z,ee,V,B,k,G],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var en=()=>({height:"calc(100vh - 100px)"}),tn=()=>({width:"100%",height:"calc(100vh - 150px)"}),nn=()=>({width:"100%"});function on(t,r){if(t&1){let e=v();a(0,"a",6),m(1,"Cancel"),i(),a(2,"p-button",7),y("onClick",function(){C(e);let o=c(3);return S(o.updatePOSOutletConfiguration())}),i()}}function an(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),i()(),a(4,"div",17)(5,"span",17),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function rn(t,r){if(t&1&&(a(0,"div",16)(1,"div",17)(2,"span"),m(3),i()(),a(4,"div",18)(5,"span",17),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function pn(t,r){if(t&1){let e=v();a(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),i()(),$(5,"div",13),a(6,"div",14)(7,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,g=c(4);return S(g.updateAccountById(o,l))}),_(8,an,7,2,"ng-template",null,2,u)(10,rn,7,2,"ng-template",null,3,u),i()()()()}if(t&2){let e=r.$implicit,n=r.$index,o=c(4);p(4),d(e.outletName.slice(0,15)),p(3),F(E(7,nn)),s("ngModel",o.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.paymentForm().options.chartOfAccount)}}function ln(t,r){if(t&1&&(a(0,"p-card")(1,"p-scrollpanel")(2,"div",8),b(3,pn,12,8,"div",9,P),i()()()),t&2){let e=c(3);F(E(4,en)),p(),F(E(5,tn)),p(2),O(e.paymentForm().form.accounts)}}function mn(t,r){if(t&1&&(a(0,"app-main-panel",4),_(1,on,3,0,"ng-template",null,0,u)(3,ln,5,6,"ng-template",null,1,u),i()),t&2){let e=c(2);s("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function cn(t,r){if(t&1&&_(0,mn,5,2,"app-main-panel",5),t&2){let e=c();s("ngIf",e.paymentForm())}}var ct=(()=>{class t{constructor(){this.route=h(ae),this.POSSetupService=h(A),this.paymentForm=R(null),this.router=h(ze)}ngOnInit(){this.route.paramMap.pipe(Q(e=>+e.get("id")),j(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),D(e=>{this.paymentForm.set(e)}),Ae("response")).subscribe()}updateAccountById(e,n){let o=this.paymentForm().form.accounts,l=x(f({},this.paymentForm()),{form:x(f({},this.paymentForm().form),{accounts:o.map((g,W)=>W===n?x(f({},g),{accountID:e}):g)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Ae("response"),D(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],["routerLink","/pages/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-3"],[1,"col-7"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","virtualScroll","virtualScrollItemSize","options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&_(0,cn,1,1,"app-main-panel",4),n&2&&$e(o.paymentForm()?0:-1)},dependencies:[Y,Ee,M,w,L,pe,ee,J,K,Z,H,re,k,G,V,B,U],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var sn=()=>({height:"calc(100vh - 70px)"}),un=()=>({width:"100%",height:"calc(100vh - 100px)"});function dn(t,r){if(t&1){let e=v();a(0,"div",5)(1,"a",6),m(2,"Cancel"),i(),a(3,"p-button",7),y("onClick",function(){C(e);let o=c();return S(o.updatePOSTaxConfiguration())}),i()()}}function fn(t,r){if(t&1&&(a(0,"div",5)(1,"div",15)(2,"span"),m(3),i()(),a(4,"div",15)(5,"span",15),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function _n(t,r){if(t&1&&(a(0,"div",5)(1,"div",15)(2,"span"),m(3),i()(),a(4,"div",16)(5,"span",15),m(6),i()()()),t&2){let e=r.$implicit;p(3),I("(",e.code,")"),p(3),d(e.name)}}function gn(t,r){if(t&1){let e=v();a(0,"div",11)(1,"div",12)(2,"label",13),m(3),i(),a(4,"p-select",14),y("ngModelChange",function(o){let l=C(e).$index,g=c(2);return S(g.updateAccountID(o,l))}),_(5,fn,7,2,"ng-template",null,2,u)(7,_n,7,2,"ng-template",null,3,u),i()()()}if(t&2){let e=r.$implicit,n=r.$index,o=c(2);p(3),d(e.name),p(),s("options",o.taxForm().options.chartOfAccount)("ngModel",o.taxForm().form[n].accountID)}}function xn(t,r){if(t&1&&(a(0,"p-panel")(1,"p-scroll-panel")(2,"div",8)(3,"div",9)(4,"div",10),b(5,gn,9,3,"div",11,P),i()()()()()),t&2){let e=c();F(E(4,sn)),p(),F(E(5,un)),p(4),O(e.taxForm().form)}}var st=(()=>{class t{constructor(){this.POSSetupService=h(A),this.taxForm=R(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(D(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=x(f({},this.taxForm()),{form:o.map((g,W)=>W===n?x(f({},g),{accountID:e}):g)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(D(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an Account",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,dn,4,0,"ng-template",null,0,u)(3,xn,7,6,"ng-template",null,1,u),i())},dependencies:[M,Y,w,J,K,pe,ee,Z,H,re,k,G,V,B,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var hn=()=>({height:"calc(100vh - 70px)"}),Cn=()=>({"min-width":"50rem"}),Sn=t=>[t];function vn(t,r){t&1&&$(0,"p-button",6)}function yn(t,r){if(t&1&&_(0,vn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.hasCheckedItems())}}function Pn(t,r){t&1&&(a(0,"tr")(1,"th",9),$(2,"p-tableHeaderCheckbox"),i(),a(3,"th"),m(4,"Name"),i(),a(5,"th"),m(6,"Description"),i()())}function bn(t,r){if(t&1&&(a(0,"tr")(1,"td"),$(2,"p-tableCheckbox",10),i(),a(3,"td")(4,"a",11),m(5),i()(),a(6,"td"),m(7),i()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),s("routerLink",ie(4,Sn,e.id)),p(),d(e.name),p(2),d(e.description)}}function On(t,r){if(t&1){let e=v();a(0,"p-panel")(1,"p-table",8),y("onRowSelect",function(o){C(e);let l=c(2);return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=c(2);return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=c(2);return S(l.onSelectAll(o))}),_(2,Pn,7,0,"ng-template",null,2,u)(4,bn,8,6,"ng-template",null,3,u),i()()}if(t&2){let e=c(2);F(E(4,hn)),p(),s("value",e.writeoffList().data)("tableStyle",E(5,Cn))}}function In(t,r){if(t&1&&_(0,On,6,6,"p-panel",7),t&2){let e=c();s("ngIf",e.writeoffList())}}var ut=(()=>{class t{constructor(){this.POSSetupService=h(A),this.writeoffList=R(null),this.hasCheckedItems=X(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(Q(e=>x(f({},e),{data:e.data.map(n=>x(f({},n),{checked:!1}))})),D(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let o=n.data.findIndex(l=>l.id===e.data.id);if(o!==-1){let l=[...n.data];l[o]=x(f({},l[o]),{checked:!l[o].checked}),this.writeoffList.set(x(f({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let o=n.data.map(l=>x(f({},l),{checked:e.checked}));this.writeoffList.set(x(f({},n),{data:o}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],[3,"style",4,"ngIf"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","4rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,yn,1,1,"ng-template",null,0,u)(3,In,1,1,"ng-template",null,1,u),i())},dependencies:[M,w,L,oe,ne,we,Me,k,G,V,B,U,z],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var En=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Tn(t,r){if(t&1){let e=v();a(0,"div",6)(1,"a",7),m(2,"Cancel"),i(),a(3,"p-button",8),y("onClick",function(){C(e);let o=c(2);return S(o.updateWriteOffConfiguration())}),i()()}}function Fn(t,r){if(t&1&&(a(0,"div",6)(1,"span",16),m(2),i(),a(3,"span",16),m(4),i()()),t&2){let e=r.$implicit;p(2),I("(",e.code,")"),p(2),d(e.name)}}function wn(t,r){if(t&1&&(a(0,"div",6)(1,"span",16),m(2),i(),a(3,"span",16),m(4),i()()),t&2){let e=r.$implicit;p(2),I("(",e.code,")"),p(2),d(e.name)}}function Mn(t,r){if(t&1){let e=v();a(0,"div",12)(1,"div",13)(2,"label",14),m(3),i(),a(4,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,g=c(3);return S(g.updateAccountById(o,l))}),_(5,Fn,5,2,"ng-template",null,2,u)(7,wn,5,2,"ng-template",null,3,u),i()()()}if(t&2){let e=r.$implicit,n=c(3);p(3),d(e.name),p(),s("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function Dn(t,r){if(t&1&&(a(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,Mn,9,5,"div",12,P),i()()()()()),t&2){let e=c(2);p(),F(E(2,En)),p(4),O(e.writeOffForm().form)}}function Rn(t,r){if(t&1&&(a(0,"app-main-panel",5),_(1,Tn,4,0,"ng-template",null,0,u)(3,Dn,7,3,"ng-template",null,1,u),i()),t&2){let e=c();s("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var dt=(()=>{class t{constructor(){this.POSSetupService=h(A),this.route=h(ae),this.writeOffForm=R(null)}ngOnInit(){this.route.paramMap.pipe(Q(e=>e.get("id")),j(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),D(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=x(f({},this.writeOffForm()),{form:o.map((g,W)=>W===n?x(f({},g),{accountID:e}):g)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pages/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,o){n&1&&_(0,Rn,5,2,"app-main-panel",4),n&2&&s("ngIf",o.writeOffForm())},dependencies:[M,w,L,Y,Ee,pe,ee,J,K,Z,H,re,k,G,V,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var ft=(()=>{class t{constructor(){this.httpService=h(fe)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=ue({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var kn={data:{expenseOptions:[]}},Ge=ye(Ie(kn),Je("POSExpenseOptionStore"),Pe(t=>({hasCheckedRows:X(()=>t.data().expenseOptions.some(r=>r.checked)),checkedInvoice:X(()=>t.data().expenseOptions.filter(r=>r.checked).map(r=>r.id))})),Oe(t=>{let r=h(ft);return{onRowSelect(n){te(t,o=>{let l=o.data.expenseOptions.map(g=>g.id===n.id?x(f({},g),{checked:!0}):g);return x(f({},o),{data:x(f({},o.data),{expenseOptions:l})})})},onRowUnselect(n){te(t,o=>{let l=o.data.expenseOptions.map(g=>g.id===n.id?x(f({},g),{checked:!1}):g);return x(f({},o),{data:x(f({},o.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){te(t,o=>{let l=o.data.expenseOptions.map(g=>x(f({},g),{checked:n}));return x(f({},o),{data:x(f({},o.data),{expenseOptions:l})})})},getExpenseOptions:Te(se(j(()=>r.getExpenseOptions().pipe(Fe({next:n=>{te(t,o=>x(f({},o),{data:x(f({},o.data),{expenseOptions:n.expenseOptions.map(l=>x(f({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),be({onInit:t=>{t.getExpenseOptions()}}));var An=()=>({height:"calc(100vh - 70px)"});function Nn(t,r){t&1&&$(0,"p-button",6)}function Ln(t,r){if(t&1&&_(0,Nn,1,0,"p-button",5),t&2){let e=c();s("ngIf",e.store.hasCheckedRows())}}function Gn(t,r){t&1&&(a(0,"tr")(1,"th",8),$(2,"p-tableHeaderCheckbox"),i(),a(3,"th"),m(4,"Name"),i(),a(5,"th"),m(6,"Account"),i(),a(7,"th"),m(8,"Description"),i()())}function Bn(t,r){if(t&1&&(a(0,"tr")(1,"td"),$(2,"p-tableCheckbox",9),i(),a(3,"td"),m(4),i(),a(5,"td"),m(6),i(),a(7,"td"),$(8,"p",10),i()()),t&2){let e=r.$implicit;p(2),s("value",e),p(2),d(e.name),p(2),d(e.accountName),p(2),s("innerHTML",e.description,Ve)}}function Vn(t,r){if(t&1){let e=v();a(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){C(e);let l=c();return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=c();return S(l.onRowUnselect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=c();return S(l.onHeaderCheckboxToggle(o))}),_(2,Gn,9,0,"ng-template",null,2,u)(4,Bn,9,4,"ng-template",null,3,u),i()()}if(t&2){let e=c();F(E(3,An)),p(),s("value",e.store.data().expenseOptions)}}var _t=(()=>{class t{constructor(){this.store=h(Ge)}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-expense-option"]],features:[de([Ge])],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Expense Option"],["label","Delete","severity","danger","icon","fa-solid fa-trash",4,"ngIf"],["label","Delete","severity","danger","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value"],[2,"width","4rem"],[3,"value"],[3,"innerHTML"]],template:function(n,o){n&1&&(a(0,"app-main-panel",4),_(1,Ln,1,1,"ng-template",null,0,u)(3,Vn,6,4,"ng-template",null,1,u),i())},dependencies:[M,oe,ne,we,Me,U,z,V,B,w,L],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ua=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:at},{path:"outlets",component:pt},{path:"outlets/:id",component:lt},{path:"payments",component:rt},{path:"payments/:id",component:ct},{path:"taxs",component:st},{path:"writeoff",component:ut},{path:"writeoff/:id",component:dt},{path:"expense-option",component:_t}]}];export{Ua as POS_SETUP_ROUTES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as p}from"./chunk-
|
|
1
|
+
import{h as p}from"./chunk-LMI4DLB5.js";import{Ab as s,Jb as l,Ob as C,Ub as c,Vb as m,Wb as d,ra as i,ta as a,wb as r}from"./chunk-WCXWWANV.js";var u=(()=>{class t extends p{static \u0275fac=(()=>{let n;return function(e){return(n||(n=a(t)))(e||t)}})();static \u0275cmp=r({type:t,selectors:[["ChevronDownIcon"]],features:[s],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(o,e){o&1&&(i(),c(0,"svg",0),d(1,"path",1),m()),o&2&&(C(e.getClassNames()),l("aria-label",e.ariaLabel)("aria-hidden",e.ariaHidden)("role",e.role))},encapsulation:2})}return t})();export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-R6NK3ROE.js";import{ba as i,ha as n}from"./chunk-WCXWWANV.js";var u=(()=>{class e{constructor(){this.httpService=n(r)}getClosingEntries(t){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAll",{params:t})}createClosingEntry(t){return this.httpService.post(void 0,"api/SetupClosingEntries/Submit",t)}deleteClosingEntry(t){return this.httpService.delete(void 0,`api/SetupClosingEntries/Delete?closingEntryIds=${t}`)}getClosingEntryCount(){return this.httpService.get(void 0,"api/SetupClosingEntries/GetAllCount")}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=i({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-LMI4DLB5.js";import{Va as $,d as b,j as m}from"./chunk-3GHEXAAZ.js";import{Ab as g,Mb as h,Vc as o,ba as l,ca as s,dc as x,ha as d,mb as r,ta as u,xb as p,yb as f,yc as v,za as c}from"./chunk-WCXWWANV.js";var M=({dt:e})=>`
|
|
2
2
|
.p-textarea {
|
|
3
3
|
font-family: inherit;
|
|
4
4
|
font-feature-settings: inherit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-R6NK3ROE.js";import{E as g}from"./chunk-DAQCANBV.js";import{Z as s,ba as l,ha as c}from"./chunk-WCXWWANV.js";var a=class extends Error{};a.prototype.name="InvalidTokenError";function u(o){return decodeURIComponent(atob(o).replace(/(.)/g,(r,t)=>{let e=t.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e}))}function p(o){let r=o.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return u(r)}catch{return atob(r)}}function T(o,r){if(typeof o!="string")throw new a("Invalid token specified: must be a string");r||(r={});let t=r.header===!0?0:1,e=o.split(".")[t];if(typeof e!="string")throw new a(`Invalid token specified: missing part #${t+1}`);let n;try{n=p(e)}catch(i){throw new a(`Invalid token specified: invalid base64 for part #${t+1} (${i.message})`)}try{return JSON.parse(n)}catch(i){throw new a(`Invalid token specified: invalid json for part #${t+1} (${i.message})`)}}var E=(()=>{class o{constructor(){this.httpService=c(m),this.router=c(g),this.autoLogout()}login(t){return this.httpService.post("","api/Authentication/login",t).pipe(s(e=>{let n=t.SubDomain;localStorage.setItem("AUTH_TOKEN",e.access_token),localStorage.setItem("AUTH_POS_TOKEN",e.pos.access_token),localStorage.setItem("AUTH_TOKEN_TYPE",e.token_type),localStorage.setItem("AUTH_EXPIRES_AT",e.expiredAt),localStorage.setItem("AUTH_DOMAIN",n.substring(n.indexOf("."))),localStorage.setItem("AUTH_SUB_DOMAIN",t.SubDomain.split(".")[0]),localStorage.setItem("AUTH_USERNAME",t.Username),this.storeTenantId(e.access_token),this.autoLogout()}))}isAuthenticated(){return!!localStorage.getItem("AUTH_TOKEN")}getToken(){return localStorage.getItem("AUTH_TOKEN")}getTokenType(){return localStorage.getItem("AUTH_TOKEN_TYPE")}isTokenExpired(){let t=localStorage.getItem("AUTH_EXPIRES_AT");return t?new Date(t).getTime()<Date.now():!0}autoLogout(){clearTimeout(this.logoutTimer);let t=localStorage.getItem("AUTH_EXPIRES_AT");if(!t)return;let e=new Date(t).getTime()-Date.now();e>0?this.logoutTimer=setTimeout(()=>this.logout(),e):this.logout()}getTenantExternalURL(){let t=localStorage.getItem("AUTH_SUB_DOMAIN")||"",e=localStorage.getItem("AUTH_DOMAIN")||"";return t&&e?`https://${t}${e}`:""}getTanantToken(){return localStorage.getItem("AUTH_POS_TOKEN")}logout(){localStorage.removeItem("AUTH_TOKEN"),localStorage.removeItem("AUTH_TOKEN_TYPE"),localStorage.removeItem("AUTH_EXPIRES_AT"),clearTimeout(this.logoutTimer),this.router.navigate([""])}getFullDomain(){let t=localStorage.getItem("AUTH_SUB_DOMAIN"),e=localStorage.getItem("AUTH_DOMAIN");return!t||!e?(console.error("Subdomain or domain is missing in local storage."),null):`${t}${e}`}storeTenantId(t){let e=T(t);e&&(localStorage.setItem("AC_TENANT",e.TID),localStorage.setItem("AC_TENANT_LID",e.LID))}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=l({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{E as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ke}from"./chunk-TQZNJ5WF.js";import{a as qe}from"./chunk-LR2DJRRL.js";import{a as $e}from"./chunk-6TA77CRR.js";import{a as se}from"./chunk-JMLETF7Y.js";import{a as Ue}from"./chunk-C5GEP4MM.js";import{c as Le,d as Pe}from"./chunk-TC43COAE.js";import{a as ze}from"./chunk-EXVUABTO.js";import{a as X,i as ye,j as Ae,l as Re,n as Qe,p as Be,r as ce,s as He}from"./chunk-YOEPO6LK.js";import{Ca as me,Ea as Me,Ma as le,Na as U,Oa as Oe,Pa as Fe,Q as he,R as Ee,S as Q,U as J,V as ke,Va as ae,_ as Ve,a as Ne,e as Ie,j as we,ra as fe,sa as De,x as _e,z as L}from"./chunk-BNI5KUDE.js";import{c as q,e as K,f as j,g as W,h as G,m as Y}from"./chunk-BYD3JK4R.js";import{Ab as H,Ac as $,Cb as d,Jb as N,Kb as a,Lb as te,Lc as k,Nb as ie,Ob as O,Pb as ue,Ub as f,Uc as y,Vb as m,Vc as z,Wb as I,Xb as S,Yb as C,Zb as w,_b as V,aa as Z,ba as ee,ca as de,dc as x,ec as s,gb as c,ha as B,ic as T,jc as E,kc as _,lc as h,mb as xe,oa as be,oc as ge,pa as u,pc as R,qa as g,qc as ne,rc as oe,ta as A,uc as ve,vc as Se,wb as P,wc as Ce,xb as pe,xc as re,za as b,zc as D}from"./chunk-YVEUYFCE.js";import{a as F}from"./chunk-YQFG5XE2.js";var Ge=t=>({height:t}),Ye=t=>({"p-tree-node-droppoint-active":t}),ot=(t,l)=>({$implicit:t,loading:l}),rt=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"}),Je=t=>({$implicit:t});function lt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverPrev)),N("aria-hidden",!0)}}function at(t,l){t&1&&I(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){t&1&&I(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function ct(t,l){if(t&1&&(S(0),d(1,at,1,1,"ChevronRightIcon",12)(2,st,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function dt(t,l){t&1&&(S(0),I(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function pt(t,l){if(t&1&&(S(0),d(1,ct,3,2,"ng-container",5)(2,dt,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ut(t,l){}function gt(t,l){t&1&&d(0,ut,0,0,"ng-template")}function _t(t,l){if(t&1&&(f(0,"span",14),d(1,gt,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",$(2,ot,e.node.expanded,e.node.loading))}}function ht(t,l){}function ft(t,l){t&1&&d(0,ht,0,0,"ng-template")}function mt(t,l){if(t&1&&d(0,ft,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$(2,rt,e.isSelected(),e.node.partialSelected))}}function yt(t,l){t&1&&(S(0),d(1,mt,1,5,"ng-template",null,0,k),C())}function Tt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,yt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function bt(t,l){if(t&1&&I(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function xt(t,l){if(t&1&&(f(0,"span"),R(1),m()),t&2){let e=s(2);c(),ne(e.node.label)}}function vt(t,l){t&1&&w(0)}function St(t,l){if(t&1&&(f(0,"span"),d(1,vt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Je,e.node))}}function Ct(t,l){if(t&1&&I(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Nt(t,l){if(t&1&&(f(0,"ul",17),d(1,Ct,1,8,"p-treeNode",18),m()),t&2){let e=s(2);te("display",e.node.expanded?"flex":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function It(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverNext)),N("aria-hidden",!0)}}function wt(t,l){if(t&1){let e=V();d(0,lt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,pt,3,2,"ng-container",5)(5,_t,2,5,"span",6),m(),d(6,Tt,2,8,"p-checkbox",7)(7,bt,1,2,"span",8),f(8,"span",9),d(9,xt,2,1,"span",5)(10,St,2,4,"span",5),m()(),d(11,Nt,2,4,"ul",10),m(),d(12,It,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ie(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ge,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),te("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var je=["filter"],Et=["node"],kt=["header"],Vt=["footer"],Dt=["loader"],Mt=["empty"],Ot=["togglericon"],Ft=["checkboxicon"],$t=["loadingicon"],Lt=["filtericon"],zt=["scroller"],Ut=["wrapper"],At=t=>({options:t});function Rt(t,l){if(t&1&&I(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&I(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function Bt(t,l){}function Pt(t,l){t&1&&d(0,Bt,0,0,"ng-template")}function Ht(t,l){if(t&1&&(f(0,"span",17),d(1,Pt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Ht,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Kt(t,l){if(t&1&&(f(0,"div",12),d(1,Rt,1,2,"i",13)(2,qt,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function jt(t,l){t&1&&w(0)}function Wt(t,l){t&1&&w(0)}function Gt(t,l){if(t&1&&d(0,Wt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Je,e.filterOptions))}}function Yt(t,l){t&1&&I(0,"SearchIcon",21)}function Jt(t,l){}function Xt(t,l){t&1&&d(0,Jt,0,0,"ng-template")}function Zt(t,l){if(t&1&&(f(0,"span"),d(1,Xt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Yt,1,0,"SearchIcon",20)(5,Zt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),a("pAutoFocus",e.filterInputAutoFocus),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ti(t,l){if(t&1&&d(0,ei,6,4,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ii(t,l){if(t&1&&I(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ni(t,l){if(t&1&&(f(0,"ul",25),d(1,ii,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ie(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function oi(t,l){if(t&1&&d(0,ni,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function ri(t,l){t&1&&w(0)}function li(t,l){if(t&1&&d(0,ri,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,At,e))}}function ai(t,l){t&1&&(S(0),d(1,li,1,4,"ng-template",null,4,k),C())}function si(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,oi,1,1,"ng-template",null,2,k)(4,ai,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ie(D(9,Ge,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function ci(t,l){if(t&1&&I(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function di(t,l){if(t&1&&(f(0,"ul",30),d(1,ci,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function pi(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,di,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),te("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function ui(t,l){if(t&1&&(S(0),d(1,si,5,11,"p-scroller",22)(2,pi,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function gi(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(2);c(),oe(" ",e.emptyMessageLabel," ")}}function _i(t,l){}function hi(t,l){t&1&&d(0,_i,0,0,"ng-template",null,6,k)}function fi(t,l){if(t&1&&(f(0,"div",33),d(1,gi,2,1,"ng-container",34)(2,hi,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function mi(t,l){t&1&&w(0)}var yi=({dt:t})=>`
|
|
1
|
+
import{a as Ke}from"./chunk-Z3SHAW6W.js";import{a as qe}from"./chunk-WWWY3VE7.js";import{a as $e}from"./chunk-V4IY7RIP.js";import{a as se}from"./chunk-J6H5UCJR.js";import{a as Ue}from"./chunk-U75O34AW.js";import{c as Le,d as Pe}from"./chunk-3RM5CDGW.js";import{a as ze}from"./chunk-BX74ZLQG.js";import{a as X,i as ye,j as Ae,l as Re,n as Qe,p as Be,r as ce,s as He}from"./chunk-LMI4DLB5.js";import{Ca as me,Ea as Me,Ma as le,Na as U,Oa as Oe,Pa as Fe,Q as he,R as Ee,S as Q,U as J,V as ke,Va as ae,_ as Ve,a as Ne,e as Ie,j as we,ra as fe,sa as De,x as _e,z as L}from"./chunk-3GHEXAAZ.js";import{c as q,e as K,f as j,g as W,h as G,m as Y}from"./chunk-DAQCANBV.js";import{Ab as H,Ac as D,Bc as $,Cb as d,Jb as N,Kb as a,Lb as te,Mc as k,Nb as ie,Ob as O,Pb as ue,Ub as f,Vb as m,Vc as y,Wb as I,Wc as z,Xb as S,Yb as C,Zb as w,_b as V,aa as Z,ba as ee,ca as de,dc as x,ec as s,gb as c,ha as B,jc as T,kc as E,lc as _,mb as xe,mc as h,oa as be,pa as u,pc as ge,qa as g,qc as R,rc as ne,sc as oe,ta as A,vc as ve,wb as P,wc as Se,xb as pe,xc as Ce,yc as re,za as b}from"./chunk-WCXWWANV.js";import{a as F}from"./chunk-YQFG5XE2.js";var Ge=t=>({height:t}),Ye=t=>({"p-tree-node-droppoint-active":t}),ot=(t,l)=>({$implicit:t,loading:l}),rt=(t,l)=>({$implicit:t,partialSelected:l,class:"p-tree-node-checkbox"}),Je=t=>({$implicit:t});function lt(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,-1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,-1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverPrev)),N("aria-hidden",!0)}}function at(t,l){t&1&&I(0,"ChevronRightIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function st(t,l){t&1&&I(0,"ChevronDownIcon",13),t&2&&a("styleClass","p-tree-node-toggle-icon")}function ct(t,l){if(t&1&&(S(0),d(1,at,1,1,"ChevronRightIcon",12)(2,st,1,1,"ChevronDownIcon",12),C()),t&2){let e=s(3);c(),a("ngIf",!e.node.expanded),c(),a("ngIf",e.node.expanded)}}function dt(t,l){t&1&&(S(0),I(1,"SpinnerIcon",13),C()),t&2&&(c(),a("styleClass","pi-spin p-tree-node-toggle-icon"))}function pt(t,l){if(t&1&&(S(0),d(1,ct,3,2,"ng-container",5)(2,dt,2,1,"ng-container",5),C()),t&2){let e=s(2);c(),a("ngIf",!e.node.loading),c(),a("ngIf",e.loadingMode==="icon"&&e.node.loading)}}function ut(t,l){}function gt(t,l){t&1&&d(0,ut,0,0,"ng-template")}function _t(t,l){if(t&1&&(f(0,"span",14),d(1,gt,1,0,null,15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate)("ngTemplateOutletContext",$(2,ot,e.node.expanded,e.node.loading))}}function ht(t,l){}function ft(t,l){t&1&&d(0,ht,0,0,"ng-template")}function mt(t,l){if(t&1&&d(0,ft,1,0,null,15),t&2){let e=s(4);a("ngTemplateOutlet",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)("ngTemplateOutletContext",$(2,rt,e.isSelected(),e.node.partialSelected))}}function yt(t,l){t&1&&(S(0),d(1,mt,1,5,"ng-template",null,0,k),C())}function Tt(t,l){if(t&1){let e=V();f(0,"p-checkbox",16),x("click",function(i){return u(e),g(i.preventDefault())}),d(1,yt,3,0,"ng-container",5),m()}if(t&2){let e=s(2);a("ngModel",e.isSelected())("binary",!0)("indeterminate",e.node.partialSelected)("disabled",e.node.selectable===!1)("variant",(e.tree==null?null:e.tree.config.inputStyle())==="filled"||(e.tree==null?null:e.tree.config.inputVariant())==="filled"?"filled":"outlined")("tabindex",-1),N("data-p-partialchecked",e.node.partialSelected),c(),a("ngIf",e.tree.checkboxIconTemplate||e.tree._checkboxIconTemplate)}}function bt(t,l){if(t&1&&I(0,"span"),t&2){let e=s(2);O(e.getIcon())}}function xt(t,l){if(t&1&&(f(0,"span"),R(1),m()),t&2){let e=s(2);c(),ne(e.node.label)}}function vt(t,l){t&1&&w(0)}function St(t,l){if(t&1&&(f(0,"span"),d(1,vt,1,0,"ng-container",15),m()),t&2){let e=s(2);c(),a("ngTemplateOutlet",e.tree.getTemplateForNode(e.node))("ngTemplateOutletContext",D(2,Je,e.node))}}function Ct(t,l){if(t&1&&I(0,"p-treeNode",19),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(3);a("node",e)("parentNode",r.node)("firstChild",n)("lastChild",i)("index",o)("itemSize",r.itemSize)("level",r.level+1)("loadingMode",r.loadingMode)}}function Nt(t,l){if(t&1&&(f(0,"ul",17),d(1,Ct,1,8,"p-treeNode",18),m()),t&2){let e=s(2);te("display",e.node.expanded?"flex":"none"),c(),a("ngForOf",e.node.children)("ngForTrackBy",e.tree.trackBy.bind(e))}}function It(t,l){if(t&1){let e=V();f(0,"li",11),x("drop",function(i){u(e);let o=s(2);return g(o.onDropPoint(i,1))})("dragover",function(i){u(e);let o=s(2);return g(o.onDropPointDragOver(i))})("dragenter",function(i){u(e);let o=s(2);return g(o.onDropPointDragEnter(i,1))})("dragleave",function(i){u(e);let o=s(2);return g(o.onDropPointDragLeave(i))}),m()}if(t&2){let e=s(2);a("ngClass",D(2,Ye,e.draghoverNext)),N("aria-hidden",!0)}}function wt(t,l){if(t&1){let e=V();d(0,lt,1,4,"li",1),f(1,"li",2),x("keydown",function(i){u(e);let o=s();return g(o.onKeyDown(i))}),f(2,"div",3),x("click",function(i){u(e);let o=s();return g(o.onNodeClick(i))})("contextmenu",function(i){u(e);let o=s();return g(o.onNodeRightClick(i))})("dblclick",function(i){u(e);let o=s();return g(o.onNodeDblClick(i))})("touchend",function(){u(e);let i=s();return g(i.onNodeTouchEnd())})("drop",function(i){u(e);let o=s();return g(o.onDropNode(i))})("dragover",function(i){u(e);let o=s();return g(o.onDropNodeDragOver(i))})("dragenter",function(i){u(e);let o=s();return g(o.onDropNodeDragEnter(i))})("dragleave",function(i){u(e);let o=s();return g(o.onDropNodeDragLeave(i))})("dragstart",function(i){u(e);let o=s();return g(o.onDragStart(i))})("dragend",function(i){u(e);let o=s();return g(o.onDragStop(i))}),f(3,"button",4),x("click",function(i){u(e);let o=s();return g(o.toggle(i))}),d(4,pt,3,2,"ng-container",5)(5,_t,2,5,"span",6),m(),d(6,Tt,2,8,"p-checkbox",7)(7,bt,1,2,"span",8),f(8,"span",9),d(9,xt,2,1,"span",5)(10,St,2,4,"span",5),m()(),d(11,Nt,2,4,"ul",10),m(),d(12,It,1,4,"li",1)}if(t&2){let e=s();a("ngIf",e.tree.droppableNodes),c(),ie(e.node.style),O(e.node.styleClass),a("ngClass",e.nodeClass)("ngStyle",D(29,Ge,e.itemSize+"px")),N("aria-label",e.node.label)("aria-checked",e.checked)("aria-setsize",e.node.children?e.node.children.length:0)("aria-selected",e.selected)("aria-expanded",e.node.expanded)("aria-posinset",e.index+1)("aria-level",e.level+1)("tabindex",e.index===0?0:-1)("data-id",e.node.key),c(),te("padding-left",e.level*e.indentation+"rem"),a("ngClass",e.nodeContentClass)("draggable",e.tree.draggableNodes),c(),N("data-pc-section","toggler"),c(),a("ngIf",!e.tree.togglerIconTemplate&&!e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.togglerIconTemplate||e.tree._togglerIconTemplate),c(),a("ngIf",e.tree.selectionMode=="checkbox"),c(),a("ngIf",e.node.icon||e.node.expandedIcon||e.node.collapsedIcon),c(2),a("ngIf",!e.tree.getTemplateForNode(e.node)),c(),a("ngIf",e.tree.getTemplateForNode(e.node)),c(),a("ngIf",!e.tree.virtualScroll&&e.node.children&&e.node.expanded),c(),a("ngIf",e.tree.droppableNodes&&e.lastChild)}}var je=["filter"],Et=["node"],kt=["header"],Vt=["footer"],Dt=["loader"],Mt=["empty"],Ot=["togglericon"],Ft=["checkboxicon"],$t=["loadingicon"],Lt=["filtericon"],zt=["scroller"],Ut=["wrapper"],At=t=>({options:t});function Rt(t,l){if(t&1&&I(0,"i"),t&2){let e=s(2);O("p-tree-loading-icon pi-spin "+e.loadingIcon)}}function Qt(t,l){t&1&&I(0,"SpinnerIcon",16),t&2&&a("spin",!0)("styleClass","p-tree-loading-icon")}function Bt(t,l){}function Pt(t,l){t&1&&d(0,Bt,0,0,"ng-template")}function Ht(t,l){if(t&1&&(f(0,"span",17),d(1,Pt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function qt(t,l){if(t&1&&(S(0),d(1,Qt,1,2,"SpinnerIcon",14)(2,Ht,2,1,"span",15),C()),t&2){let e=s(2);c(),a("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate),c(),a("ngIf",e.loadingIconTemplate||e._loadingIconTemplate)}}function Kt(t,l){if(t&1&&(f(0,"div",12),d(1,Rt,1,2,"i",13)(2,qt,3,2,"ng-container",10),m()),t&2){let e=s();c(),a("ngIf",e.loadingIcon),c(),a("ngIf",!e.loadingIcon)}}function jt(t,l){t&1&&w(0)}function Wt(t,l){t&1&&w(0)}function Gt(t,l){if(t&1&&d(0,Wt,1,0,"ng-container",18),t&2){let e=s();a("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",D(2,Je,e.filterOptions))}}function Yt(t,l){t&1&&I(0,"SearchIcon",21)}function Jt(t,l){}function Xt(t,l){t&1&&d(0,Jt,0,0,"ng-template")}function Zt(t,l){if(t&1&&(f(0,"span"),d(1,Xt,1,0,null,9),m()),t&2){let e=s(3);c(),a("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function ei(t,l){if(t&1){let e=V();f(0,"p-iconField")(1,"input",19,0),x("keydown.enter",function(i){return u(e),g(i.preventDefault())})("input",function(i){u(e);let o=s(2);return g(o._filter(i.target.value))}),m(),f(3,"p-inputIcon"),d(4,Yt,1,0,"SearchIcon",20)(5,Zt,2,1,"span",10),m()()}if(t&2){let e=s(2);c(),a("pAutoFocus",e.filterInputAutoFocus),N("placeholder",e.filterPlaceholder),c(3),a("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),a("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function ti(t,l){if(t&1&&d(0,ei,6,4,"p-iconField",10),t&2){let e=s();a("ngIf",e.filter)}}function ii(t,l){if(t&1&&I(0,"p-treeNode",27,3),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(2).options,p=s(3);a("level",e.level)("rowNode",e)("node",e.node)("parentNode",e.parent)("firstChild",n)("lastChild",i)("index",p.getIndex(r,o))("itemSize",r.itemSize)("indentation",p.indentation)("loadingMode",p.loadingMode)}}function ni(t,l){if(t&1&&(f(0,"ul",25),d(1,ii,2,10,"p-treeNode",26),m()),t&2){let e=s(),n=e.$implicit,i=e.options,o=s(3);ie(i.contentStyle),a("ngClass",i.contentStyleClass),N("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledBy),c(),a("ngForOf",n)("ngForTrackBy",o.trackBy)}}function oi(t,l){if(t&1&&d(0,ni,2,7,"ul",24),t&2){let e=l.$implicit;a("ngIf",e)}}function ri(t,l){t&1&&w(0)}function li(t,l){if(t&1&&d(0,ri,1,0,"ng-container",18),t&2){let e=l.options,n=s(4);a("ngTemplateOutlet",n.loaderTemplate||n._loaderTemplate)("ngTemplateOutletContext",D(2,At,e))}}function ai(t,l){t&1&&(S(0),d(1,li,1,4,"ng-template",null,4,k),C())}function si(t,l){if(t&1){let e=V();f(0,"p-scroller",23,1),x("onScroll",function(i){u(e);let o=s(2);return g(o.onScroll.emit(i))})("onScrollIndexChange",function(i){u(e);let o=s(2);return g(o.onScrollIndexChange.emit(i))})("onLazyLoad",function(i){u(e);let o=s(2);return g(o.onLazyLoad.emit(i))}),d(2,oi,1,1,"ng-template",null,2,k)(4,ai,3,0,"ng-container",10),m()}if(t&2){let e=s(2);ie(D(9,Ge,e.scrollHeight!=="flex"?e.scrollHeight:void 0)),a("items",e.serializedValue)("tabindex",-1)("scrollHeight",e.scrollHeight!=="flex"?void 0:"100%")("itemSize",e.virtualScrollItemSize||e._virtualNodeHeight)("lazy",e.lazy)("options",e.virtualScrollOptions),c(4),a("ngIf",e.loaderTemplate||e._loaderTemplate)}}function ci(t,l){if(t&1&&I(0,"p-treeNode",32),t&2){let e=l.$implicit,n=l.first,i=l.last,o=l.index,r=s(4);a("node",e)("firstChild",n)("lastChild",i)("index",o)("level",0)("loadingMode",r.loadingMode)}}function di(t,l){if(t&1&&(f(0,"ul",30),d(1,ci,1,6,"p-treeNode",31),m()),t&2){let e=s(3);N("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy),c(),a("ngForOf",e.getRootNode())("ngForTrackBy",e.trackBy.bind(e))}}function pi(t,l){if(t&1&&(S(0),f(1,"div",28,5),d(3,di,2,4,"ul",29),m(),C()),t&2){let e=s(2);c(),te("max-height",e.scrollHeight),c(2),a("ngIf",e.getRootNode())}}function ui(t,l){if(t&1&&(S(0),d(1,si,5,11,"p-scroller",22)(2,pi,4,3,"ng-container",10),C()),t&2){let e=s();c(),a("ngIf",e.virtualScroll),c(),a("ngIf",!e.virtualScroll)}}function gi(t,l){if(t&1&&(S(0),R(1),C()),t&2){let e=s(2);c(),oe(" ",e.emptyMessageLabel," ")}}function _i(t,l){}function hi(t,l){t&1&&d(0,_i,0,0,"ng-template",null,6,k)}function fi(t,l){if(t&1&&(f(0,"div",33),d(1,gi,2,1,"ng-container",34)(2,hi,2,0,null,9),m()),t&2){let e=s();c(),a("ngIf",!e.emptyMessageTemplate&&!e._emptyMessageTemplate)("ngIfElse",e.emptyFilter),c(),a("ngTemplateOutlet",e.emptyMessageTemplate||e._emptyMessageTemplate)}}function mi(t,l){t&1&&w(0)}var yi=({dt:t})=>`
|
|
2
2
|
.p-tree {
|
|
3
3
|
background: ${t("tree.background")};
|
|
4
4
|
color: ${t("tree.color")};
|