ngwr 16.6.0 → 16.7.1
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/avatar/styles/_index.scss +39 -0
- package/button/styles/_index.scss +45 -2
- package/checkbox/styles/_index.scss +4 -0
- package/copy-value/styles/_index.scss +4 -0
- package/dropdown/styles/_index.scss +17 -0
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-animations-aurora.mjs +3 -3
- package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
- package/fesm2022/ngwr-animations-confetti.mjs +3 -3
- package/fesm2022/ngwr-animations-decode.mjs +3 -3
- package/fesm2022/ngwr-animations-destruct.mjs +3 -3
- package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
- package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
- package/fesm2022/ngwr-animations-glitch.mjs +3 -3
- package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
- package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
- package/fesm2022/ngwr-animations-marquee.mjs +4 -3
- package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-animations-orbit.mjs +3 -3
- package/fesm2022/ngwr-animations-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
- package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
- package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-tilt.mjs +3 -3
- package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +171 -6
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-breadcrumbs.mjs +9 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +26 -6
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +5 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +9 -9
- package/fesm2022/ngwr-charts-core.mjs +6 -6
- package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-meter-group.mjs +3 -3
- package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +6 -6
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +7 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-copy-value.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker-testing.mjs +35 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +103 -53
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +40 -16
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +19 -18
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +181 -18
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +18 -18
- package/fesm2022/ngwr-dropdown-testing.mjs +5 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +59 -16
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +6 -5
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +7 -6
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +5 -0
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +68 -13
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +18 -16
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +30 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +100 -11
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +6 -2
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +6 -2
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +6 -2
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +6 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +6 -2
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +6 -2
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +6 -2
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +6 -2
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +6 -2
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +6 -2
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +6 -2
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-kk.mjs +520 -0
- package/fesm2022/ngwr-i18n-kk.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ko.mjs +6 -2
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +6 -2
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +6 -2
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +6 -2
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +6 -2
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +6 -2
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +6 -2
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +6 -2
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +6 -2
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +6 -2
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +6 -2
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +8 -4
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +3 -3
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +8 -8
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +8 -8
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +16 -15
- package/fesm2022/ngwr-load-state.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +9 -9
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +3 -0
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +32 -5
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +27 -27
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +7 -6
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +126 -16
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +75 -10
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form.mjs +10 -6
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +255 -7
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select.mjs +28 -19
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +17 -1
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +66 -11
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sortable-list.mjs +11 -11
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-router.mjs +89 -0
- package/fesm2022/ngwr-table-router.mjs.map +1 -0
- package/fesm2022/ngwr-table-testing.mjs +5 -0
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +282 -43
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +11 -7
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +8 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +60 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +15 -15
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +7 -6
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +4 -3
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +30 -2
- 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-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +18 -13
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +16 -0
- package/graph/styles/_index.scss +48 -0
- package/i18n/ar.json +4 -2
- package/i18n/cs.json +4 -2
- package/i18n/de.json +4 -2
- package/i18n/en.json +4 -2
- package/i18n/es.json +4 -2
- package/i18n/fr.json +4 -2
- package/i18n/he.json +4 -2
- package/i18n/hi.json +4 -2
- package/i18n/id.json +4 -2
- package/i18n/it.json +4 -2
- package/i18n/ja.json +4 -2
- package/i18n/kk.json +567 -0
- package/i18n/ko.json +4 -2
- package/i18n/nl.json +4 -2
- package/i18n/pl.json +4 -2
- package/i18n/pt.json +4 -2
- package/i18n/ru.json +4 -2
- package/i18n/sv.json +4 -2
- package/i18n/tr.json +4 -2
- package/i18n/uk.json +4 -2
- package/i18n/vi.json +4 -2
- package/i18n/zh-TW.json +4 -2
- package/i18n/zh.json +4 -2
- package/llms-full.txt +29 -18
- package/llms.txt +4 -1
- package/package.json +15 -7
- package/pagination/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +4 -2
- package/progress/styles/_index.scss +64 -0
- package/radio/styles/_index.scss +4 -0
- package/schematics/use/symbol-map.json +5 -0
- package/sidebar/styles/_index.scss +58 -6
- package/skills/ngwr/SKILL.md +7 -6
- package/skills/ngwr/references/catalog.md +6 -4
- package/switch/styles/_index.scss +4 -0
- package/table/styles/_index.scss +128 -32
- package/tabs/styles/_index.scss +9 -0
- package/theme/styles/_focus.scss +3 -1
- package/tour/styles/_index.scss +3 -2
- package/types/ngwr-avatar.d.ts +39 -0
- package/types/ngwr-button.d.ts +12 -0
- package/types/ngwr-date-picker-testing.d.ts +22 -0
- package/types/ngwr-date-picker.d.ts +84 -17
- package/types/ngwr-date.d.ts +51 -0
- package/types/ngwr-directives.d.ts +45 -0
- package/types/ngwr-dropdown-testing.d.ts +8 -1
- package/types/ngwr-dropdown.d.ts +29 -0
- package/types/ngwr-file-upload-testing.d.ts +10 -0
- package/types/ngwr-file-upload.d.ts +55 -1
- package/types/ngwr-form.d.ts +3 -1
- package/types/ngwr-graph-testing.d.ts +28 -1
- package/types/ngwr-graph.d.ts +53 -3
- package/types/ngwr-i18n-kk.d.ts +3 -0
- package/types/ngwr-image-cropper.d.ts +6 -0
- package/types/ngwr-pagination-testing.d.ts +8 -0
- package/types/ngwr-pagination.d.ts +16 -0
- package/types/ngwr-popover.d.ts +39 -0
- package/types/ngwr-progress.d.ts +63 -1
- package/types/ngwr-scroll.d.ts +95 -0
- package/types/ngwr-select.d.ts +31 -12
- package/types/ngwr-sidebar-testing.d.ts +21 -7
- package/types/ngwr-sidebar.d.ts +66 -4
- package/types/ngwr-table-router.d.ts +49 -0
- package/types/ngwr-table-testing.d.ts +7 -0
- package/types/ngwr-table.d.ts +185 -6
- package/types/ngwr-tabs-router.d.ts +4 -5
- package/types/ngwr-tabs-testing.d.ts +5 -1
- package/types/ngwr-tabs.d.ts +34 -1
- package/types/ngwr-utils.d.ts +13 -0
- package/types/ngwr-version.d.ts +1 -1
|
@@ -81,6 +81,25 @@ type WrDateRangePickerMode = 'date' | 'datetime' | 'month' | 'quarter' | 'year';
|
|
|
81
81
|
*/
|
|
82
82
|
/** Control size for `<wr-date-picker>` and `<wr-date-range-picker>` — shares the `--wr-control-*` contract. */
|
|
83
83
|
type WrDatePickerSize = 'sm' | 'md' | 'lg';
|
|
84
|
+
/**
|
|
85
|
+
* @license
|
|
86
|
+
*
|
|
87
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
88
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* What `<wr-date-picker>` holds in its `value` model: `'date'` is a `Date`,
|
|
92
|
+
* `'day'` is a `YYYY-MM-DD` string, the browser-local day `wrToDay` writes.
|
|
93
|
+
*/
|
|
94
|
+
type WrDatePickerValueFormat = 'date' | 'day';
|
|
95
|
+
/**
|
|
96
|
+
* The `value` type of `<wr-date-picker>` under a {@link WrDatePickerValueFormat}:
|
|
97
|
+
* `Date` for `'date'`, a string for `'day'`, either for a format that can be both.
|
|
98
|
+
* The first check is on `[F]`, not `F`: with no `valueFormat` binding the
|
|
99
|
+
* template type-checker passes the format as `any`, which a conditional on a
|
|
100
|
+
* bare `F` reads as both branches, and the value must then be the default `Date`.
|
|
101
|
+
*/
|
|
102
|
+
type WrDatePickerValue<F extends WrDatePickerValueFormat = 'date'> = [F] extends ['date'] ? Date : 'date' extends F ? Date | string : string;
|
|
84
103
|
/**
|
|
85
104
|
* @license
|
|
86
105
|
*
|
|
@@ -151,11 +170,13 @@ interface WrDateRangePreset {
|
|
|
151
170
|
* year and arranged by the i18n catalog; `[format]`, when set, replaces it,
|
|
152
171
|
* and the date typed in that format stands for the period it is in.
|
|
153
172
|
*
|
|
154
|
-
* A signal-forms native control: it implements `FormValueControl
|
|
155
|
-
*
|
|
173
|
+
* A signal-forms native control: it implements `FormValueControl`, so
|
|
174
|
+
* `[formField]` binds straight to its `value` model — no
|
|
156
175
|
* `ControlValueAccessor` in between. `[(value)]` works standalone, and classic
|
|
157
176
|
* `[(ngModel)]` / reactive forms keep working through Angular's bridge. Value
|
|
158
|
-
* type is `Date | null` for every mode
|
|
177
|
+
* type is `Date | null` for every mode, unless {@link valueFormat} is `'day'`:
|
|
178
|
+
* the model is then a `YYYY-MM-DD` string, and the class's type parameter is
|
|
179
|
+
* that format, inferred from the `valueFormat` binding in a template.
|
|
159
180
|
*
|
|
160
181
|
* Parses the input on every keystroke and emits only a date it can read and the
|
|
161
182
|
* calendar would accept. Anything else is REFUSED, never guessed: the bound value
|
|
@@ -184,11 +205,14 @@ interface WrDateRangePreset {
|
|
|
184
205
|
*
|
|
185
206
|
* <!-- Date + time -->
|
|
186
207
|
* <wr-date-picker mode="datetime" [(value)]="when" [showSeconds]="true" [step]="5" />
|
|
208
|
+
*
|
|
209
|
+
* <!-- A day string: `due` is a `signal<string | null>` holding '2026-03-01' -->
|
|
210
|
+
* <wr-date-picker valueFormat="day" [(value)]="due" min="2026-01-01" />
|
|
187
211
|
* ```
|
|
188
212
|
*
|
|
189
213
|
* @see https://ngwr.dev/reference/components/date-picker
|
|
190
214
|
*/
|
|
191
|
-
export declare class WrDatePicker implements FormValueControl<
|
|
215
|
+
export declare class WrDatePicker<F extends WrDatePickerValueFormat = 'date'> implements Omit<FormValueControl<WrDatePickerValue<F> | null>, 'min' | 'max'> {
|
|
192
216
|
/**
|
|
193
217
|
* What the picker picks: `'date'`, `'time'`, `'datetime'`, or a period held
|
|
194
218
|
* as its first day: `'week'`, `'month'`, `'quarter'`, `'year'`.
|
|
@@ -207,16 +231,38 @@ export declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
207
231
|
/** Placeholder shown when the input is empty. */
|
|
208
232
|
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
209
233
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
234
|
+
* What the `value` model holds. `'date'` is a `Date`. `'day'` is a
|
|
235
|
+
* `YYYY-MM-DD` string, the browser-local day `wrToDay` from `ngwr/date`
|
|
236
|
+
* writes, so a form posts what the picker holds. A string that is not a
|
|
237
|
+
* valid day in that form reads as empty.
|
|
238
|
+
*
|
|
239
|
+
* It applies where the value is a day: `mode="date"` and the period modes,
|
|
240
|
+
* which hold their first day. `time` and `datetime` hold an instant, which a
|
|
241
|
+
* day string cannot carry: they ignore it, keep a `Date`, and warn in dev mode.
|
|
242
|
+
*
|
|
243
|
+
* Only the model changes. `dateFilter` is still called with a `Date`, and a
|
|
244
|
+
* refusal still carries `Date`s in its payload.
|
|
245
|
+
* @default 'date'
|
|
246
|
+
*/
|
|
247
|
+
readonly valueFormat: import("@angular/core").InputSignal<F>;
|
|
248
|
+
/**
|
|
249
|
+
* Min selectable date (forwarded to the calendar): a `Date`, or a
|
|
250
|
+
* `YYYY-MM-DD` string under any `valueFormat`. Ignored in `time` mode, and a
|
|
251
|
+
* string that is not a valid day is no bound. A period mode refuses a period
|
|
252
|
+
* that ends before it.
|
|
212
253
|
*/
|
|
213
|
-
readonly min: import("@angular/core").InputSignal<Date | undefined>;
|
|
254
|
+
readonly min: import("@angular/core").InputSignal<string | Date | undefined>;
|
|
214
255
|
/**
|
|
215
|
-
* Max selectable date (forwarded to the calendar)
|
|
216
|
-
*
|
|
256
|
+
* Max selectable date (forwarded to the calendar): a `Date`, or a
|
|
257
|
+
* `YYYY-MM-DD` string under any `valueFormat`. Ignored in `time` mode, and a
|
|
258
|
+
* string that is not a valid day is no bound. A period mode refuses a period
|
|
259
|
+
* that starts after it.
|
|
260
|
+
*/
|
|
261
|
+
readonly max: import("@angular/core").InputSignal<string | Date | undefined>;
|
|
262
|
+
/**
|
|
263
|
+
* Predicate to disable specific dates (forwarded to the calendar). Ignored in
|
|
264
|
+
* `time` mode. Called with a `Date` at local midnight under either `valueFormat`.
|
|
217
265
|
*/
|
|
218
|
-
readonly max: import("@angular/core").InputSignal<Date | undefined>;
|
|
219
|
-
/** Predicate to disable specific dates (forwarded to the calendar). Ignored in `time` mode. */
|
|
220
266
|
readonly dateFilter: import("@angular/core").InputSignal<((date: Date) => boolean) | null>;
|
|
221
267
|
/**
|
|
222
268
|
* 12 / 24-hour clock, in the time panel and in the field, unless `format` is
|
|
@@ -275,8 +321,22 @@ export declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
275
321
|
private readonly dir;
|
|
276
322
|
protected readonly inputEl: Signal<ElementRef<HTMLInputElement>>;
|
|
277
323
|
protected readonly triggerEl: Signal<ElementRef<HTMLButtonElement> | undefined>;
|
|
278
|
-
/**
|
|
279
|
-
|
|
324
|
+
/**
|
|
325
|
+
* The picked value: a `Date`, or a `YYYY-MM-DD` string with
|
|
326
|
+
* `valueFormat="day"`. Bound by `[formField]`, or two-way via `[(value)]`.
|
|
327
|
+
*/
|
|
328
|
+
readonly value: import("@angular/core").ModelSignal<WrDatePickerValue<F> | null>;
|
|
329
|
+
/** Whether the model holds a day string: `valueFormat="day"` in a mode whose value is a day. */
|
|
330
|
+
private readonly holdsDay;
|
|
331
|
+
/** The model as the `Date` the field and the panels work on. */
|
|
332
|
+
private readonly date;
|
|
333
|
+
private readonly minDate;
|
|
334
|
+
private readonly maxDate;
|
|
335
|
+
/**
|
|
336
|
+
* The held day on the host as `data-day`, for a test or a stylesheet: empty
|
|
337
|
+
* while there is no value, absent when the model is a `Date`.
|
|
338
|
+
*/
|
|
339
|
+
protected readonly dayAttr: Signal<string | null>;
|
|
280
340
|
/** Emitted on blur so a bound field can mark itself touched. */
|
|
281
341
|
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
282
342
|
/** Fires after the popup opens. */
|
|
@@ -573,9 +633,11 @@ export declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
573
633
|
private closeOverlay;
|
|
574
634
|
private dispose;
|
|
575
635
|
private outOfBounds;
|
|
576
|
-
private
|
|
577
|
-
|
|
578
|
-
|
|
636
|
+
private sameValue;
|
|
637
|
+
private toDate;
|
|
638
|
+
private toModel;
|
|
639
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrDatePicker<any>, never>;
|
|
640
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WrDatePicker<any>, "wr-date-picker", never, {
|
|
579
641
|
"mode": {
|
|
580
642
|
"alias": "mode";
|
|
581
643
|
"required": false;
|
|
@@ -591,6 +653,11 @@ export declare class WrDatePicker implements FormValueControl<Date | null> {
|
|
|
591
653
|
"required": false;
|
|
592
654
|
"isSignal": true;
|
|
593
655
|
};
|
|
656
|
+
"valueFormat": {
|
|
657
|
+
"alias": "valueFormat";
|
|
658
|
+
"required": false;
|
|
659
|
+
"isSignal": true;
|
|
660
|
+
};
|
|
594
661
|
"min": {
|
|
595
662
|
"alias": "min";
|
|
596
663
|
"required": false;
|
|
@@ -1283,4 +1350,4 @@ export declare function wrThisWeek(): WrDateRangePresetFn;
|
|
|
1283
1350
|
export declare function wrThisMonth(): WrDateRangePresetFn;
|
|
1284
1351
|
/** The month before the one today is in, from its first day to its last. */
|
|
1285
1352
|
export declare function wrLastMonth(): WrDateRangePresetFn;
|
|
1286
|
-
export type { WrDateInputError, WrDatePickerMode, WrDatePickerSize, WrDateRange, WrDateRangeInputError, WrDateRangePickerMode, WrDateRangePreset, WrDateRangePresetContext, WrDateRangePresetFn };
|
|
1353
|
+
export type { WrDateInputError, WrDatePickerMode, WrDatePickerSize, WrDatePickerValue, WrDatePickerValueFormat, WrDateRange, WrDateRangeInputError, WrDateRangePickerMode, WrDateRangePreset, WrDateRangePresetContext, WrDateRangePresetFn };
|
package/types/ngwr-date.d.ts
CHANGED
|
@@ -461,6 +461,57 @@ export declare class WrNativeDateAdapter extends WrDateAdapter<Date> {
|
|
|
461
461
|
static ɵfac: i0.ɵɵFactoryDeclaration<WrNativeDateAdapter, never>;
|
|
462
462
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
463
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* @license
|
|
466
|
+
*
|
|
467
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
468
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
469
|
+
*/
|
|
470
|
+
/**
|
|
471
|
+
* The calendar day of a `Date` as `YYYY-MM-DD`, read in the browser's zone.
|
|
472
|
+
*
|
|
473
|
+
* `date.toISOString().slice(0, 10)` reads the day in UTC: just after midnight in
|
|
474
|
+
* Almaty it is still yesterday there, and in the evening in New York it is
|
|
475
|
+
* already tomorrow. This reads the local year, month and day, so the string is
|
|
476
|
+
* the day the user sees on the calendar.
|
|
477
|
+
*
|
|
478
|
+
* An Invalid Date, and a year outside 0 to 9999, give `''`: neither has a
|
|
479
|
+
* `YYYY-MM-DD` form.
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```ts
|
|
483
|
+
* wrToDay(new Date(2026, 2, 1, 0, 30)); // '2026-03-01', in every zone
|
|
484
|
+
* wrToDay(new Date(NaN)); // ''
|
|
485
|
+
* ```
|
|
486
|
+
*
|
|
487
|
+
* @see https://ngwr.dev/reference/pipes/wr-date
|
|
488
|
+
*/
|
|
489
|
+
export declare function wrToDay(date: Date): string;
|
|
490
|
+
/**
|
|
491
|
+
* Today as `YYYY-MM-DD`, in the browser's zone: `wrToDay(new Date())`.
|
|
492
|
+
*
|
|
493
|
+
* @see https://ngwr.dev/reference/pipes/wr-date
|
|
494
|
+
*/
|
|
495
|
+
export declare function wrToday(): string;
|
|
496
|
+
/**
|
|
497
|
+
* A `YYYY-MM-DD` string as a `Date` at that day's LOCAL midnight, the instant a
|
|
498
|
+
* date picker emits for it. The reverse of {@link wrToDay}.
|
|
499
|
+
*
|
|
500
|
+
* `null` for anything that is not a day on the calendar in exactly that form:
|
|
501
|
+
* `2026-02-30`, `2026-3-1`, `2026-03`, a string with a time, an empty string,
|
|
502
|
+
* `null` and `undefined`. Use `wrParseDate` for a value that may be any of the
|
|
503
|
+
* forms a backend sends.
|
|
504
|
+
*
|
|
505
|
+
* @example
|
|
506
|
+
* ```ts
|
|
507
|
+
* wrFromDay('2026-03-01'); // 1 March 2026, 00:00 local
|
|
508
|
+
* wrFromDay('2026-02-30'); // null
|
|
509
|
+
* wrFromDay('2026-03-01T09:30:00Z'); // null
|
|
510
|
+
* ```
|
|
511
|
+
*
|
|
512
|
+
* @see https://ngwr.dev/reference/pipes/wr-date
|
|
513
|
+
*/
|
|
514
|
+
export declare function wrFromDay(day: string | null | undefined): Date | null;
|
|
464
515
|
/**
|
|
465
516
|
* @license
|
|
466
517
|
*
|
|
@@ -222,4 +222,49 @@ export declare class WrFitText {
|
|
|
222
222
|
"isSignal": true;
|
|
223
223
|
};
|
|
224
224
|
}, {}, never, never, true, never>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Emits when the host enters or leaves the viewport.
|
|
228
|
+
*
|
|
229
|
+
* `(wrInView)` carries `true` on entering and `false` on leaving, and only on a
|
|
230
|
+
* change: an element that starts out of view emits nothing until it shows up.
|
|
231
|
+
* `wrInViewOnce` stops after the first entry. Every instance with the same
|
|
232
|
+
* `wrInViewThreshold` shares one `IntersectionObserver`. Nothing is observed on
|
|
233
|
+
* the server.
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```html
|
|
237
|
+
* <section (wrInView)="seen.set($event)" [wrInViewThreshold]="0.5"> … </section>
|
|
238
|
+
* <img wrInViewOnce (wrInView)="load()" />
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
export declare class WrInView {
|
|
242
|
+
/** Fires with `true` when the host enters the viewport and `false` when it leaves. */
|
|
243
|
+
readonly wrInView: import("@angular/core").OutputEmitterRef<boolean>;
|
|
244
|
+
/**
|
|
245
|
+
* The share of the host, from 0 to 1, that must be visible to count as in view.
|
|
246
|
+
* Read once, when the host first renders. A host taller than the viewport never
|
|
247
|
+
* reaches a threshold of 1.
|
|
248
|
+
*/
|
|
249
|
+
readonly wrInViewThreshold: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
250
|
+
/** Stop watching after the first entry. Bare `wrInViewOnce` is on. */
|
|
251
|
+
readonly wrInViewOnce: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
252
|
+
private readonly el;
|
|
253
|
+
private readonly pool;
|
|
254
|
+
constructor();
|
|
255
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WrInView, never>;
|
|
256
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<WrInView, "[wrInView]", never, {
|
|
257
|
+
"wrInViewThreshold": {
|
|
258
|
+
"alias": "wrInViewThreshold";
|
|
259
|
+
"required": false;
|
|
260
|
+
"isSignal": true;
|
|
261
|
+
};
|
|
262
|
+
"wrInViewOnce": {
|
|
263
|
+
"alias": "wrInViewOnce";
|
|
264
|
+
"required": false;
|
|
265
|
+
"isSignal": true;
|
|
266
|
+
};
|
|
267
|
+
}, {
|
|
268
|
+
"wrInView": "wrInView";
|
|
269
|
+
}, never, never, true, never>;
|
|
225
270
|
}
|
|
@@ -19,6 +19,8 @@ interface WrDropdownItemHarnessFilters extends BaseHarnessFilters {
|
|
|
19
19
|
readonly text?: string | RegExp;
|
|
20
20
|
/** Match only enabled (`false`) or only disabled (`true`) items. */
|
|
21
21
|
readonly disabled?: boolean;
|
|
22
|
+
/** Match only checked (`true`) or only unchecked (`false`) items. A plain item has no state and never matches. */
|
|
23
|
+
readonly checked?: boolean;
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* Test harness for one `<wr-dropdown-item>` inside a dropdown menu.
|
|
@@ -39,8 +41,13 @@ export declare class WrDropdownItemHarness extends ComponentHarness {
|
|
|
39
41
|
static with(options?: WrDropdownItemHarnessFilters): HarnessPredicate<WrDropdownItemHarness>;
|
|
40
42
|
/** The item's label, trimmed. A leading icon is not part of it. */
|
|
41
43
|
getText(): Promise<string>;
|
|
42
|
-
/** The role the item announces
|
|
44
|
+
/** The role the item announces: `menuitem`, or `menuitemcheckbox` / `menuitemradio` when it has a checked state. */
|
|
43
45
|
getRole(): Promise<string | null>;
|
|
46
|
+
/**
|
|
47
|
+
* The item's checked state: `true` or `false` for a `menuitemcheckbox` /
|
|
48
|
+
* `menuitemradio`, `null` for a plain item that has none.
|
|
49
|
+
*/
|
|
50
|
+
isChecked(): Promise<boolean | null>;
|
|
44
51
|
/** Whether the item refuses activation. */
|
|
45
52
|
isDisabled(): Promise<boolean>;
|
|
46
53
|
/** Whether the item opens a submenu. `WrDropdownHarness.openSubmenu()` opens it. */
|
package/types/ngwr-dropdown.d.ts
CHANGED
|
@@ -272,7 +272,14 @@ export declare class WrDropdown {
|
|
|
272
272
|
* ```html
|
|
273
273
|
* <wr-dropdown-item icon="copy" (click)="copy()">Copy</wr-dropdown-item>
|
|
274
274
|
* <wr-dropdown-item icon="trash" disabled>Delete</wr-dropdown-item>
|
|
275
|
+
* <wr-dropdown-item [checked]="grid()" (click)="grid.set(!grid())">Show grid</wr-dropdown-item>
|
|
276
|
+
* <wr-dropdown-item radio [checked]="view() === 'list'" (click)="view.set('list')">List</wr-dropdown-item>
|
|
275
277
|
* ```
|
|
278
|
+
*
|
|
279
|
+
* Set `checked` to `true` or `false` and the row reserves a check column and
|
|
280
|
+
* announces itself as `menuitemcheckbox` (or `menuitemradio` with `radio`),
|
|
281
|
+
* with `aria-checked`. The item never flips the state: bind `(click)` and
|
|
282
|
+
* update what `checked` reads. A click still leaves the menu open.
|
|
276
283
|
*/
|
|
277
284
|
export declare class WrDropdownItem {
|
|
278
285
|
constructor();
|
|
@@ -280,6 +287,18 @@ export declare class WrDropdownItem {
|
|
|
280
287
|
readonly icon: import("@angular/core").InputSignal<string | null>;
|
|
281
288
|
/** Disable interaction (suppresses pointer + keyboard). @default false */
|
|
282
289
|
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
290
|
+
/**
|
|
291
|
+
* Checked state. `null` (default) is a plain `menuitem` with no check column;
|
|
292
|
+
* `true` / `false` turn it into a `menuitemcheckbox` (or `menuitemradio` with
|
|
293
|
+
* `radio`) that shows a check mark while `true`. The item does not toggle
|
|
294
|
+
* itself: flip the state you bind here from `(click)`.
|
|
295
|
+
*
|
|
296
|
+
* @default null
|
|
297
|
+
*/
|
|
298
|
+
readonly checked: import("@angular/core").InputSignal<boolean | null>;
|
|
299
|
+
/** With `checked` set, announce as `menuitemradio` instead of `menuitemcheckbox`. @default false */
|
|
300
|
+
readonly radio: import("@angular/core").InputSignalWithTransform<boolean, any>;
|
|
301
|
+
protected readonly role: import("@angular/core").Signal<"menuitem" | "menuitemradio" | "menuitemcheckbox">;
|
|
283
302
|
protected readonly classes: import("@angular/core").Signal<string>;
|
|
284
303
|
private readonly host;
|
|
285
304
|
/** @internal Keyboard activation — fires the same click consumers bind to. */
|
|
@@ -296,6 +315,16 @@ export declare class WrDropdownItem {
|
|
|
296
315
|
"required": false;
|
|
297
316
|
"isSignal": true;
|
|
298
317
|
};
|
|
318
|
+
"checked": {
|
|
319
|
+
"alias": "checked";
|
|
320
|
+
"required": false;
|
|
321
|
+
"isSignal": true;
|
|
322
|
+
};
|
|
323
|
+
"radio": {
|
|
324
|
+
"alias": "radio";
|
|
325
|
+
"required": false;
|
|
326
|
+
"isSignal": true;
|
|
327
|
+
};
|
|
299
328
|
}, {}, never, ["*"], true, never>;
|
|
300
329
|
}
|
|
301
330
|
/**
|
|
@@ -16,6 +16,11 @@ interface WrFileUploadHarnessFilters extends BaseHarnessFilters {
|
|
|
16
16
|
/**
|
|
17
17
|
* Test harness for `<wr-file-upload>`.
|
|
18
18
|
*
|
|
19
|
+
* Stored files (`[stored]`) are rows like any other: they count in
|
|
20
|
+
* {@link getFileCount}, {@link getFileNames} and {@link getFileSizes}, come first,
|
|
21
|
+
* and {@link removeFile} / {@link removeFileNamed} press their remove button, which
|
|
22
|
+
* emits `(storedRemove)` rather than changing the bound value.
|
|
23
|
+
*
|
|
19
24
|
* The control a user operates is the `.wr-file-upload__zone` — a `role="button"`
|
|
20
25
|
* div that is the single tab stop; the `<input type="file">` behind it is
|
|
21
26
|
* `aria-hidden` and `tabindex="-1"`, and exists only so a click can be forwarded
|
|
@@ -195,6 +200,11 @@ export declare class WrFileUploadHarness extends ComponentHarness {
|
|
|
195
200
|
* `true` has to stub it.
|
|
196
201
|
*/
|
|
197
202
|
hasPreview(name: string): Promise<boolean>;
|
|
203
|
+
/**
|
|
204
|
+
* The `href` of this row's link, or `null` for a row whose name is plain text.
|
|
205
|
+
* Only a stored file (`[stored]`) with a `url` has one.
|
|
206
|
+
*/
|
|
207
|
+
getLink(name: string): Promise<string | null>;
|
|
198
208
|
/** Index of the row with this name, or a throw that says what the list holds. */
|
|
199
209
|
private indexNamed;
|
|
200
210
|
private rowNamed;
|
|
@@ -31,6 +31,25 @@ interface WrFileUploadStatus {
|
|
|
31
31
|
}
|
|
32
32
|
/** Per-file upload state, keyed by the `File` objects in `value`. */
|
|
33
33
|
type WrFileUploadStatusMap = ReadonlyMap<File, WrFileUploadStatus>;
|
|
34
|
+
/**
|
|
35
|
+
* A file that already lives on a server, listed through `[stored]`. It is not a
|
|
36
|
+
* `File` and never enters `value`: the app owns it, and says what happened to it
|
|
37
|
+
* through `(storedRemove)`.
|
|
38
|
+
*/
|
|
39
|
+
interface WrStoredFile {
|
|
40
|
+
/** The name shown in the row. */
|
|
41
|
+
readonly name: string;
|
|
42
|
+
/** Size in bytes. Left out, the row shows no size. */
|
|
43
|
+
readonly size?: number | null;
|
|
44
|
+
/** Where the file can be opened. Left out, the name is plain text. Opens in a new tab. */
|
|
45
|
+
readonly url?: string | null;
|
|
46
|
+
}
|
|
47
|
+
/** One row of a stored file, listed before the picked ones. */
|
|
48
|
+
interface StoredRow {
|
|
49
|
+
readonly stored: WrStoredFile;
|
|
50
|
+
readonly url: string | null;
|
|
51
|
+
readonly size: number | null;
|
|
52
|
+
}
|
|
34
53
|
/** One list row: the file, what `[status]` says about it and its thumbnail. */
|
|
35
54
|
interface FileRow {
|
|
36
55
|
readonly file: File;
|
|
@@ -118,6 +137,21 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
118
137
|
* @default null
|
|
119
138
|
*/
|
|
120
139
|
readonly status: import("@angular/core").InputSignal<WrFileUploadStatusMap | null>;
|
|
140
|
+
/**
|
|
141
|
+
* Files that already live on a server, listed before the picked ones with the
|
|
142
|
+
* same look: name, size when known, a link when `url` is set, and a remove
|
|
143
|
+
* button. They are not part of `value`, so a form value stays the `File`s the
|
|
144
|
+
* user picked. Removing one does not change this input: `(storedRemove)` emits
|
|
145
|
+
* the descriptor and the app drops it from the list it passes in.
|
|
146
|
+
*
|
|
147
|
+
* In multiple mode they count toward `maxFiles`. In single mode a pick does not
|
|
148
|
+
* replace them: the app clears its own list when it takes the new file. A
|
|
149
|
+
* `required` rule on the control sees `value` only, so an edit form whose file
|
|
150
|
+
* is stored validates against its own list instead.
|
|
151
|
+
*
|
|
152
|
+
* @default []
|
|
153
|
+
*/
|
|
154
|
+
readonly stored: import("@angular/core").InputSignal<readonly WrStoredFile[]>;
|
|
121
155
|
/**
|
|
122
156
|
* Show a thumbnail beside each image file. The thumbnail is an object URL,
|
|
123
157
|
* revoked when its file leaves the list or the component is destroyed. Browser
|
|
@@ -181,6 +215,8 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
181
215
|
private readonly removeText;
|
|
182
216
|
/** The remove button of one row, named after its file. */
|
|
183
217
|
protected removeName(name: string): string;
|
|
218
|
+
/** A link that leaves the page says so: `{{name}} (opens in a new tab)`. */
|
|
219
|
+
protected readonly openText: (params?: import("ngwr/i18n").WrI18nParams) => string;
|
|
184
220
|
protected readonly resolvedRetry: import("@angular/core").Signal<string>;
|
|
185
221
|
protected readonly resolvedUploading: import("@angular/core").Signal<string>;
|
|
186
222
|
protected readonly resolvedUploaded: import("@angular/core").Signal<string>;
|
|
@@ -196,6 +232,8 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
196
232
|
readonly value: import("@angular/core").ModelSignal<File | readonly File[] | null>;
|
|
197
233
|
/** Emitted when files are rejected for type / size / count reasons. */
|
|
198
234
|
readonly rejected: import("@angular/core").OutputEmitterRef<readonly WrFileUploadRejection[]>;
|
|
235
|
+
/** Emitted with the descriptor when the remove button of a stored row is pressed. */
|
|
236
|
+
readonly storedRemove: import("@angular/core").OutputEmitterRef<WrStoredFile>;
|
|
199
237
|
/** Emitted with the file when the retry button of a failed row is pressed. */
|
|
200
238
|
readonly retry: import("@angular/core").OutputEmitterRef<File>;
|
|
201
239
|
/** Emitted on commit so a bound field can mark itself touched. */
|
|
@@ -220,6 +258,7 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
220
258
|
/** The object URL of each previewed image file. */
|
|
221
259
|
private readonly previewUrls;
|
|
222
260
|
protected readonly rows: import("@angular/core").Signal<readonly FileRow[]>;
|
|
261
|
+
protected readonly storedRows: import("@angular/core").Signal<readonly StoredRow[]>;
|
|
223
262
|
/** `aria-busy` on the list: at least one file is uploading. */
|
|
224
263
|
protected readonly busy: import("@angular/core").Signal<boolean>;
|
|
225
264
|
/** What the one live region says: the states that changed in the last `[status]` write. */
|
|
@@ -276,6 +315,15 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
276
315
|
protected onDrop(event: DragEvent): void;
|
|
277
316
|
protected onPaste(event: ClipboardEvent): void;
|
|
278
317
|
protected onRetry(file: File, index: number): void;
|
|
318
|
+
protected removeStored(row: StoredRow, index: number): void;
|
|
319
|
+
/** The stored row whose remove button held focus when it was pressed, until the row leaves. */
|
|
320
|
+
private focusAfterStored;
|
|
321
|
+
/**
|
|
322
|
+
* Put focus on the remove button at the index `at` gives after the render,
|
|
323
|
+
* else the one before it, else the zone. Read late: a handler may change
|
|
324
|
+
* `stored` in the same cycle, which moves every picked row.
|
|
325
|
+
*/
|
|
326
|
+
private focusRemoveNear;
|
|
279
327
|
protected removeAt(index: number): void;
|
|
280
328
|
private acceptFiles;
|
|
281
329
|
/**
|
|
@@ -336,6 +384,11 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
336
384
|
"required": false;
|
|
337
385
|
"isSignal": true;
|
|
338
386
|
};
|
|
387
|
+
"stored": {
|
|
388
|
+
"alias": "stored";
|
|
389
|
+
"required": false;
|
|
390
|
+
"isSignal": true;
|
|
391
|
+
};
|
|
339
392
|
"previews": {
|
|
340
393
|
"alias": "previews";
|
|
341
394
|
"required": false;
|
|
@@ -399,8 +452,9 @@ export declare class WrFileUpload implements FormValueControl<File | readonly Fi
|
|
|
399
452
|
}, {
|
|
400
453
|
"value": "valueChange";
|
|
401
454
|
"rejected": "rejected";
|
|
455
|
+
"storedRemove": "storedRemove";
|
|
402
456
|
"retry": "retry";
|
|
403
457
|
"touch": "touch";
|
|
404
458
|
}, never, never, true, never>;
|
|
405
459
|
}
|
|
406
|
-
export type { WrFileUploadRejection, WrFileUploadRejectionReason, WrFileUploadSize, WrFileUploadState, WrFileUploadStatus, WrFileUploadStatusMap };
|
|
460
|
+
export type { WrFileUploadRejection, WrFileUploadRejectionReason, WrFileUploadSize, WrFileUploadState, WrFileUploadStatus, WrFileUploadStatusMap, WrStoredFile };
|
package/types/ngwr-form.d.ts
CHANGED
|
@@ -60,9 +60,11 @@ export declare class WrForm {
|
|
|
60
60
|
* @see https://ngwr.dev/reference/components/form
|
|
61
61
|
*/
|
|
62
62
|
export declare class WrFormSpan {
|
|
63
|
+
private readonly form;
|
|
63
64
|
constructor();
|
|
64
65
|
/**
|
|
65
|
-
* Columns to span. Empty or `'full'` takes the whole row.
|
|
66
|
+
* Columns to span. Empty or `'full'` takes the whole row. A number above
|
|
67
|
+
* the form's `columns` spans them all.
|
|
66
68
|
*
|
|
67
69
|
* @default 'full'
|
|
68
70
|
*/
|
|
@@ -83,10 +83,30 @@ export declare class WrGraphNodeHarness extends ComponentHarness {
|
|
|
83
83
|
* failure from a node that has nothing to say.
|
|
84
84
|
*/
|
|
85
85
|
getRelationText(): Promise<string | null>;
|
|
86
|
+
/**
|
|
87
|
+
* Whether the node is the selected one, from its button's `aria-pressed`. `false`
|
|
88
|
+
* on a graph that is not `selectable`, where no node is ever selected.
|
|
89
|
+
*/
|
|
90
|
+
isSelected(): Promise<boolean>;
|
|
91
|
+
/**
|
|
92
|
+
* Whether the node is lit as a neighbour of the selected one: an edge joins the
|
|
93
|
+
* two. `false` for the selected node itself, and while nothing is selected.
|
|
94
|
+
*/
|
|
95
|
+
isLinked(): Promise<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the node is dimmed: another node is selected and no edge joins the two.
|
|
98
|
+
* `false` while nothing is selected.
|
|
99
|
+
*/
|
|
100
|
+
isDimmed(): Promise<boolean>;
|
|
101
|
+
/** Selects the node with a click on its button; leaves a selected node as it is. Throws unless `selectable`. */
|
|
102
|
+
select(): Promise<void>;
|
|
103
|
+
/** Clears the selection if this node holds it, with a click on its button. Throws unless `selectable`. */
|
|
104
|
+
deselect(): Promise<void>;
|
|
105
|
+
private selectButton;
|
|
86
106
|
}
|
|
87
107
|
/**
|
|
88
108
|
* Test harness for `<wr-graph>` — blocks joined by parent-child lines, laid out in
|
|
89
|
-
* layers
|
|
109
|
+
* layers.
|
|
90
110
|
*
|
|
91
111
|
* The graph is read the way assistive technology reads it: the viewport's name, the
|
|
92
112
|
* nodes as a list in READING order (layer, then inline position — which is DOM order),
|
|
@@ -171,6 +191,13 @@ export declare class WrGraphHarness extends ComponentHarness {
|
|
|
171
191
|
from: string;
|
|
172
192
|
to: string;
|
|
173
193
|
}[]>;
|
|
194
|
+
/** Whether a node can be selected, from the host's `wr-graph--selectable`. */
|
|
195
|
+
isSelectable(): Promise<boolean>;
|
|
196
|
+
/**
|
|
197
|
+
* The selected node, or `null` while none is — which is also the answer on a graph
|
|
198
|
+
* that is not `selectable`, and for a `selected` id no drawn node has.
|
|
199
|
+
*/
|
|
200
|
+
getSelectedNode(): Promise<WrGraphNodeHarness | null>;
|
|
174
201
|
/** Whether the graph zooms and pans, from the host's `wr-graph--zoomable`. */
|
|
175
202
|
isZoomable(): Promise<boolean>;
|
|
176
203
|
/** Clicks the zoom-in button: one step, around the middle of the viewport. Throws unless `zoomable`. */
|
package/types/ngwr-graph.d.ts
CHANGED
|
@@ -179,9 +179,9 @@ interface GraphView<TData> {
|
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
181
|
* A graph of blocks joined by parent-child links, laid out in layers from top to
|
|
182
|
-
* bottom.
|
|
183
|
-
*
|
|
184
|
-
*
|
|
182
|
+
* bottom. The graph scrolls inside its own viewport rather than the page. With
|
|
183
|
+
* `zoomable` the viewport zooms and pans instead of scrolling. With `selectable`
|
|
184
|
+
* a node can be picked, which lights up its links and dims the rest.
|
|
185
185
|
*
|
|
186
186
|
* The layout runs in a `computed` with no DOM and no measuring, so the sizes are
|
|
187
187
|
* the consumer's: `nodeWidth` / `nodeHeight` for every node, or `width` /
|
|
@@ -272,6 +272,26 @@ export declare class WrGraph<TData = unknown> {
|
|
|
272
272
|
* @default 4
|
|
273
273
|
*/
|
|
274
274
|
readonly maxZoom: import("@angular/core").InputSignalWithTransform<number, unknown>;
|
|
275
|
+
/**
|
|
276
|
+
* Lets a node be selected: each node becomes a button, pressed while it is
|
|
277
|
+
* the selected one. A click, `Enter` or `Space` selects it, the same again or
|
|
278
|
+
* `Escape` clears the selection. While a node is selected, its edges and the
|
|
279
|
+
* nodes at their other ends stay lit and everything else is dimmed.
|
|
280
|
+
*
|
|
281
|
+
* A node template should hold no control of its own while this is on: the
|
|
282
|
+
* whole node is one button.
|
|
283
|
+
*
|
|
284
|
+
* @default false
|
|
285
|
+
*/
|
|
286
|
+
readonly selectable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
287
|
+
/**
|
|
288
|
+
* The id of the selected node, or `null`. Two-way: it follows every pick, and
|
|
289
|
+
* a value written to it selects that node. An id no drawn node has highlights
|
|
290
|
+
* nothing. Ignored unless `selectable`.
|
|
291
|
+
*
|
|
292
|
+
* @default null
|
|
293
|
+
*/
|
|
294
|
+
readonly selected: import("@angular/core").ModelSignal<string | null>;
|
|
275
295
|
/** Accessible name of the zoom-in button. Falls back to `graph.zoomIn`, then `'Zoom in'`. */
|
|
276
296
|
readonly zoomInLabel: import("@angular/core").InputSignal<string | null>;
|
|
277
297
|
/** Accessible name of the zoom-out button. Falls back to `graph.zoomOut`, then `'Zoom out'`. */
|
|
@@ -295,6 +315,9 @@ export declare class WrGraph<TData = unknown> {
|
|
|
295
315
|
/** `url(#…)` for every edge's `marker-end`. */
|
|
296
316
|
protected readonly markerId: string;
|
|
297
317
|
protected readonly markerUrl: string;
|
|
318
|
+
/** The arrowhead of a highlighted edge: a marker takes no colour from the path that uses it. */
|
|
319
|
+
protected readonly linkedMarkerId: string;
|
|
320
|
+
protected readonly linkedMarkerUrl: string;
|
|
298
321
|
protected readonly arrowSize = 6;
|
|
299
322
|
private readonly engine;
|
|
300
323
|
private readonly dir;
|
|
@@ -362,6 +385,8 @@ export declare class WrGraph<TData = unknown> {
|
|
|
362
385
|
private frameId;
|
|
363
386
|
private readonly pointers;
|
|
364
387
|
private dragging;
|
|
388
|
+
/** The last press became a drag, so the click that may follow it selects nothing. */
|
|
389
|
+
private dragged;
|
|
365
390
|
/** The zoom a Safari pinch started from, while one is under way. */
|
|
366
391
|
private pinchFrom;
|
|
367
392
|
/**
|
|
@@ -370,6 +395,15 @@ export declare class WrGraph<TData = unknown> {
|
|
|
370
395
|
* linked by several edges is named once, and names follow reading order.
|
|
371
396
|
*/
|
|
372
397
|
protected readonly relations: Signal<Map<string, string>>;
|
|
398
|
+
/**
|
|
399
|
+
* What the selection lights up: the selected node, the nodes at the other end
|
|
400
|
+
* of its edges, and those edges. `null` while nothing drawn is selected, and
|
|
401
|
+
* then no node or edge carries a highlight class at all.
|
|
402
|
+
*/
|
|
403
|
+
protected readonly highlight: Signal<{
|
|
404
|
+
nodes: Map<string, "selected" | "linked">;
|
|
405
|
+
edges: Set<string>;
|
|
406
|
+
} | null>;
|
|
373
407
|
constructor();
|
|
374
408
|
/**
|
|
375
409
|
* Shows the whole drawing, centred, at the largest zoom that fits and never
|
|
@@ -382,6 +416,11 @@ export declare class WrGraph<TData = unknown> {
|
|
|
382
416
|
* view, so a later layout does not fit it. Does nothing unless `zoomable`.
|
|
383
417
|
*/
|
|
384
418
|
resetView(): void;
|
|
419
|
+
protected onNodeClick(event: Event, id: string): void;
|
|
420
|
+
protected onNodeKeydown(event: KeyboardEvent, id: string): void;
|
|
421
|
+
/** Stopped only when it cleared something, so a dialog around the graph still closes on the next press. */
|
|
422
|
+
protected onEscape(event: Event): void;
|
|
423
|
+
private toggle;
|
|
385
424
|
protected zoomIn(): void;
|
|
386
425
|
protected zoomOut(): void;
|
|
387
426
|
protected fitView(animate: boolean): void;
|
|
@@ -471,6 +510,16 @@ export declare class WrGraph<TData = unknown> {
|
|
|
471
510
|
"required": false;
|
|
472
511
|
"isSignal": true;
|
|
473
512
|
};
|
|
513
|
+
"selectable": {
|
|
514
|
+
"alias": "selectable";
|
|
515
|
+
"required": false;
|
|
516
|
+
"isSignal": true;
|
|
517
|
+
};
|
|
518
|
+
"selected": {
|
|
519
|
+
"alias": "selected";
|
|
520
|
+
"required": false;
|
|
521
|
+
"isSignal": true;
|
|
522
|
+
};
|
|
474
523
|
"zoomInLabel": {
|
|
475
524
|
"alias": "zoomInLabel";
|
|
476
525
|
"required": false;
|
|
@@ -488,6 +537,7 @@ export declare class WrGraph<TData = unknown> {
|
|
|
488
537
|
};
|
|
489
538
|
}, {
|
|
490
539
|
"zoom": "zoomChange";
|
|
540
|
+
"selected": "selectedChange";
|
|
491
541
|
"layoutError": "layoutError";
|
|
492
542
|
}, ["nodeTemplate"], never, true, never>;
|
|
493
543
|
}
|