@i-cell/ids-angular 0.2.18 → 0.2.20
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/dialog/index.d.ts +3 -1
- package/fesm2022/i-cell-ids-angular-dialog.mjs +4 -2
- package/fesm2022/i-cell-ids-angular-dialog.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-forms.mjs +21 -21
- package/fesm2022/i-cell-ids-angular-forms.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-overlay-panel.mjs +8 -17
- package/fesm2022/i-cell-ids-angular-overlay-panel.mjs.map +1 -1
- package/fesm2022/i-cell-ids-angular-select.mjs +8 -6
- package/fesm2022/i-cell-ids-angular-select.mjs.map +1 -1
- package/forms/index.d.ts +2 -1
- package/overlay-panel/index.d.ts +3 -7
- package/package.json +20 -20
package/dialog/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Subject, Observable } from 'rxjs';
|
|
|
6
6
|
interface IdsDialogDefaultConfig {
|
|
7
7
|
size?: IdsSizeType;
|
|
8
8
|
showCloseButton?: boolean;
|
|
9
|
+
isCloseButtonDisabled?: boolean;
|
|
9
10
|
showBackdrop?: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare const IDS_DIALOG_DEFAULT_CONFIG: InjectionToken<IdsDialogDefaultConfig>;
|
|
@@ -29,6 +30,7 @@ declare class IdsDialogComponent extends ComponentBaseWithDefaults<IdsDialogDefa
|
|
|
29
30
|
mainTitle: _angular_core.InputSignal<string>;
|
|
30
31
|
subTitle: _angular_core.InputSignal<string | undefined>;
|
|
31
32
|
showCloseButton: _angular_core.InputSignal<boolean>;
|
|
33
|
+
isCloseButtonDisabled: _angular_core.InputSignal<boolean>;
|
|
32
34
|
showBackdrop: _angular_core.InputSignal<boolean>;
|
|
33
35
|
protected _customHeader: _angular_core.Signal<IdsDialogHeaderDirective | undefined>;
|
|
34
36
|
protected _hostClasses: _angular_core.Signal<string>;
|
|
@@ -39,7 +41,7 @@ declare class IdsDialogComponent extends ComponentBaseWithDefaults<IdsDialogDefa
|
|
|
39
41
|
ngOnDestroy(): void;
|
|
40
42
|
private _restoreOverlay;
|
|
41
43
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<IdsDialogComponent, never>;
|
|
42
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IdsDialogComponent, "dialog[idsDialog]", ["idsDialog"], { "size": { "alias": "size"; "required": false; "isSignal": true; }; "mainTitle": { "alias": "mainTitle"; "required": true; "isSignal": true; }; "subTitle": { "alias": "subTitle"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; }, {}, ["_customHeader"], ["[idsDialogContent]", "[idsDialogActions]"], true, never>;
|
|
44
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<IdsDialogComponent, "dialog[idsDialog]", ["idsDialog"], { "size": { "alias": "size"; "required": false; "isSignal": true; }; "mainTitle": { "alias": "mainTitle"; "required": true; "isSignal": true; }; "subTitle": { "alias": "subTitle"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "isCloseButtonDisabled": { "alias": "isCloseButtonDisabled"; "required": false; "isSignal": true; }; "showBackdrop": { "alias": "showBackdrop"; "required": false; "isSignal": true; }; }, {}, ["_customHeader"], ["[idsDialogContent]", "[idsDialogActions]"], true, never>;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
declare abstract class IdsCustomDialogBase<ResultType = unknown> implements AfterViewInit, OnDestroy {
|
|
@@ -15,6 +15,7 @@ function IDS_DIALOG_DEFAULT_CONFIG_FACTORY() {
|
|
|
15
15
|
return {
|
|
16
16
|
size: IdsSize.COMPACT,
|
|
17
17
|
showCloseButton: false,
|
|
18
|
+
isCloseButtonDisabled: false,
|
|
18
19
|
showBackdrop: true,
|
|
19
20
|
};
|
|
20
21
|
}
|
|
@@ -46,6 +47,7 @@ class IdsDialogComponent extends ComponentBaseWithDefaults {
|
|
|
46
47
|
this.mainTitle = input.required(...(ngDevMode ? [{ debugName: "mainTitle" }] : []));
|
|
47
48
|
this.subTitle = input(...(ngDevMode ? [undefined, { debugName: "subTitle" }] : []));
|
|
48
49
|
this.showCloseButton = input(this._defaultConfig.showCloseButton, ...(ngDevMode ? [{ debugName: "showCloseButton" }] : []));
|
|
50
|
+
this.isCloseButtonDisabled = input(this._defaultConfig.isCloseButtonDisabled, ...(ngDevMode ? [{ debugName: "isCloseButtonDisabled" }] : []));
|
|
49
51
|
this.showBackdrop = input(this._defaultConfig.showBackdrop, ...(ngDevMode ? [{ debugName: "showBackdrop" }] : []));
|
|
50
52
|
this._customHeader = contentChild(IdsDialogHeaderDirective, ...(ngDevMode ? [{ debugName: "_customHeader" }] : []));
|
|
51
53
|
this._hostClasses = computed(() => this._getHostClasses([
|
|
@@ -89,7 +91,7 @@ class IdsDialogComponent extends ComponentBaseWithDefaults {
|
|
|
89
91
|
this._overlayPrevParent = null;
|
|
90
92
|
}
|
|
91
93
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
92
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: IdsDialogComponent, isStandalone: true, selector: "dialog[idsDialog]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, mainTitle: { classPropertyName: "mainTitle", publicName: "mainTitle", isSignal: true, isRequired: true, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "cancel": "_onCancel($event)", "close": "_onNativeClose()" }, properties: { "attr.aria-labelledby": "_titleId()" } }, queries: [{ propertyName: "_customHeader", first: true, predicate: IdsDialogHeaderDirective, descendants: true, isSignal: true }], exportAs: ["idsDialog"], usesInheritance: true, ngImport: i0, template: "<section class=\"ids-dialog-container\">\n <header class=\"ids-dialog-header\">\n @if (_customHeader()) {\n <ng-container [ngTemplateOutlet]=\"_customHeader()!.template\" />\n } @else {\n <div class=\"ids-dialog-header-default-content\">\n <h2 class=\"ids-dialog-title\" [id]=\"_titleId()\">{{ mainTitle() }}</h2>\n @if (subTitle()) {\n <h3 class=\"ids-dialog-subtitle\">{{ subTitle() }}</h3>\n }\n </div>\n }\n\n @if (showCloseButton()) {\n <button\n type=\"button\"\n class=\"ids-dialog-close-button\"\n idsIconButton\n appearance=\"standard\"\n size=\"compact\"\n variant=\"surface\"\n (click)=\"close()\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" fontIcon=\"close\" />\n </button>\n }\n </header>\n <div class=\"ids-dialog-content\" [class.ids-dialog-content-scrollable]=\"scrollDetector.isScrollable()\">\n <div #scrollDetector=\"idsDetectScrollable\" idsDetectScrollable class=\"ids-dialog-content-overflow\">\n <ng-content select=\"[idsDialogContent]\" />\n </div>\n </div>\n <footer class=\"ids-dialog-actions\">\n <ng-content select=\"[idsDialogActions]\" />\n </footer>\n</section>\n", dependencies: [{ kind: "directive", type: IdsDetectScrollableDirective, selector: "[idsDetectScrollable]", exportAs: ["idsDetectScrollable"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "component", type: IdsIconButtonComponent, selector: "button[idsIconButton], a[idsIconButton]", inputs: ["appearance", "size", "variant", "disabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
94
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: IdsDialogComponent, isStandalone: true, selector: "dialog[idsDialog]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, mainTitle: { classPropertyName: "mainTitle", publicName: "mainTitle", isSignal: true, isRequired: true, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, isCloseButtonDisabled: { classPropertyName: "isCloseButtonDisabled", publicName: "isCloseButtonDisabled", isSignal: true, isRequired: false, transformFunction: null }, showBackdrop: { classPropertyName: "showBackdrop", publicName: "showBackdrop", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "cancel": "_onCancel($event)", "close": "_onNativeClose()" }, properties: { "attr.aria-labelledby": "_titleId()" } }, queries: [{ propertyName: "_customHeader", first: true, predicate: IdsDialogHeaderDirective, descendants: true, isSignal: true }], exportAs: ["idsDialog"], usesInheritance: true, ngImport: i0, template: "<section class=\"ids-dialog-container\">\n <header class=\"ids-dialog-header\">\n @if (_customHeader()) {\n <ng-container [ngTemplateOutlet]=\"_customHeader()!.template\" />\n } @else {\n <div class=\"ids-dialog-header-default-content\">\n <h2 class=\"ids-dialog-title\" [id]=\"_titleId()\">{{ mainTitle() }}</h2>\n @if (subTitle()) {\n <h3 class=\"ids-dialog-subtitle\">{{ subTitle() }}</h3>\n }\n </div>\n }\n\n @if (showCloseButton()) {\n <button\n type=\"button\"\n class=\"ids-dialog-close-button\"\n idsIconButton\n appearance=\"standard\"\n size=\"compact\"\n variant=\"surface\"\n [disabled]=\"isCloseButtonDisabled()\"\n (click)=\"close()\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" fontIcon=\"close\" />\n </button>\n }\n </header>\n <div class=\"ids-dialog-content\" [class.ids-dialog-content-scrollable]=\"scrollDetector.isScrollable()\">\n <div #scrollDetector=\"idsDetectScrollable\" idsDetectScrollable class=\"ids-dialog-content-overflow\">\n <ng-content select=\"[idsDialogContent]\" />\n </div>\n </div>\n <footer class=\"ids-dialog-actions\">\n <ng-content select=\"[idsDialogActions]\" />\n </footer>\n</section>\n", dependencies: [{ kind: "directive", type: IdsDetectScrollableDirective, selector: "[idsDetectScrollable]", exportAs: ["idsDetectScrollable"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "component", type: IdsIconButtonComponent, selector: "button[idsIconButton], a[idsIconButton]", inputs: ["appearance", "size", "variant", "disabled"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
93
95
|
}
|
|
94
96
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsDialogComponent, decorators: [{
|
|
95
97
|
type: Component,
|
|
@@ -102,7 +104,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
102
104
|
'[attr.aria-labelledby]': '_titleId()',
|
|
103
105
|
'(cancel)': '_onCancel($event)',
|
|
104
106
|
'(close)': '_onNativeClose()',
|
|
105
|
-
}, template: "<section class=\"ids-dialog-container\">\n <header class=\"ids-dialog-header\">\n @if (_customHeader()) {\n <ng-container [ngTemplateOutlet]=\"_customHeader()!.template\" />\n } @else {\n <div class=\"ids-dialog-header-default-content\">\n <h2 class=\"ids-dialog-title\" [id]=\"_titleId()\">{{ mainTitle() }}</h2>\n @if (subTitle()) {\n <h3 class=\"ids-dialog-subtitle\">{{ subTitle() }}</h3>\n }\n </div>\n }\n\n @if (showCloseButton()) {\n <button\n type=\"button\"\n class=\"ids-dialog-close-button\"\n idsIconButton\n appearance=\"standard\"\n size=\"compact\"\n variant=\"surface\"\n (click)=\"close()\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" fontIcon=\"close\" />\n </button>\n }\n </header>\n <div class=\"ids-dialog-content\" [class.ids-dialog-content-scrollable]=\"scrollDetector.isScrollable()\">\n <div #scrollDetector=\"idsDetectScrollable\" idsDetectScrollable class=\"ids-dialog-content-overflow\">\n <ng-content select=\"[idsDialogContent]\" />\n </div>\n </div>\n <footer class=\"ids-dialog-actions\">\n <ng-content select=\"[idsDialogActions]\" />\n </footer>\n</section>\n" }]
|
|
107
|
+
}, template: "<section class=\"ids-dialog-container\">\n <header class=\"ids-dialog-header\">\n @if (_customHeader()) {\n <ng-container [ngTemplateOutlet]=\"_customHeader()!.template\" />\n } @else {\n <div class=\"ids-dialog-header-default-content\">\n <h2 class=\"ids-dialog-title\" [id]=\"_titleId()\">{{ mainTitle() }}</h2>\n @if (subTitle()) {\n <h3 class=\"ids-dialog-subtitle\">{{ subTitle() }}</h3>\n }\n </div>\n }\n\n @if (showCloseButton()) {\n <button\n type=\"button\"\n class=\"ids-dialog-close-button\"\n idsIconButton\n appearance=\"standard\"\n size=\"compact\"\n variant=\"surface\"\n [disabled]=\"isCloseButtonDisabled()\"\n (click)=\"close()\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" fontIcon=\"close\" />\n </button>\n }\n </header>\n <div class=\"ids-dialog-content\" [class.ids-dialog-content-scrollable]=\"scrollDetector.isScrollable()\">\n <div #scrollDetector=\"idsDetectScrollable\" idsDetectScrollable class=\"ids-dialog-content-overflow\">\n <ng-content select=\"[idsDialogContent]\" />\n </div>\n </div>\n <footer class=\"ids-dialog-actions\">\n <ng-content select=\"[idsDialogActions]\" />\n </footer>\n</section>\n" }]
|
|
106
108
|
}] });
|
|
107
109
|
|
|
108
110
|
class IdsCustomDialogBase {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i-cell-ids-angular-dialog.mjs","sources":["../../../projects/widgets/dialog/dialog-defaults.ts","../../../projects/widgets/dialog/dialog-header.directive.ts","../../../projects/widgets/dialog/dialog.component.ts","../../../projects/widgets/dialog/dialog.component.html","../../../projects/widgets/dialog/custom-dialog-base.ts","../../../projects/widgets/dialog/dialog.service.ts","../../../projects/widgets/dialog/i-cell-ids-angular-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsDialogDefaultConfig {\n size?: IdsSizeType,\n showCloseButton?: boolean,\n showBackdrop?: boolean,\n}\n\nexport const IDS_DIALOG_DEFAULT_CONFIG = new InjectionToken<IdsDialogDefaultConfig>(\n 'IDS_DIALOG_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_DIALOG_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_DIALOG_DEFAULT_CONFIG_FACTORY(): Required<IdsDialogDefaultConfig> {\n return {\n size: IdsSize.COMPACT,\n showCloseButton: false,\n showBackdrop: true,\n };\n}\n\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[idsDialogHeader]',\n standalone: true,\n})\nexport class IdsDialogHeaderDirective {\n public template = inject(TemplateRef);\n}\n","import { IDS_DIALOG_DEFAULT_CONFIG, IDS_DIALOG_DEFAULT_CONFIG_FACTORY, IdsDialogDefaultConfig } from './dialog-defaults';\nimport { IdsDialogHeaderDirective } from './dialog-header.directive';\n\nimport { OverlayContainer } from '@angular/cdk/overlay';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n contentChild,\n inject,\n input,\n OnDestroy,\n} from '@angular/core';\nimport { ComponentBaseWithDefaults, IdsDetectScrollableDirective, IdsSizeType } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\nimport { IdsIconButtonComponent } from '@i-cell/ids-angular/icon-button';\n\nconst defaultConfig = IDS_DIALOG_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'dialog[idsDialog]',\n imports: [\n IdsDetectScrollableDirective,\n IdsIconComponent,\n IdsIconButtonComponent,\n NgTemplateOutlet,\n ],\n templateUrl: './dialog.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'idsDialog',\n host: {\n '[attr.aria-labelledby]': '_titleId()',\n '(cancel)': '_onCancel($event)',\n '(close)': '_onNativeClose()',\n },\n})\nexport class IdsDialogComponent extends ComponentBaseWithDefaults<IdsDialogDefaultConfig> implements OnDestroy {\n protected override get _hostName(): string {\n return 'dialog';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_DIALOG_DEFAULT_CONFIG);\n\n public dialog = inject<ElementRef<HTMLDialogElement>>(ElementRef).nativeElement;\n\n private readonly _overlay = inject(OverlayContainer);\n private _overlayRoot?: HTMLElement | null;\n private _overlayPrevParent?: Node | null;\n\n protected _titleId = computed(() => `${this.id()}-title`);\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public mainTitle = input.required<string>();\n public subTitle = input<string>();\n public showCloseButton = input<boolean>(this._defaultConfig.showCloseButton);\n public showBackdrop = input<boolean>(this._defaultConfig.showBackdrop);\n\n protected _customHeader = contentChild(IdsDialogHeaderDirective);\n\n protected _hostClasses = computed(() => this._getHostClasses([\n this.size(),\n this.showBackdrop() ? 'with-backdrop' : null,\n ]));\n\n protected _onCancel(event: Event): void {\n event.preventDefault();\n }\n\n public open(): void {\n this.dialog.showModal();\n\n const root = this._overlay.getContainerElement();\n if (root && root.parentNode !== this.dialog) {\n this._overlayRoot = root;\n this._overlayPrevParent = root.parentNode;\n this.dialog.appendChild(root);\n }\n }\n\n public close(): void {\n this.dialog.close();\n this._restoreOverlay();\n }\n\n protected _onNativeClose(): void {\n this._restoreOverlay();\n }\n\n public ngOnDestroy(): void {\n this._restoreOverlay();\n }\n\n private _restoreOverlay(): void {\n if (this._overlayRoot && this._overlayPrevParent) {\n try {\n this._overlayPrevParent.appendChild(this._overlayRoot);\n } catch { /* empty */ }\n }\n this._overlayRoot = null;\n this._overlayPrevParent = null;\n }\n}\n","<section class=\"ids-dialog-container\">\n <header class=\"ids-dialog-header\">\n @if (_customHeader()) {\n <ng-container [ngTemplateOutlet]=\"_customHeader()!.template\" />\n } @else {\n <div class=\"ids-dialog-header-default-content\">\n <h2 class=\"ids-dialog-title\" [id]=\"_titleId()\">{{ mainTitle() }}</h2>\n @if (subTitle()) {\n <h3 class=\"ids-dialog-subtitle\">{{ subTitle() }}</h3>\n }\n </div>\n }\n\n @if (showCloseButton()) {\n <button\n type=\"button\"\n class=\"ids-dialog-close-button\"\n idsIconButton\n appearance=\"standard\"\n size=\"compact\"\n variant=\"surface\"\n (click)=\"close()\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" fontIcon=\"close\" />\n </button>\n }\n </header>\n <div class=\"ids-dialog-content\" [class.ids-dialog-content-scrollable]=\"scrollDetector.isScrollable()\">\n <div #scrollDetector=\"idsDetectScrollable\" idsDetectScrollable class=\"ids-dialog-content-overflow\">\n <ng-content select=\"[idsDialogContent]\" />\n </div>\n </div>\n <footer class=\"ids-dialog-actions\">\n <ng-content select=\"[idsDialogActions]\" />\n </footer>\n</section>\n","import { IdsDialogComponent } from './dialog.component';\n\nimport { AfterViewInit, Directive, OnDestroy, viewChild } from '@angular/core';\nimport { Subject, Subscription, fromEvent } from 'rxjs';\n\n@Directive({ standalone: true })\nexport abstract class IdsCustomDialogBase<ResultType = unknown> implements AfterViewInit, OnDestroy {\n public dialogResult = new Subject<ResultType | undefined>();\n\n protected _dialog = viewChild.required(IdsDialogComponent);\n\n private _closeSub?: Subscription;\n\n public ngAfterViewInit(): void {\n this._dialog().open();\n this._closeSub = fromEvent(this._dialog().dialog, 'close').subscribe(() => {\n this._setDialogResult();\n });\n }\n\n public ngOnDestroy(): void {\n this._closeSub?.unsubscribe();\n }\n\n public close(payload?: ResultType): void {\n this._closeSub?.unsubscribe();\n this._dialog().close();\n this._setDialogResult(payload);\n }\n\n private _setDialogResult(payload?: ResultType): void {\n this.dialogResult.next(payload);\n this.dialogResult.complete();\n }\n}\n","import { IdsCustomDialogBase } from './custom-dialog-base';\n\nimport { DOCUMENT } from '@angular/common';\nimport { ApplicationRef, EnvironmentInjector, Injectable, Injector, Provider, Signal, StaticProvider, Type, createComponent, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class IdsDialogService {\n private _appRef = inject(ApplicationRef);\n private _document = inject(DOCUMENT) as Document;\n private _injector = inject(EnvironmentInjector);\n\n public open<C extends IdsCustomDialogBase<R>, R = unknown>(\n component: Type<C>,\n options?: { providers?: (Provider | StaticProvider)[], inputs?: { [P in keyof C]?: C[P] extends Signal<infer T> ? T : C[P] } },\n ): Observable<R | undefined> {\n let elementInjector = undefined;\n\n if (options?.providers) {\n elementInjector = Injector.create({\n parent: this._injector,\n providers: options.providers,\n });\n }\n\n const createOptions = {\n environmentInjector: this._injector,\n ...(elementInjector && { elementInjector }),\n };\n const dialogRef = createComponent(component, createOptions);\n\n if (options?.inputs) {\n Object.keys(options.inputs).forEach((key) => dialogRef.setInput(key, options.inputs![key as keyof C]));\n }\n\n this._document.body.appendChild(dialogRef.location.nativeElement);\n\n this._appRef.attachView(dialogRef.hostView);\n\n const onClose = dialogRef.instance.dialogResult.asObservable();\n\n onClose.subscribe(() => {\n this._document.body.removeChild(dialogRef.location.nativeElement);\n dialogRef.destroy();\n },\n );\n\n return onClose;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MASa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE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A,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cADH,MAAM,EAAA,CAAA,CAAA;;2FACnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACNlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"i-cell-ids-angular-dialog.mjs","sources":["../../../projects/widgets/dialog/dialog-defaults.ts","../../../projects/widgets/dialog/dialog-header.directive.ts","../../../projects/widgets/dialog/dialog.component.ts","../../../projects/widgets/dialog/dialog.component.html","../../../projects/widgets/dialog/custom-dialog-base.ts","../../../projects/widgets/dialog/dialog.service.ts","../../../projects/widgets/dialog/i-cell-ids-angular-dialog.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsDialogDefaultConfig {\n size?: IdsSizeType,\n showCloseButton?: boolean,\n isCloseButtonDisabled?: boolean,\n showBackdrop?: boolean,\n}\n\nexport const IDS_DIALOG_DEFAULT_CONFIG = new InjectionToken<IdsDialogDefaultConfig>(\n 'IDS_DIALOG_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_DIALOG_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_DIALOG_DEFAULT_CONFIG_FACTORY(): Required<IdsDialogDefaultConfig> {\n return {\n size: IdsSize.COMPACT,\n showCloseButton: false,\n isCloseButtonDisabled: false,\n showBackdrop: true,\n };\n}\n\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[idsDialogHeader]',\n standalone: true,\n})\nexport class IdsDialogHeaderDirective {\n public template = inject(TemplateRef);\n}\n","import { IDS_DIALOG_DEFAULT_CONFIG, IDS_DIALOG_DEFAULT_CONFIG_FACTORY, IdsDialogDefaultConfig } from './dialog-defaults';\nimport { IdsDialogHeaderDirective } from './dialog-header.directive';\n\nimport { OverlayContainer } from '@angular/cdk/overlay';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n contentChild,\n inject,\n input,\n OnDestroy,\n} from '@angular/core';\nimport { ComponentBaseWithDefaults, IdsDetectScrollableDirective, IdsSizeType } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\nimport { IdsIconButtonComponent } from '@i-cell/ids-angular/icon-button';\n\nconst defaultConfig = IDS_DIALOG_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'dialog[idsDialog]',\n imports: [\n IdsDetectScrollableDirective,\n IdsIconComponent,\n IdsIconButtonComponent,\n NgTemplateOutlet,\n ],\n templateUrl: './dialog.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'idsDialog',\n host: {\n '[attr.aria-labelledby]': '_titleId()',\n '(cancel)': '_onCancel($event)',\n '(close)': '_onNativeClose()',\n },\n})\nexport class IdsDialogComponent extends ComponentBaseWithDefaults<IdsDialogDefaultConfig> implements OnDestroy {\n protected override get _hostName(): string {\n return 'dialog';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_DIALOG_DEFAULT_CONFIG);\n\n public dialog = inject<ElementRef<HTMLDialogElement>>(ElementRef).nativeElement;\n\n private readonly _overlay = inject(OverlayContainer);\n private _overlayRoot?: HTMLElement | null;\n private _overlayPrevParent?: Node | null;\n\n protected _titleId = computed(() => `${this.id()}-title`);\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public mainTitle = input.required<string>();\n public subTitle = input<string>();\n public showCloseButton = input<boolean>(this._defaultConfig.showCloseButton);\n public isCloseButtonDisabled = input<boolean>(this._defaultConfig.isCloseButtonDisabled);\n public showBackdrop = input<boolean>(this._defaultConfig.showBackdrop);\n\n protected _customHeader = contentChild(IdsDialogHeaderDirective);\n\n protected _hostClasses = computed(() => this._getHostClasses([\n this.size(),\n this.showBackdrop() ? 'with-backdrop' : null,\n ]));\n\n protected _onCancel(event: Event): void {\n event.preventDefault();\n }\n\n public open(): void {\n this.dialog.showModal();\n\n const root = this._overlay.getContainerElement();\n if (root && root.parentNode !== this.dialog) {\n this._overlayRoot = root;\n this._overlayPrevParent = root.parentNode;\n this.dialog.appendChild(root);\n }\n }\n\n public close(): void {\n this.dialog.close();\n this._restoreOverlay();\n }\n\n protected _onNativeClose(): void {\n this._restoreOverlay();\n }\n\n public ngOnDestroy(): void {\n this._restoreOverlay();\n }\n\n private _restoreOverlay(): void {\n if (this._overlayRoot && this._overlayPrevParent) {\n try {\n this._overlayPrevParent.appendChild(this._overlayRoot);\n } catch { /* empty */ }\n }\n this._overlayRoot = null;\n this._overlayPrevParent = null;\n }\n}\n","<section class=\"ids-dialog-container\">\n <header class=\"ids-dialog-header\">\n @if (_customHeader()) {\n <ng-container [ngTemplateOutlet]=\"_customHeader()!.template\" />\n } @else {\n <div class=\"ids-dialog-header-default-content\">\n <h2 class=\"ids-dialog-title\" [id]=\"_titleId()\">{{ mainTitle() }}</h2>\n @if (subTitle()) {\n <h3 class=\"ids-dialog-subtitle\">{{ subTitle() }}</h3>\n }\n </div>\n }\n\n @if (showCloseButton()) {\n <button\n type=\"button\"\n class=\"ids-dialog-close-button\"\n idsIconButton\n appearance=\"standard\"\n size=\"compact\"\n variant=\"surface\"\n [disabled]=\"isCloseButtonDisabled()\"\n (click)=\"close()\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" fontIcon=\"close\" />\n </button>\n }\n </header>\n <div class=\"ids-dialog-content\" [class.ids-dialog-content-scrollable]=\"scrollDetector.isScrollable()\">\n <div #scrollDetector=\"idsDetectScrollable\" idsDetectScrollable class=\"ids-dialog-content-overflow\">\n <ng-content select=\"[idsDialogContent]\" />\n </div>\n </div>\n <footer class=\"ids-dialog-actions\">\n <ng-content select=\"[idsDialogActions]\" />\n </footer>\n</section>\n","import { IdsDialogComponent } from './dialog.component';\n\nimport { AfterViewInit, Directive, OnDestroy, viewChild } from '@angular/core';\nimport { Subject, Subscription, fromEvent } from 'rxjs';\n\n@Directive({ standalone: true })\nexport abstract class IdsCustomDialogBase<ResultType = unknown> implements AfterViewInit, OnDestroy {\n public dialogResult = new Subject<ResultType | undefined>();\n\n protected _dialog = viewChild.required(IdsDialogComponent);\n\n private _closeSub?: Subscription;\n\n public ngAfterViewInit(): void {\n this._dialog().open();\n this._closeSub = fromEvent(this._dialog().dialog, 'close').subscribe(() => {\n this._setDialogResult();\n });\n }\n\n public ngOnDestroy(): void {\n this._closeSub?.unsubscribe();\n }\n\n public close(payload?: ResultType): void {\n this._closeSub?.unsubscribe();\n this._dialog().close();\n this._setDialogResult(payload);\n }\n\n private _setDialogResult(payload?: ResultType): void {\n this.dialogResult.next(payload);\n this.dialogResult.complete();\n }\n}\n","import { IdsCustomDialogBase } from './custom-dialog-base';\n\nimport { DOCUMENT } from '@angular/common';\nimport { ApplicationRef, EnvironmentInjector, Injectable, Injector, Provider, Signal, StaticProvider, Type, createComponent, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class IdsDialogService {\n private _appRef = inject(ApplicationRef);\n private _document = inject(DOCUMENT) as Document;\n private _injector = inject(EnvironmentInjector);\n\n public open<C extends IdsCustomDialogBase<R>, R = unknown>(\n component: Type<C>,\n options?: { providers?: (Provider | StaticProvider)[], inputs?: { [P in keyof C]?: C[P] extends Signal<infer T> ? T : C[P] } },\n ): Observable<R | undefined> {\n let elementInjector = undefined;\n\n if (options?.providers) {\n elementInjector = Injector.create({\n parent: this._injector,\n providers: options.providers,\n });\n }\n\n const createOptions = {\n environmentInjector: this._injector,\n ...(elementInjector && { elementInjector }),\n };\n const dialogRef = createComponent(component, createOptions);\n\n if (options?.inputs) {\n Object.keys(options.inputs).forEach((key) => dialogRef.setInput(key, options.inputs![key as keyof C]));\n }\n\n this._document.body.appendChild(dialogRef.location.nativeElement);\n\n this._appRef.attachView(dialogRef.hostView);\n\n const onClose = dialogRef.instance.dialogResult.asObservable();\n\n onClose.subscribe(() => {\n this._document.body.removeChild(dialogRef.location.nativeElement);\n dialogRef.destroy();\n },\n );\n\n return onClose;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAUa,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,iCAAiC;AAC3C,CAAA;SAGa,iCAAiC,GAAA;IAC/C,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,OAAO;AACrB,QAAA,eAAe,EAAE,KAAK;AACtB,QAAA,qBAAqB,EAAE,KAAK;AAC5B,QAAA,YAAY,EAAE,IAAI;KACnB;AACH;;MCnBa,wBAAwB,CAAA;AAJrC,IAAA,WAAA,GAAA;AAKS,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC;AACtC,IAAA;8GAFY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACeD,MAAM,aAAa,GAAG,iCAAiC,EAAE;AAoBnD,MAAQ,kBAAmB,SAAQ,yBAAiD,CAAA;AAlB1F,IAAA,WAAA,GAAA;;QAuBqB,IAAA,CAAA,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,aAAa,EAAE,yBAAyB,CAAC;A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,GAAc,CAAC,CAAC,CAAC;QACxG;AAEA,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC;QAEjE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC;QAE3C,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,EAAE;AAE9D,QAAA,OAAO,CAAC,SAAS,CAAC,MAAK;AACrB,YAAA,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC;YACjE,SAAS,CAAC,OAAO,EAAE;AACrB,QAAA,CAAC,CACA;AAED,QAAA,OAAO,OAAO;IAChB;8GAzCW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cADH,MAAM,EAAA,CAAA,CAAA;;2FACnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACNlC;;AAEG;;;;"}
|
|
@@ -983,12 +983,12 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
983
983
|
this.hintMinChars = input(this._defaultConfig.hintMinChars, ...(ngDevMode ? [{ debugName: "hintMinChars" }] : []));
|
|
984
984
|
this.hintMaxLength = input(this._defaultConfig.hintMaxLength, ...(ngDevMode ? [{ debugName: "hintMaxLength" }] : []));
|
|
985
985
|
this.panelClasses = input('', ...(ngDevMode ? [{ debugName: "panelClasses" }] : []));
|
|
986
|
-
this.isPanelOpen = signal(false, ...(ngDevMode ? [{ debugName: "isPanelOpen" }] : []));
|
|
987
986
|
this.parentSize = computed(() => this._parentFormField.parentOrSelfSize(), ...(ngDevMode ? [{ debugName: "parentSize" }] : []));
|
|
988
987
|
this.parentVariant = computed(() => this._parentFormField.parentOrSelfVariant(), ...(ngDevMode ? [{ debugName: "parentVariant" }] : []));
|
|
989
988
|
this.errorStateMatcher = signal(inject(ErrorStateMatcher), ...(ngDevMode ? [{ debugName: "errorStateMatcher" }] : []));
|
|
990
989
|
this.successStateMatcher = signal(inject(SuccessStateMatcher), ...(ngDevMode ? [{ debugName: "successStateMatcher" }] : []));
|
|
991
990
|
this.options = viewChildren(IdsOptionComponent, ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
991
|
+
this.overlayPanel = viewChild.required(IdsOverlayPanelComponent);
|
|
992
992
|
this.onContainerClick = () => { };
|
|
993
993
|
this._hostClasses = computed(() => this._getHostClasses([
|
|
994
994
|
this.parentSize(),
|
|
@@ -1001,8 +1001,8 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1001
1001
|
this.panelClasses(),
|
|
1002
1002
|
].join(' '), ...(ngDevMode ? [{ debugName: "_panelClasses" }] : []));
|
|
1003
1003
|
this._focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : []));
|
|
1004
|
-
this._canOpen = computed(() => !this.
|
|
1005
|
-
this._panel = viewChild('
|
|
1004
|
+
this._canOpen = computed(() => !this.overlayPanel().open() && !this.disabled() && !this.readonly() && this.options().length > 0, ...(ngDevMode ? [{ debugName: "_canOpen" }] : []));
|
|
1005
|
+
this._panel = viewChild('overlay', ...(ngDevMode ? [{ debugName: "_panel", read: (ElementRef) }] : [{ read: (ElementRef) }]));
|
|
1006
1006
|
this._inputElemment = viewChild('fallbackOverlayOrigin', ...(ngDevMode ? [{ debugName: "_inputElemment", read: (ElementRef) }] : [{ read: (ElementRef) }]));
|
|
1007
1007
|
this._resource = rxResource({
|
|
1008
1008
|
defaultValue: [],
|
|
@@ -1013,7 +1013,7 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1013
1013
|
this._onTouched = () => { };
|
|
1014
1014
|
this._searchText = model('', ...(ngDevMode ? [{ debugName: "_searchText" }] : []));
|
|
1015
1015
|
this._skipPredicate = (option) => {
|
|
1016
|
-
if (this.
|
|
1016
|
+
if (this.overlayPanel().open()) {
|
|
1017
1017
|
return false;
|
|
1018
1018
|
}
|
|
1019
1019
|
return option.disabledInput();
|
|
@@ -1086,7 +1086,7 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1086
1086
|
.withAllowedModifierKeys(['shiftKey'])
|
|
1087
1087
|
.skipPredicate(this._skipPredicate);
|
|
1088
1088
|
this._keyManager.change.subscribe(() => {
|
|
1089
|
-
if (this.
|
|
1089
|
+
if (this.overlayPanel().open() && this._panel()) {
|
|
1090
1090
|
this._scrollOptionIntoView(this._keyManager?.activeItemIndex || 0);
|
|
1091
1091
|
}
|
|
1092
1092
|
});
|
|
@@ -1107,7 +1107,7 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1107
1107
|
if (isUserInput) {
|
|
1108
1108
|
this._keyManager?.setActiveItem(source);
|
|
1109
1109
|
}
|
|
1110
|
-
if (isUserInput && !this.multiSelect() && this.
|
|
1110
|
+
if (isUserInput && !this.multiSelect() && this.overlayPanel().open()) {
|
|
1111
1111
|
this.close();
|
|
1112
1112
|
}
|
|
1113
1113
|
if (this.multiSelect()) {
|
|
@@ -1123,11 +1123,11 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1123
1123
|
this._handleChange();
|
|
1124
1124
|
this._onTouched();
|
|
1125
1125
|
this._inputElemment()?.nativeElement.blur();
|
|
1126
|
-
this.
|
|
1126
|
+
this.overlayPanel().open.set(false);
|
|
1127
1127
|
}
|
|
1128
1128
|
_handleKeydown(event) {
|
|
1129
1129
|
if (!this.disabled() && !this.readonly()) {
|
|
1130
|
-
this.
|
|
1130
|
+
this.overlayPanel().open() ? this._handleOpenedPanelKeydown(event) : this._handleClosedPanelKeydown(event);
|
|
1131
1131
|
// announce number of options when a key is pressed
|
|
1132
1132
|
this._liveAnnouncer.announce(this.options()
|
|
1133
1133
|
.filter((option) => !option.disabled)
|
|
@@ -1232,7 +1232,7 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1232
1232
|
return refToMeasure.nativeElement.getBoundingClientRect().width;
|
|
1233
1233
|
}
|
|
1234
1234
|
toggle() {
|
|
1235
|
-
this.
|
|
1235
|
+
this.overlayPanel().open() ? this.close() : this.open();
|
|
1236
1236
|
}
|
|
1237
1237
|
open() {
|
|
1238
1238
|
if (!this._canOpen()) {
|
|
@@ -1242,14 +1242,14 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1242
1242
|
this._preferredOverlayOrigin = this._parentFormField?.getConnectedOverlayOrigin();
|
|
1243
1243
|
}
|
|
1244
1244
|
this._overlayWidth = this._getOverlayWidth(this._preferredOverlayOrigin);
|
|
1245
|
-
this.
|
|
1245
|
+
this.overlayPanel().open.set(true);
|
|
1246
1246
|
this._keyManager?.withHorizontalOrientation(null);
|
|
1247
1247
|
this._highlightCorrectOption();
|
|
1248
1248
|
this._changeDetectorRef.markForCheck();
|
|
1249
1249
|
}
|
|
1250
1250
|
close() {
|
|
1251
|
-
if (this.
|
|
1252
|
-
this.
|
|
1251
|
+
if (this.overlayPanel().open()) {
|
|
1252
|
+
this.overlayPanel().open.set(false);
|
|
1253
1253
|
this._changeDetectorRef.markForCheck();
|
|
1254
1254
|
this._onTouched();
|
|
1255
1255
|
}
|
|
@@ -1296,7 +1296,7 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1296
1296
|
if (correspondingOption) {
|
|
1297
1297
|
this._keyManager?.updateActiveItem(correspondingOption);
|
|
1298
1298
|
}
|
|
1299
|
-
else if (!this.
|
|
1299
|
+
else if (!this.overlayPanel().open()) {
|
|
1300
1300
|
this._keyManager?.updateActiveItem(-1);
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
@@ -1379,13 +1379,13 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1379
1379
|
_onBlur() {
|
|
1380
1380
|
this._focused.set(false);
|
|
1381
1381
|
this._keyManager?.cancelTypeahead();
|
|
1382
|
-
if (!this.disabled() && !this.
|
|
1382
|
+
if (!this.disabled() && !this.overlayPanel().open()) {
|
|
1383
1383
|
this._onTouched();
|
|
1384
1384
|
this._changeDetectorRef.markForCheck();
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
_getAriaActiveDescendant() {
|
|
1388
|
-
if (this.
|
|
1388
|
+
if (this.overlayPanel().open() && this._keyManager?.activeItem) {
|
|
1389
1389
|
return this._keyManager.activeItem.id();
|
|
1390
1390
|
}
|
|
1391
1391
|
return null;
|
|
@@ -1399,7 +1399,7 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
}
|
|
1401
1401
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsAutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1402
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: IdsAutocompleteComponent, isStandalone: true, selector: "ids-autocomplete[ngModel]:not([formControl]):not([formControlName]),\n ids-autocomplete[formControl]:not([ngModel]):not([formControlName]),\n ids-autocomplete[formControlName]:not([ngModel]):not([formControl])", inputs: { minChars: { classPropertyName: "minChars", publicName: "minChars", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelClearButton: { classPropertyName: "ariaLabelClearButton", publicName: "ariaLabelClearButton", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelToggleButton: { classPropertyName: "ariaLabelToggleButton", publicName: "ariaLabelToggleButton", isSignal: true, isRequired: false, transformFunction: null }, valueCompareFn: { classPropertyName: "valueCompareFn", publicName: "valueCompareFn", isSignal: true, isRequired: false, transformFunction: null }, sortCompareFn: { classPropertyName: "sortCompareFn", publicName: "sortCompareFn", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, typeaheadDebounceInterval: { classPropertyName: "typeaheadDebounceInterval", publicName: "typeaheadDebounceInterval", isSignal: true, isRequired: false, transformFunction: null }, hintLoading: { classPropertyName: "hintLoading", publicName: "hintLoading", isSignal: true, isRequired: false, transformFunction: null }, hintNoResults: { classPropertyName: "hintNoResults", publicName: "hintNoResults", isSignal: true, isRequired: false, transformFunction: null }, hintMinChars: { classPropertyName: "hintMinChars", publicName: "hintMinChars", isSignal: true, isRequired: false, transformFunction: null }, hintMaxLength: { classPropertyName: "hintMaxLength", publicName: "hintMaxLength", isSignal: true, isRequired: false, transformFunction: null }, panelClasses: { classPropertyName: "panelClasses", publicName: "panelClasses", isSignal: true, isRequired: false, transformFunction: null }, _searchText: { classPropertyName: "_searchText", publicName: "_searchText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { _searchText: "_searchTextChange" }, host: { attributes: { "role": "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox" }, listeners: { "keydown": "_handleKeydown($event)", "focus": "focus()", "blur": "_onBlur()" }, properties: { "attr.tabindex": "disabled() ? -1 : tabIndex()", "attr.aria-controls": "
|
|
1402
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: IdsAutocompleteComponent, isStandalone: true, selector: "ids-autocomplete[ngModel]:not([formControl]):not([formControlName]),\n ids-autocomplete[formControl]:not([ngModel]):not([formControlName]),\n ids-autocomplete[formControlName]:not([ngModel]):not([formControl])", inputs: { minChars: { classPropertyName: "minChars", publicName: "minChars", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, multiSelect: { classPropertyName: "multiSelect", publicName: "multiSelect", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelClearButton: { classPropertyName: "ariaLabelClearButton", publicName: "ariaLabelClearButton", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelToggleButton: { classPropertyName: "ariaLabelToggleButton", publicName: "ariaLabelToggleButton", isSignal: true, isRequired: false, transformFunction: null }, valueCompareFn: { classPropertyName: "valueCompareFn", publicName: "valueCompareFn", isSignal: true, isRequired: false, transformFunction: null }, sortCompareFn: { classPropertyName: "sortCompareFn", publicName: "sortCompareFn", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, typeaheadDebounceInterval: { classPropertyName: "typeaheadDebounceInterval", publicName: "typeaheadDebounceInterval", isSignal: true, isRequired: false, transformFunction: null }, hintLoading: { classPropertyName: "hintLoading", publicName: "hintLoading", isSignal: true, isRequired: false, transformFunction: null }, hintNoResults: { classPropertyName: "hintNoResults", publicName: "hintNoResults", isSignal: true, isRequired: false, transformFunction: null }, hintMinChars: { classPropertyName: "hintMinChars", publicName: "hintMinChars", isSignal: true, isRequired: false, transformFunction: null }, hintMaxLength: { classPropertyName: "hintMaxLength", publicName: "hintMaxLength", isSignal: true, isRequired: false, transformFunction: null }, panelClasses: { classPropertyName: "panelClasses", publicName: "panelClasses", isSignal: true, isRequired: false, transformFunction: null }, _searchText: { classPropertyName: "_searchText", publicName: "_searchText", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { _searchText: "_searchTextChange" }, host: { attributes: { "role": "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox" }, listeners: { "keydown": "_handleKeydown($event)", "focus": "focus()", "blur": "_onBlur()" }, properties: { "attr.tabindex": "disabled() ? -1 : tabIndex()", "attr.aria-controls": "overlayPanel().open() ? id() + \"-panel\" : null", "attr.aria-owns": "overlayPanel().open() ? id() + \"-panel\" : null", "attr.aria-expanded": "overlayPanel().open()", "attr.aria-label": "ariaLabel() || null", "attr.aria-labelledby": "ariaLabelledby() || null", "attr.aria-required": "required().toString()", "attr.aria-disabled": "disabled().toString()", "attr.aria-invalid": "hasErrorState()", "attr.aria-activedescendant": "_getAriaActiveDescendant()" } }, providers: [
|
|
1403
1403
|
{ provide: IDS_FORM_FIELD_CONTROL, useExisting: IdsAutocompleteComponent },
|
|
1404
1404
|
{ provide: IDS_OPTION_PARENT_COMPONENT, useExisting: IdsAutocompleteComponent },
|
|
1405
1405
|
{
|
|
@@ -1407,7 +1407,7 @@ class IdsAutocompleteComponent extends IdsFormFieldControl {
|
|
|
1407
1407
|
useExisting: forwardRef(() => IdsAutocompleteComponent),
|
|
1408
1408
|
multi: true,
|
|
1409
1409
|
},
|
|
1410
|
-
], viewQueries: [{ propertyName: "options", predicate: IdsOptionComponent, descendants: true, isSignal: true }, { propertyName: "_panel", first: true, predicate: ["
|
|
1410
|
+
], viewQueries: [{ propertyName: "options", predicate: IdsOptionComponent, descendants: true, isSignal: true }, { propertyName: "overlayPanel", first: true, predicate: IdsOverlayPanelComponent, descendants: true, isSignal: true }, { propertyName: "_panel", first: true, predicate: ["overlay"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_inputElemment", first: true, predicate: ["fallbackOverlayOrigin"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@let isLoading = _resource.isLoading();\n@let optionsLength = _resource.value().length;\n@let maxOptionsLength = maxLength();\n\n<input\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n idsInput\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"false\"\n [(ngModel)]=\"_searchText\"\n (click)=\"_onInputClick()\"\n/>\n@if (_searchText().length > 0) {\n <div idsFormFieldAction>\n <button\n type=\"button\"\n idsIconButton\n appearance=\"standard\"\n variant=\"surface\"\n size=\"dense\"\n [attr.aria-label]=\"ariaLabelClearButton()\"\n [idsTooltip]=\"ariaLabelClearButton()\"\n [idsTooltipDisabled]=\"!ariaLabelClearButton() || disabled()\"\n [idsTooltipIgnoreClipped]=\"true\"\n [disabled]=\"disabled()\"\n (click)=\"clear()\"\n >\n <ids-icon alt=\"\" aria-hidden=\"true\" fontIcon=\"close\" />\n </button>\n </div>\n}\n@if (!isLoading && optionsLength > 0) {\n <div idsFormFieldAction>\n <button\n type=\"button\"\n idsIconButton\n appearance=\"standard\"\n variant=\"surface\"\n size=\"dense\"\n [attr.aria-label]=\"ariaLabelToggleButton()\"\n [idsTooltip]=\"ariaLabelToggleButton()\"\n [idsTooltipDisabled]=\"!ariaLabelToggleButton() || disabled()\"\n [idsTooltipIgnoreClipped]=\"true\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n >\n <ids-icon alt=\"\" aria-hidden=\"true\" [fontIcon]=\"overlay.open() ? 'chevron-up' : 'chevron-down'\" />\n </button>\n </div>\n}\n@if (isLoading) {\n <div idsFormFieldAction>\n <ids-spinner sizeCollection=\"small\" size=\"compact\" variant=\"surface\" [isTrack]=\"true\" [aria-label]=\"hintLoading()\" />\n </div>\n}\n<ids-overlay-panel\n #overlay\n variant=\"light\"\n [id]=\"id() + '-panel'\"\n [origin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n [size]=\"parentSize()\"\n [width]=\"_overlayWidth\"\n [panelClasses]=\"_panelClasses()\"\n>\n @let showHintLoading = isLoading;\n @let showHintMinChars = _searchText().length < minChars();\n @let showHintMaxLength = maxOptionsLength && optionsLength > maxOptionsLength;\n @let showHintNoResults = optionsLength === 0;\n\n @if (showHintLoading || showHintMinChars || showHintMaxLength || showHintNoResults) {\n <div class=\"ids-overlay-panel__autocomplete-message\">\n <ids-option disabled>\n @if (showHintLoading && !showHintMinChars) {\n {{ hintLoading() }}\n } @else if (showHintMinChars) {\n {{ hintMinChars() }}\n } @else if (showHintMaxLength) {\n {{ hintMaxLength() }}\n } @else if (showHintNoResults) {\n {{ hintNoResults() }}\n }\n </ids-option>\n </div>\n } @else {\n @for (option of _resource.value(); track $index) {\n <ids-option [value]=\"option\">{{ option }}</ids-option>\n }\n }\n</ids-overlay-panel>\n", dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IdsFormFieldActionDirective, selector: "[idsFormFieldAction]" }, { kind: "directive", type: IdsInputDirective, selector: "input[idsInput][ngModel]:not([formControl]):not([formControlName]),\n input[idsInput][formControl]:not([ngModel]):not([formControlName]),\n input[idsInput][formControlName]:not([ngModel]):not([formControl]),\n textarea[idsInput][ngModel]:not([formControl]):not([formControlName]),\n textarea[idsInput][formControl]:not([ngModel]):not([formControlName]),\n textarea[idsInput][formControlName]:not([ngModel]):not([formControl])", inputs: ["name", "type", "errorStateMatcher", "successStateMatcher"], exportAs: ["idsInput"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "component", type: IdsIconButtonComponent, selector: "button[idsIconButton], a[idsIconButton]", inputs: ["appearance", "size", "variant", "disabled"] }, { kind: "component", type: IdsOverlayPanelComponent, selector: "ids-overlay-panel", inputs: ["open", "origin", "positions", "appearance", "size", "variant", "panelClasses", "width"], outputs: ["openChange"] }, { kind: "component", type: IdsOptionComponent, selector: "ids-option", inputs: ["value", "viewValue", "disabled"], outputs: ["onSelectionChange"] }, { kind: "component", type: IdsSpinnerComponent, selector: "ids-spinner", inputs: ["size", "sizeCollection", "variant", "isTrack", "aria-label"] }, { kind: "directive", type: IdsTooltipDirective, selector: "[idsTooltip]", inputs: ["idsTooltip", "idsTooltipPosition", "idsTooltipSize", "idsTooltipVariant", "idsTooltipShowDelay", "idsTooltipHideDelay", "idsTooltipDisabled", "idsTooltipTouchGestures", "idsTooltipTextAlign", "idsTooltipClass", "idsTooltipShowPointer", "idsTooltipIgnoreClipped"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1411
1411
|
}
|
|
1412
1412
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsAutocompleteComponent, decorators: [{
|
|
1413
1413
|
type: Component,
|
|
@@ -1437,9 +1437,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1437
1437
|
'aria-autocomplete': 'list',
|
|
1438
1438
|
'aria-haspopup': 'listbox',
|
|
1439
1439
|
'[attr.tabindex]': 'disabled() ? -1 : tabIndex()',
|
|
1440
|
-
'[attr.aria-controls]': '
|
|
1441
|
-
'[attr.aria-owns]': '
|
|
1442
|
-
'[attr.aria-expanded]': '
|
|
1440
|
+
'[attr.aria-controls]': 'overlayPanel().open() ? id() + "-panel" : null',
|
|
1441
|
+
'[attr.aria-owns]': 'overlayPanel().open() ? id() + "-panel" : null',
|
|
1442
|
+
'[attr.aria-expanded]': 'overlayPanel().open()',
|
|
1443
1443
|
'[attr.aria-label]': 'ariaLabel() || null',
|
|
1444
1444
|
'[attr.aria-labelledby]': 'ariaLabelledby() || null',
|
|
1445
1445
|
'[attr.aria-required]': 'required().toString()',
|
|
@@ -1449,7 +1449,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1449
1449
|
'(keydown)': '_handleKeydown($event)',
|
|
1450
1450
|
'(focus)': 'focus()',
|
|
1451
1451
|
'(blur)': '_onBlur()',
|
|
1452
|
-
}, template: "@let isLoading = _resource.isLoading();\n@let optionsLength = _resource.value().length;\n@let maxOptionsLength = maxLength();\n\n<input\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n idsInput\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"false\"\n [(ngModel)]=\"_searchText\"\n (click)=\"_onInputClick()\"\n/>\n@if (_searchText().length > 0) {\n <div idsFormFieldAction>\n <button\n type=\"button\"\n idsIconButton\n appearance=\"standard\"\n variant=\"surface\"\n size=\"dense\"\n [attr.aria-label]=\"ariaLabelClearButton()\"\n [idsTooltip]=\"ariaLabelClearButton()\"\n [idsTooltipDisabled]=\"!ariaLabelClearButton() || disabled()\"\n [idsTooltipIgnoreClipped]=\"true\"\n [disabled]=\"disabled()\"\n (click)=\"clear()\"\n >\n <ids-icon alt=\"\" aria-hidden=\"true\" fontIcon=\"close\" />\n </button>\n </div>\n}\n@if (!isLoading && optionsLength > 0) {\n <div idsFormFieldAction>\n <button\n type=\"button\"\n idsIconButton\n appearance=\"standard\"\n variant=\"surface\"\n size=\"dense\"\n [attr.aria-label]=\"ariaLabelToggleButton()\"\n [idsTooltip]=\"ariaLabelToggleButton()\"\n [idsTooltipDisabled]=\"!ariaLabelToggleButton() || disabled()\"\n [idsTooltipIgnoreClipped]=\"true\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n >\n <ids-icon alt=\"\" aria-hidden=\"true\" [fontIcon]=\"
|
|
1452
|
+
}, template: "@let isLoading = _resource.isLoading();\n@let optionsLength = _resource.value().length;\n@let maxOptionsLength = maxLength();\n\n<input\n #fallbackOverlayOrigin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n idsInput\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [required]=\"false\"\n [(ngModel)]=\"_searchText\"\n (click)=\"_onInputClick()\"\n/>\n@if (_searchText().length > 0) {\n <div idsFormFieldAction>\n <button\n type=\"button\"\n idsIconButton\n appearance=\"standard\"\n variant=\"surface\"\n size=\"dense\"\n [attr.aria-label]=\"ariaLabelClearButton()\"\n [idsTooltip]=\"ariaLabelClearButton()\"\n [idsTooltipDisabled]=\"!ariaLabelClearButton() || disabled()\"\n [idsTooltipIgnoreClipped]=\"true\"\n [disabled]=\"disabled()\"\n (click)=\"clear()\"\n >\n <ids-icon alt=\"\" aria-hidden=\"true\" fontIcon=\"close\" />\n </button>\n </div>\n}\n@if (!isLoading && optionsLength > 0) {\n <div idsFormFieldAction>\n <button\n type=\"button\"\n idsIconButton\n appearance=\"standard\"\n variant=\"surface\"\n size=\"dense\"\n [attr.aria-label]=\"ariaLabelToggleButton()\"\n [idsTooltip]=\"ariaLabelToggleButton()\"\n [idsTooltipDisabled]=\"!ariaLabelToggleButton() || disabled()\"\n [idsTooltipIgnoreClipped]=\"true\"\n [disabled]=\"disabled()\"\n (click)=\"toggle()\"\n >\n <ids-icon alt=\"\" aria-hidden=\"true\" [fontIcon]=\"overlay.open() ? 'chevron-up' : 'chevron-down'\" />\n </button>\n </div>\n}\n@if (isLoading) {\n <div idsFormFieldAction>\n <ids-spinner sizeCollection=\"small\" size=\"compact\" variant=\"surface\" [isTrack]=\"true\" [aria-label]=\"hintLoading()\" />\n </div>\n}\n<ids-overlay-panel\n #overlay\n variant=\"light\"\n [id]=\"id() + '-panel'\"\n [origin]=\"_preferredOverlayOrigin || fallbackOverlayOrigin\"\n [size]=\"parentSize()\"\n [width]=\"_overlayWidth\"\n [panelClasses]=\"_panelClasses()\"\n>\n @let showHintLoading = isLoading;\n @let showHintMinChars = _searchText().length < minChars();\n @let showHintMaxLength = maxOptionsLength && optionsLength > maxOptionsLength;\n @let showHintNoResults = optionsLength === 0;\n\n @if (showHintLoading || showHintMinChars || showHintMaxLength || showHintNoResults) {\n <div class=\"ids-overlay-panel__autocomplete-message\">\n <ids-option disabled>\n @if (showHintLoading && !showHintMinChars) {\n {{ hintLoading() }}\n } @else if (showHintMinChars) {\n {{ hintMinChars() }}\n } @else if (showHintMaxLength) {\n {{ hintMaxLength() }}\n } @else if (showHintNoResults) {\n {{ hintNoResults() }}\n }\n </ids-option>\n </div>\n } @else {\n @for (option of _resource.value(); track $index) {\n <ids-option [value]=\"option\">{{ option }}</ids-option>\n }\n }\n</ids-overlay-panel>\n" }]
|
|
1453
1453
|
}], ctorParameters: () => [] });
|
|
1454
1454
|
|
|
1455
1455
|
class IdsFieldsetRowComponent extends ComponentBase {
|