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
|
@@ -139,7 +139,8 @@ export declare class WrDropdownHarness extends ContentContainerComponentHarness
|
|
|
139
139
|
open(): Promise<void>;
|
|
140
140
|
/**
|
|
141
141
|
* Open the menu from the keyboard — ArrowDown on the trigger, the APG
|
|
142
|
-
* menu-button path (ArrowUp / Enter / Space do the same).
|
|
142
|
+
* menu-button path (ArrowUp / Enter / Space do the same). Focus stays on the
|
|
143
|
+
* trigger unless the dropdown sets `wrDropdownAutoFocus`.
|
|
143
144
|
*
|
|
144
145
|
* Worth its own method rather than an argument to `open()`: it is the only way
|
|
145
146
|
* to get TWO dropdowns open at once, because clicking a second trigger is an
|
|
@@ -183,10 +184,12 @@ export declare class WrDropdownHarness extends ContentContainerComponentHarness
|
|
|
183
184
|
* The label of the item that currently holds focus, or `null` when focus is
|
|
184
185
|
* elsewhere.
|
|
185
186
|
*
|
|
186
|
-
* The menu roves focus rather than moving a visual cursor
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
187
|
+
* The menu roves focus rather than moving a visual cursor, so this is the only
|
|
188
|
+
* way to ask where the keyboard is. Opening leaves focus on the trigger unless
|
|
189
|
+
* the dropdown sets `wrDropdownAutoFocus`: send ArrowDown to the host
|
|
190
|
+
* (`(await dropdown.host()).sendKeys(TestKey.DOWN_ARROW)`) to walk in at the
|
|
191
|
+
* first ENABLED item, and the arrow keys walk from there over the enabled
|
|
192
|
+
* items only (a disabled one is not a stop).
|
|
190
193
|
*/
|
|
191
194
|
getFocusedItemText(): Promise<string | null>;
|
|
192
195
|
/**
|
package/types/ngwr-dropdown.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { TemplateRef } from "@angular/core";
|
|
3
3
|
import { WrClassInput } from "ngwr/utils";
|
|
4
|
-
import { ConnectedPosition } from "@angular/cdk/overlay";
|
|
5
4
|
import { WrAnchoredPosition } from "ngwr/overlay";
|
|
5
|
+
import { ConnectedPosition } from "@angular/cdk/overlay";
|
|
6
6
|
/**
|
|
7
7
|
* Holds the menu content rendered when a {@link WrDropdown} opens.
|
|
8
8
|
*
|
|
@@ -94,6 +94,18 @@ export declare class WrDropdown {
|
|
|
94
94
|
* @default false
|
|
95
95
|
*/
|
|
96
96
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
97
|
+
/**
|
|
98
|
+
* Focus the first item when a click, a key or `open()` opens the menu. Off,
|
|
99
|
+
* focus stays on the trigger and ArrowDown / ArrowUp there walk into the menu
|
|
100
|
+
* at its first / last item; a letter jumps to the item it starts. A pointer
|
|
101
|
+
* hovering a `trigger="hover"` menu never moves focus.
|
|
102
|
+
*
|
|
103
|
+
* Prefixed because the directive sits on your own element, where an
|
|
104
|
+
* `autoFocus` attribute would also be the native `autofocus`.
|
|
105
|
+
*
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
readonly autoFocus: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
97
109
|
/**
|
|
98
110
|
* Extra CSS classes for the menu's overlay pane.
|
|
99
111
|
*
|
|
@@ -123,6 +135,7 @@ export declare class WrDropdown {
|
|
|
123
135
|
private readonly scrollStrategies;
|
|
124
136
|
private readonly injector;
|
|
125
137
|
private readonly destroyRef;
|
|
138
|
+
private readonly liveLocale;
|
|
126
139
|
private readonly openState;
|
|
127
140
|
/** Whether the menu is open. Read-only: `open()` and `close()` change it. */
|
|
128
141
|
readonly isOpen: import("@angular/core").Signal<boolean>;
|
|
@@ -153,6 +166,8 @@ export declare class WrDropdown {
|
|
|
153
166
|
private overlayRef;
|
|
154
167
|
/** The root menu's link to the submenus open below it. */
|
|
155
168
|
private level;
|
|
169
|
+
/** The open root menu's type-ahead, for a letter typed on the trigger. */
|
|
170
|
+
private typeInMenu;
|
|
156
171
|
constructor();
|
|
157
172
|
/** Open the menu. Does nothing while the trigger is disabled. */
|
|
158
173
|
open(): void;
|
|
@@ -164,10 +179,10 @@ export declare class WrDropdown {
|
|
|
164
179
|
/**
|
|
165
180
|
* Whether the pointer, rather than the keyboard, opened the current menu.
|
|
166
181
|
*
|
|
167
|
-
* A hover-opened menu must not take focus — the APG
|
|
168
|
-
* leaves the caret where it was
|
|
169
|
-
*
|
|
170
|
-
*
|
|
182
|
+
* A hover-opened menu must not take focus, even under `wrDropdownAutoFocus` — the APG
|
|
183
|
+
* shows a menu on hover and leaves the caret where it was. The trigger MODE
|
|
184
|
+
* cannot answer that on its own: a `trigger="hover"` menu is still openable
|
|
185
|
+
* with Enter, and that open follows `wrDropdownAutoFocus`.
|
|
171
186
|
*/
|
|
172
187
|
private openedByPointer;
|
|
173
188
|
protected onClick(event: MouseEvent): void;
|
|
@@ -193,7 +208,11 @@ export declare class WrDropdown {
|
|
|
193
208
|
* its way out of the document.
|
|
194
209
|
*/
|
|
195
210
|
private closeOverlay;
|
|
196
|
-
/**
|
|
211
|
+
/**
|
|
212
|
+
* @internal Trigger keydown — ArrowDown/Up/Enter/Space open the menu. While
|
|
213
|
+
* it is open the arrows reach `handleMenuKeydown` through the overlay, and a
|
|
214
|
+
* letter goes to the menu's type-ahead.
|
|
215
|
+
*/
|
|
197
216
|
protected onKeydown(event: KeyboardEvent): void;
|
|
198
217
|
private handleMenuKeydown;
|
|
199
218
|
/** The focus stops of `pane`, the root menu's own by default. */
|
|
@@ -231,6 +250,11 @@ export declare class WrDropdown {
|
|
|
231
250
|
"required": false;
|
|
232
251
|
"isSignal": true;
|
|
233
252
|
};
|
|
253
|
+
"autoFocus": {
|
|
254
|
+
"alias": "wrDropdownAutoFocus";
|
|
255
|
+
"required": false;
|
|
256
|
+
"isSignal": true;
|
|
257
|
+
};
|
|
234
258
|
"panelClass": {
|
|
235
259
|
"alias": "panelClass";
|
|
236
260
|
"required": false;
|
|
@@ -314,6 +338,7 @@ export declare class WrDropdownSubmenu {
|
|
|
314
338
|
private readonly vcr;
|
|
315
339
|
private readonly scrollStrategies;
|
|
316
340
|
private readonly injector;
|
|
341
|
+
private readonly liveLocale;
|
|
317
342
|
private readonly openState;
|
|
318
343
|
/** Whether the submenu is open. Read-only: `open()` and `close()` change it. */
|
|
319
344
|
readonly isOpen: import("@angular/core").Signal<boolean>;
|
|
@@ -162,7 +162,11 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
162
162
|
* (WCAG 2.5.3).
|
|
163
163
|
*/
|
|
164
164
|
readonly dropZoneLabel: import("@angular/core").InputSignal<string | null>;
|
|
165
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Name of each row's remove button. `{{name}}` is the row's file name, so the
|
|
167
|
+
* buttons of a list are told apart. Falls back to `fileUpload.removeFile`,
|
|
168
|
+
* "Remove {{name}}" in English.
|
|
169
|
+
*/
|
|
166
170
|
readonly removeFileLabel: import("@angular/core").InputSignal<string | null>;
|
|
167
171
|
/** Retry button text on a failed row. Falls back to `fileUpload.retry`. */
|
|
168
172
|
readonly retryLabel: import("@angular/core").InputSignal<string | null>;
|
|
@@ -174,7 +178,9 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
174
178
|
readonly failedLabel: import("@angular/core").InputSignal<string | null>;
|
|
175
179
|
protected readonly resolvedPick: import("@angular/core").Signal<string>;
|
|
176
180
|
protected readonly resolvedDrop: import("@angular/core").Signal<string>;
|
|
177
|
-
|
|
181
|
+
private readonly removeText;
|
|
182
|
+
/** The remove button of one row, named after its file. */
|
|
183
|
+
protected removeName(name: string): string;
|
|
178
184
|
protected readonly resolvedRetry: import("@angular/core").Signal<string>;
|
|
179
185
|
protected readonly resolvedUploading: import("@angular/core").Signal<string>;
|
|
180
186
|
protected readonly resolvedUploaded: import("@angular/core").Signal<string>;
|
|
@@ -109,6 +109,12 @@ export declare class WrGraphNodeHarness extends ComponentHarness {
|
|
|
109
109
|
* `tabindex` is no proxy either — it is always `0`, precisely so the tab stop never
|
|
110
110
|
* depends on a measurement.
|
|
111
111
|
*
|
|
112
|
+
* A `zoomable` graph is driven through its own three buttons, and its zoom is read off
|
|
113
|
+
* the `scale()` the component wrote on the stage. The pan is not readable here for the
|
|
114
|
+
* reason node positions are not: its pixels depend on a viewport box jsdom does not
|
|
115
|
+
* have. Gestures have no method either, since the wheel, a drag and a pinch all read
|
|
116
|
+
* that box.
|
|
117
|
+
*
|
|
112
118
|
* An empty graph and a graph whose layout drew nothing render the same DOM, so the
|
|
113
119
|
* harness cannot tell them apart. {@link getNodes} answers `[]` for both, which is the
|
|
114
120
|
* honest way to assert emptiness; {@link getEdges} refuses instead, because "no edges"
|
|
@@ -165,5 +171,27 @@ export declare class WrGraphHarness extends ComponentHarness {
|
|
|
165
171
|
from: string;
|
|
166
172
|
to: string;
|
|
167
173
|
}[]>;
|
|
174
|
+
/** Whether the graph zooms and pans, from the host's `wr-graph--zoomable`. */
|
|
175
|
+
isZoomable(): Promise<boolean>;
|
|
176
|
+
/** Clicks the zoom-in button: one step, around the middle of the viewport. Throws unless `zoomable`. */
|
|
177
|
+
zoomIn(): Promise<void>;
|
|
178
|
+
/** Clicks the zoom-out button: one step, around the middle of the viewport. Throws unless `zoomable`. */
|
|
179
|
+
zoomOut(): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* Clicks the fit button. Throws unless `zoomable`.
|
|
182
|
+
*
|
|
183
|
+
* A fit needs the viewport's box, and jsdom gives every element a 0×0 one, so there
|
|
184
|
+
* the click changes nothing. A spec that asserts the fitted zoom has to stub
|
|
185
|
+
* `getBoundingClientRect` on the `.wr-graph__viewport` element first.
|
|
186
|
+
*/
|
|
187
|
+
fit(): Promise<void>;
|
|
188
|
+
/**
|
|
189
|
+
* The zoom the component drew, where `1` is 100%: the `scale()` in the stage's inline
|
|
190
|
+
* `transform`, or `1` when it wrote none. Throws unless `zoomable`, where no zoom is
|
|
191
|
+
* ever drawn and `1` would be vacuously true.
|
|
192
|
+
*/
|
|
193
|
+
getZoom(): Promise<number>;
|
|
194
|
+
private control;
|
|
195
|
+
private notZoomable;
|
|
168
196
|
}
|
|
169
197
|
export type { WrGraphHarnessFilters, WrGraphNodeHarnessFilters };
|
package/types/ngwr-graph.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { TemplateRef } from "@angular/core";
|
|
2
|
+
import { Signal, TemplateRef } from "@angular/core";
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
*
|
|
@@ -74,6 +74,90 @@ export declare class WrGraphNodeTemplate {
|
|
|
74
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrGraphNodeTemplate, never>;
|
|
75
75
|
static ɵdir: i0.ɵɵDirectiveDeclaration<WrGraphNodeTemplate, "ng-template[wrGraphNode]", never, {}, {}, never, never, true, never>;
|
|
76
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* @license
|
|
79
|
+
*
|
|
80
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
81
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
82
|
+
*/
|
|
83
|
+
/** A point in graph space: origin top-left, y grows downward. */
|
|
84
|
+
interface WrGraphPoint {
|
|
85
|
+
readonly x: number;
|
|
86
|
+
readonly y: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* What a layout reads about a node: resolved, plain and serialisable. The
|
|
90
|
+
* consumer's `data` never reaches a layout, and neither does the DOM — sizes
|
|
91
|
+
* arrive as finite numbers the component already resolved.
|
|
92
|
+
*/
|
|
93
|
+
interface WrGraphLayoutNode {
|
|
94
|
+
readonly id: string;
|
|
95
|
+
readonly width: number;
|
|
96
|
+
readonly height: number;
|
|
97
|
+
}
|
|
98
|
+
/** A layout edge. `from` is the parent, `to` the child; `id` is unique per edge. */
|
|
99
|
+
interface WrGraphLayoutEdge {
|
|
100
|
+
readonly id: string;
|
|
101
|
+
readonly from: string;
|
|
102
|
+
readonly to: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The whole graph a layout works on. Input order IS the tie-break order, so the
|
|
106
|
+
* same arrays always produce the same picture. Parallel edges and self-loops
|
|
107
|
+
* are legal here; an edge naming a missing node is dropped silently, because
|
|
108
|
+
* the component has already warned about it.
|
|
109
|
+
*/
|
|
110
|
+
interface WrGraphLayoutInput {
|
|
111
|
+
readonly nodes: readonly WrGraphLayoutNode[];
|
|
112
|
+
readonly edges: readonly WrGraphLayoutEdge[];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Per-call context. An object from day one so later fields are additive. The
|
|
116
|
+
* signal aborts when the input changes, or the graph is destroyed, before an
|
|
117
|
+
* asynchronous layout settles. An engine that cannot stop its work can leave it
|
|
118
|
+
* running: the graph drops the late result.
|
|
119
|
+
*/
|
|
120
|
+
interface WrGraphLayoutContext {
|
|
121
|
+
readonly signal: AbortSignal;
|
|
122
|
+
}
|
|
123
|
+
/** Where a node goes: its TOP-LEFT corner in graph space, which maps straight onto a CSS translate. */
|
|
124
|
+
interface WrGraphNodePlacement {
|
|
125
|
+
readonly id: string;
|
|
126
|
+
readonly x: number;
|
|
127
|
+
readonly y: number;
|
|
128
|
+
}
|
|
129
|
+
/** The polyline of one edge, from the `from` end to the `to` end — at least two points. */
|
|
130
|
+
interface WrGraphEdgeRoute {
|
|
131
|
+
readonly id: string;
|
|
132
|
+
readonly points: readonly WrGraphPoint[];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* A finished layout. The bounding box starts at (0, 0) and measures
|
|
136
|
+
* `width` × `height`. Direction-free: RTL is applied after the layout, so these
|
|
137
|
+
* numbers never depend on `dir`.
|
|
138
|
+
*/
|
|
139
|
+
interface WrGraphLayoutResult {
|
|
140
|
+
readonly nodes: readonly WrGraphNodePlacement[];
|
|
141
|
+
readonly edges: readonly WrGraphEdgeRoute[];
|
|
142
|
+
readonly width: number;
|
|
143
|
+
readonly height: number;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The seam a layout engine plugs into. Used as both the type and the DI token,
|
|
147
|
+
* the way `WrDateAdapter` is.
|
|
148
|
+
*
|
|
149
|
+
* A synchronous result is drawn in the same pass. A Promise is for an engine
|
|
150
|
+
* that works in a worker or on a server: the graph keeps its last picture until
|
|
151
|
+
* the Promise resolves, and reports a rejection through `layoutError`.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* providers: [{ provide: WrGraphLayout, useClass: WorkerLayout }]
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
export declare abstract class WrGraphLayout {
|
|
159
|
+
abstract layout(input: WrGraphLayoutInput, context: WrGraphLayoutContext): WrGraphLayoutResult | Promise<WrGraphLayoutResult>;
|
|
160
|
+
}
|
|
77
161
|
interface DrawnNode<TData> {
|
|
78
162
|
readonly node: WrGraphNode<TData>;
|
|
79
163
|
readonly width: number;
|
|
@@ -96,7 +180,8 @@ interface GraphView<TData> {
|
|
|
96
180
|
/**
|
|
97
181
|
* A graph of blocks joined by parent-child links, laid out in layers from top to
|
|
98
182
|
* bottom. Display only: nothing is selectable, and the graph scrolls inside its
|
|
99
|
-
* own viewport rather than the page.
|
|
183
|
+
* own viewport rather than the page. With `zoomable` the viewport zooms and pans
|
|
184
|
+
* instead of scrolling.
|
|
100
185
|
*
|
|
101
186
|
* The layout runs in a `computed` with no DOM and no measuring, so the sizes are
|
|
102
187
|
* the consumer's: `nodeWidth` / `nodeHeight` for every node, or `width` /
|
|
@@ -147,15 +232,66 @@ export declare class WrGraph<TData = unknown> {
|
|
|
147
232
|
readonly nodeHeight: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
148
233
|
/** Accessible name of the scrolling viewport. Falls back to `graph.label`, then `'Graph'`. */
|
|
149
234
|
readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
|
|
235
|
+
/**
|
|
236
|
+
* Lets the viewport zoom and pan instead of scrolling: `Ctrl` or `⌘` with the
|
|
237
|
+
* wheel, a pinch, a drag on the field, the keyboard and three buttons. A plain
|
|
238
|
+
* wheel or a two-finger scroll pans while the drawing has more to show that
|
|
239
|
+
* way, and scrolls the page once it has none. The drawing is fitted on first
|
|
240
|
+
* draw and whenever the layout changes its size, until the view is moved by
|
|
241
|
+
* hand. A touch drag on the graph then pans it rather than scrolling the page.
|
|
242
|
+
*
|
|
243
|
+
* @default false
|
|
244
|
+
*/
|
|
245
|
+
readonly zoomable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
246
|
+
/**
|
|
247
|
+
* Lets a plain wheel zoom, with no modifier key. The wheel then never pans,
|
|
248
|
+
* and the page no longer scrolls while the pointer is over the graph. Without
|
|
249
|
+
* it a plain wheel pans the drawing, and scrolls the page once the drawing has
|
|
250
|
+
* nothing more to show in that direction.
|
|
251
|
+
*
|
|
252
|
+
* @default false
|
|
253
|
+
*/
|
|
254
|
+
readonly wheelZoom: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
255
|
+
/**
|
|
256
|
+
* The zoom, where `1` is 100%. Two-way: it follows every gesture, and a value
|
|
257
|
+
* written to it zooms around the middle of the viewport, kept inside
|
|
258
|
+
* `minZoom` and `maxZoom`. Ignored unless `zoomable`.
|
|
259
|
+
*
|
|
260
|
+
* @default 1
|
|
261
|
+
*/
|
|
262
|
+
readonly zoom: import("@angular/core").ModelSignal<number>;
|
|
263
|
+
/**
|
|
264
|
+
* The smallest zoom.
|
|
265
|
+
*
|
|
266
|
+
* @default 0.25
|
|
267
|
+
*/
|
|
268
|
+
readonly minZoom: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
269
|
+
/**
|
|
270
|
+
* The largest zoom. Never below `minZoom`.
|
|
271
|
+
*
|
|
272
|
+
* @default 4
|
|
273
|
+
*/
|
|
274
|
+
readonly maxZoom: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
275
|
+
/** Accessible name of the zoom-in button. Falls back to `graph.zoomIn`, then `'Zoom in'`. */
|
|
276
|
+
readonly zoomInLabel: import("@angular/core").InputSignal<string | null>;
|
|
277
|
+
/** Accessible name of the zoom-out button. Falls back to `graph.zoomOut`, then `'Zoom out'`. */
|
|
278
|
+
readonly zoomOutLabel: import("@angular/core").InputSignal<string | null>;
|
|
279
|
+
/** Accessible name of the fit button. Falls back to `graph.fit`, then `'Fit to view'`. */
|
|
280
|
+
readonly fitLabel: import("@angular/core").InputSignal<string | null>;
|
|
150
281
|
/**
|
|
151
282
|
* An asynchronous layout rejected. Carries the rejection as thrown. The last
|
|
152
283
|
* picture stays on screen, and a run that was aborted never reports here.
|
|
153
284
|
*/
|
|
154
285
|
readonly layoutError: import("@angular/core").OutputEmitterRef<unknown>;
|
|
155
|
-
protected readonly label:
|
|
286
|
+
protected readonly label: Signal<string>;
|
|
156
287
|
private readonly parentsText;
|
|
157
288
|
private readonly childrenText;
|
|
158
|
-
protected readonly
|
|
289
|
+
protected readonly zoomInText: Signal<string>;
|
|
290
|
+
protected readonly zoomOutText: Signal<string>;
|
|
291
|
+
protected readonly fitText: Signal<string>;
|
|
292
|
+
protected readonly nodeTemplate: Signal<WrGraphNodeTemplate | undefined>;
|
|
293
|
+
private readonly viewportRef;
|
|
294
|
+
private readonly stageRef;
|
|
159
295
|
/** `url(#…)` for every edge's `marker-end`. */
|
|
160
296
|
protected readonly markerId: string;
|
|
161
297
|
protected readonly markerUrl: string;
|
|
@@ -164,6 +300,8 @@ export declare class WrGraph<TData = unknown> {
|
|
|
164
300
|
private readonly dir;
|
|
165
301
|
private readonly i18n;
|
|
166
302
|
private readonly localeId;
|
|
303
|
+
private readonly isBrowser;
|
|
304
|
+
private readonly reducedMotion;
|
|
167
305
|
private readonly isRtl;
|
|
168
306
|
private readonly locale;
|
|
169
307
|
/**
|
|
@@ -188,7 +326,7 @@ export declare class WrGraph<TData = unknown> {
|
|
|
188
326
|
* carries `wr-graph--pending` and the viewport `aria-busy` while it is. Always
|
|
189
327
|
* `false` with a synchronous layout.
|
|
190
328
|
*/
|
|
191
|
-
readonly layoutPending:
|
|
329
|
+
readonly layoutPending: Signal<boolean>;
|
|
192
330
|
/** Layout joined to the nodes and edges, direction-free, nodes in reading order. */
|
|
193
331
|
private readonly placed;
|
|
194
332
|
/**
|
|
@@ -196,14 +334,91 @@ export declare class WrGraph<TData = unknown> {
|
|
|
196
334
|
* same numbers and cannot drift apart — and kept apart from the layout so a
|
|
197
335
|
* direction change does not lay the graph out again.
|
|
198
336
|
*/
|
|
199
|
-
protected readonly view:
|
|
337
|
+
protected readonly view: Signal<GraphView<TData>>;
|
|
338
|
+
/** The zoom bounds, cleaned: a positive minimum, and a maximum never under it. */
|
|
339
|
+
private readonly bounds;
|
|
340
|
+
/** Where the drawing is. The one write per frame that moves it. */
|
|
341
|
+
private readonly at;
|
|
342
|
+
/**
|
|
343
|
+
* How far the drawing sits from its natural place, in pixels. Moves with every
|
|
344
|
+
* pan and with a zoom around a point. `{ x: 0, y: 0 }` until the view is fitted
|
|
345
|
+
* or moved.
|
|
346
|
+
*/
|
|
347
|
+
readonly pan: Signal<WrGraphPoint>;
|
|
348
|
+
/** The size of the drawing, which a fit answers to. Equal sizes are one value. */
|
|
349
|
+
private readonly size;
|
|
350
|
+
/** One `transform` on the stage. Absent at 100% in its natural place, which is also what a prerender ships. */
|
|
351
|
+
protected readonly stageTransform: Signal<string | null>;
|
|
352
|
+
protected readonly atMinZoom: Signal<boolean>;
|
|
353
|
+
protected readonly atMaxZoom: Signal<boolean>;
|
|
354
|
+
/** A drag or a pinch is under way: the host carries `wr-graph--panning`. */
|
|
355
|
+
protected readonly panning: import("@angular/core").WritableSignal<boolean>;
|
|
356
|
+
/** The move in flight came from a button or a key, so the stage eases to it. */
|
|
357
|
+
protected readonly animated: import("@angular/core").WritableSignal<boolean>;
|
|
358
|
+
/** The view was moved by hand, so a new layout no longer fits it. */
|
|
359
|
+
private moved;
|
|
360
|
+
/** Pointer and wheel moves wait here for the next frame. */
|
|
361
|
+
private queued;
|
|
362
|
+
private frameId;
|
|
363
|
+
private readonly pointers;
|
|
364
|
+
private dragging;
|
|
365
|
+
/** The zoom a Safari pinch started from, while one is under way. */
|
|
366
|
+
private pinchFrom;
|
|
200
367
|
/**
|
|
201
368
|
* The visually hidden sentence per node id: its parents, then its children, as
|
|
202
369
|
* name lists. Never a count — the catalogs have no plural forms. A neighbour
|
|
203
370
|
* linked by several edges is named once, and names follow reading order.
|
|
204
371
|
*/
|
|
205
|
-
protected readonly relations:
|
|
372
|
+
protected readonly relations: Signal<Map<string, string>>;
|
|
206
373
|
constructor();
|
|
374
|
+
/**
|
|
375
|
+
* Shows the whole drawing, centred, at the largest zoom that fits and never
|
|
376
|
+
* above 100%. The view follows the layout again afterwards: a result of
|
|
377
|
+
* another size is fitted too. Does nothing unless `zoomable`.
|
|
378
|
+
*/
|
|
379
|
+
fit(): void;
|
|
380
|
+
/**
|
|
381
|
+
* Puts the drawing back in its natural place at 100%. Counts as moving the
|
|
382
|
+
* view, so a later layout does not fit it. Does nothing unless `zoomable`.
|
|
383
|
+
*/
|
|
384
|
+
resetView(): void;
|
|
385
|
+
protected zoomIn(): void;
|
|
386
|
+
protected zoomOut(): void;
|
|
387
|
+
protected fitView(animate: boolean): void;
|
|
388
|
+
/** The viewport's box and where the stage starts in it. All zeros before the first render and on the server. */
|
|
389
|
+
private frame;
|
|
390
|
+
/** The fitted transform, or `null` while there is nothing to fit or no box to fit it in. */
|
|
391
|
+
private fitted;
|
|
392
|
+
/** The viewport's padding, which a fit and a scroll both stop at. */
|
|
393
|
+
private insets;
|
|
394
|
+
/** After a new drawing or a new box: fit it, or keep a view moved by hand within reach. */
|
|
395
|
+
private settle;
|
|
396
|
+
/** The transform the next frame will show. */
|
|
397
|
+
private current;
|
|
398
|
+
private bounded;
|
|
399
|
+
private commit;
|
|
400
|
+
/** A move from a pointer or the wheel: many may arrive in one frame, and one is drawn. */
|
|
401
|
+
private schedule;
|
|
402
|
+
private cancelFrame;
|
|
403
|
+
/** A step from a button or a key, around the middle of the viewport. */
|
|
404
|
+
private zoomBy;
|
|
405
|
+
private panBy;
|
|
406
|
+
private onWheel;
|
|
407
|
+
/**
|
|
408
|
+
* A plain wheel or a two-finger scroll, handled as a scroll container handles
|
|
409
|
+
* it: the drawing moves while it has more to show that way and the event is
|
|
410
|
+
* taken; once it has none the event is left alone and the page scrolls on.
|
|
411
|
+
*/
|
|
412
|
+
private onWheelPan;
|
|
413
|
+
private onGestureStart;
|
|
414
|
+
private onGestureChange;
|
|
415
|
+
private onGestureEnd;
|
|
416
|
+
private onKeydown;
|
|
417
|
+
private onPointerDown;
|
|
418
|
+
private onPointerMove;
|
|
419
|
+
private onPointerEnd;
|
|
420
|
+
/** Capture goes to the viewport only now, so a press that never moved still clicks what it pressed. */
|
|
421
|
+
private startDrag;
|
|
207
422
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrGraph<any>, never>;
|
|
208
423
|
static ɵcmp: i0.ɵɵComponentDeclaration<WrGraph<any>, "wr-graph", never, {
|
|
209
424
|
"nodes": {
|
|
@@ -231,94 +446,51 @@ export declare class WrGraph<TData = unknown> {
|
|
|
231
446
|
"required": false;
|
|
232
447
|
"isSignal": true;
|
|
233
448
|
};
|
|
449
|
+
"zoomable": {
|
|
450
|
+
"alias": "zoomable";
|
|
451
|
+
"required": false;
|
|
452
|
+
"isSignal": true;
|
|
453
|
+
};
|
|
454
|
+
"wheelZoom": {
|
|
455
|
+
"alias": "wheelZoom";
|
|
456
|
+
"required": false;
|
|
457
|
+
"isSignal": true;
|
|
458
|
+
};
|
|
459
|
+
"zoom": {
|
|
460
|
+
"alias": "zoom";
|
|
461
|
+
"required": false;
|
|
462
|
+
"isSignal": true;
|
|
463
|
+
};
|
|
464
|
+
"minZoom": {
|
|
465
|
+
"alias": "minZoom";
|
|
466
|
+
"required": false;
|
|
467
|
+
"isSignal": true;
|
|
468
|
+
};
|
|
469
|
+
"maxZoom": {
|
|
470
|
+
"alias": "maxZoom";
|
|
471
|
+
"required": false;
|
|
472
|
+
"isSignal": true;
|
|
473
|
+
};
|
|
474
|
+
"zoomInLabel": {
|
|
475
|
+
"alias": "zoomInLabel";
|
|
476
|
+
"required": false;
|
|
477
|
+
"isSignal": true;
|
|
478
|
+
};
|
|
479
|
+
"zoomOutLabel": {
|
|
480
|
+
"alias": "zoomOutLabel";
|
|
481
|
+
"required": false;
|
|
482
|
+
"isSignal": true;
|
|
483
|
+
};
|
|
484
|
+
"fitLabel": {
|
|
485
|
+
"alias": "fitLabel";
|
|
486
|
+
"required": false;
|
|
487
|
+
"isSignal": true;
|
|
488
|
+
};
|
|
234
489
|
}, {
|
|
490
|
+
"zoom": "zoomChange";
|
|
235
491
|
"layoutError": "layoutError";
|
|
236
492
|
}, ["nodeTemplate"], never, true, never>;
|
|
237
493
|
}
|
|
238
|
-
/**
|
|
239
|
-
* @license
|
|
240
|
-
*
|
|
241
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
242
|
-
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
243
|
-
*/
|
|
244
|
-
/** A point in graph space: origin top-left, y grows downward. */
|
|
245
|
-
interface WrGraphPoint {
|
|
246
|
-
readonly x: number;
|
|
247
|
-
readonly y: number;
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* What a layout reads about a node: resolved, plain and serialisable. The
|
|
251
|
-
* consumer's `data` never reaches a layout, and neither does the DOM — sizes
|
|
252
|
-
* arrive as finite numbers the component already resolved.
|
|
253
|
-
*/
|
|
254
|
-
interface WrGraphLayoutNode {
|
|
255
|
-
readonly id: string;
|
|
256
|
-
readonly width: number;
|
|
257
|
-
readonly height: number;
|
|
258
|
-
}
|
|
259
|
-
/** A layout edge. `from` is the parent, `to` the child; `id` is unique per edge. */
|
|
260
|
-
interface WrGraphLayoutEdge {
|
|
261
|
-
readonly id: string;
|
|
262
|
-
readonly from: string;
|
|
263
|
-
readonly to: string;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* The whole graph a layout works on. Input order IS the tie-break order, so the
|
|
267
|
-
* same arrays always produce the same picture. Parallel edges and self-loops
|
|
268
|
-
* are legal here; an edge naming a missing node is dropped silently, because
|
|
269
|
-
* the component has already warned about it.
|
|
270
|
-
*/
|
|
271
|
-
interface WrGraphLayoutInput {
|
|
272
|
-
readonly nodes: readonly WrGraphLayoutNode[];
|
|
273
|
-
readonly edges: readonly WrGraphLayoutEdge[];
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Per-call context. An object from day one so later fields are additive. The
|
|
277
|
-
* signal aborts when the input changes, or the graph is destroyed, before an
|
|
278
|
-
* asynchronous layout settles. An engine that cannot stop its work can leave it
|
|
279
|
-
* running: the graph drops the late result.
|
|
280
|
-
*/
|
|
281
|
-
interface WrGraphLayoutContext {
|
|
282
|
-
readonly signal: AbortSignal;
|
|
283
|
-
}
|
|
284
|
-
/** Where a node goes: its TOP-LEFT corner in graph space, which maps straight onto a CSS translate. */
|
|
285
|
-
interface WrGraphNodePlacement {
|
|
286
|
-
readonly id: string;
|
|
287
|
-
readonly x: number;
|
|
288
|
-
readonly y: number;
|
|
289
|
-
}
|
|
290
|
-
/** The polyline of one edge, from the `from` end to the `to` end — at least two points. */
|
|
291
|
-
interface WrGraphEdgeRoute {
|
|
292
|
-
readonly id: string;
|
|
293
|
-
readonly points: readonly WrGraphPoint[];
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* A finished layout. The bounding box starts at (0, 0) and measures
|
|
297
|
-
* `width` × `height`. Direction-free: RTL is applied after the layout, so these
|
|
298
|
-
* numbers never depend on `dir`.
|
|
299
|
-
*/
|
|
300
|
-
interface WrGraphLayoutResult {
|
|
301
|
-
readonly nodes: readonly WrGraphNodePlacement[];
|
|
302
|
-
readonly edges: readonly WrGraphEdgeRoute[];
|
|
303
|
-
readonly width: number;
|
|
304
|
-
readonly height: number;
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* The seam a layout engine plugs into. Used as both the type and the DI token,
|
|
308
|
-
* the way `WrDateAdapter` is.
|
|
309
|
-
*
|
|
310
|
-
* A synchronous result is drawn in the same pass. A Promise is for an engine
|
|
311
|
-
* that works in a worker or on a server: the graph keeps its last picture until
|
|
312
|
-
* the Promise resolves, and reports a rejection through `layoutError`.
|
|
313
|
-
*
|
|
314
|
-
* @example
|
|
315
|
-
* ```ts
|
|
316
|
-
* providers: [{ provide: WrGraphLayout, useClass: WorkerLayout }]
|
|
317
|
-
* ```
|
|
318
|
-
*/
|
|
319
|
-
export declare abstract class WrGraphLayout {
|
|
320
|
-
abstract layout(input: WrGraphLayoutInput, context: WrGraphLayoutContext): WrGraphLayoutResult | Promise<WrGraphLayoutResult>;
|
|
321
|
-
}
|
|
322
494
|
/** Options for {@link WrLayeredGraphLayout}. Spacing lives here, not on the component: the names are engine-specific. */
|
|
323
495
|
interface WrLayeredGraphLayoutOptions {
|
|
324
496
|
/** Horizontal gap between two nodes in one layer. Default `24`. */
|
package/types/ngwr-lightbox.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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 { WrOverlayAutoFocus } from "ngwr/overlay";
|
|
4
5
|
/**
|
|
5
6
|
* Image with click-to-zoom lightbox. The thumbnail is a plain `<img>`
|
|
6
7
|
* with whatever sizing/`object-fit` you give it; clicking opens a CDK
|
|
@@ -51,6 +52,15 @@ export declare class WrLightbox {
|
|
|
51
52
|
* paint. @default null
|
|
52
53
|
*/
|
|
53
54
|
readonly aspectRatio: import("@angular/core").InputSignal<string | number | null>;
|
|
55
|
+
/**
|
|
56
|
+
* Where focus goes when the viewer opens. `'dialog'` puts it on the viewer
|
|
57
|
+
* itself, with no ring, so the keyboard is inside and no button is lit;
|
|
58
|
+
* `'first-tabbable'` puts it on the Close button; `false` leaves it on the
|
|
59
|
+
* thumbnail. The viewer traps Tab in every mode, and closing returns focus to
|
|
60
|
+
* the thumbnail.
|
|
61
|
+
* @default 'dialog'
|
|
62
|
+
*/
|
|
63
|
+
readonly autoFocus: import("@angular/core").InputSignal<WrOverlayAutoFocus>;
|
|
54
64
|
/**
|
|
55
65
|
* Extra CSS classes for the viewer's overlay pane.
|
|
56
66
|
*
|
|
@@ -194,6 +204,11 @@ export declare class WrLightbox {
|
|
|
194
204
|
"required": false;
|
|
195
205
|
"isSignal": true;
|
|
196
206
|
};
|
|
207
|
+
"autoFocus": {
|
|
208
|
+
"alias": "autoFocus";
|
|
209
|
+
"required": false;
|
|
210
|
+
"isSignal": true;
|
|
211
|
+
};
|
|
197
212
|
"panelClass": {
|
|
198
213
|
"alias": "panelClass";
|
|
199
214
|
"required": false;
|
package/types/ngwr-overlay.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { InjectionToken, Injector } from "@angular/core";
|
|
3
|
+
import { FocusTrap } from "@angular/cdk/a11y";
|
|
3
4
|
import { ConnectedPosition, Overlay, OverlayContainer, OverlayRef } from "@angular/cdk/overlay";
|
|
4
5
|
import { Observable } from "rxjs";
|
|
5
6
|
import { Direction, Directionality } from "@angular/cdk/bidi";
|
|
@@ -95,6 +96,20 @@ export declare function wrAnchoredPositions(position: WrAnchoredPosition, option
|
|
|
95
96
|
* @param onClose Invoked on click.
|
|
96
97
|
*/
|
|
97
98
|
export declare function wrAppendOverlayClose(host: HTMLElement, className: string, label: string, onClose: () => void): HTMLButtonElement;
|
|
99
|
+
/**
|
|
100
|
+
* Moves focus into a freshly opened modal overlay the way its `autoFocus`
|
|
101
|
+
* option asks. An element marked `cdkFocusInitial` wins in every mode.
|
|
102
|
+
*
|
|
103
|
+
* `'first-tabbable'` is the focus trap's own initial focus. `'dialog'` focuses
|
|
104
|
+
* the panel (made programmatically focusable with `tabindex="-1"`), `false`
|
|
105
|
+
* leaves focus where it is. Both wait for the next render, because the content
|
|
106
|
+
* is not in the DOM before that.
|
|
107
|
+
*
|
|
108
|
+
* @internal
|
|
109
|
+
*/
|
|
110
|
+
export declare function wrFocusOverlay(host: HTMLElement, trap: FocusTrap, mode: WrOverlayAutoFocus, injector: Injector): void;
|
|
111
|
+
/** What a dialog or drawer does with focus when it opens. */
|
|
112
|
+
type WrOverlayAutoFocus = 'first-tabbable' | 'dialog' | false;
|
|
98
113
|
/**
|
|
99
114
|
* Keep an OPEN overlay on the application's reading direction.
|
|
100
115
|
*
|
|
@@ -344,4 +359,4 @@ export declare const WR_OVERLAY: InjectionToken<Overlay>;
|
|
|
344
359
|
* @internal
|
|
345
360
|
*/
|
|
346
361
|
export declare const WR_OVERLAY_CONTAINER: InjectionToken<OverlayContainer>;
|
|
347
|
-
export type { WrAnchoredPosition, WrAnchoredPositionsOptions };
|
|
362
|
+
export type { WrAnchoredPosition, WrAnchoredPositionsOptions, WrOverlayAutoFocus };
|