ngwr 16.7.1 → 16.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/charts/donut-chart/styles/_index.scss +9 -3
- package/charts/meter-group/styles/_index.scss +8 -1
- package/charts/sparkline/styles/_index.scss +6 -3
- package/command-palette/styles/_index.scss +10 -0
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +17 -0
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs +27 -0
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +54 -6
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group-testing.mjs +27 -0
- package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +54 -6
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline-testing.mjs +27 -0
- package/fesm2022/ngwr-charts-sparkline-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +45 -4
- package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +38 -3
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +4 -3
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +39 -19
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +7 -2
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +10 -7
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +14 -8
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +2 -2
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +9 -2
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +9 -2
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +9 -2
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +9 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +9 -2
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +9 -2
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +9 -2
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +9 -2
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +9 -2
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +9 -2
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +9 -2
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-kk.mjs +9 -2
- package/fesm2022/ngwr-i18n-kk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +9 -2
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +9 -2
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +9 -2
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +9 -2
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +9 -2
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +9 -2
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +9 -2
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +9 -2
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +9 -2
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +9 -2
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +9 -2
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +33 -10
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +24 -10
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +2 -2
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +5 -3
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +51 -2
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +2 -2
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +22 -17
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +33 -3
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +8 -3
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/i18n/ar.json +9 -2
- package/i18n/cs.json +9 -2
- package/i18n/de.json +9 -2
- package/i18n/en.json +9 -2
- package/i18n/es.json +9 -2
- package/i18n/fr.json +9 -2
- package/i18n/he.json +9 -2
- package/i18n/hi.json +9 -2
- package/i18n/id.json +9 -2
- package/i18n/it.json +9 -2
- package/i18n/ja.json +9 -2
- package/i18n/kk.json +9 -2
- package/i18n/ko.json +9 -2
- package/i18n/nl.json +9 -2
- package/i18n/pl.json +9 -2
- package/i18n/pt.json +9 -2
- package/i18n/ru.json +9 -2
- package/i18n/sv.json +9 -2
- package/i18n/tr.json +9 -2
- package/i18n/uk.json +9 -2
- package/i18n/vi.json +9 -2
- package/i18n/zh-TW.json +9 -2
- package/i18n/zh.json +9 -2
- package/llms-full.txt +4 -4
- package/package.json +1 -1
- package/schematics/use/rule.js +1 -0
- package/schematics/use/symbol-map.json +1 -0
- package/tour/styles/_index.scss +11 -7
- package/types/ngwr-charts-donut-chart-testing.d.ts +32 -3
- package/types/ngwr-charts-donut-chart.d.ts +45 -6
- package/types/ngwr-charts-meter-group-testing.d.ts +29 -1
- package/types/ngwr-charts-meter-group.d.ts +43 -4
- package/types/ngwr-charts-sparkline-testing.d.ts +32 -2
- package/types/ngwr-charts-sparkline.d.ts +42 -3
- package/types/ngwr-checkbox.d.ts +14 -0
- package/types/ngwr-color-picker-testing.d.ts +1 -1
- package/types/ngwr-command-palette.d.ts +2 -1
- package/types/ngwr-dialog.d.ts +11 -6
- package/types/ngwr-drawer.d.ts +12 -4
- package/types/ngwr-file-upload.d.ts +1 -1
- package/types/ngwr-input-number.d.ts +14 -2
- package/types/ngwr-input-otp.d.ts +2 -0
- package/types/ngwr-lightbox.d.ts +1 -0
- package/types/ngwr-overlay.d.ts +20 -1
- package/types/ngwr-slider.d.ts +3 -1
- package/types/ngwr-switch.d.ts +13 -0
- package/types/ngwr-version.d.ts +1 -1
|
@@ -7,11 +7,21 @@ interface WrDonutChartHarnessFilters extends BaseHarnessFilters {
|
|
|
7
7
|
/** Match a chart whose legend holds this label. */
|
|
8
8
|
readonly sliceLabel?: string | RegExp;
|
|
9
9
|
}
|
|
10
|
-
/** One legend row
|
|
10
|
+
/** One legend row: a slice's label and value, as the chart prints them. */
|
|
11
11
|
interface WrDonutChartLegendEntry {
|
|
12
12
|
readonly label: string;
|
|
13
13
|
readonly value: string;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* One row of the chart's data table (`dataTable`): the slice's label as its row header,
|
|
17
|
+
* then its value and its share of the ring.
|
|
18
|
+
*/
|
|
19
|
+
interface WrDonutChartTableRow {
|
|
20
|
+
/** The row header: the slice's label. */
|
|
21
|
+
readonly header: string;
|
|
22
|
+
/** Its value and its share, as the chart writes them; `''` where it has none. */
|
|
23
|
+
readonly cells: readonly string[];
|
|
24
|
+
}
|
|
15
25
|
/**
|
|
16
26
|
* Test harness for `<wr-donut-chart>`.
|
|
17
27
|
*
|
|
@@ -20,7 +30,8 @@ interface WrDonutChartLegendEntry {
|
|
|
20
30
|
* `aria-label` and nothing else, and a spec cannot get a label or a value off a
|
|
21
31
|
* path's `d`. {@link getLegend} is where the numbers are — which is also the
|
|
22
32
|
* argument for keeping `showLegend` on, since with it off the only other text is
|
|
23
|
-
* whatever {@link getCenterValue} and {@link getCenterLabel} were given
|
|
33
|
+
* whatever {@link getCenterValue} and {@link getCenterLabel} were given, unless
|
|
34
|
+
* `dataTable` is on: {@link getTableRows} then reads every slice shown, with its share.
|
|
24
35
|
*
|
|
25
36
|
* The name is read off the `<svg>` rather than off the surface that wraps it, and
|
|
26
37
|
* the two are not interchangeable: `img` makes its whole subtree presentational, so
|
|
@@ -84,6 +95,23 @@ export declare class WrDonutChartHarness extends ComponentHarness {
|
|
|
84
95
|
getLegendHarness(): Promise<WrChartLegendHarness>;
|
|
85
96
|
/** The legend rows in order — the only textual form the data has. Hidden slices included. */
|
|
86
97
|
getLegend(): Promise<WrDonutChartLegendEntry[]>;
|
|
98
|
+
/** Whether the hidden data table is rendered (`dataTable`, while the chart draws its slices). */
|
|
99
|
+
hasDataTable(): Promise<boolean>;
|
|
100
|
+
/**
|
|
101
|
+
* The data table's column headings: the value's name and the share's.
|
|
102
|
+
*
|
|
103
|
+
* Throws when the chart renders no table (`dataTable` off, or a state in the slices'
|
|
104
|
+
* place) rather than answering with no columns.
|
|
105
|
+
*/
|
|
106
|
+
getTableColumns(): Promise<string[]>;
|
|
107
|
+
/**
|
|
108
|
+
* The data table's rows, one per slice shown, in the data's own order: its label, its
|
|
109
|
+
* value and its share of the ring, as a screen reader walks them. A slice hidden
|
|
110
|
+
* through `hiddenSegments` has no row, and one that draws nothing an empty share.
|
|
111
|
+
*
|
|
112
|
+
* Throws when the chart renders no table, for the reason {@link getTableColumns} gives.
|
|
113
|
+
*/
|
|
114
|
+
getTableRows(): Promise<WrDonutChartTableRow[]>;
|
|
87
115
|
/** The big number in the middle, or `null` when the chart has none — a pie never has. */
|
|
88
116
|
getCenterValue(): Promise<string | null>;
|
|
89
117
|
/** The caption under the centre value, or `null` — a pie never has one. */
|
|
@@ -100,5 +128,6 @@ export declare class WrDonutChartHarness extends ComponentHarness {
|
|
|
100
128
|
* refuses.
|
|
101
129
|
*/
|
|
102
130
|
getSize(): Promise<number>;
|
|
131
|
+
private assertDataTable;
|
|
103
132
|
}
|
|
104
|
-
export type { WrDonutChartHarnessFilters, WrDonutChartLegendEntry };
|
|
133
|
+
export type { WrDonutChartHarnessFilters, WrDonutChartLegendEntry, WrDonutChartTableRow };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { WrChartLegendItem, WrChartLegendPosition } from "ngwr/charts/chart-legend";
|
|
3
|
+
import { WrChartTableData } from "ngwr/charts/core";
|
|
3
4
|
/** One slice of a `<wr-donut-chart>`: a name, a value, and optionally its own colour. */
|
|
4
5
|
interface WrDonutSegment {
|
|
5
6
|
/** The slice's name, in the legend and the tooltip. */
|
|
@@ -39,6 +40,11 @@ interface WrDonutSegment {
|
|
|
39
40
|
* and says "No data"; `loading` and `error` put their own message there in place of the
|
|
40
41
|
* slices.
|
|
41
42
|
*
|
|
43
|
+
* **What a screen reader gets.** The drawing is one named `role="img"`, so the figures are
|
|
44
|
+
* in text only in the legend, which a single slice and `showLegend="false"` leave out.
|
|
45
|
+
* `dataTable` renders every slice shown with its value and its share as a table a reader
|
|
46
|
+
* can walk cell by cell.
|
|
47
|
+
*
|
|
42
48
|
* @see https://ngwr.dev/charts/donut-chart
|
|
43
49
|
*/
|
|
44
50
|
export declare class WrDonutChart {
|
|
@@ -49,9 +55,10 @@ export declare class WrDonutChart {
|
|
|
49
55
|
*/
|
|
50
56
|
readonly segments: import("@angular/core").InputSignal<readonly WrDonutSegment[]>;
|
|
51
57
|
/**
|
|
52
|
-
* Accessible name of the drawing
|
|
53
|
-
* with `showLegend: false` this and the centre text
|
|
54
|
-
*
|
|
58
|
+
* Accessible name of the drawing, and the caption of the data table. The arcs carry no
|
|
59
|
+
* text and the legend is optional, so with `showLegend: false` this and the centre text
|
|
60
|
+
* are the whole of what a screen reader gets unless `dataTable` renders the figures.
|
|
61
|
+
* Falls back to `donutChart.label`, or to `donutChart.pieLabel` with `pie`.
|
|
55
62
|
*/
|
|
56
63
|
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
57
64
|
private readonly donutLabel;
|
|
@@ -159,12 +166,34 @@ export declare class WrDonutChart {
|
|
|
159
166
|
*/
|
|
160
167
|
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean | "hoverable", unknown>;
|
|
161
168
|
/**
|
|
162
|
-
* Writes every value in the legend and the
|
|
163
|
-
* in `LOCALE_ID`. The centre text is printed as given.
|
|
169
|
+
* Writes every value in the legend, the tooltip and the data table. `null` uses
|
|
170
|
+
* `Intl.NumberFormat` in `LOCALE_ID`. The centre text is printed as given.
|
|
164
171
|
*/
|
|
165
172
|
readonly valueFormat: import("@angular/core").InputSignal<((value: number) => string) | null>;
|
|
166
|
-
/**
|
|
173
|
+
/**
|
|
174
|
+
* Render the chart's figures as a table that only assistive technology reaches: a row
|
|
175
|
+
* per slice shown, headed by its label, with its value as the legend writes it and its
|
|
176
|
+
* share of the ring, a percentage in `LOCALE_ID`. A slice hidden through
|
|
177
|
+
* `hiddenSegments` has no row, and a slice that draws nothing has an empty share. The
|
|
178
|
+
* table gives way with the slices while the chart is empty, `loading` or in `error`.
|
|
179
|
+
*
|
|
180
|
+
* The drawing is one named `role="img"`, which hides everything inside it, and the
|
|
181
|
+
* legend is left out for a single slice and with `showLegend` off, so without the table
|
|
182
|
+
* the numbers may be nowhere a screen reader can walk. It is rendered beside the
|
|
183
|
+
* drawing, clipped to nothing: it takes no room, draws nothing and holds no tab stop.
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
186
|
+
readonly dataTable: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
187
|
+
/** The headings of the data table's two columns. */
|
|
188
|
+
private readonly valueName;
|
|
189
|
+
private readonly shareName;
|
|
190
|
+
/** Each value as the legend, the tooltip and the data table print it: exact, in `LOCALE_ID` unless `valueFormat` is given. */
|
|
167
191
|
private readonly numbers;
|
|
192
|
+
private readonly locale;
|
|
193
|
+
/** Shares from one percent up, to one decimal. */
|
|
194
|
+
private readonly shares;
|
|
195
|
+
/** Shares below one percent, to two significant digits, so a sliver does not read `0%`. */
|
|
196
|
+
private readonly smallShares;
|
|
168
197
|
private readonly hidden;
|
|
169
198
|
private readonly svg;
|
|
170
199
|
private readonly outerR;
|
|
@@ -242,6 +271,11 @@ export declare class WrDonutChart {
|
|
|
242
271
|
private readonly empty;
|
|
243
272
|
/** What the chart shows in place of its slices, or `null` while it draws them. */
|
|
244
273
|
protected readonly state: import("@angular/core").Signal<import("ngwr/charts/core").WrChartStateView | null>;
|
|
274
|
+
/**
|
|
275
|
+
* The figures for `dataTable`: the chart's name as the caption, a row per slice shown,
|
|
276
|
+
* and its value and its share of the ring as the columns.
|
|
277
|
+
*/
|
|
278
|
+
protected readonly tableData: import("@angular/core").Signal<WrChartTableData>;
|
|
245
279
|
/**
|
|
246
280
|
* The whole ring, or the whole disc of a pie, as one path: the frame the chart keeps
|
|
247
281
|
* while it has no slice to draw - under a state, or with every slice hidden.
|
|
@@ -360,6 +394,11 @@ export declare class WrDonutChart {
|
|
|
360
394
|
"required": false;
|
|
361
395
|
"isSignal": true;
|
|
362
396
|
};
|
|
397
|
+
"dataTable": {
|
|
398
|
+
"alias": "dataTable";
|
|
399
|
+
"required": false;
|
|
400
|
+
"isSignal": true;
|
|
401
|
+
};
|
|
363
402
|
}, {
|
|
364
403
|
"hiddenSegments": "hiddenSegmentsChange";
|
|
365
404
|
}, never, never, true, never>;
|
|
@@ -14,6 +14,16 @@ interface WrMeterGroupSlice {
|
|
|
14
14
|
/** The share of the bar it takes, in percent. */
|
|
15
15
|
readonly percent: number;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* One row of the meter's data table (`dataTable`): the segment's label as its row header,
|
|
19
|
+
* then its value and its share of the total the bar is drawn against.
|
|
20
|
+
*/
|
|
21
|
+
interface WrMeterGroupTableRow {
|
|
22
|
+
/** The row header: the segment's label. */
|
|
23
|
+
readonly header: string;
|
|
24
|
+
/** Its value and its share, as the meter writes them; `''` where it has none. */
|
|
25
|
+
readonly cells: readonly string[];
|
|
26
|
+
}
|
|
17
27
|
/**
|
|
18
28
|
* Test harness for `<wr-meter-group>` — one bar divided into labelled bands.
|
|
19
29
|
*
|
|
@@ -70,5 +80,23 @@ export declare class WrMeterGroupHarness extends ComponentHarness {
|
|
|
70
80
|
getLegendLabels(): Promise<string[]>;
|
|
71
81
|
/** The legend's values, in order — empty when `showValues` is off. */
|
|
72
82
|
getLegendValues(): Promise<string[]>;
|
|
83
|
+
/** Whether the hidden data table is rendered (`dataTable`, while the meter draws its segments). */
|
|
84
|
+
hasDataTable(): Promise<boolean>;
|
|
85
|
+
/**
|
|
86
|
+
* The data table's column headings: the value's name and the share's.
|
|
87
|
+
*
|
|
88
|
+
* Throws when the meter renders no table (`dataTable` off, or a state in the legend's
|
|
89
|
+
* place) rather than answering with no columns.
|
|
90
|
+
*/
|
|
91
|
+
getTableColumns(): Promise<string[]>;
|
|
92
|
+
/**
|
|
93
|
+
* The data table's rows, one per segment shown, in the data's own order: its label, its
|
|
94
|
+
* value and its share of the total, as a screen reader walks them. A segment hidden
|
|
95
|
+
* through `hiddenSegments` has no row, and one that draws nothing an empty share.
|
|
96
|
+
*
|
|
97
|
+
* Throws when the meter renders no table, for the reason {@link getTableColumns} gives.
|
|
98
|
+
*/
|
|
99
|
+
getTableRows(): Promise<WrMeterGroupTableRow[]>;
|
|
100
|
+
private assertDataTable;
|
|
73
101
|
}
|
|
74
|
-
export type { WrMeterGroupHarnessFilters, WrMeterGroupSlice };
|
|
102
|
+
export type { WrMeterGroupHarnessFilters, WrMeterGroupSlice, WrMeterGroupTableRow };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { WrChartLegendItem, WrChartLegendPosition } from "ngwr/charts/chart-legend";
|
|
3
|
+
import { WrChartTableData } from "ngwr/charts/core";
|
|
3
4
|
/**
|
|
4
5
|
* @license
|
|
5
6
|
*
|
|
@@ -42,11 +43,16 @@ interface WrMeterSegment {
|
|
|
42
43
|
* bar is an empty track with "No data" under it; `loading` and `error` put their own
|
|
43
44
|
* message there.
|
|
44
45
|
*
|
|
46
|
+
* **What a screen reader gets.** The bar is a `role="progressbar"` that announces the
|
|
47
|
+
* total, so each segment's figure is in text only in the legend, which `showLegend` and
|
|
48
|
+
* `showValues` can leave out. `dataTable` renders every segment shown with its value and
|
|
49
|
+
* its share of the total as a table a reader can walk cell by cell.
|
|
50
|
+
*
|
|
45
51
|
* @see https://ngwr.dev/charts/meter-group
|
|
46
52
|
*/
|
|
47
53
|
export declare class WrMeterGroup {
|
|
48
54
|
constructor();
|
|
49
|
-
/** Accessible name — the role needs one. Falls back to `meterGroup.label`. */
|
|
55
|
+
/** Accessible name — the role needs one. Also the caption of the data table. Falls back to `meterGroup.label`. */
|
|
50
56
|
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
51
57
|
protected readonly resolvedAriaLabel: import("@angular/core").Signal<string>;
|
|
52
58
|
/**
|
|
@@ -122,13 +128,36 @@ export declare class WrMeterGroup {
|
|
|
122
128
|
*/
|
|
123
129
|
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean | "hoverable", unknown>;
|
|
124
130
|
/**
|
|
125
|
-
* Writes every value in the legend and the
|
|
126
|
-
* as `aria-valuetext`. `null` uses `Intl.NumberFormat` in `LOCALE_ID`.
|
|
131
|
+
* Writes every value in the legend, the tooltip and the data table, and the total the
|
|
132
|
+
* bar announces as `aria-valuetext`. `null` uses `Intl.NumberFormat` in `LOCALE_ID`.
|
|
127
133
|
* `aria-valuenow` stays a number.
|
|
128
134
|
*/
|
|
129
135
|
readonly valueFormat: import("@angular/core").InputSignal<((value: number) => string) | null>;
|
|
130
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Render the meter's figures as a table that only assistive technology reaches: a row
|
|
138
|
+
* per segment shown, headed by its label, with its value as the legend writes it and
|
|
139
|
+
* its share of the total the bar is drawn against, a percentage in `LOCALE_ID`: of
|
|
140
|
+
* `max` when one is set, else of the sum of the segments shown. A segment hidden
|
|
141
|
+
* through `hiddenSegments` has no row, and one that draws nothing has an empty share.
|
|
142
|
+
* The values are listed whatever `showValues` says. The table gives way with the legend
|
|
143
|
+
* while the meter is empty, `loading` or in `error`.
|
|
144
|
+
*
|
|
145
|
+
* The bar announces the total alone, and the legend is optional, so without the table
|
|
146
|
+
* the segments' figures may be nowhere a screen reader can walk. It is rendered beside
|
|
147
|
+
* the bar, clipped to nothing: it takes no room, draws nothing and holds no tab stop.
|
|
148
|
+
* @default false
|
|
149
|
+
*/
|
|
150
|
+
readonly dataTable: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
151
|
+
/** The headings of the data table's two columns. */
|
|
152
|
+
private readonly valueName;
|
|
153
|
+
private readonly shareName;
|
|
154
|
+
/** Each value as the legend, the tooltip, the data table and the bar print it: never compact, in `LOCALE_ID` unless `valueFormat` is given. */
|
|
131
155
|
private readonly numbers;
|
|
156
|
+
private readonly locale;
|
|
157
|
+
/** Shares from one percent up, to one decimal. */
|
|
158
|
+
private readonly shares;
|
|
159
|
+
/** Shares below one percent, to two significant digits, so a sliver does not read `0%`. */
|
|
160
|
+
private readonly smallShares;
|
|
132
161
|
private readonly barEl;
|
|
133
162
|
private readonly sliceEls;
|
|
134
163
|
/**
|
|
@@ -191,6 +220,11 @@ export declare class WrMeterGroup {
|
|
|
191
220
|
}[]>;
|
|
192
221
|
/** The legend's rows: every segment, hidden ones included, with its value unless `showValues` is off. */
|
|
193
222
|
protected readonly legendItems: import("@angular/core").Signal<readonly WrChartLegendItem[]>;
|
|
223
|
+
/**
|
|
224
|
+
* The figures for `dataTable`: the meter's name as the caption, a row per segment shown,
|
|
225
|
+
* and its value and its share of the total as the columns.
|
|
226
|
+
*/
|
|
227
|
+
protected readonly tableData: import("@angular/core").Signal<WrChartTableData>;
|
|
194
228
|
/**
|
|
195
229
|
* One tooltip for the whole bar, pointing at the hovered band, with the value as
|
|
196
230
|
* the legend prints it. Asked by the segment's own position, and the drawn bands are
|
|
@@ -285,6 +319,11 @@ export declare class WrMeterGroup {
|
|
|
285
319
|
"required": false;
|
|
286
320
|
"isSignal": true;
|
|
287
321
|
};
|
|
322
|
+
"dataTable": {
|
|
323
|
+
"alias": "dataTable";
|
|
324
|
+
"required": false;
|
|
325
|
+
"isSignal": true;
|
|
326
|
+
};
|
|
288
327
|
}, {
|
|
289
328
|
"hiddenSegments": "hiddenSegmentsChange";
|
|
290
329
|
}, never, never, true, never>;
|
|
@@ -4,6 +4,16 @@ interface WrSparklineHarnessFilters extends BaseHarnessFilters {
|
|
|
4
4
|
/** Match the sparkline's accessible name — `null` for the decorative ones. */
|
|
5
5
|
readonly ariaLabel?: string | RegExp;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* One row of the sparkline's data table (`dataTable`): the point's position in the series
|
|
9
|
+
* as its row header, then its value.
|
|
10
|
+
*/
|
|
11
|
+
interface WrSparklineTableRow {
|
|
12
|
+
/** The row header: the point's position, counted from one. */
|
|
13
|
+
readonly header: string;
|
|
14
|
+
/** Its value, as the tooltip writes it. */
|
|
15
|
+
readonly cells: readonly string[];
|
|
16
|
+
}
|
|
7
17
|
/**
|
|
8
18
|
* Test harness for `<wr-sparkline>`.
|
|
9
19
|
*
|
|
@@ -18,7 +28,9 @@ interface WrSparklineHarnessFilters extends BaseHarnessFilters {
|
|
|
18
28
|
* assert: it is a rendering detail that changes with the viewBox, the stroke width
|
|
19
29
|
* and the smoothing. What IS worth asserting is whether the parts are there —
|
|
20
30
|
* {@link hasLine}, {@link hasArea}, {@link hasTip} — since each is an input the
|
|
21
|
-
* consumer set, and an empty dataset draws none of them.
|
|
31
|
+
* consumer set, and an empty dataset draws none of them. The values themselves are in
|
|
32
|
+
* text only in the data table: {@link getTableRows}, for a named sparkline with
|
|
33
|
+
* `dataTable` on.
|
|
22
34
|
*
|
|
23
35
|
* @see https://ngwr.dev/guides/testing
|
|
24
36
|
*/
|
|
@@ -50,5 +62,23 @@ export declare class WrSparklineHarness extends ComponentHarness {
|
|
|
50
62
|
hasTip(): Promise<boolean>;
|
|
51
63
|
/** The stroke colour as the component passed it through — a CSS value, not a resolved one. */
|
|
52
64
|
getColor(): Promise<string | null>;
|
|
65
|
+
/** Whether the hidden data table is rendered (`dataTable`, on a sparkline with an `ariaLabel`). */
|
|
66
|
+
hasDataTable(): Promise<boolean>;
|
|
67
|
+
/**
|
|
68
|
+
* The data table's column headings: the value's name.
|
|
69
|
+
*
|
|
70
|
+
* Throws when the sparkline renders no table (`dataTable` off, or no `ariaLabel`)
|
|
71
|
+
* rather than answering with no columns.
|
|
72
|
+
*/
|
|
73
|
+
getTableColumns(): Promise<string[]>;
|
|
74
|
+
/**
|
|
75
|
+
* The data table's rows, one per point drawn, in order: its position, counted from one,
|
|
76
|
+
* and its value, as a screen reader walks them.
|
|
77
|
+
*
|
|
78
|
+
* Throws when the sparkline renders no table, for the reason {@link getTableColumns}
|
|
79
|
+
* gives.
|
|
80
|
+
*/
|
|
81
|
+
getTableRows(): Promise<WrSparklineTableRow[]>;
|
|
82
|
+
private assertDataTable;
|
|
53
83
|
}
|
|
54
|
-
export type { WrSparklineHarnessFilters };
|
|
84
|
+
export type { WrSparklineHarnessFilters, WrSparklineTableRow };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
import { WrChartTableData } from "ngwr/charts/core";
|
|
2
3
|
/**
|
|
3
4
|
* Tiny inline trend line. SVG path drawn from `[data]: number[]` — no
|
|
4
5
|
* axes, no labels, just the shape. Optional area fill + tip dot.
|
|
@@ -14,6 +15,10 @@ import * as i0 from "@angular/core";
|
|
|
14
15
|
* <wr-sparkline [data]="prices" [showArea]="true" color="var(--wr-color-success)" />
|
|
15
16
|
* ```
|
|
16
17
|
*
|
|
18
|
+
* **What a screen reader gets.** Nothing by default: the drawing is `aria-hidden` until
|
|
19
|
+
* `ariaLabel` names it, and then it is one `role="img"` with that name and no figure.
|
|
20
|
+
* `dataTable` renders the values of a named sparkline as a table a reader can walk.
|
|
21
|
+
*
|
|
17
22
|
* @see https://ngwr.dev/charts/sparkline
|
|
18
23
|
*/
|
|
19
24
|
export declare class WrSparkline {
|
|
@@ -26,7 +31,8 @@ export declare class WrSparkline {
|
|
|
26
31
|
/**
|
|
27
32
|
* Accessible name. A sparkline usually sits beside the number it summarises, where
|
|
28
33
|
* announcing it again is noise — so it is `aria-hidden` by default and becomes a
|
|
29
|
-
* named `role="img"` only when a consumer says what it shows.
|
|
34
|
+
* named `role="img"` only when a consumer says what it shows. It is also the caption of
|
|
35
|
+
* the data table, which an unnamed sparkline does not render.
|
|
30
36
|
*/
|
|
31
37
|
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
32
38
|
/**
|
|
@@ -58,11 +64,33 @@ export declare class WrSparkline {
|
|
|
58
64
|
*/
|
|
59
65
|
readonly tooltip: import("@angular/core").InputSignalWithTransform<boolean | "hoverable", unknown>;
|
|
60
66
|
/**
|
|
61
|
-
* Writes the value in the tooltip. `null` uses `Intl.NumberFormat`
|
|
67
|
+
* Writes the value in the tooltip and in the data table. `null` uses `Intl.NumberFormat`
|
|
68
|
+
* in `LOCALE_ID`.
|
|
62
69
|
*/
|
|
63
70
|
readonly valueFormat: import("@angular/core").InputSignal<((value: number) => string) | null>;
|
|
64
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Render the sparkline's values as a table that only assistive technology reaches: a
|
|
73
|
+
* row per point drawn, headed by its position in the series, counted from one, with its
|
|
74
|
+
* value as the tooltip writes it. A value that is not a number is not drawn and has no
|
|
75
|
+
* row.
|
|
76
|
+
*
|
|
77
|
+
* Only with `ariaLabel`, which is the table's caption: a sparkline with no name is
|
|
78
|
+
* decoration, hidden from a screen reader as a whole, and renders no table. The drawing
|
|
79
|
+
* is one named `role="img"`, which carries the name and no figure, so without the table
|
|
80
|
+
* the values are nowhere a screen reader can walk. It is rendered beside the drawing,
|
|
81
|
+
* clipped to nothing: it takes no room, draws nothing and holds no tab stop.
|
|
82
|
+
*
|
|
83
|
+
* The table is a real `<table>` inside the host, so under SSR keep a sparkline that
|
|
84
|
+
* renders one out of a `<p>`: the HTML parser ends a paragraph at a table, and hydration
|
|
85
|
+
* then meets a tree the server did not render. @default false
|
|
86
|
+
*/
|
|
87
|
+
readonly dataTable: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
88
|
+
/** The heading of the data table's one column. */
|
|
89
|
+
private readonly valueName;
|
|
90
|
+
/** The value as the tooltip and the data table write it — in full, never compact, to `Intl`'s default precision. */
|
|
65
91
|
private readonly numbers;
|
|
92
|
+
/** A point's position in the series, in `LOCALE_ID`'s digits. */
|
|
93
|
+
private readonly positions;
|
|
66
94
|
private readonly host;
|
|
67
95
|
private readonly svg;
|
|
68
96
|
private readonly marker;
|
|
@@ -77,6 +105,12 @@ export declare class WrSparkline {
|
|
|
77
105
|
* the one under the point it marks.
|
|
78
106
|
*/
|
|
79
107
|
private readonly values;
|
|
108
|
+
/**
|
|
109
|
+
* The figures for `dataTable`, or `null` while there is no table to render: `dataTable`
|
|
110
|
+
* is off, or the sparkline has no name to caption it with. A row per point drawn, headed
|
|
111
|
+
* by its position, and its value as the one column.
|
|
112
|
+
*/
|
|
113
|
+
protected readonly tableData: import("@angular/core").Signal<WrChartTableData | null>;
|
|
80
114
|
/** Mapped `{ x, y }` points for the path. */
|
|
81
115
|
protected readonly points: import("@angular/core").Signal<readonly {
|
|
82
116
|
x: number;
|
|
@@ -189,5 +223,10 @@ export declare class WrSparkline {
|
|
|
189
223
|
"required": false;
|
|
190
224
|
"isSignal": true;
|
|
191
225
|
};
|
|
226
|
+
"dataTable": {
|
|
227
|
+
"alias": "dataTable";
|
|
228
|
+
"required": false;
|
|
229
|
+
"isSignal": true;
|
|
230
|
+
};
|
|
192
231
|
}, {}, never, never, true, never>;
|
|
193
232
|
}
|
package/types/ngwr-checkbox.d.ts
CHANGED
|
@@ -125,6 +125,13 @@ export declare class WrCheckbox implements FormCheckboxControl {
|
|
|
125
125
|
readonly indeterminate: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
126
126
|
private readonly group;
|
|
127
127
|
private readonly native;
|
|
128
|
+
private readonly textEl;
|
|
129
|
+
private readonly destroyRef;
|
|
130
|
+
/**
|
|
131
|
+
* Whether the projected content names the box. Assumed `true` until the first
|
|
132
|
+
* render has looked, so the server renders the own-label path.
|
|
133
|
+
*/
|
|
134
|
+
private readonly hasText;
|
|
128
135
|
/** Rendered "is checked" — reads the group when grouped, else the `checked` model. */
|
|
129
136
|
protected readonly isChecked: import("@angular/core").Signal<boolean>;
|
|
130
137
|
/** Effective disabled — the `disabled` input wins, then the group. */
|
|
@@ -141,6 +148,13 @@ export declare class WrCheckbox implements FormCheckboxControl {
|
|
|
141
148
|
protected readonly ariaInvalid: import("@angular/core").Signal<"true" | null>;
|
|
142
149
|
protected readonly describedBy: import("@angular/core").Signal<string | null>;
|
|
143
150
|
protected readonly ariaRequired: import("@angular/core").Signal<"true" | null>;
|
|
151
|
+
/**
|
|
152
|
+
* The input's `aria-labelledby`. The consumer's wins; otherwise a box with no
|
|
153
|
+
* text of its own and no `ariaLabel` is named by the surrounding field's
|
|
154
|
+
* label. A box WITH text keeps that text as its name, never joined to the
|
|
155
|
+
* field's label, and a grouped box leaves the naming to the group.
|
|
156
|
+
*/
|
|
157
|
+
protected readonly labelledBy: import("@angular/core").Signal<string | null>;
|
|
144
158
|
protected readonly classes: import("@angular/core").Signal<string>;
|
|
145
159
|
/**
|
|
146
160
|
* Focus the checkbox — what Signal Forms calls to focus this control. The
|
|
@@ -284,7 +284,7 @@ export declare class WrColorPickerTriggerHarness extends ComponentHarness {
|
|
|
284
284
|
* the top-most overlay — so this does not depend on where focus happens to be.
|
|
285
285
|
*/
|
|
286
286
|
sendEscape(): Promise<void>;
|
|
287
|
-
/** The
|
|
287
|
+
/** The `aria-haspopup` the trigger carries: `null`, since the pane is not a named dialog. */
|
|
288
288
|
getHasPopup(): Promise<string | null>;
|
|
289
289
|
}
|
|
290
290
|
export type { WrColorPickerHarnessFilters, WrColorPickerTab, WrColorPickerThumbs, WrColorPickerTriggerHarnessFilters };
|
|
@@ -121,6 +121,7 @@ export declare class WrCommandPalette {
|
|
|
121
121
|
protected readonly activeIndex: import("@angular/core").WritableSignal<number>;
|
|
122
122
|
protected readonly inputEl: import("@angular/core").Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
123
123
|
protected readonly panelEl: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
124
|
+
private readonly rootEl;
|
|
124
125
|
/** Listbox id (referenced by the input's `aria-controls`). */
|
|
125
126
|
protected readonly listboxId: string;
|
|
126
127
|
/** @internal Build a stable option id for a given flat index. */
|
|
@@ -139,7 +140,7 @@ export declare class WrCommandPalette {
|
|
|
139
140
|
private readonly destroyRef;
|
|
140
141
|
private readonly focusTrapFactory;
|
|
141
142
|
private readonly isBrowser;
|
|
142
|
-
private readonly
|
|
143
|
+
private readonly scrollBlockService;
|
|
143
144
|
private readonly overlayContainer;
|
|
144
145
|
private bindingHandle;
|
|
145
146
|
private focusTrap;
|
package/types/ngwr-dialog.d.ts
CHANGED
|
@@ -288,7 +288,7 @@ type WrDialogDefaults = Pick<WrDialogOptions, 'tabTitle' | 'autoFocus' | 'size'>
|
|
|
288
288
|
*/
|
|
289
289
|
export declare class WrDialog {
|
|
290
290
|
private readonly overlay;
|
|
291
|
-
private readonly
|
|
291
|
+
private readonly scrollBlock;
|
|
292
292
|
private readonly parentInjector;
|
|
293
293
|
private readonly focusTrapFactory;
|
|
294
294
|
private readonly isBrowser;
|
|
@@ -468,8 +468,8 @@ export declare const WR_DIALOG_REF: InjectionToken<WrDialogRef<unknown, unknown>
|
|
|
468
468
|
export declare function withDialog(defaults: WrDialogDefaults): WrFeature<'dialog'>;
|
|
469
469
|
/**
|
|
470
470
|
* Styles a dialog title row. Use on a heading inside an opened dialog.
|
|
471
|
-
*
|
|
472
|
-
* `aria-labelledby`.
|
|
471
|
+
* Keeps an `id` of your own and otherwise assigns one, so the dialog panel
|
|
472
|
+
* can reference it via `aria-labelledby`.
|
|
473
473
|
*
|
|
474
474
|
* @example
|
|
475
475
|
* ```html
|
|
@@ -478,10 +478,15 @@ export declare function withDialog(defaults: WrDialogDefaults): WrFeature<'dialo
|
|
|
478
478
|
*/
|
|
479
479
|
export declare class WrDialogTitle {
|
|
480
480
|
constructor();
|
|
481
|
-
/** Generated id used for `aria-labelledby` wiring. */
|
|
482
|
-
readonly id: string;
|
|
483
481
|
/** @internal */
|
|
484
|
-
readonly elementRef: ElementRef<
|
|
482
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
|
483
|
+
private readonly fallbackId;
|
|
484
|
+
/**
|
|
485
|
+
* The id the dialog's `aria-labelledby` points at: the element's own `id` when
|
|
486
|
+
* the consumer set one, a generated one otherwise. A getter, read fresh by the
|
|
487
|
+
* host binding, so a bound `[id]` is honoured too.
|
|
488
|
+
*/
|
|
489
|
+
get id(): string;
|
|
485
490
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrDialogTitle, never>;
|
|
486
491
|
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDialogTitle, "[wrDialogTitle]", ["wrDialogTitle"], {}, {}, never, never, true, never>;
|
|
487
492
|
}
|
package/types/ngwr-drawer.d.ts
CHANGED
|
@@ -211,6 +211,7 @@ export declare class WrDrawer {
|
|
|
211
211
|
private readonly focusMonitor;
|
|
212
212
|
private readonly overlay;
|
|
213
213
|
private readonly order;
|
|
214
|
+
private readonly scrollBlock;
|
|
214
215
|
private readonly vcr;
|
|
215
216
|
private readonly destroyRef;
|
|
216
217
|
private readonly injector;
|
|
@@ -442,6 +443,7 @@ export declare class WrDrawerRef<C, R = unknown> {
|
|
|
442
443
|
export declare class WrDrawerManager {
|
|
443
444
|
private readonly overlay;
|
|
444
445
|
private readonly scrollStrategies;
|
|
446
|
+
private readonly scrollBlock;
|
|
445
447
|
private readonly parentInjector;
|
|
446
448
|
private readonly focusTrapFactory;
|
|
447
449
|
private readonly plainFocusTrapFactory;
|
|
@@ -538,8 +540,8 @@ export declare const WR_DRAWER_REF: InjectionToken<WrDrawerRef<unknown, unknown>
|
|
|
538
540
|
/**
|
|
539
541
|
* Marks an element as the drawer's title row. Applies the `wr-drawer__title`
|
|
540
542
|
* class so the drawer's stylesheet can lay it out alongside content and
|
|
541
|
-
* footer slots.
|
|
542
|
-
* `aria-labelledby`.
|
|
543
|
+
* footer slots. Keeps an `id` of your own and otherwise assigns one, so the drawer panel
|
|
544
|
+
* references it via `aria-labelledby`.
|
|
543
545
|
*
|
|
544
546
|
* @example
|
|
545
547
|
* ```html
|
|
@@ -551,8 +553,14 @@ export declare const WR_DRAWER_REF: InjectionToken<WrDrawerRef<unknown, unknown>
|
|
|
551
553
|
*/
|
|
552
554
|
export declare class WrDrawerTitle {
|
|
553
555
|
constructor();
|
|
554
|
-
|
|
555
|
-
readonly
|
|
556
|
+
private readonly host;
|
|
557
|
+
private readonly fallbackId;
|
|
558
|
+
/**
|
|
559
|
+
* The id the drawer panel's `aria-labelledby` points at: the element's own
|
|
560
|
+
* `id` when the consumer set one, a generated one otherwise. A getter, read
|
|
561
|
+
* fresh by the host binding, so a bound `[id]` is honoured too.
|
|
562
|
+
*/
|
|
563
|
+
get id(): string;
|
|
556
564
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrDrawerTitle, never>;
|
|
557
565
|
static ɵdir: i0.ɵɵDirectiveDeclaration<WrDrawerTitle, "[wrDrawerTitle]", ["wrDrawerTitle"], {}, {}, never, never, true, never>;
|
|
558
566
|
}
|
|
@@ -236,7 +236,7 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
236
236
|
readonly storedRemove: import("@angular/core").OutputEmitterRef<WrStoredFile>;
|
|
237
237
|
/** Emitted with the file when the retry button of a failed row is pressed. */
|
|
238
238
|
readonly retry: import("@angular/core").OutputEmitterRef<File>;
|
|
239
|
-
/** Emitted on commit so a bound field can mark itself touched. */
|
|
239
|
+
/** Emitted on commit and when focus leaves the drop zone, so a bound field can mark itself touched. */
|
|
240
240
|
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
241
241
|
protected readonly picker: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
|
|
242
242
|
private readonly zone;
|
|
@@ -234,7 +234,8 @@ export declare class WrInputNumber<M extends WrInputNumberMode = 'number'> imple
|
|
|
234
234
|
* The locale's digits to ASCII, its minus sign (U+2212 in sv, fi, …) to a
|
|
235
235
|
* hyphen, and the bidi marks it puts around a negative number dropped — every
|
|
236
236
|
* one of them is in the text this field formats, and neither `Number()` nor
|
|
237
|
-
* `wrDecimal` reads them.
|
|
237
|
+
* `wrDecimal` reads them. Fullwidth digits, signs and separators an IME writes
|
|
238
|
+
* come out as their ASCII forms.
|
|
238
239
|
*/
|
|
239
240
|
private toAscii;
|
|
240
241
|
/**
|
|
@@ -244,8 +245,19 @@ export declare class WrInputNumber<M extends WrInputNumberMode = 'number'> imple
|
|
|
244
245
|
* as grouping has to come in threes, so `1.2.3` is unreadable rather than 123.
|
|
245
246
|
*/
|
|
246
247
|
private parseDecimal;
|
|
247
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Parse a locale-formatted string. Returns `null` for partial, unreadable or
|
|
250
|
+
* non-decimal text (`0x1F`, `1e3`, `Infinity`). The locale's group character
|
|
251
|
+
* is read only between groups of three digits, so `3.5` in de is refused
|
|
252
|
+
* rather than committed as 35.
|
|
253
|
+
*/
|
|
248
254
|
private parse;
|
|
255
|
+
/**
|
|
256
|
+
* Whether `groups`, the integer part split at the group character, is what
|
|
257
|
+
* the locale itself would print for those digits: threes in en-US, `1,23,456`
|
|
258
|
+
* in en-IN.
|
|
259
|
+
*/
|
|
260
|
+
private groupedLikeLocale;
|
|
249
261
|
/** Format a value using `Intl.NumberFormat` for the active locale. */
|
|
250
262
|
private format;
|
|
251
263
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrInputNumber<any>, never>;
|
|
@@ -136,6 +136,8 @@ export declare class WrInputOtp implements FormValueControl<string> {
|
|
|
136
136
|
private commitCell;
|
|
137
137
|
protected onKeyDown(event: KeyboardEvent, index: number): void;
|
|
138
138
|
protected onPaste(event: ClipboardEvent): void;
|
|
139
|
+
/** Spread `text` over the boxes from the first, and return the characters kept, or `null` when none fit the mode. */
|
|
140
|
+
private spread;
|
|
139
141
|
/**
|
|
140
142
|
* A click selects the box's character, the way Tab into it already does, so the
|
|
141
143
|
* next keystroke replaces it. Left with the caret beside it, `maxlength="1"` made
|
package/types/ngwr-lightbox.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ export declare class WrLightbox {
|
|
|
101
101
|
private readonly isBrowser;
|
|
102
102
|
private readonly focusMonitor;
|
|
103
103
|
private readonly overlay;
|
|
104
|
+
private readonly scrollBlock;
|
|
104
105
|
private readonly vcr;
|
|
105
106
|
private readonly destroyRef;
|
|
106
107
|
private readonly injector;
|