@masterteam/components 0.0.127 → 0.0.129

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 (68) hide show
  1. package/assets/common.css +2 -172
  2. package/fesm2022/masterteam-components-dialog.mjs +33 -0
  3. package/fesm2022/masterteam-components-dialog.mjs.map +1 -0
  4. package/fesm2022/masterteam-components-dynamic-drawer.mjs +321 -0
  5. package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -0
  6. package/fesm2022/masterteam-components-formula.mjs +3116 -0
  7. package/fesm2022/masterteam-components-formula.mjs.map +1 -0
  8. package/fesm2022/masterteam-components-icon-field.mjs +63 -0
  9. package/fesm2022/masterteam-components-icon-field.mjs.map +1 -0
  10. package/fesm2022/masterteam-components-list.mjs +31 -0
  11. package/fesm2022/masterteam-components-list.mjs.map +1 -0
  12. package/fesm2022/masterteam-components-menu.mjs +135 -0
  13. package/fesm2022/masterteam-components-menu.mjs.map +1 -0
  14. package/fesm2022/masterteam-components-modal.mjs +50 -0
  15. package/fesm2022/masterteam-components-modal.mjs.map +1 -0
  16. package/fesm2022/masterteam-components-module-summary-card.mjs +32 -0
  17. package/fesm2022/masterteam-components-module-summary-card.mjs.map +1 -0
  18. package/fesm2022/masterteam-components-page-header.mjs +42 -0
  19. package/fesm2022/masterteam-components-page-header.mjs.map +1 -0
  20. package/fesm2022/masterteam-components-page.mjs +35 -0
  21. package/fesm2022/masterteam-components-page.mjs.map +1 -0
  22. package/fesm2022/masterteam-components-pick-list-field.mjs +204 -0
  23. package/fesm2022/masterteam-components-pick-list-field.mjs.map +1 -0
  24. package/fesm2022/masterteam-components-property-filter-builder.mjs +386 -0
  25. package/fesm2022/masterteam-components-property-filter-builder.mjs.map +1 -0
  26. package/fesm2022/masterteam-components-radio-button-field.mjs +85 -0
  27. package/fesm2022/masterteam-components-radio-button-field.mjs.map +1 -0
  28. package/fesm2022/masterteam-components-radio-cards-field.mjs +123 -0
  29. package/fesm2022/masterteam-components-radio-cards-field.mjs.map +1 -0
  30. package/fesm2022/masterteam-components-radio-cards.mjs +74 -0
  31. package/fesm2022/masterteam-components-radio-cards.mjs.map +1 -0
  32. package/fesm2022/masterteam-components-sidebar.mjs +36 -0
  33. package/fesm2022/masterteam-components-sidebar.mjs.map +1 -0
  34. package/fesm2022/masterteam-components-slider-field.mjs +104 -0
  35. package/fesm2022/masterteam-components-slider-field.mjs.map +1 -0
  36. package/fesm2022/masterteam-components-statistic-card.mjs +22 -0
  37. package/fesm2022/masterteam-components-statistic-card.mjs.map +1 -0
  38. package/fesm2022/masterteam-components-textarea-field.mjs +100 -0
  39. package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -0
  40. package/fesm2022/masterteam-components-toast.mjs +75 -0
  41. package/fesm2022/masterteam-components-toast.mjs.map +1 -0
  42. package/fesm2022/masterteam-components-topbar.mjs +28 -0
  43. package/fesm2022/masterteam-components-topbar.mjs.map +1 -0
  44. package/fesm2022/masterteam-components-tree.mjs +219 -0
  45. package/fesm2022/masterteam-components-tree.mjs.map +1 -0
  46. package/package.json +1 -1
  47. package/types/masterteam-components-dialog.d.ts +12 -0
  48. package/types/masterteam-components-dynamic-drawer.d.ts +93 -0
  49. package/types/masterteam-components-formula.d.ts +654 -0
  50. package/types/masterteam-components-icon-field.d.ts +27 -0
  51. package/types/masterteam-components-list.d.ts +18 -0
  52. package/types/masterteam-components-menu.d.ts +55 -0
  53. package/types/masterteam-components-modal.d.ts +18 -0
  54. package/types/masterteam-components-module-summary-card.d.ts +17 -0
  55. package/types/masterteam-components-page-header.d.ts +30 -0
  56. package/types/masterteam-components-page.d.ts +26 -0
  57. package/types/masterteam-components-pick-list-field.d.ts +60 -0
  58. package/types/masterteam-components-property-filter-builder.d.ts +90 -0
  59. package/types/masterteam-components-radio-button-field.d.ts +41 -0
  60. package/types/masterteam-components-radio-cards-field.d.ts +34 -0
  61. package/types/masterteam-components-radio-cards.d.ts +33 -0
  62. package/types/masterteam-components-sidebar.d.ts +28 -0
  63. package/types/masterteam-components-slider-field.d.ts +45 -0
  64. package/types/masterteam-components-statistic-card.d.ts +18 -0
  65. package/types/masterteam-components-textarea-field.d.ts +38 -0
  66. package/types/masterteam-components-toast.d.ts +26 -0
  67. package/types/masterteam-components-topbar.d.ts +17 -0
  68. package/types/masterteam-components-tree.d.ts +98 -0
@@ -0,0 +1,321 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, signal, Injectable, model, computed, Injector, Input, Component, inject, ApplicationRef, EnvironmentInjector, DestroyRef, createComponent } from '@angular/core';
3
+ import { NgComponentOutlet, DOCUMENT } from '@angular/common';
4
+ import { DynamicDialogRef } from 'primeng/dynamicdialog';
5
+ import * as i1 from 'primeng/drawer';
6
+ import { DrawerModule } from 'primeng/drawer';
7
+ import { Button } from '@masterteam/components/button';
8
+
9
+ const DynamicDrawerConfig = new InjectionToken('DynamicDrawerConfig');
10
+ /**
11
+ * Controller to dynamically update drawer properties from inside the child component.
12
+ * Inject this in your drawer content component to modify drawer behavior.
13
+ */
14
+ class DrawerController {
15
+ _styleClass = signal('', ...(ngDevMode ? [{ debugName: "_styleClass" }] : []));
16
+ _header = signal('', ...(ngDevMode ? [{ debugName: "_header" }] : []));
17
+ _fullScreen = signal(undefined, ...(ngDevMode ? [{ debugName: "_fullScreen" }] : []));
18
+ /** Get the current additional styleClass */
19
+ get styleClass() {
20
+ return this._styleClass;
21
+ }
22
+ /** Get the current header */
23
+ get header() {
24
+ return this._header;
25
+ }
26
+ /** Get the current fullScreen state */
27
+ get fullScreen() {
28
+ return this._fullScreen;
29
+ }
30
+ /** Add or replace the dynamic styleClass */
31
+ setStyleClass(styleClass) {
32
+ this._styleClass.set(styleClass);
33
+ }
34
+ /** Append a class to the existing styleClass */
35
+ addClass(className) {
36
+ const current = this._styleClass();
37
+ if (!current.includes(className)) {
38
+ this._styleClass.set((current + ' ' + className).trim());
39
+ }
40
+ }
41
+ /** Remove a class from the styleClass */
42
+ removeClass(className) {
43
+ const current = this._styleClass();
44
+ this._styleClass.set(current
45
+ .split(' ')
46
+ .filter((c) => c !== className)
47
+ .join(' '));
48
+ }
49
+ /** Toggle a class on/off */
50
+ toggleClass(className) {
51
+ if (this._styleClass().includes(className)) {
52
+ this.removeClass(className);
53
+ }
54
+ else {
55
+ this.addClass(className);
56
+ }
57
+ }
58
+ /** Update the drawer header */
59
+ setHeader(header) {
60
+ this._header.set(header);
61
+ }
62
+ /** Toggle fullScreen mode */
63
+ setFullScreen(fullScreen) {
64
+ this._fullScreen.set(fullScreen);
65
+ }
66
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DrawerController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
67
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DrawerController });
68
+ }
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DrawerController, decorators: [{
70
+ type: Injectable
71
+ }] });
72
+ class DynamicDrawerHost {
73
+ visible = model(false, ...(ngDevMode ? [{ debugName: "visible" }] : []));
74
+ cmp = signal(null, ...(ngDevMode ? [{ debugName: "cmp" }] : []));
75
+ cfg = signal({ position: 'right' }, ...(ngDevMode ? [{ debugName: "cfg" }] : []));
76
+ cmpInputs = signal({}, ...(ngDevMode ? [{ debugName: "cmpInputs" }] : []));
77
+ childInjector;
78
+ ref;
79
+ drawerController = new DrawerController();
80
+ /** Computed styleClass combining config + dynamic controller class */
81
+ computedStyleClass = computed(() => {
82
+ const configClass = this.cfg()?.styleClass ?? '';
83
+ const dynamicClass = this.drawerController.styleClass();
84
+ return `${configClass} ${dynamicClass} mt-drawer`.trim();
85
+ }, ...(ngDevMode ? [{ debugName: "computedStyleClass" }] : []));
86
+ computedDrawerStyle = computed(() => {
87
+ const appendTo = this.cfg()?.appendTo;
88
+ if (!appendTo || appendTo === 'body') {
89
+ return { position: 'fixed' };
90
+ }
91
+ return null;
92
+ }, ...(ngDevMode ? [{ debugName: "computedDrawerStyle" }] : []));
93
+ /** Computed header - controller overrides config if set */
94
+ computedHeader = computed(() => {
95
+ const dynamicHeader = this.drawerController.header();
96
+ return dynamicHeader || this.cfg()?.header || '';
97
+ }, ...(ngDevMode ? [{ debugName: "computedHeader" }] : []));
98
+ /** Computed fullScreen - controller overrides config if set */
99
+ computedFullScreen = computed(() => {
100
+ const dynamicFullScreen = this.drawerController.fullScreen();
101
+ return dynamicFullScreen !== undefined
102
+ ? dynamicFullScreen
103
+ : this.cfg()?.fullScreen;
104
+ }, ...(ngDevMode ? [{ debugName: "computedFullScreen" }] : []));
105
+ connect(opts) {
106
+ this.cmp.set(opts.component);
107
+ this.cfg.set(opts.config ?? {});
108
+ this.cmpInputs.set(opts.config?.inputValues ?? {});
109
+ this.ref = opts.ref;
110
+ this.childInjector = Injector.create({
111
+ parent: opts.parent,
112
+ providers: [
113
+ { provide: DynamicDrawerConfig, useValue: opts.config ?? {} },
114
+ { provide: DynamicDialogRef, useValue: opts.ref },
115
+ { provide: DrawerController, useValue: this.drawerController },
116
+ ],
117
+ });
118
+ opts.ref.onClose.subscribe(() => {
119
+ this.visible.set(false);
120
+ });
121
+ }
122
+ show() {
123
+ this.visible.set(true);
124
+ }
125
+ handleHide(data = null) {
126
+ this.visible.set(false);
127
+ this.ref?.close(data);
128
+ }
129
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DynamicDrawerHost, deps: [], target: i0.ɵɵFactoryTarget.Component });
130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: DynamicDrawerHost, isStandalone: true, selector: "mt-dynamic-drawer-host", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, connect: { classPropertyName: "connect", publicName: "connect", isSignal: false, isRequired: true, transformFunction: null } }, outputs: { visible: "visibleChange" }, ngImport: i0, template: `
131
+ <p-drawer
132
+ [(visible)]="visible"
133
+ [appendTo]="'self'"
134
+ [style]="computedDrawerStyle()"
135
+ [closable]="cfg()?.closable"
136
+ [position]="cfg()?.position"
137
+ [fullScreen]="computedFullScreen()"
138
+ [modal]="cfg()?.modal"
139
+ [closeOnEscape]="cfg()?.closeOnEscape"
140
+ [dismissible]="cfg()?.dismissible"
141
+ [transitionOptions]="cfg()?.transitionOptions"
142
+ [styleClass]="computedStyleClass()"
143
+ >
144
+ <ng-template #header>
145
+ <div
146
+ class="flex items-center justify-between px-5 w-full py-3 border-b border-surface"
147
+ >
148
+ <h3 class="text-xl font-semibold">{{ computedHeader() }}</h3>
149
+ <mt-button
150
+ (onClick)="handleHide()"
151
+ variant="outlined"
152
+ styleClass="!bg-white"
153
+ icon="general.x-close"
154
+ severity="secondary"
155
+ >
156
+ </mt-button>
157
+ </div>
158
+ </ng-template>
159
+ @if (childInjector) {
160
+ <ng-container
161
+ *ngComponentOutlet="
162
+ cmp();
163
+ injector: childInjector;
164
+ inputs: cmpInputs()
165
+ "
166
+ >
167
+ </ng-container>
168
+ }
169
+ </p-drawer>
170
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: DrawerModule }, { kind: "component", type: i1.Drawer, selector: "p-drawer", inputs: ["appendTo", "motionOptions", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "closeButtonProps", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen", "header", "maskStyle", "closable"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
171
+ }
172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DynamicDrawerHost, decorators: [{
173
+ type: Component,
174
+ args: [{
175
+ selector: 'mt-dynamic-drawer-host',
176
+ standalone: true,
177
+ imports: [NgComponentOutlet, DrawerModule, Button],
178
+ template: `
179
+ <p-drawer
180
+ [(visible)]="visible"
181
+ [appendTo]="'self'"
182
+ [style]="computedDrawerStyle()"
183
+ [closable]="cfg()?.closable"
184
+ [position]="cfg()?.position"
185
+ [fullScreen]="computedFullScreen()"
186
+ [modal]="cfg()?.modal"
187
+ [closeOnEscape]="cfg()?.closeOnEscape"
188
+ [dismissible]="cfg()?.dismissible"
189
+ [transitionOptions]="cfg()?.transitionOptions"
190
+ [styleClass]="computedStyleClass()"
191
+ >
192
+ <ng-template #header>
193
+ <div
194
+ class="flex items-center justify-between px-5 w-full py-3 border-b border-surface"
195
+ >
196
+ <h3 class="text-xl font-semibold">{{ computedHeader() }}</h3>
197
+ <mt-button
198
+ (onClick)="handleHide()"
199
+ variant="outlined"
200
+ styleClass="!bg-white"
201
+ icon="general.x-close"
202
+ severity="secondary"
203
+ >
204
+ </mt-button>
205
+ </div>
206
+ </ng-template>
207
+ @if (childInjector) {
208
+ <ng-container
209
+ *ngComponentOutlet="
210
+ cmp();
211
+ injector: childInjector;
212
+ inputs: cmpInputs()
213
+ "
214
+ >
215
+ </ng-container>
216
+ }
217
+ </p-drawer>
218
+ `,
219
+ }]
220
+ }], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], connect: [{
221
+ type: Input,
222
+ args: [{ required: true }]
223
+ }] } });
224
+
225
+ // dynamic-drawer.service.ts
226
+ class DrawerService {
227
+ appRef = inject(ApplicationRef);
228
+ env = inject(EnvironmentInjector);
229
+ rootInjector = inject(Injector);
230
+ destroyRef = inject(DestroyRef);
231
+ doc = inject(DOCUMENT);
232
+ hostRef;
233
+ defauiltConfig = {
234
+ position: 'right',
235
+ modal: true,
236
+ closable: false,
237
+ transitionOptions: '200ms cubic-bezier(0, 0, 1, 1)',
238
+ inputValues: {},
239
+ };
240
+ constructor() {
241
+ this.preloadDrawerHost();
242
+ }
243
+ open(component, config = {}) {
244
+ config = { ...this.defauiltConfig, ...config };
245
+ const targetEl = this.resolveAppendTarget(config.appendTo);
246
+ this.hostRef = createComponent(DynamicDrawerHost, {
247
+ environmentInjector: this.env,
248
+ });
249
+ const ref = new DynamicDialogRef();
250
+ this.hostRef.instance.connect({
251
+ component,
252
+ config,
253
+ parent: this.rootInjector,
254
+ ref,
255
+ });
256
+ this.appRef.attachView(this.hostRef.hostView);
257
+ // 📌 append to target (NOT body when provided)
258
+ targetEl.appendChild(this.hostRef.location.nativeElement);
259
+ // 🧹 auto-clean if app destroyed (SSR / HMR safety)
260
+ this.destroyRef.onDestroy(() => {
261
+ this.appRef.detachView(this.hostRef.hostView);
262
+ this.hostRef.destroy();
263
+ this.hostRef = undefined;
264
+ });
265
+ const currentHostRef = this.hostRef;
266
+ const openDrawer = () => {
267
+ if (this.hostRef !== currentHostRef) {
268
+ return;
269
+ }
270
+ currentHostRef.instance.show();
271
+ };
272
+ if (this.doc.defaultView?.requestAnimationFrame) {
273
+ this.doc.defaultView.requestAnimationFrame(openDrawer);
274
+ }
275
+ else {
276
+ setTimeout(openDrawer, 0);
277
+ }
278
+ return ref;
279
+ }
280
+ preloadDrawerHost() {
281
+ const preloadHostRef = createComponent(DynamicDrawerHost, {
282
+ environmentInjector: this.env,
283
+ });
284
+ const preloadElement = preloadHostRef.location.nativeElement;
285
+ preloadElement.style.display = 'none';
286
+ this.appRef.attachView(preloadHostRef.hostView);
287
+ this.doc.body.appendChild(preloadElement);
288
+ preloadHostRef.changeDetectorRef.detectChanges();
289
+ this.appRef.detachView(preloadHostRef.hostView);
290
+ preloadElement.remove();
291
+ preloadHostRef.destroy();
292
+ }
293
+ resolveAppendTarget(appendTo) {
294
+ if (!appendTo)
295
+ return this.doc.body;
296
+ if (typeof appendTo === 'string') {
297
+ const selector = appendTo.startsWith('#') || appendTo.startsWith('.')
298
+ ? appendTo
299
+ : `#${appendTo}`;
300
+ const el = this.doc.querySelector(selector);
301
+ if (!el) {
302
+ return this.doc.body;
303
+ }
304
+ return el;
305
+ }
306
+ return appendTo; // HTMLElement passed directly
307
+ }
308
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
309
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DrawerService, providedIn: 'root' });
310
+ }
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: DrawerService, decorators: [{
312
+ type: Injectable,
313
+ args: [{ providedIn: 'root' }]
314
+ }], ctorParameters: () => [] });
315
+
316
+ /**
317
+ * Generated bundle index. Do not edit.
318
+ */
319
+
320
+ export { DrawerController, DrawerService, DynamicDrawerConfig, DynamicDrawerHost };
321
+ //# sourceMappingURL=masterteam-components-dynamic-drawer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masterteam-components-dynamic-drawer.mjs","sources":["../../../../packages/masterteam/components/dynamic-drawer/dynamic-drawer-host.ts","../../../../packages/masterteam/components/dynamic-drawer/dynamic-drawer.ts","../../../../packages/masterteam/components/dynamic-drawer/masterteam-components-dynamic-drawer.ts"],"sourcesContent":["import { DynamicDialogRef } from 'primeng/dynamicdialog';\r\nimport { DrawerModule } from 'primeng/drawer';\r\nimport {\r\n Component,\r\n Injector,\r\n Input,\r\n signal,\r\n InjectionToken,\r\n model,\r\n computed,\r\n Injectable,\r\n} from '@angular/core';\r\nimport { NgComponentOutlet } from '@angular/common';\r\n\r\nexport const DynamicDrawerConfig = new InjectionToken<any>(\r\n 'DynamicDrawerConfig',\r\n);\r\n\r\n/**\r\n * Controller to dynamically update drawer properties from inside the child component.\r\n * Inject this in your drawer content component to modify drawer behavior.\r\n */\r\n@Injectable()\r\nexport class DrawerController {\r\n private _styleClass = signal<string>('');\r\n private _header = signal<string>('');\r\n private _fullScreen = signal<boolean | undefined>(undefined);\r\n\r\n /** Get the current additional styleClass */\r\n get styleClass() {\r\n return this._styleClass;\r\n }\r\n\r\n /** Get the current header */\r\n get header() {\r\n return this._header;\r\n }\r\n\r\n /** Get the current fullScreen state */\r\n get fullScreen() {\r\n return this._fullScreen;\r\n }\r\n\r\n /** Add or replace the dynamic styleClass */\r\n setStyleClass(styleClass: string) {\r\n this._styleClass.set(styleClass);\r\n }\r\n\r\n /** Append a class to the existing styleClass */\r\n addClass(className: string) {\r\n const current = this._styleClass();\r\n if (!current.includes(className)) {\r\n this._styleClass.set((current + ' ' + className).trim());\r\n }\r\n }\r\n\r\n /** Remove a class from the styleClass */\r\n removeClass(className: string) {\r\n const current = this._styleClass();\r\n this._styleClass.set(\r\n current\r\n .split(' ')\r\n .filter((c) => c !== className)\r\n .join(' '),\r\n );\r\n }\r\n\r\n /** Toggle a class on/off */\r\n toggleClass(className: string) {\r\n if (this._styleClass().includes(className)) {\r\n this.removeClass(className);\r\n } else {\r\n this.addClass(className);\r\n }\r\n }\r\n\r\n /** Update the drawer header */\r\n setHeader(header: string) {\r\n this._header.set(header);\r\n }\r\n\r\n /** Toggle fullScreen mode */\r\n setFullScreen(fullScreen: boolean) {\r\n this._fullScreen.set(fullScreen);\r\n }\r\n}\r\nimport { Button } from '@masterteam/components/button';\r\n\r\n@Component({\r\n selector: 'mt-dynamic-drawer-host',\r\n standalone: true,\r\n imports: [NgComponentOutlet, DrawerModule, Button],\r\n template: `\r\n <p-drawer\r\n [(visible)]=\"visible\"\r\n [appendTo]=\"'self'\"\r\n [style]=\"computedDrawerStyle()\"\r\n [closable]=\"cfg()?.closable\"\r\n [position]=\"cfg()?.position\"\r\n [fullScreen]=\"computedFullScreen()\"\r\n [modal]=\"cfg()?.modal\"\r\n [closeOnEscape]=\"cfg()?.closeOnEscape\"\r\n [dismissible]=\"cfg()?.dismissible\"\r\n [transitionOptions]=\"cfg()?.transitionOptions\"\r\n [styleClass]=\"computedStyleClass()\"\r\n >\r\n <ng-template #header>\r\n <div\r\n class=\"flex items-center justify-between px-5 w-full py-3 border-b border-surface\"\r\n >\r\n <h3 class=\"text-xl font-semibold\">{{ computedHeader() }}</h3>\r\n <mt-button\r\n (onClick)=\"handleHide()\"\r\n variant=\"outlined\"\r\n styleClass=\"!bg-white\"\r\n icon=\"general.x-close\"\r\n severity=\"secondary\"\r\n >\r\n </mt-button>\r\n </div>\r\n </ng-template>\r\n @if (childInjector) {\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n cmp();\r\n injector: childInjector;\r\n inputs: cmpInputs()\r\n \"\r\n >\r\n </ng-container>\r\n }\r\n </p-drawer>\r\n `,\r\n})\r\nexport class DynamicDrawerHost {\r\n public visible = model<boolean>(false);\r\n cmp = signal<any>(null);\r\n cfg = signal<any>({ position: 'right' });\r\n cmpInputs = signal<Record<string, unknown>>({});\r\n childInjector!: Injector;\r\n private ref?: DynamicDialogRef;\r\n private drawerController = new DrawerController();\r\n\r\n /** Computed styleClass combining config + dynamic controller class */\r\n computedStyleClass = computed(() => {\r\n const configClass = this.cfg()?.styleClass ?? '';\r\n const dynamicClass = this.drawerController.styleClass();\r\n return `${configClass} ${dynamicClass} mt-drawer`.trim();\r\n });\r\n\r\n computedDrawerStyle = computed<Record<string, string> | null>(() => {\r\n const appendTo = this.cfg()?.appendTo;\r\n if (!appendTo || appendTo === 'body') {\r\n return { position: 'fixed' };\r\n }\r\n\r\n return null;\r\n });\r\n\r\n /** Computed header - controller overrides config if set */\r\n computedHeader = computed(() => {\r\n const dynamicHeader = this.drawerController.header();\r\n return dynamicHeader || this.cfg()?.header || '';\r\n });\r\n\r\n /** Computed fullScreen - controller overrides config if set */\r\n computedFullScreen = computed(() => {\r\n const dynamicFullScreen = this.drawerController.fullScreen();\r\n return dynamicFullScreen !== undefined\r\n ? dynamicFullScreen\r\n : this.cfg()?.fullScreen;\r\n });\r\n\r\n @Input({ required: true })\r\n connect(opts: {\r\n component: any;\r\n config?: any;\r\n parent: Injector;\r\n ref: DynamicDialogRef;\r\n }) {\r\n this.cmp.set(opts.component);\r\n this.cfg.set(opts.config ?? {});\r\n this.cmpInputs.set(opts.config?.inputValues ?? {});\r\n this.ref = opts.ref;\r\n this.childInjector = Injector.create({\r\n parent: opts.parent,\r\n providers: [\r\n { provide: DynamicDrawerConfig, useValue: opts.config ?? {} },\r\n { provide: DynamicDialogRef, useValue: opts.ref },\r\n { provide: DrawerController, useValue: this.drawerController },\r\n ],\r\n });\r\n\r\n opts.ref.onClose.subscribe(() => {\r\n this.visible.set(false);\r\n });\r\n }\r\n\r\n show() {\r\n this.visible.set(true);\r\n }\r\n\r\n handleHide(data = null) {\r\n this.visible.set(false);\r\n this.ref?.close(data);\r\n }\r\n}\r\n","// dynamic-drawer.service.ts\r\nimport {\r\n Injectable,\r\n Type,\r\n createComponent,\r\n EnvironmentInjector,\r\n ApplicationRef,\r\n Injector,\r\n DestroyRef,\r\n inject,\r\n} from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { DynamicDrawerHost } from './dynamic-drawer-host';\r\nimport { DynamicDialogRef } from 'primeng/dynamicdialog';\r\n\r\nexport interface DynamicDrawerConfigInterface {\r\n header?: string;\r\n position?: string;\r\n data?: any;\r\n fullScreen?: boolean;\r\n modal?: boolean;\r\n closable?: boolean;\r\n closeOnEscape?: boolean;\r\n dismissible?: boolean;\r\n appendTo?: any;\r\n transitionOptions?: string;\r\n styleClass?: string;\r\n inputValues?: any;\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class DrawerService {\r\n private appRef = inject(ApplicationRef);\r\n private env = inject(EnvironmentInjector);\r\n private rootInjector = inject(Injector);\r\n private destroyRef = inject(DestroyRef);\r\n private doc = inject(DOCUMENT);\r\n private hostRef?: ReturnType<typeof createComponent<DynamicDrawerHost>>;\r\n defauiltConfig: DynamicDrawerConfigInterface = {\r\n position: 'right',\r\n modal: true,\r\n closable: false,\r\n transitionOptions: '200ms cubic-bezier(0, 0, 1, 1)',\r\n inputValues: {},\r\n };\r\n\r\n constructor() {\r\n this.preloadDrawerHost();\r\n }\r\n\r\n open<T>(\r\n component: Type<any>,\r\n config: DynamicDrawerConfigInterface = {},\r\n ): DynamicDialogRef<T> {\r\n config = { ...this.defauiltConfig, ...config };\r\n\r\n const targetEl = this.resolveAppendTarget(config.appendTo);\r\n\r\n this.hostRef = createComponent(DynamicDrawerHost, {\r\n environmentInjector: this.env,\r\n });\r\n\r\n const ref = new DynamicDialogRef<T>();\r\n this.hostRef.instance.connect({\r\n component,\r\n config,\r\n parent: this.rootInjector,\r\n ref,\r\n });\r\n\r\n this.appRef.attachView(this.hostRef.hostView);\r\n\r\n // 📌 append to target (NOT body when provided)\r\n targetEl.appendChild(this.hostRef.location.nativeElement);\r\n\r\n // 🧹 auto-clean if app destroyed (SSR / HMR safety)\r\n this.destroyRef.onDestroy(() => {\r\n this.appRef.detachView(this.hostRef!.hostView);\r\n this.hostRef!.destroy();\r\n this.hostRef = undefined;\r\n });\r\n\r\n const currentHostRef = this.hostRef;\r\n const openDrawer = () => {\r\n if (this.hostRef !== currentHostRef) {\r\n return;\r\n }\r\n\r\n currentHostRef.instance.show();\r\n };\r\n\r\n if (this.doc.defaultView?.requestAnimationFrame) {\r\n this.doc.defaultView.requestAnimationFrame(openDrawer);\r\n } else {\r\n setTimeout(openDrawer, 0);\r\n }\r\n\r\n return ref;\r\n }\r\n\r\n private preloadDrawerHost() {\r\n const preloadHostRef = createComponent(DynamicDrawerHost, {\r\n environmentInjector: this.env,\r\n });\r\n const preloadElement = preloadHostRef.location.nativeElement as HTMLElement;\r\n\r\n preloadElement.style.display = 'none';\r\n\r\n this.appRef.attachView(preloadHostRef.hostView);\r\n this.doc.body.appendChild(preloadElement);\r\n preloadHostRef.changeDetectorRef.detectChanges();\r\n this.appRef.detachView(preloadHostRef.hostView);\r\n preloadElement.remove();\r\n preloadHostRef.destroy();\r\n }\r\n\r\n private resolveAppendTarget(appendTo?: string | HTMLElement): HTMLElement {\r\n if (!appendTo) return this.doc.body;\r\n\r\n if (typeof appendTo === 'string') {\r\n const selector =\r\n appendTo.startsWith('#') || appendTo.startsWith('.')\r\n ? appendTo\r\n : `#${appendTo}`;\r\n const el = this.doc.querySelector(selector) as HTMLElement | null;\r\n if (!el) {\r\n return this.doc.body;\r\n }\r\n return el;\r\n }\r\n\r\n return appendTo; // HTMLElement passed directly\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAca,mBAAmB,GAAG,IAAI,cAAc,CACnD,qBAAqB;AAGvB;;;AAGG;MAEU,gBAAgB,CAAA;AACnB,IAAA,WAAW,GAAG,MAAM,CAAS,EAAE,uDAAC;AAChC,IAAA,OAAO,GAAG,MAAM,CAAS,EAAE,mDAAC;AAC5B,IAAA,WAAW,GAAG,MAAM,CAAsB,SAAS,uDAAC;;AAG5D,IAAA,IAAI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,WAAW;IACzB;;AAGA,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO;IACrB;;AAGA,IAAA,IAAI,UAAU,GAAA;QACZ,OAAO,IAAI,CAAC,WAAW;IACzB;;AAGA,IAAA,aAAa,CAAC,UAAkB,EAAA;AAC9B,QAAA,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;IAClC;;AAGA,IAAA,QAAQ,CAAC,SAAiB,EAAA;AACxB,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE;QAClC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAA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