@cngx/ui 0.1.0-rc.8 → 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/command-palette/README.md +5 -2
- package/fesm2022/cngx-ui-accordion.mjs +19 -2
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +10 -7
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +55 -15
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-collection.mjs +10 -0
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +2 -2
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
- package/fesm2022/cngx-ui-context-menu.mjs +60 -6
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +87 -7
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +63 -32
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +3 -2
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +264 -86
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +67 -21
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +19 -5
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-stepper.mjs +65 -53
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +84 -25
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +28 -6
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
- package/fesm2022/cngx-ui-toc.mjs +32 -8
- package/fesm2022/cngx-ui-toc.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +1 -1
- package/mat-tabs/README.md +30 -6
- package/mat-tabs/styles/mat-tabs.css +180 -33
- package/package.json +31 -7
- 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/stepper/README.md +1 -1
- package/types/cngx-ui-accordion.d.ts +9 -2
- package/types/cngx-ui-breadcrumb.d.ts +14 -3
- package/types/cngx-ui-collection.d.ts +10 -0
- package/types/cngx-ui-context-menu.d.ts +42 -4
- package/types/cngx-ui-data-grid-accordion.d.ts +4 -1
- package/types/cngx-ui-feedback.d.ts +11 -3
- package/types/cngx-ui-mat-accordion.d.ts +3 -2
- package/types/cngx-ui-mat-tabs.d.ts +44 -21
- package/types/cngx-ui-paginator.d.ts +22 -7
- package/types/cngx-ui-stepper.d.ts +23 -23
- package/types/cngx-ui-tabs.d.ts +4 -2
- package/types/cngx-ui-timeline.d.ts +12 -4
- package/types/cngx-ui-toc.d.ts +13 -3
|
@@ -96,10 +96,13 @@ interface CngxContextMenuPanel<T = unknown> {
|
|
|
96
96
|
* inline-end (`right-start` + the submenu flip chain), open non-exclusively so
|
|
97
97
|
* the parent panel survives, and mirror the parent's per-open datum. Owns the
|
|
98
98
|
* submenu placement policy so a projected item drives one seam instead of
|
|
99
|
-
* reaching into the popover's override signals.
|
|
100
|
-
*
|
|
99
|
+
* reaching into the popover's override signals. `parent` is the panel the
|
|
100
|
+
* opening item sits in; the submenu forwards activation to it, so a
|
|
101
|
+
* submenu parent at any depth opens by click or Enter through the root
|
|
102
|
+
* trigger. Optional: an ejected panel skin may omit it and drive its own
|
|
103
|
+
* popover directly.
|
|
101
104
|
*/
|
|
102
|
-
openAsSubmenu?(context: T | null): void;
|
|
105
|
+
openAsSubmenu?(context: T | null, parent?: CngxContextMenuPanel<T>): void;
|
|
103
106
|
/**
|
|
104
107
|
* @internal Register the trigger core's keydown handler so the panel can
|
|
105
108
|
* forward ArrowRight/ArrowLeft/Escape submenu routing to it. The core owns
|
|
@@ -118,6 +121,22 @@ interface CngxContextMenuPanel<T = unknown> {
|
|
|
118
121
|
* Optional: an ejected panel skin may omit it.
|
|
119
122
|
*/
|
|
120
123
|
setActivationHandler?(handler: (() => void) | null): void;
|
|
124
|
+
/**
|
|
125
|
+
* @internal Run the activation routing for an `activated` event of this
|
|
126
|
+
* panel or of a submenu opened from it: the trigger's activation handler
|
|
127
|
+
* when this panel was opened by a trigger, else the parent panel's. Optional:
|
|
128
|
+
* an ejected panel skin may omit it, in which case activation inside its
|
|
129
|
+
* submenus is not routed.
|
|
130
|
+
*/
|
|
131
|
+
handleActivated?(): void;
|
|
132
|
+
/**
|
|
133
|
+
* @internal Route a keydown of this panel or of a submenu opened from it:
|
|
134
|
+
* the trigger's keydown handler when this panel was opened by a trigger,
|
|
135
|
+
* else the parent panel's, so ArrowLeft / ArrowRight / Escape reach the
|
|
136
|
+
* root trigger core from any depth. Optional alongside
|
|
137
|
+
* {@link handleActivated}.
|
|
138
|
+
*/
|
|
139
|
+
routeKeydown?(event: KeyboardEvent): void;
|
|
121
140
|
/**
|
|
122
141
|
* @internal Register the trigger core's push-only "submenu opened" handler.
|
|
123
142
|
* A projected item calls {@link noteActiveSubmenuOpened} after its
|
|
@@ -232,14 +251,30 @@ declare class CngxContextMenu<T = unknown> implements CngxContextMenuPanel<T> {
|
|
|
232
251
|
* reaching into the popover's `@internal` override setters - the ejected item
|
|
233
252
|
* skin stays off `CngxPopover` internals (decompose).
|
|
234
253
|
*/
|
|
235
|
-
openAsSubmenu(context: T | null): void;
|
|
254
|
+
openAsSubmenu(context: T | null, parent?: CngxContextMenuPanel<T>): void;
|
|
236
255
|
/** Keydown forwarder registered by the trigger; `null` while none is bound. */
|
|
237
256
|
private keydownHandler;
|
|
238
257
|
/** Activation forwarder registered by the trigger; `null` while none bound. */
|
|
239
258
|
private activationHandler;
|
|
240
259
|
/** Push-only submenu-note forwarder registered by the trigger; `null` while none bound. */
|
|
241
260
|
private submenuNoteHandler;
|
|
261
|
+
/**
|
|
262
|
+
* The panel whose item opened this one as a submenu, `null` for a trigger
|
|
263
|
+
* open. Reset to `null` whenever this panel opens or closes, so a direct
|
|
264
|
+
* reopen never routes to the parent of an earlier open. Activation, keydown
|
|
265
|
+
* and the submenu note climb it to the root, whose trigger core resolves the
|
|
266
|
+
* deepest open menu itself.
|
|
267
|
+
*/
|
|
268
|
+
private readonly openedFrom;
|
|
269
|
+
/**
|
|
270
|
+
* Set while this panel routes an event up the parent chain. A chain that
|
|
271
|
+
* leads back to a panel already routing is a submenu cycle; the event stops
|
|
272
|
+
* there instead of recursing without end.
|
|
273
|
+
*/
|
|
274
|
+
private routingUp;
|
|
242
275
|
constructor();
|
|
276
|
+
/** @internal Route an activation to the trigger, else up the parent chain. */
|
|
277
|
+
handleActivated(): void;
|
|
243
278
|
/**
|
|
244
279
|
* @internal Register the trigger core's keydown handler. The core owns
|
|
245
280
|
* submenu ArrowRight/ArrowLeft/Escape routing, but open moves focus into
|
|
@@ -259,6 +294,9 @@ declare class CngxContextMenu<T = unknown> implements CngxContextMenuPanel<T> {
|
|
|
259
294
|
* ran, so the trigger's focus stack records an externally opened submenu
|
|
260
295
|
* (idempotent no-op for stack-driven hover/click opens). */
|
|
261
296
|
noteActiveSubmenuOpened(): void;
|
|
297
|
+
/** @internal Route a keydown to the trigger, else up the parent chain. */
|
|
298
|
+
routeKeydown(event: KeyboardEvent): void;
|
|
299
|
+
private routeUp;
|
|
262
300
|
protected handleKeydown(event: KeyboardEvent): void;
|
|
263
301
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxContextMenu<any>, never>;
|
|
264
302
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxContextMenu<any>, "cngx-context-menu", ["cngxContextMenu"], {}, {}, ["contentTemplate"], ["*"], true, [{ directive: typeof i1.CngxPopover; inputs: { "offset": "offset"; "closeOnEscape": "closeOnEscape"; }; outputs: {}; }, { directive: typeof i1$1.CngxMenu; inputs: { "label": "ariaLabel"; }; outputs: {}; }]>;
|
|
@@ -267,6 +267,9 @@ interface CngxDataGridAccordionLabels {
|
|
|
267
267
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/master-detail</example-url>
|
|
268
268
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/spreadsheet</example-url>
|
|
269
269
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/density</example-url>
|
|
270
|
+
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/ledger</example-url>
|
|
271
|
+
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/log-stream</example-url>
|
|
272
|
+
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/report</example-url>
|
|
270
273
|
*/
|
|
271
274
|
declare class CngxDataGridAccordion implements CngxDataGridAccordionContext {
|
|
272
275
|
private readonly config;
|
|
@@ -606,8 +609,8 @@ declare class CngxDataGridRow {
|
|
|
606
609
|
* label applies.
|
|
607
610
|
*/
|
|
608
611
|
readonly errorMessage: _angular_core.InputSignal<string | undefined>;
|
|
609
|
-
private readonly accordion;
|
|
610
612
|
protected readonly grid: _cngx_ui_data_grid_accordion.CngxDataGridAccordionContext;
|
|
613
|
+
private readonly accordion;
|
|
611
614
|
protected readonly regionId: string;
|
|
612
615
|
protected readonly headerId: string;
|
|
613
616
|
protected readonly cellsId: string;
|
|
@@ -338,6 +338,8 @@ declare class CngxAlert {
|
|
|
338
338
|
private readonly config;
|
|
339
339
|
private readonly i18n;
|
|
340
340
|
private readonly destroyRef;
|
|
341
|
+
private readonly announcer;
|
|
342
|
+
private readonly hostElement;
|
|
341
343
|
/** Alert severity - determines visual style, default icon, and ARIA role. */
|
|
342
344
|
readonly severity: _angular_core.InputSignal<AlertSeverity>;
|
|
343
345
|
/** Optional title displayed above the content. */
|
|
@@ -374,7 +376,6 @@ declare class CngxAlert {
|
|
|
374
376
|
private readonly manualDismissed;
|
|
375
377
|
private readonly autoDismissed;
|
|
376
378
|
private readonly collapsedState;
|
|
377
|
-
private readonly announcementState;
|
|
378
379
|
/** @internal - animation phase, drives host CSS classes. */
|
|
379
380
|
protected readonly visibilityPhase: _angular_core.WritableSignal<AlertVisibilityPhase>;
|
|
380
381
|
private readonly autoDismissTimer;
|
|
@@ -417,8 +418,6 @@ declare class CngxAlert {
|
|
|
417
418
|
* language.
|
|
418
419
|
*/
|
|
419
420
|
protected readonly dismissLabel: _angular_core.Signal<string>;
|
|
420
|
-
/** @internal - SR announcement text for state transitions. */
|
|
421
|
-
protected readonly announcement: _angular_core.Signal<string>;
|
|
422
421
|
private readonly effectiveCollapseDelay;
|
|
423
422
|
constructor();
|
|
424
423
|
private beginEnter;
|
|
@@ -2057,8 +2056,17 @@ declare class CngxAsyncContainer<T> {
|
|
|
2057
2056
|
* @internal - flash-suppressed first-load skeleton view. A sub-`showDelay` first
|
|
2058
2057
|
* load never renders the skeleton outlet; once shown it holds for `minDwell`. The
|
|
2059
2058
|
* region `aria-busy` stays truthful (`state().isBusy()`); only the visual is gated.
|
|
2059
|
+
* See {@link renderedView} for which exits wait for the hold.
|
|
2060
2060
|
*/
|
|
2061
2061
|
protected readonly skeletonVisible: _angular_core.Signal<boolean>;
|
|
2062
|
+
/**
|
|
2063
|
+
* @internal - the view the template renders. While a shown first-load skeleton
|
|
2064
|
+
* is still inside its `minDwell`, a `content` or `empty` result waits and swaps
|
|
2065
|
+
* in when the dwell ends. An `error` replaces the skeleton immediately, and a
|
|
2066
|
+
* reset to idle (`none`) clears it immediately. The live-region announcement
|
|
2067
|
+
* follows the status, not this view, so AT hears the result without the delay.
|
|
2068
|
+
*/
|
|
2069
|
+
protected readonly renderedView: _angular_core.Signal<AsyncView>;
|
|
2062
2070
|
/** @internal - flash-suppressed refresh bar, gated by the same showDelay + minDwell. */
|
|
2063
2071
|
protected readonly refreshVisible: _angular_core.Signal<boolean>;
|
|
2064
2072
|
/** @internal */
|
|
@@ -74,8 +74,9 @@ declare class CngxMatAccordion {
|
|
|
74
74
|
* open-set stores for that panel - making a pre-populated
|
|
75
75
|
* `[(openIds)]` model addressable (the generated
|
|
76
76
|
* `cngx-mat-panel-N` ids are unknowable to consumers). The
|
|
77
|
-
* function must return a stable, unique id per panel instance
|
|
78
|
-
* `MatExpansionPanel.id`
|
|
77
|
+
* function must return a stable, unique id per panel instance.
|
|
78
|
+
* `MatExpansionPanel.id` is a readonly id the CDK generates, so it is
|
|
79
|
+
* not known up front; key panels from your own data instead.
|
|
79
80
|
* Unbound, ids fall back to generated `nextUid` values. Swapping
|
|
80
81
|
* the bound function at runtime re-keys future events but does not
|
|
81
82
|
* migrate ids already stored in `openIds` - bind it once.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as i1 from '@cngx/common/tabs';
|
|
2
|
-
import { CngxTabHandle, CngxTabOverflowDomAdapter } from '@cngx/common/tabs';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
4
2
|
import { Signal, WritableSignal, InjectionToken, Injector, OnInit, TemplateRef, EnvironmentProviders, Provider } from '@angular/core';
|
|
3
|
+
import * as i1 from '@cngx/common/tabs';
|
|
4
|
+
import { CngxTabHandle, CngxTabOverflowDomAdapter } from '@cngx/common/tabs';
|
|
5
5
|
import { MatTab } from '@angular/material/tabs';
|
|
6
6
|
import { CngxErrorAggregatorContract } from '@cngx/common/interactive';
|
|
7
7
|
import { MatStepperIconContext } from '@angular/material/stepper';
|
|
@@ -222,10 +222,9 @@ declare class CngxMatTabs {
|
|
|
222
222
|
private readonly viewContainerRef;
|
|
223
223
|
private readonly overflowRef;
|
|
224
224
|
private readonly aggregatorContentSlot;
|
|
225
|
-
private readonly aggregatorContentTemplate;
|
|
226
225
|
private readonly matTabsConfig;
|
|
227
226
|
private readonly rejectionContentSlot;
|
|
228
|
-
private readonly
|
|
227
|
+
private readonly decorationTemplates;
|
|
229
228
|
private readonly i18n;
|
|
230
229
|
private readonly rejectionState;
|
|
231
230
|
private readonly aggregatedErrorTabs;
|
|
@@ -273,10 +272,12 @@ declare class CngxMatTabs {
|
|
|
273
272
|
* the live-region announcer come for free, identical to the cngx
|
|
274
273
|
* organism (Pillar 2 - same communication across skins).
|
|
275
274
|
*
|
|
276
|
-
* Decoration content-template slots
|
|
277
|
-
* `*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
275
|
+
* Decoration content-template slots resolve as on `[cngxMatTabs]`:
|
|
276
|
+
* a projected `*cngxMatTabRejectionContent` wins over
|
|
277
|
+
* `provideMatTabsConfig(withMatTabRejectionTemplate(...))`, and a
|
|
278
|
+
* projected `*cngxMatTabAggregatorContent` replaces the aggregated error
|
|
279
|
+
* summary; without either, the projectors render their built-in
|
|
280
|
+
* `cngx-sr-only` text.
|
|
280
281
|
*
|
|
281
282
|
* @playground Native router tabs with a CanDeactivate guard ./examples/router-nav/router-nav.component.ts
|
|
282
283
|
*
|
|
@@ -286,6 +287,8 @@ declare class CngxMatTabs {
|
|
|
286
287
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tab-nav.directive.ts
|
|
287
288
|
* @since 0.1.0
|
|
288
289
|
* @relatedTo CngxMatTabLink, CngxMatTabs, CngxTabsRouteSync
|
|
290
|
+
* @slot cngxMatTabAggregatorContent Replaces the aggregated error summary projected into a Material tab.
|
|
291
|
+
* @slot cngxMatTabRejectionContent Replaces the rejection notice on a rolled-back Material tab.
|
|
289
292
|
*/
|
|
290
293
|
declare class CngxMatTabNav {
|
|
291
294
|
private readonly presenter;
|
|
@@ -293,7 +296,12 @@ declare class CngxMatTabNav {
|
|
|
293
296
|
private readonly injector;
|
|
294
297
|
private readonly renderer;
|
|
295
298
|
private readonly hostEl;
|
|
299
|
+
private readonly viewContainerRef;
|
|
300
|
+
private readonly matTabsConfig;
|
|
296
301
|
private readonly i18n;
|
|
302
|
+
private readonly aggregatorContentSlot;
|
|
303
|
+
private readonly rejectionContentSlot;
|
|
304
|
+
private readonly decorationTemplates;
|
|
297
305
|
private readonly rejectionState;
|
|
298
306
|
private readonly aggregatedErrorTabs;
|
|
299
307
|
constructor();
|
|
@@ -304,7 +312,7 @@ declare class CngxMatTabNav {
|
|
|
304
312
|
*/
|
|
305
313
|
clearLastFailed(): void;
|
|
306
314
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxMatTabNav, never>;
|
|
307
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabNav, "[cngxMatTabNav]", ["cngxMatTabNav"], {}, {},
|
|
315
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabNav, "[cngxMatTabNav]", ["cngxMatTabNav"], {}, {}, ["aggregatorContentSlot", "rejectionContentSlot"], never, true, [{ directive: typeof i1.CngxTabGroupPresenter; inputs: { "activeIndex": "activeIndex"; }; outputs: { "activeIndexChange": "activeIndexChange"; }; }]>;
|
|
308
316
|
}
|
|
309
317
|
|
|
310
318
|
/**
|
|
@@ -334,7 +342,6 @@ declare class CngxMatTabNav {
|
|
|
334
342
|
* @relatedTo CngxMatTabNav, CngxMatTabs, CngxTab
|
|
335
343
|
*/
|
|
336
344
|
declare class CngxMatTabLink implements OnInit {
|
|
337
|
-
private readonly matLink;
|
|
338
345
|
private readonly host;
|
|
339
346
|
private readonly destroyRef;
|
|
340
347
|
/**
|
|
@@ -354,12 +361,19 @@ declare class CngxMatTabLink implements OnInit {
|
|
|
354
361
|
readonly error: i0.InputSignal<string | boolean>;
|
|
355
362
|
/** Optional rich error aggregator for the link. */
|
|
356
363
|
readonly errorAggregator: i0.InputSignal<CngxErrorAggregatorContract | undefined>;
|
|
364
|
+
/**
|
|
365
|
+
* Disabled state of the link. Angular binds `[disabled]` to every
|
|
366
|
+
* directive on the element that declares the input, so `MatTabLink`
|
|
367
|
+
* and this directive read one template binding and the handle tracks
|
|
368
|
+
* it live. An imperative write to the `MatTabLink` instance is not
|
|
369
|
+
* seen; the template binding is the contract.
|
|
370
|
+
*/
|
|
371
|
+
readonly disabled: i0.InputSignalWithTransform<boolean, unknown>;
|
|
357
372
|
private readonly errorMessage;
|
|
358
373
|
private readonly hasError;
|
|
359
|
-
private readonly disabledState;
|
|
360
374
|
ngOnInit(): void;
|
|
361
375
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxMatTabLink, never>;
|
|
362
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabLink, "[cngxMatTabLink]", ["cngxMatTabLink"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorAggregator": { "alias": "errorAggregator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
376
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabLink, "[cngxMatTabLink]", ["cngxMatTabLink"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorAggregator": { "alias": "errorAggregator"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
363
377
|
}
|
|
364
378
|
|
|
365
379
|
/**
|
|
@@ -391,9 +405,7 @@ declare class CngxMatTabLink implements OnInit {
|
|
|
391
405
|
* @relatedTo CngxMatTabs, CngxMatTabsRegistry, CngxMatTabRejectionContent
|
|
392
406
|
*/
|
|
393
407
|
declare class CngxMatTabError {
|
|
394
|
-
private readonly
|
|
395
|
-
private readonly registry;
|
|
396
|
-
private readonly presenter;
|
|
408
|
+
private readonly target;
|
|
397
409
|
private readonly destroyRef;
|
|
398
410
|
readonly aggregator: i0.InputSignalWithTransform<CngxErrorAggregatorContract | undefined, "" | CngxErrorAggregatorContract | undefined>;
|
|
399
411
|
constructor();
|
|
@@ -407,7 +419,11 @@ declare class CngxMatTabError {
|
|
|
407
419
|
* `string | boolean` writes the per-handle `directError` slot, which
|
|
408
420
|
* folds into the handle's `hasError` / `errorMessage`. A non-empty
|
|
409
421
|
* string doubles as the SR descriptor message; `true` marks the tab
|
|
410
|
-
* invalid with no message; `false` / `''` clear it.
|
|
422
|
+
* invalid with no message; `false` / `''` clear it. The folded state
|
|
423
|
+
* drives the same header decoration as the aggregator: the
|
|
424
|
+
* `cngx-mat-tab--has-errors` badge plus an SR-only descriptor span
|
|
425
|
+
* referenced through `aria-describedby` (message, else the
|
|
426
|
+
* `tabHasErrors` i18n phrase), removed again when the flag clears.
|
|
411
427
|
*
|
|
412
428
|
* Symmetric with `[cngxMatTabError]` (one directive, one
|
|
413
429
|
* responsibility - Pillar 3): the aggregator stays the rich
|
|
@@ -427,9 +443,7 @@ declare class CngxMatTabError {
|
|
|
427
443
|
* @relatedTo CngxMatTabs, CngxMatTabError, CngxMatTabsRegistry
|
|
428
444
|
*/
|
|
429
445
|
declare class CngxMatTabErrorFlag {
|
|
430
|
-
private readonly
|
|
431
|
-
private readonly registry;
|
|
432
|
-
private readonly presenter;
|
|
446
|
+
private readonly target;
|
|
433
447
|
private readonly destroyRef;
|
|
434
448
|
readonly error: i0.InputSignalWithTransform<string | boolean, string | boolean>;
|
|
435
449
|
constructor();
|
|
@@ -535,8 +549,11 @@ declare class CngxMatTabAggregatorContent {
|
|
|
535
549
|
* resolves to a handle with a non-empty label) - `undefined` when
|
|
536
550
|
* no labelled rollback origin is resolvable; `fallbackText` is the
|
|
537
551
|
* built-in i18n phrase the imperative fallback path would write
|
|
538
|
-
* verbatim (typically `commitRolledBackTo(
|
|
539
|
-
* origin is resolvable, `commitFailedRetry` otherwise
|
|
552
|
+
* verbatim (for a failure typically `commitRolledBackTo(origin)`
|
|
553
|
+
* when the origin is resolvable, `commitFailedRetry` otherwise; for a
|
|
554
|
+
* refusal `commitRefused(origin)` or `commitRefusedGeneric`; a
|
|
555
|
+
* label-less origin is named `unlabeledTab(position)`);
|
|
556
|
+
* `reason` is the kind of the outcome.
|
|
540
557
|
*
|
|
541
558
|
* **Re-instantiation warning.** The decoration projector destroys
|
|
542
559
|
* the embedded view and creates a fresh one on every `descriptorText`
|
|
@@ -568,6 +585,12 @@ interface CngxMatTabRejectionContentContext {
|
|
|
568
585
|
* decoration (icon, branded prefix, retry CTA).
|
|
569
586
|
*/
|
|
570
587
|
readonly fallbackText: string;
|
|
588
|
+
/**
|
|
589
|
+
* Why the commit did not land: `'refused'` when the commit action
|
|
590
|
+
* answered `false`, `'failed'` when it threw, rejected or errored.
|
|
591
|
+
* Pick copy or an icon per reason; `fallbackText` already follows it.
|
|
592
|
+
*/
|
|
593
|
+
readonly reason: 'refused' | 'failed';
|
|
571
594
|
}
|
|
572
595
|
/**
|
|
573
596
|
* Structural slot directive marking the rejection-descriptor
|
|
@@ -2,7 +2,7 @@ import * as _cngx_ui_paginator from '@cngx/ui/paginator';
|
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { TemplateRef, InjectionToken, Signal, EnvironmentProviders, Provider } from '@angular/core';
|
|
4
4
|
import * as i1 from '@cngx/common/data';
|
|
5
|
-
import { CngxPaginate } from '@cngx/common/data';
|
|
5
|
+
import { CngxPaginate, CngxBucketPaginateHost } from '@cngx/common/data';
|
|
6
6
|
import { CngxMessage } from '@cngx/core/i18n';
|
|
7
7
|
|
|
8
8
|
/** Visual skin. Paint-only - structure, ARIA, and keyboard behaviour are identical across values. */
|
|
@@ -883,7 +883,7 @@ declare class CngxPaginatorInfinite {
|
|
|
883
883
|
* <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/alphabetical</example-url>
|
|
884
884
|
*/
|
|
885
885
|
declare class CngxPaginatorAlpha {
|
|
886
|
-
protected readonly host:
|
|
886
|
+
protected readonly host: CngxBucketPaginateHost;
|
|
887
887
|
protected readonly ariaLabels: _angular_core.Signal<_cngx_ui_paginator.CngxPaginatorAriaLabels>;
|
|
888
888
|
/**
|
|
889
889
|
* Roving focus cursor. A `linkedSignal` so the strip's single tab stop tracks
|
|
@@ -1068,9 +1068,12 @@ interface CngxPaginatorConfig {
|
|
|
1068
1068
|
*/
|
|
1069
1069
|
declare const CNGX_PAGINATOR_DEFAULTS: CngxPaginatorConfig;
|
|
1070
1070
|
/**
|
|
1071
|
-
* Configuration cascade token. Resolution priority (high
|
|
1072
|
-
*
|
|
1073
|
-
*
|
|
1071
|
+
* Configuration cascade token. Resolution priority (high -> low):
|
|
1072
|
+
* 1. Per-instance Input binding.
|
|
1073
|
+
* 2. `provideCngxPaginatorConfigAt(...)` in a parent component's
|
|
1074
|
+
* `viewProviders` (component-scoped override).
|
|
1075
|
+
* 3. `provideCngxPaginatorConfig(...)` at the application root.
|
|
1076
|
+
* 4. Library defaults.
|
|
1074
1077
|
*
|
|
1075
1078
|
* @category ui/paginator
|
|
1076
1079
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
@@ -1223,10 +1226,22 @@ declare function withPaginatorPageSizeOptions(payload: readonly number[]): CngxP
|
|
|
1223
1226
|
* per-instance `*cngxPaginatorLoading` slot still wins over this tier; it only
|
|
1224
1227
|
* applies where no instance slot is projected.
|
|
1225
1228
|
*
|
|
1229
|
+
* A `TemplateRef` exists only once a view renders, so it cannot go into the
|
|
1230
|
+
* root providers or `viewProviders`. Build the scope from the rendered
|
|
1231
|
+
* template and hand it to `ngTemplateOutlet`:
|
|
1232
|
+
*
|
|
1226
1233
|
* ```ts
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1234
|
+
* private readonly injector = inject(Injector);
|
|
1235
|
+
* private readonly spinnerTpl = viewChild.required<TemplateRef<void>>('spinner');
|
|
1236
|
+
* protected readonly pagerScope = computed(() =>
|
|
1237
|
+
* Injector.create({
|
|
1238
|
+
* parent: this.injector,
|
|
1239
|
+
* providers: [
|
|
1240
|
+
* provideCngxPaginatorConfigAt(withPaginatorTemplates({ loading: this.spinnerTpl() })),
|
|
1241
|
+
* ],
|
|
1242
|
+
* }),
|
|
1229
1243
|
* );
|
|
1244
|
+
* // <ng-container *ngTemplateOutlet="pagerTpl; injector: pagerScope()" />
|
|
1230
1245
|
* ```
|
|
1231
1246
|
*
|
|
1232
1247
|
* @category ui/paginator
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _cngx_common_stepper from '@cngx/common/stepper';
|
|
2
|
-
import { CngxStepPanelHost, CngxStepperSkin, CngxStepperHeaderNavigation, CngxStepperMobileIndicatorPosition, CngxStepperI18n, 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>
|
|
@@ -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 +
|
|
@@ -141,9 +136,12 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
141
136
|
/** Mobile-swipe navigation host directive (Level-2 composition). */
|
|
142
137
|
protected readonly swipeNav: CngxStepperSwipeNav;
|
|
143
138
|
protected statusLabelFor: (node: CngxStepNode) => string;
|
|
144
|
-
/** Mobile-dot `data-state`:
|
|
139
|
+
/** Mobile-dot `data-state`: the error marker (rejection + aggregator) over the raw status. */
|
|
145
140
|
protected mobileDotState(node: CngxStepNode): string;
|
|
146
|
-
/**
|
|
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
|
+
*/
|
|
147
145
|
protected mobileDotAriaLabel(node: CngxStepNode, index: number): string;
|
|
148
146
|
protected readonly groupRoleDescription: Signal<string>;
|
|
149
147
|
/**
|
|
@@ -207,7 +205,7 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
207
205
|
* which otherwise rendered only `Step N of M` (text) or `node.state()`
|
|
208
206
|
* (dots) and dropped the per-step error the desktop branch shows.
|
|
209
207
|
*/
|
|
210
|
-
protected readonly stateView:
|
|
208
|
+
protected readonly stateView: CngxStepperStateView;
|
|
211
209
|
/**
|
|
212
210
|
* Aggregate error phrase for the mobile-collapse text branch. Feeds the
|
|
213
211
|
* real reason (the `[error]` string / aggregator label) through the
|
|
@@ -265,7 +263,7 @@ declare class CngxStepper implements CngxStepPanelHost {
|
|
|
265
263
|
labelTemplateFor(id: string): TemplateRef<CngxStepLabelContext> | null;
|
|
266
264
|
contentTemplateFor(id: string): TemplateRef<CngxStepContentContext> | null;
|
|
267
265
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxStepper, never>;
|
|
268
|
-
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: {}; }]>;
|
|
269
267
|
}
|
|
270
268
|
|
|
271
269
|
/**
|
|
@@ -327,9 +325,10 @@ declare class CngxProgressBarStepper {
|
|
|
327
325
|
protected readonly completedPercent: _angular_core.Signal<number>;
|
|
328
326
|
protected readonly captionText: _angular_core.Signal<string>;
|
|
329
327
|
/**
|
|
330
|
-
* Aggregate error caption. A single
|
|
331
|
-
* (`"Payment: Errored"`
|
|
332
|
-
*
|
|
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.
|
|
333
332
|
*/
|
|
334
333
|
protected readonly errorText: _angular_core.Signal<string>;
|
|
335
334
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxProgressBarStepper, never>;
|
|
@@ -411,9 +410,10 @@ declare class CngxDotStepper {
|
|
|
411
410
|
protected isActive(node: CngxStepNode, index: number): boolean;
|
|
412
411
|
protected isCompleted(index: number): boolean;
|
|
413
412
|
/**
|
|
414
|
-
* Resolved `data-state` for the dot: `'error'` whenever the
|
|
415
|
-
*
|
|
416
|
-
* 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.
|
|
417
417
|
*/
|
|
418
418
|
protected dotState(node: CngxStepNode): string;
|
|
419
419
|
protected ariaLabelFor(node: CngxStepNode, index: number): string;
|
|
@@ -465,10 +465,10 @@ declare class CngxTextStepper {
|
|
|
465
465
|
protected readonly currentStep: Signal<number>;
|
|
466
466
|
protected readonly stepText: Signal<string>;
|
|
467
467
|
/**
|
|
468
|
-
* Aggregate error sub-line text. A single
|
|
469
|
-
* (`"Payment: Errored"`
|
|
470
|
-
* (`"2 errors"`).
|
|
471
|
-
*
|
|
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.
|
|
472
472
|
*/
|
|
473
473
|
protected readonly errorText: Signal<string>;
|
|
474
474
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTextStepper, never>;
|
package/types/cngx-ui-tabs.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ declare class CngxTabGroup implements CngxTabPanelHost {
|
|
|
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;
|
|
@@ -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,6 +141,7 @@ 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 {
|
|
@@ -238,7 +239,7 @@ declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
|
238
239
|
protected readonly errorTpl: Signal<_angular_core.TemplateRef<_cngx_common_timeline.CngxTimelineErrorContext> | null>;
|
|
239
240
|
protected readonly retryButtonTpl: Signal<_angular_core.TemplateRef<_cngx_common_timeline.CngxTimelineRetryButtonContext> | null>;
|
|
240
241
|
protected readonly loadingTailTpl: Signal<_angular_core.TemplateRef<void> | null>;
|
|
241
|
-
protected readonly skeletonTpl: Signal<_angular_core.TemplateRef<
|
|
242
|
+
protected readonly skeletonTpl: Signal<_angular_core.TemplateRef<CngxTimelineSkeletonContext> | null>;
|
|
242
243
|
/**
|
|
243
244
|
* Forwarding façade over the bound `[state]`, published through
|
|
244
245
|
* `CNGX_STATEFUL`. Every member delegates, so swapping the bound state (or
|
|
@@ -293,6 +294,13 @@ declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
|
293
294
|
* content will - which is what keeps the swap from reflowing.
|
|
294
295
|
*/
|
|
295
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;
|
|
296
304
|
/** @internal Track by consumer identity when given, else by reference. */
|
|
297
305
|
protected trackItem: (index: number, item: T) => unknown;
|
|
298
306
|
constructor();
|
|
@@ -457,7 +465,7 @@ interface CngxTimelineSlotQueries<T> {
|
|
|
457
465
|
readonly error: Signal<CngxTimelineSlotSource<CngxTimelineErrorContext> | undefined>;
|
|
458
466
|
readonly retryButton: Signal<CngxTimelineSlotSource<CngxTimelineRetryButtonContext> | undefined>;
|
|
459
467
|
readonly loadingTail: Signal<CngxTimelineSlotSource<void> | undefined>;
|
|
460
|
-
readonly skeleton: Signal<CngxTimelineSlotSource<
|
|
468
|
+
readonly skeleton: Signal<CngxTimelineSlotSource<CngxTimelineSkeletonContext> | undefined>;
|
|
461
469
|
}
|
|
462
470
|
/**
|
|
463
471
|
* The same eight, resolved. Every member is already through the cascade, so
|
|
@@ -473,7 +481,7 @@ interface CngxTimelineSlots<T> {
|
|
|
473
481
|
readonly error: Signal<TemplateRef<CngxTimelineErrorContext> | null>;
|
|
474
482
|
readonly retryButton: Signal<TemplateRef<CngxTimelineRetryButtonContext> | null>;
|
|
475
483
|
readonly loadingTail: Signal<TemplateRef<void> | null>;
|
|
476
|
-
readonly skeleton: Signal<TemplateRef<
|
|
484
|
+
readonly skeleton: Signal<TemplateRef<CngxTimelineSkeletonContext> | null>;
|
|
477
485
|
}
|
|
478
486
|
/**
|
|
479
487
|
* Runs {@link createTimelineSlotBinding} over the whole slot set at once, so
|
package/types/cngx-ui-toc.d.ts
CHANGED
|
@@ -536,10 +536,20 @@ declare function withTocSpy(payload: NonNullable<CngxTocConfig['spy']>): CngxToc
|
|
|
536
536
|
* `*cngxTocItem` slot and before the built-in plain-label rendering, so every
|
|
537
537
|
* un-slotted toc renders the same custom item markup.
|
|
538
538
|
*
|
|
539
|
+
* A `TemplateRef` exists only once a view renders, so it cannot go into
|
|
540
|
+
* `viewProviders` or the root providers. Build the scope from the rendered
|
|
541
|
+
* template and hand it to `ngTemplateOutlet`:
|
|
542
|
+
*
|
|
539
543
|
* ```ts
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
544
|
+
* private readonly injector = inject(Injector);
|
|
545
|
+
* private readonly itemTpl = viewChild.required<TemplateRef<CngxTocItemContext>>('tocItem');
|
|
546
|
+
* protected readonly tocScope = computed(() =>
|
|
547
|
+
* Injector.create({
|
|
548
|
+
* parent: this.injector,
|
|
549
|
+
* providers: [provideTocConfigAt(withTocTemplates({ item: this.itemTpl() }))],
|
|
550
|
+
* }),
|
|
551
|
+
* );
|
|
552
|
+
* // <ng-container *ngTemplateOutlet="tocTpl; injector: tocScope()" />
|
|
543
553
|
* ```
|
|
544
554
|
*
|
|
545
555
|
* @category ui/toc
|