@fundamental-ngx/core 0.66.1-rc.8 → 0.66.1
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.
- package/fesm2022/fundamental-ngx-core-card.mjs +55 -3
- package/fesm2022/fundamental-ngx-core-card.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-combobox.mjs +5 -2
- package/fesm2022/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-date-picker.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-datetime-picker.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-datetime.mjs +4 -2
- package/fesm2022/fundamental-ngx-core-datetime.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dialog.mjs +71 -19
- package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-form.mjs +932 -69
- package/fesm2022/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-input-group.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-menu.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-box.mjs +2 -10
- package/fesm2022/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-strip.mjs +2 -3
- package/fesm2022/fundamental-ngx-core-message-strip.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs +3 -3
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-pagination.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-pagination.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-popover.mjs +22 -6
- package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-product-switch.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-product-switch.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-radio.mjs +47 -2
- package/fesm2022/fundamental-ngx-core-radio.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-select.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-settings.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-settings.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-shellbar.mjs +732 -113
- package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-text.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-text.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time-picker.mjs +3 -4
- package/fesm2022/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-token.mjs +14 -18
- package/fesm2022/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tooltip.mjs +903 -0
- package/fesm2022/fundamental-ngx-core-tooltip.mjs.map +1 -0
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-user-menu.mjs +21 -8
- package/fesm2022/fundamental-ngx-core-user-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core.mjs +1 -0
- package/fesm2022/fundamental-ngx-core.mjs.map +1 -1
- package/package.json +7 -3
- package/schematics/package.json +1 -1
- package/types/fundamental-ngx-core-card.d.ts +34 -1
- package/types/fundamental-ngx-core-dialog.d.ts +33 -5
- package/types/fundamental-ngx-core-form.d.ts +261 -34
- package/types/fundamental-ngx-core-popover.d.ts +6 -0
- package/types/fundamental-ngx-core-radio.d.ts +8 -0
- package/types/fundamental-ngx-core-shellbar.d.ts +259 -75
- package/types/fundamental-ngx-core-token.d.ts +2 -0
- package/types/fundamental-ngx-core-tooltip.d.ts +456 -0
- package/types/fundamental-ngx-core-user-menu.d.ts +4 -0
- package/types/fundamental-ngx-core.d.ts +1 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, computed, signal, input, booleanAttribute, Optional, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, inject, Injector, effect, Directive,
|
|
2
|
+
import { InjectionToken, Injectable, computed, signal, input, booleanAttribute, Optional, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, inject, Injector, effect, Directive, ElementRef, DestroyRef, afterNextRender, isDevMode, ContentChild, ViewChild, Input, ComponentRef, EmbeddedViewRef, Type, TemplateRef, PLATFORM_ID, Inject, NgModule } from '@angular/core';
|
|
3
3
|
import * as i3$2 from '@angular/cdk/portal';
|
|
4
4
|
import { PortalModule, CdkPortalOutlet, ComponentPortal } from '@angular/cdk/portal';
|
|
5
5
|
import { AsyncPipe, NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
@@ -8,6 +8,7 @@ import { DynamicPortalComponent, TemplateDirective, FocusTrapService, RtlService
|
|
|
8
8
|
import { BusyIndicatorComponent } from '@fundamental-ngx/core/busy-indicator';
|
|
9
9
|
import * as i3 from '@fundamental-ngx/core/scrollbar';
|
|
10
10
|
import { ScrollbarDirective } from '@fundamental-ngx/core/scrollbar';
|
|
11
|
+
import { resolveTranslationSignal, FdTranslatePipe } from '@fundamental-ngx/i18n';
|
|
11
12
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
12
13
|
import { IconComponent } from '@fundamental-ngx/core/icon';
|
|
13
14
|
import { FD_BUTTON_BAR_COMPONENT, ButtonBarComponent, BarComponent, BarRightDirective, BarLeftDirective, BarElementDirective, BarMiddleDirective } from '@fundamental-ngx/core/bar';
|
|
@@ -20,7 +21,6 @@ import { __decorate, __metadata } from 'tslib';
|
|
|
20
21
|
import * as i3$1 from '@angular/cdk/a11y';
|
|
21
22
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
22
23
|
import { CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
23
|
-
import { FdTranslatePipe } from '@fundamental-ngx/i18n';
|
|
24
24
|
import { ESCAPE } from '@angular/cdk/keycodes';
|
|
25
25
|
import { Router, NavigationStart } from '@angular/router';
|
|
26
26
|
import { filter } from 'rxjs/operators';
|
|
@@ -306,18 +306,34 @@ class DialogBodyComponent {
|
|
|
306
306
|
* default is set to false
|
|
307
307
|
*/
|
|
308
308
|
this.disablePaddings = input(false, { ...(ngDevMode ? { debugName: "disablePaddings" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
309
|
+
/** Role of the dialog body element Default is 'region' */
|
|
310
|
+
this.role = input('region', /* @ts-ignore */
|
|
311
|
+
...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
312
|
+
/** Aria label of the dialog body element */
|
|
313
|
+
this.ariaLabel = input(/* @ts-ignore */
|
|
314
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
315
|
+
/** @hidden */
|
|
316
|
+
this.defaultAriaLabel = resolveTranslationSignal('coreDialog.bodyAriaLabel');
|
|
317
|
+
/** @hidden */
|
|
318
|
+
this.computedAriaLabel = computed(() => {
|
|
319
|
+
const userProvidedLabel = this.elementRef.nativeElement.getAttribute('aria-label');
|
|
320
|
+
return userProvidedLabel || this.ariaLabel() || this.defaultAriaLabel();
|
|
321
|
+
}, /* @ts-ignore */
|
|
322
|
+
...(ngDevMode ? [{ debugName: "computedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
309
323
|
}
|
|
310
324
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogBodyComponent, deps: [{ token: i0.ElementRef }, { token: DialogConfig, optional: true }, { token: DialogRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
311
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DialogBodyComponent, isStandalone: true, selector: "fd-dialog-body", inputs: { disablePaddings: { classPropertyName: "disablePaddings", publicName: "disablePaddings", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.fd-dialog__body": "true", "class.fd-settings__dialog-body": "dialogConfig.settings", "class.fd-dialog__body--no-vertical-padding": "!dialogConfig.verticalPadding", "class.fd-dialog__body--no-horizontal-padding": "!dialogConfig.horizontalPadding && !dialogConfig.responsivePadding", "style.min-height": "dialogConfig.bodyMinHeight", "style.padding": "dialogConfig.disablePaddings || disablePaddings() || dialogConfig.settings ? 0 : dialogConfig.responsivePadding ? null : \"1rem\"" } }, providers: [
|
|
325
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DialogBodyComponent, isStandalone: true, selector: "fd-dialog-body", inputs: { disablePaddings: { classPropertyName: "disablePaddings", publicName: "disablePaddings", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "role()", "attr.aria-label": "computedAriaLabel()", "class.fd-dialog__body": "true", "class.fd-settings__dialog-body": "dialogConfig.settings", "class.fd-dialog__body--no-vertical-padding": "!dialogConfig.verticalPadding", "class.fd-dialog__body--no-horizontal-padding": "!dialogConfig.horizontalPadding && !dialogConfig.responsivePadding", "style.min-height": "dialogConfig.bodyMinHeight", "style.padding": "dialogConfig.disablePaddings || disablePaddings() || dialogConfig.settings ? 0 : dialogConfig.responsivePadding ? null : \"1rem\"" } }, providers: [
|
|
312
326
|
{
|
|
313
327
|
provide: FD_DIALOG_BODY_COMPONENT,
|
|
314
328
|
useExisting: DialogBodyComponent
|
|
315
329
|
}
|
|
316
|
-
], hostDirectives: [{ directive: i3.ScrollbarDirective }], ngImport: i0, template: "<
|
|
330
|
+
], hostDirectives: [{ directive: i3.ScrollbarDirective }], ngImport: i0, template: "<ng-content></ng-content>\n\n@if (dialogRef.onLoading | async) {\n <div class=\"fd-dialog__loader fd-busy-indicator-dialog\">\n @if (dialogRef.loadingContent) {\n <fdk-dynamic-portal class=\"fd-text\" [auto]=\"dialogRef.loadingContent\"></fdk-dynamic-portal>\n }\n <fd-busy-indicator [loading]=\"true\" size=\"l\" [label]=\"dialogRef.loadingLabel\"></fd-busy-indicator>\n </div>\n}\n", dependencies: [{ kind: "component", type: DynamicPortalComponent, selector: "fdk-dynamic-portal", inputs: ["domElement", "component", "template", "auto"], outputs: ["attached"] }, { kind: "component", type: BusyIndicatorComponent, selector: "fd-busy-indicator", inputs: ["loading", "size", "block", "ariaLabel", "ariaValueText", "title", "label", "ariaLive", "preventWheelEvents"] }, { kind: "ngmodule", type: PortalModule }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
317
331
|
}
|
|
318
332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogBodyComponent, decorators: [{
|
|
319
333
|
type: Component,
|
|
320
334
|
args: [{ selector: 'fd-dialog-body', host: {
|
|
335
|
+
'[attr.role]': 'role()',
|
|
336
|
+
'[attr.aria-label]': 'computedAriaLabel()',
|
|
321
337
|
'[class.fd-dialog__body]': 'true',
|
|
322
338
|
'[class.fd-settings__dialog-body]': 'dialogConfig.settings',
|
|
323
339
|
'[class.fd-dialog__body--no-vertical-padding]': '!dialogConfig.verticalPadding',
|
|
@@ -329,12 +345,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
329
345
|
provide: FD_DIALOG_BODY_COMPONENT,
|
|
330
346
|
useExisting: DialogBodyComponent
|
|
331
347
|
}
|
|
332
|
-
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [ScrollbarDirective], standalone: true, imports: [DynamicPortalComponent, BusyIndicatorComponent, AsyncPipe, PortalModule], template: "<
|
|
348
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [ScrollbarDirective], standalone: true, imports: [DynamicPortalComponent, BusyIndicatorComponent, AsyncPipe, PortalModule], template: "<ng-content></ng-content>\n\n@if (dialogRef.onLoading | async) {\n <div class=\"fd-dialog__loader fd-busy-indicator-dialog\">\n @if (dialogRef.loadingContent) {\n <fdk-dynamic-portal class=\"fd-text\" [auto]=\"dialogRef.loadingContent\"></fdk-dynamic-portal>\n }\n <fd-busy-indicator [loading]=\"true\" size=\"l\" [label]=\"dialogRef.loadingLabel\"></fd-busy-indicator>\n </div>\n}\n" }]
|
|
333
349
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: DialogConfig, decorators: [{
|
|
334
350
|
type: Optional
|
|
335
351
|
}] }, { type: DialogRef, decorators: [{
|
|
336
352
|
type: Optional
|
|
337
|
-
}] }], propDecorators: { disablePaddings: [{ type: i0.Input, args: [{ isSignal: true, alias: "disablePaddings", required: false }] }] } });
|
|
353
|
+
}] }], propDecorators: { disablePaddings: [{ type: i0.Input, args: [{ isSignal: true, alias: "disablePaddings", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
338
354
|
|
|
339
355
|
/**
|
|
340
356
|
* Directive that applies fundamental dialog styling to a dialog close button.
|
|
@@ -455,18 +471,37 @@ class DialogFooterComponent extends DialogFooterBase {
|
|
|
455
471
|
super(...arguments);
|
|
456
472
|
/** @hidden */
|
|
457
473
|
this.dialogConfig = inject(DialogConfig, { optional: true }) || {};
|
|
474
|
+
/** Role of the dialog footer element Default is 'region' */
|
|
475
|
+
this.role = input('region', /* @ts-ignore */
|
|
476
|
+
...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
477
|
+
/** Aria label of the dialog footer element */
|
|
478
|
+
this.ariaLabel = input(/* @ts-ignore */
|
|
479
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
480
|
+
/** @hidden */
|
|
481
|
+
this.defaultAriaLabel = resolveTranslationSignal('coreDialog.footerAriaLabel');
|
|
482
|
+
/** @hidden */
|
|
483
|
+
this.computedAriaLabel = computed(() => {
|
|
484
|
+
const userProvidedLabel = this._elementRef.nativeElement.getAttribute('aria-label');
|
|
485
|
+
return userProvidedLabel || this.ariaLabel() || this.defaultAriaLabel();
|
|
486
|
+
}, /* @ts-ignore */
|
|
487
|
+
...(ngDevMode ? [{ debugName: "computedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
488
|
+
/** @hidden */
|
|
489
|
+
this._elementRef = inject(ElementRef);
|
|
458
490
|
}
|
|
459
491
|
/** @hidden */
|
|
460
492
|
ngAfterViewInit() {
|
|
461
493
|
this._listenForButtonChanges(DialogButtonClass);
|
|
462
494
|
}
|
|
463
495
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogFooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
464
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DialogFooterComponent, isStandalone: true, selector: "fd-dialog-footer", usesInheritance: true, ngImport: i0, template: "
|
|
496
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DialogFooterComponent, isStandalone: true, selector: "fd-dialog-footer", inputs: { role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "role()", "attr.aria-label": "computedAriaLabel()" } }, usesInheritance: true, ngImport: i0, template: "@if (customFooterTemplate()) {\n <ng-template [ngTemplateOutlet]=\"customFooterTemplate()\"></ng-template>\n} @else {\n <div\n fd-bar\n class=\"fd-dialog__footer\"\n barDesign=\"footer\"\n role=\"group\"\n [fdContentDensity]=\"dialogConfig.contentDensity ?? ''\"\n >\n <ng-template [ngTemplateOutlet]=\"footerTemplate() ? footerTemplate() : defaultTemplate\"></ng-template>\n\n <ng-template #defaultTemplate>\n <div fd-bar-right>\n <ng-content></ng-content>\n </div>\n </ng-template>\n </div>\n}\n", dependencies: [{ kind: "component", type: BarComponent, selector: "[fd-bar]", inputs: ["barDesign", "inPage", "inHomePage", "clear", "size", "initialSuggestionTitle", "initialSuggestionSubline", "role"] }, { kind: "directive", type: BarRightDirective, selector: "[fd-bar-right]", inputs: ["stackContentsVertically"] }, { kind: "directive", type: ContentDensityDirective, selector: "[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]), [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]), [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]), [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])", inputs: ["fdContentDensity", "fdCompact", "fdCondensed", "fdCozy"], exportAs: ["fdContentDensity"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
465
497
|
}
|
|
466
498
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogFooterComponent, decorators: [{
|
|
467
499
|
type: Component,
|
|
468
|
-
args: [{ selector: 'fd-dialog-footer', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None,
|
|
469
|
-
|
|
500
|
+
args: [{ selector: 'fd-dialog-footer', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
501
|
+
'[attr.role]': 'role()',
|
|
502
|
+
'[attr.aria-label]': 'computedAriaLabel()'
|
|
503
|
+
}, imports: [BarComponent, BarRightDirective, ContentDensityDirective, NgTemplateOutlet], template: "@if (customFooterTemplate()) {\n <ng-template [ngTemplateOutlet]=\"customFooterTemplate()\"></ng-template>\n} @else {\n <div\n fd-bar\n class=\"fd-dialog__footer\"\n barDesign=\"footer\"\n role=\"group\"\n [fdContentDensity]=\"dialogConfig.contentDensity ?? ''\"\n >\n <ng-template [ngTemplateOutlet]=\"footerTemplate() ? footerTemplate() : defaultTemplate\"></ng-template>\n\n <ng-template #defaultTemplate>\n <div fd-bar-right>\n <ng-content></ng-content>\n </div>\n </ng-template>\n </div>\n}\n" }]
|
|
504
|
+
}], propDecorators: { role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
470
505
|
|
|
471
506
|
class DialogHeaderBase {
|
|
472
507
|
constructor() {
|
|
@@ -529,18 +564,37 @@ class DialogHeaderComponent extends DialogHeaderBase {
|
|
|
529
564
|
this.dialogConfig = inject(DialogConfig, { optional: true }) || {};
|
|
530
565
|
/** @hidden */
|
|
531
566
|
this.inShellbar = input(false, { ...(ngDevMode ? { debugName: "inShellbar" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
567
|
+
/** Role of the dialog header element Default is 'region' */
|
|
568
|
+
this.role = input('region', /* @ts-ignore */
|
|
569
|
+
...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
|
|
570
|
+
/** Aria label of the dialog header element */
|
|
571
|
+
this.ariaLabel = input(/* @ts-ignore */
|
|
572
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
573
|
+
/** @hidden */
|
|
574
|
+
this.defaultAriaLabel = resolveTranslationSignal('coreDialog.headerAriaLabel');
|
|
575
|
+
/** @hidden */
|
|
576
|
+
this.computedAriaLabel = computed(() => {
|
|
577
|
+
const userProvidedLabel = this._elementRef.nativeElement.getAttribute('aria-label');
|
|
578
|
+
return userProvidedLabel || this.ariaLabel() || this.defaultAriaLabel();
|
|
579
|
+
}, /* @ts-ignore */
|
|
580
|
+
...(ngDevMode ? [{ debugName: "computedAriaLabel" }] : /* istanbul ignore next */ []));
|
|
581
|
+
/** @hidden */
|
|
582
|
+
this._elementRef = inject(ElementRef);
|
|
532
583
|
}
|
|
533
584
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
534
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DialogHeaderComponent, isStandalone: true, selector: "fd-dialog-header", inputs: { inShellbar: { classPropertyName: "inShellbar", publicName: "inShellbar", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
585
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DialogHeaderComponent, isStandalone: true, selector: "fd-dialog-header", inputs: { inShellbar: { classPropertyName: "inShellbar", publicName: "inShellbar", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.role": "role()", "attr.aria-label": "computedAriaLabel()" } }, providers: [
|
|
535
586
|
{
|
|
536
587
|
provide: DEFAULT_TITLE_SIZE,
|
|
537
588
|
useValue: 5
|
|
538
589
|
}
|
|
539
|
-
], usesInheritance: true, ngImport: i0, template: "<
|
|
590
|
+
], usesInheritance: true, ngImport: i0, template: "<div\n fd-bar\n role=\"group\"\n class=\"fd-dialog__header\"\n [class.fd-shellbar]=\"inShellbar()\"\n [fdContentDensity]=\"dialogConfig.contentDensity ?? ''\"\n [barDesign]=\"subHeaderTemplate() ? 'header-with-subheader' : 'header'\"\n>\n <ng-template [ngTemplateOutlet]=\"headerTemplate() ? headerTemplate() : defaultTemplate\"></ng-template>\n <ng-template #defaultTemplate>\n <div fd-bar-left>\n <fd-bar-element [fullWidth]=\"true\">\n <ng-content select=\"[fd-title]\"></ng-content>\n </fd-bar-element>\n </div>\n <div fd-bar-right>\n <fd-bar-element>\n @if (!dialogConfig.mobile) {\n <ng-content select=\"[fd-dialog-full-screen-toggler-button]\"></ng-content>\n }\n <ng-content select=\"[fd-dialog-close-button]\"></ng-content>\n </fd-bar-element>\n </div>\n </ng-template>\n</div>\n@if (subHeaderTemplate()) {\n <div\n fd-bar\n role=\"group\"\n class=\"fd-dialog__subheader\"\n barDesign=\"subheader\"\n [fdContentDensity]=\"dialogConfig.contentDensity ?? ''\"\n >\n <ng-template [ngTemplateOutlet]=\"subHeaderTemplate()\"></ng-template>\n </div>\n}\n", dependencies: [{ kind: "component", type: BarComponent, selector: "[fd-bar]", inputs: ["barDesign", "inPage", "inHomePage", "clear", "size", "initialSuggestionTitle", "initialSuggestionSubline", "role"] }, { kind: "directive", type: BarLeftDirective, selector: "[fd-bar-left]", inputs: ["stackContentsVertically"] }, { kind: "directive", type: BarRightDirective, selector: "[fd-bar-right]", inputs: ["stackContentsVertically"] }, { kind: "directive", type: BarElementDirective, selector: "fd-bar-element", inputs: ["fullWidth"] }, { kind: "directive", type: ContentDensityDirective, selector: "[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]), [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]), [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]), [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])", inputs: ["fdContentDensity", "fdCompact", "fdCondensed", "fdCozy"], exportAs: ["fdContentDensity"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
540
591
|
}
|
|
541
592
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogHeaderComponent, decorators: [{
|
|
542
593
|
type: Component,
|
|
543
|
-
args: [{ selector: 'fd-dialog-header', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None,
|
|
594
|
+
args: [{ selector: 'fd-dialog-header', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
595
|
+
'[attr.role]': 'role()',
|
|
596
|
+
'[attr.aria-label]': 'computedAriaLabel()'
|
|
597
|
+
}, providers: [
|
|
544
598
|
{
|
|
545
599
|
provide: DEFAULT_TITLE_SIZE,
|
|
546
600
|
useValue: 5
|
|
@@ -552,8 +606,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
552
606
|
BarElementDirective,
|
|
553
607
|
ContentDensityDirective,
|
|
554
608
|
NgTemplateOutlet
|
|
555
|
-
], template: "<
|
|
556
|
-
}], propDecorators: { inShellbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "inShellbar", required: false }] }] } });
|
|
609
|
+
], template: "<div\n fd-bar\n role=\"group\"\n class=\"fd-dialog__header\"\n [class.fd-shellbar]=\"inShellbar()\"\n [fdContentDensity]=\"dialogConfig.contentDensity ?? ''\"\n [barDesign]=\"subHeaderTemplate() ? 'header-with-subheader' : 'header'\"\n>\n <ng-template [ngTemplateOutlet]=\"headerTemplate() ? headerTemplate() : defaultTemplate\"></ng-template>\n <ng-template #defaultTemplate>\n <div fd-bar-left>\n <fd-bar-element [fullWidth]=\"true\">\n <ng-content select=\"[fd-title]\"></ng-content>\n </fd-bar-element>\n </div>\n <div fd-bar-right>\n <fd-bar-element>\n @if (!dialogConfig.mobile) {\n <ng-content select=\"[fd-dialog-full-screen-toggler-button]\"></ng-content>\n }\n <ng-content select=\"[fd-dialog-close-button]\"></ng-content>\n </fd-bar-element>\n </div>\n </ng-template>\n</div>\n@if (subHeaderTemplate()) {\n <div\n fd-bar\n role=\"group\"\n class=\"fd-dialog__subheader\"\n barDesign=\"subheader\"\n [fdContentDensity]=\"dialogConfig.contentDensity ?? ''\"\n >\n <ng-template [ngTemplateOutlet]=\"subHeaderTemplate()\"></ng-template>\n </div>\n}\n" }]
|
|
610
|
+
}], propDecorators: { inShellbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "inShellbar", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
557
611
|
|
|
558
612
|
/** Service used to dynamically generate a dialog. */
|
|
559
613
|
class DialogBaseService {
|
|
@@ -1139,7 +1193,7 @@ class DialogDefaultComponent {
|
|
|
1139
1193
|
this._defaultDialogContent?.fullScreenButtonCallback?.();
|
|
1140
1194
|
}
|
|
1141
1195
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogDefaultComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DialogConfig }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1142
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DialogDefaultComponent, isStandalone: true, selector: "fd-dialog-default", ngImport: i0, template: "<fd-dialog>\n <fd-dialog-header>\n <div\n role=\"heading\"\n [attr.aria-level]=\"_defaultDialogContent?.titleHeadingLevel || 1\"\n fd-title\n [id]=\"_defaultDialogContent?.titleId || dialogTitleId\"\n >\n {{ _defaultDialogContent?.title }}\n </div>\n @if (_defaultDialogContent?.allowFullScreen) {\n <button\n fd-dialog-full-screen-toggler-button\n #fullScreenTogglerButton\n [title]=\"\n (fullScreenTogglerButton._fullscreen$()\n ? _defaultDialogContent.fullScreenMinifyButtonText\n : _defaultDialogContent.fullScreenExpandButtonText) || ''\n \"\n (click)=\"_fullScreenButtonClicked()\"\n ></button>\n }\n @if (_defaultDialogContent?.closeButtonCallback) {\n <button\n fd-dialog-close-button\n [title]=\"_defaultDialogContent.closeButtonTitle || ''\"\n [ariaLabel]=\"_defaultDialogContent.closeButtonAriaLabel || ''\"\n (click)=\"_closeButtonClicked()\"\n ></button>\n }\n @if (_defaultDialogContent?.subHeader) {\n <ng-template fdkTemplate=\"subheader\">\n <ng-template [ngTemplateOutlet]=\"_defaultDialogContent!.subHeader!\"></ng-template>\n </ng-template>\n }\n </fd-dialog-header>\n @if (_defaultDialogContent?.content) {\n <fd-dialog-body [id]=\"_defaultDialogContent.contentId || dialogContentId\">\n <ng-template [ngTemplateOutlet]=\"_defaultDialogContent.content!\"></ng-template>\n </fd-dialog-body>\n }\n @if (_showFooter()) {\n <fd-dialog-footer>\n @if (_defaultDialogContent?.approveButton) {\n <fd-button-bar\n fdType=\"emphasized\"\n fdkInitialFocus\n [label]=\"_defaultDialogContent.approveButton || ''\"\n [fdCozy]=\"_defaultDialogConfiguration.mobile\"\n (click)=\"_approveButtonClicked()\"\n [ariaLabel]=\"_defaultDialogContent.approveButtonAriaLabel\"\n [id]=\"_defaultDialogContent.approveButtonId || ''\"\n >\n </fd-button-bar>\n }\n @if (_defaultDialogContent?.cancelButton) {\n <fd-button-bar\n [label]=\"_defaultDialogContent.cancelButton || ''\"\n [fdCozy]=\"_defaultDialogConfiguration.mobile\"\n (click)=\"_cancelButtonClicked()\"\n [ariaLabel]=\"_defaultDialogContent.closeButtonAriaLabel\"\n [id]=\"_defaultDialogContent.cancelButtonId || ''\"\n >\n </fd-button-bar>\n }\n </fd-dialog-footer>\n }\n</fd-dialog>\n", dependencies: [{ kind: "component", type: DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig", "role", "ariaDescription"] }, { kind: "component", type: DialogHeaderComponent, selector: "fd-dialog-header", inputs: ["inShellbar"] }, { kind: "component", type: TitleComponent, selector: "[fd-title], [fdTitle]", inputs: ["twoLineClamp", "headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "component", type: DialogFullScreenTogglerButtonComponent, selector: "[fd-dialog-full-screen-toggler-button]", inputs: ["mobile", "dialogRef", "title"] }, { kind: "component", type: DialogCloseButtonComponent, selector: "[fd-dialog-close-button]", inputs: ["mobile", "title", "ariaLabel"] }, { kind: "directive", type: TemplateDirective, selector: "[fdkTemplate]", inputs: ["fdkTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DialogBodyComponent, selector: "fd-dialog-body", inputs: ["disablePaddings"] }, { kind: "component", type: DialogFooterComponent, selector: "fd-dialog-footer" }, { kind: "component", type: ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabelledby", "id"] }, { kind: "directive", type: InitialFocusDirective, selector: "[fdkInitialFocus]", inputs: ["fdkInitialFocus", "enabled", "focusLastElement"] }, { kind: "directive", type: ContentDensityDirective, selector: "[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]), [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]), [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]), [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])", inputs: ["fdContentDensity", "fdCompact", "fdCondensed", "fdCozy"], exportAs: ["fdContentDensity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1196
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: DialogDefaultComponent, isStandalone: true, selector: "fd-dialog-default", ngImport: i0, template: "<fd-dialog>\n <fd-dialog-header>\n <div\n role=\"heading\"\n [attr.aria-level]=\"_defaultDialogContent?.titleHeadingLevel || 1\"\n fd-title\n [id]=\"_defaultDialogContent?.titleId || dialogTitleId\"\n >\n {{ _defaultDialogContent?.title }}\n </div>\n @if (_defaultDialogContent?.allowFullScreen) {\n <button\n fd-dialog-full-screen-toggler-button\n #fullScreenTogglerButton\n [title]=\"\n (fullScreenTogglerButton._fullscreen$()\n ? _defaultDialogContent.fullScreenMinifyButtonText\n : _defaultDialogContent.fullScreenExpandButtonText) || ''\n \"\n (click)=\"_fullScreenButtonClicked()\"\n ></button>\n }\n @if (_defaultDialogContent?.closeButtonCallback) {\n <button\n fd-dialog-close-button\n [title]=\"_defaultDialogContent.closeButtonTitle || ''\"\n [ariaLabel]=\"_defaultDialogContent.closeButtonAriaLabel || ''\"\n (click)=\"_closeButtonClicked()\"\n ></button>\n }\n @if (_defaultDialogContent?.subHeader) {\n <ng-template fdkTemplate=\"subheader\">\n <ng-template [ngTemplateOutlet]=\"_defaultDialogContent!.subHeader!\"></ng-template>\n </ng-template>\n }\n </fd-dialog-header>\n @if (_defaultDialogContent?.content) {\n <fd-dialog-body [id]=\"_defaultDialogContent.contentId || dialogContentId\">\n <ng-template [ngTemplateOutlet]=\"_defaultDialogContent.content!\"></ng-template>\n </fd-dialog-body>\n }\n @if (_showFooter()) {\n <fd-dialog-footer>\n @if (_defaultDialogContent?.approveButton) {\n <fd-button-bar\n fdType=\"emphasized\"\n fdkInitialFocus\n [label]=\"_defaultDialogContent.approveButton || ''\"\n [fdCozy]=\"_defaultDialogConfiguration.mobile\"\n (click)=\"_approveButtonClicked()\"\n [ariaLabel]=\"_defaultDialogContent.approveButtonAriaLabel\"\n [id]=\"_defaultDialogContent.approveButtonId || ''\"\n >\n </fd-button-bar>\n }\n @if (_defaultDialogContent?.cancelButton) {\n <fd-button-bar\n [label]=\"_defaultDialogContent.cancelButton || ''\"\n [fdCozy]=\"_defaultDialogConfiguration.mobile\"\n (click)=\"_cancelButtonClicked()\"\n [ariaLabel]=\"_defaultDialogContent.closeButtonAriaLabel\"\n [id]=\"_defaultDialogContent.cancelButtonId || ''\"\n >\n </fd-button-bar>\n }\n </fd-dialog-footer>\n }\n</fd-dialog>\n", dependencies: [{ kind: "component", type: DialogComponent, selector: "fd-dialog", inputs: ["class", "dialogRef", "dialogConfig", "role", "ariaDescription"] }, { kind: "component", type: DialogHeaderComponent, selector: "fd-dialog-header", inputs: ["inShellbar", "role", "ariaLabel"] }, { kind: "component", type: TitleComponent, selector: "[fd-title], [fdTitle]", inputs: ["twoLineClamp", "headerSize", "wrap"], exportAs: ["fd-title"] }, { kind: "component", type: DialogFullScreenTogglerButtonComponent, selector: "[fd-dialog-full-screen-toggler-button]", inputs: ["mobile", "dialogRef", "title"] }, { kind: "component", type: DialogCloseButtonComponent, selector: "[fd-dialog-close-button]", inputs: ["mobile", "title", "ariaLabel"] }, { kind: "directive", type: TemplateDirective, selector: "[fdkTemplate]", inputs: ["fdkTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DialogBodyComponent, selector: "fd-dialog-body", inputs: ["disablePaddings", "role", "ariaLabel"] }, { kind: "component", type: DialogFooterComponent, selector: "fd-dialog-footer", inputs: ["role", "ariaLabel"] }, { kind: "component", type: ButtonBarComponent, selector: "fd-button-bar", inputs: ["fullWidth", "fdType", "title", "ariaLabelledby", "id"] }, { kind: "directive", type: InitialFocusDirective, selector: "[fdkInitialFocus]", inputs: ["fdkInitialFocus", "enabled", "focusLastElement"] }, { kind: "directive", type: ContentDensityDirective, selector: "[fdContentDensity]:not([fdCompact]):not([fdCondensed]):not([fdCozy]), [fdCompact]:not([fdContentDensity]):not([fdCondensed]):not([fdCozy]), [fdCondensed]:not([fdContentDensity]):not([fdCompact]):not([fdCozy]), [fdCozy]:not([fdContentDensity]):not([fdCompact]):not([fdCondensed])", inputs: ["fdContentDensity", "fdCompact", "fdCondensed", "fdCozy"], exportAs: ["fdContentDensity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1143
1197
|
}
|
|
1144
1198
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogDefaultComponent, decorators: [{
|
|
1145
1199
|
type: Component,
|
|
@@ -1291,7 +1345,7 @@ class DialogContainerComponent extends DynamicComponentContainer {
|
|
|
1291
1345
|
});
|
|
1292
1346
|
}
|
|
1293
1347
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogContainerComponent, deps: [{ token: DialogConfig }, { token: DialogRef }, { token: i0.DestroyRef }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1294
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.1", type: DialogContainerComponent, isStandalone: true, selector: "fd-dialog-container", inputs: { class: "class" },
|
|
1348
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.2.1", type: DialogContainerComponent, isStandalone: true, selector: "fd-dialog-container", inputs: { class: "class" }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true }], usesInheritance: true, ngImport: i0, template: '<ng-template (attached)="_attached($event)" cdkPortalOutlet></ng-template>', isInline: true, styles: ["fd-dialog-container{opacity:0;position:relative;z-index:999}:host:not(:first-of-type) ::ng-deep .fd-dialog:before{opacity:0}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i3$2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1295
1349
|
}
|
|
1296
1350
|
__decorate([
|
|
1297
1351
|
applyCssClass,
|
|
@@ -1301,9 +1355,7 @@ __decorate([
|
|
|
1301
1355
|
], DialogContainerComponent.prototype, "buildComponentCssClass", null);
|
|
1302
1356
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: DialogContainerComponent, decorators: [{
|
|
1303
1357
|
type: Component,
|
|
1304
|
-
args: [{ selector: 'fd-dialog-container', template: '<ng-template (attached)="_attached($event)" cdkPortalOutlet></ng-template>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PortalModule], host: {
|
|
1305
|
-
style: 'opacity: 0; position: relative; z-index: 999'
|
|
1306
|
-
}, styles: [":host:not(:first-of-type) ::ng-deep .fd-dialog:before{opacity:0}\n"] }]
|
|
1358
|
+
args: [{ selector: 'fd-dialog-container', template: '<ng-template (attached)="_attached($event)" cdkPortalOutlet></ng-template>', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PortalModule], styles: ["fd-dialog-container{opacity:0;position:relative;z-index:999}:host:not(:first-of-type) ::ng-deep .fd-dialog:before{opacity:0}\n"] }]
|
|
1307
1359
|
}], ctorParameters: () => [{ type: DialogConfig }, { type: DialogRef }, { type: i0.DestroyRef }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], propDecorators: { class: [{
|
|
1308
1360
|
type: Input
|
|
1309
1361
|
}], portalOutlet: [{
|