@cngx/common 0.0.1-rc.0 → 0.1.0-rc.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 +13 -16
- package/card/README.md +2 -21
- package/chart/README.md +5 -8
- package/data/README.md +45 -47
- package/dialog/README.md +12 -15
- package/display/README.md +5 -9
- package/fesm2022/cngx-common-a11y.mjs +140 -40
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +157 -69
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +389 -92
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +311 -151
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +167 -29
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +445 -110
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +2025 -435
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +188 -31
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +711 -90
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +1258 -60
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +247 -41
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +2 -2
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/interactive/README.md +5 -5
- package/layout/README.md +2 -2
- package/package.json +5 -4
- package/popover/README.md +8 -34
- package/stepper/README.md +49 -8
- package/tabs/README.md +6 -6
- package/theming/components/cngx-async.css +74 -0
- package/theming/components/cngx-backdrop.css +73 -0
- package/theming/components/cngx-badge.css +340 -0
- package/theming/components/cngx-bottom-sheet.css +201 -0
- package/theming/components/cngx-button-toggle.css +99 -0
- package/theming/components/cngx-dialog.css +358 -0
- package/theming/components/cngx-divider.css +145 -0
- package/theming/components/cngx-listbox.css +220 -0
- package/theming/components/cngx-menu.css +371 -0
- package/theming/components/cngx-ripple.css +116 -0
- package/theming/components/cngx-tooltip.css +265 -0
- package/theming/system-tokens.css +24 -0
- package/types/cngx-common-a11y.d.ts +136 -36
- package/types/cngx-common-card.d.ts +137 -22
- package/types/cngx-common-chart.d.ts +337 -40
- package/types/cngx-common-data.d.ts +277 -45
- package/types/cngx-common-dialog.d.ts +162 -22
- package/types/cngx-common-display.d.ts +422 -78
- package/types/cngx-common-interactive.d.ts +1862 -305
- package/types/cngx-common-layout.d.ts +191 -28
- package/types/cngx-common-popover.d.ts +632 -87
- package/types/cngx-common-stepper.d.ts +1110 -38
- package/types/cngx-common-tabs.d.ts +306 -32
- package/types/cngx-common.d.ts +1 -1
- package/README.md +0 -18
|
@@ -13,6 +13,8 @@ import { CngxPopover } from '@cngx/common/popover';
|
|
|
13
13
|
* so subsequent input changes propagate without re-registration.
|
|
14
14
|
* `errorAggregator` is a `Signal<...>` slot so consumer aggregators
|
|
15
15
|
* resolved via `viewChild` after first registration still bind.
|
|
16
|
+
*
|
|
17
|
+
* @category common/tabs
|
|
16
18
|
*/
|
|
17
19
|
interface CngxTabHandle {
|
|
18
20
|
readonly id: string;
|
|
@@ -23,7 +25,9 @@ interface CngxTabHandle {
|
|
|
23
25
|
/**
|
|
24
26
|
* Contract atoms see when they inject the presenter via
|
|
25
27
|
* {@link CNGX_TAB_GROUP_HOST}. Atoms never reach into the concrete
|
|
26
|
-
* class
|
|
28
|
+
* class - keeps layering cycle-free and the decompose schematic clean.
|
|
29
|
+
*
|
|
30
|
+
* @category common/tabs
|
|
27
31
|
*/
|
|
28
32
|
interface CngxTabGroupHost {
|
|
29
33
|
readonly tabs: Signal<readonly CngxTabHandle[]>;
|
|
@@ -48,7 +52,7 @@ interface CngxTabGroupHost {
|
|
|
48
52
|
*
|
|
49
53
|
* @remarks
|
|
50
54
|
* The `pending → error` pulse keyframe (`cngx-tab-pulse-error`)
|
|
51
|
-
* does not retrigger on rapid supersede sequences
|
|
55
|
+
* does not retrigger on rapid supersede sequences - CSS animations
|
|
52
56
|
* only fire on fresh class application. See `tabs-accepted-debt §3`;
|
|
53
57
|
* the persistent icon plus static red outline carry the durable
|
|
54
58
|
* signal in the no-pulse case.
|
|
@@ -59,7 +63,7 @@ interface CngxTabGroupHost {
|
|
|
59
63
|
* commit window. Written when `select()` opens a transition under
|
|
60
64
|
* `commitAction`; retained on `error` so the live-region phrase
|
|
61
65
|
* can resolve the origin label; cleared on `success`. Outside the
|
|
62
|
-
* commit window the slot may carry a stale value
|
|
66
|
+
* commit window the slot may carry a stale value - consumers must
|
|
63
67
|
* gate reads by joining with `lastFailedIndex`. The origin is
|
|
64
68
|
* meaningful only when `lastFailedIndex !== undefined`.
|
|
65
69
|
*/
|
|
@@ -82,6 +86,11 @@ interface CngxTabGroupHost {
|
|
|
82
86
|
* DI token for the tab presenter's contract. Presenter provides via
|
|
83
87
|
* `useExisting`; `CngxTab` injects to register; the organism injects
|
|
84
88
|
* to forward keyboard nav from `CngxRovingTabindex`.
|
|
89
|
+
*
|
|
90
|
+
* @category common/tabs
|
|
91
|
+
* @wcag AA
|
|
92
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-group-host.token.ts
|
|
93
|
+
* @since 0.1.0
|
|
85
94
|
*/
|
|
86
95
|
declare const CNGX_TAB_GROUP_HOST: InjectionToken<CngxTabGroupHost>;
|
|
87
96
|
|
|
@@ -90,19 +99,29 @@ declare const CNGX_TAB_GROUP_HOST: InjectionToken<CngxTabGroupHost>;
|
|
|
90
99
|
* and target indices; resolves `true` to commit, `false` to refuse.
|
|
91
100
|
* `Observable | Promise | sync` union mirrors the rest of the cngx
|
|
92
101
|
* commit-action family.
|
|
102
|
+
*
|
|
103
|
+
* @category common/tabs
|
|
93
104
|
*/
|
|
94
105
|
type CngxTabsCommitAction = (fromIndex: number, toIndex: number) => boolean | Promise<boolean> | Observable<boolean>;
|
|
95
106
|
/**
|
|
96
|
-
* Tab-group presenter
|
|
107
|
+
* Tab-group presenter - brain of every cngx tab flow. Owns the
|
|
97
108
|
* active-index model, the tab registry, orientation, loop policy,
|
|
98
109
|
* and the commit-controller lifecycle. Provides
|
|
99
110
|
* {@link CNGX_TAB_GROUP_HOST} for atoms and {@link CNGX_STATEFUL}
|
|
100
111
|
* so `<cngx-toast-on />` / `<cngx-banner-on />` compose without
|
|
101
112
|
* `[state]` wiring.
|
|
102
113
|
*
|
|
103
|
-
* **Layer:** `@cngx/common/tabs` (Level 2). Directive-only
|
|
114
|
+
* **Layer:** `@cngx/common/tabs` (Level 2). Directive-only -
|
|
104
115
|
* organisms compose via `hostDirectives`, consumers attach
|
|
105
116
|
* `[cngxTabGroup]` directly.
|
|
117
|
+
*
|
|
118
|
+
* @category common/tabs
|
|
119
|
+
* @docsKind primary
|
|
120
|
+
* @wcag AA
|
|
121
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/presenter.directive.ts
|
|
122
|
+
* @since 0.1.0
|
|
123
|
+
* @relatedTo CngxTab, CngxTabContent, CngxTabLabel, CngxTabsFragmentSync
|
|
124
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
|
|
106
125
|
*/
|
|
107
126
|
declare class CngxTabGroupPresenter implements CngxTabGroupHost {
|
|
108
127
|
readonly activeIndex: i0.ModelSignal<number>;
|
|
@@ -112,12 +131,12 @@ declare class CngxTabGroupPresenter implements CngxTabGroupHost {
|
|
|
112
131
|
* Async-commit action gating the transition. When non-null,
|
|
113
132
|
* `select(...)` routes through {@link CngxTabsCommitHandler}; the
|
|
114
133
|
* action's resolution decides whether the change lands. Supersede
|
|
115
|
-
* semantics come from the commit-controller
|
|
134
|
+
* semantics come from the commit-controller - a rapid second
|
|
116
135
|
* `select(...)` cancels the in-flight runner.
|
|
117
136
|
*/
|
|
118
137
|
readonly commitAction: i0.InputSignal<CngxTabsCommitAction | null>;
|
|
119
138
|
/**
|
|
120
|
-
* Default `'optimistic'`
|
|
139
|
+
* Default `'optimistic'` - tab change is navigation, not a save,
|
|
121
140
|
* so eager visual feedback matches the user's mental model.
|
|
122
141
|
* Switch to `'pessimistic'` when the new tab must wait for the
|
|
123
142
|
* action to confirm.
|
|
@@ -167,13 +186,15 @@ declare class CngxTabGroupPresenter implements CngxTabGroupHost {
|
|
|
167
186
|
/**
|
|
168
187
|
* Read-mostly panel-surface contract for the overflow molecule, skin
|
|
169
188
|
* sub-components, and future panel-level helpers. Narrower than
|
|
170
|
-
* {@link CngxTabGroupHost}
|
|
189
|
+
* {@link CngxTabGroupHost} - register / unregister stay on the brain.
|
|
171
190
|
*
|
|
172
191
|
* The single write path is `selectById`; routing back through the
|
|
173
192
|
* presenter preserves clamping, disabled-skip, and commit-action
|
|
174
193
|
* gating. Template resolvers let skin sub-components project the
|
|
175
194
|
* `*cngxTabLabel` / `*cngxTabContent` slots without depending on the
|
|
176
195
|
* concrete `CngxTabGroup` class.
|
|
196
|
+
*
|
|
197
|
+
* @category common/tabs
|
|
177
198
|
*/
|
|
178
199
|
interface CngxTabPanelHost {
|
|
179
200
|
readonly tabs: Signal<readonly CngxTabHandle[]>;
|
|
@@ -189,6 +210,11 @@ interface CngxTabPanelHost {
|
|
|
189
210
|
* DI token the organism provides via `useExisting`. The overflow
|
|
190
211
|
* molecule and consumer-authored skin sub-components inject this
|
|
191
212
|
* instead of the concrete component class.
|
|
213
|
+
*
|
|
214
|
+
* @category common/tabs
|
|
215
|
+
* @wcag AA
|
|
216
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-panel-host.token.ts
|
|
217
|
+
* @since 0.1.0
|
|
192
218
|
*/
|
|
193
219
|
declare const CNGX_TAB_PANEL_HOST: InjectionToken<CngxTabPanelHost>;
|
|
194
220
|
|
|
@@ -205,6 +231,20 @@ declare const CNGX_TAB_PANEL_HOST: InjectionToken<CngxTabPanelHost>;
|
|
|
205
231
|
* </ng-template>
|
|
206
232
|
* </div>
|
|
207
233
|
* ```
|
|
234
|
+
*
|
|
235
|
+
* @category common/tabs
|
|
236
|
+
* @wcag AA
|
|
237
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-content.directive.ts
|
|
238
|
+
* @since 0.1.0
|
|
239
|
+
* @relatedTo CngxTab, CngxTabLabel
|
|
240
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
|
|
241
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>
|
|
242
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>
|
|
243
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>
|
|
244
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>
|
|
245
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
246
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
247
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
208
248
|
*/
|
|
209
249
|
declare class CngxTabContent {
|
|
210
250
|
readonly templateRef: TemplateRef<any>;
|
|
@@ -223,6 +263,14 @@ declare class CngxTabContent {
|
|
|
223
263
|
* <ng-template cngxTabContent>...</ng-template>
|
|
224
264
|
* </div>
|
|
225
265
|
* ```
|
|
266
|
+
*
|
|
267
|
+
* @category common/tabs
|
|
268
|
+
* @wcag AA
|
|
269
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-label.directive.ts
|
|
270
|
+
* @since 0.1.0
|
|
271
|
+
* @relatedTo CngxTab, CngxTabContent
|
|
272
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>
|
|
273
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>
|
|
226
274
|
*/
|
|
227
275
|
declare class CngxTabLabel {
|
|
228
276
|
readonly templateRef: TemplateRef<any>;
|
|
@@ -236,7 +284,22 @@ declare class CngxTabLabel {
|
|
|
236
284
|
* {@link DestroyRef} on teardown. The presenter holds the atom's
|
|
237
285
|
* input signals by reference, so input changes propagate without
|
|
238
286
|
* re-registration. `labelTemplate` / `contentTemplate` are projected
|
|
239
|
-
* by the organism
|
|
287
|
+
* by the organism - the atom carries no rendering logic.
|
|
288
|
+
*
|
|
289
|
+
* @category common/tabs
|
|
290
|
+
* @docsKind primary
|
|
291
|
+
* @wcag AA
|
|
292
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab.directive.ts
|
|
293
|
+
* @since 0.1.0
|
|
294
|
+
* @relatedTo CngxTabGroupPresenter, CngxTabLabel, CngxTabContent, CngxTabErrorBadge
|
|
295
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
|
|
296
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>
|
|
297
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>
|
|
298
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>
|
|
299
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>
|
|
300
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
301
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
302
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
240
303
|
*/
|
|
241
304
|
declare class CngxTab {
|
|
242
305
|
readonly id: i0.InputSignal<string>;
|
|
@@ -261,9 +324,16 @@ declare class CngxTab {
|
|
|
261
324
|
* - `mode = 'fragment'` (default) → `#tab=settings`
|
|
262
325
|
* - `mode = 'queryParam'` with `paramName = 'tab'` → `?tab=settings`
|
|
263
326
|
*
|
|
264
|
-
* `Router` is optional
|
|
327
|
+
* `Router` is optional - without it the directive logs a dev warning
|
|
265
328
|
* via `afterNextRender` and becomes a no-op. Every `router.navigate`
|
|
266
329
|
* and `host.selectById` inside the effects sits in `untracked()`.
|
|
330
|
+
*
|
|
331
|
+
* @category common/tabs
|
|
332
|
+
* @docsKind primary
|
|
333
|
+
* @wcag AA
|
|
334
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/router-sync.directive.ts
|
|
335
|
+
* @since 0.1.0
|
|
336
|
+
* @relatedTo CngxTabGroupPresenter, CngxTab
|
|
267
337
|
*/
|
|
268
338
|
declare class CngxTabsFragmentSync {
|
|
269
339
|
readonly mode: i0.InputSignal<"fragment" | "queryParam">;
|
|
@@ -282,9 +352,11 @@ declare class CngxTabsFragmentSync {
|
|
|
282
352
|
* default `tab.label() ?? tab.id` text inside the More popover; the
|
|
283
353
|
* surrounding `<li role="menuitem">` shell (`aria-disabled`, click
|
|
284
354
|
* handler, `data-tab-id`) stays library-owned.
|
|
355
|
+
*
|
|
356
|
+
* @category common/tabs/overflow
|
|
285
357
|
*/
|
|
286
358
|
interface CngxTabOverflowItemContext {
|
|
287
|
-
/** Convenience alias for `tab`
|
|
359
|
+
/** Convenience alias for `tab` - usable as `let-tab` shorthand. */
|
|
288
360
|
readonly $implicit: CngxTabHandle;
|
|
289
361
|
/** The hidden tab the row represents. */
|
|
290
362
|
readonly tab: CngxTabHandle;
|
|
@@ -293,7 +365,7 @@ interface CngxTabOverflowItemContext {
|
|
|
293
365
|
* and dismisses the popover; no-op when `disabled`.
|
|
294
366
|
*/
|
|
295
367
|
readonly pick: () => void;
|
|
296
|
-
/** Mirrors `tab.disabled()`
|
|
368
|
+
/** Mirrors `tab.disabled()` - pre-resolved for consumer convenience. */
|
|
297
369
|
readonly disabled: boolean;
|
|
298
370
|
/** Row index inside `hiddenTabs()`, starting at 0. */
|
|
299
371
|
readonly index: number;
|
|
@@ -313,6 +385,12 @@ interface CngxTabOverflowItemContext {
|
|
|
313
385
|
* </ng-template>
|
|
314
386
|
* </cngx-tab-overflow>
|
|
315
387
|
* ```
|
|
388
|
+
*
|
|
389
|
+
* @category common/tabs/overflow
|
|
390
|
+
* @wcag AA
|
|
391
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/tab-overflow-item.directive.ts
|
|
392
|
+
* @since 0.1.0
|
|
393
|
+
* @relatedTo CngxTabOverflowTrigger, CngxTab
|
|
316
394
|
*/
|
|
317
395
|
declare class CngxTabOverflowItem {
|
|
318
396
|
readonly templateRef: TemplateRef<CngxTabOverflowItemContext>;
|
|
@@ -325,9 +403,11 @@ declare class CngxTabOverflowItem {
|
|
|
325
403
|
* default `i18n.moreTabsLabel(count)` text on the More button; the
|
|
326
404
|
* surrounding `<button cngxPopoverTrigger>` shell (`aria-haspopup`,
|
|
327
405
|
* `aria-expanded`, click handler, hidden binding) stays library-owned.
|
|
406
|
+
*
|
|
407
|
+
* @category common/tabs/overflow
|
|
328
408
|
*/
|
|
329
409
|
interface CngxTabOverflowTriggerContext {
|
|
330
|
-
/** Convenience alias for `count`
|
|
410
|
+
/** Convenience alias for `count` - usable as `let-count` shorthand. */
|
|
331
411
|
readonly $implicit: number;
|
|
332
412
|
/** Number of hidden tabs currently surfaced through the overflow popover. */
|
|
333
413
|
readonly count: number;
|
|
@@ -347,6 +427,12 @@ interface CngxTabOverflowTriggerContext {
|
|
|
347
427
|
* </ng-template>
|
|
348
428
|
* </cngx-tab-overflow>
|
|
349
429
|
* ```
|
|
430
|
+
*
|
|
431
|
+
* @category common/tabs/overflow
|
|
432
|
+
* @wcag AA
|
|
433
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/tab-overflow-trigger.directive.ts
|
|
434
|
+
* @since 0.1.0
|
|
435
|
+
* @relatedTo CngxTabOverflowItem, CngxTab
|
|
350
436
|
*/
|
|
351
437
|
declare class CngxTabOverflowTrigger {
|
|
352
438
|
readonly templateRef: TemplateRef<CngxTabOverflowTriggerContext>;
|
|
@@ -360,6 +446,8 @@ declare class CngxTabOverflowTrigger {
|
|
|
360
446
|
* with `commitState.status() === 'pending'`); the visibility gate
|
|
361
447
|
* stays library-owned. `intendedIndex` is exposed so positional
|
|
362
448
|
* variants (progress bars, step counters) read the same source.
|
|
449
|
+
*
|
|
450
|
+
* @category common/tabs/slots
|
|
363
451
|
*/
|
|
364
452
|
interface CngxTabBusySpinnerContext {
|
|
365
453
|
/** The tab handle carrying id / label / disabled / aggregator signals. */
|
|
@@ -379,6 +467,15 @@ interface CngxTabBusySpinnerContext {
|
|
|
379
467
|
* </ng-template>
|
|
380
468
|
* </cngx-tab-group>
|
|
381
469
|
* ```
|
|
470
|
+
*
|
|
471
|
+
* @category common/tabs/slots
|
|
472
|
+
* @wcag AA
|
|
473
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-busy-spinner.directive.ts
|
|
474
|
+
* @since 0.1.0
|
|
475
|
+
* @relatedTo CngxTabErrorBadge, CngxTabRejectionIcon, CngxTab
|
|
476
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
477
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
478
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
382
479
|
*/
|
|
383
480
|
declare class CngxTabBusySpinner {
|
|
384
481
|
readonly templateRef: TemplateRef<CngxTabBusySpinnerContext>;
|
|
@@ -390,6 +487,8 @@ declare class CngxTabBusySpinner {
|
|
|
390
487
|
* Context for the `*cngxTabErrorBadge` template. Renders only when
|
|
391
488
|
* the tab's `errorAggregator?.shouldShow()` is `true`; the visibility
|
|
392
489
|
* gate stays library-owned. Sibling shape to `CngxStepBadgeContext`.
|
|
490
|
+
*
|
|
491
|
+
* @category common/tabs/slots
|
|
393
492
|
*/
|
|
394
493
|
interface CngxTabErrorBadgeContext {
|
|
395
494
|
/** The tab handle carrying id / label / disabled / aggregator signals. */
|
|
@@ -410,6 +509,15 @@ interface CngxTabErrorBadgeContext {
|
|
|
410
509
|
* </ng-template>
|
|
411
510
|
* </cngx-tab-group>
|
|
412
511
|
* ```
|
|
512
|
+
*
|
|
513
|
+
* @category common/tabs/slots
|
|
514
|
+
* @wcag AA
|
|
515
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-error-badge.directive.ts
|
|
516
|
+
* @since 0.1.0
|
|
517
|
+
* @relatedTo CngxTabRejectionIcon, CngxTabBusySpinner, CngxTab
|
|
518
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
519
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
520
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
413
521
|
*/
|
|
414
522
|
declare class CngxTabErrorBadge {
|
|
415
523
|
readonly templateRef: TemplateRef<CngxTabErrorBadgeContext>;
|
|
@@ -421,9 +529,11 @@ declare class CngxTabErrorBadge {
|
|
|
421
529
|
* Context for the `*cngxTabRejectionIcon` template. Renders only on
|
|
422
530
|
* the tab matching `presenter.lastFailedIndex()`; the visibility
|
|
423
531
|
* gate stays library-owned. `originLabel` is the safe-harbour tab,
|
|
424
|
-
* derived from `presenter.originIndexDuringCommit()`
|
|
532
|
+
* derived from `presenter.originIndexDuringCommit()` - `undefined`
|
|
425
533
|
* for the synchronous-rejection edge case. Sibling shape to
|
|
426
534
|
* `CngxStepRejectionContext`.
|
|
535
|
+
*
|
|
536
|
+
* @category common/tabs/slots
|
|
427
537
|
*/
|
|
428
538
|
interface CngxTabRejectionIconContext {
|
|
429
539
|
/** Flat-index of the rejected tab (`presenter.lastFailedIndex()`). */
|
|
@@ -451,6 +561,15 @@ interface CngxTabRejectionIconContext {
|
|
|
451
561
|
* </ng-template>
|
|
452
562
|
* </cngx-tab-group>
|
|
453
563
|
* ```
|
|
564
|
+
*
|
|
565
|
+
* @category common/tabs/slots
|
|
566
|
+
* @wcag AA
|
|
567
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-rejection-icon.directive.ts
|
|
568
|
+
* @since 0.1.0
|
|
569
|
+
* @relatedTo CngxTabErrorBadge, CngxTabBusySpinner, CngxTab
|
|
570
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
571
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
572
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
454
573
|
*/
|
|
455
574
|
declare class CngxTabRejectionIcon {
|
|
456
575
|
readonly templateRef: TemplateRef<CngxTabRejectionIconContext>;
|
|
@@ -464,8 +583,10 @@ declare class CngxTabRejectionIcon {
|
|
|
464
583
|
* {@link withTabsAriaLabels}.
|
|
465
584
|
*
|
|
466
585
|
* Per-tab nav phrasing (`previousTab`, `nextTab`) lives in
|
|
467
|
-
* {@link CngxTabsI18n}, not here
|
|
586
|
+
* {@link CngxTabsI18n}, not here - landmark naming and SR phrasing
|
|
468
587
|
* stay on separate override paths.
|
|
588
|
+
*
|
|
589
|
+
* @category common/tabs
|
|
469
590
|
*/
|
|
470
591
|
interface CngxTabsAriaLabels {
|
|
471
592
|
readonly tabsRegion?: string;
|
|
@@ -474,6 +595,8 @@ interface CngxTabsAriaLabels {
|
|
|
474
595
|
* Fallback labels for derived strings (role descriptions, badge SR
|
|
475
596
|
* announcements). Library defaults are English; consumers override
|
|
476
597
|
* per locale.
|
|
598
|
+
*
|
|
599
|
+
* @category common/tabs
|
|
477
600
|
*/
|
|
478
601
|
interface CngxTabsFallbackLabels {
|
|
479
602
|
readonly tabRoleDescription?: string;
|
|
@@ -482,10 +605,12 @@ interface CngxTabsFallbackLabels {
|
|
|
482
605
|
/**
|
|
483
606
|
* App-wide template overrides for `<cngx-tab-group>` and
|
|
484
607
|
* `<cngx-tab-overflow>` skin regions. Middle tier of the 3-stage
|
|
485
|
-
* cascade
|
|
608
|
+
* cascade - per-instance directive > this field > built-in markup.
|
|
486
609
|
* Apply via the matching `with*Template` builders. Shape mirrors
|
|
487
610
|
* `CngxStepperTemplates` so consumer templates port across
|
|
488
611
|
* families.
|
|
612
|
+
*
|
|
613
|
+
* @category common/tabs
|
|
489
614
|
*/
|
|
490
615
|
interface CngxTabsTemplates {
|
|
491
616
|
readonly overflowTrigger?: TemplateRef<CngxTabOverflowTriggerContext>;
|
|
@@ -498,6 +623,8 @@ interface CngxTabsTemplates {
|
|
|
498
623
|
* Tab-group config surface. Resolution priority: per-instance Input
|
|
499
624
|
* → `provideTabsConfigAt` (viewProviders) → `provideTabsConfig`
|
|
500
625
|
* (root) → library default.
|
|
626
|
+
*
|
|
627
|
+
* @category common/tabs
|
|
501
628
|
*/
|
|
502
629
|
interface CngxTabsConfig {
|
|
503
630
|
readonly defaultOrientation?: 'horizontal' | 'vertical';
|
|
@@ -516,7 +643,7 @@ interface CngxTabsConfig {
|
|
|
516
643
|
readonly overflowStabilizeMs?: number;
|
|
517
644
|
/**
|
|
518
645
|
* Hard ceiling (ms) on commit deferral while IO bursts keep
|
|
519
|
-
* arriving
|
|
646
|
+
* arriving - without it, sustained churn (momentum scroll,
|
|
520
647
|
* continuous resize) would clear the stabilize timer forever and
|
|
521
648
|
* the More counter would freeze on a stale value, breaking
|
|
522
649
|
* Pillar 2. Default 250ms.
|
|
@@ -533,6 +660,11 @@ interface CngxTabsConfig {
|
|
|
533
660
|
* DI token for the resolved tabs config. `providedIn: 'root'` with
|
|
534
661
|
* the library defaults; override via {@link provideTabsConfig}
|
|
535
662
|
* (root) or {@link provideTabsConfigAt} (component scope).
|
|
663
|
+
*
|
|
664
|
+
* @category common/tabs
|
|
665
|
+
* @wcag AA
|
|
666
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tabs-config.ts
|
|
667
|
+
* @since 0.1.0
|
|
536
668
|
*/
|
|
537
669
|
declare const CNGX_TABS_CONFIG: InjectionToken<CngxTabsConfig>;
|
|
538
670
|
/**
|
|
@@ -540,6 +672,8 @@ declare const CNGX_TABS_CONFIG: InjectionToken<CngxTabsConfig>;
|
|
|
540
672
|
* `_target` discriminator lets {@link provideCngxTabs} dispatch
|
|
541
673
|
* config features to {@link provideTabsConfig} while i18n features
|
|
542
674
|
* route to {@link provideTabsI18n}.
|
|
675
|
+
*
|
|
676
|
+
* @category common/tabs
|
|
543
677
|
*/
|
|
544
678
|
type CngxTabsConfigFeature = ((config: CngxTabsConfig) => CngxTabsConfig) & {
|
|
545
679
|
readonly _target: 'config';
|
|
@@ -547,6 +681,8 @@ type CngxTabsConfigFeature = ((config: CngxTabsConfig) => CngxTabsConfig) & {
|
|
|
547
681
|
/**
|
|
548
682
|
* Override the default orientation. Per-instance `[orientation]`
|
|
549
683
|
* still wins; this changes the cascade default only.
|
|
684
|
+
*
|
|
685
|
+
* @category common/tabs
|
|
550
686
|
*/
|
|
551
687
|
declare function withTabsDefaultOrientation(orientation: 'horizontal' | 'vertical'): CngxTabsConfigFeature;
|
|
552
688
|
/**
|
|
@@ -554,11 +690,15 @@ declare function withTabsDefaultOrientation(orientation: 'horizontal' | 'vertica
|
|
|
554
690
|
* collides with the stepper family's identical symbol when both libs
|
|
555
691
|
* are auto-imported. The alias stays for one minor release before
|
|
556
692
|
* removal.
|
|
693
|
+
*
|
|
694
|
+
* @category common/tabs
|
|
557
695
|
*/
|
|
558
696
|
declare const withDefaultOrientation: typeof withTabsDefaultOrientation;
|
|
559
697
|
/**
|
|
560
698
|
* Override whether roving-tabindex navigation loops from last back to
|
|
561
699
|
* first (and vice versa). Per-instance `[loop]` Input still wins.
|
|
700
|
+
*
|
|
701
|
+
* @category common/tabs
|
|
562
702
|
*/
|
|
563
703
|
declare function withTabsRovingLoop(loop: boolean): CngxTabsConfigFeature;
|
|
564
704
|
/**
|
|
@@ -566,32 +706,44 @@ declare function withTabsRovingLoop(loop: boolean): CngxTabsConfigFeature;
|
|
|
566
706
|
* `'optimistic'` activates the tab on action dispatch and rolls back
|
|
567
707
|
* on error; `'pessimistic'` waits for success. Per-instance
|
|
568
708
|
* `[commitMode]` Input still wins.
|
|
709
|
+
*
|
|
710
|
+
* @category common/tabs
|
|
569
711
|
*/
|
|
570
712
|
declare function withTabsCommitMode(mode: 'optimistic' | 'pessimistic'): CngxTabsConfigFeature;
|
|
571
713
|
/**
|
|
572
714
|
* Configure router synchronisation for the active tab. `mode` chooses
|
|
573
715
|
* the URL surface (URL fragment or query parameter); `param` names
|
|
574
716
|
* the key (default `'tab'`).
|
|
717
|
+
*
|
|
718
|
+
* @category common/tabs
|
|
575
719
|
*/
|
|
576
720
|
declare function withTabsRouterSync(mode: 'fragment' | 'queryParam', param?: string): CngxTabsConfigFeature;
|
|
577
721
|
/**
|
|
578
722
|
* Merge ARIA labels into the cascade. Keys not provided keep their
|
|
579
723
|
* library defaults; per-instance overrides on the tab group still win.
|
|
724
|
+
*
|
|
725
|
+
* @category common/tabs
|
|
580
726
|
*/
|
|
581
727
|
declare function withTabsAriaLabels(labels: CngxTabsAriaLabels): CngxTabsConfigFeature;
|
|
582
728
|
/**
|
|
583
729
|
* Merge text fallback labels (overflow trigger, busy / rejection text)
|
|
584
730
|
* into the cascade. Used when a slot directive is not present.
|
|
731
|
+
*
|
|
732
|
+
* @category common/tabs
|
|
585
733
|
*/
|
|
586
734
|
declare function withTabsFallbackLabels(labels: CngxTabsFallbackLabels): CngxTabsConfigFeature;
|
|
587
735
|
/**
|
|
588
736
|
* Override the IO-debounce window (ms). See
|
|
589
737
|
* {@link CngxTabsConfig.overflowStabilizeMs}.
|
|
738
|
+
*
|
|
739
|
+
* @category common/tabs
|
|
590
740
|
*/
|
|
591
741
|
declare function withTabOverflowStabilizeMs(ms: number): CngxTabsConfigFeature;
|
|
592
742
|
/**
|
|
593
743
|
* Override the worst-case staleness ceiling on the visibility-map
|
|
594
744
|
* commit. See {@link CngxTabsConfig.overflowMaxDeferMs}.
|
|
745
|
+
*
|
|
746
|
+
* @category common/tabs
|
|
595
747
|
*/
|
|
596
748
|
declare function withTabOverflowMaxDeferMs(ms: number): CngxTabsConfigFeature;
|
|
597
749
|
/**
|
|
@@ -604,35 +756,47 @@ declare function withTabOverflowMaxDeferMs(ms: number): CngxTabsConfigFeature;
|
|
|
604
756
|
*
|
|
605
757
|
* providers: [provideTabsConfig(withTabOverflowTriggerTemplate(this.moreTrigger))]
|
|
606
758
|
* ```
|
|
759
|
+
*
|
|
760
|
+
* @category common/tabs
|
|
607
761
|
*/
|
|
608
762
|
declare function withTabOverflowTriggerTemplate(template: TemplateRef<CngxTabOverflowTriggerContext>): CngxTabsConfigFeature;
|
|
609
763
|
/**
|
|
610
764
|
* App-wide override for each row inside the overflow popover.
|
|
611
765
|
* Middle tier; per-instance `*cngxTabOverflowItem` still wins.
|
|
766
|
+
*
|
|
767
|
+
* @category common/tabs
|
|
612
768
|
*/
|
|
613
769
|
declare function withTabOverflowItemTemplate(template: TemplateRef<CngxTabOverflowItemContext>): CngxTabsConfigFeature;
|
|
614
770
|
/**
|
|
615
771
|
* App-wide override for the error-badge decoration. Middle tier;
|
|
616
772
|
* per-instance `*cngxTabErrorBadge` still wins. Sibling of the
|
|
617
773
|
* stepper family's `withStepBadgeTemplate`.
|
|
774
|
+
*
|
|
775
|
+
* @category common/tabs
|
|
618
776
|
*/
|
|
619
777
|
declare function withTabErrorBadgeTemplate(template: TemplateRef<CngxTabErrorBadgeContext>): CngxTabsConfigFeature;
|
|
620
778
|
/**
|
|
621
779
|
* App-wide override for the rejection-icon decoration. Middle
|
|
622
780
|
* tier; per-instance `*cngxTabRejectionIcon` still wins. Sibling
|
|
623
781
|
* of {@link withStepRejectionTemplate}.
|
|
782
|
+
*
|
|
783
|
+
* @category common/tabs
|
|
624
784
|
*/
|
|
625
785
|
declare function withTabRejectionIconTemplate(template: TemplateRef<CngxTabRejectionIconContext>): CngxTabsConfigFeature;
|
|
626
786
|
/**
|
|
627
787
|
* App-wide override for the commit-pending busy-spinner overlay.
|
|
628
788
|
* Middle tier; per-instance `*cngxTabBusySpinner` still wins.
|
|
629
789
|
* Sibling of {@link withStepBusySpinnerTemplate}.
|
|
790
|
+
*
|
|
791
|
+
* @category common/tabs
|
|
630
792
|
*/
|
|
631
793
|
declare function withTabBusySpinnerTemplate(template: TemplateRef<CngxTabBusySpinnerContext>): CngxTabsConfigFeature;
|
|
632
794
|
/**
|
|
633
795
|
* Root-level provider. Apply once in `bootstrapApplication` /
|
|
634
796
|
* `appConfig.providers`. Returns {@link EnvironmentProviders} per
|
|
635
797
|
* the canonical cngx config-cascade signature.
|
|
798
|
+
*
|
|
799
|
+
* @category common/tabs
|
|
636
800
|
*/
|
|
637
801
|
declare function provideTabsConfig(...features: readonly CngxTabsConfigFeature[]): EnvironmentProviders;
|
|
638
802
|
/**
|
|
@@ -646,10 +810,14 @@ declare function provideTabsConfig(...features: readonly CngxTabsConfigFeature[]
|
|
|
646
810
|
* viewProviders: [...provideTabsConfigAt(withTabsDefaultOrientation('vertical'))],
|
|
647
811
|
* })
|
|
648
812
|
* ```
|
|
813
|
+
*
|
|
814
|
+
* @category common/tabs
|
|
649
815
|
*/
|
|
650
816
|
declare function provideTabsConfigAt(...features: readonly CngxTabsConfigFeature[]): Provider[];
|
|
651
817
|
/**
|
|
652
818
|
* Inject the resolved tabs config in an injection context.
|
|
819
|
+
*
|
|
820
|
+
* @category common/tabs
|
|
653
821
|
*/
|
|
654
822
|
declare function injectTabsConfig(): CngxTabsConfig;
|
|
655
823
|
|
|
@@ -657,6 +825,8 @@ declare function injectTabsConfig(): CngxTabsConfig;
|
|
|
657
825
|
* Tabs i18n surface. Library defaults are English; consumers
|
|
658
826
|
* override via {@link provideTabsI18n}. Sibling to
|
|
659
827
|
* `CNGX_STEPPER_I18N` and `CNGX_CHART_I18N`.
|
|
828
|
+
*
|
|
829
|
+
* @category common/tabs/i18n
|
|
660
830
|
*/
|
|
661
831
|
interface CngxTabsI18n {
|
|
662
832
|
readonly tabsLabel: string;
|
|
@@ -668,7 +838,7 @@ interface CngxTabsI18n {
|
|
|
668
838
|
/**
|
|
669
839
|
* @deprecated Superseded by {@link commitRolledBackTo}. Retained as
|
|
670
840
|
* the defensive fallback in `liveAnnouncement` when the origin
|
|
671
|
-
* label is unresolvable
|
|
841
|
+
* label is unresolvable - fires for unlabeled tabs or programmatic
|
|
672
842
|
* `commitState` writes that bypass `select()`. See
|
|
673
843
|
* `tabs-accepted-debt §4`.
|
|
674
844
|
*/
|
|
@@ -685,6 +855,11 @@ interface CngxTabsI18n {
|
|
|
685
855
|
/**
|
|
686
856
|
* DI token for the tabs i18n bundle. `providedIn: 'root'` with
|
|
687
857
|
* English defaults.
|
|
858
|
+
*
|
|
859
|
+
* @category common/tabs/i18n
|
|
860
|
+
* @wcag AA
|
|
861
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/i18n/tabs-i18n.ts
|
|
862
|
+
* @since 0.1.0
|
|
688
863
|
*/
|
|
689
864
|
declare const CNGX_TABS_I18N: InjectionToken<CngxTabsI18n>;
|
|
690
865
|
/**
|
|
@@ -692,15 +867,19 @@ declare const CNGX_TABS_I18N: InjectionToken<CngxTabsI18n>;
|
|
|
692
867
|
* {@link provideCngxTabs}. The hidden `_target` discriminator routes
|
|
693
868
|
* i18n features to `provideTabsI18n` and config features to
|
|
694
869
|
* `provideTabsConfig` from the unified aggregator.
|
|
870
|
+
*
|
|
871
|
+
* @category common/tabs/i18n
|
|
695
872
|
*/
|
|
696
873
|
type CngxTabsI18nFeature = ((bundle: CngxTabsI18n) => CngxTabsI18n) & {
|
|
697
874
|
readonly _target: 'i18n';
|
|
698
875
|
};
|
|
699
876
|
/**
|
|
700
|
-
* Override i18n labels via a partial bundle
|
|
877
|
+
* Override i18n labels via a partial bundle - unset keys keep the
|
|
701
878
|
* English default. Same shape as `withTabsAriaLabels` /
|
|
702
879
|
* `withTabsFallbackLabels` so `provideCngxTabs` composes both
|
|
703
880
|
* surfaces uniformly.
|
|
881
|
+
*
|
|
882
|
+
* @category common/tabs/i18n
|
|
704
883
|
*/
|
|
705
884
|
declare function withTabsI18nLabels(overrides: Partial<CngxTabsI18n>): CngxTabsI18nFeature;
|
|
706
885
|
/**
|
|
@@ -717,10 +896,14 @@ declare function withTabsI18nLabels(overrides: Partial<CngxTabsI18n>): CngxTabsI
|
|
|
717
896
|
* ],
|
|
718
897
|
* });
|
|
719
898
|
* ```
|
|
899
|
+
*
|
|
900
|
+
* @category common/tabs/i18n
|
|
720
901
|
*/
|
|
721
902
|
declare function provideTabsI18n(...features: readonly CngxTabsI18nFeature[]): Provider;
|
|
722
903
|
/**
|
|
723
904
|
* Inject the resolved tabs i18n bundle.
|
|
905
|
+
*
|
|
906
|
+
* @category common/tabs/i18n
|
|
724
907
|
*/
|
|
725
908
|
declare function injectTabsI18n(): CngxTabsI18n;
|
|
726
909
|
|
|
@@ -728,6 +911,8 @@ declare function injectTabsI18n(): CngxTabsI18n;
|
|
|
728
911
|
* Union of feature kinds the tabs aggregator accepts. Today: config
|
|
729
912
|
* + i18n; future surfaces widen the union and dispatch via the
|
|
730
913
|
* hidden `_target` discriminator.
|
|
914
|
+
*
|
|
915
|
+
* @category common/tabs
|
|
731
916
|
*/
|
|
732
917
|
type CngxTabsFeature = CngxTabsConfigFeature | CngxTabsI18nFeature;
|
|
733
918
|
/**
|
|
@@ -750,6 +935,8 @@ type CngxTabsFeature = CngxTabsConfigFeature | CngxTabsI18nFeature;
|
|
|
750
935
|
* ],
|
|
751
936
|
* });
|
|
752
937
|
* ```
|
|
938
|
+
*
|
|
939
|
+
* @category common/tabs
|
|
753
940
|
*/
|
|
754
941
|
declare function provideCngxTabs(...features: readonly CngxTabsFeature[]): EnvironmentProviders;
|
|
755
942
|
/**
|
|
@@ -767,6 +954,8 @@ declare function provideCngxTabs(...features: readonly CngxTabsFeature[]): Envir
|
|
|
767
954
|
* ],
|
|
768
955
|
* })
|
|
769
956
|
* ```
|
|
957
|
+
*
|
|
958
|
+
* @category common/tabs
|
|
770
959
|
*/
|
|
771
960
|
declare function provideCngxTabsAt(...features: readonly CngxTabsFeature[]): Provider[];
|
|
772
961
|
|
|
@@ -774,10 +963,12 @@ declare function provideCngxTabsAt(...features: readonly CngxTabsFeature[]): Pro
|
|
|
774
963
|
* Adapts the shared commit-controller to the tabs action shape. The
|
|
775
964
|
* presenter delegates to {@link beginTransition} when `commitAction`
|
|
776
965
|
* is bound.
|
|
966
|
+
*
|
|
967
|
+
* @category common/tabs
|
|
777
968
|
*/
|
|
778
969
|
interface CngxTabsCommitHandler {
|
|
779
970
|
/**
|
|
780
|
-
* Start a tab-transition commit. Returns synchronously
|
|
971
|
+
* Start a tab-transition commit. Returns synchronously - read the
|
|
781
972
|
* controller's `state` signal for in-flight status. `onResolve`
|
|
782
973
|
* fires once with `accept = true` on success or `false` on
|
|
783
974
|
* rejection; skipped on supersede.
|
|
@@ -790,6 +981,8 @@ interface CngxTabsCommitHandler {
|
|
|
790
981
|
}
|
|
791
982
|
/**
|
|
792
983
|
* Options for {@link createTabsCommitHandler}.
|
|
984
|
+
*
|
|
985
|
+
* @category common/tabs
|
|
793
986
|
*/
|
|
794
987
|
interface CngxTabsCommitHandlerOptions {
|
|
795
988
|
readonly controller: CngxCommitController<number>;
|
|
@@ -798,12 +991,16 @@ interface CngxTabsCommitHandlerOptions {
|
|
|
798
991
|
* Wraps a {@link CngxCommitController} with the action-shape adapter
|
|
799
992
|
* that collapses `Observable<boolean>` / `Promise<boolean>` /
|
|
800
993
|
* `boolean` returns into a single `accept: boolean` outcome.
|
|
994
|
+
*
|
|
995
|
+
* @category common/tabs
|
|
801
996
|
*/
|
|
802
997
|
declare function createTabsCommitHandler(opts: CngxTabsCommitHandlerOptions): CngxTabsCommitHandler;
|
|
803
998
|
/**
|
|
804
999
|
* Factory signature for {@link CNGX_TABS_COMMIT_HANDLER_FACTORY}.
|
|
805
1000
|
* Override to wrap the default with retry-with-backoff, telemetry,
|
|
806
1001
|
* or offline queues.
|
|
1002
|
+
*
|
|
1003
|
+
* @category common/tabs
|
|
807
1004
|
*/
|
|
808
1005
|
type CngxTabsCommitHandlerFactory = (opts: CngxTabsCommitHandlerOptions) => CngxTabsCommitHandler;
|
|
809
1006
|
/**
|
|
@@ -811,6 +1008,10 @@ type CngxTabsCommitHandlerFactory = (opts: CngxTabsCommitHandlerOptions) => Cngx
|
|
|
811
1008
|
* {@link createTabsCommitHandler}. Sibling to
|
|
812
1009
|
* `CNGX_ARRAY_COMMIT_HANDLER_FACTORY` (select) and
|
|
813
1010
|
* `CNGX_STEPPER_COMMIT_HANDLER_FACTORY`.
|
|
1011
|
+
*
|
|
1012
|
+
* @category common/tabs
|
|
1013
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/commit-handler.ts
|
|
1014
|
+
* @since 0.1.0
|
|
814
1015
|
*/
|
|
815
1016
|
declare const CNGX_TABS_COMMIT_HANDLER_FACTORY: InjectionToken<CngxTabsCommitHandlerFactory>;
|
|
816
1017
|
|
|
@@ -821,10 +1022,12 @@ declare const CNGX_TABS_COMMIT_HANDLER_FACTORY: InjectionToken<CngxTabsCommitHan
|
|
|
821
1022
|
* Material's rendered DOM). The molecule is variant-agnostic and
|
|
822
1023
|
* consumes whichever adapter
|
|
823
1024
|
* {@link CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY} provides.
|
|
1025
|
+
*
|
|
1026
|
+
* @category common/tabs/overflow
|
|
824
1027
|
*/
|
|
825
1028
|
interface CngxTabOverflowDomAdapter {
|
|
826
1029
|
/**
|
|
827
|
-
* Resolve the IntersectionObserver root
|
|
1030
|
+
* Resolve the IntersectionObserver root - the scroll viewport the
|
|
828
1031
|
* molecule observes. Returning `null` short-circuits the attach;
|
|
829
1032
|
* the molecule's rAF retry loop polls again next frame.
|
|
830
1033
|
*/
|
|
@@ -837,12 +1040,16 @@ interface CngxTabOverflowDomAdapter {
|
|
|
837
1040
|
}
|
|
838
1041
|
/**
|
|
839
1042
|
* Factory signature for {@link CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY}.
|
|
1043
|
+
*
|
|
1044
|
+
* @category common/tabs/overflow
|
|
840
1045
|
*/
|
|
841
1046
|
type CngxTabOverflowDomAdapterFactory = () => CngxTabOverflowDomAdapter;
|
|
842
1047
|
/**
|
|
843
1048
|
* Default adapter for the cngx-native `<cngx-tab-group>` strip:
|
|
844
1049
|
* walks `host.closest('.cngx-tabs__strip-wrapper')` for the IO root,
|
|
845
1050
|
* then `[id="${handle.id}-header"]` for each button.
|
|
1051
|
+
*
|
|
1052
|
+
* @category common/tabs/overflow
|
|
846
1053
|
*/
|
|
847
1054
|
declare function createCngxTabOverflowDefaultDomAdapter(): CngxTabOverflowDomAdapter;
|
|
848
1055
|
/**
|
|
@@ -851,16 +1058,24 @@ declare function createCngxTabOverflowDefaultDomAdapter(): CngxTabOverflowDomAda
|
|
|
851
1058
|
* swap in a Material, custom-skin, or test-double adapter without
|
|
852
1059
|
* forking the molecule. Defaults to
|
|
853
1060
|
* {@link createCngxTabOverflowDefaultDomAdapter}.
|
|
1061
|
+
*
|
|
1062
|
+
* @category common/tabs/overflow
|
|
1063
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/dom-adapter.ts
|
|
1064
|
+
* @since 0.1.0
|
|
854
1065
|
*/
|
|
855
1066
|
declare const CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY: InjectionToken<CngxTabOverflowDomAdapterFactory>;
|
|
856
1067
|
|
|
857
1068
|
/**
|
|
858
1069
|
* Outcome reported by an `attempt` callback. `true` halts the loop
|
|
859
1070
|
* (success); `false` or `null` schedules another tick.
|
|
1071
|
+
*
|
|
1072
|
+
* @category common/tabs/overflow
|
|
860
1073
|
*/
|
|
861
1074
|
type CngxDomAnchorRetryResult = true | false | null;
|
|
862
1075
|
/**
|
|
863
1076
|
* Configuration for {@link createDomAnchorRetry}.
|
|
1077
|
+
*
|
|
1078
|
+
* @category common/tabs/overflow
|
|
864
1079
|
*/
|
|
865
1080
|
interface CngxDomAnchorRetryOptions {
|
|
866
1081
|
/**
|
|
@@ -870,14 +1085,14 @@ interface CngxDomAnchorRetryOptions {
|
|
|
870
1085
|
readonly attempt: () => CngxDomAnchorRetryResult;
|
|
871
1086
|
/**
|
|
872
1087
|
* Cap on unsuccessful attempts before {@link onGiveUp} fires.
|
|
873
|
-
* The first synchronous call counts as attempt #1
|
|
1088
|
+
* The first synchronous call counts as attempt #1 - `5` permits
|
|
874
1089
|
* four scheduled retries after the initial.
|
|
875
1090
|
*/
|
|
876
1091
|
readonly maxAttempts: number;
|
|
877
1092
|
/**
|
|
878
1093
|
* Schedules the next attempt (rAF / `afterNextRender` /
|
|
879
1094
|
* `setTimeout` / `queueMicrotask`). Returns a cancellation
|
|
880
|
-
* closure
|
|
1095
|
+
* closure - return a noop when the scheduler doesn't expose one.
|
|
881
1096
|
*/
|
|
882
1097
|
readonly schedule: (cb: () => void) => () => void;
|
|
883
1098
|
/** Fires once after the `maxAttempts`-th unsuccessful attempt. */
|
|
@@ -885,6 +1100,8 @@ interface CngxDomAnchorRetryOptions {
|
|
|
885
1100
|
}
|
|
886
1101
|
/**
|
|
887
1102
|
* Imperative handle returned by {@link createDomAnchorRetry}.
|
|
1103
|
+
*
|
|
1104
|
+
* @category common/tabs/overflow
|
|
888
1105
|
*/
|
|
889
1106
|
interface CngxDomAnchorRetryHandle {
|
|
890
1107
|
/** Begin (or restart) the retry loop. Resets the attempt counter. */
|
|
@@ -893,7 +1110,7 @@ interface CngxDomAnchorRetryHandle {
|
|
|
893
1110
|
cancel(): void;
|
|
894
1111
|
}
|
|
895
1112
|
/**
|
|
896
|
-
* Bounded retry loop for DOM-anchoring patterns
|
|
1113
|
+
* Bounded retry loop for DOM-anchoring patterns - shared
|
|
897
1114
|
* attempt-counter + give-up + cancellation contract. Used by
|
|
898
1115
|
* `<cngx-tab-overflow>`'s rAF strip-attach loop and `[cngxMatTabs]`'s
|
|
899
1116
|
* `afterNextRender` header-anchor loop. Consumer-supplied scheduler
|
|
@@ -917,16 +1134,20 @@ interface CngxDomAnchorRetryHandle {
|
|
|
917
1134
|
* afterNextRender(() => retry.start());
|
|
918
1135
|
* destroyRef.onDestroy(() => retry.cancel());
|
|
919
1136
|
* ```
|
|
1137
|
+
*
|
|
1138
|
+
* @category common/tabs/overflow
|
|
920
1139
|
*/
|
|
921
1140
|
declare function createDomAnchorRetry(options: CngxDomAnchorRetryOptions): CngxDomAnchorRetryHandle;
|
|
922
1141
|
/**
|
|
923
|
-
* Factory signature for {@link CNGX_DOM_ANCHOR_RETRY_FACTORY}
|
|
1142
|
+
* Factory signature for {@link CNGX_DOM_ANCHOR_RETRY_FACTORY} -
|
|
924
1143
|
* matches {@link createDomAnchorRetry} for drop-in overrides.
|
|
1144
|
+
*
|
|
1145
|
+
* @category common/tabs/overflow
|
|
925
1146
|
*/
|
|
926
1147
|
type CngxDomAnchorRetryFactory = (options: CngxDomAnchorRetryOptions) => CngxDomAnchorRetryHandle;
|
|
927
1148
|
/**
|
|
928
1149
|
* DI token for the DOM-anchor retry policy. Default
|
|
929
|
-
* {@link createDomAnchorRetry}. Two real consumers today
|
|
1150
|
+
* {@link createDomAnchorRetry}. Two real consumers today -
|
|
930
1151
|
* `<cngx-tab-overflow>`'s rAF strip-attach loop and
|
|
931
1152
|
* `[cngxMatTabs]`'s `afterNextRender` header-anchor loop. Override
|
|
932
1153
|
* via `providers` / `viewProviders` for retry-with-backoff,
|
|
@@ -934,6 +1155,10 @@ type CngxDomAnchorRetryFactory = (options: CngxDomAnchorRetryOptions) => CngxDom
|
|
|
934
1155
|
* `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`,
|
|
935
1156
|
* `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY`, and
|
|
936
1157
|
* `CNGX_TABS_COMMIT_HANDLER_FACTORY`.
|
|
1158
|
+
*
|
|
1159
|
+
* @category common/tabs/overflow
|
|
1160
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/dom-anchor-retry.ts
|
|
1161
|
+
* @since 0.1.0
|
|
937
1162
|
*/
|
|
938
1163
|
declare const CNGX_DOM_ANCHOR_RETRY_FACTORY: InjectionToken<CngxDomAnchorRetryFactory>;
|
|
939
1164
|
|
|
@@ -943,6 +1168,8 @@ declare const CNGX_DOM_ANCHOR_RETRY_FACTORY: InjectionToken<CngxDomAnchorRetryFa
|
|
|
943
1168
|
* injection context) and the resolved {@link CngxTabsConfig}; the
|
|
944
1169
|
* factory runs the 3-stage cascade per slot key. Sibling shape to
|
|
945
1170
|
* `createStepperTemplateBindings`.
|
|
1171
|
+
*
|
|
1172
|
+
* @category common/tabs/slots
|
|
946
1173
|
*/
|
|
947
1174
|
interface CngxTabGroupTemplateBindingsOptions {
|
|
948
1175
|
readonly errorBadgeSlot: Signal<CngxTabErrorBadge | undefined>;
|
|
@@ -954,6 +1181,8 @@ interface CngxTabGroupTemplateBindingsOptions {
|
|
|
954
1181
|
* Output of {@link createTabGroupTemplateBindings}. One resolved
|
|
955
1182
|
* `Signal<TemplateRef | null>` per slot; `null` means the organism
|
|
956
1183
|
* renders its built-in default.
|
|
1184
|
+
*
|
|
1185
|
+
* @category common/tabs/slots
|
|
957
1186
|
*/
|
|
958
1187
|
interface CngxTabGroupTemplateBindings {
|
|
959
1188
|
readonly errorBadge: Signal<TemplateRef<CngxTabErrorBadgeContext> | null>;
|
|
@@ -973,6 +1202,8 @@ interface CngxTabGroupTemplateBindings {
|
|
|
973
1202
|
* Single-consumer today: `[cngxMatTabs]` does not consume this —
|
|
974
1203
|
* Material owns the rendered tab-button chrome via its own MDC
|
|
975
1204
|
* template, leaving no DOM seam. See `tabs-accepted-debt §9`.
|
|
1205
|
+
*
|
|
1206
|
+
* @category common/tabs/slots
|
|
976
1207
|
*/
|
|
977
1208
|
declare function createTabGroupTemplateBindings(opts: CngxTabGroupTemplateBindingsOptions): CngxTabGroupTemplateBindings;
|
|
978
1209
|
|
|
@@ -981,6 +1212,8 @@ declare function createTabGroupTemplateBindings(opts: CngxTabGroupTemplateBindin
|
|
|
981
1212
|
* Passing presenter / i18n / config in (instead of re-injecting)
|
|
982
1213
|
* keeps the factory pure — one call returns the bundle, no
|
|
983
1214
|
* injection context required.
|
|
1215
|
+
*
|
|
1216
|
+
* @category common/tabs/announcements
|
|
984
1217
|
*/
|
|
985
1218
|
interface CngxTabGroupAnnouncementsOptions {
|
|
986
1219
|
readonly presenter: CngxTabGroupHost;
|
|
@@ -996,6 +1229,8 @@ interface CngxTabGroupAnnouncementsOptions {
|
|
|
996
1229
|
* Host bindings and template outlets read these directly. Owns one
|
|
997
1230
|
* internal `linkedSignal` slot (prior-active-index tracker driving
|
|
998
1231
|
* the success-arm direction prefix); consumers never touch it.
|
|
1232
|
+
*
|
|
1233
|
+
* @category common/tabs/announcements
|
|
999
1234
|
*/
|
|
1000
1235
|
interface CngxTabGroupAnnouncements {
|
|
1001
1236
|
/**
|
|
@@ -1051,6 +1286,8 @@ interface CngxTabGroupAnnouncements {
|
|
|
1051
1286
|
* (prior-active-index, drives the success-arm direction prefix) —
|
|
1052
1287
|
* lazy by `linkedSignal` semantics, so the organism reads
|
|
1053
1288
|
* `liveAnnouncement` once at construction to seed it.
|
|
1289
|
+
*
|
|
1290
|
+
* @category common/tabs/announcements
|
|
1054
1291
|
*/
|
|
1055
1292
|
declare function createTabGroupAnnouncements(options: CngxTabGroupAnnouncementsOptions): CngxTabGroupAnnouncements;
|
|
1056
1293
|
|
|
@@ -1064,6 +1301,7 @@ declare function createTabGroupAnnouncements(options: CngxTabGroupAnnouncementsO
|
|
|
1064
1301
|
* directives or `withTab*Template` config features.
|
|
1065
1302
|
*
|
|
1066
1303
|
* @internal
|
|
1304
|
+
* @category common/tabs
|
|
1067
1305
|
*/
|
|
1068
1306
|
declare const CNGX_TABS_GLYPHS: {
|
|
1069
1307
|
/** Default visual for `*cngxTabErrorBadge` when no override is bound. */
|
|
@@ -1077,6 +1315,8 @@ declare const CNGX_TABS_GLYPHS: {
|
|
|
1077
1315
|
* Stable across CD passes so `aria-activedescendant` resolves to
|
|
1078
1316
|
* the same `<li>`. `-overflow-option` suffix avoids collision with
|
|
1079
1317
|
* the strip-button (`-header`) and per-tab descriptor (`-desc`).
|
|
1318
|
+
*
|
|
1319
|
+
* @category common/tabs/overflow
|
|
1080
1320
|
*/
|
|
1081
1321
|
declare function tabOverflowOptionId(tab: CngxTabHandle): string;
|
|
1082
1322
|
/**
|
|
@@ -1084,6 +1324,8 @@ declare function tabOverflowOptionId(tab: CngxTabHandle): string;
|
|
|
1084
1324
|
* runs the `contentChild()` queries (injection-context-only) and
|
|
1085
1325
|
* supplies the reactive sources; the factory owns cascade
|
|
1086
1326
|
* resolution and per-context builders.
|
|
1327
|
+
*
|
|
1328
|
+
* @category common/tabs/overflow
|
|
1087
1329
|
*/
|
|
1088
1330
|
interface CngxTabOverflowTemplateBindingsOptions {
|
|
1089
1331
|
/** `contentChild(CngxTabOverflowTrigger)` from the molecule. */
|
|
@@ -1096,13 +1338,15 @@ interface CngxTabOverflowTemplateBindingsOptions {
|
|
|
1096
1338
|
readonly hiddenCount: Signal<number>;
|
|
1097
1339
|
/** Live hidden-tab list (drives `triggerContext.hiddenTabs`). */
|
|
1098
1340
|
readonly hiddenTabs: Signal<readonly CngxTabHandle[]>;
|
|
1099
|
-
/** Commit-aware select callback
|
|
1341
|
+
/** Commit-aware select callback - invoked from `itemContext.pick`. */
|
|
1100
1342
|
readonly pickTab: (tab: CngxTabHandle) => void;
|
|
1101
1343
|
}
|
|
1102
1344
|
/**
|
|
1103
1345
|
* Output of {@link createTabOverflowTemplateBindings}. Carries the two
|
|
1104
1346
|
* resolved templates plus a stable trigger-context signal and an
|
|
1105
1347
|
* imperative item-context builder.
|
|
1348
|
+
*
|
|
1349
|
+
* @category common/tabs/overflow
|
|
1106
1350
|
*/
|
|
1107
1351
|
interface CngxTabOverflowTemplateBindings {
|
|
1108
1352
|
readonly triggerTemplate: Signal<TemplateRef<CngxTabOverflowTriggerContext> | null>;
|
|
@@ -1128,24 +1372,30 @@ interface CngxTabOverflowTemplateBindings {
|
|
|
1128
1372
|
* `CNGX_TABS_CONFIG.templates.overflow*` > built-in markup
|
|
1129
1373
|
* (template-outlet returns `null`).
|
|
1130
1374
|
*
|
|
1131
|
-
* Pure
|
|
1375
|
+
* Pure - no DI, no side effects, no destroy hooks. Safe to call
|
|
1132
1376
|
* from a component's field-init block. Mirrors the select-family
|
|
1133
1377
|
* `createTemplateRegistry` pattern.
|
|
1378
|
+
*
|
|
1379
|
+
* @category common/tabs/overflow
|
|
1134
1380
|
*/
|
|
1135
1381
|
declare function createTabOverflowTemplateBindings(opts: CngxTabOverflowTemplateBindingsOptions): CngxTabOverflowTemplateBindings;
|
|
1136
1382
|
/**
|
|
1137
1383
|
* Resets the AD highlight on popover close. Keyboard-open paths
|
|
1138
1384
|
* (ArrowDown / End / typeahead on the closed trigger) set
|
|
1139
|
-
* `activeIndex` via AD's own keydown listener before opening
|
|
1385
|
+
* `activeIndex` via AD's own keydown listener before opening -
|
|
1140
1386
|
* unaffected. Mouse-open leaves `activeIndex === -1` so the popover
|
|
1141
1387
|
* renders unhighlighted. Without this reset, the next open would
|
|
1142
1388
|
* inherit a stale index from the prior keyboard session.
|
|
1143
1389
|
*
|
|
1144
1390
|
* Must run in injection context.
|
|
1391
|
+
*
|
|
1392
|
+
* @category common/tabs/overflow
|
|
1145
1393
|
*/
|
|
1146
1394
|
declare function createOverflowPopoverHighlightSync(popover: Signal<CngxPopover>, ad: Signal<CngxActiveDescendant>): void;
|
|
1147
1395
|
/**
|
|
1148
1396
|
* Factory signature for {@link CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY}.
|
|
1397
|
+
*
|
|
1398
|
+
* @category common/tabs/overflow
|
|
1149
1399
|
*/
|
|
1150
1400
|
type CngxOverflowPopoverHighlightSyncFactory = (popover: Signal<CngxPopover>, ad: Signal<CngxActiveDescendant>) => void;
|
|
1151
1401
|
/**
|
|
@@ -1155,18 +1405,24 @@ type CngxOverflowPopoverHighlightSyncFactory = (popover: Signal<CngxPopover>, ad
|
|
|
1155
1405
|
* telemetry on close, custom highlight rules. Symmetric to
|
|
1156
1406
|
* `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY` and
|
|
1157
1407
|
* `CNGX_TABS_COMMIT_HANDLER_FACTORY`.
|
|
1408
|
+
*
|
|
1409
|
+
* @category common/tabs/overflow
|
|
1410
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/overflow-template-cascade.ts
|
|
1411
|
+
* @since 0.1.0
|
|
1158
1412
|
*/
|
|
1159
1413
|
declare const CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY: InjectionToken<CngxOverflowPopoverHighlightSyncFactory>;
|
|
1160
1414
|
|
|
1161
1415
|
/**
|
|
1162
1416
|
* Options for {@link createOrganismScrollSync}.
|
|
1417
|
+
*
|
|
1418
|
+
* @category common/tabs/scroll-sync
|
|
1163
1419
|
*/
|
|
1164
1420
|
interface CngxOrganismScrollSyncOptions {
|
|
1165
1421
|
/** Reactive source for the active item id; tracked by the effect. */
|
|
1166
1422
|
readonly activeId: Signal<string | null>;
|
|
1167
1423
|
/**
|
|
1168
1424
|
* Host element containing the per-item buttons. Items must carry
|
|
1169
|
-
* `id="${itemId}-header"`
|
|
1425
|
+
* `id="${itemId}-header"` - the convention used by
|
|
1170
1426
|
* `<cngx-tab-group>` and `<cngx-stepper>`.
|
|
1171
1427
|
*/
|
|
1172
1428
|
readonly hostElement: HTMLElement;
|
|
@@ -1184,11 +1440,15 @@ interface CngxOrganismScrollSyncOptions {
|
|
|
1184
1440
|
* scrolls the matching `[id="<itemId>-header"]` into view.
|
|
1185
1441
|
*
|
|
1186
1442
|
* The DOM call sits in `untracked()` (only `activeId` is tracked).
|
|
1187
|
-
* `scrollIntoView` is missing in jsdom
|
|
1443
|
+
* `scrollIntoView` is missing in jsdom - guarded with optional chain.
|
|
1444
|
+
*
|
|
1445
|
+
* @category common/tabs/scroll-sync
|
|
1188
1446
|
*/
|
|
1189
1447
|
declare function createOrganismScrollSync(opts: CngxOrganismScrollSyncOptions): void;
|
|
1190
1448
|
/**
|
|
1191
1449
|
* Factory signature for {@link CNGX_ORGANISM_SCROLL_SYNC_FACTORY}.
|
|
1450
|
+
*
|
|
1451
|
+
* @category common/tabs/scroll-sync
|
|
1192
1452
|
*/
|
|
1193
1453
|
type CngxOrganismScrollSyncFactory = (opts: CngxOrganismScrollSyncOptions) => void;
|
|
1194
1454
|
/**
|
|
@@ -1197,16 +1457,22 @@ type CngxOrganismScrollSyncFactory = (opts: CngxOrganismScrollSyncOptions) => vo
|
|
|
1197
1457
|
* custom selector, telemetry, or `prefers-reduced-motion` opt-out.
|
|
1198
1458
|
* Sibling to `CNGX_DOM_ANCHOR_RETRY_FACTORY` and
|
|
1199
1459
|
* `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`.
|
|
1460
|
+
*
|
|
1461
|
+
* @category common/tabs/scroll-sync
|
|
1462
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/scroll-sync/organism-scroll-sync.ts
|
|
1463
|
+
* @since 0.1.0
|
|
1200
1464
|
*/
|
|
1201
1465
|
declare const CNGX_ORGANISM_SCROLL_SYNC_FACTORY: InjectionToken<CngxOrganismScrollSyncFactory>;
|
|
1202
1466
|
|
|
1203
1467
|
/**
|
|
1204
1468
|
* Options for {@link createDirectiveByIdMap}.
|
|
1469
|
+
*
|
|
1470
|
+
* @category common/tabs/registry
|
|
1205
1471
|
*/
|
|
1206
1472
|
interface CngxDirectiveByIdMapOptions<T extends {
|
|
1207
1473
|
id: () => string;
|
|
1208
1474
|
}> {
|
|
1209
|
-
/** Reactive source
|
|
1475
|
+
/** Reactive source - typically `contentChildren(...)`. */
|
|
1210
1476
|
readonly source: Signal<readonly T[]>;
|
|
1211
1477
|
}
|
|
1212
1478
|
/**
|
|
@@ -1214,12 +1480,16 @@ interface CngxDirectiveByIdMapOptions<T extends {
|
|
|
1214
1480
|
* directives keyed by `id()`. Structural equal prevents cascade when
|
|
1215
1481
|
* `contentChildren` re-emits an unchanged child set. Shared by
|
|
1216
1482
|
* `<cngx-tab-group>`, `<cngx-stepper>`, and `<cngx-mat-stepper>`.
|
|
1483
|
+
*
|
|
1484
|
+
* @category common/tabs/registry
|
|
1217
1485
|
*/
|
|
1218
1486
|
declare function createDirectiveByIdMap<T extends {
|
|
1219
1487
|
id: () => string;
|
|
1220
1488
|
}>(opts: CngxDirectiveByIdMapOptions<T>): Signal<Map<string, T>>;
|
|
1221
1489
|
/**
|
|
1222
1490
|
* Factory signature for {@link CNGX_DIRECTIVE_BY_ID_MAP_FACTORY}.
|
|
1491
|
+
*
|
|
1492
|
+
* @category common/tabs/registry
|
|
1223
1493
|
*/
|
|
1224
1494
|
type CngxDirectiveByIdMapFactory = <T extends {
|
|
1225
1495
|
id: () => string;
|
|
@@ -1230,6 +1500,10 @@ type CngxDirectiveByIdMapFactory = <T extends {
|
|
|
1230
1500
|
* telemetry, or custom equality. Sibling to
|
|
1231
1501
|
* `CNGX_DOM_ANCHOR_RETRY_FACTORY` and
|
|
1232
1502
|
* `CNGX_ORGANISM_SCROLL_SYNC_FACTORY`.
|
|
1503
|
+
*
|
|
1504
|
+
* @category common/tabs/registry
|
|
1505
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/registry/directive-by-id-map.ts
|
|
1506
|
+
* @since 0.1.0
|
|
1233
1507
|
*/
|
|
1234
1508
|
declare const CNGX_DIRECTIVE_BY_ID_MAP_FACTORY: InjectionToken<CngxDirectiveByIdMapFactory>;
|
|
1235
1509
|
|