dealposbooks 1.9.0 → 1.9.2
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 +43 -43
- package/assets/scss/layouts/_layout.scss +1 -1
- package/assets/scss/layouts/dark/_dark.scss +164 -153
- package/assets/scss/style.scss +1 -1
- package/assets/scss/variables/_variables.scss +4 -2
- package/assets/world.json +17808 -1
- package/{chunk-S64TQVWK.js → chunk-2GAPYNNZ.js} +1 -1
- package/chunk-2HYLQR56.js +1 -0
- package/chunk-2VTAWSHV.js +1 -0
- package/chunk-3R4UQAEP.js +1 -0
- package/chunk-3SPHZLLV.js +301 -0
- package/{chunk-CEMQLY34.js → chunk-4EDEITTK.js} +1 -1
- package/{chunk-3TRGIHUH.js → chunk-4FHVIHSY.js} +1 -1
- package/chunk-4OHRBQE4.js +1 -0
- package/chunk-4OXMK44M.js +1 -0
- package/chunk-4TTJBC5I.js +1 -0
- package/chunk-5CZUTVXD.js +47 -0
- package/chunk-5M3BH2HK.js +1 -0
- package/{chunk-UIM6GQ63.js → chunk-5MHVGNVO.js} +1 -1
- package/{chunk-VYTUB2DV.js → chunk-63XPN7AG.js} +1 -1
- package/chunk-74EMBNLM.js +1 -0
- package/chunk-75NY4EHJ.js +7 -0
- package/{chunk-ON4N4CPO.js → chunk-7CAU344O.js} +1 -1
- package/chunk-BS6MB7HD.js +1 -0
- package/chunk-C54Z7Z3J.js +246 -0
- package/{chunk-IF72X7RS.js → chunk-CCE4VMYO.js} +1 -1
- package/chunk-CP57YBBI.js +2 -0
- package/{chunk-SJTXIIX5.js → chunk-DCES5UJV.js} +1 -1
- package/{chunk-MS3UTNX6.js → chunk-DERWDCI5.js} +1 -1
- package/chunk-EDPSZYHH.js +1 -0
- package/{chunk-RNU2O7NF.js → chunk-ELUESCCC.js} +1 -1
- package/{chunk-CMHZLZ4E.js → chunk-FJ7IM55X.js} +1 -1
- package/{chunk-YILEWAVV.js → chunk-FNWWNWQP.js} +1 -1
- package/chunk-FOSJHYSQ.js +300 -0
- package/chunk-GH3BVHFE.js +1 -0
- package/{chunk-VVC3QQUI.js → chunk-GO3ETPB7.js} +1 -1
- package/chunk-GYI6FJNZ.js +1 -0
- package/{chunk-HZLUYZB3.js → chunk-GYOO2JKC.js} +1 -1
- package/chunk-HF7H6NPN.js +1 -0
- package/chunk-HGUXJRBI.js +1 -0
- package/{chunk-TL6UHPBU.js → chunk-HKFTHGN6.js} +1 -1
- package/{chunk-DWTUKOMR.js → chunk-JBLYOAVS.js} +1 -1
- package/chunk-JDKSRPMM.js +1 -0
- package/chunk-JWPV2SP2.js +59 -0
- package/chunk-K5GIEJY3.js +7 -0
- package/{chunk-QBJKUIXK.js → chunk-KOC7QQ5A.js} +1 -1
- package/{chunk-BTZS5NIZ.js → chunk-M66SFDOI.js} +1 -1
- package/chunk-MOGY4H6O.js +1 -0
- package/{chunk-PATWAZNE.js → chunk-OBBJFGOA.js} +1 -1
- package/{chunk-G7MS6UI4.js → chunk-OPNWLQQY.js} +1 -1
- package/{chunk-35EULUGT.js → chunk-OUJ6CGAI.js} +1 -1
- package/{chunk-AKZM2DMY.js → chunk-OVUTH3B6.js} +1 -1
- package/chunk-OWUXXKGD.js +180 -0
- package/{chunk-R3FUAON5.js → chunk-PAQGWJ3J.js} +1 -1
- package/chunk-PCZW753D.js +1 -0
- package/chunk-PMQ7L7VQ.js +1 -0
- package/chunk-PRVKVHZC.js +1 -0
- package/{chunk-UNNEEFI2.js → chunk-PZRWSIXN.js} +1 -1
- package/{chunk-G63G4UQZ.js → chunk-Q3HG4BLC.js} +2 -2
- package/chunk-QEQCMTMU.js +1 -0
- package/chunk-QMXENXYW.js +1 -0
- package/chunk-R4CV5F66.js +1 -0
- package/chunk-RJZW77TO.js +1 -0
- package/{chunk-DYZT7UKM.js → chunk-S6JRFIGG.js} +1 -1
- package/{chunk-F6SXKAYF.js → chunk-TO47DVWB.js} +1 -1
- package/chunk-UHDEQNDX.js +1 -0
- package/{chunk-34EMCCL5.js → chunk-V4MEQMDJ.js} +3 -3
- package/{chunk-GHZLR44M.js → chunk-VET2QT6C.js} +1 -1
- package/chunk-VHNXAKFS.js +1 -0
- package/chunk-W37QK7Z5.js +520 -0
- package/{chunk-HZ7WPLLK.js → chunk-W56XJVPD.js} +1 -1
- package/chunk-W5VZK5LZ.js +70 -0
- package/chunk-WF2ZEF5P.js +1 -0
- package/{chunk-Q4Y2IGA6.js → chunk-WLFERE5C.js} +1 -1
- package/chunk-WZ5MSCDB.js +1 -0
- package/chunk-XFW6LFAM.js +5 -0
- package/chunk-YAEJRHVD.js +1 -0
- package/chunk-Z5SFK23M.js +960 -0
- package/{chunk-ROX6NFMK.js → chunk-ZQKGNYP5.js} +1 -1
- package/{chunk-26X2X35R.js → chunk-ZZNYX7MX.js} +1 -1
- package/index.html +3 -3
- package/main-G22CDQKS.js +1 -0
- package/package.json +1 -1
- package/styles-ETBLCGC3.css +1 -0
- package/chunk-2VF35PRV.js +0 -7
- package/chunk-6TRUWOKK.js +0 -1
- package/chunk-7FE3ZTH3.js +0 -7
- package/chunk-7V4AFAU5.js +0 -1
- package/chunk-AVL6C3VX.js +0 -59
- package/chunk-CAI423H5.js +0 -1
- package/chunk-DDBPJDR6.js +0 -1
- package/chunk-DXCBV3NP.js +0 -1
- package/chunk-E2RBYY7Q.js +0 -1
- package/chunk-E2VJWAI2.js +0 -1
- package/chunk-EBTC6B2W.js +0 -2
- package/chunk-EHULZLLD.js +0 -300
- package/chunk-ESKS6LNH.js +0 -246
- package/chunk-G4MYTCDD.js +0 -1
- package/chunk-GGZEY27B.js +0 -1
- package/chunk-I7T4W6G2.js +0 -47
- package/chunk-JXI4NDYT.js +0 -1
- package/chunk-KFKLJQ2D.js +0 -1
- package/chunk-KLKIGY44.js +0 -1
- package/chunk-KO5IN2G2.js +0 -1
- package/chunk-L2BS7BTV.js +0 -1
- package/chunk-LUH5EEUM.js +0 -1
- package/chunk-MEKP6D5H.js +0 -1
- package/chunk-MQ5Y727W.js +0 -1
- package/chunk-NWVWD4IE.js +0 -1
- package/chunk-NXCLB2JQ.js +0 -1
- package/chunk-OVJSBJBH.js +0 -197
- package/chunk-PBI352JR.js +0 -1
- package/chunk-PKK7JSPR.js +0 -1
- package/chunk-PKPPDJWT.js +0 -301
- package/chunk-PMLVFBAT.js +0 -1
- package/chunk-TDHD3ZTF.js +0 -1
- package/chunk-UFS2HLAY.js +0 -1
- package/chunk-UM7MB5JU.js +0 -1
- package/chunk-USO7UKRV.js +0 -821
- package/chunk-YF4S6CQO.js +0 -524
- package/chunk-YNI2HWIV.js +0 -180
- package/main-YPUVQR54.js +0 -1
- package/styles-JMIKZHNX.css +0 -1
package/chunk-ESKS6LNH.js
DELETED
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
import{a as rt}from"./chunk-IF72X7RS.js";import{a as On,b as Pn}from"./chunk-Q4Y2IGA6.js";import{a as j}from"./chunk-UIM6GQ63.js";import{a as An,b as En,c as Mn,d as Te,e as we}from"./chunk-QBJKUIXK.js";import"./chunk-ON4N4CPO.js";import{a as kn,b as Fn}from"./chunk-I7T4W6G2.js";import"./chunk-GHZLR44M.js";import{a as E}from"./chunk-MEKP6D5H.js";import{d as fn}from"./chunk-F6SXKAYF.js";import{a as nt,b as it}from"./chunk-UNNEEFI2.js";import{a as un,h as vn,j as Sn,k as Tn,l as wn}from"./chunk-MS3UTNX6.js";import{g as In,h as ot}from"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import"./chunk-AVL6C3VX.js";import{a as H,b as K}from"./chunk-G7MS6UI4.js";import{f as bn,g as B}from"./chunk-YNI2HWIV.js";import{d as yn,e as Ct,f as le,g as ce,h as tt,i as _e}from"./chunk-USO7UKRV.js";import{a as Z,b as hn,c as _n,e as gn,f as xn,g as Cn}from"./chunk-CMHZLZ4E.js";import{c as Qe,d as Wt,f as Xt,m as xt,t as Je,u as et,v as dn}from"./chunk-OVJSBJBH.js";import{b as ne,c as ie,e as oe,f as Ce,g as Ut,h as N,i as Qt,j as Zt,l as ye,o as be,r as Ie,t as ve,u as Se}from"./chunk-E2RBYY7Q.js";import{a as Ve}from"./chunk-26X2X35R.js";import{B as on,G as rn,J as an,N as sn,Q as ht,T as se,X as _t,Y as gt,aa as ln,ca as cn,f as dt,ha as mn,k as Jt,ka as Xe,la as Ne,m as en,n as tn,na as pn,r as Ze,s as We,ta as Ye,x as nn,y as ft}from"./chunk-35EULUGT.js";import{a as re,c as ae,d as R,k as F}from"./chunk-LUH5EEUM.js";import{d as Yt}from"./chunk-YILEWAVV.js";import{c as pt,d as ut,f as ke,h as Fe}from"./chunk-F2X3VGZZ.js";import"./chunk-EBTC6B2W.js";import{j as he,l as Gt,m as L,n as mt,o as Ht,r as jt,s as O,v as Pe}from"./chunk-SJTXIIX5.js";import{D as Be,Fa as I,Fc as $t,Gc as qt,Ib as P,Ic as y,J as Ke,Jb as c,L as kt,Mb as ze,Nb as Oe,O as Ft,Rc as fe,Sc as xe,Tb as a,Ub as r,Uc as Q,Vb as g,Vc as zt,Wb as ue,X as $,Xb as de,Z as S,Zb as w,aa as Nt,ab as Ee,ba as ge,bb as Vt,c as Re,ca as $e,cc as v,dc as l,eb as Lt,ec as Dt,fb as m,fc as Rt,ha as x,hc as Ge,ic as Y,jc as q,kc as z,lb as ct,lc as J,mc as p,nc as k,oc as ee,pa as h,qa as _,qc as Bt,rc as He,s as G,sa as Ae,sc as je,t as Pt,tb as M,tc as Ue,ub as qe,uc as te,vc as D,wc as A,xb as Me,xc as Kt,ya as X,zb as d}from"./chunk-2VF35PRV.js";import{a as C,b}from"./chunk-EQDQRRRY.js";var Hn=["class","page"],jn=n=>({id:n});function Un(n,s){if(n&1){let e=w();a(0,"div",3)(1,"a",4),p(2,"Cancel"),r(),a(3,"a",4),g(4,"i",5),p(5," Edit"),r(),a(6,"p-button",6),v("onClick",function(){h(e);let i=l();return _(i.onDelete())}),r(),a(7,"a",7),p(8,"Ledger"),r()()}if(n&2){let e,t=l();m(7),c("queryParams",A(1,jn,(e=t.COAInfo())==null?null:e.id))}}function Qn(n,s){if(n&1&&(a(0,"div",9)(1,"div",10)(2,"p-card")(3,"div",11)(4,"div",12)(5,"div",13),p(6,"Name"),r(),a(7,"div",14),p(8),r()(),a(9,"div",12)(10,"div",13),p(11,"Code"),r(),a(12,"div",14),p(13),r()(),a(14,"div",12)(15,"div",13),p(16,"Category"),r(),a(17,"div",14),p(18),r()(),a(19,"div",12)(20,"div",13),p(21,"Note"),r(),a(22,"div",14),p(23),r()(),a(24,"div",12)(25,"div",13),p(26,"Outlet"),r(),a(27,"div",14),p(28),r()()()()()()),n&2){let e,t,i,o,u,f=l(2);m(8),k((e=f.COAInfo().name)!==null&&e!==void 0?e:"-"),m(5),k((t=f.COAInfo().code)!==null&&t!==void 0?t:"-"),m(5),k((i=f.COAInfo().category)!==null&&i!==void 0?i:"-"),m(5),k((o=f.COAInfo().note)!==null&&o!==void 0?o:"-"),m(5),k((u=f.COAInfo().outletName)!==null&&u!==void 0?u:"-")}}function Zn(n,s){if(n&1&&d(0,Qn,29,5,"div",8),n&2){let e=l();c("ngIf",e.COAInfo())}}var Nn=(()=>{class n{constructor(){this.#e=x(j),this.#t=x(re),this.router=x(ae),this.COAInfo=I(null)}#e;#t;ngOnInit(){this.#t.paramMap.pipe(E("params"),$(e=>this.#e.getChartAccountById(e.get("id"))),S(e=>this.COAInfo.set(e)),E("response")).subscribe()}onDelete(){let t=[this.#t.snapshot.paramMap.get("id")];this.#e.deleteChartAccount(t).pipe(S(()=>{this.router.navigate(["/chart-of-account/account"])})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=M({type:n,selectors:[["app-coa-account-info",8,"page"]],attrs:Hn,decls:5,vars:0,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Details"],[1,"d-flex","gap-2"],["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","/report/general-ledger",1,"p-button",3,"queryParams"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col","col-lg-8"],[1,"d-flex","flex-column","row-gap-4"],[1,"row"],[1,"col","col-lg-3"],[1,"col"]],template:function(t,i){t&1&&(a(0,"app-main-panel",2),d(1,Un,9,3,"ng-template",null,0,y)(3,Zn,1,1,"ng-template",null,1,y),r())},dependencies:[O,L,ve,Qe,F,R,B,K,H,ce,le],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var pe=(()=>{class n{constructor(){this.httpService=x(Yt)}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=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var bt=n=>n?n.reduce((s,e)=>(s.push({label:e.label,data:e.data,key:e.key}),e.children&&e.children.length?s.push(...bt(e.children)):s.push({label:`${e.label} (no children)`,data:e.data,key:`${e.key}-no-children`}),s),[]):[];var It=(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 Wn={filter:{RowCount:20,PageNumber:1,CategoryID:"",Text:"",listOutletID:[]},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"}]},vt=hn(xn(Wn),Cn("ChartOfAccount"),_n(n=>({isAllChecked:Q(()=>n.data().every(s=>s.checked)),checkedItems:Q(()=>n.data().filter(s=>s.checked)),IDsChecked:Q(()=>n.data().filter(s=>s.checked).map(s=>s.id)),categories:Q(()=>bt(n.options.categories())),first:Q(()=>{let{start:s}=It(n.filter().PageNumber,n.filter().RowCount,n.count());return s}),last:Q(()=>{let{end:s}=It(n.filter().PageNumber,n.filter().RowCount,n.count());return s})})),gn(n=>{let s=x(j),e=x(pe),t={updateFilter(i){Z(n,{filter:C({},i)})},checkedItem(i){if(Array.isArray(i))i.forEach(o=>{let u=n.data().map(f=>f.id===o.id?b(C({},f),{checked:!o.checked}):f);Z(n,{data:u})});else{let o=i,u=n.data().map(f=>f.id===o.id?b(C({},f),{checked:!o.checked}):f);Z(n,{data:u})}},checkAllCheckbox(){let i=n.data().map(o=>b(C({},o),{checked:!o.checked}));Z(n,{data:i})},fetchChartOfAccount:nt(Re(Be(()=>!!n.filter()),kt(300),Ft(),$(i=>s.getPaginatedChartAccounts(i).pipe(G(o=>b(C({},o),{data:o.data.map(u=>b(C({},u),{checked:!1}))})),it({next:o=>Z(n,{data:o.data,count:o.count}),error:o=>{Z(n,{data:[],count:0}),console.error(o)}}))))),fetchLoader:nt(Re($(()=>s.getChartOfAccountLoader().pipe(it({next:i=>{Z(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(Ke(()=>e.fetchCOACategories().pipe(it({next:i=>{Z(n,{options:{entities:n.options.entities(),categories:i}})},error:i=>{console.error(i)}})))))};return t}));var Xn=["*"],Yn=({dt:n})=>`
|
|
2
|
-
.p-buttongroup .p-button {
|
|
3
|
-
margin: 0;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.p-buttongroup .p-button:not(:last-child),
|
|
7
|
-
.p-buttongroup .p-button:not(:last-child):hover {
|
|
8
|
-
border-right: 0 none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type) {
|
|
12
|
-
border-radius: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.p-buttongroup .p-button:first-of-type:not(:only-of-type) {
|
|
16
|
-
border-start-end-radius: 0;
|
|
17
|
-
border-end-end-radius: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.p-buttongroup .p-button:last-of-type:not(:only-of-type) {
|
|
21
|
-
border-start-start-radius: 0;
|
|
22
|
-
border-end-start-radius: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.p-buttongroup .p-button:focus {
|
|
26
|
-
position: relative;
|
|
27
|
-
z-index: 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.p-buttongroup {
|
|
31
|
-
display:flex;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.p-buttongroup > .p-button {
|
|
35
|
-
flex: 1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* For PrimeNG */
|
|
39
|
-
|
|
40
|
-
.p-buttongroup .p-button:focus,
|
|
41
|
-
.p-buttongroup p-button:focus .p-button,
|
|
42
|
-
.p-buttonset .p-button:focus,
|
|
43
|
-
.p-buttonset .p-button:focus,
|
|
44
|
-
.p-buttonset p-button:focus .p-button,
|
|
45
|
-
.p-buttonset .p-button:focus {
|
|
46
|
-
position: relative;
|
|
47
|
-
z-index: 1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.p-buttongroup .p-button:not(:last-child),
|
|
51
|
-
.p-buttongroup .p-button:not(:last-child):hover,
|
|
52
|
-
.p-buttongroup p-button:not(:last-child) .p-button,
|
|
53
|
-
.p-buttongroup p-button:not(:last-child) .p-button:hover,
|
|
54
|
-
.p-buttonset .p-button:not(:last-child),
|
|
55
|
-
.p-buttonset .p-button:not(:last-child):hover,
|
|
56
|
-
.p-buttonset p-button:not(:last-child) .p-button,
|
|
57
|
-
.p-buttonset p-button:not(:last-child) .p-button:hover {
|
|
58
|
-
border-right: 0 none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.p-buttongroup .p-button:not(:first-of-type):not(:last-of-type),
|
|
62
|
-
.p-buttongroup p-button:not(:first-of-type):not(:last-of-type) .p-button,
|
|
63
|
-
.p-buttonset .p-button:not(:first-of-type):not(:last-of-type),
|
|
64
|
-
.p-buttonset p-button:not(:first-of-type):not(:last-of-type) .p-button {
|
|
65
|
-
border-radius: 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.p-buttongroup .p-button:first-of-type:not(:only-of-type),
|
|
69
|
-
.p-buttongroup p-button:first-of-type:not(:only-of-type) .p-button,
|
|
70
|
-
.p-buttonset .p-button:first-of-type:not(:only-of-type),
|
|
71
|
-
.p-buttonset p-button:first-of-type:not(:only-of-type) .p-button {
|
|
72
|
-
border-start-end-radius: 0;
|
|
73
|
-
border-end-end-radius: 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.p-buttongroup .p-button:last-of-type:not(:only-of-type),
|
|
77
|
-
.p-buttongroup p-button:last-of-type:not(:only-of-type) .p-button,
|
|
78
|
-
.p-buttonset .p-button:last-of-type:not(:only-of-type),
|
|
79
|
-
.p-buttonset p-button:last-of-type:not(:only-of-type) .p-button {
|
|
80
|
-
border-start-start-radius: 0;
|
|
81
|
-
border-end-start-radius: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
p-button[iconpos='right'] spinnericon {
|
|
85
|
-
order: 1;
|
|
86
|
-
}
|
|
87
|
-
`,Jn={root:"p-buttongroup p-component"},Vn=(()=>{class n extends Ye{name="buttongroup";theme=Yn;classes=Jn;static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ae(n)))(i||n)}})();static \u0275prov=ge({token:n,factory:n.\u0275fac})}return n})();var ei=(()=>{class n extends Ve{_componentStyle=x(Vn);static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ae(n)))(i||n)}})();static \u0275cmp=M({type:n,selectors:[["p-buttonGroup"],["p-buttongroup"],["p-button-group"]],features:[te([Vn]),Me],ngContentSelectors:Xn,decls:2,vars:0,consts:[["role","group",1,"p-buttongroup","p-component"]],template:function(t,i){t&1&&(Dt(),a(0,"span",0),Rt(1),r())},dependencies:[O],encapsulation:2,changeDetection:0})}return n})(),Ln=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=qe({type:n});static \u0275inj=$e({imports:[ei]})}return n})();var ni=["class","page"],ii=n=>["../account/",n],oi=()=>["/report/general-ledger"],ri=n=>({id:n}),ai=()=>({width:"100%"}),si=()=>({scrollHeight:"200px"});function li(n,s){if(n&1){let e=w();a(0,"p-button",13),v("onClick",function(){h(e);let i=l(2);return _(i.deleteCOA())}),r()}}function ci(n,s){if(n&1&&(a(0,"div",7),d(1,li,1,0,"p-button",8),g(2,"p-button",9)(3,"p-button",10),a(4,"a",11),g(5,"i",12),p(6," Add"),r()()),n&2){let e=l();m(),c("ngIf",e.store.checkedItems().length)}}function mi(n,s){n&1&&(a(0,"tr")(1,"th",15),g(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",16),p(12,"Balance"),r()())}function pi(n,s){if(n&1&&(a(0,"tr")(1,"td"),g(2,"p-tableCheckbox",17),r(),a(3,"td"),p(4),r(),a(5,"td")(6,"a",18),p(7),r()(),a(8,"td"),p(9),r(),a(10,"td"),p(11),r(),a(12,"td",16)(13,"a",19),p(14),$t(15,"number"),r()()()),n&2){let e,t=s.$implicit;m(2),c("value",t),m(2),k(t.code),m(2),c("routerLink",A(11,ii,t.id)),m(),k(t.name),m(2),k(t.category),m(2),k(t.outletName),m(2),c("routerLink",D(13,oi))("queryParams",A(14,ri,t.id)),m(),k(qt(15,9,(e=t.balance)!==null&&e!==void 0?e:0))}}function ui(n,s){if(n&1&&p(0),n&2){let e=l(2);Bt(" Showing ",e.store.first()," to ",e.store.last()," of ",e.store.count()," entries ")}}function di(n,s){if(n&1){let e=w();a(0,"p-card")(1,"p-table",14),v("onLazyLoad",function(i){h(e);let o=l();return _(o.loadData(i))})("onRowSelect",function(i){h(e);let o=l();return _(o.onRowSelect(i))})("onRowUnselect",function(i){h(e);let o=l();return _(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){h(e);let o=l();return _(o.onSelectAll(i))})("onPage",function(i){h(e);let o=l();return _(o.onPageChange(i))}),d(2,mi,13,0,"ng-template",null,3,y)(4,pi,16,16,"ng-template",null,4,y)(6,ui,1,3,"ng-template",null,5,y),r()()}if(n&2){let e=l();m(),c("lazy",!0)("value",e.store.data())("paginator",!0)("rows",e.store.filter().RowCount)("totalRecords",e.store.count())("scrollable",!0)("scrollHeight","calc(100vh - 200px)")}}function fi(n,s){if(n&1){let e=w();a(0,"form",21)(1,"div",22)(2,"label",23),p(3,"Outlet"),r(),g(4,"p-multiselect",24),r(),a(5,"div",22)(6,"label",23),p(7,"Category"),r(),a(8,"p-treeselect",25),v("onFocus",function(){h(e);let i=l(2);return _(i.onCategoryFocus())}),r()(),a(9,"div",26)(10,"label",23),p(11,"Page Size"),r(),g(12,"input",27),r()()}if(n&2){let e=l(2);c("formGroup",e.formFilter),m(4),c("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.options().entities),m(4),ze(D(12,ai)),c("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",D(13,si))("options",e.categoryNodes())}}function hi(n,s){if(n&1&&d(0,fi,13,14,"form",20),n&2){let e=l();c("ngIf",e.formFilter)}}var Rn=(()=>{class n{ngOnInit(){this.store.fetchLoader(),console.log(this.store.filter().RowCount),this.generateFilterForm()}#e;constructor(){this.routeInfo=Bn,this.store=x(vt),this.#e=x(j),this.modalService=x(Wt),this.dialogVisible=I(!1),this.categoryNodes=I([]),this.fb=x(Ie),this.isDialogFilterVisible=I(!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)})}onPageChange(e){console.log("Page changed to: ",e),this.store.updateFilter(b(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(b(C({},this.store.filter()),{Text:e}))}updateFilter(e,t){this.store.updateFilter(b(C({},this.store.filter()),{[e]:t}))}checkAllCheckBox(){this.store.checkAllCheckbox()}checkedItem(e){this.store.checkedItem(e)}deleteCOA(){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(b(C({},this.store.filter()),{Text:e.trim()}))}onFilterEvent(){this.dialogVisible.update(e=>!e)}onFilterOKEvent(){let{categoryID:e,pageSize:t,outletID:i}=this.formFilter.value;this.store.updateFilter(b(C({},this.store.filter()),{listOutletID:i,CategoryID:e?e.key:"",RowCount:+t})),this.isDialogFilterVisible.update(o=>!o)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=M({type:n,selectors:[["app-cash-of-account",8,"page"]],features:[te([vt])],attrs:ni,decls:7,vars:3,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["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"],["severity","secondary","label","Import","icon","fa-solid fa-upload","variant","outlined"],["severity","secondary","label","Export","icon","fa-solid fa-download","variant","outlined"],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],["styleClass","h-100","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"],["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",""]],template:function(t,i){if(t&1){let o=w();a(0,"app-main-panel",6),v("search",function(f){return h(o),_(i.onSearchEvent(f))}),Ue("isDialogFilterVisibleChange",function(f){return h(o),je(i.isDialogFilterVisible,f)||(i.isDialogFilterVisible=f),_(f)}),v("filterEmitted",function(){return h(o),_(i.onFilterEvent())})("filterConfirmed",function(){return h(o),_(i.onFilterOKEvent())}),d(1,ci,7,1,"ng-template",null,0,y)(3,di,8,7,"ng-template",null,1,y)(5,hi,1,1,"ng-template",null,2,y),r()}t&2&&(c("isSearchableInput",!0),He("isDialogFilterVisible",i.isDialogFilterVisible),c("isFilterable",!0))},dependencies:[O,L,jt,B,Xt,Ln,rt,ve,Zt,ne,oe,Ce,F,R,Se,ye,be,Qe,wn,vn,Sn,Tn,K,H,bn,ce,le,ot,et,Je,_e,En,An,we,Te],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 gi=["class","page"],xi=()=>["../"],Tt=n=>({"ng-invalid ng-dirty":n}),Ci=n=>({"ng-dirty ng-invalid":n});function yi(n,s){if(n&1){let e=w();a(0,"div",5)(1,"a",6),p(2,"Cancel"),r(),a(3,"p-button",7),v("onClick",function(){h(e);let i=l();return _(i.onSubmit())}),r()()}n&2&&(m(),c("routerLink",D(1,xi)))}function bi(n,s){n&1&&(a(0,"div",26),p(1," Name is required "),r())}function Ii(n,s){if(n&1&&(a(0,"div"),d(1,bi,2,0,"div",25),r()),n&2){let e=l(2);m(),c("ngIf",e.form.controls.Name.errors.required)}}function vi(n,s){n&1&&(a(0,"div",27)(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 Si(n,s){if(n&1&&(a(0,"span",28),p(1),r()),n&2){let e=s.$implicit;c("pTooltip",e.name),m(),ee(" ",e.name," ")}}function Ti(n,s){n&1&&(a(0,"div",26),p(1," Code is required "),r())}function wi(n,s){if(n&1&&(a(0,"div"),d(1,Ti,2,0,"div",25),r()),n&2){let e=l(2);m(),c("ngIf",e.form.controls.Code.errors.required)}}function Ai(n,s){n&1&&(a(0,"div",26),p(1," Category is required "),r())}function Ei(n,s){if(n&1&&(a(0,"div"),d(1,Ai,2,0,"div",25),r()),n&2){let e=l(2);m(),c("ngIf",e.form.controls.Category.errors.required)}}function Mi(n,s){n&1&&(a(0,"div",26),p(1," Note is required "),r())}function Oi(n,s){if(n&1&&(a(0,"div"),d(1,Mi,2,0,"div",25),r()),n&2){let e=l(2);m(),c("ngIf",e.form.controls.Note.errors.required)}}function Pi(n,s){if(n&1&&(a(0,"div",8)(1,"div",9)(2,"div",10)(3,"p-card")(4,"div",11)(5,"div",10)(6,"div",12)(7,"div",13)(8,"div",14)(9,"label",15),p(10,"Name"),r(),g(11,"input",16),d(12,Ii,2,1,"div",17),r()(),a(13,"div",13)(14,"div",14)(15,"div")(16,"label",15),p(17,"Outlet"),r(),g(18,"p-button",18),d(19,vi,3,0,"ng-template",null,2,y),r(),a(21,"p-select",19),d(22,Si,2,2,"ng-template",null,3,y),r()()(),a(24,"div",13)(25,"div",14)(26,"label",15),p(27,"Code"),r(),g(28,"input",20),d(29,wi,2,1,"div",17),r()(),a(30,"div",21)(31,"div",22)(32,"label",15),p(33,"Category"),r(),g(34,"p-treeselect",23),d(35,Ei,2,1,"div",17),r()(),a(36,"div",13)(37,"div",14)(38,"label",15),p(39,"Note"),r(),g(40,"textarea",24),d(41,Oi,2,1,"div",17),r()()()()()()()()()),n&2){let e=J(20),t=l();m(),c("formGroup",t.form),m(10),c("ngClass",A(14,Tt,t.form.controls.Name.invalid&&(t.form.controls.Name.dirty||t.form.controls.Name.touched))),m(),c("ngIf",t.form.controls.Name.invalid&&(t.form.controls.Name.dirty||t.form.controls.Name.touched)),m(6),c("pTooltip",e)("rounded",!0)("text",!0),m(3),c("options",t.outlets()),m(7),c("ngClass",A(16,Tt,t.form.controls.Code.invalid&&(t.form.controls.Code.dirty||t.form.controls.Code.touched))),m(),c("ngIf",t.form.controls.Code.invalid&&(t.form.controls.Code.dirty||t.form.controls.Code.touched)),m(5),c("options",t.categoryOptions())("ngClass",A(18,Ci,t.form.controls.Category.invalid&&(t.form.controls.Category.dirty||t.form.controls.Category.touched))),m(),c("ngIf",t.form.controls.Category.invalid&&(t.form.controls.Category.dirty||t.form.controls.Category.touched)),m(5),c("ngClass",A(20,Tt,t.form.controls.Note.invalid&&(t.form.controls.Note.dirty||t.form.controls.Note.touched))),m(),c("ngIf",t.form.controls.Note.errors)}}var wt=(()=>{class n{constructor(){this.route=x(re),this.coa_service=x(j),this.coa_info=I(null),this.fb=x(Ie),this.isEdit=I(!1),this.categoryOptions=I([]),this.router=x(ae),this.outlets=Q(()=>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 V=i(f.children,f);if(V)return V}}return null}return i(e)}generateForm(e){this.form=this.fb.group({ID:new N(e.id||""),Name:new N(e.name||"",[ie.required]),Code:new N(e.code||"",[ie.required]),Note:new N(e.note||"",[]),Balance:new N(e.balance||0),Outlet:new N(e.outletID||""),AccessType:new N(e.accessTypeID||0),Category:new N(null,[ie.required])})}ngOnInit(){this.generateForm({id:"",name:"",code:"",note:"",balance:0,outletID:"",accessTypeID:0,categoryID:null}),this.fetchLoader(),this.fetchCategoryOptions()}fetchLoader(){this.route.paramMap.pipe(Ke(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"),G(e=>b(C({},e),{form:b(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()}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{AccessType:e,Balance:t,Category:i,Code:o,Name:u,Note:f,Outlet:V}=this.form.value,T={id:this.coa_info().form.id,categoryID:i.key,name:u,code:o,note:f,outletID:V||null,balance:t,accessTypeID:e};this.coa_service.submitChartAccount(T).pipe(S(()=>{this.form.reset(),this.router.navigate(["/chart-of-account/account"])}),E("response")).subscribe()}fetchCategoryOptions(){this.coa_service.getCachedCategoriesOptions().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=M({type:n,selectors:[["app-coa-account-form",8,"page"]],attrs:gi,decls:5,vars:0,consts:[["actionButton",""],["content",""],["tooltipContent",""],["item",""],["pageTitle","Chart Of Account Form"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary",3,"routerLink"],["label","Submit",3,"onClick"],[1,"container-fluid","py-4","h-100"],[1,"row","justify-content-center","h-100",3,"formGroup"],[1,"col"],[1,"row","justify-content-center"],[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"],["pSize","small","rows","5","cols","30","pTextarea","","formControlName","Note",3,"ngClass"],["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"]],template:function(t,i){t&1&&(a(0,"app-main-panel",4),d(1,yi,4,2,"ng-template",null,0,y)(3,Pi,42,22,"ng-template",null,1,y),r())},dependencies:[B,Se,ne,oe,Ce,ye,be,rt,O,he,L,F,R,we,Te,K,H,et,Je,Pn,On,ot,In,_e,tt,ce,le],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-treeselect{width:100%!important}"],changeDetection:0})}}return n})();var Fi=["sublist"],Ni=(n,s)=>({"p-contextmenu-submenu":n,"p-contextmenu-root-list":s}),Vi=()=>({"p-contextmenu-item-link":!0}),$n=()=>({class:"p-contextmenu-submenu-icon"}),Li=()=>({exact:!1}),Di=n=>({"p-contextmenu-item-link":!0,"p-disabled":n}),Ri=n=>({$implicit:n});function Bi(n,s){if(n&1&&g(0,"li",8),n&2){let e=l().$implicit,t=l(2);ze(t.getItemProp(e,"style")),c("ngClass",t.getSeparatorItemClass(e)),P("id",t.getItemId(e))("data-pc-section","separator")}}function Ki(n,s){if(n&1&&g(0,"span",19),n&2){let e=l(4).$implicit,t=l(2);c("ngClass",t.getItemProp(e,"icon"))("ngStyle",t.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function $i(n,s){if(n&1&&(a(0,"span",20),p(1),r()),n&2){let e=l(4).$implicit,t=l(2);P("data-pc-section","label"),m(),ee(" ",t.getItemLabel(e)," ")}}function qi(n,s){if(n&1&&g(0,"span",21),n&2){let e=l(4).$implicit,t=l(2);c("innerHTML",t.getItemLabel(e),Ee),P("data-pc-section","label")}}function zi(n,s){if(n&1&&g(0,"p-badge",22),n&2){let e=l(4).$implicit,t=l(2);c("styleClass",t.getItemProp(e,"badgeStyleClass"))("value",t.getItemProp(e,"badge"))}}function Gi(n,s){n&1&&g(0,"AngleRightIcon"),n&2&&(Oe("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function Hi(n,s){}function ji(n,s){n&1&&d(0,Hi,0,0,"ng-template",25),n&2&&c("data-pc-section","submenuicon")("aria-hidden",!0)}function Ui(n,s){if(n&1&&(ue(0),d(1,Gi,1,4,"AngleRightIcon",23)(2,ji,1,2,null,24),de()),n&2){let e=l(6);m(),c("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),m(),c("ngTemplateOutlet",e.contextMenu.submenuIconTemplate||e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",D(3,$n))}}function Qi(n,s){if(n&1&&(a(0,"a",15),d(1,Ki,1,5,"span",16)(2,$i,2,2,"span",17)(3,qi,1,2,"ng-template",null,2,y)(5,zi,1,2,"p-badge",18)(6,Ui,3,4,"ng-container",11),r()),n&2){let e=J(4),t=l(3).$implicit,i=l(2);c("target",i.getItemProp(t,"target"))("ngClass",D(12,Vi)),P("href",i.getItemProp(t,"url"),Vt)("aria-hidden",!0)("data-automationid",i.getItemProp(t,"automationId"))("data-pc-section","action")("tabindex",-1),m(),c("ngIf",i.getItemProp(t,"icon")),m(),c("ngIf",i.getItemProp(t,"escape"))("ngIfElse",e),m(3),c("ngIf",i.getItemProp(t,"badge")),m(),c("ngIf",i.isItemGroup(t))}}function Zi(n,s){if(n&1&&g(0,"span",19),n&2){let e=l(4).$implicit,t=l(2);c("ngClass",t.getItemProp(e,"icon"))("ngStyle",t.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function Wi(n,s){if(n&1&&(a(0,"span",20),p(1),r()),n&2){let e=l(4).$implicit,t=l(2);P("data-pc-section","label"),m(),ee(" ",t.getItemLabel(e)," ")}}function Xi(n,s){if(n&1&&g(0,"span",21),n&2){let e=l(4).$implicit,t=l(2);c("innerHTML",t.getItemLabel(e),Ee),P("data-pc-section","label")}}function Yi(n,s){if(n&1&&g(0,"p-badge",22),n&2){let e=l(4).$implicit,t=l(2);c("styleClass",t.getItemProp(e,"badgeStyleClass"))("value",t.getItemProp(e,"badge"))}}function Ji(n,s){n&1&&g(0,"AngleRightIcon"),n&2&&(Oe("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function eo(n,s){}function to(n,s){n&1&&d(0,eo,0,0,"ng-template",25),n&2&&c("data-pc-section","submenuicon")("aria-hidden",!0)}function no(n,s){if(n&1&&(ue(0),d(1,Ji,1,4,"AngleRightIcon",23)(2,to,1,2,null,24),de()),n&2){let e=l(6);m(),c("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),m(),c("ngTemplateOutlet",!e.contextMenu.submenuIconTemplate||!e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",D(3,$n))}}function io(n,s){if(n&1&&(a(0,"a",26),d(1,Zi,1,5,"span",16)(2,Wi,2,2,"span",17)(3,Xi,1,2,"ng-template",null,2,y)(5,Yi,1,2,"p-badge",18)(6,no,3,4,"ng-container",11),r()),n&2){let e=J(4),t=l(3).$implicit,i=l(2);c("routerLink",i.getItemProp(t,"routerLink"))("queryParams",i.getItemProp(t,"queryParams"))("routerLinkActiveOptions",i.getItemProp(t,"routerLinkActiveOptions")||D(20,Li))("target",i.getItemProp(t,"target"))("ngClass",A(21,Di,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(),c("ngIf",i.getItemProp(t,"icon")),m(),c("ngIf",i.getItemProp(t,"escape"))("ngIfElse",e),m(3),c("ngIf",i.getItemProp(t,"badge")),m(),c("ngIf",i.isItemGroup(t))}}function oo(n,s){if(n&1&&(ue(0),d(1,Qi,7,13,"a",13)(2,io,7,23,"a",14),de()),n&2){let e=l(2).$implicit,t=l(2);m(),c("ngIf",!t.getItemProp(e,"routerLink")),m(),c("ngIf",t.getItemProp(e,"routerLink"))}}function ro(n,s){}function ao(n,s){n&1&&d(0,ro,0,0,"ng-template")}function so(n,s){if(n&1&&(ue(0),d(1,ao,1,0,null,24),de()),n&2){let e=l(2).$implicit,t=l(2);m(),c("ngTemplateOutlet",t.itemTemplate)("ngTemplateOutletContext",A(2,Ri,e.item))}}function lo(n,s){if(n&1){let e=w();a(0,"p-contextmenu-sub",27),v("itemClick",function(i){h(e);let o=l(4);return _(o.itemClick.emit(i))})("itemMouseEnter",function(i){h(e);let o=l(4);return _(o.onItemMouseEnter(i))}),r()}if(n&2){let e=l(2).$implicit,t=l(2);c("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 co(n,s){if(n&1){let e=w();a(0,"li",9,1)(2,"div",10),v("click",function(i){h(e);let o=l().$implicit,u=l(2);return _(u.onItemClick(i,o))})("mouseenter",function(i){h(e);let o=l().$implicit,u=l(2);return _(u.onItemMouseEnter({$event:i,processedItem:o}))}),d(3,oo,3,2,"ng-container",11)(4,so,2,4,"ng-container",11),r(),d(5,lo,1,7,"p-contextmenu-sub",12),r()}if(n&2){let e=l(),t=e.$implicit,i=e.index,o=l(2);Oe(o.getItemProp(t,"styleClass")),c("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(),c("ngIf",!o.itemTemplate),m(),c("ngIf",o.itemTemplate),m(),c("ngIf",o.isItemVisible(t)&&o.isItemGroup(t))}}function mo(n,s){if(n&1&&d(0,Bi,1,5,"li",6)(1,co,6,21,"li",7),n&2){let e=s.$implicit,t=l(2);c("ngIf",t.isItemVisible(e)&&t.getItemProp(e,"separator")),m(),c("ngIf",t.isItemVisible(e)&&!t.getItemProp(e,"separator"))}}function po(n,s){if(n&1){let e=w();a(0,"ul",4,0),v("@overlayAnimation.start",function(i){h(e);let o=J(1),u=l();return _(u.onEnter(i,o))})("keydown",function(i){h(e);let o=l();return _(o.menuKeydown.emit(i))})("focus",function(i){h(e);let o=l();return _(o.menuFocus.emit(i))})("blur",function(i){h(e);let o=l();return _(o.menuBlur.emit(i))}),d(2,mo,2,2,"ng-template",5),r()}if(n&2){let e=l();c("ngClass",Kt(10,Ni,!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),c("ngForOf",e.items)}}var uo=["item"],fo=["submenuicon"],ho=["rootmenu"],_o=["container"],go=n=>({"p-contextmenu p-component":!0,"p-contextmenu-mobile":n}),xo=()=>({value:"visible"});function Co(n,s){if(n&1){let e=w();a(0,"div",3,0),v("@overlayAnimation.start",function(i){h(e);let o=l();return _(o.onOverlayAnimationStart(i))})("@overlayAnimation.done",function(i){h(e);let o=l();return _(o.onOverlayAnimationEnd(i))}),a(2,"p-contextmenu-sub",4,1),v("itemClick",function(i){h(e);let o=l();return _(o.onItemClick(i))})("menuFocus",function(i){h(e);let o=l();return _(o.onMenuFocus(i))})("menuBlur",function(i){h(e);let o=l();return _(o.onMenuBlur(i))})("menuKeydown",function(i){h(e);let o=l();return _(o.onKeyDown(i))})("itemMouseEnter",function(i){h(e);let o=l();return _(o.onItemMouseEnter(i))}),r()()}if(n&2){let e=l();Oe(e.styleClass),c("ngClass",A(20,go,e.queryMatches))("ngStyle",e.style)("@overlayAnimation",D(22,xo)),P("data-pc-section","root")("data-pc-name","contextmenu")("id",e.id),m(2),c("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 yo=({dt:n})=>`
|
|
88
|
-
.p-contextmenu {
|
|
89
|
-
position: absolute;
|
|
90
|
-
background: ${n("contextmenu.background")};
|
|
91
|
-
color: ${n("contextmenu.color")};
|
|
92
|
-
border: 1px solid ${n("contextmenu.border.color")};
|
|
93
|
-
border-radius: ${n("contextmenu.border.radius")};
|
|
94
|
-
box-shadow: ${n("contextmenu.shadow")};
|
|
95
|
-
min-width: 12.5rem;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.p-contextmenu-root-list,
|
|
99
|
-
.p-contextmenu-submenu {
|
|
100
|
-
margin: 0;
|
|
101
|
-
padding: ${n("contextmenu.list.padding")};
|
|
102
|
-
list-style: none;
|
|
103
|
-
outline: 0 none;
|
|
104
|
-
display: flex;
|
|
105
|
-
flex-direction: column;
|
|
106
|
-
gap: ${n("contextmenu.list.gap")};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.p-contextmenu-submenu {
|
|
110
|
-
position: absolute;
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-direction: column;
|
|
113
|
-
min-width: 100%;
|
|
114
|
-
z-index: 1;
|
|
115
|
-
background: ${n("contextmenu.background")};
|
|
116
|
-
color: ${n("contextmenu.color")};
|
|
117
|
-
border: 1px solid ${n("contextmenu.border.color")};
|
|
118
|
-
border-radius: ${n("contextmenu.border.radius")};
|
|
119
|
-
box-shadow: ${n("contextmenu.shadow")};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.p-contextmenu-item {
|
|
123
|
-
position: relative;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.p-contextmenu-item-content {
|
|
127
|
-
transition: background ${n("contextmenu.transition.duration")}, color ${n("contextmenu.transition.duration")};
|
|
128
|
-
border-radius: ${n("contextmenu.item.border.radius")};
|
|
129
|
-
color: ${n("contextmenu.item.color")};
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.p-contextmenu-item-link {
|
|
133
|
-
cursor: pointer;
|
|
134
|
-
display: flex;
|
|
135
|
-
align-items: center;
|
|
136
|
-
text-decoration: none;
|
|
137
|
-
overflow: hidden;
|
|
138
|
-
position: relative;
|
|
139
|
-
color: inherit;
|
|
140
|
-
padding: ${n("contextmenu.item.padding")};
|
|
141
|
-
gap: ${n("contextmenu.item.gap")};
|
|
142
|
-
user-select: none;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.p-contextmenu-item-label {
|
|
146
|
-
line-height: 1;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.p-contextmenu-item-icon {
|
|
150
|
-
color: ${n("contextmenu.item.icon.color")};
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.p-contextmenu-submenu-icon {
|
|
154
|
-
color: ${n("contextmenu.submenu.icon.color")};
|
|
155
|
-
margin-left: auto;
|
|
156
|
-
font-size: ${n("contextmenu.submenu.icon.size")};
|
|
157
|
-
width: ${n("contextmenu.submenu.icon.size")};
|
|
158
|
-
height: ${n("contextmenu.submenu.icon.size")};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.p-contextmenu-submenu-icon:dir(rtl) {
|
|
162
|
-
margin-left: 0;
|
|
163
|
-
margin-right: auto;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
|
|
167
|
-
color: ${n("contextmenu.item.focus.color")};
|
|
168
|
-
background: ${n("contextmenu.item.focus.background")};
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
172
|
-
color: ${n("contextmenu.item.icon.focus.color")};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
176
|
-
color: ${n("contextmenu.submenu.icon.focus.color")};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
|
|
180
|
-
color: ${n("contextmenu.item.focus.color")};
|
|
181
|
-
background: ${n("contextmenu.item.focus.background")};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {
|
|
185
|
-
color: ${n("contextmenu.item.icon.focus.color")};
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
|
|
189
|
-
color: ${n("contextmenu.submenu.icon.focus.color")};
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.p-contextmenu-item-active > .p-contextmenu-item-content {
|
|
193
|
-
color: ${n("contextmenu.item.active.color")};
|
|
194
|
-
background: ${n("contextmenu.item.active.background")};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
198
|
-
color: ${n("contextmenu.item.icon.active.color")};
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
202
|
-
color: ${n("contextmenu.submenu.icon.active.color")};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.p-contextmenu-separator {
|
|
206
|
-
border-top: 1px solid ${n("contextmenu.separator.border.color")};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.p-contextmenu-enter-from,
|
|
210
|
-
.p-contextmenu-leave-active {
|
|
211
|
-
opacity: 0;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.p-contextmenu-enter-active {
|
|
215
|
-
transition: opacity 250ms;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.p-contextmenu-mobile .p-contextmenu-submenu {
|
|
219
|
-
position: static;
|
|
220
|
-
box-shadow: none;
|
|
221
|
-
border: 0 none;
|
|
222
|
-
padding-left: ${n("tieredmenu.submenu.mobile.indent")};
|
|
223
|
-
padding-right: 0;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.p-contextmenu-mobile .p-contextmenu-submenu-icon {
|
|
227
|
-
transition: transform 0.2s;
|
|
228
|
-
transform: rotate(90deg);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.p-contextmenu-mobile .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
232
|
-
transform: rotate(-90deg);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
/* For PrimeNG */
|
|
236
|
-
.p-contextmenu-submenu-icon.p-iconwrapper {
|
|
237
|
-
margin-left: auto;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.p-contextmenu-submenu-icon.p-iconwrapper:dir(rtl) {
|
|
241
|
-
margin-left: 0;
|
|
242
|
-
margin-right: auto;
|
|
243
|
-
}
|
|
244
|
-
`,bo={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"},Kn=(()=>{class n extends Ye{name="contextmenu";theme=yo;classes=bo;static \u0275fac=(()=>{let e;return function(i){return(e||(e=Ae(n)))(i||n)}})();static \u0275prov=ge({token:n,factory:n.\u0275fac})}return n})();var Io=(()=>{class n extends Ve{contextMenu;visible=!1;items;itemTemplate;root=!1;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath;tabindex=0;itemClick=new X;itemMouseEnter=new X;menuFocus=new X;menuBlur=new X;menuKeydown=new X;sublistViewChild;constructor(e){super(),this.contextMenu=e}getItemProp(e,t,i=null){return e&&e.item?gt(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 b(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 b(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 se(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=on(e.parentElement.parentElement),o=dt(),u=e.offsetParent?e.offsetWidth:ft(e),f=Jt(t.children[0]);e.style.top="0px",parseInt(i.left,10)+f+u>o.width-tn()?e.style.left=-1*u+"px":e.style.left=f+"px"}static \u0275fac=function(t){return new(t||n)(ct(Nt(()=>st)))};static \u0275cmp=M({type:n,selectors:[["p-contextMenuSub"],["p-contextmenu-sub"]],viewQuery:function(t,i){if(t&1&&Y(Fi,5),t&2){let o;q(o=z())&&(i.sublistViewChild=o.first)}},inputs:{visible:[2,"visible","visible",fe],items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",fe],autoZIndex:[2,"autoZIndex","autoZIndex",fe],baseZIndex:[2,"baseZIndex","baseZIndex",xe],popup:[2,"popup","popup",fe],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:[Me],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,po,3,13,"ul",3),t&2&&c("ngIf",i.root?!0:i.visible)},dependencies:[n,O,he,Gt,L,Ht,mt,F,R,dn,_e,tt,un,Ct,yn,Ne],encapsulation:2,data:{animation:[pt("overlayAnimation",[Fe(":enter",[ke({opacity:0})]),Fe(":leave",[ke({opacity:0})])])]}})}return n})(),st=(()=>{class n extends Ve{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 X;onHide=new X;rootmenu;containerViewChild;container;outsideClickListener;resizeListener;triggerEventListener;documentClickListener;documentTriggerListener;touchEndListener;pageX;pageY;visible=I(!1);relativeAlign;window;focused=!1;activeItemPath=I([]);focusedItemInfo=I({index:-1,level:0,parentKey:"",item:null});submenuVisible=I(!1);searchValue="";searchTimeout;_processedItems;_model;pressTimer;matchMediaListener;query;queryMatches;_componentStyle=x(Kn);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}${se(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,zt(()=>{let t=this.activeItemPath();se(t)?this.bindGlobalListeners():this.visible()||this.unbindGlobalListeners()})}ngOnInit(){super.ngOnInit(),this.id=this.id||cn("pn_id_"),this.bindMatchMediaListener(),this.bindTriggerEventListener()}isMobile(){return an()||rn()}bindTriggerEventListener(){Pe(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(Pe(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,V)=>{let T=(o!==""?o+"_":"")+V,W={item:f,index:V,level:t,key:T,parent:i,parentKey:o};W.items=this.createProcessedItems(f.items,t+1,W,T),u.push(W)}),u}bindMatchMediaListener(){if(Pe(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?gt(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&&se(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&&se(e.items)}onItemClick(e){let{processedItem:t}=e,i=this.isProcessedItemGroup(t);if(this.isSelected(t)){let{index:u,key:f,level:V,parentKey:T,item:W}=t;this.activeItemPath.set(this.activeItemPath().filter(U=>f!==U.key&&f.startsWith(U.key))),this.focusedItemInfo.set({index:u,level:V,parentKey:T,item:W}),We(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&&ln(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);ht(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(b(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=Ze(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),i=t&&Ze(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(b(C({},f),{index:this.findFirstFocusedItemIndex()}))}}e.preventDefault()}onItemChange(e,t){let{processedItem:i,isFocus:o}=e;if(ht(i))return;let{index:u,key:f,level:V,parentKey:T,items:W}=i,U=se(W),Mt=this.activeItemPath().filter(Ot=>Ot.parentKey!==T&&Ot.parentKey!==f);U&&(Mt.push(i),this.submenuVisible.set(!0)),this.focusedItemInfo.set({index:u,level:V,parentKey:T,item:i.item}),o&&We(this.rootmenu.sublistViewChild.nativeElement),!(t==="hover"&&this.queryMatches)&&this.activeItemPath.set(Mt)}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(),We(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):en(this.appendTo,this.containerViewChild.nativeElement))}moveOnTop(){this.autoZIndex&&this.containerViewChild&&xt.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}onOverlayHide(){this.unbindGlobalListeners(),this.cd.destroyed||(this.target=null),this.container&&this.autoZIndex&&xt.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:ft(this.containerViewChild.nativeElement),o=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetHeight:nn(this.containerViewChild.nativeElement),u=dt();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 se(this.visibleItems)?this.visibleItems[e]:null}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return _t(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let t=e>0?_t(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(b(C({},o),{index:t,item:i.item})),this.scrollInView())}scrollInView(e=-1){let t=e!==-1?`${this.id}_${e}`:this.focusedItemId,i=Ze(this.rootmenu.el.nativeElement,`li[id="${t}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}bindResizeListener(){Pe(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):sn(this.containerViewChild.nativeElement,this.appendTo))}ngOnDestroy(){this.unbindGlobalListeners(),this.unbindTriggerEventListener(),this.unbindMatchMediaListener(),this.removeAppendedElements(),super.ngOnDestroy()}static \u0275fac=function(t){return new(t||n)(ct(mn))};static \u0275cmp=M({type:n,selectors:[["p-contextMenu"],["p-contextmenu"],["p-context-menu"]],contentQueries:function(t,i,o){if(t&1&&(Ge(o,uo,4),Ge(o,fo,4),Ge(o,Xe,4)),t&2){let u;q(u=z())&&(i.itemTemplate=u.first),q(u=z())&&(i.submenuIconTemplate=u.first),q(u=z())&&(i.templates=u)}},viewQuery:function(t,i){if(t&1&&(Y(ho,5),Y(_o,5)),t&2){let o;q(o=z())&&(i.rootmenu=o.first),q(o=z())&&(i.containerViewChild=o.first)}},inputs:{model:"model",triggerEvent:"triggerEvent",target:"target",global:[2,"global","global",fe],style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:[2,"autoZIndex","autoZIndex",fe],baseZIndex:[2,"baseZIndex","baseZIndex",xe],id:"id",breakpoint:"breakpoint",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",pressDelay:[2,"pressDelay","pressDelay",xe]},outputs:{onShow:"onShow",onHide:"onHide"},features:[te([Kn]),Me],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,Co,4,23,"div",2),t&2&&c("ngIf",i.visible())},dependencies:[O,he,L,mt,Io,F,_e,Ct,Ne],encapsulation:2,data:{animation:[pt("overlayAnimation",[Fe(":enter",[ke({opacity:0}),ut("250ms")]),Fe(":leave",[ut(".1s linear",ke({opacity:0}))])])]},changeDetection:0})}return n})(),qn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=qe({type:n});static \u0275inj=$e({imports:[st,Ne,Ne]})}return n})();var So=["editInput"],To=["createInput"],wo=["tree"],Ao=["class","page"];function Eo(n,s){n&1&&(a(0,"a",6),g(1,"i",7),p(2," Add"),r())}function Mo(n,s){if(n&1){let e=w();a(0,"input",13,4),Ue("ngModelChange",function(i){let o=h(e).$implicit;return je(o.label,i)||(o.label=i),_(i)}),v("keydown",function(i){h(e);let o=l(2);return _(o.handleEditKeydown(i))})("blur",function(i){h(e);let o=l(2);return _(o.onNodeEditBlur(i))}),r()}if(n&2){let e=s.$implicit;He("ngModel",e.label)}}function Oo(n,s){if(n&1){let e=w();a(0,"div",8)(1,"div",9)(2,"p-card")(3,"p-tree",10,2),v("onNodeContextMenuSelect",function(i){h(e);let o=l();return _(o.onNodeContextMenuSelect(i))})("onNodeSelect",function(i){h(e);let o=l();return _(o.onNodeSelect(i))})("onNodeUnselect",function(i){h(e);let o=l();return _(o.onNodeUnselect(i))})("onNodeDrop",function(i){h(e);let o=l();return _(o.onNodeDrop(i))}),d(5,Mo,2,1,"ng-template",11),r(),g(6,"p-contextmenu",12,3),r()()()}if(n&2){let e=J(7),t=l();m(3),c("virtualScroll",!0)("virtualScrollItemSize",40)("scrollHeight","calc(100vh - 150px)")("value",t.categoryOptions())("contextMenu",e)("selection",t.selectedNode)("draggableNodes",!0)("droppableNodes",!0)("propagateSelectionUp",!1)("propagateSelectionDown",!1),m(3),c("model",t.items())}}var lt=function(n){return n[n.create=0]="create",n[n.edit=1]="edit",n}(lt||{}),zn=(()=>{class n{constructor(){this.COATypesService=x(pe),this.items=I([]),this.categoryOptions=I([]),this.selectedNode=null,this.editNode=I(null),this.router=x(ae),this.contextMenuState=I(null),this.focusTrigger=I(!1)}onEditNode(e){this.editNode.set(e)}ngAfterViewChecked(){this.selectedNode&&!this.focusTrigger()&&this.editInputRef&&(this.editInputRef.nativeElement.focus(),this.focusTrigger.set(!0))}fetchCOACategories(){return this.COATypesService.fetchCOACategories().pipe(E("response"),G(e=>{let t=i=>i.map(o=>{let u=o.children&&o.children.length>0;return b(C({},o),{icon:void 0,expandedIcon:u?"fa-solid fa-folder-open":void 0,collapsedIcon:u?"fa-solid fa-folder":"fa-solid fa-file",children:u?t(o.children):[]})});return t(e)}),S(e=>{this.categoryOptions.set(e),this.categoryOptions().forEach(t=>this.expandRecursive(t,!0))}))}onNodeSelect(e){let t=e.node;this.contextMenuState.set(null),this.focusTrigger.set(!1),t.children&&t.children.length&&(t.icon="fa-solid fa-folder-open")}onNodeUnselect(e){let t=e.node;t.children&&t.children.length&&(t.icon="fa-solid fa-folder")}handleEditKeydown(e){let t=e.target;if(e.key===" "&&e.stopPropagation(),e.key==="Enter"){e.stopPropagation(),this.rename(t.value);let i=this.tree.getNodeWithKey(this.selectedNode.key,this.categoryOptions());i&&(delete i.type,this.insertNodeByKey(this.selectedNode.parent.key,i))}}ngOnInit(){this.fetchCOACategories().subscribe(),this.items.set([{label:"Add",icon:"fa-light fa-plus",disabled:!1,command:()=>{this.contextMenuState.set(lt.create),this.insertNodeByKey(this.selectedNode.key,{label:"New Child Node"});let e=this.findNodeByKeyInArray(this.categoryOptions(),"New Child Node");e&&(this.contextMenuState.set(lt.edit),this.selectedNode=e)}},{label:"Edit",icon:"fa-light fa-pen-to-square",disabled:!1,command:()=>{this.contextMenuState.set(lt.edit);let e=this.findNodeByKeyInArray(this.categoryOptions(),this.selectedNode.key);e&&(e.type="edit",this.insertNodeByKey(this.selectedNode.parent.key,e)),console.log("findNode",e)}},{label:"Delete",disabled:!1,icon:"fa-light fa-trash",command:()=>this.onDeleteCategory()},{label:"Properties",disabled:!1,icon:"fa-light fa-file",command:()=>{this.router.navigate(["/chart-of-account/coa-types/info"],{queryParams:{ID:this.selectedNode.key}})}}]),this.expandAll()}insertNodeByKey(e,t,i=this.categoryOptions()){let o=!1,u=V=>V.map(T=>{if(T.key===e){if((T.children||[]).some(U=>t.key&&U.key===t.key||t.label&&U.label===t.label))return T;{let U=[...T.children||[],t];return o=!0,b(C({},T),{children:U})}}else if(T.children&&T.children.length>0)return b(C({},T),{children:u(T.children)});return T}),f=u(i);return o&&this.categoryOptions.set(f),o}onNodeEditBlur(e){let t=e.target;e.stopPropagation(),this.rename(t.value);let i=this.tree.getNodeWithKey(this.selectedNode.key,this.categoryOptions());i&&(delete i.type,this.insertNodeByKey(this.selectedNode.parent.key,i))}onNodeMouseDown(e,t){e.button===0&&(this.selectedNode=t)}rename(e,t=this.selectedNode){this.COATypesService.renameCategory(t.key?t.key:t.parent.key,{Name:e}).pipe(E("response"),S(()=>{this.fetchCOACategories(),this.contextMenuState.set(null)})).subscribe()}expandRecursive(e,t){e.expanded=t,e.children&&e.children.forEach(i=>{this.expandRecursive(i,t)})}expandAll(){this.categoryOptions().forEach(e=>this.expandRecursive(e,!0))}collapseAll(){this.categoryOptions().forEach(e=>this.expandRecursive(e,!1))}onEnterPress(){this.editNode&&this.onSave()}onNodeDrop(e){console.log("event",e);let{dragNode:t,dropNode:i}=e;this.COATypesService.updateParentCategory(t.key,{ParentID:i.key}).pipe(E("response"),S(()=>this.fetchCOACategories())).subscribe()}onSave(){this.COATypesService.renameCategory(this.selectedNode.key,{Name:this.editNode().label}).pipe(E("rename"),S(()=>{this.editNode.set(null)})).subscribe()}onDeleteCategory(){this.COATypesService.deleteCategory(this.selectedNode.key).pipe($(()=>this.fetchCOACategories()),E("delete")).subscribe()}findNodeByKeyInArray(e,t){for(let i of e){let o=this.findNodeByKey(i,t);if(o)return o}return null}findNodeByKey(e,t){if(e.key===t||e.label===t)return e;for(let i of e.children){let o=this.findNodeByKey(i,t);if(o)return o}return null}onNodeContextMenuSelect(e){if(this.selectedNode=e.node,e.node.parent===void 0||e.node.parent===null){if(e.node.children.length===5){let t=[...this.items()];t[0].disabled=!0,this.items.set(t)}}else this.items.update(t=>t.map(i=>b(C({},i),{disabled:!1})))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=M({type:n,selectors:[["app-coa-type",8,"page"]],viewQuery:function(t,i){if(t&1&&(Y(So,5),Y(To,5),Y(wo,5)),t&2){let o;q(o=z())&&(i.editInputRef=o.first),q(o=z())&&(i.createnputRef=o.first),q(o=z())&&(i.tree=o.first)}},hostBindings:function(t,i){t&1&&v("keydown.enter",function(u){return i.onEnterPress(u)},!1,Lt)},features:[te([pn])],attrs:Ao,decls:5,vars:0,consts:[["actionButton",""],["content",""],["tree",""],["cm",""],["editInput",""],["pageTitle",`Chart of Accounts Category
|
|
245
|
-
`],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],[1,"row","justify-content-center"],[1,"col"],["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,Eo,3,0,"ng-template",null,0,y)(3,Oo,8,11,"ng-template",null,1,y),r())},dependencies:[B,Mn,F,R,qn,st,Xe,O,ve,ne,oe,Qt,K,H,fn],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var Po=["class","page"],At=n=>({"is-invalid":n});function ko(n,s){if(n&1){let e=w();a(0,"div",3)(1,"p-button",4),v("onClick",function(){h(e);let i=l();return _(i.goBack())}),r(),a(2,"p-button",5),v("onClick",function(){h(e);let i=l();return _(i.onSubmit())}),r()()}}function Fo(n,s){n&1&&(a(0,"div",22),p(1," Name is required "),r())}function No(n,s){n&1&&(a(0,"div",22),p(1," Code is required "),r())}function Vo(n,s){n&1&&(a(0,"div",22),p(1," Note is required "),r())}function Lo(n,s){if(n&1){let e=w();a(0,"div",6)(1,"div",7)(2,"div",8)(3,"p-panel")(4,"div",9)(5,"div",10)(6,"div",11)(7,"div",12)(8,"div",13)(9,"label",14),p(10,"Name"),r(),g(11,"input",15),d(12,Fo,2,0,"div",16),r()(),a(13,"div",17)(14,"div",13)(15,"label",14),p(16,"Code"),r(),g(17,"input",18),d(18,No,2,0,"div",16),r()(),a(19,"div",12)(20,"div",13)(21,"label",14),p(22,"Note"),r(),g(23,"textarea",19),d(24,Vo,2,0,"div",16),r()(),a(25,"div",12)(26,"div",20)(27,"label",14),p(28,"Category"),r(),a(29,"p-treeselect",21),v("onFocus",function(){h(e);let i=l();return _(i.loadCategories())}),r()()()()()()()()()()}if(n&2){let e=l();m(6),c("formGroup",e.form),m(5),c("ngClass",A(8,At,e.form.controls.Name.invalid&&(e.form.controls.Name.dirty||e.form.controls.Name.touched))),m(),c("ngIf",e.form.controls.Name.errors==null?null:e.form.controls.Name.errors.required),m(5),c("ngClass",A(10,At,e.form.controls.Code.invalid&&(e.form.controls.Code.dirty||e.form.controls.Code.touched))),m(),c("ngIf",e.form.controls.Code==null||e.form.controls.Code.errors==null?null:e.form.controls.Code.errors.required),m(5),c("ngClass",A(12,At,e.form.controls.Note.invalid&&(e.form.controls.Note.dirty||e.form.controls.Note.touched))),m(),c("ngIf",e.form.controls.Note.errors==null?null:e.form.controls.Note.errors.required),m(5),c("options",e.categories())}}var Et=(()=>{class n{constructor(){this.categories=I([]),this.COATypeService=x(pe),this.COAService=x(j),this.info=I(null),this.route=x(re),this.router=x(ae),this.fb=x(Ie)}goBack(){this.router.navigate(["/chart-of-account/coa-types"])}ngOnInit(){this.generateForm(),Pt([this.route.paramMap.pipe(G(e=>e.get("id")),Be(e=>!!e)),this.COATypeService.fetchCOACategories()]).pipe(E("fetchCOACategories"),$(([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})}))})).subscribe()}loadCategories(){this.COAService.getCachedCategoriesOptions().pipe(S(e=>this.categories.set(e))).subscribe()}generateForm(){this.form=new Ut({Name:new N("",[ie.required]),Code:new N("",[ie.required]),Category:new N(null),Note:new N("",[ie.required])})}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}=this.form.value,o=this.findNodeByKeyInArray(this.categories(),this.route.snapshot.params.id),u={Name:e,Code:t,ParentID:o.parent.key,Note:i,ID:this.route.snapshot.params.id||null};this.COATypeService.submitCategory(u,{observe:"response"}).pipe(E("response"),S(()=>{this.router.navigate(["/chart-of-account/coa-types"])})).subscribe()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=M({type:n,selectors:[["app-coa-type-form",8,"page"]],attrs:Po,decls:5,vars:0,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Category Form"],[1,"d-flex","gap-2"],["label","Cancel","variant","outlined","severity","secondary",3,"onClick"],["label","Submit",3,"onClick"],[1,"template-fluid","py-4","h-100"],[1,"row","h-100","justify-content-center"],[1,"col","h-100"],[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"],["placeholder","Select a Category","formControlName","Category",3,"onFocus","options"],["id","validationServer03Feedback",1,"invalid-feedback"]],template:function(t,i){t&1&&(a(0,"app-main-panel",2),d(1,ko,3,0,"ng-template",null,0,y)(3,Lo,30,14,"ng-template",null,1,y),r())},dependencies:[B,F,we,Te,Se,ne,oe,Ce,ye,be,O,he,L,K,ce,le,Fn,kn],styles:["[_nghost-%COMP%]{display:block} .p-treeselect{width:100%}"],changeDetection:0})}}return n})();var Do=n=>[n];function Ro(n,s){if(n&1&&(a(0,"a",4),g(1,"i",5),a(2,"span"),p(3,"Edit"),r()()),n&2){let e=l(2);c("routerLink",A(1,Do,"/chart-of-account/coa-types/"+e.info().id+"/edit"))}}function Bo(n,s){if(n&1&&(a(0,"p-card",6)(1,"div",7)(2,"div",8)(3,"div",7)(4,"div",9),p(5,"Name"),r(),a(6,"div",8),p(7),r()(),g(8,"hr"),a(9,"div",7)(10,"div",9),p(11,"Code"),r(),a(12,"div",8),p(13),r()(),g(14,"hr"),a(15,"div",7)(16,"div",9),p(17,"Category"),r(),a(18,"div",8),p(19),r()()(),a(20,"div",8)(21,"div",7)(22,"div",9),p(23,"System Category"),r(),a(24,"div",8),p(25),r()(),g(26,"hr"),a(27,"div",7)(28,"div",9),p(29,"Group Accounts"),r(),a(30,"div",8),p(31),r()(),g(32,"hr"),a(33,"div",7)(34,"div",9),p(35,"Note"),r(),a(36,"div",8),g(37,"div",10),r()()()()()),n&2){let e=l(2);m(7),ee(" ",e.info().name," "),m(6),k(e.info().code),m(6),k(e.info().name),m(6),ee(" ",e.info().option," "),m(6),k(e.info().isMain),m(6),c("innerHTML",e.info().note,Ee)}}function Ko(n,s){n&1&&(ue(0),a(1,"app-main-panel",3),d(2,Ro,4,3,"ng-template",null,0,y)(4,Bo,38,6,"ng-template",null,1,y),r(),de())}var Gn=(()=>{class n{constructor(){this.COATypeService=x(pe),this.route=x(re),this.info=I(null)}ngOnInit(){this.route.queryParamMap.pipe(G(e=>e.get("ID")),$(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=M({type:n,selectors:[["app-coa-type-info"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],[4,"ngIf"],["pageTitle",`Type of Account Info
|
|
246
|
-
`],["type","button",1,"p-button","p-button-success",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],["header","Details"],[1,"row"],[1,"col"],[1,"col-4"],[3,"innerHTML"]],template:function(t,i){t&1&&d(0,Ko,6,0,"ng-container",2),t&2&&c("ngIf",i.info())},dependencies:[O,L,B,K,H,F,R],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return n})();var Ws=[{path:"",redirectTo:"account",pathMatch:"full"},{path:"",children:[{path:"account",component:Rn},{path:"account/add",component:wt},{path:"account/:id",component:Nn},{path:"account/:id/edit",component:wt},{path:"coa-types",component:zn},{path:"coa-types/add",component:Et},{path:"coa-types/info",component:Gn},{path:"coa-types/:id/edit",component:Et}]}],Bn={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{Ws as CHART_OF_ACCOUNT_ROUTES,Bn as CHART_OF_ACCOUNT_ROUTE_PAGE};
|
package/chunk-G4MYTCDD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as i,k as r}from"./chunk-LUH5EEUM.js";import"./chunk-EBTC6B2W.js";import"./chunk-SJTXIIX5.js";import{Vb as n,tb as o}from"./chunk-2VF35PRV.js";import"./chunk-EQDQRRRY.js";var c=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=o({type:e,selectors:[["app-blank-layout"]],decls:1,vars:0,template:function(t,a){t&1&&n(0,"router-outlet")},dependencies:[r,i],encapsulation:2})}}return e})();export{c as BlankComponent};
|
package/chunk-GGZEY27B.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ne,b as ae}from"./chunk-VYTUB2DV.js";import{a as Z}from"./chunk-MEKP6D5H.js";import{a as ee,b as te}from"./chunk-UNNEEFI2.js";import{h as I,l as B}from"./chunk-MS3UTNX6.js";import"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import"./chunk-AVL6C3VX.js";import{a as X,b as Y}from"./chunk-G7MS6UI4.js";import{g as D}from"./chunk-YNI2HWIV.js";import{f as Q,g as W}from"./chunk-USO7UKRV.js";import"./chunk-CMHZLZ4E.js";import{u as K}from"./chunk-OVJSBJBH.js";import{r as G,u as L}from"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import"./chunk-35EULUGT.js";import{a as $,d as q}from"./chunk-YILEWAVV.js";import"./chunk-F2X3VGZZ.js";import{c as k,e as z}from"./chunk-EBTC6B2W.js";import{m as y,r as U,s as R}from"./chunk-SJTXIIX5.js";import{Fa as _,Fc as f,Gc as h,Ic as s,J as V,Jb as g,Tb as n,Ub as a,Uc as J,Vb as A,Vc as H,Z as T,Zb as v,ba as j,c as N,cc as w,dc as m,fb as r,ha as d,mc as o,nc as l,pa as b,qa as S,qc as F,tb as E,vc as P,zb as u}from"./chunk-2VF35PRV.js";import{a as C,b as x}from"./chunk-EQDQRRRY.js";var O=(()=>{class t{constructor(){this.httpService=d(q)}getGenerateCoa(e){let c={params:new k().set("PageNumber",e.PageNumber).set("RowCount",e.RowCount)};return this.httpService.get(void 0,"api/Tools/GetListCOA",c)}updateCOABalance(e={}){return this.httpService.put(void 0,"api/Tools/UpdateCOABalance",void 0,e)}getUnbalanceJournal(e){let i={params:e};return this.httpService.get(void 0,"api/Tools/GetListCOA",i)}updateUnbalanceJournal(){return this.httpService.put(void 0,"api/Tools/UpdateCOABalance",{})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=j({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var ce=()=>({"min-width":"50rem"});function me(t,p){if(t&1){let e=v();n(0,"p-button",6),w("onClick",function(){b(e);let c=m();return S(c.updateCoaBalance())}),a()}}function se(t,p){t&1&&(n(0,"tr")(1,"th"),o(2,"Code"),a(),n(3,"th"),o(4,"Name"),a(),n(5,"th"),o(6,"Outlet"),a(),n(7,"th"),o(8,"COA Balance"),a(),n(9,"th"),o(10,"Correct Balance"),a()())}function de(t,p){if(t&1&&(n(0,"tr")(1,"td"),o(2),a(),n(3,"td"),o(4),a(),n(5,"td"),o(6),a(),n(7,"td"),o(8),f(9,"number"),a(),n(10,"td"),o(11),f(12,"number"),a()()),t&2){let e=p.$implicit;r(2),l(e.Code),r(2),l(e.Name),r(2),l(e.OutletName),r(2),l(h(9,5,e.Balance)),r(3),l(h(12,7,e.CorrectBalance))}}function ue(t,p){if(t&1&&(n(0,"div",9)(1,"p"),o(2),a()()),t&2){let e=m(3);r(2),F(" Showing ",e.startIndex()," to ",e.endIndex()," of ",e.coaData().count," entries ")}}function ge(t,p){if(t&1){let e=v();n(0,"p-card")(1,"p-table",8),w("onPage",function(c){b(e);let M=m(2);return S(M.onPageChange(c))}),u(2,se,11,0,"ng-template",null,2,s)(4,de,13,9,"ng-template",null,3,s)(6,ue,3,3,"ng-template",null,4,s),a()()}if(t&2){let e=m(2);r(),g("paginator",!0)("lazy",!0)("totalRecords",e.coaData().count)("scrollable",!0)("scrollHeight","calc(100vh - 200px)")("rows",e.pagination().RowCount)("value",e.coaData().data)("tableStyle",P(8,ce))}}function _e(t,p){if(t&1&&u(0,ge,8,9,"p-card",7),t&2){let e=m();g("ngIf",e.coaData())}}var ie=(()=>{class t{constructor(){this.pagination=_({PageNumber:1,RowCount:20}),this.coaService=d(O),this.toastrService=d($),this.coaData=_(null),this.fetchCoaData=ee(N(V(e=>this.coaService.getGenerateCoa(e).pipe(te({next:i=>this.coaData.set(i),error:i=>console.error(i)}))))),this.startIndex=J(()=>this.pagination()?(this.pagination().PageNumber-1)*this.pagination().RowCount+1:0),this.endIndex=J(()=>this.pagination()?Math.min(this.pagination().PageNumber*this.pagination().RowCount,this.coaData()?.count||0):0)}ngOnInit(){this.fetchCoaData(this.pagination)}onPageChange(e){this.pagination.update(i=>x(C({},i),{PageNumber:Math.floor(e.first/e.rows)+1}))}updateCoaBalance(){this.coaService.updateCOABalance({observe:"response"}).pipe(T(e=>{e instanceof z&&this.toastrService.success(e.body?.message,"Success")})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-tools-update-coa"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["pageTitle","Generate COA"],["label","Update",3,"onClick"],[4,"ngIf"],[3,"onPage","paginator","lazy","totalRecords","scrollable","scrollHeight","rows","value","tableStyle"],[1,"d-flex"]],template:function(i,c){i&1&&(n(0,"app-main-panel",5),u(1,me,1,0,"ng-template",null,0,s)(3,_e,1,1,"ng-template",null,1,s),a())},dependencies:[D,B,I,Y,X,R,y,U,W,Q],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var fe=()=>[20,50,100];function he(t,p){t&1&&(n(0,"tr")(1,"th"),o(2,"Code"),a(),n(3,"th"),o(4,"Name"),a(),n(5,"th"),o(6,"Outlet"),a(),n(7,"th"),o(8,"Same Balance"),a(),n(9,"th"),o(10,"Balance"),a(),n(11,"th"),o(12,"Correct Balance"),a()())}function Ce(t,p){if(t&1&&(n(0,"tr")(1,"td"),o(2),a(),n(3,"td"),o(4),a(),n(5,"td"),o(6),a(),n(7,"td"),A(8,"p-toggleswitch",6),a(),n(9,"td"),o(10),f(11,"number"),a(),n(12,"td"),o(13),f(14,"number"),a()()),t&2){let e=p.$implicit;r(2),l(e.Code),r(2),l(e.Name),r(2),l(e.OutletName),r(2),g("trueValue",e.IsSameBalance),r(2),l(h(11,6,e.Balance)),r(3),l(h(14,8,e.CorrectBalance))}}function xe(t,p){if(t&1){let e=v();n(0,"p-table",5),w("onPage",function(c){b(e);let M=m(2);return S(M.onPageChange(c))}),u(1,he,13,0,"ng-template",null,1,s)(3,Ce,15,10,"ng-template",null,2,s),a()}if(t&2){let e=m(2);g("value",e.unbalanceJournal().data)("scrollable",!0)("scrollHeight","calc(100vh - 150px)")("paginator",!0)("rows",+e.pageData().RowCount)("totalRecords",e.unbalanceJournal().count)("rowsPerPageOptions",P(7,fe))}}function be(t,p){if(t&1&&u(0,xe,5,8,"p-table",4),t&2){let e=m();g("ngIf",e.unbalanceJournal())}}var re=(()=>{class t{constructor(){this.toolsService=d(O),this.unbalanceJournal=_(null),this.fb=d(G),this.pageData=_({PageNumber:1,RowCount:20}),H(()=>{let e=this.pageData();e.PageNumber&&e.RowCount&&this.fetchUnbalanceJournal()}),this.formFilter=this.fb.group({PageNumber:[1],RowCount:[20]})}loadUnbalanceJournal(e){console.log("loadUnbalanceJournal",e);let i=(e.first??0)/(e.rows??20)+1,c=e.rows??20;this.pageData.set(x(C({},this.pageData()),{PageNumber:i,RowCount:c}))}fetchUnbalanceJournal(){this.toolsService.getUnbalanceJournal(this.pageData()).pipe(Z("response"),T(e=>this.unbalanceJournal.set(e))).subscribe()}onPageChange(e){console.log("Page changed to: ",e),this.pageData.set(x(C({},this.pageData()),{PageNumber:e.first/e.rows+1,RowCount:e.rows}))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=E({type:t,selectors:[["app-unbalance-journal"]],decls:3,vars:0,consts:[["content",""],["header",""],["body",""],["pageTitle","Unbalance Journal"],["paginatorStyleClass","d-flex justify-content-end","lazy","",3,"value","scrollable","scrollHeight","paginator","rows","totalRecords","rowsPerPageOptions","onPage",4,"ngIf"],["paginatorStyleClass","d-flex justify-content-end","lazy","",3,"onPage","value","scrollable","scrollHeight","paginator","rows","totalRecords","rowsPerPageOptions"],["readonly","",3,"trueValue"]],template:function(i,c){i&1&&(n(0,"app-main-panel",3),u(1,be,1,1,"ng-template",null,0,s),a())},dependencies:[D,B,I,ae,ne,K,R,y,U,L],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var lt=[{path:"",redirectTo:"generate-coa",pathMatch:"full"},{path:"generate-coa",component:ie},{path:"unbalance-journal",component:re}];export{lt as TOOLS_ROUTES};
|
package/chunk-I7T4W6G2.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import{e as pe}from"./chunk-EHULZLLD.js";import{c as re}from"./chunk-AVL6C3VX.js";import{f as ce,g as se}from"./chunk-USO7UKRV.js";import{a as le}from"./chunk-26X2X35R.js";import{ca as ne,ja as oe,ka as ie,la as V,ta as ae}from"./chunk-35EULUGT.js";import{c as te,d as S,f as Q,g as B,h as M}from"./chunk-F2X3VGZZ.js";import{j as U,m as X,n as Y,o as Z,s as ee}from"./chunk-SJTXIIX5.js";import{Ib as f,Ic as J,Jb as i,Nb as C,Rc as F,Tb as d,Ub as m,Vb as T,Wb as x,Xb as I,Yb as P,Zb as w,ba as O,ca as $,cc as k,dc as s,ec as H,fb as a,fc as E,ha as A,hc as u,ic as N,jc as _,kc as g,mc as W,nc as K,pa as b,qa as y,sa as D,tb as j,ub as q,uc as L,wc as h,xb as R,xc as z,ya as v,yc as G,zb as c}from"./chunk-2VF35PRV.js";var ge=["header"],ue=["icons"],me=["content"],fe=["footer"],he=["headericons"],be=["contentWrapper"],ye=["*",[["p-header"]],[["p-footer"]]],Te=["*","p-header","p-footer"],ve=(e,o)=>({"p-panel p-component":!0,"p-panel-toggleable":e,"p-panel-expanded":o}),Ce=e=>({transitionParams:e,height:"0",opacity:"0"}),xe=e=>({value:"hidden",params:e}),Ie=e=>({transitionParams:e,height:"*",opacity:"1"}),Pe=e=>({value:"visible",params:e}),we=(e,o,t)=>({"p-panel-icons-start":e,"p-panel-icons-end":o,"p-panel-icons-center":t}),ke=e=>({$implicit:e});function Ee(e,o){if(e&1&&(d(0,"span",12),W(1),m()),e&2){let t=s(2);f("id",t.id+"_header"),a(),K(t._header)}}function Fe(e,o){e&1&&P(0)}function Se(e,o){}function Qe(e,o){e&1&&c(0,Se,0,0,"ng-template")}function Be(e,o){if(e&1&&T(0,"span"),e&2){let t=s(6);C(t.expandIcon)}}function Me(e,o){e&1&&T(0,"MinusIcon")}function Ve(e,o){if(e&1&&(x(0),c(1,Be,1,2,"span",16)(2,Me,1,0,"MinusIcon",14),I()),e&2){let t=s(5);a(),i("ngIf",t.expandIcon),a(),i("ngIf",!t.expandIcon)}}function De(e,o){if(e&1&&T(0,"span"),e&2){let t=s(6);C(t.collapseIcon)}}function Oe(e,o){e&1&&T(0,"PlusIcon")}function $e(e,o){if(e&1&&(x(0),c(1,De,1,2,"span",16)(2,Oe,1,0,"PlusIcon",14),I()),e&2){let t=s(5);a(),i("ngIf",t.collapseIcon),a(),i("ngIf",!t.collapseIcon)}}function Ae(e,o){if(e&1&&(x(0),c(1,Ve,3,2,"ng-container",14)(2,$e,3,2,"ng-container",14),I()),e&2){let t=s(4);a(),i("ngIf",!t.collapsed),a(),i("ngIf",t.collapsed)}}function je(e,o){}function qe(e,o){e&1&&c(0,je,0,0,"ng-template")}function Re(e,o){if(e&1&&c(0,Ae,3,2,"ng-container",14)(1,qe,1,0,null,15),e&2){let t=s(3);i("ngIf",!t.headerIconsTemplate&&!t._headerIconsTemplate&&!(t.toggleButtonProps!=null&&t.toggleButtonProps.icon)),a(),i("ngTemplateOutlet",t.headerIconsTemplate||t._headerIconsTemplate)("ngTemplateOutletContext",h(3,ke,t.collapsed))}}function He(e,o){if(e&1){let t=w();d(0,"p-button",13),k("click",function(n){b(t);let r=s(2);return y(r.onIconClick(n))})("keydown",function(n){b(t);let r=s(2);return y(r.onKeyDown(n))}),c(1,Re,2,5,"ng-template",null,1,J),m()}if(e&2){let t=s(2);i("text",!0)("rounded",!0)("buttonProps",t.toggleButtonProps),f("id",t.id+"_header")("aria-label",t.buttonAriaLabel)("aria-controls",t.id+"_content")("aria-expanded",!t.collapsed)}}function Ne(e,o){if(e&1){let t=w();d(0,"div",8),k("click",function(n){b(t);let r=s();return y(r.onHeaderClick(n))}),c(1,Ee,2,2,"span",9),E(2,1),c(3,Fe,1,0,"ng-container",6),d(4,"div",10),c(5,Qe,1,0,null,6)(6,He,3,7,"p-button",11),m()()}if(e&2){let t=s();f("id",t.id+"-titlebar"),a(),i("ngIf",t._header),a(2),i("ngTemplateOutlet",t.headerTemplate||t._headerTemplate),a(),i("ngClass",G(6,we,t.iconPos==="start",t.iconPos==="end",t.iconPos==="center")),a(),i("ngTemplateOutlet",t.iconTemplate||t._iconTemplate),a(),i("ngIf",t.toggleable)}}function We(e,o){e&1&&P(0)}function Ke(e,o){e&1&&P(0)}function Le(e,o){if(e&1&&(d(0,"div",17),E(1,2),c(2,Ke,1,0,"ng-container",6),m()),e&2){let t=s();a(2),i("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var ze=({dt:e})=>`
|
|
2
|
-
.p-panel {
|
|
3
|
-
border: 1px solid ${e("panel.border.color")};
|
|
4
|
-
border-radius: ${e("panel.border.radius")};
|
|
5
|
-
background: ${e("panel.background")};
|
|
6
|
-
color: ${e("panel.color")};
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.p-panel-header {
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
align-items: center;
|
|
13
|
-
padding: ${e("panel.header.padding")};
|
|
14
|
-
background: ${e("panel.header.background")};
|
|
15
|
-
color: ${e("panel.header.color")};
|
|
16
|
-
border-style: solid;
|
|
17
|
-
border-width: ${e("panel.header.border.width")};
|
|
18
|
-
border-color: ${e("panel.header.border.color")};
|
|
19
|
-
border-radius: ${e("panel.header.border.radius")};
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.p-panel-toggleable .p-panel-header {
|
|
23
|
-
padding: ${e("panel.toggleable.header.padding")};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.p-panel-title {
|
|
27
|
-
line-height: 1;
|
|
28
|
-
font-weight: ${e("panel.title.font.weight")};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.p-panel-content {
|
|
32
|
-
padding: ${e("panel.content.padding")};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.p-panel-footer {
|
|
36
|
-
padding: ${e("panel.footer.padding")};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* For PrimeNG */
|
|
40
|
-
.p-panel-toggleable.p-panel-expanded > .p-panel-content-container:not(.ng-animating) {
|
|
41
|
-
overflow: visible
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.p-panel-toggleable .p-panel-content-container {
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
}
|
|
47
|
-
`,Ge={root:({props:e})=>["p-panel p-component",{"p-panel-toggleable":e.toggleable}],header:"p-panel-header",title:"p-panel-title",headerActions:"p-panel-header-actions",pcToggleButton:"p-panel-toggle-button",contentContainer:"p-panel-content-container",content:"p-panel-content",footer:"p-panel-footer"},de=(()=>{class e extends ae{name="panel";theme=ze;classes=Ge;static \u0275fac=(()=>{let t;return function(n){return(t||(t=D(e)))(n||e)}})();static \u0275prov=O({token:e,factory:e.\u0275fac})}return e})();var Je=(()=>{class e extends le{toggleable;_header;collapsed;style;styleClass;iconPos="end";expandIcon;collapseIcon;showHeader=!0;toggler="icon";transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)";toggleButtonProps;collapsedChange=new v;onBeforeToggle=new v;onAfterToggle=new v;footerFacet;animating;headerTemplate;iconTemplate;contentTemplate;footerTemplate;headerIconsTemplate;_headerTemplate;_iconTemplate;_contentTemplate;_footerTemplate;_headerIconsTemplate;contentWrapperViewChild;id=ne("pn_id_");get buttonAriaLabel(){return this._header}_componentStyle=A(de);onHeaderClick(t){this.toggler==="header"&&this.toggle(t)}onIconClick(t){this.toggler==="icon"&&this.toggle(t)}toggle(t){if(this.animating)return!1;this.animating=!0,this.onBeforeToggle.emit({originalEvent:t,collapsed:this.collapsed}),this.toggleable&&(this.collapsed?this.expand():this.collapse()),this.cd.markForCheck(),t.preventDefault()}expand(){this.collapsed=!1,this.collapsedChange.emit(this.collapsed),this.updateTabIndex()}collapse(){this.collapsed=!0,this.collapsedChange.emit(this.collapsed),this.updateTabIndex()}getBlockableElement(){return this.el.nativeElement.children[0]}updateTabIndex(){this.contentWrapperViewChild&&this.contentWrapperViewChild.nativeElement.querySelectorAll('input, button, select, a, textarea, [tabindex]:not([tabindex="-1"])').forEach(l=>{this.collapsed?l.setAttribute("tabindex","-1"):l.removeAttribute("tabindex")})}onKeyDown(t){(t.code==="Enter"||t.code==="Space")&&(this.toggle(t),t.preventDefault())}onToggleDone(t){this.animating=!1,this.onAfterToggle.emit({originalEvent:t,collapsed:this.collapsed})}templates;ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this._headerTemplate=t.template;break;case"content":this._contentTemplate=t.template;break;case"footer":this._footerTemplate=t.template;break;case"icons":this._iconTemplate=t.template;break;case"headericons":this._headerIconsTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}static \u0275fac=(()=>{let t;return function(n){return(t||(t=D(e)))(n||e)}})();static \u0275cmp=j({type:e,selectors:[["p-panel"]],contentQueries:function(l,n,r){if(l&1&&(u(r,oe,5),u(r,ge,4),u(r,ue,4),u(r,me,4),u(r,fe,4),u(r,he,4),u(r,ie,4)),l&2){let p;_(p=g())&&(n.footerFacet=p.first),_(p=g())&&(n.headerTemplate=p.first),_(p=g())&&(n.iconTemplate=p.first),_(p=g())&&(n.contentTemplate=p.first),_(p=g())&&(n.footerTemplate=p.first),_(p=g())&&(n.headerIconsTemplate=p.first),_(p=g())&&(n.templates=p)}},viewQuery:function(l,n){if(l&1&&N(be,5),l&2){let r;_(r=g())&&(n.contentWrapperViewChild=r.first)}},inputs:{toggleable:[2,"toggleable","toggleable",F],_header:[0,"header","_header"],collapsed:[2,"collapsed","collapsed",F],style:"style",styleClass:"styleClass",iconPos:"iconPos",expandIcon:"expandIcon",collapseIcon:"collapseIcon",showHeader:[2,"showHeader","showHeader",F],toggler:"toggler",transitionOptions:"transitionOptions",toggleButtonProps:"toggleButtonProps"},outputs:{collapsedChange:"collapsedChange",onBeforeToggle:"onBeforeToggle",onAfterToggle:"onAfterToggle"},features:[L([de]),R],ngContentSelectors:Te,decls:8,vars:25,consts:[["contentWrapper",""],["icon",""],[3,"ngClass","ngStyle"],["class","p-panel-header",3,"click",4,"ngIf"],["role","region",1,"p-panel-content-container",3,"id"],[1,"p-panel-content"],[4,"ngTemplateOutlet"],["class","p-panel-footer",4,"ngIf"],[1,"p-panel-header",3,"click"],["class","p-panel-title",4,"ngIf"],[1,"p-panel-icons",3,"ngClass"],["severity","secondary","type","button","role","button","styleClass","p-panel-header-icon p-panel-toggler p-link",3,"text","rounded","buttonProps","click","keydown",4,"ngIf"],[1,"p-panel-title"],["severity","secondary","type","button","role","button","styleClass","p-panel-header-icon p-panel-toggler p-link",3,"click","keydown","text","rounded","buttonProps"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"class",4,"ngIf"],[1,"p-panel-footer"]],template:function(l,n){if(l&1){let r=w();H(ye),d(0,"div",2),c(1,Ne,7,10,"div",3),d(2,"div",4),k("@panelContent.done",function(_e){return b(r),y(n.onToggleDone(_e))}),d(3,"div",5,0),E(5),c(6,We,1,0,"ng-container",6),m(),c(7,Le,3,1,"div",7),m()()}l&2&&(C(n.styleClass),i("ngClass",z(14,ve,n.toggleable,!n.collapsed&&n.toggleable))("ngStyle",n.style),f("id",n.id)("data-pc-name","panel"),a(),i("ngIf",n.showHeader),a(),i("id",n.id+"_content")("@panelContent",n.collapsed?h(19,xe,h(17,Ce,n.animating?n.transitionOptions:"0ms")):h(23,Pe,h(21,Ie,n.animating?n.transitionOptions:"0ms"))),f("aria-labelledby",n.id+"_header")("aria-hidden",n.collapsed)("tabindex",n.collapsed?"-1":void 0),a(4),i("ngTemplateOutlet",n.contentTemplate||n._contentTemplate),a(),i("ngIf",n.footerFacet||n.footerTemplate||n._footerTemplate))},dependencies:[ee,U,X,Z,Y,pe,re,se,ce,V],encapsulation:2,data:{animation:[te("panelContent",[B("hidden",Q({height:"0"})),B("void",Q({height:"{{height}}"}),{params:{height:"0"}}),B("visible",Q({height:"*"})),M("visible <=> hidden",[S("{{transitionParams}}")]),M("void => hidden",S("{{transitionParams}}")),M("void => visible",S("{{transitionParams}}"))])]},changeDetection:0})}return e})(),bt=(()=>{class e{static \u0275fac=function(l){return new(l||e)};static \u0275mod=q({type:e});static \u0275inj=$({imports:[Je,V,V]})}return e})();export{Je as a,bt as b};
|
package/chunk-JXI4NDYT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d}from"./chunk-F6SXKAYF.js";import"./chunk-26X2X35R.js";import"./chunk-35EULUGT.js";import"./chunk-SJTXIIX5.js";import"./chunk-2VF35PRV.js";import"./chunk-EQDQRRRY.js";export{c as ScrollPanel,b as ScrollPanelClasses,d as ScrollPanelModule,a as ScrollPanelStyle};
|
package/chunk-KFKLJQ2D.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as He}from"./chunk-G4XX7EU2.js";import{a as et,b as je,c as Ue}from"./chunk-ROX6NFMK.js";import{a as Fe}from"./chunk-KO5IN2G2.js";import{a as qe,b as Ge}from"./chunk-Q4Y2IGA6.js";import"./chunk-ON4N4CPO.js";import"./chunk-GHZLR44M.js";import{a as H}from"./chunk-MEKP6D5H.js";import{c as we,d as Te}from"./chunk-F6SXKAYF.js";import{a as Pe,b as Ne}from"./chunk-UNNEEFI2.js";import{b as Ve,c as ke,h as Ae,j as Le,k as Oe,l as Be}from"./chunk-MS3UTNX6.js";import{g as oe,h as ae}from"./chunk-EHULZLLD.js";import"./chunk-AKZM2DMY.js";import"./chunk-AVL6C3VX.js";import{a as B,b as q}from"./chunk-G7MS6UI4.js";import{f as Me,g as O}from"./chunk-YNI2HWIV.js";import{f as re,g as L}from"./chunk-USO7UKRV.js";import"./chunk-CMHZLZ4E.js";import{t as ne,u as ie}from"./chunk-OVJSBJBH.js";import{b as X,c as N,e as V,f as Y,g as Ce,h as U,i as ye,j as J,l as Q,o as Z,s as Re,t as Se,u as ee}from"./chunk-E2RBYY7Q.js";import"./chunk-26X2X35R.js";import{ka as Ie}from"./chunk-35EULUGT.js";import{a as te,d as k,k as A}from"./chunk-LUH5EEUM.js";import{d as De}from"./chunk-YILEWAVV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-EBTC6B2W.js";import{j as be,m as M,q as $,r as K,s as P}from"./chunk-SJTXIIX5.js";import{Fa as b,Fc as C,Gc as z,Hc as F,Ic as h,J as W,Jb as p,Mb as xe,Tb as r,Ub as n,Uc as ve,Vb as c,X as ue,Z as I,Zb as y,ba as de,c as me,cc as w,dc as m,fb as l,ha as f,mc as a,nc as R,pa as _,qa as E,qc as fe,rc as _e,s as T,sc as Ee,tb as S,tc as he,va as ge,vc as pe,wc as D,zb as d}from"./chunk-2VF35PRV.js";import{a as g,b as x,e as Ze}from"./chunk-EQDQRRRY.js";var G=(()=>{class t{#e=f(De);#t=f(Fe);getRecurringExpenses(e){return this.#e.post(void 0,"api/RecurringExpense/GetList",e)}fetchRecurringExpenseForm(e){return this.#e.get(void 0,`api/RecurringExpense/form/${e??""}`)}fetchSupplierSuggestion(e){let i={count:100,prefix:e};return this.#e.post(`https://${this.#t.getFullDomain()}/`,"API/AC/GetSupplierSuggestion",i)}submitRecurringExpense(e,i={}){return this.#e.post(void 0,"api/RecurringExpense/submit",e,i)}removeRecurringExpense(e){return this.#e.delete(void 0,`api/RecurringExpense/${e}`,void 0)}removeRecurringExpenses(e){let i={body:e};return this.#e.delete(void 0,"api/RecurringExpense/Batch",i)}getRecurringExpenseByID(e){return this.#e.get(void 0,`api/RecurringExpense/Info/${e}`)}getAssetValueList(){return this.#e.get(void 0,"api/AssetValue/GetListt")}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=de({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var it=["class","page"],rt=t=>["details/",t];function ot(t,u){if(t&1){let e=y();r(0,"p-button",11),w("onClick",function(){_(e);let o=m(2);return E(o.onDeleteSelected())}),n()}}function at(t,u){if(t&1&&(r(0,"div",7),d(1,ot,1,0,"p-button",8),r(2,"a",9),c(3,"i",10),r(4,"span"),a(5,"Add"),n()()()),t&2){let e=m();l(),p("ngIf",e.isAnyRowSelected())}}function lt(t,u){t&1&&(r(0,"tr")(1,"th"),c(2,"p-tableHeaderCheckbox"),n(),r(3,"th"),a(4,"Outlet"),n(),r(5,"th"),a(6,"Name"),n(),r(7,"th"),a(8,"Expense Account"),n(),r(9,"th"),a(10,"Start Date"),n(),r(11,"th"),a(12,"End Date"),n(),r(13,"th"),a(14,"Last Expense"),n(),r(15,"th"),a(16,"Amount"),n(),r(17,"th"),a(18,"Frequency"),n()())}function pt(t,u){if(t&1&&(r(0,"tr")(1,"td"),c(2,"p-tableCheckbox",15),n(),r(3,"td"),a(4),n(),r(5,"td")(6,"a",16),a(7),n()(),r(8,"td"),a(9),n(),r(10,"td"),a(11),C(12,"date"),n(),r(13,"td"),a(14),C(15,"date"),n(),r(16,"td"),a(17),C(18,"date"),n(),r(19,"td"),a(20),C(21,"number"),n(),r(22,"td"),a(23),n()()),t&2){let e=u.$implicit;l(2),p("value",e),l(2),R(e.outletName),l(2),p("routerLink",D(21,rt,e.id)),l(),R(e.name),l(2),R(e.expenseName),l(2),R(F(12,10,e.startDate,"d MMM y")),l(3),R(F(15,13,e.endDate,"d MMM y")),l(3),R(F(18,16,e.lastExpenseDate,"d MMM y")),l(3),R(z(21,19,e.amount)),l(3),R(e.repeatTypeLabel)}}function ct(t,u){if(t&1&&(r(0,"div"),a(1),n()),t&2){let e=m(3);l(),fe(" Showing ",e.recurringExpenseFilter().PageNumber," to ",e.recurringExpenseFilter().RowCount," of ",e.recurringExpenseData().count," entries ")}}function st(t,u){if(t&1){let e=y();r(0,"p-card",13)(1,"p-table",14),w("onPage",function(o){_(e);let s=m(2);return E(s.onPageChange(o))})("onHeaderCheckboxToggle",function(o){_(e);let s=m(2);return E(s.onSelectAll(o))})("onRowSelect",function(o){_(e);let s=m(2);return E(s.onRowSelect(o))})("onRowUnselect",function(o){_(e);let s=m(2);return E(s.onRowUnselect(o))}),d(2,lt,19,0,"ng-template",null,3,h)(4,pt,24,23,"ng-template",null,4,h)(6,ct,2,3,"ng-template",null,5,h),n()()}if(t&2){let e=m(2);l(),p("scrollable",!0)("scrollHeight","calc(100vh - 200px)")("lazy",!0)("totalRecords",e.recurringExpenseData().count)("rows",e.recurringExpenseFilter().RowCount)("paginator",!0)("value",e.recurringExpenseData().data)}}function mt(t,u){if(t&1&&d(0,st,8,7,"p-card",12),t&2){let e=m();p("ngIf",e.recurringExpenseData())}}function ut(t,u){if(t&1&&(r(0,"form",17)(1,"div",18)(2,"label",19),a(3,"Outlet"),n(),c(4,"p-select",20),n()()),t&2){let e=m();p("formGroup",e.recurringExpenseForm),l(4),p("options",e.repeatType())}}var Ke=(()=>{class t{constructor(){this.recurringExpenseService=f(G),this.recurringExpenseFilter=b(null),this.visible=b(!1),this.recurringExpenseData=b(null),this.repeatType=b([{label:"Monthly",value:1},{label:"Yearly",value:2}]),this.isAnyRowSelected=ve(()=>this.recurringExpenseData()?this.recurringExpenseData().data.some(e=>e.checkbox):!1),this.loadRecurringExpenses=Pe(me(W(e=>this.recurringExpenseService.getRecurringExpenses(e).pipe(T(i=>x(g({},i),{data:i.data.map(o=>x(g({},o),{checkbox:!1}))})),Ne({next:i=>this.recurringExpenseData.set(i),error:i=>console.error(i)})))))}ngOnInit(){this.recurringExpenseFilter.set({PageNumber:1,RowCount:10,Text:null,Frequency:1}),this.loadRecurringExpenses(this.recurringExpenseFilter),this.generateRecurringExpenseForm()}onPageChange(e){this.recurringExpenseFilter.update(i=>x(g({},i),{PageNumber:e.first/e.rows+1}))}onSelectAll(e){this.recurringExpenseData.update(i=>x(g({},i),{data:i.data.map(o=>x(g({},o),{checkbox:e.checked}))}))}onRowSelect(e){this.recurringExpenseData.update(i=>x(g({},i),{data:i.data.map(o=>x(g({},o),{checkbox:e.data.id===o.id}))}))}onRowUnselect(e){Array.isArray(e.data)?this.recurringExpenseData.update(i=>x(g({},i),{data:i.data.map((o,s)=>x(g({},o),{checkbox:e.data[s].id===o.id?!1:o.checkbox}))})):e.data&&typeof e.data=="object"&&"id"in e.data&&this.recurringExpenseData.update(i=>x(g({},i),{data:i.data.map(o=>x(g({},o),{checkbox:e.data.id===o.id?!1:o.checkbox}))}))}onDeleteSelected(){let e=this.recurringExpenseData().data.filter(o=>o.checkbox).map(o=>o.id);if(e.length===0)return;(e.length===1?this.recurringExpenseService.removeRecurringExpense(e[0]):this.recurringExpenseService.removeRecurringExpenses(e)).pipe(H("response")).pipe(I(()=>this.loadRecurringExpenses(this.recurringExpenseFilter))).subscribe()}onSearchEvent(e){console.log(e),this.recurringExpenseFilter.update(i=>x(g({},i),{Text:e.trim()}))}onFilterEvent(){this.visible.update(e=>!e)}onSubmitFilterDialog(){let e=this.recurringExpenseForm.value;Object.keys(e).forEach(i=>{this.recurringExpenseFilter.update(o=>x(g({},o),{[i]:e[i]}))}),this.visible.update(i=>!i)}onUpdateFilter(e,i){this.recurringExpenseFilter.update(o=>x(g({},o),{[e]:i}))}generateRecurringExpenseForm(){this.recurringExpenseForm=new Ce({PageNumber:new U(1),RowCount:new U(20),Text:new U(null),Frequency:new U(1)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-recurring-expense",8,"page"]],attrs:it,decls:7,vars:2,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["pageTitle","Recurring Expenses",3,"search","filterEmitted","isSearchableInput","isFilterable"],[1,"d-flex","gap-2"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["styleClass","h-100",4,"ngIf"],["styleClass","h-100"],["stripedRows","","dataKey","id",3,"onPage","onHeaderCheckboxToggle","onRowSelect","onRowUnselect","scrollable","scrollHeight","lazy","totalRecords","rows","paginator","value"],[3,"value"],[1,"link-primary",3,"routerLink"],[1,"d-flex","flex-column",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],["formControlName","Frequency","appendTo","body","optionLabel","label","optionValue","value","placeholder","Select Outlet",3,"options"]],template:function(i,o){if(i&1){let s=y();r(0,"app-main-panel",6),w("search",function(Qe){return _(s),E(o.onSearchEvent(Qe))})("filterEmitted",function(){return _(s),E(o.onFilterEvent())}),d(1,at,6,1,"ng-template",null,0,h)(3,mt,1,1,"ng-template",null,1,h)(5,ut,5,2,"ng-template",null,2,h),n()}i&2&&p("isSearchableInput",!0)("isFilterable",!0)},dependencies:[O,k,q,B,Be,Ae,Le,Oe,P,M,K,$,A,Me,ae,oe,L,re,ee,J,V,Y,Q,Z],styles:["[_nghost-%COMP%]{display:block} .p-card{height:100%} .p-card .p-card-body{height:inherit} .p-card .p-card-body .p-card-content{height:inherit}"],changeDetection:0})}}return t})();var j=Ze(et());var xt=["class","page"],ft=()=>[".."],_t=()=>({width:"100%",height:"calc(100vh - 200px)"}),ce=t=>({"ng-dirty ng-invalid":t});function Et(t,u){if(t&1){let e=y();r(0,"div",4)(1,"a",5),a(2," Cancel "),n(),r(3,"p-button",6),w("click",function(){_(e);let o=m();return E(o.onSubmit())}),n()()}t&2&&(l(),p("routerLink",pe(1,ft)))}function ht(t,u){t&1&&(r(0,"div",30)(1,"div",31),a(2,"Form"),n()())}function vt(t,u){t&1&&(r(0,"small",33),a(1,"Name is required"),n())}function bt(t,u){if(t&1&&(r(0,"div"),d(1,vt,2,0,"small",32),n()),t&2){let e=m(3);l(),p("ngIf",e.recurringExpenseForm.controls.name.errors.required)}}function Ct(t,u){t&1&&(r(0,"small",33),a(1,"Amount is required"),n())}function yt(t,u){t&1&&(r(0,"small",33),a(1,"Invalid amount format"),n())}function Rt(t,u){if(t&1&&(r(0,"div"),d(1,Ct,2,0,"small",32)(2,yt,2,0,"small",32),n()),t&2){let e=m(3);l(),p("ngIf",e.recurringExpenseForm.controls.amount.errors.required),l(),p("ngIf",e.recurringExpenseForm.controls.amount.errors.pattern)}}function St(t,u){if(t&1){let e=y();r(0,"div",8)(1,"div",9)(2,"p-card",10),d(3,ht,3,0,"ng-template",11),r(4,"p-scrollPanel")(5,"div",8)(6,"div",12)(7,"form",13)(8,"div",14)(9,"div",15,2)(11,"div",16)(12,"label",17),a(13,"Outlet"),n(),c(14,"p-select",18),n()(),r(15,"div",15)(16,"div",16)(17,"label",17),a(18,"Name"),n(),c(19,"input",19),d(20,bt,2,1,"div",20),n()(),r(21,"div",15)(22,"div",16)(23,"label",17),a(24,"From"),n(),c(25,"p-datepicker",21),n()(),r(26,"div",15)(27,"div",16)(28,"label",17),a(29,"To"),n(),c(30,"p-datepicker",22),n()(),r(31,"div",15)(32,"div",16)(33,"label",17),a(34,"Contact"),n(),r(35,"p-autocomplete",23),w("completeMethod",function(o){_(e);let s=m(2);return E(s.searchContact(o))}),n()()(),c(36,"div",12),n(),c(37,"hr"),r(38,"div",14)(39,"div",15)(40,"div",16)(41,"label",17),a(42,"Amount"),n(),c(43,"input",24),d(44,Rt,3,2,"div",20),n()(),r(45,"div",15)(46,"div",16)(47,"label",17),a(48,"Frequency"),n(),c(49,"p-select",25),n()(),r(50,"div",15)(51,"div",16)(52,"label",17),a(53,"Payment"),n(),c(54,"p-select",26),n()(),r(55,"div",15)(56,"div",16)(57,"label",17),a(58,"Expense"),n(),c(59,"p-select",27),n()(),r(60,"div",28)(61,"div",16)(62,"label",17),a(63,"Description"),n(),c(64,"textarea",29),n()()()()()()()()()()}if(t&2){let e=m(2);l(4),xe(pe(17,_t)),l(3),p("formGroup",e.recurringExpenseForm),l(7),p("options",e.recurringExpenseData().options.entities),l(5),p("ngClass",D(18,ce,e.isInvalid("name"))),l(),p("ngIf",e.isInvalid("name")),l(5),p("iconDisplay","input")("showIcon",!0),l(5),p("iconDisplay","input")("showIcon",!0),l(5),p("suggestions",e.supplierSuggestions()),l(8),p("ngClass",D(20,ce,e.isInvalid("amount"))),l(),p("ngIf",e.isInvalid("amount")),l(5),p("options",e.recurringExpenseData().options.frequency),l(5),p("ngClass",D(22,ce,e.recurringExpenseForm.controls.paymentAccountID.invalid&&(e.recurringExpenseForm.controls.paymentAccountID.dirty||e.recurringExpenseForm.controls.paymentAccountID.touched)))("options",e.recurringExpenseData().options.assets),l(5),p("options",e.recurringExpenseData().options.expenses)}}function Dt(t,u){if(t&1&&d(0,St,65,24,"div",7),t&2){let e=m();p("ngIf",e.recurringExpenseData())}}var se=(()=>{class t{constructor(){this.recurringExpenseService=f(G),this.fb=f(Re),this.destroyRef=f(ge),this.route=f(te),this.recurringExpenseData=b(null),this.supplierSuggestions=b([])}ngOnInit(){this.initializeForm(),this.fetchRecurringExpenseForm()}initializeForm(){this.recurringExpenseForm=this.fb.group({id:this.fb.control(""),name:this.fb.control("",[N.required]),repeatTypeID:this.fb.control(1,[N.required]),startDate:this.fb.control((0,j.default)().toISOString()),endDate:this.fb.control(null),lastExpenseDate:this.fb.control(""),amount:this.fb.control(0,[N.required]),paymentAccountID:this.fb.control(null,[N.required]),expenseAccountID:this.fb.control(null,[N.required]),contactID:this.fb.control(""),description:this.fb.control(""),repeatTypeLabel:this.fb.control(""),outletID:this.fb.control(""),creatorID:this.fb.control(""),created:this.fb.control(""),modifierID:this.fb.control(""),modified:this.fb.control("")},{updateOn:"change"})}fetchRecurringExpenseForm(){this.route.paramMap.pipe(T(e=>e.get("id")),ue(e=>e?this.recurringExpenseService.fetchRecurringExpenseForm(e):this.recurringExpenseService.fetchRecurringExpenseForm()),I(e=>{this.recurringExpenseData.set(e),this.updateFormWithRecurringExpense(e.form)})).subscribe()}updateFormWithRecurringExpense(e){let i=Object.entries(e).reduce((o,[s,v])=>{switch(s){case"startDate":o[s]=(0,j.default)(v).isSame((0,j.default)("0001-01-01T00:00:00"))?(0,j.default)().toDate():(0,j.default)(v).toDate();break;case"repeatTypeID":o[s]=1;break;case"contactID":o[s]=v===He?"":v;break;default:o[s]=v}return o},{});this.recurringExpenseForm.patchValue(i)}searchContact(e){this.recurringExpenseService.fetchSupplierSuggestion(e.query).pipe(I(this.supplierSuggestions.set)).subscribe()}onSubmit(){let e=this.recurringExpenseForm.value;if(this.recurringExpenseForm.invalid){this.recurringExpenseForm.markAllAsTouched();return}let i=Object.entries(e).reduce((o,[s,v])=>(s==="amount"?o[s]=Number(v):o[s]=v,o),{});this.recurringExpenseService.submitRecurringExpense(i,{observe:"response"}).pipe().subscribe()}isInvalid(e){let i=this.recurringExpenseForm.get(e);return i.invalid&&(i.dirty||i.touched)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-recurring-expense-form",8,"page"]],attrs:xt,decls:5,vars:0,consts:[["actionButton",""],["content",""],["outlet",""],["pageTitle","Recurring Expense Form"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit","icon","fa-solid fa-plus",3,"click"],["class","row justify-content-center",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-6"],["styleClass","h-100"],["pTemplate","header"],[1,"col"],[1,"d-flex","flex-column","row-gap-4",3,"formGroup"],[1,"row","row-gap-4"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["formControlName","name","type","text","pInputText","",3,"ngClass"],[4,"ngIf"],["dateFormat","mm/dd/yy","appendTo","body","formControlName","startDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","endDate","styleClass","w-100","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","contactID","inputStyleClass","w-100","styleClass","w-100","optionLabel","Value","optionValue","Key",3,"completeMethod","suggestions"],["formControlName","amount","type","text","pInputText","",3,"ngClass"],["formControlName","repeatTypeID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],["formControlName","paymentAccountID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"ngClass","options"],["formControlName","expenseAccountID","optionLabel","value","optionValue","key","placeholder","Select Outlet",3,"options"],[1,"col","col-lg-12"],["formControlName","description","rows","5","cols","30","pTextarea",""],[1,"row","px-4","py-2"],[1,"col-4","fs-6"],["class","text-danger",4,"ngIf"],[1,"text-danger"]],template:function(i,o){i&1&&(r(0,"app-main-panel",3),d(1,Et,4,2,"ng-template",null,0,h)(3,Dt,1,1,"ng-template",null,1,h),n())},dependencies:[O,q,B,Ie,ie,ne,ae,oe,ke,Ve,Ue,je,Ge,qe,Te,we,P,be,M,ee,J,X,V,Y,Q,Z,A,k,L,re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ft=["class","page"],It=t=>["/recurring/recurring-expense/edit",t];function wt(t,u){if(t&1&&(r(0,"button",2),c(1,"i",3),r(2,"span"),a(3,"Delete"),n()(),r(4,"a",4),c(5,"i",5),r(6,"span"),a(7,"Edit"),n()()),t&2){let e=m();l(4),p("routerLink",D(1,It,e.currentRecurringExpense().id))}}function Tt(t,u){if(t&1){let e=y();r(0,"p-card",9)(1,"div",6)(2,"div",10)(3,"div",11)(4,"div",10)(5,"div",12)(6,"div",13)(7,"div",14)(8,"label",15),a(9,"Name"),n(),r(10,"input",16),he("ngModelChange",function(o){_(e);let s=m(2);return Ee(s.currentRecurringExpense().name,o)||(s.currentRecurringExpense().name=o),E(o)}),n()()(),c(11,"div",13),r(12,"div",13)(13,"div",14)(14,"label",15),a(15,"Start"),n(),c(16,"input",17),C(17,"date"),n()(),r(18,"div",13)(19,"div",14)(20,"label",15),a(21,"End"),n(),c(22,"input",17),C(23,"date"),n()(),r(24,"div",13)(25,"div",14)(26,"label",15),a(27,"Contact"),n(),c(28,"input",17),C(29,"date"),n()(),r(30,"div",18)(31,"div",14)(32,"label",15),a(33,"Description"),n(),c(34,"textarea",19),n()()(),c(35,"hr"),r(36,"div",11)(37,"div",13)(38,"div",14)(39,"label",15),a(40,"Amount"),n(),c(41,"input",17),C(42,"number"),n()(),r(43,"div",13)(44,"div",14)(45,"label",15),a(46,"Frequency"),n(),c(47,"input",17),n()(),r(48,"div",13)(49,"div",14)(50,"label",15),a(51,"Payment"),n(),c(52,"input",17),n()(),r(53,"div",13)(54,"div",14)(55,"label",15),a(56,"Expense"),n(),c(57,"input",17),n()()()()()()()()}if(t&2){let e=m(2);l(10),_e("ngModel",e.currentRecurringExpense().name),l(6),p("value",F(17,9,e.currentRecurringExpense().startDate,"d MMM y")),l(6),p("value",F(23,12,e.currentRecurringExpense().endDate,"d MMM y")),l(6),p("value",F(29,15,e.currentRecurringExpense().endDate,"d MMM y")),l(6),p("value",e.currentRecurringExpense().description),l(7),p("value",z(42,18,e.currentRecurringExpense().amount)),l(6),p("value",e.currentRecurringExpense().repeatTypeLabel),l(5),p("value",e.currentRecurringExpense().paymentName),l(5),p("value",e.currentRecurringExpense().expenseName)}}function Mt(t,u){if(t&1&&(r(0,"div",6)(1,"div",7),d(2,Tt,58,20,"p-card",8),n()()),t&2){let e=m();l(2),p("ngIf",e.currentRecurringExpense())}}var Xe=(()=>{class t{constructor(){this.recurringExpenseService=f(G),this.route=f(te),this.currentRecurringExpense=b(null)}ngOnInit(){this.route.paramMap.pipe(T(e=>e.get("id")),H("params"),W(e=>this.recurringExpenseService.getRecurringExpenseByID(e)),I(e=>this.currentRecurringExpense.set(e)),H("recurringExpense")).subscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-recurring-expense-info",8,"page"]],attrs:Ft,decls:5,vars:0,consts:[["actionButton",""],["content",""],[1,"btn","btn-outline-secondary","rounded","d-flex","gap-2","align-items-center"],[1,"fa-solid","fa-trash"],[1,"btn","btn-outline-secondary","rounded","d-flex","gap-2","align-items-center",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],[1,"row","justify-content-center"],[1,"col-6"],["styleClass","h-100","header","Details",4,"ngIf"],["styleClass","h-100","header","Details"],[1,"col"],[1,"row"],[1,"row","row-gap-4"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["disabled","","type","text","pInputText","",3,"ngModelChange","ngModel"],["disabled","","type","text","pInputText","",3,"value"],[1,"col","col-lg-12"],["disabled","","rows","5","cols","30","pTextarea","",3,"value"]],template:function(i,o){i&1&&(r(0,"app-main-panel"),d(1,wt,8,3,"ng-template",null,0,h)(3,Mt,3,1,"ng-template",null,1,h),n())},dependencies:[O,q,B,P,M,K,$,ie,ne,Se,X,V,ye,L,A,k],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Ye=[{path:"",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",component:Ke},{path:"create",component:se},{path:"details/:id",component:Xe},{path:"edit/:id",component:se}]}];var Je=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=S({type:t,selectors:[["app-asset-value"]],decls:0,vars:0,template:function(i,o){},encapsulation:2})}}return t})();var Xn=[{path:"",redirectTo:"recurring-expense",pathMatch:"full"},{path:"recurring-expense",children:Ye},{path:"asset-value",component:Je}];export{Xn as RECURRING_ROUTES};
|
package/chunk-KLKIGY44.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as n}from"./chunk-YILEWAVV.js";import{ba as e,ha as i}from"./chunk-2VF35PRV.js";var g=(()=>{class t{constructor(){this.httpService=i(n)}migrateTaxAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/tax",{})}migrateCoaAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccount",{})}migrateCoaConfig(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountConfig",{})}migrateCoaCategory(){return this.httpService.post(void 0,"api/Migrate/accounting/chartOfAccountCategory",{})}migrateOutletAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/outletaccount",{})}migrateManualJournal(){return this.httpService.post(void 0,"api/Migrate/accounting/journalheader",{})}formatManualJournal(){return this.httpService.delete(void 0,"api/Migrate/accounting/truncate-journal",{})}migratePaymentMethod(){return this.httpService.post(void 0,"api/Migrate/accounting/paymentmethodaccount",{})}migrateWriteOffOutlet(){return this.httpService.post(void 0,"api/Migrate/accounting/writeoffoutletaccount",{})}migrateExpenseAccount(){return this.httpService.post(void 0,"api/Migrate/accounting/expenseaccount",{})}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275prov=e({token:t,factory:t.\u0275fac})}}return t})();export{g as a};
|
package/chunk-KO5IN2G2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as g}from"./chunk-LUH5EEUM.js";import{d as m}from"./chunk-YILEWAVV.js";import{Z as s,ba as l,ha as c}from"./chunk-2VF35PRV.js";var a=class extends Error{};a.prototype.name="InvalidTokenError";function T(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 T(r)}catch{return atob(r)}}function u(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(["/authentication/login"])}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=u(t);e&&localStorage.setItem("AC_TENANT",e.TID)}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};
|