@acorex/components 22.1.0-next.8 → 22.1.0-next.9

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.
@@ -6,8 +6,8 @@ import { AXProgressBarComponent } from '@acorex/components/progress-bar';
6
6
  import { AXTranslatorPipe } from '@acorex/core/translation';
7
7
  import { AsyncPipe } from '@angular/common';
8
8
  import * as i0 from '@angular/core';
9
- import { input, signal, ViewEncapsulation, Component, NgModule, inject, ComponentRef, Injectable } from '@angular/core';
10
- import { AXOverlayService } from '@acorex/cdk/overlay';
9
+ import { input, signal, ViewEncapsulation, Component, NgModule, inject, Injectable } from '@angular/core';
10
+ import { AXPopupService } from '@acorex/components/popup';
11
11
 
12
12
  /**
13
13
  * Represents a loading dialog component with custom styles and encapsulation.
@@ -19,9 +19,15 @@ class AXLoadingDialogComponent extends MXBaseComponent {
19
19
  /** Loading dialog configuration data */
20
20
  this.data = input.required(/* @ts-ignore */
21
21
  ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
22
- /** @internal Callback function to close the dialog */
22
+ /** Callback function to close the dialog */
23
23
  this.onClose = input(/* @ts-ignore */
24
24
  ...(ngDevMode ? [undefined, { debugName: "onClose" }] : /* istanbul ignore next */ []));
25
+ /**
26
+ * Injected by {@link AXPopupComponent} when this dialog is opened via {@link AXPopupService}.
27
+ * @internal
28
+ */
29
+ this.__popup__ = input(/* @ts-ignore */
30
+ ...(ngDevMode ? [undefined, { debugName: "__popup__" }] : /* istanbul ignore next */ []));
25
31
  /** @ignore */
26
32
  this.progressText = signal('', /* @ts-ignore */
27
33
  ...(ngDevMode ? [{ debugName: "progressText" }] : /* istanbul ignore next */ []));
@@ -40,7 +46,6 @@ class AXLoadingDialogComponent extends MXBaseComponent {
40
46
  }
41
47
  ngOnInit() {
42
48
  super.ngOnInit();
43
- // Initialize signals from input data
44
49
  const config = this.data();
45
50
  this.progressText.set(config.text ?? '');
46
51
  this.progressStatus.set(config.status ?? '');
@@ -54,10 +59,8 @@ class AXLoadingDialogComponent extends MXBaseComponent {
54
59
  * @returns void - No return value. The dialog is closed and control returns to the caller.
55
60
  */
56
61
  close() {
57
- const closeCallback = this.onClose();
58
- if (closeCallback) {
59
- closeCallback();
60
- }
62
+ this.onClose()?.();
63
+ this.__popup__()?.close();
61
64
  }
62
65
  /**
63
66
  * Sets the displayed progress text inside the dialog.
@@ -94,6 +97,7 @@ class AXLoadingDialogComponent extends MXBaseComponent {
94
97
  */
95
98
  setDialogTitle(text) {
96
99
  this.dialogTitle.set(text);
100
+ this.__popup__()?.setTitle(text);
97
101
  }
98
102
  /**
99
103
  * Sets the numeric progress value.
@@ -128,7 +132,7 @@ class AXLoadingDialogComponent extends MXBaseComponent {
128
132
  return false;
129
133
  }
130
134
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLoadingDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLoadingDialogComponent, isStandalone: true, selector: "ax-loading-dialog", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, onClose: { classPropertyName: "onClose", publicName: "onClose", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }], usesInheritance: true, ngImport: i0, template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n<ax-footer>\n <div class=\"button-wrapper\">\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n class=\"button-item\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </div>\n</ax-footer>\n", styles: ["@layer properties;@layer components{ax-loading-dialog{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);background-color:rgba(var(--ax-sys-color-lightest-surface));padding:calc(var(--spacing, .25rem) * 4)}@media(min-width:40rem){ax-loading-dialog{width:93vw}}@media(min-width:48rem){ax-loading-dialog{width:55vw}}@media(min-width:80rem){ax-loading-dialog{width:30vw}}@media(min-width:96rem){ax-loading-dialog{width:26vw}}ax-loading-dialog ax-title{margin-bottom:calc(var(--spacing, .25rem) * 2);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)}ax-loading-dialog .progress-decorators{display:flex;justify-content:space-between;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}ax-loading-dialog ax-footer{justify-content:flex-end;padding-top:calc(var(--spacing, .25rem) * 3)}ax-loading-dialog .button-wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 2)}ax-loading-dialog .button-item{display:flex;flex:1}}@property --tw-font-weight{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-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "mode", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }, { 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: AXHotkeyDirective, selector: "[axHotkey]", inputs: ["axHotkey"] }, { kind: "directive", type: AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
135
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXLoadingDialogComponent, isStandalone: true, selector: "ax-loading-dialog", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, onClose: { classPropertyName: "onClose", publicName: "onClose", isSignal: true, isRequired: false, transformFunction: null }, __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }], usesInheritance: true, ngImport: i0, template: "@if (!__popup__()) {\n <ax-title>{{ dialogTitle() }}</ax-title>\n}\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n@if (!__popup__() || data().buttons?.length) {\n<ax-footer>\n <div class=\"button-wrapper\">\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n class=\"button-item\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </div>\n</ax-footer>\n}\n", styles: ["@layer properties;@layer components{ax-loading-dialog{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 4)}ax-loading-dialog ax-title{margin-bottom:calc(var(--spacing, .25rem) * 2);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)}ax-loading-dialog .progress-decorators{display:flex;justify-content:space-between;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}ax-loading-dialog ax-footer{justify-content:flex-end;padding-top:calc(var(--spacing, .25rem) * 3)}:is(ax-loading-dialog,.ax-loading-dialog-panel) .button-wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 2)}:is(ax-loading-dialog,.ax-loading-dialog-panel) .button-item{display:flex;flex:1}}@property --tw-font-weight{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-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "component", type: AXProgressBarComponent, selector: "ax-progress-bar", inputs: ["color", "mode", "progress", "height"], outputs: ["ValueChange", "sizeChange"] }, { 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: AXHotkeyDirective, selector: "[axHotkey]", inputs: ["axHotkey"] }, { kind: "directive", type: AXAutoFocusDirective, selector: "[axAutoFocus]", inputs: ["axAutoFocus", "axAutoFocusTime"] }, { kind: "component", type: AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
132
136
  }
133
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLoadingDialogComponent, decorators: [{
134
138
  type: Component,
@@ -141,8 +145,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
141
145
  AXLoadingComponent,
142
146
  AXTranslatorPipe,
143
147
  AsyncPipe,
144
- ], providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }], template: "<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n<ax-footer>\n <div class=\"button-wrapper\">\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n class=\"button-item\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </div>\n</ax-footer>\n", styles: ["@layer properties;@layer components{ax-loading-dialog{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);border-radius:var(--radius-lg, .5rem);background-color:rgba(var(--ax-sys-color-lightest-surface));padding:calc(var(--spacing, .25rem) * 4)}@media(min-width:40rem){ax-loading-dialog{width:93vw}}@media(min-width:48rem){ax-loading-dialog{width:55vw}}@media(min-width:80rem){ax-loading-dialog{width:30vw}}@media(min-width:96rem){ax-loading-dialog{width:26vw}}ax-loading-dialog ax-title{margin-bottom:calc(var(--spacing, .25rem) * 2);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)}ax-loading-dialog .progress-decorators{display:flex;justify-content:space-between;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}ax-loading-dialog ax-footer{justify-content:flex-end;padding-top:calc(var(--spacing, .25rem) * 3)}ax-loading-dialog .button-wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 2)}ax-loading-dialog .button-item{display:flex;flex:1}}@property --tw-font-weight{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-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
145
- }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], onClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "onClose", required: false }] }] } });
148
+ ], providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }], template: "@if (!__popup__()) {\n <ax-title>{{ dialogTitle() }}</ax-title>\n}\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n@if (!__popup__() || data().buttons?.length) {\n<ax-footer>\n <div class=\"button-wrapper\">\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n class=\"button-item\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </div>\n</ax-footer>\n}\n", styles: ["@layer properties;@layer components{ax-loading-dialog{display:flex;width:100%;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 4)}ax-loading-dialog ax-title{margin-bottom:calc(var(--spacing, .25rem) * 2);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)}ax-loading-dialog .progress-decorators{display:flex;justify-content:space-between;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)))}ax-loading-dialog ax-footer{justify-content:flex-end;padding-top:calc(var(--spacing, .25rem) * 3)}:is(ax-loading-dialog,.ax-loading-dialog-panel) .button-wrapper{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:calc(var(--spacing, .25rem) * 2)}:is(ax-loading-dialog,.ax-loading-dialog-panel) .button-item{display:flex;flex:1}}@property --tw-font-weight{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-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
149
+ }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], onClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "onClose", required: false }] }], __popup__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popup__", required: false }] }] } });
146
150
 
147
151
  class AXLoadingDialogModule {
148
152
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLoadingDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -159,7 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
159
163
 
160
164
  class AXLoadingDialogService {
161
165
  constructor() {
162
- this.overlayService = inject(AXOverlayService);
166
+ this.popupService = inject(AXPopupService);
163
167
  }
164
168
  /**
165
169
  * Opens a loading dialog with the specified configuration.
@@ -168,45 +172,58 @@ class AXLoadingDialogService {
168
172
  * @returns AXLoadingDialogRef - A reference with helper methods to control the dialog lifecycle and UI (close, setProgressValue, setProgressText, setDialogTitle, setProgressColor, setProgressStatus).
169
173
  */
170
174
  show(options) {
171
- let internalRef;
172
- let componentInstance = null;
173
- const closeDialog = () => {
174
- if (internalRef) {
175
- internalRef.overlayRef.dispose();
175
+ let popupRef = null;
176
+ const pending = [];
177
+ const run = (fn) => {
178
+ const instance = popupRef?.componentInstance;
179
+ if (popupRef && instance) {
180
+ fn(instance, popupRef);
181
+ return;
176
182
  }
183
+ pending.push(fn);
177
184
  };
178
- this.overlayService
179
- .create(AXLoadingDialogComponent, {
180
- zIndexBase: 2000,
185
+ this.popupService
186
+ .openRef(AXLoadingDialogComponent, {
187
+ title: options.title,
188
+ size: options.size ?? 'sm',
189
+ header: true,
190
+ footer: !!options.buttons?.length,
191
+ closeButton: false,
192
+ closeOnEscape: false,
193
+ closeOnBackdropClick: false,
194
+ draggable: false,
195
+ maximizable: false,
196
+ buttons: {
197
+ close: false,
198
+ maximize: false,
199
+ minimize: {
200
+ enable: false,
201
+ position: 'bottom-right',
202
+ },
203
+ },
204
+ panelClass: ['ax-loading-dialog-panel', 'animate-fadeIn'],
181
205
  inputs: {
182
206
  data: options,
183
- onClose: closeDialog,
184
207
  },
185
- backdrop: {
186
- enabled: true,
187
- background: true,
188
- closeOnClick: false, // disableClose: true equivalent
189
- },
190
- panelClass: ['ax-loading-dialog-panel', 'animate-fadeIn'],
191
208
  })
192
- .then((overlayRef) => {
193
- internalRef = {
194
- overlayRef,
195
- close: closeDialog,
196
- };
197
- // Get the component instance for method calls
198
- if (overlayRef.instance instanceof ComponentRef) {
199
- componentInstance = overlayRef.instance.instance;
209
+ .then((ref) => {
210
+ popupRef = ref;
211
+ const instance = ref.componentInstance;
212
+ if (!instance) {
213
+ return;
200
214
  }
215
+ pending.splice(0).forEach((fn) => fn(instance, ref));
201
216
  });
202
- // Return the dialog ref with methods that will work once the component is created
203
217
  return {
204
- close: () => closeDialog(),
205
- setProgressValue: (value) => componentInstance?.setProgressValue(value),
206
- setDialogTitle: (text) => componentInstance?.setDialogTitle(text),
207
- setProgressText: (text) => componentInstance?.setProgressText(text),
208
- setProgressStatus: (status) => componentInstance?.setProgressStatus(status),
209
- setProgressColor: (color) => componentInstance?.setProgressColor(color),
218
+ close: () => run((_, popup) => popup.close()),
219
+ setProgressValue: (value) => run((instance) => instance.setProgressValue(value)),
220
+ setDialogTitle: (text) => run((instance, popup) => {
221
+ popup.setTitle(text);
222
+ instance.setDialogTitle(text);
223
+ }),
224
+ setProgressText: (text) => run((instance) => instance.setProgressText(text)),
225
+ setProgressStatus: (status) => run((instance) => instance.setProgressStatus(status)),
226
+ setProgressColor: (color) => run((instance) => instance.setProgressColor(color)),
210
227
  };
211
228
  }
212
229
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXLoadingDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-loading-dialog.mjs","sources":["../../../../packages/components/loading-dialog/src/lib/loading-dialog.component.ts","../../../../packages/components/loading-dialog/src/lib/loading-dialog.component.html","../../../../packages/components/loading-dialog/src/lib/loading-dialog.module.ts","../../../../packages/components/loading-dialog/src/lib/loading-dialog.service.ts","../../../../packages/components/loading-dialog/src/acorex-components-loading-dialog.ts"],"sourcesContent":["import {\n AXAutoFocusDirective,\n AXComponent,\n AXHotkeyDirective,\n AXStyleColorType,\n MXBaseComponent,\n} from '@acorex/cdk/common';\nimport { AXButtonComponent } from '@acorex/components/button';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXLoadingComponent } from '@acorex/components/loading';\nimport { AXProgressBarComponent } from '@acorex/components/progress-bar';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { Component, OnInit, ViewEncapsulation, input, signal } from '@angular/core';\nimport { AXLoadingDialogButtonItem, AXLoadingDialogConfig } from './loading-dialog.class';\n\n/**\n * Represents a loading dialog component with custom styles and encapsulation.\n * @category components\n */\n@Component({\n selector: 'ax-loading-dialog',\n templateUrl: './loading-dialog.component.html',\n styleUrls: ['./loading-dialog.component.css'],\n\n encapsulation: ViewEncapsulation.None,\n imports: [\n AXDecoratorGenericComponent,\n AXProgressBarComponent,\n AXButtonComponent,\n AXHotkeyDirective,\n AXAutoFocusDirective,\n AXLoadingComponent,\n AXTranslatorPipe,\n AsyncPipe,\n ],\n providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }],\n})\nexport class AXLoadingDialogComponent extends MXBaseComponent implements OnInit {\n /** Loading dialog configuration data */\n data = input.required<AXLoadingDialogConfig>();\n\n /** @internal Callback function to close the dialog */\n onClose = input<() => void>();\n\n /** @ignore */\n protected progressText = signal('');\n\n /** @ignore */\n protected progressStatus = signal('');\n\n /** @ignore */\n protected progressColor = signal<AXStyleColorType>('primary');\n\n /** @ignore */\n protected dialogTitle = signal('');\n\n /** @ignore */\n protected progressValue = signal(0);\n\n override ngOnInit(): void {\n super.ngOnInit();\n // Initialize signals from input data\n const config = this.data();\n this.progressText.set(config.text ?? '');\n this.progressStatus.set(config.status ?? '');\n this.progressColor.set(config.progressColor ?? 'primary');\n this.dialogTitle.set(config.title ?? '');\n this.progressValue.set(config.progressValue ?? 0);\n }\n\n /**\n * Closes the loading dialog.\n *\n * @returns void - No return value. The dialog is closed and control returns to the caller.\n */\n close() {\n const closeCallback = this.onClose();\n if (closeCallback) {\n closeCallback();\n }\n }\n\n /**\n * Sets the displayed progress text inside the dialog.\n *\n * @param text The text to display under the progress bar.\n * @returns void\n */\n setProgressText(text: string) {\n this.progressText.set(text);\n }\n\n /**\n * Sets the status text, typically representing the current step out of total steps (e.g., \"5/10\").\n *\n * @param status The status text to display.\n * @returns void\n */\n setProgressStatus(status: string) {\n this.progressStatus.set(status);\n }\n\n /**\n * Sets the color used by the progress indicator.\n *\n * @param color The color token to apply to the progress UI.\n * @returns void\n */\n setProgressColor(color: AXStyleColorType) {\n this.progressColor.set(color);\n }\n\n /**\n * Sets the dialog title text.\n *\n * @param text The title text to display at the top of the dialog.\n * @returns void\n */\n setDialogTitle(text: string) {\n this.dialogTitle.set(text);\n }\n\n /**\n * Sets the numeric progress value.\n *\n * @param value A number in the range 0–100 representing the current progress.\n * @returns void\n */\n setProgressValue(value: number) {\n this.progressValue.set(value);\n }\n\n /** @ignore */\n protected _handleButtonClick(button: AXLoadingDialogButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /** @ignore */\n protected _hasAutoFocus(button: AXLoadingDialogButtonItem) {\n const buttons = this.data().buttons;\n if (!buttons || buttons.length === 0) return false;\n\n const autoFocusItem = buttons.find((item) => item.autofocus === true);\n if (autoFocusItem && autoFocusItem.text === button.text) {\n return true;\n }\n if (!autoFocusItem) {\n if (buttons.length > 0) {\n buttons[0].autofocus = true;\n return buttons[0].text === button.text;\n }\n }\n return false;\n }\n}\n","<ax-title>{{ dialogTitle() }}</ax-title>\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n<ax-footer>\n <div class=\"button-wrapper\">\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n class=\"button-item\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </div>\n</ax-footer>\n","import { NgModule } from '@angular/core';\nimport { AXLoadingDialogComponent } from './loading-dialog.component';\n\n@NgModule({\n imports: [AXLoadingDialogComponent],\n exports: [AXLoadingDialogComponent],\n})\nexport class AXLoadingDialogModule {}\n","import { AXStyleColorType } from '@acorex/cdk/common';\nimport { AXOverlayService } from '@acorex/cdk/overlay';\nimport { ComponentRef, Injectable, inject } from '@angular/core';\nimport { AXLoadingDialogConfig, AXLoadingDialogInternalRef, AXLoadingDialogRef } from './loading-dialog.class';\nimport { AXLoadingDialogComponent } from './loading-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXLoadingDialogService {\n private overlayService = inject(AXOverlayService);\n\n /**\n * Opens a loading dialog with the specified configuration.\n *\n * @param options Configuration for the loading dialog, including title, progress mode, and optional initial values.\n * @returns AXLoadingDialogRef - A reference with helper methods to control the dialog lifecycle and UI (close, setProgressValue, setProgressText, setDialogTitle, setProgressColor, setProgressStatus).\n */\n show(options: AXLoadingDialogConfig): AXLoadingDialogRef {\n let internalRef: AXLoadingDialogInternalRef;\n let componentInstance: AXLoadingDialogComponent | null = null;\n\n const closeDialog = () => {\n if (internalRef) {\n internalRef.overlayRef.dispose();\n }\n };\n\n this.overlayService\n .create<AXLoadingDialogComponent>(AXLoadingDialogComponent, {\n zIndexBase: 2000,\n inputs: {\n data: options,\n onClose: closeDialog,\n },\n backdrop: {\n enabled: true,\n background: true,\n closeOnClick: false, // disableClose: true equivalent\n },\n panelClass: ['ax-loading-dialog-panel', 'animate-fadeIn'],\n })\n .then((overlayRef) => {\n internalRef = {\n overlayRef,\n close: closeDialog,\n };\n\n // Get the component instance for method calls\n if (overlayRef.instance instanceof ComponentRef) {\n componentInstance = overlayRef.instance.instance as AXLoadingDialogComponent;\n }\n });\n\n // Return the dialog ref with methods that will work once the component is created\n return {\n close: () => closeDialog(),\n setProgressValue: (value: number) => componentInstance?.setProgressValue(value),\n setDialogTitle: (text: string) => componentInstance?.setDialogTitle(text),\n setProgressText: (text: string) => componentInstance?.setProgressText(text),\n setProgressStatus: (status: string) => componentInstance?.setProgressStatus(status),\n setProgressColor: (color: AXStyleColorType) => componentInstance?.setProgressColor(color),\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAgBA;;;AAGG;AAmBG,MAAO,wBAAyB,SAAQ,eAAe,CAAA;AAlB7D,IAAA,WAAA,GAAA;;;QAoBE,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ;iFAAyB;;AAG9C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAc;;QAGnB,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,EAAE;yFAAC;;QAGzB,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,EAAE;2FAAC;;QAG3B,IAAA,CAAA,aAAa,GAAG,MAAM,CAAmB,SAAS;0FAAC;;QAGnD,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,EAAE;wFAAC;;QAGxB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,CAAC;0FAAC;AAmGpC,IAAA;IAjGU,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE;;AAEhB,QAAA,MAAM,MAAM,GAAG,IAAI,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AAoC;YAC9E;AACF,QAAA,CAAC,CAAC;;QAGJ,OAAO;AACL,YAAA,KAAK,EAAE,MAAM,WAAW,EAAE;YAC1B,gBAAgB,EAAE,CAAC,KAAa,KAAK,iBAAiB,EAAE,gBAAgB,CAAC,KAAK,CAAC;YAC/E,cAAc,EAAE,CAAC,IAAY,KAAK,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC;YACzE,eAAe,EAAE,CAAC,IAAY,KAAK,iBAAiB,EAAE,eAAe,CAAC,IAAI,CAAC;YAC3E,iBAAiB,EAAE,CAAC,MAAc,KAAK,iBAAiB,EAAE,iBAAiB,CAAC,MAAM,CAAC;YACnF,gBAAgB,EAAE,CAAC,KAAuB,KAAK,iBAAiB,EAAE,gBAAgB,CAAC,KAAK,CAAC;SAC1F;IACH;8GAtDW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;;2FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-loading-dialog.mjs","sources":["../../../../packages/components/loading-dialog/src/lib/loading-dialog.component.ts","../../../../packages/components/loading-dialog/src/lib/loading-dialog.component.html","../../../../packages/components/loading-dialog/src/lib/loading-dialog.module.ts","../../../../packages/components/loading-dialog/src/lib/loading-dialog.service.ts","../../../../packages/components/loading-dialog/src/acorex-components-loading-dialog.ts"],"sourcesContent":["import {\n AXAutoFocusDirective,\n AXComponent,\n AXHotkeyDirective,\n AXStyleColorType,\n MXBaseComponent,\n} from '@acorex/cdk/common';\nimport { AXButtonComponent } from '@acorex/components/button';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXLoadingComponent } from '@acorex/components/loading';\nimport type { AXPopupRef } from '@acorex/components/popup';\nimport { AXProgressBarComponent } from '@acorex/components/progress-bar';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { AsyncPipe } from '@angular/common';\nimport { Component, OnInit, ViewEncapsulation, input, signal } from '@angular/core';\nimport { AXLoadingDialogButtonItem, AXLoadingDialogConfig } from './loading-dialog.class';\n\n/**\n * Represents a loading dialog component with custom styles and encapsulation.\n * @category components\n */\n@Component({\n selector: 'ax-loading-dialog',\n templateUrl: './loading-dialog.component.html',\n styleUrls: ['./loading-dialog.component.css'],\n\n encapsulation: ViewEncapsulation.None,\n imports: [\n AXDecoratorGenericComponent,\n AXProgressBarComponent,\n AXButtonComponent,\n AXHotkeyDirective,\n AXAutoFocusDirective,\n AXLoadingComponent,\n AXTranslatorPipe,\n AsyncPipe,\n ],\n providers: [{ provide: AXComponent, useExisting: AXLoadingDialogComponent }],\n})\nexport class AXLoadingDialogComponent extends MXBaseComponent implements OnInit {\n /** Loading dialog configuration data */\n data = input.required<AXLoadingDialogConfig>();\n\n /** Callback function to close the dialog */\n onClose = input<() => void>();\n\n /**\n * Injected by {@link AXPopupComponent} when this dialog is opened via {@link AXPopupService}.\n * @internal\n */\n readonly __popup__ = input<AXPopupRef | undefined>();\n\n /** @ignore */\n protected progressText = signal('');\n\n /** @ignore */\n protected progressStatus = signal('');\n\n /** @ignore */\n protected progressColor = signal<AXStyleColorType>('primary');\n\n /** @ignore */\n protected dialogTitle = signal('');\n\n /** @ignore */\n protected progressValue = signal(0);\n\n override ngOnInit(): void {\n super.ngOnInit();\n const config = this.data();\n this.progressText.set(config.text ?? '');\n this.progressStatus.set(config.status ?? '');\n this.progressColor.set(config.progressColor ?? 'primary');\n this.dialogTitle.set(config.title ?? '');\n this.progressValue.set(config.progressValue ?? 0);\n }\n\n /**\n * Closes the loading dialog.\n *\n * @returns void - No return value. The dialog is closed and control returns to the caller.\n */\n close() {\n this.onClose()?.();\n this.__popup__()?.close();\n }\n\n /**\n * Sets the displayed progress text inside the dialog.\n *\n * @param text The text to display under the progress bar.\n * @returns void\n */\n setProgressText(text: string) {\n this.progressText.set(text);\n }\n\n /**\n * Sets the status text, typically representing the current step out of total steps (e.g., \"5/10\").\n *\n * @param status The status text to display.\n * @returns void\n */\n setProgressStatus(status: string) {\n this.progressStatus.set(status);\n }\n\n /**\n * Sets the color used by the progress indicator.\n *\n * @param color The color token to apply to the progress UI.\n * @returns void\n */\n setProgressColor(color: AXStyleColorType) {\n this.progressColor.set(color);\n }\n\n /**\n * Sets the dialog title text.\n *\n * @param text The title text to display at the top of the dialog.\n * @returns void\n */\n setDialogTitle(text: string) {\n this.dialogTitle.set(text);\n this.__popup__()?.setTitle(text);\n }\n\n /**\n * Sets the numeric progress value.\n *\n * @param value A number in the range 0–100 representing the current progress.\n * @returns void\n */\n setProgressValue(value: number) {\n this.progressValue.set(value);\n }\n\n /** @ignore */\n protected _handleButtonClick(button: AXLoadingDialogButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /** @ignore */\n protected _hasAutoFocus(button: AXLoadingDialogButtonItem) {\n const buttons = this.data().buttons;\n if (!buttons || buttons.length === 0) return false;\n\n const autoFocusItem = buttons.find((item) => item.autofocus === true);\n if (autoFocusItem && autoFocusItem.text === button.text) {\n return true;\n }\n if (!autoFocusItem) {\n if (buttons.length > 0) {\n buttons[0].autofocus = true;\n return buttons[0].text === button.text;\n }\n }\n return false;\n }\n}\n","@if (!__popup__()) {\n <ax-title>{{ dialogTitle() }}</ax-title>\n}\n\n<ax-progress-bar [mode]=\"data().mode\" [progress]=\"progressValue()\" [color]=\"progressColor()\"></ax-progress-bar>\n<div class=\"progress-decorators\">\n <div>{{ progressText() }}</div>\n <div>{{ progressStatus() }}</div>\n</div>\n@if (!__popup__() || data().buttons?.length) {\n<ax-footer>\n <div class=\"button-wrapper\">\n @for (button of data().buttons; track $index) {\n <ax-button\n [text]=\"button.text | translate | async\"\n [tabindex]=\"$index\"\n [axHotkey]=\"button.hotkey\"\n [axAutoFocus]=\"_hasAutoFocus(button)\"\n (onClick)=\"_handleButtonClick(button)\"\n [look]=\"button.look\"\n [disabled]=\"button.disabled\"\n [color]=\"button.color\"\n class=\"button-item\"\n >\n @if (button.loading) {\n <ax-loading></ax-loading>\n }\n </ax-button>\n }\n </div>\n</ax-footer>\n}\n","import { NgModule } from '@angular/core';\nimport { AXLoadingDialogComponent } from './loading-dialog.component';\n\n@NgModule({\n imports: [AXLoadingDialogComponent],\n exports: [AXLoadingDialogComponent],\n})\nexport class AXLoadingDialogModule {}\n","import { AXStyleColorType } from '@acorex/cdk/common';\nimport { AXPopupRef, AXPopupService } from '@acorex/components/popup';\nimport { Injectable, inject } from '@angular/core';\nimport { AXLoadingDialogConfig, AXLoadingDialogRef } from './loading-dialog.class';\nimport { AXLoadingDialogComponent } from './loading-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXLoadingDialogService {\n private popupService = inject(AXPopupService);\n\n /**\n * Opens a loading dialog with the specified configuration.\n *\n * @param options Configuration for the loading dialog, including title, progress mode, and optional initial values.\n * @returns AXLoadingDialogRef - A reference with helper methods to control the dialog lifecycle and UI (close, setProgressValue, setProgressText, setDialogTitle, setProgressColor, setProgressStatus).\n */\n show(options: AXLoadingDialogConfig): AXLoadingDialogRef {\n let popupRef: AXPopupRef | null = null;\n const pending: Array<(instance: AXLoadingDialogComponent, popup: AXPopupRef) => void> = [];\n\n const run = (fn: (instance: AXLoadingDialogComponent, popup: AXPopupRef) => void) => {\n const instance = popupRef?.componentInstance as AXLoadingDialogComponent | undefined;\n if (popupRef && instance) {\n fn(instance, popupRef);\n return;\n }\n pending.push(fn);\n };\n\n this.popupService\n .openRef(AXLoadingDialogComponent, {\n title: options.title,\n size: options.size ?? 'sm',\n header: true,\n footer: !!options.buttons?.length,\n closeButton: false,\n closeOnEscape: false,\n closeOnBackdropClick: false,\n draggable: false,\n maximizable: false,\n buttons: {\n close: false,\n maximize: false,\n minimize: {\n enable: false,\n position: 'bottom-right',\n },\n },\n panelClass: ['ax-loading-dialog-panel', 'animate-fadeIn'],\n inputs: {\n data: options,\n },\n })\n .then((ref) => {\n popupRef = ref;\n const instance = ref.componentInstance as AXLoadingDialogComponent | undefined;\n if (!instance) {\n return;\n }\n pending.splice(0).forEach((fn) => fn(instance, ref));\n });\n\n return {\n close: () => run((_, popup) => popup.close()),\n setProgressValue: (value: number) => run((instance) => instance.setProgressValue(value)),\n setDialogTitle: (text: string) =>\n run((instance, popup) => {\n popup.setTitle(text);\n instance.setDialogTitle(text);\n }),\n setProgressText: (text: string) => run((instance) => instance.setProgressText(text)),\n setProgressStatus: (status: string) => run((instance) => instance.setProgressStatus(status)),\n setProgressColor: (color: AXStyleColorType) => run((instance) => instance.setProgressColor(color)),\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAiBA;;;AAGG;AAmBG,MAAO,wBAAyB,SAAQ,eAAe,CAAA;AAlB7D,IAAA,WAAA,GAAA;;;QAoBE,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,QAAQ;iFAAyB;;AAG9C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK;+FAAc;AAE7B;;;AAGG;AACM,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAA0B;;QAG1C,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,EAAE;yFAAC;;QAGzB,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,EAAE;2FAAC;;QAG3B,IAAA,CAAA,aAAa,GAAG,MAAM,CAAmB,SAAS;0FAAC;;QAGnD,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,EAAE;wFAAC;;QAGxB,IAAA,CA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E,KAAK,KAAI;AACtB,gBAAA,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AACpB,gBAAA,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC;AAC/B,YAAA,CAAC,CAAC;AACJ,YAAA,eAAe,EAAE,CAAC,IAAY,KAAK,GAAG,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AACpF,YAAA,iBAAiB,EAAE,CAAC,MAAc,KAAK,GAAG,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAC5F,YAAA,gBAAgB,EAAE,CAAC,KAAuB,KAAK,GAAG,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;SACnG;IACH;8GAnEW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA,CAAA;;2FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACRD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acorex/components",
3
- "version": "22.1.0-next.8",
3
+ "version": "22.1.0-next.9",
4
4
  "peerDependencies": {
5
- "@acorex/core": "22.1.0-next.8",
6
- "@acorex/cdk": "22.1.0-next.8",
5
+ "@acorex/core": "22.1.0-next.9",
6
+ "@acorex/cdk": "22.1.0-next.9",
7
7
  "polytype": ">=0.17.0",
8
8
  "angular-imask": ">=7.6.1",
9
9
  "imask": ">=7.6.1",
@@ -1,6 +1,7 @@
1
1
  import { AXStyleColorType, AXStyleLookType, AXHotKeyAction, MXBaseComponent } from '@acorex/cdk/common';
2
2
  import { AXOverlayRef } from '@acorex/cdk/overlay';
3
3
  import { AXDialogButtonItem } from '@acorex/components/dialog';
4
+ import { AXPopupSizeType, AXPopupRef } from '@acorex/components/popup';
4
5
  import { AXProgressMode } from '@acorex/components/progress-bar';
5
6
  import * as _angular_core from '@angular/core';
6
7
  import { OnInit } from '@angular/core';
@@ -13,6 +14,8 @@ interface AXLoadingDialogConfig {
13
14
  progressValue?: number;
14
15
  progressColor?: AXStyleColorType;
15
16
  progressHeight?: number;
17
+ /** Popup size token. Uses the same responsive sizes as `AXPopupService`. @default 'sm' */
18
+ size?: AXPopupSizeType;
16
19
  buttons?: AXLoadingDialogButtonItem[];
17
20
  }
18
21
  interface AXLoadingDialogButtonItem {
@@ -43,7 +46,7 @@ interface AXLoadingDialogRef {
43
46
  type AXDialogRef = AXLoadingDialogRef;
44
47
  /**
45
48
  * @internal
46
- * Internal reference used by loading dialog service to manage overlay instances
49
+ * Internal reference used by loading dialog service to manage overlay instances.
47
50
  */
48
51
  interface AXLoadingDialogInternalRef {
49
52
  overlayRef: AXOverlayRef<unknown>;
@@ -57,8 +60,13 @@ interface AXLoadingDialogInternalRef {
57
60
  declare class AXLoadingDialogComponent extends MXBaseComponent implements OnInit {
58
61
  /** Loading dialog configuration data */
59
62
  data: _angular_core.InputSignal<AXLoadingDialogConfig>;
60
- /** @internal Callback function to close the dialog */
63
+ /** Callback function to close the dialog */
61
64
  onClose: _angular_core.InputSignal<() => void>;
65
+ /**
66
+ * Injected by {@link AXPopupComponent} when this dialog is opened via {@link AXPopupService}.
67
+ * @internal
68
+ */
69
+ readonly __popup__: _angular_core.InputSignal<AXPopupRef<any>>;
62
70
  /** @ignore */
63
71
  protected progressText: _angular_core.WritableSignal<string>;
64
72
  /** @ignore */
@@ -116,7 +124,7 @@ declare class AXLoadingDialogComponent extends MXBaseComponent implements OnInit
116
124
  /** @ignore */
117
125
  protected _hasAutoFocus(button: AXLoadingDialogButtonItem): boolean;
118
126
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXLoadingDialogComponent, never>;
119
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLoadingDialogComponent, "ax-loading-dialog", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "onClose": { "alias": "onClose"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
127
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXLoadingDialogComponent, "ax-loading-dialog", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "onClose": { "alias": "onClose"; "required": false; "isSignal": true; }; "__popup__": { "alias": "__popup__"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
120
128
  }
121
129
 
122
130
  declare class AXLoadingDialogModule {
@@ -126,7 +134,7 @@ declare class AXLoadingDialogModule {
126
134
  }
127
135
 
128
136
  declare class AXLoadingDialogService {
129
- private overlayService;
137
+ private popupService;
130
138
  /**
131
139
  * Opens a loading dialog with the specified configuration.
132
140
  *