@cngx/ui 0.1.0-rc.2 → 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.
Files changed (48) hide show
  1. package/README.md +15 -7
  2. package/accordion/README.md +86 -0
  3. package/collection/README.md +167 -0
  4. package/data-grid-accordion/README.md +137 -0
  5. package/fesm2022/cngx-ui-accordion.mjs +853 -0
  6. package/fesm2022/cngx-ui-accordion.mjs.map +1 -0
  7. package/fesm2022/cngx-ui-action-button.mjs +2 -2
  8. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  9. package/fesm2022/cngx-ui-breadcrumb.mjs +1044 -0
  10. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -0
  11. package/fesm2022/cngx-ui-collection.mjs +645 -0
  12. package/fesm2022/cngx-ui-collection.mjs.map +1 -0
  13. package/fesm2022/cngx-ui-data-grid-accordion.mjs +1135 -0
  14. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -0
  15. package/fesm2022/cngx-ui-empty-state.mjs +2 -2
  16. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-feedback.mjs +10 -10
  18. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-mat-accordion.mjs +229 -0
  20. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -0
  21. package/fesm2022/cngx-ui-mat-paginator.mjs +215 -0
  22. package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -0
  23. package/fesm2022/cngx-ui-paginator.mjs +1937 -0
  24. package/fesm2022/cngx-ui-paginator.mjs.map +1 -0
  25. package/fesm2022/cngx-ui-sidenav.mjs +547 -65
  26. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-tabs.mjs +8 -6
  28. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  29. package/fesm2022/cngx-ui.mjs +2 -2
  30. package/fesm2022/cngx-ui.mjs.map +1 -1
  31. package/mat-accordion/README.md +48 -0
  32. package/mat-paginator/README.md +135 -0
  33. package/package.json +29 -5
  34. package/paginator/README.md +134 -0
  35. package/sidenav/README.md +89 -3
  36. package/types/cngx-ui-accordion.d.ts +801 -0
  37. package/types/cngx-ui-breadcrumb.d.ts +890 -0
  38. package/types/cngx-ui-collection.d.ts +396 -0
  39. package/types/cngx-ui-data-grid-accordion.d.ts +912 -0
  40. package/types/cngx-ui-mat-accordion.d.ts +63 -0
  41. package/types/cngx-ui-mat-paginator.d.ts +108 -0
  42. package/types/cngx-ui-paginator.d.ts +1147 -0
  43. package/types/cngx-ui-sidenav.d.ts +429 -21
  44. package/types/cngx-ui-tabs.d.ts +2 -0
  45. package/fesm2022/cngx-ui-material.mjs +0 -90
  46. package/fesm2022/cngx-ui-material.mjs.map +0 -1
  47. package/material/README.md +0 -90
  48. package/types/cngx-ui-material.d.ts +0 -47
@@ -0,0 +1,1147 @@
1
+ import * as _cngx_ui_paginator from '@cngx/ui/paginator';
2
+ import * as i0 from '@angular/core';
3
+ import { TemplateRef, InjectionToken, Signal, EnvironmentProviders, Provider } from '@angular/core';
4
+ import * as i1 from '@cngx/common/data';
5
+ import { CngxPaginate } from '@cngx/common/data';
6
+
7
+ /** Visual skin. Paint-only - structure, ARIA, and keyboard behaviour are identical across values. */
8
+ type CngxPaginatorSkin = 'numbered' | 'minimal' | 'pill' | 'segmented' | 'rail' | 'dots' | 'bar';
9
+ /** Density preset. Shifts spacing/hit-target tokens; orthogonal to skin. */
10
+ type CngxPaginatorDensity = 'compact' | 'default' | 'comfortable';
11
+ /**
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]`. \
16
+ *
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:
22
+ * (1) a subscription forwards the brain's nav-only `pageChange` /
23
+ * `pageSizeChange` - the only signal that captures a controlled-mode `setPage`,
24
+ * because the brain's `pageIndex()` stays pinned to the input until the
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.
32
+ *
33
+ * All ARIA attributes are signal-driven. `aria-busy` has a single owner here.
34
+ *
35
+ * @category ui/paginator
36
+ * @docsKind primary
37
+ * @wcag AA
38
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator.component.ts
39
+ * @since 0.1.0
40
+ * @relatedTo CngxPaginate, CngxMatPaginator
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
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>
50
+ * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>
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>
55
+ */
56
+ declare class CngxPaginator {
57
+ /** Accessible name for the navigation landmark. Overrides the config default. */
58
+ readonly ariaLabel: i0.InputSignal<string | undefined>;
59
+ /** Visual skin; reflected onto `[data-skin]`. */
60
+ readonly skin: i0.InputSignal<CngxPaginatorSkin>;
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
+ readonly density: i0.InputSignal<CngxPaginatorDensity>;
69
+ /**
70
+ * Opt into the responsive collapse; reflected onto `[data-responsive]`. When
71
+ * set, a `@container` rule swaps the projected `cngx-pgn-pages` number row for
72
+ * a `cngx-pgn-status` "Page n of m" readout once the paginator's own container
73
+ * narrows past the collapse breakpoint. Compose both segments for it to apply.
74
+ */
75
+ readonly responsive: i0.InputSignalWithTransform<boolean, unknown>;
76
+ /**
77
+ * Reset key. When its value changes (after the initial render) the paginator
78
+ * jumps to the first page - bind the sort / filter / search value a result set
79
+ * depends on so a narrowed result never strands the user on a now-empty page.
80
+ * Bind a primitive or a `computed`; an inline array / object literal
81
+ * recomputes every change-detection pass and would reset on each. Shares the
82
+ * `connectPaginateResetOn` implementation with `[cngxPaginateResetOn]`.
83
+ */
84
+ readonly resetOn: i0.InputSignal<unknown>;
85
+ /** Emits the effective page index on every change - navigation or `total`-shrink clamp. */
86
+ readonly pageIndexChange: i0.OutputEmitterRef<number>;
87
+ /** Emits the effective page size on every change. */
88
+ readonly pageSizeChange: i0.OutputEmitterRef<number>;
89
+ protected readonly paginate: CngxPaginate;
90
+ protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
91
+ /**
92
+ * Live-region message source - mounted onto the `cngxLiveRegion` span in the
93
+ * template. Built through the swap token so a consumer can wrap the
94
+ * busy / settle / page-change derivation without forking the shell.
95
+ */
96
+ protected readonly announcer: _cngx_ui_paginator.CngxPaginatorAnnouncer;
97
+ protected readonly resolvedAriaLabel: i0.Signal<string>;
98
+ protected readonly loadingSlot: i0.Signal<TemplateRef<any> | undefined>;
99
+ protected readonly loadingTemplate: i0.Signal<TemplateRef<any> | null>;
100
+ constructor();
101
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginator, never>;
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: {}; }]>;
103
+ }
104
+
105
+ /**
106
+ * Read-mostly state-and-navigation contract every paginator segment part
107
+ * injects instead of the concrete `CngxPaginator` shell. \
108
+ * A structural subset of the `CngxPaginate` brain
109
+ * (`@cngx/common/data`) - the brain provides it via `useExisting`, so a
110
+ * decomposed skin keeps talking to the same token without depending on the
111
+ * organism class (Atomic Decompose, DI abstraction).
112
+ *
113
+ * The signals are the single derivation source for every segment's disabled
114
+ * state, label, and `aria-current`; the methods are the only write paths,
115
+ * each routing through the brain so the clamp-`computed()` and busy-gate
116
+ * invariants hold.
117
+ *
118
+ * @category ui/paginator
119
+ */
120
+ interface CngxPaginatorHost {
121
+ /** Current page index (0-based), auto-clamped to `totalPages`. */
122
+ readonly pageIndex: Signal<number>;
123
+ /** Current page size. */
124
+ readonly pageSize: Signal<number>;
125
+ /** Total item count (before pagination). */
126
+ readonly total: Signal<number>;
127
+ /** Total number of pages (minimum 1). */
128
+ readonly totalPages: Signal<number>;
129
+ /** `[start, end]` slice indices for the current page - always in-bounds. */
130
+ readonly range: Signal<readonly [number, number]>;
131
+ /**
132
+ * `[0, end]` cumulative slice indices for append-don't-replace (load-more)
133
+ * consumers - every page revealed so far, sliced from the top.
134
+ */
135
+ readonly cumulativeRange: Signal<readonly [number, number]>;
136
+ /** `true` when on the first page. */
137
+ readonly isFirst: Signal<boolean>;
138
+ /** `true` when on the last page. */
139
+ readonly isLast: Signal<boolean>;
140
+ /** `true` while the bound async state is busy - navigation is gated. */
141
+ readonly isBusy: Signal<boolean>;
142
+ /** Navigate to `index`, clamped to `[0, totalPages - 1]`. No-op while busy. */
143
+ setPage(index: number): void;
144
+ /** Change page size; resets to page 0 unless `resetPage` is `false`. No-op while busy. */
145
+ setPageSize(size: number, resetPage?: boolean): void;
146
+ /** Navigate to the next page (no-op on the last page). */
147
+ next(): void;
148
+ /** Navigate to the previous page (no-op on the first page). */
149
+ previous(): void;
150
+ /** Navigate to the first page. */
151
+ first(): void;
152
+ /** Navigate to the last page. */
153
+ last(): void;
154
+ }
155
+ /**
156
+ * DI token the `CngxPaginator` shell provides via `useExisting`. Segment
157
+ * parts (`cngx-pgn-prev`, `cngx-pgn-pages`, ...) inject this rather than the
158
+ * concrete component class, keeping the organism decompose-ready.
159
+ *
160
+ * @category ui/paginator
161
+ * @wcag AA
162
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-host.token.ts
163
+ * @since 0.1.0
164
+ */
165
+ declare const CNGX_PAGINATOR_HOST: InjectionToken<CngxPaginatorHost>;
166
+
167
+ /**
168
+ * Overrides the paginator's built-in busy indicator. Project a structural
169
+ * `*cngxPaginatorLoading` template inside `<cngx-paginator>` and the shell
170
+ * renders it - instead of the default `<cngx-progress>` bar - while the bound
171
+ * async state is busy. Resolution cascades instance slot ->
172
+ * `CngxPaginatorConfig.templates.loading` -> built-in `CngxProgress`.
173
+ *
174
+ * ```html
175
+ * <cngx-paginator [state]="state">
176
+ * <ng-template cngxPaginatorLoading>
177
+ * <my-branded-spinner />
178
+ * </ng-template>
179
+ * <cngx-pgn-pages />
180
+ * </cngx-paginator>
181
+ * ```
182
+ *
183
+ * @category ui/paginator
184
+ * @wcag AA
185
+ * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/loading/busy</example-url>
186
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-loading.directive.ts
187
+ * @since 0.1.0
188
+ * @relatedTo CngxPaginator, CngxProgress
189
+ */
190
+ declare class CngxPaginatorLoading {
191
+ readonly templateRef: TemplateRef<any>;
192
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorLoading, never>;
193
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CngxPaginatorLoading, "[cngxPaginatorLoading]", ["cngxPaginatorLoading"], {}, {}, never, never, true, never>;
194
+ }
195
+
196
+ interface NavCore {
197
+ readonly disabled: Signal<boolean>;
198
+ readonly ariaLabel: Signal<string>;
199
+ activate(): void;
200
+ }
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
+ */
210
+ declare class CngxPaginatorFirst {
211
+ protected readonly glyph: "«";
212
+ protected readonly core: NavCore;
213
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorFirst, never>;
214
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorFirst, "cngx-pgn-first", ["cngxPgnFirst"], {}, {}, never, never, true, never>;
215
+ }
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
+ */
225
+ declare class CngxPaginatorPrev {
226
+ protected readonly glyph: "‹";
227
+ protected readonly core: NavCore;
228
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorPrev, never>;
229
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorPrev, "cngx-pgn-prev", ["cngxPgnPrev"], {}, {}, never, never, true, never>;
230
+ }
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
+ */
240
+ declare class CngxPaginatorNext {
241
+ protected readonly glyph: "›";
242
+ protected readonly core: NavCore;
243
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorNext, never>;
244
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorNext, "cngx-pgn-next", ["cngxPgnNext"], {}, {}, never, never, true, never>;
245
+ }
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
+ */
255
+ declare class CngxPaginatorLast {
256
+ protected readonly glyph: "»";
257
+ protected readonly core: NavCore;
258
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorLast, never>;
259
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorLast, "cngx-pgn-last", ["cngxPgnLast"], {}, {}, never, never, true, never>;
260
+ }
261
+
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
+ */
269
+ type PageItem = {
270
+ readonly kind: 'page';
271
+ readonly index: number;
272
+ } | {
273
+ readonly kind: 'gap';
274
+ readonly hidden: readonly number[];
275
+ };
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
+ */
283
+ interface PageWindow {
284
+ readonly pages: readonly PageItem[];
285
+ readonly gaps: number;
286
+ }
287
+
288
+ /**
289
+ * The numbered page row. One tab stop via `CngxRovingTabindex` (arrows / Home /
290
+ * End move the active page button); the current page carries `aria-current`.
291
+ * A truncation run collapses into an ellipsis button that opens a `CngxListbox`
292
+ * grid of the hidden pages (same select-and-jump model as `cngx-pgn-page-of-pages`,
293
+ * so focus moves into the panel on open).
294
+ *
295
+ * @category ui/paginator
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>
300
+ */
301
+ declare class CngxPaginatorPages {
302
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
303
+ protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
304
+ protected readonly glyphs: {
305
+ readonly first: "«";
306
+ readonly previous: "‹";
307
+ readonly next: "›";
308
+ readonly last: "»";
309
+ readonly more: "…";
310
+ readonly caret: "▾";
311
+ };
312
+ /** Pages flanking the current page on each side. Defaults to the v1 window. */
313
+ readonly siblingCount: i0.InputSignal<number>;
314
+ /** Pages pinned at each end. Defaults to the v1 window. */
315
+ readonly boundaryCount: i0.InputSignal<number>;
316
+ /** The page-window computation, swappable enterprise-wide via the DI token. */
317
+ private readonly pageWindowFn;
318
+ /**
319
+ * The rendered page window. Structural `equal` keeps the reference stable
320
+ * across recomputes that yield an identical window, so the `@for` does not
321
+ * churn (signal-equality rule).
322
+ */
323
+ protected readonly model: i0.Signal<PageWindow>;
324
+ /** Position of the active page within the rendered window (gaps counted). */
325
+ private readonly activeWindowIndex;
326
+ /**
327
+ * Roving focus cursor for the page row. A `linkedSignal` so the row's single
328
+ * tab stop tracks the active page (Tab lands on `aria-current`) yet still
329
+ * moves freely under the arrow keys between selections: arrow navigation
330
+ * writes the cursor locally, and it re-syncs to the active page whenever the
331
+ * page changes by any path (click / prev / next / Enter). Focus is not
332
+ * selection - the user arrows to a page and Enter commits it.
333
+ */
334
+ protected readonly rovingIndex: i0.WritableSignal<number>;
335
+ protected isCurrent(index: number): boolean;
336
+ protected goto(index: number): void;
337
+ /**
338
+ * Open the overflow popover and move focus into the listbox panel, so a
339
+ * keyboard user lands in the grid (the trigger is a roving page-row item, so
340
+ * the listbox trigger's own focus-move does not fire). `Enter`/`Space` on the
341
+ * button dispatch a native click, so this covers mouse and keyboard alike.
342
+ */
343
+ protected openOverflow(popover: {
344
+ toggle(): void;
345
+ isVisible(): boolean;
346
+ }, panel: HTMLElement): void;
347
+ /**
348
+ * Restore focus to the ellipsis trigger when the panel closes (Escape /
349
+ * outside click), so a keyboard user is not dropped to the page body. If a
350
+ * selection re-rendered the window away, the trigger is gone and the guard
351
+ * skips it.
352
+ */
353
+ protected onOverflowToggle(event: Event, trigger: HTMLElement): void;
354
+ protected onSelectOverflow(value: number | null | undefined): void;
355
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorPages, never>;
356
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorPages, "cngx-pgn-pages", ["cngxPgnPages"], { "siblingCount": { "alias": "siblingCount"; "required": false; "isSignal": true; }; "boundaryCount": { "alias": "boundaryCount"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
357
+ }
358
+
359
+ /**
360
+ * The page-window computation `cngx-pgn-pages` calls per recompute: given the
361
+ * current 0-based page, the total page count, and the per-instance
362
+ * `siblingCount` / `boundaryCount`, return the rendered {@link PageWindow}.
363
+ *
364
+ * An override implements a different truncation algorithm while still honouring the
365
+ * consumer's sibling / boundary intent.
366
+ *
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
370
+ */
371
+ type CngxPaginatorPageWindowFn = (current: number, total: number, siblingCount: number, boundaryCount: number) => PageWindow;
372
+ /** The shape an override must match to swap the page-window computation. */
373
+ type CngxPaginatorPageWindowFactory = () => CngxPaginatorPageWindowFn;
374
+ /**
375
+ * Default page-window factory. Resolves to the built-in {@link pageWindow} math
376
+ * (one sibling each side, one pinned boundary at each end at the `1 / 1`
377
+ * defaults). The segment builds its window via
378
+ * `inject(CNGX_PAGINATOR_PAGE_WINDOW_FACTORY)()` rather than calling this
379
+ * directly, mirroring {@link createPaginatorAnnouncer}.
380
+ *
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
384
+ */
385
+ declare const createPaginatorPageWindow: CngxPaginatorPageWindowFactory;
386
+ /**
387
+ * Swap token for the page-row truncation algorithm. The default resolves to
388
+ * {@link createPaginatorPageWindow}; override it to replace the whole windowing
389
+ * computation enterprise-wide (via `providers`) or per-component (via
390
+ * `viewProviders`) without forking the segment. Per-instance tweaks to the
391
+ * sibling / boundary counts use the `[siblingCount]` / `[boundaryCount]` inputs
392
+ * on `cngx-pgn-pages` instead. Mirrors {@link CNGX_PAGINATOR_ANNOUNCER_FACTORY}.
393
+ *
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
397
+ */
398
+ declare const CNGX_PAGINATOR_PAGE_WINDOW_FACTORY: InjectionToken<CngxPaginatorPageWindowFactory>;
399
+
400
+ /**
401
+ * Range-readout segment: renders `start-end of total` for the current page.
402
+ * Pure derivation from the host `range()`/`total()` signals - no local state,
403
+ * no writes. The text (including the `of` connector) comes from the
404
+ * config range formatter, so it localises with the rest of the cascade. Tabular
405
+ * figures keep the numerals from reflowing as the page changes.
406
+ *
407
+ * @category ui/paginator
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>
412
+ */
413
+ declare class CngxPaginatorRange {
414
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
415
+ private readonly config;
416
+ /** 1-based index of the first item on the current page (0 when empty). */
417
+ protected readonly start: i0.Signal<number>;
418
+ /**
419
+ * 1-based index of the last item on the current page. The brain's `range()`
420
+ * upper bound is uncapped (`start + pageSize`), so a partial final page is
421
+ * clamped to `total` here for an honest readout.
422
+ */
423
+ protected readonly end: i0.Signal<number>;
424
+ /** Formatted readout from the config range formatter (EN default `start-end of total`). */
425
+ protected readonly text: i0.Signal<string>;
426
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorRange, never>;
427
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorRange, "cngx-pgn-range", ["cngxPgnRange"], {}, {}, never, never, true, never>;
428
+ }
429
+
430
+ /**
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
433
+ * field. The brain clamps out-of-range values, so the field reflects the clamped
434
+ * page back. Accessible name from config (EN default, Pillar 2).
435
+ *
436
+ * @category ui/paginator
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>
441
+ */
442
+ declare class CngxPaginatorGoto {
443
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
444
+ protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
445
+ /** Live navigation on every keystroke / spinner step - no field re-sync, so
446
+ * typing is never interrupted; the clamp re-sync happens on commit. */
447
+ protected navigate(event: Event): void;
448
+ protected commit(event: Event): void;
449
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorGoto, never>;
450
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorGoto, "cngx-pgn-goto", ["cngxPgnGoto"], {}, {}, never, never, true, never>;
451
+ }
452
+
453
+ /**
454
+ * Items-per-page segment. A `CngxListbox` dropdown (never a native `<select>`,
455
+ * never the forms select family - keeps `@cngx/ui/paginator` free of a
456
+ * `@cngx/forms` dependency). `[options]` is data, not a feature toggle.
457
+ * Picking a size routes through `host.setPageSize`, which resets to
458
+ * page 0 (brain semantics). The selected size is derived from `host.pageSize()`,
459
+ * so the panel selection and the trigger label never drift (Pillar 1).
460
+ *
461
+ * @category ui/paginator
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>
466
+ */
467
+ declare class CngxPaginatorPageSize {
468
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
469
+ protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
470
+ protected readonly glyphs: {
471
+ readonly first: "«";
472
+ readonly previous: "‹";
473
+ readonly next: "›";
474
+ readonly last: "»";
475
+ readonly more: "…";
476
+ readonly caret: "▾";
477
+ };
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
+ */
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[]>;
491
+ protected onSelect(value: number | undefined): void;
492
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorPageSize, never>;
493
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorPageSize, "cngx-pgn-page-size", ["cngxPgnPageSize"], { "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
494
+ }
495
+
496
+ /**
497
+ * Page-of-pages segment. A `CngxListbox` dropdown of `1..totalPages`; picking
498
+ * page `n` routes through `host.setPage(n - 1)`. The option list is derived
499
+ * from `host.totalPages()` and the selected entry from `host.pageIndex()`, so
500
+ * both track the brain with zero local state (Pillar 1). Like the page-size
501
+ * segment it avoids native `<select>` and the forms family, keeping the entry
502
+ * `@cngx/forms`-free.
503
+ *
504
+ * @category ui/paginator
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>
509
+ */
510
+ declare class CngxPaginatorPageOfPages {
511
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
512
+ protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
513
+ protected readonly glyphs: {
514
+ readonly first: "«";
515
+ readonly previous: "‹";
516
+ readonly next: "›";
517
+ readonly last: "»";
518
+ readonly more: "…";
519
+ readonly caret: "▾";
520
+ };
521
+ /**
522
+ * The 1-based page numbers `1..totalPages`. Length-keyed `equal` keeps the
523
+ * reference stable while the count is unchanged - the contents are fully
524
+ * determined by the length, so the `@for` never churns (signal-equality rule).
525
+ */
526
+ protected readonly pages: i0.Signal<number[]>;
527
+ protected onSelect(value: number | undefined): void;
528
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorPageOfPages, never>;
529
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorPageOfPages, "cngx-pgn-page-of-pages", ["cngxPgnPageOfPages"], {}, {}, never, never, true, never>;
530
+ }
531
+
532
+ /** Resting size tier of a rendered dot. Edge dots shrink (iOS page-control). */
533
+ type DotSize = 'full' | 'medium' | 'small';
534
+ interface Dot {
535
+ readonly index: number;
536
+ readonly size: DotSize;
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
+ }
545
+ /**
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.
552
+ *
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>
558
+ * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/dots</example-url>
559
+ */
560
+ declare class CngxPaginatorDots {
561
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
562
+ protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
563
+ /**
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).
567
+ */
568
+ protected readonly model: i0.Signal<DotModel>;
569
+ protected isCurrent(index: number): boolean;
570
+ protected goto(index: number): void;
571
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorDots, never>;
572
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorDots, "cngx-pgn-dots", ["cngxPgnDots"], {}, {}, never, never, true, never>;
573
+ }
574
+
575
+ /**
576
+ * Page-status readout: renders "Page n of m" for the current page. Pure
577
+ * derivation from the host `pageIndex()`/`totalPages()` signals - no local
578
+ * state, no writes. It is the visible counterpart of the
579
+ * `announcements.pageChange` live-region phrasing, and the collapse target the
580
+ * responsive number row swaps to once the paginator's container narrows. Text
581
+ * comes from the config `pageStatus` formatter, so it localises with the rest of
582
+ * the cascade; tabular figures keep the numerals from reflowing as the page
583
+ * changes.
584
+ *
585
+ * @category ui/paginator
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>
590
+ */
591
+ declare class CngxPaginatorStatus {
592
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
593
+ private readonly config;
594
+ /** Formatted "Page n of m" readout from the config formatter (1-based page). */
595
+ protected readonly text: i0.Signal<string>;
596
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorStatus, never>;
597
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorStatus, "cngx-pgn-status", ["cngxPgnStatus"], {}, {}, never, never, true, never>;
598
+ }
599
+
600
+ /**
601
+ * Progress-rail segment: a horizontal rail whose fill tracks the current page
602
+ * position, with an overlaid knob riding the fill edge. The track, fill, and
603
+ * `role="progressbar"` a11y are composed from the `CngxProgress` atom - not
604
+ * reinvented here (same precedent as the progress-bar stepper). The only new
605
+ * part is the position knob, a decorative (`aria-hidden`) dot positioned by an
606
+ * inline `inset-inline-start.%`, which `CngxProgress` cannot express. The fill
607
+ * percentage derives purely from the host `pageIndex()`/`totalPages()` signals -
608
+ * no local state, no writes.
609
+ *
610
+ * @category ui/paginator
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>
615
+ */
616
+ declare class CngxPaginatorRail {
617
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
618
+ protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
619
+ /**
620
+ * Fill percentage (0-100) of the current page across the page span. A single
621
+ * page (or none) reads 0; the last page reads 100. Drives both the composed
622
+ * `cngx-progress` `[progress]` and the knob's inline position.
623
+ */
624
+ protected readonly fillPercent: i0.Signal<number>;
625
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorRail, never>;
626
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorRail, "cngx-pgn-rail", ["cngxPgnRail"], {}, {}, never, never, true, never>;
627
+ }
628
+
629
+ /**
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
632
+ * slice is derived by the brain (`host.cumulativeRange()`); this segment holds
633
+ * no accumulation state - the consumer slices its own array from
634
+ * `cumulativeRange()`.
635
+ *
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
638
+ * state, matching the nav segments; the busy/position reason is already spoken
639
+ * by the shell live region.
640
+ *
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>
646
+ * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/load-more</example-url>
647
+ */
648
+ declare class CngxPaginatorLoadMore {
649
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
650
+ private readonly config;
651
+ /**
652
+ * Accessible name from the config cascade. On the last page the actionable
653
+ * `Load more` name is replaced with the exhausted-state `allLoaded` label so
654
+ * AT does not announce an action on the disabled button.
655
+ */
656
+ protected readonly ariaLabel: i0.Signal<string>;
657
+ /** Disabled on the last page or while busy - the trigger becomes a no-op. */
658
+ protected readonly disabled: i0.Signal<boolean>;
659
+ /**
660
+ * Items revealed so far. The brain's `cumulativeRange()` upper bound is
661
+ * uncapped (`(pageIndex + 1) * pageSize`), so a partial final page is clamped
662
+ * to `total` here for an honest readout.
663
+ */
664
+ protected readonly shown: i0.Signal<number>;
665
+ /** Reveal the next page. Guarded so a disabled click is a no-op. */
666
+ protected handleClick(): void;
667
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorLoadMore, never>;
668
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorLoadMore, "cngx-pgn-load-more", ["cngxPgnLoadMore"], {}, {}, never, never, true, never>;
669
+ }
670
+
671
+ /**
672
+ * Infinite-scroll segment: a bottom-of-list sentinel that auto-advances the
673
+ * page as it scrolls into view, composing `CngxInfiniteScroll`. \
674
+ * The in-template sentinel binds the directive's `[enabled]` / `[loading]` inputs and its
675
+ * `(loadMore)` output directly to the `CNGX_PAGINATOR_HOST` signals, so the
676
+ * directive's built-in debounce, busy-gate, enabled-disable, and auto-disconnect
677
+ * own the auto-advance double-fire guard - this segment adds no
678
+ * `IntersectionObserver` code of its own.
679
+ *
680
+ * The directive sits on the sentinel element (not as a `hostDirective`) precisely so its `[enabled]` / `[loading]`
681
+ * inputs can bind to the host-token signals; a static `hostDirectives`
682
+ * declaration could not express that wiring.
683
+ *
684
+ * Like `cngx-pgn-load-more`, this stays a thin trigger atom: it injects
685
+ * `CNGX_PAGINATOR_HOST`, holds no accumulation state, and renders no async view
686
+ * of its own. \
687
+ * The consumer slices its own array from the brain's
688
+ * `cumulativeRange()`; the busy / error / end experience belongs to the consumer
689
+ * or to a composing container, keeping the segment reusable unchanged.
690
+ *
691
+ * Exhausted state: once `host.isLast()` the sentinel disables (`enabled` is
692
+ * `false`, so the observer disconnects). \
693
+ * It swaps its busy affordance for the
694
+ * `allLoaded` end label only after the final load settles (`!host.isBusy()`),
695
+ * so it never claims "all loaded" while the last batch is still arriving, and
696
+ * the tail is never a silent or stale spinner.
697
+ *
698
+ * `[root]` / `[rootMargin]` forward straight to the composed directive so a
699
+ * consumer can point the sentinel at a bounded scroll container (a feed box)
700
+ * rather than the viewport, and tune the pre-fetch distance. They are plain
701
+ * passthrough config - the segment still owns no observer code and no state.
702
+ *
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>
708
+ * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/infinite</example-url>
709
+ */
710
+ declare class CngxPaginatorInfinite {
711
+ protected readonly host: _cngx_ui_paginator.CngxPaginatorHost;
712
+ private readonly config;
713
+ /**
714
+ * CSS selector for the scroll container the sentinel is watched within.
715
+ * `null` (default) observes the viewport. Forwarded to `CngxInfiniteScroll`.
716
+ */
717
+ readonly root: i0.InputSignal<string | null>;
718
+ /**
719
+ * Pre-fetch margin around the scroll container, forwarded to
720
+ * `CngxInfiniteScroll`. The directive default loads ~200px before the
721
+ * sentinel is visible.
722
+ */
723
+ readonly rootMargin: i0.InputSignal<string>;
724
+ /**
725
+ * Exhausted: the last page is reached AND its load has settled. Gating on
726
+ * `!isBusy()` keeps the spinner up while the final batch is still loading, so
727
+ * the segment never claims "all loaded" before the last rows arrive.
728
+ */
729
+ protected readonly isExhausted: i0.Signal<boolean>;
730
+ /**
731
+ * Exhausted-state label from the config cascade, reused from the load-more
732
+ * segment so both append modes speak the same "all N loaded" end state rather
733
+ * than leaving the tail implicit.
734
+ */
735
+ protected readonly endLabel: i0.Signal<string>;
736
+ /** Status text shown beside the spinner while more pages remain. */
737
+ protected readonly busyLabel: i0.Signal<string>;
738
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorInfinite, never>;
739
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorInfinite, "cngx-pgn-infinite", ["cngxPgnInfinite"], { "root": { "alias": "root"; "required": false; "isSignal": true; }; "rootMargin": { "alias": "rootMargin"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
740
+ }
741
+
742
+ /**
743
+ * Alphabetical / category chips: a `role="group"` toggle strip over the
744
+ * {@link CngxBucketPaginate} range model. \
745
+ * One `<button>` per bucket; the active
746
+ * bucket carries `aria-pressed`, an empty bucket is `disabled`. The model is
747
+ * injected through `CNGX_BUCKET_PAGINATE_HOST`, never the concrete directive
748
+ * class, so the strip stays decompose-ready.
749
+ *
750
+ * Every chip's pressed / disabled / name state is a `computed()` read of the
751
+ * host signals - nothing is synced. An empty chip is not a silent dead control: \
752
+ * its accessible name comes from `ariaLabels.emptyBucket(label)`, which states
753
+ * the bucket has no items, so AT hears the reason the chip is disabled.
754
+ *
755
+ * Keyboard navigation reuses `CngxRovingTabindex` / `CngxRovingItem` (no new
756
+ * keyboard code, matching `cngx-pgn-pages`): \
757
+ * arrows move the focus cursor and
758
+ * skip disabled chips, the single tab stop tracks the active bucket, and
759
+ * activation commits via `select()`.
760
+ *
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>
766
+ * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/alphabetical</example-url>
767
+ */
768
+ declare class CngxPaginatorAlpha {
769
+ protected readonly host: i1.CngxBucketPaginateHost;
770
+ protected readonly config: _cngx_ui_paginator.CngxPaginatorConfig;
771
+ /**
772
+ * Roving focus cursor. A `linkedSignal` so the strip's single tab stop tracks
773
+ * the active bucket (Tab lands on the pressed chip) yet still moves freely
774
+ * under the arrow keys; when nothing is selected it falls back to the first
775
+ * non-empty chip so Tab never lands on a disabled control.
776
+ */
777
+ protected readonly rovingIndex: i0.WritableSignal<number>;
778
+ protected isActive(label: string): boolean;
779
+ /**
780
+ * Accessible name: the available chip uses `ariaLabels.bucket`; an empty chip
781
+ * swaps to `ariaLabels.emptyBucket` so the disabled control states its reason.
782
+ */
783
+ protected chipLabel(label: string): string;
784
+ protected select(label: string): void;
785
+ static ɵfac: i0.ɵɵFactoryDeclaration<CngxPaginatorAlpha, never>;
786
+ static ɵcmp: i0.ɵɵComponentDeclaration<CngxPaginatorAlpha, "cngx-pgn-alpha", ["cngxPgnAlpha"], {}, {}, never, never, true, never>;
787
+ }
788
+
789
+ /**
790
+ * Accessible-name strings for the paginator landmark and its segment parts.
791
+ * Library defaults are English; consumers localise via
792
+ * {@link withPaginatorAriaLabels}.
793
+ *
794
+ * @category ui/paginator
795
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
796
+ * @since 0.1.0
797
+ */
798
+ interface CngxPaginatorAriaLabels {
799
+ /** Accessible name for the `role="navigation"` landmark. */
800
+ readonly label: string;
801
+ /** First-page button. */
802
+ readonly first: string;
803
+ /** Previous-page button. */
804
+ readonly previous: string;
805
+ /** Next-page button. */
806
+ readonly next: string;
807
+ /** Last-page button. */
808
+ readonly last: string;
809
+ /** A page button, given its 1-based display number. */
810
+ readonly page: (page: number) => string;
811
+ /** The ellipsis overflow trigger that reveals hidden pages. */
812
+ readonly morePages: string;
813
+ /** Page-size selector. */
814
+ readonly itemsPerPage: string;
815
+ /** Go-to-page input. */
816
+ readonly goToPage: string;
817
+ /** Page-of-pages selector (the `current / total` jump dropdown). */
818
+ readonly pageOfPages: string;
819
+ /** Load-more trigger while pages remain (the append-style "reveal next page" button). */
820
+ readonly loadMore: string;
821
+ /**
822
+ * Load-more trigger once every page is revealed, given the total item count.
823
+ * Replaces the actionable `loadMore` name on the exhausted (last-page) button
824
+ * so AT does not announce a "Load more" action on a disabled control.
825
+ */
826
+ readonly allLoaded: (total: number) => string;
827
+ /** A category/range chip, given its bucket label (e.g. `'A-C'`). */
828
+ readonly bucket: (label: string) => string;
829
+ /**
830
+ * A category/range chip with no matching items, given its bucket label.
831
+ * Names the disabled chip AND states why it is disabled, so an empty bucket
832
+ * is not a silent dead control.
833
+ */
834
+ readonly emptyBucket: (label: string) => string;
835
+ /** Accessible name for the category/range chip strip (`role="group"`). */
836
+ readonly bucketGroup: string;
837
+ /**
838
+ * Accessible name for the `rail` skin's progress rail. Becomes the composed
839
+ * `cngx-progress` `[label]`, so AT reads "Page position" with the progressbar
840
+ * value the atom exposes.
841
+ */
842
+ readonly railPosition: string;
843
+ }
844
+ /**
845
+ * Display-text formatters for the data-readout segments. Library defaults are
846
+ * English; consumers localise via {@link withPaginatorRangeFormat}.
847
+ *
848
+ * @category ui/paginator
849
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
850
+ * @since 0.1.0
851
+ */
852
+ interface CngxPaginatorFormats {
853
+ /**
854
+ * Range-readout text, given the 1-based first item, last item, and total.
855
+ * The `cngx-pgn-range` segment renders the returned string as sanitised HTML,
856
+ * so inline emphasis (e.g. `<b>` around the current range) is honoured; the
857
+ * default bolds the range. Angular's sanitiser strips anything unsafe.
858
+ */
859
+ readonly range: (start: number, end: number, total: number) => string;
860
+ /**
861
+ * Page-status text, given the 1-based current page and total page count.
862
+ * The `cngx-pgn-status` segment renders the returned string as sanitised HTML
863
+ * (the default bolds the page); it is the visible twin of the
864
+ * `announcements.pageChange` live-region phrasing, which stays plain text.
865
+ */
866
+ readonly pageStatus: (page: number, totalPages: number) => string;
867
+ }
868
+ /**
869
+ * Live-region announcement phrasing. The paginator announces the effective page
870
+ * on every change (navigation or a `total`-shrink clamp, so the clamp is never
871
+ * silent) and the async busy / settle transitions. Library defaults are
872
+ * English; consumers localise via {@link withPaginatorAnnouncements}.
873
+ *
874
+ * @category ui/paginator
875
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
876
+ * @since 0.1.0
877
+ */
878
+ interface CngxPaginatorAnnouncements {
879
+ /** Announced on every page change, given the 1-based page and total pages. */
880
+ readonly pageChange: (page: number, totalPages: number) => string;
881
+ /** Announced when the bound async state becomes busy. */
882
+ readonly loading: string;
883
+ /** Announced when the bound async state settles after being busy. */
884
+ readonly updated: string;
885
+ }
886
+ /**
887
+ * Application-wide template-slot defaults. The instance `*cngxPaginatorLoading`
888
+ * slot still wins over the cascade; this tier supplies a shared override when no
889
+ * per-instance slot is projected. Library default is unset (the built-in
890
+ * `CngxProgress` bar renders).
891
+ *
892
+ * @category ui/paginator
893
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
894
+ * @since 0.1.0
895
+ */
896
+ interface CngxPaginatorTemplates {
897
+ /** Busy indicator shown while the bound async state is busy. */
898
+ readonly loading?: TemplateRef<unknown>;
899
+ }
900
+ /**
901
+ * Resolved paginator configuration. Three required sub-trees - accessible-name
902
+ * strings, live-region announcement phrasing, and data-readout formatters -
903
+ * plus a flat `pageSizeOptions` list and an optional `templates` slot tree,
904
+ * each merged independently by the reducer in
905
+ * {@link provideCngxPaginatorConfig}.
906
+ *
907
+ * @category ui/paginator
908
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
909
+ * @since 0.1.0
910
+ */
911
+ interface CngxPaginatorConfig {
912
+ readonly ariaLabels: CngxPaginatorAriaLabels;
913
+ readonly announcements: CngxPaginatorAnnouncements;
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[];
923
+ readonly templates?: CngxPaginatorTemplates;
924
+ }
925
+ /** Library defaults - English. Override via {@link provideCngxPaginatorConfig}. */
926
+ declare const CNGX_PAGINATOR_DEFAULTS: CngxPaginatorConfig;
927
+ /**
928
+ * Configuration cascade token. Resolution priority (high to low):
929
+ * per-instance Input, then `provideCngxPaginatorConfig(...)` at the
930
+ * application root, then the library defaults.
931
+ *
932
+ * @category ui/paginator
933
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
934
+ * @since 0.1.0
935
+ */
936
+ declare const CNGX_PAGINATOR_CONFIG: InjectionToken<CngxPaginatorConfig>;
937
+ /**
938
+ * A single configuration override produced by a `with*` feature factory.
939
+ * The reducer in {@link provideCngxPaginatorConfig} matches on `kind` and
940
+ * shallow-merges `payload` into the matching sub-tree - except
941
+ * `pageSizeOptions`, whose payload replaces the list wholesale.
942
+ *
943
+ * @category ui/paginator
944
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
945
+ * @since 0.1.0
946
+ */
947
+ type CngxPaginatorConfigFeature = {
948
+ readonly kind: 'ariaLabels';
949
+ readonly payload: Partial<CngxPaginatorAriaLabels>;
950
+ } | {
951
+ readonly kind: 'announcements';
952
+ readonly payload: Partial<CngxPaginatorAnnouncements>;
953
+ } | {
954
+ readonly kind: 'formats';
955
+ readonly payload: Partial<CngxPaginatorFormats>;
956
+ } | {
957
+ readonly kind: 'pageSizeOptions';
958
+ readonly payload: readonly number[];
959
+ } | {
960
+ readonly kind: 'templates';
961
+ readonly payload: Partial<CngxPaginatorTemplates>;
962
+ };
963
+ /**
964
+ * Override any subset of the paginator accessible-name strings. Per-instance
965
+ * `aria-label` bindings still win over the cascade for the landmark name.
966
+ *
967
+ * ```ts
968
+ * provideCngxPaginatorConfig(
969
+ * withPaginatorAriaLabels({ next: 'Nächste Seite', previous: 'Vorige Seite' }),
970
+ * );
971
+ * ```
972
+ *
973
+ * @category ui/paginator
974
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
975
+ * @since 0.1.0
976
+ */
977
+ declare function withPaginatorAriaLabels(payload: Partial<CngxPaginatorAriaLabels>): CngxPaginatorConfigFeature;
978
+ /**
979
+ * Override any subset of the paginator live-region announcement phrasing.
980
+ *
981
+ * ```ts
982
+ * provideCngxPaginatorConfig(
983
+ * withPaginatorAnnouncements({
984
+ * pageChange: (page, total) => `Seite ${page} von ${total}`,
985
+ * loading: 'Wird geladen',
986
+ * updated: 'Aktualisiert',
987
+ * }),
988
+ * );
989
+ * ```
990
+ *
991
+ * @category ui/paginator
992
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
993
+ * @since 0.1.0
994
+ */
995
+ declare function withPaginatorAnnouncements(payload: Partial<CngxPaginatorAnnouncements>): CngxPaginatorConfigFeature;
996
+ /**
997
+ * Override the range-readout format. The `cngx-pgn-range` segment renders the
998
+ * returned string verbatim, so this also localises the `of` connector.
999
+ *
1000
+ * ```ts
1001
+ * provideCngxPaginatorConfig(
1002
+ * withPaginatorRangeFormat((start, end, total) => `${start}-${end} von ${total}`),
1003
+ * );
1004
+ * ```
1005
+ *
1006
+ * @category ui/paginator
1007
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
1008
+ * @since 0.1.0
1009
+ */
1010
+ declare function withPaginatorRangeFormat(range: CngxPaginatorFormats['range']): CngxPaginatorConfigFeature;
1011
+ /**
1012
+ * Override the page-status format. The `cngx-pgn-status` segment renders the
1013
+ * returned string verbatim, so this localises the "Page n of m" readout that
1014
+ * the responsive collapse reveals.
1015
+ *
1016
+ * ```ts
1017
+ * provideCngxPaginatorConfig(
1018
+ * withPaginatorPageStatusFormat((page, totalPages) => `Seite ${page} von ${totalPages}`),
1019
+ * );
1020
+ * ```
1021
+ *
1022
+ * @category ui/paginator
1023
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
1024
+ * @since 0.1.0
1025
+ */
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;
1044
+ /**
1045
+ * Supply application-wide template-slot defaults for the paginator. The
1046
+ * per-instance `*cngxPaginatorLoading` slot still wins over this tier; it only
1047
+ * applies where no instance slot is projected.
1048
+ *
1049
+ * ```ts
1050
+ * provideCngxPaginatorConfig(
1051
+ * withPaginatorTemplates({ loading: myBrandedSpinnerTemplate }),
1052
+ * );
1053
+ * ```
1054
+ *
1055
+ * @category ui/paginator
1056
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
1057
+ * @since 0.1.0
1058
+ */
1059
+ declare function withPaginatorTemplates(payload: Partial<CngxPaginatorTemplates>): CngxPaginatorConfigFeature;
1060
+ /**
1061
+ * Application-root configuration cascade for the paginator. Pass any
1062
+ * combination of `with*` features in `bootstrapApplication`'s providers.
1063
+ * Supplied features deep-merge with the library defaults, so consumers only
1064
+ * declare the keys they want to override.
1065
+ *
1066
+ * @category ui/paginator
1067
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
1068
+ * @since 0.1.0
1069
+ */
1070
+ declare function provideCngxPaginatorConfig(...features: CngxPaginatorConfigFeature[]): EnvironmentProviders;
1071
+ /**
1072
+ * Component-scoped paginator configuration override. Pass into a component's
1073
+ * or directive's `viewProviders`; features merge on top of the parent config
1074
+ * (an enclosing scope or the application root), so a region can re-phrase its
1075
+ * announcements or labels without disturbing the rest of the app.
1076
+ *
1077
+ * @category ui/paginator
1078
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
1079
+ * @since 0.1.0
1080
+ */
1081
+ declare function provideCngxPaginatorConfigAt(...features: CngxPaginatorConfigFeature[]): Provider[];
1082
+ /**
1083
+ * Convenience accessor for the paginator configuration. Runs in injection
1084
+ * context; resolves through the cascade. Equivalent to
1085
+ * `inject(CNGX_PAGINATOR_CONFIG)`.
1086
+ *
1087
+ * @category ui/paginator
1088
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts
1089
+ * @since 0.1.0
1090
+ */
1091
+ declare function injectPaginatorConfig(): CngxPaginatorConfig;
1092
+
1093
+ /**
1094
+ * Reactive announcement source for the paginator live region.
1095
+ *
1096
+ * @category ui/paginator
1097
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts
1098
+ * @since 0.1.0
1099
+ */
1100
+ interface CngxPaginatorAnnouncer {
1101
+ /**
1102
+ * The current message to render inside the `cngxLiveRegion` span. Changes
1103
+ * (and only changes) are spoken by assistive technology.
1104
+ */
1105
+ readonly message: Signal<string>;
1106
+ }
1107
+ /**
1108
+ * Builds the paginator live-region message as a single derived signal - no
1109
+ * class logic baked into the shell, so the skin still ejects cleanly. The
1110
+ * message is a `linkedSignal` over `[pageIndex, totalPages, isBusy]` from
1111
+ * {@link CNGX_PAGINATOR_HOST}: it speaks "Page N of M" on every effective-page
1112
+ * change (navigation OR a `total`-shrink clamp, so the clamp is never silent),
1113
+ * "Loading" while busy, and "Updated" on the first settle after busy. Phrasing
1114
+ * comes from {@link injectPaginatorConfig}.
1115
+ *
1116
+ * The previous source value (held by `linkedSignal`) is what distinguishes a
1117
+ * settle from a steady state, so there is no signal write in an `effect` and no
1118
+ * imperative `previous` tracking. Identical consecutive messages dedupe through
1119
+ * the signal's value equality, so the live region never re-announces a no-op.
1120
+ *
1121
+ * Must run in an injection context (call as a field initialiser on the shell).
1122
+ *
1123
+ * @category ui/paginator
1124
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts
1125
+ * @since 0.1.0
1126
+ */
1127
+ declare function createPaginatorAnnouncer(): CngxPaginatorAnnouncer;
1128
+ /** The shape an override must match to swap the announcer derivation. */
1129
+ type CngxPaginatorAnnouncerFactory = () => CngxPaginatorAnnouncer;
1130
+ /**
1131
+ * Swap token for the live-region announcer derivation. The default resolves to
1132
+ * {@link createPaginatorAnnouncer}; the shell builds its announcer via
1133
+ * `inject(CNGX_PAGINATOR_ANNOUNCER_FACTORY)()` rather than calling the factory
1134
+ * directly. Override it to wrap the busy / settle / page-change derivation - a
1135
+ * telemetry tap, politeness escalation, or custom phrasing branch - without
1136
+ * forking the shell (mirrors `CNGX_COMMIT_ERROR_ANNOUNCER_FACTORY` in the
1137
+ * select family). The override runs in the shell's injection context, so it can
1138
+ * still `inject(CNGX_PAGINATOR_HOST)` / {@link injectPaginatorConfig}.
1139
+ *
1140
+ * @category ui/paginator
1141
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts
1142
+ * @since 0.1.0
1143
+ */
1144
+ declare const CNGX_PAGINATOR_ANNOUNCER_FACTORY: InjectionToken<CngxPaginatorAnnouncerFactory>;
1145
+
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 };
1147
+ export type { CngxPaginatorAnnouncements, CngxPaginatorAnnouncer, CngxPaginatorAnnouncerFactory, CngxPaginatorAriaLabels, CngxPaginatorConfig, CngxPaginatorConfigFeature, CngxPaginatorDensity, CngxPaginatorFormats, CngxPaginatorHost, CngxPaginatorPageWindowFactory, CngxPaginatorPageWindowFn, CngxPaginatorSkin, CngxPaginatorTemplates, PageItem, PageWindow };