@cngx/ui 0.1.0-rc.3 → 0.1.0-rc.5
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
|
@@ -9,27 +9,26 @@ type CngxPaginatorSkin = 'numbered' | 'minimal' | 'pill' | 'segmented' | 'rail'
|
|
|
9
9
|
/** Density preset. Shifts spacing/hit-target tokens; orthogonal to skin. */
|
|
10
10
|
type CngxPaginatorDensity = 'compact' | 'default' | 'comfortable';
|
|
11
11
|
/**
|
|
12
|
-
* Declarative, skinnable pagination organism.
|
|
13
|
-
* `CngxPaginate` brain (applied as a `hostDirective`), assembled by the
|
|
14
|
-
* consumer from projected segment parts in DOM order - no `show*` config
|
|
15
|
-
*
|
|
16
|
-
* `[data-skin]` / `[data-density]`.
|
|
12
|
+
* Declarative, skinnable pagination organism. \
|
|
13
|
+
* A thin shell over the `CngxPaginate` brain (applied as a `hostDirective`), assembled by the
|
|
14
|
+
* consumer from projected segment parts in DOM order - no `show*` config inputs.
|
|
15
|
+
* `skin` / `density` are single paint attributes reflected onto `[data-skin]` / `[data-density]`. \
|
|
17
16
|
*
|
|
18
|
-
* Two-way `[(pageIndex)]` / `[(pageSize)]`:
|
|
19
|
-
* aliased through `hostDirectives` (`cngxPageIndex` -> `pageIndex`,
|
|
20
|
-
* `
|
|
21
|
-
*
|
|
22
|
-
*
|
|
17
|
+
* Two-way `[(pageIndex)]` / `[(pageSize)]`: \
|
|
18
|
+
* the brain's controlled inputs are aliased through `hostDirectives` (`cngxPageIndex` -> `pageIndex`, `cngxPageSize` -> `pageSize`); \
|
|
19
|
+
* the shell owns the matching `pageIndexChange` / `pageSizeChange` outputs and is their single emitter,
|
|
20
|
+
* wired through the shared `connectPaginateEmit` bridge (identical to `CngxIncrementalList`). \
|
|
21
|
+
* The bridge feeds each output once from two paths:
|
|
23
22
|
* (1) a subscription forwards the brain's nav-only `pageChange` /
|
|
24
23
|
* `pageSizeChange` - the only signal that captures a controlled-mode `setPage`,
|
|
25
24
|
* because the brain's `pageIndex()` stays pinned to the input until the
|
|
26
|
-
* consumer feeds it back;
|
|
27
|
-
* `pageIndex()` / `pageSize()` and covers a `total`-shrink clamp the nav-only
|
|
28
|
-
* output misses.
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
25
|
+
* consumer feeds it back; \
|
|
26
|
+
* (2) an `effect()` reads the effective `pageIndex()` / `pageSize()` and covers a `total`-shrink clamp the nav-only
|
|
27
|
+
* output misses. \
|
|
28
|
+
* The brain output is forwarded, NOT aliased through
|
|
29
|
+
* `hostDirectives`: \
|
|
30
|
+
* a raw alias would bypass the shared guard and double-emit
|
|
31
|
+
* on uncontrolled navigation.
|
|
33
32
|
*
|
|
34
33
|
* All ARIA attributes are signal-driven. `aria-busy` has a single owner here.
|
|
35
34
|
*
|
|
@@ -39,32 +38,33 @@ type CngxPaginatorDensity = 'compact' | 'default' | 'comfortable';
|
|
|
39
38
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator.component.ts
|
|
40
39
|
* @since 0.1.0
|
|
41
40
|
* @relatedTo CngxPaginate, CngxMatPaginator
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/async-loading</example-url>
|
|
50
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/ellipsis-overflow</example-url>
|
|
51
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/first-and-last</example-url>
|
|
52
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/go-to-page</example-url>
|
|
53
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>
|
|
54
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>
|
|
55
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/dots</example-url>
|
|
56
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>
|
|
41
|
+
* @playground Material theme coverage across all skins ./examples/material-theme-coverage/skins-coverage.component.ts
|
|
42
|
+
* @playground Data-table footer (Material) ./examples/data-table/data-table.component.ts
|
|
43
|
+
* @playground Live filter with reset-to-first-page ./examples/filter-reset/filter-reset.component.ts
|
|
44
|
+
* @playground Card grid with go-to and responsive collapse ./examples/card-grid/card-grid.component.ts
|
|
45
|
+
* @playground Alphabetical bucket paging ./examples/alpha-mode/alpha-mode.component.ts
|
|
46
|
+
* @playground Load-more (append) paging ./examples/load-more-mode/load-more-mode.component.ts
|
|
47
|
+
* @playground Infinite scroll paging ./examples/infinite-mode/infinite-mode.component.ts
|
|
57
48
|
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>
|
|
49
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>
|
|
58
50
|
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>
|
|
59
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>
|
|
60
51
|
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>
|
|
52
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>
|
|
53
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/dots</example-url>
|
|
54
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>
|
|
61
55
|
*/
|
|
62
56
|
declare class CngxPaginator {
|
|
63
57
|
/** Accessible name for the navigation landmark. Overrides the config default. */
|
|
64
58
|
readonly ariaLabel: i0.InputSignal<string | undefined>;
|
|
65
59
|
/** Visual skin; reflected onto `[data-skin]`. */
|
|
66
60
|
readonly skin: i0.InputSignal<CngxPaginatorSkin>;
|
|
67
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Private size preset (hit-target + type); reflected onto
|
|
63
|
+
* `[data-paginator-size]`, NOT the global `[data-density]`. Spacing is a
|
|
64
|
+
* global concern derived from `--cngx-space-*`, so a root `[data-density]`
|
|
65
|
+
* compacts this paginator's gaps like every other component; this input keeps
|
|
66
|
+
* only the touch-target sizing the global scale does not yet cover.
|
|
67
|
+
*/
|
|
68
68
|
readonly density: i0.InputSignal<CngxPaginatorDensity>;
|
|
69
69
|
/**
|
|
70
70
|
* Opt into the responsive collapse; reflected onto `[data-responsive]`. When
|
|
@@ -88,7 +88,6 @@ declare class CngxPaginator {
|
|
|
88
88
|
readonly pageSizeChange: i0.OutputEmitterRef<number>;
|
|
89
89
|
protected readonly paginate: CngxPaginate;
|
|
90
90
|
protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
|
|
91
|
-
private readonly destroyRef;
|
|
92
91
|
/**
|
|
93
92
|
* Live-region message source - mounted onto the `cngxLiveRegion` span in the
|
|
94
93
|
* template. Built through the swap token so a consumer can wrap the
|
|
@@ -98,8 +97,6 @@ declare class CngxPaginator {
|
|
|
98
97
|
protected readonly resolvedAriaLabel: i0.Signal<string>;
|
|
99
98
|
protected readonly loadingSlot: i0.Signal<TemplateRef<any> | undefined>;
|
|
100
99
|
protected readonly loadingTemplate: i0.Signal<TemplateRef<any> | null>;
|
|
101
|
-
private lastEmittedIndex;
|
|
102
|
-
private lastEmittedSize;
|
|
103
100
|
constructor();
|
|
104
101
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginator, never>;
|
|
105
102
|
static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginator, "cngx-paginator", ["cngxPaginator"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "resetOn": { "alias": "resetOn"; "required": false; "isSignal": true; }; }, { "pageIndexChange": "pageIndexChange"; "pageSizeChange": "pageSizeChange"; }, ["loadingSlot"], ["*"], true, [{ directive: typeof i1.CngxPaginate; inputs: { "cngxPageIndex": "pageIndex"; "cngxPageSize": "pageSize"; "total": "total"; "state": "state"; }; outputs: {}; }]>;
|
|
@@ -184,6 +181,8 @@ declare const CNGX_PAGINATOR_HOST: InjectionToken<CngxPaginatorHost>;
|
|
|
184
181
|
* ```
|
|
185
182
|
*
|
|
186
183
|
* @category ui/paginator
|
|
184
|
+
* @wcag AA
|
|
185
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/loading/busy</example-url>
|
|
187
186
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-loading.directive.ts
|
|
188
187
|
* @since 0.1.0
|
|
189
188
|
* @relatedTo CngxPaginator, CngxProgress
|
|
@@ -199,72 +198,60 @@ interface NavCore {
|
|
|
199
198
|
readonly ariaLabel: Signal<string>;
|
|
200
199
|
activate(): void;
|
|
201
200
|
}
|
|
202
|
-
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
|
|
201
|
+
/**
|
|
202
|
+
* First-page segment. Disabled on the first page; calls `host.first()`.
|
|
203
|
+
*
|
|
204
|
+
* @category ui/paginator
|
|
205
|
+
* @wcag AA
|
|
206
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-nav.component.ts
|
|
207
|
+
* @since 0.1.0
|
|
208
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/first/chevron</example-url>
|
|
209
|
+
*/
|
|
208
210
|
declare class CngxPaginatorFirst {
|
|
209
211
|
protected readonly glyph: "«";
|
|
210
212
|
protected readonly core: NavCore;
|
|
211
213
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorFirst, never>;
|
|
212
214
|
static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorFirst, "cngx-pgn-first", ["cngxPgnFirst"], {}, {}, never, never, true, never>;
|
|
213
215
|
}
|
|
214
|
-
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-
|
|
222
|
-
|
|
223
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/go-to-page</example-url>
|
|
224
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>
|
|
225
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>
|
|
226
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>
|
|
227
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>
|
|
228
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>
|
|
229
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>
|
|
230
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>
|
|
231
|
-
*/
|
|
216
|
+
/**
|
|
217
|
+
* Previous-page segment. Disabled on the first page; calls `host.previous()`.
|
|
218
|
+
*
|
|
219
|
+
* @category ui/paginator
|
|
220
|
+
* @wcag AA
|
|
221
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-nav.component.ts
|
|
222
|
+
* @since 0.1.0
|
|
223
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/prev/chevron</example-url>
|
|
224
|
+
*/
|
|
232
225
|
declare class CngxPaginatorPrev {
|
|
233
226
|
protected readonly glyph: "‹";
|
|
234
227
|
protected readonly core: NavCore;
|
|
235
228
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorPrev, never>;
|
|
236
229
|
static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorPrev, "cngx-pgn-prev", ["cngxPgnPrev"], {}, {}, never, never, true, never>;
|
|
237
230
|
}
|
|
238
|
-
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-
|
|
246
|
-
|
|
247
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/go-to-page</example-url>
|
|
248
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>
|
|
249
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>
|
|
250
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>
|
|
251
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>
|
|
252
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>
|
|
253
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>
|
|
254
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>
|
|
255
|
-
*/
|
|
231
|
+
/**
|
|
232
|
+
* Next-page segment. Disabled on the last page; calls `host.next()`.
|
|
233
|
+
*
|
|
234
|
+
* @category ui/paginator
|
|
235
|
+
* @wcag AA
|
|
236
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-nav.component.ts
|
|
237
|
+
* @since 0.1.0
|
|
238
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/next/chevron</example-url>
|
|
239
|
+
*/
|
|
256
240
|
declare class CngxPaginatorNext {
|
|
257
241
|
protected readonly glyph: "›";
|
|
258
242
|
protected readonly core: NavCore;
|
|
259
243
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorNext, never>;
|
|
260
244
|
static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorNext, "cngx-pgn-next", ["cngxPgnNext"], {}, {}, never, never, true, never>;
|
|
261
245
|
}
|
|
262
|
-
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
|
|
246
|
+
/**
|
|
247
|
+
* Last-page segment. Disabled on the last page; calls `host.last()`.
|
|
248
|
+
*
|
|
249
|
+
* @category ui/paginator
|
|
250
|
+
* @wcag AA
|
|
251
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-nav.component.ts
|
|
252
|
+
* @since 0.1.0
|
|
253
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/last/chevron</example-url>
|
|
254
|
+
*/
|
|
268
255
|
declare class CngxPaginatorLast {
|
|
269
256
|
protected readonly glyph: "»";
|
|
270
257
|
protected readonly core: NavCore;
|
|
@@ -272,7 +259,13 @@ declare class CngxPaginatorLast {
|
|
|
272
259
|
static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorLast, "cngx-pgn-last", ["cngxPgnLast"], {}, {}, never, never, true, never>;
|
|
273
260
|
}
|
|
274
261
|
|
|
275
|
-
/**
|
|
262
|
+
/**
|
|
263
|
+
* One slot in the rendered page row: a page button or a truncation gap.
|
|
264
|
+
*
|
|
265
|
+
* @category ui/paginator
|
|
266
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/page-model.ts
|
|
267
|
+
* @since 0.1.0
|
|
268
|
+
*/
|
|
276
269
|
type PageItem = {
|
|
277
270
|
readonly kind: 'page';
|
|
278
271
|
readonly index: number;
|
|
@@ -280,7 +273,13 @@ type PageItem = {
|
|
|
280
273
|
readonly kind: 'gap';
|
|
281
274
|
readonly hidden: readonly number[];
|
|
282
275
|
};
|
|
283
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* The rendered sequence plus the gap count (a cheap structural fingerprint).
|
|
278
|
+
*
|
|
279
|
+
* @category ui/paginator
|
|
280
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/page-model.ts
|
|
281
|
+
* @since 0.1.0
|
|
282
|
+
*/
|
|
284
283
|
interface PageWindow {
|
|
285
284
|
readonly pages: readonly PageItem[];
|
|
286
285
|
readonly gaps: number;
|
|
@@ -294,17 +293,10 @@ interface PageWindow {
|
|
|
294
293
|
* so focus moves into the panel on open).
|
|
295
294
|
*
|
|
296
295
|
* @category ui/paginator
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-
|
|
301
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/ellipsis-overflow</example-url>
|
|
302
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/first-and-last</example-url>
|
|
303
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>
|
|
304
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>
|
|
305
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>
|
|
306
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>
|
|
307
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>
|
|
296
|
+
* @wcag AA
|
|
297
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-pages.component.ts
|
|
298
|
+
* @since 0.1.0
|
|
299
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/pages/number-row</example-url>
|
|
308
300
|
*/
|
|
309
301
|
declare class CngxPaginatorPages {
|
|
310
302
|
protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
|
|
@@ -367,11 +359,14 @@ declare class CngxPaginatorPages {
|
|
|
367
359
|
/**
|
|
368
360
|
* The page-window computation `cngx-pgn-pages` calls per recompute: given the
|
|
369
361
|
* current 0-based page, the total page count, and the per-instance
|
|
370
|
-
* `siblingCount` / `boundaryCount`, return the rendered {@link PageWindow}.
|
|
371
|
-
*
|
|
362
|
+
* `siblingCount` / `boundaryCount`, return the rendered {@link PageWindow}.
|
|
363
|
+
*
|
|
364
|
+
* An override implements a different truncation algorithm while still honouring the
|
|
372
365
|
* consumer's sibling / boundary intent.
|
|
373
366
|
*
|
|
374
367
|
* @category ui/paginator
|
|
368
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-window.token.ts
|
|
369
|
+
* @since 0.1.0
|
|
375
370
|
*/
|
|
376
371
|
type CngxPaginatorPageWindowFn = (current: number, total: number, siblingCount: number, boundaryCount: number) => PageWindow;
|
|
377
372
|
/** The shape an override must match to swap the page-window computation. */
|
|
@@ -384,6 +379,8 @@ type CngxPaginatorPageWindowFactory = () => CngxPaginatorPageWindowFn;
|
|
|
384
379
|
* directly, mirroring {@link createPaginatorAnnouncer}.
|
|
385
380
|
*
|
|
386
381
|
* @category ui/paginator
|
|
382
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-window.token.ts
|
|
383
|
+
* @since 0.1.0
|
|
387
384
|
*/
|
|
388
385
|
declare const createPaginatorPageWindow: CngxPaginatorPageWindowFactory;
|
|
389
386
|
/**
|
|
@@ -395,6 +392,8 @@ declare const createPaginatorPageWindow: CngxPaginatorPageWindowFactory;
|
|
|
395
392
|
* on `cngx-pgn-pages` instead. Mirrors {@link CNGX_PAGINATOR_ANNOUNCER_FACTORY}.
|
|
396
393
|
*
|
|
397
394
|
* @category ui/paginator
|
|
395
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-window.token.ts
|
|
396
|
+
* @since 0.1.0
|
|
398
397
|
*/
|
|
399
398
|
declare const CNGX_PAGINATOR_PAGE_WINDOW_FACTORY: InjectionToken<CngxPaginatorPageWindowFactory>;
|
|
400
399
|
|
|
@@ -406,15 +405,10 @@ declare const CNGX_PAGINATOR_PAGE_WINDOW_FACTORY: InjectionToken<CngxPaginatorPa
|
|
|
406
405
|
* figures keep the numerals from reflowing as the page changes.
|
|
407
406
|
*
|
|
408
407
|
* @category ui/paginator
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-
|
|
413
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>
|
|
414
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>
|
|
415
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>
|
|
416
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>
|
|
417
|
-
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>
|
|
408
|
+
* @wcag AA
|
|
409
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-range.component.ts
|
|
410
|
+
* @since 0.1.0
|
|
411
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/range/readout</example-url>
|
|
418
412
|
*/
|
|
419
413
|
declare class CngxPaginatorRange {
|
|
420
414
|
protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
|
|
@@ -434,13 +428,16 @@ declare class CngxPaginatorRange {
|
|
|
434
428
|
}
|
|
435
429
|
|
|
436
430
|
/**
|
|
437
|
-
* Go-to-page segment: a native `<input type="number">`.
|
|
438
|
-
* navigates live via `input`; Enter / blur additionally clamp and re-sync the
|
|
431
|
+
* Go-to-page segment: a native `<input type="number">`. \
|
|
432
|
+
* Typing (or the spinner) navigates live via `input`; Enter / blur additionally clamp and re-sync the
|
|
439
433
|
* field. The brain clamps out-of-range values, so the field reflects the clamped
|
|
440
434
|
* page back. Accessible name from config (EN default, Pillar 2).
|
|
441
435
|
*
|
|
442
436
|
* @category ui/paginator
|
|
443
|
-
*
|
|
437
|
+
* @wcag AA
|
|
438
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-goto.component.ts
|
|
439
|
+
* @since 0.1.0
|
|
440
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/goto/input</example-url>
|
|
444
441
|
*/
|
|
445
442
|
declare class CngxPaginatorGoto {
|
|
446
443
|
protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
|
|
@@ -462,9 +459,10 @@ declare class CngxPaginatorGoto {
|
|
|
462
459
|
* so the panel selection and the trigger label never drift (Pillar 1).
|
|
463
460
|
*
|
|
464
461
|
* @category ui/paginator
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
462
|
+
* @wcag AA
|
|
463
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-size.component.ts
|
|
464
|
+
* @since 0.1.0
|
|
465
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/page-size/dropdown</example-url>
|
|
468
466
|
*/
|
|
469
467
|
declare class CngxPaginatorPageSize {
|
|
470
468
|
protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
|
|
@@ -477,8 +475,19 @@ declare class CngxPaginatorPageSize {
|
|
|
477
475
|
readonly more: "…";
|
|
478
476
|
readonly caret: "▾";
|
|
479
477
|
};
|
|
480
|
-
/**
|
|
478
|
+
/**
|
|
479
|
+
* Selectable page sizes. Pure data - the segment is content-agnostic. Leave
|
|
480
|
+
* unbound (or empty) to fall back to the cascade default
|
|
481
|
+
* (`CNGX_PAGINATOR_CONFIG.pageSizeOptions`, set app-wide via
|
|
482
|
+
* `withPaginatorPageSizeOptions`); a non-empty binding wins over it.
|
|
483
|
+
*/
|
|
481
484
|
readonly options: i0.InputSignal<readonly number[]>;
|
|
485
|
+
/**
|
|
486
|
+
* The sizes actually rendered: the per-instance `[options]` when non-empty,
|
|
487
|
+
* otherwise the config cascade default. A pure derivation - no synced state
|
|
488
|
+
* (Pillar 1).
|
|
489
|
+
*/
|
|
490
|
+
protected readonly resolvedOptions: i0.Signal<readonly number[]>;
|
|
482
491
|
protected onSelect(value: number | undefined): void;
|
|
483
492
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorPageSize, never>;
|
|
484
493
|
static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorPageSize, "cngx-pgn-page-size", ["cngxPgnPageSize"], { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -493,7 +502,10 @@ declare class CngxPaginatorPageSize {
|
|
|
493
502
|
* `@cngx/forms`-free.
|
|
494
503
|
*
|
|
495
504
|
* @category ui/paginator
|
|
496
|
-
*
|
|
505
|
+
* @wcag AA
|
|
506
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-of-pages.component.ts
|
|
507
|
+
* @since 0.1.0
|
|
508
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/page-of-pages/trigger</example-url>
|
|
497
509
|
*/
|
|
498
510
|
declare class CngxPaginatorPageOfPages {
|
|
499
511
|
protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
|
|
@@ -523,26 +535,37 @@ interface Dot {
|
|
|
523
535
|
readonly index: number;
|
|
524
536
|
readonly size: DotSize;
|
|
525
537
|
}
|
|
538
|
+
interface DotModel {
|
|
539
|
+
readonly dots: readonly Dot[];
|
|
540
|
+
/** Index of the leftmost dot shown in the viewport; drives the track translate. */
|
|
541
|
+
readonly firstVisible: number;
|
|
542
|
+
/** `true` once the page count exceeds the visible window (track glides). */
|
|
543
|
+
readonly windowed: boolean;
|
|
544
|
+
}
|
|
526
545
|
/**
|
|
527
|
-
* The dots indicator: one circular `<button>` per page
|
|
528
|
-
*
|
|
529
|
-
* `aria-
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
*
|
|
546
|
+
* The dots indicator: one circular `<button>` per page inside a clipped viewport
|
|
547
|
+
* track. The active dot carries `aria-current="page"`; every dot exposes its page
|
|
548
|
+
* name via `aria-label` (the circle is decorative). Click navigates through the
|
|
549
|
+
* brain, gated while busy. For large counts the track glides (CSS transform
|
|
550
|
+
* transition) to keep the active dot centred, iOS page-control style, instead of
|
|
551
|
+
* reshuffling the DOM. Dot DOM + windowing live here, not in a shared atom.
|
|
533
552
|
*
|
|
534
553
|
* @category ui/paginator
|
|
554
|
+
* @wcag AA
|
|
555
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-dots.component.ts
|
|
556
|
+
* @since 0.1.0
|
|
557
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/dots/dots</example-url>
|
|
535
558
|
* <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/dots</example-url>
|
|
536
559
|
*/
|
|
537
560
|
declare class CngxPaginatorDots {
|
|
538
561
|
protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
|
|
539
562
|
protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
|
|
540
563
|
/**
|
|
541
|
-
* The rendered
|
|
542
|
-
* across recomputes that yield an identical
|
|
543
|
-
* churn (signal-equality rule).
|
|
564
|
+
* The rendered dots + viewport anchor. Structural `equal` keeps the reference
|
|
565
|
+
* stable across recomputes that yield an identical model, so the `@for` does
|
|
566
|
+
* not churn (signal-equality rule).
|
|
544
567
|
*/
|
|
545
|
-
protected readonly model: i0.Signal<
|
|
568
|
+
protected readonly model: i0.Signal<DotModel>;
|
|
546
569
|
protected isCurrent(index: number): boolean;
|
|
547
570
|
protected goto(index: number): void;
|
|
548
571
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorDots, never>;
|
|
@@ -560,7 +583,10 @@ declare class CngxPaginatorDots {
|
|
|
560
583
|
* changes.
|
|
561
584
|
*
|
|
562
585
|
* @category ui/paginator
|
|
563
|
-
*
|
|
586
|
+
* @wcag AA
|
|
587
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-status.component.ts
|
|
588
|
+
* @since 0.1.0
|
|
589
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/status/readout</example-url>
|
|
564
590
|
*/
|
|
565
591
|
declare class CngxPaginatorStatus {
|
|
566
592
|
protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
|
|
@@ -582,7 +608,10 @@ declare class CngxPaginatorStatus {
|
|
|
582
608
|
* no local state, no writes.
|
|
583
609
|
*
|
|
584
610
|
* @category ui/paginator
|
|
585
|
-
*
|
|
611
|
+
* @wcag AA
|
|
612
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-rail.component.ts
|
|
613
|
+
* @since 0.1.0
|
|
614
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/rail/rail</example-url>
|
|
586
615
|
*/
|
|
587
616
|
declare class CngxPaginatorRail {
|
|
588
617
|
protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
|
|
@@ -598,18 +627,22 @@ declare class CngxPaginatorRail {
|
|
|
598
627
|
}
|
|
599
628
|
|
|
600
629
|
/**
|
|
601
|
-
* Load-more segment: an append-don't-replace trigger over the same brain.
|
|
602
|
-
* `host.next()` button plus a `shown / total` count readout. The cumulative
|
|
630
|
+
* Load-more segment: an append-don't-replace trigger over the same brain. \
|
|
631
|
+
* One `host.next()` button plus a `shown / total` count readout. The cumulative
|
|
603
632
|
* slice is derived by the brain (`host.cumulativeRange()`); this segment holds
|
|
604
633
|
* no accumulation state - the consumer slices its own array from
|
|
605
634
|
* `cumulativeRange()`.
|
|
606
635
|
*
|
|
607
|
-
* Disabled (and so a no-op) on the last page or while busy.
|
|
608
|
-
* (not native `disabled`) keeps the button focusable so AT hears the bound
|
|
636
|
+
* Disabled (and so a no-op) on the last page or while busy. \
|
|
637
|
+
* `aria-disabled` (not native `disabled`) keeps the button focusable so AT hears the bound
|
|
609
638
|
* state, matching the nav segments; the busy/position reason is already spoken
|
|
610
639
|
* by the shell live region.
|
|
611
640
|
*
|
|
612
641
|
* @category ui/paginator
|
|
642
|
+
* @wcag AA
|
|
643
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-load-more.component.ts
|
|
644
|
+
* @since 0.1.0
|
|
645
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/load-more/button</example-url>
|
|
613
646
|
* <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/load-more</example-url>
|
|
614
647
|
*/
|
|
615
648
|
declare class CngxPaginatorLoadMore {
|
|
@@ -637,24 +670,27 @@ declare class CngxPaginatorLoadMore {
|
|
|
637
670
|
|
|
638
671
|
/**
|
|
639
672
|
* Infinite-scroll segment: a bottom-of-list sentinel that auto-advances the
|
|
640
|
-
* page as it scrolls into view, composing `CngxInfiniteScroll`.
|
|
641
|
-
* sentinel binds the directive's `[enabled]` / `[loading]` inputs and its
|
|
673
|
+
* page as it scrolls into view, composing `CngxInfiniteScroll`. \
|
|
674
|
+
* The in-template sentinel binds the directive's `[enabled]` / `[loading]` inputs and its
|
|
642
675
|
* `(loadMore)` output directly to the `CNGX_PAGINATOR_HOST` signals, so the
|
|
643
676
|
* directive's built-in debounce, busy-gate, enabled-disable, and auto-disconnect
|
|
644
677
|
* own the auto-advance double-fire guard - this segment adds no
|
|
645
|
-
* `IntersectionObserver` code of its own.
|
|
646
|
-
*
|
|
678
|
+
* `IntersectionObserver` code of its own.
|
|
679
|
+
*
|
|
680
|
+
* The directive sits on the sentinel element (not as a `hostDirective`) precisely so its `[enabled]` / `[loading]`
|
|
647
681
|
* inputs can bind to the host-token signals; a static `hostDirectives`
|
|
648
682
|
* declaration could not express that wiring.
|
|
649
683
|
*
|
|
650
684
|
* Like `cngx-pgn-load-more`, this stays a thin trigger atom: it injects
|
|
651
685
|
* `CNGX_PAGINATOR_HOST`, holds no accumulation state, and renders no async view
|
|
652
|
-
* of its own.
|
|
686
|
+
* of its own. \
|
|
687
|
+
* The consumer slices its own array from the brain's
|
|
653
688
|
* `cumulativeRange()`; the busy / error / end experience belongs to the consumer
|
|
654
689
|
* or to a composing container, keeping the segment reusable unchanged.
|
|
655
690
|
*
|
|
656
691
|
* Exhausted state: once `host.isLast()` the sentinel disables (`enabled` is
|
|
657
|
-
* `false`, so the observer disconnects).
|
|
692
|
+
* `false`, so the observer disconnects). \
|
|
693
|
+
* It swaps its busy affordance for the
|
|
658
694
|
* `allLoaded` end label only after the final load settles (`!host.isBusy()`),
|
|
659
695
|
* so it never claims "all loaded" while the last batch is still arriving, and
|
|
660
696
|
* the tail is never a silent or stale spinner.
|
|
@@ -665,6 +701,10 @@ declare class CngxPaginatorLoadMore {
|
|
|
665
701
|
* passthrough config - the segment still owns no observer code and no state.
|
|
666
702
|
*
|
|
667
703
|
* @category ui/paginator
|
|
704
|
+
* @wcag AA
|
|
705
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-infinite.component.ts
|
|
706
|
+
* @since 0.1.0
|
|
707
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/infinite/sentinel</example-url>
|
|
668
708
|
* <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/infinite</example-url>
|
|
669
709
|
*/
|
|
670
710
|
declare class CngxPaginatorInfinite {
|
|
@@ -701,22 +741,28 @@ declare class CngxPaginatorInfinite {
|
|
|
701
741
|
|
|
702
742
|
/**
|
|
703
743
|
* Alphabetical / category chips: a `role="group"` toggle strip over the
|
|
704
|
-
* {@link CngxBucketPaginate} range model.
|
|
744
|
+
* {@link CngxBucketPaginate} range model. \
|
|
745
|
+
* One `<button>` per bucket; the active
|
|
705
746
|
* bucket carries `aria-pressed`, an empty bucket is `disabled`. The model is
|
|
706
747
|
* injected through `CNGX_BUCKET_PAGINATE_HOST`, never the concrete directive
|
|
707
748
|
* class, so the strip stays decompose-ready.
|
|
708
749
|
*
|
|
709
750
|
* Every chip's pressed / disabled / name state is a `computed()` read of the
|
|
710
|
-
* host signals - nothing is synced. An empty chip is not a silent dead control:
|
|
751
|
+
* host signals - nothing is synced. An empty chip is not a silent dead control: \
|
|
711
752
|
* its accessible name comes from `ariaLabels.emptyBucket(label)`, which states
|
|
712
753
|
* the bucket has no items, so AT hears the reason the chip is disabled.
|
|
713
754
|
*
|
|
714
755
|
* Keyboard navigation reuses `CngxRovingTabindex` / `CngxRovingItem` (no new
|
|
715
|
-
* keyboard code, matching `cngx-pgn-pages`):
|
|
756
|
+
* keyboard code, matching `cngx-pgn-pages`): \
|
|
757
|
+
* arrows move the focus cursor and
|
|
716
758
|
* skip disabled chips, the single tab stop tracks the active bucket, and
|
|
717
759
|
* activation commits via `select()`.
|
|
718
760
|
*
|
|
719
761
|
* @category ui/paginator
|
|
762
|
+
* @wcag AA
|
|
763
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-alpha.component.ts
|
|
764
|
+
* @since 0.1.0
|
|
765
|
+
* <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/alpha/strip</example-url>
|
|
720
766
|
* <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/alphabetical</example-url>
|
|
721
767
|
*/
|
|
722
768
|
declare class CngxPaginatorAlpha {
|
|
@@ -746,6 +792,8 @@ declare class CngxPaginatorAlpha {
|
|
|
746
792
|
* {@link withPaginatorAriaLabels}.
|
|
747
793
|
*
|
|
748
794
|
* @category ui/paginator
|
|
795
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
796
|
+
* @since 0.1.0
|
|
749
797
|
*/
|
|
750
798
|
interface CngxPaginatorAriaLabels {
|
|
751
799
|
/** Accessible name for the `role="navigation"` landmark. */
|
|
@@ -798,6 +846,8 @@ interface CngxPaginatorAriaLabels {
|
|
|
798
846
|
* English; consumers localise via {@link withPaginatorRangeFormat}.
|
|
799
847
|
*
|
|
800
848
|
* @category ui/paginator
|
|
849
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
850
|
+
* @since 0.1.0
|
|
801
851
|
*/
|
|
802
852
|
interface CngxPaginatorFormats {
|
|
803
853
|
/**
|
|
@@ -822,6 +872,8 @@ interface CngxPaginatorFormats {
|
|
|
822
872
|
* English; consumers localise via {@link withPaginatorAnnouncements}.
|
|
823
873
|
*
|
|
824
874
|
* @category ui/paginator
|
|
875
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
876
|
+
* @since 0.1.0
|
|
825
877
|
*/
|
|
826
878
|
interface CngxPaginatorAnnouncements {
|
|
827
879
|
/** Announced on every page change, given the 1-based page and total pages. */
|
|
@@ -838,6 +890,8 @@ interface CngxPaginatorAnnouncements {
|
|
|
838
890
|
* `CngxProgress` bar renders).
|
|
839
891
|
*
|
|
840
892
|
* @category ui/paginator
|
|
893
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
894
|
+
* @since 0.1.0
|
|
841
895
|
*/
|
|
842
896
|
interface CngxPaginatorTemplates {
|
|
843
897
|
/** Busy indicator shown while the bound async state is busy. */
|
|
@@ -846,15 +900,26 @@ interface CngxPaginatorTemplates {
|
|
|
846
900
|
/**
|
|
847
901
|
* Resolved paginator configuration. Three required sub-trees - accessible-name
|
|
848
902
|
* strings, live-region announcement phrasing, and data-readout formatters -
|
|
849
|
-
* plus an optional `templates` slot tree,
|
|
850
|
-
* reducer in
|
|
903
|
+
* plus a flat `pageSizeOptions` list and an optional `templates` slot tree,
|
|
904
|
+
* each merged independently by the reducer in
|
|
905
|
+
* {@link provideCngxPaginatorConfig}.
|
|
851
906
|
*
|
|
852
907
|
* @category ui/paginator
|
|
908
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
909
|
+
* @since 0.1.0
|
|
853
910
|
*/
|
|
854
911
|
interface CngxPaginatorConfig {
|
|
855
912
|
readonly ariaLabels: CngxPaginatorAriaLabels;
|
|
856
913
|
readonly announcements: CngxPaginatorAnnouncements;
|
|
857
914
|
readonly formats: CngxPaginatorFormats;
|
|
915
|
+
/**
|
|
916
|
+
* Default items-per-page choices the `cngx-pgn-page-size` dropdown renders
|
|
917
|
+
* when no per-instance `[options]` is bound. The instance input still wins
|
|
918
|
+
* when it is non-empty; this is the cascade fallback so the segment needs no
|
|
919
|
+
* boilerplate. Replaced wholesale (not merged) by
|
|
920
|
+
* {@link withPaginatorPageSizeOptions} - a size list is one atomic value.
|
|
921
|
+
*/
|
|
922
|
+
readonly pageSizeOptions: readonly number[];
|
|
858
923
|
readonly templates?: CngxPaginatorTemplates;
|
|
859
924
|
}
|
|
860
925
|
/** Library defaults - English. Override via {@link provideCngxPaginatorConfig}. */
|
|
@@ -865,14 +930,19 @@ declare const CNGX_PAGINATOR_DEFAULTS: CngxPaginatorConfig;
|
|
|
865
930
|
* application root, then the library defaults.
|
|
866
931
|
*
|
|
867
932
|
* @category ui/paginator
|
|
933
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
934
|
+
* @since 0.1.0
|
|
868
935
|
*/
|
|
869
936
|
declare const CNGX_PAGINATOR_CONFIG: InjectionToken<CngxPaginatorConfig>;
|
|
870
937
|
/**
|
|
871
938
|
* A single configuration override produced by a `with*` feature factory.
|
|
872
939
|
* The reducer in {@link provideCngxPaginatorConfig} matches on `kind` and
|
|
873
|
-
* shallow-merges `payload` into the matching sub-tree
|
|
940
|
+
* shallow-merges `payload` into the matching sub-tree - except
|
|
941
|
+
* `pageSizeOptions`, whose payload replaces the list wholesale.
|
|
874
942
|
*
|
|
875
943
|
* @category ui/paginator
|
|
944
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
945
|
+
* @since 0.1.0
|
|
876
946
|
*/
|
|
877
947
|
type CngxPaginatorConfigFeature = {
|
|
878
948
|
readonly kind: 'ariaLabels';
|
|
@@ -883,6 +953,9 @@ type CngxPaginatorConfigFeature = {
|
|
|
883
953
|
} | {
|
|
884
954
|
readonly kind: 'formats';
|
|
885
955
|
readonly payload: Partial<CngxPaginatorFormats>;
|
|
956
|
+
} | {
|
|
957
|
+
readonly kind: 'pageSizeOptions';
|
|
958
|
+
readonly payload: readonly number[];
|
|
886
959
|
} | {
|
|
887
960
|
readonly kind: 'templates';
|
|
888
961
|
readonly payload: Partial<CngxPaginatorTemplates>;
|
|
@@ -898,6 +971,8 @@ type CngxPaginatorConfigFeature = {
|
|
|
898
971
|
* ```
|
|
899
972
|
*
|
|
900
973
|
* @category ui/paginator
|
|
974
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
975
|
+
* @since 0.1.0
|
|
901
976
|
*/
|
|
902
977
|
declare function withPaginatorAriaLabels(payload: Partial<CngxPaginatorAriaLabels>): CngxPaginatorConfigFeature;
|
|
903
978
|
/**
|
|
@@ -914,6 +989,8 @@ declare function withPaginatorAriaLabels(payload: Partial<CngxPaginatorAriaLabel
|
|
|
914
989
|
* ```
|
|
915
990
|
*
|
|
916
991
|
* @category ui/paginator
|
|
992
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
993
|
+
* @since 0.1.0
|
|
917
994
|
*/
|
|
918
995
|
declare function withPaginatorAnnouncements(payload: Partial<CngxPaginatorAnnouncements>): CngxPaginatorConfigFeature;
|
|
919
996
|
/**
|
|
@@ -927,6 +1004,8 @@ declare function withPaginatorAnnouncements(payload: Partial<CngxPaginatorAnnoun
|
|
|
927
1004
|
* ```
|
|
928
1005
|
*
|
|
929
1006
|
* @category ui/paginator
|
|
1007
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
1008
|
+
* @since 0.1.0
|
|
930
1009
|
*/
|
|
931
1010
|
declare function withPaginatorRangeFormat(range: CngxPaginatorFormats['range']): CngxPaginatorConfigFeature;
|
|
932
1011
|
/**
|
|
@@ -941,8 +1020,27 @@ declare function withPaginatorRangeFormat(range: CngxPaginatorFormats['range']):
|
|
|
941
1020
|
* ```
|
|
942
1021
|
*
|
|
943
1022
|
* @category ui/paginator
|
|
1023
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
1024
|
+
* @since 0.1.0
|
|
944
1025
|
*/
|
|
945
1026
|
declare function withPaginatorPageStatusFormat(pageStatus: CngxPaginatorFormats['pageStatus']): CngxPaginatorConfigFeature;
|
|
1027
|
+
/**
|
|
1028
|
+
* Supply the default items-per-page choices for the `cngx-pgn-page-size`
|
|
1029
|
+
* dropdown app-wide. The segment renders these when no per-instance `[options]`
|
|
1030
|
+
* is bound; a non-empty `[options]` input still wins. The list replaces the
|
|
1031
|
+
* library default wholesale - it is one atomic value, not a merged sub-tree.
|
|
1032
|
+
*
|
|
1033
|
+
* ```ts
|
|
1034
|
+
* provideCngxPaginatorConfig(
|
|
1035
|
+
* withPaginatorPageSizeOptions([12, 24, 48]),
|
|
1036
|
+
* );
|
|
1037
|
+
* ```
|
|
1038
|
+
*
|
|
1039
|
+
* @category ui/paginator
|
|
1040
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
1041
|
+
* @since 0.1.0
|
|
1042
|
+
*/
|
|
1043
|
+
declare function withPaginatorPageSizeOptions(payload: readonly number[]): CngxPaginatorConfigFeature;
|
|
946
1044
|
/**
|
|
947
1045
|
* Supply application-wide template-slot defaults for the paginator. The
|
|
948
1046
|
* per-instance `*cngxPaginatorLoading` slot still wins over this tier; it only
|
|
@@ -955,6 +1053,8 @@ declare function withPaginatorPageStatusFormat(pageStatus: CngxPaginatorFormats[
|
|
|
955
1053
|
* ```
|
|
956
1054
|
*
|
|
957
1055
|
* @category ui/paginator
|
|
1056
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
1057
|
+
* @since 0.1.0
|
|
958
1058
|
*/
|
|
959
1059
|
declare function withPaginatorTemplates(payload: Partial<CngxPaginatorTemplates>): CngxPaginatorConfigFeature;
|
|
960
1060
|
/**
|
|
@@ -964,6 +1064,8 @@ declare function withPaginatorTemplates(payload: Partial<CngxPaginatorTemplates>
|
|
|
964
1064
|
* declare the keys they want to override.
|
|
965
1065
|
*
|
|
966
1066
|
* @category ui/paginator
|
|
1067
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
1068
|
+
* @since 0.1.0
|
|
967
1069
|
*/
|
|
968
1070
|
declare function provideCngxPaginatorConfig(...features: CngxPaginatorConfigFeature[]): EnvironmentProviders;
|
|
969
1071
|
/**
|
|
@@ -973,6 +1075,8 @@ declare function provideCngxPaginatorConfig(...features: CngxPaginatorConfigFeat
|
|
|
973
1075
|
* announcements or labels without disturbing the rest of the app.
|
|
974
1076
|
*
|
|
975
1077
|
* @category ui/paginator
|
|
1078
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
1079
|
+
* @since 0.1.0
|
|
976
1080
|
*/
|
|
977
1081
|
declare function provideCngxPaginatorConfigAt(...features: CngxPaginatorConfigFeature[]): Provider[];
|
|
978
1082
|
/**
|
|
@@ -981,6 +1085,8 @@ declare function provideCngxPaginatorConfigAt(...features: CngxPaginatorConfigFe
|
|
|
981
1085
|
* `inject(CNGX_PAGINATOR_CONFIG)`.
|
|
982
1086
|
*
|
|
983
1087
|
* @category ui/paginator
|
|
1088
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
|
|
1089
|
+
* @since 0.1.0
|
|
984
1090
|
*/
|
|
985
1091
|
declare function injectPaginatorConfig(): CngxPaginatorConfig;
|
|
986
1092
|
|
|
@@ -988,6 +1094,8 @@ declare function injectPaginatorConfig(): CngxPaginatorConfig;
|
|
|
988
1094
|
* Reactive announcement source for the paginator live region.
|
|
989
1095
|
*
|
|
990
1096
|
* @category ui/paginator
|
|
1097
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts
|
|
1098
|
+
* @since 0.1.0
|
|
991
1099
|
*/
|
|
992
1100
|
interface CngxPaginatorAnnouncer {
|
|
993
1101
|
/**
|
|
@@ -1013,6 +1121,8 @@ interface CngxPaginatorAnnouncer {
|
|
|
1013
1121
|
* Must run in an injection context (call as a field initialiser on the shell).
|
|
1014
1122
|
*
|
|
1015
1123
|
* @category ui/paginator
|
|
1124
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts
|
|
1125
|
+
* @since 0.1.0
|
|
1016
1126
|
*/
|
|
1017
1127
|
declare function createPaginatorAnnouncer(): CngxPaginatorAnnouncer;
|
|
1018
1128
|
/** The shape an override must match to swap the announcer derivation. */
|
|
@@ -1028,8 +1138,10 @@ type CngxPaginatorAnnouncerFactory = () => CngxPaginatorAnnouncer;
|
|
|
1028
1138
|
* still `inject(CNGX_PAGINATOR_HOST)` / {@link injectPaginatorConfig}.
|
|
1029
1139
|
*
|
|
1030
1140
|
* @category ui/paginator
|
|
1141
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts
|
|
1142
|
+
* @since 0.1.0
|
|
1031
1143
|
*/
|
|
1032
1144
|
declare const CNGX_PAGINATOR_ANNOUNCER_FACTORY: InjectionToken<CngxPaginatorAnnouncerFactory>;
|
|
1033
1145
|
|
|
1034
|
-
export { CNGX_PAGINATOR_ANNOUNCER_FACTORY, CNGX_PAGINATOR_CONFIG, CNGX_PAGINATOR_DEFAULTS, CNGX_PAGINATOR_HOST, CNGX_PAGINATOR_PAGE_WINDOW_FACTORY, CngxPaginator, CngxPaginatorAlpha, CngxPaginatorDots, CngxPaginatorFirst, CngxPaginatorGoto, CngxPaginatorInfinite, CngxPaginatorLast, CngxPaginatorLoadMore, CngxPaginatorLoading, CngxPaginatorNext, CngxPaginatorPageOfPages, CngxPaginatorPageSize, CngxPaginatorPages, CngxPaginatorPrev, CngxPaginatorRail, CngxPaginatorRange, CngxPaginatorStatus, createPaginatorAnnouncer, createPaginatorPageWindow, injectPaginatorConfig, provideCngxPaginatorConfig, provideCngxPaginatorConfigAt, withPaginatorAnnouncements, withPaginatorAriaLabels, withPaginatorPageStatusFormat, withPaginatorRangeFormat, withPaginatorTemplates };
|
|
1146
|
+
export { CNGX_PAGINATOR_ANNOUNCER_FACTORY, CNGX_PAGINATOR_CONFIG, CNGX_PAGINATOR_DEFAULTS, CNGX_PAGINATOR_HOST, CNGX_PAGINATOR_PAGE_WINDOW_FACTORY, CngxPaginator, CngxPaginatorAlpha, CngxPaginatorDots, CngxPaginatorFirst, CngxPaginatorGoto, CngxPaginatorInfinite, CngxPaginatorLast, CngxPaginatorLoadMore, CngxPaginatorLoading, CngxPaginatorNext, CngxPaginatorPageOfPages, CngxPaginatorPageSize, CngxPaginatorPages, CngxPaginatorPrev, CngxPaginatorRail, CngxPaginatorRange, CngxPaginatorStatus, createPaginatorAnnouncer, createPaginatorPageWindow, injectPaginatorConfig, provideCngxPaginatorConfig, provideCngxPaginatorConfigAt, withPaginatorAnnouncements, withPaginatorAriaLabels, withPaginatorPageSizeOptions, withPaginatorPageStatusFormat, withPaginatorRangeFormat, withPaginatorTemplates };
|
|
1035
1147
|
export type { CngxPaginatorAnnouncements, CngxPaginatorAnnouncer, CngxPaginatorAnnouncerFactory, CngxPaginatorAriaLabels, CngxPaginatorConfig, CngxPaginatorConfigFeature, CngxPaginatorDensity, CngxPaginatorFormats, CngxPaginatorHost, CngxPaginatorPageWindowFactory, CngxPaginatorPageWindowFn, CngxPaginatorSkin, CngxPaginatorTemplates, PageItem, PageWindow };
|