@acorex/components 22.0.0-next.1 → 22.0.0-next.3

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.
@@ -1,18 +1,79 @@
1
- import { AXPlatform } from '@acorex/core/platform';
1
+ import { AXComponent, MXBaseComponent, AXClosableComponent, AXComponentClosedPromise, NXComponent, AXCommonModule } from '@acorex/cdk/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, NgZone, DestroyRef, input, signal, TemplateRef, ViewContainerRef, HostListener, ViewChild, ViewEncapsulation, Component, Directive, ComponentRef, Injectable, NgModule } from '@angular/core';
3
+ import { ViewEncapsulation, Component, input, Directive, inject, NgZone, DestroyRef, viewChild, signal, TemplateRef, ViewContainerRef, HostListener, ViewChild, ComponentRef, Injectable, NgModule } from '@angular/core';
4
+ import { AXOverlayService } from '@acorex/cdk/overlay';
5
+ import { Subject } from 'rxjs';
6
+ import { AXPlatform } from '@acorex/core/platform';
4
7
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
8
  import { Router, NavigationStart } from '@angular/router';
6
9
  import { filter } from 'rxjs/operators';
7
- import { MXBaseComponent, AXClosableComponent, AXComponent, AXComponentClosedPromise, AXCommonModule } from '@acorex/cdk/common';
8
10
  import { AXFocusTrapDirective } from '@acorex/cdk/focus-trap';
9
- import { AXDecoratorCloseButtonComponent, AXDecoratorModule } from '@acorex/components/decorators';
11
+ import { AXButtonComponent } from '@acorex/components/button';
12
+ import { AXDecoratorCloseButtonComponent, AXDecoratorIconComponent, AXDecoratorModule } from '@acorex/components/decorators';
10
13
  import { AXLoadingService } from '@acorex/components/loading';
11
14
  import { AXComponentService } from '@acorex/core/components';
12
15
  import { AXTranslatorPipe, AXTranslationModule } from '@acorex/core/translation';
13
16
  import { AsyncPipe, CommonModule } from '@angular/common';
14
- import { AXOverlayService } from '@acorex/cdk/overlay';
15
- import { Subject } from 'rxjs';
17
+
18
+ class AXPopupFooterComponent {
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: AXPopupFooterComponent, isStandalone: true, selector: "ax-popup-footer", providers: [{ provide: AXComponent, useExisting: AXPopupFooterComponent }], ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\n<ng-content select=\"ax-suffix\"></ng-content>\n<ng-content></ng-content>\n", styles: ["@layer components{ax-popup-footer{display:flex;width:100%;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], encapsulation: i0.ViewEncapsulation.None }); }
21
+ }
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupFooterComponent, decorators: [{
23
+ type: Component,
24
+ args: [{ selector: 'ax-popup-footer', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXComponent, useExisting: AXPopupFooterComponent }], template: "<ng-content select=\"ax-prefix\"></ng-content>\n<ng-content select=\"ax-suffix\"></ng-content>\n<ng-content></ng-content>\n", styles: ["@layer components{ax-popup-footer{display:flex;width:100%;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2)}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
25
+ }] });
26
+
27
+ class AXPopupComponentBase {
28
+ constructor() {
29
+ this.__popup__ = input(/* @ts-ignore */
30
+ ...(ngDevMode ? [undefined, { debugName: "__popup__" }] : /* istanbul ignore next */ []));
31
+ }
32
+ close(data = null) {
33
+ this.__popup__()?.close(data);
34
+ }
35
+ setTitle(title) {
36
+ this.__popup__()?.setTitle(title);
37
+ }
38
+ minimize() {
39
+ this.__popup__()?.minimize();
40
+ }
41
+ maximize() {
42
+ this.__popup__()?.maximize();
43
+ }
44
+ restore() {
45
+ this.__popup__()?.restore();
46
+ }
47
+ bringToFront() {
48
+ this.__popup__()?.bringToFront();
49
+ }
50
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupComponentBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
51
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: AXPopupComponentBase, isStandalone: true, inputs: { __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
52
+ }
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupComponentBase, decorators: [{
54
+ type: Directive
55
+ }], propDecorators: { __popup__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popup__", required: false }] }] } });
56
+ /** Resolves whether the close header button is shown. `buttons.close` wins over `closeButton`. */
57
+ function resolvePopupCloseButton(config) {
58
+ if (config?.buttons?.close !== undefined) {
59
+ return config.buttons.close;
60
+ }
61
+ return config?.closeButton ?? true;
62
+ }
63
+ /** Resolves whether maximize is enabled. `buttons.maximize` wins over `maximizable`. Default: false. */
64
+ function resolvePopupMaximizable(config) {
65
+ if (config?.buttons?.maximize !== undefined) {
66
+ return config.buttons.maximize;
67
+ }
68
+ return config?.maximizable ?? false;
69
+ }
70
+ /** Resolves minimize button config. Default: disabled at bottom-right. */
71
+ function resolvePopupMinimize(config) {
72
+ return {
73
+ enable: config?.buttons?.minimize?.enable ?? false,
74
+ position: config?.buttons?.minimize?.position ?? 'bottom-right',
75
+ };
76
+ }
16
77
 
17
78
  /**
18
79
  * The Popup is a component which displays content in a dialog overlay
@@ -28,6 +89,8 @@ class AXPopupComponent extends MXBaseComponent {
28
89
  this.componentService = inject(AXComponentService);
29
90
  this._router = inject(Router, { optional: true });
30
91
  this._destroyRef = inject(DestroyRef);
92
+ this.popupEl = viewChild('popupEl', /* @ts-ignore */
93
+ ...(ngDevMode ? [{ debugName: "popupEl" }] : /* istanbul ignore next */ []));
31
94
  // Inputs from overlay service
32
95
  this.__content__ = input(/* @ts-ignore */
33
96
  ...(ngDevMode ? [undefined, { debugName: "__content__" }] : /* istanbul ignore next */ []));
@@ -57,13 +120,29 @@ class AXPopupComponent extends MXBaseComponent {
57
120
  this.dragStartPos = { x: 0, y: 0 };
58
121
  /** @ignore */
59
122
  this.elementStartPos = { x: 0, y: 0 };
123
+ this.popupSizeState = signal('normal', /* @ts-ignore */
124
+ ...(ngDevMode ? [{ debugName: "popupSizeState" }] : /* istanbul ignore next */ []));
125
+ this.fullScreenState = signal(false, /* @ts-ignore */
126
+ ...(ngDevMode ? [{ debugName: "fullScreenState" }] : /* istanbul ignore next */ []));
127
+ this.minimizeLeft = signal(null, /* @ts-ignore */
128
+ ...(ngDevMode ? [{ debugName: "minimizeLeft" }] : /* istanbul ignore next */ []));
129
+ this.minimizeRight = signal(null, /* @ts-ignore */
130
+ ...(ngDevMode ? [{ debugName: "minimizeRight" }] : /* istanbul ignore next */ []));
131
+ this.fullscreenChangeHandler = () => {
132
+ if (!document.fullscreenElement) {
133
+ this.fullScreenState.set(false);
134
+ this.cdr.markForCheck();
135
+ }
136
+ };
137
+ this.closeEnabled = () => resolvePopupCloseButton(this.__config__());
138
+ this.maximizeEnabled = () => resolvePopupMaximizable(this.__config__());
139
+ this.minimizeEnabled = () => resolvePopupMinimize(this.__config__()).enable;
60
140
  }
61
141
  /** @ignore */
62
142
  ngOnInit() {
63
143
  super.ngOnInit();
64
144
  const config = this.__config__();
65
145
  if (this._platform.is('SM')) {
66
- // Disable dragging on small screens
67
146
  if (config) {
68
147
  config.draggable = false;
69
148
  }
@@ -73,6 +152,7 @@ class AXPopupComponent extends MXBaseComponent {
73
152
  location: this.getHostElement(),
74
153
  });
75
154
  this._setupCloseOnNavigation();
155
+ document.addEventListener('fullscreenchange', this.fullscreenChangeHandler);
76
156
  this.renderContent();
77
157
  }
78
158
  /**
@@ -101,26 +181,26 @@ class AXPopupComponent extends MXBaseComponent {
101
181
  return;
102
182
  }
103
183
  if (content instanceof TemplateRef) {
104
- // Render template using ViewContainerRef (supports context)
105
184
  this.contentContainerRef.createEmbeddedView(content, {
106
185
  $implicit: config?.data,
107
186
  ref: this,
187
+ ...(typeof config?.inputs === 'object' && config.inputs ? config.inputs : {}),
108
188
  });
109
189
  this.handleContentRendered();
110
190
  }
191
+ else if (content instanceof HTMLElement) {
192
+ this.contentContainerEl.nativeElement.appendChild(content.cloneNode(true));
193
+ this.handleContentRendered();
194
+ }
111
195
  else if (typeof content === 'function') {
112
- // Render component
113
196
  const componentRef = this.componentService.createFromComponent(content);
114
197
  this._componentRef = componentRef;
115
- // Expose component instance to the popup ref
116
198
  const popupRef = this.__popupRef__();
117
199
  if (popupRef) {
118
200
  popupRef.componentInstance = componentRef.instance;
119
201
  }
120
- // Get component input definitions to check before setting inputs
121
202
  const inputDefs = componentRef.componentType?.ɵcmp
122
203
  ?.inputs;
123
- // Set data inputs (only if the component has the input defined)
124
204
  if (config?.data && typeof config.data === 'object') {
125
205
  Object.entries(config.data).forEach(([key, value]) => {
126
206
  componentRef.instance[key] = value;
@@ -133,14 +213,11 @@ class AXPopupComponent extends MXBaseComponent {
133
213
  }
134
214
  });
135
215
  }
136
- // Set popup reference (only if the component has this input)
137
216
  if (inputDefs && '__popup__' in inputDefs) {
138
217
  componentRef.setInput('__popup__', this.__popupRef__());
139
218
  }
140
- // Move component to container
141
219
  const hostElement = componentRef.location.nativeElement;
142
220
  this.contentContainerEl.nativeElement.appendChild(hostElement);
143
- // Subscribe to close event if available
144
221
  const instance = componentRef.instance;
145
222
  if (instance.onClosed) {
146
223
  instance.onClosed.subscribe((e) => {
@@ -155,12 +232,16 @@ class AXPopupComponent extends MXBaseComponent {
155
232
  this._zone.runOutsideAngular(() => {
156
233
  setTimeout(() => {
157
234
  const body = this.getHostElement().querySelector('.ax-popup-body-container');
158
- const content = body.children[0];
159
- if (!content || !body)
235
+ const content = body?.children[0];
236
+ if (!content || !body) {
237
+ this.focus();
160
238
  return;
239
+ }
161
240
  const popHeader = this.getHostElement().querySelector('.ax-popup-header-container');
162
241
  const popFooter = this.getHostElement().querySelector('.ax-popup-footer-container');
163
- const footer = content.querySelector(':scope > ax-footer');
242
+ const footer = content.querySelector(':scope > ax-footer') ||
243
+ content.querySelector(':scope > ax-popup-footer') ||
244
+ this.getHostElement().querySelector('.ax-popup-body-container ax-popup-footer');
164
245
  const header = content.querySelector(':scope > ax-header');
165
246
  if (footer && popFooter) {
166
247
  popFooter.append(footer);
@@ -177,8 +258,13 @@ class AXPopupComponent extends MXBaseComponent {
177
258
  }
178
259
  /** @ignore */
179
260
  onKeydownHandler() {
261
+ const config = this.__config__();
180
262
  const focusedOrHasFocused = this.getHostElement().matches(':focus-within');
181
- if (this.__config__()?.closeButton && focusedOrHasFocused) {
263
+ if (!focusedOrHasFocused)
264
+ return;
265
+ if (config?.closeOnEscape === false)
266
+ return;
267
+ if (config?.closeOnEscape === true || this.closeEnabled()) {
182
268
  this.close();
183
269
  }
184
270
  }
@@ -188,6 +274,10 @@ class AXPopupComponent extends MXBaseComponent {
188
274
  }
189
275
  /** @ignore */
190
276
  ngOnDestroy() {
277
+ document.removeEventListener('fullscreenchange', this.fullscreenChangeHandler);
278
+ if (this.fullScreenState() && document.fullscreenElement) {
279
+ document.exitFullscreen().catch(() => undefined);
280
+ }
191
281
  this.loadingService.hide(this._loadingId);
192
282
  if (this._componentRef) {
193
283
  this._componentRef.destroy();
@@ -202,7 +292,6 @@ class AXPopupComponent extends MXBaseComponent {
202
292
  }
203
293
  /**
204
294
  * Closes the popup, emitting component reference, host element, and optional data.
205
- * @param {unknown} [data]
206
295
  */
207
296
  close(data) {
208
297
  const closeFn = () => {
@@ -232,9 +321,70 @@ class AXPopupComponent extends MXBaseComponent {
232
321
  closeFn();
233
322
  }
234
323
  }
324
+ /**
325
+ * Minimizes the popup to the bottom bar.
326
+ */
327
+ minimize() {
328
+ if (this.fullScreenState() && document.fullscreenElement) {
329
+ document.exitFullscreen().catch(() => undefined);
330
+ }
331
+ const el = this.popupEl()?.nativeElement;
332
+ if (!el)
333
+ return;
334
+ this.minimizeLeft.set(null);
335
+ this.minimizeRight.set(null);
336
+ this.popupSizeState.set('minimize');
337
+ this.cdr.markForCheck();
338
+ requestAnimationFrame(() => {
339
+ const width = el.offsetWidth;
340
+ const index = this.__popupRef__()?._getStackIndex?.() ?? 0;
341
+ const position = resolvePopupMinimize(this.__config__()).position;
342
+ if (position === 'bottom-right') {
343
+ this.minimizeLeft.set(null);
344
+ this.minimizeRight.set(`${index * (width + 10)}px`);
345
+ }
346
+ else {
347
+ this.minimizeRight.set(null);
348
+ this.minimizeLeft.set(`${index * (width + 10)}px`);
349
+ }
350
+ this.cdr.markForCheck();
351
+ });
352
+ }
353
+ /**
354
+ * Maximizes the popup using the Fullscreen API.
355
+ */
356
+ maximize() {
357
+ const el = this.popupEl()?.nativeElement;
358
+ if (!el)
359
+ return;
360
+ if (this.popupSizeState() === 'minimize') {
361
+ this.restore();
362
+ }
363
+ if (!document.fullscreenElement) {
364
+ el.requestFullscreen().then(() => {
365
+ this.fullScreenState.set(true);
366
+ this.cdr.markForCheck();
367
+ });
368
+ }
369
+ else {
370
+ document.exitFullscreen().catch(() => undefined);
371
+ }
372
+ }
373
+ /**
374
+ * Restores the popup from minimized or fullscreen state.
375
+ */
376
+ restore() {
377
+ if (this.fullScreenState() && document.fullscreenElement) {
378
+ document.exitFullscreen().catch(() => undefined);
379
+ return;
380
+ }
381
+ this.minimizeLeft.set(null);
382
+ this.minimizeRight.set(null);
383
+ this.popupSizeState.set('normal');
384
+ this.cdr.markForCheck();
385
+ }
235
386
  /**
236
387
  * Sets inputs on the content component.
237
- * @param values - Object containing input values to set
238
388
  */
239
389
  setContentInputs(values) {
240
390
  const componentRef = this._componentRef;
@@ -246,7 +396,6 @@ class AXPopupComponent extends MXBaseComponent {
246
396
  }
247
397
  /**
248
398
  * Sets the popup title.
249
- * @param title - The new title
250
399
  */
251
400
  setTitle(title) {
252
401
  this.title.set(title);
@@ -257,6 +406,8 @@ class AXPopupComponent extends MXBaseComponent {
257
406
  const config = this.__config__();
258
407
  if (!config?.draggable)
259
408
  return;
409
+ if (this.popupSizeState() === 'minimize' || this.fullScreenState())
410
+ return;
260
411
  this.isDragging.set(true);
261
412
  this.dragStartPos = { x: event.clientX, y: event.clientY };
262
413
  const popup = this.getHostElement().querySelector('.ax-popup');
@@ -283,7 +434,7 @@ class AXPopupComponent extends MXBaseComponent {
283
434
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPopupComponent, isStandalone: true, selector: "ax-popup", inputs: { __content__: { classPropertyName: "__content__", publicName: "__content__", isSignal: true, isRequired: false, transformFunction: null }, __config__: { classPropertyName: "__config__", publicName: "__config__", isSignal: true, isRequired: false, transformFunction: null }, __popupRef__: { classPropertyName: "__popupRef__", publicName: "__popupRef__", isSignal: true, isRequired: false, transformFunction: null }, __id__: { classPropertyName: "__id__", publicName: "__id__", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.escape": "onKeydownHandler()", "document:mousemove": "onDragMove($event)", "document:mouseup": "onDragEnd()" }, styleAttribute: "display: block; max-width: 100%;", classAttribute: "ax-popup-host" }, providers: [
284
435
  { provide: AXClosableComponent, useExisting: AXPopupComponent },
285
436
  { provide: AXComponent, useExisting: AXPopupComponent },
286
- ], viewQueries: [{ propertyName: "contentContainerRef", first: true, predicate: ["contentContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "contentContainerEl", first: true, predicate: ["contentContainer"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" axFocusTrap>\n <div\n class=\"ax-popup ax-popup-{{ __config__()?.size || 'md' }}\"\n tabindex=\"0\"\n [class.ax-popup-dragging]=\"isDragging()\"\n [style.position]=\"dragOffset().x || dragOffset().y ? 'fixed' : null\"\n [style.left.px]=\"dragOffset().x || null\"\n [style.top.px]=\"dragOffset().y || null\"\n [style.transform]=\"dragOffset().x || dragOffset().y ? 'none' : null\"\n >\n <div\n class=\"ax-popup-header-container\"\n [class.ax-popup-draggable]=\"__config__()?.draggable\"\n (mousedown)=\"onDragStart($event)\"\n >\n @if (__config__()?.header) {\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ title() | translate | async }}</span>\n @if (__config__()?.closeButton) {\n <ax-close-button tabindex=\"1\" (click)=\"_handleCloseClick()\"></ax-close-button>\n }\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\" #contentContainer></div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;@layer components{.ax-popup-overlay.ax-overlay-centered .ax-overlay-content{display:flex;max-height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:auto;max-width:100%;flex-direction:column;align-items:center;overflow:hidden}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host{width:fit-content;flex-shrink:0;align-self:center}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host:has(.ax-popup-full){width:100%;max-width:100vw}.ax-popup-wrapper{display:block;width:fit-content;max-width:100%}.ax-popup-header-container.ax-popup-draggable{cursor:move}.ax-popup.ax-popup-dragging{-webkit-user-select:none;user-select:none}.ax-popup{box-sizing:border-box;display:flex;min-height:calc(var(--spacing, .25rem) * 0);min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column;overflow:hidden;border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 0);outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:transparent;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));border-radius:var(--ax-comp-popup-border-radius);border-color:rgba(var(--ax-comp-popup-border-color));background-color:rgba(var(--ax-comp-popup-body-bg-color));--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 #0000),var(--ax-ring-shadow, 0 0 #0000),var(--ax-shadow);color:rgba(var(--ax-comp-popup-body-text-color))}.ax-popup .ax-popup-header-container{flex-shrink:0;background-color:rgba(var(--ax-comp-popup-header-bg-color))}.ax-popup .ax-popup-header-container .ax-popup-header{display:flex;align-items:center;justify-content:space-between;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:calc(var(--spacing, .25rem) * 3);border-color:rgba(var(--ax-comp-popup-header-border-color))}.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@media(min-width:48rem){.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)))}}@media(min-width:48rem){.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{--tw-leading: calc(var(--spacing, .25rem) * 7);line-height:calc(var(--spacing, .25rem) * 7)}}.ax-popup ax-footer{display:flex;align-items:center;justify-content:space-between;border-top-style:var(--tw-border-style);border-top-width:1px;padding:calc(var(--spacing, .25rem) * 3);box-shadow:0 2px 10px #0000004d;border-color:rgba(var(--ax-comp-popup-footer-border-color));background-color:rgba(var(--ax-comp-popup-footer-bg-color))}.ax-popup:focus{outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:transparent}.ax-popup:focus-visible{border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-popup .ax-popup-main-container{display:flex;min-height:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;overflow:hidden}.ax-popup .ax-popup-main-container .ax-popup-body-container{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:auto;background-color:rgba(var(--ax-comp-popup-body-bg-color))}.ax-popup .ax-popup-main-container .ax-popup-footer-container{flex-shrink:0;background-color:rgba(var(--ax-comp-popup-footer-bg-color))}.ax-popup.ax-popup-full{height:calc(100 * var(--ax-vh));max-height:calc(100 * var(--ax-vh));width:100vw;border-radius:0!important}.ax-popup.ax-popup-fit{width:fit-content!important}.ax-popup.ax-popup-fit .ax-popup-body-container{max-height:calc(100 * var(--ax-vh))}.ax-popup.ax-popup-fit .ax-popup-body-container>ng-component>div{width:fit-content!important}.ax-popup.ax-popup-xs{width:18vw!important;max-width:100vw}.ax-popup.ax-popup-sm{width:25vw!important;max-width:100vw}.ax-popup.ax-popup-md{width:40vw!important;max-width:100vw}.ax-popup.ax-popup-lg{width:65vw!important;max-width:100vw}.ax-popup.ax-popup-xl{width:75vw!important;max-width:100vw}.ax-popup.ax-popup-2xl{width:85vw!important;max-width:100vw}@media screen and (max-width:768px){.ax-popup:not(.ax-popup-fit){width:93vw!important;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important;border-radius:var(--ax-comp-popup-border-radius)}.ax-popup:not(.ax-popup-fit):not(.ax-popup-full) .ax-popup-body-container>ng-component>div{width:100%}.ax-popup:not(.ax-popup-fit).ax-popup-full{height:calc(var(--ax-overlay-full-width) * var(--ax-vh));border-radius:var(--ax-comp-popup-border-radius)!important}}.ax-dark .ax-popup{--ax-comp-popup-border-color: var(--ax-sys-color-border-darkest-surface);--ax-comp-popup-body-bg-color: var(--ax-sys-color-darker-surface);--ax-comp-popup-body-text-color: var(--ax-sys-color-on-darker-surface);--ax-comp-popup-header-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-popup-header-border-color: var(--ax-sys-color-border-dark-surface);--ax-comp-popup-footer-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-popup-footer-border-color: var(--ax-sys-color-border-dark-surface)}}:root{--ax-comp-popup-border-radius: var(--ax-sys-border-radius);--ax-comp-popup-border-color: var(--ax-sys-color-border-lightest-surface);--ax-comp-popup-body-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-popup-body-text-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-popup-header-bg-color: var(--ax-sys-color-lighter-surface);--ax-comp-popup-header-border-color: var(--ax-sys-color-border-lighter-surface);--ax-comp-popup-footer-bg-color: var(--ax-sys-color-lighter-surface);--ax-comp-popup-footer-border-color: var(--ax-sys-color-border-lighter-surface)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-outline-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-outline-style: solid;--tw-font-weight: initial;--tw-leading: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "directive", type: AXFocusTrapDirective, selector: "[axFocusTrap]", inputs: ["axFocusTrapArrowNavigation"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
437
+ ], viewQueries: [{ propertyName: "popupEl", first: true, predicate: ["popupEl"], descendants: true, isSignal: true }, { propertyName: "contentContainerRef", first: true, predicate: ["contentContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "contentContainerEl", first: true, predicate: ["contentContainer"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"ax-popup-wrapper\"\n aria-modal=\"true\"\n axFocusTrap\n [class.ax-popup-minimized-host]=\"popupSizeState() === 'minimize'\"\n>\n <div\n #popupEl\n class=\"ax-popup ax-popup-{{ __config__()?.size || 'md' }}\"\n tabindex=\"0\"\n [class.ax-popup-dragging]=\"isDragging()\"\n [class.ax-popup-minimized]=\"popupSizeState() === 'minimize'\"\n [class.ax-popup-fullscreen]=\"fullScreenState()\"\n [style.position]=\"dragOffset().x || dragOffset().y || popupSizeState() === 'minimize' ? 'fixed' : null\"\n [style.left]=\"popupSizeState() === 'minimize' ? minimizeLeft() : dragOffset().x ? dragOffset().x + 'px' : null\"\n [style.right]=\"popupSizeState() === 'minimize' ? minimizeRight() : null\"\n [style.top]=\"popupSizeState() === 'minimize' ? 'auto' : dragOffset().y ? dragOffset().y + 'px' : null\"\n [style.bottom]=\"popupSizeState() === 'minimize' ? '0' : null\"\n [style.transform]=\"dragOffset().x || dragOffset().y || popupSizeState() === 'minimize' ? 'none' : null\"\n >\n <div\n class=\"ax-popup-header-container\"\n [class.ax-popup-draggable]=\"__config__()?.draggable && popupSizeState() !== 'minimize' && !fullScreenState()\"\n (mousedown)=\"onDragStart($event)\"\n >\n @if (__config__()?.header) {\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ title() | translate | async }}</span>\n <div class=\"ax-popup-header-actions\">\n @if (minimizeEnabled()) {\n <ax-button class=\"ax-sm\" look=\"blank\" color=\"default\" (onClick)=\"minimize()\">\n <ax-icon class=\"ax-icon ax-icon-minimize\"></ax-icon>\n </ax-button>\n }\n\n @if (popupSizeState() !== 'normal' || fullScreenState()) {\n <ax-button class=\"ax-sm\" look=\"blank\" color=\"default\" (onClick)=\"restore()\">\n <ax-icon class=\"ax-icon ax-icon-maximize\"></ax-icon>\n </ax-button>\n }\n\n @if (maximizeEnabled()) {\n <ax-button class=\"ax-sm\" look=\"blank\" color=\"default\" (onClick)=\"maximize()\">\n <ax-icon class=\"ax-icon ax-icon-full-screen\"></ax-icon>\n </ax-button>\n }\n\n @if (closeEnabled()) {\n <ax-close-button tabindex=\"1\" (click)=\"_handleCloseClick()\"></ax-close-button>\n }\n </div>\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\" #contentContainer></div>\n <div class=\"ax-popup-footer-container\" [class.ax-popup-footer-visible]=\"__config__()?.footer\"></div>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;@layer components{.ax-popup-overlay.ax-overlay-centered{pointer-events:none}.ax-popup-overlay.ax-overlay-centered .ax-overlay-content{display:flex;max-height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:auto;max-width:100%;flex-direction:column;align-items:center;overflow:hidden;pointer-events:none}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host{width:fit-content;flex-shrink:0;align-self:center;pointer-events:auto}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host:has(.ax-popup-full){width:100%;max-width:100vw}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host:has(.ax-popup-minimized){width:fit-content!important}.ax-popup-wrapper{display:block;width:fit-content;max-width:100%}.ax-popup-wrapper.ax-popup-minimized-host{width:fit-content!important}.ax-popup-header-container.ax-popup-draggable{cursor:move}.ax-popup.ax-popup-dragging{-webkit-user-select:none;user-select:none}.ax-popup.ax-popup-fullscreen{max-height:100vh!important;width:100vw!important;border-radius:0!important}.ax-popup-header-actions{display:flex;flex-shrink:0;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}.ax-popup{box-sizing:border-box;display:flex;min-height:calc(var(--spacing, .25rem) * 0);min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column;overflow:hidden;border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 0);outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:transparent;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));border-radius:var(--ax-comp-popup-border-radius);border-color:rgba(var(--ax-comp-popup-border-color));background-color:rgba(var(--ax-comp-popup-body-bg-color));--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 #0000),var(--ax-ring-shadow, 0 0 #0000),var(--ax-shadow);color:rgba(var(--ax-comp-popup-body-text-color))}.ax-popup .ax-popup-header-container{flex-shrink:0;background-color:rgba(var(--ax-comp-popup-header-bg-color))}.ax-popup .ax-popup-header-container .ax-popup-header{display:flex;align-items:center;justify-content:space-between;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:calc(var(--spacing, .25rem) * 3);border-color:rgba(var(--ax-comp-popup-header-border-color))}.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@media(min-width:48rem){.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)))}}@media(min-width:48rem){.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{--tw-leading: calc(var(--spacing, .25rem) * 7);line-height:calc(var(--spacing, .25rem) * 7)}}.ax-popup ax-footer{display:flex;align-items:center;justify-content:space-between;border-top-style:var(--tw-border-style);border-top-width:1px;padding:calc(var(--spacing, .25rem) * 3);box-shadow:0 2px 10px #0000004d;border-color:rgba(var(--ax-comp-popup-footer-border-color));background-color:rgba(var(--ax-comp-popup-footer-bg-color))}.ax-popup:focus{outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:transparent}.ax-popup:focus-visible{border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-popup .ax-popup-main-container{display:flex;min-height:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;overflow:hidden}.ax-popup .ax-popup-main-container .ax-popup-body-container{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:auto;background-color:rgba(var(--ax-comp-popup-body-bg-color))}.ax-popup .ax-popup-main-container .ax-popup-footer-container{flex-shrink:0;background-color:rgba(var(--ax-comp-popup-footer-bg-color))}.ax-popup.ax-popup-full{height:calc(100 * var(--ax-vh));max-height:calc(100 * var(--ax-vh));width:100vw;border-radius:0!important}.ax-popup.ax-popup-fit{width:fit-content!important}.ax-popup.ax-popup-fit .ax-popup-body-container{max-height:calc(100 * var(--ax-vh))}.ax-popup.ax-popup-fit .ax-popup-body-container>ng-component>div{width:fit-content!important}.ax-popup.ax-popup-xs{width:18vw!important;max-width:100vw}.ax-popup.ax-popup-sm{width:25vw!important;max-width:100vw}.ax-popup.ax-popup-md{width:40vw!important;max-width:100vw}.ax-popup.ax-popup-lg{width:65vw!important;max-width:100vw}.ax-popup.ax-popup-xl{width:75vw!important;max-width:100vw}.ax-popup.ax-popup-2xl{width:85vw!important;max-width:100vw}.ax-popup.ax-popup-minimized{z-index:55;width:fit-content!important;max-width:min(90vw,24rem)!important;min-width:0;max-height:none}.ax-popup.ax-popup-minimized .ax-popup-main-container{display:none}.ax-popup.ax-popup-minimized .ax-popup-header{width:max-content;max-width:100%;gap:calc(var(--spacing, .25rem) * 2)}.ax-popup.ax-popup-minimized .ax-popup-title{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media screen and (max-width:768px){.ax-popup:not(.ax-popup-fit):not(.ax-popup-minimized){width:93vw!important;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important;border-radius:var(--ax-comp-popup-border-radius)}.ax-popup:not(.ax-popup-fit):not(.ax-popup-minimized):not(.ax-popup-full) .ax-popup-body-container>ng-component>div{width:100%}.ax-popup:not(.ax-popup-fit):not(.ax-popup-minimized).ax-popup-full{height:calc(var(--ax-overlay-full-width) * var(--ax-vh));border-radius:var(--ax-comp-popup-border-radius)!important}}.ax-dark .ax-popup{--ax-comp-popup-border-color: var(--ax-sys-color-border-darkest-surface);--ax-comp-popup-body-bg-color: var(--ax-sys-color-darker-surface);--ax-comp-popup-body-text-color: var(--ax-sys-color-on-darker-surface);--ax-comp-popup-header-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-popup-header-border-color: var(--ax-sys-color-border-dark-surface);--ax-comp-popup-footer-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-popup-footer-border-color: var(--ax-sys-color-border-dark-surface)}}:root{--ax-comp-popup-border-radius: var(--ax-sys-border-radius);--ax-comp-popup-border-color: var(--ax-sys-color-border-lightest-surface);--ax-comp-popup-body-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-popup-body-text-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-popup-header-bg-color: var(--ax-sys-color-lighter-surface);--ax-comp-popup-header-border-color: var(--ax-sys-color-border-lighter-surface);--ax-comp-popup-footer-bg-color: var(--ax-sys-color-lighter-surface);--ax-comp-popup-footer-border-color: var(--ax-sys-color-border-lighter-surface)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-outline-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-outline-style: solid;--tw-font-weight: initial;--tw-leading: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["closeAll", "icon"] }, { kind: "component", type: AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "directive", type: AXFocusTrapDirective, selector: "[axFocusTrap]", inputs: ["axFocusTrapArrowNavigation"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None }); }
287
438
  }
288
439
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupComponent, decorators: [{
289
440
  type: Component,
@@ -293,14 +444,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
293
444
  }, providers: [
294
445
  { provide: AXClosableComponent, useExisting: AXPopupComponent },
295
446
  { provide: AXComponent, useExisting: AXPopupComponent },
296
- ], imports: [AXDecoratorCloseButtonComponent, AsyncPipe, AXTranslatorPipe, AXFocusTrapDirective], template: "<div class=\"ax-popup-wrapper\" aria-modal=\"true\" axFocusTrap>\n <div\n class=\"ax-popup ax-popup-{{ __config__()?.size || 'md' }}\"\n tabindex=\"0\"\n [class.ax-popup-dragging]=\"isDragging()\"\n [style.position]=\"dragOffset().x || dragOffset().y ? 'fixed' : null\"\n [style.left.px]=\"dragOffset().x || null\"\n [style.top.px]=\"dragOffset().y || null\"\n [style.transform]=\"dragOffset().x || dragOffset().y ? 'none' : null\"\n >\n <div\n class=\"ax-popup-header-container\"\n [class.ax-popup-draggable]=\"__config__()?.draggable\"\n (mousedown)=\"onDragStart($event)\"\n >\n @if (__config__()?.header) {\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ title() | translate | async }}</span>\n @if (__config__()?.closeButton) {\n <ax-close-button tabindex=\"1\" (click)=\"_handleCloseClick()\"></ax-close-button>\n }\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\" #contentContainer></div>\n <div class=\"ax-popup-footer-container\"></div>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;@layer components{.ax-popup-overlay.ax-overlay-centered .ax-overlay-content{display:flex;max-height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:auto;max-width:100%;flex-direction:column;align-items:center;overflow:hidden}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host{width:fit-content;flex-shrink:0;align-self:center}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host:has(.ax-popup-full){width:100%;max-width:100vw}.ax-popup-wrapper{display:block;width:fit-content;max-width:100%}.ax-popup-header-container.ax-popup-draggable{cursor:move}.ax-popup.ax-popup-dragging{-webkit-user-select:none;user-select:none}.ax-popup{box-sizing:border-box;display:flex;min-height:calc(var(--spacing, .25rem) * 0);min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column;overflow:hidden;border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 0);outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:transparent;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));border-radius:var(--ax-comp-popup-border-radius);border-color:rgba(var(--ax-comp-popup-border-color));background-color:rgba(var(--ax-comp-popup-body-bg-color));--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 #0000),var(--ax-ring-shadow, 0 0 #0000),var(--ax-shadow);color:rgba(var(--ax-comp-popup-body-text-color))}.ax-popup .ax-popup-header-container{flex-shrink:0;background-color:rgba(var(--ax-comp-popup-header-bg-color))}.ax-popup .ax-popup-header-container .ax-popup-header{display:flex;align-items:center;justify-content:space-between;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:calc(var(--spacing, .25rem) * 3);border-color:rgba(var(--ax-comp-popup-header-border-color))}.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@media(min-width:48rem){.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)))}}@media(min-width:48rem){.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{--tw-leading: calc(var(--spacing, .25rem) * 7);line-height:calc(var(--spacing, .25rem) * 7)}}.ax-popup ax-footer{display:flex;align-items:center;justify-content:space-between;border-top-style:var(--tw-border-style);border-top-width:1px;padding:calc(var(--spacing, .25rem) * 3);box-shadow:0 2px 10px #0000004d;border-color:rgba(var(--ax-comp-popup-footer-border-color));background-color:rgba(var(--ax-comp-popup-footer-bg-color))}.ax-popup:focus{outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:transparent}.ax-popup:focus-visible{border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-popup .ax-popup-main-container{display:flex;min-height:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;overflow:hidden}.ax-popup .ax-popup-main-container .ax-popup-body-container{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:auto;background-color:rgba(var(--ax-comp-popup-body-bg-color))}.ax-popup .ax-popup-main-container .ax-popup-footer-container{flex-shrink:0;background-color:rgba(var(--ax-comp-popup-footer-bg-color))}.ax-popup.ax-popup-full{height:calc(100 * var(--ax-vh));max-height:calc(100 * var(--ax-vh));width:100vw;border-radius:0!important}.ax-popup.ax-popup-fit{width:fit-content!important}.ax-popup.ax-popup-fit .ax-popup-body-container{max-height:calc(100 * var(--ax-vh))}.ax-popup.ax-popup-fit .ax-popup-body-container>ng-component>div{width:fit-content!important}.ax-popup.ax-popup-xs{width:18vw!important;max-width:100vw}.ax-popup.ax-popup-sm{width:25vw!important;max-width:100vw}.ax-popup.ax-popup-md{width:40vw!important;max-width:100vw}.ax-popup.ax-popup-lg{width:65vw!important;max-width:100vw}.ax-popup.ax-popup-xl{width:75vw!important;max-width:100vw}.ax-popup.ax-popup-2xl{width:85vw!important;max-width:100vw}@media screen and (max-width:768px){.ax-popup:not(.ax-popup-fit){width:93vw!important;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important;border-radius:var(--ax-comp-popup-border-radius)}.ax-popup:not(.ax-popup-fit):not(.ax-popup-full) .ax-popup-body-container>ng-component>div{width:100%}.ax-popup:not(.ax-popup-fit).ax-popup-full{height:calc(var(--ax-overlay-full-width) * var(--ax-vh));border-radius:var(--ax-comp-popup-border-radius)!important}}.ax-dark .ax-popup{--ax-comp-popup-border-color: var(--ax-sys-color-border-darkest-surface);--ax-comp-popup-body-bg-color: var(--ax-sys-color-darker-surface);--ax-comp-popup-body-text-color: var(--ax-sys-color-on-darker-surface);--ax-comp-popup-header-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-popup-header-border-color: var(--ax-sys-color-border-dark-surface);--ax-comp-popup-footer-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-popup-footer-border-color: var(--ax-sys-color-border-dark-surface)}}:root{--ax-comp-popup-border-radius: var(--ax-sys-border-radius);--ax-comp-popup-border-color: var(--ax-sys-color-border-lightest-surface);--ax-comp-popup-body-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-popup-body-text-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-popup-header-bg-color: var(--ax-sys-color-lighter-surface);--ax-comp-popup-header-border-color: var(--ax-sys-color-border-lighter-surface);--ax-comp-popup-footer-bg-color: var(--ax-sys-color-lighter-surface);--ax-comp-popup-footer-border-color: var(--ax-sys-color-border-lighter-surface)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-outline-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-outline-style: solid;--tw-font-weight: initial;--tw-leading: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
447
+ ], imports: [
448
+ AXDecoratorCloseButtonComponent,
449
+ AXDecoratorIconComponent,
450
+ AXButtonComponent,
451
+ AsyncPipe,
452
+ AXTranslatorPipe,
453
+ AXFocusTrapDirective,
454
+ ], template: "<div\n class=\"ax-popup-wrapper\"\n aria-modal=\"true\"\n axFocusTrap\n [class.ax-popup-minimized-host]=\"popupSizeState() === 'minimize'\"\n>\n <div\n #popupEl\n class=\"ax-popup ax-popup-{{ __config__()?.size || 'md' }}\"\n tabindex=\"0\"\n [class.ax-popup-dragging]=\"isDragging()\"\n [class.ax-popup-minimized]=\"popupSizeState() === 'minimize'\"\n [class.ax-popup-fullscreen]=\"fullScreenState()\"\n [style.position]=\"dragOffset().x || dragOffset().y || popupSizeState() === 'minimize' ? 'fixed' : null\"\n [style.left]=\"popupSizeState() === 'minimize' ? minimizeLeft() : dragOffset().x ? dragOffset().x + 'px' : null\"\n [style.right]=\"popupSizeState() === 'minimize' ? minimizeRight() : null\"\n [style.top]=\"popupSizeState() === 'minimize' ? 'auto' : dragOffset().y ? dragOffset().y + 'px' : null\"\n [style.bottom]=\"popupSizeState() === 'minimize' ? '0' : null\"\n [style.transform]=\"dragOffset().x || dragOffset().y || popupSizeState() === 'minimize' ? 'none' : null\"\n >\n <div\n class=\"ax-popup-header-container\"\n [class.ax-popup-draggable]=\"__config__()?.draggable && popupSizeState() !== 'minimize' && !fullScreenState()\"\n (mousedown)=\"onDragStart($event)\"\n >\n @if (__config__()?.header) {\n <div class=\"ax-popup-header\">\n <span class=\"ax-popup-title\">{{ title() | translate | async }}</span>\n <div class=\"ax-popup-header-actions\">\n @if (minimizeEnabled()) {\n <ax-button class=\"ax-sm\" look=\"blank\" color=\"default\" (onClick)=\"minimize()\">\n <ax-icon class=\"ax-icon ax-icon-minimize\"></ax-icon>\n </ax-button>\n }\n\n @if (popupSizeState() !== 'normal' || fullScreenState()) {\n <ax-button class=\"ax-sm\" look=\"blank\" color=\"default\" (onClick)=\"restore()\">\n <ax-icon class=\"ax-icon ax-icon-maximize\"></ax-icon>\n </ax-button>\n }\n\n @if (maximizeEnabled()) {\n <ax-button class=\"ax-sm\" look=\"blank\" color=\"default\" (onClick)=\"maximize()\">\n <ax-icon class=\"ax-icon ax-icon-full-screen\"></ax-icon>\n </ax-button>\n }\n\n @if (closeEnabled()) {\n <ax-close-button tabindex=\"1\" (click)=\"_handleCloseClick()\"></ax-close-button>\n }\n </div>\n </div>\n }\n </div>\n <div class=\"ax-popup-main-container ax-loading-container\">\n <div class=\"ax-popup-body-container\" #contentContainer></div>\n <div class=\"ax-popup-footer-container\" [class.ax-popup-footer-visible]=\"__config__()?.footer\"></div>\n </div>\n </div>\n</div>\n", styles: ["@layer properties;@layer components{.ax-popup-overlay.ax-overlay-centered{pointer-events:none}.ax-popup-overlay.ax-overlay-centered .ax-overlay-content{display:flex;max-height:100%;min-height:calc(var(--spacing, .25rem) * 0);width:auto;max-width:100%;flex-direction:column;align-items:center;overflow:hidden;pointer-events:none}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host{width:fit-content;flex-shrink:0;align-self:center;pointer-events:auto}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host:has(.ax-popup-full){width:100%;max-width:100vw}.ax-popup-overlay.ax-overlay-centered ax-popup.ax-popup-host:has(.ax-popup-minimized){width:fit-content!important}.ax-popup-wrapper{display:block;width:fit-content;max-width:100%}.ax-popup-wrapper.ax-popup-minimized-host{width:fit-content!important}.ax-popup-header-container.ax-popup-draggable{cursor:move}.ax-popup.ax-popup-dragging{-webkit-user-select:none;user-select:none}.ax-popup.ax-popup-fullscreen{max-height:100vh!important;width:100vw!important;border-radius:0!important}.ax-popup-header-actions{display:flex;flex-shrink:0;align-items:center;gap:calc(var(--spacing, .25rem) * 1)}.ax-popup{box-sizing:border-box;display:flex;min-height:calc(var(--spacing, .25rem) * 0);min-width:calc(var(--spacing, .25rem) * 0);flex-direction:column;overflow:hidden;border-style:var(--tw-border-style);border-width:1px;padding:calc(var(--spacing, .25rem) * 0);outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:transparent;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh));border-radius:var(--ax-comp-popup-border-radius);border-color:rgba(var(--ax-comp-popup-border-color));background-color:rgba(var(--ax-comp-popup-body-bg-color));--ax-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--ax-shadow-colored: 0 10px 15px -3px var(--ax-shadow-color), 0 4px 6px -4px var(--ax-shadow-color);box-shadow:var(--ax-ring-offset-shadow, 0 0 #0000),var(--ax-ring-shadow, 0 0 #0000),var(--ax-shadow);color:rgba(var(--ax-comp-popup-body-text-color))}.ax-popup .ax-popup-header-container{flex-shrink:0;background-color:rgba(var(--ax-comp-popup-header-bg-color))}.ax-popup .ax-popup-header-container .ax-popup-header{display:flex;align-items:center;justify-content:space-between;border-bottom-style:var(--tw-border-style);border-bottom-width:1px;padding:calc(var(--spacing, .25rem) * 3);border-color:rgba(var(--ax-comp-popup-header-border-color))}.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{font-size:var(--text-base, 1rem);line-height:var(--tw-leading, var(--text-base--line-height, 1.5 ));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500)}@media(min-width:48rem){.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)))}}@media(min-width:48rem){.ax-popup .ax-popup-header-container .ax-popup-header .ax-popup-title{--tw-leading: calc(var(--spacing, .25rem) * 7);line-height:calc(var(--spacing, .25rem) * 7)}}.ax-popup ax-footer{display:flex;align-items:center;justify-content:space-between;border-top-style:var(--tw-border-style);border-top-width:1px;padding:calc(var(--spacing, .25rem) * 3);box-shadow:0 2px 10px #0000004d;border-color:rgba(var(--ax-comp-popup-footer-border-color));background-color:rgba(var(--ax-comp-popup-footer-bg-color))}.ax-popup:focus{outline-style:var(--tw-outline-style);outline-width:2px;outline-offset:2px;outline-color:transparent}.ax-popup:focus-visible{border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-popup .ax-popup-main-container{display:flex;min-height:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;overflow:hidden}.ax-popup .ax-popup-main-container .ax-popup-body-container{min-height:calc(var(--spacing, .25rem) * 0);flex:1;overflow:auto;background-color:rgba(var(--ax-comp-popup-body-bg-color))}.ax-popup .ax-popup-main-container .ax-popup-footer-container{flex-shrink:0;background-color:rgba(var(--ax-comp-popup-footer-bg-color))}.ax-popup.ax-popup-full{height:calc(100 * var(--ax-vh));max-height:calc(100 * var(--ax-vh));width:100vw;border-radius:0!important}.ax-popup.ax-popup-fit{width:fit-content!important}.ax-popup.ax-popup-fit .ax-popup-body-container{max-height:calc(100 * var(--ax-vh))}.ax-popup.ax-popup-fit .ax-popup-body-container>ng-component>div{width:fit-content!important}.ax-popup.ax-popup-xs{width:18vw!important;max-width:100vw}.ax-popup.ax-popup-sm{width:25vw!important;max-width:100vw}.ax-popup.ax-popup-md{width:40vw!important;max-width:100vw}.ax-popup.ax-popup-lg{width:65vw!important;max-width:100vw}.ax-popup.ax-popup-xl{width:75vw!important;max-width:100vw}.ax-popup.ax-popup-2xl{width:85vw!important;max-width:100vw}.ax-popup.ax-popup-minimized{z-index:55;width:fit-content!important;max-width:min(90vw,24rem)!important;min-width:0;max-height:none}.ax-popup.ax-popup-minimized .ax-popup-main-container{display:none}.ax-popup.ax-popup-minimized .ax-popup-header{width:max-content;max-width:100%;gap:calc(var(--spacing, .25rem) * 2)}.ax-popup.ax-popup-minimized .ax-popup-title{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media screen and (max-width:768px){.ax-popup:not(.ax-popup-fit):not(.ax-popup-minimized){width:93vw!important;max-height:calc(var(--ax-overlay-full-width) * var(--ax-vh))!important;border-radius:var(--ax-comp-popup-border-radius)}.ax-popup:not(.ax-popup-fit):not(.ax-popup-minimized):not(.ax-popup-full) .ax-popup-body-container>ng-component>div{width:100%}.ax-popup:not(.ax-popup-fit):not(.ax-popup-minimized).ax-popup-full{height:calc(var(--ax-overlay-full-width) * var(--ax-vh));border-radius:var(--ax-comp-popup-border-radius)!important}}.ax-dark .ax-popup{--ax-comp-popup-border-color: var(--ax-sys-color-border-darkest-surface);--ax-comp-popup-body-bg-color: var(--ax-sys-color-darker-surface);--ax-comp-popup-body-text-color: var(--ax-sys-color-on-darker-surface);--ax-comp-popup-header-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-popup-header-border-color: var(--ax-sys-color-border-dark-surface);--ax-comp-popup-footer-bg-color: var(--ax-sys-color-dark-surface);--ax-comp-popup-footer-border-color: var(--ax-sys-color-border-dark-surface)}}:root{--ax-comp-popup-border-radius: var(--ax-sys-border-radius);--ax-comp-popup-border-color: var(--ax-sys-color-border-lightest-surface);--ax-comp-popup-body-bg-color: var(--ax-sys-color-lightest-surface);--ax-comp-popup-body-text-color: var(--ax-sys-color-on-lightest-surface);--ax-comp-popup-header-bg-color: var(--ax-sys-color-lighter-surface);--ax-comp-popup-header-border-color: var(--ax-sys-color-border-lighter-surface);--ax-comp-popup-footer-bg-color: var(--ax-sys-color-lighter-surface);--ax-comp-popup-footer-border-color: var(--ax-sys-color-border-lighter-surface)}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-outline-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@property --tw-leading{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-outline-style: solid;--tw-font-weight: initial;--tw-leading: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
297
455
  }], propDecorators: { contentContainerRef: [{
298
456
  type: ViewChild,
299
457
  args: ['contentContainer', { read: ViewContainerRef, static: true }]
300
458
  }], contentContainerEl: [{
301
459
  type: ViewChild,
302
460
  args: ['contentContainer', { static: true }]
303
- }], __content__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__content__", required: false }] }], __config__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__config__", required: false }] }], __popupRef__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popupRef__", required: false }] }], __id__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__id__", required: false }] }], onKeydownHandler: [{
461
+ }], popupEl: [{ type: i0.ViewChild, args: ['popupEl', { isSignal: true }] }], __content__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__content__", required: false }] }], __config__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__config__", required: false }] }], __popupRef__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popupRef__", required: false }] }], __id__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__id__", required: false }] }], onKeydownHandler: [{
304
462
  type: HostListener,
305
463
  args: ['keydown.escape']
306
464
  }], onDragMove: [{
@@ -311,27 +469,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
311
469
  args: ['document:mouseup']
312
470
  }] } });
313
471
 
314
- class AXPopupComponentBase {
315
- constructor() {
316
- this.__popup__ = input(/* @ts-ignore */
317
- ...(ngDevMode ? [undefined, { debugName: "__popup__" }] : /* istanbul ignore next */ []));
318
- }
319
- close(data = null) {
320
- this.__popup__().close(data);
321
- }
322
- setTitle(title) {
323
- this.__popup__().setTitle(title);
324
- }
325
- bringToFront() {
326
- this.__popup__().bringToFront();
327
- }
328
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupComponentBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
329
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: AXPopupComponentBase, isStandalone: true, inputs: { __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
330
- }
331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupComponentBase, decorators: [{
332
- type: Directive
333
- }], propDecorators: { __popup__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popup__", required: false }] }] } });
334
-
335
472
  /**
336
473
  * This is a service which you can create popup with it
337
474
  *
@@ -346,9 +483,32 @@ class AXPopupService {
346
483
  * @ignore
347
484
  */
348
485
  open(arg1, arg2) {
349
- let config = {
486
+ const config = this.mergeConfig(arg2);
487
+ const promise = new AXComponentClosedPromise((resolve) => {
488
+ this.openRef(arg1, config).then((ref) => {
489
+ ref.onClose.subscribe((data) => {
490
+ if (resolve) {
491
+ resolve({
492
+ sender: ref.componentInstance,
493
+ data: data,
494
+ });
495
+ }
496
+ });
497
+ });
498
+ });
499
+ return promise;
500
+ }
501
+ /**
502
+ * Opens a popup and returns a mutable reference (for host components and advanced control).
503
+ */
504
+ async openRef(content, config) {
505
+ return this.openInternal(content, this.mergeConfig(config));
506
+ }
507
+ mergeConfig(arg2) {
508
+ const config = {
350
509
  closeButton: true,
351
510
  header: true,
511
+ footer: false,
352
512
  size: 'md',
353
513
  maximizable: false,
354
514
  draggable: true,
@@ -357,32 +517,38 @@ class AXPopupService {
357
517
  data: {},
358
518
  closeOnNavigation: true,
359
519
  panelClass: ['animate-fadeIn', 'animate-fast'],
520
+ buttons: {
521
+ close: true,
522
+ maximize: false,
523
+ minimize: {
524
+ enable: false,
525
+ position: 'bottom-right',
526
+ },
527
+ },
360
528
  };
361
529
  if (typeof arg2 === 'string') {
362
530
  config.title = arg2;
363
531
  }
364
- else {
365
- config = Object.assign(config, arg2);
532
+ else if (arg2) {
533
+ const { buttons, ...rest } = arg2;
534
+ Object.assign(config, rest);
535
+ if (buttons) {
536
+ config.buttons = {
537
+ ...config.buttons,
538
+ ...buttons,
539
+ minimize: {
540
+ enable: false,
541
+ position: 'bottom-right',
542
+ ...config.buttons?.minimize,
543
+ ...buttons.minimize,
544
+ },
545
+ };
546
+ }
366
547
  }
367
- const promise = new AXComponentClosedPromise((resolve) => {
368
- this.openInternal(arg1, config).then((ref) => {
369
- ref.onClose.subscribe((data) => {
370
- if (resolve) {
371
- resolve({
372
- sender: ref.componentInstance,
373
- data: data,
374
- });
375
- }
376
- });
377
- });
378
- });
379
- return promise;
548
+ return config;
380
549
  }
381
550
  /**
382
551
  * Opens a popup with the specified content and configuration.
383
- * @param content - Component or template to display
384
- * @param config - Configuration options for the popup
385
- * @returns Promise<AXPopupRef> - Reference to the opened popup
386
552
  */
387
553
  async openInternal(content, config) {
388
554
  const randomId = Math.floor(Math.random() * 100000000000);
@@ -397,12 +563,27 @@ class AXPopupService {
397
563
  setTitle: (title) => {
398
564
  this.setTitle(randomId, title);
399
565
  },
566
+ minimize: () => {
567
+ this.minimize(randomId);
568
+ },
569
+ maximize: () => {
570
+ this.maximize(randomId);
571
+ },
572
+ restore: () => {
573
+ this.restore(randomId);
574
+ },
400
575
  bringToFront: () => {
401
576
  this.bringToFront(randomId);
402
577
  },
403
578
  onClose,
579
+ _getStackIndex: () => this.getMapIndexOf(randomId),
404
580
  };
405
- // Build panel classes
581
+ if (config._bindContentInputs) {
582
+ config.inputs = {
583
+ ...(config.inputs ?? {}),
584
+ ...config._bindContentInputs(returnRef),
585
+ };
586
+ }
406
587
  const panelClasses = ['ax-popup-overlay'];
407
588
  if (config.panelClass) {
408
589
  panelClasses.push(...config.panelClass);
@@ -411,7 +592,9 @@ class AXPopupService {
411
592
  backdrop: {
412
593
  enabled: config.hasBackdrop ?? true,
413
594
  background: true,
595
+ // Dispose is handled via onDispose so close goes through onClose.
414
596
  closeOnClick: config.closeOnBackdropClick ?? false,
597
+ backdropClass: config.backdropClass,
415
598
  },
416
599
  panelClass: panelClasses,
417
600
  inputs: {
@@ -420,28 +603,33 @@ class AXPopupService {
420
603
  __popupRef__: returnRef,
421
604
  __id__: randomId,
422
605
  },
606
+ onDispose: () => {
607
+ // Backdrop click (or external dispose) — complete close pipeline if still open.
608
+ const entry = this.popupList.get(randomId);
609
+ if (!entry)
610
+ return;
611
+ this.popupList.delete(randomId);
612
+ entry.popup.onClose.next(undefined);
613
+ entry.popup.onClose.complete();
614
+ },
423
615
  });
424
616
  this.popupList.set(randomId, { overlay: ref, popup: returnRef });
425
617
  return returnRef;
426
618
  }
427
619
  /**
428
620
  * Closes a popup by its ID.
429
- * @param id - The popup ID to close
430
- * @param data - Optional data to pass to the close event
431
621
  */
432
622
  close(id, data) {
433
623
  const ref = this.popupList.get(id);
434
624
  if (!ref)
435
625
  return;
626
+ this.popupList.delete(id);
436
627
  ref.popup.onClose.next(data);
437
628
  ref.popup.onClose.complete();
438
629
  ref.overlay.dispose();
439
- this.popupList.delete(id);
440
630
  }
441
631
  /**
442
632
  * Sets input values for a popup by its ID.
443
- * @param id - The popup ID
444
- * @param values - Object containing input values to set
445
633
  */
446
634
  setInputs(id, values) {
447
635
  const ref = this.popupList.get(id)?.overlay.instance;
@@ -454,8 +642,6 @@ class AXPopupService {
454
642
  }
455
643
  /**
456
644
  * Sets the title for a popup by its ID.
457
- * @param id - The popup ID
458
- * @param title - The new title
459
645
  */
460
646
  setTitle(id, title) {
461
647
  const ref = this.popupList.get(id)?.overlay.instance;
@@ -466,9 +652,33 @@ class AXPopupService {
466
652
  componentInstance.setTitle(title);
467
653
  }
468
654
  }
655
+ minimize(id) {
656
+ const instance = this.getPopupInstance(id);
657
+ instance?.minimize();
658
+ }
659
+ maximize(id) {
660
+ const instance = this.getPopupInstance(id);
661
+ instance?.maximize();
662
+ }
663
+ restore(id) {
664
+ const instance = this.getPopupInstance(id);
665
+ instance?.restore();
666
+ }
667
+ /**
668
+ * Gets the index of a popup in the open stack (used for minimized bar positioning).
669
+ */
670
+ getMapIndexOf(targetKey) {
671
+ let index = 0;
672
+ for (const key of this.popupList.keys()) {
673
+ if (key === targetKey) {
674
+ return index;
675
+ }
676
+ index++;
677
+ }
678
+ return -1;
679
+ }
469
680
  /**
470
681
  * Brings a popup to the front of all other overlays.
471
- * @param id - The popup ID to bring to front
472
682
  */
473
683
  bringToFront(id) {
474
684
  const ref = this.popupList.get(id);
@@ -476,6 +686,15 @@ class AXPopupService {
476
686
  return;
477
687
  ref.overlay.bringToFront();
478
688
  }
689
+ getPopupInstance(id) {
690
+ const ref = this.popupList.get(id)?.overlay.instance;
691
+ if (!ref)
692
+ return null;
693
+ if (ref instanceof ComponentRef) {
694
+ return ref.instance;
695
+ }
696
+ return null;
697
+ }
479
698
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
480
699
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupService, providedIn: 'root' }); }
481
700
  }
@@ -486,12 +705,103 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
486
705
  }]
487
706
  }] });
488
707
 
489
- const COMPONENT = [AXPopupComponent];
708
+ /**
709
+ * Declarative popup host. Project content and call `open()` / `close()` on the component instance.
710
+ *
711
+ * @example
712
+ * ```html
713
+ * <ax-popup-host #popup>
714
+ * <p>Content</p>
715
+ * </ax-popup-host>
716
+ * <ax-button (onClick)="popup.open({ title: 'Hello', header: true })"></ax-button>
717
+ * ```
718
+ */
719
+ class AXPopupHostComponent extends NXComponent {
720
+ constructor() {
721
+ super(...arguments);
722
+ this.popupService = inject(AXPopupService);
723
+ this.template = viewChild(TemplateRef, /* @ts-ignore */
724
+ ...(ngDevMode ? [{ debugName: "template" }] : /* istanbul ignore next */ []));
725
+ this.ref = signal(null, /* @ts-ignore */
726
+ ...(ngDevMode ? [{ debugName: "ref" }] : /* istanbul ignore next */ []));
727
+ }
728
+ /**
729
+ * Opens the projected content in a popup overlay.
730
+ */
731
+ async open(options) {
732
+ const template = this.template();
733
+ if (!template) {
734
+ throw new Error('AXPopupHostComponent: content template is not ready.');
735
+ }
736
+ const ref = await this.popupService.openRef(template, options);
737
+ this.ref.set(ref);
738
+ ref.onClose.subscribe(() => {
739
+ if (this.ref() === ref) {
740
+ this.ref.set(null);
741
+ }
742
+ });
743
+ return ref;
744
+ }
745
+ /**
746
+ * Closes the currently open popup hosted by this component.
747
+ */
748
+ async close(data) {
749
+ const current = this.ref();
750
+ if (!current)
751
+ return;
752
+ current.close(data);
753
+ }
754
+ /**
755
+ * Sets input values for the popup content component.
756
+ */
757
+ async setInputs(values) {
758
+ this.ref()?.setInputs(values);
759
+ }
760
+ /**
761
+ * Minimizes the hosted popup.
762
+ */
763
+ async minimize() {
764
+ this.ref()?.minimize();
765
+ }
766
+ /**
767
+ * Maximizes the hosted popup.
768
+ */
769
+ async maximize() {
770
+ this.ref()?.maximize();
771
+ }
772
+ /**
773
+ * Restores the hosted popup.
774
+ */
775
+ async restore() {
776
+ this.ref()?.restore();
777
+ }
778
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupHostComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
779
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: AXPopupHostComponent, isStandalone: true, selector: "ax-popup-host", providers: [{ provide: AXComponent, useExisting: AXPopupHostComponent }], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
780
+ <ng-template #contentTemplate>
781
+ <ng-content></ng-content>
782
+ </ng-template>
783
+ `, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
784
+ }
785
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupHostComponent, decorators: [{
786
+ type: Component,
787
+ args: [{
788
+ selector: 'ax-popup-host',
789
+ template: `
790
+ <ng-template #contentTemplate>
791
+ <ng-content></ng-content>
792
+ </ng-template>
793
+ `,
794
+ encapsulation: ViewEncapsulation.None,
795
+ providers: [{ provide: AXComponent, useExisting: AXPopupHostComponent }],
796
+ }]
797
+ }], propDecorators: { template: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
798
+
799
+ const COMPONENT = [AXPopupComponent, AXPopupHostComponent, AXPopupFooterComponent];
490
800
  const MODULES = [CommonModule, AXCommonModule, AXDecoratorModule, AXTranslationModule];
491
801
  class AXPopupModule {
492
802
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
493
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXPopupModule, imports: [CommonModule, AXCommonModule, AXDecoratorModule, AXTranslationModule, AXPopupComponent], exports: [AXPopupComponent] }); }
494
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupModule, providers: [AXPopupService], imports: [MODULES, COMPONENT] }); }
803
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXPopupModule, imports: [CommonModule, AXCommonModule, AXDecoratorModule, AXTranslationModule, AXPopupComponent, AXPopupHostComponent, AXPopupFooterComponent], exports: [AXPopupComponent, AXPopupHostComponent, AXPopupFooterComponent] }); }
804
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupModule, providers: [AXPopupService], imports: [MODULES, AXPopupComponent] }); }
495
805
  }
496
806
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPopupModule, decorators: [{
497
807
  type: NgModule,
@@ -506,5 +816,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
506
816
  * Generated bundle index. Do not edit.
507
817
  */
508
818
 
509
- export { AXPopupComponent, AXPopupComponentBase, AXPopupModule, AXPopupService };
819
+ export { AXPopupComponent, AXPopupComponentBase, AXPopupFooterComponent, AXPopupHostComponent, AXPopupModule, AXPopupService, resolvePopupCloseButton, resolvePopupMaximizable, resolvePopupMinimize };
510
820
  //# sourceMappingURL=acorex-components-popup.mjs.map