@cngx/ui 0.1.0-rc.7 → 0.1.0-rc.9
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/README.md +0 -1
- package/a11y/README.md +11 -5
- package/accordion/README.md +4 -2
- package/breadcrumb/README.md +262 -0
- package/collection/README.md +6 -0
- package/command-palette/README.md +227 -0
- package/data-grid-accordion/README.md +76 -2
- package/feedback/README.md +40 -0
- package/fesm2022/cngx-ui-a11y.mjs +189 -57
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
- package/fesm2022/cngx-ui-accordion.mjs +120 -36
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +121 -56
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +228 -108
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +180 -23
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
- package/fesm2022/cngx-ui-collection.mjs +204 -62
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +395 -119
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
- package/fesm2022/cngx-ui-context-menu.mjs +209 -40
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -101
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +16 -6
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +1074 -460
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +76 -7
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
- package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +555 -204
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-overlay.mjs +69 -13
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +553 -198
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +344 -109
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +4 -16
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +107 -8
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +146 -46
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
- package/fesm2022/cngx-ui-stepper.mjs +234 -99
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +88 -25
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +98 -23
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
- package/fesm2022/cngx-ui-toc.mjs +101 -33
- package/fesm2022/cngx-ui-toc.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +15 -20
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-paginator/README.md +9 -2
- package/mat-tabs/README.md +30 -6
- package/mat-tabs/styles/mat-tabs.css +188 -42
- package/overlay/README.md +9 -4
- package/package.json +31 -7
- package/paginator/README.md +8 -4
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +9 -0
- package/schematics/ng-add/schema.json +91 -0
- package/schematics/package.json +3 -0
- package/sidenav/README.md +33 -11
- package/speak/README.md +3 -2
- package/stepper/README.md +14 -2
- package/timeline/README.md +1 -1
- package/toc/README.md +4 -1
- package/types/cngx-ui-a11y.d.ts +121 -30
- package/types/cngx-ui-accordion.d.ts +100 -28
- package/types/cngx-ui-action-button.d.ts +44 -3
- package/types/cngx-ui-breadcrumb.d.ts +167 -60
- package/types/cngx-ui-chart-panel.d.ts +122 -18
- package/types/cngx-ui-collection.d.ts +157 -55
- package/types/cngx-ui-command-palette.d.ts +297 -183
- package/types/cngx-ui-context-menu.d.ts +140 -10
- package/types/cngx-ui-data-grid-accordion.d.ts +278 -39
- package/types/cngx-ui-empty-state.d.ts +9 -2
- package/types/cngx-ui-feedback.d.ts +605 -59
- package/types/cngx-ui-mat-accordion.d.ts +30 -1
- package/types/cngx-ui-mat-paginator.d.ts +37 -8
- package/types/cngx-ui-mat-stepper.d.ts +23 -11
- package/types/cngx-ui-mat-tabs.d.ts +250 -34
- package/types/cngx-ui-overlay.d.ts +56 -10
- package/types/cngx-ui-paginator.d.ts +425 -136
- package/types/cngx-ui-sidenav.d.ts +248 -74
- package/types/cngx-ui-skeleton.d.ts +6 -7
- package/types/cngx-ui-speak.d.ts +118 -5
- package/types/cngx-ui-stat-card.d.ts +117 -33
- package/types/cngx-ui-stepper.d.ts +88 -49
- package/types/cngx-ui-tabs.d.ts +6 -4
- package/types/cngx-ui-timeline.d.ts +35 -11
- package/types/cngx-ui-toc.d.ts +93 -16
- package/types/cngx-ui.d.ts +7 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _cngx_common_stepper from '@cngx/common/stepper';
|
|
2
|
-
import { CngxStepPanelHost, CngxStepperSkin, CngxStepperHeaderNavigation, CngxStepperMobileIndicatorPosition, CngxStepErrorContext, CngxStepperSwipeNav, CngxStepNode, CngxStepLabelContext, CngxStepContentContext, CngxDotStepperDotContext, CngxStepperHost } from '@cngx/common/stepper';
|
|
2
|
+
import { CngxStepPanelHost, CngxStepperSkin, CngxStepperHeaderNavigation, CngxStepperMobileIndicatorPosition, CngxStepperI18n, CngxStepErrorContext, CngxStepperSwipeNav, CngxStepNode, CngxStepperStateView, CngxStepLabelContext, CngxStepContentContext, CngxDotStepperDotContext, CngxStepperHost } from '@cngx/common/stepper';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
4
|
import { Signal, TemplateRef } from '@angular/core';
|
|
5
5
|
import * as i2 from '@cngx/common/a11y';
|
|
@@ -24,6 +24,7 @@ import * as i2 from '@cngx/common/a11y';
|
|
|
24
24
|
* @slot cngxStepRejection Renders the reason a rolled-back step was refused.
|
|
25
25
|
* @slot cngxStepGroupHeader Replaces the header a step group renders above its steps.
|
|
26
26
|
* @slot cngxStepperEmpty Renders when no step is projected at all.
|
|
27
|
+
* @slot cngxDotStepperDot Replaces the body of each dot in the dots mobile-collapse branch.
|
|
27
28
|
* @playground Material theme coverage across all skins ./examples/material-theme-coverage/skins-coverage.component.ts
|
|
28
29
|
* <example-url>http://localhost:4200/#/ui/stepper/stepper-horizontal/three-step-wizard</example-url>
|
|
29
30
|
* <example-url>http://localhost:4200/#/ui/stepper/stepper-vertical/vertical-sidebar-layout</example-url>
|
|
@@ -70,7 +71,7 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
70
71
|
readonly mobileIndicatorPosition: _angular_core.InputSignal<CngxStepperMobileIndicatorPosition | undefined>;
|
|
71
72
|
/** Stepper-host contract; exposed so external `<cngx-stepper-count>` / bridge consumers can `[host]="s.presenter"` via `#s="cngxStepper"`. */
|
|
72
73
|
readonly presenter: _cngx_common_stepper.CngxStepperHost;
|
|
73
|
-
protected readonly i18n:
|
|
74
|
+
protected readonly i18n: Signal<CngxStepperI18n>;
|
|
74
75
|
protected readonly config: _cngx_common_stepper.CngxStepperConfig;
|
|
75
76
|
private readonly hostElement;
|
|
76
77
|
private readonly injector;
|
|
@@ -82,10 +83,12 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
82
83
|
private readonly errorSlot;
|
|
83
84
|
private readonly groupHeaderSlot;
|
|
84
85
|
private readonly emptySlot;
|
|
86
|
+
private readonly dotSlot;
|
|
85
87
|
/** Default-template glyph source - read by `#defaultBadge` / `#defaultRejection` outlets. */
|
|
86
88
|
protected readonly glyphs: {
|
|
87
89
|
readonly errorBadge: "!";
|
|
88
90
|
readonly rejectionIcon: "!";
|
|
91
|
+
readonly refusedIcon: "\u2298";
|
|
89
92
|
};
|
|
90
93
|
/**
|
|
91
94
|
* Template cascade (indicator/badge/busySpinner/rejection/stepError/
|
|
@@ -94,14 +97,6 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
94
97
|
*/
|
|
95
98
|
protected readonly templates: _cngx_common_stepper.CngxStepperTemplateBindings;
|
|
96
99
|
protected readonly displayMode: Signal<"classic" | "text" | "dots">;
|
|
97
|
-
/**
|
|
98
|
-
* Space-driven density rung for the classic strip, measured off the
|
|
99
|
-
* host element's own width via {@link createStripDensity}. `'full'`
|
|
100
|
-
* under the `'comfortable'` default. Drives `[data-strip-density]` (the
|
|
101
|
-
* strip-overflow rung, distinct from the global `[data-density]` spacing
|
|
102
|
-
* swap so strip degradation never re-scales component spacing).
|
|
103
|
-
*/
|
|
104
|
-
protected readonly stripDensity: Signal<_cngx_common_stepper.CngxStripDensity>;
|
|
105
100
|
/**
|
|
106
101
|
* `true` when `density: 'auto'` is active. Drives `[data-density-auto]`,
|
|
107
102
|
* which makes the strip absorb a too-narrow container by shrinking +
|
|
@@ -111,6 +106,7 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
111
106
|
*/
|
|
112
107
|
protected readonly isDensityAuto: Signal<boolean>;
|
|
113
108
|
constructor();
|
|
109
|
+
private readonly fallbackLabels;
|
|
114
110
|
/** Stepper landmark role-description with config + i18n cascade. */
|
|
115
111
|
protected readonly stepperRoleDescription: Signal<string>;
|
|
116
112
|
/** Resolved skin / connectors / mobile-indicator host attrs (Level-2 cascade helper). */
|
|
@@ -140,9 +136,12 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
140
136
|
/** Mobile-swipe navigation host directive (Level-2 composition). */
|
|
141
137
|
protected readonly swipeNav: CngxStepperSwipeNav;
|
|
142
138
|
protected statusLabelFor: (node: CngxStepNode) => string;
|
|
143
|
-
/** Mobile-dot `data-state`:
|
|
139
|
+
/** Mobile-dot `data-state`: the error marker (rejection + aggregator) over the raw status. */
|
|
144
140
|
protected mobileDotState(node: CngxStepNode): string;
|
|
145
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Mobile-dot `aria-label`, appending the errored status when the dot has
|
|
143
|
+
* an error, or the refused status when its step change was refused.
|
|
144
|
+
*/
|
|
146
145
|
protected mobileDotAriaLabel(node: CngxStepNode, index: number): string;
|
|
147
146
|
protected readonly groupRoleDescription: Signal<string>;
|
|
148
147
|
/**
|
|
@@ -176,9 +175,7 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
176
175
|
* enters the branch at its first reachable step. Level-2 factory.
|
|
177
176
|
*/
|
|
178
177
|
protected readonly groupNavigation: _cngx_common_stepper.CngxStepperGroupNavigationView;
|
|
179
|
-
/**
|
|
180
|
-
* `aria-label` cascade: input → `ariaLabels.stepperRegion` → `i18n.stepperLabel`.
|
|
181
|
-
*/
|
|
178
|
+
/** Shared accname cascade (input → `ariaLabels.stepperRegion` → `i18n.stepperLabel`). */
|
|
182
179
|
protected readonly resolvedAriaLabel: Signal<string | null>;
|
|
183
180
|
private readonly stepDirectiveById;
|
|
184
181
|
readonly flatSteps: Signal<readonly CngxStepNode[]>;
|
|
@@ -208,7 +205,7 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
208
205
|
* which otherwise rendered only `Step N of M` (text) or `node.state()`
|
|
209
206
|
* (dots) and dropped the per-step error the desktop branch shows.
|
|
210
207
|
*/
|
|
211
|
-
protected readonly stateView:
|
|
208
|
+
protected readonly stateView: CngxStepperStateView;
|
|
212
209
|
/**
|
|
213
210
|
* Aggregate error phrase for the mobile-collapse text branch. Feeds the
|
|
214
211
|
* real reason (the `[error]` string / aggregator label) through the
|
|
@@ -219,14 +216,19 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
219
216
|
protected readonly mobileErrorSummary: Signal<string>;
|
|
220
217
|
/** Commit-in-flight flag - drives the host `aria-busy` binding.*/
|
|
221
218
|
protected readonly isCommitting: Signal<boolean>;
|
|
222
|
-
protected stepHeaderId(node: CngxStepNode)
|
|
223
|
-
protected stepPanelId(node: CngxStepNode)
|
|
219
|
+
protected stepHeaderId: (node: CngxStepNode) => string;
|
|
220
|
+
protected stepPanelId: (node: CngxStepNode) => string;
|
|
224
221
|
/**
|
|
225
222
|
* Live-region + per-step + group SR phrase builders (Level-2 factory);
|
|
226
223
|
* also owns the descriptor-span id scheme and the gated
|
|
227
224
|
* `aria-describedby` reference the template binds directly.
|
|
228
225
|
*/
|
|
229
226
|
protected readonly announcement: _cngx_common_stepper.CngxStepperAnnouncementBuilders;
|
|
227
|
+
/**
|
|
228
|
+
* Mode-aware panel naming (Level-2 factory): header-less panels
|
|
229
|
+
* self-name and drop the describedby ref instead of dangling.
|
|
230
|
+
*/
|
|
231
|
+
protected readonly panelRefs: _cngx_common_stepper.CngxStepperPanelRefs;
|
|
230
232
|
protected handleHeaderClick(node: CngxStepNode): void;
|
|
231
233
|
/**
|
|
232
234
|
* `true` when the step header at `node` may be navigated to right now:
|
|
@@ -261,7 +263,7 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
261
263
|
labelTemplateFor(id: string): TemplateRef<CngxStepLabelContext> | null;
|
|
262
264
|
contentTemplateFor(id: string): TemplateRef<CngxStepContentContext> | null;
|
|
263
265
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxStepper, never>;
|
|
264
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxStepper, "cngx-stepper", ["cngxStepper"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; "connectors": { "alias": "connectors"; "required": false; "isSignal": true; }; "headerNavigation": { "alias": "headerNavigation"; "required": false; "isSignal": true; }; "showStepCount": { "alias": "showStepCount"; "required": false; "isSignal": true; }; "mobileIndicatorPosition": { "alias": "mobileIndicatorPosition"; "required": false; "isSignal": true; }; }, {}, ["stepDirectives", "indicatorSlot", "badgeSlot", "busySpinnerSlot", "rejectionSlot", "errorSlot", "groupHeaderSlot", "emptySlot"], ["cngx-stepper-footer, [cngxStepperFooter]"], true, [{ directive: typeof _cngx_common_stepper.CngxStepperPresenter; inputs: { "activeStepIndex": "activeStepIndex"; "linear": "linear"; "orientation": "orientation"; "commitAction": "commitAction"; "commitMode": "commitMode"; }; outputs: { "activeStepIndexChange": "activeStepIndexChange"; }; }, { directive: typeof i2.CngxRovingTabindex; inputs: { "orientation": "orientation"; }; outputs: {}; }, { directive: typeof _cngx_common_stepper.CngxStepperSwipeNav; inputs: { "mobileSwipe": "mobileSwipe"; }; outputs: {}; }, { directive: typeof i2.CngxFocusRestore; inputs: {}; outputs: {}; }]>;
|
|
266
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxStepper, "cngx-stepper", ["cngxStepper"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; "connectors": { "alias": "connectors"; "required": false; "isSignal": true; }; "headerNavigation": { "alias": "headerNavigation"; "required": false; "isSignal": true; }; "showStepCount": { "alias": "showStepCount"; "required": false; "isSignal": true; }; "mobileIndicatorPosition": { "alias": "mobileIndicatorPosition"; "required": false; "isSignal": true; }; }, {}, ["stepDirectives", "indicatorSlot", "badgeSlot", "busySpinnerSlot", "rejectionSlot", "errorSlot", "groupHeaderSlot", "emptySlot", "dotSlot"], ["cngx-stepper-footer, [cngxStepperFooter]"], true, [{ directive: typeof _cngx_common_stepper.CngxStepperPresenter; inputs: { "activeStepIndex": "activeStepIndex"; "linear": "linear"; "orientation": "orientation"; "commitAction": "commitAction"; "commitMode": "commitMode"; }; outputs: { "activeStepIndexChange": "activeStepIndexChange"; }; }, { directive: typeof i2.CngxRovingTabindex; inputs: { "orientation": "orientation"; }; outputs: {}; }, { directive: typeof _cngx_common_stepper.CngxStepperSwipeNav; inputs: { "mobileSwipe": "mobileSwipe"; }; outputs: {}; }, { directive: typeof i2.CngxFocusRestore; inputs: {}; outputs: {}; }]>;
|
|
265
267
|
}
|
|
266
268
|
|
|
267
269
|
/**
|
|
@@ -274,7 +276,10 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
274
276
|
* `completedPercent()` is `computed` from `presenter.activeStepIndex()`
|
|
275
277
|
* and the count of step nodes in `presenter.flatSteps()`. Optional
|
|
276
278
|
* `[showStepCount]` adds a `Step N of M` caption sourced from
|
|
277
|
-
* `CngxStepperI18n.textStepperFormat`.
|
|
279
|
+
* `CngxStepperI18n.textStepperFormat`. Accname and
|
|
280
|
+
* `aria-roledescription` resolve through the same config + i18n
|
|
281
|
+
* cascades as `<cngx-stepper>`; a step-less flow renders the
|
|
282
|
+
* `CNGX_STEPPER_CONFIG` empty-template cascade instead of the bar.
|
|
278
283
|
*
|
|
279
284
|
* @category ui/stepper
|
|
280
285
|
* @docsKind primary
|
|
@@ -282,6 +287,7 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
282
287
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/stepper/progress-bar-stepper.component.ts
|
|
283
288
|
* @since 0.1.0
|
|
284
289
|
* @relatedTo CngxStepperPresenter, CngxProgress, CngxDotStepper, CngxTextStepper
|
|
290
|
+
* @slot cngxStepperEmpty Renders when no step is projected at all.
|
|
285
291
|
* @playground Material theme coverage across variants ./examples/material-theme-coverage/variants-coverage.component.ts
|
|
286
292
|
* <example-url>http://localhost:4200/#/ui/stepper/progress-bar/onboarding-flow</example-url>
|
|
287
293
|
*/
|
|
@@ -291,11 +297,23 @@ declare class CngxProgressBarStepper {
|
|
|
291
297
|
/** Render a `Step N of M` caption below the bar. Off by default. */
|
|
292
298
|
readonly showStepCount: _angular_core.InputSignal<boolean>;
|
|
293
299
|
protected readonly presenter: _cngx_common_stepper.CngxStepperHost;
|
|
294
|
-
protected readonly i18n: _cngx_common_stepper.CngxStepperI18n
|
|
300
|
+
protected readonly i18n: _angular_core.Signal<_cngx_common_stepper.CngxStepperI18n>;
|
|
301
|
+
protected readonly config: _cngx_common_stepper.CngxStepperConfig;
|
|
302
|
+
/** Shared accname cascade (input → `ariaLabels.stepperRegion` → `i18n.stepperLabel`). */
|
|
303
|
+
protected readonly resolvedAriaLabel: _angular_core.Signal<string | null>;
|
|
304
|
+
private readonly fallbackLabels;
|
|
305
|
+
/** Landmark role-description with config + i18n cascade, mirroring `<cngx-stepper>`. */
|
|
306
|
+
protected readonly stepperRoleDescription: _angular_core.Signal<string>;
|
|
307
|
+
private readonly emptySlot;
|
|
308
|
+
/**
|
|
309
|
+
* Empty-state cascade mirroring `<cngx-stepper>`: per-instance
|
|
310
|
+
* `*cngxStepperEmpty` > `CNGX_STEPPER_CONFIG.templates.empty` > `null`.
|
|
311
|
+
* Gates the whole bar so a step-less flow shows the placeholder
|
|
312
|
+
* instead of a full bar captioned `Step 0 of 0`.
|
|
313
|
+
*/
|
|
314
|
+
protected readonly resolvedEmptyTemplate: _angular_core.Signal<TemplateRef<void> | null>;
|
|
295
315
|
/** Shared per-step/aggregate state derivations - the single error source. */
|
|
296
316
|
protected readonly stateView: _cngx_common_stepper.CngxStepperStateView;
|
|
297
|
-
/** Default error glyph for the error caption. */
|
|
298
|
-
protected readonly errorGlyph: "!";
|
|
299
317
|
/** Total step count (group nodes excluded). */
|
|
300
318
|
protected readonly totalSteps: _angular_core.Signal<number>;
|
|
301
319
|
/** 1-based active position used in the caption format. */
|
|
@@ -307,20 +325,21 @@ declare class CngxProgressBarStepper {
|
|
|
307
325
|
protected readonly completedPercent: _angular_core.Signal<number>;
|
|
308
326
|
protected readonly captionText: _angular_core.Signal<string>;
|
|
309
327
|
/**
|
|
310
|
-
* Aggregate error caption. A single
|
|
311
|
-
* (`"Payment: Errored"`
|
|
312
|
-
*
|
|
328
|
+
* Aggregate error caption. A single marked step names itself
|
|
329
|
+
* (`"Payment: Errored"`, or `"Payment: Not allowed"` for a refused step
|
|
330
|
+
* change), several collapse to the i18n count phrase. Empty when no step
|
|
331
|
+
* is marked, which keeps the error line quiet.
|
|
313
332
|
*/
|
|
314
333
|
protected readonly errorText: _angular_core.Signal<string>;
|
|
315
334
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxProgressBarStepper, never>;
|
|
316
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxProgressBarStepper, "cngx-progress-bar-stepper", ["cngxProgressBarStepper"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "showStepCount": { "alias": "showStepCount"; "required": false; "isSignal": true; }; }, {},
|
|
335
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxProgressBarStepper, "cngx-progress-bar-stepper", ["cngxProgressBarStepper"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "showStepCount": { "alias": "showStepCount"; "required": false; "isSignal": true; }; }, {}, ["emptySlot"], never, true, [{ directive: typeof _cngx_common_stepper.CngxStepperPresenter; inputs: { "activeStepIndex": "activeStepIndex"; "linear": "linear"; }; outputs: { "activeStepIndexChange": "activeStepIndexChange"; }; }]>;
|
|
317
336
|
}
|
|
318
337
|
|
|
319
338
|
/**
|
|
320
339
|
* Dot stepper variant. Mobile-first sequential-flow indicator. Renders
|
|
321
340
|
* one labelled `<span role="img">` per step (a name-permitting role, so
|
|
322
341
|
* each dot announces "Step N of M: label") inside a
|
|
323
|
-
* `<div role="group" aria-roledescription="
|
|
342
|
+
* `<div role="group" aria-roledescription="step indicator">`. The active
|
|
324
343
|
* dot carries `aria-current="step"` per the W3C APG step-indicator
|
|
325
344
|
* pattern (NOT `role="tablist"` / `role="tab"` - those are reserved
|
|
326
345
|
* for parallel content panels, not sequential flow).
|
|
@@ -346,14 +365,17 @@ declare class CngxProgressBarStepper {
|
|
|
346
365
|
* @since 0.1.0
|
|
347
366
|
* @relatedTo CngxStepperPresenter, CngxProgressBarStepper, CngxTextStepper
|
|
348
367
|
* @slot cngxDotStepperDot Replaces one dot; gets its index and active state.
|
|
368
|
+
* @slot cngxStepperEmpty Renders when no step is projected at all.
|
|
349
369
|
* <example-url>http://localhost:4200/#/ui/stepper/dot-stepper/mobile-carousel</example-url>
|
|
350
370
|
*/
|
|
351
371
|
declare class CngxDotStepper {
|
|
352
372
|
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
353
373
|
readonly ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
354
374
|
protected readonly presenter: _cngx_common_stepper.CngxStepperHost;
|
|
355
|
-
protected readonly i18n: _cngx_common_stepper.CngxStepperI18n
|
|
375
|
+
protected readonly i18n: Signal<_cngx_common_stepper.CngxStepperI18n>;
|
|
356
376
|
protected readonly config: _cngx_common_stepper.CngxStepperConfig;
|
|
377
|
+
/** Shared accname cascade (input → `ariaLabels.stepperRegion` → `i18n.stepperLabel`). */
|
|
378
|
+
protected readonly resolvedAriaLabel: Signal<string | null>;
|
|
357
379
|
/** Mobile-swipe routing surface composed via hostDirectives. */
|
|
358
380
|
protected readonly swipeNav: CngxStepperSwipeNav;
|
|
359
381
|
/** Document writing direction - flips the inline next/previous arrows under `rtl` (APG). */
|
|
@@ -362,8 +384,6 @@ declare class CngxDotStepper {
|
|
|
362
384
|
protected readonly activeIndex: Signal<number>;
|
|
363
385
|
/** Shared per-step/aggregate state derivations - the single error source. */
|
|
364
386
|
protected readonly stateView: _cngx_common_stepper.CngxStepperStateView;
|
|
365
|
-
/** Default error glyph for the aggregate error line. */
|
|
366
|
-
protected readonly errorGlyph: "!";
|
|
367
387
|
/**
|
|
368
388
|
* Aggregate error line. The dot row only colours the errored dot, so
|
|
369
389
|
* the real reason (the `[error]` string / aggregator label) needs a
|
|
@@ -372,6 +392,14 @@ declare class CngxDotStepper {
|
|
|
372
392
|
*/
|
|
373
393
|
protected readonly errorText: Signal<string>;
|
|
374
394
|
private readonly dotSlot;
|
|
395
|
+
private readonly emptySlot;
|
|
396
|
+
/**
|
|
397
|
+
* Empty-state cascade mirroring `<cngx-stepper>`: per-instance
|
|
398
|
+
* `*cngxStepperEmpty` > `CNGX_STEPPER_CONFIG.templates.empty` > `null`.
|
|
399
|
+
* Gates the dot row so a step-less flow shows the placeholder
|
|
400
|
+
* instead of an empty group.
|
|
401
|
+
*/
|
|
402
|
+
protected readonly resolvedEmptyTemplate: Signal<TemplateRef<void> | null>;
|
|
375
403
|
/**
|
|
376
404
|
* Resolved dot-body template cascade: per-instance `*cngxDotStepperDot`
|
|
377
405
|
* directive > `CNGX_STEPPER_CONFIG.templates.dotStepperDot` > `null`
|
|
@@ -382,9 +410,10 @@ declare class CngxDotStepper {
|
|
|
382
410
|
protected isActive(node: CngxStepNode, index: number): boolean;
|
|
383
411
|
protected isCompleted(index: number): boolean;
|
|
384
412
|
/**
|
|
385
|
-
* Resolved `data-state` for the dot: `'error'` whenever the
|
|
386
|
-
*
|
|
387
|
-
* literal `state === 'error'`), otherwise the raw
|
|
413
|
+
* Resolved `data-state` for the dot: `'error'` whenever the error marker
|
|
414
|
+
* fires (covers a commit rejection of either kind and the error
|
|
415
|
+
* aggregator, not just a literal `state === 'error'`), otherwise the raw
|
|
416
|
+
* step status.
|
|
388
417
|
*/
|
|
389
418
|
protected dotState(node: CngxStepNode): string;
|
|
390
419
|
protected ariaLabelFor(node: CngxStepNode, index: number): string;
|
|
@@ -392,17 +421,19 @@ declare class CngxDotStepper {
|
|
|
392
421
|
protected dotContextFor(node: CngxStepNode, index: number): CngxDotStepperDotContext;
|
|
393
422
|
protected handleKeyDown(event: KeyboardEvent): void;
|
|
394
423
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDotStepper, never>;
|
|
395
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxDotStepper, "cngx-dot-stepper", ["cngxDotStepper"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; }, {}, ["dotSlot"], never, true, [{ directive: typeof _cngx_common_stepper.CngxStepperPresenter; inputs: { "activeStepIndex": "activeStepIndex"; "linear": "linear"; }; outputs: { "activeStepIndexChange": "activeStepIndexChange"; }; }, { directive: typeof _cngx_common_stepper.CngxStepperSwipeNav; inputs: { "mobileSwipe": "mobileSwipe"; }; outputs: {}; }]>;
|
|
424
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxDotStepper, "cngx-dot-stepper", ["cngxDotStepper"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; }, {}, ["dotSlot", "emptySlot"], never, true, [{ directive: typeof _cngx_common_stepper.CngxStepperPresenter; inputs: { "activeStepIndex": "activeStepIndex"; "linear": "linear"; }; outputs: { "activeStepIndexChange": "activeStepIndexChange"; }; }, { directive: typeof _cngx_common_stepper.CngxStepperSwipeNav; inputs: { "mobileSwipe": "mobileSwipe"; }; outputs: {}; }]>;
|
|
396
425
|
}
|
|
397
426
|
|
|
398
427
|
/**
|
|
399
|
-
* Text stepper variant. Smallest possible stepper:
|
|
400
|
-
* `<span aria-live="polite">` driven by the presenter
|
|
401
|
-
* `Step
|
|
428
|
+
* Text stepper variant. Smallest possible stepper: an always-mounted
|
|
429
|
+
* `<span aria-live="polite">` driven by the presenter (empty while no
|
|
430
|
+
* step is projected, so a live load never announces `Step 0 of 0`).
|
|
431
|
+
* Renders `Step N of M` by default (sourced from
|
|
402
432
|
* `CngxStepperI18n.textStepperFormat`); optional `[showCurrentLabel]`
|
|
403
|
-
* appends the active step's label next to the count.
|
|
404
|
-
*
|
|
405
|
-
*
|
|
433
|
+
* appends the active step's label next to the count. A step-less flow
|
|
434
|
+
* renders the `CNGX_STEPPER_CONFIG` empty-template cascade instead.
|
|
435
|
+
* Material consumers inherit surrounding text styling via CSS
|
|
436
|
+
* inheritance, no theme bridge required.
|
|
406
437
|
*
|
|
407
438
|
* @category ui/stepper
|
|
408
439
|
* @docsKind primary
|
|
@@ -410,30 +441,38 @@ declare class CngxDotStepper {
|
|
|
410
441
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/stepper/text-stepper.component.ts
|
|
411
442
|
* @since 0.1.0
|
|
412
443
|
* @relatedTo CngxStepperPresenter, CngxProgressBarStepper, CngxDotStepper
|
|
444
|
+
* @slot cngxStepperEmpty Renders when no step is projected at all.
|
|
413
445
|
* <example-url>http://localhost:4200/#/ui/stepper/text-stepper/inline-progress</example-url>
|
|
414
446
|
*/
|
|
415
447
|
declare class CngxTextStepper {
|
|
416
448
|
/** Append the active step's label to the count text. Off by default. */
|
|
417
449
|
readonly showCurrentLabel: _angular_core.InputSignal<boolean>;
|
|
418
450
|
protected readonly presenter: _cngx_common_stepper.CngxStepperHost;
|
|
419
|
-
protected readonly i18n: _cngx_common_stepper.CngxStepperI18n
|
|
451
|
+
protected readonly i18n: Signal<_cngx_common_stepper.CngxStepperI18n>;
|
|
452
|
+
protected readonly config: _cngx_common_stepper.CngxStepperConfig;
|
|
453
|
+
private readonly emptySlot;
|
|
454
|
+
/**
|
|
455
|
+
* Empty-state cascade mirroring `<cngx-stepper>`: per-instance
|
|
456
|
+
* `*cngxStepperEmpty` > `CNGX_STEPPER_CONFIG.templates.empty` > `null`.
|
|
457
|
+
* Rendered next to the (empty) live span so a step-less flow shows
|
|
458
|
+
* the placeholder instead of a bare `Step 0 of 0` count.
|
|
459
|
+
*/
|
|
460
|
+
protected readonly resolvedEmptyTemplate: Signal<TemplateRef<void> | null>;
|
|
420
461
|
protected readonly stepNodes: Signal<readonly CngxStepNode[]>;
|
|
421
462
|
/** Shared per-step/aggregate state derivations - the single error source. */
|
|
422
463
|
protected readonly stateView: _cngx_common_stepper.CngxStepperStateView;
|
|
423
|
-
/** Default error glyph for the error sub-line. */
|
|
424
|
-
protected readonly errorGlyph: "!";
|
|
425
464
|
protected readonly totalSteps: Signal<number>;
|
|
426
465
|
protected readonly currentStep: Signal<number>;
|
|
427
466
|
protected readonly stepText: Signal<string>;
|
|
428
467
|
/**
|
|
429
|
-
* Aggregate error sub-line text. A single
|
|
430
|
-
* (`"Payment: Errored"`
|
|
431
|
-
* (`"2 errors"`).
|
|
432
|
-
*
|
|
468
|
+
* Aggregate error sub-line text. A single marked step names itself
|
|
469
|
+
* (`"Payment: Errored"`, or `"Payment: Not allowed"` for a refused step
|
|
470
|
+
* change), several collapse to the i18n count phrase (`"2 errors"`).
|
|
471
|
+
* Empty when no step is marked, which keeps the error line quiet.
|
|
433
472
|
*/
|
|
434
473
|
protected readonly errorText: Signal<string>;
|
|
435
474
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTextStepper, never>;
|
|
436
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxTextStepper, "cngx-text-stepper", ["cngxTextStepper"], { "showCurrentLabel": { "alias": "showCurrentLabel"; "required": false; "isSignal": true; }; }, {},
|
|
475
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxTextStepper, "cngx-text-stepper", ["cngxTextStepper"], { "showCurrentLabel": { "alias": "showCurrentLabel"; "required": false; "isSignal": true; }; }, {}, ["emptySlot"], never, true, [{ directive: typeof _cngx_common_stepper.CngxStepperPresenter; inputs: { "activeStepIndex": "activeStepIndex"; "linear": "linear"; }; outputs: { "activeStepIndexChange": "activeStepIndexChange"; }; }]>;
|
|
437
476
|
}
|
|
438
477
|
|
|
439
478
|
/**
|
package/types/cngx-ui-tabs.d.ts
CHANGED
|
@@ -97,12 +97,13 @@ declare class CngxTabGroup implements CngxTabPanelHost {
|
|
|
97
97
|
*/
|
|
98
98
|
readonly addable: _angular_core.InputSignal<boolean | undefined>;
|
|
99
99
|
protected readonly presenter: _cngx_common_tabs.CngxTabGroupHost;
|
|
100
|
-
protected readonly i18n: _cngx_common_tabs.CngxTabsI18n
|
|
100
|
+
protected readonly i18n: Signal<_cngx_common_tabs.CngxTabsI18n>;
|
|
101
101
|
protected readonly config: _cngx_common_tabs.CngxTabsConfig;
|
|
102
102
|
/** Default-glyph table for the template's fallback spans. */
|
|
103
103
|
protected readonly glyphs: {
|
|
104
104
|
readonly errorBadge: "!";
|
|
105
105
|
readonly rejectionIcon: "!";
|
|
106
|
+
readonly refusedIcon: "\u2298";
|
|
106
107
|
readonly closeIcon: "\u00D7";
|
|
107
108
|
readonly addIcon: "+";
|
|
108
109
|
};
|
|
@@ -246,8 +247,9 @@ declare class CngxTabGroup implements CngxTabPanelHost {
|
|
|
246
247
|
protected busySpinnerContextFor(tab: CngxTabHandle): CngxTabBusySpinnerContext;
|
|
247
248
|
/**
|
|
248
249
|
* Context for `*cngxTabRejectionIcon`. `originLabel` matches the
|
|
249
|
-
* `liveAnnouncement` priority chain so visual + SR phrasing align
|
|
250
|
-
*
|
|
250
|
+
* `liveAnnouncement` priority chain so visual + SR phrasing align;
|
|
251
|
+
* `reason` is the kind of the outcome that set the marker (a refusal
|
|
252
|
+
* or a failure). Allocates fresh per CD for the same reason as
|
|
251
253
|
* {@link busySpinnerContextFor}.
|
|
252
254
|
*/
|
|
253
255
|
protected rejectionIconContextFor(failedIndex: number): CngxTabRejectionIconContext;
|
|
@@ -373,7 +375,7 @@ declare class CngxTabNav {
|
|
|
373
375
|
*/
|
|
374
376
|
declare class CngxTabOverflow {
|
|
375
377
|
protected readonly panelHost: CngxTabPanelHost;
|
|
376
|
-
protected readonly i18n: _cngx_common_tabs.CngxTabsI18n
|
|
378
|
+
protected readonly i18n: _angular_core.Signal<_cngx_common_tabs.CngxTabsI18n>;
|
|
377
379
|
protected readonly popover: _angular_core.Signal<CngxPopover>;
|
|
378
380
|
private readonly adRef;
|
|
379
381
|
private readonly hostElement;
|
|
@@ -2,7 +2,7 @@ import * as _cngx_common_data from '@cngx/common/data';
|
|
|
2
2
|
import { AsyncView } from '@cngx/common/data';
|
|
3
3
|
import * as _cngx_ui_timeline from '@cngx/ui/timeline';
|
|
4
4
|
import * as _cngx_common_timeline from '@cngx/common/timeline';
|
|
5
|
-
import { CngxTimelineMarkerHost, TimelineDateAccessor, TimelineGroupBy, TimelineDirection, TimelineGroup, CngxTimelineItemContext, CngxTimelineConfig, CngxTimelineDateHeaderContext, CngxTimelineMarkerContext, CngxTimelineEmptyContext, CngxTimelineErrorContext, CngxTimelineRetryButtonContext, CngxTimelineTemplates } from '@cngx/common/timeline';
|
|
5
|
+
import { CngxTimelineMarkerHost, TimelineDateAccessor, TimelineGroupBy, TimelineDirection, TimelineGroup, CngxTimelineItemContext, CngxTimelineSkeletonContext, CngxTimelineConfig, CngxTimelineDateHeaderContext, CngxTimelineMarkerContext, CngxTimelineEmptyContext, CngxTimelineErrorContext, CngxTimelineRetryButtonContext, CngxTimelineTemplates } from '@cngx/common/timeline';
|
|
6
6
|
import * as _angular_core from '@angular/core';
|
|
7
7
|
import { Signal, InjectionToken, TemplateRef } from '@angular/core';
|
|
8
8
|
import { EmptyReason } from '@cngx/common/card';
|
|
@@ -141,10 +141,12 @@ type CngxTimelineOrientation = 'vertical' | 'horizontal';
|
|
|
141
141
|
* <example-url>http://localhost:4200/#/ui/timeline/async/error-retry</example-url>
|
|
142
142
|
* <example-url>http://localhost:4200/#/ui/timeline/async/refreshing-tail</example-url>
|
|
143
143
|
* <example-url>http://localhost:4200/#/ui/timeline/skins/activity-vs-narrative</example-url>
|
|
144
|
+
* <example-url>http://localhost:4200/#/ui/timeline/skins/dark</example-url>
|
|
144
145
|
* @since 0.1.0
|
|
145
146
|
*/
|
|
146
147
|
declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
147
148
|
private readonly config;
|
|
149
|
+
private readonly configLabels;
|
|
148
150
|
private readonly groupingFactory;
|
|
149
151
|
private readonly uid;
|
|
150
152
|
/**
|
|
@@ -237,7 +239,7 @@ declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
|
237
239
|
protected readonly errorTpl: Signal<_angular_core.TemplateRef<_cngx_common_timeline.CngxTimelineErrorContext> | null>;
|
|
238
240
|
protected readonly retryButtonTpl: Signal<_angular_core.TemplateRef<_cngx_common_timeline.CngxTimelineRetryButtonContext> | null>;
|
|
239
241
|
protected readonly loadingTailTpl: Signal<_angular_core.TemplateRef<void> | null>;
|
|
240
|
-
protected readonly skeletonTpl: Signal<_angular_core.TemplateRef<
|
|
242
|
+
protected readonly skeletonTpl: Signal<_angular_core.TemplateRef<CngxTimelineSkeletonContext> | null>;
|
|
241
243
|
/**
|
|
242
244
|
* Forwarding façade over the bound `[state]`, published through
|
|
243
245
|
* `CNGX_STATEFUL`. Every member delegates, so swapping the bound state (or
|
|
@@ -245,7 +247,14 @@ declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
|
245
247
|
*/
|
|
246
248
|
readonly asyncState: CngxAsyncState<readonly T[]>;
|
|
247
249
|
/** @internal Fallback copy for every surface with no slot bound. */
|
|
248
|
-
protected readonly labels: _cngx_ui_timeline.CngxTimelineFallbackCopy
|
|
250
|
+
protected readonly labels: Signal<_cngx_ui_timeline.CngxTimelineFallbackCopy>;
|
|
251
|
+
private readonly locale;
|
|
252
|
+
private readonly groupFormatter;
|
|
253
|
+
/**
|
|
254
|
+
* @internal Group header formatter: `labels.groupLabel` bound to the live
|
|
255
|
+
* app locale, so a `CNGX_LOCALE` flip re-formats the headers.
|
|
256
|
+
*/
|
|
257
|
+
protected readonly groupHeaderLabel: Signal<(group: TimelineGroup<unknown>) => string>;
|
|
249
258
|
/** @internal The body switch, the busy flag and the live-region text. */
|
|
250
259
|
private readonly view;
|
|
251
260
|
protected readonly activeView: Signal<_cngx_common_data.AsyncView>;
|
|
@@ -285,6 +294,13 @@ declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
|
285
294
|
* content will - which is what keeps the swap from reflowing.
|
|
286
295
|
*/
|
|
287
296
|
protected rowSide(index: number): 'start' | 'end';
|
|
297
|
+
/**
|
|
298
|
+
* One context per skeleton row, rebuilt only when the row count or the
|
|
299
|
+
* side rule changes, so the slot outlet sees a stable object per pass.
|
|
300
|
+
*/
|
|
301
|
+
private readonly skeletonContexts;
|
|
302
|
+
/** @internal Context of a consumer `*cngxTimelineSkeleton` row. */
|
|
303
|
+
protected skeletonContext(index: number, count: number): CngxTimelineSkeletonContext;
|
|
288
304
|
/** @internal Track by consumer identity when given, else by reference. */
|
|
289
305
|
protected trackItem: (index: number, item: T) => unknown;
|
|
290
306
|
constructor();
|
|
@@ -294,7 +310,7 @@ declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
|
294
310
|
|
|
295
311
|
/**
|
|
296
312
|
* The fallback copy the timeline renders when a consumer bound no slot for
|
|
297
|
-
* a surface, resolved
|
|
313
|
+
* a surface, resolved from the config cascade.
|
|
298
314
|
*
|
|
299
315
|
* @category ui/timeline
|
|
300
316
|
*/
|
|
@@ -304,7 +320,7 @@ interface CngxTimelineFallbackCopy {
|
|
|
304
320
|
readonly emptyFallback: string;
|
|
305
321
|
readonly loading: string;
|
|
306
322
|
readonly refreshing: string;
|
|
307
|
-
readonly groupLabel: (group: TimelineGroup<unknown
|
|
323
|
+
readonly groupLabel: (group: TimelineGroup<unknown>, locale: string) => string;
|
|
308
324
|
}
|
|
309
325
|
/**
|
|
310
326
|
* Flattens the config's optional label bag into the exact set the template
|
|
@@ -312,6 +328,10 @@ interface CngxTimelineFallbackCopy {
|
|
|
312
328
|
* accessor, and the optional-chaining lives in one place instead of at every
|
|
313
329
|
* use site.
|
|
314
330
|
*
|
|
331
|
+
* Returns a `Signal`: when the config's `labels` is a `Signal` (as it is once
|
|
332
|
+
* `withTimelineLabels` ran), the copy follows a runtime language switch. The
|
|
333
|
+
* bundle keeps its reference while the resolved strings stay equal.
|
|
334
|
+
*
|
|
315
335
|
* `groupLabel` keeps the band's key as its own last resort: a consumer who
|
|
316
336
|
* clears the formatter should still get a legible header rather than an
|
|
317
337
|
* empty one that leaves the group unnamed.
|
|
@@ -319,7 +339,7 @@ interface CngxTimelineFallbackCopy {
|
|
|
319
339
|
* @category ui/timeline
|
|
320
340
|
* @since 0.1.0
|
|
321
341
|
*/
|
|
322
|
-
declare function createTimelineFallbackCopy(config: CngxTimelineConfig): CngxTimelineFallbackCopy
|
|
342
|
+
declare function createTimelineFallbackCopy(config: CngxTimelineConfig): Signal<CngxTimelineFallbackCopy>;
|
|
323
343
|
|
|
324
344
|
/**
|
|
325
345
|
* Everything the template needs to decide what the body shows.
|
|
@@ -349,6 +369,10 @@ interface CngxTimelineView {
|
|
|
349
369
|
* - **Busy with an empty screen.** The lookup table resolves a non-first-load
|
|
350
370
|
* `loading` or `pending` to `content`; with no rows that renders nothing at
|
|
351
371
|
* all, so it is treated as a load instead. `refreshing` keeps its tail.
|
|
372
|
+
* - **First-load busy over seed rows.** The lookup table resolves a first
|
|
373
|
+
* load to `skeleton` unconditionally, but `[items]` documents seed rows as
|
|
374
|
+
* a legitimate companion to a bound state - rows that exist are painted,
|
|
375
|
+
* never hidden behind placeholders. `aria-busy` still marks the list.
|
|
352
376
|
*
|
|
353
377
|
* Swap the whole mapping through {@link CNGX_TIMELINE_VIEW_FACTORY} rather
|
|
354
378
|
* than forking the organism - treating `pending` as content, or holding the
|
|
@@ -358,13 +382,13 @@ interface CngxTimelineView {
|
|
|
358
382
|
* @relatedTo CNGX_TIMELINE_VIEW_FACTORY
|
|
359
383
|
* @since 0.1.0
|
|
360
384
|
*/
|
|
361
|
-
declare function createTimelineView(state: () => CngxAsyncState<unknown> | undefined, isEmpty: () => boolean, labels: CngxTimelineFallbackCopy): CngxTimelineView;
|
|
385
|
+
declare function createTimelineView(state: () => CngxAsyncState<unknown> | undefined, isEmpty: () => boolean, labels: Signal<CngxTimelineFallbackCopy>): CngxTimelineView;
|
|
362
386
|
/**
|
|
363
387
|
* The shape {@link CNGX_TIMELINE_VIEW_FACTORY} hands out.
|
|
364
388
|
*
|
|
365
389
|
* @category ui/timeline
|
|
366
390
|
*/
|
|
367
|
-
type CngxTimelineViewFactory = (state: () => CngxAsyncState<unknown> | undefined, isEmpty: () => boolean, labels: CngxTimelineFallbackCopy) => CngxTimelineView;
|
|
391
|
+
type CngxTimelineViewFactory = (state: () => CngxAsyncState<unknown> | undefined, isEmpty: () => boolean, labels: Signal<CngxTimelineFallbackCopy>) => CngxTimelineView;
|
|
368
392
|
/**
|
|
369
393
|
* Swap point for the body-view mapping. Override it to reshape when the
|
|
370
394
|
* timeline shows a skeleton, content, the empty surface or the error
|
|
@@ -441,7 +465,7 @@ interface CngxTimelineSlotQueries<T> {
|
|
|
441
465
|
readonly error: Signal<CngxTimelineSlotSource<CngxTimelineErrorContext> | undefined>;
|
|
442
466
|
readonly retryButton: Signal<CngxTimelineSlotSource<CngxTimelineRetryButtonContext> | undefined>;
|
|
443
467
|
readonly loadingTail: Signal<CngxTimelineSlotSource<void> | undefined>;
|
|
444
|
-
readonly skeleton: Signal<CngxTimelineSlotSource<
|
|
468
|
+
readonly skeleton: Signal<CngxTimelineSlotSource<CngxTimelineSkeletonContext> | undefined>;
|
|
445
469
|
}
|
|
446
470
|
/**
|
|
447
471
|
* The same eight, resolved. Every member is already through the cascade, so
|
|
@@ -457,7 +481,7 @@ interface CngxTimelineSlots<T> {
|
|
|
457
481
|
readonly error: Signal<TemplateRef<CngxTimelineErrorContext> | null>;
|
|
458
482
|
readonly retryButton: Signal<TemplateRef<CngxTimelineRetryButtonContext> | null>;
|
|
459
483
|
readonly loadingTail: Signal<TemplateRef<void> | null>;
|
|
460
|
-
readonly skeleton: Signal<TemplateRef<
|
|
484
|
+
readonly skeleton: Signal<TemplateRef<CngxTimelineSkeletonContext> | null>;
|
|
461
485
|
}
|
|
462
486
|
/**
|
|
463
487
|
* Runs {@link createTimelineSlotBinding} over the whole slot set at once, so
|
|
@@ -476,4 +500,4 @@ interface CngxTimelineSlots<T> {
|
|
|
476
500
|
declare function createTimelineSlots<T>(queries: CngxTimelineSlotQueries<T>, templates: () => CngxTimelineTemplates | undefined): CngxTimelineSlots<T>;
|
|
477
501
|
|
|
478
502
|
export { CNGX_TIMELINE_VIEW_FACTORY, CngxTimeline, createTimelineFallbackCopy, createTimelineSlotBinding, createTimelineSlots, createTimelineView };
|
|
479
|
-
export type { CngxTimelineFallbackCopy, CngxTimelineMode, CngxTimelineSkin, CngxTimelineSlotQueries, CngxTimelineSlotSource, CngxTimelineSlots, CngxTimelineView, CngxTimelineViewFactory };
|
|
503
|
+
export type { CngxTimelineFallbackCopy, CngxTimelineMode, CngxTimelineOrientation, CngxTimelinePlacement, CngxTimelineRail, CngxTimelineSkin, CngxTimelineSlotQueries, CngxTimelineSlotSource, CngxTimelineSlots, CngxTimelineView, CngxTimelineViewFactory };
|