dealposbooks 5.33.2 → 5.34.1
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 +15 -15
- package/{chunk-YDEVG4CR.js → chunk-2KERKGCG.js} +1 -1
- package/chunk-2NODLQR6.js +1 -0
- package/{chunk-BPAXVUBR.js → chunk-2YCI2ZLH.js} +1 -1
- package/{chunk-Q33XIUDN.js → chunk-3NU3P6NL.js} +1 -1
- package/{chunk-EDCDR4RJ.js → chunk-3VJJTR55.js} +1 -1
- package/{chunk-5R3XKSDM.js → chunk-4CDAAU6Z.js} +1 -1
- package/{chunk-42UIGXWH.js → chunk-4DOELXOP.js} +1 -1
- package/chunk-4QYZNOBR.js +160 -0
- package/chunk-4WMH4AEV.js +1 -0
- package/{chunk-EXGI2AG7.js → chunk-5E7SENLI.js} +1 -1
- package/{chunk-67VPWIWW.js → chunk-5FSMHZSY.js} +1 -1
- package/{chunk-R2SYW2WU.js → chunk-5MWVNA7L.js} +2 -2
- package/{chunk-KJ6CKUEI.js → chunk-5XDCBC5Q.js} +1 -1
- package/chunk-6DNEPPVS.js +129 -0
- package/chunk-6NTWTJMB.js +1 -0
- package/chunk-6OLVNISY.js +202 -0
- package/chunk-6XMT5N3G.js +1 -0
- package/{chunk-HHJMN4BS.js → chunk-AACWH3EJ.js} +1 -1
- package/{chunk-ABBBWSSO.js → chunk-B46T5XRJ.js} +1 -1
- package/{chunk-2CSSUKCF.js → chunk-BBQJC5RS.js} +1 -1
- package/chunk-BG6PUELE.js +1 -0
- package/{chunk-HICPZPJI.js → chunk-BGOI3WIG.js} +1 -1
- package/{chunk-VFEEFGWW.js → chunk-BLQJXMNV.js} +1 -1
- package/{chunk-6UGXXSQ3.js → chunk-BV4GM72W.js} +1 -1
- package/chunk-BY6QUHQI.js +1 -0
- package/{chunk-AZUQDRJU.js → chunk-DHW7UHFT.js} +1 -1
- package/{chunk-LRRVQSMI.js → chunk-DLUALPHU.js} +1 -1
- package/{chunk-PI5RBOCG.js → chunk-E7RUVUID.js} +1 -1
- package/chunk-ED5LANRC.js +1 -0
- package/{chunk-QYXQYPHB.js → chunk-EDGADVEY.js} +1 -1
- package/chunk-FIK2YCVV.js +1 -0
- package/{chunk-YOUPD27G.js → chunk-FLZXCWDU.js} +1 -1
- package/{chunk-GH5Z5SPB.js → chunk-FUZFAJGJ.js} +1 -1
- package/{chunk-FMVCTBCQ.js → chunk-G5S5AZA7.js} +4 -4
- package/{chunk-PKN47FQE.js → chunk-GDX5XEV3.js} +1 -1
- package/chunk-GDXGKHOL.js +1 -0
- package/chunk-GGVVJNM3.js +1 -0
- package/{chunk-4LGDNQMZ.js → chunk-H57SDRPH.js} +1 -1
- package/chunk-HIPJS62A.js +1 -0
- package/chunk-HJU5H3BY.js +1 -0
- package/chunk-HO4P24NF.js +1 -0
- package/chunk-ID36VIZQ.js +1 -0
- package/chunk-IDW6F2F3.js +1 -0
- package/chunk-IICRNXZ2.js +1 -0
- package/chunk-J7NE4FZG.js +1 -0
- package/chunk-JF4X2NRA.js +1 -0
- package/{chunk-JBSIAXM5.js → chunk-JMEBBWX4.js} +1 -1
- package/{chunk-FBEBMNVC.js → chunk-JTDJJORR.js} +1 -1
- package/{chunk-J4XRJAME.js → chunk-JYCUE5HV.js} +1 -1
- package/{chunk-WTBARN66.js → chunk-KL455HIW.js} +3 -3
- package/{chunk-JL2CN3ZY.js → chunk-LGRJSELQ.js} +1 -1
- package/{chunk-QCLAOAVG.js → chunk-LWLJZPBI.js} +1 -1
- package/{chunk-6NGIQJIP.js → chunk-LZUGPBFD.js} +1 -1
- package/chunk-MQDQSWR6.js +1 -0
- package/chunk-MXNRSORU.js +1 -0
- package/chunk-NEXPS7KD.js +1 -0
- package/{chunk-TVNXFJII.js → chunk-NJO5TWIA.js} +1 -1
- package/{chunk-RPPLUBX5.js → chunk-NMVZFOQ7.js} +1 -1
- package/chunk-NUTKQRB6.js +1 -0
- package/chunk-NXXA2OTE.js +1 -0
- package/chunk-OGLSZ3RG.js +1 -0
- package/chunk-OKCHQM5Q.js +2 -0
- package/{chunk-GY4LV6HX.js → chunk-PVXR4USB.js} +1 -1
- package/{chunk-YO23YVSC.js → chunk-Q23KXB3T.js} +1 -1
- package/chunk-QZUCPIZP.js +1 -0
- package/{chunk-6LENP6AB.js → chunk-RN2UFUFZ.js} +1 -1
- package/{chunk-OLOVFS3Y.js → chunk-S6X7PJAB.js} +1 -1
- package/{chunk-BMBVCXB4.js → chunk-SLHUSJER.js} +1 -1
- package/{chunk-EW3R2HAB.js → chunk-SVXDMOLP.js} +1 -1
- package/{chunk-BLJMNWUM.js → chunk-SY6XFKYM.js} +1 -1
- package/{chunk-33PMTNWY.js → chunk-T4EHT3H4.js} +1 -1
- package/chunk-TF5WKDAX.js +1 -0
- package/chunk-U2LBDVNR.js +1 -0
- package/{chunk-MWDWM2EU.js → chunk-UQZHGK5W.js} +1 -1
- package/chunk-UW2MQD5Q.js +130 -0
- package/{chunk-BDDB5AS7.js → chunk-VS7EWHRJ.js} +1 -1
- package/{chunk-NA5YXAMJ.js → chunk-VVUSFS6O.js} +1 -1
- package/chunk-WSOH6CXK.js +180 -0
- package/chunk-WURLP7FN.js +1 -0
- package/{chunk-C7LM5UCK.js → chunk-X22YKT5B.js} +1 -1
- package/{chunk-B7WHT2EP.js → chunk-XAWSZFE3.js} +4 -4
- package/chunk-XFEO3TKF.js +1 -0
- package/{chunk-SUYXXZHZ.js → chunk-XMMQFUBI.js} +1 -1
- package/chunk-XSPQTUYD.js +1 -0
- package/chunk-Y5C5TOKB.js +1 -0
- package/chunk-YDTKSUC7.js +1 -0
- package/{chunk-2PDTOOPI.js → chunk-YEUGY3NM.js} +1 -1
- package/chunk-YL2UL62U.js +7 -0
- package/{chunk-P7Z64VPC.js → chunk-YPBGL37O.js} +1 -1
- package/{chunk-HHDFSN55.js → chunk-YYDAQ7AW.js} +1 -1
- package/{chunk-YRCXWYJC.js → chunk-YYVQS5LF.js} +1 -1
- package/chunk-Z45NTTES.js +1 -0
- package/{chunk-253IFSMV.js → chunk-ZTEDQLOG.js} +1 -1
- package/index.html +35 -2
- package/main-JOMQDR5F.js +1 -0
- package/package.json +1 -1
- package/chunk-2WBUZJAU.js +0 -1
- package/chunk-452RR3Q5.js +0 -1
- package/chunk-4BWEZFB4.js +0 -1
- package/chunk-4W2QF5R5.js +0 -130
- package/chunk-5R5OXGVI.js +0 -1
- package/chunk-62S343UQ.js +0 -1
- package/chunk-6ACYDH2N.js +0 -1
- package/chunk-7MHKOL2S.js +0 -129
- package/chunk-AGLKA7OG.js +0 -1
- package/chunk-AWXT2WGR.js +0 -180
- package/chunk-B63BKC6F.js +0 -2
- package/chunk-GQWMJTTS.js +0 -1
- package/chunk-GYKMLBSE.js +0 -1
- package/chunk-HD2SASNC.js +0 -1
- package/chunk-HNPBGZU4.js +0 -1
- package/chunk-JMFWGTOZ.js +0 -1
- package/chunk-JT7FHN7T.js +0 -1
- package/chunk-LMNTEWLI.js +0 -1
- package/chunk-LRQ6Z4ZX.js +0 -1
- package/chunk-MNFWDRDS.js +0 -1
- package/chunk-N7OV4C3V.js +0 -1
- package/chunk-NI56PZU2.js +0 -1
- package/chunk-OD62LD7H.js +0 -160
- package/chunk-OLUQUWUK.js +0 -1
- package/chunk-P37DL4A6.js +0 -1
- package/chunk-PBN5IYNX.js +0 -1
- package/chunk-PDFK6YU3.js +0 -1
- package/chunk-Q25US4N2.js +0 -1
- package/chunk-QAQ2CXF3.js +0 -202
- package/chunk-RPZIOMLU.js +0 -1
- package/chunk-RVEUNKOZ.js +0 -1
- package/chunk-SHEVSJ34.js +0 -1
- package/chunk-U2WKXQQF.js +0 -1
- package/chunk-UEWFM35O.js +0 -1
- package/chunk-VAXEGESW.js +0 -1
- package/chunk-VXM4FDHN.js +0 -7
- package/chunk-Y6H6VNCN.js +0 -1
- package/chunk-ZGXJEG37.js +0 -1
- package/chunk-ZXCNQW44.js +0 -1
- package/main-GHHA6Y2C.js +0 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import{a as pt,b as ut}from"./chunk-B46T5XRJ.js";import{a as dt}from"./chunk-BTDW4G2F.js";import{a as $n,b as Pe,c as Me,d as Kn}from"./chunk-5XDCBC5Q.js";import{a as Rn,b as Bn}from"./chunk-YYVQS5LF.js";import"./chunk-FLZXCWDU.js";import{a as qn,b as zn}from"./chunk-NJO5TWIA.js";import{a as Gn}from"./chunk-XKI7WLHE.js";import{a as Dn}from"./chunk-Q23KXB3T.js";import"./chunk-DHW7UHFT.js";import{a as Ee}from"./chunk-BY6QUHQI.js";import"./chunk-C2GO6SPF.js";import{a as at,b as lt}from"./chunk-O4QM64EH.js";import{a as ct,b as mt,c as On,d as Fn,i as Nn,j as Vn,k as Ln}from"./chunk-SVXDMOLP.js";import"./chunk-S6X7PJAB.js";import"./chunk-LWLJZPBI.js";import"./chunk-3NU3P6NL.js";import{a as Z}from"./chunk-NMVZFOQ7.js";import{a as E}from"./chunk-XKCLERWG.js";import{b as vn}from"./chunk-H57SDRPH.js";import{a as yn}from"./chunk-GDX5XEV3.js";import{a as kn,b as st}from"./chunk-DLUALPHU.js";import"./chunk-4DOELXOP.js";import"./chunk-VVUSFS6O.js";import"./chunk-ZTEDQLOG.js";import"./chunk-EDGADVEY.js";import"./chunk-JTDJJORR.js";import"./chunk-LZUGPBFD.js";import"./chunk-2KERKGCG.js";import{a as rt,b as K}from"./chunk-4CDAAU6Z.js";import{f as Mn,h as $}from"./chunk-WSOH6CXK.js";import{b as ot,c as fe}from"./chunk-X22YKT5B.js";import{a as re,b as ae}from"./chunk-JYCUE5HV.js";import{a as W,b as Tn,c as wn,e as An,f as En,g as Pn}from"./chunk-JMEBBWX4.js";import{c as Je,d as an,f as ln}from"./chunk-FUZFAJGJ.js";import{a as Tt,f as wt,n as nt,o as it,p as bn,t as Sn,u as At,w as ie,x as oe}from"./chunk-5FSMHZSY.js";import"./chunk-BHV2HCJY.js";import{Aa as gn,D as It,Da as hn,I as sn,Ia as xn,K as cn,La as Ae,M as mn,Ma as Re,Oa as Cn,Q as et,R as tt,Ua as In,W as pn,X as yt,_ as un,b as te,c as de,da as dn,e as j,f as ye,g as on,ga as fn,i as L,j as Xe,k as rn,ka as _n,l as be,na as bt,o as ve,qa as ne,u as Se,va as vt,w as Te,wa as St,x as we}from"./chunk-G5S5AZA7.js";import{b as J,d as ee,e as B,l as V}from"./chunk-Z45NTTES.js";import{a as nn}from"./chunk-JF4X2NRA.js";import"./chunk-BLQJXMNV.js";import{c as xt,d as Ct,f as Le,h as De}from"./chunk-F2X3VGZZ.js";import{h as z,j as We,k as F,l as ht,m as en,p as tn,q as Ye,r as N,s as Ve}from"./chunk-OKCHQM5Q.js";import{Ab as Fe,Ac as S,Bc as Yt,Cb as d,D as qe,Ga as b,J as ze,Jb as P,Jc as pe,Kb as s,Kc as Ce,L as $t,Lc as Xt,Mc as y,Nb as ge,O as Kt,Ob as Ne,Pb as Ut,Qb as jt,Sb as Zt,Tb as Qt,Ub as a,Vb as r,Vc as ue,Wb as h,Wc as Ie,X as R,Xb as se,Yb as ce,Yc as Q,Z as w,Zc as Jt,_b as A,aa as qt,ba as Ge,bb as Oe,c as Ke,ca as zt,cb as Gt,dc as v,ec as m,gb as c,ha as x,jc as Ue,kc as me,lc as H,mb as gt,mc as U,pa as _,pc as X,qa as g,qc as p,rc as T,s as G,sc as he,t as Bt,ta as He,uc as Wt,vc as je,wb as O,wc as Ze,xb as Ht,xc as Qe,yc as xe,za as Y,zc as D}from"./chunk-JP6RBSB3.js";import{a as C,b as I}from"./chunk-YQFG5XE2.js";var ii=["class","page"],oi=t=>({id:t}),ri=t=>({"table-borderless":t}),ai=t=>["fa-solid",t],li=t=>["/pages/journal/journal-entry/",t];function si(t,l){t&1&&h(0,"p-button",8)}function ci(t,l){if(t&1){let e=A();a(0,"p-button",9),v("onClick",function(){_(e);let i=m(2);return g(i.onDelete())}),r()}}function mi(t,l){if(t&1&&(a(0,"div",4)(1,"p-button-group"),d(2,si,1,0,"p-button",5)(3,ci,1,0,"p-button",6),r(),a(4,"a",7),p(5,"Ledger"),r()()),t&2){let e,n=m();c(2),s("ngIf",n.roleService.coa.edit),c(),s("ngIf",n.roleService.coa.delete),c(),s("queryParams",S(3,oi,(e=n.COAInfo())==null?null:e.id))}}function pi(t,l){if(t&1&&h(0,"i",23),t&2){let e=l.checked;s("ngClass",S(1,ai,e?"fa-check":"fa-xmark"))}}function ui(t,l){if(t&1&&(a(0,"tr")(1,"td")(2,"div",24)(3,"a",25),p(4),r(),a(5,"span"),p(6),pe(7,"date"),r()()(),a(8,"td"),p(9),pe(10,"number"),r(),a(11,"td"),p(12),pe(13,"number"),r(),a(14,"td"),p(15),pe(16,"number"),r()()),t&2){let e=l.$implicit;c(3),s("routerLink",S(15,li,e.id)),c(),T(e.number),c(2),T(Xt(7,6,e.date,"dd MMM yyyy")),c(3),T(Ce(10,9,e.creditAmount)),c(3),T(Ce(13,11,e.debitAmount)),c(3),T(Ce(16,13,e.balance))}}function di(t,l){t&1&&(a(0,"tr")(1,"td",26)(2,"div",27),h(3,"img",28),a(4,"div",24)(5,"span",29),p(6,"No Data Available"),r(),a(7,"span",29),p(8,"Your data will be shown here once it's available"),r()()()()())}function fi(t,l){if(t&1){let e=A();a(0,"div",11)(1,"div",12)(2,"p-card",13)(3,"div",14)(4,"div",15)(5,"div",16),p(6,"Name"),r(),a(7,"div",17),p(8),r()(),a(9,"div",15)(10,"div",16),p(11,"Code"),r(),a(12,"div",17),p(13),r()(),a(14,"div",15)(15,"div",16),p(16,"Category"),r(),a(17,"div",17),p(18),r()(),a(19,"div",15)(20,"div",16),p(21,"Note"),r(),a(22,"div",17),p(23),r()(),a(24,"div",15)(25,"div",16),p(26,"Outlet"),r(),a(27,"div",17),p(28),r()(),a(29,"div",15)(30,"div",16),p(31,"Discontinued"),r(),a(32,"div",17)(33,"p-toggleswitch",18),v("onChange",function(i){_(e);let o=m(2);return g(o.onDiscontinued(i))}),d(34,pi,1,3,"ng-template",null,2,y),r()()()()()(),a(36,"div",19)(37,"p-card",20)(38,"table",21)(39,"thead")(40,"tr")(41,"th",22),p(42,"Number"),r(),a(43,"th",22),p(44,"Credit"),r(),a(45,"th",22),p(46,"Debit"),r(),a(47,"th",22),p(48,"Balance"),r()()(),a(49,"tbody"),Zt(50,ui,17,17,"tr",null,jt),d(52,di,9,0,"tr"),r()()()()()}if(t&2){let e,n,i,o,u,f=m(2);c(8),T((e=f.COAInfo().name)!==null&&e!==void 0?e:"-"),c(5),T((n=f.COAInfo().code)!==null&&n!==void 0?n:"-"),c(5),T((i=f.COAInfo().category)!==null&&i!==void 0?i:"-"),c(5),T((o=f.COAInfo().note)!==null&&o!==void 0?o:"-"),c(5),T((u=f.COAInfo().outletName)!==null&&u!==void 0?u:"-"),c(5),s("ngModel",f.COAInfo().bin),c(5),s("ngClass",S(8,ri,f.COAInfo().transactions.length===0)),c(12),Qt(f.COAInfo().transactions),c(2),Ut(f.COAInfo().transactions.length===0?52:-1)}}function _i(t,l){if(t&1&&d(0,fi,53,10,"div",10),t&2){let e=m();s("ngIf",e.COAInfo())}}var Hn=(()=>{class t{constructor(){this.#e=x(Z),this.#t=x(J),this.router=x(ee),this.COAInfo=b(null),this.checked=b(!1),this.roleService=x(Ee)}#e;#t;ngOnInit(){this.#t.paramMap.pipe(E("params"),R(e=>this.#e.getChartAccountById(e.get("id"))),w(e=>this.COAInfo.set(e)),E("response")).subscribe()}onDelete(){if(!confirm("Are you sure you want to delete this Chart of Accounts?"))return;let n=[this.#t.snapshot.paramMap.get("id")];this.#e.deleteChartAccount(n).pipe(w(()=>{this.router.navigate(["/pages/chart-of-account/account"])})).subscribe()}onDiscontinued(e){this.#e.discountedChartAccounts(this.#t.snapshot.paramMap.get("id"),{Discontinued:e.checked}).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=O({type:t,selectors:[["app-coa-account-info",8,"page"]],attrs:ii,decls:5,vars:0,consts:[["actionButton",""],["content",""],["handle",""],["pageTitle","Chart of Account Details"],[1,"d-flex","gap-2"],["routerLink","edit","severity","secondary","outlined","","label","Edit","icon","fa-solid fa-pen-to-square",4,"ngIf"],["severity","secondary","outlined","","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","/pages/report/general-ledger",1,"p-button",3,"queryParams"],["routerLink","edit","severity","secondary","outlined","","label","Edit","icon","fa-solid fa-pen-to-square"],["severity","secondary","outlined","","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["class","row justify-content-center mt-3 px-3",4,"ngIf"],[1,"row","justify-content-center","mt-3","px-3"],[1,"col","col-lg-7"],["styleClass","h-100"],[1,"d-flex","flex-column","row-gap-4"],[1,"row"],[1,"col","col-lg-3"],[1,"col"],[3,"onChange","ngModel"],[1,"col","col-lg-5"],["styleClass","h-100",1,"right-panel","h-100"],[1,"table",3,"ngClass"],["scope","col"],[3,"ngClass"],[1,"d-flex","flex-column"],["target","_blank",1,"link","link-primary",3,"routerLink"],["colspan","4",1,"text-center"],[1,"d-flex","flex-column","align-items-center","gap-2"],["src","https://res.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg","alt","No Data"],[1,"text-secondary","text-opacity-75"]],template:function(n,i){n&1&&(a(0,"app-main-panel",3),d(1,mi,6,5,"ng-template",null,0,y)(3,_i,1,1,"ng-template",null,1,y),r())},dependencies:[N,z,F,Ye,tn,Te,j,Xe,Je,V,B,$,K,rt,oe,ie,ut,pt,On,Dn],styles:[".table>thead>tr>th{background-color:#f6f6f6!important;color:#000!important;font-weight:500!important}"],changeDetection:0})}}return t})();var le=(()=>{class t{constructor(){this.httpService=x(nn)}fetchCOACategories(){return this.httpService.get("","api/ChartOfAccount/Category")}getCOACategoryByID(e){let n={params:e};return this.httpService.get("","api/ChartOfAccount/CategoryInfo",n)}renameCategory(e,n){return this.httpService.put("",`api/ChartOfAccount/RenameCategory/${e}`,n)}updateParentCategory(e,n){return this.httpService.put("",`api/ChartOfAccount/UpdateParentCategory/${e}`,n).pipe()}deleteCategory(e){return this.httpService.delete("",`api/ChartOfAccount/Category/${e}`)}submitCategory(e,n={}){return this.httpService.post("","api/ChartOfAccount/SubmitCategory",e,n)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=Ge({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Pt=t=>t?t.reduce((l,e)=>(l.push({label:e.label,data:e.data,key:e.key}),e.children&&e.children.length?l.push(...Pt(e.children)):l.push({label:`${e.label} (no children)`,data:e.data,key:`${e.key}-no-children`}),l),[]):[];var Mt=(t,l,e)=>{let n=Math.ceil(e/l),i=(t-1)*l+1,o=Math.min(t*l,e);return{start:i,end:o,totalRecords:e,totalPages:n}};var gi={filter:{RowCount:20,PageNumber:1,CategoryID:"",Text:"",listOutletID:[],Discontinued:2},options:{entities:[],categories:[]},data:[],count:0,perPages:[{key:20,value:"20 per page"},{key:40,value:"40 per page"},{key:60,value:"60 per page"},{key:80,value:"80 per page"},{key:100,value:"100 per page"}]},kt=Tn(En(gi),Pn("ChartOfAccount"),wn(t=>({isAllChecked:Q(()=>t.data().every(l=>l.checked)),checkedItems:Q(()=>t.data().filter(l=>l.checked)),IDsChecked:Q(()=>t.data().filter(l=>l.checked).map(l=>l.id)),categories:Q(()=>Pt(t.options.categories())),first:Q(()=>{let{start:l}=Mt(t.filter().PageNumber,t.filter().RowCount,t.count());return l}),last:Q(()=>{let{end:l}=Mt(t.filter().PageNumber,t.filter().RowCount,t.count());return l})})),An(t=>{let l=x(Z),e=x(le),n={updateFilter(i){W(t,{filter:C({},i)})},checkedItem(i){if(Array.isArray(i))i.forEach(o=>{let u=t.data().map(f=>f.id===o.id?I(C({},f),{checked:!o.checked}):f);W(t,{data:u})});else{let o=i,u=t.data().map(f=>f.id===o.id?I(C({},f),{checked:!o.checked}):f);W(t,{data:u})}},checkAllCheckbox(){let i=t.data().map(o=>I(C({},o),{checked:!o.checked}));W(t,{data:i})},fetchChartOfAccount:at(Ke(qe(()=>!!t.filter()),$t(300),Kt(),R(i=>l.getPaginatedChartAccounts(i).pipe(G(o=>I(C({},o),{data:o.data.map(u=>I(C({},u),{checked:!1}))})),lt({next:o=>W(t,{data:o.data,count:o.count}),error:o=>{W(t,{data:[],count:0}),console.error(o)}}))))),fetchLoader:at(Ke(R(()=>l.getChartOfAccountLoader().pipe(lt({next:i=>{W(t,{filter:I(C({},t.filter()),{RowCount:i.filter.rowCount,PageNumber:1,CategoryID:i.filter.categoryID||null,Text:"",listOutletID:[]}),options:i.options}),n.fetchChartOfAccount(t.filter)},error:i=>{console.error(i)}}))))),getCategories:at(Ke(ze(()=>e.fetchCOACategories().pipe(lt({next:i=>{W(t,{options:{entities:t.options.entities(),categories:i}})},error:i=>{console.error(i)}})))))};return n}));var Ci=["class","page"],Ii=t=>["../account/",t],yi=t=>({"text-decoration-line-through":t}),bi=()=>["/pages/report/general-ledger"],vi=t=>({id:t}),Si=()=>({width:"100%"}),Ti=()=>({scrollHeight:"200px"});function wi(t,l){if(t&1){let e=A();a(0,"p-button",13),v("onClick",function(){_(e);let i=m(2);return g(i.deleteCOA())}),r()}}function Ai(t,l){t&1&&h(0,"p-button",14)}function Ei(t,l){if(t&1){let e=A();a(0,"p-button",15),v("onClick",function(){_(e);let i=m(2);return g(i.onExport())}),r()}}function Pi(t,l){t&1&&(a(0,"a",16),h(1,"i",17),p(2," Add"),r())}function Mi(t,l){if(t&1&&(a(0,"div",8),d(1,wi,1,0,"p-button",9),a(2,"p-button-group"),d(3,Ai,1,0,"p-button",10)(4,Ei,1,0,"p-button",11),r(),d(5,Pi,3,0,"a",12),r()),t&2){let e=m();c(),s("ngIf",e.store.checkedItems().length&&e.roleService.coa.delete),c(2),s("ngIf",e.roleService.coa.create),c(),s("ngIf",e.roleService.global.export),c(),s("ngIf",e.roleService.coa.create)}}function ki(t,l){t&1&&(a(0,"th",21),h(1,"p-tableHeaderCheckbox"),r())}function Oi(t,l){if(t&1&&(a(0,"tr"),d(1,ki,2,0,"th",19),a(2,"th"),p(3,"Code"),r(),a(4,"th"),p(5,"Name"),r(),a(6,"th"),p(7,"Category"),r(),a(8,"th"),p(9,"Outlet"),r(),a(10,"th",20),p(11,"Balance"),r()()),t&2){let e=m(2);c(),s("ngIf",e.roleService.coa.delete)}}function Fi(t,l){if(t&1&&(a(0,"td"),h(1,"p-tableCheckbox",25),r()),t&2){let e=m().$implicit;c(),s("value",e)}}function Ni(t,l){if(t&1&&(a(0,"tr"),d(1,Fi,2,1,"td",22),a(2,"td"),p(3),r(),a(4,"td")(5,"a",23),p(6),r()(),a(7,"td"),p(8),r(),a(9,"td"),p(10),r(),a(11,"td",20)(12,"a",24),p(13),pe(14,"number"),r()()()),t&2){let e,n=l.$implicit,i=m(2);c(),s("ngIf",i.roleService.coa.delete),c(2),T(n.code),c(2),s("routerLink",S(12,Ii,n.id))("ngClass",S(14,yi,n.bin)),c(),T(n.name),c(2),T(n.category),c(2),T(n.outletName),c(2),s("routerLink",D(16,bi))("queryParams",S(17,vi,n.id)),c(),T(Ce(14,10,(e=n.balance)!==null&&e!==void 0?e:0))}}function Vi(t,l){if(t&1&&p(0),t&2){let e=m(2);Wt(" Showing ",e.store.first()," to ",e.store.last()," of ",e.store.count()," entries ")}}function Li(t,l){t&1&&(a(0,"tr")(1,"td",26)(2,"span"),p(3,"No records found."),r()()())}function Di(t,l){if(t&1){let e=A();a(0,"p-panel")(1,"p-table",18),v("onLazyLoad",function(i){_(e);let o=m();return g(o.loadData(i))})("onRowSelect",function(i){_(e);let o=m();return g(o.onRowSelect(i))})("onRowUnselect",function(i){_(e);let o=m();return g(o.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){_(e);let o=m();return g(o.onSelectAll(i))})("onPage",function(i){_(e);let o=m();return g(o.onPageChange(i))}),d(2,Oi,12,1,"ng-template",null,3,y)(4,Ni,15,19,"ng-template",null,4,y)(6,Vi,1,3,"ng-template",null,5,y)(8,Li,4,0,"ng-template",null,6,y),r()()}if(t&2){let e=m();c(),s("lazy",!0)("value",e.store.data())("paginator",!0)("rows",e.store.filter().RowCount)("totalRecords",e.store.count())}}function Ri(t,l){if(t&1){let e=A();a(0,"form",28)(1,"div",29)(2,"label",30),p(3,"Outlet"),r(),h(4,"p-multiselect",31),r(),a(5,"div",29)(6,"label",30),p(7,"Category"),r(),a(8,"p-treeselect",32),v("onFocus",function(){_(e);let i=m(2);return g(i.onCategoryFocus())}),r()(),a(9,"div",33)(10,"label",30),p(11,"Page Size"),r(),h(12,"input",34),r(),a(13,"div",33)(14,"label",30),p(15,"Discontinued"),r(),a(16,"div",35)(17,"div",36),h(18,"p-radiobutton",37),a(19,"label",38),p(20,"No"),r()(),a(21,"div",36),h(22,"p-radiobutton",39),a(23,"label",40),p(24,"Yes"),r()(),a(25,"div",36),h(26,"p-radiobutton",39),a(27,"label",40),p(28,"All"),r()()()()()}if(t&2){let e=m(2);s("formGroup",e.formFilter),c(4),s("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("options",e.store.options().entities),c(4),ge(D(15,Si)),s("showClear",!0)("virtualScroll",!0)("virtualScrollItemSize",50)("virtualScrollOptions",D(16,Ti))("options",e.categoryNodes()),c(10),s("value",0),c(4),s("value",1),c(4),s("value",2)}}function Bi(t,l){if(t&1&&d(0,Ri,29,17,"form",27),t&2){let e=m();s("ngIf",e.formFilter)}}var jn=(()=>{class t{ngOnInit(){this.store.fetchLoader(),console.log(this.store.filter().RowCount),this.generateFilterForm()}#e;constructor(){this.routeInfo=Zn,this.store=x(kt),this.#e=x(Z),this.modalService=x(an),this.roleService=x(Ee),this.dialogVisible=b(!1),this.categoryNodes=b([]),this.fb=x(Se),this.isDialogFilterVisible=b(!1),this.generateFilterForm()}generateFilterForm(){this.formFilter=this.fb.group({outletID:this.fb.control([]),categoryID:this.fb.control(null),pageSize:this.fb.control(this.store.filter().RowCount),discontinued:this.fb.control(2)})}onPageChange(e){console.log("Page changed to: ",e),this.store.updateFilter(I(C({},this.store.filter()),{PageNumber:e.first/e.rows+1}))}onCategoryFocus(){this.#e.getCachedCategoriesOptions().pipe(w(e=>this.categoryNodes.set(e))).subscribe()}onRowSelect(e){console.log("Row select event: ",e),this.store.checkedItem(e.data)}onRowUnselect(e){console.log("Row unselect event: ",e),this.store.checkedItem(e.data)}onSelectAll(e){console.log("Select all event: ",e),this.store.checkAllCheckbox()}loadData(e){console.log("Lazy load event: ",e)}onSearch(e){console.log("Search text: ",e),this.store.updateFilter(I(C({},this.store.filter()),{Text:e}))}updateFilter(e,n){this.store.updateFilter(I(C({},this.store.filter()),{[e]:n}))}checkAllCheckBox(){this.store.checkAllCheckbox()}checkedItem(e){this.store.checkedItem(e)}deleteCOA(){confirm("Are you sure you want to delete selected Chart of Accounts?")&&this.#e.deleteChartAccount(this.store.IDsChecked()).pipe(E("response"),w(e=>{console.log("Delete COA Response: ",e),this.store.updateFilter(C({},this.store.filter()))})).subscribe()}onSearchEvent(e){this.store.updateFilter(I(C({},this.store.filter()),{Text:e.trim()}))}onFilterEvent(){this.dialogVisible.update(e=>!e)}onFilterOKEvent(){let{categoryID:e,pageSize:n,outletID:i,discontinued:o}=this.formFilter.value;this.store.updateFilter(I(C({},this.store.filter()),{listOutletID:i,CategoryID:e?e.key:"",RowCount:+n,Discontinued:o})),this.isDialogFilterVisible.update(u=>!u)}onExport(){let e=I(C({},this.store.filter()),{ExportPageNumber:1,ExportRowCount:1e4});this.#e.exportChartOfAccounts(e).pipe(w(n=>{let i=n.headers;console.log("All headers:",i.keys());let o=i.get("Content-Disposition"),u=i.get("content-disposition"),f=o??u,M="download.csv";if(f){let q=f.match(/filename\*?=(?:UTF-8'')?"?([^;\r\n"]+)/i);q&&q[1]&&(M=decodeURIComponent(q[1].replace(/"/g,"")))}let k=n.body;Kn(k,M,k.type)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=O({type:t,selectors:[["app-cash-of-account",8,"page"]],features:[xe([kt])],attrs:Ci,decls:7,vars:4,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Chart of Account",3,"search","isDialogFilterVisibleChange","filterEmitted","filterConfirmed","isSearchableInput","isDialogFilterVisible","isFilterable","scrollable"],[1,"d-flex","gap-2"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick",4,"ngIf"],["routerLink","import","severity","secondary","outlined","","label","Import","icon","fa-solid fa-download",4,"ngIf"],["outlined","","severity","secondary","label","Export","icon","fa-solid fa-upload",3,"onClick",4,"ngIf"],["class","p-button","routerLink","add",4,"ngIf"],["icon","fa-solid fa-trash","label","Delete","severity","danger",3,"onClick"],["routerLink","import","severity","secondary","outlined","","label","Import","icon","fa-solid fa-download"],["outlined","","severity","secondary","label","Export","icon","fa-solid fa-upload",3,"onClick"],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",1,"",3,"onLazyLoad","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","onPage","lazy","value","paginator","rows","totalRecords"],["style","width: 1rem",4,"ngIf"],[1,"text-end"],[2,"width","1rem"],[4,"ngIf"],[1,"link-primary",3,"routerLink","ngClass"],[1,"link","link-primary",3,"routerLink","queryParams"],[3,"value"],["colspan","6"],["class","d-flex flex-column row-gap-3",3,"formGroup",4,"ngIf"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column","position-relative"],["for",""],["appendTo","body","formControlName","outletID","optionLabel","name","optionValue","id","placeholder","Select an Outlet",3,"showClear","virtualScroll","virtualScrollItemSize","options"],["containerStyleClass","w-100","filter","","filterBy","label","appendTo","body","formControlName","categoryID","optionLabel","label","optionValue","key","placeholder","Select a Category",1,"w-100",3,"onFocus","showClear","virtualScroll","virtualScrollItemSize","virtualScrollOptions","options"],[1,"d-flex","flex-column"],["formControlName","pageSize","type","text","pInputText",""],[1,"d-flex","flex-wrap","gap-4"],[1,"d-flex","align-items-center","gap-2"],["name","discontinued","formControlName","discontinued","inputId","ingredient1",3,"value"],["for","ingredient1",1,"m-0"],["name","discontinued","formControlName","discontinued","inputId","ingredient2",3,"value"],["for","ingredient2",1,"m-0"]],template:function(n,i){if(n&1){let o=A();a(0,"app-main-panel",7),v("search",function(f){return _(o),g(i.onSearchEvent(f))}),Qe("isDialogFilterVisibleChange",function(f){return _(o),Ze(i.isDialogFilterVisible,f)||(i.isDialogFilterVisible=f),g(f)}),v("filterEmitted",function(){return _(o),g(i.onFilterEvent())})("filterConfirmed",function(){return _(o),g(i.onFilterOKEvent())}),d(1,Mi,6,4,"ng-template",null,0,y)(3,Di,10,5,"ng-template",null,1,y)(5,Bi,1,1,"ng-template",null,2,y),r()}n&2&&(s("isSearchableInput",!0),je("isDialogFilterVisible",i.isDialogFilterVisible),s("isFilterable",!0)("scrollable",!0))},dependencies:[N,z,F,Ye,$,ln,ut,pt,dt,Te,rn,te,j,ye,V,B,we,be,ve,Je,Ln,Fn,Nn,Vn,K,Mn,oe,ie,st,it,nt,fe,Bn,Rn,Me,Pe,ae,re,mt,ct],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 t})();var Ki=["class","page"],qi=()=>["../../"],Ft=t=>({"ng-invalid ng-dirty":t}),zi=t=>({"ng-dirty ng-invalid":t});function Gi(t,l){if(t&1){let e=A();a(0,"div",5)(1,"a",6),p(2,"Cancel"),r(),a(3,"p-button",7),v("onClick",function(){_(e);let i=m();return g(i.onSubmit())}),r()()}t&2&&(c(),s("routerLink",D(1,qi)))}function Hi(t,l){t&1&&(a(0,"div",27),p(1," Name is required "),r())}function Ui(t,l){if(t&1&&(a(0,"div"),d(1,Hi,2,0,"div",26),r()),t&2){let e=m(2);c(),s("ngIf",e.form.controls.Name.errors.required)}}function ji(t,l){t&1&&(a(0,"div",28)(1,"p"),p(2," If you assign an outlet for this account, it is only visible for users who has access to that outlet. "),r()())}function Zi(t,l){if(t&1&&(a(0,"span",29),p(1),r()),t&2){let e=l.$implicit;s("pTooltip",e.name),c(),he(" ",e.name," ")}}function Qi(t,l){t&1&&(a(0,"div",27),p(1," Code is required "),r())}function Wi(t,l){if(t&1&&(a(0,"div"),d(1,Qi,2,0,"div",26),r()),t&2){let e=m(2);c(),s("ngIf",e.form.controls.Code.errors.required)}}function Yi(t,l){if(t&1&&p(0),t&2){let e=l.$implicit;he(" ",(e==null?null:e.fullLabel)||(e==null?null:e.label)||"Select a category"," ")}}function Xi(t,l){t&1&&(a(0,"div",27),p(1," Category is required "),r())}function Ji(t,l){if(t&1&&(a(0,"div"),d(1,Xi,2,0,"div",26),r()),t&2){let e=m(2);c(),s("ngIf",e.form.controls.Category.errors.required)}}function eo(t,l){t&1&&(a(0,"div",27),p(1," Note is required "),r())}function to(t,l){if(t&1&&(a(0,"div"),d(1,eo,2,0,"div",26),r()),t&2){let e=m(2);c(),s("ngIf",e.form.controls.Note.errors.required)}}function no(t,l){t&1&&(a(0,"div",27),p(1," Note is required "),r())}function io(t,l){if(t&1&&(a(0,"div"),d(1,no,2,0,"div",26),r()),t&2){let e=m(3);c(),s("ngIf",e.form.controls.Note.errors.required)}}function oo(t,l){if(t&1&&(a(0,"div",12)(1,"div",13)(2,"label",14),p(3,"Discontinued"),r(),a(4,"div",30)(5,"div",31),h(6,"p-radiobutton",32),a(7,"label",33),p(8,"No"),r()(),a(9,"div",31),h(10,"p-radiobutton",34),a(11,"label",35),p(12,"Yes"),r()()(),d(13,io,2,1,"div",16),r()()),t&2){let e=m(2);c(6),s("value",!1),c(4),s("value",!0),c(3),s("ngIf",e.form.controls.Note.errors)}}function ro(t,l){if(t&1&&(a(0,"p-panel",8)(1,"div",9)(2,"div",10)(3,"div",11)(4,"div",12)(5,"div",13)(6,"label",14),p(7,"Name"),r(),h(8,"input",15),d(9,Ui,2,1,"div",16),r()(),a(10,"div",12)(11,"div",13)(12,"div")(13,"label",14),p(14,"Outlet"),r(),h(15,"p-button",17),d(16,ji,3,0,"ng-template",null,2,y),r(),a(18,"p-select",18),d(19,Zi,2,2,"ng-template",null,3,y),r()()(),a(21,"div",12)(22,"div",13)(23,"label",14),p(24,"Code"),r(),h(25,"input",19),d(26,Wi,2,1,"div",16),r()(),a(27,"div",20)(28,"div",21)(29,"label",14),p(30,"Category"),r(),a(31,"p-treeselect",22),d(32,Yi,1,1,"ng-template",23),r(),d(33,Ji,2,1,"div",16),r()(),a(34,"div",12)(35,"div",13)(36,"label",14),p(37,"Note"),r(),h(38,"textarea",24),d(39,to,2,1,"div",16),r()(),d(40,oo,14,3,"div",25),r()()()()),t&2){let e=X(17),n=m();c(),s("formGroup",n.form),c(7),s("ngClass",S(15,Ft,n.form.controls.Name.invalid&&(n.form.controls.Name.dirty||n.form.controls.Name.touched))),c(),s("ngIf",n.form.controls.Name.invalid&&(n.form.controls.Name.dirty||n.form.controls.Name.touched)),c(6),s("pTooltip",e)("rounded",!0)("text",!0),c(3),s("options",n.outlets()),c(7),s("ngClass",S(17,Ft,n.form.controls.Code.invalid&&(n.form.controls.Code.dirty||n.form.controls.Code.touched))),c(),s("ngIf",n.form.controls.Code.invalid&&(n.form.controls.Code.dirty||n.form.controls.Code.touched)),c(5),s("options",n.categoryOptions())("ngClass",S(19,zi,n.form.controls.Category.invalid&&(n.form.controls.Category.dirty||n.form.controls.Category.touched))),c(2),s("ngIf",n.form.controls.Category.invalid&&(n.form.controls.Category.dirty||n.form.controls.Category.touched)),c(5),s("ngClass",S(21,Ft,n.form.controls.Note.invalid&&(n.form.controls.Note.dirty||n.form.controls.Note.touched))),c(),s("ngIf",n.form.controls.Note.errors),c(),s("ngIf",n.hasIdParam&&!n.coa_info().form.bin)}}var Nt=(()=>{class t{constructor(){this.route=x(J),this.coa_service=x(Z),this.coa_info=b(null),this.fb=x(Se),this.isEdit=b(!1),this.categoryOptions=b([]),this.router=x(ee),this.outlets=Q(()=>this.coa_info()?this.coa_info().options.entities:[])}findParenChilds(e,n){function i(o,u=null){for(let f of o){if(f.key===n)return{parent:u,child:f};if(f.children){let M=i(f.children,f);if(M)return M}}return null}return i(e)}generateForm(e){this.form=this.fb.group({ID:new L(e.id||""),Name:new L(e.name||"",[de.required]),Code:new L(e.code||"",[de.required]),Note:new L(e.note||"",[]),Balance:new L(e.balance||0),Outlet:new L(e.outletID||""),AccessType:new L(e.accessTypeID||0),Category:new L(null,[de.required]),Bin:new L(e.bin||!1)})}ngOnInit(){this.generateForm({id:"",name:"",code:"",note:"",balance:0,outletID:"",accessTypeID:0,categoryID:null,bin:!1}),this.fetchLoader(),this.fetchCategoryOptions()}fetchLoader(){this.route.paramMap.pipe(ze(e=>{if(e.has("id")){this.isEdit.set(!0);let n=e.get("id");return this.coa_service.getChartAccountFormById(n)}else return this.coa_service.getChartAccountForm()}),E("response"),G(e=>I(C({},e),{form:I(C({},e.form),{categoryID:e.form.categoryID==="00000000-0000-0000-0000-000000000000"?"":e.form.categoryID})})),w(e=>{this.coa_info.set(e),this.generateForm(e.form)})).subscribe()}get hasIdParam(){return this.route.snapshot.paramMap.has("id")}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{AccessType:e,Balance:n,Category:i,Code:o,Name:u,Note:f,Outlet:M}=this.form.value,k;this.hasIdParam?k={id:this.coa_info().form.id,categoryID:i.key,name:u,bin:this.form.value.Bin||!1,code:o,note:f,outletID:M||null,balance:n,accessTypeID:e}:k={id:this.coa_info().form.id,categoryID:i.key,bin:this.form.value.Bin||!1,name:u,code:o,note:f,outletID:M||null,balance:n,accessTypeID:e},this.hasIdParam?this.coa_service.submitChartAccount(k).pipe(E("submitChartAccount"),w(()=>{this.form.reset(),this.router.navigate(["/pages/chart-of-account/account"])})).subscribe():this.coa_service.submitChartAccount(k).pipe(E("submitChartAccount"),w(()=>{this.form.reset(),this.router.navigate(["/pages/chart-of-account/account"])})).subscribe()}fetchCategoryOptions(){this.coa_service.fetchCategoryOptions().pipe(E("response"),w(e=>{this.categoryOptions.set(e);let n=this.findParenChilds(this.categoryOptions(),this.coa_info()?.form?.categoryID);this.form.controls.Category.setValue(n?.child)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=O({type:t,selectors:[["app-coa-account-form",8,"page"]],attrs:Ki,decls:5,vars:1,consts:[["actionButton",""],["content",""],["tooltipContent",""],["item",""],["pageTitle","Chart Of Account Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["type","button",1,"p-button","p-button-secondary","p-button-outlined",3,"routerLink"],["label","Submit",3,"onClick"],["styleClass","rounded-2"],[1,"row","justify-content-center",3,"formGroup"],[1,"col"],[1,"row","row-gap-2"],[1,"col","col-lg-6"],[1,"d-flex","flex-column"],["for",""],["size","small","formControlName","Name","type","text","pInputText","",3,"ngClass"],[4,"ngIf"],["icon","fa-solid fa-circle-info",3,"pTooltip","rounded","text"],["appendTo","body","formControlName","Outlet","optionLabel","name","optionValue","id","placeholder","Select Outlet",3,"options"],["size","small","formControlName","Code","type","text","pInputText","",3,"ngClass"],[1,"co","col-lg-6"],[1,"form-group","d-flex","flex-column"],["formControlName","Category","containerStyleClass","w-full","placeholder","Select a Category",1,"w-full",3,"options","ngClass"],["pTemplate","value"],["pSize","small","rows","5","cols","30","pTextarea","","formControlName","Note",3,"ngClass"],["class","col col-lg-6",4,"ngIf"],["class","invalid-feedback text-danger d-block",4,"ngIf"],[1,"invalid-feedback","text-danger","d-block"],[1,"flex","items-center"],[1,"d-inline-block","text-truncate",2,"max-width","200px",3,"pTooltip"],[1,"d-flex","flex-wrap","gap-4"],[1,"d-flex","align-items-center","gap-2"],["name","Bin","formControlName","Bin","inputId","ingredient1",3,"value"],["for","ingredient1",1,"m-0"],["name","Bin","formControlName","Bin","inputId","ingredient2",3,"value"],["for","ingredient2",1,"m-0"]],template:function(n,i){n&1&&(a(0,"app-main-panel",4),d(1,Gi,4,2,"ng-template",null,0,y)(3,ro,41,23,"ng-template",null,1,y),r()),n&2&&s("hasMainWrapperPadding",!0)},dependencies:[$,we,te,j,ye,be,ve,dt,N,z,F,V,B,Me,Pe,Ae,K,it,nt,zn,qn,st,kn,fe,ot,oe,ie,ae,re,mt,ct],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-treeselect{width:100%!important}"],changeDetection:0})}}return t})();var ao=["sublist"],lo=(t,l)=>({"p-contextmenu-submenu":t,"p-contextmenu-root-list":l}),so=()=>({"p-contextmenu-item-link":!0}),Yn=()=>({class:"p-contextmenu-submenu-icon"}),co=()=>({exact:!1}),mo=t=>({"p-contextmenu-item-link":!0,"p-disabled":t}),po=t=>({$implicit:t});function uo(t,l){if(t&1&&h(0,"li",8),t&2){let e=m().$implicit,n=m(2);ge(n.getItemProp(e,"style")),s("ngClass",n.getSeparatorItemClass(e)),P("id",n.getItemId(e))("data-pc-section","separator")}}function fo(t,l){if(t&1&&h(0,"span",19),t&2){let e=m(4).$implicit,n=m(2);s("ngClass",n.getItemProp(e,"icon"))("ngStyle",n.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function _o(t,l){if(t&1&&(a(0,"span",20),p(1),r()),t&2){let e=m(4).$implicit,n=m(2);P("data-pc-section","label"),c(),he(" ",n.getItemLabel(e)," ")}}function go(t,l){if(t&1&&h(0,"span",21),t&2){let e=m(4).$implicit,n=m(2);s("innerHTML",n.getItemLabel(e),Oe),P("data-pc-section","label")}}function ho(t,l){if(t&1&&h(0,"p-badge",22),t&2){let e=m(4).$implicit,n=m(2);s("styleClass",n.getItemProp(e,"badgeStyleClass"))("value",n.getItemProp(e,"badge"))}}function xo(t,l){t&1&&h(0,"AngleRightIcon"),t&2&&(Ne("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function Co(t,l){}function Io(t,l){t&1&&d(0,Co,0,0,"ng-template",25),t&2&&s("data-pc-section","submenuicon")("aria-hidden",!0)}function yo(t,l){if(t&1&&(se(0),d(1,xo,1,4,"AngleRightIcon",23)(2,Io,1,2,null,24),ce()),t&2){let e=m(6);c(),s("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),c(),s("ngTemplateOutlet",e.contextMenu.submenuIconTemplate||e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",D(3,Yn))}}function bo(t,l){if(t&1&&(a(0,"a",15),d(1,fo,1,5,"span",16)(2,_o,2,2,"span",17)(3,go,1,2,"ng-template",null,2,y)(5,ho,1,2,"p-badge",18)(6,yo,3,4,"ng-container",11),r()),t&2){let e=X(4),n=m(3).$implicit,i=m(2);s("target",i.getItemProp(n,"target"))("ngClass",D(12,so)),P("href",i.getItemProp(n,"url"),Gt)("aria-hidden",!0)("data-automationid",i.getItemProp(n,"automationId"))("data-pc-section","action")("tabindex",-1),c(),s("ngIf",i.getItemProp(n,"icon")),c(),s("ngIf",i.getItemProp(n,"escape"))("ngIfElse",e),c(3),s("ngIf",i.getItemProp(n,"badge")),c(),s("ngIf",i.isItemGroup(n))}}function vo(t,l){if(t&1&&h(0,"span",19),t&2){let e=m(4).$implicit,n=m(2);s("ngClass",n.getItemProp(e,"icon"))("ngStyle",n.getItemProp(e,"iconStyle")),P("data-pc-section","icon")("aria-hidden",!0)("tabindex",-1)}}function So(t,l){if(t&1&&(a(0,"span",20),p(1),r()),t&2){let e=m(4).$implicit,n=m(2);P("data-pc-section","label"),c(),he(" ",n.getItemLabel(e)," ")}}function To(t,l){if(t&1&&h(0,"span",21),t&2){let e=m(4).$implicit,n=m(2);s("innerHTML",n.getItemLabel(e),Oe),P("data-pc-section","label")}}function wo(t,l){if(t&1&&h(0,"p-badge",22),t&2){let e=m(4).$implicit,n=m(2);s("styleClass",n.getItemProp(e,"badgeStyleClass"))("value",n.getItemProp(e,"badge"))}}function Ao(t,l){t&1&&h(0,"AngleRightIcon"),t&2&&(Ne("p-contextmenu-submenu-icon"),P("data-pc-section","submenuicon")("aria-hidden",!0))}function Eo(t,l){}function Po(t,l){t&1&&d(0,Eo,0,0,"ng-template",25),t&2&&s("data-pc-section","submenuicon")("aria-hidden",!0)}function Mo(t,l){if(t&1&&(se(0),d(1,Ao,1,4,"AngleRightIcon",23)(2,Po,1,2,null,24),ce()),t&2){let e=m(6);c(),s("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),c(),s("ngTemplateOutlet",!e.contextMenu.submenuIconTemplate||!e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",D(3,Yn))}}function ko(t,l){if(t&1&&(a(0,"a",26),d(1,vo,1,5,"span",16)(2,So,2,2,"span",17)(3,To,1,2,"ng-template",null,2,y)(5,wo,1,2,"p-badge",18)(6,Mo,3,4,"ng-container",11),r()),t&2){let e=X(4),n=m(3).$implicit,i=m(2);s("routerLink",i.getItemProp(n,"routerLink"))("queryParams",i.getItemProp(n,"queryParams"))("routerLinkActiveOptions",i.getItemProp(n,"routerLinkActiveOptions")||D(20,co))("target",i.getItemProp(n,"target"))("ngClass",S(21,mo,i.getItemProp(n,"disabled")))("fragment",i.getItemProp(n,"fragment"))("queryParamsHandling",i.getItemProp(n,"queryParamsHandling"))("preserveFragment",i.getItemProp(n,"preserveFragment"))("skipLocationChange",i.getItemProp(n,"skipLocationChange"))("replaceUrl",i.getItemProp(n,"replaceUrl"))("state",i.getItemProp(n,"state")),P("data-automationid",i.getItemProp(n,"automationId"))("tabindex",-1)("aria-hidden",!0)("data-pc-section","action"),c(),s("ngIf",i.getItemProp(n,"icon")),c(),s("ngIf",i.getItemProp(n,"escape"))("ngIfElse",e),c(3),s("ngIf",i.getItemProp(n,"badge")),c(),s("ngIf",i.isItemGroup(n))}}function Oo(t,l){if(t&1&&(se(0),d(1,bo,7,13,"a",13)(2,ko,7,23,"a",14),ce()),t&2){let e=m(2).$implicit,n=m(2);c(),s("ngIf",!n.getItemProp(e,"routerLink")),c(),s("ngIf",n.getItemProp(e,"routerLink"))}}function Fo(t,l){}function No(t,l){t&1&&d(0,Fo,0,0,"ng-template")}function Vo(t,l){if(t&1&&(se(0),d(1,No,1,0,null,24),ce()),t&2){let e=m(2).$implicit,n=m(2);c(),s("ngTemplateOutlet",n.itemTemplate)("ngTemplateOutletContext",S(2,po,e.item))}}function Lo(t,l){if(t&1){let e=A();a(0,"p-contextmenu-sub",27),v("itemClick",function(i){_(e);let o=m(4);return g(o.itemClick.emit(i))})("itemMouseEnter",function(i){_(e);let o=m(4);return g(o.onItemMouseEnter(i))}),r()}if(t&2){let e=m(2).$implicit,n=m(2);s("items",e.items)("itemTemplate",n.itemTemplate)("menuId",n.menuId)("visible",n.isItemActive(e)&&n.isItemGroup(e))("activeItemPath",n.activeItemPath)("focusedItemId",n.focusedItemId)("level",n.level+1)}}function Do(t,l){if(t&1){let e=A();a(0,"li",9,1)(2,"div",10),v("click",function(i){_(e);let o=m().$implicit,u=m(2);return g(u.onItemClick(i,o))})("mouseenter",function(i){_(e);let o=m().$implicit,u=m(2);return g(u.onItemMouseEnter({$event:i,processedItem:o}))}),d(3,Oo,3,2,"ng-container",11)(4,Vo,2,4,"ng-container",11),r(),d(5,Lo,1,7,"p-contextmenu-sub",12),r()}if(t&2){let e=m(),n=e.$implicit,i=e.index,o=m(2);Ne(o.getItemProp(n,"styleClass")),s("ngStyle",o.getItemProp(n,"style"))("ngClass",o.getItemClass(n))("tooltipOptions",o.getItemProp(n,"tooltipOptions")),P("id",o.getItemId(n))("data-pc-section","menuitem")("data-p-highlight",o.isItemActive(n))("data-p-focused",o.isItemFocused(n))("data-p-disabled",o.isItemDisabled(n))("aria-label",o.getItemLabel(n))("aria-disabled",o.isItemDisabled(n)||void 0)("aria-haspopup",o.isItemGroup(n)&&!o.getItemProp(n,"to")?"menu":void 0)("aria-expanded",o.isItemGroup(n)?o.isItemActive(n):void 0)("aria-level",o.level+1)("aria-setsize",o.getAriaSetSize())("aria-posinset",o.getAriaPosInset(i)),c(2),P("data-pc-section","content"),c(),s("ngIf",!o.itemTemplate),c(),s("ngIf",o.itemTemplate),c(),s("ngIf",o.isItemVisible(n)&&o.isItemGroup(n))}}function Ro(t,l){if(t&1&&d(0,uo,1,5,"li",6)(1,Do,6,21,"li",7),t&2){let e=l.$implicit,n=m(2);s("ngIf",n.isItemVisible(e)&&n.getItemProp(e,"separator")),c(),s("ngIf",n.isItemVisible(e)&&!n.getItemProp(e,"separator"))}}function Bo(t,l){if(t&1){let e=A();a(0,"ul",4,0),v("@overlayAnimation.start",function(i){_(e);let o=X(1),u=m();return g(u.onEnter(i,o))})("keydown",function(i){_(e);let o=m();return g(o.menuKeydown.emit(i))})("focus",function(i){_(e);let o=m();return g(o.menuFocus.emit(i))})("blur",function(i){_(e);let o=m();return g(o.menuBlur.emit(i))}),d(2,Ro,2,2,"ng-template",5),r()}if(t&2){let e=m();s("ngClass",Yt(10,lo,!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"),c(2),s("ngForOf",e.items)}}var $o=["item"],Ko=["submenuicon"],qo=["rootmenu"],zo=["container"],Go=t=>({"p-contextmenu p-component":!0,"p-contextmenu-mobile":t}),Ho=()=>({value:"visible"});function Uo(t,l){if(t&1){let e=A();a(0,"div",3,0),v("@overlayAnimation.start",function(i){_(e);let o=m();return g(o.onOverlayAnimationStart(i))})("@overlayAnimation.done",function(i){_(e);let o=m();return g(o.onOverlayAnimationEnd(i))}),a(2,"p-contextmenu-sub",4,1),v("itemClick",function(i){_(e);let o=m();return g(o.onItemClick(i))})("menuFocus",function(i){_(e);let o=m();return g(o.onMenuFocus(i))})("menuBlur",function(i){_(e);let o=m();return g(o.onMenuBlur(i))})("menuKeydown",function(i){_(e);let o=m();return g(o.onKeyDown(i))})("itemMouseEnter",function(i){_(e);let o=m();return g(o.onItemMouseEnter(i))}),r()()}if(t&2){let e=m();Ne(e.styleClass),s("ngClass",S(20,Go,e.queryMatches))("ngStyle",e.style)("@overlayAnimation",D(22,Ho)),P("data-pc-section","root")("data-pc-name","contextmenu")("id",e.id),c(2),s("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 jo=({dt:t})=>`
|
|
2
|
+
.p-contextmenu {
|
|
3
|
+
position: absolute;
|
|
4
|
+
background: ${t("contextmenu.background")};
|
|
5
|
+
color: ${t("contextmenu.color")};
|
|
6
|
+
border: 1px solid ${t("contextmenu.border.color")};
|
|
7
|
+
border-radius: ${t("contextmenu.border.radius")};
|
|
8
|
+
box-shadow: ${t("contextmenu.shadow")};
|
|
9
|
+
min-width: 12.5rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.p-contextmenu-root-list,
|
|
13
|
+
.p-contextmenu-submenu {
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: ${t("contextmenu.list.padding")};
|
|
16
|
+
list-style: none;
|
|
17
|
+
outline: 0 none;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: ${t("contextmenu.list.gap")};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.p-contextmenu-submenu {
|
|
24
|
+
position: absolute;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
min-width: 100%;
|
|
28
|
+
z-index: 1;
|
|
29
|
+
background: ${t("contextmenu.background")};
|
|
30
|
+
color: ${t("contextmenu.color")};
|
|
31
|
+
border: 1px solid ${t("contextmenu.border.color")};
|
|
32
|
+
border-radius: ${t("contextmenu.border.radius")};
|
|
33
|
+
box-shadow: ${t("contextmenu.shadow")};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.p-contextmenu-item {
|
|
37
|
+
position: relative;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.p-contextmenu-item-content {
|
|
41
|
+
transition: background ${t("contextmenu.transition.duration")}, color ${t("contextmenu.transition.duration")};
|
|
42
|
+
border-radius: ${t("contextmenu.item.border.radius")};
|
|
43
|
+
color: ${t("contextmenu.item.color")};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.p-contextmenu-item-link {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
position: relative;
|
|
53
|
+
color: inherit;
|
|
54
|
+
padding: ${t("contextmenu.item.padding")};
|
|
55
|
+
gap: ${t("contextmenu.item.gap")};
|
|
56
|
+
user-select: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.p-contextmenu-item-label {
|
|
60
|
+
line-height: 1;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.p-contextmenu-item-icon {
|
|
64
|
+
color: ${t("contextmenu.item.icon.color")};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.p-contextmenu-submenu-icon {
|
|
68
|
+
color: ${t("contextmenu.submenu.icon.color")};
|
|
69
|
+
margin-left: auto;
|
|
70
|
+
font-size: ${t("contextmenu.submenu.icon.size")};
|
|
71
|
+
width: ${t("contextmenu.submenu.icon.size")};
|
|
72
|
+
height: ${t("contextmenu.submenu.icon.size")};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.p-contextmenu-submenu-icon:dir(rtl) {
|
|
76
|
+
margin-left: 0;
|
|
77
|
+
margin-right: auto;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content {
|
|
81
|
+
color: ${t("contextmenu.item.focus.color")};
|
|
82
|
+
background: ${t("contextmenu.item.focus.background")};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
86
|
+
color: ${t("contextmenu.item.icon.focus.color")};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.p-contextmenu-item.p-focus > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
90
|
+
color: ${t("contextmenu.submenu.icon.focus.color")};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover {
|
|
94
|
+
color: ${t("contextmenu.item.focus.color")};
|
|
95
|
+
background: ${t("contextmenu.item.focus.background")};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-item-icon {
|
|
99
|
+
color: ${t("contextmenu.item.icon.focus.color")};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.p-contextmenu-item:not(.p-disabled) > .p-contextmenu-item-content:hover .p-contextmenu-submenu-icon {
|
|
103
|
+
color: ${t("contextmenu.submenu.icon.focus.color")};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content {
|
|
107
|
+
color: ${t("contextmenu.item.active.color")};
|
|
108
|
+
background: ${t("contextmenu.item.active.background")};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-item-icon {
|
|
112
|
+
color: ${t("contextmenu.item.icon.active.color")};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
116
|
+
color: ${t("contextmenu.submenu.icon.active.color")};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.p-contextmenu-separator {
|
|
120
|
+
border-top: 1px solid ${t("contextmenu.separator.border.color")};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.p-contextmenu-enter-from,
|
|
124
|
+
.p-contextmenu-leave-active {
|
|
125
|
+
opacity: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.p-contextmenu-enter-active {
|
|
129
|
+
transition: opacity 250ms;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.p-contextmenu-mobile .p-contextmenu-submenu {
|
|
133
|
+
position: static;
|
|
134
|
+
box-shadow: none;
|
|
135
|
+
border: 0 none;
|
|
136
|
+
padding-left: ${t("tieredmenu.submenu.mobile.indent")};
|
|
137
|
+
padding-right: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.p-contextmenu-mobile .p-contextmenu-submenu-icon {
|
|
141
|
+
transition: transform 0.2s;
|
|
142
|
+
transform: rotate(90deg);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.p-contextmenu-mobile .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
146
|
+
transform: rotate(-90deg);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* For PrimeNG */
|
|
150
|
+
.p-contextmenu-submenu-icon.p-iconwrapper {
|
|
151
|
+
margin-left: auto;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.p-contextmenu-submenu-icon.p-iconwrapper:dir(rtl) {
|
|
155
|
+
margin-left: 0;
|
|
156
|
+
margin-right: auto;
|
|
157
|
+
}
|
|
158
|
+
`,Zo={root:"p-contextmenu p-component",rootList:"p-contextmenu-root-list",item:({instance:t,processedItem:l})=>["p-contextmenu-item",{"p-contextmenu-item-active":t.isItemActive(l),"p-focus":t.isItemFocused(l),"p-disabled":t.isItemDisabled(l)}],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"},Wn=(()=>{class t extends In{name="contextmenu";theme=jo;classes=Zo;static \u0275fac=(()=>{let e;return function(i){return(e||(e=He(t)))(i||t)}})();static \u0275prov=Ge({token:t,factory:t.\u0275fac})}return t})();var Qo=(()=>{class t extends Tt{contextMenu;visible=!1;items;itemTemplate;root=!1;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath;tabindex=0;itemClick=new Y;itemMouseEnter=new Y;menuFocus=new Y;menuBlur=new Y;menuKeydown=new Y;sublistViewChild;constructor(e){super(),this.contextMenu=e}getItemProp(e,n,i=null){return e&&e.item?St(e.item[n],i):void 0}getItemId(e){return e.item&&e.item?.id?e.item.id:`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemClass(e){return I(C({},this.getItemProp(e,"class")),{"p-contextmenu-item":!0,"p-contextmenu-item-active":this.isItemActive(e),"p-focus":this.isItemFocused(e),"p-disabled":this.isItemDisabled(e)})}getItemLabel(e){return this.getItemProp(e,"label")}getSeparatorItemClass(e){return I(C({},this.getItemProp(e,"class")),{"p-contextmenu-separator":!0})}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(n=>this.isItemVisible(n)&&this.getItemProp(n,"separator")).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath)return this.activeItemPath.some(n=>n.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return ne(e.items)}onItemMouseEnter(e){let{event:n,processedItem:i}=e;this.itemMouseEnter.emit({originalEvent:n,processedItem:i})}onItemClick(e,n){this.getItemProp(n,"command",{originalEvent:e,item:n.item}),this.itemClick.emit({originalEvent:e,processedItem:n,isFocus:!0})}onEnter(e,n){if(e.fromState==="void"&&e.toState){let i=e.element;this.position(i)}}position(e){let n=e.parentElement.parentElement,i=un(e.parentElement.parentElement),o=It(),u=e.offsetParent?e.offsetWidth:yt(e),f=sn(n.children[0]);e.style.top="0px",parseInt(i.left,10)+f+u>o.width-mn()?e.style.left=-1*u+"px":e.style.left=f+"px"}static \u0275fac=function(n){return new(n||t)(gt(qt(()=>_t)))};static \u0275cmp=O({type:t,selectors:[["p-contextMenuSub"],["p-contextmenu-sub"]],viewQuery:function(n,i){if(n&1&&me(ao,5),n&2){let o;H(o=U())&&(i.sublistViewChild=o.first)}},inputs:{visible:[2,"visible","visible",ue],items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",ue],autoZIndex:[2,"autoZIndex","autoZIndex",ue],baseZIndex:[2,"baseZIndex","baseZIndex",Ie],popup:[2,"popup","popup",ue],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",Ie],focusedItemId:"focusedItemId",activeItemPath:"activeItemPath",tabindex:[2,"tabindex","tabindex",Ie]},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[Fe],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(n,i){n&1&&d(0,Bo,3,13,"ul",3),n&2&&s("ngIf",i.root?!0:i.visible)},dependencies:[t,N,z,We,F,en,ht,V,B,bn,fe,ot,yn,At,Sn,Re],encapsulation:2,data:{animation:[xt("overlayAnimation",[De(":enter",[Le({opacity:0})]),De(":leave",[Le({opacity:0})])])]}})}return t})(),_t=(()=>{class t extends Tt{overlayService;set model(e){this._model=e,this._processedItems=this.createProcessedItems(this._model||[])}get model(){return this._model}triggerEvent="contextmenu";target;global;style;styleClass;appendTo;autoZIndex=!0;baseZIndex=0;id;breakpoint="960px";ariaLabel;ariaLabelledBy;pressDelay=500;onShow=new Y;onHide=new Y;rootmenu;containerViewChild;container;outsideClickListener;resizeListener;triggerEventListener;documentClickListener;documentTriggerListener;touchEndListener;pageX;pageY;visible=b(!1);relativeAlign;window;focused=!1;activeItemPath=b([]);focusedItemInfo=b({index:-1,level:0,parentKey:"",item:null});submenuVisible=b(!1);searchValue="";searchTimeout;_processedItems;_model;pressTimer;matchMediaListener;query;queryMatches;_componentStyle=x(Wn);get visibleItems(){let e=this.activeItemPath().find(n=>n.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item&&e.item?.id?e.item.id:e.index!==-1?`${this.id}${ne(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,Jt(()=>{let n=this.activeItemPath();ne(n)?this.bindGlobalListeners():this.visible()||this.unbindGlobalListeners()})}ngOnInit(){super.ngOnInit(),this.id=this.id||hn("pn_id_"),this.bindMatchMediaListener(),this.bindTriggerEventListener()}isMobile(){return fn()||dn()}bindTriggerEventListener(){Ve(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(Ve(this.platformId)){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",n=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(n)&&!n.ctrlKey&&n.button!==2&&this.triggerEvent!=="click"&&this.hide()}),this.documentTriggerListener=this.renderer.listen(e,this.triggerEvent,n=>{this.containerViewChild.nativeElement.offsetParent&&this.isOutsideClicked(n)&&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,n=0,i={},o=""){let u=[];return e&&e.forEach((f,M)=>{let k=(o!==""?o+"_":"")+M,q={item:f,index:M,level:n,key:k,parent:i,parentKey:o};q.items=this.createProcessedItems(f.items,n+1,q,k),u.push(q)}),u}bindMatchMediaListener(){if(Ve(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,n){return e?St(e[n]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&ne(e.items)}isSelected(e){return this.activeItemPath().some(n=>n.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&ne(e.items)}onItemClick(e){let{processedItem:n}=e,i=this.isProcessedItemGroup(n);if(this.isSelected(n)){let{index:u,key:f,level:M,parentKey:k,item:q}=n;this.activeItemPath.set(this.activeItemPath().filter($e=>f!==$e.key&&f.startsWith($e.key))),this.focusedItemInfo.set({index:u,level:M,parentKey:k,item:q}),tt(this.rootmenu.sublistViewChild.nativeElement)}else i?this.onItemChange(e):this.hide()}onItemMouseEnter(e){this.onItemChange(e,"hover")}onKeyDown(e){let n=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:!n&&gn(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let n=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,n),e.preventDefault()}onArrowRightKey(e){let n=this.visibleItems[this.focusedItemInfo().index];this.isProccessedItemGroup(n)&&(this.onItemChange({originalEvent:e,processedItem:n}),this.focusedItemInfo.set({index:-1,parentKey:n.key,item:n.item}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let n=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(n)&&this.onItemChange({originalEvent:e,processedItem:n})}this.hide(),e.preventDefault()}else{let n=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,n),e.preventDefault()}}onArrowLeftKey(e){let n=this.visibleItems[this.focusedItemInfo().index],i=this.activeItemPath().find(f=>f.key===n.parentKey);bt(n.parent)||(this.focusedItemInfo.set({index:-1,parentKey:i?i.parentKey:"",item:n.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 n=this.findVisibleItem(this.findFirstFocusedItemIndex()),i=this.focusedItemInfo();this.focusedItemInfo.set(I(C({},i),{index:this.findFirstFocusedItemIndex(),item:n.item})),e.preventDefault()}onTabKey(e){if(this.focusedItemInfo().index!==-1){let n=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(n)&&this.onItemChange({originalEvent:e,processedItem:n})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let n=et(this.rootmenu.el.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),i=n&&et(n,'a[data-pc-section="action"]');i?i.click():n&&n.click();let o=this.visibleItems[this.focusedItemInfo().index];if(!this.isProccessedItemGroup(o)){let f=this.focusedItemInfo();this.focusedItemInfo.set(I(C({},f),{index:this.findFirstFocusedItemIndex()}))}}e.preventDefault()}onItemChange(e,n){let{processedItem:i,isFocus:o}=e;if(bt(i))return;let{index:u,key:f,level:M,parentKey:k,items:q}=i,$e=ne(q),Dt=this.activeItemPath().filter(Rt=>Rt.parentKey!==k&&Rt.parentKey!==f);$e&&(Dt.push(i),this.submenuVisible.set(!0)),this.focusedItemInfo.set({index:u,level:M,parentKey:k,item:i.item}),o&&tt(this.rootmenu.sublistViewChild.nativeElement),!(n==="hover"&&this.queryMatches)&&this.activeItemPath.set(Dt)}onMenuFocus(e){this.focused=!0;let n=this.focusedItemInfo().index!==-1?this.focusedItemInfo():{index:-1,level:0,parentKey:"",item:null};this.focusedItemInfo.set(n)}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(),tt(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):cn(this.appendTo,this.containerViewChild.nativeElement))}moveOnTop(){this.autoZIndex&&this.containerViewChild&&wt.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}onOverlayHide(){this.unbindGlobalListeners(),this.cd.destroyed||(this.target=null),this.container&&this.autoZIndex&&wt.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,n=this.pageY+1,i=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetWidth:yt(this.containerViewChild.nativeElement),o=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetHeight:pn(this.containerViewChild.nativeElement),u=It();e+i-this.document.scrollingElement.scrollLeft>u.width&&(e-=i),n+o-this.document.scrollingElement.scrollTop>u.height&&(n-=o),e<this.document.scrollingElement.scrollLeft&&(e=this.document.scrollingElement.scrollLeft),n<this.document.scrollingElement.scrollTop&&(n=this.document.scrollingElement.scrollTop),this.containerViewChild.nativeElement.style.left=e+"px",this.containerViewChild.nativeElement.style.top=n+"px"}searchItems(e,n){this.searchValue=(this.searchValue||"")+n;let i=-1,o=!1;return this.focusedItemInfo().index!==-1?(i=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(u=>this.isItemMatched(u)),i=i===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(u=>this.isItemMatched(u)):i+this.focusedItemInfo().index):i=this.visibleItems.findIndex(u=>this.isItemMatched(u)),i!==-1&&(o=!0),i===-1&&this.focusedItemInfo().index===-1&&(i=this.findFirstFocusedItemIndex()),i!==-1&&this.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}findVisibleItem(e){return ne(this.visibleItems)?this.visibleItems[e]:null}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return vt(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let n=e>0?vt(this.visibleItems.slice(0,e),i=>this.isValidItem(i)):-1;return n>-1?n:e}findNextItemIndex(e){let n=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(i=>this.isValidItem(i)):-1;return n>-1?n+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,n){let i=this.findVisibleItem(n),o=this.focusedItemInfo();o.index!==n&&(this.focusedItemInfo.set(I(C({},o),{index:n,item:i.item})),this.scrollInView())}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedItemId,i=et(this.rootmenu.el.nativeElement,`li[id="${n}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}bindResizeListener(){Ve(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):_n(this.containerViewChild.nativeElement,this.appendTo))}ngOnDestroy(){this.unbindGlobalListeners(),this.unbindTriggerEventListener(),this.unbindMatchMediaListener(),this.removeAppendedElements(),super.ngOnDestroy()}static \u0275fac=function(n){return new(n||t)(gt(xn))};static \u0275cmp=O({type:t,selectors:[["p-contextMenu"],["p-contextmenu"],["p-context-menu"]],contentQueries:function(n,i,o){if(n&1&&(Ue(o,$o,4),Ue(o,Ko,4),Ue(o,Ae,4)),n&2){let u;H(u=U())&&(i.itemTemplate=u.first),H(u=U())&&(i.submenuIconTemplate=u.first),H(u=U())&&(i.templates=u)}},viewQuery:function(n,i){if(n&1&&(me(qo,5),me(zo,5)),n&2){let o;H(o=U())&&(i.rootmenu=o.first),H(o=U())&&(i.containerViewChild=o.first)}},inputs:{model:"model",triggerEvent:"triggerEvent",target:"target",global:[2,"global","global",ue],style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:[2,"autoZIndex","autoZIndex",ue],baseZIndex:[2,"baseZIndex","baseZIndex",Ie],id:"id",breakpoint:"breakpoint",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",pressDelay:[2,"pressDelay","pressDelay",Ie]},outputs:{onShow:"onShow",onHide:"onHide"},features:[xe([Wn]),Fe],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(n,i){n&1&&d(0,Uo,4,23,"div",2),n&2&&s("ngIf",i.visible())},dependencies:[N,z,F,ht,Qo,V,fe,At,Re],encapsulation:2,data:{animation:[xt("overlayAnimation",[De(":enter",[Le({opacity:0}),Ct("250ms")]),De(":leave",[Ct(".1s linear",Le({opacity:0}))])])]},changeDetection:0})}return t})(),Xn=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Ht({type:t});static \u0275inj=zt({imports:[_t,Re,Re]})}return t})();var Yo=["editInput"],Xo=["tree"],Jo=["class","page"],er=()=>({height:"calc(100vh - 70px)"});function tr(t,l){t&1&&(a(0,"a",7),h(1,"i",8),p(2," Add"),r())}function nr(t,l){if(t&1&&d(0,tr,3,0,"a",6),t&2){let e=m();s("ngIf",e.roleService.coa.create)}}function ir(t,l){if(t&1){let e=A();a(0,"input",15,4),Qe("ngModelChange",function(i){let o=_(e).$implicit;return Ze(o.label,i)||(o.label=i),g(i)}),v("keydown",function(i){_(e);let o=m(2);return g(o.handleEditKeydown(i))})("blur",function(i){_(e);let o=m(2);return g(o.onNodeEditBlur(i))}),r()}if(t&2){let e=l.$implicit;je("ngModel",e.label)}}function or(t,l){if(t&1){let e=A();a(0,"div",9)(1,"div",10)(2,"p-panel",11)(3,"p-tree",12,2),v("onNodeContextMenuSelect",function(i){_(e);let o=m();return g(o.onNodeContextMenuSelect(i))})("onNodeSelect",function(i){_(e);let o=m();return g(o.onNodeSelect(i))})("onNodeUnselect",function(i){_(e);let o=m();return g(o.onNodeUnselect(i))})("onNodeDrop",function(i){_(e);let o=m();return g(o.onNodeDrop(i))}),d(5,ir,2,1,"ng-template",13),r(),h(6,"p-contextmenu",14,3),r()()()}if(t&2){let e=X(7),n=m();c(2),ge(D(14,er)),s("showHeader",!1),c(),s("virtualScroll",!0)("virtualScrollItemSize",40)("scrollHeight","calc(100vh - 110px)")("value",n.categoryTree())("contextMenu",e)("selection",n.selectedCategory)("draggableNodes",!0)("droppableNodes",!0)("propagateSelectionUp",!1)("propagateSelectionDown",!1),c(3),s("model",n.contextMenuItems())}}var Jn=(()=>{class t{constructor(){this._coaTypesService=x(le),this._router=x(ee),this.roleService=x(Ee),this.contextMenuItems=b([]),this.categoryTree=b([]),this.selectedCategory=null,this._shouldAutoFocus=b(!1)}ngOnInit(){this._loadCategories().subscribe(),this._initializeContextMenuItems(),this.expandAllNodes()}ngAfterViewChecked(){this.selectedCategory&&!this._shouldAutoFocus()&&this.editInputRef&&(this.editInputRef.nativeElement.focus(),this.editInputRef.nativeElement.select(),this._shouldAutoFocus.set(!0))}_loadCategories(){return this._coaTypesService.fetchCOACategories().pipe(E("COA Categories"),w(e=>{this.categoryTree.set(e),this.expandAllNodes()}))}_assignTreeIcons(e){return e.map(n=>{let i=!!n.children?.length;return I(C({},n),{icon:void 0,expandedIcon:i?"fa-solid fa-folder-open":void 0,collapsedIcon:i?"fa-solid fa-folder":"fa-solid fa-file",children:i?this._assignTreeIcons(n.children):[]})})}_initializeContextMenuItems(){this.contextMenuItems.set([{label:"Add",icon:"fa-light fa-plus",disabled:!1,command:()=>this._createChildCategory()},{label:"Edit",icon:"fa-light fa-pen-to-square",disabled:!1,command:()=>this._setSelectedNodeToEditMode()},{label:"Delete",icon:"fa-light fa-trash",disabled:!1,command:()=>this._deleteSelectedCategory()},{label:"Properties",icon:"fa-light fa-file",disabled:!1,command:()=>{this._router.navigate(["/pages/chart-of-account/coa-types/info"],{queryParams:{ID:this.selectedCategory?.key}})}}])}_findNodeByKey(e){return this.treeComponent.getNodeWithKey(e,this.categoryTree())??null}_setSelectedNodeToEditMode(){let e=this._findNodeByKey(this.selectedCategory?.key);e&&(this.selectedCategory=e,e.type="edit")}_createChildCategory(){this.selectedCategory?.parent?.key&&this._coaTypesService.submitCategory({Name:"New Child Node",ParentID:this.selectedCategory.key,Code:"",Note:""}).pipe(R(e=>this._loadCategories().pipe(G(()=>e))),w(e=>{let n=this._findNodeByKey(e.id);n&&(this.selectedCategory=n,this._shouldAutoFocus.set(!1),n.type="edit")}),E("Created COA Node")).subscribe()}_deleteSelectedCategory(){this.selectedCategory?.key&&this._coaTypesService.deleteCategory(this.selectedCategory.key).pipe(R(()=>this._loadCategories())).subscribe()}renameNode(e,n=this.selectedCategory){this._coaTypesService.renameCategory(n.key,{Name:e}).pipe(R(()=>this._loadCategories())).subscribe()}onNodeSelect(e){this.selectedCategory=e.node,this._shouldAutoFocus.set(!1),e.node.children?.length&&(e.node.icon="fa-solid fa-folder-open")}onNodeUnselect(e){e.node.children?.length&&(e.node.icon="fa-solid fa-folder")}onNodeContextMenuSelect(e){this.selectedCategory=e.node,["Asset","Liability","Equity","Revenue","Expense"].includes(e.node.label)?this.contextMenuItems.set(this.contextMenuItems().map(i=>["Edit","Delete"].includes(i.label)?I(C({},i),{disabled:!0}):I(C({},i),{disabled:!1}))):this.contextMenuItems.set(this.contextMenuItems().map(i=>i.label==="Add"?I(C({},i),{disabled:!this.roleService.coa.create}):i.label==="Edit"?I(C({},i),{disabled:!this.roleService.coa.edit}):i.label==="Delete"?I(C({},i),{disabled:!this.roleService.coa.delete}):I(C({},i),{disabled:!1})))}onNodeDrop(e){let{dragNode:n,dropNode:i}=e;this._coaTypesService.updateParentCategory(n.key,{ParentID:i.key}).pipe(w(()=>this._loadCategories())).subscribe()}onNodeEditBlur(e){let n=e.target;this.renameNode(n.value);let i=this._findNodeByKey(this.selectedCategory?.key);i&&delete i.type}handleEditKeydown(e){let n=e.target;if([" ","Enter"].includes(e.key)&&e.stopPropagation(),e.key==="Enter"){this.renameNode(n.value);let i=this._findNodeByKey(this.selectedCategory?.key);i&&(delete i.type,this.treeComponent.updateSerializedValue?.())}}expandAllNodes(){this.categoryTree().forEach(e=>this._expandRecursive(e,!0))}collapseAllNodes(){this.categoryTree().forEach(e=>this._expandRecursive(e,!1))}_expandRecursive(e,n){e.expanded=n,e.children?.forEach(i=>this._expandRecursive(i,n))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=O({type:t,selectors:[["app-coa-type",8,"page"]],viewQuery:function(n,i){if(n&1&&(me(Yo,5),me(Xo,5)),n&2){let o;H(o=U())&&(i.editInputRef=o.first),H(o=U())&&(i.treeComponent=o.first)}},features:[xe([Cn])],attrs:Jo,decls:5,vars:0,consts:[["actionButton",""],["content",""],["tree",""],["cm",""],["editInput",""],["pageTitle",`Chart of Accounts Category
|
|
159
|
+
`],["class","p-button","routerLink","add",4,"ngIf"],["routerLink","add",1,"p-button"],[1,"fa-solid","fa-plus"],[1,"row","justify-content-center"],[1,"col"],[3,"showHeader"],["selectionMode","single","draggableScope","self","droppableScope","self",3,"onNodeContextMenuSelect","onNodeSelect","onNodeUnselect","onNodeDrop","virtualScroll","virtualScrollItemSize","scrollHeight","value","contextMenu","selection","draggableNodes","droppableNodes","propagateSelectionUp","propagateSelectionDown"],["pTemplate","edit"],["appendTo","body",3,"model"],["type","text",1,"form-control",3,"ngModelChange","keydown","blur","ngModel"]],template:function(n,i){n&1&&(a(0,"app-main-panel",5),d(1,nr,1,1,"ng-template",null,0,y)(3,or,8,15,"ng-template",null,1,y),r())},dependencies:[$,$n,V,B,Xn,_t,Ae,N,F,Te,te,j,Xe,K,vn,ae,re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var rr=["class","page"],Vt=t=>({"is-invalid":t}),ar=t=>({"ng-invalid ng-dirty":t});function lr(t,l){if(t&1){let e=A();a(0,"div",3)(1,"p-button",4),v("onClick",function(){_(e);let i=m();return g(i.goBack())}),r(),a(2,"p-button",5),v("onClick",function(){_(e);let i=m();return g(i.onSubmit())}),r()()}}function sr(t,l){t&1&&(a(0,"div",20),p(1," Name is required "),r())}function cr(t,l){t&1&&(a(0,"div",20),p(1," Code is required "),r())}function mr(t,l){t&1&&(a(0,"div",20),p(1," Note is required "),r())}function pr(t,l){if(t&1&&(a(0,"div")(1,"span",22),p(2),r()()),t&2){let e=l.$implicit;c(2),T(e)}}function ur(t,l){if(t&1&&(a(0,"div"),d(1,pr,3,1,"div",21),r()),t&2){let e=m(2);c(),s("ngForOf",e.getErrors("Category"))}}function dr(t,l){if(t&1){let e=A();a(0,"p-panel")(1,"div",6)(2,"div",7)(3,"div",8)(4,"div",9)(5,"div",10)(6,"label",11),p(7,"Name"),r(),h(8,"input",12),d(9,sr,2,0,"div",13),r()(),a(10,"div",14)(11,"div",10)(12,"label",11),p(13,"Code"),r(),h(14,"input",15),d(15,cr,2,0,"div",13),r()(),a(16,"div",9)(17,"div",10)(18,"label",11),p(19,"Note"),r(),h(20,"textarea",16),d(21,mr,2,0,"div",13),r()(),a(22,"div",9)(23,"div",17)(24,"label",11),p(25,"Category"),r(),a(26,"p-treeselect",18),v("onFocus",function(){_(e);let i=m();return g(i.loadCategories())}),r(),d(27,ur,2,1,"div",19),r()()()()()()}if(t&2){let e=m();c(3),s("formGroup",e.form),c(5),s("ngClass",S(10,Vt,e.form.controls.Name.invalid&&(e.form.controls.Name.dirty||e.form.controls.Name.touched))),c(),s("ngIf",e.form.controls.Name.errors==null?null:e.form.controls.Name.errors.required),c(5),s("ngClass",S(12,Vt,e.form.controls.Code.invalid&&(e.form.controls.Code.dirty||e.form.controls.Code.touched))),c(),s("ngIf",e.form.controls.Code==null||e.form.controls.Code.errors==null?null:e.form.controls.Code.errors.required),c(5),s("ngClass",S(14,Vt,e.form.controls.Note.invalid&&(e.form.controls.Note.dirty||e.form.controls.Note.touched))),c(),s("ngIf",e.form.controls.Note.errors==null?null:e.form.controls.Note.errors.required),c(5),s("ngClass",S(16,ar,e.isInvalid("Category")))("options",e.categories()),c(),s("ngIf",e.isInvalid("Category"))}}var Lt=(()=>{class t extends Gn{constructor(){super(...arguments),this.categories=b([]),this.COATypeService=x(le),this.COAService=x(Z),this.info=b(null),this.route=x(J),this.router=x(ee),this.fb=x(Se)}goBack(){this.router.navigate(["/pages/chart-of-account/coa-types"])}ngOnInit(){this.generateForm(),Bt([this.route.paramMap.pipe(G(e=>e.get("id")),qe(e=>!!e)),this.COATypeService.fetchCOACategories()]).pipe(E("fetchCOACategories"),R(([e,n])=>{let i=this.findNodeByKeyInArray(n,e);return this.categories.set(n),this.COATypeService.getCOACategoryByID({ID:e}).pipe(w(o=>{this.form.patchValue({Name:o.name,Code:o.code,Note:o.note,Category:i.parent}),["Asset","Liability","Equity","Revenue","Expense"].includes(o.name)&&this.form.controls.Category.disable()}))})).subscribe()}loadCategories(){this.COAService.getCachedCategoriesOptions().pipe(w(e=>this.categories.set(e))).subscribe()}generateForm(){this.form=new on({Name:new L("",[de.required]),Code:new L("",[]),Category:new L(null,[de.required]),Note:new L("",[])})}findNodeByKeyInArray(e,n){for(let i of e){let o=this.findNodeByKey(i,n);if(o)return o}return null}findNodeByKey(e,n,i=null){if(e.key===n||e.label===n)return i&&(e.parent=i),e;if(e.children&&e.children.length>0)for(let o of e.children){let u=this.findNodeByKey(o,n,e);if(u)return u}return null}onSubmit(){let{Name:e,Code:n,Note:i,Category:o}=this.form.value,u=null,f=null;if(this.form.invalid){this.form.markAllAsTouched();return}this.route.snapshot.params.id?(u=this.findNodeByKeyInArray(this.categories(),this.route.snapshot.params.id),f={Name:e,Code:n,ParentID:u&&u.parent?u.parent.key:u.key,Note:i,ID:this.route.snapshot.params.id||null}):(u=this.findNodeByKeyInArray(this.categories(),o.key),f={Name:e,Code:n,ParentID:u&&u.parent?u.parent.key:u.key,Note:i}),this.COATypeService.submitCategory(f,{observe:"response"}).pipe(E("response"),w(()=>{this.router.navigate(["/pages/chart-of-account/coa-types"])})).subscribe()}static{this.\u0275fac=(()=>{let e;return function(i){return(e||(e=He(t)))(i||t)}})()}static{this.\u0275cmp=O({type:t,selectors:[["app-coa-type-form",8,"page"]],features:[Fe],attrs:rr,decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Chart of Account Category Form",3,"hasMainWrapperPadding"],[1,"d-flex","gap-2"],["label","Cancel","variant","outlined","severity","secondary",3,"onClick"],["label","Submit",3,"onClick"],[1,"row","justify-content-center"],[1,"col"],[1,"row","row-gap-2",3,"formGroup"],[1,"ol-12","col-md-6","col-lg-6"],[1,"form-group","has-validation"],["for",""],["formControlName","Name",1,"form-control",3,"ngClass"],["id","validationServer03Feedback","class","invalid-feedback",4,"ngIf"],[1,"col-12","col-md-6","col-lg-6"],["formControlName","Code",1,"form-control",3,"ngClass"],["formControlName","Note","placeholder","Enter a description for this COA category","id","floatingTextarea2",1,"form-control",2,"height","100px",3,"ngClass"],[1,"form-group","has-validation","d-flex","flex-column"],["showClear","","placeholder","Select a Category","formControlName","Category",1,"ng-invalid","ng-dirty",3,"onFocus","ngClass","options"],[4,"ngIf"],["id","validationServer03Feedback",1,"invalid-feedback"],[4,"ngFor","ngForOf"],[1,"text-danger"]],template:function(n,i){n&1&&(a(0,"app-main-panel",2),d(1,lr,3,0,"ng-template",null,0,y)(3,dr,28,18,"ng-template",null,1,y),r()),n&2&&s("hasMainWrapperPadding",!0)},dependencies:[$,V,Me,Pe,we,te,j,ye,be,ve,N,z,We,F,K,oe,ie,ae,re],styles:["[_nghost-%COMP%]{display:block} .p-treeselect{width:100%}"],changeDetection:0})}}return t})();var fr=t=>[t];function _r(t,l){if(t&1&&(a(0,"a",4),h(1,"i",5),a(2,"span"),p(3,"Edit"),r()()),t&2){let e=m(2);s("routerLink",S(1,fr,"/pages/chart-of-account/coa-types/"+e.info().id+"/edit"))}}function gr(t,l){if(t&1&&(a(0,"div",6)(1,"div",7)(2,"p-card")(3,"div",8)(4,"div",9)(5,"div",10),p(6,"Name"),r(),a(7,"div",11),p(8),r()(),a(9,"div",9)(10,"div",10),p(11,"Code"),r(),a(12,"div",11),p(13),r()(),a(14,"div",9)(15,"div",10),p(16,"Category"),r(),a(17,"div",11),p(18),r()(),a(19,"div",9)(20,"div",10),p(21,"Note"),r(),a(22,"div",11),h(23,"div",12),r()()()()()()),t&2){let e=m(2);c(8),T(e.info().name),c(5),T(e.info().code),c(5),T(e.info().parentName),c(5),s("innerHTML",e.info().note,Oe)}}function hr(t,l){t&1&&(se(0),a(1,"app-main-panel",3),d(2,_r,4,3,"ng-template",null,0,y)(4,gr,24,4,"ng-template",null,1,y),r(),ce())}var ei=(()=>{class t{constructor(){this.COATypeService=x(le),this.route=x(J),this.info=b(null)}ngOnInit(){this.route.queryParamMap.pipe(G(e=>e.get("ID")),R(e=>this.COATypeService.getCOACategoryByID({ID:e})),E("getCOACategoryByID"),w(e=>this.info.set(e))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=O({type:t,selectors:[["app-coa-type-info"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],[4,"ngIf"],["pageTitle",`Type of Account Info
|
|
160
|
+
`],["type","button",1,"p-button","p-button-success",3,"routerLink"],[1,"fa-solid","fa-pen-to-square"],[1,"row","justify-content-center","mt-3"],[1,"col-12","col-lg-8"],[1,"d-flex","flex-column","gap-3"],[1,"d-flex"],[1,"col-3"],[1,"col"],[3,"innerHTML"]],template:function(n,i){n&1&&d(0,hr,6,0,"ng-container",2),n&2&&s("ngIf",i.info())},dependencies:[N,F,$,K,rt,V,B],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Es=[{path:"",redirectTo:"account",pathMatch:"full"},{path:"",children:[{path:"account",component:jn},{path:"account/add",component:Nt},{path:"account/import",loadComponent:()=>import("./chunk-2YCI2ZLH.js").then(t=>t.CoaImportComponent)},{path:"account/:id",component:Hn},{path:"account/:id/edit",component:Nt},{path:"coa-types",component:Jn},{path:"coa-types/add",component:Lt},{path:"coa-types/info",component:ei},{path:"coa-types/:id/edit",component:Lt}]}],Zn={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{Es as CHART_OF_ACCOUNT_ROUTES,Zn as CHART_OF_ACCOUNT_ROUTE_PAGE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-NEXPS7KD.js";import"./chunk-C2GO6SPF.js";import{d as e}from"./chunk-Z45NTTES.js";import"./chunk-JF4X2NRA.js";import"./chunk-BLQJXMNV.js";import"./chunk-F2X3VGZZ.js";import"./chunk-OKCHQM5Q.js";import{ha as o}from"./chunk-JP6RBSB3.js";import"./chunk-YQFG5XE2.js";var r=()=>{let t=o(n),i=o(e);return t.isAuthenticated()&&!t.isTokenExpired()&&t.checkAuthKeysExists()?(i.navigate(["/pages/dashboard"]),!1):!0};var h=[{path:"",canActivate:[r],loadComponent:()=>import("./chunk-KL455HIW.js").then(t=>t.LoginComponent)},{path:"404",loadComponent:()=>import("./chunk-IDW6F2F3.js").then(t=>t.NotfoundComponent)},{path:"signup",loadComponent:()=>import("./chunk-SLHUSJER.js").then(t=>t.SignupComponent)},{path:"504",loadComponent:()=>import("./chunk-M4Z3FI3C.js").then(t=>t.TimeoutComponent)}];export{h as AuthenticationRoutes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-NEXPS7KD.js";import{a as o}from"./chunk-JF4X2NRA.js";import{ba as i,ha as n}from"./chunk-JP6RBSB3.js";var d=(()=>{class r{constructor(){this.httpService=n(o),this.authService=n(u)}getJournalInvoiceLoader(){return this.httpService.get(void 0,"api/GenerateJournal/invoice/Loader")}getCustomerSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetCustomerSuggestion",{params:t})}getJournalInvoice(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/invoice/get",t)}generateJournalInvoice(e){return this.httpService.post(void 0,"api/GenerateJournal/invoice/Submit",e)}getGJSupplierBillLoader(){return this.httpService.get(void 0,"api/GenerateJournal/bill/Loader")}getJournalSupplierBill(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/bill/get",t)}generateJournalSupplierBill(e){return this.httpService.post(void 0,"api/GenerateJournal/bill/Submit",e)}getGJShiftLoader(){return this.httpService.get(void 0,"api/GenerateJournal/Shift/Loader")}getJournalShift(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/Shift/get",t)}generateJornalShift(e){return this.httpService.post(void 0,"api/GenerateJournal/Shift/Submit",e)}getARJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinInvoice/Loader")}getARJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinInvoice/get",t)}createARJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinInvoice/Submit",e)}getAPJournalLoader(){return this.httpService.get(void 0,"/api/GenerateJournal/JoinBill/Loader")}getAPJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/JoinBill/get",t)}createAPJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/JoinBill/Submit",e)}getGJAdjustmentLoader(){return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/Loader")}getAdjustmentJournal(e){let t={params:e};return this.httpService.get(void 0,"api/GenerateJournal/InventoryAdjustment/get",t)}createAdjustmentJournal(e){return this.httpService.post(void 0,"api/GenerateJournal/InventoryAdjustment/Submit",e)}getSupplierSuggestions(e){let t={Prefix:e,Count:100};return this.httpService.get(this.authService.getTenantExternalURL(),"/API/AC/GetSupplierSuggestion",{params:t})}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=i({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{d as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as
|
|
1
|
+
import{$ as Qt,B as Y,Da as it,I as jt,La as Gt,Ma as T,Q as K,Qa as Ct,Sa as Z,Ta as J,Ua as $,V as vt,Va as Xt,_ as qt,ca as $t,j as Rt,ja as Zt,na as _,qa as xt,xa as Ut,z as Q}from"./chunk-G5S5AZA7.js";import{a as gt,h as At,k as Nt,l as Ht,m as Vt,r as P,s as ft,t as Wt}from"./chunk-OKCHQM5Q.js";import{Aa as Ft,Ab as g,Ac as yt,Cb as q,Da as N,Ea as lt,Jb as O,Ka as at,Kb as f,Lb as Dt,Mb as M,Nb as Bt,Ob as z,Qc as Ot,Ub as G,Vb as X,Vc as p,Wb as H,Wc as Pt,Xb as ct,Yb as ut,Yc as ot,Zb as Mt,Zc as Lt,ba as C,ca as w,dc as dt,ec as B,fc as V,gb as S,gc as W,ha as c,jc as tt,lb as _t,lc as et,mb as Tt,mc as nt,nc as mt,oa as U,oc as zt,pb as ht,qc as pt,ra as kt,rc as bt,ta as u,va as Et,wb as F,xb as I,yb as E,yc as y,za as st}from"./chunk-JP6RBSB3.js";import{a as k}from"./chunk-YQFG5XE2.js";var Yt=(()=>{class e extends ${name="common";static \u0275fac=(()=>{let t;return function(o){return(t||(t=u(e)))(o||e)}})();static \u0275prov=C({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),v=(()=>{class e{document=c(gt);platformId=c(at);el=c(lt);injector=c(Et);cd=c(Ot);renderer=c(_t);config=c(Xt);baseComponentStyle=c(Yt);baseStyle=c($);scopedStyleEl;rootEl;dt;get styleOptions(){return{nonce:this.config?.csp().nonce}}get _name(){return this.constructor.name.replace(/^_/,"").toLowerCase()}get componentStyle(){return this._componentStyle}attrSelector=it("pc");themeChangeListeners=[];_getHostInstance(t){if(t)return t?this.hostName?t.name===this.hostName?t:this._getHostInstance(t.parentInstance):t.parentInstance:void 0}_getOptionValue(t,n="",o={}){return Ut(t,n,o)}ngOnInit(){this.document&&this._loadStyles()}ngAfterViewInit(){this.rootEl=this.el?.nativeElement,this.rootEl&&this.rootEl?.setAttribute(this.attrSelector,"")}ngOnChanges(t){if(this.document&&!Wt(this.platformId)){let{dt:n}=t;n&&n.currentValue&&(this._loadScopedThemeStyles(n.currentValue),this._themeChangeListener(()=>this._loadScopedThemeStyles(n.currentValue)))}}ngOnDestroy(){this._unloadScopedThemeStyles(),this.themeChangeListeners.forEach(t=>Ct.off("theme:change",t))}_loadStyles(){let t=()=>{J.isStyleNameLoaded("base")||(this.baseStyle.loadGlobalCSS(this.styleOptions),J.setLoadedStyleName("base")),this._loadThemeStyles()};t(),this._themeChangeListener(()=>t())}_loadCoreStyles(){!J.isStyleNameLoaded("base")&&this._name&&(this.baseComponentStyle.loadCSS(this.styleOptions),this.componentStyle&&this.componentStyle?.loadCSS(this.styleOptions),J.setLoadedStyleName(this.componentStyle?.name))}_loadThemeStyles(){if(!Z.isStyleNameLoaded("common")){let{primitive:t,semantic:n,global:o,style:r}=this.componentStyle?.getCommonTheme?.()||{};this.baseStyle.load(t?.css,k({name:"primitive-variables"},this.styleOptions)),this.baseStyle.load(n?.css,k({name:"semantic-variables"},this.styleOptions)),this.baseStyle.load(o?.css,k({name:"global-variables"},this.styleOptions)),this.baseStyle.loadGlobalTheme(k({name:"global-style"},this.styleOptions),r),Z.setLoadedStyleName("common")}if(!Z.isStyleNameLoaded(this.componentStyle?.name)&&this.componentStyle?.name){let{css:t,style:n}=this.componentStyle?.getComponentTheme?.()||{};this.componentStyle?.load(t,k({name:`${this.componentStyle?.name}-variables`},this.styleOptions)),this.componentStyle?.loadTheme(k({name:`${this.componentStyle?.name}-style`},this.styleOptions),n),Z.setLoadedStyleName(this.componentStyle?.name)}if(!Z.isStyleNameLoaded("layer-order")){let t=this.componentStyle?.getLayerOrderThemeCSS?.();this.baseStyle.load(t,k({name:"layer-order",first:!0},this.styleOptions)),Z.setLoadedStyleName("layer-order")}this.dt&&(this._loadScopedThemeStyles(this.dt),this._themeChangeListener(()=>this._loadScopedThemeStyles(this.dt)))}_loadScopedThemeStyles(t){let{css:n}=this.componentStyle?.getPresetTheme?.(t,`[${this.attrSelector}]`)||{},o=this.componentStyle?.load(n,k({name:`${this.attrSelector}-${this.componentStyle?.name}`},this.styleOptions));this.scopedStyleEl=o?.el}_unloadScopedThemeStyles(){this.scopedStyleEl?.remove()}_themeChangeListener(t=()=>{}){J.clearLoadedStyleNames(),Ct.on("theme:change",t),this.themeChangeListeners.push(t)}cx(t,n){let o=this.parent?this.parent.componentStyle?.classes?.[t]:this.componentStyle?.classes?.[t];return typeof o=="function"?o({instance:this}):typeof o=="string"?o:t}sx(t){let n=this.componentStyle?.inlineStyles?.[t];return typeof n=="function"?n({instance:this}):typeof n=="string"?n:k({},n)}get parent(){return this.parentInstance}static \u0275fac=function(n){return new(n||e)};static \u0275dir=E({type:e,inputs:{dt:"dt"},features:[y([Yt,$]),U]})}return e})();var fe=["*"],he=({dt:e})=>`
|
|
2
2
|
.p-iconfield {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: block;
|