@cngx/common 0.1.0-rc.9 → 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 +19 -8
- package/data/README.md +10 -10
- package/fesm2022/cngx-common-a11y.mjs +701 -263
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +83 -64
- 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 +135 -76
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +749 -296
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +51 -29
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +695 -405
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +112 -112
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +668 -308
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +7066 -2739
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +2121 -492
- 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 +1207 -569
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +256 -261
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +202 -262
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +28 -61
- 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 +1 -1
- package/menu-button/README.md +234 -0
- package/package.json +14 -4
- package/popover/README.md +42 -5
- package/popover/tooltip-indicator.scss +52 -0
- package/schematics/ng-add/index.js +7 -7
- package/schematics/ng-add/schema.json +5 -0
- package/stepper/README.md +0 -1
- 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 +43 -11
- package/theming/components/cngx-popover.css +37 -13
- 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 +343 -120
- 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 +671 -384
- package/types/cngx-common-command.d.ts +44 -47
- package/types/cngx-common-data.d.ts +350 -342
- package/types/cngx-common-dialog.d.ts +91 -120
- package/types/cngx-common-display.d.ts +475 -300
- package/types/cngx-common-interactive.d.ts +4350 -1723
- package/types/cngx-common-layout.d.ts +1365 -286
- package/types/cngx-common-menu-button.d.ts +382 -0
- package/types/cngx-common-popover.d.ts +671 -289
- package/types/cngx-common-stepper.d.ts +217 -347
- package/types/cngx-common-tabs.d.ts +173 -386
- package/types/cngx-common-timeline.d.ts +25 -104
|
@@ -11,15 +11,11 @@ import { CngxDirection } from '@cngx/core';
|
|
|
11
11
|
/**
|
|
12
12
|
* Status enum for a single step. Driven by the presenter's commit-controller
|
|
13
13
|
* lifecycle plus the optional `errorAggregator`.
|
|
14
|
-
*
|
|
15
|
-
* @category common/stepper
|
|
16
14
|
*/
|
|
17
15
|
type CngxStepStatus = 'idle' | 'pending' | 'success' | 'error' | 'disabled' | 'busy';
|
|
18
16
|
/**
|
|
19
17
|
* Step-tree node. Either a terminal `step` (has its own panel) or a
|
|
20
18
|
* `group` carrying nested children. Discriminated by `kind`.
|
|
21
|
-
*
|
|
22
|
-
* @category common/stepper
|
|
23
19
|
*/
|
|
24
20
|
interface CngxStepNode {
|
|
25
21
|
readonly id: string;
|
|
@@ -69,8 +65,6 @@ interface CngxStepRegistration {
|
|
|
69
65
|
/**
|
|
70
66
|
* Contract atoms see via {@link CNGX_STEPPER_HOST}. Mirrors the
|
|
71
67
|
* directive's surface 1:1 - atoms never reach the concrete class.
|
|
72
|
-
*
|
|
73
|
-
* @category common/stepper
|
|
74
68
|
*/
|
|
75
69
|
interface CngxStepperHost {
|
|
76
70
|
readonly stepTree: Signal<readonly CngxStepNode[]>;
|
|
@@ -87,8 +81,6 @@ interface CngxStepperHost {
|
|
|
87
81
|
* invariant, and a local re-filter breaks the shape-stable
|
|
88
82
|
* short-circuit that downstream consumers rely on. Add lookup
|
|
89
83
|
* helpers as methods on this contract rather than re-deriving.
|
|
90
|
-
*
|
|
91
|
-
* @category common/stepper
|
|
92
84
|
*/
|
|
93
85
|
readonly stepsOnly: Signal<readonly CngxStepNode[]>;
|
|
94
86
|
/**
|
|
@@ -102,8 +94,6 @@ interface CngxStepperHost {
|
|
|
102
94
|
* projection, never re-derive it. Structural-equal via `flatStepsEqual`
|
|
103
95
|
* (each retained node keeps its `flatSteps` `flatIndex`), so a
|
|
104
96
|
* shape-stable re-emit short-circuits the strip render.
|
|
105
|
-
*
|
|
106
|
-
* @category common/stepper
|
|
107
97
|
*/
|
|
108
98
|
readonly visibleStripNodes: Signal<readonly CngxStepNode[]>;
|
|
109
99
|
readonly activeStepIndex: Signal<number>;
|
|
@@ -137,12 +127,20 @@ interface CngxStepperHost {
|
|
|
137
127
|
*/
|
|
138
128
|
readonly canGoNext: Signal<boolean>;
|
|
139
129
|
/**
|
|
140
|
-
* `true` while a commit is in flight
|
|
141
|
-
* 'pending'`)
|
|
142
|
-
*
|
|
143
|
-
*
|
|
130
|
+
* `true` while a commit or the finish run is in flight: the commit
|
|
131
|
+
* (`commitState.status() === 'pending'`) or any source registered
|
|
132
|
+
* through {@link registerBusy}. Drives the busy-disable on nav
|
|
133
|
+
* affordances. Keyed on the strict `'pending'` status, consistent
|
|
134
|
+
* with the per-step busy gate.
|
|
144
135
|
*/
|
|
145
136
|
readonly busy: Signal<boolean>;
|
|
137
|
+
/**
|
|
138
|
+
* Registers a run outside the commit (the `CngxStepperComplete`
|
|
139
|
+
* finish run) under `key`, so {@link busy} reads `true` while
|
|
140
|
+
* `pending()` does. Returns the release. Optional: a host without it
|
|
141
|
+
* reflects only its commit.
|
|
142
|
+
*/
|
|
143
|
+
registerBusy?(key: string, pending: Signal<boolean>): () => void;
|
|
146
144
|
/**
|
|
147
145
|
* Label of the step {@link selectNext} would land on, or `undefined`
|
|
148
146
|
* when none follows. Resolved through the enabled-step traversal so a
|
|
@@ -236,10 +234,9 @@ interface CngxStepperHost {
|
|
|
236
234
|
* Atoms inject `optional: true` and either register here or fall through
|
|
237
235
|
* {@link CNGX_STEP_GROUP_HOST} when nested in a group.
|
|
238
236
|
*
|
|
239
|
-
* @category common/stepper
|
|
240
237
|
* @wcag AA
|
|
241
238
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/stepper-host.token.ts
|
|
242
|
-
* @since 0.
|
|
239
|
+
* @since 0.3.0
|
|
243
240
|
*/
|
|
244
241
|
declare const CNGX_STEPPER_HOST: InjectionToken<CngxStepperHost>;
|
|
245
242
|
|
|
@@ -249,9 +246,8 @@ declare const CNGX_STEPPER_HOST: InjectionToken<CngxStepperHost>;
|
|
|
249
246
|
* The `Observable | Promise | sync` union matches every cngx
|
|
250
247
|
* commit-action signature.
|
|
251
248
|
*
|
|
252
|
-
* @category common/stepper
|
|
253
249
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/presenter.directive.ts
|
|
254
|
-
* @since 0.
|
|
250
|
+
* @since 0.3.0
|
|
255
251
|
*/
|
|
256
252
|
type CngxStepperCommitAction = (fromIndex: number, toIndex: number) => boolean | Promise<boolean> | Observable<boolean>;
|
|
257
253
|
/**
|
|
@@ -265,22 +261,46 @@ type CngxStepperCommitAction = (fromIndex: number, toIndex: number) => boolean |
|
|
|
265
261
|
* Sheriff: common Level 2. Pure directive - zero template, zero CSS.
|
|
266
262
|
* Level-4 organisms compose this via `hostDirectives`.
|
|
267
263
|
*
|
|
268
|
-
* @category common/stepper
|
|
269
|
-
* @docsKind primary
|
|
270
264
|
* @wcag AA
|
|
271
265
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/presenter.directive.ts
|
|
272
|
-
* @since 0.
|
|
266
|
+
* @since 0.3.0
|
|
273
267
|
* @relatedTo CngxStep, CngxStepGroup, CngxStepperRouterSync, CNGX_STEPPER_HOST, CNGX_STEPPER_CONFIG
|
|
274
|
-
* <example-url
|
|
268
|
+
* <example-url>/#/ui/stepper/stepper-commit-action/pessimistic-optimistic-commits-with-bridge-directives</example-url>
|
|
275
269
|
*/
|
|
276
270
|
declare class CngxStepperPresenter implements CngxStepperHost {
|
|
277
271
|
private readonly config;
|
|
272
|
+
/**
|
|
273
|
+
* Zero-based index of the active step among the steps only (group nodes do not count), two-way bindable
|
|
274
|
+
* as `[(activeStepIndex)]`. Defaults to `0`. The presenter writes it on navigation, so under a
|
|
275
|
+
* `commitAction` in `'pessimistic'` mode it changes only after the action resolves `true`; reads are
|
|
276
|
+
* clamped to the registered step count.
|
|
277
|
+
*/
|
|
278
278
|
readonly activeStepIndex: i0.ModelSignal<number>;
|
|
279
|
+
/**
|
|
280
|
+
* Binding `[linear]`: when `true`, moving forward is refused while any enabled step from the active
|
|
281
|
+
* one up to the target is not in the `'success'` state. Unset, it resolves through `defaultLinear` of the stepper config and then
|
|
282
|
+
* `false`.
|
|
283
|
+
*/
|
|
279
284
|
readonly linearInput: i0.InputSignal<boolean | undefined>;
|
|
280
285
|
readonly linear: Signal<boolean>;
|
|
286
|
+
/**
|
|
287
|
+
* Binding `[orientation]`: layout axis of the stepper, `'horizontal'` or `'vertical'`. Unset, it resolves
|
|
288
|
+
* through `defaultOrientation` of the stepper config and then `'horizontal'`. The organism mirrors the
|
|
289
|
+
* resolved value to `aria-orientation` and `data-orientation`.
|
|
290
|
+
*/
|
|
281
291
|
readonly orientationInput: i0.InputSignal<"horizontal" | "vertical" | undefined>;
|
|
282
292
|
readonly orientation: Signal<"horizontal" | "vertical">;
|
|
293
|
+
/**
|
|
294
|
+
* Async guard run before a step change: it receives the origin and target index and resolves `true` to
|
|
295
|
+
* advance or `false` to refuse. Defaults to `null`, which makes every `select` a synchronous move.
|
|
296
|
+
* Navigating back with `selectPrevious` bypasses it.
|
|
297
|
+
*/
|
|
283
298
|
readonly commitAction: i0.InputSignal<CngxStepperCommitAction | null>;
|
|
299
|
+
/**
|
|
300
|
+
* Binding `[commitMode]`: whether `activeStepIndex` moves to the target before the `commitAction` resolves
|
|
301
|
+
* (`'optimistic'`, rolled back on refusal or failure) or only after it resolves `true` (`'pessimistic'`).
|
|
302
|
+
* Unset, it resolves through `defaultCommitMode` of the stepper config and then `'pessimistic'`.
|
|
303
|
+
*/
|
|
284
304
|
readonly commitModeInput: i0.InputSignal<"optimistic" | "pessimistic" | undefined>;
|
|
285
305
|
readonly commitMode: Signal<"optimistic" | "pessimistic">;
|
|
286
306
|
private readonly genericFactory;
|
|
@@ -381,6 +401,7 @@ declare class CngxStepperPresenter implements CngxStepperHost {
|
|
|
381
401
|
readonly canGoNext: Signal<boolean>;
|
|
382
402
|
/** {@inheritDoc CngxStepperHost.canGoPrevious} */
|
|
383
403
|
readonly canGoPrevious: Signal<boolean>;
|
|
404
|
+
private readonly busySources;
|
|
384
405
|
/** {@inheritDoc CngxStepperHost.busy} */
|
|
385
406
|
readonly busy: Signal<boolean>;
|
|
386
407
|
/** {@inheritDoc CngxStepperHost.nextStepLabel} */
|
|
@@ -390,7 +411,20 @@ declare class CngxStepperPresenter implements CngxStepperHost {
|
|
|
390
411
|
constructor();
|
|
391
412
|
private readonly registry;
|
|
392
413
|
private readonly insertionOrder;
|
|
414
|
+
/**
|
|
415
|
+
* `CngxStepperHost` contract, called by `CngxStep` and `CngxStepGroup` in their `ngOnInit`, or by a
|
|
416
|
+
* `CngxStepGroup` on behalf of a nested child with its own id as `parentId`. Adds the node to the step
|
|
417
|
+
* tree in registration order; a second call with a known id replaces the stored handle and keeps its
|
|
418
|
+
* position. A group must register before its children.
|
|
419
|
+
*/
|
|
393
420
|
register(handle: CngxStepRegistration, parentId?: string | null): void;
|
|
421
|
+
/** {@inheritDoc CngxStepperHost.registerBusy} */
|
|
422
|
+
registerBusy(key: string, pending: Signal<boolean>): () => void;
|
|
423
|
+
/**
|
|
424
|
+
* `CngxStepperHost` contract, called from the destroy hook of `CngxStep` and `CngxStepGroup`. Removes the
|
|
425
|
+
* node from the step tree; when `handle` is passed and is no longer the stored one (it was replaced by a
|
|
426
|
+
* re-register), the call does nothing.
|
|
427
|
+
*/
|
|
394
428
|
unregister(id: string, handle?: CngxStepRegistration): void;
|
|
395
429
|
private rebuildTree;
|
|
396
430
|
/** {@inheritDoc CngxStepperHost.clearLastFailed} */
|
|
@@ -413,7 +447,16 @@ declare class CngxStepperPresenter implements CngxStepperHost {
|
|
|
413
447
|
* never the internal gate.
|
|
414
448
|
*/
|
|
415
449
|
canNavigateTo(index: number): boolean;
|
|
450
|
+
/**
|
|
451
|
+
* Moves to the step at the given step-only index, clamped to the registered range. Does nothing when the
|
|
452
|
+
* target is the active step, is disabled, or is blocked by `linear`. Without a `commitAction` the move is
|
|
453
|
+
* synchronous; with one, the move follows `commitMode`, and a newer call supersedes the pending one.
|
|
454
|
+
*/
|
|
416
455
|
select(index: number): void;
|
|
456
|
+
/**
|
|
457
|
+
* Moves to the next enabled step after the active one, through `select`. Does nothing when no enabled
|
|
458
|
+
* step follows; the `linear` gate and the `commitAction` apply as for any other forward move.
|
|
459
|
+
*/
|
|
417
460
|
selectNext(): void;
|
|
418
461
|
/**
|
|
419
462
|
* Ungated back-move. Supersedes an in-flight commit: the runner is
|
|
@@ -422,7 +465,15 @@ declare class CngxStepperPresenter implements CngxStepperHost {
|
|
|
422
465
|
* they explicitly returned to.
|
|
423
466
|
*/
|
|
424
467
|
selectPrevious(): void;
|
|
468
|
+
/**
|
|
469
|
+
* Moves to the step registered under the given id, through `select`. Group ids and unknown ids are
|
|
470
|
+
* ignored.
|
|
471
|
+
*/
|
|
425
472
|
selectById(id: string): void;
|
|
473
|
+
/**
|
|
474
|
+
* Returns to the first step without running the `commitAction`. Cancels a commit in flight and clears the
|
|
475
|
+
* origin, the rejection marker and the last outcome.
|
|
476
|
+
*/
|
|
426
477
|
reset(): void;
|
|
427
478
|
/**
|
|
428
479
|
* Cancels the in-flight commit and settles the state to idle. The
|
|
@@ -443,8 +494,6 @@ declare class CngxStepperPresenter implements CngxStepperHost {
|
|
|
443
494
|
*
|
|
444
495
|
* Surface is registration-only - `id` and `aggregatedStatus` are
|
|
445
496
|
* concrete-class details, not part of the token contract.
|
|
446
|
-
*
|
|
447
|
-
* @category common/stepper
|
|
448
497
|
*/
|
|
449
498
|
interface CngxStepGroupHost {
|
|
450
499
|
register(handle: CngxStepRegistration): void;
|
|
@@ -455,9 +504,8 @@ interface CngxStepGroupHost {
|
|
|
455
504
|
* DI token providing a `CngxStepGroup`'s contract to nested `CngxStep` atoms.
|
|
456
505
|
* Steps inject this `optional: true` and fall back to {@link CNGX_STEPPER_HOST}.
|
|
457
506
|
*
|
|
458
|
-
* @category common/stepper
|
|
459
507
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/step-group-host.token.ts
|
|
460
|
-
* @since 0.
|
|
508
|
+
* @since 0.3.0
|
|
461
509
|
*/
|
|
462
510
|
declare const CNGX_STEP_GROUP_HOST: InjectionToken<CngxStepGroupHost>;
|
|
463
511
|
|
|
@@ -469,8 +517,6 @@ declare const CNGX_STEP_GROUP_HOST: InjectionToken<CngxStepGroupHost>;
|
|
|
469
517
|
* `active` reflects `presenter.activeStepId`; `busy` mirrors
|
|
470
518
|
* `presenter.intendedStepIndex` matching this step; `disabled` reads
|
|
471
519
|
* `node.disabled()`.
|
|
472
|
-
*
|
|
473
|
-
* @category common/stepper
|
|
474
520
|
*/
|
|
475
521
|
interface CngxStepLabelContext {
|
|
476
522
|
readonly node: CngxStepNode;
|
|
@@ -483,8 +529,6 @@ interface CngxStepLabelContext {
|
|
|
483
529
|
* Context delivered to `*cngxStepContent` templates. Mirrors
|
|
484
530
|
* {@link CngxStepLabelContext} - content templates need the same
|
|
485
531
|
* derivations to gate inner controls on `disabled` / `busy`.
|
|
486
|
-
*
|
|
487
|
-
* @category common/stepper
|
|
488
532
|
*/
|
|
489
533
|
interface CngxStepContentContext {
|
|
490
534
|
readonly node: CngxStepNode;
|
|
@@ -498,8 +542,6 @@ interface CngxStepContentContext {
|
|
|
498
542
|
* consume to render the panel body. Narrower than the presenter's
|
|
499
543
|
* full interface - just enough to project label / content templates
|
|
500
544
|
* and react to active-step changes.
|
|
501
|
-
*
|
|
502
|
-
* @category common/stepper
|
|
503
545
|
*/
|
|
504
546
|
interface CngxStepPanelHost {
|
|
505
547
|
readonly flatSteps: Signal<readonly CngxStepNode[]>;
|
|
@@ -514,9 +556,8 @@ interface CngxStepPanelHost {
|
|
|
514
556
|
* DI token providing the rendering-surface contract to organism shells
|
|
515
557
|
* (`<cngx-stepper>`, `<cngx-mat-stepper>`) and consumer-authored skins.
|
|
516
558
|
*
|
|
517
|
-
* @category common/stepper
|
|
518
559
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/step-panel-host.token.ts
|
|
519
|
-
* @since 0.
|
|
560
|
+
* @since 0.3.0
|
|
520
561
|
*/
|
|
521
562
|
declare const CNGX_STEP_PANEL_HOST: InjectionToken<CngxStepPanelHost>;
|
|
522
563
|
|
|
@@ -530,8 +571,6 @@ declare const CNGX_STEP_PANEL_HOST: InjectionToken<CngxStepPanelHost>;
|
|
|
530
571
|
* @internal Exported from `public-api.ts` so the cngx-stepper and
|
|
531
572
|
* cngx-mat-stepper organisms share the comparator across the
|
|
532
573
|
* secondary-entry boundary (Sheriff forbids deep-relative imports).
|
|
533
|
-
*
|
|
534
|
-
* @category common/stepper
|
|
535
574
|
*/
|
|
536
575
|
declare function flatStepsEqual(a: readonly CngxStepNode[], b: readonly CngxStepNode[]): boolean;
|
|
537
576
|
|
|
@@ -547,12 +586,11 @@ declare function flatStepsEqual(a: readonly CngxStepNode[], b: readonly CngxStep
|
|
|
547
586
|
* </ng-template>
|
|
548
587
|
* ```
|
|
549
588
|
*
|
|
550
|
-
* @category common/stepper
|
|
551
589
|
* @wcag AA
|
|
552
590
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/step-content.directive.ts
|
|
553
|
-
* @since 0.
|
|
591
|
+
* @since 0.3.0
|
|
554
592
|
* @relatedTo CngxStep, CngxStepLabel
|
|
555
|
-
* <example-url
|
|
593
|
+
* <example-url>/#/ui/stepper/stepper-step-content/typed-lazy-panels</example-url>
|
|
556
594
|
*/
|
|
557
595
|
declare class CngxStepContent {
|
|
558
596
|
readonly templateRef: TemplateRef<CngxStepContentContext>;
|
|
@@ -572,12 +610,11 @@ declare class CngxStepContent {
|
|
|
572
610
|
* </ng-template>
|
|
573
611
|
* ```
|
|
574
612
|
*
|
|
575
|
-
* @category common/stepper
|
|
576
613
|
* @wcag AA
|
|
577
614
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/step-label.directive.ts
|
|
578
|
-
* @since 0.
|
|
615
|
+
* @since 0.3.0
|
|
579
616
|
* @relatedTo CngxStep, CngxStepContent, CngxStepGroupHeader
|
|
580
|
-
* <example-url
|
|
617
|
+
* <example-url>/#/ui/stepper/stepper-custom-labels/mixing-code-label-code-input-with-code-cngxsteplabel-code-slot</example-url>
|
|
581
618
|
*/
|
|
582
619
|
declare class CngxStepLabel {
|
|
583
620
|
readonly templateRef: TemplateRef<CngxStepLabelContext>;
|
|
@@ -593,21 +630,42 @@ declare class CngxStepLabel {
|
|
|
593
630
|
* `state` is a pure `computed` over `[disabled]`, `[completed]`, and
|
|
594
631
|
* the optional `[errorAggregator]`'s `hasError()`.
|
|
595
632
|
*
|
|
596
|
-
* @category common/stepper
|
|
597
|
-
* @docsKind primary
|
|
598
633
|
* @wcag AA
|
|
599
634
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/step.directive.ts
|
|
600
|
-
* @since 0.
|
|
635
|
+
* @since 0.3.0
|
|
601
636
|
* @relatedTo CngxStepGroup, CngxStepperPresenter, CngxStepLabel, CngxStepContent
|
|
602
637
|
* @slot cngxStepLabel The step's own header label.
|
|
603
638
|
* @slot cngxStepContent The step body, rendered lazily when the step activates.
|
|
604
|
-
* <example-url
|
|
639
|
+
* <example-url>/#/ui/stepper/stepper-step-content/typed-lazy-panels</example-url>
|
|
640
|
+
* @axis level molecule
|
|
605
641
|
*/
|
|
606
642
|
declare class CngxStep implements OnInit {
|
|
643
|
+
/**
|
|
644
|
+
* Identifier the step registers under with its host. Defaults to an auto-generated `cngx-step` uid.
|
|
645
|
+
* It is read once in `ngOnInit`, so a bound `[id]` must be set before init; the router-sync deep link
|
|
646
|
+
* and `selectById` match against this value.
|
|
647
|
+
*/
|
|
607
648
|
readonly id: i0.InputSignal<string>;
|
|
649
|
+
/**
|
|
650
|
+
* Marks the step as not navigable. Defaults to `false`. A disabled step reports `state` `'disabled'`,
|
|
651
|
+
* is skipped by next/previous navigation and refused by `select`, and the strip header reflects it
|
|
652
|
+
* through `aria-disabled`.
|
|
653
|
+
*/
|
|
608
654
|
readonly disabled: i0.InputSignal<boolean>;
|
|
655
|
+
/**
|
|
656
|
+
* Marks the step as done. Defaults to `false`. A completed step reports `state` `'success'` unless it is
|
|
657
|
+
* disabled or errored, and a `linear` stepper only lets the user move past steps that are in that state.
|
|
658
|
+
*/
|
|
609
659
|
readonly completed: i0.InputSignal<boolean>;
|
|
660
|
+
/**
|
|
661
|
+
* Header text of the step, shown in the strip and used for the next/previous step labels and the
|
|
662
|
+
* announcement phrases. Defaults to an empty string.
|
|
663
|
+
*/
|
|
610
664
|
readonly label: i0.InputSignal<string>;
|
|
665
|
+
/**
|
|
666
|
+
* Optional error aggregator whose `hasError()` puts the step into the `'error'` state, for forms with
|
|
667
|
+
* several error sources. Defaults to `undefined`. It composes with `[error]`: either one errors the step.
|
|
668
|
+
*/
|
|
611
669
|
readonly errorAggregator: i0.InputSignal<CngxErrorAggregatorContract | undefined>;
|
|
612
670
|
/**
|
|
613
671
|
* Direct error flag for the common "this step is invalid" case - no
|
|
@@ -649,19 +707,29 @@ declare class CngxStep implements OnInit {
|
|
|
649
707
|
* `success` if all are success, `pending` if any is pending or busy,
|
|
650
708
|
* otherwise `idle`.
|
|
651
709
|
*
|
|
652
|
-
* @category common/stepper
|
|
653
|
-
* @docsKind primary
|
|
654
710
|
* @wcag AA
|
|
655
711
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/step-group.directive.ts
|
|
656
|
-
* @since 0.
|
|
712
|
+
* @since 0.3.0
|
|
657
713
|
* @relatedTo CngxStep, CngxStepperPresenter, CngxStepGroupHeader
|
|
658
|
-
* <example-url
|
|
659
|
-
* <example-url
|
|
660
|
-
* <example-url
|
|
714
|
+
* <example-url>/#/ui/stepper/stepper-hierarchical/group-nested-steps-trailing-root-step</example-url>
|
|
715
|
+
* <example-url>/#/ui/stepper/stepper-hierarchical/expand-active-group-collapse</example-url>
|
|
716
|
+
* <example-url>/#/ui/stepper/stepper-hierarchical/group-collapse-summary-count</example-url>
|
|
661
717
|
*/
|
|
662
718
|
declare class CngxStepGroup implements CngxStepGroupHost, OnInit {
|
|
719
|
+
/**
|
|
720
|
+
* Identifier the group registers under with the root presenter. Defaults to an auto-generated
|
|
721
|
+
* `cngx-step-group` uid. It is read once in `ngOnInit`, so a bound `[id]` must be set before init;
|
|
722
|
+
* child steps are registered with this id as their parent.
|
|
723
|
+
*/
|
|
663
724
|
readonly id: i0.InputSignal<string>;
|
|
725
|
+
/**
|
|
726
|
+
* Disabled flag of the group node in the step tree. Defaults to `false`. It does not disable the child
|
|
727
|
+
* steps, which keep their own `[disabled]`.
|
|
728
|
+
*/
|
|
664
729
|
readonly disabled: i0.InputSignal<boolean>;
|
|
730
|
+
/**
|
|
731
|
+
* Header text of the group, rendered as the group label in the stepper strip. Defaults to an empty string.
|
|
732
|
+
*/
|
|
665
733
|
readonly label: i0.InputSignal<string>;
|
|
666
734
|
private readonly config;
|
|
667
735
|
private readonly childRegistry;
|
|
@@ -685,7 +753,17 @@ declare class CngxStepGroup implements CngxStepGroupHost, OnInit {
|
|
|
685
753
|
readonly isCollapsed: Signal<boolean>;
|
|
686
754
|
constructor();
|
|
687
755
|
ngOnInit(): void;
|
|
756
|
+
/**
|
|
757
|
+
* `CngxStepGroupHost` contract, called by a nested `CngxStep` (or a nested `CngxStepGroup`) in its
|
|
758
|
+
* `ngOnInit`. Adds the handle to the group's own registry, which feeds `aggregatedStatus`, and forwards
|
|
759
|
+
* it to the root presenter with this group's id as parent.
|
|
760
|
+
*/
|
|
688
761
|
register(handle: CngxStepRegistration): void;
|
|
762
|
+
/**
|
|
763
|
+
* `CngxStepGroupHost` contract, called from the destroy hook of a nested `CngxStep` or
|
|
764
|
+
* `CngxStepGroup`. Removes the registration from the group's registry and from the root presenter; when
|
|
765
|
+
* `handle` is passed, only that exact instance is evicted.
|
|
766
|
+
*/
|
|
689
767
|
unregister(id: string, handle?: CngxStepRegistration): void;
|
|
690
768
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxStepGroup, never>;
|
|
691
769
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxStepGroup, "[cngxStepGroup]", ["cngxStepGroup"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -700,8 +778,6 @@ declare class CngxStepGroup implements CngxStepGroupHost, OnInit {
|
|
|
700
778
|
* `status` mirrors `node.state()`. `busy` is the presenter-derived
|
|
701
779
|
* "this step is the in-flight commit target" flag - independent of
|
|
702
780
|
* `status === 'pending'` (which is the aggregate landmark state).
|
|
703
|
-
*
|
|
704
|
-
* @category common/stepper/slots
|
|
705
781
|
*/
|
|
706
782
|
interface CngxStepIndicatorContext {
|
|
707
783
|
/** Convenience alias for `position` - usable as `let-position` shorthand. */
|
|
@@ -737,13 +813,12 @@ interface CngxStepIndicatorContext {
|
|
|
737
813
|
* </cngx-stepper>
|
|
738
814
|
* ```
|
|
739
815
|
*
|
|
740
|
-
* @category common/stepper/slots
|
|
741
816
|
* @wcag AA
|
|
742
817
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/slots/step-indicator.directive.ts
|
|
743
|
-
* @since 0.
|
|
818
|
+
* @since 0.3.0
|
|
744
819
|
* @relatedTo CngxStepBadge, CngxStepBusySpinner, CngxStepRejection, CngxStepGroupHeader
|
|
745
|
-
* <example-url
|
|
746
|
-
* <example-url
|
|
820
|
+
* <example-url>/#/ui/stepper/stepper-slot-overrides/custom-indicator-glyph-via-code-cngxstepindicator-code</example-url>
|
|
821
|
+
* <example-url>/#/ui/stepper/stepper-slot-overrides/cross-skin-indicator-override</example-url>
|
|
747
822
|
*/
|
|
748
823
|
declare class CngxStepIndicator {
|
|
749
824
|
readonly templateRef: TemplateRef<CngxStepIndicatorContext>;
|
|
@@ -756,8 +831,6 @@ declare class CngxStepIndicator {
|
|
|
756
831
|
* badge inside a step button when `errorAggregator?.shouldShow()` is
|
|
757
832
|
* truthy. Consumers swap the built-in `'!'` glyph for a counter pill
|
|
758
833
|
* or branded marker; the visibility gate stays library-owned.
|
|
759
|
-
*
|
|
760
|
-
* @category common/stepper/slots
|
|
761
834
|
*/
|
|
762
835
|
interface CngxStepBadgeContext {
|
|
763
836
|
/** Aggregated error count for this step (≥ 1 when shown). */
|
|
@@ -769,7 +842,7 @@ interface CngxStepBadgeContext {
|
|
|
769
842
|
* Slot directive for the error-badge template on `<cngx-stepper>`.
|
|
770
843
|
* Discovered via `contentChild`; cascades through
|
|
771
844
|
* `CNGX_STEPPER_CONFIG.templates.badge` before falling back to
|
|
772
|
-
* `
|
|
845
|
+
* the default alert icon (`CNGX_ICON_ALERT` from `@cngx/utils`).
|
|
773
846
|
*
|
|
774
847
|
* ```html
|
|
775
848
|
* <cngx-stepper>
|
|
@@ -779,13 +852,12 @@ interface CngxStepBadgeContext {
|
|
|
779
852
|
* </cngx-stepper>
|
|
780
853
|
* ```
|
|
781
854
|
*
|
|
782
|
-
* @category common/stepper/slots
|
|
783
855
|
* @wcag AA
|
|
784
856
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/slots/step-badge.directive.ts
|
|
785
|
-
* @since 0.
|
|
857
|
+
* @since 0.3.0
|
|
786
858
|
* @relatedTo CngxStepIndicator, CngxStepBusySpinner, CngxStepRejection
|
|
787
|
-
* <example-url
|
|
788
|
-
* <example-url
|
|
859
|
+
* <example-url>/#/ui/stepper/stepper-slot-overrides/custom-error-badge-via-code-cngxstepbadge-code</example-url>
|
|
860
|
+
* <example-url>/#/ui/stepper/stepper-error-aggregation/per-step-error-badges</example-url>
|
|
789
861
|
*/
|
|
790
862
|
declare class CngxStepBadge {
|
|
791
863
|
readonly templateRef: TemplateRef<CngxStepBadgeContext>;
|
|
@@ -798,8 +870,6 @@ declare class CngxStepBadge {
|
|
|
798
870
|
* pending-commit overlay on the in-flight target step. Renders only
|
|
799
871
|
* when the step matches `presenter.intendedStepIndex()` with
|
|
800
872
|
* `commitState.status() === 'pending'`.
|
|
801
|
-
*
|
|
802
|
-
* @category common/stepper/slots
|
|
803
873
|
*/
|
|
804
874
|
interface CngxStepBusySpinnerContext {
|
|
805
875
|
/** The step node carrying id / label / state signals. */
|
|
@@ -819,12 +889,11 @@ interface CngxStepBusySpinnerContext {
|
|
|
819
889
|
* </cngx-stepper>
|
|
820
890
|
* ```
|
|
821
891
|
*
|
|
822
|
-
* @category common/stepper/slots
|
|
823
892
|
* @wcag AA
|
|
824
893
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/slots/step-busy-spinner.directive.ts
|
|
825
|
-
* @since 0.
|
|
894
|
+
* @since 0.3.0
|
|
826
895
|
* @relatedTo CngxStepIndicator, CngxStepBadge, CngxStepRejection
|
|
827
|
-
* <example-url
|
|
896
|
+
* <example-url>/#/ui/stepper/stepper-slot-overrides/custom-busy-spinner-via-code-cngxstepbusyspinner-code</example-url>
|
|
828
897
|
*/
|
|
829
898
|
declare class CngxStepBusySpinner {
|
|
830
899
|
readonly templateRef: TemplateRef<CngxStepBusySpinnerContext>;
|
|
@@ -846,8 +915,6 @@ declare class CngxStepBusySpinner {
|
|
|
846
915
|
* `presenter.originIndexDuringCommit()`. May be `undefined` when the
|
|
847
916
|
* origin index is out of range (synchronous-rejection edge case);
|
|
848
917
|
* gate richer UI on its presence.
|
|
849
|
-
*
|
|
850
|
-
* @category common/stepper/slots
|
|
851
918
|
*/
|
|
852
919
|
interface CngxStepRejectionContext {
|
|
853
920
|
/** Flat-index of the rejected step (`presenter.lastFailedIndex()`). */
|
|
@@ -863,7 +930,8 @@ interface CngxStepRejectionContext {
|
|
|
863
930
|
* Slot directive for the rejection-decoration template on
|
|
864
931
|
* `<cngx-stepper>`. Discovered via `contentChild`; cascades through
|
|
865
932
|
* `CNGX_STEPPER_CONFIG.templates.rejection` before falling back to
|
|
866
|
-
* `
|
|
933
|
+
* the default icon (`CNGX_ICON_ALERT` on a failed commit, `CNGX_ICON_BAN` on
|
|
934
|
+
* a refused one, from `@cngx/utils`).
|
|
867
935
|
*
|
|
868
936
|
* Symmetric context shape with the upcoming tabs `cngxTabRejectionIcon`
|
|
869
937
|
* slot so consumer templates port directly between the two families.
|
|
@@ -879,12 +947,11 @@ interface CngxStepRejectionContext {
|
|
|
879
947
|
* </cngx-stepper>
|
|
880
948
|
* ```
|
|
881
949
|
*
|
|
882
|
-
* @category common/stepper/slots
|
|
883
950
|
* @wcag AA
|
|
884
951
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/slots/step-rejection.directive.ts
|
|
885
|
-
* @since 0.
|
|
952
|
+
* @since 0.3.0
|
|
886
953
|
* @relatedTo CngxStepBadge, CngxStepIndicator, CngxStepBusySpinner
|
|
887
|
-
* <example-url
|
|
954
|
+
* <example-url>/#/ui/stepper/stepper-slot-overrides/rejection-decoration-via-code-cngxsteprejection-code</example-url>
|
|
888
955
|
*/
|
|
889
956
|
declare class CngxStepRejection {
|
|
890
957
|
readonly templateRef: TemplateRef<CngxStepRejectionContext>;
|
|
@@ -904,8 +971,6 @@ declare class CngxStepRejection {
|
|
|
904
971
|
* that renders `{{ message }}` always shows a non-empty reason.
|
|
905
972
|
* `errorLabels` / `announcement` expose the richer aggregator surface
|
|
906
973
|
* for consumers that want a list or the full SR phrase.
|
|
907
|
-
*
|
|
908
|
-
* @category common/stepper/slots
|
|
909
974
|
*/
|
|
910
975
|
interface CngxStepErrorContext {
|
|
911
976
|
/** The errored step node carrying id / label / state signals. */
|
|
@@ -939,10 +1004,9 @@ interface CngxStepErrorContext {
|
|
|
939
1004
|
* </cngx-stepper>
|
|
940
1005
|
* ```
|
|
941
1006
|
*
|
|
942
|
-
* @category common/stepper/slots
|
|
943
1007
|
* @wcag AA
|
|
944
1008
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/slots/step-error.directive.ts
|
|
945
|
-
* @since 0.
|
|
1009
|
+
* @since 0.3.0
|
|
946
1010
|
* @relatedTo CngxStepRejection, CngxStepBadge, CngxStep
|
|
947
1011
|
*/
|
|
948
1012
|
declare class CngxStepError {
|
|
@@ -960,8 +1024,6 @@ declare class CngxStepError {
|
|
|
960
1024
|
* `kind === 'group'` (the slot only fires for group nodes).
|
|
961
1025
|
* `expanded` is reserved for future collapsible groups - passed `true`
|
|
962
1026
|
* today; declaring it now avoids a breaking change later.
|
|
963
|
-
*
|
|
964
|
-
* @category common/stepper/slots
|
|
965
1027
|
*/
|
|
966
1028
|
interface CngxStepGroupHeaderContext {
|
|
967
1029
|
/** The group node carrying id / label / state / children signals. */
|
|
@@ -985,12 +1047,11 @@ interface CngxStepGroupHeaderContext {
|
|
|
985
1047
|
* </cngx-stepper>
|
|
986
1048
|
* ```
|
|
987
1049
|
*
|
|
988
|
-
* @category common/stepper/slots
|
|
989
1050
|
* @wcag AA
|
|
990
1051
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/slots/step-group-header.directive.ts
|
|
991
|
-
* @since 0.
|
|
1052
|
+
* @since 0.3.0
|
|
992
1053
|
* @relatedTo CngxStepGroup, CngxStepIndicator, CngxStepLabel
|
|
993
|
-
* <example-url
|
|
1054
|
+
* <example-url>/#/ui/stepper/stepper-slot-overrides/custom-group-header-via-code-cngxstepgroupheader-code</example-url>
|
|
994
1055
|
*/
|
|
995
1056
|
declare class CngxStepGroupHeader {
|
|
996
1057
|
readonly templateRef: TemplateRef<CngxStepGroupHeaderContext>;
|
|
@@ -1016,12 +1077,11 @@ declare class CngxStepGroupHeader {
|
|
|
1016
1077
|
* </cngx-stepper>
|
|
1017
1078
|
* ```
|
|
1018
1079
|
*
|
|
1019
|
-
* @category common/stepper/slots
|
|
1020
1080
|
* @wcag AA
|
|
1021
1081
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/slots/stepper-empty.directive.ts
|
|
1022
|
-
* @since 0.
|
|
1082
|
+
* @since 0.3.0
|
|
1023
1083
|
* @relatedTo CngxStepIndicator, CngxStepGroupHeader
|
|
1024
|
-
* <example-url
|
|
1084
|
+
* <example-url>/#/ui/stepper/stepper-slot-overrides/empty-state-placeholder-via-code-cngxstepperempty-code</example-url>
|
|
1025
1085
|
*/
|
|
1026
1086
|
declare class CngxStepperEmpty {
|
|
1027
1087
|
readonly templateRef: TemplateRef<void>;
|
|
@@ -1040,8 +1100,6 @@ declare class CngxStepperEmpty {
|
|
|
1040
1100
|
* Smaller than {@link CngxStepIndicatorContext} on purpose - the dot
|
|
1041
1101
|
* stepper does not surface step status/busy state visually, so the
|
|
1042
1102
|
* context strips to the four fields a consumer actually needs.
|
|
1043
|
-
*
|
|
1044
|
-
* @category common/stepper/slots
|
|
1045
1103
|
*/
|
|
1046
1104
|
interface CngxDotStepperDotContext {
|
|
1047
1105
|
/** Convenience alias for `index` - usable as `let-index` shorthand. */
|
|
@@ -1076,12 +1134,11 @@ interface CngxDotStepperDotContext {
|
|
|
1076
1134
|
* </cngx-dot-stepper>
|
|
1077
1135
|
* ```
|
|
1078
1136
|
*
|
|
1079
|
-
* @category common/stepper/slots
|
|
1080
1137
|
* @wcag AA
|
|
1081
1138
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/slots/dot-stepper-dot.directive.ts
|
|
1082
|
-
* @since 0.
|
|
1139
|
+
* @since 0.3.0
|
|
1083
1140
|
* @relatedTo CngxStepIndicator, CngxStepBadge, CngxStepBusySpinner, CngxStepRejection
|
|
1084
|
-
* <example-url
|
|
1141
|
+
* <example-url>/#/ui/stepper/dot-stepper/icon-dots-via-code-cngxdotstepperdot-code</example-url>
|
|
1085
1142
|
*/
|
|
1086
1143
|
declare class CngxDotStepperDot {
|
|
1087
1144
|
readonly templateRef: TemplateRef<CngxDotStepperDotContext>;
|
|
@@ -1089,24 +1146,9 @@ declare class CngxDotStepperDot {
|
|
|
1089
1146
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxDotStepperDot, "ng-template[cngxDotStepperDot]", ["cngxDotStepperDot"], {}, {}, never, never, true, never>;
|
|
1090
1147
|
}
|
|
1091
1148
|
|
|
1092
|
-
/**
|
|
1093
|
-
* Aria-label overrides for the stepper landmark region. Library
|
|
1094
|
-
* defaults are English; locales come from consumer overrides.
|
|
1095
|
-
*
|
|
1096
|
-
* Per-step navigation labels (`previousStep`, `nextStep`) live in
|
|
1097
|
-
* {@link CngxStepperI18n} - SR phrasing, not landmark naming.
|
|
1098
|
-
* Splitting the surfaces avoids a dual-override path for the same string.
|
|
1099
|
-
*
|
|
1100
|
-
* @category common/stepper
|
|
1101
|
-
*/
|
|
1102
|
-
interface CngxStepperAriaLabels {
|
|
1103
|
-
readonly stepperRegion?: string;
|
|
1104
|
-
}
|
|
1105
1149
|
/**
|
|
1106
1150
|
* Fallback labels for derived strings (group descriptors, badge SR
|
|
1107
1151
|
* announcements). English defaults; consumer overrides per locale.
|
|
1108
|
-
*
|
|
1109
|
-
* @category common/stepper
|
|
1110
1152
|
*/
|
|
1111
1153
|
interface CngxStepperFallbackLabels {
|
|
1112
1154
|
readonly groupRoleDescription?: string;
|
|
@@ -1116,8 +1158,6 @@ interface CngxStepperFallbackLabels {
|
|
|
1116
1158
|
* Per-slot template overrides for `<cngx-stepper>`. Middle tier of
|
|
1117
1159
|
* the 3-stage cascade: per-instance directive > this field > built-in
|
|
1118
1160
|
* markup. Apply via the `with*Template` feature builders below.
|
|
1119
|
-
*
|
|
1120
|
-
* @category common/stepper
|
|
1121
1161
|
*/
|
|
1122
1162
|
interface CngxStepperTemplates {
|
|
1123
1163
|
readonly indicator?: TemplateRef<CngxStepIndicatorContext>;
|
|
@@ -1135,8 +1175,6 @@ interface CngxStepperTemplates {
|
|
|
1135
1175
|
* slots, same ARIA, same keyboard behaviour, and only redirects CSS via
|
|
1136
1176
|
* the `[data-skin]` host attribute. The Material twin
|
|
1137
1177
|
* (`<cngx-mat-stepper>`) ignores this setting.
|
|
1138
|
-
*
|
|
1139
|
-
* @category common/stepper
|
|
1140
1178
|
*/
|
|
1141
1179
|
type CngxStepperSkin = 'classic' | 'linear-minimal' | 'stripe-status-rich' | 'path-chevron' | 'pill-segment' | 'chips' | 'breadcrumb';
|
|
1142
1180
|
/**
|
|
@@ -1148,8 +1186,6 @@ type CngxStepperSkin = 'classic' | 'linear-minimal' | 'stripe-status-rich' | 'pa
|
|
|
1148
1186
|
* The width itself is not configurable - it is a `@container` rule in
|
|
1149
1187
|
* `stepper-base.css`, overridable in consumer CSS. This setting picks
|
|
1150
1188
|
* *what* the strip collapses into, not *where*.
|
|
1151
|
-
*
|
|
1152
|
-
* @category common/stepper
|
|
1153
1189
|
*/
|
|
1154
1190
|
type CngxStepperMobileCollapse = 'text' | 'dots' | 'off';
|
|
1155
1191
|
/**
|
|
@@ -1160,8 +1196,6 @@ type CngxStepperMobileCollapse = 'text' | 'dots' | 'off';
|
|
|
1160
1196
|
* is free click-through, `linear=true` is backward-to-visited only,
|
|
1161
1197
|
* with linear-unreachable headers marked `aria-disabled`). There is no
|
|
1162
1198
|
* discrete `'free'` value - `'free'` is `'visited'` + `linear=false`.
|
|
1163
|
-
*
|
|
1164
|
-
* @category common/stepper
|
|
1165
1199
|
*/
|
|
1166
1200
|
type CngxStepperHeaderNavigation = 'none' | 'visited';
|
|
1167
1201
|
/**
|
|
@@ -1172,8 +1206,6 @@ type CngxStepperHeaderNavigation = 'none' | 'visited';
|
|
|
1172
1206
|
* the browser-native baseline. Orthogonal to the `mobileCollapse` axis;
|
|
1173
1207
|
* the two never edit each other. The Material twin (`[cngxMatStepper]`)
|
|
1174
1208
|
* ignores this setting.
|
|
1175
|
-
*
|
|
1176
|
-
* @category common/stepper
|
|
1177
1209
|
*/
|
|
1178
1210
|
type CngxStepperGroupCollapse = 'expand-active' | 'off';
|
|
1179
1211
|
/**
|
|
@@ -1182,8 +1214,6 @@ type CngxStepperGroupCollapse = 'expand-active' | 'off';
|
|
|
1182
1214
|
* completed/total steps; `'count'` shows the step count; `'status'`
|
|
1183
1215
|
* shows a status dot coloured by the group's rolled-up state; `'off'`
|
|
1184
1216
|
* shows the bare label. Only ever rendered on a collapsed group header.
|
|
1185
|
-
*
|
|
1186
|
-
* @category common/stepper
|
|
1187
1217
|
*/
|
|
1188
1218
|
type CngxStepperGroupSummary = 'progress' | 'count' | 'status' | 'off';
|
|
1189
1219
|
/**
|
|
@@ -1193,8 +1223,6 @@ type CngxStepperGroupSummary = 'progress' | 'count' | 'status' | 'off';
|
|
|
1193
1223
|
* label kept); `'comfortable'` (default) keeps full labels at every
|
|
1194
1224
|
* width. Orthogonal to `mobileCollapse` and `groupCollapse`; the
|
|
1195
1225
|
* Material twin ignores this setting.
|
|
1196
|
-
*
|
|
1197
|
-
* @category common/stepper
|
|
1198
1226
|
*/
|
|
1199
1227
|
type CngxStepperDensity = 'comfortable' | 'auto';
|
|
1200
1228
|
/**
|
|
@@ -1204,16 +1232,12 @@ type CngxStepperDensity = 'comfortable' | 'auto';
|
|
|
1204
1232
|
* `'bottom'` flips it below so the user reads content first and the
|
|
1205
1233
|
* navigation cue sits at the thumb zone. Ignored when the classic
|
|
1206
1234
|
* strip is on screen (`displayMode === 'classic'`).
|
|
1207
|
-
*
|
|
1208
|
-
* @category common/stepper
|
|
1209
1235
|
*/
|
|
1210
1236
|
type CngxStepperMobileIndicatorPosition = 'top' | 'bottom';
|
|
1211
1237
|
/**
|
|
1212
1238
|
* Stepper config surface. Resolution priority: per-instance Input
|
|
1213
1239
|
* > `provideStepperConfigAt` (viewProviders) > `provideStepperConfig`
|
|
1214
1240
|
* (root) > library default. Canonical cngx config shape.
|
|
1215
|
-
*
|
|
1216
|
-
* @category common/stepper
|
|
1217
1241
|
*/
|
|
1218
1242
|
interface CngxStepperConfig {
|
|
1219
1243
|
readonly defaultOrientation?: 'horizontal' | 'vertical';
|
|
@@ -1276,8 +1300,6 @@ interface CngxStepperConfig {
|
|
|
1276
1300
|
* classic strip and on the Material twin (`<cngx-mat-stepper>`).
|
|
1277
1301
|
*/
|
|
1278
1302
|
readonly mobileSwipe?: boolean;
|
|
1279
|
-
/** Landmark labels; a `Signal` switches the language at runtime. */
|
|
1280
|
-
readonly ariaLabels?: CngxStepperAriaLabels | Signal<CngxStepperAriaLabels>;
|
|
1281
1303
|
/** Role descriptions; a `Signal` switches the language at runtime. */
|
|
1282
1304
|
readonly fallbackLabels?: CngxStepperFallbackLabels | Signal<CngxStepperFallbackLabels>;
|
|
1283
1305
|
readonly templates?: CngxStepperTemplates;
|
|
@@ -1287,18 +1309,15 @@ interface CngxStepperConfig {
|
|
|
1287
1309
|
* library defaults; override via {@link provideStepperConfig} (root)
|
|
1288
1310
|
* or {@link provideStepperConfigAt} (component scope).
|
|
1289
1311
|
*
|
|
1290
|
-
* @category common/stepper
|
|
1291
1312
|
* @wcag AA
|
|
1292
1313
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/stepper-config.ts
|
|
1293
|
-
* @since 0.
|
|
1314
|
+
* @since 0.3.0
|
|
1294
1315
|
*/
|
|
1295
1316
|
declare const CNGX_STEPPER_CONFIG: InjectionToken<CngxStepperConfig>;
|
|
1296
1317
|
/**
|
|
1297
1318
|
* Feature signature - each `with*` builder reduces over the config.
|
|
1298
1319
|
* Hidden `_target: 'config'` discriminator routes through the family
|
|
1299
1320
|
* aggregator {@link provideCngxStepper}.
|
|
1300
|
-
*
|
|
1301
|
-
* @category common/stepper
|
|
1302
1321
|
*/
|
|
1303
1322
|
type CngxStepperConfigFeature = ((config: CngxStepperConfig) => CngxStepperConfig) & {
|
|
1304
1323
|
readonly _target: 'config';
|
|
@@ -1306,15 +1325,11 @@ type CngxStepperConfigFeature = ((config: CngxStepperConfig) => CngxStepperConfi
|
|
|
1306
1325
|
/**
|
|
1307
1326
|
* Override the default orientation. Per-instance `[orientation]`
|
|
1308
1327
|
* Input still wins; this only moves the cascade default.
|
|
1309
|
-
*
|
|
1310
|
-
* @category common/stepper
|
|
1311
1328
|
*/
|
|
1312
1329
|
declare function withStepperDefaultOrientation(orientation: 'horizontal' | 'vertical'): CngxStepperConfigFeature;
|
|
1313
1330
|
/**
|
|
1314
1331
|
* Override the default linear-progression setting. Per-instance
|
|
1315
1332
|
* `[linear]` Input still wins.
|
|
1316
|
-
*
|
|
1317
|
-
* @category common/stepper
|
|
1318
1333
|
*/
|
|
1319
1334
|
declare function withStepperLinear(linear: boolean): CngxStepperConfigFeature;
|
|
1320
1335
|
/**
|
|
@@ -1322,16 +1337,12 @@ declare function withStepperLinear(linear: boolean): CngxStepperConfigFeature;
|
|
|
1322
1337
|
* `'optimistic'` advances on action dispatch and rolls back on error;
|
|
1323
1338
|
* `'pessimistic'` waits for success. Per-instance `[commitMode]`
|
|
1324
1339
|
* Input still wins.
|
|
1325
|
-
*
|
|
1326
|
-
* @category common/stepper
|
|
1327
1340
|
*/
|
|
1328
1341
|
declare function withStepperCommitMode(mode: 'optimistic' | 'pessimistic'): CngxStepperConfigFeature;
|
|
1329
1342
|
/**
|
|
1330
1343
|
* Configure router synchronisation for the active step. `mode` chooses
|
|
1331
1344
|
* the URL surface (URL fragment or query parameter); `param` names the
|
|
1332
1345
|
* key (default `'step'`).
|
|
1333
|
-
*
|
|
1334
|
-
* @category common/stepper
|
|
1335
1346
|
*/
|
|
1336
1347
|
declare function withStepperRouterSync(mode: 'fragment' | 'queryParam', param?: string): CngxStepperConfigFeature;
|
|
1337
1348
|
/**
|
|
@@ -1340,8 +1351,6 @@ declare function withStepperRouterSync(mode: 'fragment' | 'queryParam', param?:
|
|
|
1340
1351
|
* moves the cascade default. Structure, slots, ARIA, and keyboard
|
|
1341
1352
|
* behaviour are identical across skins - only the `[data-skin]` host
|
|
1342
1353
|
* attribute changes the CSS layer that paints the strip.
|
|
1343
|
-
*
|
|
1344
|
-
* @category common/stepper
|
|
1345
1354
|
*/
|
|
1346
1355
|
declare function withStepperSkin(skin: CngxStepperSkin): CngxStepperConfigFeature;
|
|
1347
1356
|
/**
|
|
@@ -1352,8 +1361,6 @@ declare function withStepperSkin(skin: CngxStepperSkin): CngxStepperConfigFeatur
|
|
|
1352
1361
|
* `[data-skin='classic']`; the four other skins each ship their own
|
|
1353
1362
|
* inter-step decoration and ignore this flag. Per-instance
|
|
1354
1363
|
* `[connectors]` Input still wins.
|
|
1355
|
-
*
|
|
1356
|
-
* @category common/stepper
|
|
1357
1364
|
*/
|
|
1358
1365
|
declare function withStepperConnectors(on: boolean): CngxStepperConfigFeature;
|
|
1359
1366
|
/**
|
|
@@ -1363,8 +1370,6 @@ declare function withStepperConnectors(on: boolean): CngxStepperConfigFeature;
|
|
|
1363
1370
|
* `<cngx-text-stepper>`, `'dots'` renders `<cngx-dot-stepper>`, `'off'`
|
|
1364
1371
|
* keeps the classic strip. The Material twin `<cngx-mat-stepper>` ignores
|
|
1365
1372
|
* this setting.
|
|
1366
|
-
*
|
|
1367
|
-
* @category common/stepper
|
|
1368
1373
|
*/
|
|
1369
1374
|
declare function withStepperMobileCollapse(mode: CngxStepperMobileCollapse): CngxStepperConfigFeature;
|
|
1370
1375
|
/**
|
|
@@ -1374,8 +1379,6 @@ declare function withStepperMobileCollapse(mode: CngxStepperMobileCollapse): Cng
|
|
|
1374
1379
|
* reads first and the navigation cue sits at thumb height. Per-
|
|
1375
1380
|
* instance `[mobileIndicatorPosition]` on `<cngx-stepper>` still
|
|
1376
1381
|
* wins.
|
|
1377
|
-
*
|
|
1378
|
-
* @category common/stepper
|
|
1379
1382
|
*/
|
|
1380
1383
|
declare function withStepperMobileIndicatorPosition(position: CngxStepperMobileIndicatorPosition): CngxStepperConfigFeature;
|
|
1381
1384
|
/**
|
|
@@ -1383,8 +1386,6 @@ declare function withStepperMobileIndicatorPosition(position: CngxStepperMobileI
|
|
|
1383
1386
|
* in mobile-collapse mode. Default `true` - the `'dots'` and `'text'`
|
|
1384
1387
|
* variants read as carousels, so users expect to swipe. Per-instance
|
|
1385
1388
|
* `[mobileSwipe]` Input still wins; the classic strip is unaffected.
|
|
1386
|
-
*
|
|
1387
|
-
* @category common/stepper
|
|
1388
1389
|
*/
|
|
1389
1390
|
declare function withStepperMobileSwipe(enabled: boolean): CngxStepperConfigFeature;
|
|
1390
1391
|
/**
|
|
@@ -1393,8 +1394,6 @@ declare function withStepperMobileSwipe(enabled: boolean): CngxStepperConfigFeat
|
|
|
1393
1394
|
* navigation); `'visited'` (library default) keeps the headers as
|
|
1394
1395
|
* focusable buttons whose reachability folds into the `linear` axis.
|
|
1395
1396
|
* Per-instance `[headerNavigation]` Input still wins.
|
|
1396
|
-
*
|
|
1397
|
-
* @category common/stepper
|
|
1398
1397
|
*/
|
|
1399
1398
|
declare function withStepperHeaderNavigation(mode: CngxStepperHeaderNavigation): CngxStepperConfigFeature;
|
|
1400
1399
|
/**
|
|
@@ -1404,8 +1403,6 @@ declare function withStepperHeaderNavigation(mode: CngxStepperHeaderNavigation):
|
|
|
1404
1403
|
* holding the active step; `'off'` (library default) keeps the full
|
|
1405
1404
|
* strip. Orthogonal to the `mobileCollapse` axis. The Material twin
|
|
1406
1405
|
* ignores this setting.
|
|
1407
|
-
*
|
|
1408
|
-
* @category common/stepper
|
|
1409
1406
|
*/
|
|
1410
1407
|
declare function withStepperGroupCollapse(mode: CngxStepperGroupCollapse): CngxStepperConfigFeature;
|
|
1411
1408
|
/**
|
|
@@ -1414,8 +1411,6 @@ declare function withStepperGroupCollapse(mode: CngxStepperGroupCollapse): CngxS
|
|
|
1414
1411
|
* shows completed/total steps; `'count'` the step count; `'status'` a
|
|
1415
1412
|
* status dot coloured by the group's rolled-up state; `'off'` the bare
|
|
1416
1413
|
* label. No effect unless `groupCollapse` is `'expand-active'`.
|
|
1417
|
-
*
|
|
1418
|
-
* @category common/stepper
|
|
1419
1414
|
*/
|
|
1420
1415
|
declare function withStepperGroupCollapseSummary(mode: CngxStepperGroupSummary): CngxStepperConfigFeature;
|
|
1421
1416
|
/**
|
|
@@ -1426,52 +1421,32 @@ declare function withStepperGroupCollapseSummary(mode: CngxStepperGroupSummary):
|
|
|
1426
1421
|
* `'comfortable'` (library default) keeps full labels at every width.
|
|
1427
1422
|
* Orthogonal to the `mobileCollapse` axis; the Material twin ignores this
|
|
1428
1423
|
* setting.
|
|
1429
|
-
*
|
|
1430
|
-
* @category common/stepper
|
|
1431
1424
|
*/
|
|
1432
1425
|
declare function withStepperDensity(mode: CngxStepperDensity): CngxStepperConfigFeature;
|
|
1433
|
-
/**
|
|
1434
|
-
* Merge ARIA labels into the cascade. Keys not provided keep their
|
|
1435
|
-
* library defaults; per-instance overrides on the stepper still win.
|
|
1436
|
-
* Pass a `Signal` to switch the language at runtime.
|
|
1437
|
-
*
|
|
1438
|
-
* @category common/stepper
|
|
1439
|
-
*/
|
|
1440
|
-
declare function withStepperAriaLabels(labels: CngxStepperAriaLabels | Signal<CngxStepperAriaLabels>): CngxStepperConfigFeature;
|
|
1441
1426
|
/**
|
|
1442
1427
|
* Merge fallback role descriptions (`groupRoleDescription` /
|
|
1443
1428
|
* `stepRoleDescription`) into the cascade. These feed the strip's
|
|
1444
1429
|
* `aria-roledescription` attributes when the consumer supplies none.
|
|
1445
1430
|
* Pass a `Signal` to switch the language at runtime.
|
|
1446
|
-
*
|
|
1447
|
-
* @category common/stepper
|
|
1448
1431
|
*/
|
|
1449
1432
|
declare function withStepperFallbackLabels(labels: CngxStepperFallbackLabels | Signal<CngxStepperFallbackLabels>): CngxStepperConfigFeature;
|
|
1450
1433
|
/**
|
|
1451
1434
|
* Override the default `*cngxStepIndicator` template app-wide.
|
|
1452
1435
|
* Per-instance directive still wins; this only moves the cascade
|
|
1453
1436
|
* middle tier.
|
|
1454
|
-
*
|
|
1455
|
-
* @category common/stepper
|
|
1456
1437
|
*/
|
|
1457
1438
|
declare function withStepIndicatorTemplate(template: TemplateRef<CngxStepIndicatorContext>): CngxStepperConfigFeature;
|
|
1458
1439
|
/**
|
|
1459
1440
|
* Override the default `*cngxStepBadge` template app-wide.
|
|
1460
|
-
*
|
|
1461
|
-
* @category common/stepper
|
|
1462
1441
|
*/
|
|
1463
1442
|
declare function withStepBadgeTemplate(template: TemplateRef<CngxStepBadgeContext>): CngxStepperConfigFeature;
|
|
1464
1443
|
/**
|
|
1465
1444
|
* Override the default `*cngxStepBusySpinner` template app-wide.
|
|
1466
|
-
*
|
|
1467
|
-
* @category common/stepper
|
|
1468
1445
|
*/
|
|
1469
1446
|
declare function withStepBusySpinnerTemplate(template: TemplateRef<CngxStepBusySpinnerContext>): CngxStepperConfigFeature;
|
|
1470
1447
|
/**
|
|
1471
1448
|
* Override the default `*cngxStepRejection` template app-wide.
|
|
1472
1449
|
* Symmetric with the upcoming tabs `cngxTabRejectionIcon` (Phase 4).
|
|
1473
|
-
*
|
|
1474
|
-
* @category common/stepper
|
|
1475
1450
|
*/
|
|
1476
1451
|
declare function withStepRejectionTemplate(template: TemplateRef<CngxStepRejectionContext>): CngxStepperConfigFeature;
|
|
1477
1452
|
/**
|
|
@@ -1479,20 +1454,14 @@ declare function withStepRejectionTemplate(template: TemplateRef<CngxStepRejecti
|
|
|
1479
1454
|
* renders the per-step validation reason on the skins with a label area
|
|
1480
1455
|
* (classic / stripe-status-rich). Per-instance directive still wins;
|
|
1481
1456
|
* this moves the cascade middle tier.
|
|
1482
|
-
*
|
|
1483
|
-
* @category common/stepper
|
|
1484
1457
|
*/
|
|
1485
1458
|
declare function withStepErrorTemplate(template: TemplateRef<CngxStepErrorContext>): CngxStepperConfigFeature;
|
|
1486
1459
|
/**
|
|
1487
1460
|
* Override the default `*cngxStepGroupHeader` template app-wide.
|
|
1488
|
-
*
|
|
1489
|
-
* @category common/stepper
|
|
1490
1461
|
*/
|
|
1491
1462
|
declare function withStepGroupHeaderTemplate(template: TemplateRef<CngxStepGroupHeaderContext>): CngxStepperConfigFeature;
|
|
1492
1463
|
/**
|
|
1493
1464
|
* Override the default `*cngxStepperEmpty` template app-wide.
|
|
1494
|
-
*
|
|
1495
|
-
* @category common/stepper
|
|
1496
1465
|
*/
|
|
1497
1466
|
declare function withStepperEmptyTemplate(template: TemplateRef<void>): CngxStepperConfigFeature;
|
|
1498
1467
|
/**
|
|
@@ -1501,16 +1470,12 @@ declare function withStepperEmptyTemplate(template: TemplateRef<void>): CngxStep
|
|
|
1501
1470
|
* mobile-collapse branch of `<cngx-stepper>`: per-instance directive >
|
|
1502
1471
|
* this feature > built-in empty body (the dot fill is painted by the dot
|
|
1503
1472
|
* element's CSS regardless).
|
|
1504
|
-
*
|
|
1505
|
-
* @category common/stepper
|
|
1506
1473
|
*/
|
|
1507
1474
|
declare function withDotStepperDotTemplate(template: TemplateRef<CngxDotStepperDotContext>): CngxStepperConfigFeature;
|
|
1508
1475
|
/**
|
|
1509
1476
|
* Root-level provider for the stepper config. Apply once in the
|
|
1510
1477
|
* application providers array. Sibling of `provideTabsConfig` /
|
|
1511
1478
|
* `provideSelectConfig`.
|
|
1512
|
-
*
|
|
1513
|
-
* @category common/stepper
|
|
1514
1479
|
*/
|
|
1515
1480
|
declare function provideStepperConfig(...features: readonly CngxStepperConfigFeature[]): EnvironmentProviders;
|
|
1516
1481
|
/**
|
|
@@ -1527,14 +1492,10 @@ declare function provideStepperConfig(...features: readonly CngxStepperConfigFea
|
|
|
1527
1492
|
* viewProviders: [...provideStepperConfigAt(withStepperLinear(true))],
|
|
1528
1493
|
* })
|
|
1529
1494
|
* ```
|
|
1530
|
-
*
|
|
1531
|
-
* @category common/stepper
|
|
1532
1495
|
*/
|
|
1533
1496
|
declare function provideStepperConfigAt(...features: readonly CngxStepperConfigFeature[]): Provider[];
|
|
1534
1497
|
/**
|
|
1535
1498
|
* Inject the resolved stepper config in an injection context.
|
|
1536
|
-
*
|
|
1537
|
-
* @category common/stepper
|
|
1538
1499
|
*/
|
|
1539
1500
|
declare function injectStepperConfig(): CngxStepperConfig;
|
|
1540
1501
|
|
|
@@ -1543,8 +1504,6 @@ declare function injectStepperConfig(): CngxStepperConfig;
|
|
|
1543
1504
|
* the `contentChild()` queries (NG8110 - must run in component
|
|
1544
1505
|
* injection context) and the resolved {@link CngxStepperConfig}; this
|
|
1545
1506
|
* factory absorbs the 3-stage cascade per slot key.
|
|
1546
|
-
*
|
|
1547
|
-
* @category common/stepper/slots
|
|
1548
1507
|
*/
|
|
1549
1508
|
interface CngxStepperTemplateBindingsOptions {
|
|
1550
1509
|
readonly indicatorSlot: Signal<CngxStepIndicator | undefined>;
|
|
@@ -1563,8 +1522,6 @@ interface CngxStepperTemplateBindingsOptions {
|
|
|
1563
1522
|
* Output of {@link createStepperTemplateBindings}. One resolved
|
|
1564
1523
|
* `Signal<TemplateRef | null>` per slot - `null` falls through to the
|
|
1565
1524
|
* organism's built-in default markup.
|
|
1566
|
-
*
|
|
1567
|
-
* @category common/stepper/slots
|
|
1568
1525
|
*/
|
|
1569
1526
|
interface CngxStepperTemplateBindings {
|
|
1570
1527
|
readonly indicator: Signal<TemplateRef<CngxStepIndicatorContext> | null>;
|
|
@@ -1587,40 +1544,9 @@ interface CngxStepperTemplateBindings {
|
|
|
1587
1544
|
*
|
|
1588
1545
|
* Tabs has no parallel slot surface yet - see
|
|
1589
1546
|
* `stepper-accepted-debt §3` for the planned Phase-4 closure.
|
|
1590
|
-
*
|
|
1591
|
-
* @category common/stepper/slots
|
|
1592
1547
|
*/
|
|
1593
1548
|
declare function createStepperTemplateBindings(opts: CngxStepperTemplateBindingsOptions): CngxStepperTemplateBindings;
|
|
1594
1549
|
|
|
1595
|
-
/**
|
|
1596
|
-
* Default glyphs for `<cngx-stepper>` skin slots. Used when neither a
|
|
1597
|
-
* per-instance slot directive nor `CNGX_STEPPER_CONFIG.templates.<key>`
|
|
1598
|
-
* overrides the built-in span. Sibling of `CNGX_SELECT_GLYPHS` /
|
|
1599
|
-
* `CNGX_TABS_GLYPHS`.
|
|
1600
|
-
*
|
|
1601
|
-
* Exported with `@internal` so the organism (and mat-twin) can share
|
|
1602
|
-
* the literals across the secondary-entry boundary that Sheriff
|
|
1603
|
-
* forbids deep-relative imports across. Consumers customise via
|
|
1604
|
-
* `*cngxStep*` slots or `withStep*Template` features.
|
|
1605
|
-
*
|
|
1606
|
-
* @internal
|
|
1607
|
-
* @category common/stepper
|
|
1608
|
-
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/glyphs.ts
|
|
1609
|
-
* @since 0.1.0
|
|
1610
|
-
*/
|
|
1611
|
-
declare const CNGX_STEPPER_GLYPHS: {
|
|
1612
|
-
/** Default visual for `*cngxStepBadge` when no override is bound. */
|
|
1613
|
-
readonly errorBadge: "!";
|
|
1614
|
-
/** Default visual for `*cngxStepRejection` on a failed commit when no override is bound. */
|
|
1615
|
-
readonly rejectionIcon: "!";
|
|
1616
|
-
/**
|
|
1617
|
-
* Default visual for `*cngxStepRejection` on a refused commit (the action
|
|
1618
|
-
* answered `false`). A distinct glyph, so a refusal never differs from a
|
|
1619
|
-
* failure by colour alone (WCAG 1.4.1).
|
|
1620
|
-
*/
|
|
1621
|
-
readonly refusedIcon: "⊘";
|
|
1622
|
-
};
|
|
1623
|
-
|
|
1624
1550
|
/**
|
|
1625
1551
|
* URL deep-linking for the stepper. Bidirectional sync between
|
|
1626
1552
|
* `activeStepId` and a URL fragment / query-param. Opt-in via
|
|
@@ -1632,16 +1558,25 @@ declare const CNGX_STEPPER_GLYPHS: {
|
|
|
1632
1558
|
* `Router` is optional - without `@angular/router` the directive
|
|
1633
1559
|
* dev-warns once and becomes a no-op.
|
|
1634
1560
|
*
|
|
1635
|
-
* @category common/stepper
|
|
1636
|
-
* @docsKind primary
|
|
1637
1561
|
* @wcag AA
|
|
1638
1562
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/router-sync.directive.ts
|
|
1639
|
-
* @since 0.
|
|
1563
|
+
* @since 0.3.0
|
|
1640
1564
|
* @relatedTo CngxStepperPresenter, CNGX_STEPPER_CONFIG
|
|
1641
|
-
* <example-url
|
|
1565
|
+
* <example-url>/#/ui/stepper/stepper-router-sync/deep-linking-with-fragment-queryparam-modes</example-url>
|
|
1642
1566
|
*/
|
|
1643
1567
|
declare class CngxStepperRouterSync implements AfterContentInit {
|
|
1568
|
+
/**
|
|
1569
|
+
* Binding `[mode]`: where the active step id is kept in the URL, `'fragment'` (`#step=customer`) or
|
|
1570
|
+
* `'queryParam'` (`?step=customer`). Unset, it resolves through `routerSyncMode` of the stepper config
|
|
1571
|
+
* and then `'fragment'`. A change after init applies to the next URL write or read and leaves the
|
|
1572
|
+
* previous key in the URL.
|
|
1573
|
+
*/
|
|
1644
1574
|
readonly modeInput: i0.InputSignal<"fragment" | "queryParam" | undefined>;
|
|
1575
|
+
/**
|
|
1576
|
+
* Binding `[paramName]`: name of the fragment or query key that carries the step id. Unset, it resolves
|
|
1577
|
+
* through `routerSyncParam` of the stepper config and then `'step'`. A change after init applies to the next URL write or read and leaves the
|
|
1578
|
+
* previous key in the URL.
|
|
1579
|
+
*/
|
|
1645
1580
|
readonly paramNameInput: i0.InputSignal<string | undefined>;
|
|
1646
1581
|
private readonly config;
|
|
1647
1582
|
readonly mode: i0.Signal<"fragment" | "queryParam">;
|
|
@@ -1692,8 +1627,7 @@ declare class CngxStepperRouterSync implements AfterContentInit {
|
|
|
1692
1627
|
/**
|
|
1693
1628
|
* The status-pill words of the stepper section.
|
|
1694
1629
|
*
|
|
1695
|
-
* @
|
|
1696
|
-
* @since 0.1.0
|
|
1630
|
+
* @since 0.3.0
|
|
1697
1631
|
*/
|
|
1698
1632
|
interface CngxStepperStatusLanguage {
|
|
1699
1633
|
readonly done: string;
|
|
@@ -1707,17 +1641,14 @@ interface CngxStepperStatusLanguage {
|
|
|
1707
1641
|
* The stepper section of a {@link CngxLanguagePack}: the copy of
|
|
1708
1642
|
* `@cngx/common/stepper` and of the steppers in `@cngx/ui/stepper` and
|
|
1709
1643
|
* `@cngx/ui/mat-stepper`. It feeds `CNGX_STEPPER_I18N` and the copy keys of
|
|
1710
|
-
* `CNGX_STEPPER_CONFIG` (`
|
|
1644
|
+
* `CNGX_STEPPER_CONFIG` (`fallbackLabels`). Messages use
|
|
1711
1645
|
* `{name}` placeholders; a plural message picks its form from `{count}`.
|
|
1712
1646
|
*
|
|
1713
|
-
* @
|
|
1714
|
-
* @since 0.1.0
|
|
1647
|
+
* @since 0.3.0
|
|
1715
1648
|
* @relatedTo CNGX_STEPPER_I18N, CNGX_STEPPER_CONFIG
|
|
1716
1649
|
*/
|
|
1717
1650
|
interface CngxStepperLanguageSection {
|
|
1718
|
-
/** Accessible name of the stepper
|
|
1719
|
-
readonly stepperRegion: string;
|
|
1720
|
-
/** Last-tier landmark label and role description, used when the config keys are unset. */
|
|
1651
|
+
/** Accessible name of the stepper. */
|
|
1721
1652
|
readonly stepperLabel: string;
|
|
1722
1653
|
/** `aria-roledescription` of the stepper organism. */
|
|
1723
1654
|
readonly stepRoleDescription: string;
|
|
@@ -1764,8 +1695,7 @@ interface CngxStepperLanguageSection {
|
|
|
1764
1695
|
* The English stepper section: the single source of the stepper's English
|
|
1765
1696
|
* copy. `CNGX_STEPPER_I18N` and the `CNGX_STEPPER_CONFIG` labels default to it.
|
|
1766
1697
|
*
|
|
1767
|
-
* @
|
|
1768
|
-
* @since 0.1.0
|
|
1698
|
+
* @since 0.3.0
|
|
1769
1699
|
* @relatedTo CNGX_STEPPER_I18N
|
|
1770
1700
|
*/
|
|
1771
1701
|
declare const CNGX_STEPPER_LANGUAGE_EN: CngxStepperLanguageSection;
|
|
@@ -1782,33 +1712,23 @@ declare module '@cngx/core/i18n' {
|
|
|
1782
1712
|
* via {@link withStepperI18nLabels} - un-overridden keys keep their
|
|
1783
1713
|
* English defaults. The same shape as the section's status words, declared
|
|
1784
1714
|
* once as {@link CngxStepperStatusLanguage}.
|
|
1785
|
-
*
|
|
1786
|
-
* @category common/stepper/i18n
|
|
1787
1715
|
*/
|
|
1788
1716
|
type CngxStepperStatusLabels = CngxStepperStatusLanguage;
|
|
1789
1717
|
/**
|
|
1790
1718
|
* Stepper i18n surface. Library defaults are English; locales come from
|
|
1791
1719
|
* consumer overrides via {@link provideStepperI18n}. Sibling of
|
|
1792
1720
|
* `CNGX_TABS_I18N` / `CNGX_CHART_I18N`.
|
|
1793
|
-
*
|
|
1794
|
-
* @category common/stepper/i18n
|
|
1795
1721
|
*/
|
|
1796
1722
|
interface CngxStepperI18n {
|
|
1797
1723
|
/**
|
|
1798
|
-
*
|
|
1799
|
-
* `aria-
|
|
1800
|
-
* `CNGX_STEPPER_CONFIG.ariaLabels.stepperRegion` (default `'Steps'`) is
|
|
1801
|
-
* unset, the role description only while `fallbackLabels.stepRoleDescription`
|
|
1802
|
-
* (default `'stepper'`) is unset. Localise both through
|
|
1803
|
-
* `withStepperAriaLabels(...)` and `withStepperFallbackLabels(...)`.
|
|
1724
|
+
* Accessible name of the stepper; only a per-instance `[aria-label]` or
|
|
1725
|
+
* `[aria-labelledby]` overrides it.
|
|
1804
1726
|
*/
|
|
1805
1727
|
readonly stepperLabel: string;
|
|
1806
1728
|
/**
|
|
1807
1729
|
* Landmark `aria-roledescription` for compact step-indicator
|
|
1808
1730
|
* surfaces such as the dot stepper and the mobile-dot collapse
|
|
1809
1731
|
* fallback. Mirrors the W3C APG step-indicator pattern.
|
|
1810
|
-
*
|
|
1811
|
-
* @category common/stepper/i18n
|
|
1812
1732
|
*/
|
|
1813
1733
|
readonly stepIndicatorRoleDescription: string;
|
|
1814
1734
|
/** `aria-roledescription` of a step group header. English `step group`. */
|
|
@@ -1880,8 +1800,6 @@ interface CngxStepperI18n {
|
|
|
1880
1800
|
* step-count subtext and by `CngxTextStepper`. Receives the
|
|
1881
1801
|
* 1-based current position and total step count; default
|
|
1882
1802
|
* `(current, total) => 'Step ${current} of ${total}'`.
|
|
1883
|
-
*
|
|
1884
|
-
* @category common/stepper/i18n
|
|
1885
1803
|
*/
|
|
1886
1804
|
readonly textStepperFormat: (current: number, total: number) => string;
|
|
1887
1805
|
/** Collapsed-group SR phrase for `groupCollapseSummary: 'count'`. */
|
|
@@ -1905,8 +1823,6 @@ interface CngxStepperI18n {
|
|
|
1905
1823
|
* `Partial<CngxStepperI18n>` for top-level keys, plus a nested partial
|
|
1906
1824
|
* for {@link CngxStepperStatusLabels} so consumers can override one
|
|
1907
1825
|
* pill label without restating the full status-label bundle.
|
|
1908
|
-
*
|
|
1909
|
-
* @category common/stepper/i18n
|
|
1910
1826
|
*/
|
|
1911
1827
|
type CngxStepperI18nOverrides = Omit<Partial<CngxStepperI18n>, 'statusLabels'> & {
|
|
1912
1828
|
readonly statusLabels?: Partial<CngxStepperStatusLabels>;
|
|
@@ -1919,18 +1835,15 @@ type CngxStepperI18nOverrides = Omit<Partial<CngxStepperI18n>, 'statusLabels'> &
|
|
|
1919
1835
|
* {@link provideStepperI18n}; a `{ provide, useValue }` entry must supply a
|
|
1920
1836
|
* `Signal<CngxStepperI18n>`.
|
|
1921
1837
|
*
|
|
1922
|
-
* @category common/stepper/i18n
|
|
1923
1838
|
* @wcag AA
|
|
1924
1839
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/i18n/stepper-i18n.ts
|
|
1925
|
-
* @since 0.
|
|
1840
|
+
* @since 0.3.0
|
|
1926
1841
|
*/
|
|
1927
1842
|
declare const CNGX_STEPPER_I18N: InjectionToken<Signal<CngxStepperI18n>>;
|
|
1928
1843
|
/**
|
|
1929
1844
|
* Feature shape consumed by {@link provideStepperI18n} and {@link provideCngxStepper}.
|
|
1930
1845
|
* Hidden `_target: 'i18n'` discriminator routes through the family aggregator.
|
|
1931
1846
|
* Sibling of `CngxTabsI18nFeature`.
|
|
1932
|
-
*
|
|
1933
|
-
* @category common/stepper/i18n
|
|
1934
1847
|
*/
|
|
1935
1848
|
type CngxStepperI18nFeature = ((bundle: Signal<CngxStepperI18n>) => Signal<CngxStepperI18n>) & {
|
|
1936
1849
|
readonly _target: 'i18n';
|
|
@@ -1940,9 +1853,7 @@ type CngxStepperI18nFeature = ((bundle: Signal<CngxStepperI18n>) => Signal<CngxS
|
|
|
1940
1853
|
* the language pack's copy, or the English default. {@link CngxStepperStatusLabels} is merged
|
|
1941
1854
|
* key-by-key so consumers can override one pill label without
|
|
1942
1855
|
* restating the rest. Pass a `Signal` to switch the language at runtime.
|
|
1943
|
-
* Sibling of `
|
|
1944
|
-
*
|
|
1945
|
-
* @category common/stepper/i18n
|
|
1856
|
+
* Sibling of `withStepperFallbackLabels`.
|
|
1946
1857
|
*/
|
|
1947
1858
|
declare function withStepperI18nLabels(overrides: CngxStepperI18nOverrides | Signal<CngxStepperI18nOverrides>): CngxStepperI18nFeature;
|
|
1948
1859
|
/**
|
|
@@ -1954,21 +1865,17 @@ declare function withStepperI18nLabels(overrides: CngxStepperI18nOverrides | Sig
|
|
|
1954
1865
|
* bootstrapApplication(AppComponent, {
|
|
1955
1866
|
* providers: [
|
|
1956
1867
|
* provideStepperI18n(
|
|
1957
|
-
* withStepperI18nLabels({ stepperLabel: '
|
|
1868
|
+
* withStepperI18nLabels({ stepperLabel: 'Bestellschritte', previousStep: 'Vorheriger' }),
|
|
1958
1869
|
* ),
|
|
1959
1870
|
* ],
|
|
1960
1871
|
* });
|
|
1961
1872
|
* ```
|
|
1962
|
-
*
|
|
1963
|
-
* @category common/stepper/i18n
|
|
1964
1873
|
*/
|
|
1965
1874
|
declare function provideStepperI18n(...features: readonly CngxStepperI18nFeature[]): Provider;
|
|
1966
1875
|
/**
|
|
1967
1876
|
* Inject the resolved stepper i18n bundle in an injection context. Read it
|
|
1968
1877
|
* inside a `computed()`, template or handler so a language switch reaches
|
|
1969
1878
|
* the label.
|
|
1970
|
-
*
|
|
1971
|
-
* @category common/stepper/i18n
|
|
1972
1879
|
*/
|
|
1973
1880
|
declare function injectStepperI18n(): Signal<CngxStepperI18n>;
|
|
1974
1881
|
|
|
@@ -1979,16 +1886,19 @@ declare function injectStepperI18n(): Signal<CngxStepperI18n>;
|
|
|
1979
1886
|
* no signal graph involvement.
|
|
1980
1887
|
*
|
|
1981
1888
|
* Resolution order:
|
|
1982
|
-
* 1. `
|
|
1983
|
-
* 2.
|
|
1984
|
-
* 3.
|
|
1985
|
-
* 4.
|
|
1889
|
+
* 1. `error` data-state -> `statusLabels.errored`
|
|
1890
|
+
* 2. a failed commit rejection -> `statusLabels.errored`
|
|
1891
|
+
* 3. a refused commit rejection -> `statusLabels.refused`
|
|
1892
|
+
* 4. `success` data-state -> `statusLabels.done`
|
|
1893
|
+
* 5. `aria-current="step"` -> `statusLabels.inProgress`
|
|
1894
|
+
* 6. otherwise -> `statusLabels.upNext`
|
|
1986
1895
|
*
|
|
1987
|
-
*
|
|
1896
|
+
* The rejection outranks `done` and the position words because it is the
|
|
1897
|
+
* most recent event on the step: a rejected step must never read "Up next".
|
|
1988
1898
|
*
|
|
1989
|
-
*
|
|
1899
|
+
* Group nodes (non-step) return an empty string.
|
|
1990
1900
|
*/
|
|
1991
|
-
declare function resolveStepperStatusLabel(node: CngxStepNode, i18n: CngxStepperI18n, isActive: boolean): string;
|
|
1901
|
+
declare function resolveStepperStatusLabel(node: CngxStepNode, i18n: CngxStepperI18n, isActive: boolean, rejection?: 'refused' | 'failed' | null): string;
|
|
1992
1902
|
|
|
1993
1903
|
/**
|
|
1994
1904
|
* Reads the stepper's collapse flag off its own container.
|
|
@@ -2005,7 +1915,6 @@ declare function resolveStepperStatusLabel(node: CngxStepNode, i18n: CngxStepper
|
|
|
2005
1915
|
* on the stepper component is one; a bare call from a lifecycle hook is not.
|
|
2006
1916
|
*
|
|
2007
1917
|
* @param host The `<cngx-stepper>` host element, which is its own container.
|
|
2008
|
-
* @category common/stepper
|
|
2009
1918
|
* @relatedTo createStepperDisplayMode, injectContainerSize
|
|
2010
1919
|
*/
|
|
2011
1920
|
declare function injectStepperCollapse(host: Element): Signal<boolean>;
|
|
@@ -2022,7 +1931,6 @@ declare function injectStepperCollapse(host: Element): Signal<boolean>;
|
|
|
2022
1931
|
*
|
|
2023
1932
|
* @param collapsed `true` while the container sits below the collapse rung.
|
|
2024
1933
|
* @param mobileCollapse The configured collapse policy, read lazily.
|
|
2025
|
-
* @category common/stepper
|
|
2026
1934
|
*/
|
|
2027
1935
|
declare function createStepperDisplayMode(collapsed: Signal<boolean>, mobileCollapse: () => CngxStepperMobileCollapse | undefined): Signal<'classic' | 'text' | 'dots'>;
|
|
2028
1936
|
|
|
@@ -2031,8 +1939,6 @@ declare function createStepperDisplayMode(collapsed: Signal<boolean>, mobileColl
|
|
|
2031
1939
|
* the `groupCollapseSummary` mode and the per-group `progress` / `count`
|
|
2032
1940
|
* text, the `status`-dot gate, and the SR phrase. Pure derivation over
|
|
2033
1941
|
* the group's subtree step states; rendered only on collapsed groups.
|
|
2034
|
-
*
|
|
2035
|
-
* @category common/stepper
|
|
2036
1942
|
*/
|
|
2037
1943
|
interface CngxStepperGroupSummaryView {
|
|
2038
1944
|
/** Resolved summary mode (config cascade, default `'progress'`). */
|
|
@@ -2063,8 +1969,6 @@ interface CngxStepperGroupSummaryOptions {
|
|
|
2063
1969
|
* to the group's existing status-phrase span, so {@link srText} returns
|
|
2064
1970
|
* `null` there. SR phrases resolve through the `CngxStepperI18n` bundle
|
|
2065
1971
|
* when passed; English defaults otherwise.
|
|
2066
|
-
*
|
|
2067
|
-
* @category common/stepper
|
|
2068
1972
|
*/
|
|
2069
1973
|
declare function createStepperGroupSummary(options: CngxStepperGroupSummaryOptions): CngxStepperGroupSummaryView;
|
|
2070
1974
|
|
|
@@ -2076,8 +1980,6 @@ declare function createStepperGroupSummary(options: CngxStepperGroupSummaryOptio
|
|
|
2076
1980
|
* consequence (no in-place disclosure). Keyboard users reach the same
|
|
2077
1981
|
* steps via the arrow-key contract, which already steps into a collapsed
|
|
2078
1982
|
* group, so this is a supplementary pointer affordance.
|
|
2079
|
-
*
|
|
2080
|
-
* @category common/stepper
|
|
2081
1983
|
*/
|
|
2082
1984
|
interface CngxStepperGroupNavigationView {
|
|
2083
1985
|
/**
|
|
@@ -2127,8 +2029,6 @@ interface CngxStepperGroupNavigationOptions {
|
|
|
2127
2029
|
* the seeded `-1`. Each candidate is gated by `canNavigateTo` + `busy`
|
|
2128
2030
|
* (mirroring the step-header reachability), so a linear-blocked leading
|
|
2129
2031
|
* step is skipped to the first reachable one.
|
|
2130
|
-
*
|
|
2131
|
-
* @category common/stepper
|
|
2132
2032
|
*/
|
|
2133
2033
|
declare function createStepperGroupNavigation(options: CngxStepperGroupNavigationOptions): CngxStepperGroupNavigationView;
|
|
2134
2034
|
|
|
@@ -2171,22 +2071,20 @@ interface CngxStepperHostAttrs {
|
|
|
2171
2071
|
declare function createStepperHostAttrs(inputs: CngxStepperHostAttrsInputs): CngxStepperHostAttrs;
|
|
2172
2072
|
/**
|
|
2173
2073
|
* Input bundle for {@link createStepperAccname}: the two per-instance
|
|
2174
|
-
* accname inputs plus the
|
|
2074
|
+
* accname inputs plus the i18n bundle Signal.
|
|
2175
2075
|
*
|
|
2176
2076
|
* @internal
|
|
2177
2077
|
*/
|
|
2178
2078
|
interface CngxStepperAccnameInputs {
|
|
2179
2079
|
readonly ariaLabel: Signal<string | undefined>;
|
|
2180
2080
|
readonly ariaLabelledBy: Signal<string | undefined>;
|
|
2181
|
-
readonly config: CngxStepperConfig;
|
|
2182
2081
|
readonly i18n: Signal<CngxStepperI18n>;
|
|
2183
2082
|
}
|
|
2184
2083
|
/**
|
|
2185
2084
|
* Shared `aria-label` cascade for every stepper organism host
|
|
2186
2085
|
* (`<cngx-stepper>` and the compact variants): a bound
|
|
2187
2086
|
* `aria-labelledby` trumps and nulls the label out; otherwise the
|
|
2188
|
-
* per-instance input wins over `
|
|
2189
|
-
* `i18n.stepperLabel`. One source so the variants cannot drift from
|
|
2087
|
+
* per-instance input wins over `i18n.stepperLabel`. One source so the variants cannot drift from
|
|
2190
2088
|
* the parent's naming behaviour.
|
|
2191
2089
|
*
|
|
2192
2090
|
* @internal
|
|
@@ -2345,8 +2243,7 @@ interface CngxStepperStateView {
|
|
|
2345
2243
|
* step-only projection. Pure factory - `computed()` only, no injection
|
|
2346
2244
|
* context required, so any skin can allocate it in a field initializer.
|
|
2347
2245
|
*
|
|
2348
|
-
* @
|
|
2349
|
-
* @since 0.1.0
|
|
2246
|
+
* @since 0.3.0
|
|
2350
2247
|
* @relatedTo CngxStepperHost, createStepperSlotContextBuilders
|
|
2351
2248
|
*/
|
|
2352
2249
|
declare function createStepperStateView(inputs: {
|
|
@@ -2379,8 +2276,7 @@ declare function createStepperStateView(inputs: {
|
|
|
2379
2276
|
* re-announce the line. Pass the i18n bundle as an untracked snapshot for
|
|
2380
2277
|
* the same reason.
|
|
2381
2278
|
*
|
|
2382
|
-
* @
|
|
2383
|
-
* @since 0.1.0
|
|
2279
|
+
* @since 0.3.0
|
|
2384
2280
|
*/
|
|
2385
2281
|
declare function resolveStepperErrorSummary(view: Pick<CngxStepperStateView, 'errorMarkerCount' | 'firstErrorMarkerIndex' | 'errorCount' | 'firstErrorIndex' | 'isRefused' | 'hasErrorBadge'>, stepsOnly: Signal<readonly CngxStepNode[]>, i18n: CngxStepperI18n, messageOf?: (node: CngxStepNode) => string | undefined): string;
|
|
2386
2282
|
|
|
@@ -2560,11 +2456,9 @@ declare function createStepperPanelRefs(inputs: CngxStepperPanelRefsInputs): Cng
|
|
|
2560
2456
|
* window apply identically to a click); the back swipe ->
|
|
2561
2457
|
* `selectPrevious()`, gated on `busy()` like the strip back-arrow.
|
|
2562
2458
|
*
|
|
2563
|
-
* @category common/stepper
|
|
2564
|
-
* @docsKind primary
|
|
2565
2459
|
* @wcag AA
|
|
2566
2460
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/swipe-nav.directive.ts
|
|
2567
|
-
* @since 0.
|
|
2461
|
+
* @since 0.3.0
|
|
2568
2462
|
*/
|
|
2569
2463
|
declare class CngxStepperSwipeNav {
|
|
2570
2464
|
/**
|
|
@@ -2595,8 +2489,6 @@ declare class CngxStepperSwipeNav {
|
|
|
2595
2489
|
* {@link CngxStepperHost} satisfies it, but consumers can also supply
|
|
2596
2490
|
* a narrower stub (useful in tests, custom layouts, or non-standard
|
|
2597
2491
|
* step containers that surface just these two signals).
|
|
2598
|
-
*
|
|
2599
|
-
* @category common/stepper
|
|
2600
2492
|
*/
|
|
2601
2493
|
interface CngxStepperCountHost {
|
|
2602
2494
|
readonly activeStepIndex: Signal<number>;
|
|
@@ -2630,11 +2522,9 @@ interface CngxStepperCountHost {
|
|
|
2630
2522
|
* the caption sits next to another live region (e.g. a stepper that
|
|
2631
2523
|
* already mounts its own live announcer) to prevent double announces.
|
|
2632
2524
|
*
|
|
2633
|
-
* @
|
|
2634
|
-
* @docsKind primary
|
|
2635
|
-
* @since 0.1.0
|
|
2525
|
+
* @since 0.3.0
|
|
2636
2526
|
* @relatedTo CngxStepperHost, CngxStepperI18n
|
|
2637
|
-
* <example-url
|
|
2527
|
+
* <example-url>/#/ui/stepper/stepper-count/multi-instance-format-overrides</example-url>
|
|
2638
2528
|
*/
|
|
2639
2529
|
declare class CngxStepperCount {
|
|
2640
2530
|
/**
|
|
@@ -2685,11 +2575,12 @@ declare class CngxStepperCount {
|
|
|
2685
2575
|
* ambient {@link CNGX_STEPPER_HOST}.
|
|
2686
2576
|
*
|
|
2687
2577
|
* `(click)` retreats via `selectPrevious()`. The control disables itself
|
|
2688
|
-
* when there is no earlier step (`!canGoPrevious()`) OR while a commit
|
|
2689
|
-
* in flight (`busy()`): `selectPrevious()` writes
|
|
2690
|
-
* directly, bypassing the commit controller, so
|
|
2691
|
-
* in-flight forward commit
|
|
2692
|
-
* is the host's `canGoPrevious` bound -
|
|
2578
|
+
* when there is no earlier step (`!canGoPrevious()`) OR while a commit or
|
|
2579
|
+
* the finish run is in flight (`busy()`): `selectPrevious()` writes
|
|
2580
|
+
* `activeStepIndex` directly, bypassing the commit controller, so
|
|
2581
|
+
* disabling it during an in-flight forward commit or finish run prevents
|
|
2582
|
+
* a navigate-mid-run race. The gate is the host's `canGoPrevious` bound -
|
|
2583
|
+
* never re-derived from `stepsOnly`.
|
|
2693
2584
|
*
|
|
2694
2585
|
* Reflects the disabled state via `aria-disabled` only - never native
|
|
2695
2586
|
* `disabled` - so the control stays focusable and AT-reachable; the
|
|
@@ -2699,11 +2590,9 @@ declare class CngxStepperCount {
|
|
|
2699
2590
|
* <button cngxStepperPrevious>Back</button>
|
|
2700
2591
|
* ```
|
|
2701
2592
|
*
|
|
2702
|
-
* @category common/stepper
|
|
2703
|
-
* @docsKind primary
|
|
2704
2593
|
* @wcag AA
|
|
2705
2594
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/controls/stepper-previous.directive.ts
|
|
2706
|
-
* @since 0.
|
|
2595
|
+
* @since 0.3.0
|
|
2707
2596
|
* @relatedTo CngxStepperNext, CngxStepperComplete, CngxStepperHost
|
|
2708
2597
|
*/
|
|
2709
2598
|
declare class CngxStepperPrevious {
|
|
@@ -2734,8 +2623,9 @@ declare class CngxStepperPrevious {
|
|
|
2734
2623
|
*
|
|
2735
2624
|
* `(click)` advances via `selectNext()`. A turnkey re-entrancy guard
|
|
2736
2625
|
* disables the control when there is no enabled next step
|
|
2737
|
-
* (`!canGoNext()`) OR while a commit
|
|
2738
|
-
* guard a consumer forgets is a silent
|
|
2626
|
+
* (`!canGoNext()`) OR while a commit or the finish run is in flight
|
|
2627
|
+
* (`busy()`) - an opt-in guard a consumer forgets is a silent
|
|
2628
|
+
* double-commit (Pillar 2). The
|
|
2739
2629
|
* gate reads the host's `canGoNext` bound, which derives from the same
|
|
2740
2630
|
* `select()` predicates, so the affordance can never drift from the
|
|
2741
2631
|
* navigation it triggers.
|
|
@@ -2752,11 +2642,9 @@ declare class CngxStepperPrevious {
|
|
|
2752
2642
|
* <button cngxStepperNext>Continue</button>
|
|
2753
2643
|
* ```
|
|
2754
2644
|
*
|
|
2755
|
-
* @category common/stepper
|
|
2756
|
-
* @docsKind primary
|
|
2757
2645
|
* @wcag AA
|
|
2758
2646
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/controls/stepper-next.directive.ts
|
|
2759
|
-
* @since 0.
|
|
2647
|
+
* @since 0.3.0
|
|
2760
2648
|
* @relatedTo CngxStepperPrevious, CngxStepperComplete, CngxAsyncStatus, CngxStepperHost
|
|
2761
2649
|
*/
|
|
2762
2650
|
declare class CngxStepperNext {
|
|
@@ -2792,7 +2680,7 @@ declare class CngxStepperNext {
|
|
|
2792
2680
|
* falling back to the ambient {@link CNGX_STEPPER_HOST}. {@link isActive}
|
|
2793
2681
|
* exposes whether the active step is the last one, so a consumer renders
|
|
2794
2682
|
* the finish control only on the final step. `(completed)` emits once
|
|
2795
|
-
*
|
|
2683
|
+
* per successful run of the action.
|
|
2796
2684
|
*
|
|
2797
2685
|
* ```html
|
|
2798
2686
|
* @if (s.presenter.isLastStep()) {
|
|
@@ -2800,11 +2688,9 @@ declare class CngxStepperNext {
|
|
|
2800
2688
|
* }
|
|
2801
2689
|
* ```
|
|
2802
2690
|
*
|
|
2803
|
-
* @category common/stepper
|
|
2804
|
-
* @docsKind primary
|
|
2805
2691
|
* @wcag AA
|
|
2806
2692
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/controls/stepper-complete.directive.ts
|
|
2807
|
-
* @since 0.
|
|
2693
|
+
* @since 0.3.0
|
|
2808
2694
|
* @relatedTo CngxStepperNext, CngxStepperPrevious, CngxAsyncClick, CngxStepperHost
|
|
2809
2695
|
*/
|
|
2810
2696
|
declare class CngxStepperComplete {
|
|
@@ -2815,19 +2701,22 @@ declare class CngxStepperComplete {
|
|
|
2815
2701
|
*/
|
|
2816
2702
|
readonly host: i0.InputSignal<CngxStepperHost | null>;
|
|
2817
2703
|
/**
|
|
2818
|
-
* Emits once per
|
|
2819
|
-
*
|
|
2820
|
-
*
|
|
2704
|
+
* Emits once per successful run of the finish action, driven by the
|
|
2705
|
+
* runner's `(settled)` event: two runs that succeed before change
|
|
2706
|
+
* detection emit twice. Never on failure, cancel or after destroy, and
|
|
2707
|
+
* not when the `feedbackDuration` window resets the runner to idle.
|
|
2821
2708
|
*/
|
|
2822
2709
|
readonly completed: i0.OutputEmitterRef<void>;
|
|
2823
2710
|
private readonly injectedHost;
|
|
2824
2711
|
private readonly resolvedHost;
|
|
2825
2712
|
private readonly runner;
|
|
2713
|
+
private readonly busy;
|
|
2714
|
+
private readonly busyKey;
|
|
2826
2715
|
/** `true` when the active step is the last one - the finish step. */
|
|
2827
2716
|
readonly isActive: Signal<boolean>;
|
|
2828
2717
|
constructor();
|
|
2829
2718
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxStepperComplete, never>;
|
|
2830
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxStepperComplete, "[cngxStepperComplete]", ["cngxStepperComplete"], { "host": { "alias": "host"; "required": false; "isSignal": true; }; }, { "completed": "completed"; }, never, never, true, [{ directive: typeof i1.CngxAsyncClick; inputs: { "cngxAsyncClick": "cngxStepperComplete"; "feedbackDuration": "feedbackDuration"; "enabled": "enabled"; "succeededAnnouncement": "succeededAnnouncement"; "failedAnnouncement": "failedAnnouncement"; }; outputs: {}; }]>;
|
|
2719
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxStepperComplete, "[cngxStepperComplete]", ["cngxStepperComplete"], { "host": { "alias": "host"; "required": false; "isSignal": true; }; }, { "completed": "completed"; }, never, never, true, [{ directive: typeof i1.CngxAsyncClick; inputs: { "cngxAsyncClick": "cngxStepperComplete"; "feedbackDuration": "feedbackDuration"; "enabled": "enabled"; "succeededAnnouncement": "succeededAnnouncement"; "failedAnnouncement": "failedAnnouncement"; "showDelay": "showDelay"; "minDwell": "minDwell"; }; outputs: {}; }]>;
|
|
2831
2720
|
}
|
|
2832
2721
|
|
|
2833
2722
|
/**
|
|
@@ -2849,8 +2738,7 @@ declare class CngxStepperComplete {
|
|
|
2849
2738
|
* only). Single consumer (the footer); the surface is load-bearing, not
|
|
2850
2739
|
* speculative.
|
|
2851
2740
|
*
|
|
2852
|
-
* @
|
|
2853
|
-
* @since 0.1.0
|
|
2741
|
+
* @since 0.3.0
|
|
2854
2742
|
* @relatedTo CngxStepperFooter, CngxStepperHost
|
|
2855
2743
|
*/
|
|
2856
2744
|
declare function createStepperHostProxy(supplier: () => CngxStepperHost | null): CngxStepperHost;
|
|
@@ -2859,16 +2747,12 @@ declare function createStepperHostProxy(supplier: () => CngxStepperHost | null):
|
|
|
2859
2747
|
* How a commit-gated step change settled. `'refused'` is a `false` answer
|
|
2860
2748
|
* from `commitAction` (the action declined on purpose, nothing failed);
|
|
2861
2749
|
* `'failed'` is a throw, a rejected promise or an erroring observable.
|
|
2862
|
-
*
|
|
2863
|
-
* @category common/stepper
|
|
2864
2750
|
*/
|
|
2865
2751
|
type CngxStepperCommitResolution = 'accepted' | 'refused' | 'failed';
|
|
2866
2752
|
/**
|
|
2867
2753
|
* Adapter between the lifted commit-controller and the stepper's
|
|
2868
2754
|
* action shape. The presenter delegates to `beginTransition` on
|
|
2869
2755
|
* every step change driven by `commitAction`.
|
|
2870
|
-
*
|
|
2871
|
-
* @category common/stepper
|
|
2872
2756
|
*/
|
|
2873
2757
|
interface CngxStepperCommitHandler {
|
|
2874
2758
|
/**
|
|
@@ -2887,8 +2771,6 @@ interface CngxStepperCommitHandler {
|
|
|
2887
2771
|
}
|
|
2888
2772
|
/**
|
|
2889
2773
|
* Options for {@link createStepperCommitHandler}.
|
|
2890
|
-
*
|
|
2891
|
-
* @category common/stepper
|
|
2892
2774
|
*/
|
|
2893
2775
|
interface CngxStepperCommitHandlerOptions {
|
|
2894
2776
|
readonly controller: CngxCommitController<number>;
|
|
@@ -2898,25 +2780,20 @@ interface CngxStepperCommitHandlerOptions {
|
|
|
2898
2780
|
* Resolves `Observable<boolean>` / `Promise<boolean>` / `boolean` returns into
|
|
2899
2781
|
* one {@link CngxStepperCommitResolution}: `true` accepts, `false` refuses
|
|
2900
2782
|
* (the controller settles to `'idle'` and stores no error), a throw fails.
|
|
2901
|
-
*
|
|
2902
|
-
* @category common/stepper
|
|
2903
2783
|
*/
|
|
2904
2784
|
declare function createStepperCommitHandler(opts: CngxStepperCommitHandlerOptions): CngxStepperCommitHandler;
|
|
2905
2785
|
/**
|
|
2906
2786
|
* Factory signature for {@link CngxStepperCommitHandler}. Override
|
|
2907
2787
|
* {@link CNGX_STEPPER_COMMIT_HANDLER_FACTORY} for retry-with-backoff,
|
|
2908
2788
|
* telemetry, or offline queues.
|
|
2909
|
-
*
|
|
2910
|
-
* @category common/stepper
|
|
2911
2789
|
*/
|
|
2912
2790
|
type CngxStepperCommitHandlerFactory = (opts: CngxStepperCommitHandlerOptions) => CngxStepperCommitHandler;
|
|
2913
2791
|
/**
|
|
2914
2792
|
* DI token carrying the factory the presenter uses to allocate its commit
|
|
2915
2793
|
* handler. Symmetric to the select family's `CNGX_ARRAY_COMMIT_HANDLER_FACTORY`.
|
|
2916
2794
|
*
|
|
2917
|
-
* @category common/stepper
|
|
2918
2795
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/commit-handler.ts
|
|
2919
|
-
* @since 0.
|
|
2796
|
+
* @since 0.3.0
|
|
2920
2797
|
*/
|
|
2921
2798
|
declare const CNGX_STEPPER_COMMIT_HANDLER_FACTORY: InjectionToken<CngxStepperCommitHandlerFactory>;
|
|
2922
2799
|
|
|
@@ -2925,8 +2802,6 @@ declare const CNGX_STEPPER_COMMIT_HANDLER_FACTORY: InjectionToken<CngxStepperCom
|
|
|
2925
2802
|
* config (`CNGX_STEPPER_CONFIG`) and i18n (`CNGX_STEPPER_I18N`). Future
|
|
2926
2803
|
* surfaces widen this union and dispatch via the hidden `_target`
|
|
2927
2804
|
* discriminator.
|
|
2928
|
-
*
|
|
2929
|
-
* @category common/stepper
|
|
2930
2805
|
*/
|
|
2931
2806
|
type CngxStepperFeature = CngxStepperConfigFeature | CngxStepperI18nFeature;
|
|
2932
2807
|
/**
|
|
@@ -2946,14 +2821,11 @@ type CngxStepperFeature = CngxStepperConfigFeature | CngxStepperI18nFeature;
|
|
|
2946
2821
|
* provideCngxStepper(
|
|
2947
2822
|
* withStepperDefaultOrientation('vertical'),
|
|
2948
2823
|
* withStepperLinear(true),
|
|
2949
|
-
*
|
|
2950
|
-
* withStepperI18nLabels({ stepperLabel: 'Schrittfolge', previousStep: 'Vorheriger' }),
|
|
2824
|
+
* withStepperI18nLabels({ stepperLabel: 'Bestellschritte', previousStep: 'Vorheriger' }),
|
|
2951
2825
|
* ),
|
|
2952
2826
|
* ],
|
|
2953
2827
|
* });
|
|
2954
2828
|
* ```
|
|
2955
|
-
*
|
|
2956
|
-
* @category common/stepper
|
|
2957
2829
|
*/
|
|
2958
2830
|
declare function provideCngxStepper(...features: readonly CngxStepperFeature[]): EnvironmentProviders;
|
|
2959
2831
|
/**
|
|
@@ -2966,15 +2838,13 @@ declare function provideCngxStepper(...features: readonly CngxStepperFeature[]):
|
|
|
2966
2838
|
* viewProviders: [
|
|
2967
2839
|
* ...provideCngxStepperAt(
|
|
2968
2840
|
* withStepperDefaultOrientation('vertical'),
|
|
2969
|
-
* withStepperI18nLabels({ stepperLabel: '
|
|
2841
|
+
* withStepperI18nLabels({ stepperLabel: 'Bestellschritte' }),
|
|
2970
2842
|
* ),
|
|
2971
2843
|
* ],
|
|
2972
2844
|
* })
|
|
2973
2845
|
* ```
|
|
2974
|
-
*
|
|
2975
|
-
* @category common/stepper
|
|
2976
2846
|
*/
|
|
2977
2847
|
declare function provideCngxStepperAt(...features: readonly CngxStepperFeature[]): Provider[];
|
|
2978
2848
|
|
|
2979
|
-
export { CNGX_STEPPER_COMMIT_HANDLER_FACTORY, CNGX_STEPPER_CONFIG,
|
|
2980
|
-
export type { CngxDotStepperDotContext, CngxStepBadgeContext, CngxStepBusySpinnerContext, CngxStepContentContext, CngxStepErrorContext, CngxStepGroupHeaderContext, CngxStepGroupHost, CngxStepIndicatorContext, CngxStepLabelContext, CngxStepNode, CngxStepPanelHost, CngxStepRegistration, CngxStepRejectionContext, CngxStepStatus, CngxStepperAccnameInputs, CngxStepperAnnouncementBuilders, CngxStepperAnnouncementBuildersInputs,
|
|
2849
|
+
export { CNGX_STEPPER_COMMIT_HANDLER_FACTORY, CNGX_STEPPER_CONFIG, CNGX_STEPPER_HOST, CNGX_STEPPER_I18N, CNGX_STEPPER_LANGUAGE_EN, CNGX_STEP_GROUP_HOST, CNGX_STEP_PANEL_HOST, CngxDotStepperDot, CngxStep, CngxStepBadge, CngxStepBusySpinner, CngxStepContent, CngxStepError, CngxStepGroup, CngxStepGroupHeader, CngxStepIndicator, CngxStepLabel, CngxStepRejection, CngxStepperComplete, CngxStepperCount, CngxStepperEmpty, CngxStepperNext, CngxStepperPresenter, CngxStepperPrevious, CngxStepperRouterSync, CngxStepperSwipeNav, createStepperAccname, createStepperAnnouncementBuilders, createStepperCommitHandler, createStepperDisplayMode, createStepperGroupNavigation, createStepperGroupSummary, createStepperHostAttrs, createStepperHostProxy, createStepperPanelRefs, createStepperSlotContextBuilders, createStepperStateView, createStepperStripKeyboardNav, createStepperTemplateBindings, flatStepsEqual, injectStepperCollapse, injectStepperConfig, injectStepperI18n, provideCngxStepper, provideCngxStepperAt, provideStepperConfig, provideStepperConfigAt, provideStepperI18n, resolveStepperErrorSummary, resolveStepperStatusLabel, withDotStepperDotTemplate, withStepBadgeTemplate, withStepBusySpinnerTemplate, withStepErrorTemplate, withStepGroupHeaderTemplate, withStepIndicatorTemplate, withStepRejectionTemplate, withStepperCommitMode, withStepperConnectors, withStepperDefaultOrientation, withStepperDensity, withStepperEmptyTemplate, withStepperFallbackLabels, withStepperGroupCollapse, withStepperGroupCollapseSummary, withStepperHeaderNavigation, withStepperI18nLabels, withStepperLinear, withStepperMobileCollapse, withStepperMobileIndicatorPosition, withStepperMobileSwipe, withStepperRouterSync, withStepperSkin };
|
|
2850
|
+
export type { CngxDotStepperDotContext, CngxStepBadgeContext, CngxStepBusySpinnerContext, CngxStepContentContext, CngxStepErrorContext, CngxStepGroupHeaderContext, CngxStepGroupHost, CngxStepIndicatorContext, CngxStepLabelContext, CngxStepNode, CngxStepPanelHost, CngxStepRegistration, CngxStepRejectionContext, CngxStepStatus, CngxStepperAccnameInputs, CngxStepperAnnouncementBuilders, CngxStepperAnnouncementBuildersInputs, CngxStepperCommitAction, CngxStepperCommitHandler, CngxStepperCommitHandlerFactory, CngxStepperCommitHandlerOptions, CngxStepperCommitResolution, CngxStepperConfig, CngxStepperConfigFeature, CngxStepperCountHost, CngxStepperDensity, CngxStepperFallbackLabels, CngxStepperFeature, CngxStepperGroupCollapse, CngxStepperGroupNavigationOptions, CngxStepperGroupNavigationView, CngxStepperGroupSummary, CngxStepperGroupSummaryOptions, CngxStepperGroupSummaryView, CngxStepperHeaderNavigation, CngxStepperHost, CngxStepperHostAttrs, CngxStepperHostAttrsInputs, CngxStepperI18n, CngxStepperI18nFeature, CngxStepperI18nOverrides, CngxStepperLanguageSection, CngxStepperMobileCollapse, CngxStepperMobileIndicatorPosition, CngxStepperPanelRefs, CngxStepperPanelRefsInputs, CngxStepperSkin, CngxStepperSlotContextBuilders, CngxStepperSlotContextBuildersInputs, CngxStepperStateView, CngxStepperStatusLabels, CngxStepperStatusLanguage, CngxStepperStripKeyboardNavOptions, CngxStepperTemplateBindings, CngxStepperTemplateBindingsOptions, CngxStepperTemplates };
|