ngwr 16.3.0 → 16.5.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/carousel/styles/_index.scss +53 -1
- package/charts/bar-chart/styles/_index.scss +494 -305
- package/charts/boxplot-chart/styles/_index.scss +114 -48
- package/charts/bullet-chart/styles/_index.scss +113 -42
- package/charts/calendar-heatmap/styles/_index.scss +111 -20
- package/charts/candlestick-chart/styles/_index.scss +61 -26
- package/charts/chart-legend/styles/_index.scss +119 -1
- package/charts/core/styles/_index.scss +201 -5
- package/charts/donut-chart/styles/_index.scss +76 -21
- package/charts/funnel-chart/styles/_index.scss +66 -38
- package/charts/gauge/styles/_index.scss +12 -1
- package/charts/heatmap-chart/styles/_index.scss +90 -53
- package/charts/line-chart/styles/_index.scss +143 -139
- package/charts/meter-group/styles/_index.scss +87 -25
- package/charts/radar-chart/styles/_index.scss +82 -40
- package/charts/scatter-chart/styles/_index.scss +117 -44
- package/charts/sparkline/styles/_index.scss +7 -1
- package/charts/treemap-chart/styles/_index.scss +94 -42
- package/charts/waterfall-chart/styles/_index.scss +150 -87
- package/color-picker/styles/_index.scss +7 -3
- package/copy-value/styles/_index.scss +21 -2
- package/date-stamp/styles/_index.scss +2 -1
- package/dialog/styles/_index.scss +6 -0
- package/drawer/styles/_index.scss +5 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-carousel-testing.mjs +27 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +86 -4
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +56 -25
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs +16 -14
- package/fesm2022/ngwr-charts-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +399 -141
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs +19 -5
- package/fesm2022/ngwr-charts-boxplot-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +250 -56
- package/fesm2022/ngwr-charts-boxplot-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bullet-chart.mjs +118 -18
- package/fesm2022/ngwr-charts-bullet-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +266 -46
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs +21 -10
- package/fesm2022/ngwr-charts-candlestick-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +319 -72
- package/fesm2022/ngwr-charts-candlestick-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-chart-legend.mjs +211 -9
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +299 -18
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +206 -27
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-funnel-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +113 -10
- package/fesm2022/ngwr-charts-funnel-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-gauge.mjs +98 -12
- package/fesm2022/ngwr-charts-gauge.mjs.map +1 -1
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +226 -31
- package/fesm2022/ngwr-charts-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +16 -4
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +407 -172
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group-testing.mjs +4 -4
- package/fesm2022/ngwr-charts-meter-group-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +223 -31
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs +2 -1
- package/fesm2022/ngwr-charts-radar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +255 -66
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs +39 -18
- package/fesm2022/ngwr-charts-scatter-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +431 -53
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +19 -8
- package/fesm2022/ngwr-charts-sparkline.mjs.map +1 -1
- package/fesm2022/ngwr-charts-treemap-chart.mjs +253 -44
- package/fesm2022/ngwr-charts-treemap-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs +15 -7
- package/fesm2022/ngwr-charts-waterfall-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +151 -23
- package/fesm2022/ngwr-charts-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +44 -4
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +60 -17
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value-testing.mjs +5 -1
- package/fesm2022/ngwr-copy-value-testing.mjs.map +1 -1
- package/fesm2022/ngwr-copy-value.mjs +38 -2
- package/fesm2022/ngwr-copy-value.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +56 -8
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +13 -5
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +19 -3
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +49 -6
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +1 -0
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +7 -3
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +27 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +643 -14
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ar.mjs +13 -4
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +13 -4
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +13 -4
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +13 -4
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +13 -4
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +13 -4
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +13 -4
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +13 -4
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +13 -4
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +13 -4
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +13 -4
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +13 -4
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +13 -4
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +13 -4
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +13 -4
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +13 -4
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +13 -4
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +13 -4
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +13 -4
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +13 -4
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +13 -4
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +13 -4
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +22 -5
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +21 -2
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +1 -0
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs +4 -1
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +41 -5
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +67 -12
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-schema-form.mjs +3 -0
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +100 -3
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +2 -2
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-table-testing.mjs +71 -3
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +173 -11
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tour-testing.mjs +13 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +25 -16
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +52 -8
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +64 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +16 -9
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/graph/styles/_index.scss +87 -0
- package/i18n/ar.json +13 -4
- package/i18n/cs.json +13 -4
- package/i18n/de.json +13 -4
- package/i18n/en.json +13 -4
- package/i18n/es.json +13 -4
- package/i18n/fr.json +13 -4
- package/i18n/he.json +13 -4
- package/i18n/hi.json +13 -4
- package/i18n/id.json +13 -4
- package/i18n/it.json +13 -4
- package/i18n/ja.json +13 -4
- package/i18n/ko.json +13 -4
- package/i18n/nl.json +13 -4
- package/i18n/pl.json +13 -4
- package/i18n/pt.json +13 -4
- package/i18n/ru.json +13 -4
- package/i18n/sv.json +13 -4
- package/i18n/tr.json +13 -4
- package/i18n/uk.json +13 -4
- package/i18n/vi.json +13 -4
- package/i18n/zh-TW.json +13 -4
- package/i18n/zh.json +13 -4
- package/llms-full.txt +12 -12
- package/llms.txt +64 -27
- package/package.json +1 -1
- package/popconfirm/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +24 -13
- package/schematics/collection.json +5 -0
- package/schematics/eject/index.js +158 -0
- package/schematics/eject/schema.js +8 -0
- package/schematics/eject/schema.json +24 -0
- package/schematics/eject/source.js +295 -0
- package/schematics/use/symbol-map.json +2 -0
- package/select/styles/_index.scss +13 -0
- package/skills/ngwr/SKILL.md +30 -3
- package/skills/ngwr/references/catalog.md +2 -2
- package/table/styles/_index.scss +24 -0
- package/theme/styles/_focus.scss +11 -1
- package/tour/styles/_index.scss +6 -0
- package/types/ngwr-carousel-testing.d.ts +29 -6
- package/types/ngwr-carousel.d.ts +52 -5
- package/types/ngwr-cascader-testing.d.ts +4 -3
- package/types/ngwr-cascader.d.ts +29 -7
- package/types/ngwr-charts-bar-chart-testing.d.ts +15 -13
- package/types/ngwr-charts-bar-chart.d.ts +220 -48
- package/types/ngwr-charts-boxplot-chart-testing.d.ts +9 -2
- package/types/ngwr-charts-boxplot-chart.d.ts +110 -19
- package/types/ngwr-charts-bullet-chart.d.ts +72 -12
- package/types/ngwr-charts-calendar-heatmap.d.ts +119 -15
- package/types/ngwr-charts-candlestick-chart-testing.d.ts +19 -9
- package/types/ngwr-charts-candlestick-chart.d.ts +195 -62
- package/types/ngwr-charts-chart-legend.d.ts +142 -5
- package/types/ngwr-charts-core.d.ts +259 -21
- package/types/ngwr-charts-donut-chart-testing.d.ts +11 -5
- package/types/ngwr-charts-donut-chart.d.ts +124 -16
- package/types/ngwr-charts-funnel-chart.d.ts +62 -6
- package/types/ngwr-charts-gauge-testing.d.ts +5 -1
- package/types/ngwr-charts-gauge.d.ts +72 -10
- package/types/ngwr-charts-heatmap-chart.d.ts +103 -20
- package/types/ngwr-charts-line-chart-testing.d.ts +16 -2
- package/types/ngwr-charts-line-chart.d.ts +215 -86
- package/types/ngwr-charts-meter-group.d.ts +96 -7
- package/types/ngwr-charts-radar-chart-testing.d.ts +14 -3
- package/types/ngwr-charts-radar-chart.d.ts +148 -28
- package/types/ngwr-charts-scatter-chart-testing.d.ts +22 -10
- package/types/ngwr-charts-scatter-chart.d.ts +188 -18
- package/types/ngwr-charts-sparkline.d.ts +26 -4
- package/types/ngwr-charts-treemap-chart.d.ts +121 -23
- package/types/ngwr-charts-waterfall-chart-testing.d.ts +8 -1
- package/types/ngwr-charts-waterfall-chart.d.ts +108 -21
- package/types/ngwr-color-picker.d.ts +27 -0
- package/types/ngwr-context-menu-testing.d.ts +10 -9
- package/types/ngwr-context-menu.d.ts +19 -0
- package/types/ngwr-copy-value.d.ts +8 -0
- package/types/ngwr-date-picker.d.ts +34 -2
- package/types/ngwr-dialog.d.ts +30 -10
- package/types/ngwr-drawer.d.ts +32 -1
- package/types/ngwr-dropdown-testing.d.ts +8 -5
- package/types/ngwr-dropdown.d.ts +31 -6
- package/types/ngwr-file-upload.d.ts +8 -2
- package/types/ngwr-graph-testing.d.ts +28 -0
- package/types/ngwr-graph.d.ts +263 -91
- package/types/ngwr-lightbox.d.ts +15 -0
- package/types/ngwr-overlay.d.ts +16 -1
- package/types/ngwr-popconfirm-testing.d.ts +11 -2
- package/types/ngwr-popconfirm.d.ts +28 -1
- package/types/ngwr-popover.d.ts +59 -9
- package/types/ngwr-select.d.ts +37 -0
- package/types/ngwr-table-testing.d.ts +52 -1
- package/types/ngwr-table.d.ts +102 -10
- package/types/ngwr-tour-testing.d.ts +10 -0
- package/types/ngwr-tour.d.ts +32 -4
- package/types/ngwr-tree-testing.d.ts +1 -2
- package/types/ngwr-tree.d.ts +35 -2
- package/types/ngwr-utils.d.ts +79 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +14 -11
- package/window/styles/_index.scss +5 -10
|
@@ -128,10 +128,16 @@ export declare class WrPopconfirmHarness extends ContentContainerComponentHarnes
|
|
|
128
128
|
* for it, since the button itself allows no colour at all.
|
|
129
129
|
*/
|
|
130
130
|
getConfirmColor(): Promise<WrColor | null>;
|
|
131
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* Which action holds keyboard focus, by label, or `null` when focus is
|
|
133
|
+
* elsewhere: on the panel itself right after it opens, unless `wrPopconfirmAutoFocus` is
|
|
134
|
+
* `'first-tabbable'`.
|
|
135
|
+
*/
|
|
132
136
|
getFocusedActionLabel(): Promise<string | null>;
|
|
133
137
|
/** Answer the question: click confirm, which emits `confirmed` and closes the dialog. */
|
|
134
138
|
confirm(): Promise<void>;
|
|
139
|
+
/** Whether the panel itself holds focus, as it does right after it opens by default. */
|
|
140
|
+
isPanelFocused(): Promise<boolean>;
|
|
135
141
|
/** Decline: click cancel, which emits `cancelled` and closes the dialog. */
|
|
136
142
|
cancel(): Promise<void>;
|
|
137
143
|
/**
|
|
@@ -140,7 +146,10 @@ export declare class WrPopconfirmHarness extends ContentContainerComponentHarnes
|
|
|
140
146
|
* Sent at the pane rather than at the focused button, because the target makes
|
|
141
147
|
* no difference: the key is picked up by the overlay's keyboard dispatcher,
|
|
142
148
|
* which keeps one listener on the document and routes to the topmost overlay.
|
|
143
|
-
* The pane is the one element guaranteed to be there
|
|
149
|
+
* The panel inside the pane is the one element guaranteed to be there, and it
|
|
150
|
+
* is not the pane itself: `sendKeys` focuses its target first, and the pane
|
|
151
|
+
* takes focus, so typing at one of two open dialogs would dismiss the other by
|
|
152
|
+
* moving focus out of it.
|
|
144
153
|
*/
|
|
145
154
|
sendEscape(): Promise<void>;
|
|
146
155
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { WrClassInput } from "ngwr/utils";
|
|
3
|
+
import { WrAnchoredPosition, WrOverlayAutoFocus } from "ngwr/overlay";
|
|
3
4
|
import { ConnectedPosition } from "@angular/cdk/overlay";
|
|
4
|
-
import { WrAnchoredPosition } from "ngwr/overlay";
|
|
5
5
|
export declare class WrPopconfirm {
|
|
6
6
|
/** Confirmation message. */
|
|
7
7
|
readonly message: import("@angular/core").InputSignal<string>;
|
|
@@ -36,6 +36,18 @@ export declare class WrPopconfirm {
|
|
|
36
36
|
* handle on it. A space-separated string works as well as an array.
|
|
37
37
|
*/
|
|
38
38
|
readonly panelClass: import("@angular/core").InputSignal<WrClassInput>;
|
|
39
|
+
/**
|
|
40
|
+
* Where focus goes when the panel opens. `'dialog'` puts it on the panel
|
|
41
|
+
* itself, with no ring, so Tab reaches Cancel and no button is lit;
|
|
42
|
+
* `'first-tabbable'` puts it on Cancel; `false` leaves it on the trigger,
|
|
43
|
+
* and Tab from there walks into the panel. Closing hands focus back to the
|
|
44
|
+
* trigger in every mode.
|
|
45
|
+
*
|
|
46
|
+
* Prefixed because the directive sits on your own element, where an
|
|
47
|
+
* `autoFocus` attribute would also be the native `autofocus`.
|
|
48
|
+
* @default 'dialog'
|
|
49
|
+
*/
|
|
50
|
+
readonly autoFocus: import("@angular/core").InputSignal<WrOverlayAutoFocus>;
|
|
39
51
|
/**
|
|
40
52
|
* Turns the question off: a click on the host opens nothing and is left to
|
|
41
53
|
* propagate, `open()` does nothing, and an open panel closes without
|
|
@@ -55,6 +67,7 @@ export declare class WrPopconfirm {
|
|
|
55
67
|
readonly cancelled: import("@angular/core").OutputEmitterRef<void>;
|
|
56
68
|
private readonly host;
|
|
57
69
|
private readonly focusMonitor;
|
|
70
|
+
private readonly focusTraps;
|
|
58
71
|
private readonly overlay;
|
|
59
72
|
private readonly dir;
|
|
60
73
|
private readonly outsideClick;
|
|
@@ -66,6 +79,7 @@ export declare class WrPopconfirm {
|
|
|
66
79
|
/** Whether the popconfirm is open. Read-only: `open()` and `close()` change it. */
|
|
67
80
|
readonly isOpen: import("@angular/core").Signal<boolean>;
|
|
68
81
|
private overlayRef;
|
|
82
|
+
private finder;
|
|
69
83
|
private readonly uid;
|
|
70
84
|
/** @internal Public so the host binding can read it. */
|
|
71
85
|
protected readonly panelId: string;
|
|
@@ -91,6 +105,14 @@ export declare class WrPopconfirm {
|
|
|
91
105
|
* and Confirm, in that order.
|
|
92
106
|
*/
|
|
93
107
|
private readonly onPaneKeydown;
|
|
108
|
+
/**
|
|
109
|
+
* Tab on the trigger while the panel is open walks into it, as it would into a
|
|
110
|
+
* panel rendered beside the trigger. The way in when focus did not move on
|
|
111
|
+
* open (`wrPopconfirmAutoFocus` is `false`).
|
|
112
|
+
*
|
|
113
|
+
* @internal
|
|
114
|
+
*/
|
|
115
|
+
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
94
116
|
/**
|
|
95
117
|
* Focus that leaves the panel by any other road (a click on something
|
|
96
118
|
* focusable elsewhere) dismisses it too, and is left where it went. A `null`
|
|
@@ -150,6 +172,11 @@ export declare class WrPopconfirm {
|
|
|
150
172
|
"required": false;
|
|
151
173
|
"isSignal": true;
|
|
152
174
|
};
|
|
175
|
+
"autoFocus": {
|
|
176
|
+
"alias": "wrPopconfirmAutoFocus";
|
|
177
|
+
"required": false;
|
|
178
|
+
"isSignal": true;
|
|
179
|
+
};
|
|
153
180
|
"disabled": {
|
|
154
181
|
"alias": "wrPopconfirmDisabled";
|
|
155
182
|
"required": false;
|
package/types/ngwr-popover.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Signal, TemplateRef } from "@angular/core";
|
|
3
3
|
import { WrClassInput } from "ngwr/utils";
|
|
4
|
+
import { WrAnchoredPosition, WrOverlayAutoFocus } from "ngwr/overlay";
|
|
4
5
|
import { ConnectedPosition } from "@angular/cdk/overlay";
|
|
5
|
-
import { WrAnchoredPosition } from "ngwr/overlay";
|
|
6
6
|
/**
|
|
7
7
|
* What a chart's hover tooltip says about one section.
|
|
8
8
|
*
|
|
@@ -26,6 +26,12 @@ interface WrChartTooltipDatum {
|
|
|
26
26
|
* always been.
|
|
27
27
|
*/
|
|
28
28
|
readonly rows?: readonly WrChartTooltipRow[];
|
|
29
|
+
/**
|
|
30
|
+
* A class the chip takes beside its own, so the chart that opened it can restyle its
|
|
31
|
+
* own chip: the chip is drawn in an overlay, outside the chart, where no hook set on
|
|
32
|
+
* the chart reaches it.
|
|
33
|
+
*/
|
|
34
|
+
readonly className?: string;
|
|
29
35
|
}
|
|
30
36
|
/**
|
|
31
37
|
* One line of a chart tooltip's `rows`.
|
|
@@ -118,8 +124,15 @@ type WrPopoverPosition = WrAnchoredPosition;
|
|
|
118
124
|
* then point at a neighbour. The measurement is written to
|
|
119
125
|
* `--wr-chart-tooltip-arrow` on the chip, and the stylesheet puts the arrow there.
|
|
120
126
|
*
|
|
121
|
-
* **
|
|
122
|
-
*
|
|
127
|
+
* **The chip lets the pointer through by default.** It belongs to the chart, not to a
|
|
128
|
+
* hint a reader has to reach: the pointer passes under it to the sections it covers, so
|
|
129
|
+
* moving to the bar beside one switches at once, and off the chart it closes. That
|
|
130
|
+
* fails WCAG 1.4.13's "hoverable", on purpose and by the maintainer's call: every value
|
|
131
|
+
* the chip shows is also the section's accessible name and the chart's data table.
|
|
132
|
+
* `tooltip="hoverable"` brings the hoverable chip back, described next.
|
|
133
|
+
*
|
|
134
|
+
* **A hoverable chip at its section sits over the sections beside it**, so the way onto
|
|
135
|
+
* it can cross another section: straight up from a heatmap
|
|
123
136
|
* day runs through the day above. Switching the moment that day reported itself
|
|
124
137
|
* would move the chip away from a pointer on its way to it — WCAG 1.4.13 with extra
|
|
125
138
|
* steps. So the strip between the anchor and the chip is a bridge: another section
|
|
@@ -130,8 +143,7 @@ type WrPopoverPosition = WrAnchoredPosition;
|
|
|
130
143
|
* pointer that keeps on going up a heatmap's column is moving onto the chip, so it
|
|
131
144
|
* passes over it and the days under it read out only once it comes out the far side.
|
|
132
145
|
*
|
|
133
|
-
* **Why an overlay and not a positioned child
|
|
134
|
-
* own.** A child is clipped by every `overflow` between it and the page, and a
|
|
146
|
+
* **Why an overlay and not a positioned child.** A child is clipped by every `overflow` between it and the page, and a
|
|
135
147
|
* chart sits inside those constantly: `wr-calendar-heatmap` IS a scroll
|
|
136
148
|
* container, and a sparkline in a `wr-table` cell sits under two more.
|
|
137
149
|
*
|
|
@@ -147,7 +159,8 @@ type WrPopoverPosition = WrAnchoredPosition;
|
|
|
147
159
|
*
|
|
148
160
|
* Call from an injection context — a chart's field initialiser.
|
|
149
161
|
*
|
|
150
|
-
* @param enabled The chart's `tooltip` input
|
|
162
|
+
* @param enabled The chart's `tooltip` input: `true` for the chip the pointer passes
|
|
163
|
+
* under, `'hoverable'` for one it can rest on. Turning it off closes an open tooltip.
|
|
151
164
|
* @param resolve What to show for section `index`, and where. It runs after
|
|
152
165
|
* render, so it may read the DOM the section just drew; the signals it reads
|
|
153
166
|
* are tracked, so a data change under an open tooltip re-reads it, and a
|
|
@@ -166,7 +179,13 @@ type WrPopoverPosition = WrAnchoredPosition;
|
|
|
166
179
|
*
|
|
167
180
|
* @internal
|
|
168
181
|
*/
|
|
169
|
-
export declare function useChartTooltip(enabled: Signal<boolean>, resolve: (index: number) => WrChartTooltipTarget | null, sectionAt?: (x: number, y: number) => number | null): WrChartTooltip;
|
|
182
|
+
export declare function useChartTooltip(enabled: Signal<boolean | 'hoverable'>, resolve: (index: number) => WrChartTooltipTarget | null, sectionAt?: (x: number, y: number) => number | null): WrChartTooltip;
|
|
183
|
+
/**
|
|
184
|
+
* A chart's `tooltip` input: `'hoverable'` as it is, anything else as a boolean attribute.
|
|
185
|
+
*
|
|
186
|
+
* @internal
|
|
187
|
+
*/
|
|
188
|
+
export declare function wrCoerceChartTooltip(value: unknown): boolean | 'hoverable';
|
|
170
189
|
export declare class WrPopover {
|
|
171
190
|
/**
|
|
172
191
|
* Content to render inside the panel.
|
|
@@ -228,6 +247,20 @@ export declare class WrPopover {
|
|
|
228
247
|
* has a heading or a purpose, pass it.
|
|
229
248
|
*/
|
|
230
249
|
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
250
|
+
/**
|
|
251
|
+
* Popover mode only: where focus goes when a click or the keyboard opens the
|
|
252
|
+
* panel. `false` leaves it on the trigger, and Tab from there walks into the
|
|
253
|
+
* panel; `'dialog'` puts it on the panel itself, with no ring;
|
|
254
|
+
* `'first-tabbable'` on the first control inside. An element marked
|
|
255
|
+
* `cdkFocusInitial` in the content takes focus in every mode. A pointer
|
|
256
|
+
* hovering a `trigger="hover"` popover never moves focus. Closing hands focus
|
|
257
|
+
* back to the trigger whenever it was inside.
|
|
258
|
+
*
|
|
259
|
+
* Prefixed because the directive sits on your own element, where an
|
|
260
|
+
* `autoFocus` attribute would also be the native `autofocus`.
|
|
261
|
+
* @default false
|
|
262
|
+
*/
|
|
263
|
+
readonly autoFocus: import("@angular/core").InputSignal<WrOverlayAutoFocus>;
|
|
231
264
|
/**
|
|
232
265
|
* Extra CSS classes for the popover's (or tooltip's) overlay pane.
|
|
233
266
|
*
|
|
@@ -243,6 +276,7 @@ export declare class WrPopover {
|
|
|
243
276
|
readonly closed: import("@angular/core").OutputEmitterRef<void>;
|
|
244
277
|
private readonly host;
|
|
245
278
|
private readonly focusMonitor;
|
|
279
|
+
private readonly focusTraps;
|
|
246
280
|
private readonly keystroke;
|
|
247
281
|
private readonly overlay;
|
|
248
282
|
private readonly dir;
|
|
@@ -263,14 +297,15 @@ export declare class WrPopover {
|
|
|
263
297
|
private overlayRef;
|
|
264
298
|
private connected;
|
|
265
299
|
private textPanelRef;
|
|
300
|
+
private finder;
|
|
266
301
|
/** Whether the HOST itself holds focus — not a descendant of it. */
|
|
267
302
|
private hostFocused;
|
|
268
303
|
private hoverCloseTimer;
|
|
269
304
|
/**
|
|
270
305
|
* Whether Enter or Space opened a `trigger="hover"` popover. The pointer owns
|
|
271
306
|
* a hover popover and must leave the caret alone; the keyboard has nothing
|
|
272
|
-
* else to reach the content with, so a keyboard open
|
|
273
|
-
*
|
|
307
|
+
* else to reach the content with, so a keyboard open behaves exactly as a
|
|
308
|
+
* click popover's open does: `wrPopoverAutoFocus` applies and Tab walks in.
|
|
274
309
|
*/
|
|
275
310
|
private openedByKeyboard;
|
|
276
311
|
private showTimer;
|
|
@@ -305,6 +340,16 @@ export declare class WrPopover {
|
|
|
305
340
|
* @internal
|
|
306
341
|
*/
|
|
307
342
|
protected onActivateKey(event: Event): void;
|
|
343
|
+
/**
|
|
344
|
+
* Tab on the trigger while its click or keyboard-opened popover is showing
|
|
345
|
+
* walks into the panel, as it would into one rendered beside the trigger: the
|
|
346
|
+
* pane sits at the end of `<body>`, where Tab would not find it. A panel with
|
|
347
|
+
* no tab stop closes instead and Tab moves on through the page, which is what
|
|
348
|
+
* Tab past the last control of a panel does.
|
|
349
|
+
*
|
|
350
|
+
* @internal
|
|
351
|
+
*/
|
|
352
|
+
protected onTriggerTab(event: Event): void;
|
|
308
353
|
/** @internal */
|
|
309
354
|
protected onEscape(): void;
|
|
310
355
|
/**
|
|
@@ -451,6 +496,11 @@ export declare class WrPopover {
|
|
|
451
496
|
"required": false;
|
|
452
497
|
"isSignal": true;
|
|
453
498
|
};
|
|
499
|
+
"autoFocus": {
|
|
500
|
+
"alias": "wrPopoverAutoFocus";
|
|
501
|
+
"required": false;
|
|
502
|
+
"isSignal": true;
|
|
503
|
+
};
|
|
454
504
|
"panelClass": {
|
|
455
505
|
"alias": "panelClass";
|
|
456
506
|
"required": false;
|
package/types/ngwr-select.d.ts
CHANGED
|
@@ -532,10 +532,16 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
532
532
|
readonly retryable: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
533
533
|
/** Search mode: label of the retry action on the error row. Falls back to `select.retry`. */
|
|
534
534
|
readonly retryText: import("@angular/core").InputSignal<string | null>;
|
|
535
|
+
/**
|
|
536
|
+
* Search mode: what a screen reader hears once a search has settled on some
|
|
537
|
+
* options. `{{count}}` is their number. Falls back to `select.results`.
|
|
538
|
+
*/
|
|
539
|
+
readonly resultsText: import("@angular/core").InputSignal<string | null>;
|
|
535
540
|
protected readonly resolvedNoResults: import("@angular/core").Signal<string>;
|
|
536
541
|
protected readonly resolvedLoading: import("@angular/core").Signal<string>;
|
|
537
542
|
protected readonly resolvedLoadError: import("@angular/core").Signal<string>;
|
|
538
543
|
protected readonly resolvedRetry: import("@angular/core").Signal<string>;
|
|
544
|
+
private readonly resultsFormat;
|
|
539
545
|
/**
|
|
540
546
|
* Debounced search query, gated to searchable selects. Emits on every settled
|
|
541
547
|
* change — including the empty string when the field is cleared — so a
|
|
@@ -924,6 +930,26 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
924
930
|
protected readonly meetsMinChars: import("@angular/core").Signal<boolean>;
|
|
925
931
|
/** Search mode: show "no results" when the panel has nothing to offer. */
|
|
926
932
|
protected readonly hasNoResults: import("@angular/core").Signal<boolean>;
|
|
933
|
+
/**
|
|
934
|
+
* Search mode: what the open panel has to say to someone who cannot see it.
|
|
935
|
+
* The loading, error and "no results" rows are text in a listbox, which a
|
|
936
|
+
* screen reader does not read unless the user walks there, and a count is
|
|
937
|
+
* nowhere on screen at all.
|
|
938
|
+
*/
|
|
939
|
+
private readonly searchStatus;
|
|
940
|
+
/** Text of the one live region. Written {@link ANNOUNCE_DELAY} ms after the status last changed. */
|
|
941
|
+
protected readonly announcement: import("@angular/core").WritableSignal<string>;
|
|
942
|
+
/** The status last said, or taken as said when the panel opened: the same one is not said twice. */
|
|
943
|
+
private announced;
|
|
944
|
+
private announceTimer;
|
|
945
|
+
/**
|
|
946
|
+
* Says the search status once it has stood still. Every keystroke of a client
|
|
947
|
+
* filter moves the count and every debounced load passes through "Loading", so
|
|
948
|
+
* each change restarts the wait and only what the typing settles on is read. A
|
|
949
|
+
* panel that opens on its full list says nothing: the count is news once a
|
|
950
|
+
* query has changed it.
|
|
951
|
+
*/
|
|
952
|
+
private announceStatus;
|
|
927
953
|
/** Search mode: the error row, in place of "no results", after a failed load and through its retry. */
|
|
928
954
|
protected readonly showLoadError: import("@angular/core").Signal<boolean>;
|
|
929
955
|
/** A `<ng-template wrSelectLoadError>` declared as a direct child, or `undefined`. */
|
|
@@ -1142,6 +1168,12 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
1142
1168
|
*/
|
|
1143
1169
|
private reseedOnAttach;
|
|
1144
1170
|
private seedActiveIndex;
|
|
1171
|
+
private readonly liveLocale;
|
|
1172
|
+
private readonly typeahead;
|
|
1173
|
+
/** A letter opened the panel: the match is found once its rows are there. */
|
|
1174
|
+
private typeaheadPending;
|
|
1175
|
+
/** Move the cursor to the option the typed letters point at. */
|
|
1176
|
+
private applyTypeahead;
|
|
1145
1177
|
private moveActive;
|
|
1146
1178
|
/**
|
|
1147
1179
|
* Both scan `orderedRegistry`, and that is not interchangeable with
|
|
@@ -1297,6 +1329,11 @@ export declare class WrSelect<T = unknown> implements FormValueControl<T | reado
|
|
|
1297
1329
|
"required": false;
|
|
1298
1330
|
"isSignal": true;
|
|
1299
1331
|
};
|
|
1332
|
+
"resultsText": {
|
|
1333
|
+
"alias": "resultsText";
|
|
1334
|
+
"required": false;
|
|
1335
|
+
"isSignal": true;
|
|
1336
|
+
};
|
|
1300
1337
|
"loading": {
|
|
1301
1338
|
"alias": "loading";
|
|
1302
1339
|
"required": false;
|
|
@@ -10,6 +10,8 @@ interface WrTableHarnessFilters extends BaseHarnessFilters {
|
|
|
10
10
|
/** Match only hierarchies (`true` — a `treegrid`) or only flat tables (`false`). */
|
|
11
11
|
readonly tree?: boolean;
|
|
12
12
|
}
|
|
13
|
+
/** Narrows which `<wr-table-column-chooser>` a harness query matches. */
|
|
14
|
+
type WrTableColumnChooserHarnessFilters = BaseHarnessFilters;
|
|
13
15
|
/** Narrows which body row a harness query matches. */
|
|
14
16
|
interface WrTableRowHarnessFilters extends BaseHarnessFilters {
|
|
15
17
|
/** Match a row where ANY data cell's text matches. A string is exact, a RegExp is tested. */
|
|
@@ -86,6 +88,48 @@ export declare class WrTableCellHarness extends ContentContainerComponentHarness
|
|
|
86
88
|
/** Which edge the cell's column is frozen against, or `null` when it scrolls. */
|
|
87
89
|
getPin(): Promise<'left' | 'right' | null>;
|
|
88
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Test harness for `<wr-table-column-chooser>`, the column list of a table.
|
|
93
|
+
*
|
|
94
|
+
* Columns are addressed by their TITLE, as everywhere in this harness family.
|
|
95
|
+
* A chooser inside a popover or a dropdown lives in the overlay container:
|
|
96
|
+
* open the menu, then query it from `TestbedHarnessEnvironment.documentRootLoader`.
|
|
97
|
+
* The one in the table's own `columnChooser` panel comes from
|
|
98
|
+
* `WrTableHarness.getColumnChooser()`.
|
|
99
|
+
*
|
|
100
|
+
* @see https://ngwr.dev/guides/testing
|
|
101
|
+
*/
|
|
102
|
+
export declare class WrTableColumnChooserHarness extends ComponentHarness {
|
|
103
|
+
static hostSelector: string;
|
|
104
|
+
/** Build a predicate that narrows the query. */
|
|
105
|
+
static with(options?: WrTableColumnChooserHarnessFilters): HarnessPredicate<WrTableColumnChooserHarness>;
|
|
106
|
+
private readonly items;
|
|
107
|
+
private readonly boxes;
|
|
108
|
+
private readonly allBox;
|
|
109
|
+
/** The title of every column listed, in column order, hidden ones included. */
|
|
110
|
+
getColumns(): Promise<string[]>;
|
|
111
|
+
/** Whether the column is shown: its checkbox is checked. */
|
|
112
|
+
isChecked(title: string): Promise<boolean>;
|
|
113
|
+
/** Whether the list refuses to hide the column: `hideable: false`, or the last one shown. */
|
|
114
|
+
isLocked(title: string): Promise<boolean>;
|
|
115
|
+
/** Hide a shown column or show a hidden one. Throws on a locked column. */
|
|
116
|
+
toggle(title: string): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Press the "Show all" row: it shows every column while one is hidden, and
|
|
119
|
+
* hides every column that can be hidden once all are shown.
|
|
120
|
+
*/
|
|
121
|
+
showAll(): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* What the "Show all" row reports: `'all'` (checked) when no hideable column
|
|
124
|
+
* is hidden, `'none'` (unchecked) when every one is, `'some'` (mixed) between.
|
|
125
|
+
*/
|
|
126
|
+
getShowAllState(): Promise<'all' | 'some' | 'none'>;
|
|
127
|
+
/** The text of the "Show all" row. */
|
|
128
|
+
getShowAllText(): Promise<string>;
|
|
129
|
+
private showAllBox;
|
|
130
|
+
private entries;
|
|
131
|
+
private entryFor;
|
|
132
|
+
}
|
|
89
133
|
/**
|
|
90
134
|
* Test harness for one column header of a `<wr-table>`.
|
|
91
135
|
*
|
|
@@ -462,6 +506,13 @@ export declare class WrTableHarness extends ComponentHarness {
|
|
|
462
506
|
isColumnLocked(columnTitle: string): Promise<boolean>;
|
|
463
507
|
/** Hide a shown column or show a hidden one through the column chooser, which stays open. */
|
|
464
508
|
toggleColumn(columnTitle: string): Promise<void>;
|
|
509
|
+
/**
|
|
510
|
+
* The list inside the column chooser's panel, with its "Show all" row. Opens
|
|
511
|
+
* the chooser and leaves it open.
|
|
512
|
+
*/
|
|
513
|
+
getColumnChooser(): Promise<WrTableColumnChooserHarness>;
|
|
514
|
+
/** Opens the chooser's panel and answers its id, which the trigger publishes while open. */
|
|
515
|
+
private openChooser;
|
|
465
516
|
/**
|
|
466
517
|
* The chooser's rows, opening it first. The panel is a popover in the overlay
|
|
467
518
|
* container, found through the id its trigger publishes while open.
|
|
@@ -481,4 +532,4 @@ export declare class WrTableHarness extends ComponentHarness {
|
|
|
481
532
|
/** The select-all input, or a failure naming both reasons it is missing. */
|
|
482
533
|
private selectAllHost;
|
|
483
534
|
}
|
|
484
|
-
export type { WrTableCellHarnessFilters, WrTableHarnessFilters, WrTableHeaderCellHarnessFilters, WrTableRowHarnessFilters };
|
|
535
|
+
export type { WrTableCellHarnessFilters, WrTableColumnChooserHarnessFilters, WrTableHarnessFilters, WrTableHeaderCellHarnessFilters, WrTableRowHarnessFilters };
|
package/types/ngwr-table.d.ts
CHANGED
|
@@ -356,6 +356,25 @@ interface WrTableCellEdit<T extends WrTableRow = WrTableRow> {
|
|
|
356
356
|
/** The cell's value when the edit started. */
|
|
357
357
|
readonly previous: unknown;
|
|
358
358
|
}
|
|
359
|
+
/**
|
|
360
|
+
* @license
|
|
361
|
+
*
|
|
362
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
363
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
364
|
+
*/
|
|
365
|
+
/** One row of a column chooser: a column of the table, shown or hidden. */
|
|
366
|
+
interface WrTableChooserColumn {
|
|
367
|
+
/** The column's key in `columns`, the value `hiddenColumns` lists. */
|
|
368
|
+
readonly key: string;
|
|
369
|
+
/** The column's title, or its `headerHint`, or its key when it has neither. */
|
|
370
|
+
readonly title: string;
|
|
371
|
+
/** Whether the table leaves the column out. */
|
|
372
|
+
readonly hidden: boolean;
|
|
373
|
+
/** `false` for a `hideable: false` column, which is always shown. */
|
|
374
|
+
readonly hideable: boolean;
|
|
375
|
+
/** Whether the checkbox is disabled: a `hideable: false` column, or the last one shown. */
|
|
376
|
+
readonly locked: boolean;
|
|
377
|
+
}
|
|
359
378
|
/**
|
|
360
379
|
* Context passed to a `[wrTableEditCell]` template, the editor of one cell.
|
|
361
380
|
*
|
|
@@ -612,7 +631,7 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
|
|
|
612
631
|
*/
|
|
613
632
|
readonly loadingMode: import("@angular/core").InputSignal<WrTableLoadingMode>;
|
|
614
633
|
/** The form `loading` takes right now, `null` while nothing loads. */
|
|
615
|
-
protected readonly loadingForm: import("@angular/core").Signal<"
|
|
634
|
+
protected readonly loadingForm: import("@angular/core").Signal<"bar" | "overlay" | null>;
|
|
616
635
|
/**
|
|
617
636
|
* Collapse each row to a labelled card when the table's own box is too narrow
|
|
618
637
|
* for columns (a container query on its own width, not the viewport). Every
|
|
@@ -1052,14 +1071,24 @@ export declare class WrTable<T extends WrTableRow = WrTableRow> {
|
|
|
1052
1071
|
key: string;
|
|
1053
1072
|
column: WrTableColumn<T>;
|
|
1054
1073
|
}[]>;
|
|
1055
|
-
/**
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1074
|
+
/**
|
|
1075
|
+
* One entry per column in column order, hidden ones included: what a column
|
|
1076
|
+
* chooser lists. `<wr-table-column-chooser>` reads it, and so can a menu of
|
|
1077
|
+
* your own.
|
|
1078
|
+
*/
|
|
1079
|
+
readonly chooserColumns: import("@angular/core").Signal<readonly WrTableChooserColumn[]>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Hide a shown column or show a hidden one, as its checkbox in the column
|
|
1082
|
+
* chooser does: it writes `hiddenColumns` and reports a `stateChange`. A
|
|
1083
|
+
* locked column (`hideable: false`, or the last one shown) stays as it is.
|
|
1084
|
+
*/
|
|
1085
|
+
toggleColumn(key: string): void;
|
|
1086
|
+
/**
|
|
1087
|
+
* Write `hiddenColumns` as a reader action, so `stateChange` reports it. A
|
|
1088
|
+
* `hideable: false` column is left out of the list, and so is the first
|
|
1089
|
+
* column when the list would hide every one.
|
|
1090
|
+
*/
|
|
1091
|
+
setHiddenColumns(keys: readonly string[]): void;
|
|
1063
1092
|
/**
|
|
1064
1093
|
* Sticky offsets for pinned columns, measured from the header cells so any
|
|
1065
1094
|
* number of columns can stack per side. Also names the inner-edge column on
|
|
@@ -1850,6 +1879,69 @@ export declare class WrTableCell<T extends WrTableRow = WrSafeAny, K extends str
|
|
|
1850
1879
|
};
|
|
1851
1880
|
}, {}, never, never, true, never>;
|
|
1852
1881
|
}
|
|
1882
|
+
/**
|
|
1883
|
+
* The column list of a `<wr-table>`, for a menu of your own: one checkbox per
|
|
1884
|
+
* column, in column order, under a "Show all" row. Place it in a popover, a
|
|
1885
|
+
* dropdown or a drawer and hand it the table. Every toggle writes the table's
|
|
1886
|
+
* `hiddenColumns`, so `hiddenColumnsChange` and `stateChange` fire as they do
|
|
1887
|
+
* from the built-in `columnChooser`, which renders this same list.
|
|
1888
|
+
*
|
|
1889
|
+
* A `hideable: false` column and the last visible one stay checked and
|
|
1890
|
+
* disabled. "Show all" shows every column; pressed while all are shown, it
|
|
1891
|
+
* hides every column that can be hidden, less the first when none is
|
|
1892
|
+
* `hideable: false`.
|
|
1893
|
+
*
|
|
1894
|
+
* @example
|
|
1895
|
+
* ```html
|
|
1896
|
+
* <button wr-btn type="button" [wrPopover]="menu">Columns</button>
|
|
1897
|
+
* <ng-template #menu>
|
|
1898
|
+
* <wr-table-column-chooser [table]="table" />
|
|
1899
|
+
* </ng-template>
|
|
1900
|
+
*
|
|
1901
|
+
* <wr-table #table [columns]="columns" [items]="rows" [(hiddenColumns)]="hidden" />
|
|
1902
|
+
* ```
|
|
1903
|
+
*
|
|
1904
|
+
* @see https://ngwr.dev/reference/components/table
|
|
1905
|
+
*/
|
|
1906
|
+
export declare class WrTableColumnChooser {
|
|
1907
|
+
constructor();
|
|
1908
|
+
/** The table whose columns the list shows and hides. */
|
|
1909
|
+
readonly table: import("@angular/core").InputSignal<WrTable<any>>;
|
|
1910
|
+
/** Text of the "Show all" row. Falls back to `table.showAllColumns`. */
|
|
1911
|
+
readonly showAllLabel: import("@angular/core").InputSignal<string | null>;
|
|
1912
|
+
/** Accessible name of the list. Falls back to `table.columns`. */
|
|
1913
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
1914
|
+
protected readonly resolvedShowAll: import("@angular/core").Signal<string>;
|
|
1915
|
+
protected readonly resolvedLabel: import("@angular/core").Signal<string>;
|
|
1916
|
+
protected readonly columns: import("@angular/core").Signal<readonly WrTableChooserColumn[]>;
|
|
1917
|
+
/** How many of the hideable columns are shown: every one, some, or none. */
|
|
1918
|
+
protected readonly showAllState: import("@angular/core").Signal<"some" | "none" | "all">;
|
|
1919
|
+
/** No column can be shown or hidden, so the row has nothing to do. */
|
|
1920
|
+
protected readonly showAllDisabled: import("@angular/core").Signal<boolean>;
|
|
1921
|
+
/**
|
|
1922
|
+
* Shows every column while one is hidden. Once all are shown it hides every
|
|
1923
|
+
* hideable one, and the table keeps its first column when that would leave none.
|
|
1924
|
+
*/
|
|
1925
|
+
protected toggleShowAll(): void;
|
|
1926
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrTableColumnChooser, never>;
|
|
1927
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrTableColumnChooser, "wr-table-column-chooser", never, {
|
|
1928
|
+
"table": {
|
|
1929
|
+
"alias": "table";
|
|
1930
|
+
"required": true;
|
|
1931
|
+
"isSignal": true;
|
|
1932
|
+
};
|
|
1933
|
+
"showAllLabel": {
|
|
1934
|
+
"alias": "showAllLabel";
|
|
1935
|
+
"required": false;
|
|
1936
|
+
"isSignal": true;
|
|
1937
|
+
};
|
|
1938
|
+
"ariaLabel": {
|
|
1939
|
+
"alias": "ariaLabel";
|
|
1940
|
+
"required": false;
|
|
1941
|
+
"isSignal": true;
|
|
1942
|
+
};
|
|
1943
|
+
}, {}, never, never, true, never>;
|
|
1944
|
+
}
|
|
1853
1945
|
/**
|
|
1854
1946
|
* Provide the editor for a column's cells, and with it make the column
|
|
1855
1947
|
* editable: a double click, Enter, F2 or a typed character on a cell swaps its
|
|
@@ -2153,4 +2245,4 @@ export declare function wrReadField<T>(item: T, key: string): string | number;
|
|
|
2153
2245
|
* @param accessor Reads the value of a key; defaults to `wrReadField`.
|
|
2154
2246
|
*/
|
|
2155
2247
|
export declare function wrSortRows<T>(rows: readonly T[], sort: readonly WrTableSortState[], accessor?: WrTableSortAccessor<T>): readonly T[];
|
|
2156
|
-
export type { WrTableCellContext, WrTableCellEdit, WrTableColumn, WrTableColumnAlign, WrTableColumns, WrTableCsvOptions, WrTableEditCellContext, WrTableEditable, WrTableExpandContext, WrTableFilterChange, WrTableFilterItem, WrTableGroupContext, WrTableLoadingMode, WrTableRow, WrTableRowClass, WrTableRowClick, WrTableSelectionContext, WrTableSortAccessor, WrTableSortDirection, WrTableSortState, WrTableState, WrTableSummary, WrTableSummaryContext, WrTableTruncate };
|
|
2248
|
+
export type { WrTableCellContext, WrTableCellEdit, WrTableChooserColumn, WrTableColumn, WrTableColumnAlign, WrTableColumns, WrTableCsvOptions, WrTableEditCellContext, WrTableEditable, WrTableExpandContext, WrTableFilterChange, WrTableFilterItem, WrTableGroupContext, WrTableLoadingMode, WrTableRow, WrTableRowClass, WrTableRowClick, WrTableSelectionContext, WrTableSortAccessor, WrTableSortDirection, WrTableSortState, WrTableState, WrTableSummary, WrTableSummaryContext, WrTableTruncate };
|
|
@@ -87,6 +87,16 @@ export declare class WrTourHarness extends ComponentHarness {
|
|
|
87
87
|
* what an untitled step has instead of one.
|
|
88
88
|
*/
|
|
89
89
|
getAccessibleName(): Promise<string | null>;
|
|
90
|
+
/**
|
|
91
|
+
* What the card is described by, which is what a screen reader reads after the
|
|
92
|
+
* name when focus enters the dialog: the step's text.
|
|
93
|
+
*/
|
|
94
|
+
getDescription(): Promise<string | null>;
|
|
95
|
+
/**
|
|
96
|
+
* The text of the elements an id-list attribute of the card names, joined by a
|
|
97
|
+
* space, or `null` when the attribute is absent or names nothing in the card.
|
|
98
|
+
*/
|
|
99
|
+
private referenced;
|
|
90
100
|
/** Whether the card announces itself as a modal dialog. */
|
|
91
101
|
isModal(): Promise<boolean>;
|
|
92
102
|
/**
|
package/types/ngwr-tour.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { InjectionToken } from "@angular/core";
|
|
3
3
|
import { WrClassInput } from "ngwr/utils";
|
|
4
|
+
import { WrOverlayAutoFocus } from "ngwr/overlay";
|
|
4
5
|
/** Where the step popup sits relative to its target. */
|
|
5
6
|
type WrTourPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
6
7
|
/** One stop on a tour. */
|
|
@@ -25,6 +26,19 @@ interface WrTourStep {
|
|
|
25
26
|
*/
|
|
26
27
|
readonly panelClass?: WrClassInput;
|
|
27
28
|
}
|
|
29
|
+
/** Options for a whole tour, the second argument of `WrTour.start()`. */
|
|
30
|
+
interface WrTourOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Where focus goes when a step's card opens. `'dialog'` puts it on the card
|
|
33
|
+
* itself, with no ring, so the keyboard is inside the tour and no button is
|
|
34
|
+
* lit; `'first-tabbable'` puts it on Next (Done on the last step); `false`
|
|
35
|
+
* leaves it where it is on the first step, and on the card once it has been
|
|
36
|
+
* inside one. The card traps Tab in every mode, and ending the tour returns
|
|
37
|
+
* focus to where it was when the tour started.
|
|
38
|
+
* @default 'dialog'
|
|
39
|
+
*/
|
|
40
|
+
readonly autoFocus?: WrOverlayAutoFocus;
|
|
41
|
+
}
|
|
28
42
|
/**
|
|
29
43
|
* Guided product tour: a spotlight over one element at a time plus a popup
|
|
30
44
|
* explaining it.
|
|
@@ -65,6 +79,9 @@ export declare class WrTour {
|
|
|
65
79
|
private detachKeydown;
|
|
66
80
|
private detachReposition;
|
|
67
81
|
private restoreFocus;
|
|
82
|
+
private autoFocus;
|
|
83
|
+
/** `focusNext` for the card, see {@link WrTourController}. */
|
|
84
|
+
readonly focusNext: () => boolean;
|
|
68
85
|
private stopWatchingUrl;
|
|
69
86
|
/** Whether a tour is running. */
|
|
70
87
|
readonly active: import("@angular/core").Signal<boolean>;
|
|
@@ -98,7 +115,7 @@ export declare class WrTour {
|
|
|
98
115
|
* tour is a client-side affordance and there is nothing to spotlight on the
|
|
99
116
|
* server.
|
|
100
117
|
*/
|
|
101
|
-
start(steps: readonly WrTourStep[]): void;
|
|
118
|
+
start(steps: readonly WrTourStep[], options?: WrTourOptions): void;
|
|
102
119
|
/** Advance; finishes the tour past the last step. */
|
|
103
120
|
next(): void;
|
|
104
121
|
/** Go back; stays put on the first step. */
|
|
@@ -154,6 +171,8 @@ interface WrTourController {
|
|
|
154
171
|
* would put a Back button on the very first card.
|
|
155
172
|
*/
|
|
156
173
|
readonly isFirst: () => boolean;
|
|
174
|
+
/** Whether the card opens with focus on Next: the tour's `autoFocus` is `'first-tabbable'`. */
|
|
175
|
+
readonly focusNext: () => boolean;
|
|
157
176
|
next(): void;
|
|
158
177
|
prev(): void;
|
|
159
178
|
stop(): void;
|
|
@@ -171,13 +190,22 @@ export declare class WrTourPopup {
|
|
|
171
190
|
protected readonly backLabel: import("@angular/core").Signal<string>;
|
|
172
191
|
protected readonly doneLabel: import("@angular/core").Signal<string>;
|
|
173
192
|
protected readonly skipLabel: import("@angular/core").Signal<string>;
|
|
174
|
-
/** `Step {{current}} of {{total}}
|
|
193
|
+
/** `Step {{current}} of {{total}}`, the second half of the dialog's name. */
|
|
175
194
|
protected readonly progress: (params?: import("ngwr/i18n").WrI18nParams) => string;
|
|
176
195
|
protected readonly isLast: import("@angular/core").Signal<boolean>;
|
|
177
196
|
protected readonly isFirst: import("@angular/core").Signal<boolean>;
|
|
178
197
|
protected readonly progressText: import("@angular/core").Signal<string>;
|
|
179
|
-
protected readonly
|
|
198
|
+
protected readonly titleId: string;
|
|
199
|
+
protected readonly progressId: string;
|
|
200
|
+
protected readonly contentId: string;
|
|
201
|
+
/**
|
|
202
|
+
* The dialog is named by its title and the progress line, or by the progress
|
|
203
|
+
* line alone for an untitled step, and described by the step's text: a screen
|
|
204
|
+
* reader reads a dialog's name and description when focus enters it, and
|
|
205
|
+
* nothing else of what it holds.
|
|
206
|
+
*/
|
|
207
|
+
protected readonly labelledBy: import("@angular/core").Signal<string>;
|
|
180
208
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrTourPopup, never>;
|
|
181
209
|
static ɵcmp: i0.ɵɵComponentDeclaration<WrTourPopup, "wr-tour-popup", never, {}, {}, never, never, true, never>;
|
|
182
210
|
}
|
|
183
|
-
export type { WrTourPlacement, WrTourStep };
|
|
211
|
+
export type { WrTourOptions, WrTourPlacement, WrTourStep };
|
|
@@ -368,8 +368,7 @@ export declare class WrTreeHarness extends ContentContainerComponentHarness {
|
|
|
368
368
|
* prove the pointer path and nothing more.
|
|
369
369
|
*
|
|
370
370
|
* The key is honoured only on the CLOSED trigger, so an open panel is closed
|
|
371
|
-
* first with Escape — the step a keyboard user takes too
|
|
372
|
-
* the panel while it is up.
|
|
371
|
+
* first with Escape — the step a keyboard user takes too.
|
|
373
372
|
*
|
|
374
373
|
* Does nothing, rather than throwing, where the component does nothing —
|
|
375
374
|
* nothing selected, disabled or read-only — so a spec asserts the outcome on
|