ngwr 16.2.0 → 16.3.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/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.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +37 -16
- 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 +12 -12
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-copy-value.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker-testing.mjs +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 +52 -95
- 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 +274 -15
- 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 +3 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +102 -42
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +19 -4
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +19 -4
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +19 -4
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +19 -4
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +19 -4
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +19 -4
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +19 -4
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +19 -4
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +19 -4
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +19 -4
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +19 -4
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +19 -4
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +19 -4
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +19 -4
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +19 -4
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +19 -4
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +19 -4
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +19 -4
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +19 -4
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +19 -4
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +19 -4
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +19 -4
- 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 +5 -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 +415 -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 +263 -83
- 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 +88 -2
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +891 -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.mjs +6 -6
- 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 +966 -78
- 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 +34 -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/i18n/ar.json +21 -4
- package/i18n/cs.json +21 -4
- package/i18n/de.json +21 -4
- package/i18n/en.json +21 -4
- package/i18n/es.json +21 -4
- package/i18n/fr.json +21 -4
- package/i18n/he.json +21 -4
- package/i18n/hi.json +21 -4
- package/i18n/id.json +21 -4
- package/i18n/it.json +21 -4
- package/i18n/ja.json +21 -4
- package/i18n/ko.json +21 -4
- package/i18n/nl.json +21 -4
- package/i18n/pl.json +21 -4
- package/i18n/pt.json +21 -4
- package/i18n/ru.json +21 -4
- package/i18n/sv.json +21 -4
- package/i18n/tr.json +21 -4
- package/i18n/uk.json +21 -4
- package/i18n/vi.json +21 -4
- package/i18n/zh-TW.json +21 -4
- package/i18n/zh.json +21 -4
- package/input/styles/_index.scss +68 -1
- package/input-otp/styles/_index.scss +14 -0
- package/llms-full.txt +52 -20
- 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/use/rule.js +2 -0
- package/schematics/use/symbol-map.json +4 -0
- package/select/styles/_index.scss +114 -22
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +9 -1
- package/slider/styles/_index.scss +22 -0
- package/table/styles/_index.scss +167 -3
- package/textarea/styles/_index.scss +80 -0
- package/theme/styles/_focus.scss +5 -0
- 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-cascader.d.ts +10 -1
- 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-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 +24 -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 +148 -1
- package/types/ngwr-form.d.ts +47 -3
- package/types/ngwr-graph-testing.d.ts +8 -3
- package/types/ngwr-graph.d.ts +147 -7
- 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 +112 -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 +70 -6
- package/types/ngwr-table.d.ts +480 -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-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 +333 -12
- package/types/ngwr-utils.d.ts +28 -0
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +7 -4
|
@@ -1,27 +1,43 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { Component, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, model, signal, untracked } from "@angular/core";
|
|
2
|
+
import { Component, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, model, output, signal, untracked } from "@angular/core";
|
|
3
3
|
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
4
4
|
import { wrCheckStyles } from "ngwr/utils";
|
|
5
5
|
import { useI18nFormatter, useI18nText } from "ngwr/i18n";
|
|
6
6
|
import { Directionality } from "@angular/cdk/bidi";
|
|
7
|
-
import { WrDateAdapter } from "ngwr/date";
|
|
7
|
+
import { WrDateAdapter, wrPeriodEnd, wrPeriodStart } from "ngwr/date";
|
|
8
|
+
import { useFormFieldAria } from "ngwr/form";
|
|
8
9
|
/**
|
|
9
10
|
* @license
|
|
10
11
|
*
|
|
11
12
|
* Use of this source code is governed by an MIT-style license that can be
|
|
12
13
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
13
14
|
*/
|
|
14
|
-
const
|
|
15
|
+
const EMPTY_RANGE = [null, null];
|
|
16
|
+
function asBound(value) {
|
|
17
|
+
return value instanceof Date ? value : void 0;
|
|
18
|
+
}
|
|
15
19
|
const ROWS = 6;
|
|
16
20
|
const COLS = 7;
|
|
17
|
-
const
|
|
18
|
-
|
|
21
|
+
const CHIP_COLS = {
|
|
22
|
+
month: 3,
|
|
23
|
+
quarter: 2,
|
|
24
|
+
year: 4
|
|
25
|
+
};
|
|
19
26
|
var WrCalendar = class WrCalendar {
|
|
20
27
|
mode = input("single", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
|
|
28
|
+
granularity = input("day", ...ngDevMode ? [{ debugName: "granularity" }] : /* istanbul ignore next */ []);
|
|
21
29
|
date = model(null, ...ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []);
|
|
22
30
|
range = model([null, null], ...ngDevMode ? [{ debugName: "range" }] : /* istanbul ignore next */ []);
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
32
|
+
touch = output();
|
|
33
|
+
min = input(void 0, {
|
|
34
|
+
...ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {},
|
|
35
|
+
transform: asBound
|
|
36
|
+
});
|
|
37
|
+
max = input(void 0, {
|
|
38
|
+
...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
|
|
39
|
+
transform: asBound
|
|
40
|
+
});
|
|
25
41
|
dateFilter = input(null, ...ngDevMode ? [{ debugName: "dateFilter" }] : /* istanbul ignore next */ []);
|
|
26
42
|
autoFocus = input(false, {
|
|
27
43
|
...ngDevMode ? { debugName: "autoFocus" } : /* istanbul ignore next */ {},
|
|
@@ -31,6 +47,11 @@ var WrCalendar = class WrCalendar {
|
|
|
31
47
|
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
32
48
|
transform: coerceBooleanProperty
|
|
33
49
|
});
|
|
50
|
+
readonly = input(false, {
|
|
51
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
52
|
+
transform: coerceBooleanProperty
|
|
53
|
+
});
|
|
54
|
+
fieldAria = useFormFieldAria();
|
|
34
55
|
adapter = inject(WrDateAdapter);
|
|
35
56
|
dir = inject(Directionality, { optional: true });
|
|
36
57
|
host = inject(ElementRef);
|
|
@@ -45,27 +66,59 @@ var WrCalendar = class WrCalendar {
|
|
|
45
66
|
focusedDate = signal(this.zoneToday(), ...ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []);
|
|
46
67
|
hoverDate = signal(null, ...ngDevMode ? [{ debugName: "hoverDate" }] : /* istanbul ignore next */ []);
|
|
47
68
|
viewMode = signal("day", ...ngDevMode ? [{ debugName: "viewMode" }] : /* istanbul ignore next */ []);
|
|
69
|
+
period = computed(() => {
|
|
70
|
+
const granularity = this.granularity();
|
|
71
|
+
return granularity === "day" ? null : granularity;
|
|
72
|
+
}, ...ngDevMode ? [{ debugName: "period" }] : /* istanbul ignore next */ []);
|
|
73
|
+
homeView = computed(() => {
|
|
74
|
+
const granularity = this.granularity();
|
|
75
|
+
return granularity === "day" || granularity === "week" ? "day" : granularity;
|
|
76
|
+
}, ...ngDevMode ? [{ debugName: "homeView" }] : /* istanbul ignore next */ []);
|
|
77
|
+
picksChips = computed(() => this.viewMode() !== "day" && this.viewMode() === this.homeView(), ...ngDevMode ? [{ debugName: "picksChips" }] : /* istanbul ignore next */ []);
|
|
78
|
+
pickedWeek = computed(() => {
|
|
79
|
+
if (this.period() !== "week" || this.mode() !== "single") return null;
|
|
80
|
+
const picked = this.date();
|
|
81
|
+
return picked ? this.weekOf(picked) : null;
|
|
82
|
+
}, ...ngDevMode ? [{ debugName: "pickedWeek" }] : /* istanbul ignore next */ []);
|
|
83
|
+
hoverWeek = computed(() => {
|
|
84
|
+
if (this.period() !== "week") return null;
|
|
85
|
+
const hover = this.hoverDate();
|
|
86
|
+
return hover ? this.weekOf(hover) : null;
|
|
87
|
+
}, ...ngDevMode ? [{ debugName: "hoverWeek" }] : /* istanbul ignore next */ []);
|
|
48
88
|
rovedChip = signal(null, ...ngDevMode ? [{ debugName: "rovedChip" }] : /* istanbul ignore next */ []);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
89
|
+
ariaLabel = input(null, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
90
|
+
prevMonthLabel = input(null, ...ngDevMode ? [{ debugName: "prevMonthLabel" }] : /* istanbul ignore next */ []);
|
|
91
|
+
nextMonthLabel = input(null, ...ngDevMode ? [{ debugName: "nextMonthLabel" }] : /* istanbul ignore next */ []);
|
|
92
|
+
monthListLabel = input(null, ...ngDevMode ? [{ debugName: "monthListLabel" }] : /* istanbul ignore next */ []);
|
|
93
|
+
yearListLabel = input(null, ...ngDevMode ? [{ debugName: "yearListLabel" }] : /* istanbul ignore next */ []);
|
|
94
|
+
quarterListLabel = input(null, ...ngDevMode ? [{ debugName: "quarterListLabel" }] : /* istanbul ignore next */ []);
|
|
95
|
+
prevYearLabel = input(null, ...ngDevMode ? [{ debugName: "prevYearLabel" }] : /* istanbul ignore next */ []);
|
|
96
|
+
nextYearLabel = input(null, ...ngDevMode ? [{ debugName: "nextYearLabel" }] : /* istanbul ignore next */ []);
|
|
97
|
+
prevYearsLabel = input(null, ...ngDevMode ? [{ debugName: "prevYearsLabel" }] : /* istanbul ignore next */ []);
|
|
98
|
+
nextYearsLabel = input(null, ...ngDevMode ? [{ debugName: "nextYearsLabel" }] : /* istanbul ignore next */ []);
|
|
99
|
+
resolvedPrevMonthLabel = useI18nText(this.prevMonthLabel, "calendar.prevMonth", "Previous month");
|
|
100
|
+
resolvedNextMonthLabel = useI18nText(this.nextMonthLabel, "calendar.nextMonth", "Next month");
|
|
101
|
+
resolvedMonthListLabel = useI18nText(this.monthListLabel, "calendar.monthList", "Months");
|
|
102
|
+
resolvedYearListLabel = useI18nText(this.yearListLabel, "calendar.yearList", "Years");
|
|
103
|
+
resolvedQuarterListLabel = useI18nText(this.quarterListLabel, "calendar.quarterList", "Quarters");
|
|
104
|
+
resolvedPrevYearLabel = useI18nText(this.prevYearLabel, "calendar.prevYear", "Previous year");
|
|
105
|
+
resolvedNextYearLabel = useI18nText(this.nextYearLabel, "calendar.nextYear", "Next year");
|
|
106
|
+
resolvedPrevYearsLabel = useI18nText(this.prevYearsLabel, "calendar.prevYears", "Previous 12 years");
|
|
107
|
+
resolvedNextYearsLabel = useI18nText(this.nextYearsLabel, "calendar.nextYears", "Next 12 years");
|
|
57
108
|
prevLabel = computed(() => {
|
|
58
109
|
switch (this.viewMode()) {
|
|
59
|
-
case "year": return this.
|
|
60
|
-
case "month":
|
|
61
|
-
|
|
110
|
+
case "year": return this.resolvedPrevYearsLabel();
|
|
111
|
+
case "month":
|
|
112
|
+
case "quarter": return this.resolvedPrevYearLabel();
|
|
113
|
+
default: return this.resolvedPrevMonthLabel();
|
|
62
114
|
}
|
|
63
115
|
}, ...ngDevMode ? [{ debugName: "prevLabel" }] : /* istanbul ignore next */ []);
|
|
64
116
|
nextLabel = computed(() => {
|
|
65
117
|
switch (this.viewMode()) {
|
|
66
|
-
case "year": return this.
|
|
67
|
-
case "month":
|
|
68
|
-
|
|
118
|
+
case "year": return this.resolvedNextYearsLabel();
|
|
119
|
+
case "month":
|
|
120
|
+
case "quarter": return this.resolvedNextYearLabel();
|
|
121
|
+
default: return this.resolvedNextMonthLabel();
|
|
69
122
|
}
|
|
70
123
|
}, ...ngDevMode ? [{ debugName: "nextLabel" }] : /* istanbul ignore next */ []);
|
|
71
124
|
today = computed(() => this.zoneToday(), ...ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []);
|
|
@@ -86,7 +139,8 @@ var WrCalendar = class WrCalendar {
|
|
|
86
139
|
year: this.adapter.getYear(v)
|
|
87
140
|
});
|
|
88
141
|
}
|
|
89
|
-
case "month":
|
|
142
|
+
case "month":
|
|
143
|
+
case "quarter": return `${this.adapter.getYear(v)}`;
|
|
90
144
|
case "year": {
|
|
91
145
|
const years = this.yearsView();
|
|
92
146
|
return this.yearRangeText({
|
|
@@ -99,6 +153,16 @@ var WrCalendar = class WrCalendar {
|
|
|
99
153
|
headerText = useI18nFormatter("calendar.header", "{{month}} {{year}}");
|
|
100
154
|
yearRangeText = useI18nFormatter("calendar.yearRange", "{{from}} – {{to}}");
|
|
101
155
|
dayLabelText = useI18nFormatter("calendar.dayLabel", "{{weekday}}, {{date}}");
|
|
156
|
+
quarterText = useI18nFormatter("calendar.quarter", "Q{{quarter}}");
|
|
157
|
+
quartersView = [
|
|
158
|
+
1,
|
|
159
|
+
2,
|
|
160
|
+
3,
|
|
161
|
+
4
|
|
162
|
+
];
|
|
163
|
+
quarterLabel(quarter) {
|
|
164
|
+
return this.quarterText({ quarter });
|
|
165
|
+
}
|
|
102
166
|
longWeekdays = computed(() => this.adapter.getDayOfWeekNames("long"), ...ngDevMode ? [{ debugName: "longWeekdays" }] : /* istanbul ignore next */ []);
|
|
103
167
|
dayLabel(date) {
|
|
104
168
|
return this.dayLabelText({
|
|
@@ -127,22 +191,59 @@ var WrCalendar = class WrCalendar {
|
|
|
127
191
|
}, ...ngDevMode ? [{ debugName: "activeChip" }] : /* istanbul ignore next */ []);
|
|
128
192
|
classes = computed(() => {
|
|
129
193
|
const parts = [`wr-calendar--${this.mode()}`];
|
|
194
|
+
const period = this.period();
|
|
195
|
+
if (period) parts.push(`wr-calendar--${period}`);
|
|
130
196
|
if (this.disabled()) parts.push("wr-calendar--disabled");
|
|
197
|
+
if (this.readonly()) parts.push("wr-calendar--readonly");
|
|
131
198
|
return parts.join(" ");
|
|
132
199
|
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
200
|
+
seenValue = null;
|
|
201
|
+
seenOwn;
|
|
133
202
|
constructor() {
|
|
134
203
|
if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("calendar");
|
|
204
|
+
const unboundRange = this.range();
|
|
205
|
+
effect(() => {
|
|
206
|
+
const isRange = this.mode() === "range";
|
|
207
|
+
const value = this.value();
|
|
208
|
+
const own = isRange ? this.range() : this.date();
|
|
209
|
+
untracked(() => {
|
|
210
|
+
if (this.seenOwn === void 0) this.seenOwn = isRange ? unboundRange : null;
|
|
211
|
+
if (value !== this.seenValue) {
|
|
212
|
+
this.seenValue = value;
|
|
213
|
+
if (isRange) {
|
|
214
|
+
const next = this.asRange(value);
|
|
215
|
+
const [start, end] = own;
|
|
216
|
+
if (next[0] !== start || next[1] !== end) this.range.set(next);
|
|
217
|
+
this.seenOwn = this.range();
|
|
218
|
+
} else {
|
|
219
|
+
const next = value instanceof Date ? value : null;
|
|
220
|
+
this.date.set(next);
|
|
221
|
+
this.seenOwn = next;
|
|
222
|
+
}
|
|
223
|
+
} else if (own !== this.seenOwn) {
|
|
224
|
+
this.seenOwn = own;
|
|
225
|
+
this.mirrorToValue(own);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
effect(() => {
|
|
230
|
+
const home = this.homeView();
|
|
231
|
+
untracked(() => this.setViewMode(home));
|
|
232
|
+
});
|
|
135
233
|
afterNextRender(() => {
|
|
136
234
|
const initial = this.nearestEnabled(this.date() ?? this.range()[0] ?? this.zoneToday());
|
|
137
235
|
this.focusedDate.set(initial);
|
|
138
236
|
this.viewDate.set(initial);
|
|
139
|
-
if (this.autoFocus()) afterNextRender(() => this.focusActiveCell(), { injector: this.injector });
|
|
237
|
+
if (this.autoFocus()) afterNextRender(() => this.viewMode() === "day" ? this.focusActiveCell() : this.focusActiveChip(), { injector: this.injector });
|
|
140
238
|
});
|
|
141
239
|
effect(() => {
|
|
142
240
|
const candidate = this.mode() === "single" ? this.date() : this.range()[0];
|
|
143
241
|
if (!candidate) return;
|
|
144
242
|
untracked(() => {
|
|
145
|
-
if (!this.
|
|
243
|
+
if (!this.isInViewMonth(candidate)) {
|
|
244
|
+
this.viewDate.set(candidate);
|
|
245
|
+
if (!this.isRendered(this.focusedDate())) this.focusedDate.set(this.nearestEnabled(candidate));
|
|
246
|
+
}
|
|
146
247
|
});
|
|
147
248
|
});
|
|
148
249
|
}
|
|
@@ -163,10 +264,22 @@ var WrCalendar = class WrCalendar {
|
|
|
163
264
|
const landing = this.adapter.createDate(this.adapter.getYear(view), this.adapter.getMonth(view), day);
|
|
164
265
|
this.focusedDate.set(this.nearestEnabled(landing));
|
|
165
266
|
}
|
|
267
|
+
isInViewMonth(selected) {
|
|
268
|
+
const view = this.viewDate();
|
|
269
|
+
if (this.adapter.isSameMonth(selected, view)) return true;
|
|
270
|
+
return this.period() === "week" && this.adapter.isSameMonth(this.weekOf(selected)[1], view);
|
|
271
|
+
}
|
|
272
|
+
weekOf(date) {
|
|
273
|
+
return [wrPeriodStart(this.adapter, date, "week"), wrPeriodEnd(this.adapter, date, "week")];
|
|
274
|
+
}
|
|
275
|
+
isRendered(date) {
|
|
276
|
+
const weeks = this.weeks();
|
|
277
|
+
return this.adapter.compareDate(date, weeks[0][0]) >= 0 && this.adapter.compareDate(date, weeks[5][6]) <= 0;
|
|
278
|
+
}
|
|
166
279
|
onLabelClick() {
|
|
167
280
|
if (this.disabled()) return;
|
|
168
281
|
if (this.viewMode() === "day") this.setViewMode("month");
|
|
169
|
-
else if (this.viewMode()
|
|
282
|
+
else if (this.viewMode() !== "year") {
|
|
170
283
|
this.setViewMode("year");
|
|
171
284
|
afterNextRender(() => this.focusActiveChip(), { injector: this.injector });
|
|
172
285
|
}
|
|
@@ -175,6 +288,10 @@ var WrCalendar = class WrCalendar {
|
|
|
175
288
|
if (this.isMonthDisabled(monthIdx)) return;
|
|
176
289
|
const v = this.viewDate();
|
|
177
290
|
const year = this.adapter.getYear(v);
|
|
291
|
+
if (this.picksChips()) {
|
|
292
|
+
this.pickChip(monthIdx, this.adapter.createDate(year, monthIdx, 1));
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
178
295
|
this.viewDate.set(this.adapter.createDate(year, monthIdx, 1));
|
|
179
296
|
const focused = this.focusedDate();
|
|
180
297
|
if (!(this.adapter.getYear(focused) === year && this.adapter.getMonth(focused) === monthIdx)) this.focusedDate.set(this.adapter.createDate(year, monthIdx, 1));
|
|
@@ -183,11 +300,24 @@ var WrCalendar = class WrCalendar {
|
|
|
183
300
|
}
|
|
184
301
|
onYearSelect(year) {
|
|
185
302
|
if (this.isYearDisabled(year)) return;
|
|
303
|
+
if (this.picksChips()) {
|
|
304
|
+
this.pickChip(this.yearsView().indexOf(year), this.adapter.createDate(year, 0, 1));
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
186
307
|
const v = this.viewDate();
|
|
187
308
|
this.viewDate.set(this.adapter.createDate(year, this.adapter.getMonth(v), 1));
|
|
188
|
-
this.setViewMode("month");
|
|
309
|
+
this.setViewMode(this.homeView() === "quarter" ? "quarter" : "month");
|
|
189
310
|
afterNextRender(() => this.focusActiveChip(), { injector: this.injector });
|
|
190
311
|
}
|
|
312
|
+
onQuarterSelect(index) {
|
|
313
|
+
if (this.isQuarterDisabled(index)) return;
|
|
314
|
+
this.pickChip(index, this.chipStart(index));
|
|
315
|
+
}
|
|
316
|
+
pickChip(index, start) {
|
|
317
|
+
if (this.readonly()) return;
|
|
318
|
+
this.rovedChip.set(index);
|
|
319
|
+
this.pick(start);
|
|
320
|
+
}
|
|
191
321
|
setViewMode(view) {
|
|
192
322
|
this.rovedChip.set(null);
|
|
193
323
|
this.viewMode.set(view);
|
|
@@ -196,7 +326,8 @@ var WrCalendar = class WrCalendar {
|
|
|
196
326
|
const v = this.viewDate();
|
|
197
327
|
switch (this.viewMode()) {
|
|
198
328
|
case "day": return this.adapter.addMonths(v, direction);
|
|
199
|
-
case "month":
|
|
329
|
+
case "month":
|
|
330
|
+
case "quarter": return this.adapter.addYears(v, direction);
|
|
200
331
|
case "year": return this.adapter.addYears(v, direction * 12);
|
|
201
332
|
}
|
|
202
333
|
}
|
|
@@ -210,6 +341,8 @@ var WrCalendar = class WrCalendar {
|
|
|
210
341
|
return !this.adapter.isSameMonth(date, this.viewDate());
|
|
211
342
|
}
|
|
212
343
|
isSelected(date) {
|
|
344
|
+
const week = this.pickedWeek();
|
|
345
|
+
if (week) return this.adapter.isSameDay(date, week[0]) || this.adapter.isSameDay(date, week[1]);
|
|
213
346
|
if (this.mode() === "single") {
|
|
214
347
|
const v = this.date();
|
|
215
348
|
return v ? this.adapter.isSameDay(date, v) : false;
|
|
@@ -219,18 +352,28 @@ var WrCalendar = class WrCalendar {
|
|
|
219
352
|
if (end && this.adapter.isSameDay(date, end)) return true;
|
|
220
353
|
return false;
|
|
221
354
|
}
|
|
355
|
+
isAriaSelected(date) {
|
|
356
|
+
return this.isSelected(date) || !!this.pickedWeek() && this.isInRange(date);
|
|
357
|
+
}
|
|
222
358
|
isInRange(date) {
|
|
359
|
+
const week = this.pickedWeek();
|
|
360
|
+
if (week) return this.adapter.compareDate(date, week[0]) > 0 && this.adapter.compareDate(date, week[1]) < 0;
|
|
223
361
|
if (this.mode() !== "range") return false;
|
|
224
362
|
const [start, end] = this.range();
|
|
225
363
|
if (!start || !end) return false;
|
|
226
364
|
return this.adapter.compareDate(date, start) > 0 && this.adapter.compareDate(date, end) < 0;
|
|
227
365
|
}
|
|
228
366
|
isInRangePreview(date) {
|
|
229
|
-
|
|
367
|
+
const hoverWeek = this.hoverWeek();
|
|
368
|
+
if (this.mode() !== "range") {
|
|
369
|
+
if (!hoverWeek || this.isAriaSelected(date)) return false;
|
|
370
|
+
return this.adapter.compareDate(date, hoverWeek[0]) >= 0 && this.adapter.compareDate(date, hoverWeek[1]) <= 0;
|
|
371
|
+
}
|
|
230
372
|
const [start, end] = this.range();
|
|
231
373
|
const hover = this.hoverDate();
|
|
232
374
|
if (!start || end || !hover) return false;
|
|
233
375
|
const before = this.adapter.compareDate(start, hover) <= 0;
|
|
376
|
+
if (hoverWeek) return before ? this.adapter.compareDate(date, start) > 0 && this.adapter.compareDate(date, hoverWeek[1]) <= 0 : this.adapter.compareDate(date, hoverWeek[0]) >= 0 && this.adapter.compareDate(date, start) < 0;
|
|
234
377
|
const lo = before ? start : hover;
|
|
235
378
|
const hi = before ? hover : start;
|
|
236
379
|
return this.adapter.compareDate(date, lo) > 0 && this.adapter.compareDate(date, hi) < 0;
|
|
@@ -240,69 +383,137 @@ var WrCalendar = class WrCalendar {
|
|
|
240
383
|
}
|
|
241
384
|
isDisabled(date) {
|
|
242
385
|
if (this.disabled()) return true;
|
|
243
|
-
const min = this.min();
|
|
386
|
+
const min = asBound(this.min());
|
|
244
387
|
if (min && this.adapter.compareDate(date, min) < 0) return true;
|
|
245
|
-
const max = this.max();
|
|
388
|
+
const max = asBound(this.max());
|
|
246
389
|
if (max && this.adapter.compareDate(date, max) > 0) return true;
|
|
247
390
|
const filter = this.dateFilter();
|
|
248
391
|
if (filter && !filter(date)) return true;
|
|
249
392
|
return false;
|
|
250
393
|
}
|
|
251
|
-
|
|
252
|
-
|
|
394
|
+
chipStart(index) {
|
|
395
|
+
const year = this.adapter.getYear(this.viewDate());
|
|
396
|
+
switch (this.viewMode()) {
|
|
397
|
+
case "quarter": return this.adapter.createDate(year, index * 3, 1);
|
|
398
|
+
case "year": return this.adapter.createDate(this.yearsView()[index] ?? year, 0, 1);
|
|
399
|
+
default: return this.adapter.createDate(year, index, 1);
|
|
400
|
+
}
|
|
253
401
|
}
|
|
254
|
-
|
|
255
|
-
const
|
|
256
|
-
if (
|
|
257
|
-
|
|
402
|
+
isInChip(date, index) {
|
|
403
|
+
const chip = this.chipStart(index);
|
|
404
|
+
if (this.adapter.getYear(date) !== this.adapter.getYear(chip)) return false;
|
|
405
|
+
switch (this.viewMode()) {
|
|
406
|
+
case "quarter": return Math.floor(this.adapter.getMonth(date) / 3) === index;
|
|
407
|
+
case "year": return true;
|
|
408
|
+
default: return this.adapter.getMonth(date) === index;
|
|
409
|
+
}
|
|
258
410
|
}
|
|
259
|
-
|
|
411
|
+
isChipCurrent(index) {
|
|
412
|
+
return this.currentChip() === index;
|
|
413
|
+
}
|
|
414
|
+
isChipSelected(index) {
|
|
415
|
+
if (this.mode() === "single") {
|
|
416
|
+
const v = this.date();
|
|
417
|
+
return !!v && this.isInChip(v, index);
|
|
418
|
+
}
|
|
419
|
+
const [start, end] = this.range();
|
|
420
|
+
if (start && this.isInChip(start, index)) return true;
|
|
421
|
+
return this.picksChips() && !!end && this.isInChip(end, index);
|
|
422
|
+
}
|
|
423
|
+
isChipInRange(index) {
|
|
424
|
+
if (this.mode() !== "range" || !this.picksChips()) return false;
|
|
425
|
+
const [start, end] = this.range();
|
|
426
|
+
if (!start || !end || this.isChipSelected(index)) return false;
|
|
427
|
+
const chip = this.chipStart(index);
|
|
428
|
+
return this.adapter.compareDate(chip, start) > 0 && this.adapter.compareDate(chip, end) < 0;
|
|
429
|
+
}
|
|
430
|
+
isChipRangePreview(index) {
|
|
431
|
+
if (this.mode() !== "range" || !this.picksChips()) return false;
|
|
432
|
+
const [start, end] = this.range();
|
|
433
|
+
const hover = this.hoverDate();
|
|
434
|
+
if (!start || end || !hover || this.isChipSelected(index)) return false;
|
|
435
|
+
const before = this.adapter.compareDate(start, hover) <= 0;
|
|
436
|
+
const chip = this.chipStart(index);
|
|
437
|
+
return this.adapter.compareDate(chip, before ? start : hover) >= 0 && this.adapter.compareDate(chip, before ? hover : start) <= 0;
|
|
438
|
+
}
|
|
439
|
+
onChipEnter(index) {
|
|
440
|
+
if (this.mode() === "range" && this.picksChips() && !this.readonly()) this.hoverDate.set(this.chipStart(index));
|
|
441
|
+
}
|
|
442
|
+
isSpanClosed(start, end) {
|
|
260
443
|
if (this.disabled()) return true;
|
|
444
|
+
const min = asBound(this.min());
|
|
445
|
+
if (min && this.adapter.compareDate(end, min) < 0) return true;
|
|
446
|
+
const max = asBound(this.max());
|
|
447
|
+
if (max && this.adapter.compareDate(start, max) > 0) return true;
|
|
448
|
+
const filter = this.dateFilter();
|
|
449
|
+
if (!filter || !this.picksChips()) return false;
|
|
450
|
+
for (let day = start; this.adapter.compareDate(day, end) <= 0; day = this.adapter.addDays(day, 1)) if (filter(day)) return false;
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
isMonthDisabled(monthIdx) {
|
|
261
454
|
const year = this.adapter.getYear(this.viewDate());
|
|
262
455
|
const monthStart = this.adapter.createDate(year, monthIdx, 1);
|
|
263
|
-
|
|
264
|
-
const min = this.min();
|
|
265
|
-
if (min && this.adapter.compareDate(monthEnd, min) < 0) return true;
|
|
266
|
-
const max = this.max();
|
|
267
|
-
if (max && this.adapter.compareDate(monthStart, max) > 0) return true;
|
|
268
|
-
return false;
|
|
269
|
-
}
|
|
270
|
-
isYearCurrent(year) {
|
|
271
|
-
return this.adapter.getYear(this.viewDate()) === year;
|
|
456
|
+
return this.isSpanClosed(monthStart, wrPeriodEnd(this.adapter, monthStart, "month"));
|
|
272
457
|
}
|
|
273
|
-
|
|
274
|
-
const
|
|
275
|
-
|
|
458
|
+
isQuarterDisabled(index) {
|
|
459
|
+
const year = this.adapter.getYear(this.viewDate());
|
|
460
|
+
const quarterStart = this.adapter.createDate(year, index * 3, 1);
|
|
461
|
+
return this.isSpanClosed(quarterStart, wrPeriodEnd(this.adapter, quarterStart, "quarter"));
|
|
276
462
|
}
|
|
277
463
|
isYearDisabled(year) {
|
|
278
|
-
|
|
279
|
-
const min = this.min();
|
|
280
|
-
if (min && year < this.adapter.getYear(min)) return true;
|
|
281
|
-
const max = this.max();
|
|
282
|
-
if (max && year > this.adapter.getYear(max)) return true;
|
|
283
|
-
return false;
|
|
464
|
+
return this.isSpanClosed(this.adapter.createDate(year, 0, 1), this.adapter.createDate(year, 11, 31));
|
|
284
465
|
}
|
|
285
466
|
onCellClick(date) {
|
|
286
|
-
if (this.isDisabled(date)) return;
|
|
287
|
-
|
|
288
|
-
else this.applyRangeClick(date);
|
|
467
|
+
if (this.readonly() || this.isDisabled(date)) return;
|
|
468
|
+
this.pick(date);
|
|
289
469
|
this.focusedDate.set(date);
|
|
290
470
|
if (!this.adapter.isSameMonth(date, this.viewDate())) this.viewDate.set(date);
|
|
291
471
|
}
|
|
472
|
+
pick(date) {
|
|
473
|
+
if (this.mode() === "single") {
|
|
474
|
+
const period = this.period();
|
|
475
|
+
const picked = period ? wrPeriodStart(this.adapter, date, period) : this.adapter.clone(date);
|
|
476
|
+
this.date.set(picked);
|
|
477
|
+
this.seenOwn = picked;
|
|
478
|
+
this.mirrorToValue(picked);
|
|
479
|
+
} else {
|
|
480
|
+
this.applyRangeClick(date);
|
|
481
|
+
this.seenOwn = this.range();
|
|
482
|
+
this.mirrorToValue(this.seenOwn);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
292
485
|
onCellEnter(date) {
|
|
293
|
-
if (this.mode() === "range") this.hoverDate.set(date);
|
|
486
|
+
if ((this.mode() === "range" || this.period() === "week") && !this.readonly()) this.hoverDate.set(date);
|
|
487
|
+
}
|
|
488
|
+
focus(options) {
|
|
489
|
+
this.host.nativeElement.querySelector(".wr-calendar__day[tabindex=\"0\"], .wr-calendar__chip[tabindex=\"0\"]")?.focus(options);
|
|
490
|
+
}
|
|
491
|
+
onFocusOut(event) {
|
|
492
|
+
const next = event.relatedTarget;
|
|
493
|
+
if (next instanceof Node && this.host.nativeElement.contains(next)) return;
|
|
494
|
+
this.touch.emit();
|
|
495
|
+
}
|
|
496
|
+
mirrorToValue(own) {
|
|
497
|
+
const next = Array.isArray(own) && !own[0] && !own[1] ? null : own;
|
|
498
|
+
this.seenValue = next;
|
|
499
|
+
this.value.set(next);
|
|
500
|
+
}
|
|
501
|
+
asRange(value) {
|
|
502
|
+
return Array.isArray(value) ? value : EMPTY_RANGE;
|
|
294
503
|
}
|
|
295
504
|
onCellLeave() {
|
|
296
|
-
|
|
505
|
+
this.hoverDate.set(null);
|
|
297
506
|
}
|
|
298
507
|
applyRangeClick(date) {
|
|
508
|
+
const period = this.period();
|
|
299
509
|
const [start, end] = this.range();
|
|
510
|
+
const from = period ? wrPeriodStart(this.adapter, date, period) : this.adapter.clone(date);
|
|
300
511
|
if (!start || start && end) {
|
|
301
|
-
this.range.set([
|
|
512
|
+
this.range.set([from, null]);
|
|
302
513
|
return;
|
|
303
514
|
}
|
|
304
|
-
if (this.adapter.compareDate(date, start) < 0) this.range.set([this.adapter
|
|
305
|
-
else this.range.set([start, this.adapter.clone(date)]);
|
|
515
|
+
if (this.adapter.compareDate(date, start) < 0) this.range.set([from, period ? wrPeriodEnd(this.adapter, start, period) : start]);
|
|
516
|
+
else this.range.set([start, period ? wrPeriodEnd(this.adapter, date, period) : this.adapter.clone(date)]);
|
|
306
517
|
this.hoverDate.set(null);
|
|
307
518
|
}
|
|
308
519
|
onKeyDown(event) {
|
|
@@ -367,7 +578,9 @@ var WrCalendar = class WrCalendar {
|
|
|
367
578
|
afterNextRender(() => this.focusActiveCell(), { injector: this.injector });
|
|
368
579
|
}
|
|
369
580
|
onChipKeyDown(event) {
|
|
370
|
-
const
|
|
581
|
+
const view = this.viewMode();
|
|
582
|
+
if (view === "day") return;
|
|
583
|
+
const cols = CHIP_COLS[view];
|
|
371
584
|
const count = this.chipCount();
|
|
372
585
|
const current = this.activeChip();
|
|
373
586
|
let next;
|
|
@@ -403,15 +616,21 @@ var WrCalendar = class WrCalendar {
|
|
|
403
616
|
afterNextRender(() => this.focusActiveChip(), { injector: this.injector });
|
|
404
617
|
}
|
|
405
618
|
chipCount() {
|
|
406
|
-
|
|
619
|
+
switch (this.viewMode()) {
|
|
620
|
+
case "month": return this.monthsView().length;
|
|
621
|
+
case "quarter": return this.quartersView.length;
|
|
622
|
+
default: return this.yearsView().length;
|
|
623
|
+
}
|
|
407
624
|
}
|
|
408
625
|
isChipDisabled(index) {
|
|
409
626
|
if (this.viewMode() === "month") return this.isMonthDisabled(index);
|
|
627
|
+
if (this.viewMode() === "quarter") return this.isQuarterDisabled(index);
|
|
410
628
|
const year = this.yearsView()[index];
|
|
411
629
|
return year === void 0 || this.isYearDisabled(year);
|
|
412
630
|
}
|
|
413
631
|
currentChip() {
|
|
414
632
|
if (this.viewMode() === "month") return this.adapter.getMonth(this.viewDate());
|
|
633
|
+
if (this.viewMode() === "quarter") return Math.floor(this.adapter.getMonth(this.viewDate()) / 3);
|
|
415
634
|
const index = this.yearsView().indexOf(this.adapter.getYear(this.viewDate()));
|
|
416
635
|
return index === -1 ? 0 : index;
|
|
417
636
|
}
|
|
@@ -465,7 +684,7 @@ var WrCalendar = class WrCalendar {
|
|
|
465
684
|
}
|
|
466
685
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
467
686
|
minVersion: "12.0.0",
|
|
468
|
-
version: "22.2.
|
|
687
|
+
version: "22.2.6",
|
|
469
688
|
ngImport: i0,
|
|
470
689
|
type: WrCalendar,
|
|
471
690
|
deps: [],
|
|
@@ -473,7 +692,7 @@ var WrCalendar = class WrCalendar {
|
|
|
473
692
|
});
|
|
474
693
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
475
694
|
minVersion: "17.0.0",
|
|
476
|
-
version: "22.2.
|
|
695
|
+
version: "22.2.6",
|
|
477
696
|
type: WrCalendar,
|
|
478
697
|
isStandalone: true,
|
|
479
698
|
selector: "wr-calendar",
|
|
@@ -485,6 +704,13 @@ var WrCalendar = class WrCalendar {
|
|
|
485
704
|
isRequired: false,
|
|
486
705
|
transformFunction: null
|
|
487
706
|
},
|
|
707
|
+
granularity: {
|
|
708
|
+
classPropertyName: "granularity",
|
|
709
|
+
publicName: "granularity",
|
|
710
|
+
isSignal: true,
|
|
711
|
+
isRequired: false,
|
|
712
|
+
transformFunction: null
|
|
713
|
+
},
|
|
488
714
|
date: {
|
|
489
715
|
classPropertyName: "date",
|
|
490
716
|
publicName: "date",
|
|
@@ -499,6 +725,13 @@ var WrCalendar = class WrCalendar {
|
|
|
499
725
|
isRequired: false,
|
|
500
726
|
transformFunction: null
|
|
501
727
|
},
|
|
728
|
+
value: {
|
|
729
|
+
classPropertyName: "value",
|
|
730
|
+
publicName: "value",
|
|
731
|
+
isSignal: true,
|
|
732
|
+
isRequired: false,
|
|
733
|
+
transformFunction: null
|
|
734
|
+
},
|
|
502
735
|
min: {
|
|
503
736
|
classPropertyName: "min",
|
|
504
737
|
publicName: "min",
|
|
@@ -533,25 +766,107 @@ var WrCalendar = class WrCalendar {
|
|
|
533
766
|
isSignal: true,
|
|
534
767
|
isRequired: false,
|
|
535
768
|
transformFunction: null
|
|
769
|
+
},
|
|
770
|
+
readonly: {
|
|
771
|
+
classPropertyName: "readonly",
|
|
772
|
+
publicName: "readonly",
|
|
773
|
+
isSignal: true,
|
|
774
|
+
isRequired: false,
|
|
775
|
+
transformFunction: null
|
|
776
|
+
},
|
|
777
|
+
ariaLabel: {
|
|
778
|
+
classPropertyName: "ariaLabel",
|
|
779
|
+
publicName: "ariaLabel",
|
|
780
|
+
isSignal: true,
|
|
781
|
+
isRequired: false,
|
|
782
|
+
transformFunction: null
|
|
783
|
+
},
|
|
784
|
+
prevMonthLabel: {
|
|
785
|
+
classPropertyName: "prevMonthLabel",
|
|
786
|
+
publicName: "prevMonthLabel",
|
|
787
|
+
isSignal: true,
|
|
788
|
+
isRequired: false,
|
|
789
|
+
transformFunction: null
|
|
790
|
+
},
|
|
791
|
+
nextMonthLabel: {
|
|
792
|
+
classPropertyName: "nextMonthLabel",
|
|
793
|
+
publicName: "nextMonthLabel",
|
|
794
|
+
isSignal: true,
|
|
795
|
+
isRequired: false,
|
|
796
|
+
transformFunction: null
|
|
797
|
+
},
|
|
798
|
+
monthListLabel: {
|
|
799
|
+
classPropertyName: "monthListLabel",
|
|
800
|
+
publicName: "monthListLabel",
|
|
801
|
+
isSignal: true,
|
|
802
|
+
isRequired: false,
|
|
803
|
+
transformFunction: null
|
|
804
|
+
},
|
|
805
|
+
yearListLabel: {
|
|
806
|
+
classPropertyName: "yearListLabel",
|
|
807
|
+
publicName: "yearListLabel",
|
|
808
|
+
isSignal: true,
|
|
809
|
+
isRequired: false,
|
|
810
|
+
transformFunction: null
|
|
811
|
+
},
|
|
812
|
+
quarterListLabel: {
|
|
813
|
+
classPropertyName: "quarterListLabel",
|
|
814
|
+
publicName: "quarterListLabel",
|
|
815
|
+
isSignal: true,
|
|
816
|
+
isRequired: false,
|
|
817
|
+
transformFunction: null
|
|
818
|
+
},
|
|
819
|
+
prevYearLabel: {
|
|
820
|
+
classPropertyName: "prevYearLabel",
|
|
821
|
+
publicName: "prevYearLabel",
|
|
822
|
+
isSignal: true,
|
|
823
|
+
isRequired: false,
|
|
824
|
+
transformFunction: null
|
|
825
|
+
},
|
|
826
|
+
nextYearLabel: {
|
|
827
|
+
classPropertyName: "nextYearLabel",
|
|
828
|
+
publicName: "nextYearLabel",
|
|
829
|
+
isSignal: true,
|
|
830
|
+
isRequired: false,
|
|
831
|
+
transformFunction: null
|
|
832
|
+
},
|
|
833
|
+
prevYearsLabel: {
|
|
834
|
+
classPropertyName: "prevYearsLabel",
|
|
835
|
+
publicName: "prevYearsLabel",
|
|
836
|
+
isSignal: true,
|
|
837
|
+
isRequired: false,
|
|
838
|
+
transformFunction: null
|
|
839
|
+
},
|
|
840
|
+
nextYearsLabel: {
|
|
841
|
+
classPropertyName: "nextYearsLabel",
|
|
842
|
+
publicName: "nextYearsLabel",
|
|
843
|
+
isSignal: true,
|
|
844
|
+
isRequired: false,
|
|
845
|
+
transformFunction: null
|
|
536
846
|
}
|
|
537
847
|
},
|
|
538
848
|
outputs: {
|
|
539
849
|
date: "dateChange",
|
|
540
|
-
range: "rangeChange"
|
|
850
|
+
range: "rangeChange",
|
|
851
|
+
value: "valueChange",
|
|
852
|
+
touch: "touch"
|
|
541
853
|
},
|
|
542
854
|
host: {
|
|
543
|
-
listeners: {
|
|
855
|
+
listeners: {
|
|
856
|
+
"keydown": "onKeyDown($event)",
|
|
857
|
+
"focusout": "onFocusOut($event)"
|
|
858
|
+
},
|
|
544
859
|
properties: { "class": "classes()" },
|
|
545
860
|
classAttribute: "wr-calendar"
|
|
546
861
|
},
|
|
547
862
|
ngImport: i0,
|
|
548
|
-
template: "<div class=\"wr-calendar__header\">\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--prev\"\n [attr.aria-label]=\"prevLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"prev()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\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=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__label\"\n [disabled]=\"disabled() || viewMode() === 'year'\"\n (click)=\"onLabelClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--next\"\n [attr.aria-label]=\"nextLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"next()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\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=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n</div>\n\n@switch (viewMode()) {\n @case ('day') {\n <!--\n The weekday strip and the week rows are one grid, so they share a wrapper:\n `role=\"grid\"` may only own rows, and as siblings the header row had no grid\n parent at all. `.wr-calendar__body` repeats the host's column gap, so the\n rendered spacing is unchanged.\n -->\n <div
|
|
863
|
+
template: "<div class=\"wr-calendar__header\">\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--prev\"\n [attr.aria-label]=\"prevLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"prev()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\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=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__label\"\n [disabled]=\"disabled() || viewMode() === 'year'\"\n (click)=\"onLabelClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--next\"\n [attr.aria-label]=\"nextLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"next()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\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=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n</div>\n\n@switch (viewMode()) {\n @case ('day') {\n <!--\n The weekday strip and the week rows are one grid, so they share a wrapper:\n `role=\"grid\"` may only own rows, and as siblings the header row had no grid\n parent at all. `.wr-calendar__body` repeats the host's column gap, so the\n rendered spacing is unchanged.\n -->\n <div\n class=\"wr-calendar__body\"\n role=\"grid\"\n [attr.aria-label]=\"fieldAria.labelledBy() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"fieldAria.labelledBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n >\n <div class=\"wr-calendar__weekdays\" role=\"row\">\n @for (name of weekdayNames(); track name) {\n <span class=\"wr-calendar__weekday\" role=\"columnheader\">{{ name }}</span>\n }\n </div>\n\n <div class=\"wr-calendar__grid\" role=\"rowgroup\" (mouseleave)=\"onCellLeave()\">\n @for (week of weeks(); track $index) {\n <div class=\"wr-calendar__week\" role=\"row\">\n @for (day of week; track trackByTime($index, day)) {\n <button\n type=\"button\"\n class=\"wr-calendar__day\"\n role=\"gridcell\"\n [class.wr-calendar__day--today]=\"isToday(day)\"\n [class.wr-calendar__day--out-of-month]=\"isOutOfMonth(day)\"\n [class.wr-calendar__day--selected]=\"isSelected(day)\"\n [class.wr-calendar__day--in-range]=\"isInRange(day)\"\n [class.wr-calendar__day--range-preview]=\"isInRangePreview(day)\"\n [class.wr-calendar__day--focused]=\"isFocused(day)\"\n [disabled]=\"isDisabled(day)\"\n [attr.tabindex]=\"isFocused(day) ? 0 : -1\"\n [attr.aria-label]=\"dayLabel(day)\"\n [attr.aria-selected]=\"isAriaSelected(day)\"\n [attr.aria-disabled]=\"isDisabled(day)\"\n (click)=\"onCellClick(day)\"\n (mouseenter)=\"onCellEnter(day)\"\n >\n {{ dayOfMonth(day) }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n\n @case ('month') {\n <!--\n A listbox owns its arrows, so its options share ONE tab stop: twelve months\n that were each tabbable announced a keyboard model — arrow to a month, Tab\n out of the list — that the component did not have. `activeChip()` is where\n the ring is, and it is always an enabled chip.\n -->\n <div\n class=\"wr-calendar__months\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedMonthListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (name of monthsView(); track name) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isMonthDisabled($index)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isMonthDisabled($index)\"\n (click)=\"onMonthSelect($index)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n @case ('quarter') {\n <!-- Only under `granularity=\"quarter\"`, where a chip is the pick itself. -->\n <div\n class=\"wr-calendar__quarters\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedQuarterListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (quarter of quartersView; track quarter) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isQuarterDisabled($index)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isQuarterDisabled($index)\"\n (click)=\"onQuarterSelect($index)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ quarterLabel(quarter) }}\n </button>\n }\n </div>\n }\n\n @case ('year') {\n <div\n class=\"wr-calendar__years\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedYearListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (year of yearsView(); track year) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isYearDisabled(year)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isYearDisabled(year)\"\n (click)=\"onYearSelect(year)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n}\n",
|
|
549
864
|
encapsulation: i0.ViewEncapsulation.None
|
|
550
865
|
});
|
|
551
866
|
};
|
|
552
867
|
i0.ɵɵngDeclareClassMetadata({
|
|
553
868
|
minVersion: "12.0.0",
|
|
554
|
-
version: "22.2.
|
|
869
|
+
version: "22.2.6",
|
|
555
870
|
ngImport: i0,
|
|
556
871
|
type: WrCalendar,
|
|
557
872
|
decorators: [{
|
|
@@ -562,9 +877,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
562
877
|
host: {
|
|
563
878
|
class: "wr-calendar",
|
|
564
879
|
"[class]": "classes()",
|
|
565
|
-
"(keydown)": "onKeyDown($event)"
|
|
880
|
+
"(keydown)": "onKeyDown($event)",
|
|
881
|
+
"(focusout)": "onFocusOut($event)"
|
|
566
882
|
},
|
|
567
|
-
template: "<div class=\"wr-calendar__header\">\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--prev\"\n [attr.aria-label]=\"prevLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"prev()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\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=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__label\"\n [disabled]=\"disabled() || viewMode() === 'year'\"\n (click)=\"onLabelClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--next\"\n [attr.aria-label]=\"nextLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"next()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\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=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n</div>\n\n@switch (viewMode()) {\n @case ('day') {\n <!--\n The weekday strip and the week rows are one grid, so they share a wrapper:\n `role=\"grid\"` may only own rows, and as siblings the header row had no grid\n parent at all. `.wr-calendar__body` repeats the host's column gap, so the\n rendered spacing is unchanged.\n -->\n <div
|
|
883
|
+
template: "<div class=\"wr-calendar__header\">\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--prev\"\n [attr.aria-label]=\"prevLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"prev()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\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=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__label\"\n [disabled]=\"disabled() || viewMode() === 'year'\"\n (click)=\"onLabelClick()\"\n >\n {{ headerLabel() }}\n </button>\n <button\n type=\"button\"\n class=\"wr-calendar__nav wr-calendar__nav--next\"\n [attr.aria-label]=\"nextLabel()\"\n [disabled]=\"disabled()\"\n (click)=\"next()\"\n >\n <svg\n width=\"18\"\n height=\"18\"\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=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n</div>\n\n@switch (viewMode()) {\n @case ('day') {\n <!--\n The weekday strip and the week rows are one grid, so they share a wrapper:\n `role=\"grid\"` may only own rows, and as siblings the header row had no grid\n parent at all. `.wr-calendar__body` repeats the host's column gap, so the\n rendered spacing is unchanged.\n -->\n <div\n class=\"wr-calendar__body\"\n role=\"grid\"\n [attr.aria-label]=\"fieldAria.labelledBy() ? null : ariaLabel()\"\n [attr.aria-labelledby]=\"fieldAria.labelledBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n >\n <div class=\"wr-calendar__weekdays\" role=\"row\">\n @for (name of weekdayNames(); track name) {\n <span class=\"wr-calendar__weekday\" role=\"columnheader\">{{ name }}</span>\n }\n </div>\n\n <div class=\"wr-calendar__grid\" role=\"rowgroup\" (mouseleave)=\"onCellLeave()\">\n @for (week of weeks(); track $index) {\n <div class=\"wr-calendar__week\" role=\"row\">\n @for (day of week; track trackByTime($index, day)) {\n <button\n type=\"button\"\n class=\"wr-calendar__day\"\n role=\"gridcell\"\n [class.wr-calendar__day--today]=\"isToday(day)\"\n [class.wr-calendar__day--out-of-month]=\"isOutOfMonth(day)\"\n [class.wr-calendar__day--selected]=\"isSelected(day)\"\n [class.wr-calendar__day--in-range]=\"isInRange(day)\"\n [class.wr-calendar__day--range-preview]=\"isInRangePreview(day)\"\n [class.wr-calendar__day--focused]=\"isFocused(day)\"\n [disabled]=\"isDisabled(day)\"\n [attr.tabindex]=\"isFocused(day) ? 0 : -1\"\n [attr.aria-label]=\"dayLabel(day)\"\n [attr.aria-selected]=\"isAriaSelected(day)\"\n [attr.aria-disabled]=\"isDisabled(day)\"\n (click)=\"onCellClick(day)\"\n (mouseenter)=\"onCellEnter(day)\"\n >\n {{ dayOfMonth(day) }}\n </button>\n }\n </div>\n }\n </div>\n </div>\n }\n\n @case ('month') {\n <!--\n A listbox owns its arrows, so its options share ONE tab stop: twelve months\n that were each tabbable announced a keyboard model — arrow to a month, Tab\n out of the list — that the component did not have. `activeChip()` is where\n the ring is, and it is always an enabled chip.\n -->\n <div\n class=\"wr-calendar__months\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedMonthListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (name of monthsView(); track name) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isMonthDisabled($index)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isMonthDisabled($index)\"\n (click)=\"onMonthSelect($index)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n @case ('quarter') {\n <!-- Only under `granularity=\"quarter\"`, where a chip is the pick itself. -->\n <div\n class=\"wr-calendar__quarters\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedQuarterListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (quarter of quartersView; track quarter) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isQuarterDisabled($index)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isQuarterDisabled($index)\"\n (click)=\"onQuarterSelect($index)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ quarterLabel(quarter) }}\n </button>\n }\n </div>\n }\n\n @case ('year') {\n <div\n class=\"wr-calendar__years\"\n role=\"listbox\"\n [attr.aria-label]=\"resolvedYearListLabel()\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n (mouseleave)=\"onCellLeave()\"\n >\n @for (year of yearsView(); track year) {\n <button\n type=\"button\"\n class=\"wr-calendar__chip\"\n role=\"option\"\n [class.wr-calendar__chip--current]=\"isChipCurrent($index)\"\n [class.wr-calendar__chip--selected]=\"isChipSelected($index)\"\n [class.wr-calendar__chip--in-range]=\"isChipInRange($index)\"\n [class.wr-calendar__chip--range-preview]=\"isChipRangePreview($index)\"\n [disabled]=\"isYearDisabled(year)\"\n [attr.tabindex]=\"activeChip() === $index ? 0 : -1\"\n [attr.aria-selected]=\"isChipSelected($index)\"\n [attr.aria-disabled]=\"isYearDisabled(year)\"\n (click)=\"onYearSelect(year)\"\n (mouseenter)=\"onChipEnter($index)\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n}\n"
|
|
568
884
|
}]
|
|
569
885
|
}],
|
|
570
886
|
ctorParameters: () => [],
|
|
@@ -577,6 +893,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
577
893
|
required: false
|
|
578
894
|
}]
|
|
579
895
|
}],
|
|
896
|
+
granularity: [{
|
|
897
|
+
type: i0.Input,
|
|
898
|
+
args: [{
|
|
899
|
+
isSignal: true,
|
|
900
|
+
alias: "granularity",
|
|
901
|
+
required: false
|
|
902
|
+
}]
|
|
903
|
+
}],
|
|
580
904
|
date: [{
|
|
581
905
|
type: i0.Input,
|
|
582
906
|
args: [{
|
|
@@ -599,6 +923,21 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
599
923
|
type: i0.Output,
|
|
600
924
|
args: ["rangeChange"]
|
|
601
925
|
}],
|
|
926
|
+
value: [{
|
|
927
|
+
type: i0.Input,
|
|
928
|
+
args: [{
|
|
929
|
+
isSignal: true,
|
|
930
|
+
alias: "value",
|
|
931
|
+
required: false
|
|
932
|
+
}]
|
|
933
|
+
}, {
|
|
934
|
+
type: i0.Output,
|
|
935
|
+
args: ["valueChange"]
|
|
936
|
+
}],
|
|
937
|
+
touch: [{
|
|
938
|
+
type: i0.Output,
|
|
939
|
+
args: ["touch"]
|
|
940
|
+
}],
|
|
602
941
|
min: [{
|
|
603
942
|
type: i0.Input,
|
|
604
943
|
args: [{
|
|
@@ -638,6 +977,94 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
638
977
|
alias: "disabled",
|
|
639
978
|
required: false
|
|
640
979
|
}]
|
|
980
|
+
}],
|
|
981
|
+
readonly: [{
|
|
982
|
+
type: i0.Input,
|
|
983
|
+
args: [{
|
|
984
|
+
isSignal: true,
|
|
985
|
+
alias: "readonly",
|
|
986
|
+
required: false
|
|
987
|
+
}]
|
|
988
|
+
}],
|
|
989
|
+
ariaLabel: [{
|
|
990
|
+
type: i0.Input,
|
|
991
|
+
args: [{
|
|
992
|
+
isSignal: true,
|
|
993
|
+
alias: "ariaLabel",
|
|
994
|
+
required: false
|
|
995
|
+
}]
|
|
996
|
+
}],
|
|
997
|
+
prevMonthLabel: [{
|
|
998
|
+
type: i0.Input,
|
|
999
|
+
args: [{
|
|
1000
|
+
isSignal: true,
|
|
1001
|
+
alias: "prevMonthLabel",
|
|
1002
|
+
required: false
|
|
1003
|
+
}]
|
|
1004
|
+
}],
|
|
1005
|
+
nextMonthLabel: [{
|
|
1006
|
+
type: i0.Input,
|
|
1007
|
+
args: [{
|
|
1008
|
+
isSignal: true,
|
|
1009
|
+
alias: "nextMonthLabel",
|
|
1010
|
+
required: false
|
|
1011
|
+
}]
|
|
1012
|
+
}],
|
|
1013
|
+
monthListLabel: [{
|
|
1014
|
+
type: i0.Input,
|
|
1015
|
+
args: [{
|
|
1016
|
+
isSignal: true,
|
|
1017
|
+
alias: "monthListLabel",
|
|
1018
|
+
required: false
|
|
1019
|
+
}]
|
|
1020
|
+
}],
|
|
1021
|
+
yearListLabel: [{
|
|
1022
|
+
type: i0.Input,
|
|
1023
|
+
args: [{
|
|
1024
|
+
isSignal: true,
|
|
1025
|
+
alias: "yearListLabel",
|
|
1026
|
+
required: false
|
|
1027
|
+
}]
|
|
1028
|
+
}],
|
|
1029
|
+
quarterListLabel: [{
|
|
1030
|
+
type: i0.Input,
|
|
1031
|
+
args: [{
|
|
1032
|
+
isSignal: true,
|
|
1033
|
+
alias: "quarterListLabel",
|
|
1034
|
+
required: false
|
|
1035
|
+
}]
|
|
1036
|
+
}],
|
|
1037
|
+
prevYearLabel: [{
|
|
1038
|
+
type: i0.Input,
|
|
1039
|
+
args: [{
|
|
1040
|
+
isSignal: true,
|
|
1041
|
+
alias: "prevYearLabel",
|
|
1042
|
+
required: false
|
|
1043
|
+
}]
|
|
1044
|
+
}],
|
|
1045
|
+
nextYearLabel: [{
|
|
1046
|
+
type: i0.Input,
|
|
1047
|
+
args: [{
|
|
1048
|
+
isSignal: true,
|
|
1049
|
+
alias: "nextYearLabel",
|
|
1050
|
+
required: false
|
|
1051
|
+
}]
|
|
1052
|
+
}],
|
|
1053
|
+
prevYearsLabel: [{
|
|
1054
|
+
type: i0.Input,
|
|
1055
|
+
args: [{
|
|
1056
|
+
isSignal: true,
|
|
1057
|
+
alias: "prevYearsLabel",
|
|
1058
|
+
required: false
|
|
1059
|
+
}]
|
|
1060
|
+
}],
|
|
1061
|
+
nextYearsLabel: [{
|
|
1062
|
+
type: i0.Input,
|
|
1063
|
+
args: [{
|
|
1064
|
+
isSignal: true,
|
|
1065
|
+
alias: "nextYearsLabel",
|
|
1066
|
+
required: false
|
|
1067
|
+
}]
|
|
641
1068
|
}]
|
|
642
1069
|
}
|
|
643
1070
|
});
|