dealposbooks 5.37.1 → 5.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/3rdpartylicenses.txt +26 -26
  2. package/{chunk-QNSTXREL.js → chunk-2JNTUTNL.js} +1 -1
  3. package/{chunk-JDZMCMCO.js → chunk-3267XKO5.js} +1 -1
  4. package/{chunk-DFBPVWWJ.js → chunk-4IEK5V2S.js} +3 -3
  5. package/{chunk-2DAPTQ7N.js → chunk-4R64ZVCC.js} +1 -1
  6. package/{chunk-KHMIHCAB.js → chunk-4WAIBWB3.js} +1 -1
  7. package/{chunk-HSG33HWO.js → chunk-4XLWJIA4.js} +2 -2
  8. package/{chunk-KEGWYPJ2.js → chunk-4ZDV2QVO.js} +2 -2
  9. package/{chunk-LQCMUDVC.js → chunk-5PDLMIPF.js} +1 -1
  10. package/{chunk-UHUGKP5L.js → chunk-6XPCPRHF.js} +1 -1
  11. package/{chunk-RV7TVDYN.js → chunk-A25JUSCO.js} +1 -1
  12. package/chunk-AOOR6RAK.js +1 -0
  13. package/{chunk-TIL4F3YR.js → chunk-BWBNGOLL.js} +1 -1
  14. package/{chunk-WOKDHWWC.js → chunk-C4LGY75Z.js} +2 -2
  15. package/{chunk-YHRJY65N.js → chunk-CCBBIKGU.js} +1 -1
  16. package/{chunk-URTRLKMJ.js → chunk-E2R6VN7Z.js} +1 -1
  17. package/{chunk-ILRZCFZP.js → chunk-EGS6BIKL.js} +1 -1
  18. package/{chunk-T6TUPYUS.js → chunk-FOCWONCO.js} +1 -1
  19. package/{chunk-DKYLWJXD.js → chunk-HBNGOJIS.js} +1 -1
  20. package/chunk-HWZKSQ5E.js +1 -0
  21. package/{chunk-67P7OKVV.js → chunk-I4WD74I3.js} +1 -1
  22. package/{chunk-ZUBMF5VC.js → chunk-IANH6F5O.js} +1 -1
  23. package/{chunk-BIB37SKB.js → chunk-IFNPFJH5.js} +1 -1
  24. package/{chunk-FT65M3TM.js → chunk-IIS3WYGB.js} +1 -1
  25. package/{chunk-P42D576F.js → chunk-IIW75XWJ.js} +1 -1
  26. package/chunk-JGPCJCYI.js +1 -0
  27. package/{chunk-MNQQQQRE.js → chunk-JO34HDB4.js} +5 -5
  28. package/{chunk-KGGIWN5W.js → chunk-K5CHFPJQ.js} +1 -1
  29. package/{chunk-CUWNYABC.js → chunk-KUHLDSNT.js} +1 -1
  30. package/{chunk-4BMO6GHT.js → chunk-MO4YK4HT.js} +1 -1
  31. package/{chunk-A7DO5VFX.js → chunk-NM7Z2FA7.js} +1 -1
  32. package/chunk-O2725QPF.js +160 -0
  33. package/{chunk-U2OTWITI.js → chunk-OCFTAJHS.js} +1 -1
  34. package/chunk-OUIY2TC7.js +8 -0
  35. package/{chunk-3EHLCVDF.js → chunk-QC7LTJLT.js} +1 -1
  36. package/{chunk-CVOI5T6R.js → chunk-QFOKESND.js} +1 -1
  37. package/{chunk-WCM7PDH3.js → chunk-RB3MCWL5.js} +1 -1
  38. package/{chunk-43IWPYHH.js → chunk-T5LNS6MU.js} +1 -1
  39. package/chunk-TEEBLB6T.js +7 -0
  40. package/{chunk-NKXIC6W4.js → chunk-VHKZXNG3.js} +1 -1
  41. package/{chunk-L4U6CZR3.js → chunk-WDQXDERR.js} +1 -1
  42. package/{chunk-VKPPDDEW.js → chunk-WZWAFKRU.js} +1 -1
  43. package/{chunk-HDKEYJ4D.js → chunk-XOEBC23H.js} +1 -1
  44. package/chunk-XZIY7XVI.js +202 -0
  45. package/{chunk-QZRK5J6G.js → chunk-Y7NHB6MD.js} +1 -1
  46. package/{chunk-BVS6QVV7.js → chunk-YIAUCENA.js} +1 -1
  47. package/{chunk-GACHEN2E.js → chunk-YS5U5SXP.js} +1 -1
  48. package/{chunk-TXD7DO47.js → chunk-YTNI3IAH.js} +1 -1
  49. package/chunk-ZEVIDUTH.js +1 -0
  50. package/{chunk-RDLPFQ2D.js → chunk-ZW6ONWWO.js} +1 -1
  51. package/{chunk-5BTX6G5Y.js → chunk-ZXXBWTY6.js} +1 -1
  52. package/index.html +2 -2
  53. package/{main-Y4CHDO3C.js → main-ILDJZYPX.js} +1 -1
  54. package/package.json +1 -1
  55. package/chunk-AIX2GOSV.js +0 -1
  56. package/chunk-CGQEEDRE.js +0 -1
  57. package/chunk-IYMRJK4T.js +0 -1
  58. package/chunk-L3VFI54W.js +0 -7
  59. package/chunk-NMPX3YVB.js +0 -202
  60. package/chunk-Q2VDXWZJ.js +0 -1
  61. package/chunk-TTNZ3IGM.js +0 -1
  62. package/chunk-XAIS3MEH.js +0 -160
package/chunk-NMPX3YVB.js DELETED
@@ -1,202 +0,0 @@
1
- import{a as K,b as Ct}from"./chunk-2DAPTQ7N.js";import{a as bt}from"./chunk-G4XX7EU2.js";import{f as xt}from"./chunk-5AD3KAHO.js";import"./chunk-DUEYD2IO.js";import{a as wt}from"./chunk-XKI7WLHE.js";import{a as rt}from"./chunk-GACHEN2E.js";import"./chunk-KKZF4RQM.js";import{a as $,b as W}from"./chunk-RNPNKSFR.js";import{d as _t,i as ft,j as ht,k as gt}from"./chunk-BRCJWPEZ.js";import"./chunk-N5W3C4LG.js";import"./chunk-BSFKUGYO.js";import"./chunk-MASZROSE.js";import{a as ue}from"./chunk-7CUSFSFC.js";import"./chunk-NI4XE6XQ.js";import{a as dt,b as ut}from"./chunk-RZI2OI6V.js";import"./chunk-A7LRQMLA.js";import"./chunk-4TW5N3R5.js";import"./chunk-NTCCFR6P.js";import"./chunk-W6IKDXXT.js";import"./chunk-5B3BG43K.js";import"./chunk-UVIJU7TM.js";import"./chunk-EALZUKSJ.js";import{h as mt}from"./chunk-DFBPVWWJ.js";import{a as Ke}from"./chunk-WNA57NZF.js";import{a as it,b as nt}from"./chunk-MUFRLGLG.js";import{a as I,b as ot,c as at,d as st,e as lt,f as pt,g as ct}from"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{a as We,f as L,k as Je,m as Xe,o as Ye,s as et,w as Z,x as tt}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{A as ze,C as Ge,K as je,La as Ze,Ma as q,Ua as $e,c as me,e as Oe,f as Ae,l as Be,ma as qe,o as He,u as Ne,x as Qe,z as de}from"./chunk-NHXCR55X.js";import{b as Pe,d as Re,e as Le}from"./chunk-DOKG43W6.js";import"./chunk-RV7TVDYN.js";import"./chunk-R3JWL2J6.js";import{c as Me,d as ae,f as se,h as le,i as pe,k as ce}from"./chunk-F2X3VGZZ.js";import{h as z,k as G,m as Ve,s as j}from"./chunk-VU532YE3.js";import{Ab as H,Bc as Q,Cb as _,Dc as V,Ec as De,Ga as R,Ic as Ee,Jb as D,Kb as a,Nb as be,Ob as Y,Pb as xe,Qb as ee,Qc as x,Sb as te,Tb as ie,Ub as p,Vb as m,Wb as k,X as O,Xb as Ce,Yb as ye,Z as J,Zb as E,Zc as T,_b as S,_c as Ue,ad as P,ba as he,bd as Fe,c as M,ca as ge,dc as b,ec as l,fc as ve,gb as s,gc as ke,ha as C,jc as U,kc as N,lc as y,mc as v,pa as d,pc as Se,qa as u,qc as g,rc as F,sc as Te,ta as X,uc as Ie,vc as ne,wb as B,wc as re,xb as we,xc as oe,za as A}from"./chunk-7IC4BZ6J.js";import{a as f,b as h}from"./chunk-YQFG5XE2.js";var St={data:[],count:0,filter:{pagination:1,pageSize:10,groupID:null,text:""},meta:{filter:{pagination:1,pageSize:10,groupID:null,text:""},options:{groups:[]}},metaForm:{form:{id:"",groupID:""},options:{users:[],groups:[]}}},_e=ot(ct("UserStore"),pt(St),at(t=>({first:P(()=>(t.filter().pagination-1)*t.filter().pageSize+1),end:P(()=>Math.min(t.filter().pagination*t.filter().pageSize,t.count())),hasCheckedRows:P(()=>t.data().some(o=>o.checked)),checkedData:P(()=>t.data().filter(o=>o.checked).map(o=>o.userID)),selectedID:P(()=>t.data().find(o=>o.checked)?.userID||null)})),lt(t=>{let o=C(K);return{setFilter(n){I(t,i=>h(f({},i),{filter:n}))},onRowSelect(n){I(t,i=>{let r=i.data.map(c=>c.userID===n.userID?h(f({},c),{checked:!0}):c);return h(f({},i),{data:r})})},onRowUnselect(n){I(t,i=>{let r=i.data.map(c=>c.userID===n.userID?h(f({},c),{checked:!1}):c);return h(f({},i),{data:r})})},onHeaderCheckboxToggle(n){let i=localStorage.getItem("AUTH_USERNAME");I(t,r=>{let c=r.data.map(w=>w.userName!==i?h(f({},w),{checked:n}):h(f({},w),{checked:!1}));return h(f({},r),{data:c})})},getUserLoader:$(M(O(()=>o.getUserLoaderList().pipe(W({next:n=>{I(t,i=>h(f({},i),{meta:n}))},error:n=>{console.error("Failed to fetch user loader list:",n)}}))))),getUserFormMeta:$(M(O(n=>o.getUserFormMeta(n).pipe(W({next:i=>{I(t,r=>h(f({},r),{metaForm:i}))},error:i=>{console.error("Failed to fetch user form meta:",i)}}))))),getUsers:$(M(O(n=>o.getUsers(n).pipe(W({next:i=>{I(t,r=>h(f({},r),{data:i.data.map(c=>h(f({},c),{checked:!1})),count:i.count}))},error:i=>{console.error("Failed to fetch users:",i)}})))))}}),st({onInit:t=>{t.getUserLoader(),t.getUsers(t.filter)}}));var Dt=["header"],Et=["footer"],Ut=["content"],Ft=["closeicon"],Vt=["headless"],Pt=["maskRef"],Rt=["container"],Lt=["closeButton"],Mt=["*"],Ot=(t,o,e,n,i,r)=>({"p-drawer":!0,"p-drawer-active":t,"p-drawer-left":o,"p-drawer-right":e,"p-drawer-top":n,"p-drawer-bottom":i,"p-drawer-full":r}),At=(t,o)=>({transform:t,transition:o}),Bt=t=>({value:"visible",params:t});function Ht(t,o){t&1&&E(0)}function Nt(t,o){if(t&1&&_(0,Ht,1,0,"ng-container",4),t&2){let e=l(2);a("ngTemplateOutlet",e.headlessTemplate||e._headlessTemplate)}}function Qt(t,o){t&1&&E(0)}function zt(t,o){if(t&1&&(p(0,"div"),g(1),m()),t&2){let e=l(3);Y(e.cx("title")),s(),F(e.header)}}function Gt(t,o){t&1&&k(0,"TimesIcon"),t&2&&D("data-pc-section","closeicon")}function jt(t,o){}function qt(t,o){t&1&&_(0,jt,0,0,"ng-template")}function Zt(t,o){if(t&1&&_(0,Gt,1,1,"TimesIcon",8)(1,qt,1,0,null,4),t&2){let e=l(4);a("ngIf",!e.closeIconTemplate&&!e._closeIconTemplate),s(),a("ngTemplateOutlet",e.closeIconTemplate||e._closeIconTemplate)}}function $t(t,o){if(t&1){let e=S();p(0,"p-button",9),b("onClick",function(i){d(e);let r=l(3);return u(r.close(i))})("keydown.enter",function(i){d(e);let r=l(3);return u(r.close(i))}),_(1,Zt,2,2,"ng-template",null,1,x),m()}if(t&2){let e=l(3);a("ngClass",e.cx("closeButton"))("buttonProps",e.closeButtonProps)("ariaLabel",e.ariaCloseLabel),D("data-pc-section","closebutton")("data-pc-group-section","iconcontainer")}}function Wt(t,o){t&1&&E(0)}function Kt(t,o){t&1&&E(0)}function Jt(t,o){if(t&1&&(Ce(0),p(1,"div",5),_(2,Kt,1,0,"ng-container",4),m(),ye()),t&2){let e=l(3);s(),a("ngClass",e.cx("footer")),D("data-pc-section","footer"),s(),a("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}function Xt(t,o){if(t&1&&(p(0,"div",5),_(1,Qt,1,0,"ng-container",4)(2,zt,2,3,"div",6)(3,$t,3,5,"p-button",7),m(),p(4,"div",5),ke(5),_(6,Wt,1,0,"ng-container",4),m(),_(7,Jt,3,3,"ng-container",8)),t&2){let e=l(2);a("ngClass",e.cx("header")),D("data-pc-section","header"),s(),a("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),s(),a("ngIf",e.header),s(),a("ngIf",e.showCloseIcon&&e.closable),s(),a("ngClass",e.cx("content")),D("data-pc-section","content"),s(2),a("ngTemplateOutlet",e.contentTemplate||e._contentTemplate),s(),a("ngIf",e.footerTemplate||e._footerTemplate)}}function Yt(t,o){if(t&1){let e=S();p(0,"div",3,0),b("@panelState.start",function(i){d(e);let r=l();return u(r.onAnimationStart(i))})("@panelState.done",function(i){d(e);let r=l();return u(r.onAnimationEnd(i))})("keydown",function(i){d(e);let r=l();return u(r.onKeyDown(i))}),_(2,Nt,1,1,"ng-container")(3,Xt,8,9),m()}if(t&2){let e=l();be(e.style),Y(e.styleClass),a("ngClass",Ee(9,Ot,e.visible,e.position==="left"&&!e.fullScreen,e.position==="right"&&!e.fullScreen,e.position==="top"&&!e.fullScreen,e.position==="bottom"&&!e.fullScreen,e.fullScreen||e.position==="full"))("@panelState",V(19,Bt,De(16,At,e.transformOptions,e.transitionOptions))),D("data-pc-name","sidebar")("data-pc-section","root"),s(2),xe(e.headlessTemplate||e._headlessTemplate?2:3)}}var ei=({dt:t})=>`
2
- .p-drawer {
3
- display: flex;
4
- flex-direction: column;
5
- pointer-events: auto;
6
- transform: translate3d(0px, 0px, 0px);
7
- position: fixed;
8
- transition: transform 0.3s;
9
- background: ${t("drawer.background")};
10
- color: ${t("drawer.color")};
11
- border: 1px solid ${t("drawer.border.color")};
12
- box-shadow: ${t("drawer.shadow")};
13
- }
14
-
15
- .p-drawer-content {
16
- overflow-y: auto;
17
- flex-grow: 1;
18
- padding: ${t("drawer.content.padding")};
19
- }
20
-
21
- .p-drawer-header {
22
- display: flex;
23
- align-items: center;
24
- justify-content: space-between;
25
- flex-shrink: 0;
26
- padding: ${t("drawer.header.padding")};
27
- }
28
-
29
- .p-drawer-footer {
30
- padding: ${t("drawer.header.padding")};
31
- }
32
-
33
- .p-drawer-title {
34
- font-weight: ${t("drawer.title.font.weight")};
35
- font-size: ${t("drawer.title.font.size")};
36
- }
37
-
38
- .p-drawer-full .p-drawer {
39
- transition: none;
40
- transform: none;
41
- width: 100vw !important;
42
- height: 100vh !important;
43
- max-height: 100%;
44
- top: 0px !important;
45
- left: 0px !important;
46
- border-width: 1px;
47
- }
48
-
49
- .p-drawer-left .p-drawer {
50
- align-self: start;
51
- width: 20rem;
52
- height: 100%;
53
- border-right-width: 1px;
54
- }
55
-
56
- .p-drawer-right .p-drawer {
57
- align-self: end;
58
- width: 20rem;
59
- height: 100%;
60
- border-left-width: 1px;
61
- }
62
-
63
- .p-drawer-top .p-drawer {
64
- height: 10rem;
65
- width: 100%;
66
- border-bottom-width: 1px;
67
- }
68
-
69
- .p-drawer-bottom .p-drawer {
70
- height: 10rem;
71
- width: 100%;
72
- border-top-width: 1px;
73
- }
74
-
75
- .p-drawer-left .p-drawer-content,
76
- .p-drawer-right .p-drawer-content,
77
- .p-drawer-top .p-drawer-content,
78
- .p-drawer-bottom .p-drawer-content {
79
- width: 100%;
80
- height: 100%;
81
- }
82
-
83
- .p-drawer-open {
84
- display: flex;
85
- }
86
-
87
- .p-drawer-top {
88
- justify-content: flex-start;
89
- }
90
-
91
- .p-drawer-bottom {
92
- justify-content: flex-end;
93
- }
94
-
95
- .p-drawer {
96
- position: fixed;
97
- transition: transform 0.3s;
98
- display: flex;
99
- flex-direction: column;
100
- }
101
-
102
- .p-drawer-content {
103
- position: relative;
104
- overflow-y: auto;
105
- flex-grow: 1;
106
- }
107
-
108
- .p-drawer-header {
109
- display: flex;
110
- align-items: center;
111
- }
112
-
113
- .p-drawer-footer {
114
- margin-top: auto;
115
- }
116
-
117
- .p-drawer-icon {
118
- display: flex;
119
- align-items: center;
120
- justify-content: center;
121
- margin-left: auto;
122
- }
123
-
124
- .p-drawer-left {
125
- top: 0;
126
- left: 0;
127
- width: 20rem;
128
- height: 100%;
129
- }
130
-
131
- .p-drawer-right {
132
- top: 0;
133
- right: 0;
134
- width: 20rem;
135
- height: 100%;
136
- }
137
-
138
- .p-drawer-top {
139
- top: 0;
140
- left: 0;
141
- width: 100%;
142
- height: 10rem;
143
- }
144
-
145
- .p-drawer-bottom {
146
- bottom: 0;
147
- left: 0;
148
- width: 100%;
149
- height: 10rem;
150
- }
151
-
152
- .p-drawer-full {
153
- width: 100%;
154
- height: 100%;
155
- top: 0;
156
- left: 0;
157
- -webkit-transition: none;
158
- transition: none;
159
- }
160
-
161
- .p-drawer-mask {
162
- background-color: rgba(0, 0, 0, 0.4);
163
- transition-duration: 0.2s;
164
- }
165
-
166
- .p-overlay-mask {
167
- position: fixed;
168
- top: 0;
169
- left: 0;
170
- width: 100%;
171
- height: 100%;
172
- }
173
-
174
- .p-overlay-mask:dir(rtl) {
175
- flex-direction: row-reverse;
176
- }
177
-
178
- .p-overlay-mask-enter {
179
- animation: p-overlay-mask-enter-animation 150ms forwards;
180
- }
181
-
182
- .p-overlay-mask-leave {
183
- animation: p-overlay-mask-leave-animation 150ms forwards;
184
- }
185
-
186
- @keyframes p-overlay-mask-enter-animation {
187
- from {
188
- background-color: transparent;
189
- }
190
- to {
191
- background-color: rgba(0, 0, 0, 0.4);
192
- }
193
- }
194
- @keyframes p-overlay-mask-leave-animation {
195
- from {
196
- background-color: rgba(0, 0, 0, 0.4);
197
- }
198
- to {
199
- background-color: transparent;
200
- }
201
- }
202
- `,ti={mask:({instance:t})=>({position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",flexDirection:"column",alignItems:t.position==="top"?"flex-start":t.position==="bottom"?"flex-end":"center"})},ii={mask:({instance:t})=>({"p-drawer-mask":!0,"p-overlay-mask p-overlay-mask-enter":t.modal,"p-drawer-open":t.containerVisible,"p-drawer-full":t.fullScreen,[`p-drawer-${t.position}`]:!!t.position}),root:({instance:t})=>({"p-drawer p-component":!0,"p-drawer-full":t.fullScreen}),header:"p-drawer-header",title:"p-drawer-title",pcCloseButton:"p-drawer-close-button",content:"p-drawer-content",footer:"p-drawer-footer"},yt=(()=>{class t extends $e{name="drawer";theme=ei;classes=ii;inlineStyles=ti;static \u0275fac=(()=>{let e;return function(i){return(e||(e=X(t)))(i||t)}})();static \u0275prov=he({token:t,factory:t.\u0275fac})}return t})();var ni=pe([se({transform:"{{transform}}",opacity:0}),ae("{{transition}}")]),ri=pe([ae("{{transition}}",se({transform:"{{transform}}",opacity:0}))]),fe=(()=>{class t extends We{appendTo="body";blockScroll=!1;style;styleClass;ariaCloseLabel;autoZIndex=!0;baseZIndex=0;modal=!0;closeButtonProps={severity:"secondary",text:!0,rounded:!0};dismissible=!0;showCloseIcon=!0;closeOnEscape=!0;transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";get visible(){return this._visible}set visible(e){this._visible=e}get position(){return this._position}set position(e){if(this._position=e,e==="full"){this.transformOptions="none";return}switch(e){case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break}}get fullScreen(){return this._fullScreen}set fullScreen(e){this._fullScreen=e,e&&(this.transformOptions="none")}header;maskStyle;closable=!0;onShow=new A;onHide=new A;visibleChange=new A;maskRef;containerViewChild;closeButtonViewChild;initialized;_visible;_position="left";_fullScreen=!1;container;transformOptions="translate3d(-100%, 0px, 0px)";mask;maskClickListener;documentEscapeListener;animationEndListener;_componentStyle=C(yt);ngAfterViewInit(){super.ngAfterViewInit(),this.initialized=!0}headerTemplate;footerTemplate;contentTemplate;closeIconTemplate;headlessTemplate;_headerTemplate;_footerTemplate;_contentTemplate;_closeIconTemplate;_headlessTemplate;templates;ngAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"content":this._contentTemplate=e.template;break;case"header":this._headerTemplate=e.template;break;case"footer":this._footerTemplate=e.template;break;case"closeicon":this._closeIconTemplate=e.template;break;case"headless":this._headlessTemplate=e.template;break;default:this._contentTemplate=e.template;break}})}onKeyDown(e){e.code==="Escape"&&this.hide(!1)}show(){this.container.setAttribute(this.attrSelector,""),this.autoZIndex&&L.set("modal",this.container,this.baseZIndex||this.config.zIndex.modal),this.modal&&this.enableModality(),this.onShow.emit({}),this.visibleChange.emit(!0)}hide(e=!0){e&&this.onHide.emit({}),this.modal&&this.disableModality()}close(e){this.hide(),this.visibleChange.emit(!1),e.preventDefault()}enableModality(){let e=this.document.querySelectorAll(".p-drawer-active"),n=e.length,i=n==1?String(parseInt(this.container.style.zIndex)-1):String(parseInt(e[n-1].style.zIndex)-1);this.mask||(this.mask=this.renderer.createElement("div"),this.renderer.setStyle(this.mask,"zIndex",i),qe(this.mask,"style",this.maskStyle),de(this.mask,"p-overlay-mask p-drawer-mask p-overlay-mask-enter"),this.dismissible&&(this.maskClickListener=this.renderer.listen(this.mask,"click",r=>{this.dismissible&&this.close(r)})),this.renderer.appendChild(this.document.body,this.mask),this.blockScroll&&ze())}disableModality(){this.mask&&(de(this.mask,"p-overlay-mask-leave"),this.animationEndListener=this.renderer.listen(this.mask,"animationend",this.destroyModal.bind(this)))}destroyModal(){this.unbindMaskClickListener(),this.mask&&this.renderer.removeChild(this.document.body,this.mask),this.blockScroll&&Ge(),this.unbindAnimationEndListener(),this.mask=null}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.appendContainer(),this.show(),this.closeOnEscape&&this.bindDocumentEscapeListener();break}}onAnimationEnd(e){switch(e.toState){case"void":this.hide(!1),L.clear(this.container),this.unbindGlobalListeners();break}}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.container):je(this.appendTo,this.container))}bindDocumentEscapeListener(){let e=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentEscapeListener=this.renderer.listen(e,"keydown",n=>{n.which==27&&parseInt(this.container.style.zIndex)===L.get(this.container)&&this.close(n)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}unbindGlobalListeners(){this.unbindMaskClickListener(),this.unbindDocumentEscapeListener()}unbindAnimationEndListener(){this.animationEndListener&&this.mask&&(this.animationEndListener(),this.animationEndListener=null)}ngOnDestroy(){this.initialized=!1,this.visible&&this.modal&&this.destroyModal(),this.appendTo&&this.container&&this.renderer.appendChild(this.el.nativeElement,this.container),this.container&&this.autoZIndex&&L.clear(this.container),this.container=null,this.unbindGlobalListeners(),this.unbindAnimationEndListener()}static \u0275fac=(()=>{let e;return function(i){return(e||(e=X(t)))(i||t)}})();static \u0275cmp=B({type:t,selectors:[["p-drawer"]],contentQueries:function(n,i,r){if(n&1&&(U(r,Dt,4),U(r,Et,4),U(r,Ut,4),U(r,Ft,4),U(r,Vt,4),U(r,Ze,4)),n&2){let c;y(c=v())&&(i.headerTemplate=c.first),y(c=v())&&(i.footerTemplate=c.first),y(c=v())&&(i.contentTemplate=c.first),y(c=v())&&(i.closeIconTemplate=c.first),y(c=v())&&(i.headlessTemplate=c.first),y(c=v())&&(i.templates=c)}},viewQuery:function(n,i){if(n&1&&(N(Pt,5),N(Rt,5),N(Lt,5)),n&2){let r;y(r=v())&&(i.maskRef=r.first),y(r=v())&&(i.containerViewChild=r.first),y(r=v())&&(i.closeButtonViewChild=r.first)}},inputs:{appendTo:"appendTo",blockScroll:[2,"blockScroll","blockScroll",T],style:"style",styleClass:"styleClass",ariaCloseLabel:"ariaCloseLabel",autoZIndex:[2,"autoZIndex","autoZIndex",T],baseZIndex:[2,"baseZIndex","baseZIndex",Ue],modal:[2,"modal","modal",T],closeButtonProps:"closeButtonProps",dismissible:[2,"dismissible","dismissible",T],showCloseIcon:[2,"showCloseIcon","showCloseIcon",T],closeOnEscape:[2,"closeOnEscape","closeOnEscape",T],transitionOptions:"transitionOptions",visible:"visible",position:"position",fullScreen:"fullScreen",header:"header",maskStyle:"maskStyle",closable:[2,"closable","closable",T]},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange"},features:[Q([yt]),H],ngContentSelectors:Mt,decls:1,vars:1,consts:[["container",""],["icon",""],["role","complementary",3,"ngClass","style","class","keydown",4,"ngIf"],["role","complementary",3,"keydown","ngClass"],[4,"ngTemplateOutlet"],[3,"ngClass"],[3,"class",4,"ngIf"],[3,"ngClass","buttonProps","ariaLabel","onClick","keydown.enter",4,"ngIf"],[4,"ngIf"],[3,"onClick","keydown.enter","ngClass","buttonProps","ariaLabel"]],template:function(n,i){n&1&&(ve(),_(0,Yt,4,21,"div",2)),n&2&&a("ngIf",i.visible)},dependencies:[j,z,G,Ve,Z,Ke,q],encapsulation:2,data:{animation:[Me("panelState",[le("void => visible",[ce(ni)]),le("visible => void",[ce(ri)])])]},changeDetection:0})}return t})(),vt=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=we({type:t});static \u0275inj=ge({imports:[fe,q,q]})}return t})();var ai=["class","page"],kt=t=>({"ng-invalid ng-dirty":t}),si=t=>({groupID:t});function li(t,o){if(t&1){let e=S();p(0,"p-button",21),b("onClick",function(){d(e);let i=l(2);return u(i.onDeleteUser())}),m()}}function pi(t,o){if(t&1){let e=S();p(0,"p-button",22),b("onClick",function(){d(e);let i=l(2);return u(i.onHandleDrawer())}),m()}}function ci(t,o){if(t&1&&(p(0,"div",18),_(1,li,1,0,"p-button",19)(2,pi,1,0,"p-button",20),m()),t&2){let e=l();s(),a("ngIf",e.store.hasCheckedRows()),s(),a("ngIf",e.roleService.user.create)}}function mi(t,o){t&1&&(p(0,"th",26),k(1,"p-tableHeaderCheckbox"),m())}function di(t,o){if(t&1&&(p(0,"tr"),_(1,mi,2,0,"th",25),p(2,"th"),g(3,"LoginID"),m(),p(4,"th"),g(5,"Group"),m()()),t&2){let e=l(2);s(),a("ngIf",e.roleService.user.delete)}}function ui(t,o){t&1&&E(0)}function _i(t,o){if(t&1&&k(0,"p-tableCheckbox",32),t&2){let e=l(3).$implicit;a("value",e)}}function fi(t,o){if(t&1&&_(0,_i,1,1,"p-tableCheckbox",31),t&2){let e=l(4);a("ngIf",e.roleService.user.delete)}}function hi(t,o){if(t&1&&(p(0,"td"),_(1,ui,1,0,"ng-container",30)(2,fi,1,1,"ng-template",null,7,x),m()),t&2){let e=Se(3),n=l().$implicit,i=l(2);s(),a("ngIf",i.roleService.user.delete&&n.userName===i.currentUser())("ngIfElse",e)}}function gi(t,o){if(t&1){let e=S();p(0,"tr"),_(1,hi,4,2,"td",27),p(2,"td")(3,"button",28),b("click",function(){let i=d(e).$implicit,r=l(2);return u(r.onEditUser(i))}),g(4),m()(),p(5,"td")(6,"a",29),g(7),m()()()}if(t&2){let e=o.$implicit,n=l(2);s(),a("ngIf",n.roleService.user.delete),s(2),a("disabled",!n.roleService.user.edit),s(),Te(" ",e.userName||e.userID," "),s(2),a("queryParams",V(5,si,e.groupID)),s(),F(e.groupName)}}function wi(t,o){if(t&1&&g(0),t&2){let e=l(2);Ie(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.count()," entries ")}}function bi(t,o){t&1&&(p(0,"tr")(1,"td",33)(2,"span"),g(3,"No users found. Try adjusting your filters or add a new user."),m()()())}function xi(t,o){if(t&1){let e=S();p(0,"p-panel")(1,"div",23),k(2,"app-user-tabs"),p(3,"p-table",24),b("onPage",function(i){d(e);let r=l();return u(r.onPageChange(i))})("onRowSelect",function(i){d(e);let r=l();return u(r.onRowSelect(i))})("onRowUnselect",function(i){d(e);let r=l();return u(r.onRowUnselect(i))})("onHeaderCheckboxToggle",function(i){d(e);let r=l();return u(r.onHeaderCheckboxToggle(i))}),_(4,di,6,1,"ng-template",null,3,x)(6,gi,8,7,"ng-template",null,4,x)(8,wi,1,3,"ng-template",null,5,x)(10,bi,4,0,"ng-template",null,6,x),m()()()}if(t&2){let e=l();s(3),a("value",e.store.data())("lazy",!0)("paginator",!0)("rows",e.store.filter().pageSize)("totalRecords",e.store.count())}}function Ci(t,o){if(t&1&&(p(0,"div",34)(1,"div",16)(2,"div",35)(3,"label",36),g(4,"Group"),m(),k(5,"p-select",37),m()()()),t&2){let e=l();a("formGroup",e.forms.filterForm),s(5),a("showClear",!0)("options",e.store.meta().options.groups)}}function yi(t,o){if(t&1&&(p(0,"span",38),g(1),m()),t&2){let e=l();s(),F(e.store.hasCheckedRows()?"Edit User":"Invite User")}}function vi(t,o){if(t&1&&(p(0,"small",14),g(1),m()),t&2){let e=o.$implicit;s(),F(e)}}function ki(t,o){if(t&1&&(p(0,"small",14),g(1),m()),t&2){let e=o.$implicit;s(),F(e)}}var Fn=(()=>{class t extends wt{ngOnInit(){this.generateForm()}constructor(){Fe(()=>{this.store.metaForm()&&this.generateForm()}),super(),this.store=C(_e),this.fb=C(Ne),this.userService=C(K),this.isLoading=R(!1),this.form=null,this.isDrawerOpen=R(!1),this.router=C(Re),this.route=C(Pe),this.isDialogFilterVisible=R(!1),this.roleService=C(rt),this.currentUser=R(null),this.tabs=[{route:"/pages/users/users",label:"Users"},{route:"/pages/users/groups",label:"Groups"}]}ngAfterViewInit(){this.currentUser.set(localStorage.getItem("AUTH_USERNAME")||null)}onPageChange(e){this.store.setFilter(h(f({},this.store.filter()),{pagination:e.first/e.rows+1}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(n=>{this.store.onRowUnselect(n)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}generateForm(){this.forms={filterForm:this.fb.group({pagination:this.fb.control(1),pageSize:this.fb.control(10),groupID:this.fb.control(null)}),userForm:this.fb.group({id:this.fb.control({value:this.store.metaForm().form.id,disabled:this.store.metaForm().form.id!==bt},[me.required]),groupID:this.fb.control(this.store.metaForm().form.groupID,[me.required])})}}onHandleDrawer(){this.isDrawerOpen.update(e=>!e),this.store.getUserFormMeta(this.route.snapshot.params.id||null)}onInviteUser(){if(this.forms.userForm.invalid){this.forms.userForm.markAllAsTouched();return}let e=null;this.store.hasCheckedRows()?(console.log(this.store.checkedData()),e={id:this.store.checkedData()[0],groupID:this.forms.userForm.value.groupID}):e=this.forms.userForm.getRawValue(),this.userService.inviteUser(e).pipe(ue("User invited successfully"),J(()=>{this.onHandleDrawer(),this.store.setFilter(f({},this.store.filter())),this.forms.userForm.reset()})).subscribe()}onSearch(e){this.store.setFilter(h(f({},this.store.filter()),{text:e,pagination:1}))}onOKFilter(){if(this.forms.filterForm.invalid){this.forms.filterForm.markAllAsTouched();return}let{groupID:e}=this.forms.filterForm.value;this.store.setFilter(h(f({},this.store.filter()),{groupID:e})),this.isDialogFilterVisible.update(n=>!n)}onEditUser(e){this.store.onRowSelect(e),this.store.getUserFormMeta(this.store.selectedID()),this.isDrawerOpen.update(n=>!n)}onHideDrawer(){this.store.onHeaderCheckboxToggle(!1)}onDeleteUser(){let e=this.store.checkedData();this.userService.deleteUser(e).pipe(ue("User(s) deleted successfully"),J(()=>{this.store.setFilter(f({},this.store.filter()))})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=B({type:t,selectors:[["app-user",8,"page"]],features:[Q([_e]),H],attrs:ai,decls:27,vars:15,consts:[["actionButton",""],["content",""],["filters",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["showCheckbox",""],["pageTitle","User List",3,"search","isDialogFilterVisibleChange","filterConfirmed","isSearchableInput","isFilterable","isDialogFilterVisible","scrollable"],["position","right",3,"visibleChange","onHide","visible"],[1,"row","py-3","row-gap-3",3,"formGroup"],[1,"col-12"],["for","",1,"m-0"],["fluid","","filter","","filterBy","name","formControlName","id","optionLabel","loginID","optionValue","id","placeholder","Select a User",3,"disabled","options","ngClass"],[1,"text-danger"],["filter","","filterBy","name","formControlName","groupID","optionLabel","name","optionValue","id","placeholder","Select a Group","fluid","",3,"options","ngClass"],[1,"col"],["label","Submit",3,"onClick"],[1,"d-flex","gap-2","flex-wrap"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["label","Invite",3,"onClick",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash",3,"onClick"],["label","Invite",3,"onClick"],[1,"d-flex","flex-column","gap-3","py-2"],["dataKey","userID",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","lazy","paginator","rows","totalRecords"],["style","width: 4rem",4,"ngIf"],[2,"width","4rem"],[4,"ngIf"],[1,"btn","btn-link","fw-light","text-primary","p-0",2,"text-decoration","none",3,"click","disabled"],["routerLink","/pages/users/groups/forms",1,"link","link-primary",3,"queryParams"],[4,"ngIf","ngIfElse"],[3,"value",4,"ngIf"],[3,"value"],["colspan","3"],[1,"row",3,"formGroup"],[1,"d-flex","flex-column"],["for",""],["appendTo","body","formControlName","groupID","optionValue","id","optionLabel","name","placeholder","Select a Group",3,"showClear","options"],[1,"fs-5"]],template:function(n,i){if(n&1){let r=S();p(0,"app-main-panel",8),b("search",function(w){return d(r),u(i.onSearch(w))}),oe("isDialogFilterVisibleChange",function(w){return d(r),re(i.isDialogFilterVisible,w)||(i.isDialogFilterVisible=w),u(w)}),b("filterConfirmed",function(){return d(r),u(i.onOKFilter())}),_(1,ci,3,2,"ng-template",null,0,x)(3,xi,12,5,"ng-template",null,1,x)(5,Ci,6,3,"ng-template",null,2,x),m(),p(7,"p-drawer",9),oe("visibleChange",function(w){return d(r),re(i.isDrawerOpen,w)||(i.isDrawerOpen=w),u(w)}),b("onHide",function(){return d(r),u(i.onHideDrawer())}),_(8,yi,2,1,"ng-template",null,3,x),p(10,"div",10)(11,"div",11)(12,"div")(13,"label",12),g(14,"Users"),m(),k(15,"p-select",13),te(16,vi,2,1,"small",14,ee),m()(),p(18,"div",11)(19,"div")(20,"label",12),g(21,"Groups"),m(),k(22,"p-select",15),te(23,ki,2,1,"small",14,ee),m()(),p(25,"div",16)(26,"p-button",17),b("onClick",function(){return d(r),u(i.onInviteUser())}),m()()()()}n&2&&(a("isSearchableInput",!0)("isFilterable",!0),ne("isDialogFilterVisible",i.isDialogFilterVisible),a("scrollable",!0),s(7),ne("visible",i.isDrawerOpen),s(3),a("formGroup",i.forms.userForm),s(5),a("disabled",i.store.hasCheckedRows())("options",i.store.metaForm().options.users)("ngClass",V(11,kt,i.isInvalid("id","userForm"))),s(),ie(i.getErrors("id","userForm")),s(6),a("options",i.store.metaForm().options.groups)("ngClass",V(13,kt,i.isInvalid("groupID","userForm"))),s(),ie(i.getErrors("id","userForm")))},dependencies:[mt,j,z,G,gt,_t,ft,ht,tt,Z,vt,fe,Qe,Oe,Ae,Be,He,Ye,Je,Xe,et,ut,dt,xt,nt,it,Ct,Le],styles:['[_nghost-%COMP%]{display:block} .p-tabs .p-tab{padding:"1rem 1.125rem"!important} .p-panel .p-panel-header{display:none!important}'],changeDetection:0})}}return t})();export{Fn as UserPageComponent};
package/chunk-Q2VDXWZJ.js DELETED
@@ -1 +0,0 @@
1
- import{a as S,b as v}from"./chunk-RNPNKSFR.js";import{d as Q,k as V}from"./chunk-BRCJWPEZ.js";import"./chunk-N5W3C4LG.js";import"./chunk-BSFKUGYO.js";import"./chunk-MASZROSE.js";import"./chunk-NI4XE6XQ.js";import"./chunk-RZI2OI6V.js";import"./chunk-A7LRQMLA.js";import"./chunk-4TW5N3R5.js";import"./chunk-NTCCFR6P.js";import"./chunk-W6IKDXXT.js";import"./chunk-5B3BG43K.js";import"./chunk-UVIJU7TM.js";import"./chunk-EALZUKSJ.js";import{b as J}from"./chunk-PS4MFIBX.js";import{h as z}from"./chunk-DFBPVWWJ.js";import"./chunk-WNA57NZF.js";import{a as N,b as j}from"./chunk-MUFRLGLG.js";import{a as B,b as G,c as H,d as K,e as U,f as q,g as $}from"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{w as F}from"./chunk-NHXCR55X.js";import{e as L,l as R}from"./chunk-DOKG43W6.js";import{a as O}from"./chunk-RV7TVDYN.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{q as D,s as I}from"./chunk-VU532YE3.js";import{Bc as M,Cb as C,Cc as T,Dc as _,Kb as m,Mc as x,Nc as k,Qc as c,Ub as n,Vb as a,Wb as y,X as u,ad as w,ba as E,c as h,ec as g,gb as l,ha as p,qc as r,rc as s,sc as P,wb as b}from"./chunk-7IC4BZ6J.js";import{a as d,b as f}from"./chunk-YQFG5XE2.js";var W=(()=>{class e{constructor(){this.httpService=p(O)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(){return this.httpService.get("","api/CashAndBank/GetCashAndBank")}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=E({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ee={data:[],filter:[],options:{hasGeneralLedger:!1}},A=G($("cash-bank-store"),q(ee),H(e=>({totalBalance:w(()=>e.data().reduce((o,t)=>o+t.balance,0))})),U(e=>{let o=p(W);return{loadCashAndBankLoader:S(h(u(()=>o.fetchCashAndBankLoader().pipe(v({next:t=>{console.log("response",t),B(e,i=>f(d({},i),{options:t.options}))},error:t=>{console.log("error",t)}}))))),loadCashAndBankData:S(h(u(()=>o.fetchCashAndBankData().pipe(v({next:t=>{console.log("response",t),B(e,i=>f(d({},i),{data:t}))},error:t=>{console.log("error",t)}})))))}}),K({onInit(e){e.loadCashAndBankLoader(),e.loadCashAndBankData()}}));var te=["class","page"],ne=e=>[e],ae=()=>["/pages/report/general-ledger"],oe=e=>({id:e});function ie(e,o){e&1&&(n(0,"tr")(1,"th"),r(2,"Code"),a(),n(3,"th"),r(4,"Name"),a(),n(5,"th",7),r(6,"Balance"),a()())}function re(e,o){if(e&1&&(n(0,"tr")(1,"td"),r(2),a(),n(3,"td")(4,"a",8),r(5),a()(),n(6,"td",7)(7,"a",9),r(8),x(9,"number"),a()()()),e&2){let t=o.$implicit;l(2),s(t.code),l(2),m("routerLink",_(8,ne,"/pages/chart-of-account/account/"+t.accountID)),l(),s(t.name),l(2),m("routerLink",T(10,ae))("queryParams",_(11,oe,t.accountID)),l(),s(k(9,6,t.balance))}}function le(e,o){if(e&1&&(n(0,"tr"),y(1,"td"),n(2,"td",10),r(3,"Total"),a(),n(4,"td",11),r(5),x(6,"number"),a()()),e&2){let t=g(2);l(5),P(" ",k(6,1,t.store.totalBalance())," ")}}function pe(e,o){e&1&&(n(0,"tr")(1,"td",12)(2,"span"),r(3,"No records found."),a()()())}function ce(e,o){if(e&1&&(n(0,"p-panel")(1,"p-table",6),C(2,ie,7,0,"ng-template",null,1,c)(4,re,10,13,"ng-template",null,2,c)(6,le,7,3,"ng-template",null,3,c)(8,pe,4,0,"ng-template",null,4,c),a()()),e&2){let t=g();l(),m("value",t.store.data())}}var X=(()=>{class e{constructor(){this.store=p(A),this.routeInfo=Y}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=b({type:e,selectors:[["app-cash-bank",8,"page"]],features:[M([A])],attrs:te,decls:3,vars:1,consts:[["content",""],["header",""],["body",""],["footer",""],["emptymessage",""],["pageTitle","Cash and Bank",3,"scrollable"],[3,"value"],[1,"text-end"],[1,"link","link-primary",3,"routerLink"],[1,"link","link-primary",3,"routerLink","queryParams"],[1,"fw-bold"],[1,"text-end","fw-bold"],["colspan","3"]],template:function(i,me){i&1&&(n(0,"app-main-panel",5),C(1,ce,10,1,"ng-template",null,0,c),a()),i&2&&m("scrollable",!0)},dependencies:[I,D,z,F,V,Q,J,R,L,j,N],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return e})();var Ke=[{path:"",component:X,children:[]}],Y={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{Ke as CASH_BANK_ROUTES,Y as CASH_BANK_ROUTE_PAGE};
package/chunk-TTNZ3IGM.js DELETED
@@ -1 +0,0 @@
1
- import{a as Se,b as ke}from"./chunk-2DAPTQ7N.js";import{a as ve,b as be,c as xe,d as ye,e as Ce,f as Fe}from"./chunk-5AD3KAHO.js";import"./chunk-DUEYD2IO.js";import{a as ge,b as he}from"./chunk-V6VS3FMZ.js";import{a as _e}from"./chunk-XKI7WLHE.js";import{a as ce}from"./chunk-GACHEN2E.js";import"./chunk-KKZF4RQM.js";import"./chunk-MASZROSE.js";import{a as G}from"./chunk-7CUSFSFC.js";import"./chunk-NTCCFR6P.js";import{a as re,b as ie}from"./chunk-5B3BG43K.js";import"./chunk-EALZUKSJ.js";import{h as fe}from"./chunk-DFBPVWWJ.js";import{b as ue,c as de}from"./chunk-WNA57NZF.js";import{a as me,b as se}from"./chunk-MUFRLGLG.js";import"./chunk-B5RBLDGE.js";import"./chunk-76QGHXHT.js";import{n as ne,o as ae,w as le,x as pe}from"./chunk-MDNCQKUT.js";import"./chunk-4V6IW37R.js";import{b as H,c as J,e as K,f as Q,k as W,l as X,m as Y,n as Z,o as ee,u as te,x as oe}from"./chunk-NHXCR55X.js";import{b as U,d as L}from"./chunk-DOKG43W6.js";import"./chunk-RV7TVDYN.js";import"./chunk-R3JWL2J6.js";import"./chunk-F2X3VGZZ.js";import{h as $,j,k as q,s as z}from"./chunk-VU532YE3.js";import{Ab as P,Cb as f,Cc as v,Dc as b,Ga as D,Kb as a,Nb as _,Ob as C,Qb as F,Qc as I,Sb as S,Tb as k,Ub as i,Uc as B,Vb as n,Wb as g,X as M,Z as y,_b as R,dc as V,ec as u,gb as r,ha as c,pa as E,qa as N,qc as h,rc as T,sc as O,ta as A,wb as w}from"./chunk-7IC4BZ6J.js";import"./chunk-YQFG5XE2.js";var Me=()=>({height:"calc(100vh - 70px)"}),Ee=t=>({"ng-invalid ng-dirty":t}),Te=t=>({"ps-0":t}),Ie=()=>({display:"flex"});function Ne(t,l){if(t&1){let e=R();i(0,"p-button",4),V("onClick",function(){E(e);let p=u(2);return N(p.onSubmit())}),n()}}function Ae(t,l){if(t&1&&f(0,Ne,1,0,"p-button",3),t&2){let e=u();a("ngIf",e.roleService.user.edit)}}function De(t,l){if(t&1&&(i(0,"div")(1,"span",16),h(2),n()()),t&2){let e=l.$implicit;r(2),T(e)}}function we(t,l){if(t&1&&(i(0,"div"),f(1,De,3,1,"div",15),n()),t&2){let e=u(2);r(),a("ngForOf",e.getErrors("name"))}}function Pe(t,l){if(t&1&&(i(0,"div",25)(1,"div",26),g(2,"p-checkbox",27),i(3,"p",28),h(4),n()()()),t&2){let e=l.$implicit,o=l.$index;a("formGroupName",o)("pTooltip",e.get("description").value),r(2),_(v(6,Ie)),a("binary",!0),r(2),O(" ",e.get("name").value," ")}}function Re(t,l){if(t&1&&(i(0,"div",18)(1,"div",19)(2,"div",20)(3,"span",21),h(4),n()(),g(5,"p-checkbox",22),n(),i(6,"div",23)(7,"div",24),S(8,Pe,5,7,"div",25,F),n()()()),t&2){let e=l.$implicit,o=l.$index,p=u(3);a("formGroupName",o),r(4),T(e.get("groupName").value),r(),_(v(5,Ie)),a("binary",!0),r(3),k(p.getRolesArray(o).controls)}}function Ve(t,l){if(t&1&&(i(0,"div",17),S(1,Re,10,6,"div",18,F),n()),t&2){let e=u(2);r(),k(e.rolesFormArray.controls)}}function Oe(t,l){if(t&1&&(i(0,"p-panel")(1,"div",5),g(2,"app-user-tabs"),i(3,"form",6),g(4,"input",7),f(5,we,2,1,"div",8),n(),i(6,"p-tabs",9)(7,"p-tablist")(8,"p-tab",9),h(9,"Permission"),n(),i(10,"p-tab",10),h(11,"Description"),n()(),i(12,"p-tabpanels",11)(13,"p-tabpanel",9)(14,"form",6),f(15,Ve,3,0,"div",12),n()(),i(16,"p-tabpanel",10)(17,"div",13),g(18,"textarea",14),n()()()()()()),t&2){let e=u();_(v(13,Me)),r(3),a("formGroup",e.form),r(),a("fluid",!0)("ngClass",b(14,Ee,e.isInvalid("name"))),r(),a("ngIf",e.isInvalid("name")),r(3),C(b(16,Te,e.router.url.includes("forms"))),r(2),C(b(18,Te,e.router.url.includes("forms"))),r(4),a("formGroup",e.form),r(),a("ngIf",e.rolesFormArray.length>0),r(2),a("formGroup",e.form)}}var gt=(()=>{class t extends _e{constructor(){super(...arguments),this.service=c(Se),this.fb=c(te),this.cdr=c(B),this.route=c(U),this.router=c(L),this.roleService=c(ce),this.form=this.fb.group({groupID:this.fb.control(""),name:this.fb.control("",[J.required]),description:this.fb.control(""),roles:this.fb.array([])}),this.groupFormMeta=D(null)}ngOnInit(){this.route.queryParamMap.pipe(M(e=>this.service.getGroupFormMeta(e.get("groupID")).pipe(G("Group form meta loaded"),y(o=>{this.groupFormMeta.set(o),this.populateForm(o)})))).subscribe()}populateForm(e){this.form.patchValue({groupID:e.form.groupID,name:e.form.name,description:e.form.description});let o=this.rolesFormArray;o.clear(),e.options.roles.forEach(p=>{let s=this.fb.array(p.roles.map(m=>this.fb.group({id:this.fb.control(m.id),name:this.fb.control(m.name),checked:this.fb.control({value:e.form.rolesID.includes(m.id),disabled:!this.roleService.user.edit}),description:this.fb.control(m.description||"")}))),d=this.fb.group({groupName:this.fb.control(p.name),groupChecked:this.fb.control(!1),roles:s}),Ge=s.controls.every(m=>m.get("checked").value);d.get("groupChecked").setValue(Ge,{emitEvent:!1}),this.roleService.user.edit?d.get("groupChecked").enable():d.get("groupChecked").disable(),d.get("groupChecked").valueChanges.subscribe(m=>{s.controls.forEach(x=>{x.get("checked").setValue(m,{emitEvent:!1})})}),s.valueChanges.subscribe(()=>{let m=s.controls.every(x=>x.get("checked").value);d.get("groupChecked").setValue(m,{emitEvent:!1})}),o.push(d)}),this.cdr.detectChanges()}get rolesFormArray(){return this.form.get("roles")}getRolesArray(e){return this.rolesFormArray.at(e).get("roles")}getSelectedRoleIDs(){let e=[];return this.rolesFormArray.controls.forEach(o=>{o.get("roles").controls.forEach(s=>{s.get("checked").value&&e.push(s.get("id").value)})}),e}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let e={groupID:this.form.get("groupID").value,name:this.form.get("name").value,rolesID:this.getSelectedRoleIDs(),description:this.form.controls.description.value};this.service.assignGroupRole(e).pipe(G("Group roles assigned successfully"),y(()=>{this.router.navigate(["/pages/users/groups"])})).subscribe(),console.log(e)}static{this.\u0275fac=(()=>{let e;return function(p){return(e||(e=A(t)))(p||t)}})()}static{this.\u0275cmp=w({type:t,selectors:[["app-group-form"]],features:[P],decls:5,vars:1,consts:[["actionButton",""],["content",""],["pageTitle","Group Form",3,"overflowScroll"],["label","Submit",3,"onClick",4,"ngIf"],["label","Submit",3,"onClick"],[1,"d-flex","flex-column","gap-3","py-2"],[1,"d-flex","flex-column","gap-2",3,"formGroup"],["type","text","pInputText","","formControlName","name","placeholder","Group Name",3,"fluid","ngClass"],[4,"ngIf"],["value","0"],["value","1"],[2,"padding-left","0"],["formArrayName","roles","class","container-fluid d-flex flex-column row-gap-3",4,"ngIf"],[3,"formGroup"],["formControlName","description","fluid","","rows","5","cols","30","pTextarea",""],[4,"ngFor","ngForOf"],[1,"text-danger"],["formArrayName","roles",1,"container-fluid","d-flex","flex-column","row-gap-3"],[1,"row",3,"formGroupName"],[1,"col-2","border","d-flex","align-items-center","justify-content-between",2,"height","40px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100"],[1,"text-dark","fw-semibold","fs-2"],["size","small","formControlName","groupChecked",3,"binary"],[1,"col"],["formArrayName","roles",1,"row","h-100"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",3,"formGroupName","pTooltip"],[1,"d-flex","h-100","align-items-center","gap-2","px-2"],["size","small","formControlName","checked",3,"binary"],[1,"fs-2","text-dark","m-0"]],template:function(o,p){o&1&&(i(0,"app-main-panel",2),f(1,Ae,1,1,"ng-template",null,0,I)(3,Oe,19,20,"ng-template",null,1,I),n()),o&2&&a("overflowScroll",!0)},dependencies:[fe,ie,re,oe,W,H,K,Q,X,ee,Y,Z,z,$,j,q,ae,ne,Fe,Ce,ye,xe,ve,be,he,ge,pe,le,ke,se,me,de,ue],styles:["[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .p-checkbox{display:flex!important}[_nghost-%COMP%] .p-tabs .p-tab{padding-left:0!important}[_nghost-%COMP%] .p-panel .p-panel-header{display:none!important}"],changeDetection:0})}}return t})();export{gt as GroupFormComponent};