@cngx/ui 0.1.0-rc.7 → 0.1.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/a11y/README.md +11 -5
- package/accordion/README.md +4 -2
- package/breadcrumb/README.md +262 -0
- package/collection/README.md +6 -0
- package/command-palette/README.md +227 -0
- package/data-grid-accordion/README.md +76 -2
- package/feedback/README.md +40 -0
- package/fesm2022/cngx-ui-a11y.mjs +189 -57
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
- package/fesm2022/cngx-ui-accordion.mjs +120 -36
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +121 -56
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +228 -108
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +180 -23
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
- package/fesm2022/cngx-ui-collection.mjs +204 -62
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +395 -119
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
- package/fesm2022/cngx-ui-context-menu.mjs +209 -40
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -101
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +16 -6
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +1074 -460
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +76 -7
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
- package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +555 -204
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-overlay.mjs +69 -13
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +553 -198
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +344 -109
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +4 -16
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +107 -8
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +146 -46
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
- package/fesm2022/cngx-ui-stepper.mjs +234 -99
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +88 -25
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +98 -23
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
- package/fesm2022/cngx-ui-toc.mjs +101 -33
- package/fesm2022/cngx-ui-toc.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +15 -20
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-paginator/README.md +9 -2
- package/mat-tabs/README.md +30 -6
- package/mat-tabs/styles/mat-tabs.css +188 -42
- package/overlay/README.md +9 -4
- package/package.json +31 -7
- package/paginator/README.md +8 -4
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +9 -0
- package/schematics/ng-add/schema.json +91 -0
- package/schematics/package.json +3 -0
- package/sidenav/README.md +33 -11
- package/speak/README.md +3 -2
- package/stepper/README.md +14 -2
- package/timeline/README.md +1 -1
- package/toc/README.md +4 -1
- package/types/cngx-ui-a11y.d.ts +121 -30
- package/types/cngx-ui-accordion.d.ts +100 -28
- package/types/cngx-ui-action-button.d.ts +44 -3
- package/types/cngx-ui-breadcrumb.d.ts +167 -60
- package/types/cngx-ui-chart-panel.d.ts +122 -18
- package/types/cngx-ui-collection.d.ts +157 -55
- package/types/cngx-ui-command-palette.d.ts +297 -183
- package/types/cngx-ui-context-menu.d.ts +140 -10
- package/types/cngx-ui-data-grid-accordion.d.ts +278 -39
- package/types/cngx-ui-empty-state.d.ts +9 -2
- package/types/cngx-ui-feedback.d.ts +605 -59
- package/types/cngx-ui-mat-accordion.d.ts +30 -1
- package/types/cngx-ui-mat-paginator.d.ts +37 -8
- package/types/cngx-ui-mat-stepper.d.ts +23 -11
- package/types/cngx-ui-mat-tabs.d.ts +250 -34
- package/types/cngx-ui-overlay.d.ts +56 -10
- package/types/cngx-ui-paginator.d.ts +425 -136
- package/types/cngx-ui-sidenav.d.ts +248 -74
- package/types/cngx-ui-skeleton.d.ts +6 -7
- package/types/cngx-ui-speak.d.ts +118 -5
- package/types/cngx-ui-stat-card.d.ts +117 -33
- package/types/cngx-ui-stepper.d.ts +88 -49
- package/types/cngx-ui-tabs.d.ts +6 -4
- package/types/cngx-ui-timeline.d.ts +35 -11
- package/types/cngx-ui-toc.d.ts +93 -16
- package/types/cngx-ui.d.ts +7 -4
|
@@ -3,8 +3,10 @@ import { InjectionToken, Signal, WritableSignal, TemplateRef, EnvironmentProvide
|
|
|
3
3
|
import * as i2 from '@cngx/common/data';
|
|
4
4
|
import { CngxSort, CngxFilter } from '@cngx/common/data';
|
|
5
5
|
import * as i1 from '@cngx/common/interactive';
|
|
6
|
+
import * as i3 from '@cngx/common/layout';
|
|
6
7
|
import * as _cngx_ui_data_grid_accordion from '@cngx/ui/data-grid-accordion';
|
|
7
8
|
import { AsyncStatus, CngxAsyncState } from '@cngx/core/utils';
|
|
9
|
+
import { CngxMessage } from '@cngx/core/i18n';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* UI-local context a {@link CngxDataGridAccordion} exposes so each
|
|
@@ -116,6 +118,58 @@ interface CngxDataGridAccordionConfig {
|
|
|
116
118
|
* only moves the cascade default. Override via {@link withDataGridSkin}.
|
|
117
119
|
*/
|
|
118
120
|
readonly skin?: CngxDataGridSkin;
|
|
121
|
+
/**
|
|
122
|
+
* App-wide copy for the grid's count, sort, filter and row surfaces. Reactive
|
|
123
|
+
* from birth: pass a partial bundle or a `Signal` of one; unset keys read the
|
|
124
|
+
* `dataGridAccordion` section of the language pack. Override via
|
|
125
|
+
* {@link withDataGridAccordionLabels}.
|
|
126
|
+
*/
|
|
127
|
+
readonly labels?: Partial<CngxDataGridAccordionLabels> | Signal<Partial<CngxDataGridAccordionLabels>>;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* User-facing copy of the data-grid-accordion family. The defaults come from
|
|
131
|
+
* the `dataGridAccordion` section of the language pack (English without one).
|
|
132
|
+
* Every key follows a live bundle and a language switch; live regions (the
|
|
133
|
+
* count, a row's load error) read it untracked and speak the new language with
|
|
134
|
+
* their next change.
|
|
135
|
+
*
|
|
136
|
+
* @category ui/data-grid-accordion
|
|
137
|
+
* @since 0.1.0
|
|
138
|
+
*/
|
|
139
|
+
interface CngxDataGridAccordionLabels {
|
|
140
|
+
/** Text of the `CngxDgaCount` live region for a visible-row count. */
|
|
141
|
+
readonly count: (count: number) => string;
|
|
142
|
+
/** Default of `[cngxDgaCountSingular]`. */
|
|
143
|
+
readonly countSingular: string;
|
|
144
|
+
/** Default of `[cngxDgaCountPlural]`. */
|
|
145
|
+
readonly countPlural: string;
|
|
146
|
+
/** Text of the `CngxDgaCount` live region when a noun is bound: the count and the noun. */
|
|
147
|
+
readonly countWithNoun: (count: number, noun: string) => string;
|
|
148
|
+
/** Default of `[cngxDgaSortStatusNotSorted]`, the described sort status while unsorted. */
|
|
149
|
+
readonly sortNone: string;
|
|
150
|
+
/** Default of `[cngxDgaSortStatusAscending]`. */
|
|
151
|
+
readonly sortAscending: string;
|
|
152
|
+
/** Default of `[cngxDgaSortStatusDescending]`. */
|
|
153
|
+
readonly sortDescending: string;
|
|
154
|
+
/** Default of `[cngxDgaSortAnnounceAscending]`; `{label}` is replaced by the column name. */
|
|
155
|
+
readonly sortAnnouncedAscending: string;
|
|
156
|
+
/** Default of `[cngxDgaSortAnnounceDescending]`; `{label}` is replaced by the column name. */
|
|
157
|
+
readonly sortAnnouncedDescending: string;
|
|
158
|
+
/** Default of `[cngxDgaSortAnnounceCleared]`; `{label}` is replaced by the column name. */
|
|
159
|
+
readonly sortAnnouncedCleared: string;
|
|
160
|
+
/** Column name of a sort announcement when the header has no `[cngxDgaSortLabel]` and no text. */
|
|
161
|
+
readonly unlabeledColumn: string;
|
|
162
|
+
/** Default of the `CngxDgaFilterField` visible `[label]`. */
|
|
163
|
+
readonly filter: string;
|
|
164
|
+
/** Default of `[cngxDgaFilterLabel]`, the filter box accessible name. */
|
|
165
|
+
readonly filterRows: string;
|
|
166
|
+
/** Default of the `CngxDataGridRow` `[errorMessage]`. */
|
|
167
|
+
readonly rowLoadFailed: string;
|
|
168
|
+
/**
|
|
169
|
+
* Tag the skins draw before a row's detail region (CSS `content`), read from the
|
|
170
|
+
* region's `data-note-label`. Decorative: it never enters the accessible name.
|
|
171
|
+
*/
|
|
172
|
+
readonly note: string;
|
|
119
173
|
}
|
|
120
174
|
|
|
121
175
|
/**
|
|
@@ -166,6 +220,18 @@ interface CngxDataGridAccordionConfig {
|
|
|
166
220
|
* tool here: the group is its own scrollport, so a header would resolve its sticky
|
|
167
221
|
* against that scrollport, and an unbounded (content-height) grid has nothing to stick
|
|
168
222
|
* to. Leave `[maxBlockSize]` unbound and the grid stays content-height, byte-identical.
|
|
223
|
+
* While rows are scrolled away above or remain below, the pinned head / foot cast a
|
|
224
|
+
* shadow (`--cngx-dga-head-shadow` / `--cngx-dga-foot-shadow`); with no hidden rows in
|
|
225
|
+
* that direction there is none. Keyboard focus lands clear of both bands: the host pads
|
|
226
|
+
* its scrollport by the measured head / foot size plus `--cngx-dga-focus-clearance`.
|
|
227
|
+
*
|
|
228
|
+
* A grid narrower than its columns (`--cngx-dga-min-width`) scrolls sideways; the host
|
|
229
|
+
* then fades the inline edge that still hides columns (`--cngx-dga-edge-fade-size`,
|
|
230
|
+
* never below `--cngx-dga-edge-fade-min` opacity), mirrored under `dir="rtl"`. Both
|
|
231
|
+
* affordances come from the composed {@link CngxScrollEdges} atom, whose
|
|
232
|
+
* `data-scroll-block-start` / `-block-end` / `-inline-start` / `-inline-end` host
|
|
233
|
+
* attributes are present only while content is hidden toward that edge; under forced
|
|
234
|
+
* colors the fade is dropped and the shadows are forced away.
|
|
169
235
|
*
|
|
170
236
|
* ```html
|
|
171
237
|
* <cngx-data-grid-accordion [multi]="true">
|
|
@@ -191,14 +257,19 @@ interface CngxDataGridAccordionConfig {
|
|
|
191
257
|
* @wcag AA
|
|
192
258
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/data-grid-accordion/data-grid-accordion.component.ts
|
|
193
259
|
* @since 0.1.0
|
|
194
|
-
* @relatedTo CngxDataGridRow, CngxDgCell, CngxDataGridHeader, CngxDataGridFooter, CngxAccordion, CngxSort, CngxFilter, CngxDgaSortHeader, CngxDgaFilter, CngxDgaCount
|
|
260
|
+
* @relatedTo CngxDataGridRow, CngxDgCell, CngxDataGridHeader, CngxDataGridFooter, CngxAccordion, CngxSort, CngxFilter, CngxDgaSortHeader, CngxDgaFilter, CngxDgaCount, CngxScrollEdges
|
|
195
261
|
*
|
|
196
262
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/sortable-ledger</example-url>
|
|
197
263
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/sticky-head</example-url>
|
|
264
|
+
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/scroll-edges-bounded</example-url>
|
|
265
|
+
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/scroll-edges-narrow</example-url>
|
|
198
266
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/bound-sort-filter</example-url>
|
|
199
267
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/master-detail</example-url>
|
|
200
268
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/spreadsheet</example-url>
|
|
201
269
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/density</example-url>
|
|
270
|
+
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/ledger</example-url>
|
|
271
|
+
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/log-stream</example-url>
|
|
272
|
+
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/report</example-url>
|
|
202
273
|
*/
|
|
203
274
|
declare class CngxDataGridAccordion implements CngxDataGridAccordionContext {
|
|
204
275
|
private readonly config;
|
|
@@ -251,7 +322,7 @@ declare class CngxDataGridAccordion implements CngxDataGridAccordionContext {
|
|
|
251
322
|
* passes through untouched. `null` removes the inline property so the registered
|
|
252
323
|
* `none` initial wins and the grid stays unbounded. Primitive, so `Object.is` dedupes.
|
|
253
324
|
*/
|
|
254
|
-
protected readonly maxBlockSizeVar:
|
|
325
|
+
protected readonly maxBlockSizeVar: Signal<string | null>;
|
|
255
326
|
/**
|
|
256
327
|
* Heading level (2-6) every row's `role="heading"` wrapper reflects via
|
|
257
328
|
* `aria-level`. Clamped into the valid ARIA range so a stray `0`/`9` can never
|
|
@@ -269,8 +340,11 @@ declare class CngxDataGridAccordion implements CngxDataGridAccordionContext {
|
|
|
269
340
|
*/
|
|
270
341
|
readonly skin: _angular_core.InputSignal<CngxDataGridSkin | undefined>;
|
|
271
342
|
/** `[skin]` input over the config default. `null` host binding when unset. */
|
|
272
|
-
protected readonly resolvedSkin:
|
|
343
|
+
protected readonly resolvedSkin: Signal<CngxDataGridSkin | undefined>;
|
|
273
344
|
private readonly header;
|
|
345
|
+
private readonly headerEl;
|
|
346
|
+
private readonly footerEl;
|
|
347
|
+
private readonly rows;
|
|
274
348
|
private readonly firstRow;
|
|
275
349
|
/** Index of the primary column, read from the first row's `primary` cell (-1 = none). */
|
|
276
350
|
private readonly primaryIndex;
|
|
@@ -289,9 +363,34 @@ declare class CngxDataGridAccordion implements CngxDataGridAccordionContext {
|
|
|
289
363
|
* the header-derived template, else a single `1fr`. Primitive string, so
|
|
290
364
|
* `Object.is` dedupes with no `equal` fn.
|
|
291
365
|
*/
|
|
292
|
-
protected readonly resolvedColumns:
|
|
366
|
+
protected readonly resolvedColumns: Signal<string>;
|
|
367
|
+
/** Window surface for the band observers; `null` off the browser (SSR). */
|
|
368
|
+
private readonly resizeHost;
|
|
369
|
+
/**
|
|
370
|
+
* Measured border-box block size of the projected head / foot band in px, `null`
|
|
371
|
+
* when the band is absent or not observed yet. Written only by the observer callback.
|
|
372
|
+
*/
|
|
373
|
+
private readonly headBlockSize;
|
|
374
|
+
private readonly footBlockSize;
|
|
375
|
+
/**
|
|
376
|
+
* The measured head / foot sizes as CSS lengths for `--cngx-dga-head-block-size` /
|
|
377
|
+
* `--cngx-dga-foot-block-size`. `null` removes the inline property, so the CSS falls
|
|
378
|
+
* back to `0px` plus the focus clearance. Primitive, so `Object.is` dedupes.
|
|
379
|
+
*/
|
|
380
|
+
protected readonly headBlockSizeVar: Signal<string | null>;
|
|
381
|
+
protected readonly footBlockSizeVar: Signal<string | null>;
|
|
382
|
+
constructor();
|
|
383
|
+
/**
|
|
384
|
+
* Observe the block size of a late-resolving content child. The effect only
|
|
385
|
+
* subscribes: it tracks the `contentChild` read, wires `observeResize` inside
|
|
386
|
+
* `untracked`, and tears it down via `onCleanup` when the child changes (an `@if`
|
|
387
|
+
* toggling the head). The size write happens in the observer callback, never in
|
|
388
|
+
* the effect body. `createResizeSignal` needs a static element, so the low-level
|
|
389
|
+
* `observeResize` is the documented route for a reactive target.
|
|
390
|
+
*/
|
|
391
|
+
private measureBlockSize;
|
|
293
392
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDataGridAccordion, never>;
|
|
294
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxDataGridAccordion, "cngx-data-grid-accordion", ["cngxDataGridAccordion"], { "filterTerm": { "alias": "filterTerm"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "maxBlockSize": { "alias": "maxBlockSize"; "required": false; "isSignal": true; }; "headingLevel": { "alias": "headingLevel"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; }, { "filterTerm": "filterTermChange"; }, ["header", "
|
|
393
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxDataGridAccordion, "cngx-data-grid-accordion", ["cngxDataGridAccordion"], { "filterTerm": { "alias": "filterTerm"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "maxBlockSize": { "alias": "maxBlockSize"; "required": false; "isSignal": true; }; "headingLevel": { "alias": "headingLevel"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; }, { "filterTerm": "filterTermChange"; }, ["header", "headerEl", "footerEl", "rows"], ["*"], true, [{ directive: typeof i1.CngxAccordion; inputs: { "multi": "multi"; "openIds": "openIds"; }; outputs: { "openIdsChange": "openIdsChange"; }; }, { directive: typeof i2.CngxSort; inputs: { "cngxSortActive": "sortActive"; "cngxSortDirection": "sortDirection"; "cngxSortInitial": "initialSort"; "multiSort": "multiSort"; }; outputs: { "sortChange": "sortChange"; }; }, { directive: typeof i2.CngxFilter; inputs: { "cngxFilter": "filterPredicate"; }; outputs: { "filterChange": "filterChange"; }; }, { directive: typeof i3.CngxScrollEdges; inputs: {}; outputs: {}; }]>;
|
|
295
394
|
}
|
|
296
395
|
|
|
297
396
|
/** Inline alignment of a data-grid cell within its column track. */
|
|
@@ -480,6 +579,7 @@ declare class CngxDgaRowError {
|
|
|
480
579
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/lazy-row</example-url>
|
|
481
580
|
*/
|
|
482
581
|
declare class CngxDataGridRow {
|
|
582
|
+
protected readonly labels: _angular_core.Signal<_cngx_ui_data_grid_accordion.CngxDataGridAccordionLabels>;
|
|
483
583
|
/**
|
|
484
584
|
* Stable id this row registers under in the coordinator's open-set. Defaults to
|
|
485
585
|
* a generated id; bind `[panelId]` to a stable row value to address the row
|
|
@@ -504,10 +604,13 @@ declare class CngxDataGridRow {
|
|
|
504
604
|
* communicates the state it is handed.
|
|
505
605
|
*/
|
|
506
606
|
readonly state: _angular_core.InputSignal<AsyncStatus | CngxAsyncState<unknown> | undefined>;
|
|
507
|
-
/**
|
|
508
|
-
|
|
509
|
-
|
|
607
|
+
/**
|
|
608
|
+
* Error message announced in the error state. Unbound, the `rowLoadFailed`
|
|
609
|
+
* label applies.
|
|
610
|
+
*/
|
|
611
|
+
readonly errorMessage: _angular_core.InputSignal<string | undefined>;
|
|
510
612
|
protected readonly grid: _cngx_ui_data_grid_accordion.CngxDataGridAccordionContext;
|
|
613
|
+
private readonly accordion;
|
|
511
614
|
protected readonly regionId: string;
|
|
512
615
|
protected readonly headerId: string;
|
|
513
616
|
protected readonly cellsId: string;
|
|
@@ -549,6 +652,13 @@ declare class CngxDataGridRow {
|
|
|
549
652
|
* primitive, so `Object.is` dedupes - no `equal`. Mirrors `CngxAccordionItem`.
|
|
550
653
|
*/
|
|
551
654
|
protected readonly status: _angular_core.Signal<AsyncStatus | undefined>;
|
|
655
|
+
/**
|
|
656
|
+
* @internal - text of the `role="alert"` error region. A bound `errorMessage`
|
|
657
|
+
* applies at once; the label default is read untracked and keyed on the status,
|
|
658
|
+
* so a language switch never re-speaks a shown error and the next error speaks
|
|
659
|
+
* the new language.
|
|
660
|
+
*/
|
|
661
|
+
protected readonly resolvedErrorMessage: _angular_core.Signal<string>;
|
|
552
662
|
/**
|
|
553
663
|
* `aria-busy` driver. Mirrors `CngxAsyncState.isBusy` (loading|refreshing|pending)
|
|
554
664
|
* so the string and object input forms agree. Boolean, no `equal`.
|
|
@@ -649,23 +759,35 @@ declare class CngxDataGridHeader {
|
|
|
649
759
|
declare class CngxDgaSortHeader {
|
|
650
760
|
/** The field key this header cell sorts by. */
|
|
651
761
|
readonly field: _angular_core.InputSignal<string>;
|
|
652
|
-
|
|
653
|
-
readonly
|
|
654
|
-
/** SR status while
|
|
655
|
-
readonly
|
|
656
|
-
/** SR status while sorted
|
|
657
|
-
readonly
|
|
762
|
+
private readonly labels;
|
|
763
|
+
private readonly locale;
|
|
764
|
+
/** SR status while unsorted. Unbound, the `sortNone` label applies. */
|
|
765
|
+
readonly notSortedLabel: _angular_core.InputSignal<string | undefined>;
|
|
766
|
+
/** SR status while sorted ascending. Unbound, the `sortAscending` label applies. */
|
|
767
|
+
readonly ascendingLabel: _angular_core.InputSignal<string | undefined>;
|
|
768
|
+
/** SR status while sorted descending. Unbound, the `sortDescending` label applies. */
|
|
769
|
+
readonly descendingLabel: _angular_core.InputSignal<string | undefined>;
|
|
658
770
|
/**
|
|
659
771
|
* Human column name spoken in the live sort announcement (`{label}` placeholder
|
|
660
|
-
* of the announcement templates). Defaults to the
|
|
772
|
+
* of the announcement templates). Defaults to the header's own text, then to the
|
|
773
|
+
* `unlabeledColumn` label - never to the field key.
|
|
661
774
|
*/
|
|
662
775
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
663
|
-
/**
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
776
|
+
/**
|
|
777
|
+
* Live announcement fired when this column becomes sorted ascending. `{label}` is
|
|
778
|
+
* replaced. Unbound, the `sortAnnouncedAscending` label applies.
|
|
779
|
+
*/
|
|
780
|
+
readonly ascendingAnnouncement: _angular_core.InputSignal<string | undefined>;
|
|
781
|
+
/**
|
|
782
|
+
* Live announcement fired when this column becomes sorted descending. `{label}` is
|
|
783
|
+
* replaced. Unbound, the `sortAnnouncedDescending` label applies.
|
|
784
|
+
*/
|
|
785
|
+
readonly descendingAnnouncement: _angular_core.InputSignal<string | undefined>;
|
|
786
|
+
/**
|
|
787
|
+
* Live announcement fired when this column's sort is cleared. `{label}` is replaced.
|
|
788
|
+
* Unbound, the `sortAnnouncedCleared` label applies.
|
|
789
|
+
*/
|
|
790
|
+
readonly clearedAnnouncement: _angular_core.InputSignal<string | undefined>;
|
|
669
791
|
private readonly grid;
|
|
670
792
|
private readonly announcer;
|
|
671
793
|
private readonly host;
|
|
@@ -690,6 +812,12 @@ declare class CngxDgaSortHeader {
|
|
|
690
812
|
private createStatusElement;
|
|
691
813
|
protected handleSort(event?: Event): void;
|
|
692
814
|
private announcementText;
|
|
815
|
+
private announcementTemplate;
|
|
816
|
+
/**
|
|
817
|
+
* The header's text as assistive tech reads it: `aria-hidden` subtrees (the sort
|
|
818
|
+
* status node, decorative icons and badges) are left out.
|
|
819
|
+
*/
|
|
820
|
+
private headerText;
|
|
693
821
|
protected handleActivateKey(event: Event): void;
|
|
694
822
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDgaSortHeader, never>;
|
|
695
823
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDgaSortHeader, "[cngxDgaSortHeader]", ["cngxDgaSortHeader"], { "field": { "alias": "cngxDgaSortHeader"; "required": true; "isSignal": true; }; "notSortedLabel": { "alias": "cngxDgaSortStatusNotSorted"; "required": false; "isSignal": true; }; "ascendingLabel": { "alias": "cngxDgaSortStatusAscending"; "required": false; "isSignal": true; }; "descendingLabel": { "alias": "cngxDgaSortStatusDescending"; "required": false; "isSignal": true; }; "label": { "alias": "cngxDgaSortLabel"; "required": false; "isSignal": true; }; "ascendingAnnouncement": { "alias": "cngxDgaSortAnnounceAscending"; "required": false; "isSignal": true; }; "descendingAnnouncement": { "alias": "cngxDgaSortAnnounceDescending"; "required": false; "isSignal": true; }; "clearedAnnouncement": { "alias": "cngxDgaSortAnnounceCleared"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -701,12 +829,13 @@ declare class CngxDgaSortHeader {
|
|
|
701
829
|
* keystroke it writes the value into `grid.filterTerm` after a debounce (owned here -
|
|
702
830
|
* {@link CngxFilter} has none), so the consumer's `computed()` re-derives the visible
|
|
703
831
|
* rows only once typing settles. An external term change (a programmatic clear) reflects
|
|
704
|
-
* back into the box, but never while it is focused - that would fight the caret
|
|
832
|
+
* back into the box, but never while it is focused - that would fight the caret; the
|
|
833
|
+
* deferred reconciliation lands when the box loses focus.
|
|
705
834
|
*
|
|
706
835
|
* The debounce lives in this slot, not in the group, because it is an input-UX concern;
|
|
707
836
|
* a consumer driving the term programmatically writes `grid.filterTerm` directly with no
|
|
708
|
-
* debounce. The default `aria-label` is
|
|
709
|
-
* `cngxDgaFilterLabel`).
|
|
837
|
+
* debounce. The default `aria-label` is the `filterRows` label of the language pack (a
|
|
838
|
+
* consumer overrides via `cngxDgaFilterLabel`).
|
|
710
839
|
*
|
|
711
840
|
* ```html
|
|
712
841
|
* <cngx-data-grid-accordion>
|
|
@@ -727,15 +856,20 @@ declare class CngxDgaSortHeader {
|
|
|
727
856
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/sortable-ledger</example-url>
|
|
728
857
|
*/
|
|
729
858
|
declare class CngxDgaFilter {
|
|
730
|
-
|
|
731
|
-
|
|
859
|
+
private readonly labels;
|
|
860
|
+
/** Accessible name for the filter box. Unbound, the `filterRows` label applies. */
|
|
861
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
732
862
|
/** Debounce in ms between the last keystroke and writing `grid.filterTerm`. */
|
|
733
863
|
readonly debounce: _angular_core.InputSignal<number>;
|
|
864
|
+
/** @internal */
|
|
865
|
+
protected readonly resolvedAriaLabel: _angular_core.Signal<string>;
|
|
734
866
|
private readonly grid;
|
|
867
|
+
private readonly document;
|
|
735
868
|
private readonly element;
|
|
736
869
|
private timer;
|
|
737
870
|
constructor();
|
|
738
871
|
protected handleInput(event: Event): void;
|
|
872
|
+
protected handleBlur(): void;
|
|
739
873
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDgaFilter, never>;
|
|
740
874
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDgaFilter, "input[cngxDgaFilter]", ["cngxDgaFilter"], { "ariaLabel": { "alias": "cngxDgaFilterLabel"; "required": false; "isSignal": true; }; "debounce": { "alias": "cngxDgaFilterDebounce"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
741
875
|
}
|
|
@@ -772,8 +906,14 @@ declare class CngxDgaFilter {
|
|
|
772
906
|
* <example-url>http://localhost:4200/#/ui/data-grid-accordion/sortable-ledger</example-url>
|
|
773
907
|
*/
|
|
774
908
|
declare class CngxDgaFilterField {
|
|
775
|
-
|
|
776
|
-
|
|
909
|
+
private readonly labels;
|
|
910
|
+
/**
|
|
911
|
+
* Visible label text; also drives the input's accessible name. Unbound, the
|
|
912
|
+
* `filter` label applies.
|
|
913
|
+
*/
|
|
914
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
915
|
+
/** @internal */
|
|
916
|
+
protected readonly resolvedLabel: _angular_core.Signal<string>;
|
|
777
917
|
/** Optional placeholder shown inside the input. */
|
|
778
918
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
779
919
|
/** Debounce in ms forwarded to the hosted `cngxDgaFilter`. */
|
|
@@ -805,8 +945,12 @@ declare class CngxDgaFilterField {
|
|
|
805
945
|
* grid cell. It is not required - the footer already places a bare first child in
|
|
806
946
|
* that column - but it is the consistent form the rest of the grid's cells use.
|
|
807
947
|
*
|
|
808
|
-
* The
|
|
809
|
-
* `
|
|
948
|
+
* The text comes from the `dataGridAccordion` section of the language pack
|
|
949
|
+
* (`3 results`, a plural message with a locale-formatted count). Override it app-wide
|
|
950
|
+
* through `withDataGridAccordionLabels`: a `count` formatter owns word order and plural
|
|
951
|
+
* rules, the `countSingular` / `countPlural` nouns alone compose through `countWithNoun`.
|
|
952
|
+
* Binding `cngxDgaCountSingular` / `cngxDgaCountPlural` per instance always composes
|
|
953
|
+
* through `countWithNoun`.
|
|
810
954
|
*
|
|
811
955
|
* @category ui/data-grid-accordion
|
|
812
956
|
* @wcag AA
|
|
@@ -819,13 +963,26 @@ declare class CngxDgaFilterField {
|
|
|
819
963
|
declare class CngxDgaCount {
|
|
820
964
|
/** The visible-row count the consumer derived. */
|
|
821
965
|
readonly count: _angular_core.InputSignal<number>;
|
|
822
|
-
|
|
823
|
-
readonly
|
|
824
|
-
/**
|
|
825
|
-
|
|
966
|
+
private readonly labels;
|
|
967
|
+
private readonly overrides;
|
|
968
|
+
/**
|
|
969
|
+
* Singular noun for a count of 1. Unbound, the `countSingular` label applies;
|
|
970
|
+
* binding either noun switches to `<count> <noun>` composition.
|
|
971
|
+
*/
|
|
972
|
+
readonly singular: _angular_core.InputSignal<string | undefined>;
|
|
973
|
+
/**
|
|
974
|
+
* Plural noun for any other count. Unbound, the `countPlural` label applies;
|
|
975
|
+
* binding either noun switches to `<count> <noun>` composition.
|
|
976
|
+
*/
|
|
977
|
+
readonly plural: _angular_core.InputSignal<string | undefined>;
|
|
826
978
|
private readonly element;
|
|
827
979
|
private readonly renderer;
|
|
828
980
|
constructor();
|
|
981
|
+
/**
|
|
982
|
+
* `true` when the config overrides a noun but not the `count` formatter: the
|
|
983
|
+
* nouns then compose, so a nouns-only override still reaches assistive tech.
|
|
984
|
+
*/
|
|
985
|
+
private nounsOnlyOverride;
|
|
829
986
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDgaCount, never>;
|
|
830
987
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDgaCount, "[cngxDgaCount]", ["cngxDgaCount"], { "count": { "alias": "cngxDgaCount"; "required": true; "isSignal": true; }; "singular": { "alias": "cngxDgaCountSingular"; "required": false; "isSignal": true; }; "plural": { "alias": "cngxDgaCountPlural"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
831
988
|
}
|
|
@@ -869,7 +1026,8 @@ declare class CngxDataGridFooter {
|
|
|
869
1026
|
declare const CNGX_DATA_GRID_ACCORDION_CONFIG: InjectionToken<CngxDataGridAccordionConfig>;
|
|
870
1027
|
|
|
871
1028
|
/**
|
|
872
|
-
* Discriminated-union shape returned by `withDataGridSkin
|
|
1029
|
+
* Discriminated-union shape returned by `withDataGridSkin` and
|
|
1030
|
+
* `withDataGridAccordionLabels`. The reducer in
|
|
873
1031
|
* `provideDataGridAccordionConfig` / `provideDataGridAccordionConfigAt` matches
|
|
874
1032
|
* on `kind` and writes `payload` onto the corresponding config key. Mirrors
|
|
875
1033
|
* `CngxAccordionConfigFeature` from `@cngx/ui/accordion` so the consumer's mental
|
|
@@ -878,12 +1036,17 @@ declare const CNGX_DATA_GRID_ACCORDION_CONFIG: InjectionToken<CngxDataGridAccord
|
|
|
878
1036
|
* @category ui/data-grid-accordion
|
|
879
1037
|
* @since 0.1.0
|
|
880
1038
|
*/
|
|
881
|
-
|
|
1039
|
+
type CngxDataGridAccordionConfigFeature = {
|
|
882
1040
|
readonly kind: 'skin';
|
|
883
1041
|
readonly payload: {
|
|
884
1042
|
readonly skin: CngxDataGridSkin;
|
|
885
1043
|
};
|
|
886
|
-
}
|
|
1044
|
+
} | {
|
|
1045
|
+
readonly kind: 'labels';
|
|
1046
|
+
readonly payload: {
|
|
1047
|
+
readonly labels: Partial<CngxDataGridAccordionLabels> | Signal<Partial<CngxDataGridAccordionLabels>>;
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
887
1050
|
/**
|
|
888
1051
|
* Application-root configuration cascade for the data-grid-accordion. Pass a
|
|
889
1052
|
* `withDataGridSkin` feature in `bootstrapApplication`'s providers array to move
|
|
@@ -944,6 +1107,24 @@ declare function provideDataGridAccordionConfigAt(...features: CngxDataGridAccor
|
|
|
944
1107
|
* @since 0.1.0
|
|
945
1108
|
*/
|
|
946
1109
|
declare function withDataGridSkin(skin: CngxDataGridSkin): CngxDataGridAccordionConfigFeature;
|
|
1110
|
+
/**
|
|
1111
|
+
* Set the app-wide copy of the grid's count, sort, filter and row surfaces.
|
|
1112
|
+
* Unset keys read the `dataGridAccordion` section of the language pack. Pass a
|
|
1113
|
+
* `Signal` of a partial bundle to switch languages at runtime; every part follows
|
|
1114
|
+
* it, live regions with their next change. A later call (or a nested
|
|
1115
|
+
* `provideDataGridAccordionConfigAt`) replaces the whole bundle rather than
|
|
1116
|
+
* merging with it.
|
|
1117
|
+
*
|
|
1118
|
+
* ```ts
|
|
1119
|
+
* provideDataGridAccordionConfig(
|
|
1120
|
+
* withDataGridAccordionLabels({ filterRows: 'Zeilen filtern', count: (n) => `${n} Treffer` }),
|
|
1121
|
+
* );
|
|
1122
|
+
* ```
|
|
1123
|
+
*
|
|
1124
|
+
* @category ui/data-grid-accordion
|
|
1125
|
+
* @since 0.1.0
|
|
1126
|
+
*/
|
|
1127
|
+
declare function withDataGridAccordionLabels(labels: Partial<CngxDataGridAccordionLabels> | Signal<Partial<CngxDataGridAccordionLabels>>): CngxDataGridAccordionConfigFeature;
|
|
947
1128
|
|
|
948
1129
|
/**
|
|
949
1130
|
* Convenience accessor for the data-grid-accordion configuration cascade. Runs in
|
|
@@ -965,5 +1146,63 @@ declare function withDataGridSkin(skin: CngxDataGridSkin): CngxDataGridAccordion
|
|
|
965
1146
|
*/
|
|
966
1147
|
declare function injectDataGridAccordionConfig(): CngxDataGridAccordionConfig;
|
|
967
1148
|
|
|
968
|
-
|
|
969
|
-
|
|
1149
|
+
/**
|
|
1150
|
+
* The data-grid-accordion section of a {@link CngxLanguagePack}: the copy of
|
|
1151
|
+
* every `@cngx/ui/data-grid-accordion` part. It feeds the `labels` of
|
|
1152
|
+
* `CNGX_DATA_GRID_ACCORDION_CONFIG`; a key set through
|
|
1153
|
+
* `withDataGridAccordionLabels` still wins. Messages use `{name}`
|
|
1154
|
+
* placeholders, numbers are formatted for the locale.
|
|
1155
|
+
*
|
|
1156
|
+
* @category ui/data-grid-accordion/i18n
|
|
1157
|
+
* @since 0.1.0
|
|
1158
|
+
* @relatedTo CNGX_DATA_GRID_ACCORDION_CONFIG, withDataGridAccordionLabels
|
|
1159
|
+
*/
|
|
1160
|
+
interface CngxDataGridAccordionLanguageSection {
|
|
1161
|
+
/** `{count}`: the `CngxDgaCount` live-region text for a visible-row count. */
|
|
1162
|
+
readonly count: CngxMessage;
|
|
1163
|
+
/** Default of `[cngxDgaCountSingular]`. */
|
|
1164
|
+
readonly countSingular: string;
|
|
1165
|
+
/** Default of `[cngxDgaCountPlural]`. */
|
|
1166
|
+
readonly countPlural: string;
|
|
1167
|
+
/** `{count}`, `{noun}`: the count with a noun bound on `CngxDgaCount`. */
|
|
1168
|
+
readonly countWithNoun: CngxMessage;
|
|
1169
|
+
/** Default of `[cngxDgaSortStatusNotSorted]`, the described sort status while unsorted. */
|
|
1170
|
+
readonly sortNone: string;
|
|
1171
|
+
/** Default of `[cngxDgaSortStatusAscending]`. */
|
|
1172
|
+
readonly sortAscending: string;
|
|
1173
|
+
/** Default of `[cngxDgaSortStatusDescending]`. */
|
|
1174
|
+
readonly sortDescending: string;
|
|
1175
|
+
/** `{label}`: default of `[cngxDgaSortAnnounceAscending]`, `{label}` is the column name. */
|
|
1176
|
+
readonly sortAnnouncedAscending: string;
|
|
1177
|
+
/** `{label}`: default of `[cngxDgaSortAnnounceDescending]`. */
|
|
1178
|
+
readonly sortAnnouncedDescending: string;
|
|
1179
|
+
/** `{label}`: default of `[cngxDgaSortAnnounceCleared]`. */
|
|
1180
|
+
readonly sortAnnouncedCleared: string;
|
|
1181
|
+
/** The column name of a sort announcement when the header has no label and no text. */
|
|
1182
|
+
readonly unlabeledColumn: string;
|
|
1183
|
+
/** Default of the `CngxDgaFilterField` visible `[label]`. */
|
|
1184
|
+
readonly filter: string;
|
|
1185
|
+
/** Default of `[cngxDgaFilterLabel]`, the filter box accessible name. */
|
|
1186
|
+
readonly filterRows: string;
|
|
1187
|
+
/** Default of the `CngxDataGridRow` `[errorMessage]`. */
|
|
1188
|
+
readonly rowLoadFailed: string;
|
|
1189
|
+
/** Decorative tag the skins draw before a row's detail region. */
|
|
1190
|
+
readonly note: string;
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* The English data-grid-accordion section: the single source of the entry's
|
|
1194
|
+
* English copy. The `CNGX_DATA_GRID_ACCORDION_CONFIG` labels default to it.
|
|
1195
|
+
*
|
|
1196
|
+
* @category ui/data-grid-accordion/i18n
|
|
1197
|
+
* @since 0.1.0
|
|
1198
|
+
* @relatedTo CNGX_DATA_GRID_ACCORDION_CONFIG
|
|
1199
|
+
*/
|
|
1200
|
+
declare const CNGX_DATA_GRID_ACCORDION_LANGUAGE_EN: CngxDataGridAccordionLanguageSection;
|
|
1201
|
+
declare module '@cngx/core/i18n' {
|
|
1202
|
+
interface CngxLanguagePack {
|
|
1203
|
+
readonly dataGridAccordion: CngxDataGridAccordionLanguageSection;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
export { CNGX_DATA_GRID_ACCORDION, CNGX_DATA_GRID_ACCORDION_CONFIG, CNGX_DATA_GRID_ACCORDION_LANGUAGE_EN, CngxDataGridAccordion, CngxDataGridFooter, CngxDataGridHeader, CngxDataGridRow, CngxDgCell, CngxDgaCount, CngxDgaFilter, CngxDgaFilterField, CngxDgaRowBusy, CngxDgaRowError, CngxDgaSortHeader, injectDataGridAccordionConfig, provideDataGridAccordionConfig, provideDataGridAccordionConfigAt, withDataGridAccordionLabels, withDataGridSkin };
|
|
1208
|
+
export type { CngxDataGridAccordionConfig, CngxDataGridAccordionConfigFeature, CngxDataGridAccordionContext, CngxDataGridAccordionLabels, CngxDataGridAccordionLanguageSection, CngxDataGridSeverity, CngxDataGridSkin, CngxDgCellAlign, CngxDgCellTrack, CngxDgaRowStateContext };
|
|
@@ -38,9 +38,16 @@ declare class CngxEmptyState {
|
|
|
38
38
|
readonly title: _angular_core.InputSignal<string>;
|
|
39
39
|
/** Supporting detail - clarifies context and suggests next steps. */
|
|
40
40
|
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
41
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Bind an async state - auto-hides when data is not empty, while an
|
|
43
|
+
* operation is running, or on error status. Error communication belongs
|
|
44
|
+
* to error surfaces (alert, async container). The component shows in two
|
|
45
|
+
* cases: a settled empty result ("loaded, nothing there") and an idle
|
|
46
|
+
* state with no data - the first-use onboarding surface, where nothing
|
|
47
|
+
* has been asked for yet.
|
|
48
|
+
*/
|
|
42
49
|
readonly state: _angular_core.InputSignal<CngxAsyncState<unknown> | undefined>;
|
|
43
|
-
/** @internal - hidden when state is bound and
|
|
50
|
+
/** @internal - hidden when state is bound and the view is not a settled empty result. */
|
|
44
51
|
protected readonly shouldHide: _angular_core.Signal<boolean>;
|
|
45
52
|
/** @internal */
|
|
46
53
|
protected readonly titleId: string;
|