ng-primitives 0.120.4 → 0.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example-theme/index.css +9 -0
- package/fesm2022/ng-primitives-a11y.mjs +5 -5
- package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
- package/fesm2022/ng-primitives-accordion.mjs +34 -51
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-ai.mjs +39 -52
- package/fesm2022/ng-primitives-ai.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +4 -4
- package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
- package/fesm2022/ng-primitives-avatar.mjs +14 -17
- package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/ng-primitives-breadcrumbs.mjs +21 -21
- package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ng-primitives-button.mjs +7 -9
- package/fesm2022/ng-primitives-button.mjs.map +1 -1
- package/fesm2022/ng-primitives-checkbox.mjs +15 -30
- package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-combobox.mjs +60 -92
- package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/ng-primitives-common.mjs +4 -4
- package/fesm2022/ng-primitives-common.mjs.map +1 -1
- package/fesm2022/ng-primitives-context-menu.mjs +68 -121
- package/fesm2022/ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-date-picker.mjs +91 -115
- package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
- package/fesm2022/ng-primitives-dialog.mjs +35 -51
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +26 -53
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +5 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +39 -44
- package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-input-otp.mjs +30 -43
- package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
- package/fesm2022/ng-primitives-input.mjs +6 -8
- package/fesm2022/ng-primitives-input.mjs.map +1 -1
- package/fesm2022/ng-primitives-interactions.mjs +31 -48
- package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
- package/fesm2022/ng-primitives-internal.mjs +39 -35
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +34 -48
- package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
- package/fesm2022/ng-primitives-menu.mjs +85 -151
- package/fesm2022/ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-meter.mjs +25 -36
- package/fesm2022/ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/ng-primitives-navigation-menu.mjs +60 -108
- package/fesm2022/ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/ng-primitives-number-field.mjs +35 -59
- package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/ng-primitives-pagination.mjs +270 -297
- package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/ng-primitives-popover.mjs +209 -223
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-portal.mjs +88 -59
- package/fesm2022/ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +30 -41
- package/fesm2022/ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/ng-primitives-radio.mjs +20 -30
- package/fesm2022/ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-resize.mjs.map +1 -1
- package/fesm2022/ng-primitives-roving-focus.mjs +20 -34
- package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/ng-primitives-search.mjs +9 -9
- package/fesm2022/ng-primitives-search.mjs.map +1 -1
- package/fesm2022/ng-primitives-select.mjs +720 -620
- package/fesm2022/ng-primitives-select.mjs.map +1 -1
- package/fesm2022/ng-primitives-separator.mjs +4 -6
- package/fesm2022/ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/ng-primitives-slider.mjs +63 -100
- package/fesm2022/ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/ng-primitives-state.mjs +3 -3
- package/fesm2022/ng-primitives-state.mjs.map +1 -1
- package/fesm2022/ng-primitives-switch.mjs +15 -21
- package/fesm2022/ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/ng-primitives-tabs.mjs +31 -41
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +5 -7
- package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
- package/fesm2022/ng-primitives-toast.mjs +30 -23
- package/fesm2022/ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle-group.mjs +20 -36
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +10 -19
- package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/ng-primitives-toolbar.mjs +4 -6
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +401 -402
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/ng-primitives-utils.mjs +5 -4
- package/fesm2022/ng-primitives-utils.mjs.map +1 -1
- package/package.json +56 -55
- package/schematics/ng-generate/templates/select/select.__fileSuffix@dasherize__.ts.template +48 -48
- package/{a11y/index.d.ts → types/ng-primitives-a11y.d.ts} +18 -24
- package/{accordion/index.d.ts → types/ng-primitives-accordion.d.ts} +85 -98
- package/{autofill/index.d.ts → types/ng-primitives-autofill.d.ts} +3 -10
- package/{avatar/index.d.ts → types/ng-primitives-avatar.d.ts} +7 -30
- package/{breadcrumbs/index.d.ts → types/ng-primitives-breadcrumbs.d.ts} +15 -70
- package/{button/index.d.ts → types/ng-primitives-button.d.ts} +23 -29
- package/{checkbox/index.d.ts → types/ng-primitives-checkbox.d.ts} +68 -74
- package/{combobox/index.d.ts → types/ng-primitives-combobox.d.ts} +35 -35
- package/{context-menu/index.d.ts → types/ng-primitives-context-menu.d.ts} +2 -1
- package/{date-picker/index.d.ts → types/ng-primitives-date-picker.d.ts} +2 -2
- package/{dialog/index.d.ts → types/ng-primitives-dialog.d.ts} +7 -2
- package/{file-upload/index.d.ts → types/ng-primitives-file-upload.d.ts} +5 -20
- package/{focus-trap/index.d.ts → types/ng-primitives-focus-trap.d.ts} +3 -10
- package/{form-field/index.d.ts → types/ng-primitives-form-field.d.ts} +9 -40
- package/{input/index.d.ts → types/ng-primitives-input.d.ts} +3 -10
- package/{menu/index.d.ts → types/ng-primitives-menu.d.ts} +17 -63
- package/{navigation-menu/index.d.ts → types/ng-primitives-navigation-menu.d.ts} +15 -70
- package/{number-field/index.d.ts → types/ng-primitives-number-field.d.ts} +80 -110
- package/types/ng-primitives-pagination.d.ts +502 -0
- package/{popover/index.d.ts → types/ng-primitives-popover.d.ts} +244 -57
- package/{portal/index.d.ts → types/ng-primitives-portal.d.ts} +22 -13
- package/{progress/index.d.ts → types/ng-primitives-progress.d.ts} +3 -10
- package/{roving-focus/index.d.ts → types/ng-primitives-roving-focus.d.ts} +65 -79
- package/types/ng-primitives-select.d.ts +687 -0
- package/{separator/index.d.ts → types/ng-primitives-separator.d.ts} +3 -10
- package/{slider/index.d.ts → types/ng-primitives-slider.d.ts} +76 -138
- package/{state/index.d.ts → types/ng-primitives-state.d.ts} +26 -21
- package/{switch/index.d.ts → types/ng-primitives-switch.d.ts} +50 -64
- package/{tabs/index.d.ts → types/ng-primitives-tabs.d.ts} +9 -40
- package/{textarea/index.d.ts → types/ng-primitives-textarea.d.ts} +3 -10
- package/{toast/index.d.ts → types/ng-primitives-toast.d.ts} +13 -1
- package/{toggle-group/index.d.ts → types/ng-primitives-toggle-group.d.ts} +75 -89
- package/{toggle/index.d.ts → types/ng-primitives-toggle.d.ts} +50 -56
- package/{toolbar/index.d.ts → types/ng-primitives-toolbar.d.ts} +3 -10
- package/types/ng-primitives-tooltip.d.ts +691 -0
- package/pagination/index.d.ts +0 -211
- package/select/index.d.ts +0 -396
- package/tooltip/index.d.ts +0 -384
- /package/{ai/index.d.ts → types/ng-primitives-ai.d.ts} +0 -0
- /package/{common/index.d.ts → types/ng-primitives-common.d.ts} +0 -0
- /package/{date-time-luxon/index.d.ts → types/ng-primitives-date-time-luxon.d.ts} +0 -0
- /package/{date-time/index.d.ts → types/ng-primitives-date-time.d.ts} +0 -0
- /package/{input-otp/index.d.ts → types/ng-primitives-input-otp.d.ts} +0 -0
- /package/{interactions/index.d.ts → types/ng-primitives-interactions.d.ts} +0 -0
- /package/{internal/index.d.ts → types/ng-primitives-internal.d.ts} +0 -0
- /package/{listbox/index.d.ts → types/ng-primitives-listbox.d.ts} +0 -0
- /package/{meter/index.d.ts → types/ng-primitives-meter.d.ts} +0 -0
- /package/{radio/index.d.ts → types/ng-primitives-radio.d.ts} +0 -0
- /package/{resize/index.d.ts → types/ng-primitives-resize.d.ts} +0 -0
- /package/{search/index.d.ts → types/ng-primitives-search.d.ts} +0 -0
- /package/{utils/index.d.ts → types/ng-primitives-utils.d.ts} +0 -0
- /package/{index.d.ts → types/ng-primitives.d.ts} +0 -0
|
@@ -65,7 +65,7 @@ class NgpDialogDescription {
|
|
|
65
65
|
/** Access the dialog */
|
|
66
66
|
this.dialog = injectDialogState();
|
|
67
67
|
/** The id of the descriptions. */
|
|
68
|
-
this.id = input(uniqueId('ngp-dialog-description'), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
68
|
+
this.id = input(uniqueId('ngp-dialog-description'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
69
69
|
onChange(this.id, (id, prevId) => {
|
|
70
70
|
if (prevId) {
|
|
71
71
|
this.dialog().removeDescribedBy(prevId);
|
|
@@ -78,10 +78,10 @@ class NgpDialogDescription {
|
|
|
78
78
|
ngOnDestroy() {
|
|
79
79
|
this.dialog().removeDescribedBy(this.id());
|
|
80
80
|
}
|
|
81
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
82
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
81
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
82
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpDialogDescription, isStandalone: true, selector: "[ngpDialogDescription]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id()" } }, exportAs: ["ngpDialogDescription"], ngImport: i0 }); }
|
|
83
83
|
}
|
|
84
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogDescription, decorators: [{
|
|
85
85
|
type: Directive,
|
|
86
86
|
args: [{
|
|
87
87
|
selector: '[ngpDialogDescription]',
|
|
@@ -215,8 +215,8 @@ class NgpDialogRef {
|
|
|
215
215
|
return this.portal?.getElements() ?? [];
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
function injectDialogRef() {
|
|
219
|
-
return inject(NgpDialogRef);
|
|
218
|
+
function injectDialogRef(options) {
|
|
219
|
+
return inject(NgpDialogRef, options ?? {});
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
class NgpDialogOverlay {
|
|
@@ -227,11 +227,8 @@ class NgpDialogOverlay {
|
|
|
227
227
|
* Whether the dialog should close on backdrop click.
|
|
228
228
|
* @default `true`
|
|
229
229
|
*/
|
|
230
|
-
this.closeOnClick = input(this.dialogRef.config.closeOnClick, ...(ngDevMode ?
|
|
231
|
-
|
|
232
|
-
alias: 'ngpDialogOverlayCloseOnClick',
|
|
233
|
-
transform: booleanAttribute,
|
|
234
|
-
}]));
|
|
230
|
+
this.closeOnClick = input(this.dialogRef.config.closeOnClick, { ...(ngDevMode ? { debugName: "closeOnClick" } : /* istanbul ignore next */ {}), alias: 'ngpDialogOverlayCloseOnClick',
|
|
231
|
+
transform: booleanAttribute });
|
|
235
232
|
}
|
|
236
233
|
onPointerDown(event) {
|
|
237
234
|
this.startedPointerDownOnOverlay = event.target === event.currentTarget;
|
|
@@ -282,10 +279,10 @@ class NgpDialogOverlay {
|
|
|
282
279
|
resetPointerOrigin() {
|
|
283
280
|
this.startedPointerDownOnOverlay = false;
|
|
284
281
|
}
|
|
285
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
286
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
282
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogOverlay, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
283
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpDialogOverlay, isStandalone: true, selector: "[ngpDialogOverlay]", inputs: { closeOnClick: { classPropertyName: "closeOnClick", publicName: "ngpDialogOverlayCloseOnClick", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerdown": "onPointerDown($event)", "click": "onClick($event)", "pointercancel": "resetPointerOrigin()" } }, exportAs: ["ngpDialogOverlay"], hostDirectives: [{ directive: i1.NgpExitAnimation }], ngImport: i0 }); }
|
|
287
284
|
}
|
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogOverlay, decorators: [{
|
|
289
286
|
type: Directive,
|
|
290
287
|
args: [{
|
|
291
288
|
selector: '[ngpDialogOverlay]',
|
|
@@ -304,7 +301,7 @@ class NgpDialogTitle {
|
|
|
304
301
|
/** Access the dialog. */
|
|
305
302
|
this.dialog = injectDialogState();
|
|
306
303
|
/** The id of the title. */
|
|
307
|
-
this.id = input(uniqueId('ngp-dialog-title'), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
304
|
+
this.id = input(uniqueId('ngp-dialog-title'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
308
305
|
onChange(this.id, (id, prevId) => {
|
|
309
306
|
if (prevId) {
|
|
310
307
|
this.dialog().removeLabelledBy(prevId);
|
|
@@ -317,10 +314,10 @@ class NgpDialogTitle {
|
|
|
317
314
|
ngOnDestroy() {
|
|
318
315
|
this.dialog().removeLabelledBy(this.id());
|
|
319
316
|
}
|
|
320
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
321
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
317
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
318
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpDialogTitle, isStandalone: true, selector: "[ngpDialogTitle]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id()" } }, exportAs: ["ngpDialogTitle"], ngImport: i0 }); }
|
|
322
319
|
}
|
|
323
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogTitle, decorators: [{
|
|
324
321
|
type: Directive,
|
|
325
322
|
args: [{
|
|
326
323
|
selector: '[ngpDialogTitle]',
|
|
@@ -584,10 +581,10 @@ class NgpDialogManager {
|
|
|
584
581
|
const parent = this.parentDialogManager;
|
|
585
582
|
return parent ? parent.getAfterAllClosed() : this.afterAllClosedAtThisLevel;
|
|
586
583
|
}
|
|
587
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
588
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
584
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
585
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogManager, providedIn: 'root' }); }
|
|
589
586
|
}
|
|
590
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogManager, decorators: [{
|
|
591
588
|
type: Injectable,
|
|
592
589
|
args: [{
|
|
593
590
|
providedIn: 'root',
|
|
@@ -614,29 +611,21 @@ class NgpDialogTrigger {
|
|
|
614
611
|
/** Access the dialog manager. */
|
|
615
612
|
this.dialogManager = inject(NgpDialogManager);
|
|
616
613
|
/** The template to launch. */
|
|
617
|
-
this.template = input.required(...(ngDevMode ?
|
|
618
|
-
alias: 'ngpDialogTrigger',
|
|
619
|
-
}]));
|
|
614
|
+
this.template = input.required({ ...(ngDevMode ? { debugName: "template" } : /* istanbul ignore next */ {}), alias: 'ngpDialogTrigger' });
|
|
620
615
|
/** Emits whenever the dialog is closed with the given result. */
|
|
621
616
|
this.closed = output({ alias: 'ngpDialogTriggerClosed' });
|
|
622
617
|
/**
|
|
623
618
|
* Whether the dialog should close on escape, or a guard function.
|
|
624
619
|
* @default `true`
|
|
625
620
|
*/
|
|
626
|
-
this.closeOnEscape = input(this.config.closeOnEscape ?? true, ...(ngDevMode ?
|
|
627
|
-
|
|
628
|
-
alias: 'ngpDialogTriggerCloseOnEscape',
|
|
629
|
-
transform: dismissGuardAttribute,
|
|
630
|
-
}]));
|
|
621
|
+
this.closeOnEscape = input(this.config.closeOnEscape ?? true, { ...(ngDevMode ? { debugName: "closeOnEscape" } : /* istanbul ignore next */ {}), alias: 'ngpDialogTriggerCloseOnEscape',
|
|
622
|
+
transform: dismissGuardAttribute });
|
|
631
623
|
/**
|
|
632
624
|
* Whether the dialog should close on outside click, or a guard function.
|
|
633
625
|
* @default `true`
|
|
634
626
|
*/
|
|
635
|
-
this.closeOnOutsideClick = input(this.config.closeOnOutsideClick ?? true, ...(ngDevMode ?
|
|
636
|
-
|
|
637
|
-
alias: 'ngpDialogTriggerCloseOnOutsideClick',
|
|
638
|
-
transform: dismissGuardAttribute,
|
|
639
|
-
}]));
|
|
627
|
+
this.closeOnOutsideClick = input(this.config.closeOnOutsideClick ?? true, { ...(ngDevMode ? { debugName: "closeOnOutsideClick" } : /* istanbul ignore next */ {}), alias: 'ngpDialogTriggerCloseOnOutsideClick',
|
|
628
|
+
transform: dismissGuardAttribute });
|
|
640
629
|
/**
|
|
641
630
|
* Store the dialog ref.
|
|
642
631
|
* @internal
|
|
@@ -653,10 +642,10 @@ class NgpDialogTrigger {
|
|
|
653
642
|
return (this.dialogRef = null);
|
|
654
643
|
});
|
|
655
644
|
}
|
|
656
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
657
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
645
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
646
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpDialogTrigger, isStandalone: true, selector: "[ngpDialogTrigger]", inputs: { template: { classPropertyName: "template", publicName: "ngpDialogTrigger", isSignal: true, isRequired: true, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "ngpDialogTriggerCloseOnEscape", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsideClick: { classPropertyName: "closeOnOutsideClick", publicName: "ngpDialogTriggerCloseOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "ngpDialogTriggerClosed" }, host: { listeners: { "click": "launch()" } }, exportAs: ["ngpDialogTrigger"], ngImport: i0 }); }
|
|
658
647
|
}
|
|
659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
648
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialogTrigger, decorators: [{
|
|
660
649
|
type: Directive,
|
|
661
650
|
args: [{
|
|
662
651
|
selector: '[ngpDialogTrigger]',
|
|
@@ -673,21 +662,16 @@ class NgpDialog {
|
|
|
673
662
|
/** Access the dialog ref */
|
|
674
663
|
this.dialogRef = injectDialogRef();
|
|
675
664
|
/** The id of the dialog */
|
|
676
|
-
this.id = input(uniqueId('ngp-dialog'), ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
665
|
+
this.id = input(uniqueId('ngp-dialog'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
677
666
|
/** The dialog role. */
|
|
678
|
-
this.role = input(this.config.role, ...(ngDevMode ?
|
|
679
|
-
alias: 'ngpDialogRole',
|
|
680
|
-
}]));
|
|
667
|
+
this.role = input(this.config.role, { ...(ngDevMode ? { debugName: "role" } : /* istanbul ignore next */ {}), alias: 'ngpDialogRole' });
|
|
681
668
|
/** Whether the dialog is a modal. */
|
|
682
|
-
this.modal = input(this.config.modal ?? false, ...(ngDevMode ?
|
|
683
|
-
|
|
684
|
-
alias: 'ngpDialogModal',
|
|
685
|
-
transform: booleanAttribute,
|
|
686
|
-
}]));
|
|
669
|
+
this.modal = input(this.config.modal ?? false, { ...(ngDevMode ? { debugName: "modal" } : /* istanbul ignore next */ {}), alias: 'ngpDialogModal',
|
|
670
|
+
transform: booleanAttribute });
|
|
687
671
|
/** The labelledby ids */
|
|
688
|
-
this.labelledBy = signal([], ...(ngDevMode ? [{ debugName: "labelledBy" }] : []));
|
|
672
|
+
this.labelledBy = signal([], ...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
689
673
|
/** The describedby ids */
|
|
690
|
-
this.describedBy = signal([], ...(ngDevMode ? [{ debugName: "describedBy" }] : []));
|
|
674
|
+
this.describedBy = signal([], ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
691
675
|
/** The dialog state */
|
|
692
676
|
this.state = dialogState(this);
|
|
693
677
|
}
|
|
@@ -718,10 +702,10 @@ class NgpDialog {
|
|
|
718
702
|
removeDescribedBy(id) {
|
|
719
703
|
this.describedBy.update(ids => ids.filter(i => i !== id));
|
|
720
704
|
}
|
|
721
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
722
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
705
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialog, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
706
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpDialog, isStandalone: true, selector: "[ngpDialog]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "ngpDialogRole", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "ngpDialogModal", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tabindex": "-1" }, listeners: { "click": "onClick($event)" }, properties: { "id": "state.id()", "attr.role": "state.role()", "attr.aria-modal": "state.modal()", "attr.aria-labelledby": "labelledBy().join(\" \")", "attr.aria-describedby": "describedBy().join(\" \")" } }, providers: [provideDialogState()], exportAs: ["ngpDialog"], hostDirectives: [{ directive: i1$1.NgpFocusTrap }, { directive: i1.NgpExitAnimation }], ngImport: i0 }); }
|
|
723
707
|
}
|
|
724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpDialog, decorators: [{
|
|
725
709
|
type: Directive,
|
|
726
710
|
args: [{
|
|
727
711
|
selector: '[ngpDialog]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-dialog.mjs","sources":["../../../../packages/ng-primitives/dialog/src/config/dialog-config.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog-state.ts","../../../../packages/ng-primitives/dialog/src/dialog-description/dialog-description.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog-ref.ts","../../../../packages/ng-primitives/dialog/src/dialog-overlay/dialog-overlay.ts","../../../../packages/ng-primitives/dialog/src/dialog-title/dialog-title.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.service.ts","../../../../packages/ng-primitives/dialog/src/dialog-trigger/dialog-trigger.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.ts","../../../../packages/ng-primitives/dialog/src/ng-primitives-dialog.ts"],"sourcesContent":["import { InjectionToken, Injector, Provider, ViewContainerRef, inject } from '@angular/core';\nimport { NgpDismissGuard, ScrollStrategy } from 'ng-primitives/portal';\n\n/** Valid ARIA roles for a dialog. */\nexport type NgpDialogRole = 'dialog' | 'alertdialog';\n\nexport interface NgpDialogConfig<T = any> {\n /** The view container to attach the dialog to. */\n viewContainerRef?: ViewContainerRef;\n\n /** The injector to use for the dialog. Defaults to the view container's injector.*/\n injector?: Injector;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The role of the dialog. */\n role?: NgpDialogRole;\n\n /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n modal?: boolean;\n\n /**\n * Whether the dialog should close when the user navigates. This includes both browser history\n * navigation (back/forward) and programmatic route changes (e.g. router.navigate()).\n */\n closeOnNavigation?: boolean;\n\n /** Whether the dialog should close when the user presses the escape key, or a guard function. */\n closeOnEscape?: NgpDismissGuard<KeyboardEvent>;\n\n /**\n * Whether the dialog should close when clicking outside (on the overlay), or a guard function.\n */\n closeOnOutsideClick?: NgpDismissGuard<Element>;\n\n /**\n * Whether the dialog should close when the user clicks the overlay.\n * @deprecated Use `closeOnOutsideClick` instead.\n */\n closeOnClick?: boolean;\n\n /** Scroll strategy to be used for the dialog. */\n scrollStrategy?: ScrollStrategy;\n\n data?: T;\n}\n\nexport const defaultDialogConfig: NgpDialogConfig = {\n role: 'dialog',\n modal: true,\n closeOnNavigation: true,\n closeOnEscape: true,\n closeOnClick: true,\n};\n\nexport const NgpDialogConfigToken = new InjectionToken<NgpDialogConfig>('NgpDialogConfigToken');\n\n/**\n * Provide the default Dialog configuration\n * @param config The Dialog configuration\n * @returns The provider\n */\nexport function provideDialogConfig(config: Partial<NgpDialogConfig>): Provider[] {\n return [\n {\n provide: NgpDialogConfigToken,\n useValue: { ...defaultDialogConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Dialog configuration\n * @returns The global Dialog configuration\n */\nexport function injectDialogConfig(): NgpDialogConfig {\n return inject(NgpDialogConfigToken, { optional: true }) ?? defaultDialogConfig;\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpDialog } from './dialog';\n\n/**\n * The state token for the Dialog primitive.\n */\nexport const NgpDialogStateToken = createStateToken<NgpDialog<any, any>>('Dialog');\n\n/**\n * Provides the Dialog state.\n */\nexport const provideDialogState = createStateProvider(NgpDialogStateToken);\n\n/**\n * Injects the Dialog state.\n */\nexport const injectDialogState = createStateInjector<NgpDialog>(NgpDialogStateToken);\n\n/**\n * The Dialog state registration function.\n */\nexport const dialogState = createState(NgpDialogStateToken);\n","import { Directive, input, OnDestroy } from '@angular/core';\nimport { onChange, uniqueId } from 'ng-primitives/utils';\nimport { injectDialogState } from '../dialog/dialog-state';\n\n@Directive({\n selector: '[ngpDialogDescription]',\n exportAs: 'ngpDialogDescription',\n host: {\n '[id]': 'id()',\n },\n})\nexport class NgpDialogDescription implements OnDestroy {\n /** Access the dialog */\n private readonly dialog = injectDialogState();\n\n /** The id of the descriptions. */\n readonly id = input<string>(uniqueId('ngp-dialog-description'));\n\n constructor() {\n onChange(this.id, (id, prevId) => {\n if (prevId) {\n this.dialog().removeDescribedBy(prevId);\n }\n\n if (id) {\n this.dialog().setDescribedBy(id);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dialog().removeDescribedBy(this.id());\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { inject, Injector } from '@angular/core';\nimport { NgpExitAnimationManager } from 'ng-primitives/internal';\nimport { NgpDismissGuard, NgpOverlayRef } from 'ng-primitives/portal';\nimport { defer, EMPTY, fromEvent, Observable, Subject } from 'rxjs';\nimport { filter, map, takeUntil } from 'rxjs/operators';\nimport { NgpDialogConfig } from '../config/dialog-config';\n\n/** Minimal portal interface needed by the dialog ref. */\nexport interface NgpDialogPortalRef {\n getElements(): HTMLElement[];\n detach(immediate?: boolean): Promise<void>;\n}\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nexport class NgpDialogRef<T = unknown, R = unknown> implements NgpOverlayRef {\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined;\n\n /** Whether the escape key is allowed to close the dialog, or a guard function. */\n closeOnEscape: NgpDismissGuard<KeyboardEvent> | undefined;\n\n /** Whether clicking outside (on the overlay) is allowed to close the dialog, or a guard function. */\n closeOnOutsideClick: NgpDismissGuard<Element> | undefined;\n\n /** Emits when the dialog has been closed. */\n readonly closed = new Subject<{ focusOrigin?: FocusOrigin; result?: R }>();\n\n /** @internal */\n readonly afterClosed$ = new Subject<{ focusOrigin?: FocusOrigin; result?: R }>();\n\n /**\n * Observable that emits the dialog result after exit animations have completed.\n */\n readonly afterClosed: Observable<R | undefined> = this.afterClosed$.pipe(\n map(event => event.result),\n );\n\n /** Data passed from the dialog opener. */\n readonly data: T;\n\n /** Unique ID for the dialog. */\n readonly id: string;\n\n /** @internal Store the injector */\n injector: Injector | undefined;\n\n /** Whether the dialog is closing. */\n private closing = false;\n\n /** @internal Portal reference for element access and detach. */\n portal: NgpDialogPortalRef | null = null;\n\n /** Emits on keyboard events within the dialog. */\n readonly keydownEvents: Observable<KeyboardEvent>;\n\n /**\n * Emits pointer events (click, auxclick, contextmenu) that happen outside of the dialog.\n * Fed by the NgpOverlayRegistry with CDK-compatible stacking awareness.\n * @internal\n */\n readonly outsidePointerEvents$ = new Subject<MouseEvent>();\n\n /** Emits on pointer events that happen outside of the dialog. */\n readonly outsidePointerEvents: Observable<MouseEvent> = this.outsidePointerEvents$.asObservable();\n\n constructor(\n readonly config: NgpDialogConfig<T>,\n private readonly document: Document,\n ) {\n this.data = config.data as T;\n this.id = config.id!; // By the time the dialog is created we are guaranteed to have an ID.\n this.closeOnEscape = config.closeOnEscape ?? true;\n this.closeOnOutsideClick = config.closeOnOutsideClick;\n\n // Use defer() so the observable is created on subscribe — by then the portal will be set.\n this.keydownEvents = defer(() => {\n const elements = this.getElements();\n if (!elements.length) return EMPTY;\n return fromEvent<KeyboardEvent>(this.document, 'keydown').pipe(\n filter(event => elements.some(el => el.contains(event.target as Node))),\n takeUntil(this.closed),\n );\n });\n }\n\n /**\n * Updates the position of the dialog. No-op since dialogs are CSS-centered.\n */\n updatePosition(): this {\n return this;\n }\n\n /**\n * NgpOverlayRef implementation — called by the registry for escape-key dismiss.\n */\n hide(options?: { immediate?: boolean; origin?: FocusOrigin }): void {\n if (this.disableClose) {\n return;\n }\n this.close(undefined, options?.origin);\n }\n\n /**\n * NgpOverlayRef implementation — called by the registry for descendant cascade.\n * Skips exit animations and tears down immediately.\n */\n async hideImmediate(): Promise<void> {\n if (this.closing) {\n return;\n }\n\n this.closing = true;\n\n this.closed.next({});\n this.closed.complete();\n\n // Detach the portal immediately — no exit animation\n if (this.portal) {\n await this.portal.detach(true);\n this.portal = null;\n }\n\n this.afterClosed$.next({});\n this.afterClosed$.complete();\n }\n\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param focusOrigin The origin of the focus event that triggered the close.\n */\n async close(result?: R, focusOrigin?: FocusOrigin): Promise<void> {\n // If the dialog is already closed, do nothing.\n if (this.closing) {\n return;\n }\n\n this.closing = true;\n\n // Emit immediately so consumers can react before exit animations run.\n this.closed.next({ focusOrigin, result });\n this.closed.complete();\n\n const exitAnimationManager = this.injector?.get(NgpExitAnimationManager, undefined, {\n optional: true,\n });\n if (exitAnimationManager) {\n await exitAnimationManager.exit();\n }\n\n // Detach the portal (immediate since exit animation already ran)\n if (this.portal) {\n await this.portal.detach(true);\n this.portal = null;\n }\n\n this.afterClosed$.next({ focusOrigin, result });\n this.afterClosed$.complete();\n }\n\n /**\n * @deprecated Access dialog methods directly instead (keydownEvents, outsidePointerEvents,\n * updatePosition, close). This shim will be removed in the next major version.\n */\n get overlayRef(): {\n keydownEvents: () => Observable<KeyboardEvent>;\n outsidePointerEvents: () => Observable<MouseEvent>;\n updatePosition: () => NgpDialogRef<T, R>;\n dispose: () => Promise<void>;\n detachments: () => Observable<{ focusOrigin?: FocusOrigin; result?: R }>;\n overlayElement: HTMLElement | undefined;\n } {\n return {\n keydownEvents: () => this.keydownEvents,\n outsidePointerEvents: () => this.outsidePointerEvents,\n updatePosition: () => this.updatePosition(),\n dispose: () => this.close(),\n detachments: () => this.closed.asObservable(),\n overlayElement: this.getElements()[0] as HTMLElement | undefined,\n };\n }\n\n /**\n * Get the portal elements.\n * @internal\n */\n getElements(): HTMLElement[] {\n return this.portal?.getElements() ?? [];\n }\n}\n\nexport function injectDialogRef<T = unknown, R = unknown>(): NgpDialogRef<T, R> {\n return inject<NgpDialogRef<T, R>>(NgpDialogRef);\n}\n","import { booleanAttribute, Directive, input } from '@angular/core';\nimport { NgpExitAnimation } from 'ng-primitives/internal';\nimport { NgpDismissGuard } from 'ng-primitives/portal';\nimport { injectDialogRef } from '../dialog/dialog-ref';\n\n@Directive({\n selector: '[ngpDialogOverlay]',\n exportAs: 'ngpDialogOverlay',\n hostDirectives: [NgpExitAnimation],\n host: {\n '(pointerdown)': 'onPointerDown($event)',\n '(click)': 'onClick($event)',\n '(pointercancel)': 'resetPointerOrigin()',\n },\n})\nexport class NgpDialogOverlay {\n private readonly dialogRef = injectDialogRef();\n private startedPointerDownOnOverlay = false;\n\n /**\n * Whether the dialog should close on backdrop click.\n * @default `true`\n */\n readonly closeOnClick = input(this.dialogRef.config.closeOnClick, {\n alias: 'ngpDialogOverlayCloseOnClick',\n transform: booleanAttribute,\n });\n\n protected onPointerDown(event: Event): void {\n this.startedPointerDownOnOverlay = event.target === event.currentTarget;\n }\n\n protected onClick(event: Event): void {\n const isOverlayClick = this.startedPointerDownOnOverlay && event.target === event.currentTarget;\n\n this.resetPointerOrigin();\n\n if (!isOverlayClick || this.dialogRef.disableClose) {\n return;\n }\n\n const guard: NgpDismissGuard<Element> =\n this.dialogRef.closeOnOutsideClick ?? this.closeOnClick() ?? true;\n this.evaluateGuard(guard, event.target as Element);\n }\n\n private evaluateGuard(guard: NgpDismissGuard<Element>, target: Element): void {\n if (guard === true) {\n this.dialogRef.close(undefined, 'mouse');\n return;\n }\n\n if (guard === false) {\n return;\n }\n\n // Function guard — evaluate sync or async\n let result: boolean | Promise<boolean>;\n try {\n result = guard(target);\n } catch (error) {\n console.error('NgpDialogOverlay: dismiss guard threw', error);\n return;\n }\n\n if (typeof result === 'boolean') {\n if (result) {\n this.dialogRef.close(undefined, 'mouse');\n }\n } else {\n result\n .then(shouldClose => {\n if (shouldClose) {\n this.dialogRef.close(undefined, 'mouse');\n }\n })\n .catch(error => {\n console.error('NgpDialogOverlay: dismiss guard rejected', error);\n });\n }\n }\n\n protected resetPointerOrigin(): void {\n this.startedPointerDownOnOverlay = false;\n }\n}\n","import { Directive, input, OnDestroy } from '@angular/core';\nimport { onChange, uniqueId } from 'ng-primitives/utils';\nimport { injectDialogState } from '../dialog/dialog-state';\n\n@Directive({\n selector: '[ngpDialogTitle]',\n exportAs: 'ngpDialogTitle',\n host: {\n '[id]': 'id()',\n },\n})\nexport class NgpDialogTitle implements OnDestroy {\n /** Access the dialog. */\n private readonly dialog = injectDialogState();\n\n /** The id of the title. */\n readonly id = input<string>(uniqueId('ngp-dialog-title'));\n\n constructor() {\n onChange(this.id, (id, prevId) => {\n if (prevId) {\n this.dialog().removeLabelledBy(prevId);\n }\n\n if (id) {\n this.dialog().setLabelledBy(id);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dialog().removeLabelledBy(this.id());\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n Injectable,\n Injector,\n OnDestroy,\n StaticProvider,\n TemplateRef,\n Type,\n ViewContainerRef,\n inject,\n isDevMode,\n} from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { NgpExitAnimationManager } from 'ng-primitives/internal';\nimport {\n BlockScrollStrategy,\n NgpOverlayRegistry,\n ScrollStrategy,\n createPortal,\n} from 'ng-primitives/portal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable, Subject, Subscription, defer } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { NgpDialogConfig, injectDialogConfig } from '../config/dialog-config';\nimport { NgpDialogRef } from './dialog-ref';\n\n/**\n * Originally based on Angular CDK Dialog service.\n * Re-implemented to use ng-primitives/portal instead of @angular/cdk/overlay.\n */\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgpDialogManager implements OnDestroy {\n private readonly applicationRef = inject(ApplicationRef);\n private readonly injector = inject(Injector);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly viewportRuler = inject(ViewportRuler);\n private readonly registry = inject(NgpOverlayRegistry);\n private readonly defaultOptions = injectDialogConfig();\n private readonly parentDialogManager = inject(NgpDialogManager, {\n optional: true,\n skipSelf: true,\n });\n private readonly router = inject(Router, { optional: true });\n\n private openDialogsAtThisLevel: NgpDialogRef[] = [];\n private readonly afterAllClosedAtThisLevel = new Subject<void>();\n private readonly afterOpenedAtThisLevel = new Subject<NgpDialogRef>();\n private ariaHiddenElements = new Map<Element, string | null>();\n private routerSubscription: Subscription | undefined;\n\n /** Scroll blocking strategy — shared across all dialogs. */\n private scrollStrategy: ScrollStrategy | null = null;\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): readonly NgpDialogRef[] {\n return this.parentDialogManager\n ? this.parentDialogManager.openDialogs\n : this.openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<NgpDialogRef> {\n return this.parentDialogManager\n ? this.parentDialogManager.afterOpened\n : this.afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs.length\n ? this.getAfterAllClosed()\n : this.getAfterAllClosed().pipe(startWith(undefined)),\n );\n\n /**\n * Opens a modal dialog containing the given template or component.\n */\n open(\n templateRefOrComponentType: TemplateRef<NgpDialogContext> | Type<unknown>,\n config?: NgpDialogConfig,\n ): NgpDialogRef;\n\n /**\n * Opens a modal dialog containing the given template or component with typed data.\n */\n open<T, R = unknown>(\n templateRefOrComponentType: TemplateRef<NgpDialogContext<T, R>> | Type<unknown>,\n config: NgpDialogConfig<T> & { data: T },\n ): NgpDialogRef<T, R>;\n\n /**\n * Opens a modal dialog with typed result but no data (explicit void for data type).\n */\n open<T extends void, R>(\n templateRefOrComponentType: TemplateRef<NgpDialogContext<T, R>> | Type<unknown>,\n config?: NgpDialogConfig,\n ): NgpDialogRef<T, R>;\n\n open(\n templateRefOrComponentType: TemplateRef<any> | Type<unknown>,\n config?: NgpDialogConfig<any>,\n ): NgpDialogRef<any, any> {\n // store the current active element so we can focus it after the dialog is closed\n const activeElement = this.document.activeElement;\n\n // this is not ideal, but there is a case where a dialog trigger is within an overlay (e.g. menu),\n // which may be removed before the dialog is closed. This is not desired, so we need to access a view container ref\n // that is not within the overlay. To solve this we use the view container ref of the root component.\n // Could this have any unintended side effects? For example, the dialog would not be closed during route changes?\n const viewContainerRef =\n this.applicationRef.components[0]?.injector.get(ViewContainerRef) ??\n config?.viewContainerRef ??\n config?.injector?.get(ViewContainerRef);\n\n const defaults = this.defaultOptions;\n config = { ...defaults, viewContainerRef, ...config };\n config.id = config.id ?? uniqueId('ngp-dialog');\n\n if (config.id && this.getDialogById(config.id) && isDevMode()) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const dialogRef = new NgpDialogRef(config, this.document);\n const injector = this.createInjector(config, dialogRef);\n\n // store the injector in the dialog ref - this is so we can access the exit animation manager\n dialogRef.injector = injector;\n\n const context: NgpDialogContext = {\n $implicit: dialogRef,\n close: dialogRef.close.bind(dialogRef),\n };\n\n // Create the portal using our portal system\n const portal = createPortal(\n templateRefOrComponentType,\n config.viewContainerRef!,\n injector,\n context,\n );\n\n // Attach the portal to document.body\n portal.attach(this.document.body);\n\n // Store the portal reference on the dialog ref for element access and cleanup\n dialogRef.portal = portal;\n\n // If this is the first dialog that we're opening, hide all the non-overlay content\n // and enable scroll blocking.\n if (!this.openDialogs.length) {\n this.hideNonDialogContentFromAssistiveTechnology(portal.getElements());\n this.enableScrollBlocking(config);\n }\n\n // Auto-detect parent overlay: if the trigger element lives inside an existing overlay\n // (e.g. a dialog opened from a popover), register as its child so that clicks inside\n // the dialog don't dismiss the parent overlay.\n // Only inherit parentId from other dialogs — non-dialog overlays (menus, popovers)\n // may close after triggering the dialog open, which would cascade-close the dialog.\n let parentId =\n activeElement instanceof HTMLElement\n ? this.registry.findContainingOverlay(activeElement)\n : null;\n\n if (parentId !== null && !this.openDialogs.some(d => d.id === parentId)) {\n parentId = null;\n }\n\n // Register with the overlay registry for centralized escape-key routing.\n // outsidePress is false because the NgpDialogOverlay directive handles its own backdrop clicks.\n this.registry.register({\n id: dialogRef.id,\n parentId,\n overlay: dialogRef,\n getElements: () => dialogRef.getElements(),\n triggerElement: (activeElement as HTMLElement) ?? this.document.body,\n dismissPolicy: {\n outsidePress: false,\n escapeKey: config.closeOnEscape ?? true,\n },\n outsidePointerEvents$: dialogRef.outsidePointerEvents$,\n });\n\n (this.openDialogs as NgpDialogRef[]).push(dialogRef as NgpDialogRef<any, any>);\n this.afterOpened.next(dialogRef as NgpDialogRef<any, any>);\n this.subscribeToRouterEvents();\n\n dialogRef.closed.subscribe(() => {\n // Deregister from the overlay registry immediately so stacking order is updated.\n this.registry.deregister(dialogRef.id);\n this.removeOpenDialog(dialogRef as NgpDialogRef<any, any>, true);\n });\n\n dialogRef.afterClosed$.subscribe(({ focusOrigin }) => {\n // Focus the trigger element after exit animations complete.\n if (activeElement instanceof HTMLElement && this.document.body.contains(activeElement)) {\n // Its not great that we are relying on an internal API here, but we need to in order to\n // try and best determine the focus origin when it is programmatically closed by the user.\n this.focusMonitor.focusVia(\n activeElement,\n focusOrigin ?? (this.focusMonitor as any)._lastFocusOrigin,\n );\n }\n });\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): NgpDialogRef | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n /**\n * Subscribe to router navigation events so that dialogs with `closeOnNavigation`\n * are closed when the user navigates. This handles both browser popstate events\n * and programmatic route changes (e.g. router.navigate()).\n */\n private subscribeToRouterEvents(): void {\n if (this.routerSubscription || !this.router) {\n return;\n }\n\n this.routerSubscription = this.router.events.subscribe(event => {\n if (event instanceof NavigationStart && this.openDialogs.length) {\n // Close dialogs that have closeOnNavigation enabled (iterate in reverse as closing modifies the array)\n let i = this.openDialogs.length;\n while (i--) {\n const dialog = this.openDialogs[i];\n if (dialog.config.closeOnNavigation !== false) {\n dialog.close();\n }\n }\n }\n });\n }\n\n ngOnDestroy(): void {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this.openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n this.removeOpenDialog(dialog, false);\n });\n\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this.openDialogsAtThisLevel, dialog => dialog.close());\n\n this.afterAllClosedAtThisLevel.complete();\n this.afterOpenedAtThisLevel.complete();\n this.openDialogsAtThisLevel = [];\n this.routerSubscription?.unsubscribe();\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n */\n private createInjector<T, R>(\n config: NgpDialogConfig<T>,\n dialogRef: NgpDialogRef<T, R>,\n ): Injector {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [\n { provide: NgpDialogRef, useValue: dialogRef },\n { provide: NgpExitAnimationManager, useClass: NgpExitAnimationManager },\n ];\n\n // Fall back to the service's own injector (root injector) to ensure\n // ApplicationRef and other platform providers are available.\n return Injector.create({ parent: userInjector || this.injector, providers });\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n */\n private removeOpenDialog(dialogRef: NgpDialogRef, emitEvent: boolean) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n (this.openDialogs as NgpDialogRef[]).splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this.ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this.ariaHiddenElements.clear();\n this.disableScrollBlocking();\n\n if (emitEvent) {\n this.getAfterAllClosed().next();\n }\n }\n }\n }\n\n /**\n * Enable scroll blocking when the first dialog opens.\n */\n private enableScrollBlocking(config?: NgpDialogConfig): void {\n if (!this.scrollStrategy) {\n this.scrollStrategy =\n config?.scrollStrategy ?? new BlockScrollStrategy(this.viewportRuler, this.document);\n }\n this.scrollStrategy.enable();\n }\n\n /**\n * Disable scroll blocking when the last dialog closes.\n */\n private disableScrollBlocking(): void {\n this.scrollStrategy?.disable();\n this.scrollStrategy = null;\n }\n\n /**\n * Hides all of the content that isn't a dialog portal from assistive technology.\n */\n private hideNonDialogContentFromAssistiveTechnology(portalElements: HTMLElement[]) {\n const body = this.document.body;\n const bodyChildren = body.children;\n\n for (let i = bodyChildren.length - 1; i > -1; i--) {\n const sibling = bodyChildren[i];\n\n if (\n !portalElements.includes(sibling as HTMLElement) &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')\n ) {\n this.ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n\n private getAfterAllClosed(): Subject<void> {\n const parent = this.parentDialogManager;\n return parent ? parent.getAfterAllClosed() : this.afterAllClosedAtThisLevel;\n }\n}\n\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach<T>(items: T[] | readonly T[], callback: (current: T) => void) {\n let i = items.length;\n\n while (i--) {\n callback(items[i]);\n }\n}\n\nexport interface NgpDialogContext<T = unknown, R = unknown> {\n $implicit: NgpDialogRef<T, R>;\n close: (result?: R) => void;\n}\n\nexport function injectDialogManager(): NgpDialogManager {\n return inject(NgpDialogManager);\n}\n","import { Directive, HostListener, inject, input, output, TemplateRef } from '@angular/core';\nimport { dismissGuardAttribute, NgpDismissGuard, NgpDismissGuardInput } from 'ng-primitives/portal';\nimport { injectDialogConfig } from '../config/dialog-config';\nimport { NgpDialogRef } from '../dialog/dialog-ref';\nimport { NgpDialogContext, NgpDialogManager } from '../dialog/dialog.service';\n\n@Directive({\n selector: '[ngpDialogTrigger]',\n exportAs: 'ngpDialogTrigger',\n})\nexport class NgpDialogTrigger<T = unknown> {\n /** Access the global configuration */\n private readonly config = injectDialogConfig();\n\n /** Access the dialog manager. */\n private readonly dialogManager = inject(NgpDialogManager);\n\n /** The template to launch. */\n readonly template = input.required<TemplateRef<NgpDialogContext>>({\n alias: 'ngpDialogTrigger',\n });\n\n /** Emits whenever the dialog is closed with the given result. */\n readonly closed = output<T>({ alias: 'ngpDialogTriggerClosed' });\n\n /**\n * Whether the dialog should close on escape, or a guard function.\n * @default `true`\n */\n readonly closeOnEscape = input<\n NgpDismissGuard<KeyboardEvent>,\n NgpDismissGuardInput<KeyboardEvent>\n >(this.config.closeOnEscape ?? true, {\n alias: 'ngpDialogTriggerCloseOnEscape',\n transform: dismissGuardAttribute,\n });\n\n /**\n * Whether the dialog should close on outside click, or a guard function.\n * @default `true`\n */\n readonly closeOnOutsideClick = input<NgpDismissGuard<Element>, NgpDismissGuardInput<Element>>(\n this.config.closeOnOutsideClick ?? true,\n {\n alias: 'ngpDialogTriggerCloseOnOutsideClick',\n transform: dismissGuardAttribute,\n },\n );\n\n /**\n * Store the dialog ref.\n * @internal\n */\n private dialogRef: NgpDialogRef | null = null;\n\n @HostListener('click')\n protected launch(): void {\n this.dialogRef = this.dialogManager.open(this.template(), {\n closeOnEscape: this.closeOnEscape(),\n closeOnOutsideClick: this.closeOnOutsideClick(),\n });\n this.dialogRef.closed.subscribe(({ result }) => {\n this.closed.emit(result as T);\n return (this.dialogRef = null);\n });\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, input, OnDestroy, signal } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { NgpExitAnimation } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectDialogConfig } from '../config/dialog-config';\nimport { injectDialogRef } from './dialog-ref';\nimport { dialogState, provideDialogState } from './dialog-state';\n\n@Directive({\n selector: '[ngpDialog]',\n exportAs: 'ngpDialog',\n providers: [provideDialogState()],\n hostDirectives: [NgpFocusTrap, NgpExitAnimation],\n host: {\n tabindex: '-1',\n '[id]': 'state.id()',\n '[attr.role]': 'state.role()',\n '[attr.aria-modal]': 'state.modal()',\n '[attr.aria-labelledby]': 'labelledBy().join(\" \")',\n '[attr.aria-describedby]': 'describedBy().join(\" \")',\n },\n})\nexport class NgpDialog<T = unknown, R = unknown> implements OnDestroy {\n private readonly config = injectDialogConfig();\n\n /** Access the dialog ref */\n private readonly dialogRef = injectDialogRef<T, R>();\n\n /** The id of the dialog */\n readonly id = input<string>(uniqueId('ngp-dialog'));\n\n /** The dialog role. */\n readonly role = input(this.config.role, {\n alias: 'ngpDialogRole',\n });\n\n /** Whether the dialog is a modal. */\n readonly modal = input<boolean, BooleanInput>(this.config.modal ?? false, {\n alias: 'ngpDialogModal',\n transform: booleanAttribute,\n });\n\n /** The labelledby ids */\n protected readonly labelledBy = signal<string[]>([]);\n\n /** The describedby ids */\n protected readonly describedBy = signal<string[]>([]);\n\n /** The dialog state */\n protected readonly state = dialogState<NgpDialog<T, R>>(this);\n\n ngOnDestroy(): void {\n this.close();\n }\n\n /** Close the dialog. */\n close(result?: R): void {\n this.dialogRef.close(result);\n }\n\n /** Stop click events from propagating to the overlay */\n @HostListener('click', ['$event'])\n protected onClick(event: Event): void {\n event.stopPropagation();\n }\n\n /** @internal register a labelledby id */\n setLabelledBy(id: string): void {\n this.labelledBy.update(ids => [...ids, id]);\n }\n\n /** @internal register a describedby id */\n setDescribedBy(id: string): void {\n this.describedBy.update(ids => [...ids, id]);\n }\n\n /** @internal remove a labelledby id */\n removeLabelledBy(id: string): void {\n this.labelledBy.update(ids => ids.filter(i => i !== id));\n }\n\n /** @internal remove a describedby id */\n removeDescribedBy(id: string): void {\n this.describedBy.update(ids => ids.filter(i => i !== id));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAgDO,MAAM,mBAAmB,GAAoB;AAClD,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,YAAY,EAAE,IAAI;CACnB;AAEM,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAkB,sBAAsB,CAAC;AAE/F;;;;AAIG;AACG,SAAU,mBAAmB,CAAC,MAAgC,EAAA;IAClE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,oBAAoB;AAC7B,YAAA,QAAQ,EAAE,EAAE,GAAG,mBAAmB,EAAE,GAAG,MAAM,EAAE;AAChD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,kBAAkB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,oBAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,mBAAmB;AAChF;;ACtEA;;AAEG;AACI,MAAM,mBAAmB,GAAG,gBAAgB,CAAsB,QAAQ,CAAC;AAElF;;AAEG;MACU,kBAAkB,GA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EAAA,UAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,iBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,sBAAA,EAAA,0BAAA,EAAA,uBAAA,EAAA,2BAAA,EAAA,EAAA,EAAA,SAAA,EAXT,CAAC,kBAAkB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAAA,IAAA,CAAA,YAAA,EAAA,EAAA,EAAA,SAAA,EAAAC,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAWtB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAdrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,SAAS,EAAE,CAAC,kBAAkB,EAAE,CAAC;AACjC,oBAAA,cAAc,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AAChD,oBAAA,IAAI,EAAE;AACJ,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,MAAM,EAAE,YAAY;AACpB,wBAAA,aAAa,EAAE,cAAc;AAC7B,wBAAA,mBAAmB,EAAE,eAAe;AACpC,wBAAA,wBAAwB,EAAE,wBAAwB;AAClD,wBAAA,yBAAyB,EAAE,yBAAyB;AACrD,qBAAA;AACF,iBAAA;;sBAwCE,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;AC9DnC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-dialog.mjs","sources":["../../../../packages/ng-primitives/dialog/src/config/dialog-config.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog-state.ts","../../../../packages/ng-primitives/dialog/src/dialog-description/dialog-description.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog-ref.ts","../../../../packages/ng-primitives/dialog/src/dialog-overlay/dialog-overlay.ts","../../../../packages/ng-primitives/dialog/src/dialog-title/dialog-title.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.service.ts","../../../../packages/ng-primitives/dialog/src/dialog-trigger/dialog-trigger.ts","../../../../packages/ng-primitives/dialog/src/dialog/dialog.ts","../../../../packages/ng-primitives/dialog/src/ng-primitives-dialog.ts"],"sourcesContent":["import { InjectionToken, Injector, Provider, ViewContainerRef, inject } from '@angular/core';\nimport { NgpDismissGuard, ScrollStrategy } from 'ng-primitives/portal';\n\n/** Valid ARIA roles for a dialog. */\nexport type NgpDialogRole = 'dialog' | 'alertdialog';\n\nexport interface NgpDialogConfig<T = any> {\n /** The view container to attach the dialog to. */\n viewContainerRef?: ViewContainerRef;\n\n /** The injector to use for the dialog. Defaults to the view container's injector.*/\n injector?: Injector;\n\n /** ID for the dialog. If omitted, a unique one will be generated. */\n id?: string;\n\n /** The role of the dialog. */\n role?: NgpDialogRole;\n\n /** Whether this is a modal dialog. Used to set the `aria-modal` attribute. */\n modal?: boolean;\n\n /**\n * Whether the dialog should close when the user navigates. This includes both browser history\n * navigation (back/forward) and programmatic route changes (e.g. router.navigate()).\n */\n closeOnNavigation?: boolean;\n\n /** Whether the dialog should close when the user presses the escape key, or a guard function. */\n closeOnEscape?: NgpDismissGuard<KeyboardEvent>;\n\n /**\n * Whether the dialog should close when clicking outside (on the overlay), or a guard function.\n */\n closeOnOutsideClick?: NgpDismissGuard<Element>;\n\n /**\n * Whether the dialog should close when the user clicks the overlay.\n * @deprecated Use `closeOnOutsideClick` instead.\n */\n closeOnClick?: boolean;\n\n /** Scroll strategy to be used for the dialog. */\n scrollStrategy?: ScrollStrategy;\n\n data?: T;\n}\n\nexport const defaultDialogConfig: NgpDialogConfig = {\n role: 'dialog',\n modal: true,\n closeOnNavigation: true,\n closeOnEscape: true,\n closeOnClick: true,\n};\n\nexport const NgpDialogConfigToken = new InjectionToken<NgpDialogConfig>('NgpDialogConfigToken');\n\n/**\n * Provide the default Dialog configuration\n * @param config The Dialog configuration\n * @returns The provider\n */\nexport function provideDialogConfig(config: Partial<NgpDialogConfig>): Provider[] {\n return [\n {\n provide: NgpDialogConfigToken,\n useValue: { ...defaultDialogConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Dialog configuration\n * @returns The global Dialog configuration\n */\nexport function injectDialogConfig(): NgpDialogConfig {\n return inject(NgpDialogConfigToken, { optional: true }) ?? defaultDialogConfig;\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpDialog } from './dialog';\n\n/**\n * The state token for the Dialog primitive.\n */\nexport const NgpDialogStateToken = createStateToken<NgpDialog<any, any>>('Dialog');\n\n/**\n * Provides the Dialog state.\n */\nexport const provideDialogState = createStateProvider(NgpDialogStateToken);\n\n/**\n * Injects the Dialog state.\n */\nexport const injectDialogState = createStateInjector<NgpDialog>(NgpDialogStateToken);\n\n/**\n * The Dialog state registration function.\n */\nexport const dialogState = createState(NgpDialogStateToken);\n","import { Directive, input, OnDestroy } from '@angular/core';\nimport { onChange, uniqueId } from 'ng-primitives/utils';\nimport { injectDialogState } from '../dialog/dialog-state';\n\n@Directive({\n selector: '[ngpDialogDescription]',\n exportAs: 'ngpDialogDescription',\n host: {\n '[id]': 'id()',\n },\n})\nexport class NgpDialogDescription implements OnDestroy {\n /** Access the dialog */\n private readonly dialog = injectDialogState();\n\n /** The id of the descriptions. */\n readonly id = input<string>(uniqueId('ngp-dialog-description'));\n\n constructor() {\n onChange(this.id, (id, prevId) => {\n if (prevId) {\n this.dialog().removeDescribedBy(prevId);\n }\n\n if (id) {\n this.dialog().setDescribedBy(id);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dialog().removeDescribedBy(this.id());\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { inject, InjectOptions, Injector } from '@angular/core';\nimport { NgpExitAnimationManager } from 'ng-primitives/internal';\nimport { NgpDismissGuard, NgpOverlayRef } from 'ng-primitives/portal';\nimport { defer, EMPTY, fromEvent, Observable, Subject } from 'rxjs';\nimport { filter, map, takeUntil } from 'rxjs/operators';\nimport { NgpDialogConfig } from '../config/dialog-config';\n\n/** Minimal portal interface needed by the dialog ref. */\nexport interface NgpDialogPortalRef {\n getElements(): HTMLElement[];\n detach(immediate?: boolean): Promise<void>;\n}\n\n/**\n * Reference to a dialog opened via the Dialog service.\n */\nexport class NgpDialogRef<T = unknown, R = unknown> implements NgpOverlayRef {\n /** Whether the user is allowed to close the dialog. */\n disableClose: boolean | undefined;\n\n /** Whether the escape key is allowed to close the dialog, or a guard function. */\n closeOnEscape: NgpDismissGuard<KeyboardEvent> | undefined;\n\n /** Whether clicking outside (on the overlay) is allowed to close the dialog, or a guard function. */\n closeOnOutsideClick: NgpDismissGuard<Element> | undefined;\n\n /** Emits when the dialog has been closed. */\n readonly closed = new Subject<{ focusOrigin?: FocusOrigin; result?: R }>();\n\n /** @internal */\n readonly afterClosed$ = new Subject<{ focusOrigin?: FocusOrigin; result?: R }>();\n\n /**\n * Observable that emits the dialog result after exit animations have completed.\n */\n readonly afterClosed: Observable<R | undefined> = this.afterClosed$.pipe(\n map(event => event.result),\n );\n\n /** Data passed from the dialog opener. */\n readonly data: T;\n\n /** Unique ID for the dialog. */\n readonly id: string;\n\n /** @internal Store the injector */\n injector: Injector | undefined;\n\n /** Whether the dialog is closing. */\n private closing = false;\n\n /** @internal Portal reference for element access and detach. */\n portal: NgpDialogPortalRef | null = null;\n\n /** Emits on keyboard events within the dialog. */\n readonly keydownEvents: Observable<KeyboardEvent>;\n\n /**\n * Emits pointer events (click, auxclick, contextmenu) that happen outside of the dialog.\n * Fed by the NgpOverlayRegistry with CDK-compatible stacking awareness.\n * @internal\n */\n readonly outsidePointerEvents$ = new Subject<MouseEvent>();\n\n /** Emits on pointer events that happen outside of the dialog. */\n readonly outsidePointerEvents: Observable<MouseEvent> = this.outsidePointerEvents$.asObservable();\n\n constructor(\n readonly config: NgpDialogConfig<T>,\n private readonly document: Document,\n ) {\n this.data = config.data as T;\n this.id = config.id!; // By the time the dialog is created we are guaranteed to have an ID.\n this.closeOnEscape = config.closeOnEscape ?? true;\n this.closeOnOutsideClick = config.closeOnOutsideClick;\n\n // Use defer() so the observable is created on subscribe — by then the portal will be set.\n this.keydownEvents = defer(() => {\n const elements = this.getElements();\n if (!elements.length) return EMPTY;\n return fromEvent<KeyboardEvent>(this.document, 'keydown').pipe(\n filter(event => elements.some(el => el.contains(event.target as Node))),\n takeUntil(this.closed),\n );\n });\n }\n\n /**\n * Updates the position of the dialog. No-op since dialogs are CSS-centered.\n */\n updatePosition(): this {\n return this;\n }\n\n /**\n * NgpOverlayRef implementation — called by the registry for escape-key dismiss.\n */\n hide(options?: { immediate?: boolean; origin?: FocusOrigin }): void {\n if (this.disableClose) {\n return;\n }\n this.close(undefined, options?.origin);\n }\n\n /**\n * NgpOverlayRef implementation — called by the registry for descendant cascade.\n * Skips exit animations and tears down immediately.\n */\n async hideImmediate(): Promise<void> {\n if (this.closing) {\n return;\n }\n\n this.closing = true;\n\n this.closed.next({});\n this.closed.complete();\n\n // Detach the portal immediately — no exit animation\n if (this.portal) {\n await this.portal.detach(true);\n this.portal = null;\n }\n\n this.afterClosed$.next({});\n this.afterClosed$.complete();\n }\n\n /**\n * Close the dialog.\n * @param result Optional result to return to the dialog opener.\n * @param focusOrigin The origin of the focus event that triggered the close.\n */\n async close(result?: R, focusOrigin?: FocusOrigin): Promise<void> {\n // If the dialog is already closed, do nothing.\n if (this.closing) {\n return;\n }\n\n this.closing = true;\n\n // Emit immediately so consumers can react before exit animations run.\n this.closed.next({ focusOrigin, result });\n this.closed.complete();\n\n const exitAnimationManager = this.injector?.get(NgpExitAnimationManager, undefined, {\n optional: true,\n });\n if (exitAnimationManager) {\n await exitAnimationManager.exit();\n }\n\n // Detach the portal (immediate since exit animation already ran)\n if (this.portal) {\n await this.portal.detach(true);\n this.portal = null;\n }\n\n this.afterClosed$.next({ focusOrigin, result });\n this.afterClosed$.complete();\n }\n\n /**\n * @deprecated Access dialog methods directly instead (keydownEvents, outsidePointerEvents,\n * updatePosition, close). This shim will be removed in the next major version.\n */\n get overlayRef(): {\n keydownEvents: () => Observable<KeyboardEvent>;\n outsidePointerEvents: () => Observable<MouseEvent>;\n updatePosition: () => NgpDialogRef<T, R>;\n dispose: () => Promise<void>;\n detachments: () => Observable<{ focusOrigin?: FocusOrigin; result?: R }>;\n overlayElement: HTMLElement | undefined;\n } {\n return {\n keydownEvents: () => this.keydownEvents,\n outsidePointerEvents: () => this.outsidePointerEvents,\n updatePosition: () => this.updatePosition(),\n dispose: () => this.close(),\n detachments: () => this.closed.asObservable(),\n overlayElement: this.getElements()[0] as HTMLElement | undefined,\n };\n }\n\n /**\n * Get the portal elements.\n * @internal\n */\n getElements(): HTMLElement[] {\n return this.portal?.getElements() ?? [];\n }\n}\n\nexport function injectDialogRef<T = unknown, R = unknown>(\n options?: InjectOptions & { optional?: false },\n): NgpDialogRef<T, R>;\nexport function injectDialogRef<T = unknown, R = unknown>(\n options: InjectOptions & { optional: true },\n): NgpDialogRef<T, R> | null;\nexport function injectDialogRef<T = unknown, R = unknown>(\n options?: InjectOptions,\n): NgpDialogRef<T, R> | null {\n return inject<NgpDialogRef<T, R>>(NgpDialogRef, options ?? {});\n}\n","import { booleanAttribute, Directive, input } from '@angular/core';\nimport { NgpExitAnimation } from 'ng-primitives/internal';\nimport { NgpDismissGuard } from 'ng-primitives/portal';\nimport { injectDialogRef } from '../dialog/dialog-ref';\n\n@Directive({\n selector: '[ngpDialogOverlay]',\n exportAs: 'ngpDialogOverlay',\n hostDirectives: [NgpExitAnimation],\n host: {\n '(pointerdown)': 'onPointerDown($event)',\n '(click)': 'onClick($event)',\n '(pointercancel)': 'resetPointerOrigin()',\n },\n})\nexport class NgpDialogOverlay {\n private readonly dialogRef = injectDialogRef();\n private startedPointerDownOnOverlay = false;\n\n /**\n * Whether the dialog should close on backdrop click.\n * @default `true`\n */\n readonly closeOnClick = input(this.dialogRef.config.closeOnClick, {\n alias: 'ngpDialogOverlayCloseOnClick',\n transform: booleanAttribute,\n });\n\n protected onPointerDown(event: Event): void {\n this.startedPointerDownOnOverlay = event.target === event.currentTarget;\n }\n\n protected onClick(event: Event): void {\n const isOverlayClick = this.startedPointerDownOnOverlay && event.target === event.currentTarget;\n\n this.resetPointerOrigin();\n\n if (!isOverlayClick || this.dialogRef.disableClose) {\n return;\n }\n\n const guard: NgpDismissGuard<Element> =\n this.dialogRef.closeOnOutsideClick ?? this.closeOnClick() ?? true;\n this.evaluateGuard(guard, event.target as Element);\n }\n\n private evaluateGuard(guard: NgpDismissGuard<Element>, target: Element): void {\n if (guard === true) {\n this.dialogRef.close(undefined, 'mouse');\n return;\n }\n\n if (guard === false) {\n return;\n }\n\n // Function guard — evaluate sync or async\n let result: boolean | Promise<boolean>;\n try {\n result = guard(target);\n } catch (error) {\n console.error('NgpDialogOverlay: dismiss guard threw', error);\n return;\n }\n\n if (typeof result === 'boolean') {\n if (result) {\n this.dialogRef.close(undefined, 'mouse');\n }\n } else {\n result\n .then(shouldClose => {\n if (shouldClose) {\n this.dialogRef.close(undefined, 'mouse');\n }\n })\n .catch(error => {\n console.error('NgpDialogOverlay: dismiss guard rejected', error);\n });\n }\n }\n\n protected resetPointerOrigin(): void {\n this.startedPointerDownOnOverlay = false;\n }\n}\n","import { Directive, input, OnDestroy } from '@angular/core';\nimport { onChange, uniqueId } from 'ng-primitives/utils';\nimport { injectDialogState } from '../dialog/dialog-state';\n\n@Directive({\n selector: '[ngpDialogTitle]',\n exportAs: 'ngpDialogTitle',\n host: {\n '[id]': 'id()',\n },\n})\nexport class NgpDialogTitle implements OnDestroy {\n /** Access the dialog. */\n private readonly dialog = injectDialogState();\n\n /** The id of the title. */\n readonly id = input<string>(uniqueId('ngp-dialog-title'));\n\n constructor() {\n onChange(this.id, (id, prevId) => {\n if (prevId) {\n this.dialog().removeLabelledBy(prevId);\n }\n\n if (id) {\n this.dialog().setLabelledBy(id);\n }\n });\n }\n\n ngOnDestroy(): void {\n this.dialog().removeLabelledBy(this.id());\n }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n Injectable,\n Injector,\n OnDestroy,\n StaticProvider,\n TemplateRef,\n Type,\n ViewContainerRef,\n inject,\n isDevMode,\n} from '@angular/core';\nimport { NavigationStart, Router } from '@angular/router';\nimport { NgpExitAnimationManager } from 'ng-primitives/internal';\nimport {\n BlockScrollStrategy,\n NgpOverlayRegistry,\n ScrollStrategy,\n createPortal,\n} from 'ng-primitives/portal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { Observable, Subject, Subscription, defer } from 'rxjs';\nimport { startWith } from 'rxjs/operators';\nimport { NgpDialogConfig, injectDialogConfig } from '../config/dialog-config';\nimport { NgpDialogRef } from './dialog-ref';\n\n/**\n * Originally based on Angular CDK Dialog service.\n * Re-implemented to use ng-primitives/portal instead of @angular/cdk/overlay.\n */\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NgpDialogManager implements OnDestroy {\n private readonly applicationRef = inject(ApplicationRef);\n private readonly injector = inject(Injector);\n private readonly document = inject<Document>(DOCUMENT);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly viewportRuler = inject(ViewportRuler);\n private readonly registry = inject(NgpOverlayRegistry);\n private readonly defaultOptions = injectDialogConfig();\n private readonly parentDialogManager = inject(NgpDialogManager, {\n optional: true,\n skipSelf: true,\n });\n private readonly router = inject(Router, { optional: true });\n\n private openDialogsAtThisLevel: NgpDialogRef[] = [];\n private readonly afterAllClosedAtThisLevel = new Subject<void>();\n private readonly afterOpenedAtThisLevel = new Subject<NgpDialogRef>();\n private ariaHiddenElements = new Map<Element, string | null>();\n private routerSubscription: Subscription | undefined;\n\n /** Scroll blocking strategy — shared across all dialogs. */\n private scrollStrategy: ScrollStrategy | null = null;\n\n /** Keeps track of the currently-open dialogs. */\n get openDialogs(): readonly NgpDialogRef[] {\n return this.parentDialogManager\n ? this.parentDialogManager.openDialogs\n : this.openDialogsAtThisLevel;\n }\n\n /** Stream that emits when a dialog has been opened. */\n get afterOpened(): Subject<NgpDialogRef> {\n return this.parentDialogManager\n ? this.parentDialogManager.afterOpened\n : this.afterOpenedAtThisLevel;\n }\n\n /**\n * Stream that emits when all open dialog have finished closing.\n * Will emit on subscribe if there are no open dialogs to begin with.\n */\n readonly afterAllClosed: Observable<void> = defer(() =>\n this.openDialogs.length\n ? this.getAfterAllClosed()\n : this.getAfterAllClosed().pipe(startWith(undefined)),\n );\n\n /**\n * Opens a modal dialog containing the given template or component.\n */\n open(\n templateRefOrComponentType: TemplateRef<NgpDialogContext> | Type<unknown>,\n config?: NgpDialogConfig,\n ): NgpDialogRef;\n\n /**\n * Opens a modal dialog containing the given template or component with typed data.\n */\n open<T, R = unknown>(\n templateRefOrComponentType: TemplateRef<NgpDialogContext<T, R>> | Type<unknown>,\n config: NgpDialogConfig<T> & { data: T },\n ): NgpDialogRef<T, R>;\n\n /**\n * Opens a modal dialog with typed result but no data (explicit void for data type).\n */\n open<T extends void, R>(\n templateRefOrComponentType: TemplateRef<NgpDialogContext<T, R>> | Type<unknown>,\n config?: NgpDialogConfig,\n ): NgpDialogRef<T, R>;\n\n open(\n templateRefOrComponentType: TemplateRef<any> | Type<unknown>,\n config?: NgpDialogConfig<any>,\n ): NgpDialogRef<any, any> {\n // store the current active element so we can focus it after the dialog is closed\n const activeElement = this.document.activeElement;\n\n // this is not ideal, but there is a case where a dialog trigger is within an overlay (e.g. menu),\n // which may be removed before the dialog is closed. This is not desired, so we need to access a view container ref\n // that is not within the overlay. To solve this we use the view container ref of the root component.\n // Could this have any unintended side effects? For example, the dialog would not be closed during route changes?\n const viewContainerRef =\n this.applicationRef.components[0]?.injector.get(ViewContainerRef) ??\n config?.viewContainerRef ??\n config?.injector?.get(ViewContainerRef);\n\n const defaults = this.defaultOptions;\n config = { ...defaults, viewContainerRef, ...config };\n config.id = config.id ?? uniqueId('ngp-dialog');\n\n if (config.id && this.getDialogById(config.id) && isDevMode()) {\n throw Error(`Dialog with id \"${config.id}\" exists already. The dialog id must be unique.`);\n }\n\n const dialogRef = new NgpDialogRef(config, this.document);\n const injector = this.createInjector(config, dialogRef);\n\n // store the injector in the dialog ref - this is so we can access the exit animation manager\n dialogRef.injector = injector;\n\n const context: NgpDialogContext = {\n $implicit: dialogRef,\n close: dialogRef.close.bind(dialogRef),\n };\n\n // Create the portal using our portal system\n const portal = createPortal(\n templateRefOrComponentType,\n config.viewContainerRef!,\n injector,\n context,\n );\n\n // Attach the portal to document.body\n portal.attach(this.document.body);\n\n // Store the portal reference on the dialog ref for element access and cleanup\n dialogRef.portal = portal;\n\n // If this is the first dialog that we're opening, hide all the non-overlay content\n // and enable scroll blocking.\n if (!this.openDialogs.length) {\n this.hideNonDialogContentFromAssistiveTechnology(portal.getElements());\n this.enableScrollBlocking(config);\n }\n\n // Auto-detect parent overlay: if the trigger element lives inside an existing overlay\n // (e.g. a dialog opened from a popover), register as its child so that clicks inside\n // the dialog don't dismiss the parent overlay.\n // Only inherit parentId from other dialogs — non-dialog overlays (menus, popovers)\n // may close after triggering the dialog open, which would cascade-close the dialog.\n let parentId =\n activeElement instanceof HTMLElement\n ? this.registry.findContainingOverlay(activeElement)\n : null;\n\n if (parentId !== null && !this.openDialogs.some(d => d.id === parentId)) {\n parentId = null;\n }\n\n // Register with the overlay registry for centralized escape-key routing.\n // outsidePress is false because the NgpDialogOverlay directive handles its own backdrop clicks.\n this.registry.register({\n id: dialogRef.id,\n parentId,\n overlay: dialogRef,\n getElements: () => dialogRef.getElements(),\n triggerElement: (activeElement as HTMLElement) ?? this.document.body,\n dismissPolicy: {\n outsidePress: false,\n escapeKey: config.closeOnEscape ?? true,\n },\n outsidePointerEvents$: dialogRef.outsidePointerEvents$,\n });\n\n (this.openDialogs as NgpDialogRef[]).push(dialogRef as NgpDialogRef<any, any>);\n this.afterOpened.next(dialogRef as NgpDialogRef<any, any>);\n this.subscribeToRouterEvents();\n\n dialogRef.closed.subscribe(() => {\n // Deregister from the overlay registry immediately so stacking order is updated.\n this.registry.deregister(dialogRef.id);\n this.removeOpenDialog(dialogRef as NgpDialogRef<any, any>, true);\n });\n\n dialogRef.afterClosed$.subscribe(({ focusOrigin }) => {\n // Focus the trigger element after exit animations complete.\n if (activeElement instanceof HTMLElement && this.document.body.contains(activeElement)) {\n // Its not great that we are relying on an internal API here, but we need to in order to\n // try and best determine the focus origin when it is programmatically closed by the user.\n this.focusMonitor.focusVia(\n activeElement,\n focusOrigin ?? (this.focusMonitor as any)._lastFocusOrigin,\n );\n }\n });\n\n return dialogRef;\n }\n\n /**\n * Closes all of the currently-open dialogs.\n */\n closeAll(): void {\n reverseForEach(this.openDialogs, dialog => dialog.close());\n }\n\n /**\n * Finds an open dialog by its id.\n * @param id ID to use when looking up the dialog.\n */\n getDialogById(id: string): NgpDialogRef | undefined {\n return this.openDialogs.find(dialog => dialog.id === id);\n }\n\n /**\n * Subscribe to router navigation events so that dialogs with `closeOnNavigation`\n * are closed when the user navigates. This handles both browser popstate events\n * and programmatic route changes (e.g. router.navigate()).\n */\n private subscribeToRouterEvents(): void {\n if (this.routerSubscription || !this.router) {\n return;\n }\n\n this.routerSubscription = this.router.events.subscribe(event => {\n if (event instanceof NavigationStart && this.openDialogs.length) {\n // Close dialogs that have closeOnNavigation enabled (iterate in reverse as closing modifies the array)\n let i = this.openDialogs.length;\n while (i--) {\n const dialog = this.openDialogs[i];\n if (dialog.config.closeOnNavigation !== false) {\n dialog.close();\n }\n }\n }\n });\n }\n\n ngOnDestroy(): void {\n // Make one pass over all the dialogs that need to be untracked, but should not be closed. We\n // want to stop tracking the open dialog even if it hasn't been closed, because the tracking\n // determines when `aria-hidden` is removed from elements outside the dialog.\n reverseForEach(this.openDialogsAtThisLevel, dialog => {\n // Check for `false` specifically since we want `undefined` to be interpreted as `true`.\n this.removeOpenDialog(dialog, false);\n });\n\n // Make a second pass and close the remaining dialogs. We do this second pass in order to\n // correctly dispatch the `afterAllClosed` event in case we have a mixed array of dialogs\n // that should be closed and dialogs that should not.\n reverseForEach(this.openDialogsAtThisLevel, dialog => dialog.close());\n\n this.afterAllClosedAtThisLevel.complete();\n this.afterOpenedAtThisLevel.complete();\n this.openDialogsAtThisLevel = [];\n this.routerSubscription?.unsubscribe();\n }\n\n /**\n * Creates a custom injector to be used inside the dialog. This allows a component loaded inside\n * of a dialog to close itself and, optionally, to return a value.\n */\n private createInjector<T, R>(\n config: NgpDialogConfig<T>,\n dialogRef: NgpDialogRef<T, R>,\n ): Injector {\n const userInjector = config.injector || config.viewContainerRef?.injector;\n const providers: StaticProvider[] = [\n { provide: NgpDialogRef, useValue: dialogRef },\n { provide: NgpExitAnimationManager, useClass: NgpExitAnimationManager },\n ];\n\n // Fall back to the service's own injector (root injector) to ensure\n // ApplicationRef and other platform providers are available.\n return Injector.create({ parent: userInjector || this.injector, providers });\n }\n\n /**\n * Removes a dialog from the array of open dialogs.\n */\n private removeOpenDialog(dialogRef: NgpDialogRef, emitEvent: boolean) {\n const index = this.openDialogs.indexOf(dialogRef);\n\n if (index > -1) {\n (this.openDialogs as NgpDialogRef[]).splice(index, 1);\n\n // If all the dialogs were closed, remove/restore the `aria-hidden`\n // to a the siblings and emit to the `afterAllClosed` stream.\n if (!this.openDialogs.length) {\n this.ariaHiddenElements.forEach((previousValue, element) => {\n if (previousValue) {\n element.setAttribute('aria-hidden', previousValue);\n } else {\n element.removeAttribute('aria-hidden');\n }\n });\n\n this.ariaHiddenElements.clear();\n this.disableScrollBlocking();\n\n if (emitEvent) {\n this.getAfterAllClosed().next();\n }\n }\n }\n }\n\n /**\n * Enable scroll blocking when the first dialog opens.\n */\n private enableScrollBlocking(config?: NgpDialogConfig): void {\n if (!this.scrollStrategy) {\n this.scrollStrategy =\n config?.scrollStrategy ?? new BlockScrollStrategy(this.viewportRuler, this.document);\n }\n this.scrollStrategy.enable();\n }\n\n /**\n * Disable scroll blocking when the last dialog closes.\n */\n private disableScrollBlocking(): void {\n this.scrollStrategy?.disable();\n this.scrollStrategy = null;\n }\n\n /**\n * Hides all of the content that isn't a dialog portal from assistive technology.\n */\n private hideNonDialogContentFromAssistiveTechnology(portalElements: HTMLElement[]) {\n const body = this.document.body;\n const bodyChildren = body.children;\n\n for (let i = bodyChildren.length - 1; i > -1; i--) {\n const sibling = bodyChildren[i];\n\n if (\n !portalElements.includes(sibling as HTMLElement) &&\n sibling.nodeName !== 'SCRIPT' &&\n sibling.nodeName !== 'STYLE' &&\n !sibling.hasAttribute('aria-live')\n ) {\n this.ariaHiddenElements.set(sibling, sibling.getAttribute('aria-hidden'));\n sibling.setAttribute('aria-hidden', 'true');\n }\n }\n }\n\n private getAfterAllClosed(): Subject<void> {\n const parent = this.parentDialogManager;\n return parent ? parent.getAfterAllClosed() : this.afterAllClosedAtThisLevel;\n }\n}\n\n/**\n * Executes a callback against all elements in an array while iterating in reverse.\n * Useful if the array is being modified as it is being iterated.\n */\nfunction reverseForEach<T>(items: T[] | readonly T[], callback: (current: T) => void) {\n let i = items.length;\n\n while (i--) {\n callback(items[i]);\n }\n}\n\nexport interface NgpDialogContext<T = unknown, R = unknown> {\n $implicit: NgpDialogRef<T, R>;\n close: (result?: R) => void;\n}\n\nexport function injectDialogManager(): NgpDialogManager {\n return inject(NgpDialogManager);\n}\n","import { Directive, HostListener, inject, input, output, TemplateRef } from '@angular/core';\nimport { dismissGuardAttribute, NgpDismissGuard, NgpDismissGuardInput } from 'ng-primitives/portal';\nimport { injectDialogConfig } from '../config/dialog-config';\nimport { NgpDialogRef } from '../dialog/dialog-ref';\nimport { NgpDialogContext, NgpDialogManager } from '../dialog/dialog.service';\n\n@Directive({\n selector: '[ngpDialogTrigger]',\n exportAs: 'ngpDialogTrigger',\n})\nexport class NgpDialogTrigger<T = unknown> {\n /** Access the global configuration */\n private readonly config = injectDialogConfig();\n\n /** Access the dialog manager. */\n private readonly dialogManager = inject(NgpDialogManager);\n\n /** The template to launch. */\n readonly template = input.required<TemplateRef<NgpDialogContext>>({\n alias: 'ngpDialogTrigger',\n });\n\n /** Emits whenever the dialog is closed with the given result. */\n readonly closed = output<T>({ alias: 'ngpDialogTriggerClosed' });\n\n /**\n * Whether the dialog should close on escape, or a guard function.\n * @default `true`\n */\n readonly closeOnEscape = input<\n NgpDismissGuard<KeyboardEvent>,\n NgpDismissGuardInput<KeyboardEvent>\n >(this.config.closeOnEscape ?? true, {\n alias: 'ngpDialogTriggerCloseOnEscape',\n transform: dismissGuardAttribute,\n });\n\n /**\n * Whether the dialog should close on outside click, or a guard function.\n * @default `true`\n */\n readonly closeOnOutsideClick = input<NgpDismissGuard<Element>, NgpDismissGuardInput<Element>>(\n this.config.closeOnOutsideClick ?? true,\n {\n alias: 'ngpDialogTriggerCloseOnOutsideClick',\n transform: dismissGuardAttribute,\n },\n );\n\n /**\n * Store the dialog ref.\n * @internal\n */\n private dialogRef: NgpDialogRef | null = null;\n\n @HostListener('click')\n protected launch(): void {\n this.dialogRef = this.dialogManager.open(this.template(), {\n closeOnEscape: this.closeOnEscape(),\n closeOnOutsideClick: this.closeOnOutsideClick(),\n });\n this.dialogRef.closed.subscribe(({ result }) => {\n this.closed.emit(result as T);\n return (this.dialogRef = null);\n });\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, HostListener, input, OnDestroy, signal } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { NgpExitAnimation } from 'ng-primitives/internal';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectDialogConfig } from '../config/dialog-config';\nimport { injectDialogRef } from './dialog-ref';\nimport { dialogState, provideDialogState } from './dialog-state';\n\n@Directive({\n selector: '[ngpDialog]',\n exportAs: 'ngpDialog',\n providers: [provideDialogState()],\n hostDirectives: [NgpFocusTrap, NgpExitAnimation],\n host: {\n tabindex: '-1',\n '[id]': 'state.id()',\n '[attr.role]': 'state.role()',\n '[attr.aria-modal]': 'state.modal()',\n '[attr.aria-labelledby]': 'labelledBy().join(\" \")',\n '[attr.aria-describedby]': 'describedBy().join(\" \")',\n },\n})\nexport class NgpDialog<T = unknown, R = unknown> implements OnDestroy {\n private readonly config = injectDialogConfig();\n\n /** Access the dialog ref */\n private readonly dialogRef = injectDialogRef<T, R>();\n\n /** The id of the dialog */\n readonly id = input<string>(uniqueId('ngp-dialog'));\n\n /** The dialog role. */\n readonly role = input(this.config.role, {\n alias: 'ngpDialogRole',\n });\n\n /** Whether the dialog is a modal. */\n readonly modal = input<boolean, BooleanInput>(this.config.modal ?? false, {\n alias: 'ngpDialogModal',\n transform: booleanAttribute,\n });\n\n /** The labelledby ids */\n protected readonly labelledBy = signal<string[]>([]);\n\n /** The describedby ids */\n protected readonly describedBy = signal<string[]>([]);\n\n /** The dialog state */\n protected readonly state = dialogState<NgpDialog<T, R>>(this);\n\n ngOnDestroy(): void {\n this.close();\n }\n\n /** Close the dialog. */\n close(result?: R): void {\n this.dialogRef.close(result);\n }\n\n /** Stop click events from propagating to the overlay */\n @HostListener('click', ['$event'])\n protected onClick(event: Event): void {\n event.stopPropagation();\n }\n\n /** @internal register a labelledby id */\n setLabelledBy(id: string): void {\n this.labelledBy.update(ids => [...ids, id]);\n }\n\n /** @internal register a describedby id */\n setDescribedBy(id: string): void {\n this.describedBy.update(ids => [...ids, id]);\n }\n\n /** @internal remove a labelledby id */\n removeLabelledBy(id: string): void {\n this.labelledBy.update(ids => ids.filter(i => i !== id));\n }\n\n /** @internal remove a describedby id */\n removeDescribedBy(id: string): void {\n this.describedBy.update(ids => ids.filter(i => i !== id));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAgDO,MAAM,mBAAmB,GAAoB;AAClD,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAA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