@cngx/ui 0.1.0-rc.3 → 0.1.0-rc.4
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/accordion/README.md +86 -0
- package/collection/README.md +167 -0
- package/data-grid-accordion/README.md +137 -0
- package/fesm2022/cngx-ui-accordion.mjs +853 -0
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -0
- package/fesm2022/cngx-ui-action-button.mjs +2 -2
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +1044 -0
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/cngx-ui-collection.mjs +645 -0
- package/fesm2022/cngx-ui-collection.mjs.map +1 -0
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +1135 -0
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -0
- package/fesm2022/cngx-ui-empty-state.mjs +2 -2
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +10 -10
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +229 -0
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -0
- package/fesm2022/cngx-ui-paginator.mjs +324 -255
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +547 -65
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +6 -6
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +1 -1
- package/mat-accordion/README.md +48 -0
- package/package.json +21 -1
- package/paginator/README.md +9 -6
- package/sidenav/README.md +89 -3
- package/types/cngx-ui-accordion.d.ts +801 -0
- package/types/cngx-ui-breadcrumb.d.ts +890 -0
- package/types/cngx-ui-collection.d.ts +396 -0
- package/types/cngx-ui-data-grid-accordion.d.ts +912 -0
- package/types/cngx-ui-mat-accordion.d.ts +63 -0
- package/types/cngx-ui-paginator.d.ts +258 -146
- package/types/cngx-ui-sidenav.d.ts +429 -21
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, InjectionToken, EnvironmentProviders, Provider } from '@angular/core';
|
|
3
|
+
import * as i1 from '@cngx/common/data';
|
|
4
|
+
import { CngxPaginate, AsyncView } from '@cngx/common/data';
|
|
5
|
+
export { CNGX_PAGINATOR_HOST, CngxPaginatorHost, CngxPaginatorInfinite, CngxPaginatorLoadMore } from '@cngx/ui/paginator';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Context exposed to a projected item template - the accumulated item and its
|
|
9
|
+
* index in the revealed slice.
|
|
10
|
+
*
|
|
11
|
+
* @category ui/collection
|
|
12
|
+
*/
|
|
13
|
+
interface CngxIncrementalItemContext<T> {
|
|
14
|
+
readonly $implicit: T;
|
|
15
|
+
readonly index: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Item slot. Project `<ng-template cngxIncrementalItem let-item let-i="index">`
|
|
19
|
+
* inside `<cngx-incremental-list>` to render each accumulated row; the organism
|
|
20
|
+
* renders it per item in the revealed slice. Resolution cascades instance slot
|
|
21
|
+
* -> `CngxIncrementalListConfig.templates.item` -> the built-in text row.
|
|
22
|
+
*
|
|
23
|
+
* @category ui/collection
|
|
24
|
+
* @since 0.1.0
|
|
25
|
+
*/
|
|
26
|
+
declare class CngxIncrementalItem<T = unknown> {
|
|
27
|
+
readonly templateRef: TemplateRef<CngxIncrementalItemContext<T>>;
|
|
28
|
+
static ngTemplateContextGuard<T>(_dir: CngxIncrementalItem<T>, ctx: unknown): ctx is CngxIncrementalItemContext<T>;
|
|
29
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxIncrementalItem<any>, never>;
|
|
30
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxIncrementalItem<any>, "ng-template[cngxIncrementalItem]", ["cngxIncrementalItem"], {}, {}, never, never, true, never>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Empty slot. Project `<ng-template cngxIncrementalEmpty>` to replace the
|
|
34
|
+
* built-in empty view shown when the bound state settles with no data.
|
|
35
|
+
*
|
|
36
|
+
* @category ui/collection
|
|
37
|
+
* @since 0.1.0
|
|
38
|
+
*/
|
|
39
|
+
declare class CngxIncrementalEmpty {
|
|
40
|
+
readonly templateRef: TemplateRef<any>;
|
|
41
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxIncrementalEmpty, never>;
|
|
42
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxIncrementalEmpty, "ng-template[cngxIncrementalEmpty]", ["cngxIncrementalEmpty"], {}, {}, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Context exposed to a projected error template - a `retry` callback that
|
|
46
|
+
* re-drives the consumer's data source (emits the organism's `retry` output)
|
|
47
|
+
* and the raw `error` the bound state carries.
|
|
48
|
+
*
|
|
49
|
+
* @category ui/collection
|
|
50
|
+
*/
|
|
51
|
+
interface CngxIncrementalErrorContext {
|
|
52
|
+
readonly retry: () => void;
|
|
53
|
+
readonly error: unknown;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Error slot. Project `<ng-template cngxIncrementalError let-retry="retry">` to
|
|
57
|
+
* replace the built-in error + retry view. Resolution cascades instance slot ->
|
|
58
|
+
* `CngxIncrementalListConfig.templates.error` -> the built-in message + button.
|
|
59
|
+
*
|
|
60
|
+
* @category ui/collection
|
|
61
|
+
* @since 0.1.0
|
|
62
|
+
*/
|
|
63
|
+
declare class CngxIncrementalError {
|
|
64
|
+
readonly templateRef: TemplateRef<CngxIncrementalErrorContext>;
|
|
65
|
+
static ngTemplateContextGuard(_dir: CngxIncrementalError, ctx: unknown): ctx is CngxIncrementalErrorContext;
|
|
66
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxIncrementalError, never>;
|
|
67
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxIncrementalError, "ng-template[cngxIncrementalError]", ["cngxIncrementalError"], {}, {}, never, never, true, never>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* End-reached slot. Project `<ng-template cngxIncrementalEnd>` to replace the
|
|
71
|
+
* built-in "all loaded" label shown once every page has been revealed.
|
|
72
|
+
*
|
|
73
|
+
* @category ui/collection
|
|
74
|
+
* @since 0.1.0
|
|
75
|
+
*/
|
|
76
|
+
declare class CngxIncrementalEnd {
|
|
77
|
+
readonly templateRef: TemplateRef<any>;
|
|
78
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxIncrementalEnd, never>;
|
|
79
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxIncrementalEnd, "ng-template[cngxIncrementalEnd]", ["cngxIncrementalEnd"], {}, {}, never, never, true, never>;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Loading slot. Project `<ng-template cngxIncrementalLoading>` to replace the
|
|
83
|
+
* built-in first-load progress indicator. Resolution cascades instance slot ->
|
|
84
|
+
* `CngxIncrementalListConfig.templates.loading` -> the built-in `CngxProgress`.
|
|
85
|
+
*
|
|
86
|
+
* @category ui/collection
|
|
87
|
+
* @since 0.1.0
|
|
88
|
+
*/
|
|
89
|
+
declare class CngxIncrementalLoading {
|
|
90
|
+
readonly templateRef: TemplateRef<any>;
|
|
91
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxIncrementalLoading, never>;
|
|
92
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxIncrementalLoading, "ng-template[cngxIncrementalLoading]", ["cngxIncrementalLoading"], {}, {}, never, never, true, never>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Visual skin. Paint-only - structure, ARIA, and keyboard behaviour are
|
|
97
|
+
* identical across values; each is reflected onto `[data-skin]`.
|
|
98
|
+
* - `plain` (default): browser-native list, no chrome.
|
|
99
|
+
* - `divided`: hairline separators between rows.
|
|
100
|
+
* - `card`: the list sits on an elevated, rounded surface.
|
|
101
|
+
*/
|
|
102
|
+
type CngxIncrementalListSkin = 'plain' | 'divided' | 'card';
|
|
103
|
+
/**
|
|
104
|
+
* Append-style collection organism. \
|
|
105
|
+
* Accumulates rows across pages (append, don't replace) and switches its view
|
|
106
|
+
* by async status - loading / content / empty / error / end-reached - from a
|
|
107
|
+
* single `[state]` source. A thin shell over the `CngxPaginate` brain (applied
|
|
108
|
+
* as a `hostDirective`): the accumulated slice is read from the brain's
|
|
109
|
+
* `cumulativeRange()`, the end-reached branch from `isLast()`, and the loading
|
|
110
|
+
* gate from the bound state's `isBusy()`. It owns no `[mode]` flag and no
|
|
111
|
+
* accumulation state of its own.
|
|
112
|
+
*
|
|
113
|
+
* The brain is provided as `CNGX_PAGINATOR_HOST` via `useExisting`, so an
|
|
114
|
+
* existing trigger atom (`cngx-pgn-load-more`, `cngx-pgn-infinite`) injects the
|
|
115
|
+
* same contract when projected - the trigger stays a swappable terminal unit,
|
|
116
|
+
* the rich async experience lives here.
|
|
117
|
+
*
|
|
118
|
+
* Two-way `[(pageIndex)]` / `[(pageSize)]` mirror the paginator shell: the
|
|
119
|
+
* brain's controlled inputs are aliased through `hostDirectives` and this
|
|
120
|
+
* component is the single emitter of the matching outputs.
|
|
121
|
+
*
|
|
122
|
+
* All ARIA is signal-driven: `aria-busy` reflects the brain busy signal and a
|
|
123
|
+
* polite live region communicates every settle (empty / error / end-reached).
|
|
124
|
+
*
|
|
125
|
+
* @category ui/collection
|
|
126
|
+
* @docsKind primary
|
|
127
|
+
* @wcag AA
|
|
128
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list.component.ts
|
|
129
|
+
* @since 0.1.0
|
|
130
|
+
* @relatedTo CngxPaginate, CngxPaginator, CngxAsyncState
|
|
131
|
+
*/
|
|
132
|
+
declare class CngxIncrementalList<T = unknown> {
|
|
133
|
+
/** Visual skin; reflected onto `[data-skin]`. Paint-only. */
|
|
134
|
+
readonly skin: _angular_core.InputSignal<CngxIncrementalListSkin>;
|
|
135
|
+
/**
|
|
136
|
+
* Opt into DOM recycling. When set, the accumulated content branch renders
|
|
137
|
+
* only the visible window of rows through an internal virtualized body inside
|
|
138
|
+
* a bounded scroll viewport; every off-window row is a pixel spacer. Unset
|
|
139
|
+
* (default) keeps the render-all path - the recycler never constructs, so a
|
|
140
|
+
* small list pays nothing. Reflected onto `[data-virtualize]`.
|
|
141
|
+
*/
|
|
142
|
+
readonly virtualize: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
143
|
+
/**
|
|
144
|
+
* Initial per-row height estimate (px) for the virtualized window - the first
|
|
145
|
+
* guess before a row is measured. Ignored unless `[virtualize]` is set.
|
|
146
|
+
*/
|
|
147
|
+
readonly estimateSize: _angular_core.InputSignal<number>;
|
|
148
|
+
/** Emits the effective page index on every change - navigation or `total`-shrink clamp. */
|
|
149
|
+
readonly pageIndexChange: _angular_core.OutputEmitterRef<number>;
|
|
150
|
+
/** Emits the effective page size on every change. */
|
|
151
|
+
readonly pageSizeChange: _angular_core.OutputEmitterRef<number>;
|
|
152
|
+
/**
|
|
153
|
+
* Emits when the error view's retry affordance is activated (the built-in
|
|
154
|
+
* button or a projected error slot's `retry()` context). The consumer re-runs
|
|
155
|
+
* its data source; the organism owns no fetch of its own.
|
|
156
|
+
*/
|
|
157
|
+
readonly retry: _angular_core.OutputEmitterRef<void>;
|
|
158
|
+
/**
|
|
159
|
+
* Item identity for the accumulated `@for`. Defaults to the row index
|
|
160
|
+
* (append-safe: appended rows keep their position). Supply a key fn when the
|
|
161
|
+
* bound `[state]` data can be replaced or reordered, so a projected item
|
|
162
|
+
* template keeps its per-row state instead of being reused by position.
|
|
163
|
+
*/
|
|
164
|
+
readonly trackBy: _angular_core.InputSignal<(index: number, item: T) => unknown>;
|
|
165
|
+
protected readonly paginate: CngxPaginate;
|
|
166
|
+
private readonly host;
|
|
167
|
+
private readonly config;
|
|
168
|
+
private readonly itemSlot;
|
|
169
|
+
private readonly emptySlot;
|
|
170
|
+
private readonly errorSlot;
|
|
171
|
+
private readonly endSlot;
|
|
172
|
+
private readonly loadingSlot;
|
|
173
|
+
protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
174
|
+
protected readonly emptyTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
175
|
+
protected readonly errorTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
176
|
+
protected readonly endTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
177
|
+
protected readonly loadingTemplate: _angular_core.Signal<TemplateRef<any> | null>;
|
|
178
|
+
/**
|
|
179
|
+
* Which region renders, resolved from the single `[state]` source through the
|
|
180
|
+
* shared `resolveAsyncView` switch - no local state machine. With no bound
|
|
181
|
+
* state the organism is a plain content list.
|
|
182
|
+
*/
|
|
183
|
+
protected readonly view: _angular_core.Signal<AsyncView>;
|
|
184
|
+
/** `true` on the last page - every accumulated item has been revealed. */
|
|
185
|
+
protected readonly exhausted: _angular_core.Signal<boolean>;
|
|
186
|
+
/**
|
|
187
|
+
* The accumulated slice: every page revealed so far, sliced from the top of
|
|
188
|
+
* the bound data. Pure derivation of the brain `cumulativeRange()` and the
|
|
189
|
+
* state's `data()`; the explicit `equal` stops a fresh-array identity from
|
|
190
|
+
* cascading downstream.
|
|
191
|
+
*/
|
|
192
|
+
protected readonly items: _angular_core.Signal<readonly T[]>;
|
|
193
|
+
protected readonly loadingLabel: _angular_core.Signal<string>;
|
|
194
|
+
protected readonly emptyLabel: _angular_core.Signal<string>;
|
|
195
|
+
protected readonly errorLabel: _angular_core.Signal<string>;
|
|
196
|
+
protected readonly pageErrorLabel: _angular_core.Signal<string>;
|
|
197
|
+
protected readonly retryLabel: _angular_core.Signal<string>;
|
|
198
|
+
protected readonly endLabel: _angular_core.Signal<string>;
|
|
199
|
+
/**
|
|
200
|
+
* Error text for the active error view - the distinct `pageError` phrasing
|
|
201
|
+
* when a subsequent page failed with the list still visible (`content+error`),
|
|
202
|
+
* the first-load `error` phrasing otherwise. Drives both the built-in visible
|
|
203
|
+
* text and the live-region announcement so the two never diverge.
|
|
204
|
+
*/
|
|
205
|
+
protected readonly errorViewLabel: _angular_core.Signal<string>;
|
|
206
|
+
/**
|
|
207
|
+
* Polite live-region message - communicated on every settle through the same
|
|
208
|
+
* labels the visible views use, so a config or slot override stays in sync.
|
|
209
|
+
*/
|
|
210
|
+
protected readonly statusMessage: _angular_core.Signal<string>;
|
|
211
|
+
/** Stable retry callback - emits the `retry` output; shared by the built-in button and the error slot context. */
|
|
212
|
+
protected readonly retryFn: () => void;
|
|
213
|
+
/**
|
|
214
|
+
* Focus fallback for the virtualized body: when a focused row recycles out and
|
|
215
|
+
* the window has no row left to catch focus, restore it to the projected
|
|
216
|
+
* trigger. The organism owns the trigger `ng-content`, so the escape target is
|
|
217
|
+
* the organism's, not the body's.
|
|
218
|
+
*/
|
|
219
|
+
protected handleFocusEscaped(): void;
|
|
220
|
+
/** Context handed to a projected error slot: the retry callback and the raw error. */
|
|
221
|
+
protected readonly errorContext: _angular_core.Signal<CngxIncrementalErrorContext>;
|
|
222
|
+
/** `@for` track expression - delegates to the `trackBy` input (index by default). */
|
|
223
|
+
protected readonly trackItem: (index: number, item: T) => unknown;
|
|
224
|
+
constructor();
|
|
225
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxIncrementalList<any>, never>;
|
|
226
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxIncrementalList<any>, "cngx-incremental-list", ["cngxIncrementalList"], { "skin": { "alias": "skin"; "required": false; "isSignal": true; }; "virtualize": { "alias": "virtualize"; "required": false; "isSignal": true; }; "estimateSize": { "alias": "estimateSize"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; }, { "pageIndexChange": "pageIndexChange"; "pageSizeChange": "pageSizeChange"; "retry": "retry"; }, ["itemSlot", "emptySlot", "errorSlot", "endSlot", "loadingSlot"], ["[cngxIncrementalTrigger]"], true, [{ directive: typeof i1.CngxPaginate; inputs: { "cngxPageIndex": "pageIndex"; "cngxPageSize": "pageSize"; "total": "total"; "state": "state"; }; outputs: {}; }]>;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Accessible-name / visible-label strings for the incremental-list view states.
|
|
231
|
+
* Each doubles as the live-region announcement and the built-in view text, so
|
|
232
|
+
* an override stays in sync across both surfaces. Library defaults are English;
|
|
233
|
+
* consumers localise via {@link withIncrementalListAriaLabels}.
|
|
234
|
+
*
|
|
235
|
+
* @category ui/collection
|
|
236
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
237
|
+
* @since 0.1.0
|
|
238
|
+
*/
|
|
239
|
+
interface CngxIncrementalListAriaLabels {
|
|
240
|
+
/** Busy indicator label while the first load runs. */
|
|
241
|
+
readonly loading: string;
|
|
242
|
+
/** Empty-view text shown when the bound state settles with no data. */
|
|
243
|
+
readonly empty: string;
|
|
244
|
+
/** Error-view text shown when the first load fails. */
|
|
245
|
+
readonly error: string;
|
|
246
|
+
/**
|
|
247
|
+
* Error text shown when a subsequent page fails but the accumulated rows stay
|
|
248
|
+
* visible (`content+error`). Distinct from `error` so assistive tech can tell
|
|
249
|
+
* a page-N failure (list preserved) from a first-load failure (nothing shown).
|
|
250
|
+
*/
|
|
251
|
+
readonly pageError: string;
|
|
252
|
+
/** Retry-button label on the built-in error view. */
|
|
253
|
+
readonly retry: string;
|
|
254
|
+
/** End-reached label once every page is revealed, given the total item count. */
|
|
255
|
+
readonly endReached: (total: number) => string;
|
|
256
|
+
/**
|
|
257
|
+
* Recycler load-count announcement, live-announced when the accumulated total
|
|
258
|
+
* grows under `[virtualize]`. Owner-split from the view-state live region: the
|
|
259
|
+
* recycler announcer speaks only load-count, the organism's `statusMessage`
|
|
260
|
+
* keeps empty / error / end-reached. `count` rows newly revealed, `total`
|
|
261
|
+
* accumulated. Routed into the recycler's i18n so localisation stays one
|
|
262
|
+
* cascade.
|
|
263
|
+
*/
|
|
264
|
+
readonly loadedMore: (count: number, total: number) => string;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Application-wide template-slot defaults. A per-instance projected slot still
|
|
268
|
+
* wins over this tier; it supplies a shared override when no instance slot is
|
|
269
|
+
* projected. Library default is unset (the built-in views render).
|
|
270
|
+
*
|
|
271
|
+
* @category ui/collection
|
|
272
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
273
|
+
* @since 0.1.0
|
|
274
|
+
*/
|
|
275
|
+
interface CngxIncrementalListTemplates {
|
|
276
|
+
/** Row template for each accumulated item. */
|
|
277
|
+
readonly item?: TemplateRef<unknown>;
|
|
278
|
+
/** Empty view. */
|
|
279
|
+
readonly empty?: TemplateRef<unknown>;
|
|
280
|
+
/** Error + retry view. */
|
|
281
|
+
readonly error?: TemplateRef<unknown>;
|
|
282
|
+
/** End-reached view. */
|
|
283
|
+
readonly end?: TemplateRef<unknown>;
|
|
284
|
+
/** First-load busy indicator. */
|
|
285
|
+
readonly loading?: TemplateRef<unknown>;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Resolved incremental-list configuration - the accessible-name strings plus an
|
|
289
|
+
* optional `templates` slot tree, each merged independently by the reducer in
|
|
290
|
+
* {@link provideIncrementalListConfig}.
|
|
291
|
+
*
|
|
292
|
+
* @category ui/collection
|
|
293
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
294
|
+
* @since 0.1.0
|
|
295
|
+
*/
|
|
296
|
+
interface CngxIncrementalListConfig {
|
|
297
|
+
readonly ariaLabels: CngxIncrementalListAriaLabels;
|
|
298
|
+
readonly templates?: CngxIncrementalListTemplates;
|
|
299
|
+
}
|
|
300
|
+
/** Library defaults - English. Override via {@link provideIncrementalListConfig}. */
|
|
301
|
+
declare const CNGX_INCREMENTAL_LIST_DEFAULTS: CngxIncrementalListConfig;
|
|
302
|
+
/**
|
|
303
|
+
* Configuration cascade token. Resolution priority (high to low):
|
|
304
|
+
* per-instance projected slot, then `provideIncrementalListConfigAt(...)` at
|
|
305
|
+
* component scope, then `provideIncrementalListConfig(...)` at the application
|
|
306
|
+
* root, then the library defaults.
|
|
307
|
+
*
|
|
308
|
+
* @category ui/collection
|
|
309
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
310
|
+
* @since 0.1.0
|
|
311
|
+
*/
|
|
312
|
+
declare const CNGX_INCREMENTAL_LIST_CONFIG: InjectionToken<CngxIncrementalListConfig>;
|
|
313
|
+
/**
|
|
314
|
+
* A single configuration override produced by a `with*` feature factory. The
|
|
315
|
+
* reducer in {@link provideIncrementalListConfig} matches on `kind` and
|
|
316
|
+
* shallow-merges `payload` into the matching sub-tree.
|
|
317
|
+
*
|
|
318
|
+
* @category ui/collection
|
|
319
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
320
|
+
* @since 0.1.0
|
|
321
|
+
*/
|
|
322
|
+
type CngxIncrementalListConfigFeature = {
|
|
323
|
+
readonly kind: 'ariaLabels';
|
|
324
|
+
readonly payload: Partial<CngxIncrementalListAriaLabels>;
|
|
325
|
+
} | {
|
|
326
|
+
readonly kind: 'templates';
|
|
327
|
+
readonly payload: Partial<CngxIncrementalListTemplates>;
|
|
328
|
+
};
|
|
329
|
+
/**
|
|
330
|
+
* Override any subset of the incremental-list labels. The override applies to
|
|
331
|
+
* both the visible built-in views and the live-region announcements.
|
|
332
|
+
*
|
|
333
|
+
* ```ts
|
|
334
|
+
* provideIncrementalListConfig(
|
|
335
|
+
* withIncrementalListAriaLabels({
|
|
336
|
+
* empty: 'Noch nichts hier',
|
|
337
|
+
* endReached: (total) => `Alle ${total} geladen`,
|
|
338
|
+
* }),
|
|
339
|
+
* );
|
|
340
|
+
* ```
|
|
341
|
+
*
|
|
342
|
+
* @category ui/collection
|
|
343
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
344
|
+
* @since 0.1.0
|
|
345
|
+
*/
|
|
346
|
+
declare function withIncrementalListAriaLabels(payload: Partial<CngxIncrementalListAriaLabels>): CngxIncrementalListConfigFeature;
|
|
347
|
+
/**
|
|
348
|
+
* Supply application-wide template-slot defaults. A per-instance projected slot
|
|
349
|
+
* still wins over this tier; it only applies where no instance slot is present.
|
|
350
|
+
*
|
|
351
|
+
* ```ts
|
|
352
|
+
* provideIncrementalListConfig(
|
|
353
|
+
* withIncrementalListTemplates({ empty: myBrandedEmptyTemplate }),
|
|
354
|
+
* );
|
|
355
|
+
* ```
|
|
356
|
+
*
|
|
357
|
+
* @category ui/collection
|
|
358
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
359
|
+
* @since 0.1.0
|
|
360
|
+
*/
|
|
361
|
+
declare function withIncrementalListTemplates(payload: Partial<CngxIncrementalListTemplates>): CngxIncrementalListConfigFeature;
|
|
362
|
+
/**
|
|
363
|
+
* Application-root configuration cascade for the incremental list. Pass any
|
|
364
|
+
* combination of `with*` features in `bootstrapApplication`'s providers.
|
|
365
|
+
* Supplied features merge with the library defaults, so consumers only declare
|
|
366
|
+
* the keys they override.
|
|
367
|
+
*
|
|
368
|
+
* @category ui/collection
|
|
369
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
370
|
+
* @since 0.1.0
|
|
371
|
+
*/
|
|
372
|
+
declare function provideIncrementalListConfig(...features: CngxIncrementalListConfigFeature[]): EnvironmentProviders;
|
|
373
|
+
/**
|
|
374
|
+
* Component-scoped incremental-list configuration override. Pass into a
|
|
375
|
+
* component's or directive's `viewProviders`; features merge on top of the
|
|
376
|
+
* parent config (an enclosing scope or the application root), so a region can
|
|
377
|
+
* re-phrase its labels without disturbing the rest of the app.
|
|
378
|
+
*
|
|
379
|
+
* @category ui/collection
|
|
380
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
381
|
+
* @since 0.1.0
|
|
382
|
+
*/
|
|
383
|
+
declare function provideIncrementalListConfigAt(...features: CngxIncrementalListConfigFeature[]): Provider[];
|
|
384
|
+
/**
|
|
385
|
+
* Convenience accessor for the incremental-list configuration. Runs in
|
|
386
|
+
* injection context; resolves through the cascade. Equivalent to
|
|
387
|
+
* `inject(CNGX_INCREMENTAL_LIST_CONFIG)`.
|
|
388
|
+
*
|
|
389
|
+
* @category ui/collection
|
|
390
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/collection/incremental-list-config.ts
|
|
391
|
+
* @since 0.1.0
|
|
392
|
+
*/
|
|
393
|
+
declare function injectIncrementalListConfig(): CngxIncrementalListConfig;
|
|
394
|
+
|
|
395
|
+
export { CNGX_INCREMENTAL_LIST_CONFIG, CNGX_INCREMENTAL_LIST_DEFAULTS, CngxIncrementalEmpty, CngxIncrementalEnd, CngxIncrementalError, CngxIncrementalItem, CngxIncrementalList, CngxIncrementalLoading, injectIncrementalListConfig, provideIncrementalListConfig, provideIncrementalListConfigAt, withIncrementalListAriaLabels, withIncrementalListTemplates };
|
|
396
|
+
export type { CngxIncrementalErrorContext, CngxIncrementalItemContext, CngxIncrementalListAriaLabels, CngxIncrementalListConfig, CngxIncrementalListConfigFeature, CngxIncrementalListSkin, CngxIncrementalListTemplates };
|