@cngx/common 0.1.0-rc.8 → 0.3.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/a11y/README.md +15 -2
- package/button/README.md +258 -0
- package/command/README.md +42 -2
- package/data/README.md +15 -12
- package/fesm2022/cngx-common-a11y.mjs +1076 -319
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +99 -77
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-button.mjs +1084 -0
- package/fesm2022/cngx-common-button.mjs.map +1 -0
- package/fesm2022/cngx-common-card.mjs +138 -78
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +799 -327
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +101 -25
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +861 -423
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +198 -160
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +693 -329
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +7303 -2774
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +2174 -442
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-menu-button.mjs +557 -0
- package/fesm2022/cngx-common-menu-button.mjs.map +1 -0
- package/fesm2022/cngx-common-popover.mjs +2109 -557
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +548 -419
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +442 -331
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +44 -71
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +10 -10
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/interactive/README.md +30 -19
- package/layout/README.md +17 -1
- package/menu-button/README.md +234 -0
- package/package.json +31 -8
- package/popover/README.md +81 -4
- package/popover/tooltip-indicator.scss +52 -0
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +9 -0
- package/schematics/ng-add/schema.json +96 -0
- package/schematics/package.json +3 -0
- package/stepper/README.md +5 -5
- package/theming/components/cngx-accordion.css +36 -7
- package/theming/components/cngx-async.css +185 -37
- package/theming/components/cngx-backdrop.css +3 -1
- package/theming/components/cngx-badge.css +20 -5
- package/theming/components/cngx-bottom-sheet.css +2 -0
- package/theming/components/cngx-breadcrumb.css +3 -1
- package/theming/components/cngx-button-group.css +325 -0
- package/theming/components/cngx-button-toggle.css +55 -23
- package/theming/components/cngx-button.css +975 -0
- package/theming/components/cngx-data-grid.css +2 -0
- package/theming/components/cngx-dialog.css +3 -1
- package/theming/components/cngx-divider.css +24 -9
- package/theming/components/cngx-drawer.css +153 -0
- package/theming/components/cngx-icon-glyph.css +76 -0
- package/theming/components/cngx-listbox.css +79 -25
- package/theming/components/cngx-menu.css +112 -52
- package/theming/components/cngx-nav.css +1220 -0
- package/theming/components/cngx-popover-sheet.css +434 -0
- package/theming/components/cngx-popover.css +37 -9
- package/theming/components/cngx-recycler-placeholder.css +2 -0
- package/theming/components/cngx-ripple.css +74 -16
- package/theming/components/cngx-sidebar.css +71 -0
- package/theming/components/cngx-slider.css +3 -1
- package/theming/components/cngx-tooltip.css +2 -0
- package/timeline/README.md +2 -2
- package/types/cngx-common-a11y.d.ts +488 -112
- package/types/cngx-common-audio.d.ts +60 -88
- package/types/cngx-common-button.d.ts +698 -0
- package/types/cngx-common-card.d.ts +104 -78
- package/types/cngx-common-chart.d.ts +677 -389
- package/types/cngx-common-command.d.ts +55 -41
- package/types/cngx-common-data.d.ts +506 -360
- package/types/cngx-common-dialog.d.ts +94 -127
- package/types/cngx-common-display.d.ts +475 -300
- package/types/cngx-common-interactive.d.ts +4383 -1721
- package/types/cngx-common-layout.d.ts +1399 -288
- package/types/cngx-common-menu-button.d.ts +382 -0
- package/types/cngx-common-popover.d.ts +990 -268
- package/types/cngx-common-stepper.d.ts +374 -465
- package/types/cngx-common-tabs.d.ts +309 -403
- package/types/cngx-common-timeline.d.ts +50 -109
|
@@ -2,13 +2,12 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { Signal, InjectionToken, Provider, ViewContainerRef, Type, ComponentRef, Injector, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as _cngx_core_utils from '@cngx/core/utils';
|
|
4
4
|
import { CngxAsyncState } from '@cngx/core/utils';
|
|
5
|
+
import { CngxHotkeyScopeNode } from '@cngx/common/interactive';
|
|
5
6
|
import { Observable } from 'rxjs';
|
|
6
7
|
import * as _cngx_common_dialog from '@cngx/common/dialog';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Lifecycle states of a `CngxDialog`.
|
|
10
|
-
*
|
|
11
|
-
* @category common/dialog
|
|
12
11
|
*/
|
|
13
12
|
type DialogState = 'closed' | 'opening' | 'open' | 'closing';
|
|
14
13
|
/**
|
|
@@ -16,8 +15,6 @@ type DialogState = 'closed' | 'opening' | 'open' | 'closing';
|
|
|
16
15
|
*
|
|
17
16
|
* - **Outside** (parent template): access via `exportAs` - `#dlg="cngxDialog"`
|
|
18
17
|
* - **Inside** (dialog content): access via DI - `inject(DIALOG_REF)`
|
|
19
|
-
*
|
|
20
|
-
* @category common/dialog
|
|
21
18
|
*/
|
|
22
19
|
interface DialogRef<T = unknown> {
|
|
23
20
|
/** Current lifecycle state of the dialog. */
|
|
@@ -50,9 +47,8 @@ interface DialogRef<T = unknown> {
|
|
|
50
47
|
/**
|
|
51
48
|
* Injection token to access the nearest `DialogRef` from inside a dialog.
|
|
52
49
|
*
|
|
53
|
-
* @category common/dialog
|
|
54
50
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-ref.ts
|
|
55
|
-
* @since 0.
|
|
51
|
+
* @since 0.3.0
|
|
56
52
|
*/
|
|
57
53
|
declare const DIALOG_REF: InjectionToken<DialogRef<unknown>>;
|
|
58
54
|
|
|
@@ -63,6 +59,7 @@ declare const DIALOG_REF: InjectionToken<DialogRef<unknown>>;
|
|
|
63
59
|
* `id` feeds the dialog's `aria-labelledby` / `aria-describedby`
|
|
64
60
|
* derivation; `textContent` (title only) is read at announce time so the
|
|
65
61
|
* live region speaks the current DOM text, not a cached first read.
|
|
62
|
+
* @internal
|
|
66
63
|
*/
|
|
67
64
|
interface DialogLabelHandle {
|
|
68
65
|
/** Element id referenced from the dialog host's ARIA attributes. */
|
|
@@ -90,6 +87,7 @@ interface DialogLabelHandle {
|
|
|
90
87
|
* `DestroyRef.onDestroy`.
|
|
91
88
|
*
|
|
92
89
|
* Internal contract - intentionally not exported from `public-api.ts`.
|
|
90
|
+
* @internal
|
|
93
91
|
*/
|
|
94
92
|
interface CngxDialogAriaRegistry {
|
|
95
93
|
/** Register the labelling source for `aria-labelledby` and the open announce. */
|
|
@@ -160,22 +158,21 @@ interface CngxDialogAriaRegistry {
|
|
|
160
158
|
* </dialog>
|
|
161
159
|
* ```
|
|
162
160
|
*
|
|
163
|
-
* @category common/dialog
|
|
164
|
-
* @docsKind primary
|
|
165
161
|
* @wcag AA
|
|
166
162
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog.directive.ts
|
|
167
|
-
* @since 0.
|
|
163
|
+
* @since 0.3.0
|
|
168
164
|
* @relatedTo CngxBottomSheet, CngxDialogOpener, CngxDialogTitle, CngxDialogClose, CngxDialogDraggable
|
|
169
|
-
* <example-url
|
|
170
|
-
* <example-url
|
|
171
|
-
* <example-url
|
|
172
|
-
* <example-url
|
|
173
|
-
* <example-url
|
|
174
|
-
* <example-url
|
|
175
|
-
* <example-url
|
|
176
|
-
* <example-url
|
|
177
|
-
* <example-url
|
|
178
|
-
* <example-url
|
|
165
|
+
* <example-url>/#/common/dialog/alert-dialog</example-url>
|
|
166
|
+
* <example-url>/#/common/dialog/bottom-sheet</example-url>
|
|
167
|
+
* <example-url>/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
168
|
+
* <example-url>/#/common/dialog/draggable-dialog</example-url>
|
|
169
|
+
* <example-url>/#/common/dialog/fully-declarative</example-url>
|
|
170
|
+
* <example-url>/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
171
|
+
* <example-url>/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
172
|
+
* <example-url>/#/common/dialog/non-modal-panel</example-url>
|
|
173
|
+
* <example-url>/#/common/dialog/programmatic-control</example-url>
|
|
174
|
+
* <example-url>/#/common/dialog/template-directives</example-url>
|
|
175
|
+
* @axis level organism
|
|
179
176
|
*/
|
|
180
177
|
declare class CngxDialog<T = unknown> implements DialogRef<T>, CngxDialogAriaRegistry {
|
|
181
178
|
private readonly elRef;
|
|
@@ -224,7 +221,7 @@ declare class CngxDialog<T = unknown> implements DialogRef<T>, CngxDialogAriaReg
|
|
|
224
221
|
* Only applies to modal dialogs.
|
|
225
222
|
*
|
|
226
223
|
* - `'first-focusable'` -- focus the first `[autofocus]` element, or the
|
|
227
|
-
* first
|
|
224
|
+
* first element in DOM order matching `CNGX_FOCUSABLE_SELECTOR` (default)
|
|
228
225
|
* - `'none'` -- do not move focus
|
|
229
226
|
* - Any CSS selector string -- focus the first element matching the selector
|
|
230
227
|
*
|
|
@@ -327,6 +324,8 @@ declare class CngxDialog<T = unknown> implements DialogRef<T>, CngxDialogAriaReg
|
|
|
327
324
|
protected readonly ariaDescribedBy: Signal<string | null>;
|
|
328
325
|
protected readonly backdropOpacity: Signal<"0" | "1">;
|
|
329
326
|
private liveRegion;
|
|
327
|
+
/** The title text the open announcement reads; `''` when there is none. */
|
|
328
|
+
private currentTitleText;
|
|
330
329
|
/**
|
|
331
330
|
* The modal mode latched at `open()`. Everything that depends on how the
|
|
332
331
|
* dialog actually opened derives from this - scroll-lock release, stack
|
|
@@ -335,6 +334,12 @@ declare class CngxDialog<T = unknown> implements DialogRef<T>, CngxDialogAriaReg
|
|
|
335
334
|
* nor strand a rendered backdrop without its dismissal surface.
|
|
336
335
|
*/
|
|
337
336
|
private readonly openedAsModal;
|
|
337
|
+
/**
|
|
338
|
+
* @internal Hotkey scope of the dialog subtree: modal while opened as a
|
|
339
|
+
* modal, so app bindings outside stay quiet while focus is inside, and
|
|
340
|
+
* inactive while closed, so bindings inside never fire from a hidden dialog.
|
|
341
|
+
*/
|
|
342
|
+
readonly hotkeyScope: CngxHotkeyScopeNode;
|
|
338
343
|
constructor();
|
|
339
344
|
/**
|
|
340
345
|
* Register the labelling source for `aria-labelledby` and the open announce.
|
|
@@ -421,13 +426,6 @@ declare class CngxDialog<T = unknown> implements DialogRef<T>, CngxDialogAriaReg
|
|
|
421
426
|
private scrollLockRelease;
|
|
422
427
|
private acquireScrollLock;
|
|
423
428
|
private releaseScrollLock;
|
|
424
|
-
/**
|
|
425
|
-
* The registry is single-slot per kind, so a second live registration
|
|
426
|
-
* silently wins - surface the authoring error instead of letting the
|
|
427
|
-
* two open paths resolve different labelling.
|
|
428
|
-
*/
|
|
429
|
-
private warnDoubleRegistration;
|
|
430
|
-
private warnNonModalA11y;
|
|
431
429
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDialog<any>, never>;
|
|
432
430
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDialog<any>, "dialog[cngxDialog]", ["cngxDialog"], { "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "focusFallback": { "alias": "focusFallback"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "submitAction": { "alias": "submitAction"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, ["titleDirective", "descriptionDirective"], never, true, never>;
|
|
433
431
|
}
|
|
@@ -446,22 +444,20 @@ declare class CngxDialog<T = unknown> implements DialogRef<T>, CngxDialogAriaReg
|
|
|
446
444
|
* </dialog>
|
|
447
445
|
* ```
|
|
448
446
|
*
|
|
449
|
-
* @category common/dialog
|
|
450
|
-
* @docsKind primary
|
|
451
447
|
* @wcag AA
|
|
452
448
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-title.directive.ts
|
|
453
|
-
* @since 0.
|
|
449
|
+
* @since 0.3.0
|
|
454
450
|
* @relatedTo CngxDialog, CngxDialogDescription, CngxDialogClose
|
|
455
|
-
* <example-url
|
|
456
|
-
* <example-url
|
|
457
|
-
* <example-url
|
|
458
|
-
* <example-url
|
|
459
|
-
* <example-url
|
|
460
|
-
* <example-url
|
|
461
|
-
* <example-url
|
|
462
|
-
* <example-url
|
|
463
|
-
* <example-url
|
|
464
|
-
* <example-url
|
|
451
|
+
* <example-url>/#/common/dialog/alert-dialog</example-url>
|
|
452
|
+
* <example-url>/#/common/dialog/bottom-sheet</example-url>
|
|
453
|
+
* <example-url>/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
454
|
+
* <example-url>/#/common/dialog/draggable-dialog</example-url>
|
|
455
|
+
* <example-url>/#/common/dialog/fully-declarative</example-url>
|
|
456
|
+
* <example-url>/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
457
|
+
* <example-url>/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
458
|
+
* <example-url>/#/common/dialog/non-modal-panel</example-url>
|
|
459
|
+
* <example-url>/#/common/dialog/programmatic-control</example-url>
|
|
460
|
+
* <example-url>/#/common/dialog/template-directives</example-url>
|
|
465
461
|
*/
|
|
466
462
|
declare class CngxDialogTitle {
|
|
467
463
|
private readonly elRef;
|
|
@@ -505,22 +501,20 @@ declare class CngxDialogTitle {
|
|
|
505
501
|
* </dialog>
|
|
506
502
|
* ```
|
|
507
503
|
*
|
|
508
|
-
* @category common/dialog
|
|
509
|
-
* @docsKind primary
|
|
510
504
|
* @wcag AA
|
|
511
505
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-description.directive.ts
|
|
512
|
-
* @since 0.
|
|
506
|
+
* @since 0.3.0
|
|
513
507
|
* @relatedTo CngxDialog, CngxDialogTitle, CngxDialogClose
|
|
514
|
-
* <example-url
|
|
515
|
-
* <example-url
|
|
516
|
-
* <example-url
|
|
517
|
-
* <example-url
|
|
518
|
-
* <example-url
|
|
519
|
-
* <example-url
|
|
520
|
-
* <example-url
|
|
521
|
-
* <example-url
|
|
522
|
-
* <example-url
|
|
523
|
-
* <example-url
|
|
508
|
+
* <example-url>/#/common/dialog/alert-dialog</example-url>
|
|
509
|
+
* <example-url>/#/common/dialog/bottom-sheet</example-url>
|
|
510
|
+
* <example-url>/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
511
|
+
* <example-url>/#/common/dialog/draggable-dialog</example-url>
|
|
512
|
+
* <example-url>/#/common/dialog/fully-declarative</example-url>
|
|
513
|
+
* <example-url>/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
514
|
+
* <example-url>/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
515
|
+
* <example-url>/#/common/dialog/non-modal-panel</example-url>
|
|
516
|
+
* <example-url>/#/common/dialog/programmatic-control</example-url>
|
|
517
|
+
* <example-url>/#/common/dialog/template-directives</example-url>
|
|
524
518
|
*/
|
|
525
519
|
declare class CngxDialogDescription {
|
|
526
520
|
private readonly dialogRef;
|
|
@@ -557,22 +551,20 @@ declare class CngxDialogDescription {
|
|
|
557
551
|
* </dialog>
|
|
558
552
|
* ```
|
|
559
553
|
*
|
|
560
|
-
* @category common/dialog
|
|
561
|
-
* @docsKind primary
|
|
562
554
|
* @wcag AA
|
|
563
555
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-close.directive.ts
|
|
564
|
-
* @since 0.
|
|
556
|
+
* @since 0.3.0
|
|
565
557
|
* @relatedTo CngxDialog, CngxDialogTitle, CngxDialogDescription
|
|
566
|
-
* <example-url
|
|
567
|
-
* <example-url
|
|
568
|
-
* <example-url
|
|
569
|
-
* <example-url
|
|
570
|
-
* <example-url
|
|
571
|
-
* <example-url
|
|
572
|
-
* <example-url
|
|
573
|
-
* <example-url
|
|
574
|
-
* <example-url
|
|
575
|
-
* <example-url
|
|
558
|
+
* <example-url>/#/common/dialog/alert-dialog</example-url>
|
|
559
|
+
* <example-url>/#/common/dialog/bottom-sheet</example-url>
|
|
560
|
+
* <example-url>/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
561
|
+
* <example-url>/#/common/dialog/draggable-dialog</example-url>
|
|
562
|
+
* <example-url>/#/common/dialog/fully-declarative</example-url>
|
|
563
|
+
* <example-url>/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
564
|
+
* <example-url>/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
565
|
+
* <example-url>/#/common/dialog/non-modal-panel</example-url>
|
|
566
|
+
* <example-url>/#/common/dialog/programmatic-control</example-url>
|
|
567
|
+
* <example-url>/#/common/dialog/template-directives</example-url>
|
|
576
568
|
*/
|
|
577
569
|
declare class CngxDialogClose {
|
|
578
570
|
private readonly dialogRef;
|
|
@@ -616,20 +608,19 @@ declare class CngxDialogClose {
|
|
|
616
608
|
* its `::backdrop`. Each `CngxDialog` reads `isTopmost` from this service
|
|
617
609
|
* to control `--cngx-dialog-backdrop-opacity`.
|
|
618
610
|
*
|
|
619
|
-
* @category common/dialog
|
|
620
611
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-stack.ts
|
|
621
|
-
* @since 0.
|
|
612
|
+
* @since 0.3.0
|
|
622
613
|
* @relatedTo CngxDialog, CngxDialogOpener
|
|
623
|
-
* <example-url
|
|
624
|
-
* <example-url
|
|
625
|
-
* <example-url
|
|
626
|
-
* <example-url
|
|
627
|
-
* <example-url
|
|
628
|
-
* <example-url
|
|
629
|
-
* <example-url
|
|
630
|
-
* <example-url
|
|
631
|
-
* <example-url
|
|
632
|
-
* <example-url
|
|
614
|
+
* <example-url>/#/common/dialog/alert-dialog</example-url>
|
|
615
|
+
* <example-url>/#/common/dialog/bottom-sheet</example-url>
|
|
616
|
+
* <example-url>/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
617
|
+
* <example-url>/#/common/dialog/draggable-dialog</example-url>
|
|
618
|
+
* <example-url>/#/common/dialog/fully-declarative</example-url>
|
|
619
|
+
* <example-url>/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
620
|
+
* <example-url>/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
621
|
+
* <example-url>/#/common/dialog/non-modal-panel</example-url>
|
|
622
|
+
* <example-url>/#/common/dialog/programmatic-control</example-url>
|
|
623
|
+
* <example-url>/#/common/dialog/template-directives</example-url>
|
|
633
624
|
*/
|
|
634
625
|
declare class CngxDialogStack {
|
|
635
626
|
private readonly stackState;
|
|
@@ -657,17 +648,14 @@ declare class CngxDialogStack {
|
|
|
657
648
|
* })
|
|
658
649
|
* export class NestedDialogHost { }
|
|
659
650
|
* ```
|
|
660
|
-
*
|
|
661
|
-
* @category common/dialog
|
|
662
651
|
*/
|
|
663
652
|
declare function provideDialogStack(): Provider;
|
|
664
653
|
|
|
665
654
|
/**
|
|
666
655
|
* Injection token for data passed to a programmatically opened dialog via `CngxDialogOpener.open()`.
|
|
667
656
|
*
|
|
668
|
-
* @category common/dialog
|
|
669
657
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-config.ts
|
|
670
|
-
* @since 0.
|
|
658
|
+
* @since 0.3.0
|
|
671
659
|
*/
|
|
672
660
|
declare const CNGX_DIALOG_DATA: InjectionToken<unknown>;
|
|
673
661
|
/**
|
|
@@ -676,8 +664,6 @@ declare const CNGX_DIALOG_DATA: InjectionToken<unknown>;
|
|
|
676
664
|
* Mirrors the declarative `CngxDialog` input surface - everything a
|
|
677
665
|
* template-driven dialog can bind is also reachable through
|
|
678
666
|
* `CngxDialogOpener.open()`.
|
|
679
|
-
*
|
|
680
|
-
* @category common/dialog
|
|
681
667
|
*/
|
|
682
668
|
interface CngxDialogConfig<D = unknown, T = unknown> {
|
|
683
669
|
/** Data to inject via `CNGX_DIALOG_DATA` inside the dialog component. */
|
|
@@ -716,8 +702,7 @@ interface CngxDialogConfig<D = unknown, T = unknown> {
|
|
|
716
702
|
* the dialog family renders on its own behalf. {@link CngxDialogLabels} is
|
|
717
703
|
* this shape; it feeds the `labels` of `CNGX_DIALOG_DEFAULTS`.
|
|
718
704
|
*
|
|
719
|
-
* @
|
|
720
|
-
* @since 0.1.0
|
|
705
|
+
* @since 0.3.0
|
|
721
706
|
* @relatedTo CNGX_DIALOG_DEFAULTS
|
|
722
707
|
*/
|
|
723
708
|
interface CngxDialogLanguageSection {
|
|
@@ -736,8 +721,7 @@ interface CngxDialogLanguageSection {
|
|
|
736
721
|
* The English dialog section: the single source of the dialog family's
|
|
737
722
|
* English copy. The `CNGX_DIALOG_DEFAULTS` labels default to it.
|
|
738
723
|
*
|
|
739
|
-
* @
|
|
740
|
-
* @since 0.1.0
|
|
724
|
+
* @since 0.3.0
|
|
741
725
|
* @relatedTo CNGX_DIALOG_DEFAULTS
|
|
742
726
|
*/
|
|
743
727
|
declare const CNGX_DIALOG_LANGUAGE_EN: CngxDialogLanguageSection;
|
|
@@ -755,8 +739,6 @@ declare module '@cngx/core/i18n' {
|
|
|
755
739
|
* drag handle is labelled imperatively because the directive may promote any
|
|
756
740
|
* element to a handle. The same shape as the dialog section of a language
|
|
757
741
|
* pack, declared once as {@link CngxDialogLanguageSection}.
|
|
758
|
-
*
|
|
759
|
-
* @category common/dialog/config
|
|
760
742
|
*/
|
|
761
743
|
type CngxDialogLabels = CngxDialogLanguageSection;
|
|
762
744
|
/**
|
|
@@ -777,9 +759,8 @@ type CngxDialogLabels = CngxDialogLanguageSection;
|
|
|
777
759
|
* defaults are deliberately absent - no consumer has asked for them, and a key
|
|
778
760
|
* with no caller is configuration for its own sake.
|
|
779
761
|
*
|
|
780
|
-
* @category common/dialog/config
|
|
781
762
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/config/dialog-config.ts
|
|
782
|
-
* @since 0.
|
|
763
|
+
* @since 0.3.0
|
|
783
764
|
*/
|
|
784
765
|
interface CngxDialogDefaults {
|
|
785
766
|
readonly labels: CngxDialogLabels | Signal<CngxDialogLabels>;
|
|
@@ -790,18 +771,15 @@ interface CngxDialogDefaults {
|
|
|
790
771
|
* defaults, so a consumer who provides nothing keeps today's behaviour
|
|
791
772
|
* exactly.
|
|
792
773
|
*
|
|
793
|
-
* @category common/dialog/config
|
|
794
774
|
* @wcag AA
|
|
795
775
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/config/dialog-config.ts
|
|
796
|
-
* @since 0.
|
|
776
|
+
* @since 0.3.0
|
|
797
777
|
* @relatedTo CngxDialog, CngxDialogClose, CngxDialogDraggable
|
|
798
778
|
*/
|
|
799
779
|
declare const CNGX_DIALOG_DEFAULTS: InjectionToken<CngxDialogDefaults>;
|
|
800
780
|
/**
|
|
801
781
|
* Feature returned by a `with*` function - merged by
|
|
802
782
|
* {@link provideDialogConfig}.
|
|
803
|
-
*
|
|
804
|
-
* @category common/dialog/config
|
|
805
783
|
*/
|
|
806
784
|
interface CngxDialogConfigFeature {
|
|
807
785
|
/** @internal */
|
|
@@ -822,36 +800,32 @@ interface CngxDialogConfigFeature {
|
|
|
822
800
|
* });
|
|
823
801
|
* ```
|
|
824
802
|
*
|
|
825
|
-
* @category common/dialog/config
|
|
826
803
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/config/dialog-config.ts
|
|
827
|
-
* @since 0.
|
|
804
|
+
* @since 0.3.0
|
|
828
805
|
*/
|
|
829
806
|
declare function withDialogLabels(overrides: Partial<CngxDialogLabels> | Signal<Partial<CngxDialogLabels>>): CngxDialogConfigFeature;
|
|
830
807
|
/**
|
|
831
808
|
* Register app-wide dialog defaults composed from `with*` features, applied
|
|
832
809
|
* on top of the active language pack.
|
|
833
810
|
*
|
|
834
|
-
* @category common/dialog/config
|
|
835
811
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/config/dialog-config.ts
|
|
836
|
-
* @since 0.
|
|
812
|
+
* @since 0.3.0
|
|
837
813
|
*/
|
|
838
814
|
declare function provideDialogConfig(...features: CngxDialogConfigFeature[]): Provider[];
|
|
839
815
|
/**
|
|
840
816
|
* Sub-tree variant - use in `viewProviders` so the defaults only apply to
|
|
841
817
|
* dialogs opened from descendants of this component.
|
|
842
818
|
*
|
|
843
|
-
* @category common/dialog/config
|
|
844
819
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/config/dialog-config.ts
|
|
845
|
-
* @since 0.
|
|
820
|
+
* @since 0.3.0
|
|
846
821
|
*/
|
|
847
822
|
declare function provideDialogConfigAt(...features: CngxDialogConfigFeature[]): Provider[];
|
|
848
823
|
/**
|
|
849
824
|
* Inject the currently-resolved dialog defaults. Safe in any injection
|
|
850
825
|
* context; falls back to the English bundle when nothing is provided.
|
|
851
826
|
*
|
|
852
|
-
* @category common/dialog/config
|
|
853
827
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/config/dialog-config.ts
|
|
854
|
-
* @since 0.
|
|
828
|
+
* @since 0.3.0
|
|
855
829
|
*/
|
|
856
830
|
declare function injectDialogConfig(): CngxDialogDefaults;
|
|
857
831
|
|
|
@@ -901,9 +875,8 @@ declare class CngxDialogOutlet {
|
|
|
901
875
|
* });
|
|
902
876
|
* ```
|
|
903
877
|
*
|
|
904
|
-
* @category common/dialog
|
|
905
878
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog.service.ts
|
|
906
|
-
* @since 0.
|
|
879
|
+
* @since 0.3.0
|
|
907
880
|
* @relatedTo CngxDialogOpener, CngxDialog, CNGX_DIALOG_DATA
|
|
908
881
|
*/
|
|
909
882
|
declare class CngxDialogRef<T = unknown> {
|
|
@@ -1002,10 +975,8 @@ declare class CngxDialogRef<T = unknown> {
|
|
|
1002
975
|
* }
|
|
1003
976
|
* ```
|
|
1004
977
|
*
|
|
1005
|
-
* @category common/dialog
|
|
1006
|
-
* @docsKind primary
|
|
1007
978
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog.service.ts
|
|
1008
|
-
* @since 0.
|
|
979
|
+
* @since 0.3.0
|
|
1009
980
|
* @relatedTo CngxDialog, CngxDialogRef, CNGX_DIALOG_DATA, CngxDialogStack
|
|
1010
981
|
*/
|
|
1011
982
|
declare class CngxDialogOpener {
|
|
@@ -1045,6 +1016,7 @@ declare class CngxDialogOpener {
|
|
|
1045
1016
|
*/
|
|
1046
1017
|
closeAll(): void;
|
|
1047
1018
|
private cleanup;
|
|
1019
|
+
private discardOutlet;
|
|
1048
1020
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDialogOpener, never>;
|
|
1049
1021
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CngxDialogOpener>;
|
|
1050
1022
|
}
|
|
@@ -1059,8 +1031,6 @@ declare class CngxDialogOpener {
|
|
|
1059
1031
|
* providers: [provideDialog()],
|
|
1060
1032
|
* });
|
|
1061
1033
|
* ```
|
|
1062
|
-
*
|
|
1063
|
-
* @category common/dialog
|
|
1064
1034
|
*/
|
|
1065
1035
|
declare function provideDialog(): Provider[];
|
|
1066
1036
|
|
|
@@ -1092,12 +1062,11 @@ declare function provideDialog(): Provider[];
|
|
|
1092
1062
|
* </dialog>
|
|
1093
1063
|
* ```
|
|
1094
1064
|
*
|
|
1095
|
-
* @category common/dialog
|
|
1096
|
-
* @docsKind primary
|
|
1097
1065
|
* @wcag AA
|
|
1098
1066
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/bottom-sheet/bottom-sheet.directive.ts
|
|
1099
|
-
* @since 0.
|
|
1067
|
+
* @since 0.3.0
|
|
1100
1068
|
* @relatedTo CngxDialog, CngxSwipeDismiss, CngxDialogClose
|
|
1069
|
+
* @axis level organism
|
|
1101
1070
|
*/
|
|
1102
1071
|
declare class CngxBottomSheet {
|
|
1103
1072
|
private readonly dialogRef;
|
|
@@ -1147,22 +1116,20 @@ declare class CngxBottomSheet {
|
|
|
1147
1116
|
* }
|
|
1148
1117
|
* ```
|
|
1149
1118
|
*
|
|
1150
|
-
* @category common/dialog
|
|
1151
|
-
* @docsKind primary
|
|
1152
1119
|
* @wcag AA
|
|
1153
1120
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/draggable/dialog-draggable.directive.ts
|
|
1154
|
-
* @since 0.
|
|
1121
|
+
* @since 0.3.0
|
|
1155
1122
|
* @relatedTo CngxDialog, CngxBottomSheet
|
|
1156
|
-
* <example-url
|
|
1157
|
-
* <example-url
|
|
1158
|
-
* <example-url
|
|
1159
|
-
* <example-url
|
|
1160
|
-
* <example-url
|
|
1161
|
-
* <example-url
|
|
1162
|
-
* <example-url
|
|
1163
|
-
* <example-url
|
|
1164
|
-
* <example-url
|
|
1165
|
-
* <example-url
|
|
1123
|
+
* <example-url>/#/common/dialog/alert-dialog</example-url>
|
|
1124
|
+
* <example-url>/#/common/dialog/bottom-sheet</example-url>
|
|
1125
|
+
* <example-url>/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
1126
|
+
* <example-url>/#/common/dialog/draggable-dialog</example-url>
|
|
1127
|
+
* <example-url>/#/common/dialog/fully-declarative</example-url>
|
|
1128
|
+
* <example-url>/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
1129
|
+
* <example-url>/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
1130
|
+
* <example-url>/#/common/dialog/non-modal-panel</example-url>
|
|
1131
|
+
* <example-url>/#/common/dialog/programmatic-control</example-url>
|
|
1132
|
+
* <example-url>/#/common/dialog/template-directives</example-url>
|
|
1166
1133
|
*/
|
|
1167
1134
|
declare class CngxDialogDraggable {
|
|
1168
1135
|
private readonly elRef;
|