@acontplus/ng-components 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, EventEmitter, booleanAttribute, Output, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, input, output, contentChild, TemplateRef, computed, InjectionToken, NgZone, Injector, signal, Service, ElementRef, HostListener, Directive, ViewChild, ViewContainerRef, Renderer2, afterRenderEffect, untracked, Injectable, viewChild, effect, Pipe, KeyValueDiffers, CSP_NONCE, DOCUMENT as DOCUMENT$1, ContentChildren, model, forwardRef, ANIMATION_MODULE_TYPE, ApplicationRef, ContentChild, HostBinding, PLATFORM_ID, DestroyRef, SecurityContext } from '@angular/core';
2
+ import { inject, ChangeDetectorRef, EventEmitter, booleanAttribute, Output, Input, ChangeDetectionStrategy, ViewEncapsulation, Component, input, output, contentChild, TemplateRef, computed, InjectionToken, NgZone, Injector, signal, Service, ElementRef, HostListener, Directive, ViewChild, ViewContainerRef, Renderer2, afterRenderEffect, untracked, makeEnvironmentProviders, viewChild, isSignal, effect, Injectable, Pipe, KeyValueDiffers, CSP_NONCE, DOCUMENT as DOCUMENT$1, ContentChildren, model, forwardRef, ANIMATION_MODULE_TYPE, ApplicationRef, ContentChild, HostBinding, PLATFORM_ID, DestroyRef, SecurityContext } from '@angular/core';
3
3
  import * as i1$1 from '@angular/material/button';
4
4
  import { MatIconButton, MatButtonModule, MatButton, MatMiniFabButton, MatFabButton } from '@angular/material/button';
5
5
  import * as i1$2 from '@angular/common';
@@ -14,15 +14,17 @@ import { MatCardModule, MatCard, MatCardHeader, MatCardContent } from '@angular/
14
14
  import * as i3$1 from '@angular/cdk/overlay';
15
15
  import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
16
16
  import { ComponentPortal, CdkPortalOutlet, TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
17
- import { Subject, firstValueFrom, catchError, of, isObservable, merge, combineLatest, Observable, fromEvent, defer, Subscription, map as map$1, BehaviorSubject, filter as filter$1, tap, debounceTime } from 'rxjs';
18
- import { takeUntil, mapTo, take, startWith, pairwise, distinctUntilChanged, share, map, skip, filter } from 'rxjs/operators';
17
+ import { Subject, firstValueFrom, from, isObservable, catchError, of, merge, combineLatest, Observable, fromEvent, defer, Subscription, map as map$1, BehaviorSubject, filter as filter$1, tap, debounceTime } from 'rxjs';
18
+ import { takeUntil, take, switchMap, mapTo, startWith, pairwise, distinctUntilChanged, share, map, skip, filter } from 'rxjs/operators';
19
19
  import * as i3 from '@angular/material/progress-spinner';
20
20
  import { MatProgressSpinnerModule, MatProgressSpinner } from '@angular/material/progress-spinner';
21
21
  import { CdkTrapFocus, LiveAnnouncer, _IdGenerator, FocusMonitor, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';
22
- import { CdkDrag, CdkDragHandle, moveItemInArray, CdkDropList } from '@angular/cdk/drag-drop';
23
22
  import * as i1$3 from '@angular/material/dialog';
24
23
  import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatDialog, MatDialogConfig } from '@angular/material/dialog';
24
+ import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
25
+ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
25
26
  import { REPORT_FORMAT, DEFAULT_ICONS, FALLBACK_ICON } from '@acontplus/ui-kit';
27
+ import { CdkDrag, CdkDragHandle, moveItemInArray, CdkDropList } from '@angular/cdk/drag-drop';
26
28
  import * as i1$5 from '@angular/forms';
27
29
  import { FormControl, ReactiveFormsModule, FormsModule, NG_VALUE_ACCESSOR, FormGroup, Validators } from '@angular/forms';
28
30
  import * as i1$4 from '@ng-select/ng-select';
@@ -63,8 +65,6 @@ import { MatListModule } from '@angular/material/list';
63
65
  import { MatDividerModule } from '@angular/material/divider';
64
66
  import * as i1$6 from '@angular/material/toolbar';
65
67
  import { MatToolbarModule } from '@angular/material/toolbar';
66
- import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
67
- import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
68
68
  import * as i1$8 from 'ngx-permissions';
69
69
  import { NgxPermissionsModule } from 'ngx-permissions';
70
70
  import * as i1$9 from '@angular/material/slide-toggle';
@@ -1220,6 +1220,194 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
1220
1220
  }]
1221
1221
  }], ctorParameters: () => [], propDecorators: { model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: true }] }], target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }], hide: [{ type: i0.Output, args: ["hide"] }], itemSelected: [{ type: i0.Output, args: ["itemSelected"] }] } });
1222
1222
 
1223
+ /**
1224
+ * Declarative dialog structure wrapper. Use it inside a dialog content template
1225
+ * to group the titlebar, body and actions sections.
1226
+ *
1227
+ * @example
1228
+ * ```html
1229
+ * <acp-dialog>
1230
+ * <acp-dialog-titlebar title="Edit user" icon="person" />
1231
+ * <acp-dialog-content>
1232
+ * <p>Dialog body</p>
1233
+ * </acp-dialog-content>
1234
+ * <acp-dialog-actions align="end">
1235
+ * <acp-button text="Cancel" appearance="text" (clicked)="ref.close()" />
1236
+ * <acp-button text="Save" color="success" (clicked)="ref.close(user)" />
1237
+ * </acp-dialog-actions>
1238
+ * </acp-dialog>
1239
+ * ```
1240
+ */
1241
+ class AcpDialog {
1242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
1243
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.0", type: AcpDialog, isStandalone: true, selector: "acp-dialog", host: { properties: { "style.display": "\"contents\"" }, classAttribute: "acp-dialog" }, ngImport: i0, template: `
1244
+ <ng-content select="acp-dialog-titlebar" />
1245
+ <ng-content select="acp-dialog-content" />
1246
+ <ng-content select="acp-dialog-actions" />
1247
+ <ng-content />
1248
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1249
+ }
1250
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialog, decorators: [{
1251
+ type: Component,
1252
+ args: [{
1253
+ selector: 'acp-dialog',
1254
+ standalone: true,
1255
+ template: `
1256
+ <ng-content select="acp-dialog-titlebar" />
1257
+ <ng-content select="acp-dialog-content" />
1258
+ <ng-content select="acp-dialog-actions" />
1259
+ <ng-content />
1260
+ `,
1261
+ host: {
1262
+ class: 'acp-dialog',
1263
+ '[style.display]': '"contents"',
1264
+ },
1265
+ changeDetection: ChangeDetectionStrategy.OnPush,
1266
+ encapsulation: ViewEncapsulation.None,
1267
+ }]
1268
+ }] });
1269
+
1270
+ /**
1271
+ * Declarative dialog content body. Use it inside `<acp-dialog>` or any dialog
1272
+ * content template to mark the scrollable body section.
1273
+ *
1274
+ * @example
1275
+ * ```html
1276
+ * <acp-dialog-content>
1277
+ * <p>Dialog body</p>
1278
+ * </acp-dialog-content>
1279
+ * ```
1280
+ */
1281
+ class AcpDialogContent {
1282
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1283
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.0", type: AcpDialogContent, isStandalone: true, selector: "acp-dialog-content", host: { classAttribute: "acp-dialog-content" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1284
+ }
1285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogContent, decorators: [{
1286
+ type: Component,
1287
+ args: [{
1288
+ selector: 'acp-dialog-content',
1289
+ standalone: true,
1290
+ template: `<ng-content />`,
1291
+ host: { class: 'acp-dialog-content' },
1292
+ changeDetection: ChangeDetectionStrategy.OnPush,
1293
+ encapsulation: ViewEncapsulation.None,
1294
+ }]
1295
+ }] });
1296
+
1297
+ /**
1298
+ * Reference to a dialog opened via `AcpDialogService`. Mirrors the public surface
1299
+ * of `MatDialogRef` so consumers can subscribe to `afterClosed()`, close manually,
1300
+ * inspect the component instance, etc.
1301
+ *
1302
+ * It is both the value returned by `AcpDialogService.open()` and an injectable
1303
+ * token: content components can `inject(AcpDialogRef)` to close themselves.
1304
+ */
1305
+ class AcpDialogRef {
1306
+ matDialogRef;
1307
+ /** Emits every time a configured dialog action is clicked, before it closes. */
1308
+ clickedResult;
1309
+ /** Observable mirror of {@link clickedResult}. */
1310
+ get actionClicked$() {
1311
+ return this.clickedResult.asObservable();
1312
+ }
1313
+ constructor(matDialogRef, clickedResult) {
1314
+ this.matDialogRef = matDialogRef;
1315
+ this.clickedResult = clickedResult ?? new Subject();
1316
+ }
1317
+ /** The instance of the component opened into the dialog. */
1318
+ get componentInstance() {
1319
+ return this.readRef(ref => ref.componentInstance);
1320
+ }
1321
+ /** `ComponentRef` of the component opened into the dialog. */
1322
+ get componentRef() {
1323
+ return this.readRef(ref => ref.componentRef) ?? null;
1324
+ }
1325
+ /** Whether the user is allowed to close the dialog. */
1326
+ get disableClose() {
1327
+ return this.readRef(ref => ref.disableClose);
1328
+ }
1329
+ /** Unique ID for the dialog. */
1330
+ get id() {
1331
+ return this.readRef(ref => ref.id) ?? '';
1332
+ }
1333
+ /** Gets an observable that is notified when the dialog is finished closing. */
1334
+ afterClosed() {
1335
+ return this.fromRef(ref => ref.afterClosed());
1336
+ }
1337
+ /** Gets an observable that is notified when the dialog is finished opening. */
1338
+ afterOpened() {
1339
+ return this.fromRef(ref => ref.afterOpened());
1340
+ }
1341
+ /** Gets an observable that is notified when the dialog has started closing. */
1342
+ beforeClosed() {
1343
+ return this.fromRef(ref => ref.beforeClosed());
1344
+ }
1345
+ /** Gets an observable that emits when the overlay's backdrop has been clicked. */
1346
+ backdropClick() {
1347
+ return this.fromRef(ref => ref.backdropClick());
1348
+ }
1349
+ /** Gets an observable that emits when keydown events are targeted on the overlay. */
1350
+ keydownEvents() {
1351
+ return this.fromRef(ref => ref.keydownEvents());
1352
+ }
1353
+ /** Gets the current lifecycle state of the dialog. */
1354
+ getState() {
1355
+ return this.readRef(ref => ref.getState());
1356
+ }
1357
+ /** Resolves with the result once the dialog finishes closing. */
1358
+ get closed() {
1359
+ return firstValueFrom(this.afterClosed());
1360
+ }
1361
+ /** Observable that emits the result once the dialog finishes closing. */
1362
+ get closed$() {
1363
+ return this.afterClosed();
1364
+ }
1365
+ /** Closes the dialog, optionally returning a result. */
1366
+ close(result) {
1367
+ this.withRef(ref => ref.close(result));
1368
+ }
1369
+ /** Updates the dialog's position. */
1370
+ updatePosition(position) {
1371
+ this.withRef(ref => ref.updatePosition(position));
1372
+ return this;
1373
+ }
1374
+ /** Updates the dialog's width and height. */
1375
+ updateSize(width = '', height = '') {
1376
+ this.withRef(ref => ref.updateSize(width, height));
1377
+ return this;
1378
+ }
1379
+ /** Add a CSS class or an array of classes to the overlay pane. */
1380
+ addPanelClass(classes) {
1381
+ this.withRef(ref => ref.addPanelClass(classes));
1382
+ return this;
1383
+ }
1384
+ /** Remove a CSS class or an array of classes from the overlay pane. */
1385
+ removePanelClass(classes) {
1386
+ this.withRef(ref => ref.removePanelClass(classes));
1387
+ return this;
1388
+ }
1389
+ fromRef(fn) {
1390
+ if (this.matDialogRef instanceof Promise) {
1391
+ return from(this.matDialogRef).pipe(take(1), switchMap(fn));
1392
+ }
1393
+ return fn(this.matDialogRef);
1394
+ }
1395
+ readRef(fn) {
1396
+ if (this.matDialogRef instanceof Promise) {
1397
+ return undefined;
1398
+ }
1399
+ return fn(this.matDialogRef);
1400
+ }
1401
+ withRef(fn) {
1402
+ if (this.matDialogRef instanceof Promise) {
1403
+ this.matDialogRef.then(ref => fn(ref));
1404
+ }
1405
+ else {
1406
+ fn(this.matDialogRef);
1407
+ }
1408
+ }
1409
+ }
1410
+
1223
1411
  class Button {
1224
1412
  variant = input('primary', /* @ts-ignore */
1225
1413
  ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
@@ -1433,12 +1621,16 @@ class BaseButton {
1433
1621
  ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
1434
1622
  text = input(/* @ts-ignore */
1435
1623
  ...(ngDevMode ? [undefined, { debugName: "text" }] : /* istanbul ignore next */ []));
1624
+ ariaLabel = input(/* @ts-ignore */
1625
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
1626
+ form = input(/* @ts-ignore */
1627
+ ...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
1436
1628
  hasText = computed(() => !!this.text() && this.text().trim().length > 0, /* @ts-ignore */
1437
1629
  ...(ngDevMode ? [{ debugName: "hasText" }] : /* istanbul ignore next */ []));
1438
1630
  clicked = output();
1439
1631
  focused = output();
1440
1632
  blurred = output();
1441
- colorClass = computed(() => `acp-${this.color()}`, /* @ts-ignore */
1633
+ colorClass = computed(() => (this.color() === 'danger' ? 'acp-error' : `acp-${this.color()}`), /* @ts-ignore */
1442
1634
  ...(ngDevMode ? [{ debugName: "colorClass" }] : /* istanbul ignore next */ []));
1443
1635
  sizeClass = computed(() => `acp-${this.size()}`, /* @ts-ignore */
1444
1636
  ...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
@@ -1451,7 +1643,7 @@ class BaseButton {
1451
1643
  pointerEvents = computed(() => (this.isDisabled() ? 'none' : 'auto'), /* @ts-ignore */
1452
1644
  ...(ngDevMode ? [{ debugName: "pointerEvents" }] : /* istanbul ignore next */ []));
1453
1645
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: BaseButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1454
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: BaseButton, isStandalone: true, inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, square: { classPropertyName: "square", publicName: "square", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, suffixIcon: { classPropertyName: "suffixIcon", publicName: "suffixIcon", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showProgress: { classPropertyName: "showProgress", publicName: "showProgress", isSignal: true, isRequired: false, transformFunction: null }, progressType: { classPropertyName: "progressType", publicName: "progressType", isSignal: true, isRequired: false, transformFunction: null }, progressText: { classPropertyName: "progressText", publicName: "progressText", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, extended: { classPropertyName: "extended", publicName: "extended", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", focused: "focused", blurred: "blurred" }, host: { properties: { "style.pointer-events": "pointerEvents()" } }, ngImport: i0 });
1646
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: BaseButton, isStandalone: true, inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, square: { classPropertyName: "square", publicName: "square", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, suffixIcon: { classPropertyName: "suffixIcon", publicName: "suffixIcon", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showProgress: { classPropertyName: "showProgress", publicName: "showProgress", isSignal: true, isRequired: false, transformFunction: null }, progressType: { classPropertyName: "progressType", publicName: "progressType", isSignal: true, isRequired: false, transformFunction: null }, progressText: { classPropertyName: "progressText", publicName: "progressText", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, extended: { classPropertyName: "extended", publicName: "extended", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked", focused: "focused", blurred: "blurred" }, host: { properties: { "style.pointer-events": "pointerEvents()" } }, ngImport: i0 });
1455
1647
  }
1456
1648
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: BaseButton, decorators: [{
1457
1649
  type: Directive,
@@ -1460,7 +1652,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
1460
1652
  '[style.pointer-events]': 'pointerEvents()',
1461
1653
  },
1462
1654
  }]
1463
- }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], square: [{ type: i0.Input, args: [{ isSignal: true, alias: "square", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], suffixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffixIcon", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "showProgress", required: false }] }], progressType: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressType", required: false }] }], progressText: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressText", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], extended: [{ type: i0.Input, args: [{ isSignal: true, alias: "extended", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }], focused: [{ type: i0.Output, args: ["focused"] }], blurred: [{ type: i0.Output, args: ["blurred"] }] } });
1655
+ }], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], square: [{ type: i0.Input, args: [{ isSignal: true, alias: "square", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], suffixIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "suffixIcon", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], showProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "showProgress", required: false }] }], progressType: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressType", required: false }] }], progressText: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressText", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], extended: [{ type: i0.Input, args: [{ isSignal: true, alias: "extended", required: false }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }], focused: [{ type: i0.Output, args: ["focused"] }], blurred: [{ type: i0.Output, args: ["blurred"] }] } });
1464
1656
 
1465
1657
  class ButtonLoaderDirective {
1466
1658
  acpLoading = input(false, { ...(ngDevMode ? { debugName: "acpLoading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
@@ -1523,7 +1715,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
1523
1715
 
1524
1716
  class AcpButton extends BaseButton {
1525
1717
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpButton, deps: null, target: i0.ɵɵFactoryTarget.Component });
1526
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AcpButton, isStandalone: true, selector: "acp-button", usesInheritance: true, ngImport: i0, template: "@if (variant() === 'icon') {\n<button\n matIconButton\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [ngClass]=\"[colorClass(), squareClass(), blockClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n <mat-icon>{{icon()}}</mat-icon>\n</button>\n} @else if (variant() === 'fab') {\n<button\n matFab\n [extended]=\"extended()\"\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [ngClass]=\"[colorClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n @if (icon()) { <mat-icon>{{icon()}}</mat-icon> } @if (extended()) { @if (hasText()) { {{text()}} }\n @else { <ng-content></ng-content> } }\n</button>\n} @else if (variant() === 'mini-fab') {\n<button\n matMiniFab\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [ngClass]=\"[colorClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n <mat-icon>{{icon()}}</mat-icon>\n</button>\n} @else {\n<button\n [matButton]=\"appearance()\"\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [showProgress]=\"showProgress()\"\n [type]=\"type()\"\n [ngClass]=\"[colorClass(), squareClass(), blockClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n @if (icon()) { <mat-icon>{{icon()}}</mat-icon> } @if (hasText()) { {{text()}} } @else {\n <ng-content></ng-content> } @if (showProgress() && progressType() === 'spinner') {\n <mat-progress-spinner\n progressIndicator\n mode=\"indeterminate\"\n [diameter]=\"20\"\n aria-label=\"Loading\"\n />\n } @if (showProgress() && progressType() === 'text') {\n <div progressIndicator role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n {{ progressText() }}\n </div>\n } @if (suffixIcon()) {\n <mat-icon iconPositionEnd>{{suffixIcon()}}</mat-icon> }\n</button>\n}\n", styles: [".acp-primary{--mat-button-filled-container-color: var(--acp-theme-primary-color);--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: var(--acp-theme-primary-color);--mat-button-protected-label-text-color: var(--acp-theme-primary-color);--mat-button-text-label-text-color: var(--acp-theme-primary-color);--mat-button-text-state-layer-color: var(--acp-theme-primary-color)}.acp-secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary)}.acp-accent{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary)}.acp-error{--mat-button-filled-container-color: var(--mat-sys-error);--mat-button-filled-label-text-color: var(--mat-sys-on-error);--mat-button-outlined-label-text-color: var(--mat-sys-error);--mat-button-protected-label-text-color: var(--mat-sys-error);--mat-button-text-label-text-color: var(--mat-sys-error);--mat-button-text-state-layer-color: var(--mat-sys-error)}.acp-success{--mat-button-filled-container-color: #4caf50;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #4caf50;--mat-button-protected-label-text-color: #4caf50;--mat-button-text-label-text-color: #4caf50;--mat-button-text-state-layer-color: #4caf50}.acp-warning{--mat-button-filled-container-color: #f59e0b;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #f59e0b;--mat-button-protected-label-text-color: #f59e0b;--mat-button-text-label-text-color: #f59e0b;--mat-button-text-state-layer-color: #f59e0b}.acp-info{--mat-button-filled-container-color: #3b82f6;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #3b82f6;--mat-button-protected-label-text-color: #3b82f6;--mat-button-text-label-text-color: #3b82f6;--mat-button-text-state-layer-color: #3b82f6}.acp-dark{--mat-button-filled-container-color: #1f2937;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-protected-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-text-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-text-state-layer-color: light-dark(#1f2937, #ffffff)}[matIconButton].acp-primary{--mat-icon-color: var(--acp-theme-primary-color)}[matIconButton].acp-secondary{--mat-icon-color: var(--mat-sys-secondary)}[matIconButton].acp-accent{--mat-icon-color: var(--mat-sys-tertiary)}[matIconButton].acp-error{--mat-icon-color: var(--mat-sys-error)}[matIconButton].acp-success{--mat-icon-color: #10b981}[matIconButton].acp-warning{--mat-icon-color: #f59e0b}[matIconButton].acp-info{--mat-icon-color: #3b82f6}[matFab].acp-primary{--mat-fab-container-color: var(--acp-theme-primary-color);--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-secondary{--mat-fab-container-color: var(--mat-sys-secondary);--mat-fab-foreground-color: var(--mat-sys-on-secondary);--mat-fab-state-layer-color: var(--mat-sys-on-secondary)}[matFab].acp-accent{--mat-fab-container-color: var(--mat-sys-tertiary);--mat-fab-foreground-color: var(--mat-sys-on-tertiary);--mat-fab-state-layer-color: var(--mat-sys-on-tertiary)}[matFab].acp-error{--mat-fab-container-color: var(--mat-sys-error);--mat-fab-foreground-color: var(--mat-sys-on-error);--mat-fab-state-layer-color: var(--mat-sys-on-error)}[matFab].acp-success{--mat-fab-container-color: #4caf50;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-warning{--mat-fab-container-color: #f59e0b;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-info{--mat-fab-container-color: #3b82f6;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-dark{--mat-fab-container-color: #1f2937;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matMiniFab].acp-primary{--mat-fab-small-container-color: var(--acp-theme-primary-color);--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-secondary{--mat-fab-small-container-color: var(--mat-sys-secondary);--mat-fab-small-foreground-color: var(--mat-sys-on-secondary);--mat-fab-small-state-layer-color: var(--mat-sys-on-secondary)}[matMiniFab].acp-accent{--mat-fab-small-container-color: var(--mat-sys-tertiary);--mat-fab-small-foreground-color: var(--mat-sys-on-tertiary);--mat-fab-small-state-layer-color: var(--mat-sys-on-tertiary)}[matMiniFab].acp-error{--mat-fab-small-container-color: var(--mat-sys-error);--mat-fab-small-foreground-color: var(--mat-sys-on-error);--mat-fab-small-state-layer-color: var(--mat-sys-on-error)}[matMiniFab].acp-success{--mat-fab-small-container-color: #4caf50;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-warning{--mat-fab-small-container-color: #f59e0b;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-info{--mat-fab-small-container-color: #3b82f6;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-dark{--mat-fab-small-container-color: #1f2937;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}.acp-square{--mat-button-filled-container-shape: 8px;--mat-button-outlined-container-shape: 8px;--mat-button-protected-container-shape: 8px;--mat-button-text-container-shape: 8px;--mat-button-tonal-container-shape: 8px;--mat-icon-button-container-shape: 8px}.acp-block{width:100%}.acp-medium{--mat-checkbox-touch-target-display: block;--mat-checkbox-state-layer-size: 36px;--mat-chip-container-height: 28px;--mat-expansion-header-collapsed-state-height: 44px;--mat-expansion-header-expanded-state-height: 60px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display: block;--mat-button-filled-touch-target-display: block;--mat-button-filled-container-height: 36px;--mat-button-outlined-container-height: 36px;--mat-button-outlined-touch-target-display: block;--mat-button-protected-touch-target-display: block;--mat-button-protected-container-height: 36px;--mat-button-text-touch-target-display: block;--mat-button-text-container-height: 36px;--mat-button-tonal-container-height: 36px;--mat-button-tonal-touch-target-display: block;--mat-form-field-container-height: 52px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 14px;--mat-form-field-filled-with-label-container-padding-top: 22px;--mat-form-field-filled-with-label-container-padding-bottom: 6px;--mat-icon-button-touch-target-display: block;--mat-icon-button-state-layer-size: 36px;--mat-list-list-item-leading-icon-start-space: 12px;--mat-list-list-item-leading-icon-end-space: 12px;--mat-list-list-item-one-line-container-height: 44px;--mat-list-list-item-two-line-container-height: 60px;--mat-list-list-item-three-line-container-height: 84px;--mat-paginator-container-size: 52px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mat-paginator-touch-target-display: block;--mat-radio-touch-target-display: block;--mat-radio-state-layer-size: 36px;--mat-tab-container-height: 44px;--mat-select-arrow-transform: translateY(-8px);--mat-button-toggle-height: 40px;--mat-stepper-header-height: 68px;--mat-table-header-container-height: 52px;--mat-table-footer-container-height: 48px;--mat-table-row-item-container-height: 48px;--mat-toolbar-standard-height: 60px;--mat-toolbar-mobile-height: 52px;--mat-tree-node-min-height: 44px;--mat-sys-corner-extra-large: 28px;--mat-sys-corner-extra-large-top: 28px 28px 0 0;--mat-sys-corner-extra-small: 4px;--mat-sys-corner-extra-small-top: 4px 4px 0 0;--mat-sys-corner-full: 9999px;--mat-sys-corner-large: 16px;--mat-sys-corner-large-end: 0 16px 16px 0;--mat-sys-corner-large-start: 16px 0 0 16px;--mat-sys-corner-large-top: 16px 16px 0 0;--mat-sys-corner-medium: 12px;--mat-sys-corner-none: 0;--mat-sys-corner-small: 8px;--mat-sys-dragged-state-layer-opacity: .16;--mat-sys-focus-state-layer-opacity: .12;--mat-sys-hover-state-layer-opacity: .08;--mat-sys-pressed-state-layer-opacity: .12;--mat-button-filled-horizontal-padding: 20px;--mat-button-outlined-horizontal-padding: 20px;--mat-button-protected-horizontal-padding: 20px;--mat-button-text-horizontal-padding: 20px;--mat-button-tonal-horizontal-padding: 20px;--mat-button-toggle-height: 36px}.acp-small{--mat-checkbox-touch-target-display: none;--mat-checkbox-state-layer-size: 32px;--mat-chip-container-height: 24px;--mat-expansion-header-collapsed-state-height: 40px;--mat-expansion-header-expanded-state-height: 56px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display: none;--mat-button-filled-touch-target-display: none;--mat-button-filled-container-height: 32px;--mat-button-outlined-container-height: 32px;--mat-button-outlined-touch-target-display: none;--mat-button-protected-touch-target-display: none;--mat-button-protected-container-height: 32px;--mat-button-text-touch-target-display: none;--mat-button-text-container-height: 32px;--mat-button-tonal-container-height: 32px;--mat-button-tonal-touch-target-display: none;--mat-form-field-container-height: 48px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 12px;--mat-form-field-filled-with-label-container-padding-top: 12px;--mat-form-field-filled-with-label-container-padding-bottom: 12px;--mat-icon-button-touch-target-display: none;--mat-icon-button-state-layer-size: 32px;--mat-list-list-item-leading-icon-start-space: 8px;--mat-list-list-item-leading-icon-end-space: 8px;--mat-list-list-item-one-line-container-height: 40px;--mat-list-list-item-two-line-container-height: 56px;--mat-list-list-item-three-line-container-height: 80px;--mat-paginator-container-size: 48px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mat-paginator-touch-target-display: none;--mat-radio-touch-target-display: none;--mat-radio-state-layer-size: 32px;--mat-tab-container-height: 40px;--mat-select-arrow-transform: none;--mat-button-toggle-height: 40px;--mat-stepper-header-height: 64px;--mat-table-header-container-height: 48px;--mat-table-footer-container-height: 44px;--mat-table-row-item-container-height: 44px;--mat-toolbar-standard-height: 56px;--mat-toolbar-mobile-height: 48px;--mat-tree-node-min-height: 40px;--mat-sys-corner-extra-large: 28px;--mat-sys-corner-extra-large-top: 28px 28px 0 0;--mat-sys-corner-extra-small: 4px;--mat-sys-corner-extra-small-top: 4px 4px 0 0;--mat-sys-corner-full: 9999px;--mat-sys-corner-large: 16px;--mat-sys-corner-large-end: 0 16px 16px 0;--mat-sys-corner-large-start: 16px 0 0 16px;--mat-sys-corner-large-top: 16px 16px 0 0;--mat-sys-corner-medium: 12px;--mat-sys-corner-none: 0;--mat-sys-corner-small: 8px;--mat-sys-dragged-state-layer-opacity: .16;--mat-sys-focus-state-layer-opacity: .12;--mat-sys-hover-state-layer-opacity: .08;--mat-sys-pressed-state-layer-opacity: .12;--mat-button-filled-horizontal-padding: 16px;--mat-button-outlined-horizontal-padding: 16px;--mat-button-protected-horizontal-padding: 16px;--mat-button-text-horizontal-padding: 16px;--mat-button-tonal-horizontal-padding: 16px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: ButtonLoaderDirective, selector: "button[acpLoading]", inputs: ["acpLoading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1718
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AcpButton, isStandalone: true, selector: "acp-button", usesInheritance: true, ngImport: i0, template: "@if (variant() === 'icon') {\n<button\n matIconButton\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [attr.form]=\"form()\"\n [attr.aria-label]=\"ariaLabel()\"\n [ngClass]=\"[colorClass(), squareClass(), blockClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n <mat-icon>{{icon()}}</mat-icon>\n</button>\n} @else if (variant() === 'fab') {\n<button\n matFab\n [extended]=\"extended()\"\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [attr.form]=\"form()\"\n [attr.aria-label]=\"ariaLabel()\"\n [ngClass]=\"[colorClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n @if (icon()) { <mat-icon>{{icon()}}</mat-icon> } @if (extended()) { @if (hasText()) { {{text()}} }\n @else { <ng-content></ng-content> } }\n</button>\n} @else if (variant() === 'mini-fab') {\n<button\n matMiniFab\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [attr.form]=\"form()\"\n [attr.aria-label]=\"ariaLabel()\"\n [ngClass]=\"[colorClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n <mat-icon>{{icon()}}</mat-icon>\n</button>\n} @else {\n<button\n [matButton]=\"appearance()\"\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [showProgress]=\"showProgress()\"\n [type]=\"type()\"\n [attr.form]=\"form()\"\n [attr.aria-label]=\"ariaLabel()\"\n [ngClass]=\"[colorClass(), squareClass(), blockClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n @if (icon()) { <mat-icon>{{icon()}}</mat-icon> } @if (hasText()) { {{text()}} } @else {\n <ng-content></ng-content> } @if (showProgress() && progressType() === 'spinner') {\n <mat-progress-spinner\n progressIndicator\n mode=\"indeterminate\"\n [diameter]=\"20\"\n aria-label=\"Loading\"\n />\n } @if (showProgress() && progressType() === 'text') {\n <div progressIndicator role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n {{ progressText() }}\n </div>\n } @if (suffixIcon()) {\n <mat-icon iconPositionEnd>{{suffixIcon()}}</mat-icon> }\n</button>\n}\n", styles: [".acp-primary{--mat-button-filled-container-color: var(--acp-theme-primary-color);--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: var(--acp-theme-primary-color);--mat-button-protected-label-text-color: var(--acp-theme-primary-color);--mat-button-text-label-text-color: var(--acp-theme-primary-color);--mat-button-text-state-layer-color: var(--acp-theme-primary-color)}.acp-secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary)}.acp-accent{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary)}.acp-error{--mat-button-filled-container-color: var(--mat-sys-error);--mat-button-filled-label-text-color: var(--mat-sys-on-error);--mat-button-outlined-label-text-color: var(--mat-sys-error);--mat-button-protected-label-text-color: var(--mat-sys-error);--mat-button-text-label-text-color: var(--mat-sys-error);--mat-button-text-state-layer-color: var(--mat-sys-error)}.acp-success{--mat-button-filled-container-color: #4caf50;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #4caf50;--mat-button-protected-label-text-color: #4caf50;--mat-button-text-label-text-color: #4caf50;--mat-button-text-state-layer-color: #4caf50}.acp-warning{--mat-button-filled-container-color: #f59e0b;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #f59e0b;--mat-button-protected-label-text-color: #f59e0b;--mat-button-text-label-text-color: #f59e0b;--mat-button-text-state-layer-color: #f59e0b}.acp-info{--mat-button-filled-container-color: #3b82f6;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #3b82f6;--mat-button-protected-label-text-color: #3b82f6;--mat-button-text-label-text-color: #3b82f6;--mat-button-text-state-layer-color: #3b82f6}.acp-dark{--mat-button-filled-container-color: #1f2937;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-protected-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-text-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-text-state-layer-color: light-dark(#1f2937, #ffffff)}[matIconButton].acp-primary{--mat-icon-color: var(--acp-theme-primary-color)}[matIconButton].acp-secondary{--mat-icon-color: var(--mat-sys-secondary)}[matIconButton].acp-accent{--mat-icon-color: var(--mat-sys-tertiary)}[matIconButton].acp-error{--mat-icon-color: var(--mat-sys-error)}[matIconButton].acp-success{--mat-icon-color: #10b981}[matIconButton].acp-warning{--mat-icon-color: #f59e0b}[matIconButton].acp-info{--mat-icon-color: #3b82f6}[matIconButton].acp-light{--mat-icon-color: #ffffff}[matFab].acp-primary{--mat-fab-container-color: var(--acp-theme-primary-color);--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-secondary{--mat-fab-container-color: var(--mat-sys-secondary);--mat-fab-foreground-color: var(--mat-sys-on-secondary);--mat-fab-state-layer-color: var(--mat-sys-on-secondary)}[matFab].acp-accent{--mat-fab-container-color: var(--mat-sys-tertiary);--mat-fab-foreground-color: var(--mat-sys-on-tertiary);--mat-fab-state-layer-color: var(--mat-sys-on-tertiary)}[matFab].acp-error{--mat-fab-container-color: var(--mat-sys-error);--mat-fab-foreground-color: var(--mat-sys-on-error);--mat-fab-state-layer-color: var(--mat-sys-on-error)}[matFab].acp-success{--mat-fab-container-color: #4caf50;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-warning{--mat-fab-container-color: #f59e0b;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-info{--mat-fab-container-color: #3b82f6;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-dark{--mat-fab-container-color: #1f2937;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matMiniFab].acp-primary{--mat-fab-small-container-color: var(--acp-theme-primary-color);--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-secondary{--mat-fab-small-container-color: var(--mat-sys-secondary);--mat-fab-small-foreground-color: var(--mat-sys-on-secondary);--mat-fab-small-state-layer-color: var(--mat-sys-on-secondary)}[matMiniFab].acp-accent{--mat-fab-small-container-color: var(--mat-sys-tertiary);--mat-fab-small-foreground-color: var(--mat-sys-on-tertiary);--mat-fab-small-state-layer-color: var(--mat-sys-on-tertiary)}[matMiniFab].acp-error{--mat-fab-small-container-color: var(--mat-sys-error);--mat-fab-small-foreground-color: var(--mat-sys-on-error);--mat-fab-small-state-layer-color: var(--mat-sys-on-error)}[matMiniFab].acp-success{--mat-fab-small-container-color: #4caf50;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-warning{--mat-fab-small-container-color: #f59e0b;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-info{--mat-fab-small-container-color: #3b82f6;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-dark{--mat-fab-small-container-color: #1f2937;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}.acp-square{--mat-button-filled-container-shape: 8px;--mat-button-outlined-container-shape: 8px;--mat-button-protected-container-shape: 8px;--mat-button-text-container-shape: 8px;--mat-button-tonal-container-shape: 8px;--mat-icon-button-container-shape: 8px}.acp-block{width:100%}.acp-medium{--mat-checkbox-touch-target-display: block;--mat-checkbox-state-layer-size: 36px;--mat-chip-container-height: 28px;--mat-expansion-header-collapsed-state-height: 44px;--mat-expansion-header-expanded-state-height: 60px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display: block;--mat-button-filled-touch-target-display: block;--mat-button-filled-container-height: 36px;--mat-button-outlined-container-height: 36px;--mat-button-outlined-touch-target-display: block;--mat-button-protected-touch-target-display: block;--mat-button-protected-container-height: 36px;--mat-button-text-touch-target-display: block;--mat-button-text-container-height: 36px;--mat-button-tonal-container-height: 36px;--mat-button-tonal-touch-target-display: block;--mat-form-field-container-height: 52px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 14px;--mat-form-field-filled-with-label-container-padding-top: 22px;--mat-form-field-filled-with-label-container-padding-bottom: 6px;--mat-icon-button-touch-target-display: block;--mat-icon-button-state-layer-size: 36px;--mat-list-list-item-leading-icon-start-space: 12px;--mat-list-list-item-leading-icon-end-space: 12px;--mat-list-list-item-one-line-container-height: 44px;--mat-list-list-item-two-line-container-height: 60px;--mat-list-list-item-three-line-container-height: 84px;--mat-paginator-container-size: 52px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mat-paginator-touch-target-display: block;--mat-radio-touch-target-display: block;--mat-radio-state-layer-size: 36px;--mat-tab-container-height: 44px;--mat-select-arrow-transform: translateY(-8px);--mat-button-toggle-height: 40px;--mat-stepper-header-height: 68px;--mat-table-header-container-height: 52px;--mat-table-footer-container-height: 48px;--mat-table-row-item-container-height: 48px;--mat-toolbar-standard-height: 60px;--mat-toolbar-mobile-height: 52px;--mat-tree-node-min-height: 44px;--mat-sys-corner-extra-large: 28px;--mat-sys-corner-extra-large-top: 28px 28px 0 0;--mat-sys-corner-extra-small: 4px;--mat-sys-corner-extra-small-top: 4px 4px 0 0;--mat-sys-corner-full: 9999px;--mat-sys-corner-large: 16px;--mat-sys-corner-large-end: 0 16px 16px 0;--mat-sys-corner-large-start: 16px 0 0 16px;--mat-sys-corner-large-top: 16px 16px 0 0;--mat-sys-corner-medium: 12px;--mat-sys-corner-none: 0;--mat-sys-corner-small: 8px;--mat-sys-dragged-state-layer-opacity: .16;--mat-sys-focus-state-layer-opacity: .12;--mat-sys-hover-state-layer-opacity: .08;--mat-sys-pressed-state-layer-opacity: .12;--mat-button-filled-horizontal-padding: 20px;--mat-button-outlined-horizontal-padding: 20px;--mat-button-protected-horizontal-padding: 20px;--mat-button-text-horizontal-padding: 20px;--mat-button-tonal-horizontal-padding: 20px;--mat-button-toggle-height: 36px}.acp-small{--mat-checkbox-touch-target-display: none;--mat-checkbox-state-layer-size: 32px;--mat-chip-container-height: 24px;--mat-expansion-header-collapsed-state-height: 40px;--mat-expansion-header-expanded-state-height: 56px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display: none;--mat-button-filled-touch-target-display: none;--mat-button-filled-container-height: 32px;--mat-button-outlined-container-height: 32px;--mat-button-outlined-touch-target-display: none;--mat-button-protected-touch-target-display: none;--mat-button-protected-container-height: 32px;--mat-button-text-touch-target-display: none;--mat-button-text-container-height: 32px;--mat-button-tonal-container-height: 32px;--mat-button-tonal-touch-target-display: none;--mat-form-field-container-height: 48px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 12px;--mat-form-field-filled-with-label-container-padding-top: 12px;--mat-form-field-filled-with-label-container-padding-bottom: 12px;--mat-icon-button-touch-target-display: none;--mat-icon-button-state-layer-size: 32px;--mat-list-list-item-leading-icon-start-space: 8px;--mat-list-list-item-leading-icon-end-space: 8px;--mat-list-list-item-one-line-container-height: 40px;--mat-list-list-item-two-line-container-height: 56px;--mat-list-list-item-three-line-container-height: 80px;--mat-paginator-container-size: 48px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mat-paginator-touch-target-display: none;--mat-radio-touch-target-display: none;--mat-radio-state-layer-size: 32px;--mat-tab-container-height: 40px;--mat-select-arrow-transform: none;--mat-button-toggle-height: 40px;--mat-stepper-header-height: 64px;--mat-table-header-container-height: 48px;--mat-table-footer-container-height: 44px;--mat-table-row-item-container-height: 44px;--mat-toolbar-standard-height: 56px;--mat-toolbar-mobile-height: 48px;--mat-tree-node-min-height: 40px;--mat-sys-corner-extra-large: 28px;--mat-sys-corner-extra-large-top: 28px 28px 0 0;--mat-sys-corner-extra-small: 4px;--mat-sys-corner-extra-small-top: 4px 4px 0 0;--mat-sys-corner-full: 9999px;--mat-sys-corner-large: 16px;--mat-sys-corner-large-end: 0 16px 16px 0;--mat-sys-corner-large-start: 16px 0 0 16px;--mat-sys-corner-large-top: 16px 16px 0 0;--mat-sys-corner-medium: 12px;--mat-sys-corner-none: 0;--mat-sys-corner-small: 8px;--mat-sys-dragged-state-layer-opacity: .16;--mat-sys-focus-state-layer-opacity: .12;--mat-sys-hover-state-layer-opacity: .08;--mat-sys-pressed-state-layer-opacity: .12;--mat-button-filled-horizontal-padding: 16px;--mat-button-outlined-horizontal-padding: 16px;--mat-button-protected-horizontal-padding: 16px;--mat-button-text-horizontal-padding: 16px;--mat-button-tonal-horizontal-padding: 16px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$1.MatFabButton, selector: "button[mat-fab], a[mat-fab], button[matFab], a[matFab]", inputs: ["extended"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: ButtonLoaderDirective, selector: "button[acpLoading]", inputs: ["acpLoading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1527
1719
  }
1528
1720
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpButton, decorators: [{
1529
1721
  type: Component,
@@ -1533,25 +1725,840 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
1533
1725
  MatIconModule,
1534
1726
  MatProgressSpinnerModule,
1535
1727
  ButtonLoaderDirective,
1536
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (variant() === 'icon') {\n<button\n matIconButton\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [ngClass]=\"[colorClass(), squareClass(), blockClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n <mat-icon>{{icon()}}</mat-icon>\n</button>\n} @else if (variant() === 'fab') {\n<button\n matFab\n [extended]=\"extended()\"\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [ngClass]=\"[colorClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n @if (icon()) { <mat-icon>{{icon()}}</mat-icon> } @if (extended()) { @if (hasText()) { {{text()}} }\n @else { <ng-content></ng-content> } }\n</button>\n} @else if (variant() === 'mini-fab') {\n<button\n matMiniFab\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [ngClass]=\"[colorClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n <mat-icon>{{icon()}}</mat-icon>\n</button>\n} @else {\n<button\n [matButton]=\"appearance()\"\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [showProgress]=\"showProgress()\"\n [type]=\"type()\"\n [ngClass]=\"[colorClass(), squareClass(), blockClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n @if (icon()) { <mat-icon>{{icon()}}</mat-icon> } @if (hasText()) { {{text()}} } @else {\n <ng-content></ng-content> } @if (showProgress() && progressType() === 'spinner') {\n <mat-progress-spinner\n progressIndicator\n mode=\"indeterminate\"\n [diameter]=\"20\"\n aria-label=\"Loading\"\n />\n } @if (showProgress() && progressType() === 'text') {\n <div progressIndicator role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n {{ progressText() }}\n </div>\n } @if (suffixIcon()) {\n <mat-icon iconPositionEnd>{{suffixIcon()}}</mat-icon> }\n</button>\n}\n", styles: [".acp-primary{--mat-button-filled-container-color: var(--acp-theme-primary-color);--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: var(--acp-theme-primary-color);--mat-button-protected-label-text-color: var(--acp-theme-primary-color);--mat-button-text-label-text-color: var(--acp-theme-primary-color);--mat-button-text-state-layer-color: var(--acp-theme-primary-color)}.acp-secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary)}.acp-accent{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary)}.acp-error{--mat-button-filled-container-color: var(--mat-sys-error);--mat-button-filled-label-text-color: var(--mat-sys-on-error);--mat-button-outlined-label-text-color: var(--mat-sys-error);--mat-button-protected-label-text-color: var(--mat-sys-error);--mat-button-text-label-text-color: var(--mat-sys-error);--mat-button-text-state-layer-color: var(--mat-sys-error)}.acp-success{--mat-button-filled-container-color: #4caf50;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #4caf50;--mat-button-protected-label-text-color: #4caf50;--mat-button-text-label-text-color: #4caf50;--mat-button-text-state-layer-color: #4caf50}.acp-warning{--mat-button-filled-container-color: #f59e0b;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #f59e0b;--mat-button-protected-label-text-color: #f59e0b;--mat-button-text-label-text-color: #f59e0b;--mat-button-text-state-layer-color: #f59e0b}.acp-info{--mat-button-filled-container-color: #3b82f6;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #3b82f6;--mat-button-protected-label-text-color: #3b82f6;--mat-button-text-label-text-color: #3b82f6;--mat-button-text-state-layer-color: #3b82f6}.acp-dark{--mat-button-filled-container-color: #1f2937;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-protected-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-text-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-text-state-layer-color: light-dark(#1f2937, #ffffff)}[matIconButton].acp-primary{--mat-icon-color: var(--acp-theme-primary-color)}[matIconButton].acp-secondary{--mat-icon-color: var(--mat-sys-secondary)}[matIconButton].acp-accent{--mat-icon-color: var(--mat-sys-tertiary)}[matIconButton].acp-error{--mat-icon-color: var(--mat-sys-error)}[matIconButton].acp-success{--mat-icon-color: #10b981}[matIconButton].acp-warning{--mat-icon-color: #f59e0b}[matIconButton].acp-info{--mat-icon-color: #3b82f6}[matFab].acp-primary{--mat-fab-container-color: var(--acp-theme-primary-color);--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-secondary{--mat-fab-container-color: var(--mat-sys-secondary);--mat-fab-foreground-color: var(--mat-sys-on-secondary);--mat-fab-state-layer-color: var(--mat-sys-on-secondary)}[matFab].acp-accent{--mat-fab-container-color: var(--mat-sys-tertiary);--mat-fab-foreground-color: var(--mat-sys-on-tertiary);--mat-fab-state-layer-color: var(--mat-sys-on-tertiary)}[matFab].acp-error{--mat-fab-container-color: var(--mat-sys-error);--mat-fab-foreground-color: var(--mat-sys-on-error);--mat-fab-state-layer-color: var(--mat-sys-on-error)}[matFab].acp-success{--mat-fab-container-color: #4caf50;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-warning{--mat-fab-container-color: #f59e0b;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-info{--mat-fab-container-color: #3b82f6;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-dark{--mat-fab-container-color: #1f2937;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matMiniFab].acp-primary{--mat-fab-small-container-color: var(--acp-theme-primary-color);--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-secondary{--mat-fab-small-container-color: var(--mat-sys-secondary);--mat-fab-small-foreground-color: var(--mat-sys-on-secondary);--mat-fab-small-state-layer-color: var(--mat-sys-on-secondary)}[matMiniFab].acp-accent{--mat-fab-small-container-color: var(--mat-sys-tertiary);--mat-fab-small-foreground-color: var(--mat-sys-on-tertiary);--mat-fab-small-state-layer-color: var(--mat-sys-on-tertiary)}[matMiniFab].acp-error{--mat-fab-small-container-color: var(--mat-sys-error);--mat-fab-small-foreground-color: var(--mat-sys-on-error);--mat-fab-small-state-layer-color: var(--mat-sys-on-error)}[matMiniFab].acp-success{--mat-fab-small-container-color: #4caf50;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-warning{--mat-fab-small-container-color: #f59e0b;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-info{--mat-fab-small-container-color: #3b82f6;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-dark{--mat-fab-small-container-color: #1f2937;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}.acp-square{--mat-button-filled-container-shape: 8px;--mat-button-outlined-container-shape: 8px;--mat-button-protected-container-shape: 8px;--mat-button-text-container-shape: 8px;--mat-button-tonal-container-shape: 8px;--mat-icon-button-container-shape: 8px}.acp-block{width:100%}.acp-medium{--mat-checkbox-touch-target-display: block;--mat-checkbox-state-layer-size: 36px;--mat-chip-container-height: 28px;--mat-expansion-header-collapsed-state-height: 44px;--mat-expansion-header-expanded-state-height: 60px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display: block;--mat-button-filled-touch-target-display: block;--mat-button-filled-container-height: 36px;--mat-button-outlined-container-height: 36px;--mat-button-outlined-touch-target-display: block;--mat-button-protected-touch-target-display: block;--mat-button-protected-container-height: 36px;--mat-button-text-touch-target-display: block;--mat-button-text-container-height: 36px;--mat-button-tonal-container-height: 36px;--mat-button-tonal-touch-target-display: block;--mat-form-field-container-height: 52px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 14px;--mat-form-field-filled-with-label-container-padding-top: 22px;--mat-form-field-filled-with-label-container-padding-bottom: 6px;--mat-icon-button-touch-target-display: block;--mat-icon-button-state-layer-size: 36px;--mat-list-list-item-leading-icon-start-space: 12px;--mat-list-list-item-leading-icon-end-space: 12px;--mat-list-list-item-one-line-container-height: 44px;--mat-list-list-item-two-line-container-height: 60px;--mat-list-list-item-three-line-container-height: 84px;--mat-paginator-container-size: 52px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mat-paginator-touch-target-display: block;--mat-radio-touch-target-display: block;--mat-radio-state-layer-size: 36px;--mat-tab-container-height: 44px;--mat-select-arrow-transform: translateY(-8px);--mat-button-toggle-height: 40px;--mat-stepper-header-height: 68px;--mat-table-header-container-height: 52px;--mat-table-footer-container-height: 48px;--mat-table-row-item-container-height: 48px;--mat-toolbar-standard-height: 60px;--mat-toolbar-mobile-height: 52px;--mat-tree-node-min-height: 44px;--mat-sys-corner-extra-large: 28px;--mat-sys-corner-extra-large-top: 28px 28px 0 0;--mat-sys-corner-extra-small: 4px;--mat-sys-corner-extra-small-top: 4px 4px 0 0;--mat-sys-corner-full: 9999px;--mat-sys-corner-large: 16px;--mat-sys-corner-large-end: 0 16px 16px 0;--mat-sys-corner-large-start: 16px 0 0 16px;--mat-sys-corner-large-top: 16px 16px 0 0;--mat-sys-corner-medium: 12px;--mat-sys-corner-none: 0;--mat-sys-corner-small: 8px;--mat-sys-dragged-state-layer-opacity: .16;--mat-sys-focus-state-layer-opacity: .12;--mat-sys-hover-state-layer-opacity: .08;--mat-sys-pressed-state-layer-opacity: .12;--mat-button-filled-horizontal-padding: 20px;--mat-button-outlined-horizontal-padding: 20px;--mat-button-protected-horizontal-padding: 20px;--mat-button-text-horizontal-padding: 20px;--mat-button-tonal-horizontal-padding: 20px;--mat-button-toggle-height: 36px}.acp-small{--mat-checkbox-touch-target-display: none;--mat-checkbox-state-layer-size: 32px;--mat-chip-container-height: 24px;--mat-expansion-header-collapsed-state-height: 40px;--mat-expansion-header-expanded-state-height: 56px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display: none;--mat-button-filled-touch-target-display: none;--mat-button-filled-container-height: 32px;--mat-button-outlined-container-height: 32px;--mat-button-outlined-touch-target-display: none;--mat-button-protected-touch-target-display: none;--mat-button-protected-container-height: 32px;--mat-button-text-touch-target-display: none;--mat-button-text-container-height: 32px;--mat-button-tonal-container-height: 32px;--mat-button-tonal-touch-target-display: none;--mat-form-field-container-height: 48px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 12px;--mat-form-field-filled-with-label-container-padding-top: 12px;--mat-form-field-filled-with-label-container-padding-bottom: 12px;--mat-icon-button-touch-target-display: none;--mat-icon-button-state-layer-size: 32px;--mat-list-list-item-leading-icon-start-space: 8px;--mat-list-list-item-leading-icon-end-space: 8px;--mat-list-list-item-one-line-container-height: 40px;--mat-list-list-item-two-line-container-height: 56px;--mat-list-list-item-three-line-container-height: 80px;--mat-paginator-container-size: 48px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mat-paginator-touch-target-display: none;--mat-radio-touch-target-display: none;--mat-radio-state-layer-size: 32px;--mat-tab-container-height: 40px;--mat-select-arrow-transform: none;--mat-button-toggle-height: 40px;--mat-stepper-header-height: 64px;--mat-table-header-container-height: 48px;--mat-table-footer-container-height: 44px;--mat-table-row-item-container-height: 44px;--mat-toolbar-standard-height: 56px;--mat-toolbar-mobile-height: 48px;--mat-tree-node-min-height: 40px;--mat-sys-corner-extra-large: 28px;--mat-sys-corner-extra-large-top: 28px 28px 0 0;--mat-sys-corner-extra-small: 4px;--mat-sys-corner-extra-small-top: 4px 4px 0 0;--mat-sys-corner-full: 9999px;--mat-sys-corner-large: 16px;--mat-sys-corner-large-end: 0 16px 16px 0;--mat-sys-corner-large-start: 16px 0 0 16px;--mat-sys-corner-large-top: 16px 16px 0 0;--mat-sys-corner-medium: 12px;--mat-sys-corner-none: 0;--mat-sys-corner-small: 8px;--mat-sys-dragged-state-layer-opacity: .16;--mat-sys-focus-state-layer-opacity: .12;--mat-sys-hover-state-layer-opacity: .08;--mat-sys-pressed-state-layer-opacity: .12;--mat-button-filled-horizontal-padding: 16px;--mat-button-outlined-horizontal-padding: 16px;--mat-button-protected-horizontal-padding: 16px;--mat-button-text-horizontal-padding: 16px;--mat-button-tonal-horizontal-padding: 16px}\n"] }]
1728
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (variant() === 'icon') {\n<button\n matIconButton\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [attr.form]=\"form()\"\n [attr.aria-label]=\"ariaLabel()\"\n [ngClass]=\"[colorClass(), squareClass(), blockClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n <mat-icon>{{icon()}}</mat-icon>\n</button>\n} @else if (variant() === 'fab') {\n<button\n matFab\n [extended]=\"extended()\"\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [attr.form]=\"form()\"\n [attr.aria-label]=\"ariaLabel()\"\n [ngClass]=\"[colorClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n @if (icon()) { <mat-icon>{{icon()}}</mat-icon> } @if (extended()) { @if (hasText()) { {{text()}} }\n @else { <ng-content></ng-content> } }\n</button>\n} @else if (variant() === 'mini-fab') {\n<button\n matMiniFab\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [type]=\"type()\"\n [attr.form]=\"form()\"\n [attr.aria-label]=\"ariaLabel()\"\n [ngClass]=\"[colorClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n <mat-icon>{{icon()}}</mat-icon>\n</button>\n} @else {\n<button\n [matButton]=\"appearance()\"\n [disabled]=\"isDisabled()\"\n [disableRipple]=\"disableRipple()\"\n [acpLoading]=\"loading()\"\n [showProgress]=\"showProgress()\"\n [type]=\"type()\"\n [attr.form]=\"form()\"\n [attr.aria-label]=\"ariaLabel()\"\n [ngClass]=\"[colorClass(), squareClass(), blockClass(), sizeClass()]\"\n (click)=\"clicked.emit()\"\n (focus)=\"focused.emit()\"\n (blur)=\"blurred.emit()\"\n>\n @if (icon()) { <mat-icon>{{icon()}}</mat-icon> } @if (hasText()) { {{text()}} } @else {\n <ng-content></ng-content> } @if (showProgress() && progressType() === 'spinner') {\n <mat-progress-spinner\n progressIndicator\n mode=\"indeterminate\"\n [diameter]=\"20\"\n aria-label=\"Loading\"\n />\n } @if (showProgress() && progressType() === 'text') {\n <div progressIndicator role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\">\n {{ progressText() }}\n </div>\n } @if (suffixIcon()) {\n <mat-icon iconPositionEnd>{{suffixIcon()}}</mat-icon> }\n</button>\n}\n", styles: [".acp-primary{--mat-button-filled-container-color: var(--acp-theme-primary-color);--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: var(--acp-theme-primary-color);--mat-button-protected-label-text-color: var(--acp-theme-primary-color);--mat-button-text-label-text-color: var(--acp-theme-primary-color);--mat-button-text-state-layer-color: var(--acp-theme-primary-color)}.acp-secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary)}.acp-accent{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary)}.acp-error{--mat-button-filled-container-color: var(--mat-sys-error);--mat-button-filled-label-text-color: var(--mat-sys-on-error);--mat-button-outlined-label-text-color: var(--mat-sys-error);--mat-button-protected-label-text-color: var(--mat-sys-error);--mat-button-text-label-text-color: var(--mat-sys-error);--mat-button-text-state-layer-color: var(--mat-sys-error)}.acp-success{--mat-button-filled-container-color: #4caf50;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #4caf50;--mat-button-protected-label-text-color: #4caf50;--mat-button-text-label-text-color: #4caf50;--mat-button-text-state-layer-color: #4caf50}.acp-warning{--mat-button-filled-container-color: #f59e0b;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #f59e0b;--mat-button-protected-label-text-color: #f59e0b;--mat-button-text-label-text-color: #f59e0b;--mat-button-text-state-layer-color: #f59e0b}.acp-info{--mat-button-filled-container-color: #3b82f6;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: #3b82f6;--mat-button-protected-label-text-color: #3b82f6;--mat-button-text-label-text-color: #3b82f6;--mat-button-text-state-layer-color: #3b82f6}.acp-dark{--mat-button-filled-container-color: #1f2937;--mat-button-filled-label-text-color: #ffffff;--mat-button-outlined-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-protected-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-text-label-text-color: light-dark(#1f2937, #ffffff);--mat-button-text-state-layer-color: light-dark(#1f2937, #ffffff)}[matIconButton].acp-primary{--mat-icon-color: var(--acp-theme-primary-color)}[matIconButton].acp-secondary{--mat-icon-color: var(--mat-sys-secondary)}[matIconButton].acp-accent{--mat-icon-color: var(--mat-sys-tertiary)}[matIconButton].acp-error{--mat-icon-color: var(--mat-sys-error)}[matIconButton].acp-success{--mat-icon-color: #10b981}[matIconButton].acp-warning{--mat-icon-color: #f59e0b}[matIconButton].acp-info{--mat-icon-color: #3b82f6}[matIconButton].acp-light{--mat-icon-color: #ffffff}[matFab].acp-primary{--mat-fab-container-color: var(--acp-theme-primary-color);--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-secondary{--mat-fab-container-color: var(--mat-sys-secondary);--mat-fab-foreground-color: var(--mat-sys-on-secondary);--mat-fab-state-layer-color: var(--mat-sys-on-secondary)}[matFab].acp-accent{--mat-fab-container-color: var(--mat-sys-tertiary);--mat-fab-foreground-color: var(--mat-sys-on-tertiary);--mat-fab-state-layer-color: var(--mat-sys-on-tertiary)}[matFab].acp-error{--mat-fab-container-color: var(--mat-sys-error);--mat-fab-foreground-color: var(--mat-sys-on-error);--mat-fab-state-layer-color: var(--mat-sys-on-error)}[matFab].acp-success{--mat-fab-container-color: #4caf50;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-warning{--mat-fab-container-color: #f59e0b;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-info{--mat-fab-container-color: #3b82f6;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matFab].acp-dark{--mat-fab-container-color: #1f2937;--mat-fab-foreground-color: #ffffff;--mat-fab-state-layer-color: #ffffff}[matMiniFab].acp-primary{--mat-fab-small-container-color: var(--acp-theme-primary-color);--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-secondary{--mat-fab-small-container-color: var(--mat-sys-secondary);--mat-fab-small-foreground-color: var(--mat-sys-on-secondary);--mat-fab-small-state-layer-color: var(--mat-sys-on-secondary)}[matMiniFab].acp-accent{--mat-fab-small-container-color: var(--mat-sys-tertiary);--mat-fab-small-foreground-color: var(--mat-sys-on-tertiary);--mat-fab-small-state-layer-color: var(--mat-sys-on-tertiary)}[matMiniFab].acp-error{--mat-fab-small-container-color: var(--mat-sys-error);--mat-fab-small-foreground-color: var(--mat-sys-on-error);--mat-fab-small-state-layer-color: var(--mat-sys-on-error)}[matMiniFab].acp-success{--mat-fab-small-container-color: #4caf50;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-warning{--mat-fab-small-container-color: #f59e0b;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-info{--mat-fab-small-container-color: #3b82f6;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}[matMiniFab].acp-dark{--mat-fab-small-container-color: #1f2937;--mat-fab-small-foreground-color: #ffffff;--mat-fab-small-state-layer-color: #ffffff}.acp-square{--mat-button-filled-container-shape: 8px;--mat-button-outlined-container-shape: 8px;--mat-button-protected-container-shape: 8px;--mat-button-text-container-shape: 8px;--mat-button-tonal-container-shape: 8px;--mat-icon-button-container-shape: 8px}.acp-block{width:100%}.acp-medium{--mat-checkbox-touch-target-display: block;--mat-checkbox-state-layer-size: 36px;--mat-chip-container-height: 28px;--mat-expansion-header-collapsed-state-height: 44px;--mat-expansion-header-expanded-state-height: 60px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display: block;--mat-button-filled-touch-target-display: block;--mat-button-filled-container-height: 36px;--mat-button-outlined-container-height: 36px;--mat-button-outlined-touch-target-display: block;--mat-button-protected-touch-target-display: block;--mat-button-protected-container-height: 36px;--mat-button-text-touch-target-display: block;--mat-button-text-container-height: 36px;--mat-button-tonal-container-height: 36px;--mat-button-tonal-touch-target-display: block;--mat-form-field-container-height: 52px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 14px;--mat-form-field-filled-with-label-container-padding-top: 22px;--mat-form-field-filled-with-label-container-padding-bottom: 6px;--mat-icon-button-touch-target-display: block;--mat-icon-button-state-layer-size: 36px;--mat-list-list-item-leading-icon-start-space: 12px;--mat-list-list-item-leading-icon-end-space: 12px;--mat-list-list-item-one-line-container-height: 44px;--mat-list-list-item-two-line-container-height: 60px;--mat-list-list-item-three-line-container-height: 84px;--mat-paginator-container-size: 52px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mat-paginator-touch-target-display: block;--mat-radio-touch-target-display: block;--mat-radio-state-layer-size: 36px;--mat-tab-container-height: 44px;--mat-select-arrow-transform: translateY(-8px);--mat-button-toggle-height: 40px;--mat-stepper-header-height: 68px;--mat-table-header-container-height: 52px;--mat-table-footer-container-height: 48px;--mat-table-row-item-container-height: 48px;--mat-toolbar-standard-height: 60px;--mat-toolbar-mobile-height: 52px;--mat-tree-node-min-height: 44px;--mat-sys-corner-extra-large: 28px;--mat-sys-corner-extra-large-top: 28px 28px 0 0;--mat-sys-corner-extra-small: 4px;--mat-sys-corner-extra-small-top: 4px 4px 0 0;--mat-sys-corner-full: 9999px;--mat-sys-corner-large: 16px;--mat-sys-corner-large-end: 0 16px 16px 0;--mat-sys-corner-large-start: 16px 0 0 16px;--mat-sys-corner-large-top: 16px 16px 0 0;--mat-sys-corner-medium: 12px;--mat-sys-corner-none: 0;--mat-sys-corner-small: 8px;--mat-sys-dragged-state-layer-opacity: .16;--mat-sys-focus-state-layer-opacity: .12;--mat-sys-hover-state-layer-opacity: .08;--mat-sys-pressed-state-layer-opacity: .12;--mat-button-filled-horizontal-padding: 20px;--mat-button-outlined-horizontal-padding: 20px;--mat-button-protected-horizontal-padding: 20px;--mat-button-text-horizontal-padding: 20px;--mat-button-tonal-horizontal-padding: 20px;--mat-button-toggle-height: 36px}.acp-small{--mat-checkbox-touch-target-display: none;--mat-checkbox-state-layer-size: 32px;--mat-chip-container-height: 24px;--mat-expansion-header-collapsed-state-height: 40px;--mat-expansion-header-expanded-state-height: 56px;--mat-fab-small-touch-target-display: ;--mat-fab-touch-target-display: none;--mat-button-filled-touch-target-display: none;--mat-button-filled-container-height: 32px;--mat-button-outlined-container-height: 32px;--mat-button-outlined-touch-target-display: none;--mat-button-protected-touch-target-display: none;--mat-button-protected-container-height: 32px;--mat-button-text-touch-target-display: none;--mat-button-text-container-height: 32px;--mat-button-tonal-container-height: 32px;--mat-button-tonal-touch-target-display: none;--mat-form-field-container-height: 48px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 12px;--mat-form-field-filled-with-label-container-padding-top: 12px;--mat-form-field-filled-with-label-container-padding-bottom: 12px;--mat-icon-button-touch-target-display: none;--mat-icon-button-state-layer-size: 32px;--mat-list-list-item-leading-icon-start-space: 8px;--mat-list-list-item-leading-icon-end-space: 8px;--mat-list-list-item-one-line-container-height: 40px;--mat-list-list-item-two-line-container-height: 56px;--mat-list-list-item-three-line-container-height: 80px;--mat-paginator-container-size: 48px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mat-paginator-touch-target-display: none;--mat-radio-touch-target-display: none;--mat-radio-state-layer-size: 32px;--mat-tab-container-height: 40px;--mat-select-arrow-transform: none;--mat-button-toggle-height: 40px;--mat-stepper-header-height: 64px;--mat-table-header-container-height: 48px;--mat-table-footer-container-height: 44px;--mat-table-row-item-container-height: 44px;--mat-toolbar-standard-height: 56px;--mat-toolbar-mobile-height: 48px;--mat-tree-node-min-height: 40px;--mat-sys-corner-extra-large: 28px;--mat-sys-corner-extra-large-top: 28px 28px 0 0;--mat-sys-corner-extra-small: 4px;--mat-sys-corner-extra-small-top: 4px 4px 0 0;--mat-sys-corner-full: 9999px;--mat-sys-corner-large: 16px;--mat-sys-corner-large-end: 0 16px 16px 0;--mat-sys-corner-large-start: 16px 0 0 16px;--mat-sys-corner-large-top: 16px 16px 0 0;--mat-sys-corner-medium: 12px;--mat-sys-corner-none: 0;--mat-sys-corner-small: 8px;--mat-sys-dragged-state-layer-opacity: .16;--mat-sys-focus-state-layer-opacity: .12;--mat-sys-hover-state-layer-opacity: .08;--mat-sys-pressed-state-layer-opacity: .12;--mat-button-filled-horizontal-padding: 16px;--mat-button-outlined-horizontal-padding: 16px;--mat-button-protected-horizontal-padding: 16px;--mat-button-text-horizontal-padding: 16px;--mat-button-tonal-horizontal-padding: 16px}\n"] }]
1537
1729
  }] });
1538
1730
 
1539
1731
  /**
1540
- * Servicio centralizado para manejar z-index de todos los diálogos
1541
- * Asegura que los diálogos siempre aparezcan en el orden correcto
1542
- * Los AlertDialogs siempre tienen prioridad sobre otros diálogos
1732
+ * Token used to deliver `AcpDialogConfig.data` to the content component.
1733
+ * Content components read it with `inject(ACP_DIALOG_DATA)` (typed as `D`).
1734
+ * This is the single data channel, used identically for bare and shell dialogs.
1735
+ */
1736
+ const ACP_DIALOG_DATA = new InjectionToken('ACP_DIALOG_DATA', {
1737
+ factory: () => null,
1738
+ });
1739
+ /**
1740
+ * Application-wide defaults for every dialog opened through `AcpDialogService`.
1741
+ * Mirrors `MAT_DIALOG_DEFAULT_OPTIONS` from Angular Material.
1742
+ * Per-call config always wins over these defaults.
1743
+ */
1744
+ const ACP_DIALOG_DEFAULT_OPTIONS = new InjectionToken('ACP_DIALOG_DEFAULT_OPTIONS');
1745
+ /**
1746
+ * Token used by the declarative `<acp-dialog-actions>` component to register
1747
+ * its action buttons with the hosting `AcpDialogContainer`.
1748
+ */
1749
+ const ACP_DIALOG_ACTIONS = new InjectionToken('ACP_DIALOG_ACTIONS');
1750
+ /**
1751
+ * Token used by the declarative `<acp-dialog-titlebar>` component to register
1752
+ * its template with the hosting `AcpDialogContainer`.
1753
+ */
1754
+ const ACP_DIALOG_TITLEBAR = new InjectionToken('ACP_DIALOG_TITLEBAR');
1755
+ /**
1756
+ * Registers application-wide dialog defaults, e.g.:
1757
+ * `provideAcpDialogDefaults({ fullScreenOnMobile: true })`.
1758
+ */
1759
+ function provideAcpDialogDefaults(defaults) {
1760
+ return makeEnvironmentProviders([{ provide: ACP_DIALOG_DEFAULT_OPTIONS, useValue: defaults }]);
1761
+ }
1762
+
1763
+ /**
1764
+ * Dialog actions container. Use it declaratively inside a dialog content
1765
+ * template, or let `AcpDialogContainer` instantiate it from `config.actions`.
1766
+ *
1767
+ * @example
1768
+ * ```html
1769
+ * <acp-dialog-actions align="end">
1770
+ * <acp-button text="Cancel" appearance="text" (clicked)="ref.close()" />
1771
+ * <acp-button text="Save" color="success" (clicked)="ref.close(user)" />
1772
+ * </acp-dialog-actions>
1773
+ * ```
1774
+ */
1775
+ class AcpDialogActions {
1776
+ outlet = inject(ACP_DIALOG_ACTIONS, { optional: true });
1777
+ matDialogRef = inject(MatDialogRef, { optional: true });
1778
+ containerData = inject(MAT_DIALOG_DATA, {
1779
+ optional: true,
1780
+ });
1781
+ injector = inject(Injector);
1782
+ actionsTemplateRef = viewChild.required('actionsTemplate', { ...(ngDevMode ? { debugName: "actionsTemplateRef" } : /* istanbul ignore next */ {}), read: TemplateRef });
1783
+ actionStateSignals = new WeakMap();
1784
+ renderInline = signal(this.outlet == null, /* @ts-ignore */
1785
+ ...(ngDevMode ? [{ debugName: "renderInline" }] : /* istanbul ignore next */ []));
1786
+ hostDisplay = signal(this.outlet == null ? 'contents' : 'none', /* @ts-ignore */
1787
+ ...(ngDevMode ? [{ debugName: "hostDisplay" }] : /* istanbul ignore next */ []));
1788
+ /** Alignment of the action buttons. @default 'end' */
1789
+ align = input('end', /* @ts-ignore */
1790
+ ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
1791
+ /** Configured footer actions. When omitted, the component works as a declarative slot. */
1792
+ actions = input(/* @ts-ignore */
1793
+ ...(ngDevMode ? [undefined, { debugName: "actions" }] : /* istanbul ignore next */ []));
1794
+ /** Optional title used to label the actions footer. */
1795
+ dialogTitle = input(/* @ts-ignore */
1796
+ ...(ngDevMode ? [undefined, { debugName: "dialogTitle" }] : /* istanbul ignore next */ []));
1797
+ /** Accessible label for the actions footer. Falls back to a generated one. */
1798
+ ariaLabel = computed(() => {
1799
+ const title = this.dialogTitle();
1800
+ return title ? `Actions for ${title}` : 'Dialog actions';
1801
+ }, /* @ts-ignore */
1802
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
1803
+ ngAfterViewInit() {
1804
+ if (this.outlet) {
1805
+ this.outlet.register(this.actionsTemplateRef(), this.align());
1806
+ this.hostDisplay.set('none');
1807
+ }
1808
+ }
1809
+ /** Resolves an action's boolean state (boolean, signal or observable). */
1810
+ resolveActionState(state) {
1811
+ if (state === undefined) {
1812
+ return false;
1813
+ }
1814
+ if (typeof state === 'boolean') {
1815
+ return state;
1816
+ }
1817
+ if (isSignal(state)) {
1818
+ return state();
1819
+ }
1820
+ if (isObservable(state)) {
1821
+ let sig = this.actionStateSignals.get(state);
1822
+ if (!sig) {
1823
+ sig = toSignal(state, { injector: this.injector, initialValue: false });
1824
+ this.actionStateSignals.set(state, sig);
1825
+ }
1826
+ return sig();
1827
+ }
1828
+ return false;
1829
+ }
1830
+ /** Broadcasts the click and closes the dialog unless the event is prevented. */
1831
+ handleActionClick(event, action) {
1832
+ const click = { action, event };
1833
+ this.containerData?.actionClicks?.next(click);
1834
+ }
1835
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
1836
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AcpDialogActions, isStandalone: true, selector: "acp-dialog-actions", inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, dialogTitle: { classPropertyName: "dialogTitle", publicName: "dialogTitle", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "style.display": "hostDisplay()" } }, viewQueries: [{ propertyName: "actionsTemplateRef", first: true, predicate: ["actionsTemplate"], descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: `
1837
+ <ng-template #actionsTemplate><ng-content /></ng-template>
1838
+
1839
+ @if (renderInline()) {
1840
+ <mat-dialog-actions
1841
+ class="acp-dialog-actions"
1842
+ [class.acp-dialog-actions-start]="align() === 'start'"
1843
+ [class.acp-dialog-actions-center]="align() === 'center'"
1844
+ [class.acp-dialog-actions-end]="align() === 'end'"
1845
+ [align]="align()"
1846
+ [attr.aria-label]="ariaLabel()"
1847
+ >
1848
+ @for (action of actions() ?? []; track action.key ?? action.text ?? $index) {
1849
+ <acp-button
1850
+ [text]="action.text"
1851
+ [color]="action.color ?? 'primary'"
1852
+ [appearance]="action.appearance ?? 'filled'"
1853
+ [variant]="action.variant ?? 'basic'"
1854
+ [icon]="action.icon"
1855
+ [suffixIcon]="action.suffixIcon"
1856
+ [disabled]="resolveActionState(action.disabled)"
1857
+ [loading]="resolveActionState(action.loading)"
1858
+ [ariaLabel]="action.ariaLabel"
1859
+ [size]="action.size ?? 'large'"
1860
+ [block]="action.block ?? false"
1861
+ [extended]="action.extended ?? false"
1862
+ [type]="action.type ?? 'button'"
1863
+ [form]="action.form"
1864
+ (click)="handleActionClick($event, action)"
1865
+ />
1866
+ }
1867
+ <ng-container [ngTemplateOutlet]="actionsTemplate" />
1868
+ </mat-dialog-actions>
1869
+ }
1870
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: AcpButton, selector: "acp-button" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1871
+ }
1872
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogActions, decorators: [{
1873
+ type: Component,
1874
+ args: [{
1875
+ selector: 'acp-dialog-actions',
1876
+ standalone: true,
1877
+ imports: [MatDialogModule, AcpButton, NgTemplateOutlet],
1878
+ template: `
1879
+ <ng-template #actionsTemplate><ng-content /></ng-template>
1880
+
1881
+ @if (renderInline()) {
1882
+ <mat-dialog-actions
1883
+ class="acp-dialog-actions"
1884
+ [class.acp-dialog-actions-start]="align() === 'start'"
1885
+ [class.acp-dialog-actions-center]="align() === 'center'"
1886
+ [class.acp-dialog-actions-end]="align() === 'end'"
1887
+ [align]="align()"
1888
+ [attr.aria-label]="ariaLabel()"
1889
+ >
1890
+ @for (action of actions() ?? []; track action.key ?? action.text ?? $index) {
1891
+ <acp-button
1892
+ [text]="action.text"
1893
+ [color]="action.color ?? 'primary'"
1894
+ [appearance]="action.appearance ?? 'filled'"
1895
+ [variant]="action.variant ?? 'basic'"
1896
+ [icon]="action.icon"
1897
+ [suffixIcon]="action.suffixIcon"
1898
+ [disabled]="resolveActionState(action.disabled)"
1899
+ [loading]="resolveActionState(action.loading)"
1900
+ [ariaLabel]="action.ariaLabel"
1901
+ [size]="action.size ?? 'large'"
1902
+ [block]="action.block ?? false"
1903
+ [extended]="action.extended ?? false"
1904
+ [type]="action.type ?? 'button'"
1905
+ [form]="action.form"
1906
+ (click)="handleActionClick($event, action)"
1907
+ />
1908
+ }
1909
+ <ng-container [ngTemplateOutlet]="actionsTemplate" />
1910
+ </mat-dialog-actions>
1911
+ }
1912
+ `,
1913
+ host: {
1914
+ role: 'group',
1915
+ '[style.display]': 'hostDisplay()',
1916
+ },
1917
+ changeDetection: ChangeDetectionStrategy.OnPush,
1918
+ encapsulation: ViewEncapsulation.None,
1919
+ }]
1920
+ }], propDecorators: { actionsTemplateRef: [{ type: i0.ViewChild, args: ['actionsTemplate', { ...{ read: TemplateRef }, isSignal: true }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], dialogTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogTitle", required: false }] }] } });
1921
+
1922
+ /**
1923
+ * Dialog title bar. Use it inside a dialog content template for a declarative
1924
+ * header, or let `AcpDialogContainer` instantiate it from `config.header`.
1925
+ *
1926
+ * @example
1927
+ * ```html
1928
+ * <acp-dialog-titlebar title="Edit user" icon="person">
1929
+ * <acp-dialog-actions align="end">
1930
+ * <acp-button text="Cancel" appearance="text" (clicked)="ref.close()" />
1931
+ * <acp-button text="Save" color="success" (clicked)="ref.close(user)" />
1932
+ * </acp-dialog-actions>
1933
+ * </acp-dialog-titlebar>
1934
+ * ```
1935
+ */
1936
+ class AcpDialogTitlebar {
1937
+ elementRef = inject(ElementRef);
1938
+ matDialogRef = inject(MatDialogRef, { optional: true });
1939
+ outlet = inject(ACP_DIALOG_TITLEBAR, { optional: true });
1940
+ titlebarTemplateRef = viewChild.required('titlebarTemplate', { ...(ngDevMode ? { debugName: "titlebarTemplateRef" } : /* istanbul ignore next */ {}), read: TemplateRef });
1941
+ renderInline = signal(this.outlet == null, /* @ts-ignore */
1942
+ ...(ngDevMode ? [{ debugName: "renderInline" }] : /* istanbul ignore next */ []));
1943
+ hostDisplay = signal(this.outlet == null ? 'contents' : 'none', /* @ts-ignore */
1944
+ ...(ngDevMode ? [{ debugName: "hostDisplay" }] : /* istanbul ignore next */ []));
1945
+ /** CSS classes applied to the header element. */
1946
+ headerClasses = computed(() => {
1947
+ const classes = ['acp-dialog-header'];
1948
+ if (this.color()) {
1949
+ classes.push(`acp-dialog-header--${this.color()}`);
1950
+ }
1951
+ if (this.colorClass()) {
1952
+ classes.push(this.colorClass());
1953
+ }
1954
+ return classes.join(' ');
1955
+ }, /* @ts-ignore */
1956
+ ...(ngDevMode ? [{ debugName: "headerClasses" }] : /* istanbul ignore next */ []));
1957
+ /** Close-button color resolved from `closeColor` or the header background. */
1958
+ resolvedCloseColor = computed(() => {
1959
+ const requested = this.closeColor();
1960
+ if (requested) {
1961
+ return requested;
1962
+ }
1963
+ const darkBackgrounds = new Set([
1964
+ 'primary',
1965
+ 'secondary',
1966
+ 'accent',
1967
+ 'success',
1968
+ 'info',
1969
+ 'error',
1970
+ 'danger',
1971
+ 'dark',
1972
+ ]);
1973
+ return darkBackgrounds.has(this.color() ?? '') ? 'light' : 'dark';
1974
+ }, /* @ts-ignore */
1975
+ ...(ngDevMode ? [{ debugName: "resolvedCloseColor" }] : /* istanbul ignore next */ []));
1976
+ /** Title text shown in the header. */
1977
+ title = input(/* @ts-ignore */
1978
+ ...(ngDevMode ? [undefined, { debugName: "title" }] : /* istanbul ignore next */ []));
1979
+ /** Optional subtitle shown below the title. */
1980
+ subtitle = input(/* @ts-ignore */
1981
+ ...(ngDevMode ? [undefined, { debugName: "subtitle" }] : /* istanbul ignore next */ []));
1982
+ /** Optional Material icon name displayed before the title. */
1983
+ icon = input(/* @ts-ignore */
1984
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
1985
+ /** Whether the close button is shown. @default true */
1986
+ closable = input(true, /* @ts-ignore */
1987
+ ...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
1988
+ /** Accessible label for the close button. @default 'Close dialog' */
1989
+ closeLabel = input('Close dialog', /* @ts-ignore */
1990
+ ...(ngDevMode ? [{ debugName: "closeLabel" }] : /* istanbul ignore next */ []));
1991
+ /** Whether the dialog can be dragged by its header. @default true */
1992
+ draggable = input(true, /* @ts-ignore */
1993
+ ...(ngDevMode ? [{ debugName: "draggable" }] : /* istanbul ignore next */ []));
1994
+ /** Predefined header color theme. */
1995
+ color = input(/* @ts-ignore */
1996
+ ...(ngDevMode ? [undefined, { debugName: "color" }] : /* istanbul ignore next */ []));
1997
+ /** Additional CSS class names to apply to the header. */
1998
+ colorClass = input(/* @ts-ignore */
1999
+ ...(ngDevMode ? [undefined, { debugName: "colorClass" }] : /* istanbul ignore next */ []));
2000
+ /** Explicit close icon color. If omitted, it is chosen from the header `color`. */
2001
+ closeColor = input(/* @ts-ignore */
2002
+ ...(ngDevMode ? [undefined, { debugName: "closeColor" }] : /* istanbul ignore next */ []));
2003
+ /** Emitted when the close button is clicked and no `MatDialogRef` is available. */
2004
+ closed = output();
2005
+ close() {
2006
+ if (this.matDialogRef) {
2007
+ this.matDialogRef.close();
2008
+ }
2009
+ else {
2010
+ this.closed.emit();
2011
+ }
2012
+ }
2013
+ bringToFront() {
2014
+ const pane = this.elementRef.nativeElement.closest('.cdk-overlay-pane');
2015
+ if (pane) {
2016
+ const current = parseInt(pane.style.zIndex || '1000', 10);
2017
+ const next = Math.max(1000, isNaN(current) ? 1000 : current + 1);
2018
+ pane.style.zIndex = next.toString();
2019
+ }
2020
+ }
2021
+ ngAfterViewInit() {
2022
+ if (this.outlet) {
2023
+ this.outlet.register(this.titlebarTemplateRef(), this.title());
2024
+ this.hostDisplay.set('none');
2025
+ }
2026
+ }
2027
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogTitlebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
2028
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AcpDialogTitlebar, isStandalone: true, selector: "acp-dialog-titlebar", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, draggable: { classPropertyName: "draggable", publicName: "draggable", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, colorClass: { classPropertyName: "colorClass", publicName: "colorClass", isSignal: true, isRequired: false, transformFunction: null }, closeColor: { classPropertyName: "closeColor", publicName: "closeColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "style.display": "hostDisplay()" }, classAttribute: "acp-dialog-titlebar" }, viewQueries: [{ propertyName: "titlebarTemplateRef", first: true, predicate: ["titlebarTemplate"], descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: `
2029
+ <ng-template #titlebarTemplate>
2030
+ <div
2031
+ [class]="headerClasses()"
2032
+ cdkDrag
2033
+ cdkDragRootElement=".cdk-overlay-pane"
2034
+ [cdkDragDisabled]="draggable() === false"
2035
+ cdkDragHandle
2036
+ (mousedown)="bringToFront()"
2037
+ >
2038
+ <h6 mat-dialog-title class="acp-dialog-title">
2039
+ @if (icon()) {
2040
+ <mat-icon class="acp-dialog-title-icon" aria-hidden="true">{{ icon() }}</mat-icon>
2041
+ }
2042
+ <span>
2043
+ @if (title()) {
2044
+ {{ title() }}
2045
+ } @else {
2046
+ <ng-content />
2047
+ }
2048
+ </span>
2049
+ @if (closable() !== false) {
2050
+ <acp-button
2051
+ class="acp-dialog-close-btn"
2052
+ variant="icon"
2053
+ icon="close"
2054
+ [color]="resolvedCloseColor()"
2055
+ [ariaLabel]="closeLabel() ?? 'Close dialog'"
2056
+ (clicked)="close()"
2057
+ />
2058
+ }
2059
+ </h6>
2060
+ @if (subtitle()) {
2061
+ <p class="acp-dialog-subtitle">{{ subtitle() }}</p>
2062
+ }
2063
+ </div>
2064
+ </ng-template>
2065
+
2066
+ @if (renderInline()) {
2067
+ <ng-container [ngTemplateOutlet]="titlebarTemplate" />
2068
+ }
2069
+ `, isInline: true, dependencies: [{ kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: AcpButton, selector: "acp-button" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2070
+ }
2071
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogTitlebar, decorators: [{
2072
+ type: Component,
2073
+ args: [{
2074
+ selector: 'acp-dialog-titlebar',
2075
+ standalone: true,
2076
+ imports: [CdkDrag, CdkDragHandle, MatDialogModule, MatIconModule, AcpButton, NgTemplateOutlet],
2077
+ template: `
2078
+ <ng-template #titlebarTemplate>
2079
+ <div
2080
+ [class]="headerClasses()"
2081
+ cdkDrag
2082
+ cdkDragRootElement=".cdk-overlay-pane"
2083
+ [cdkDragDisabled]="draggable() === false"
2084
+ cdkDragHandle
2085
+ (mousedown)="bringToFront()"
2086
+ >
2087
+ <h6 mat-dialog-title class="acp-dialog-title">
2088
+ @if (icon()) {
2089
+ <mat-icon class="acp-dialog-title-icon" aria-hidden="true">{{ icon() }}</mat-icon>
2090
+ }
2091
+ <span>
2092
+ @if (title()) {
2093
+ {{ title() }}
2094
+ } @else {
2095
+ <ng-content />
2096
+ }
2097
+ </span>
2098
+ @if (closable() !== false) {
2099
+ <acp-button
2100
+ class="acp-dialog-close-btn"
2101
+ variant="icon"
2102
+ icon="close"
2103
+ [color]="resolvedCloseColor()"
2104
+ [ariaLabel]="closeLabel() ?? 'Close dialog'"
2105
+ (clicked)="close()"
2106
+ />
2107
+ }
2108
+ </h6>
2109
+ @if (subtitle()) {
2110
+ <p class="acp-dialog-subtitle">{{ subtitle() }}</p>
2111
+ }
2112
+ </div>
2113
+ </ng-template>
2114
+
2115
+ @if (renderInline()) {
2116
+ <ng-container [ngTemplateOutlet]="titlebarTemplate" />
2117
+ }
2118
+ `,
2119
+ host: {
2120
+ class: 'acp-dialog-titlebar',
2121
+ '[style.display]': 'hostDisplay()',
2122
+ },
2123
+ changeDetection: ChangeDetectionStrategy.OnPush,
2124
+ encapsulation: ViewEncapsulation.None,
2125
+ }]
2126
+ }], propDecorators: { titlebarTemplateRef: [{ type: i0.ViewChild, args: ['titlebarTemplate', { ...{ read: TemplateRef }, isSignal: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], draggable: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggable", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], colorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "colorClass", required: false }] }], closeColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeColor", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
2127
+
2128
+ /**
2129
+ * Shell that hosts any content inside an `AcpDialog`. Renders the optional
2130
+ * branded header (draggable title bar with icon, title and close button) and
2131
+ * optional footer actions.
2132
+ *
2133
+ * Content can be a component class, a `TemplateRef`, or a plain string. It is
2134
+ * created with a child `Injector` that provides `ACP_DIALOG_DATA` (the caller's
2135
+ * `config.data`) and `AcpDialogRef` (a typed handle to close the dialog).
2136
+ *
2137
+ * Opened exclusively through `AcpDialogService`; not meant to be used in templates.
2138
+ */
2139
+ class AcpDialogContainer {
2140
+ parentInjector = inject(Injector);
2141
+ containerData = inject(MAT_DIALOG_DATA);
2142
+ actionClicks = this.containerData.actionClicks;
2143
+ dialogRef = new AcpDialogRef(inject(MatDialogRef), this.actionClicks);
2144
+ /** Outlet where the configured content is rendered. */
2145
+ contentHost = viewChild.required('contentHost', { ...(ngDevMode ? { debugName: "contentHost" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
2146
+ /** Outlet where declarative `acp-dialog-actions` content is rendered. */
2147
+ actionOutlet = viewChild('actionOutlet', { ...(ngDevMode ? { debugName: "actionOutlet" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
2148
+ /** Outlet where declarative `acp-dialog-titlebar` content is rendered. */
2149
+ titlebarOutletRef = viewChild('titlebarOutlet', { ...(ngDevMode ? { debugName: "titlebarOutletRef" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
2150
+ /** Template used to render a plain string content. */
2151
+ stringTemplate = viewChild.required('stringContent', { ...(ngDevMode ? { debugName: "stringTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
2152
+ /** Whether the content has registered a declarative `acp-dialog-actions` template. */
2153
+ hasDeclarativeActions = signal(false, /* @ts-ignore */
2154
+ ...(ngDevMode ? [{ debugName: "hasDeclarativeActions" }] : /* istanbul ignore next */ []));
2155
+ /** Whether the content has registered a declarative `acp-dialog-titlebar` template. */
2156
+ hasDeclarativeTitlebar = signal(false, /* @ts-ignore */
2157
+ ...(ngDevMode ? [{ debugName: "hasDeclarativeTitlebar" }] : /* istanbul ignore next */ []));
2158
+ /** Pending declarative actions template, captured before the outlet is ready. */
2159
+ pendingActionTemplate = signal(undefined, /* @ts-ignore */
2160
+ ...(ngDevMode ? [{ debugName: "pendingActionTemplate" }] : /* istanbul ignore next */ []));
2161
+ /** Pending declarative titlebar template, captured before the outlet is ready. */
2162
+ pendingTitlebarTemplate = signal(undefined, /* @ts-ignore */
2163
+ ...(ngDevMode ? [{ debugName: "pendingTitlebarTemplate" }] : /* istanbul ignore next */ []));
2164
+ /** Alignment requested by a declarative actions template. */
2165
+ declarativeActionsAlign = signal(undefined, /* @ts-ignore */
2166
+ ...(ngDevMode ? [{ debugName: "declarativeActionsAlign" }] : /* istanbul ignore next */ []));
2167
+ /** Title requested by a declarative titlebar template. */
2168
+ declarativeTitle = signal(undefined, /* @ts-ignore */
2169
+ ...(ngDevMode ? [{ debugName: "declarativeTitle" }] : /* istanbul ignore next */ []));
2170
+ /** Outlet object provided to content so `acp-dialog-actions` can register itself. */
2171
+ actionsOutlet = {
2172
+ register: (template, align) => {
2173
+ this.pendingActionTemplate.set(template);
2174
+ this.hasDeclarativeActions.set(true);
2175
+ this.declarativeActionsAlign.set(align);
2176
+ },
2177
+ hasActions: this.hasDeclarativeActions.asReadonly(),
2178
+ };
2179
+ /** Outlet object provided to content so `acp-dialog-titlebar` can register itself. */
2180
+ titlebarOutlet = {
2181
+ register: (template, title) => {
2182
+ this.pendingTitlebarTemplate.set(template);
2183
+ this.hasDeclarativeTitlebar.set(true);
2184
+ this.declarativeTitle.set(title);
2185
+ },
2186
+ hasTitlebar: this.hasDeclarativeTitlebar.asReadonly(),
2187
+ };
2188
+ /** Exposed header configuration, including the `title` shortcut. */
2189
+ headerConfig = computed(() => {
2190
+ if (this.config.header) {
2191
+ return this.config.header;
2192
+ }
2193
+ if (this.config.title) {
2194
+ return { title: this.config.title };
2195
+ }
2196
+ return undefined;
2197
+ }, /* @ts-ignore */
2198
+ ...(ngDevMode ? [{ debugName: "headerConfig" }] : /* istanbul ignore next */ []));
2199
+ /** Title used for the actions footer label. */
2200
+ resolvedDialogTitle = computed(() => this.headerConfig()?.title ?? this.declarativeTitle(), /* @ts-ignore */
2201
+ ...(ngDevMode ? [{ debugName: "resolvedDialogTitle" }] : /* istanbul ignore next */ []));
2202
+ /** Alignment used for the actions footer. */
2203
+ resolvedActionsAlign = computed(() => this.declarativeActionsAlign() ?? this.config.actionsAlign ?? 'end', /* @ts-ignore */
2204
+ ...(ngDevMode ? [{ debugName: "resolvedActionsAlign" }] : /* istanbul ignore next */ []));
2205
+ /** Whether the current content is a plain string. */
2206
+ isStringContent = signal(false, /* @ts-ignore */
2207
+ ...(ngDevMode ? [{ debugName: "isStringContent" }] : /* istanbul ignore next */ []));
2208
+ get config() {
2209
+ return this.containerData.config;
2210
+ }
2211
+ get content() {
2212
+ return this.containerData.content;
2213
+ }
2214
+ constructor() {
2215
+ effect(onCleanup => {
2216
+ const outlet = this.actionOutlet();
2217
+ const template = this.pendingActionTemplate();
2218
+ let viewRef;
2219
+ if (outlet && template) {
2220
+ outlet.clear();
2221
+ viewRef = outlet.createEmbeddedView(template);
2222
+ }
2223
+ onCleanup(() => viewRef?.destroy());
2224
+ });
2225
+ effect(onCleanup => {
2226
+ const outlet = this.titlebarOutletRef();
2227
+ const template = this.pendingTitlebarTemplate();
2228
+ let viewRef;
2229
+ if (outlet && template) {
2230
+ outlet.clear();
2231
+ viewRef = outlet.createEmbeddedView(template);
2232
+ }
2233
+ onCleanup(() => viewRef?.destroy());
2234
+ });
2235
+ }
2236
+ ngAfterViewInit() {
2237
+ const content = this.content;
2238
+ const injector = this.createContentInjector();
2239
+ this.contentHost().clear();
2240
+ this.isStringContent.set(false);
2241
+ if (typeof content === 'string') {
2242
+ this.isStringContent.set(true);
2243
+ this.contentHost().createEmbeddedView(this.stringTemplate(), { content });
2244
+ }
2245
+ else if (content instanceof TemplateRef) {
2246
+ this.contentHost().createEmbeddedView(content, {
2247
+ $implicit: this.config.data,
2248
+ data: this.config.data,
2249
+ ref: this.dialogRef,
2250
+ }, { injector });
2251
+ }
2252
+ else {
2253
+ this.contentHost().createComponent(content, { injector, bindings: this.config.bindings });
2254
+ }
2255
+ }
2256
+ createContentInjector() {
2257
+ return Injector.create({
2258
+ parent: this.parentInjector,
2259
+ providers: [
2260
+ { provide: ACP_DIALOG_DATA, useValue: this.config.data },
2261
+ { provide: AcpDialogRef, useValue: this.dialogRef },
2262
+ { provide: ACP_DIALOG_ACTIONS, useValue: this.actionsOutlet },
2263
+ { provide: ACP_DIALOG_TITLEBAR, useValue: this.titlebarOutlet },
2264
+ ],
2265
+ });
2266
+ }
2267
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogContainer, deps: [], target: i0.ɵɵFactoryTarget.Component });
2268
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AcpDialogContainer, isStandalone: true, selector: "acp-dialog-container", viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "actionOutlet", first: true, predicate: ["actionOutlet"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "titlebarOutletRef", first: true, predicate: ["titlebarOutlet"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "stringTemplate", first: true, predicate: ["stringContent"], descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "@if (headerConfig(); as header) { @if (config.showHeader !== false && !hasDeclarativeTitlebar()) {\n<acp-dialog-titlebar\n [title]=\"header.title\"\n [subtitle]=\"header.subtitle\"\n [icon]=\"header.icon\"\n [closable]=\"header.closable ?? true\"\n [closeLabel]=\"header.closeLabel ?? 'Close dialog'\"\n [draggable]=\"header.draggable ?? true\"\n [color]=\"header.color\"\n [colorClass]=\"header.colorClass\"\n [closeColor]=\"header.closeColor\"\n/>\n} }\n\n<ng-template #titlebarOutlet />\n\n<mat-dialog-content class=\"acp-dialog-content\">\n <ng-template #contentHost />\n <ng-template #stringContent let-content>\n <div class=\"acp-dialog-message\">{{ content }}</div>\n </ng-template>\n</mat-dialog-content>\n\n@if ((config.actions?.length && config.showActions !== false) || hasDeclarativeActions()) {\n<acp-dialog-actions\n [align]=\"resolvedActionsAlign()\"\n [actions]=\"hasDeclarativeActions() ? undefined : config.actions\"\n [dialogTitle]=\"resolvedDialogTitle()\"\n>\n <ng-template #actionOutlet />\n</acp-dialog-actions>\n}\n", styles: ["acp-dialog-container{display:flex;flex-direction:column;height:100%}.acp-dialog-content{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;overflow:auto}.acp-dialog-content>*{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}.acp-dialog-content>*>.acp-dialog-message{flex:1 1 auto;overflow:auto;min-height:0}.acp-dialog-content>*>.acp-dialog-message-actions{flex-shrink:0}.acp-dialog-header{cursor:move;border-bottom:1px solid var(--acp-dialog-header-border-color, var(--mat-sys-outline-variant, #dee2e6));color:var(--acp-dialog-header-text-color, var(--mat-sys-on-surface, #212529));position:relative}.acp-dialog-header.acp-dialog-header--primary{background-color:var(--acp-dialog-primary-header-background-color, var(--mat-sys-primary, #1976d2));color:var(--acp-dialog-primary-header-text-color, var(--mat-sys-on-primary, #fff))}.acp-dialog-header.acp-dialog-header--secondary{background-color:var(--acp-dialog-secondary-header-background-color, var(--mat-sys-secondary, #9c27b0));color:var(--acp-dialog-secondary-header-text-color, var(--mat-sys-on-secondary, #fff))}.acp-dialog-header.acp-dialog-header--accent{background-color:var(--acp-dialog-accent-header-background-color, var(--mat-sys-tertiary, #7c4dff));color:var(--acp-dialog-accent-header-text-color, var(--mat-sys-on-tertiary, #fff))}.acp-dialog-header.acp-dialog-header--error,.acp-dialog-header.acp-dialog-header--danger{background-color:var(--acp-dialog-error-header-background-color, var(--mat-sys-error, #b3261e));color:var(--acp-dialog-error-header-text-color, var(--mat-sys-on-error, #fff))}.acp-dialog-header.acp-dialog-header--success{background-color:var(--acp-dialog-success-header-background-color, #22c55e);color:var(--acp-dialog-success-header-text-color, #fff)}.acp-dialog-header.acp-dialog-header--warning{background-color:var(--acp-dialog-warning-header-background-color, #f59e0b);color:var(--acp-dialog-warning-header-text-color, #212529)}.acp-dialog-header.acp-dialog-header--info{background-color:var(--acp-dialog-info-header-background-color, #0ea5e9);color:var(--acp-dialog-info-header-text-color, #fff)}.acp-dialog-header.acp-dialog-header--dark{background-color:var(--acp-dialog-dark-header-background-color, #212529);color:var(--acp-dialog-dark-header-text-color, #fff)}.acp-dialog-header[class*=acp-dialog-header--] .acp-dialog-subtitle{color:inherit;opacity:.85}h6[mat-dialog-title].acp-dialog-title{display:flex;align-items:center;font-size:var(--acp-dialog-title-font-size, 1.2rem);font-weight:var(--acp-dialog-title-font-weight, 500);margin:0;width:100%;padding-right:48px;color:currentColor}.acp-dialog-title-icon{margin-right:var(--acp-dialog-title-icon-gap, 12px);vertical-align:middle}h6[mat-dialog-title].acp-dialog-title span{flex-grow:1}.acp-dialog-close-btn{position:absolute;top:8px;right:16px}.acp-dialog-subtitle{margin:0;padding:0 var(--acp-dialog-subtitle-padding, 24px) var(--acp-dialog-subtitle-padding, 16px);font-size:var(--acp-dialog-subtitle-font-size, .875rem);color:var(--acp-dialog-subtitle-color, var(--mat-sys-on-surface-variant, #6c757d))}.acp-dialog-message{padding:var(--acp-dialog-message-padding, 24px);color:var(--acp-dialog-message-text-color, var(--mat-sys-on-surface, #212529))}.acp-dialog-message-actions{display:flex;justify-content:flex-end;gap:8px;padding:0 var(--acp-dialog-message-padding, 24px) var(--acp-dialog-message-padding, 24px)}.acp-dialog-actions{display:flex;align-items:center;gap:var(--acp-dialog-actions-gap, 8px);padding:var(--acp-dialog-actions-padding, 16px 24px);border-top:1px solid var(--acp-dialog-actions-border-color, var(--mat-sys-outline-variant, #dee2e6))}.acp-dialog-actions-start{justify-content:flex-start}.acp-dialog-actions-center{justify-content:center}.acp-dialog-actions-end{justify-content:flex-end}.acp-dialog-content>acp-dialog-titlebar,.acp-dialog-content>*>acp-dialog-titlebar,.acp-dialog-content>acp-dialog-actions,.acp-dialog-content>*>acp-dialog-actions{flex:0 0 auto}.acp-dialog-content>*>mat-dialog-content,.acp-dialog-content>*>.mat-mdc-dialog-content{flex:1 1 auto;overflow:auto;min-height:0;max-height:100%}.acp-dialog-content>*>mat-dialog-actions,.acp-dialog-content>*>.mat-mdc-dialog-actions{flex-shrink:0}.acp-dialog-full-screen .mat-mdc-dialog-surface{height:100vh}.acp-dialog-full-screen acp-dialog-container{min-height:100vh}.acp-dialog-full-screen .acp-dialog-content.mat-mdc-dialog-content{max-height:100%;height:100%}.acp-dialog-full-screen .acp-dialog-actions,.acp-dialog-full-screen .mat-mdc-dialog-actions{margin-top:auto}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: AcpDialogTitlebar, selector: "acp-dialog-titlebar", inputs: ["title", "subtitle", "icon", "closable", "closeLabel", "draggable", "color", "colorClass", "closeColor"], outputs: ["closed"] }, { kind: "component", type: AcpDialogActions, selector: "acp-dialog-actions", inputs: ["align", "actions", "dialogTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2269
+ }
2270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogContainer, decorators: [{
2271
+ type: Component,
2272
+ args: [{ selector: 'acp-dialog-container', imports: [MatDialogModule, AcpDialogTitlebar, AcpDialogActions], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (headerConfig(); as header) { @if (config.showHeader !== false && !hasDeclarativeTitlebar()) {\n<acp-dialog-titlebar\n [title]=\"header.title\"\n [subtitle]=\"header.subtitle\"\n [icon]=\"header.icon\"\n [closable]=\"header.closable ?? true\"\n [closeLabel]=\"header.closeLabel ?? 'Close dialog'\"\n [draggable]=\"header.draggable ?? true\"\n [color]=\"header.color\"\n [colorClass]=\"header.colorClass\"\n [closeColor]=\"header.closeColor\"\n/>\n} }\n\n<ng-template #titlebarOutlet />\n\n<mat-dialog-content class=\"acp-dialog-content\">\n <ng-template #contentHost />\n <ng-template #stringContent let-content>\n <div class=\"acp-dialog-message\">{{ content }}</div>\n </ng-template>\n</mat-dialog-content>\n\n@if ((config.actions?.length && config.showActions !== false) || hasDeclarativeActions()) {\n<acp-dialog-actions\n [align]=\"resolvedActionsAlign()\"\n [actions]=\"hasDeclarativeActions() ? undefined : config.actions\"\n [dialogTitle]=\"resolvedDialogTitle()\"\n>\n <ng-template #actionOutlet />\n</acp-dialog-actions>\n}\n", styles: ["acp-dialog-container{display:flex;flex-direction:column;height:100%}.acp-dialog-content{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;overflow:auto}.acp-dialog-content>*{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}.acp-dialog-content>*>.acp-dialog-message{flex:1 1 auto;overflow:auto;min-height:0}.acp-dialog-content>*>.acp-dialog-message-actions{flex-shrink:0}.acp-dialog-header{cursor:move;border-bottom:1px solid var(--acp-dialog-header-border-color, var(--mat-sys-outline-variant, #dee2e6));color:var(--acp-dialog-header-text-color, var(--mat-sys-on-surface, #212529));position:relative}.acp-dialog-header.acp-dialog-header--primary{background-color:var(--acp-dialog-primary-header-background-color, var(--mat-sys-primary, #1976d2));color:var(--acp-dialog-primary-header-text-color, var(--mat-sys-on-primary, #fff))}.acp-dialog-header.acp-dialog-header--secondary{background-color:var(--acp-dialog-secondary-header-background-color, var(--mat-sys-secondary, #9c27b0));color:var(--acp-dialog-secondary-header-text-color, var(--mat-sys-on-secondary, #fff))}.acp-dialog-header.acp-dialog-header--accent{background-color:var(--acp-dialog-accent-header-background-color, var(--mat-sys-tertiary, #7c4dff));color:var(--acp-dialog-accent-header-text-color, var(--mat-sys-on-tertiary, #fff))}.acp-dialog-header.acp-dialog-header--error,.acp-dialog-header.acp-dialog-header--danger{background-color:var(--acp-dialog-error-header-background-color, var(--mat-sys-error, #b3261e));color:var(--acp-dialog-error-header-text-color, var(--mat-sys-on-error, #fff))}.acp-dialog-header.acp-dialog-header--success{background-color:var(--acp-dialog-success-header-background-color, #22c55e);color:var(--acp-dialog-success-header-text-color, #fff)}.acp-dialog-header.acp-dialog-header--warning{background-color:var(--acp-dialog-warning-header-background-color, #f59e0b);color:var(--acp-dialog-warning-header-text-color, #212529)}.acp-dialog-header.acp-dialog-header--info{background-color:var(--acp-dialog-info-header-background-color, #0ea5e9);color:var(--acp-dialog-info-header-text-color, #fff)}.acp-dialog-header.acp-dialog-header--dark{background-color:var(--acp-dialog-dark-header-background-color, #212529);color:var(--acp-dialog-dark-header-text-color, #fff)}.acp-dialog-header[class*=acp-dialog-header--] .acp-dialog-subtitle{color:inherit;opacity:.85}h6[mat-dialog-title].acp-dialog-title{display:flex;align-items:center;font-size:var(--acp-dialog-title-font-size, 1.2rem);font-weight:var(--acp-dialog-title-font-weight, 500);margin:0;width:100%;padding-right:48px;color:currentColor}.acp-dialog-title-icon{margin-right:var(--acp-dialog-title-icon-gap, 12px);vertical-align:middle}h6[mat-dialog-title].acp-dialog-title span{flex-grow:1}.acp-dialog-close-btn{position:absolute;top:8px;right:16px}.acp-dialog-subtitle{margin:0;padding:0 var(--acp-dialog-subtitle-padding, 24px) var(--acp-dialog-subtitle-padding, 16px);font-size:var(--acp-dialog-subtitle-font-size, .875rem);color:var(--acp-dialog-subtitle-color, var(--mat-sys-on-surface-variant, #6c757d))}.acp-dialog-message{padding:var(--acp-dialog-message-padding, 24px);color:var(--acp-dialog-message-text-color, var(--mat-sys-on-surface, #212529))}.acp-dialog-message-actions{display:flex;justify-content:flex-end;gap:8px;padding:0 var(--acp-dialog-message-padding, 24px) var(--acp-dialog-message-padding, 24px)}.acp-dialog-actions{display:flex;align-items:center;gap:var(--acp-dialog-actions-gap, 8px);padding:var(--acp-dialog-actions-padding, 16px 24px);border-top:1px solid var(--acp-dialog-actions-border-color, var(--mat-sys-outline-variant, #dee2e6))}.acp-dialog-actions-start{justify-content:flex-start}.acp-dialog-actions-center{justify-content:center}.acp-dialog-actions-end{justify-content:flex-end}.acp-dialog-content>acp-dialog-titlebar,.acp-dialog-content>*>acp-dialog-titlebar,.acp-dialog-content>acp-dialog-actions,.acp-dialog-content>*>acp-dialog-actions{flex:0 0 auto}.acp-dialog-content>*>mat-dialog-content,.acp-dialog-content>*>.mat-mdc-dialog-content{flex:1 1 auto;overflow:auto;min-height:0;max-height:100%}.acp-dialog-content>*>mat-dialog-actions,.acp-dialog-content>*>.mat-mdc-dialog-actions{flex-shrink:0}.acp-dialog-full-screen .mat-mdc-dialog-surface{height:100vh}.acp-dialog-full-screen acp-dialog-container{min-height:100vh}.acp-dialog-full-screen .acp-dialog-content.mat-mdc-dialog-content{max-height:100%;height:100%}.acp-dialog-full-screen .acp-dialog-actions,.acp-dialog-full-screen .mat-mdc-dialog-actions{margin-top:auto}\n"] }]
2273
+ }], ctorParameters: () => [], propDecorators: { contentHost: [{ type: i0.ViewChild, args: ['contentHost', { ...{
2274
+ read: ViewContainerRef,
2275
+ }, isSignal: true }] }], actionOutlet: [{ type: i0.ViewChild, args: ['actionOutlet', { ...{ read: ViewContainerRef }, isSignal: true }] }], titlebarOutletRef: [{ type: i0.ViewChild, args: ['titlebarOutlet', { ...{ read: ViewContainerRef }, isSignal: true }] }], stringTemplate: [{ type: i0.ViewChild, args: ['stringContent', { ...{ read: TemplateRef }, isSignal: true }] }] } });
2276
+
2277
+ const SIZES = {
2278
+ xs: '320px',
2279
+ sm: '450px',
2280
+ md: '600px',
2281
+ lg: '800px',
2282
+ xl: '1000px',
2283
+ xxl: '1280px',
2284
+ full: '100vw',
2285
+ };
2286
+ /**
2287
+ * Reusable dialog service — a branded alternative to `MatDialog`. Every dialog
2288
+ * renders inside `AcpDialogContainer`, so content always works the same way:
2289
+ *
2290
+ * - read data with `inject(ACP_DIALOG_DATA)`,
2291
+ * - close the dialog with `inject(AcpDialogRef).close(result)`.
2292
+ *
2293
+ * Usage:
2294
+ * ```ts
2295
+ * private dialogs = inject(AcpDialogService);
2296
+ *
2297
+ * this.dialogs.open(UserForm, {
2298
+ * title: 'Edit user',
2299
+ * actions: [
2300
+ * { text: 'Cancel' },
2301
+ * { text: 'Save', color: 'success', result: user },
2302
+ * ],
2303
+ * size: 'lg',
2304
+ * data: { userId: 5 },
2305
+ * }).afterClosed().subscribe(saved => {
2306
+ * // handle result
2307
+ * });
2308
+ *
2309
+ * // or with a single config object:
2310
+ * this.dialogs.open({
2311
+ * content: UserForm,
2312
+ * title: 'Edit user',
2313
+ * actions: [{ text: 'Save', color: 'success' }],
2314
+ * data: { userId: 5 },
2315
+ * }).afterClosed().subscribe(saved => {
2316
+ * // handle result
2317
+ * });
2318
+ * ```
2319
+ */
2320
+ class AcpDialogService {
2321
+ dialog = inject(MatDialog);
2322
+ overlay = inject(Overlay);
2323
+ breakpointObserver = inject(BreakpointObserver);
2324
+ defaults = inject(ACP_DIALOG_DEFAULT_OPTIONS, {
2325
+ optional: true,
2326
+ });
2327
+ /** Stream that emits when all open dialogs have finished closing. */
2328
+ get afterAllClosed() {
2329
+ return this.dialog.afterAllClosed;
2330
+ }
2331
+ /** Stream that emits when a dialog has been opened. */
2332
+ get afterOpened() {
2333
+ return this.dialog.afterOpened;
2334
+ }
2335
+ /** Keeps track of the currently-open dialogs. */
2336
+ get openDialogs() {
2337
+ return this.dialog.openDialogs;
2338
+ }
2339
+ open(contentOrConfig, maybeConfig) {
2340
+ if (contentOrConfig instanceof TemplateRef) {
2341
+ return this.openWithContent(contentOrConfig, this.mergeDefaults(maybeConfig ?? {}));
2342
+ }
2343
+ if (typeof contentOrConfig === 'function' && isComponentClass(contentOrConfig)) {
2344
+ return this.openWithContent(contentOrConfig, this.mergeDefaults(maybeConfig ?? {}));
2345
+ }
2346
+ const { content, ...rest } = contentOrConfig;
2347
+ return this.openWithContent(content, this.mergeDefaults(rest));
2348
+ }
2349
+ /** Closes all currently open dialogs. */
2350
+ closeAll() {
2351
+ this.dialog.closeAll();
2352
+ }
2353
+ /** Finds an open dialog by its id. */
2354
+ getDialogById(id) {
2355
+ const matRef = this.dialog.getDialogById(id);
2356
+ return matRef ? new AcpDialogRef(matRef) : undefined;
2357
+ }
2358
+ // --- Internals ---
2359
+ openWithContent(content, config) {
2360
+ const resolved = this.resolveContent(content, config.data);
2361
+ const actionClicks = new Subject();
2362
+ if (resolved instanceof Promise) {
2363
+ return new AcpDialogRef(resolved.then(c => this.createMatRef(c, config, actionClicks)), actionClicks);
2364
+ }
2365
+ return new AcpDialogRef(this.createMatRef(resolved, config, actionClicks), actionClicks);
2366
+ }
2367
+ createMatRef(content, config, actionClicks) {
2368
+ const matRef = this.dialog.open(AcpDialogContainer, this.buildMatConfig(config, { content, config, actionClicks }));
2369
+ this.wireCloseGestures(matRef, config);
2370
+ return matRef;
2371
+ }
2372
+ resolveContent(content, data, depth = 0) {
2373
+ if (isTemplateRef(content)) {
2374
+ return content;
2375
+ }
2376
+ if (typeof content === 'string') {
2377
+ return content;
2378
+ }
2379
+ if (isComponentClass(content)) {
2380
+ return content;
2381
+ }
2382
+ if (isDialogComponentLoader(content)) {
2383
+ return content.loadComponent().then(c => this.resolveContent(c, data, depth));
2384
+ }
2385
+ if (typeof content === 'function') {
2386
+ if (depth > 5) {
2387
+ throw new Error('AcpDialog content factory nested too deeply');
2388
+ }
2389
+ const result = content(data);
2390
+ if (result && typeof result.then === 'function') {
2391
+ return result.then(c => this.resolveContent(c, data, depth + 1));
2392
+ }
2393
+ return this.resolveContent(result, data, depth + 1);
2394
+ }
2395
+ throw new Error(`Unsupported AcpDialog content: ${String(content)}`);
2396
+ }
2397
+ mergeDefaults(config) {
2398
+ const defaults = this.defaults;
2399
+ const { header, closeOn, ...rest } = config;
2400
+ return {
2401
+ ...defaults,
2402
+ ...rest,
2403
+ header: header ? { ...defaults?.header, ...header } : defaults?.header,
2404
+ closeOn: closeOn ? { ...defaults?.closeOn, ...closeOn } : defaults?.closeOn,
2405
+ };
2406
+ }
2407
+ buildMatConfig(config, data) {
2408
+ const matConfig = new MatDialogConfig();
2409
+ matConfig.data = data;
2410
+ const fullScreen = config.size === 'full' ||
2411
+ (config.fullScreenOnMobile === true &&
2412
+ this.breakpointObserver.isMatched([
2413
+ Breakpoints.HandsetPortrait,
2414
+ Breakpoints.HandsetLandscape,
2415
+ ]));
2416
+ if (fullScreen) {
2417
+ matConfig.width = '100vw';
2418
+ matConfig.height = '100vh';
2419
+ matConfig.maxWidth = '100vw';
2420
+ matConfig.maxHeight = '100vh';
2421
+ }
2422
+ else {
2423
+ matConfig.width = this.toMatSize(config.width) ?? SIZES[config.size ?? 'md'];
2424
+ matConfig.height = this.toMatSize(config.height);
2425
+ matConfig.minWidth = this.toMatSize(config.minWidth);
2426
+ matConfig.minHeight = this.toMatSize(config.minHeight);
2427
+ matConfig.maxWidth = this.toMatSize(config.maxWidth) ?? '95vw';
2428
+ matConfig.maxHeight = this.toMatSize(config.maxHeight);
2429
+ matConfig.position = config.position;
2430
+ }
2431
+ matConfig.panelClass = [
2432
+ 'acp-dialog',
2433
+ `acp-dialog-${config.size ?? 'md'}`,
2434
+ ...(fullScreen ? ['acp-dialog-full-screen'] : []),
2435
+ ...(Array.isArray(config.panelClass)
2436
+ ? config.panelClass
2437
+ : config.panelClass
2438
+ ? [config.panelClass]
2439
+ : []),
2440
+ ];
2441
+ matConfig.hasBackdrop = config.hasBackdrop ?? true;
2442
+ matConfig.backdropClass = config.backdropClass;
2443
+ const closeOn = this.normalizeCloseOn(config);
2444
+ matConfig.disableClose = closeOn.backdropClick === false || closeOn.escapeKey === false;
2445
+ matConfig.id = config.id;
2446
+ matConfig.injector = config.injector;
2447
+ matConfig.viewContainerRef = config.viewContainerRef;
2448
+ matConfig.closeOnNavigation = config.closeOnNavigation;
2449
+ matConfig.closePredicate = config.closePredicate;
2450
+ matConfig.direction = config.direction;
2451
+ matConfig.delayFocusTrap = config.delayFocusTrap;
2452
+ matConfig.ariaModal = config.ariaModal;
2453
+ matConfig.autoFocus = config.autoFocus ?? 'first-tabbable';
2454
+ matConfig.restoreFocus = config.restoreFocus ?? true;
2455
+ matConfig.scrollStrategy = this.resolveScrollStrategy(config.scrollStrategy);
2456
+ matConfig.enterAnimationDuration = config.enterAnimationDuration ?? '300ms';
2457
+ matConfig.exitAnimationDuration = config.exitAnimationDuration ?? '200ms';
2458
+ matConfig.ariaLabel = config.ariaLabel;
2459
+ matConfig.ariaLabelledBy = config.ariaLabelledBy;
2460
+ matConfig.ariaDescribedBy = config.ariaDescribedBy;
2461
+ matConfig.role = config.role ?? 'dialog';
2462
+ return matConfig;
2463
+ }
2464
+ normalizeCloseOn(config) {
2465
+ if (config.disableClose === true) {
2466
+ return { backdropClick: false, escapeKey: false };
2467
+ }
2468
+ if (config.disableClose === false) {
2469
+ return { backdropClick: true, escapeKey: true };
2470
+ }
2471
+ return {
2472
+ backdropClick: config.closeOn?.backdropClick !== false,
2473
+ escapeKey: config.closeOn?.escapeKey !== false,
2474
+ };
2475
+ }
2476
+ toMatSize(value) {
2477
+ return typeof value === 'number' ? `${value}px` : value;
2478
+ }
2479
+ resolveScrollStrategy(strategy) {
2480
+ if (typeof strategy !== 'string') {
2481
+ return strategy ?? this.overlay.scrollStrategies.block();
2482
+ }
2483
+ const strategies = this.overlay.scrollStrategies;
2484
+ switch (strategy) {
2485
+ case 'block':
2486
+ return strategies.block();
2487
+ case 'close':
2488
+ return strategies.close();
2489
+ case 'noop':
2490
+ return strategies.noop();
2491
+ default:
2492
+ return strategies.block();
2493
+ }
2494
+ }
2495
+ wireCloseGestures(matRef, config) {
2496
+ const closeOn = this.normalizeCloseOn(config);
2497
+ const backdropClick = closeOn.backdropClick;
2498
+ const escapeKey = closeOn.escapeKey;
2499
+ if (backdropClick === escapeKey) {
2500
+ return;
2501
+ }
2502
+ const closed$ = matRef.afterClosed();
2503
+ if (escapeKey) {
2504
+ matRef
2505
+ .keydownEvents()
2506
+ .pipe(takeUntil(closed$))
2507
+ .subscribe(event => {
2508
+ if (event.key === 'Escape') {
2509
+ matRef.close();
2510
+ }
2511
+ });
2512
+ }
2513
+ else {
2514
+ matRef
2515
+ .backdropClick()
2516
+ .pipe(takeUntil(closed$))
2517
+ .subscribe(() => matRef.close());
2518
+ }
2519
+ }
2520
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2521
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogService, providedIn: 'root' });
2522
+ }
2523
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDialogService, decorators: [{
2524
+ type: Injectable,
2525
+ args: [{
2526
+ providedIn: 'root',
2527
+ }]
2528
+ }] });
2529
+ function isDialogComponentLoader(value) {
2530
+ return (typeof value === 'object' &&
2531
+ value !== null &&
2532
+ 'loadComponent' in value &&
2533
+ typeof value.loadComponent === 'function');
2534
+ }
2535
+ function isTemplateRef(value) {
2536
+ return value instanceof TemplateRef;
2537
+ }
2538
+ function isComponentClass(value) {
2539
+ if (typeof value !== 'function') {
2540
+ return false;
2541
+ }
2542
+ const fn = value;
2543
+ return (!!fn['ɵcmp'] || !!fn['ɵfac'] || /^\s*class\s/.test(Function.prototype.toString.call(value)));
2544
+ }
2545
+
2546
+ /**
2547
+ * Centralized service that manages z-index stacking for all dialogs.
2548
+ * Ensures dialogs always appear in the correct order.
2549
+ * Alert dialogs always take priority over regular dialogs.
1543
2550
  */
1544
2551
  class DialogZIndexService {
1545
- // Rangos de z-index por tipo de diálogo
2552
+ // Z-index ranges per dialog type
1546
2553
  static Z_INDEX_RANGES = {
1547
- normal: { base: 1000, current: 1000 }, // Diálogos normales: 1000-1999
1548
- alert: { base: 2000, current: 2000 }, // Diálogos de alerta: 2000-2999 (siempre encima)
2554
+ normal: { base: 1000, current: 1000 }, // Regular dialogs: 1000-1999
2555
+ alert: { base: 2000, current: 2000 }, // Alert dialogs: 2000-2999 (always on top)
1549
2556
  };
1550
2557
  static Z_INDEX_INCREMENT = 10;
1551
2558
  /**
1552
- * Obtiene el siguiente z-index disponible para un tipo específico de diálogo
1553
- * @param type Tipo de diálogo (normal, alert)
1554
- * @returns El próximo z-index a usar
2559
+ * Gets the next available z-index for a specific dialog type.
2560
+ * @param type Dialog type (normal, alert)
2561
+ * @returns The next z-index to use
1555
2562
  */
1556
2563
  getNextZIndex(type = 'normal') {
1557
2564
  const range = DialogZIndexService.Z_INDEX_RANGES[type];
@@ -1559,23 +2566,23 @@ class DialogZIndexService {
1559
2566
  return range.current;
1560
2567
  }
1561
2568
  /**
1562
- * Obtiene el z-index actual más alto para un tipo específico
1563
- * @param type Tipo de diálogo
1564
- * @returns El z-index más alto actualmente en uso para ese tipo
2569
+ * Gets the highest z-index currently in use for a specific type.
2570
+ * @param type Dialog type
2571
+ * @returns The highest z-index currently in use for that type
1565
2572
  */
1566
2573
  getCurrentZIndex(type = 'normal') {
1567
2574
  return DialogZIndexService.Z_INDEX_RANGES[type].current;
1568
2575
  }
1569
2576
  /**
1570
- * Obtiene el z-index más alto de todos los tipos
1571
- * @returns El z-index más alto de todos los diálogos
2577
+ * Gets the highest z-index across all dialog types.
2578
+ * @returns The highest z-index of all dialogs
1572
2579
  */
1573
2580
  getHighestZIndex() {
1574
2581
  return Math.max(...Object.values(DialogZIndexService.Z_INDEX_RANGES).map(range => range.current));
1575
2582
  }
1576
2583
  /**
1577
- * Resetea el contador de z-index (útil para testing)
1578
- * @param type Tipo específico a resetear, o undefined para resetear todos
2584
+ * Resets the z-index counter (useful for testing).
2585
+ * @param type Specific type to reset, or undefined to reset all
1579
2586
  */
1580
2587
  reset(type) {
1581
2588
  if (type) {
@@ -1583,41 +2590,39 @@ class DialogZIndexService {
1583
2590
  range.current = range.base;
1584
2591
  }
1585
2592
  else {
1586
- // Resetear todos los tipos
1587
- Object.entries(DialogZIndexService.Z_INDEX_RANGES).forEach(([_, range]) => {
2593
+ Object.values(DialogZIndexService.Z_INDEX_RANGES).forEach(range => {
1588
2594
  range.current = range.base;
1589
2595
  });
1590
2596
  }
1591
2597
  }
1592
2598
  /**
1593
- * Aplica z-index a un diálogo específico
1594
- * @param dialogRef Referencia al diálogo
1595
- * @param type Tipo de diálogo (determina el rango de z-index)
1596
- * @param zIndex Z-index específico a aplicar (opcional)
2599
+ * Applies a z-index to a specific dialog.
2600
+ * @param dialogRef Dialog reference
2601
+ * @param type Dialog type (determines the z-index range)
2602
+ * @param zIndex Specific z-index to apply (optional)
1597
2603
  */
1598
2604
  applyZIndex(dialogRef, type = 'normal', zIndex) {
1599
- const targetZIndex = zIndex || this.getNextZIndex(type);
1600
- setTimeout(() => {
1601
- const overlayRef = dialogRef._overlayRef;
1602
- if (overlayRef) {
1603
- const pane = overlayRef.overlayElement;
1604
- const backdrop = overlayRef.backdropElement;
1605
- if (pane) {
1606
- pane.style.zIndex = (targetZIndex + 2).toString();
1607
- // Agregar atributo data para debugging
1608
- pane.setAttribute('data-dialog-type', type);
1609
- pane.setAttribute('data-z-index', targetZIndex.toString());
1610
- }
1611
- if (backdrop) {
1612
- backdrop.style.zIndex = (targetZIndex + 1).toString();
1613
- }
1614
- }
1615
- }, 0);
2605
+ const targetZIndex = zIndex ?? this.getNextZIndex(type);
2606
+ const overlayRef = this.getOverlayRef(dialogRef);
2607
+ if (!overlayRef) {
2608
+ return;
2609
+ }
2610
+ const pane = overlayRef.overlayElement;
2611
+ const backdrop = overlayRef.backdropElement;
2612
+ if (pane) {
2613
+ pane.style.zIndex = (targetZIndex + 2).toString();
2614
+ // Data attributes for debugging
2615
+ pane.setAttribute('data-dialog-type', type);
2616
+ pane.setAttribute('data-z-index', targetZIndex.toString());
2617
+ }
2618
+ if (backdrop) {
2619
+ backdrop.style.zIndex = (targetZIndex + 1).toString();
2620
+ }
1616
2621
  }
1617
2622
  /**
1618
- * Trae un diálogo al frente (usado por drag functionality)
1619
- * @param element Elemento del diálogo a traer al frente
1620
- * @param type Tipo de diálogo
2623
+ * Brings a dialog to the front (used by the drag functionality).
2624
+ * @param element Dialog element to bring to the front
2625
+ * @param type Dialog type
1621
2626
  */
1622
2627
  bringToFront(element, type = 'normal') {
1623
2628
  const pane = element.closest('.cdk-overlay-pane');
@@ -1625,7 +2630,7 @@ class DialogZIndexService {
1625
2630
  const newZIndex = this.getNextZIndex(type);
1626
2631
  pane.style.zIndex = (newZIndex + 2).toString();
1627
2632
  pane.setAttribute('data-z-index', newZIndex.toString());
1628
- // También actualizar el backdrop si existe
2633
+ // Also update the backdrop if it exists
1629
2634
  const backdrop = pane.parentElement?.querySelector('.cdk-overlay-backdrop');
1630
2635
  if (backdrop) {
1631
2636
  backdrop.style.zIndex = (newZIndex + 1).toString();
@@ -1633,28 +2638,30 @@ class DialogZIndexService {
1633
2638
  }
1634
2639
  }
1635
2640
  /**
1636
- * Fuerza un diálogo a estar siempre encima de todos los demás
1637
- * Útil para alertas críticas que deben tener máxima prioridad
1638
- * @param dialogRef Referencia al diálogo
2641
+ * Forces a dialog to stay above every other dialog.
2642
+ * Useful for critical alerts that must have maximum priority.
2643
+ * @param dialogRef Dialog reference
1639
2644
  */
1640
2645
  forceToTop(dialogRef) {
1641
2646
  const highestZIndex = this.getHighestZIndex();
1642
2647
  const topZIndex = highestZIndex + DialogZIndexService.Z_INDEX_INCREMENT;
1643
- setTimeout(() => {
1644
- const overlayRef = dialogRef._overlayRef;
1645
- if (overlayRef) {
1646
- const pane = overlayRef.overlayElement;
1647
- const backdrop = overlayRef.backdropElement;
1648
- if (pane) {
1649
- pane.style.zIndex = (topZIndex + 2).toString();
1650
- pane.setAttribute('data-z-index', topZIndex.toString());
1651
- pane.setAttribute('data-forced-top', 'true');
1652
- }
1653
- if (backdrop) {
1654
- backdrop.style.zIndex = (topZIndex + 1).toString();
1655
- }
1656
- }
1657
- }, 0);
2648
+ const overlayRef = this.getOverlayRef(dialogRef);
2649
+ if (!overlayRef) {
2650
+ return;
2651
+ }
2652
+ const pane = overlayRef.overlayElement;
2653
+ const backdrop = overlayRef.backdropElement;
2654
+ if (pane) {
2655
+ pane.style.zIndex = (topZIndex + 2).toString();
2656
+ pane.setAttribute('data-z-index', topZIndex.toString());
2657
+ pane.setAttribute('data-forced-top', 'true');
2658
+ }
2659
+ if (backdrop) {
2660
+ backdrop.style.zIndex = (topZIndex + 1).toString();
2661
+ }
2662
+ }
2663
+ getOverlayRef(dialogRef) {
2664
+ return dialogRef._overlayRef;
1658
2665
  }
1659
2666
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: DialogZIndexService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1660
2667
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: DialogZIndexService, providedIn: 'root' });
@@ -1687,19 +2694,6 @@ class DialogWrapper {
1687
2694
  */
1688
2695
  header = viewChild('dialogHeader', /* @ts-ignore */
1689
2696
  ...(ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []));
1690
- /**
1691
- * Timeout ID for debouncing z-index updates to prevent excessive DOM manipulations.
1692
- */
1693
- bringToFrontTimeoutId = null;
1694
- /**
1695
- * Creates an instance of DialogWrapper.
1696
- *
1697
- * @param dialogRef Reference to the dialog opened via the Material Dialog service
1698
- * @param config Configuration for the dialog wrapper, injected from MAT_DIALOG_DATA
1699
- */
1700
- constructor() {
1701
- // Constructor intentionally empty - required by Angular DI
1702
- }
1703
2697
  /**
1704
2698
  * Lifecycle hook that initializes the dynamic content after the view is ready.
1705
2699
  * Creates the component specified in the config and passes data to it.
@@ -1708,19 +2702,16 @@ class DialogWrapper {
1708
2702
  // Dynamically create the content component after the view is ready.
1709
2703
  this.contentHost().clear();
1710
2704
  const componentRef = this.contentHost().createComponent(this.config.component);
1711
- // Pass the provided data directly to the new component's instance.
1712
- // This requires the content component to have an @Input() property named 'data'.
1713
- if (this.config.data && componentRef.instance) {
1714
- componentRef.instance.data = this.config.data;
1715
- }
1716
- }
1717
- /**
1718
- * Cleanup lifecycle hook to cancel any pending animation frame requests.
1719
- */
1720
- ngOnDestroy() {
1721
- if (this.bringToFrontTimeoutId !== null) {
1722
- cancelAnimationFrame(this.bringToFrontTimeoutId);
1723
- this.bringToFrontTimeoutId = null;
2705
+ // Pass the provided data to the new component. `setInput` supports both signal
2706
+ // inputs and decorator-based @Input() properties and marks the component dirty;
2707
+ // fall back to a plain property assignment when `data` is not declared as an input.
2708
+ if (this.config.data !== undefined && componentRef.instance) {
2709
+ try {
2710
+ componentRef.setInput('data', this.config.data);
2711
+ }
2712
+ catch {
2713
+ componentRef.instance.data = this.config.data;
2714
+ }
1724
2715
  }
1725
2716
  }
1726
2717
  /**
@@ -1742,12 +2733,12 @@ class DialogWrapper {
1742
2733
  }
1743
2734
  }
1744
2735
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: DialogWrapper, deps: [], target: i0.ɵɵFactoryTarget.Component });
1745
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: DialogWrapper, isStandalone: true, selector: "acp-dialog-wrapper", viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "header", first: true, predicate: ["dialogHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!config.hideHeader) {\n<div\n class=\"acp-dialog-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragHandle\n #dialogHeader\n (mousedown)=\"bringToFront()\"\n>\n <h6 mat-dialog-title class=\"acp-dialog-title\">\n @if (config.icon) {\n <mat-icon class=\"acp-dialog-title-icon\" aria-hidden=\"true\">{{ config.icon }}</mat-icon>\n }\n <span>{{ config.title }}</span>\n @if (config.showCloseButton !== false) {\n <acp-button\n [customClass]=\"'acp-dialog-close-btn'\"\n matStyle=\"icon\"\n icon=\"close\"\n (handleClick)=\"onClose()\"\n ariaLabel=\"Close Dialog\"\n />\n }\n </h6>\n</div>\n}\n\n<ng-template #contentHost />\n", styles: [".acp-dialog-header{cursor:move;border-bottom:1px solid var(--mat-sys-outline-variant, #dee2e6);color:var(--mat-sys-on-surface, #212529);position:relative}h6[mat-dialog-title].acp-dialog-title{display:flex;align-items:center;font-size:1.2rem;font-weight:500;margin:0;width:100%;padding-right:48px}.acp-dialog-title-icon{margin-right:12px;vertical-align:middle}h6[mat-dialog-title].acp-dialog-title span{flex-grow:1}mat-dialog-content{padding:24px}.acp-dialog-close-btn{position:absolute;top:8px;right:16px}\n"], dependencies: [{ kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: Button, selector: "acp-button", inputs: ["variant", "text", "icon", "disabled", "type", "matStyle", "customClass", "reportFormat", "extended", "title", "ariaLabel", "name", "id", "form", "tabIndex", "testId"], outputs: ["handleClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2736
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: DialogWrapper, isStandalone: true, selector: "acp-dialog-wrapper", viewQueries: [{ propertyName: "contentHost", first: true, predicate: ["contentHost"], descendants: true, read: ViewContainerRef, isSignal: true }, { propertyName: "header", first: true, predicate: ["dialogHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!config.hideHeader) {\n<div\n class=\"acp-dialog-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragHandle\n #dialogHeader\n (mousedown)=\"bringToFront()\"\n>\n <h6 mat-dialog-title class=\"acp-dialog-title\">\n @if (config.icon) {\n <mat-icon class=\"acp-dialog-title-icon\" aria-hidden=\"true\">{{ config.icon }}</mat-icon>\n }\n <span>{{ config.title }}</span>\n @if (config.showCloseButton !== false) {\n <acp-button\n [customClass]=\"'acp-dialog-close-btn'\"\n matStyle=\"icon\"\n icon=\"close\"\n (handleClick)=\"onClose()\"\n [ariaLabel]=\"config.closeAriaLabel ?? 'Close dialog'\"\n />\n }\n </h6>\n</div>\n}\n\n<ng-template #contentHost />\n", styles: [".acp-dialog-header{cursor:move;border-bottom:1px solid var(--mat-sys-outline-variant, #dee2e6);color:var(--mat-sys-on-surface, #212529);position:relative}h6[mat-dialog-title].acp-dialog-title{display:flex;align-items:center;font-size:1.2rem;font-weight:500;margin:0;width:100%;padding-right:48px}.acp-dialog-title-icon{margin-right:12px;vertical-align:middle}h6[mat-dialog-title].acp-dialog-title span{flex-grow:1}.acp-dialog-close-btn{position:absolute;top:8px;right:16px}\n"], dependencies: [{ kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: Button, selector: "acp-button", inputs: ["variant", "text", "icon", "disabled", "type", "matStyle", "customClass", "reportFormat", "extended", "title", "ariaLabel", "name", "id", "form", "tabIndex", "testId"], outputs: ["handleClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1746
2737
  }
1747
2738
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: DialogWrapper, decorators: [{
1748
2739
  type: Component,
1749
- args: [{ selector: 'acp-dialog-wrapper', standalone: true, imports: [CdkDrag, CdkDragHandle, MatDialogModule, MatIconModule, Button], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (!config.hideHeader) {\n<div\n class=\"acp-dialog-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragHandle\n #dialogHeader\n (mousedown)=\"bringToFront()\"\n>\n <h6 mat-dialog-title class=\"acp-dialog-title\">\n @if (config.icon) {\n <mat-icon class=\"acp-dialog-title-icon\" aria-hidden=\"true\">{{ config.icon }}</mat-icon>\n }\n <span>{{ config.title }}</span>\n @if (config.showCloseButton !== false) {\n <acp-button\n [customClass]=\"'acp-dialog-close-btn'\"\n matStyle=\"icon\"\n icon=\"close\"\n (handleClick)=\"onClose()\"\n ariaLabel=\"Close Dialog\"\n />\n }\n </h6>\n</div>\n}\n\n<ng-template #contentHost />\n", styles: [".acp-dialog-header{cursor:move;border-bottom:1px solid var(--mat-sys-outline-variant, #dee2e6);color:var(--mat-sys-on-surface, #212529);position:relative}h6[mat-dialog-title].acp-dialog-title{display:flex;align-items:center;font-size:1.2rem;font-weight:500;margin:0;width:100%;padding-right:48px}.acp-dialog-title-icon{margin-right:12px;vertical-align:middle}h6[mat-dialog-title].acp-dialog-title span{flex-grow:1}mat-dialog-content{padding:24px}.acp-dialog-close-btn{position:absolute;top:8px;right:16px}\n"] }]
1750
- }], ctorParameters: () => [], propDecorators: { contentHost: [{ type: i0.ViewChild, args: ['contentHost', { ...{
2740
+ args: [{ selector: 'acp-dialog-wrapper', standalone: true, imports: [CdkDrag, CdkDragHandle, MatDialogModule, MatIconModule, Button], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (!config.hideHeader) {\n<div\n class=\"acp-dialog-header\"\n cdkDrag\n cdkDragRootElement=\".cdk-overlay-pane\"\n cdkDragHandle\n #dialogHeader\n (mousedown)=\"bringToFront()\"\n>\n <h6 mat-dialog-title class=\"acp-dialog-title\">\n @if (config.icon) {\n <mat-icon class=\"acp-dialog-title-icon\" aria-hidden=\"true\">{{ config.icon }}</mat-icon>\n }\n <span>{{ config.title }}</span>\n @if (config.showCloseButton !== false) {\n <acp-button\n [customClass]=\"'acp-dialog-close-btn'\"\n matStyle=\"icon\"\n icon=\"close\"\n (handleClick)=\"onClose()\"\n [ariaLabel]=\"config.closeAriaLabel ?? 'Close dialog'\"\n />\n }\n </h6>\n</div>\n}\n\n<ng-template #contentHost />\n", styles: [".acp-dialog-header{cursor:move;border-bottom:1px solid var(--mat-sys-outline-variant, #dee2e6);color:var(--mat-sys-on-surface, #212529);position:relative}h6[mat-dialog-title].acp-dialog-title{display:flex;align-items:center;font-size:1.2rem;font-weight:500;margin:0;width:100%;padding-right:48px}.acp-dialog-title-icon{margin-right:12px;vertical-align:middle}h6[mat-dialog-title].acp-dialog-title span{flex-grow:1}.acp-dialog-close-btn{position:absolute;top:8px;right:16px}\n"] }]
2741
+ }], propDecorators: { contentHost: [{ type: i0.ViewChild, args: ['contentHost', { ...{
1751
2742
  read: ViewContainerRef,
1752
2743
  }, isSignal: true }] }], header: [{ type: i0.ViewChild, args: ['dialogHeader', { isSignal: true }] }] } });
1753
2744
 
@@ -8077,16 +9068,16 @@ class AcpDateRangeInput {
8077
9068
  * @param option The selected date option.
8078
9069
  * @param input The HTML input element to update.
8079
9070
  */
8080
- updateDateOnOptionSelect(option, input) {
9071
+ updateDateOnOptionSelect(option, input, emitEvent = true) {
8081
9072
  // If there is a callback function, use it to get the date range
8082
9073
  if (option?.callBackFunction) {
8083
9074
  const dateRange = option.callBackFunction();
8084
9075
  if (dateRange?.start && dateRange?.end) {
8085
- this.updateSelectedDates(input, dateRange.start, dateRange.end, option);
9076
+ this.updateSelectedDates(input, dateRange.start, dateRange.end, option, emitEvent);
8086
9077
  return;
8087
9078
  }
8088
9079
  }
8089
- this.updateDateWithSelectedOption(option, input);
9080
+ this.updateDateWithSelectedOption(option, input, emitEvent);
8090
9081
  }
8091
9082
  /**
8092
9083
  * Calculates and updates the start and end dates based on the selected option.
@@ -8094,7 +9085,7 @@ class AcpDateRangeInput {
8094
9085
  * @param option The selected date option.
8095
9086
  * @param input The HTML input element to update.
8096
9087
  */
8097
- updateDateWithSelectedOption(option, input) {
9088
+ updateDateWithSelectedOption(option, input, emitEvent = true) {
8098
9089
  const currDate = new Date();
8099
9090
  let startDate = new Date();
8100
9091
  let lastDate = new Date();
@@ -8127,7 +9118,7 @@ class AcpDateRangeInput {
8127
9118
  break;
8128
9119
  }
8129
9120
  // Update the selected dates
8130
- this.updateSelectedDates(input, startDate, lastDate, option);
9121
+ this.updateSelectedDates(input, startDate, lastDate, option, emitEvent);
8131
9122
  }
8132
9123
  /**
8133
9124
  * Updates the date range and input display.
@@ -8137,7 +9128,7 @@ class AcpDateRangeInput {
8137
9128
  * @param end End date of the range.
8138
9129
  * @param opt Optional selected date option.
8139
9130
  */
8140
- updateSelectedDates(input, start, end, opt) {
9131
+ updateSelectedDates(input, start, end, opt, emitEvent = true) {
8141
9132
  const range = new DateRange(start, end);
8142
9133
  this.selectedDates = range;
8143
9134
  const expr = this.resolveDisplayExpr(start, end, opt);
@@ -8151,12 +9142,14 @@ class AcpDateRangeInput {
8151
9142
  else {
8152
9143
  input.value = rangeLabel;
8153
9144
  }
8154
- this.dateSelectionChanged.emit({
8155
- range,
8156
- selectedOption: this.dateDropDownOptions.find(o => o.isSelected) ?? null,
8157
- startExpr: expr.start,
8158
- endExpr: expr.end,
8159
- });
9145
+ if (emitEvent) {
9146
+ this.dateSelectionChanged.emit({
9147
+ range,
9148
+ selectedOption: this.dateDropDownOptions.find(o => o.isSelected) ?? null,
9149
+ startExpr: expr.start,
9150
+ endExpr: expr.end,
9151
+ });
9152
+ }
8160
9153
  this.cdref.markForCheck();
8161
9154
  }
8162
9155
  /**
@@ -8185,7 +9178,7 @@ class AcpDateRangeInput {
8185
9178
  }
8186
9179
  const selectedOptions = this._dateOptions().find(option => option.isSelected);
8187
9180
  if (selectedOptions && selectedOptions.optionType !== ACP_DATE_OPTION_TYPE.CUSTOM) {
8188
- this.updatedFromListValueSelection(selectedOptions, input);
9181
+ this.updatedFromListValueSelection(selectedOptions, input, false);
8189
9182
  this.cdref.detectChanges();
8190
9183
  }
8191
9184
  }
@@ -8259,15 +9252,15 @@ class AcpDateRangeInput {
8259
9252
  * @param selectedOption The selected date option.
8260
9253
  * @param input The HTML input element to update.
8261
9254
  */
8262
- updatedFromListValueSelection(selectedOption, input) {
9255
+ updatedFromListValueSelection(selectedOption, input, emitEvent = true) {
8263
9256
  // This will update value if option is selected from default list.
8264
9257
  if (!selectedOption.callBackFunction) {
8265
- this.updateDateOnOptionSelect(selectedOption, input);
9258
+ this.updateDateOnOptionSelect(selectedOption, input, emitEvent);
8266
9259
  return;
8267
9260
  }
8268
9261
  // This will update value if option is selected from provided custom list.
8269
9262
  const dateRange = selectedOption.callBackFunction();
8270
- this.updateSelectedDates(input, dateRange.start ?? new Date(), dateRange.end ?? new Date(), selectedOption);
9263
+ this.updateSelectedDates(input, dateRange.start ?? new Date(), dateRange.end ?? new Date(), selectedOption, emitEvent);
8271
9264
  }
8272
9265
  /**
8273
9266
  * Checks whether default initialization of options is required.
@@ -8288,7 +9281,7 @@ class AcpDateRangeInput {
8288
9281
  this._dateOptions.set(options);
8289
9282
  }
8290
9283
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDateRangeInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
8291
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AcpDateRangeInput, isStandalone: true, selector: "acp-date-range-input", inputs: { inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: false, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, showCalendarIcon: { classPropertyName: "showCalendarIcon", publicName: "showCalendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showRangeRequired: { classPropertyName: "showRangeRequired", publicName: "showRangeRequired", isSignal: true, isRequired: false, transformFunction: null }, isRangeRequired: { classPropertyName: "isRangeRequired", publicName: "isRangeRequired", isSignal: true, isRequired: false, transformFunction: null }, staticOptionId: { classPropertyName: "staticOptionId", publicName: "staticOptionId", isSignal: false, isRequired: false, transformFunction: null }, dynamicOptionId: { classPropertyName: "dynamicOptionId", publicName: "dynamicOptionId", isSignal: false, isRequired: false, transformFunction: null }, calendarId: { classPropertyName: "calendarId", publicName: "calendarId", isSignal: false, isRequired: false, transformFunction: null }, enableDefaultOptions: { classPropertyName: "enableDefaultOptions", publicName: "enableDefaultOptions", isSignal: false, isRequired: false, transformFunction: null }, selectedDates: { classPropertyName: "selectedDates", publicName: "selectedDates", isSignal: false, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: false, isRequired: false, transformFunction: null }, isShowStaticDefaultOptions: { classPropertyName: "isShowStaticDefaultOptions", publicName: "isShowStaticDefaultOptions", isSignal: false, isRequired: false, transformFunction: null }, hideDefaultOptions: { classPropertyName: "hideDefaultOptions", publicName: "hideDefaultOptions", isSignal: false, isRequired: false, transformFunction: null }, cdkConnectedOverlayOffsetX: { classPropertyName: "cdkConnectedOverlayOffsetX", publicName: "cdkConnectedOverlayOffsetX", isSignal: false, isRequired: false, transformFunction: null }, cdkConnectedOverlayOffsetY: { classPropertyName: "cdkConnectedOverlayOffsetY", publicName: "cdkConnectedOverlayOffsetY", isSignal: false, isRequired: false, transformFunction: null }, listCdkConnectedOverlayOffsetY: { classPropertyName: "listCdkConnectedOverlayOffsetY", publicName: "listCdkConnectedOverlayOffsetY", isSignal: false, isRequired: false, transformFunction: null }, listCdkConnectedOverlayOffsetX: { classPropertyName: "listCdkConnectedOverlayOffsetX", publicName: "listCdkConnectedOverlayOffsetX", isSignal: false, isRequired: false, transformFunction: null }, selectedOptionIndex: { classPropertyName: "selectedOptionIndex", publicName: "selectedOptionIndex", isSignal: false, isRequired: false, transformFunction: null }, displaySelectedLabel: { classPropertyName: "displaySelectedLabel", publicName: "displaySelectedLabel", isSignal: false, isRequired: false, transformFunction: null }, displaySelectedExpression: { classPropertyName: "displaySelectedExpression", publicName: "displaySelectedExpression", isSignal: false, isRequired: false, transformFunction: null }, enableEditableDates: { classPropertyName: "enableEditableDates", publicName: "enableEditableDates", isSignal: false, isRequired: false, transformFunction: null }, cdkConnectedOverlayPush: { classPropertyName: "cdkConnectedOverlayPush", publicName: "cdkConnectedOverlayPush", isSignal: false, isRequired: false, transformFunction: null }, cdkConnectedOverlayPositions: { classPropertyName: "cdkConnectedOverlayPositions", publicName: "cdkConnectedOverlayPositions", isSignal: false, isRequired: false, transformFunction: null }, allowSingleDateSelection: { classPropertyName: "allowSingleDateSelection", publicName: "allowSingleDateSelection", isSignal: false, isRequired: false, transformFunction: null }, autoSelectOption: { classPropertyName: "autoSelectOption", publicName: "autoSelectOption", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, dateDropDownOptions: { classPropertyName: "dateDropDownOptions", publicName: "dateDropDownOptions", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { dateSelectionChanged: "dateSelectionChanged", dateListOptions: "dateListOptions", rangeRequiredChange: "rangeRequiredChange" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], ngImport: i0, template: "<!--\n AcpDateRangeInput Component Template\n @author AcontPlus S.A.S\n @version 1.0.0\n\n Comprehensive date range picker with predefined options, custom calendar selection,\n and support for human-readable date expressions.\n-->\n<div class=\"date-picker-main ndp-main\" cdkOverlayOrigin #trigger>\n <mat-form-field\n class=\"w-full\"\n [class]=\"{ 'display-hidden': isShowStaticDefaultOptions }\"\n (click)=\"toggleDateOptionSelectionList($event)\"\n >\n <mat-label (click)=\"toggleDateOptionSelectionList($event)\">{{ inputLabel }}</mat-label>\n <input\n matInput\n #dateInput\n class=\"cursor-pointer\"\n id=\"date-input-field\"\n (input)=\"onMainInputChange(dateInput)\"\n />\n <ng-container matSuffix>\n @if (showClearButton() && !!dateInput.value) {\n <button\n mat-icon-button\n class=\"cursor-pointer pe-0 ps-0\"\n matTooltip=\"Clear\"\n (click)=\"clearSelection($event)\"\n >\n <mat-icon>clear</mat-icon>\n </button>\n } @if (showCalendarIcon()) {\n <button mat-icon-button class=\"cursor-pointer\">\n <mat-icon>date_range</mat-icon>\n </button>\n } @if (showRangeRequired()) {\n <button\n mat-icon-button\n class=\"cursor-pointer\"\n [class.checked]=\"isRangeRequired()\"\n (click)=\"toggleRangeSelection($event)\"\n matTooltip=\"Rango de fechas obligatorio\"\n >\n <mat-icon [color]=\"isRangeRequired() ? 'accent' : ''\">\n {{ isRangeRequired() ? 'check_box' : 'check_box_outline_blank' }}\n </mat-icon>\n </button>\n }\n </ng-container>\n </mat-form-field>\n\n @if (dateDropDownOptions.length && isShowStaticDefaultOptions) {\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n optionId: staticOptionId,\n className: 'w-full custom-ckd-container ndp-cdk-container range-input',\n }\n \"\n />\n }\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDateOptionList\"\n [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n [cdkConnectedOverlayOffsetX]=\"listCdkConnectedOverlayOffsetX\"\n [cdkConnectedOverlayOffsetY]=\"listCdkConnectedOverlayOffsetY\"\n (backdropClick)=\"isDateOptionList = false\"\n >\n @if (dateDropDownOptions.length && !isShowStaticDefaultOptions) {\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n optionId: dynamicOptionId,\n className: 'w-full custom-ckd-container ndp-cdk-container range-input',\n }\n \"\n />\n }\n </ng-template>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isCustomRange\"\n [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n [cdkConnectedOverlayPositions]=\"cdkConnectedOverlayPositions\"\n [cdkConnectedOverlayOffsetX]=\"cdkConnectedOverlayOffsetX\"\n [cdkConnectedOverlayOffsetY]=\"cdkConnectedOverlayOffsetY\"\n (backdropClick)=\"isCustomRange = false\"\n >\n <div\n class=\"custom-ckd-container ndp-cdk-container custom-calendar-container ndp-calendar-container\"\n [class]=\"{ 'without-default-opt': hideDefaultOptions }\"\n >\n <div class=\"row-1\">\n @if (!hideDefaultOptions) {\n <div class=\"pt-custom column-1\">\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n }\n \"\n />\n </div>\n <div class=\"ndp-column-separator\"></div>\n }\n <div class=\"mt-2 column-2\">\n <acp-date-range-calendar\n [selectedDates]=\"selectedDates\"\n #calendar\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (selectedDatesChange)=\"onCalendarSelectionChange($event)\"\n />\n </div>\n </div>\n <div class=\"row-2 br-top\">\n <div class=\"footer-content ndp-footer-content\">\n @if (enableEditableDates) {\n <form class=\"ndp-date-inputs\" [formGroup]=\"editableForm\">\n <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n <mat-label>Start</mat-label>\n <input\n matInput\n formControlName=\"start\"\n placeholder=\"e.g. now-7d\"\n (blur)=\"commitEditableDates(calendar)\"\n (keydown.enter)=\"applyEditableDates(dateInput, calendar)\"\n />\n @if (editableForm.controls.start.hasError('required')) {\n <mat-error>Required</mat-error>\n } @else if (editableForm.controls.start.hasError('invalidDate')) {\n <mat-error>Invalid date or expression</mat-error>\n }\n </mat-form-field>\n <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n <mat-label>End</mat-label>\n <input\n matInput\n formControlName=\"end\"\n placeholder=\"e.g. now\"\n (blur)=\"commitEditableDates(calendar)\"\n (keydown.enter)=\"applyEditableDates(dateInput, calendar)\"\n />\n @if (editableForm.controls.end.hasError('required')) {\n <mat-error>Required</mat-error>\n } @else if (editableForm.controls.end.hasError('invalidDate')) {\n <mat-error>Invalid date or expression</mat-error>\n } @else if (editableForm.hasError('rangeOrder')) {\n <mat-error>Start must be before end</mat-error>\n }\n </mat-form-field>\n </form>\n } @else {\n <span id=\"range-label-text\" class=\"ndp-range-label-text\">\n {{ calendar.selectedDates?.start | date: dateFormat }} @if (calendar.selectedDates?.end)\n {\n <span> - {{ calendar.selectedDates?.end | date: dateFormat }} </span>\n }\n </span>\n }\n <div class=\"buttons\">\n <acp-button\n type=\"button\"\n appearance=\"filled\"\n color=\"primary\"\n size=\"small\"\n [class.disabled]=\"\n enableEditableDates\n ? editableForm.invalid\n : !(calendar.selectedDates?.start && calendar.selectedDates?.end)\n \"\n (clicked)=\"\n enableEditableDates && commitEditableDates(calendar);\n updateCustomRange(dateInput, calendar.selectedDates)\n \"\n >\n &nbsp;Aplicar&nbsp;\n </acp-button>\n <acp-button\n type=\"button\"\n appearance=\"text\"\n color=\"error\"\n size=\"small\"\n (clicked)=\"isCustomRange = false\"\n >Cancelar</acp-button\n >\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n</div>\n\n<ng-template\n #dateOptionList\n let-options\n let-input=\"dateInput\"\n let-optionId=\"optionId\"\n let-className=\"className\"\n>\n <mat-action-list [ngClass]=\"className\" [id]=\"optionId\">\n @for (option of options; track option.optionLabel) {\n <mat-list-item [activated]=\"option.isSelected\" (click)=\"updateSelection(option, input)\">\n {{ option.optionLabel }}\n </mat-list-item>\n }\n </mat-action-list>\n</ng-template>\n", styles: ["::ng-deep .cdk-overlay-dark-backdrop{background:none}mat-list-item.mat-mdc-list-item{height:40px}mat-list-item.mdc-list-item--activated{background-color:var(--ndp-selected-option-bg, var(--mat-sys-secondary-container, rgba(0, 0, 0, .08)))}::ng-deep .cdk-overlay-pane:has(.custom-ckd-container),::ng-deep .cdk-overlay-pane:has(.ndp-cdk-container){width:100%;background-color:var(--mat-sys-surface-container);max-height:100vh;overflow-y:auto;overflow-x:hidden;max-width:700px;margin-top:-22px;border:1px solid var(--mat-sys-surface-container)}::ng-deep .cdk-overlay-pane:has(.range-input){max-width:250px}.br-top{border-top:1px solid var(--mat-sys-surface-container)}.br-right{border-right:1px solid var(--mat-sys-surface-container)}.disabled{pointer-events:none;opacity:.5}.mat-button,.mdc-button{font-family:var(--mat-list-list-item-label-text-font);line-height:var(--mat-list-list-item-label-text-line-height);font-size:var(--mat-list-list-item-label-text-size);font-weight:var(--mat-list-list-item-label-text-weight);letter-spacing:var(--mat-list-list-item-label-text-tracking)}.w-full{width:100%}.display-hidden{display:none}.custom-calendar-container,.ndp-calendar-container{width:100%}.row-1,.row-2{width:100%;box-sizing:border-box}.row-1{display:flex;align-items:stretch}.row-2{padding:16px}.ndp-column-separator{flex:0 0 1px;background-color:var(--mat-sys-surface-container)}.footer-content,.ndp-footer-content{align-items:center;display:flex;text-align:right;justify-content:end;gap:16px;text-overflow:ellipsis}.footer-content .buttons,.ndp-footer-content .buttons{display:flex;gap:8px}.ndp-date-inputs{display:flex;gap:8px;margin-right:auto;align-items:flex-start}.ndp-date-field{width:150px}.column-1{flex:0 0 25%;overflow:auto}.column-2{flex:1 1 auto;min-width:0}.without-default-opt .column-1{display:none}@media(max-width:400px){.footer-content,.ndp-footer-content{display:block}.footer-content .buttons,.ndp-footer-content .buttons{justify-content:flex-end;margin-top:20px}#range-label-text{margin-right:1.5rem}}@media(max-width:650px){.row-1{flex-direction:column}.column-1{flex-basis:auto}.column-separator{display:none}}.pe-0{padding-right:0}.ps-0{padding-left:0}button.checked{color:var(--mat-sys-primary);border-radius:4px}.ndp-range-label-text{color:var(--mat-sys-on-surface)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatActionList, selector: "mat-action-list", exportAs: ["matActionList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AcpDateRangeCalendar, selector: "acp-date-range-calendar", inputs: ["minDate", "maxDate", "selectedDates"], outputs: ["selectedDatesChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AcpButton, selector: "acp-button" }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9284
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: AcpDateRangeInput, isStandalone: true, selector: "acp-date-range-input", inputs: { inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: false, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, showCalendarIcon: { classPropertyName: "showCalendarIcon", publicName: "showCalendarIcon", isSignal: true, isRequired: false, transformFunction: null }, showRangeRequired: { classPropertyName: "showRangeRequired", publicName: "showRangeRequired", isSignal: true, isRequired: false, transformFunction: null }, isRangeRequired: { classPropertyName: "isRangeRequired", publicName: "isRangeRequired", isSignal: true, isRequired: false, transformFunction: null }, staticOptionId: { classPropertyName: "staticOptionId", publicName: "staticOptionId", isSignal: false, isRequired: false, transformFunction: null }, dynamicOptionId: { classPropertyName: "dynamicOptionId", publicName: "dynamicOptionId", isSignal: false, isRequired: false, transformFunction: null }, calendarId: { classPropertyName: "calendarId", publicName: "calendarId", isSignal: false, isRequired: false, transformFunction: null }, enableDefaultOptions: { classPropertyName: "enableDefaultOptions", publicName: "enableDefaultOptions", isSignal: false, isRequired: false, transformFunction: null }, selectedDates: { classPropertyName: "selectedDates", publicName: "selectedDates", isSignal: false, isRequired: false, transformFunction: null }, dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: false, isRequired: false, transformFunction: null }, isShowStaticDefaultOptions: { classPropertyName: "isShowStaticDefaultOptions", publicName: "isShowStaticDefaultOptions", isSignal: false, isRequired: false, transformFunction: null }, hideDefaultOptions: { classPropertyName: "hideDefaultOptions", publicName: "hideDefaultOptions", isSignal: false, isRequired: false, transformFunction: null }, cdkConnectedOverlayOffsetX: { classPropertyName: "cdkConnectedOverlayOffsetX", publicName: "cdkConnectedOverlayOffsetX", isSignal: false, isRequired: false, transformFunction: null }, cdkConnectedOverlayOffsetY: { classPropertyName: "cdkConnectedOverlayOffsetY", publicName: "cdkConnectedOverlayOffsetY", isSignal: false, isRequired: false, transformFunction: null }, listCdkConnectedOverlayOffsetY: { classPropertyName: "listCdkConnectedOverlayOffsetY", publicName: "listCdkConnectedOverlayOffsetY", isSignal: false, isRequired: false, transformFunction: null }, listCdkConnectedOverlayOffsetX: { classPropertyName: "listCdkConnectedOverlayOffsetX", publicName: "listCdkConnectedOverlayOffsetX", isSignal: false, isRequired: false, transformFunction: null }, selectedOptionIndex: { classPropertyName: "selectedOptionIndex", publicName: "selectedOptionIndex", isSignal: false, isRequired: false, transformFunction: null }, displaySelectedLabel: { classPropertyName: "displaySelectedLabel", publicName: "displaySelectedLabel", isSignal: false, isRequired: false, transformFunction: null }, displaySelectedExpression: { classPropertyName: "displaySelectedExpression", publicName: "displaySelectedExpression", isSignal: false, isRequired: false, transformFunction: null }, enableEditableDates: { classPropertyName: "enableEditableDates", publicName: "enableEditableDates", isSignal: false, isRequired: false, transformFunction: null }, cdkConnectedOverlayPush: { classPropertyName: "cdkConnectedOverlayPush", publicName: "cdkConnectedOverlayPush", isSignal: false, isRequired: false, transformFunction: null }, cdkConnectedOverlayPositions: { classPropertyName: "cdkConnectedOverlayPositions", publicName: "cdkConnectedOverlayPositions", isSignal: false, isRequired: false, transformFunction: null }, allowSingleDateSelection: { classPropertyName: "allowSingleDateSelection", publicName: "allowSingleDateSelection", isSignal: false, isRequired: false, transformFunction: null }, autoSelectOption: { classPropertyName: "autoSelectOption", publicName: "autoSelectOption", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, dateDropDownOptions: { classPropertyName: "dateDropDownOptions", publicName: "dateDropDownOptions", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { dateSelectionChanged: "dateSelectionChanged", dateListOptions: "dateListOptions", rangeRequiredChange: "rangeRequiredChange" }, viewQueries: [{ propertyName: "calendar", first: true, predicate: ["calendar"], descendants: true }], ngImport: i0, template: "<!--\n AcpDateRangeInput Component Template\n @author AcontPlus S.A.S\n @version 1.0.0\n\n Comprehensive date range picker with predefined options, custom calendar selection,\n and support for human-readable date expressions.\n-->\n<div class=\"date-picker-main ndp-main\" cdkOverlayOrigin #trigger>\n <mat-form-field\n class=\"w-full\"\n [class]=\"{ 'display-hidden': isShowStaticDefaultOptions }\"\n (click)=\"toggleDateOptionSelectionList($event)\"\n >\n <mat-label (click)=\"toggleDateOptionSelectionList($event)\">{{ inputLabel }}</mat-label>\n <input\n matInput\n #dateInput\n class=\"cursor-pointer\"\n id=\"date-input-field\"\n (input)=\"onMainInputChange(dateInput)\"\n />\n <ng-container matSuffix>\n @if (showClearButton() && !!dateInput.value) {\n <button\n mat-icon-button\n class=\"cursor-pointer pe-0 ps-0\"\n matTooltip=\"Clear\"\n (click)=\"clearSelection($event)\"\n >\n <mat-icon>clear</mat-icon>\n </button>\n } @if (showCalendarIcon()) {\n <button mat-icon-button class=\"cursor-pointer\">\n <mat-icon>date_range</mat-icon>\n </button>\n } @if (showRangeRequired()) {\n <button\n mat-icon-button\n class=\"cursor-pointer\"\n [class.checked]=\"isRangeRequired()\"\n (click)=\"toggleRangeSelection($event)\"\n matTooltip=\"Rango de fechas obligatorio\"\n >\n <mat-icon [color]=\"isRangeRequired() ? 'accent' : ''\">\n {{ isRangeRequired() ? 'check_box' : 'check_box_outline_blank' }}\n </mat-icon>\n </button>\n }\n </ng-container>\n </mat-form-field>\n\n @if (dateDropDownOptions.length && isShowStaticDefaultOptions) {\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n optionId: staticOptionId,\n className: 'w-full custom-ckd-container ndp-cdk-container range-input',\n }\n \"\n />\n }\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDateOptionList\"\n [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n [cdkConnectedOverlayOffsetX]=\"listCdkConnectedOverlayOffsetX\"\n [cdkConnectedOverlayOffsetY]=\"listCdkConnectedOverlayOffsetY\"\n (backdropClick)=\"isDateOptionList = false\"\n >\n @if (dateDropDownOptions.length && !isShowStaticDefaultOptions) {\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n optionId: dynamicOptionId,\n className: 'w-full custom-ckd-container ndp-cdk-container range-input',\n }\n \"\n />\n }\n </ng-template>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isCustomRange\"\n [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n [cdkConnectedOverlayPositions]=\"cdkConnectedOverlayPositions\"\n [cdkConnectedOverlayOffsetX]=\"cdkConnectedOverlayOffsetX\"\n [cdkConnectedOverlayOffsetY]=\"cdkConnectedOverlayOffsetY\"\n (backdropClick)=\"isCustomRange = false\"\n >\n <div\n class=\"custom-ckd-container ndp-cdk-container custom-calendar-container ndp-calendar-container\"\n [class]=\"{ 'without-default-opt': hideDefaultOptions }\"\n >\n <div class=\"row-1\">\n @if (!hideDefaultOptions) {\n <div class=\"pt-custom column-1\">\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n }\n \"\n />\n </div>\n <div class=\"ndp-column-separator\"></div>\n }\n <div class=\"mt-2 column-2\">\n <acp-date-range-calendar\n [selectedDates]=\"selectedDates\"\n #calendar\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (selectedDatesChange)=\"onCalendarSelectionChange($event)\"\n />\n </div>\n </div>\n <div class=\"row-2 br-top\">\n <div class=\"footer-content ndp-footer-content\">\n @if (enableEditableDates) {\n <form class=\"ndp-date-inputs\" [formGroup]=\"editableForm\">\n <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n <mat-label>Start</mat-label>\n <input\n matInput\n formControlName=\"start\"\n placeholder=\"e.g. now-7d\"\n (blur)=\"commitEditableDates(calendar)\"\n (keydown.enter)=\"applyEditableDates(dateInput, calendar)\"\n />\n @if (editableForm.controls.start.hasError('required')) {\n <mat-error>Required</mat-error>\n } @else if (editableForm.controls.start.hasError('invalidDate')) {\n <mat-error>Invalid date or expression</mat-error>\n }\n </mat-form-field>\n <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n <mat-label>End</mat-label>\n <input\n matInput\n formControlName=\"end\"\n placeholder=\"e.g. now\"\n (blur)=\"commitEditableDates(calendar)\"\n (keydown.enter)=\"applyEditableDates(dateInput, calendar)\"\n />\n @if (editableForm.controls.end.hasError('required')) {\n <mat-error>Required</mat-error>\n } @else if (editableForm.controls.end.hasError('invalidDate')) {\n <mat-error>Invalid date or expression</mat-error>\n } @else if (editableForm.hasError('rangeOrder')) {\n <mat-error>Start must be before end</mat-error>\n }\n </mat-form-field>\n </form>\n } @else {\n <span id=\"range-label-text\" class=\"ndp-range-label-text\">\n {{ calendar.selectedDates?.start | date: dateFormat }} @if (calendar.selectedDates?.end)\n {\n <span> - {{ calendar.selectedDates?.end | date: dateFormat }} </span>\n }\n </span>\n }\n <div class=\"buttons\">\n <acp-button\n type=\"button\"\n appearance=\"filled\"\n color=\"primary\"\n size=\"small\"\n [class.disabled]=\"\n enableEditableDates\n ? editableForm.invalid\n : !(calendar.selectedDates?.start && calendar.selectedDates?.end)\n \"\n (clicked)=\"\n enableEditableDates && commitEditableDates(calendar);\n updateCustomRange(dateInput, calendar.selectedDates)\n \"\n >\n &nbsp;Aplicar&nbsp;\n </acp-button>\n <acp-button\n type=\"button\"\n appearance=\"text\"\n color=\"error\"\n size=\"small\"\n (clicked)=\"isCustomRange = false\"\n >Cancelar</acp-button\n >\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n</div>\n\n<ng-template\n #dateOptionList\n let-options\n let-input=\"dateInput\"\n let-optionId=\"optionId\"\n let-className=\"className\"\n>\n <mat-action-list [ngClass]=\"className\" [id]=\"optionId\">\n @for (option of options; track option.optionLabel) {\n <mat-list-item [activated]=\"option.isSelected\" (click)=\"updateSelection(option, input)\">\n {{ option.optionLabel }}\n </mat-list-item>\n }\n </mat-action-list>\n</ng-template>\n", styles: ["mat-list-item.mat-mdc-list-item{height:40px}mat-list-item.mdc-list-item--activated{background-color:var(--ndp-selected-option-bg, var(--mat-sys-secondary-container, rgba(0, 0, 0, .08)))}::ng-deep .cdk-overlay-pane:has(.custom-ckd-container),::ng-deep .cdk-overlay-pane:has(.ndp-cdk-container){width:100%;background-color:var(--mat-sys-surface-container);max-height:100vh;overflow-y:auto;overflow-x:hidden;max-width:700px;margin-top:0;border:1px solid var(--mat-sys-surface-container)}::ng-deep .cdk-overlay-pane:has(.range-input){max-width:250px}.br-top{border-top:1px solid var(--mat-sys-surface-container)}.br-right{border-right:1px solid var(--mat-sys-surface-container)}.disabled{pointer-events:none;opacity:.5}.mat-button,.mdc-button{font-family:var(--mat-list-list-item-label-text-font);line-height:var(--mat-list-list-item-label-text-line-height);font-size:var(--mat-list-list-item-label-text-size);font-weight:var(--mat-list-list-item-label-text-weight);letter-spacing:var(--mat-list-list-item-label-text-tracking)}.w-full{width:100%}.display-hidden{display:none}.custom-calendar-container,.ndp-calendar-container{width:100%}.row-1,.row-2{width:100%;box-sizing:border-box}.row-1{display:flex;align-items:stretch}.row-2{padding:16px}.ndp-column-separator{flex:0 0 1px;background-color:var(--mat-sys-surface-container)}.footer-content,.ndp-footer-content{align-items:center;display:flex;text-align:right;justify-content:end;gap:16px;text-overflow:ellipsis}.footer-content .buttons,.ndp-footer-content .buttons{display:flex;gap:8px}.ndp-date-inputs{display:flex;gap:8px;margin-right:auto;align-items:flex-start}.ndp-date-field{width:150px}.column-1{flex:0 0 25%;overflow:auto}.column-2{flex:1 1 auto;min-width:0}.without-default-opt .column-1{display:none}@media(max-width:400px){.footer-content,.ndp-footer-content{display:block}.footer-content .buttons,.ndp-footer-content .buttons{justify-content:flex-end;margin-top:20px}#range-label-text{margin-right:1.5rem}}@media(max-width:650px){.row-1{flex-direction:column}.column-1{flex-basis:auto}.column-separator{display:none}}.pe-0{padding-right:0}.ps-0{padding-left:0}button.checked{color:var(--mat-sys-primary);border-radius:4px}.ndp-range-label-text{color:var(--mat-sys-on-surface)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i3$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatActionList, selector: "mat-action-list", exportAs: ["matActionList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AcpDateRangeCalendar, selector: "acp-date-range-calendar", inputs: ["minDate", "maxDate", "selectedDates"], outputs: ["selectedDatesChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AcpButton, selector: "acp-button" }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8292
9285
  }
8293
9286
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: AcpDateRangeInput, decorators: [{
8294
9287
  type: Component,
@@ -8311,7 +9304,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
8311
9304
  DatePipe,
8312
9305
  NgTemplateOutlet,
8313
9306
  AcpButton,
8314
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n AcpDateRangeInput Component Template\n @author AcontPlus S.A.S\n @version 1.0.0\n\n Comprehensive date range picker with predefined options, custom calendar selection,\n and support for human-readable date expressions.\n-->\n<div class=\"date-picker-main ndp-main\" cdkOverlayOrigin #trigger>\n <mat-form-field\n class=\"w-full\"\n [class]=\"{ 'display-hidden': isShowStaticDefaultOptions }\"\n (click)=\"toggleDateOptionSelectionList($event)\"\n >\n <mat-label (click)=\"toggleDateOptionSelectionList($event)\">{{ inputLabel }}</mat-label>\n <input\n matInput\n #dateInput\n class=\"cursor-pointer\"\n id=\"date-input-field\"\n (input)=\"onMainInputChange(dateInput)\"\n />\n <ng-container matSuffix>\n @if (showClearButton() && !!dateInput.value) {\n <button\n mat-icon-button\n class=\"cursor-pointer pe-0 ps-0\"\n matTooltip=\"Clear\"\n (click)=\"clearSelection($event)\"\n >\n <mat-icon>clear</mat-icon>\n </button>\n } @if (showCalendarIcon()) {\n <button mat-icon-button class=\"cursor-pointer\">\n <mat-icon>date_range</mat-icon>\n </button>\n } @if (showRangeRequired()) {\n <button\n mat-icon-button\n class=\"cursor-pointer\"\n [class.checked]=\"isRangeRequired()\"\n (click)=\"toggleRangeSelection($event)\"\n matTooltip=\"Rango de fechas obligatorio\"\n >\n <mat-icon [color]=\"isRangeRequired() ? 'accent' : ''\">\n {{ isRangeRequired() ? 'check_box' : 'check_box_outline_blank' }}\n </mat-icon>\n </button>\n }\n </ng-container>\n </mat-form-field>\n\n @if (dateDropDownOptions.length && isShowStaticDefaultOptions) {\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n optionId: staticOptionId,\n className: 'w-full custom-ckd-container ndp-cdk-container range-input',\n }\n \"\n />\n }\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDateOptionList\"\n [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n [cdkConnectedOverlayOffsetX]=\"listCdkConnectedOverlayOffsetX\"\n [cdkConnectedOverlayOffsetY]=\"listCdkConnectedOverlayOffsetY\"\n (backdropClick)=\"isDateOptionList = false\"\n >\n @if (dateDropDownOptions.length && !isShowStaticDefaultOptions) {\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n optionId: dynamicOptionId,\n className: 'w-full custom-ckd-container ndp-cdk-container range-input',\n }\n \"\n />\n }\n </ng-template>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isCustomRange\"\n [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n [cdkConnectedOverlayPositions]=\"cdkConnectedOverlayPositions\"\n [cdkConnectedOverlayOffsetX]=\"cdkConnectedOverlayOffsetX\"\n [cdkConnectedOverlayOffsetY]=\"cdkConnectedOverlayOffsetY\"\n (backdropClick)=\"isCustomRange = false\"\n >\n <div\n class=\"custom-ckd-container ndp-cdk-container custom-calendar-container ndp-calendar-container\"\n [class]=\"{ 'without-default-opt': hideDefaultOptions }\"\n >\n <div class=\"row-1\">\n @if (!hideDefaultOptions) {\n <div class=\"pt-custom column-1\">\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n }\n \"\n />\n </div>\n <div class=\"ndp-column-separator\"></div>\n }\n <div class=\"mt-2 column-2\">\n <acp-date-range-calendar\n [selectedDates]=\"selectedDates\"\n #calendar\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (selectedDatesChange)=\"onCalendarSelectionChange($event)\"\n />\n </div>\n </div>\n <div class=\"row-2 br-top\">\n <div class=\"footer-content ndp-footer-content\">\n @if (enableEditableDates) {\n <form class=\"ndp-date-inputs\" [formGroup]=\"editableForm\">\n <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n <mat-label>Start</mat-label>\n <input\n matInput\n formControlName=\"start\"\n placeholder=\"e.g. now-7d\"\n (blur)=\"commitEditableDates(calendar)\"\n (keydown.enter)=\"applyEditableDates(dateInput, calendar)\"\n />\n @if (editableForm.controls.start.hasError('required')) {\n <mat-error>Required</mat-error>\n } @else if (editableForm.controls.start.hasError('invalidDate')) {\n <mat-error>Invalid date or expression</mat-error>\n }\n </mat-form-field>\n <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n <mat-label>End</mat-label>\n <input\n matInput\n formControlName=\"end\"\n placeholder=\"e.g. now\"\n (blur)=\"commitEditableDates(calendar)\"\n (keydown.enter)=\"applyEditableDates(dateInput, calendar)\"\n />\n @if (editableForm.controls.end.hasError('required')) {\n <mat-error>Required</mat-error>\n } @else if (editableForm.controls.end.hasError('invalidDate')) {\n <mat-error>Invalid date or expression</mat-error>\n } @else if (editableForm.hasError('rangeOrder')) {\n <mat-error>Start must be before end</mat-error>\n }\n </mat-form-field>\n </form>\n } @else {\n <span id=\"range-label-text\" class=\"ndp-range-label-text\">\n {{ calendar.selectedDates?.start | date: dateFormat }} @if (calendar.selectedDates?.end)\n {\n <span> - {{ calendar.selectedDates?.end | date: dateFormat }} </span>\n }\n </span>\n }\n <div class=\"buttons\">\n <acp-button\n type=\"button\"\n appearance=\"filled\"\n color=\"primary\"\n size=\"small\"\n [class.disabled]=\"\n enableEditableDates\n ? editableForm.invalid\n : !(calendar.selectedDates?.start && calendar.selectedDates?.end)\n \"\n (clicked)=\"\n enableEditableDates && commitEditableDates(calendar);\n updateCustomRange(dateInput, calendar.selectedDates)\n \"\n >\n &nbsp;Aplicar&nbsp;\n </acp-button>\n <acp-button\n type=\"button\"\n appearance=\"text\"\n color=\"error\"\n size=\"small\"\n (clicked)=\"isCustomRange = false\"\n >Cancelar</acp-button\n >\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n</div>\n\n<ng-template\n #dateOptionList\n let-options\n let-input=\"dateInput\"\n let-optionId=\"optionId\"\n let-className=\"className\"\n>\n <mat-action-list [ngClass]=\"className\" [id]=\"optionId\">\n @for (option of options; track option.optionLabel) {\n <mat-list-item [activated]=\"option.isSelected\" (click)=\"updateSelection(option, input)\">\n {{ option.optionLabel }}\n </mat-list-item>\n }\n </mat-action-list>\n</ng-template>\n", styles: ["::ng-deep .cdk-overlay-dark-backdrop{background:none}mat-list-item.mat-mdc-list-item{height:40px}mat-list-item.mdc-list-item--activated{background-color:var(--ndp-selected-option-bg, var(--mat-sys-secondary-container, rgba(0, 0, 0, .08)))}::ng-deep .cdk-overlay-pane:has(.custom-ckd-container),::ng-deep .cdk-overlay-pane:has(.ndp-cdk-container){width:100%;background-color:var(--mat-sys-surface-container);max-height:100vh;overflow-y:auto;overflow-x:hidden;max-width:700px;margin-top:-22px;border:1px solid var(--mat-sys-surface-container)}::ng-deep .cdk-overlay-pane:has(.range-input){max-width:250px}.br-top{border-top:1px solid var(--mat-sys-surface-container)}.br-right{border-right:1px solid var(--mat-sys-surface-container)}.disabled{pointer-events:none;opacity:.5}.mat-button,.mdc-button{font-family:var(--mat-list-list-item-label-text-font);line-height:var(--mat-list-list-item-label-text-line-height);font-size:var(--mat-list-list-item-label-text-size);font-weight:var(--mat-list-list-item-label-text-weight);letter-spacing:var(--mat-list-list-item-label-text-tracking)}.w-full{width:100%}.display-hidden{display:none}.custom-calendar-container,.ndp-calendar-container{width:100%}.row-1,.row-2{width:100%;box-sizing:border-box}.row-1{display:flex;align-items:stretch}.row-2{padding:16px}.ndp-column-separator{flex:0 0 1px;background-color:var(--mat-sys-surface-container)}.footer-content,.ndp-footer-content{align-items:center;display:flex;text-align:right;justify-content:end;gap:16px;text-overflow:ellipsis}.footer-content .buttons,.ndp-footer-content .buttons{display:flex;gap:8px}.ndp-date-inputs{display:flex;gap:8px;margin-right:auto;align-items:flex-start}.ndp-date-field{width:150px}.column-1{flex:0 0 25%;overflow:auto}.column-2{flex:1 1 auto;min-width:0}.without-default-opt .column-1{display:none}@media(max-width:400px){.footer-content,.ndp-footer-content{display:block}.footer-content .buttons,.ndp-footer-content .buttons{justify-content:flex-end;margin-top:20px}#range-label-text{margin-right:1.5rem}}@media(max-width:650px){.row-1{flex-direction:column}.column-1{flex-basis:auto}.column-separator{display:none}}.pe-0{padding-right:0}.ps-0{padding-left:0}button.checked{color:var(--mat-sys-primary);border-radius:4px}.ndp-range-label-text{color:var(--mat-sys-on-surface)}\n"] }]
9307
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n AcpDateRangeInput Component Template\n @author AcontPlus S.A.S\n @version 1.0.0\n\n Comprehensive date range picker with predefined options, custom calendar selection,\n and support for human-readable date expressions.\n-->\n<div class=\"date-picker-main ndp-main\" cdkOverlayOrigin #trigger>\n <mat-form-field\n class=\"w-full\"\n [class]=\"{ 'display-hidden': isShowStaticDefaultOptions }\"\n (click)=\"toggleDateOptionSelectionList($event)\"\n >\n <mat-label (click)=\"toggleDateOptionSelectionList($event)\">{{ inputLabel }}</mat-label>\n <input\n matInput\n #dateInput\n class=\"cursor-pointer\"\n id=\"date-input-field\"\n (input)=\"onMainInputChange(dateInput)\"\n />\n <ng-container matSuffix>\n @if (showClearButton() && !!dateInput.value) {\n <button\n mat-icon-button\n class=\"cursor-pointer pe-0 ps-0\"\n matTooltip=\"Clear\"\n (click)=\"clearSelection($event)\"\n >\n <mat-icon>clear</mat-icon>\n </button>\n } @if (showCalendarIcon()) {\n <button mat-icon-button class=\"cursor-pointer\">\n <mat-icon>date_range</mat-icon>\n </button>\n } @if (showRangeRequired()) {\n <button\n mat-icon-button\n class=\"cursor-pointer\"\n [class.checked]=\"isRangeRequired()\"\n (click)=\"toggleRangeSelection($event)\"\n matTooltip=\"Rango de fechas obligatorio\"\n >\n <mat-icon [color]=\"isRangeRequired() ? 'accent' : ''\">\n {{ isRangeRequired() ? 'check_box' : 'check_box_outline_blank' }}\n </mat-icon>\n </button>\n }\n </ng-container>\n </mat-form-field>\n\n @if (dateDropDownOptions.length && isShowStaticDefaultOptions) {\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n optionId: staticOptionId,\n className: 'w-full custom-ckd-container ndp-cdk-container range-input',\n }\n \"\n />\n }\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isDateOptionList\"\n [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n [cdkConnectedOverlayOffsetX]=\"listCdkConnectedOverlayOffsetX\"\n [cdkConnectedOverlayOffsetY]=\"listCdkConnectedOverlayOffsetY\"\n (backdropClick)=\"isDateOptionList = false\"\n >\n @if (dateDropDownOptions.length && !isShowStaticDefaultOptions) {\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n optionId: dynamicOptionId,\n className: 'w-full custom-ckd-container ndp-cdk-container range-input',\n }\n \"\n />\n }\n </ng-template>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayBackdropClass]=\"'cdk-overlay-transparent-backdrop'\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isCustomRange\"\n [cdkConnectedOverlayPush]=\"cdkConnectedOverlayPush\"\n [cdkConnectedOverlayPositions]=\"cdkConnectedOverlayPositions\"\n [cdkConnectedOverlayOffsetX]=\"cdkConnectedOverlayOffsetX\"\n [cdkConnectedOverlayOffsetY]=\"cdkConnectedOverlayOffsetY\"\n (backdropClick)=\"isCustomRange = false\"\n >\n <div\n class=\"custom-ckd-container ndp-cdk-container custom-calendar-container ndp-calendar-container\"\n [class]=\"{ 'without-default-opt': hideDefaultOptions }\"\n >\n <div class=\"row-1\">\n @if (!hideDefaultOptions) {\n <div class=\"pt-custom column-1\">\n <ng-container\n *ngTemplateOutlet=\"\n dateOptionList;\n context: {\n $implicit: visibleOptions(),\n dateInput: dateInput,\n }\n \"\n />\n </div>\n <div class=\"ndp-column-separator\"></div>\n }\n <div class=\"mt-2 column-2\">\n <acp-date-range-calendar\n [selectedDates]=\"selectedDates\"\n #calendar\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (selectedDatesChange)=\"onCalendarSelectionChange($event)\"\n />\n </div>\n </div>\n <div class=\"row-2 br-top\">\n <div class=\"footer-content ndp-footer-content\">\n @if (enableEditableDates) {\n <form class=\"ndp-date-inputs\" [formGroup]=\"editableForm\">\n <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n <mat-label>Start</mat-label>\n <input\n matInput\n formControlName=\"start\"\n placeholder=\"e.g. now-7d\"\n (blur)=\"commitEditableDates(calendar)\"\n (keydown.enter)=\"applyEditableDates(dateInput, calendar)\"\n />\n @if (editableForm.controls.start.hasError('required')) {\n <mat-error>Required</mat-error>\n } @else if (editableForm.controls.start.hasError('invalidDate')) {\n <mat-error>Invalid date or expression</mat-error>\n }\n </mat-form-field>\n <mat-form-field class=\"ndp-date-field\" subscriptSizing=\"dynamic\">\n <mat-label>End</mat-label>\n <input\n matInput\n formControlName=\"end\"\n placeholder=\"e.g. now\"\n (blur)=\"commitEditableDates(calendar)\"\n (keydown.enter)=\"applyEditableDates(dateInput, calendar)\"\n />\n @if (editableForm.controls.end.hasError('required')) {\n <mat-error>Required</mat-error>\n } @else if (editableForm.controls.end.hasError('invalidDate')) {\n <mat-error>Invalid date or expression</mat-error>\n } @else if (editableForm.hasError('rangeOrder')) {\n <mat-error>Start must be before end</mat-error>\n }\n </mat-form-field>\n </form>\n } @else {\n <span id=\"range-label-text\" class=\"ndp-range-label-text\">\n {{ calendar.selectedDates?.start | date: dateFormat }} @if (calendar.selectedDates?.end)\n {\n <span> - {{ calendar.selectedDates?.end | date: dateFormat }} </span>\n }\n </span>\n }\n <div class=\"buttons\">\n <acp-button\n type=\"button\"\n appearance=\"filled\"\n color=\"primary\"\n size=\"small\"\n [class.disabled]=\"\n enableEditableDates\n ? editableForm.invalid\n : !(calendar.selectedDates?.start && calendar.selectedDates?.end)\n \"\n (clicked)=\"\n enableEditableDates && commitEditableDates(calendar);\n updateCustomRange(dateInput, calendar.selectedDates)\n \"\n >\n &nbsp;Aplicar&nbsp;\n </acp-button>\n <acp-button\n type=\"button\"\n appearance=\"text\"\n color=\"error\"\n size=\"small\"\n (clicked)=\"isCustomRange = false\"\n >Cancelar</acp-button\n >\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n</div>\n\n<ng-template\n #dateOptionList\n let-options\n let-input=\"dateInput\"\n let-optionId=\"optionId\"\n let-className=\"className\"\n>\n <mat-action-list [ngClass]=\"className\" [id]=\"optionId\">\n @for (option of options; track option.optionLabel) {\n <mat-list-item [activated]=\"option.isSelected\" (click)=\"updateSelection(option, input)\">\n {{ option.optionLabel }}\n </mat-list-item>\n }\n </mat-action-list>\n</ng-template>\n", styles: ["mat-list-item.mat-mdc-list-item{height:40px}mat-list-item.mdc-list-item--activated{background-color:var(--ndp-selected-option-bg, var(--mat-sys-secondary-container, rgba(0, 0, 0, .08)))}::ng-deep .cdk-overlay-pane:has(.custom-ckd-container),::ng-deep .cdk-overlay-pane:has(.ndp-cdk-container){width:100%;background-color:var(--mat-sys-surface-container);max-height:100vh;overflow-y:auto;overflow-x:hidden;max-width:700px;margin-top:0;border:1px solid var(--mat-sys-surface-container)}::ng-deep .cdk-overlay-pane:has(.range-input){max-width:250px}.br-top{border-top:1px solid var(--mat-sys-surface-container)}.br-right{border-right:1px solid var(--mat-sys-surface-container)}.disabled{pointer-events:none;opacity:.5}.mat-button,.mdc-button{font-family:var(--mat-list-list-item-label-text-font);line-height:var(--mat-list-list-item-label-text-line-height);font-size:var(--mat-list-list-item-label-text-size);font-weight:var(--mat-list-list-item-label-text-weight);letter-spacing:var(--mat-list-list-item-label-text-tracking)}.w-full{width:100%}.display-hidden{display:none}.custom-calendar-container,.ndp-calendar-container{width:100%}.row-1,.row-2{width:100%;box-sizing:border-box}.row-1{display:flex;align-items:stretch}.row-2{padding:16px}.ndp-column-separator{flex:0 0 1px;background-color:var(--mat-sys-surface-container)}.footer-content,.ndp-footer-content{align-items:center;display:flex;text-align:right;justify-content:end;gap:16px;text-overflow:ellipsis}.footer-content .buttons,.ndp-footer-content .buttons{display:flex;gap:8px}.ndp-date-inputs{display:flex;gap:8px;margin-right:auto;align-items:flex-start}.ndp-date-field{width:150px}.column-1{flex:0 0 25%;overflow:auto}.column-2{flex:1 1 auto;min-width:0}.without-default-opt .column-1{display:none}@media(max-width:400px){.footer-content,.ndp-footer-content{display:block}.footer-content .buttons,.ndp-footer-content .buttons{justify-content:flex-end;margin-top:20px}#range-label-text{margin-right:1.5rem}}@media(max-width:650px){.row-1{flex-direction:column}.column-1{flex-basis:auto}.column-separator{display:none}}.pe-0{padding-right:0}.ps-0{padding-left:0}button.checked{color:var(--mat-sys-primary);border-radius:4px}.ndp-range-label-text{color:var(--mat-sys-on-surface)}\n"] }]
8315
9308
  }], propDecorators: { inputLabel: [{
8316
9309
  type: Input
8317
9310
  }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], showCalendarIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCalendarIcon", required: false }] }], showRangeRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "showRangeRequired", required: false }] }], isRangeRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRangeRequired", required: false }] }], staticOptionId: [{
@@ -9687,7 +10680,8 @@ class AdvancedDialogService {
9687
10680
  async open(component, config = {}) {
9688
10681
  const dialogConfig = await this.buildDialogConfig(config);
9689
10682
  const dialogRef = this.dialog.open(component, dialogConfig);
9690
- // Aplicar z-index centralizado
10683
+ this.wireCloseBehavior(dialogRef, config);
10684
+ // Apply centralized z-index
9691
10685
  this.zIndexService.applyZIndex(dialogRef);
9692
10686
  return dialogRef;
9693
10687
  }
@@ -9706,7 +10700,8 @@ class AdvancedDialogService {
9706
10700
  };
9707
10701
  const dialogConfig = await this.buildDialogConfig(configWithWrapperData);
9708
10702
  const dialogRef = this.dialog.open(DialogWrapper, dialogConfig);
9709
- // Aplicar z-index centralizado
10703
+ this.wireCloseBehavior(dialogRef, matDialogConfig);
10704
+ // Apply centralized z-index
9710
10705
  this.zIndexService.applyZIndex(dialogRef);
9711
10706
  return dialogRef;
9712
10707
  }
@@ -9726,52 +10721,61 @@ class AdvancedDialogService {
9726
10721
  // --- Private Configuration Builder ---
9727
10722
  async buildDialogConfig(config) {
9728
10723
  const dialogConfig = new MatDialogConfig();
10724
+ const basePanelClasses = [];
9729
10725
  // Asynchronously check for mobile state to prevent memory leaks from dangling subscriptions.
9730
10726
  const isMobile = await firstValueFrom(this.isMobile$);
9731
10727
  // Apply fullscreen if 'full' size is set OR if mobile fullscreen is enabled on a mobile device.
9732
10728
  if (config.size === 'full' || (config.isMobileFullScreen && isMobile)) {
9733
10729
  this.applyFullScreenConfig(dialogConfig);
10730
+ basePanelClasses.push('full-screen-dialog');
9734
10731
  }
9735
10732
  else {
9736
10733
  this.applyStandardConfig(dialogConfig, config);
9737
10734
  }
9738
10735
  // Apply all other common configurations.
9739
- this.applyCommonConfig(dialogConfig, config);
10736
+ this.applyCommonConfig(dialogConfig, config, basePanelClasses);
9740
10737
  return dialogConfig;
9741
10738
  }
9742
10739
  applyFullScreenConfig(dialogConfig) {
9743
10740
  dialogConfig.width = '100vw';
9744
10741
  dialogConfig.height = '100vh';
9745
10742
  dialogConfig.maxWidth = '100vw';
9746
- dialogConfig.panelClass = ['full-screen-dialog'];
10743
+ dialogConfig.maxHeight = '100vh';
9747
10744
  }
9748
10745
  applyStandardConfig(dialogConfig, config) {
9749
10746
  const width = config.width ?? this.getDialogWidth(config.size);
9750
10747
  dialogConfig.width = width;
9751
10748
  dialogConfig.height = config.height;
9752
10749
  dialogConfig.minWidth = config.minWidth;
10750
+ dialogConfig.minHeight = config.minHeight;
9753
10751
  const maxWidth = config.maxWidth ?? '95vw';
9754
10752
  dialogConfig.maxWidth = maxWidth;
9755
10753
  const maxHeight = config.maxHeight ?? 'auto';
9756
10754
  dialogConfig.maxHeight = maxHeight;
9757
10755
  dialogConfig.position = config.position;
9758
10756
  }
9759
- applyCommonConfig(dialogConfig, config) {
10757
+ applyCommonConfig(dialogConfig, config, basePanelClasses = []) {
9760
10758
  dialogConfig.data = config.data;
9761
10759
  dialogConfig.hasBackdrop = config.hasBackdrop ?? true;
9762
10760
  dialogConfig.backdropClass = config.backdropClass;
9763
- const panelClasses = Array.isArray(config.panelClass)
9764
- ? [...config.panelClass]
9765
- : config.panelClass
9766
- ? [config.panelClass]
9767
- : [];
10761
+ const panelClasses = [...basePanelClasses];
10762
+ if (Array.isArray(config.panelClass)) {
10763
+ panelClasses.push(...config.panelClass);
10764
+ }
10765
+ else if (config.panelClass) {
10766
+ panelClasses.push(config.panelClass);
10767
+ }
9768
10768
  if (config.size) {
9769
10769
  panelClasses.push(`dialog-${config.size}`);
9770
10770
  }
9771
10771
  dialogConfig.panelClass = panelClasses;
9772
- dialogConfig.disableClose = !(config.backdropClickClosable ?? true);
9773
- // Note: escapeKeyClosable is handled by MatDialog separately and doesn't affect disableClose directly.
10772
+ // MatDialog's `disableClose` blocks both the backdrop click and the Escape key.
10773
+ // When only one of them should be disabled, `disableClose` is set and the
10774
+ // allowed gesture is re-enabled in `wireCloseBehavior`.
10775
+ dialogConfig.disableClose =
10776
+ !(config.backdropClickClosable ?? true) || !(config.escapeKeyClosable ?? true);
9774
10777
  dialogConfig.autoFocus = config.autoFocus ?? 'first-tabbable';
10778
+ dialogConfig.restoreFocus = config.restoreFocus ?? true;
9775
10779
  dialogConfig.scrollStrategy = config.scrollStrategy ?? this.overlay.scrollStrategies.block();
9776
10780
  dialogConfig.enterAnimationDuration = config.enterAnimationDuration ?? '300ms';
9777
10781
  dialogConfig.exitAnimationDuration = config.exitAnimationDuration ?? '200ms';
@@ -9780,6 +10784,27 @@ class AdvancedDialogService {
9780
10784
  dialogConfig.ariaDescribedBy = config.ariaDescribedBy;
9781
10785
  dialogConfig.role = config.role;
9782
10786
  }
10787
+ /**
10788
+ * Re-enables a single close gesture (backdrop click or Escape) when the other
10789
+ * one is disabled, since MatDialog's `disableClose` blocks both at once.
10790
+ */
10791
+ wireCloseBehavior(dialogRef, config) {
10792
+ const backdropClosable = config.backdropClickClosable ?? true;
10793
+ const escapeClosable = config.escapeKeyClosable ?? true;
10794
+ if (backdropClosable === escapeClosable) {
10795
+ return;
10796
+ }
10797
+ if (escapeClosable) {
10798
+ dialogRef.keydownEvents().subscribe(event => {
10799
+ if (event.key === 'Escape') {
10800
+ dialogRef.close();
10801
+ }
10802
+ });
10803
+ }
10804
+ else {
10805
+ dialogRef.backdropClick().subscribe(() => dialogRef.close());
10806
+ }
10807
+ }
9783
10808
  getDialogWidth(size = 'md') {
9784
10809
  const sizeMap = {
9785
10810
  xs: '320px',
@@ -11210,5 +12235,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
11210
12235
  * Generated bundle index. Do not edit.
11211
12236
  */
11212
12237
 
11213
- export { ACP_ACTIVE_DATE_DEBOUNCE, ACP_BADGE_COLORS, ACP_BADGE_SHAPES, ACP_BADGE_SIZES, ACP_BADGE_VARIANTS, ACP_DATE_OPTION_TYPE, ACP_DEFAULT_DATE_OPTIONS, ACP_DRAWER_DATA, ACP_DRAWER_DEFAULT_OPTIONS, ACP_POPOVER_CONTENT, ACP_POPOVER_DEFAULT_OPTIONS, ACP_POPOVER_SCROLL_STRATEGY, AcpAlert, AcpBadge, AcpButton, AcpCard, AcpCheckboxBase, AcpCheckboxGroup, AcpContextMenu, AcpContextMenuDirective, AcpContextMenuPanel, AcpContextMenuService, AcpDateRangeInput, AcpDrawer, AcpDrawerConfig, AcpDrawerContainer, AcpDrawerRef, AcpHeader, AcpHeaderActions, AcpHeaderBranding, AcpHeaderCenter, AcpHeaderEnd, AcpHeaderLanguage, AcpHeaderNotifications, AcpHeaderStart, AcpHeaderTheme, AcpHeaderWorkspace, AcpKpiCard, AcpPopover, AcpPopoverContent, AcpPopoverTarget, AcpPopoverTrigger, AcpSelectDateOption, AcpShellLayout, AcpShellSlotHeader, AcpShellSlotSidebar, AcpShellSlotSidebarFooter, AcpShellSlotToolbar, AcpShellSlotTopmenu, AcpSidebar, AcpSidebarBranding, AcpSidebarContent, AcpSidebarHeader, AcpSidebarToggle, AcpSidebarUserPanel, AcpTopmenu, AcpTopmenuPanel, AdvancedDialogService, Branding, Button, CONTEXT_MENU_DATA, CONTEXT_MENU_ITEMS, DATA_GRID_DEFAULT_OPTIONS, DataGrid, DateRangePicker, DialogWrapper, DialogZIndexService, DynamicCard, DynamicSelect, GetTotalPipe, IconRegistryService, InputChip, KPI_CARD_TOKENS, KPI_CARD_TREND_CONFIGS, KeyboardNavigationService, NavAccordionDirective, NavAccordionItemDirective, NavAccordionToggleDirective, OverlayService, Pagination, SidemenuComponent, Spinner, StatusDisplayPipe, SvgIcon, TREND_CONFIGS, TabulatorTable, ThemeSwitcher, ThemeToggle, ToUpperCase, UserIcon, UserMenu, UserPanel, _AcpPopoverContentBase, formatValue };
12238
+ export { ACP_ACTIVE_DATE_DEBOUNCE, ACP_BADGE_COLORS, ACP_BADGE_SHAPES, ACP_BADGE_SIZES, ACP_BADGE_VARIANTS, ACP_DATE_OPTION_TYPE, ACP_DEFAULT_DATE_OPTIONS, ACP_DIALOG_ACTIONS, ACP_DIALOG_DATA, ACP_DIALOG_DEFAULT_OPTIONS, ACP_DIALOG_TITLEBAR, ACP_DRAWER_DATA, ACP_DRAWER_DEFAULT_OPTIONS, ACP_POPOVER_CONTENT, ACP_POPOVER_DEFAULT_OPTIONS, ACP_POPOVER_SCROLL_STRATEGY, AcpAlert, AcpBadge, AcpButton, AcpCard, AcpCheckboxBase, AcpCheckboxGroup, AcpContextMenu, AcpContextMenuDirective, AcpContextMenuPanel, AcpContextMenuService, AcpDateRangeInput, AcpDialog, AcpDialogActions, AcpDialogContainer, AcpDialogContent, AcpDialogRef, AcpDialogService, AcpDialogTitlebar, AcpDrawer, AcpDrawerConfig, AcpDrawerContainer, AcpDrawerRef, AcpHeader, AcpHeaderActions, AcpHeaderBranding, AcpHeaderCenter, AcpHeaderEnd, AcpHeaderLanguage, AcpHeaderNotifications, AcpHeaderStart, AcpHeaderTheme, AcpHeaderWorkspace, AcpKpiCard, AcpPopover, AcpPopoverContent, AcpPopoverTarget, AcpPopoverTrigger, AcpSelectDateOption, AcpShellLayout, AcpShellSlotHeader, AcpShellSlotSidebar, AcpShellSlotSidebarFooter, AcpShellSlotToolbar, AcpShellSlotTopmenu, AcpSidebar, AcpSidebarBranding, AcpSidebarContent, AcpSidebarHeader, AcpSidebarToggle, AcpSidebarUserPanel, AcpTopmenu, AcpTopmenuPanel, AdvancedDialogService, Branding, Button, CONTEXT_MENU_DATA, CONTEXT_MENU_ITEMS, DATA_GRID_DEFAULT_OPTIONS, DataGrid, DateRangePicker, DialogWrapper, DialogZIndexService, DynamicCard, DynamicSelect, GetTotalPipe, IconRegistryService, InputChip, KPI_CARD_TOKENS, KPI_CARD_TREND_CONFIGS, KeyboardNavigationService, NavAccordionDirective, NavAccordionItemDirective, NavAccordionToggleDirective, OverlayService, Pagination, SidemenuComponent, Spinner, StatusDisplayPipe, SvgIcon, TREND_CONFIGS, TabulatorTable, ThemeSwitcher, ThemeToggle, ToUpperCase, UserIcon, UserMenu, UserPanel, _AcpPopoverContentBase, formatValue, provideAcpDialogDefaults };
11214
12239
  //# sourceMappingURL=acontplus-ng-components.mjs.map