ngwr 16.2.0 → 16.4.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/badge/styles/_tag.scss +73 -1
- package/calendar/styles/_index.scss +22 -0
- package/carousel/styles/_index.scss +53 -1
- package/cascader/styles/_rules.scss +7 -0
- package/color-picker/styles/_index.scss +21 -0
- package/date-picker/styles/_index.scss +19 -0
- package/dropdown/styles/_index.scss +13 -19
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert-testing.mjs +70 -0
- package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +17 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- 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 +3 -3
- 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 +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +129 -11
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
- package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger-testing.mjs +45 -0
- package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-testing.mjs +18 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +500 -73
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel-testing.mjs +24 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +73 -10
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +45 -37
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- 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 +26 -11
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- 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-testing.mjs +3 -2
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- 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-testing.mjs +11 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +153 -37
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +10 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare-testing.mjs +84 -0
- package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +28 -13
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- 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 +30 -4
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +342 -69
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +59 -8
- 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 +18 -18
- package/fesm2022/ngwr-directives.mjs +15 -15
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +51 -29
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +70 -99
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +4 -3
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +186 -33
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +279 -16
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +9 -9
- 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 +664 -43
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +27 -8
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +27 -8
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +27 -8
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +27 -8
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +27 -8
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +27 -8
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +27 -8
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +27 -8
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +27 -8
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +27 -8
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +27 -8
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +27 -8
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +27 -8
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +27 -8
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +27 -8
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +27 -8
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +27 -8
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +27 -8
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +27 -8
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +27 -8
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +27 -8
- 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 +3 -3
- package/fesm2022/ngwr-input-number-testing.mjs +11 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +68 -7
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +23 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +24 -1
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +152 -36
- package/fesm2022/ngwr-input.mjs.map +1 -1
- 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 +15 -15
- 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 +175 -13
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +6 -3
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +31 -29
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +44 -63
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +7 -1
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +58 -156
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +50 -9
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
- 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-testing.mjs +113 -0
- package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
- package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-schema-form.mjs +416 -19
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select-testing.mjs +19 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +361 -84
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider-testing.mjs +6 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +21 -3
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +29 -12
- 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 +42 -11
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-testing.mjs +157 -3
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +1051 -74
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs-testing.mjs +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +15 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +11 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +128 -16
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +40 -19
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour-testing.mjs +13 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +19 -15
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +6 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +24 -5
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +62 -2
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +978 -79
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +97 -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-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +33 -22
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +156 -0
- package/graph/styles/_index.scss +87 -0
- package/i18n/ar.json +29 -8
- package/i18n/cs.json +29 -8
- package/i18n/de.json +29 -8
- package/i18n/en.json +29 -8
- package/i18n/es.json +29 -8
- package/i18n/fr.json +29 -8
- package/i18n/he.json +29 -8
- package/i18n/hi.json +29 -8
- package/i18n/id.json +29 -8
- package/i18n/it.json +29 -8
- package/i18n/ja.json +29 -8
- package/i18n/ko.json +29 -8
- package/i18n/nl.json +29 -8
- package/i18n/pl.json +29 -8
- package/i18n/pt.json +29 -8
- package/i18n/ru.json +29 -8
- package/i18n/sv.json +29 -8
- package/i18n/tr.json +29 -8
- package/i18n/uk.json +29 -8
- package/i18n/vi.json +29 -8
- package/i18n/zh-TW.json +29 -8
- package/i18n/zh.json +29 -8
- package/input/styles/_index.scss +68 -1
- package/input-otp/styles/_index.scss +14 -0
- package/llms-full.txt +53 -21
- package/llms.txt +57 -24
- package/overlay/styles/_arrow.scss +4 -4
- package/package.json +33 -1
- package/popconfirm/styles/_index.scss +3 -11
- package/progress/styles/_index.scss +32 -0
- package/schema-form/styles/_index.scss +78 -0
- 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/rule.js +2 -0
- package/schematics/use/symbol-map.json +5 -0
- package/select/styles/_index.scss +127 -22
- package/skills/ngwr/SKILL.md +31 -4
- package/skills/ngwr/references/catalog.md +9 -1
- package/slider/styles/_index.scss +22 -0
- package/table/styles/_index.scss +191 -3
- package/textarea/styles/_index.scss +80 -0
- package/theme/styles/_focus.scss +16 -1
- package/theme/styles/_motion.scss +5 -0
- package/transfer/styles/_index.scss +84 -0
- package/tree/styles/_index.scss +138 -5
- package/types/ngwr-alert-testing.d.ts +88 -0
- package/types/ngwr-badge.d.ts +72 -2
- package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
- package/types/ngwr-burger-testing.d.ts +51 -0
- package/types/ngwr-calendar-testing.d.ts +18 -6
- package/types/ngwr-calendar.d.ts +272 -22
- package/types/ngwr-carousel-testing.d.ts +27 -6
- package/types/ngwr-carousel.d.ts +42 -6
- package/types/ngwr-cascader.d.ts +13 -6
- package/types/ngwr-charts-chart-legend.d.ts +9 -4
- package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
- package/types/ngwr-charts-line-chart.d.ts +7 -4
- package/types/ngwr-color-picker-testing.d.ts +15 -4
- package/types/ngwr-color-picker.d.ts +76 -6
- package/types/ngwr-compare-testing.d.ts +72 -0
- package/types/ngwr-context-menu.d.ts +2 -0
- package/types/ngwr-date-picker-testing.d.ts +23 -8
- package/types/ngwr-date-picker.d.ts +100 -9
- package/types/ngwr-date.d.ts +71 -1
- package/types/ngwr-drawer.d.ts +9 -0
- package/types/ngwr-dropdown-testing.d.ts +20 -0
- package/types/ngwr-dropdown.d.ts +26 -6
- package/types/ngwr-event-calendar.d.ts +66 -8
- package/types/ngwr-file-upload-testing.d.ts +31 -2
- package/types/ngwr-file-upload.d.ts +156 -3
- package/types/ngwr-form.d.ts +47 -3
- package/types/ngwr-graph-testing.d.ts +36 -3
- package/types/ngwr-graph.d.ts +309 -13
- package/types/ngwr-input-number-testing.d.ts +10 -0
- package/types/ngwr-input-number.d.ts +30 -1
- package/types/ngwr-input-otp.d.ts +10 -0
- package/types/ngwr-input-testing.d.ts +30 -0
- package/types/ngwr-input.d.ts +54 -3
- package/types/ngwr-overlay.d.ts +84 -5
- package/types/ngwr-pipes.d.ts +2 -1
- package/types/ngwr-popconfirm-testing.d.ts +12 -3
- package/types/ngwr-popconfirm.d.ts +28 -3
- package/types/ngwr-popover-testing.d.ts +19 -2
- package/types/ngwr-popover.d.ts +22 -2
- package/types/ngwr-progress.d.ts +29 -1
- package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
- package/types/ngwr-resizable-testing.d.ts +116 -0
- package/types/ngwr-schema-form-testing.d.ts +260 -0
- package/types/ngwr-schema-form.d.ts +76 -6
- package/types/ngwr-select-testing.d.ts +20 -0
- package/types/ngwr-select.d.ts +149 -11
- package/types/ngwr-sidebar-testing.d.ts +176 -0
- package/types/ngwr-slider-testing.d.ts +3 -1
- package/types/ngwr-slider.d.ts +21 -1
- package/types/ngwr-sortable-list.d.ts +6 -0
- package/types/ngwr-stepper.d.ts +20 -11
- package/types/ngwr-table-testing.d.ts +122 -7
- package/types/ngwr-table.d.ts +572 -50
- package/types/ngwr-tabs-testing.d.ts +14 -17
- package/types/ngwr-tabs.d.ts +6 -0
- package/types/ngwr-textarea-testing.d.ts +10 -0
- package/types/ngwr-textarea.d.ts +48 -2
- package/types/ngwr-toast.d.ts +8 -1
- package/types/ngwr-tour-testing.d.ts +10 -0
- package/types/ngwr-tour.d.ts +11 -2
- package/types/ngwr-transfer-testing.d.ts +3 -0
- package/types/ngwr-transfer.d.ts +24 -1
- package/types/ngwr-tree-testing.d.ts +65 -1
- package/types/ngwr-tree.d.ts +335 -12
- package/types/ngwr-utils.d.ts +107 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +7 -4
|
@@ -4,11 +4,11 @@ import { coerceBooleanProperty, coerceNumberProperty } from "@angular/cdk/coerci
|
|
|
4
4
|
import { wrCheckStyles, wrClamp, wrGetFocusableElements, wrToClassList } from "ngwr/utils";
|
|
5
5
|
import { useI18nFormatter, useI18nText, wrReadI18nText } from "ngwr/i18n";
|
|
6
6
|
import { Directionality } from "@angular/cdk/bidi";
|
|
7
|
-
import { WrDateAdapter, wrDateLocale } from "ngwr/date";
|
|
7
|
+
import { WrDateAdapter, wrDateLocale, wrPeriodEnd, wrPeriodStart, wrWeekOfYear, wrWeekStart } from "ngwr/date";
|
|
8
|
+
import { WR_FORM_FIELD } from "ngwr/form";
|
|
8
9
|
import { ScrollStrategyOptions } from "@angular/cdk/overlay";
|
|
9
10
|
import { ComponentPortal } from "@angular/cdk/portal";
|
|
10
11
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
11
|
-
import { WR_FORM_FIELD } from "ngwr/form";
|
|
12
12
|
import { WR_OVERLAY, WrOutsideClick, wrFollowDirection, wrFollowSize } from "ngwr/overlay";
|
|
13
13
|
import { WrCalendar } from "ngwr/calendar";
|
|
14
14
|
import { WrInput, WrInputGroup, WrInputSuffix } from "ngwr/input";
|
|
@@ -256,7 +256,7 @@ var WrTimePanel = class WrTimePanel {
|
|
|
256
256
|
}
|
|
257
257
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
258
258
|
minVersion: "12.0.0",
|
|
259
|
-
version: "22.2.
|
|
259
|
+
version: "22.2.6",
|
|
260
260
|
ngImport: i0,
|
|
261
261
|
type: WrTimePanel,
|
|
262
262
|
deps: [],
|
|
@@ -264,7 +264,7 @@ var WrTimePanel = class WrTimePanel {
|
|
|
264
264
|
});
|
|
265
265
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
266
266
|
minVersion: "17.0.0",
|
|
267
|
-
version: "22.2.
|
|
267
|
+
version: "22.2.6",
|
|
268
268
|
type: WrTimePanel,
|
|
269
269
|
isStandalone: true,
|
|
270
270
|
selector: "wr-time-picker",
|
|
@@ -334,7 +334,7 @@ var WrTimePanel = class WrTimePanel {
|
|
|
334
334
|
};
|
|
335
335
|
i0.ɵɵngDeclareClassMetadata({
|
|
336
336
|
minVersion: "12.0.0",
|
|
337
|
-
version: "22.2.
|
|
337
|
+
version: "22.2.6",
|
|
338
338
|
ngImport: i0,
|
|
339
339
|
type: WrTimePanel,
|
|
340
340
|
decorators: [{
|
|
@@ -458,7 +458,7 @@ var WrDateTimePanel = class WrDateTimePanel {
|
|
|
458
458
|
}
|
|
459
459
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
460
460
|
minVersion: "12.0.0",
|
|
461
|
-
version: "22.2.
|
|
461
|
+
version: "22.2.6",
|
|
462
462
|
ngImport: i0,
|
|
463
463
|
type: WrDateTimePanel,
|
|
464
464
|
deps: [],
|
|
@@ -466,7 +466,7 @@ var WrDateTimePanel = class WrDateTimePanel {
|
|
|
466
466
|
});
|
|
467
467
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
468
468
|
minVersion: "17.2.0",
|
|
469
|
-
version: "22.2.
|
|
469
|
+
version: "22.2.6",
|
|
470
470
|
type: WrDateTimePanel,
|
|
471
471
|
isStandalone: true,
|
|
472
472
|
selector: "wr-date-time-panel",
|
|
@@ -552,15 +552,33 @@ var WrDateTimePanel = class WrDateTimePanel {
|
|
|
552
552
|
selector: "wr-calendar",
|
|
553
553
|
inputs: [
|
|
554
554
|
"mode",
|
|
555
|
+
"granularity",
|
|
555
556
|
"date",
|
|
556
557
|
"range",
|
|
558
|
+
"value",
|
|
557
559
|
"min",
|
|
558
560
|
"max",
|
|
559
561
|
"dateFilter",
|
|
560
562
|
"autoFocus",
|
|
561
|
-
"disabled"
|
|
563
|
+
"disabled",
|
|
564
|
+
"readonly",
|
|
565
|
+
"ariaLabel",
|
|
566
|
+
"prevMonthLabel",
|
|
567
|
+
"nextMonthLabel",
|
|
568
|
+
"monthListLabel",
|
|
569
|
+
"yearListLabel",
|
|
570
|
+
"quarterListLabel",
|
|
571
|
+
"prevYearLabel",
|
|
572
|
+
"nextYearLabel",
|
|
573
|
+
"prevYearsLabel",
|
|
574
|
+
"nextYearsLabel"
|
|
562
575
|
],
|
|
563
|
-
outputs: [
|
|
576
|
+
outputs: [
|
|
577
|
+
"dateChange",
|
|
578
|
+
"rangeChange",
|
|
579
|
+
"valueChange",
|
|
580
|
+
"touch"
|
|
581
|
+
]
|
|
564
582
|
}, {
|
|
565
583
|
kind: "component",
|
|
566
584
|
type: WrTimePanel,
|
|
@@ -581,7 +599,7 @@ var WrDateTimePanel = class WrDateTimePanel {
|
|
|
581
599
|
};
|
|
582
600
|
i0.ɵɵngDeclareClassMetadata({
|
|
583
601
|
minVersion: "12.0.0",
|
|
584
|
-
version: "22.2.
|
|
602
|
+
version: "22.2.6",
|
|
585
603
|
ngImport: i0,
|
|
586
604
|
type: WrDateTimePanel,
|
|
587
605
|
decorators: [{
|
|
@@ -706,9 +724,16 @@ function useDateInputRefusals(pick) {
|
|
|
706
724
|
message: formatText({ example })
|
|
707
725
|
};
|
|
708
726
|
},
|
|
709
|
-
|
|
727
|
+
unreadableAs(example) {
|
|
728
|
+
return {
|
|
729
|
+
kind: "dateFormat",
|
|
730
|
+
example,
|
|
731
|
+
message: formatText({ example })
|
|
732
|
+
};
|
|
733
|
+
},
|
|
734
|
+
outOfBounds(date, { min, max, filter }, end = date) {
|
|
710
735
|
const adapter = dates();
|
|
711
|
-
if (min && adapter.compareDate(
|
|
736
|
+
if (min && adapter.compareDate(end, min) < 0) return {
|
|
712
737
|
kind: "minDate",
|
|
713
738
|
date,
|
|
714
739
|
min,
|
|
@@ -720,11 +745,17 @@ function useDateInputRefusals(pick) {
|
|
|
720
745
|
max,
|
|
721
746
|
message: maxText()
|
|
722
747
|
};
|
|
723
|
-
if (filter
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
748
|
+
if (filter) {
|
|
749
|
+
let day = date;
|
|
750
|
+
while (!filter(day)) {
|
|
751
|
+
if (adapter.compareDate(day, end) >= 0) return {
|
|
752
|
+
kind: "dateFilter",
|
|
753
|
+
date,
|
|
754
|
+
message: filterText()
|
|
755
|
+
};
|
|
756
|
+
day = adapter.addDays(day, 1);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
728
759
|
return null;
|
|
729
760
|
}
|
|
730
761
|
};
|
|
@@ -788,7 +819,7 @@ var WrDateInputField = class WrDateInputField {
|
|
|
788
819
|
}
|
|
789
820
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
790
821
|
minVersion: "12.0.0",
|
|
791
|
-
version: "22.2.
|
|
822
|
+
version: "22.2.6",
|
|
792
823
|
ngImport: i0,
|
|
793
824
|
type: WrDateInputField,
|
|
794
825
|
deps: [],
|
|
@@ -796,14 +827,14 @@ var WrDateInputField = class WrDateInputField {
|
|
|
796
827
|
});
|
|
797
828
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
798
829
|
minVersion: "12.0.0",
|
|
799
|
-
version: "22.2.
|
|
830
|
+
version: "22.2.6",
|
|
800
831
|
ngImport: i0,
|
|
801
832
|
type: WrDateInputField
|
|
802
833
|
});
|
|
803
834
|
};
|
|
804
835
|
i0.ɵɵngDeclareClassMetadata({
|
|
805
836
|
minVersion: "12.0.0",
|
|
806
|
-
version: "22.2.
|
|
837
|
+
version: "22.2.6",
|
|
807
838
|
ngImport: i0,
|
|
808
839
|
type: WrDateInputField,
|
|
809
840
|
decorators: [{ type: Injectable }]
|
|
@@ -818,6 +849,133 @@ const WR_DATE_INPUT_FIELD_VIEW_PROVIDER = {
|
|
|
818
849
|
* Use of this source code is governed by an MIT-style license that can be
|
|
819
850
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
820
851
|
*/
|
|
852
|
+
const MARK = 57344;
|
|
853
|
+
const MARKS = /([\ue000-\ue00f])/;
|
|
854
|
+
const REGEX_META = /[.*+?^${}()|[\]\\]/g;
|
|
855
|
+
const PERIODS = /* @__PURE__ */ new Set([
|
|
856
|
+
"week",
|
|
857
|
+
"month",
|
|
858
|
+
"quarter",
|
|
859
|
+
"year"
|
|
860
|
+
]);
|
|
861
|
+
function escapeRegex(value) {
|
|
862
|
+
return value.replace(REGEX_META, "\\$&");
|
|
863
|
+
}
|
|
864
|
+
function literal(text) {
|
|
865
|
+
return text.split(/\s+/).map(escapeRegex).join("\\s*");
|
|
866
|
+
}
|
|
867
|
+
function readTemplate(text, format, fields) {
|
|
868
|
+
const names = Object.keys(fields);
|
|
869
|
+
const marked = format(Object.fromEntries(names.map((name, i) => [name, String.fromCharCode(MARK + i)])));
|
|
870
|
+
const order = [];
|
|
871
|
+
let source = "";
|
|
872
|
+
for (const piece of marked.split(MARKS)) {
|
|
873
|
+
const name = piece.length === 1 ? names[piece.charCodeAt(0) - MARK] : void 0;
|
|
874
|
+
if (name) {
|
|
875
|
+
order.push(name);
|
|
876
|
+
source += `(${fields[name]})`;
|
|
877
|
+
} else source += literal(piece);
|
|
878
|
+
}
|
|
879
|
+
const match = new RegExp(`^\\s*${source}\\s*$`, "iu").exec(text);
|
|
880
|
+
if (!match || order.length !== names.length) return null;
|
|
881
|
+
return Object.fromEntries(order.map((name, i) => [name, match[i + 1]]));
|
|
882
|
+
}
|
|
883
|
+
const YEAR = "\\d{4}";
|
|
884
|
+
function wrPickerPeriod(mode) {
|
|
885
|
+
return PERIODS.has(mode) ? mode : null;
|
|
886
|
+
}
|
|
887
|
+
function usePickerText(source) {
|
|
888
|
+
const monthText = useI18nFormatter("calendar.header", "{{month}} {{year}}");
|
|
889
|
+
const quarterText = useI18nFormatter("datePicker.quarterValue", "Q{{quarter}} {{year}}");
|
|
890
|
+
const weekText = useI18nFormatter("datePicker.weekValue", "Week {{week}}, {{year}}");
|
|
891
|
+
const own = () => source.explicit() ? null : source.period();
|
|
892
|
+
const showPeriod = (date, period) => {
|
|
893
|
+
const adapter = source.adapter();
|
|
894
|
+
const year = adapter.getYear(date);
|
|
895
|
+
const month = adapter.getMonth(date);
|
|
896
|
+
switch (period) {
|
|
897
|
+
case "year": return String(year);
|
|
898
|
+
case "month": return monthText({
|
|
899
|
+
month: adapter.getMonthNames("long")[month],
|
|
900
|
+
year
|
|
901
|
+
});
|
|
902
|
+
case "quarter": return quarterText({
|
|
903
|
+
quarter: Math.floor(month / 3) + 1,
|
|
904
|
+
year
|
|
905
|
+
});
|
|
906
|
+
case "week": return weekText({ ...wrWeekOfYear(adapter, date) });
|
|
907
|
+
}
|
|
908
|
+
};
|
|
909
|
+
const readPeriod = (raw, period) => {
|
|
910
|
+
const adapter = source.adapter();
|
|
911
|
+
switch (period) {
|
|
912
|
+
case "year": {
|
|
913
|
+
const text = raw.trim();
|
|
914
|
+
return new RegExp(`^${YEAR}$`).test(text) ? adapter.createDate(Number(text), 0, 1) : null;
|
|
915
|
+
}
|
|
916
|
+
case "month": {
|
|
917
|
+
const long = adapter.getMonthNames("long").map((name) => name.toLowerCase());
|
|
918
|
+
const short = adapter.getMonthNames("short").map((name) => name.toLowerCase());
|
|
919
|
+
const names = [...long, ...short].sort((a, b) => b.length - a.length).map(escapeRegex);
|
|
920
|
+
const read = readTemplate(raw, monthText, {
|
|
921
|
+
month: names.join("|"),
|
|
922
|
+
year: YEAR
|
|
923
|
+
});
|
|
924
|
+
if (!read) return null;
|
|
925
|
+
const typed = read["month"].toLowerCase();
|
|
926
|
+
const index = long.includes(typed) ? long.indexOf(typed) : short.indexOf(typed);
|
|
927
|
+
return index < 0 ? null : adapter.createDate(Number(read["year"]), index, 1);
|
|
928
|
+
}
|
|
929
|
+
case "quarter": {
|
|
930
|
+
const read = readTemplate(raw, quarterText, {
|
|
931
|
+
quarter: "[1-4]",
|
|
932
|
+
year: YEAR
|
|
933
|
+
});
|
|
934
|
+
return read ? adapter.createDate(Number(read["year"]), (Number(read["quarter"]) - 1) * 3, 1) : null;
|
|
935
|
+
}
|
|
936
|
+
case "week": {
|
|
937
|
+
const read = readTemplate(raw, weekText, {
|
|
938
|
+
week: "\\d{1,2}",
|
|
939
|
+
year: YEAR
|
|
940
|
+
});
|
|
941
|
+
return read ? wrWeekStart(adapter, Number(read["year"]), Number(read["week"])) : null;
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
};
|
|
945
|
+
const reference = () => {
|
|
946
|
+
const adapter = source.adapter();
|
|
947
|
+
return adapter.createDate(adapter.getYear(adapter.today()), 11, 31);
|
|
948
|
+
};
|
|
949
|
+
return {
|
|
950
|
+
show(date) {
|
|
951
|
+
const period = own();
|
|
952
|
+
return period ? showPeriod(date, period) : source.adapter().format(date, source.format());
|
|
953
|
+
},
|
|
954
|
+
read(raw) {
|
|
955
|
+
const adapter = source.adapter();
|
|
956
|
+
const period = own();
|
|
957
|
+
const parsed = period ? readPeriod(raw, period) : adapter.parse(raw, source.format());
|
|
958
|
+
if (!parsed || !adapter.isValid(parsed)) return null;
|
|
959
|
+
const snap = source.period();
|
|
960
|
+
return snap ? wrPeriodStart(adapter, parsed, snap) : parsed;
|
|
961
|
+
},
|
|
962
|
+
unreadable() {
|
|
963
|
+
const period = own();
|
|
964
|
+
return period ? source.refusals.unreadableAs(showPeriod(reference(), period)) : source.refusals.unreadable(source.format());
|
|
965
|
+
},
|
|
966
|
+
key() {
|
|
967
|
+
const period = own();
|
|
968
|
+
const adapter = source.adapter();
|
|
969
|
+
return period ? `${period}|${showPeriod(reference(), period)}|${adapter.displayKey()}` : `${source.format()}|${adapter.displayKey()}`;
|
|
970
|
+
}
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* @license
|
|
975
|
+
*
|
|
976
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
977
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
978
|
+
*/
|
|
821
979
|
function tabLeavesPane(pane, event) {
|
|
822
980
|
if (event.key !== "Tab" || event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey) return false;
|
|
823
981
|
const active = pane.ownerDocument.activeElement;
|
|
@@ -870,6 +1028,10 @@ var WrDatePicker = class WrDatePicker {
|
|
|
870
1028
|
transform: (v) => Math.max(1, coerceNumberProperty(v, 1))
|
|
871
1029
|
});
|
|
872
1030
|
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
1031
|
+
rounded = input(false, {
|
|
1032
|
+
...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
|
|
1033
|
+
transform: coerceBooleanProperty
|
|
1034
|
+
});
|
|
873
1035
|
clearable = input(false, {
|
|
874
1036
|
...ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {},
|
|
875
1037
|
transform: coerceBooleanProperty
|
|
@@ -887,7 +1049,8 @@ var WrDatePicker = class WrDatePicker {
|
|
|
887
1049
|
dayAdapter = inject(WrDateAdapter);
|
|
888
1050
|
environment = inject(EnvironmentInjector);
|
|
889
1051
|
get adapter() {
|
|
890
|
-
|
|
1052
|
+
const mode = this.mode();
|
|
1053
|
+
return wrPickerAdapter(this.dayAdapter, mode === "time" || mode === "datetime");
|
|
891
1054
|
}
|
|
892
1055
|
overlay = inject(WR_OVERLAY);
|
|
893
1056
|
outsideClick = inject(WrOutsideClick);
|
|
@@ -905,17 +1068,19 @@ var WrDatePicker = class WrDatePicker {
|
|
|
905
1068
|
text = signal("", ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
|
|
906
1069
|
hasValue = computed(() => this.value() != null, ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
|
|
907
1070
|
overlayOpen = signal(false, ...ngDevMode ? [{ debugName: "overlayOpen" }] : /* istanbul ignore next */ []);
|
|
1071
|
+
isOpen = this.overlayOpen.asReadonly();
|
|
908
1072
|
openedFrom = null;
|
|
909
1073
|
autoFocusPanel = false;
|
|
910
1074
|
resolvedFormat = computed(() => {
|
|
911
1075
|
const explicit = this.format();
|
|
912
1076
|
if (explicit) return explicit;
|
|
913
1077
|
const m = this.mode();
|
|
914
|
-
if (m
|
|
1078
|
+
if (m !== "time" && m !== "datetime") return "shortDate";
|
|
915
1079
|
return clockFormat(m === "datetime" ? "shortDateTime" : "time", this.timeFormat(), this.showSeconds());
|
|
916
1080
|
}, ...ngDevMode ? [{ debugName: "resolvedFormat" }] : /* istanbul ignore next */ []);
|
|
917
1081
|
isTime = computed(() => this.mode() === "time", ...ngDevMode ? [{ debugName: "isTime" }] : /* istanbul ignore next */ []);
|
|
918
1082
|
isDateTime = computed(() => this.mode() === "datetime", ...ngDevMode ? [{ debugName: "isDateTime" }] : /* istanbul ignore next */ []);
|
|
1083
|
+
period = computed(() => wrPickerPeriod(this.mode()), ...ngDevMode ? [{ debugName: "period" }] : /* istanbul ignore next */ []);
|
|
919
1084
|
labelDate = wrReadI18nText("datePicker.open", "Open calendar");
|
|
920
1085
|
labelTime = wrReadI18nText("datePicker.openTime", "Open time picker");
|
|
921
1086
|
labelDateTime = wrReadI18nText("datePicker.openDateTime", "Open date and time picker");
|
|
@@ -948,6 +1113,13 @@ var WrDatePicker = class WrDatePicker {
|
|
|
948
1113
|
return this.panelLabelDate();
|
|
949
1114
|
}, ...ngDevMode ? [{ debugName: "resolvedPanelLabel" }] : /* istanbul ignore next */ []);
|
|
950
1115
|
refusals = useDateInputRefusals(() => this.adapter);
|
|
1116
|
+
fieldText = usePickerText({
|
|
1117
|
+
adapter: () => this.adapter,
|
|
1118
|
+
period: () => this.period(),
|
|
1119
|
+
explicit: () => this.format(),
|
|
1120
|
+
format: () => this.resolvedFormat(),
|
|
1121
|
+
refusals: this.refusals
|
|
1122
|
+
});
|
|
951
1123
|
reportToForm = useFormParseErrors(this.value, () => this.onFormReset());
|
|
952
1124
|
inputField = inject(WrDateInputField);
|
|
953
1125
|
refusal = signal(null, ...ngDevMode ? [{ debugName: "refusal" }] : /* istanbul ignore next */ []);
|
|
@@ -969,6 +1141,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
969
1141
|
const parts = [`wr-date-picker--${this.mode()}`];
|
|
970
1142
|
const size = this.size();
|
|
971
1143
|
if (size !== "md") parts.push(`wr-date-picker--${size}`);
|
|
1144
|
+
if (this.rounded()) parts.push("wr-date-picker--rounded");
|
|
972
1145
|
if (this.disabled()) parts.push("wr-date-picker--disabled");
|
|
973
1146
|
if (this.inputError()) parts.push("wr-date-picker--invalid");
|
|
974
1147
|
return parts.join(" ");
|
|
@@ -990,7 +1163,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
990
1163
|
effect(() => {
|
|
991
1164
|
const v = this.value();
|
|
992
1165
|
const fmt = this.resolvedFormat();
|
|
993
|
-
const key = this.
|
|
1166
|
+
const key = this.fieldText.key();
|
|
994
1167
|
untracked(() => {
|
|
995
1168
|
const outside = v !== this.lastValue;
|
|
996
1169
|
const echo = this.sameDate(v, this.lastValue) && fmt === this.lastFormat && key === this.lastKey;
|
|
@@ -998,7 +1171,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
998
1171
|
this.lastFormat = fmt;
|
|
999
1172
|
this.lastKey = key;
|
|
1000
1173
|
if (echo && !(outside && this.refusal())) return;
|
|
1001
|
-
this.text.set(v && this.adapter.isValid(v) ? this.
|
|
1174
|
+
this.text.set(v && this.adapter.isValid(v) ? this.fieldText.show(v) : "");
|
|
1002
1175
|
this.refuse(null);
|
|
1003
1176
|
});
|
|
1004
1177
|
});
|
|
@@ -1019,6 +1192,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1019
1192
|
ref.setInput("min", this.min());
|
|
1020
1193
|
ref.setInput("max", this.max());
|
|
1021
1194
|
ref.setInput("dateFilter", this.dateFilter());
|
|
1195
|
+
ref.setInput("granularity", this.period() ?? "day");
|
|
1022
1196
|
});
|
|
1023
1197
|
effect(() => {
|
|
1024
1198
|
const ref = this.timeRef();
|
|
@@ -1050,9 +1224,9 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1050
1224
|
this.refuse(null);
|
|
1051
1225
|
return;
|
|
1052
1226
|
}
|
|
1053
|
-
const parsed = this.
|
|
1054
|
-
if (!parsed
|
|
1055
|
-
this.refuse(this.
|
|
1227
|
+
const parsed = this.fieldText.read(raw);
|
|
1228
|
+
if (!parsed) {
|
|
1229
|
+
this.refuse(this.fieldText.unreadable());
|
|
1056
1230
|
return;
|
|
1057
1231
|
}
|
|
1058
1232
|
const outOfBounds = this.outOfBounds(parsed);
|
|
@@ -1104,7 +1278,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1104
1278
|
}
|
|
1105
1279
|
settleText() {
|
|
1106
1280
|
const v = this.value();
|
|
1107
|
-
if (v && this.adapter.isValid(v)) this.text.set(this.
|
|
1281
|
+
if (v && this.adapter.isValid(v)) this.text.set(this.fieldText.show(v));
|
|
1108
1282
|
else if (!this.text()) this.commitValue(null);
|
|
1109
1283
|
}
|
|
1110
1284
|
refuse(next) {
|
|
@@ -1118,7 +1292,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1118
1292
|
onFormReset() {
|
|
1119
1293
|
if (!this.refusal()) return;
|
|
1120
1294
|
const v = this.value();
|
|
1121
|
-
this.text.set(v && this.adapter.isValid(v) ? this.
|
|
1295
|
+
this.text.set(v && this.adapter.isValid(v) ? this.fieldText.show(v) : "");
|
|
1122
1296
|
this.refuse(null);
|
|
1123
1297
|
}
|
|
1124
1298
|
onPaneFocusOut = (event) => {
|
|
@@ -1157,7 +1331,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1157
1331
|
}
|
|
1158
1332
|
focusPanel() {
|
|
1159
1333
|
const pane = this.overlayRef?.overlayElement;
|
|
1160
|
-
(pane?.querySelector(".wr-calendar__day--focused:not([disabled])") ?? pane?.querySelector(".wr-time-picker__input"))?.focus();
|
|
1334
|
+
(pane?.querySelector(".wr-calendar__day--focused:not([disabled])") ?? pane?.querySelector(".wr-calendar__chip[tabindex=\"0\"]") ?? pane?.querySelector(".wr-time-picker__input"))?.focus();
|
|
1161
1335
|
}
|
|
1162
1336
|
restoreFocus() {
|
|
1163
1337
|
(this.openedFrom?.isConnected ? this.openedFrom : this.inputEl().nativeElement)?.focus();
|
|
@@ -1244,6 +1418,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1244
1418
|
attachDate() {
|
|
1245
1419
|
if (!this.overlayRef) return;
|
|
1246
1420
|
const ref = this.overlayRef.attach(new ComponentPortal(WrCalendar));
|
|
1421
|
+
ref.setInput("granularity", this.period() ?? "day");
|
|
1247
1422
|
ref.setInput("date", this.value());
|
|
1248
1423
|
this.dateRef.set(ref);
|
|
1249
1424
|
ref.setInput("min", this.min());
|
|
@@ -1293,7 +1468,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1293
1468
|
}
|
|
1294
1469
|
commit(next) {
|
|
1295
1470
|
if (this.readonly() || this.disabled()) return;
|
|
1296
|
-
this.text.set(this.
|
|
1471
|
+
this.text.set(this.fieldText.show(next));
|
|
1297
1472
|
this.commitValue(next);
|
|
1298
1473
|
this.refuse(null);
|
|
1299
1474
|
}
|
|
@@ -1325,11 +1500,12 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1325
1500
|
}
|
|
1326
1501
|
outOfBounds(date) {
|
|
1327
1502
|
if (this.mode() === "time") return null;
|
|
1503
|
+
const period = this.period();
|
|
1328
1504
|
return this.refusals.outOfBounds(date, {
|
|
1329
1505
|
min: this.min(),
|
|
1330
1506
|
max: this.max(),
|
|
1331
1507
|
filter: this.dateFilter()
|
|
1332
|
-
});
|
|
1508
|
+
}, period ? wrPeriodEnd(this.adapter, date, period) : date);
|
|
1333
1509
|
}
|
|
1334
1510
|
sameDate(a, b) {
|
|
1335
1511
|
if (a === b) return true;
|
|
@@ -1338,7 +1514,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1338
1514
|
}
|
|
1339
1515
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1340
1516
|
minVersion: "12.0.0",
|
|
1341
|
-
version: "22.2.
|
|
1517
|
+
version: "22.2.6",
|
|
1342
1518
|
ngImport: i0,
|
|
1343
1519
|
type: WrDatePicker,
|
|
1344
1520
|
deps: [],
|
|
@@ -1346,7 +1522,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1346
1522
|
});
|
|
1347
1523
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1348
1524
|
minVersion: "17.0.0",
|
|
1349
|
-
version: "22.2.
|
|
1525
|
+
version: "22.2.6",
|
|
1350
1526
|
type: WrDatePicker,
|
|
1351
1527
|
isStandalone: true,
|
|
1352
1528
|
selector: "wr-date-picker",
|
|
@@ -1421,6 +1597,13 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1421
1597
|
isRequired: false,
|
|
1422
1598
|
transformFunction: null
|
|
1423
1599
|
},
|
|
1600
|
+
rounded: {
|
|
1601
|
+
classPropertyName: "rounded",
|
|
1602
|
+
publicName: "rounded",
|
|
1603
|
+
isSignal: true,
|
|
1604
|
+
isRequired: false,
|
|
1605
|
+
transformFunction: null
|
|
1606
|
+
},
|
|
1424
1607
|
clearable: {
|
|
1425
1608
|
classPropertyName: "clearable",
|
|
1426
1609
|
publicName: "clearable",
|
|
@@ -1503,7 +1686,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1503
1686
|
isSignal: true
|
|
1504
1687
|
}],
|
|
1505
1688
|
ngImport: i0,
|
|
1506
|
-
template: "<wr-input-group>\n <!--\n A plain textbox, per the APG date-picker-dialog pattern: `aria-haspopup` and\n `aria-expanded` are not permitted on `textbox` and belong to the trigger\n button below, which is the thing that opens the dialog.\n -->\n <input\n #input\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [size]=\"size()\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"ownAriaInvalid()\"\n [attr.aria-describedby]=\"ownDescribedBy()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput()\"\n (keydown)=\"onFieldKey($event)\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying the field is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled()\"\n (click)=\"toggleOverlay()\"\n >\n @if (isTime()) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5.75\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"7\" y1=\"7\" x2=\"7\" y2=\"3.75\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"7\" y1=\"7\" x2=\"9.5\" y2=\"7\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n } @else {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n }\n </button>\n</wr-input-group>\n<!--\n Why a typed entry was refused, for a screen reader: written when the refusal is\n shown (Enter, or leaving the field) and emptied when the text is corrected. Silent\n inside a <wr-form-field> bound to the same control, whose message says it instead,\n and silent when the app's catalog has no `validation.*` sentence for the refusal.\n-->\n<span class=\"wr-date-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n",
|
|
1689
|
+
template: "<wr-input-group [rounded]=\"rounded()\">\n <!--\n A plain textbox, per the APG date-picker-dialog pattern: `aria-haspopup` and\n `aria-expanded` are not permitted on `textbox` and belong to the trigger\n button below, which is the thing that opens the dialog.\n -->\n <input\n #input\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"ownAriaInvalid()\"\n [attr.aria-describedby]=\"ownDescribedBy()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput()\"\n (keydown)=\"onFieldKey($event)\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying the field is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled()\"\n (click)=\"toggleOverlay()\"\n >\n @if (isTime()) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5.75\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"7\" y1=\"7\" x2=\"7\" y2=\"3.75\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"7\" y1=\"7\" x2=\"9.5\" y2=\"7\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n } @else {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n }\n </button>\n</wr-input-group>\n<!--\n Why a typed entry was refused, for a screen reader: written when the refusal is\n shown (Enter, or leaving the field) and emptied when the text is corrected. Silent\n inside a <wr-form-field> bound to the same control, whose message says it instead,\n and silent when the app's catalog has no `validation.*` sentence for the refusal.\n-->\n<span class=\"wr-date-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n",
|
|
1507
1690
|
dependencies: [
|
|
1508
1691
|
{
|
|
1509
1692
|
kind: "directive",
|
|
@@ -1515,7 +1698,13 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1515
1698
|
kind: "component",
|
|
1516
1699
|
type: WrInputGroup,
|
|
1517
1700
|
selector: "wr-input-group",
|
|
1518
|
-
inputs: [
|
|
1701
|
+
inputs: [
|
|
1702
|
+
"rounded",
|
|
1703
|
+
"clearable",
|
|
1704
|
+
"clearLabel",
|
|
1705
|
+
"loading"
|
|
1706
|
+
],
|
|
1707
|
+
outputs: ["cleared"]
|
|
1519
1708
|
},
|
|
1520
1709
|
{
|
|
1521
1710
|
kind: "directive",
|
|
@@ -1529,7 +1718,7 @@ var WrDatePicker = class WrDatePicker {
|
|
|
1529
1718
|
};
|
|
1530
1719
|
i0.ɵɵngDeclareClassMetadata({
|
|
1531
1720
|
minVersion: "12.0.0",
|
|
1532
|
-
version: "22.2.
|
|
1721
|
+
version: "22.2.6",
|
|
1533
1722
|
ngImport: i0,
|
|
1534
1723
|
type: WrDatePicker,
|
|
1535
1724
|
decorators: [{
|
|
@@ -1548,7 +1737,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1548
1737
|
],
|
|
1549
1738
|
providers: [WrDateInputField],
|
|
1550
1739
|
viewProviders: [WR_DATE_INPUT_FIELD_VIEW_PROVIDER],
|
|
1551
|
-
template: "<wr-input-group>\n <!--\n A plain textbox, per the APG date-picker-dialog pattern: `aria-haspopup` and\n `aria-expanded` are not permitted on `textbox` and belong to the trigger\n button below, which is the thing that opens the dialog.\n -->\n <input\n #input\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [size]=\"size()\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"ownAriaInvalid()\"\n [attr.aria-describedby]=\"ownDescribedBy()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput()\"\n (keydown)=\"onFieldKey($event)\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying the field is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled()\"\n (click)=\"toggleOverlay()\"\n >\n @if (isTime()) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5.75\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"7\" y1=\"7\" x2=\"7\" y2=\"3.75\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"7\" y1=\"7\" x2=\"9.5\" y2=\"7\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n } @else {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n }\n </button>\n</wr-input-group>\n<!--\n Why a typed entry was refused, for a screen reader: written when the refusal is\n shown (Enter, or leaving the field) and emptied when the text is corrected. Silent\n inside a <wr-form-field> bound to the same control, whose message says it instead,\n and silent when the app's catalog has no `validation.*` sentence for the refusal.\n-->\n<span class=\"wr-date-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n"
|
|
1740
|
+
template: "<wr-input-group [rounded]=\"rounded()\">\n <!--\n A plain textbox, per the APG date-picker-dialog pattern: `aria-haspopup` and\n `aria-expanded` are not permitted on `textbox` and belong to the trigger\n button below, which is the thing that opens the dialog.\n -->\n <input\n #input\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-invalid]=\"ownAriaInvalid()\"\n [attr.aria-describedby]=\"ownDescribedBy()\"\n [value]=\"text()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput()\"\n (keydown)=\"onFieldKey($event)\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying the field is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled()\"\n (click)=\"toggleOverlay()\"\n >\n @if (isTime()) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <circle cx=\"7\" cy=\"7\" r=\"5.75\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"7\" y1=\"7\" x2=\"7\" y2=\"3.75\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"7\" y1=\"7\" x2=\"9.5\" y2=\"7\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n </svg>\n } @else {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n }\n </button>\n</wr-input-group>\n<!--\n Why a typed entry was refused, for a screen reader: written when the refusal is\n shown (Enter, or leaving the field) and emptied when the text is corrected. Silent\n inside a <wr-form-field> bound to the same control, whose message says it instead,\n and silent when the app's catalog has no `validation.*` sentence for the refusal.\n-->\n<span class=\"wr-date-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n"
|
|
1552
1741
|
}]
|
|
1553
1742
|
}],
|
|
1554
1743
|
ctorParameters: () => [],
|
|
@@ -1633,6 +1822,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1633
1822
|
required: false
|
|
1634
1823
|
}]
|
|
1635
1824
|
}],
|
|
1825
|
+
rounded: [{
|
|
1826
|
+
type: i0.Input,
|
|
1827
|
+
args: [{
|
|
1828
|
+
isSignal: true,
|
|
1829
|
+
alias: "rounded",
|
|
1830
|
+
required: false
|
|
1831
|
+
}]
|
|
1832
|
+
}],
|
|
1636
1833
|
clearable: [{
|
|
1637
1834
|
type: i0.Input,
|
|
1638
1835
|
args: [{
|
|
@@ -1737,6 +1934,7 @@ var WrDateRangePanel = class WrDateRangePanel {
|
|
|
1737
1934
|
max = input(null, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
1738
1935
|
dateFilter = input(null, ...ngDevMode ? [{ debugName: "dateFilter" }] : /* istanbul ignore next */ []);
|
|
1739
1936
|
withTime = input(false, ...ngDevMode ? [{ debugName: "withTime" }] : /* istanbul ignore next */ []);
|
|
1937
|
+
granularity = input("day", ...ngDevMode ? [{ debugName: "granularity" }] : /* istanbul ignore next */ []);
|
|
1740
1938
|
timeFormat = input("auto", ...ngDevMode ? [{ debugName: "timeFormat" }] : /* istanbul ignore next */ []);
|
|
1741
1939
|
showSeconds = input(false, ...ngDevMode ? [{ debugName: "showSeconds" }] : /* istanbul ignore next */ []);
|
|
1742
1940
|
step = input(1, ...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
|
|
@@ -1818,7 +2016,7 @@ var WrDateRangePanel = class WrDateRangePanel {
|
|
|
1818
2016
|
}
|
|
1819
2017
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1820
2018
|
minVersion: "12.0.0",
|
|
1821
|
-
version: "22.2.
|
|
2019
|
+
version: "22.2.6",
|
|
1822
2020
|
ngImport: i0,
|
|
1823
2021
|
type: WrDateRangePanel,
|
|
1824
2022
|
deps: [],
|
|
@@ -1826,7 +2024,7 @@ var WrDateRangePanel = class WrDateRangePanel {
|
|
|
1826
2024
|
});
|
|
1827
2025
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1828
2026
|
minVersion: "17.0.0",
|
|
1829
|
-
version: "22.2.
|
|
2027
|
+
version: "22.2.6",
|
|
1830
2028
|
type: WrDateRangePanel,
|
|
1831
2029
|
isStandalone: true,
|
|
1832
2030
|
selector: "wr-date-range-panel",
|
|
@@ -1866,6 +2064,13 @@ var WrDateRangePanel = class WrDateRangePanel {
|
|
|
1866
2064
|
isRequired: false,
|
|
1867
2065
|
transformFunction: null
|
|
1868
2066
|
},
|
|
2067
|
+
granularity: {
|
|
2068
|
+
classPropertyName: "granularity",
|
|
2069
|
+
publicName: "granularity",
|
|
2070
|
+
isSignal: true,
|
|
2071
|
+
isRequired: false,
|
|
2072
|
+
transformFunction: null
|
|
2073
|
+
},
|
|
1869
2074
|
timeFormat: {
|
|
1870
2075
|
classPropertyName: "timeFormat",
|
|
1871
2076
|
publicName: "timeFormat",
|
|
@@ -1922,22 +2127,40 @@ var WrDateRangePanel = class WrDateRangePanel {
|
|
|
1922
2127
|
classAttribute: "wr-date-range-panel"
|
|
1923
2128
|
},
|
|
1924
2129
|
ngImport: i0,
|
|
1925
|
-
template: "@if (resolvedPresets().length) {\n <div class=\"wr-date-range-presets\" role=\"group\" [attr.aria-label]=\"presetsLabel()\">\n @for (preset of resolvedPresets(); track $index) {\n <button\n type=\"button\"\n class=\"wr-date-range-presets__item\"\n [class.wr-date-range-presets__item--active]=\"preset.active\"\n [attr.aria-pressed]=\"preset.active\"\n [disabled]=\"preset.disabled\"\n (click)=\"presetPicked.emit(preset.range)\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n}\n\n<wr-calendar\n mode=\"range\"\n [range]=\"calendarRange()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [dateFilter]=\"dateFilter()\"\n [autoFocus]=\"autoFocus()\"\n (rangeChange)=\"onRangeChange($event)\"\n/>\n\n@if (withTime()) {\n <div class=\"wr-date-range-panel__times\">\n <!-- A time picker is several inputs, not one control, so each end is a\n labelled group rather than a <label>. -->\n <div class=\"wr-date-range-panel__time\" role=\"group\" [attr.aria-label]=\"startTimeLabel()\">\n <span class=\"wr-date-range-panel__time-label\" aria-hidden=\"true\">{{ startTimeLabel() }}</span>\n <wr-time-picker\n [value]=\"startTime()\"\n [format]=\"timeFormat()\"\n [showSeconds]=\"showSeconds()\"\n [step]=\"step()\"\n (valueChange)=\"onStartTimeChange($event)\"\n />\n </div>\n <div class=\"wr-date-range-panel__time\" role=\"group\" [attr.aria-label]=\"endTimeLabel()\">\n <span class=\"wr-date-range-panel__time-label\" aria-hidden=\"true\">{{ endTimeLabel() }}</span>\n <wr-time-picker\n [value]=\"endTime()\"\n [format]=\"timeFormat()\"\n [showSeconds]=\"showSeconds()\"\n [step]=\"step()\"\n (valueChange)=\"onEndTimeChange($event)\"\n />\n </div>\n </div>\n}\n",
|
|
2130
|
+
template: "@if (resolvedPresets().length) {\n <div class=\"wr-date-range-presets\" role=\"group\" [attr.aria-label]=\"presetsLabel()\">\n @for (preset of resolvedPresets(); track $index) {\n <button\n type=\"button\"\n class=\"wr-date-range-presets__item\"\n [class.wr-date-range-presets__item--active]=\"preset.active\"\n [attr.aria-pressed]=\"preset.active\"\n [disabled]=\"preset.disabled\"\n (click)=\"presetPicked.emit(preset.range)\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n}\n\n<wr-calendar\n mode=\"range\"\n [granularity]=\"granularity()\"\n [range]=\"calendarRange()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [dateFilter]=\"dateFilter()\"\n [autoFocus]=\"autoFocus()\"\n (rangeChange)=\"onRangeChange($event)\"\n/>\n\n@if (withTime()) {\n <div class=\"wr-date-range-panel__times\">\n <!-- A time picker is several inputs, not one control, so each end is a\n labelled group rather than a <label>. -->\n <div class=\"wr-date-range-panel__time\" role=\"group\" [attr.aria-label]=\"startTimeLabel()\">\n <span class=\"wr-date-range-panel__time-label\" aria-hidden=\"true\">{{ startTimeLabel() }}</span>\n <wr-time-picker\n [value]=\"startTime()\"\n [format]=\"timeFormat()\"\n [showSeconds]=\"showSeconds()\"\n [step]=\"step()\"\n (valueChange)=\"onStartTimeChange($event)\"\n />\n </div>\n <div class=\"wr-date-range-panel__time\" role=\"group\" [attr.aria-label]=\"endTimeLabel()\">\n <span class=\"wr-date-range-panel__time-label\" aria-hidden=\"true\">{{ endTimeLabel() }}</span>\n <wr-time-picker\n [value]=\"endTime()\"\n [format]=\"timeFormat()\"\n [showSeconds]=\"showSeconds()\"\n [step]=\"step()\"\n (valueChange)=\"onEndTimeChange($event)\"\n />\n </div>\n </div>\n}\n",
|
|
1926
2131
|
dependencies: [{
|
|
1927
2132
|
kind: "component",
|
|
1928
2133
|
type: WrCalendar,
|
|
1929
2134
|
selector: "wr-calendar",
|
|
1930
2135
|
inputs: [
|
|
1931
2136
|
"mode",
|
|
2137
|
+
"granularity",
|
|
1932
2138
|
"date",
|
|
1933
2139
|
"range",
|
|
2140
|
+
"value",
|
|
1934
2141
|
"min",
|
|
1935
2142
|
"max",
|
|
1936
2143
|
"dateFilter",
|
|
1937
2144
|
"autoFocus",
|
|
1938
|
-
"disabled"
|
|
2145
|
+
"disabled",
|
|
2146
|
+
"readonly",
|
|
2147
|
+
"ariaLabel",
|
|
2148
|
+
"prevMonthLabel",
|
|
2149
|
+
"nextMonthLabel",
|
|
2150
|
+
"monthListLabel",
|
|
2151
|
+
"yearListLabel",
|
|
2152
|
+
"quarterListLabel",
|
|
2153
|
+
"prevYearLabel",
|
|
2154
|
+
"nextYearLabel",
|
|
2155
|
+
"prevYearsLabel",
|
|
2156
|
+
"nextYearsLabel"
|
|
1939
2157
|
],
|
|
1940
|
-
outputs: [
|
|
2158
|
+
outputs: [
|
|
2159
|
+
"dateChange",
|
|
2160
|
+
"rangeChange",
|
|
2161
|
+
"valueChange",
|
|
2162
|
+
"touch"
|
|
2163
|
+
]
|
|
1941
2164
|
}, {
|
|
1942
2165
|
kind: "component",
|
|
1943
2166
|
type: WrTimePanel,
|
|
@@ -1958,7 +2181,7 @@ var WrDateRangePanel = class WrDateRangePanel {
|
|
|
1958
2181
|
};
|
|
1959
2182
|
i0.ɵɵngDeclareClassMetadata({
|
|
1960
2183
|
minVersion: "12.0.0",
|
|
1961
|
-
version: "22.2.
|
|
2184
|
+
version: "22.2.6",
|
|
1962
2185
|
ngImport: i0,
|
|
1963
2186
|
type: WrDateRangePanel,
|
|
1964
2187
|
decorators: [{
|
|
@@ -1972,7 +2195,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1972
2195
|
"[class.wr-date-range-panel--presets]": "presets().length > 0"
|
|
1973
2196
|
},
|
|
1974
2197
|
imports: [WrCalendar, WrTimePanel],
|
|
1975
|
-
template: "@if (resolvedPresets().length) {\n <div class=\"wr-date-range-presets\" role=\"group\" [attr.aria-label]=\"presetsLabel()\">\n @for (preset of resolvedPresets(); track $index) {\n <button\n type=\"button\"\n class=\"wr-date-range-presets__item\"\n [class.wr-date-range-presets__item--active]=\"preset.active\"\n [attr.aria-pressed]=\"preset.active\"\n [disabled]=\"preset.disabled\"\n (click)=\"presetPicked.emit(preset.range)\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n}\n\n<wr-calendar\n mode=\"range\"\n [range]=\"calendarRange()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [dateFilter]=\"dateFilter()\"\n [autoFocus]=\"autoFocus()\"\n (rangeChange)=\"onRangeChange($event)\"\n/>\n\n@if (withTime()) {\n <div class=\"wr-date-range-panel__times\">\n <!-- A time picker is several inputs, not one control, so each end is a\n labelled group rather than a <label>. -->\n <div class=\"wr-date-range-panel__time\" role=\"group\" [attr.aria-label]=\"startTimeLabel()\">\n <span class=\"wr-date-range-panel__time-label\" aria-hidden=\"true\">{{ startTimeLabel() }}</span>\n <wr-time-picker\n [value]=\"startTime()\"\n [format]=\"timeFormat()\"\n [showSeconds]=\"showSeconds()\"\n [step]=\"step()\"\n (valueChange)=\"onStartTimeChange($event)\"\n />\n </div>\n <div class=\"wr-date-range-panel__time\" role=\"group\" [attr.aria-label]=\"endTimeLabel()\">\n <span class=\"wr-date-range-panel__time-label\" aria-hidden=\"true\">{{ endTimeLabel() }}</span>\n <wr-time-picker\n [value]=\"endTime()\"\n [format]=\"timeFormat()\"\n [showSeconds]=\"showSeconds()\"\n [step]=\"step()\"\n (valueChange)=\"onEndTimeChange($event)\"\n />\n </div>\n </div>\n}\n"
|
|
2198
|
+
template: "@if (resolvedPresets().length) {\n <div class=\"wr-date-range-presets\" role=\"group\" [attr.aria-label]=\"presetsLabel()\">\n @for (preset of resolvedPresets(); track $index) {\n <button\n type=\"button\"\n class=\"wr-date-range-presets__item\"\n [class.wr-date-range-presets__item--active]=\"preset.active\"\n [attr.aria-pressed]=\"preset.active\"\n [disabled]=\"preset.disabled\"\n (click)=\"presetPicked.emit(preset.range)\"\n >\n {{ preset.label }}\n </button>\n }\n </div>\n}\n\n<wr-calendar\n mode=\"range\"\n [granularity]=\"granularity()\"\n [range]=\"calendarRange()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [dateFilter]=\"dateFilter()\"\n [autoFocus]=\"autoFocus()\"\n (rangeChange)=\"onRangeChange($event)\"\n/>\n\n@if (withTime()) {\n <div class=\"wr-date-range-panel__times\">\n <!-- A time picker is several inputs, not one control, so each end is a\n labelled group rather than a <label>. -->\n <div class=\"wr-date-range-panel__time\" role=\"group\" [attr.aria-label]=\"startTimeLabel()\">\n <span class=\"wr-date-range-panel__time-label\" aria-hidden=\"true\">{{ startTimeLabel() }}</span>\n <wr-time-picker\n [value]=\"startTime()\"\n [format]=\"timeFormat()\"\n [showSeconds]=\"showSeconds()\"\n [step]=\"step()\"\n (valueChange)=\"onStartTimeChange($event)\"\n />\n </div>\n <div class=\"wr-date-range-panel__time\" role=\"group\" [attr.aria-label]=\"endTimeLabel()\">\n <span class=\"wr-date-range-panel__time-label\" aria-hidden=\"true\">{{ endTimeLabel() }}</span>\n <wr-time-picker\n [value]=\"endTime()\"\n [format]=\"timeFormat()\"\n [showSeconds]=\"showSeconds()\"\n [step]=\"step()\"\n (valueChange)=\"onEndTimeChange($event)\"\n />\n </div>\n </div>\n}\n"
|
|
1976
2199
|
}]
|
|
1977
2200
|
}],
|
|
1978
2201
|
ctorParameters: () => [],
|
|
@@ -2017,6 +2240,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2017
2240
|
required: false
|
|
2018
2241
|
}]
|
|
2019
2242
|
}],
|
|
2243
|
+
granularity: [{
|
|
2244
|
+
type: i0.Input,
|
|
2245
|
+
args: [{
|
|
2246
|
+
isSignal: true,
|
|
2247
|
+
alias: "granularity",
|
|
2248
|
+
required: false
|
|
2249
|
+
}]
|
|
2250
|
+
}],
|
|
2020
2251
|
timeFormat: [{
|
|
2021
2252
|
type: i0.Input,
|
|
2022
2253
|
args: [{
|
|
@@ -2091,7 +2322,7 @@ var WrDateRangeEndInput = class WrDateRangeEndInput {
|
|
|
2091
2322
|
}
|
|
2092
2323
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2093
2324
|
minVersion: "12.0.0",
|
|
2094
|
-
version: "22.2.
|
|
2325
|
+
version: "22.2.6",
|
|
2095
2326
|
ngImport: i0,
|
|
2096
2327
|
type: WrDateRangeEndInput,
|
|
2097
2328
|
deps: [],
|
|
@@ -2099,7 +2330,7 @@ var WrDateRangeEndInput = class WrDateRangeEndInput {
|
|
|
2099
2330
|
});
|
|
2100
2331
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
2101
2332
|
minVersion: "14.0.0",
|
|
2102
|
-
version: "22.2.
|
|
2333
|
+
version: "22.2.6",
|
|
2103
2334
|
type: WrDateRangeEndInput,
|
|
2104
2335
|
isStandalone: true,
|
|
2105
2336
|
selector: "input[wrDateRangeEnd]",
|
|
@@ -2112,7 +2343,7 @@ var WrDateRangeEndInput = class WrDateRangeEndInput {
|
|
|
2112
2343
|
};
|
|
2113
2344
|
i0.ɵɵngDeclareClassMetadata({
|
|
2114
2345
|
minVersion: "12.0.0",
|
|
2115
|
-
version: "22.2.
|
|
2346
|
+
version: "22.2.6",
|
|
2116
2347
|
ngImport: i0,
|
|
2117
2348
|
type: WrDateRangeEndInput,
|
|
2118
2349
|
decorators: [{
|
|
@@ -2154,6 +2385,10 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2154
2385
|
transform: (v) => Math.max(1, coerceNumberProperty(v, 1))
|
|
2155
2386
|
});
|
|
2156
2387
|
size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
2388
|
+
rounded = input(false, {
|
|
2389
|
+
...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
|
|
2390
|
+
transform: coerceBooleanProperty
|
|
2391
|
+
});
|
|
2157
2392
|
clearable = input(false, {
|
|
2158
2393
|
...ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {},
|
|
2159
2394
|
transform: coerceBooleanProperty
|
|
@@ -2196,6 +2431,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2196
2431
|
return start != null || end != null;
|
|
2197
2432
|
}, ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
|
|
2198
2433
|
overlayOpen = signal(false, ...ngDevMode ? [{ debugName: "overlayOpen" }] : /* istanbul ignore next */ []);
|
|
2434
|
+
isOpen = this.overlayOpen.asReadonly();
|
|
2199
2435
|
openedFrom = null;
|
|
2200
2436
|
autoFocusPanel = false;
|
|
2201
2437
|
resolvedFormat = computed(() => {
|
|
@@ -2205,6 +2441,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2205
2441
|
return clockFormat("shortDateTime", this.timeFormat(), this.showSeconds());
|
|
2206
2442
|
}, ...ngDevMode ? [{ debugName: "resolvedFormat" }] : /* istanbul ignore next */ []);
|
|
2207
2443
|
isDateTime = computed(() => this.mode() === "datetime", ...ngDevMode ? [{ debugName: "isDateTime" }] : /* istanbul ignore next */ []);
|
|
2444
|
+
period = computed(() => wrPickerPeriod(this.mode()), ...ngDevMode ? [{ debugName: "period" }] : /* istanbul ignore next */ []);
|
|
2208
2445
|
triggerLabel = wrReadI18nText("datePicker.openRange", "Open range calendar");
|
|
2209
2446
|
startLabel = wrReadI18nText("datePicker.rangeStart", "Range start");
|
|
2210
2447
|
endLabel = wrReadI18nText("datePicker.rangeEnd", "Range end");
|
|
@@ -2219,6 +2456,13 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2219
2456
|
return this.isDateTime() ? this.panelLabelRangeDateTime() : this.panelLabelRange();
|
|
2220
2457
|
}, ...ngDevMode ? [{ debugName: "resolvedPanelLabel" }] : /* istanbul ignore next */ []);
|
|
2221
2458
|
refusalBuilder = useDateInputRefusals(() => this.adapter);
|
|
2459
|
+
fieldText = usePickerText({
|
|
2460
|
+
adapter: () => this.adapter,
|
|
2461
|
+
period: () => this.period(),
|
|
2462
|
+
explicit: () => this.format(),
|
|
2463
|
+
format: () => this.resolvedFormat(),
|
|
2464
|
+
refusals: this.refusalBuilder
|
|
2465
|
+
});
|
|
2222
2466
|
reportToForm = useFormParseErrors(this.value, () => this.onFormReset());
|
|
2223
2467
|
inputField = inject(WrDateInputField);
|
|
2224
2468
|
refusals = signal([null, null], ...ngDevMode ? [{ debugName: "refusals" }] : /* istanbul ignore next */ []);
|
|
@@ -2261,6 +2505,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2261
2505
|
const parts = [`wr-date-range-picker--${this.mode()}`];
|
|
2262
2506
|
const size = this.size();
|
|
2263
2507
|
if (size !== "md") parts.push(`wr-date-range-picker--${size}`);
|
|
2508
|
+
if (this.rounded()) parts.push("wr-date-range-picker--rounded");
|
|
2264
2509
|
if (this.disabled()) parts.push("wr-date-range-picker--disabled");
|
|
2265
2510
|
if (this.shownErrors().some(Boolean)) parts.push("wr-date-range-picker--invalid");
|
|
2266
2511
|
return parts.join(" ");
|
|
@@ -2278,7 +2523,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2278
2523
|
this.inputField.describe(computed(() => this.shownErrors()[0]));
|
|
2279
2524
|
effect(() => {
|
|
2280
2525
|
const v = this.value();
|
|
2281
|
-
const fmt =
|
|
2526
|
+
const fmt = this.fieldText.key();
|
|
2282
2527
|
untracked(() => {
|
|
2283
2528
|
const formatMoved = this.lastFormat !== null && fmt !== this.lastFormat;
|
|
2284
2529
|
this.lastFormat = fmt;
|
|
@@ -2314,6 +2559,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2314
2559
|
ref.setInput("step", this.step());
|
|
2315
2560
|
ref.setInput("presets", this.presets());
|
|
2316
2561
|
ref.setInput("presetsLabel", this.presetsLabel());
|
|
2562
|
+
ref.setInput("granularity", this.period() ?? "day");
|
|
2317
2563
|
});
|
|
2318
2564
|
}
|
|
2319
2565
|
onStartInput(event) {
|
|
@@ -2419,7 +2665,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2419
2665
|
}
|
|
2420
2666
|
focusPanel() {
|
|
2421
2667
|
const pane = this.overlayRef?.overlayElement;
|
|
2422
|
-
(pane?.querySelector(".wr-calendar__day--focused:not([disabled])") ?? pane?.querySelector(".wr-time-picker__input"))?.focus();
|
|
2668
|
+
(pane?.querySelector(".wr-calendar__day--focused:not([disabled])") ?? pane?.querySelector(".wr-calendar__chip[tabindex=\"0\"]") ?? pane?.querySelector(".wr-time-picker__input"))?.focus();
|
|
2423
2669
|
}
|
|
2424
2670
|
restoreFocus() {
|
|
2425
2671
|
const opener = this.openedFrom?.isConnected ? this.openedFrom : null;
|
|
@@ -2435,9 +2681,9 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2435
2681
|
this.refuse(end, null);
|
|
2436
2682
|
return;
|
|
2437
2683
|
}
|
|
2438
|
-
const parsed = this.
|
|
2439
|
-
if (!parsed
|
|
2440
|
-
this.refuse(end, this.
|
|
2684
|
+
const parsed = this.parseText(raw, end);
|
|
2685
|
+
if (!parsed) {
|
|
2686
|
+
this.refuse(end, this.fieldText.unreadable());
|
|
2441
2687
|
return;
|
|
2442
2688
|
}
|
|
2443
2689
|
const outOfBounds = this.outOfBounds(parsed);
|
|
@@ -2514,6 +2760,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2514
2760
|
pane.setAttribute("aria-label", this.resolvedPanelLabel());
|
|
2515
2761
|
pane.addEventListener("focusout", this.onPaneFocusOut);
|
|
2516
2762
|
const ref = this.overlayRef.attach(new ComponentPortal(WrDateRangePanel, null, wrPickerPanelInjector(this.environment, this.adapter)));
|
|
2763
|
+
ref.setInput("granularity", this.period() ?? "day");
|
|
2517
2764
|
ref.setInput("value", this.value() ?? [null, null]);
|
|
2518
2765
|
ref.setInput("autoFocus", this.autoFocusPanel);
|
|
2519
2766
|
this.panelRef.set(ref);
|
|
@@ -2580,25 +2827,27 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2580
2827
|
if (movedEnd) this.refuse(1, null);
|
|
2581
2828
|
const [refusedStart, refusedEnd] = this.refusals();
|
|
2582
2829
|
this.reportToForm(this.raised());
|
|
2583
|
-
if (!refusedStart && !this.sameDate(normalised[0], this.parseText(this.startText()))) this.startText.set(this.display(normalised[0]));
|
|
2584
|
-
if (!refusedEnd && !this.sameDate(normalised[1], this.parseText(this.endText()))) this.endText.set(this.display(normalised[1]));
|
|
2830
|
+
if (!refusedStart && !this.sameDate(normalised[0], this.parseText(this.startText(), 0))) this.startText.set(this.display(normalised[0]));
|
|
2831
|
+
if (!refusedEnd && !this.sameDate(normalised[1], this.parseText(this.endText(), 1))) this.endText.set(this.display(normalised[1]));
|
|
2585
2832
|
return normalised;
|
|
2586
2833
|
}
|
|
2587
2834
|
current() {
|
|
2588
2835
|
return this.value() ?? [null, null];
|
|
2589
2836
|
}
|
|
2590
2837
|
display(date) {
|
|
2591
|
-
return date && this.adapter.isValid(date) ? this.
|
|
2838
|
+
return date && this.adapter.isValid(date) ? this.fieldText.show(date) : "";
|
|
2592
2839
|
}
|
|
2593
|
-
parseText(raw) {
|
|
2840
|
+
parseText(raw, end) {
|
|
2594
2841
|
if (!raw) return null;
|
|
2595
|
-
const parsed = this.
|
|
2596
|
-
|
|
2842
|
+
const parsed = this.fieldText.read(raw);
|
|
2843
|
+
const period = this.period();
|
|
2844
|
+
return parsed && period && end === 1 ? wrPeriodEnd(this.adapter, parsed, period) : parsed;
|
|
2597
2845
|
}
|
|
2598
2846
|
normalise(range) {
|
|
2599
2847
|
const [start, end] = range;
|
|
2600
|
-
if (start
|
|
2601
|
-
|
|
2848
|
+
if (!start || !end || this.compareEnds(start, end) <= 0) return [start, end];
|
|
2849
|
+
const period = this.period();
|
|
2850
|
+
return period ? [wrPeriodStart(this.adapter, end, period), wrPeriodEnd(this.adapter, start, period)] : [end, start];
|
|
2602
2851
|
}
|
|
2603
2852
|
compareEnds(a, b) {
|
|
2604
2853
|
const byDay = this.adapter.compareDate(a, b);
|
|
@@ -2607,11 +2856,14 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2607
2856
|
return clock(a) - clock(b);
|
|
2608
2857
|
}
|
|
2609
2858
|
outOfBounds(date) {
|
|
2610
|
-
|
|
2859
|
+
const bounds = {
|
|
2611
2860
|
min: this.minDate(),
|
|
2612
2861
|
max: this.maxDate(),
|
|
2613
2862
|
filter: this.dateFilter()
|
|
2614
|
-
}
|
|
2863
|
+
};
|
|
2864
|
+
const period = this.period();
|
|
2865
|
+
if (!period) return this.refusalBuilder.outOfBounds(date, bounds);
|
|
2866
|
+
return this.refusalBuilder.outOfBounds(wrPeriodStart(this.adapter, date, period), bounds, wrPeriodEnd(this.adapter, date, period));
|
|
2615
2867
|
}
|
|
2616
2868
|
sameDate(a, b) {
|
|
2617
2869
|
if (a === b) return true;
|
|
@@ -2626,7 +2878,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2626
2878
|
}
|
|
2627
2879
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2628
2880
|
minVersion: "12.0.0",
|
|
2629
|
-
version: "22.2.
|
|
2881
|
+
version: "22.2.6",
|
|
2630
2882
|
ngImport: i0,
|
|
2631
2883
|
type: WrDateRangePicker,
|
|
2632
2884
|
deps: [],
|
|
@@ -2634,7 +2886,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2634
2886
|
});
|
|
2635
2887
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2636
2888
|
minVersion: "17.0.0",
|
|
2637
|
-
version: "22.2.
|
|
2889
|
+
version: "22.2.6",
|
|
2638
2890
|
type: WrDateRangePicker,
|
|
2639
2891
|
isStandalone: true,
|
|
2640
2892
|
selector: "wr-date-range-picker",
|
|
@@ -2723,6 +2975,13 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2723
2975
|
isRequired: false,
|
|
2724
2976
|
transformFunction: null
|
|
2725
2977
|
},
|
|
2978
|
+
rounded: {
|
|
2979
|
+
classPropertyName: "rounded",
|
|
2980
|
+
publicName: "rounded",
|
|
2981
|
+
isSignal: true,
|
|
2982
|
+
isRequired: false,
|
|
2983
|
+
transformFunction: null
|
|
2984
|
+
},
|
|
2726
2985
|
clearable: {
|
|
2727
2986
|
classPropertyName: "clearable",
|
|
2728
2987
|
publicName: "clearable",
|
|
@@ -2822,7 +3081,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2822
3081
|
}
|
|
2823
3082
|
],
|
|
2824
3083
|
ngImport: i0,
|
|
2825
|
-
template: "<wr-input-group>\n <input\n #startInput\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [attr.aria-label]=\"startLabel()\"\n [attr.aria-invalid]=\"startAriaInvalid()\"\n [attr.aria-describedby]=\"startDescribedBy()\"\n [value]=\"startText()\"\n [placeholder]=\"startPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(0)\"\n (keydown)=\"onFieldKey($event, 0)\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"wr-date-range-picker__separator\" aria-hidden=\"true\">{{ separator() }}</span>\n <!--\n `wrDateRangeEnd` hides the surrounding `<wr-form-field>` from this input, so\n only the start one adopts its `controlId` — see the directive for why the\n second half of a range carries no id at all.\n -->\n <input\n #endInput\n wrInput\n wrDateRangeEnd\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [attr.aria-label]=\"endLabel()\"\n [attr.aria-invalid]=\"endAriaInvalid()\"\n [attr.aria-describedby]=\"endDescribedBy()\"\n [value]=\"endText()\"\n [placeholder]=\"endPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(1)\"\n (keydown)=\"onFieldKey($event, 1)\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying both fields is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <!--\n `readonly` refuses to open the popup, so the trigger is disabled with it —\n otherwise it stays a focusable button advertising `aria-haspopup=\"dialog\"`\n for a dialog it will never show.\n -->\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"toggleOverlay()\"\n (blur)=\"onBlur($event)\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n </button>\n</wr-input-group>\n<!--\n Why a typed end was refused, for a screen reader — the same live region\n <wr-date-picker> carries, written when a refusal is shown and emptied when it is\n corrected. Silent inside a <wr-form-field> bound to the same control, and for a\n refusal the app's catalog has no `validation.*` sentence for.\n-->\n<span class=\"wr-date-range-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n",
|
|
3084
|
+
template: "<wr-input-group [rounded]=\"rounded()\">\n <input\n #startInput\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"startLabel()\"\n [attr.aria-invalid]=\"startAriaInvalid()\"\n [attr.aria-describedby]=\"startDescribedBy()\"\n [value]=\"startText()\"\n [placeholder]=\"startPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(0)\"\n (keydown)=\"onFieldKey($event, 0)\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"wr-date-range-picker__separator\" aria-hidden=\"true\">{{ separator() }}</span>\n <!--\n `wrDateRangeEnd` hides the surrounding `<wr-form-field>` from this input, so\n only the start one adopts its `controlId` — see the directive for why the\n second half of a range carries no id at all.\n -->\n <input\n #endInput\n wrInput\n wrDateRangeEnd\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"endLabel()\"\n [attr.aria-invalid]=\"endAriaInvalid()\"\n [attr.aria-describedby]=\"endDescribedBy()\"\n [value]=\"endText()\"\n [placeholder]=\"endPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(1)\"\n (keydown)=\"onFieldKey($event, 1)\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying both fields is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <!--\n `readonly` refuses to open the popup, so the trigger is disabled with it —\n otherwise it stays a focusable button advertising `aria-haspopup=\"dialog\"`\n for a dialog it will never show.\n -->\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"toggleOverlay()\"\n (blur)=\"onBlur($event)\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n </button>\n</wr-input-group>\n<!--\n Why a typed end was refused, for a screen reader — the same live region\n <wr-date-picker> carries, written when a refusal is shown and emptied when it is\n corrected. Silent inside a <wr-form-field> bound to the same control, and for a\n refusal the app's catalog has no `validation.*` sentence for.\n-->\n<span class=\"wr-date-range-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n",
|
|
2826
3085
|
dependencies: [
|
|
2827
3086
|
{
|
|
2828
3087
|
kind: "directive",
|
|
@@ -2839,7 +3098,13 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2839
3098
|
kind: "component",
|
|
2840
3099
|
type: WrInputGroup,
|
|
2841
3100
|
selector: "wr-input-group",
|
|
2842
|
-
inputs: [
|
|
3101
|
+
inputs: [
|
|
3102
|
+
"rounded",
|
|
3103
|
+
"clearable",
|
|
3104
|
+
"clearLabel",
|
|
3105
|
+
"loading"
|
|
3106
|
+
],
|
|
3107
|
+
outputs: ["cleared"]
|
|
2843
3108
|
},
|
|
2844
3109
|
{
|
|
2845
3110
|
kind: "directive",
|
|
@@ -2853,7 +3118,7 @@ var WrDateRangePicker = class WrDateRangePicker {
|
|
|
2853
3118
|
};
|
|
2854
3119
|
i0.ɵɵngDeclareClassMetadata({
|
|
2855
3120
|
minVersion: "12.0.0",
|
|
2856
|
-
version: "22.2.
|
|
3121
|
+
version: "22.2.6",
|
|
2857
3122
|
ngImport: i0,
|
|
2858
3123
|
type: WrDateRangePicker,
|
|
2859
3124
|
decorators: [{
|
|
@@ -2873,7 +3138,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2873
3138
|
],
|
|
2874
3139
|
providers: [WrDateInputField],
|
|
2875
3140
|
viewProviders: [WR_DATE_INPUT_FIELD_VIEW_PROVIDER],
|
|
2876
|
-
template: "<wr-input-group>\n <input\n #startInput\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [attr.aria-label]=\"startLabel()\"\n [attr.aria-invalid]=\"startAriaInvalid()\"\n [attr.aria-describedby]=\"startDescribedBy()\"\n [value]=\"startText()\"\n [placeholder]=\"startPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(0)\"\n (keydown)=\"onFieldKey($event, 0)\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"wr-date-range-picker__separator\" aria-hidden=\"true\">{{ separator() }}</span>\n <!--\n `wrDateRangeEnd` hides the surrounding `<wr-form-field>` from this input, so\n only the start one adopts its `controlId` — see the directive for why the\n second half of a range carries no id at all.\n -->\n <input\n #endInput\n wrInput\n wrDateRangeEnd\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [attr.aria-label]=\"endLabel()\"\n [attr.aria-invalid]=\"endAriaInvalid()\"\n [attr.aria-describedby]=\"endDescribedBy()\"\n [value]=\"endText()\"\n [placeholder]=\"endPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(1)\"\n (keydown)=\"onFieldKey($event, 1)\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying both fields is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <!--\n `readonly` refuses to open the popup, so the trigger is disabled with it —\n otherwise it stays a focusable button advertising `aria-haspopup=\"dialog\"`\n for a dialog it will never show.\n -->\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"toggleOverlay()\"\n (blur)=\"onBlur($event)\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n </button>\n</wr-input-group>\n<!--\n Why a typed end was refused, for a screen reader — the same live region\n <wr-date-picker> carries, written when a refusal is shown and emptied when it is\n corrected. Silent inside a <wr-form-field> bound to the same control, and for a\n refusal the app's catalog has no `validation.*` sentence for.\n-->\n<span class=\"wr-date-range-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n"
|
|
3141
|
+
template: "<wr-input-group [rounded]=\"rounded()\">\n <input\n #startInput\n wrInput\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"startLabel()\"\n [attr.aria-invalid]=\"startAriaInvalid()\"\n [attr.aria-describedby]=\"startDescribedBy()\"\n [value]=\"startText()\"\n [placeholder]=\"startPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(0)\"\n (keydown)=\"onFieldKey($event, 0)\"\n (input)=\"onStartInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <span class=\"wr-date-range-picker__separator\" aria-hidden=\"true\">{{ separator() }}</span>\n <!--\n `wrDateRangeEnd` hides the surrounding `<wr-form-field>` from this input, so\n only the start one adopts its `controlId` — see the directive for why the\n second half of a range carries no id at all.\n -->\n <input\n #endInput\n wrInput\n wrDateRangeEnd\n type=\"text\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n class=\"wr-date-range-picker__input\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [attr.aria-label]=\"endLabel()\"\n [attr.aria-invalid]=\"endAriaInvalid()\"\n [attr.aria-describedby]=\"endDescribedBy()\"\n [value]=\"endText()\"\n [placeholder]=\"endPlaceholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n (click)=\"openOnInput(1)\"\n (keydown)=\"onFieldKey($event, 1)\"\n (input)=\"onEndInput($event)\"\n (blur)=\"onBlur($event)\"\n />\n <!-- Pointer-only, as the select's is: emptying both fields is the keyboard way to clear. -->\n @if (clearable() && hasValue() && !disabled() && !readonly()) {\n <span\n class=\"wr-date-picker__clear\"\n role=\"button\"\n [attr.aria-label]=\"resolvedClear()\"\n tabindex=\"-1\"\n (click)=\"clear($event)\"\n >\n <svg\n class=\"wr-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </svg>\n </span>\n }\n <!--\n `readonly` refuses to open the popup, so the trigger is disabled with it —\n otherwise it stays a focusable button advertising `aria-haspopup=\"dialog\"`\n for a dialog it will never show.\n -->\n <button\n #trigger\n type=\"button\"\n wrInputSuffix\n class=\"wr-date-picker__trigger\"\n [attr.aria-label]=\"triggerLabel()\"\n [attr.aria-haspopup]=\"'dialog'\"\n [attr.aria-expanded]=\"overlayOpen()\"\n [attr.aria-controls]=\"overlayOpen() ? panelId : null\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"toggleOverlay()\"\n (blur)=\"onBlur($event)\"\n >\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" aria-hidden=\"true\">\n <rect x=\"1.5\" y=\"2.5\" width=\"11\" height=\"10\" rx=\"1.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"1.5\" y1=\"5.5\" x2=\"12.5\" y2=\"5.5\" stroke=\"currentColor\" stroke-width=\"1.2\" />\n <line x1=\"4\" y1=\"1\" x2=\"4\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n <line x1=\"10\" y1=\"1\" x2=\"10\" y2=\"4\" stroke=\"currentColor\" stroke-width=\"1.4\" stroke-linecap=\"round\" />\n @if (isDateTime()) {\n <circle cx=\"7\" cy=\"9\" r=\"1.5\" fill=\"currentColor\" />\n }\n </svg>\n </button>\n</wr-input-group>\n<!--\n Why a typed end was refused, for a screen reader — the same live region\n <wr-date-picker> carries, written when a refusal is shown and emptied when it is\n corrected. Silent inside a <wr-form-field> bound to the same control, and for a\n refusal the app's catalog has no `validation.*` sentence for.\n-->\n<span class=\"wr-date-range-picker__sr-only\" role=\"status\" [id]=\"statusId\">{{ announcement() }}</span>\n"
|
|
2877
3142
|
}]
|
|
2878
3143
|
}],
|
|
2879
3144
|
ctorParameters: () => [],
|
|
@@ -2974,6 +3239,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2974
3239
|
required: false
|
|
2975
3240
|
}]
|
|
2976
3241
|
}],
|
|
3242
|
+
rounded: [{
|
|
3243
|
+
type: i0.Input,
|
|
3244
|
+
args: [{
|
|
3245
|
+
isSignal: true,
|
|
3246
|
+
alias: "rounded",
|
|
3247
|
+
required: false
|
|
3248
|
+
}]
|
|
3249
|
+
}],
|
|
2977
3250
|
clearable: [{
|
|
2978
3251
|
type: i0.Input,
|
|
2979
3252
|
args: [{
|