ngwr 16.1.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 +108 -1
- package/dropdown/styles/_index.scss +40 -10
- 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 +48 -4
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +492 -75
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +76 -12
- package/fesm2022/ngwr-date-stamp.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +144 -12
- 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 +48 -5
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +407 -116
- 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 +26 -6
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +26 -6
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +26 -6
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +26 -6
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +26 -6
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +26 -6
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +26 -6
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +26 -6
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +26 -6
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +26 -6
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +26 -6
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +26 -6
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +26 -6
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +26 -6
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +26 -6
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +26 -6
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +26 -6
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +26 -6
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +26 -6
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +26 -6
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +26 -6
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +26 -6
- 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-testing.mjs +26 -0
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +249 -13
- 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 +57 -33
- 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 +418 -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 +23 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +108 -14
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list-testing.mjs +103 -0
- package/fesm2022/ngwr-sortable-list-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sortable-list.mjs +284 -63
- 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 +28 -6
- package/i18n/cs.json +28 -6
- package/i18n/de.json +28 -6
- package/i18n/en.json +28 -6
- package/i18n/es.json +28 -6
- package/i18n/fr.json +28 -6
- package/i18n/he.json +28 -6
- package/i18n/hi.json +28 -6
- package/i18n/id.json +28 -6
- package/i18n/it.json +28 -6
- package/i18n/ja.json +28 -6
- package/i18n/ko.json +28 -6
- package/i18n/nl.json +28 -6
- package/i18n/pl.json +28 -6
- package/i18n/pt.json +28 -6
- package/i18n/ru.json +28 -6
- package/i18n/sv.json +28 -6
- package/i18n/tr.json +28 -6
- package/i18n/uk.json +28 -6
- package/i18n/vi.json +28 -6
- package/i18n/zh-TW.json +28 -6
- package/i18n/zh.json +28 -6
- package/input/styles/_index.scss +68 -1
- package/input-otp/styles/_index.scss +14 -0
- package/lightbox/styles/_rules.scss +96 -0
- package/llms-full.txt +61 -25
- package/llms.txt +12 -0
- package/overlay/styles/_arrow.scss +4 -4
- package/package.json +37 -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 +5 -0
- package/select/styles/_index.scss +114 -22
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +11 -2
- package/slider/styles/_index.scss +128 -0
- package/sortable-list/styles/_rules.scss +23 -1
- 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 +40 -8
- package/types/ngwr-date-picker.d.ts +178 -10
- package/types/ngwr-date-stamp-testing.d.ts +1 -1
- package/types/ngwr-date-stamp.d.ts +53 -7
- package/types/ngwr-date.d.ts +188 -15
- package/types/ngwr-drawer.d.ts +9 -0
- package/types/ngwr-dropdown-testing.d.ts +73 -5
- package/types/ngwr-dropdown.d.ts +124 -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-lightbox-testing.d.ts +27 -0
- package/types/ngwr-lightbox.d.ts +71 -6
- package/types/ngwr-overlay.d.ts +84 -5
- package/types/ngwr-pipes.d.ts +34 -13
- 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 +10 -1
- package/types/ngwr-slider.d.ts +109 -3
- package/types/ngwr-sortable-list-testing.d.ts +79 -0
- package/types/ngwr-sortable-list.d.ts +119 -10
- 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-breadcrumbs.mjs","names":[],"sources":["../../../projects/lib/breadcrumbs/breadcrumbs.ts","../../../projects/lib/breadcrumbs/breadcrumbs.html","../../../projects/lib/breadcrumbs/breadcrumbs-item.ts","../../../projects/lib/breadcrumbs/breadcrumbs-item.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\n\n/** Escape a string for use inside a double-quoted CSS `<string>`. */\nfunction cssString(value: string): string {\n return value.replace(/[\\\\\"]/g, '\\\\$&').replace(/[\\n\\r\\f]/g, char => `\\\\${char.codePointAt(0)!.toString(16)} `);\n}\n\n/**\n * Breadcrumb navigation. Project `<wr-breadcrumbs-item>` children — each keeps\n * its own element and takes `role=\"listitem\"` inside the `<ol>` rather than\n * rendering an `<li>`, separated by the configured glyph (default `/`). The\n * container exposes the `nav[aria-label]` landmark required by WCAG.\n *\n * @example\n * ```html\n * <wr-breadcrumbs>\n * <wr-breadcrumbs-item routerLink=\"/\">Home</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item routerLink=\"/docs\">Docs</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item>Current</wr-breadcrumbs-item>\n * </wr-breadcrumbs>\n *\n * <!-- Custom separator -->\n * <wr-breadcrumbs separator=\"›\">…</wr-breadcrumbs>\n * ```\n *\n * @see https://ngwr.dev/reference/components/breadcrumbs\n */\n@Component({\n selector: 'wr-breadcrumbs',\n templateUrl: './breadcrumbs.html',\n styleUrl: './breadcrumbs.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-breadcrumbs',\n '[style.--wr-breadcrumbs-separator]': 'separatorValue()',\n },\n})\nexport class WrBreadcrumbs {\n /** Separator glyph between items. Any short string. @default '/' */\n readonly separator = input('/');\n\n /**\n * Accessible label for the `nav` landmark. Falls back to `breadcrumbs.label`,\n * then `'Breadcrumbs'`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n // The English default used to live on the input itself, which made this the one\n // landmark in the library a catalog could not reach: `wr-anchor` and `wr-sidebar`\n // announced in Russian on the same page while this one stayed \"Breadcrumbs\", and\n // the only escape was restating `[ariaLabel]` on every trail.\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'breadcrumbs.label', 'Breadcrumbs');\n\n // The glyph is WRAPPED in quotes here and unwrapped by `content:` in the\n // stylesheet, so an unescaped `\"` inside it closes the library's own string\n // and the rest of the value is parsed as CSS — `/\" url(\"…\") \"` computes to\n // `content: \"/\" url(\"…\") \"\"`, an image the browser fetches. Escaping is the\n // whole fix, and it is lossless: a separator that IS a quote still renders.\n protected readonly separatorValue = computed(() => `\"${cssString(this.separator())}\"`);\n}\n","<nav class=\"wr-breadcrumbs__nav\" [attr.aria-label]=\"resolvedAriaLabel()\">\n <ol class=\"wr-breadcrumbs__list\">\n <ng-content />\n </ol>\n</nav>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { type Params, RouterLink } from '@angular/router';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * One row inside `<wr-breadcrumbs>`. The host itself is the row — a\n * `<wr-breadcrumbs-item role=\"listitem\" class=\"wr-breadcrumbs__item\">`\n * inside the parent's `<ol>` — and it contains either a real\n * `<a class=\"wr-breadcrumbs__link\">` (when `[href]` or `[routerLink]` is\n * set) or, for the current crumb, a non-interactive\n * `<a class=\"wr-breadcrumbs__current\" role=\"text\" tabindex=\"-1\"\n * aria-current=\"page\">` (when neither is set — typically the last crumb).\n *\n * @example\n * ```html\n * <wr-breadcrumbs-item icon=\"home\" routerLink=\"/\">Home</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item routerLink=\"/debts\" [queryParams]=\"{ date: day }\">Debts</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item href=\"https://ngwr.dev\">External</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item>Current page</wr-breadcrumbs-item>\n * ```\n */\n@Component({\n selector: 'wr-breadcrumbs-item',\n templateUrl: './breadcrumbs-item.html',\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, RouterLink, WrIcon],\n host: { class: 'wr-breadcrumbs__item', role: 'listitem' },\n})\nexport class WrBreadcrumbsItem {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('breadcrumbs');\n }\n\n /** Plain anchor href. Overridden by `routerLink` when both are set. */\n readonly href = input<string | null>(null);\n\n /** Angular router target. Anything `RouterLink` accepts (string or `any[]`). */\n readonly routerLink = input<string | readonly unknown[] | null>(null);\n\n /**\n * Query parameters for a `routerLink` crumb, the way `RouterLink` takes them.\n * A `?` written into `routerLink` is part of the path, and the router escapes\n * it: `/debts?date=1` became `/debts%3Fdate%3D1`. Ignored without `routerLink`.\n *\n * @default null\n */\n readonly queryParams = input<Params | null>(null);\n\n /** Open external `href` in a new tab. Ignored when `routerLink` is set. @default false */\n readonly external = input(false);\n\n /** Optional leading icon rendered inline before the label. @default null */\n readonly icon = input<WrIconName | null>(null);\n\n protected readonly isLink = computed(() => this.href() != null || this.routerLink() != null);\n protected readonly isRouter = computed(() => this.routerLink() != null);\n\n protected readonly rootClass = computed(() => (this.isLink() ? 'wr-breadcrumbs__link' : 'wr-breadcrumbs__current'));\n}\n","<!--\n The label lives in a template rather than inside each branch below. A default\n `<ng-content />` written into two `@if` branches fills only ONE of them — the\n last in static order — and the other renders empty, with no template error and\n nothing in the console. This component has been broken exactly that way\n before; stamping one template from either branch keeps two anchors and one\n projection.\n-->\n<ng-template #label>\n @if (icon(); as i) {\n <wr-icon class=\"wr-breadcrumbs__icon\" [name]=\"i\" />\n }\n <ng-content />\n</ng-template>\n\n@if (isRouter()) {\n <!--\n Only ROUTER crumbs get `RouterLink`. Applied unconditionally it owns the\n anchor's `href` and writes null into it whenever `routerLink` is null —\n which silently turned every `href`-based crumb, a documented input, into\n text that navigates nowhere.\n -->\n <a [class]=\"rootClass()\" [routerLink]=\"routerLink()\" [queryParams]=\"queryParams()\">\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n} @else {\n <a\n [class]=\"rootClass()\"\n [attr.href]=\"href()\"\n [attr.aria-current]=\"isLink() ? null : 'page'\"\n [attr.role]=\"isLink() ? null : 'text'\"\n [attr.tabindex]=\"isLink() ? null : -1\"\n [attr.target]=\"external() ? '_blank' : null\"\n [attr.rel]=\"external() ? 'noreferrer noopener' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAS,UAAU,OAAa;CAC9B,OAAO,MAAM,QAAQ,UAAU,MAAM,CAAC,CAAC,QAAQ,cAAa,SAAQ,KAAK,KAAK,YAAY,CAAC,CAAE,CAAC,SAAS,EAAE,EAAC,EAAG;AAC/G;AAgCA,IAAa,gBAAb,MAAa,cAAa;CAEf,YAAY,MAAM,KAAI,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAMtB,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAM5B,oBAAoB,YAAY,KAAK,WAAW,qBAAqB,aAAa;CAOlF,iBAAiB,eAAe,IAAI,UAA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A;EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,QAAA,WAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UCtC9B;EAsCA,cAAA;GAAA;IAAA,MAAA;IAAA,MDHY;IAAgB,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAU,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAM,UAAA;IAAA,QAAA,CAAA,MAAA;GAAA;EAAA;EAAA,eAAA,GAAA,kBAAA;CAAA,CAAA;;AAGnC,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAP7B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAqB,eAEhB,kBAAkB;GAAI,SAC5B;IAAC;IAAkB;IAAY;GAAM;GAAC,MACzC;IAAE,OAAO;IAAwB,MAAM;GAAU;GAAE,UAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-breadcrumbs.mjs","names":[],"sources":["../../../projects/lib/breadcrumbs/breadcrumbs.ts","../../../projects/lib/breadcrumbs/breadcrumbs.html","../../../projects/lib/breadcrumbs/breadcrumbs-item.ts","../../../projects/lib/breadcrumbs/breadcrumbs-item.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\n\n/** Escape a string for use inside a double-quoted CSS `<string>`. */\nfunction cssString(value: string): string {\n return value.replace(/[\\\\\"]/g, '\\\\$&').replace(/[\\n\\r\\f]/g, char => `\\\\${char.codePointAt(0)!.toString(16)} `);\n}\n\n/**\n * Breadcrumb navigation. Project `<wr-breadcrumbs-item>` children — each keeps\n * its own element and takes `role=\"listitem\"` inside the `<ol>` rather than\n * rendering an `<li>`, separated by the configured glyph (default `/`). The\n * container exposes the `nav[aria-label]` landmark required by WCAG.\n *\n * @example\n * ```html\n * <wr-breadcrumbs>\n * <wr-breadcrumbs-item routerLink=\"/\">Home</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item routerLink=\"/docs\">Docs</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item>Current</wr-breadcrumbs-item>\n * </wr-breadcrumbs>\n *\n * <!-- Custom separator -->\n * <wr-breadcrumbs separator=\"›\">…</wr-breadcrumbs>\n * ```\n *\n * @see https://ngwr.dev/reference/components/breadcrumbs\n */\n@Component({\n selector: 'wr-breadcrumbs',\n templateUrl: './breadcrumbs.html',\n styleUrl: './breadcrumbs.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-breadcrumbs',\n '[style.--wr-breadcrumbs-separator]': 'separatorValue()',\n },\n})\nexport class WrBreadcrumbs {\n /** Separator glyph between items. Any short string. @default '/' */\n readonly separator = input('/');\n\n /**\n * Accessible label for the `nav` landmark. Falls back to `breadcrumbs.label`,\n * then `'Breadcrumbs'`.\n */\n readonly ariaLabel = input<string | null>(null);\n\n // The English default used to live on the input itself, which made this the one\n // landmark in the library a catalog could not reach: `wr-anchor` and `wr-sidebar`\n // announced in Russian on the same page while this one stayed \"Breadcrumbs\", and\n // the only escape was restating `[ariaLabel]` on every trail.\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'breadcrumbs.label', 'Breadcrumbs');\n\n // The glyph is WRAPPED in quotes here and unwrapped by `content:` in the\n // stylesheet, so an unescaped `\"` inside it closes the library's own string\n // and the rest of the value is parsed as CSS — `/\" url(\"…\") \"` computes to\n // `content: \"/\" url(\"…\") \"\"`, an image the browser fetches. Escaping is the\n // whole fix, and it is lossless: a separator that IS a quote still renders.\n protected readonly separatorValue = computed(() => `\"${cssString(this.separator())}\"`);\n}\n","<nav class=\"wr-breadcrumbs__nav\" [attr.aria-label]=\"resolvedAriaLabel()\">\n <ol class=\"wr-breadcrumbs__list\">\n <ng-content />\n </ol>\n</nav>\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\nimport { type Params, RouterLink } from '@angular/router';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * One row inside `<wr-breadcrumbs>`. The host itself is the row — a\n * `<wr-breadcrumbs-item role=\"listitem\" class=\"wr-breadcrumbs__item\">`\n * inside the parent's `<ol>` — and it contains either a real\n * `<a class=\"wr-breadcrumbs__link\">` (when `[href]` or `[routerLink]` is\n * set) or, for the current crumb, a non-interactive\n * `<a class=\"wr-breadcrumbs__current\" role=\"text\" tabindex=\"-1\"\n * aria-current=\"page\">` (when neither is set — typically the last crumb).\n *\n * @example\n * ```html\n * <wr-breadcrumbs-item icon=\"home\" routerLink=\"/\">Home</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item routerLink=\"/debts\" [queryParams]=\"{ date: day }\">Debts</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item href=\"https://ngwr.dev\">External</wr-breadcrumbs-item>\n * <wr-breadcrumbs-item>Current page</wr-breadcrumbs-item>\n * ```\n */\n@Component({\n selector: 'wr-breadcrumbs-item',\n templateUrl: './breadcrumbs-item.html',\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, RouterLink, WrIcon],\n host: { class: 'wr-breadcrumbs__item', role: 'listitem' },\n})\nexport class WrBreadcrumbsItem {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('breadcrumbs');\n }\n\n /** Plain anchor href. Overridden by `routerLink` when both are set. */\n readonly href = input<string | null>(null);\n\n /** Angular router target. Anything `RouterLink` accepts (string or `any[]`). */\n readonly routerLink = input<string | readonly unknown[] | null>(null);\n\n /**\n * Query parameters for a `routerLink` crumb, the way `RouterLink` takes them.\n * A `?` written into `routerLink` is part of the path, and the router escapes\n * it: `/debts?date=1` became `/debts%3Fdate%3D1`. Ignored without `routerLink`.\n *\n * @default null\n */\n readonly queryParams = input<Params | null>(null);\n\n /** Open external `href` in a new tab. Ignored when `routerLink` is set. @default false */\n readonly external = input(false);\n\n /** Optional leading icon rendered inline before the label. @default null */\n readonly icon = input<WrIconName | null>(null);\n\n protected readonly isLink = computed(() => this.href() != null || this.routerLink() != null);\n protected readonly isRouter = computed(() => this.routerLink() != null);\n\n protected readonly rootClass = computed(() => (this.isLink() ? 'wr-breadcrumbs__link' : 'wr-breadcrumbs__current'));\n}\n","<!--\n The label lives in a template rather than inside each branch below. A default\n `<ng-content />` written into two `@if` branches fills only ONE of them — the\n last in static order — and the other renders empty, with no template error and\n nothing in the console. This component has been broken exactly that way\n before; stamping one template from either branch keeps two anchors and one\n projection.\n-->\n<ng-template #label>\n @if (icon(); as i) {\n <wr-icon class=\"wr-breadcrumbs__icon\" [name]=\"i\" />\n }\n <ng-content />\n</ng-template>\n\n@if (isRouter()) {\n <!--\n Only ROUTER crumbs get `RouterLink`. Applied unconditionally it owns the\n anchor's `href` and writes null into it whenever `routerLink` is null —\n which silently turned every `href`-based crumb, a documented input, into\n text that navigates nowhere.\n -->\n <a [class]=\"rootClass()\" [routerLink]=\"routerLink()\" [queryParams]=\"queryParams()\">\n <ng-container [ngTemplateOutlet]=\"label\" />\n </a>\n} @else {\n <a\n [class]=\"rootClass()\"\n [attr.href]=\"href()\"\n [attr.aria-current]=\"isLink() ? null : 'page'\"\n [attr.role]=\"isLink() ? null : 'text'\"\n [attr.tabindex]=\"isLink() ? null : -1\"\n [attr.target]=\"external() ? '_blank' : null\"\n [attr.rel]=\"external() ? 'noreferrer noopener' : null\"\n >\n <ng-container [ngTemplateOutlet]=\"label\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
+
import { ComponentHarness, HarnessPredicate } from "@angular/cdk/testing";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
7
|
+
*/
|
|
8
|
+
var WrBurgerHarness = class WrBurgerHarness extends ComponentHarness {
|
|
9
|
+
static hostSelector = "wr-burger";
|
|
10
|
+
static with(options = {}) {
|
|
11
|
+
return new HarnessPredicate(WrBurgerHarness, options).addOption("label", options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label)).addOption("open", options.open, async (harness, open) => await harness.isOpen() === open).addOption("disabled", options.disabled, async (harness, disabled) => await harness.isDisabled() === disabled);
|
|
12
|
+
}
|
|
13
|
+
button = this.locatorFor("button.wr-burger__btn");
|
|
14
|
+
async getLabel() {
|
|
15
|
+
return (await this.button()).getAttribute("aria-label");
|
|
16
|
+
}
|
|
17
|
+
async isOpen() {
|
|
18
|
+
return await (await this.button()).getAttribute("aria-expanded") === "true";
|
|
19
|
+
}
|
|
20
|
+
async isDisabled() {
|
|
21
|
+
return (await this.button()).getProperty("disabled");
|
|
22
|
+
}
|
|
23
|
+
async toggle() {
|
|
24
|
+
return (await this.button()).click();
|
|
25
|
+
}
|
|
26
|
+
async open() {
|
|
27
|
+
if (await this.isOpen()) return;
|
|
28
|
+
await this.toggle();
|
|
29
|
+
if (!await this.isOpen()) throw new Error("WrBurgerHarness.open(): the toggle did not open. A disabled burger refuses its own button.");
|
|
30
|
+
}
|
|
31
|
+
async close() {
|
|
32
|
+
if (!await this.isOpen()) return;
|
|
33
|
+
await this.toggle();
|
|
34
|
+
if (await this.isOpen()) throw new Error("WrBurgerHarness.close(): the toggle did not close. A disabled burger refuses its own button.");
|
|
35
|
+
}
|
|
36
|
+
async focus() {
|
|
37
|
+
return (await this.button()).focus();
|
|
38
|
+
}
|
|
39
|
+
async isFocused() {
|
|
40
|
+
return (await this.button()).isFocused();
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export { WrBurgerHarness };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=ngwr-burger-testing.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngwr-burger-testing.mjs","names":[],"sources":["../../../projects/lib/burger/testing/wr-burger-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrBurgerHarnessFilters } from './types';\n\n/**\n * Test harness for `<wr-burger>`, the animated menu toggle.\n *\n * Open and closed are read from the button's `aria-expanded`, not from the\n * `wr-burger--opened` modifier that drives the morph: the attribute is what a\n * screen reader is told. The morph itself is a CSS tween, which a unit test has\n * no way to see, so nothing here asks about it.\n *\n * @example\n * ```ts\n * const burger = await loader.getHarness(WrBurgerHarness);\n *\n * await burger.open();\n * expect(await burger.isOpen()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrBurgerHarness extends ComponentHarness {\n static hostSelector = 'wr-burger';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrBurgerHarnessFilters = {}): HarnessPredicate<WrBurgerHarness> {\n return new HarnessPredicate(WrBurgerHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly button = this.locatorFor('button.wr-burger__btn');\n\n /** The button's accessible name (`label`, else the `burger.label` catalog entry). */\n async getLabel(): Promise<string | null> {\n return (await this.button()).getAttribute('aria-label');\n }\n\n /** Whether the toggle is open, from the button's `aria-expanded`. */\n async isOpen(): Promise<boolean> {\n return (await (await this.button()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** Whether the button refuses interaction, from its own `disabled` property. */\n async isDisabled(): Promise<boolean> {\n return (await this.button()).getProperty<boolean>('disabled');\n }\n\n /** Click the button. A disabled toggle ignores it: assert, or use {@link open} / {@link close}. */\n async toggle(): Promise<void> {\n return (await this.button()).click();\n }\n\n /** Open the toggle. An already-open one is left alone; a disabled one throws. */\n async open(): Promise<void> {\n if (await this.isOpen()) return;\n await this.toggle();\n if (!(await this.isOpen())) {\n throw new Error('WrBurgerHarness.open(): the toggle did not open. A disabled burger refuses its own button.');\n }\n }\n\n /** Close the toggle. An already-closed one is left alone; a disabled one throws. */\n async close(): Promise<void> {\n if (!(await this.isOpen())) return;\n await this.toggle();\n if (await this.isOpen()) {\n throw new Error('WrBurgerHarness.close(): the toggle did not close. A disabled burger refuses its own button.');\n }\n }\n\n /** Move keyboard focus to the button. */\n async focus(): Promise<void> {\n return (await this.button()).focus();\n }\n\n /** Whether the button holds focus. */\n async isFocused(): Promise<boolean> {\n return (await this.button()).isFocused();\n }\n}\n"],"mappings":";;;;;;;AA6BA,IAAa,kBAAb,MAAa,wBAAwB,iBAAgB;CACnD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAkC,CAAA,GAAE;EAC9C,OAAO,IAAI,iBAAiB,iBAAiB,OAAO,CAAC,CAClD,UAAU,SAAS,QAAQ,QAAQ,SAAS,UAAU,iBAAiB,cAAc,QAAQ,SAAQ,GAAI,KAAK,CAAC,CAAC,CAChH,UAAU,QAAQ,QAAQ,MAAM,OAAO,SAAS,SAAU,MAAM,QAAQ,OAAM,MAAQ,IAAI,CAAC,CAC3F,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ;CACnH;CAEiB,SAAS,KAAK,WAAW,uBAAuB;CAGjE,MAAM,WAAQ;EACZ,QAAQ,MAAM,KAAK,OAAM,EAAA,CAAI,aAAa,YAAY;CACxD;CAGA,MAAM,SAAM;EACV,OAAQ,OAAO,MAAM,KAAK,OAAM,EAAA,CAAI,aAAa,eAAe,MAAO;CACzE;CAGA,MAAM,aAAU;EACd,QAAQ,MAAM,KAAK,OAAM,EAAA,CAAI,YAAqB,UAAU;CAC9D;CAGA,MAAM,SAAM;EACV,QAAQ,MAAM,KAAK,OAAM,EAAA,CAAI,MAAK;CACpC;CAGA,MAAM,OAAI;EACR,IAAI,MAAM,KAAK,OAAM,GAAI;EACzB,MAAM,KAAK,OAAM;EACjB,IAAI,CAAE,MAAM,KAAK,OAAM,GACrB,MAAM,IAAI,MAAM,4FAA4F;CAEhH;CAGA,MAAM,QAAK;EACT,IAAI,CAAE,MAAM,KAAK,OAAM,GAAK;EAC5B,MAAM,KAAK,OAAM;EACjB,IAAI,MAAM,KAAK,OAAM,GACnB,MAAM,IAAI,MAAM,8FAA8F;CAElH;CAGA,MAAM,QAAK;EACT,QAAQ,MAAM,KAAK,OAAM,EAAA,CAAI,MAAK;CACpC;CAGA,MAAM,YAAS;EACb,QAAQ,MAAM,KAAK,OAAM,EAAA,CAAI,UAAS;CACxC"}
|
package/fesm2022/ngwr-burger.mjs
CHANGED
|
@@ -27,7 +27,7 @@ var WrBurger = class WrBurger {
|
|
|
27
27
|
}
|
|
28
28
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
29
|
minVersion: "12.0.0",
|
|
30
|
-
version: "22.2.
|
|
30
|
+
version: "22.2.6",
|
|
31
31
|
ngImport: i0,
|
|
32
32
|
type: WrBurger,
|
|
33
33
|
deps: [],
|
|
@@ -35,7 +35,7 @@ var WrBurger = class WrBurger {
|
|
|
35
35
|
});
|
|
36
36
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
37
37
|
minVersion: "17.1.0",
|
|
38
|
-
version: "22.2.
|
|
38
|
+
version: "22.2.6",
|
|
39
39
|
type: WrBurger,
|
|
40
40
|
isStandalone: true,
|
|
41
41
|
selector: "wr-burger",
|
|
@@ -74,7 +74,7 @@ var WrBurger = class WrBurger {
|
|
|
74
74
|
};
|
|
75
75
|
i0.ɵɵngDeclareClassMetadata({
|
|
76
76
|
minVersion: "12.0.0",
|
|
77
|
-
version: "22.2.
|
|
77
|
+
version: "22.2.6",
|
|
78
78
|
ngImport: i0,
|
|
79
79
|
type: WrBurger,
|
|
80
80
|
decorators: [{
|
package/fesm2022/ngwr-button.mjs
CHANGED
|
@@ -117,7 +117,7 @@ var WrButton = class WrButton {
|
|
|
117
117
|
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
118
118
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
119
119
|
minVersion: "12.0.0",
|
|
120
|
-
version: "22.2.
|
|
120
|
+
version: "22.2.6",
|
|
121
121
|
ngImport: i0,
|
|
122
122
|
type: WrButton,
|
|
123
123
|
deps: [],
|
|
@@ -125,7 +125,7 @@ var WrButton = class WrButton {
|
|
|
125
125
|
});
|
|
126
126
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
127
127
|
minVersion: "17.0.0",
|
|
128
|
-
version: "22.2.
|
|
128
|
+
version: "22.2.6",
|
|
129
129
|
type: WrButton,
|
|
130
130
|
isStandalone: true,
|
|
131
131
|
selector: "wr-btn, button[wr-btn], a[wr-btn]",
|
|
@@ -235,7 +235,7 @@ var WrButton = class WrButton {
|
|
|
235
235
|
};
|
|
236
236
|
i0.ɵɵngDeclareClassMetadata({
|
|
237
237
|
minVersion: "12.0.0",
|
|
238
|
-
version: "22.2.
|
|
238
|
+
version: "22.2.6",
|
|
239
239
|
ngImport: i0,
|
|
240
240
|
type: WrButton,
|
|
241
241
|
decorators: [{
|
|
@@ -362,7 +362,7 @@ var WrButtonGroup = class WrButtonGroup {
|
|
|
362
362
|
}, ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
|
|
363
363
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
364
364
|
minVersion: "12.0.0",
|
|
365
|
-
version: "22.2.
|
|
365
|
+
version: "22.2.6",
|
|
366
366
|
ngImport: i0,
|
|
367
367
|
type: WrButtonGroup,
|
|
368
368
|
deps: [],
|
|
@@ -370,7 +370,7 @@ var WrButtonGroup = class WrButtonGroup {
|
|
|
370
370
|
});
|
|
371
371
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
372
372
|
minVersion: "17.1.0",
|
|
373
|
-
version: "22.2.
|
|
373
|
+
version: "22.2.6",
|
|
374
374
|
type: WrButtonGroup,
|
|
375
375
|
isStandalone: true,
|
|
376
376
|
selector: "wr-btn-group",
|
|
@@ -398,7 +398,7 @@ var WrButtonGroup = class WrButtonGroup {
|
|
|
398
398
|
};
|
|
399
399
|
i0.ɵɵngDeclareClassMetadata({
|
|
400
400
|
minVersion: "12.0.0",
|
|
401
|
-
version: "22.2.
|
|
401
|
+
version: "22.2.6",
|
|
402
402
|
ngImport: i0,
|
|
403
403
|
type: WrButtonGroup,
|
|
404
404
|
decorators: [{
|
|
@@ -66,15 +66,29 @@ var WrCalendarHarness = class WrCalendarHarness extends ComponentHarness {
|
|
|
66
66
|
nextButton = this.locatorFor(".wr-calendar__nav--next");
|
|
67
67
|
async getView() {
|
|
68
68
|
if (await this.locatorForOptional(".wr-calendar__months")() !== null) return "month";
|
|
69
|
+
if (await this.locatorForOptional(".wr-calendar__quarters")() !== null) return "quarter";
|
|
69
70
|
if (await this.locatorForOptional(".wr-calendar__years")() !== null) return "year";
|
|
70
71
|
return "day";
|
|
71
72
|
}
|
|
72
73
|
async getMode() {
|
|
73
74
|
return await (await this.host()).hasClass("wr-calendar--range") ? "range" : "single";
|
|
74
75
|
}
|
|
76
|
+
async getGranularity() {
|
|
77
|
+
const host = await this.host();
|
|
78
|
+
for (const period of [
|
|
79
|
+
"week",
|
|
80
|
+
"month",
|
|
81
|
+
"quarter",
|
|
82
|
+
"year"
|
|
83
|
+
]) if (await host.hasClass(`wr-calendar--${period}`)) return period;
|
|
84
|
+
return "day";
|
|
85
|
+
}
|
|
75
86
|
async isDisabled() {
|
|
76
87
|
return (await this.host()).hasClass("wr-calendar--disabled");
|
|
77
88
|
}
|
|
89
|
+
async isReadonly() {
|
|
90
|
+
return (await this.host()).hasClass("wr-calendar--readonly");
|
|
91
|
+
}
|
|
78
92
|
async getHeaderLabel() {
|
|
79
93
|
return (await this.header()).text();
|
|
80
94
|
}
|
|
@@ -124,6 +138,10 @@ var WrCalendarHarness = class WrCalendarHarness extends ComponentHarness {
|
|
|
124
138
|
await this.requireView("month", "getMonths");
|
|
125
139
|
return this.readChips();
|
|
126
140
|
}
|
|
141
|
+
async getQuarters() {
|
|
142
|
+
await this.requireView("quarter", "getQuarters");
|
|
143
|
+
return this.readChips();
|
|
144
|
+
}
|
|
127
145
|
async getYears() {
|
|
128
146
|
await this.requireView("year", "getYears");
|
|
129
147
|
return this.readChips();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-calendar-testing.mjs","names":[],"sources":["../../../projects/lib/calendar/testing/wr-calendar-day-harness.ts","../../../projects/lib/calendar/testing/wr-calendar-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrCalendarDayHarnessFilters } from './types';\n\n/**\n * Test harness for one day cell of a `<wr-calendar>` grid.\n *\n * The cell belongs to the calendar, and a date-picker's popup is a calendar in an\n * overlay — so this is the harness for both, re-exported from\n * `ngwr/date-picker/testing` under the name it shipped as\n * (`WrDatePickerDayHarness`). Reach it through `WrCalendarHarness.getDays()`, or\n * through `WrDatePickerHarness.getDay()` / `getDays()`, which scope it to ONE\n * picker's panel — those cells are in the shared overlay container, so a bare query\n * would answer with whichever picker opened first.\n *\n * State is read the way a screen reader reads it (`role`, `aria-selected`,\n * `aria-disabled`) with the `.wr-calendar__day--*` modifiers filling in what\n * ARIA has no word for: today, the spill days of the neighbouring months, and\n * the interior of a picked range.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrCalendarDayHarness extends ComponentHarness {\n static hostSelector = '.wr-calendar__day';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrCalendarDayHarnessFilters = {}): HarnessPredicate<WrCalendarDayHarness> {\n return new HarnessPredicate(WrCalendarDayHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('inRange', options.inRange, async (harness, inRange) => (await harness.isInRange()) === inRange);\n }\n\n /** The day number as rendered. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** The day number as a number, for mapping a list of cells to dates. */\n async getDayOfMonth(): Promise<number> {\n return Number(await this.getText());\n }\n\n /**\n * What a screen reader announces for this cell — \"Thursday, January 15, 2026\".\n *\n * A SECOND question from {@link getText}, and the reason this method exists:\n * until v14 the cell had no name at all, so the two answers were \"15\" and\n * nothing. A spec that reads only the drawn number passes on a grid that\n * announces bare integers with no month, year or weekday anywhere in it.\n *\n * The string is `calendar.dayLabel` interpolated with the adapter's\n * `longDate`, so it moves with the locale AND with the adapter — assert\n * against the pair your spec provides, not against an English literal.\n */\n async getAccessibleName(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** `'gridcell'` — the cell is a button, and the grid semantics are what a spec should assert. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /** Whether this day is (one end of) the current selection. */\n async isSelected(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-selected')) === 'true';\n }\n\n /**\n * Whether the day refuses selection — `min` / `max` or `dateFilter` ruled it\n * out, or the whole calendar is disabled.\n */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the cell is today's date. */\n async isToday(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar__day--today');\n }\n\n /**\n * Whether the cell belongs to a neighbouring month. The grid is always 6x7, so\n * every month is padded with days that are selectable but not \"in\" the month —\n * which is why `WrDatePickerHarness.getDay` and {@link WrCalendarHarness.getDay} skip them.\n */\n async isOutOfMonth(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar__day--out-of-month');\n }\n\n /** Whether the day lies strictly between the two ends of a picked range. */\n async isInRange(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar__day--in-range');\n }\n\n /**\n * Whether this is the roving cell — the grid's single tab stop, and where the\n * arrow keys move from.\n *\n * At most ONE cell answers `true`, and it is not always one: the calendar's\n * roving date does not follow `next()` / `previous()`, so a grid navigated away\n * from that month has no active cell (and, deliberately or not, no tab stop)\n * until a cell is clicked or the arrows move it.\n */\n async isActive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar__day--focused');\n }\n\n /** Click the cell. A disabled cell swallows the click — assert, do not assume. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, TestKey, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrCalendarMode } from 'ngwr/calendar';\n\nimport type {\n WrCalendarArrowKey,\n WrCalendarChip,\n WrCalendarDayHarnessFilters,\n WrCalendarHarnessFilters,\n WrCalendarView,\n} from './types';\nimport { WrCalendarDayHarness } from './wr-calendar-day-harness';\n\nconst ARROWS: Record<WrCalendarArrowKey, TestKey> = {\n left: TestKey.LEFT_ARROW,\n right: TestKey.RIGHT_ARROW,\n up: TestKey.UP_ARROW,\n down: TestKey.DOWN_ARROW,\n};\n\n/**\n * Test harness for `<wr-calendar>` — the standalone month grid, and the one\n * `<wr-date-picker>` puts in an overlay.\n *\n * **It is three views behind one header.** Clicking the header label walks\n * `day → month → year`, and each view renders something different: a\n * `role=\"grid\"` of day cells, or a `role=\"listbox\"` of chips. Every day method\n * throws off the day view rather than answering `[]`, which would read as \"this\n * month has no days\".\n *\n * **The roving cell is not the selection.** The grid has one tab stop and the\n * arrows move it; it starts on the selected date, or on today when nothing is\n * picked. And it does NOT follow {@link next} / {@link previous} — a grid paged\n * away from the roving month has no active cell at all, and so no tab stop, until\n * a key or a click puts one back. That is the component's behaviour, and\n * {@link getActiveDayNumber} is how a spec sees it.\n *\n * **Keys go to the host, not to a cell.** The component listens on its own element,\n * so {@link pressArrow} works whether or not jsdom managed to put real focus\n * anywhere — which it often does not, since the calendar moves focus in an\n * `afterNextRender` and a disabled cell cannot take it.\n *\n * @example\n * ```ts\n * const calendar = await loader.getHarness(WrCalendarHarness);\n *\n * expect(await calendar.getHeaderLabel()).toBe('March 2026');\n * await (await calendar.getDay(14)).click();\n * expect(await calendar.getSelectedDayNumbers()).toEqual([14]);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrCalendarHarness extends ComponentHarness {\n static hostSelector = 'wr-calendar';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrCalendarHarnessFilters = {}): HarnessPredicate<WrCalendarHarness> {\n return new HarnessPredicate(WrCalendarHarness, options)\n .addOption('headerLabel', options.headerLabel, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getHeaderLabel(), label)\n )\n .addOption('mode', options.mode, async (harness, mode) => (await harness.getMode()) === mode)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly header = this.locatorFor('.wr-calendar__label');\n private readonly prevButton = this.locatorFor('.wr-calendar__nav--prev');\n private readonly nextButton = this.locatorFor('.wr-calendar__nav--next');\n\n /** Which sub-view is showing. */\n async getView(): Promise<WrCalendarView> {\n if ((await this.locatorForOptional('.wr-calendar__months')()) !== null) return 'month';\n if ((await this.locatorForOptional('.wr-calendar__years')()) !== null) return 'year';\n return 'day';\n }\n\n /** Single- or range-selection, from the host modifier. */\n async getMode(): Promise<WrCalendarMode> {\n return (await (await this.host()).hasClass('wr-calendar--range')) ? 'range' : 'single';\n }\n\n /** Whether the whole calendar refuses interaction. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar--disabled');\n }\n\n /** The header text — `March 2026`, `2026`, or `2016 – 2027` depending on the view. */\n async getHeaderLabel(): Promise<string> {\n return (await this.header()).text();\n }\n\n /**\n * Click the header — stepping `day → month → year`.\n *\n * The year view is the end of the walk: the header is disabled there, so this\n * throws rather than clicking a button the DOM would ignore.\n */\n async clickHeader(): Promise<void> {\n const header = await this.header();\n if (await header.getProperty<boolean>('disabled')) {\n throw new Error(\n `WrCalendarHarness.clickHeader(): the header is disabled — the calendar is on the ` +\n `${await this.getView()} view, which is where the walk stops (or the whole calendar is disabled).`\n );\n }\n await header.click();\n }\n\n /**\n * Step back — a month, a year or twelve years, depending on the view.\n *\n * The roving day cell does NOT come along: paging is a view change, not a\n * navigation, and the tab stop stays on the month it was in.\n */\n async previous(): Promise<void> {\n await (await this.prevButton()).click();\n }\n\n /** Step forward — a month, a year or twelve years, depending on the view. */\n async next(): Promise<void> {\n await (await this.nextButton()).click();\n }\n\n /**\n * The back arrow's accessible name, which changes with the view — the arrows are\n * icon-only, so this is the only name they have.\n */\n async getPreviousLabel(): Promise<string | null> {\n return (await this.prevButton()).getAttribute('aria-label');\n }\n\n /** The forward arrow's accessible name. */\n async getNextLabel(): Promise<string | null> {\n return (await this.nextButton()).getAttribute('aria-label');\n }\n\n /** The weekday column headers, in the order the adapter's first day of week puts them. */\n async getWeekdayNames(): Promise<string[]> {\n await this.requireView('day', 'getWeekdayNames');\n const names = await this.locatorForAll('.wr-calendar__weekday')();\n return Promise.all(names.map(name => name.text()));\n }\n\n /**\n * Every day cell, in DOM order — 42 of them, since the grid is always six weeks.\n *\n * That includes the spill days of the neighbouring months, which are selectable\n * and not \"in\" the month; {@link getDay} skips them, and\n * `WrCalendarDayHarness.isOutOfMonth()` tells them apart.\n */\n async getDays(filters: WrCalendarDayHarnessFilters = {}): Promise<WrCalendarDayHarness[]> {\n await this.requireView('day', 'getDays');\n return this.locatorForAll(WrCalendarDayHarness.with(filters))();\n }\n\n /**\n * The cell for a day of THIS month.\n *\n * The number alone is ambiguous — a 42-cell grid shows most numbers twice — so\n * the spill days are skipped rather than matched, which is what \"the 3rd\" means\n * to someone reading the calendar.\n */\n async getDay(dayOfMonth: number): Promise<WrCalendarDayHarness> {\n for (const day of await this.getDays({ text: String(dayOfMonth) })) {\n if (!(await day.isOutOfMonth())) return day;\n }\n throw new Error(\n `WrCalendarHarness.getDay(${dayOfMonth}): no such day in ${await this.getHeaderLabel()}. Only cells of ` +\n 'the displayed month count — the grid spills into its neighbours, and those are skipped.'\n );\n }\n\n /** The day numbers currently selected — one in single mode, both ends in range mode. */\n async getSelectedDayNumbers(): Promise<number[]> {\n const selected = await this.getDays({ selected: true });\n return Promise.all(selected.map(day => day.getDayOfMonth()));\n }\n\n /** The day numbers strictly inside a picked range — never the ends. */\n async getInRangeDayNumbers(): Promise<number[]> {\n const inRange = await this.getDays({ inRange: true });\n return Promise.all(inRange.map(day => day.getDayOfMonth()));\n }\n\n /**\n * The day number holding the roving tab stop, or `null` when the grid has none.\n *\n * `null` is a real answer, not a failure: paging with {@link next} leaves the\n * roving date behind in another month, and the grid then has no `tabindex=\"0\"`\n * at all until a key or a click puts one back.\n */\n async getActiveDayNumber(): Promise<number | null> {\n for (const day of await this.getDays()) {\n if (await day.isActive()) return day.getDayOfMonth();\n }\n return null;\n }\n\n /** The month chips, with their state. Throws off the month view. */\n async getMonths(): Promise<WrCalendarChip[]> {\n await this.requireView('month', 'getMonths');\n return this.readChips();\n }\n\n /** The year chips, with their state. Throws off the year view. */\n async getYears(): Promise<WrCalendarChip[]> {\n await this.requireView('year', 'getYears');\n return this.readChips();\n }\n\n /**\n * Click a month or year chip by its printed label — which drops the calendar back\n * one view, the way clicking the header climbed up.\n *\n * Throws on the day view, where there are no chips, and on a label the view does\n * not offer, naming what it does.\n */\n async selectChip(label: string): Promise<void> {\n const view = await this.getView();\n if (view === 'day') {\n throw new Error(\n 'WrCalendarHarness.selectChip(): the calendar is on the day view, which has no chips. Click the ' +\n 'header first — it walks day → month → year.'\n );\n }\n\n for (const chip of await this.locatorForAll('.wr-calendar__chip')()) {\n if ((await chip.text()) === label) {\n await chip.click();\n return;\n }\n }\n\n const offered = (await this.readChips()).map(chip => chip.label);\n throw new Error(`WrCalendarHarness.selectChip(\"${label}\"): the ${view} view offers: ${offered.join(', ')}.`);\n }\n\n /**\n * Press an arrow key — one day left or right, one WEEK up or down.\n *\n * Sent to the host, where the component listens, so this does not depend on jsdom\n * having managed to focus a cell. Under `dir=\"rtl\"` the horizontal pair mirrors:\n * ArrowRight goes back a day, because the grid itself is mirrored.\n */\n async pressArrow(arrow: WrCalendarArrowKey): Promise<void> {\n await (await this.host()).sendKeys(ARROWS[arrow]);\n }\n\n /** Press Home — the first day of the roving cell's week, not of the month. */\n async pressHome(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.HOME);\n }\n\n /** Press End — the last day of the roving cell's week. */\n async pressEnd(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.END);\n }\n\n /** Press PageUp — a month back, or a YEAR back with `shift`. */\n async pressPageUp(options: { shift?: boolean } = {}): Promise<void> {\n const host = await this.host();\n await (options.shift ? host.sendKeys({ shift: true }, TestKey.PAGE_UP) : host.sendKeys(TestKey.PAGE_UP));\n }\n\n /** Press PageDown — a month on, or a YEAR on with `shift`. */\n async pressPageDown(options: { shift?: boolean } = {}): Promise<void> {\n const host = await this.host();\n await (options.shift ? host.sendKeys({ shift: true }, TestKey.PAGE_DOWN) : host.sendKeys(TestKey.PAGE_DOWN));\n }\n\n /** Press Enter — picking the roving day, exactly as clicking it would. */\n async pressEnter(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ENTER);\n }\n\n /**\n * The role of the element that owns the day rows.\n *\n * Worth asserting rather than assuming: the grid is NOT the host. The host also\n * holds the nav header, and a `role=\"grid\"` may only own rows — so the role sits\n * on the body, and the weekday strip is a row inside it rather than a sibling.\n */\n async getGridRole(): Promise<string | null> {\n const body = await this.locatorForOptional('.wr-calendar__body')();\n return body ? body.getAttribute('role') : null;\n }\n\n /** How many week rows the grid renders — always six, which is what keeps it from reflowing. */\n async getWeekCount(): Promise<number> {\n await this.requireView('day', 'getWeekCount');\n return (await this.locatorForAll('.wr-calendar__week')()).length;\n }\n\n private async readChips(): Promise<WrCalendarChip[]> {\n const chips = await this.locatorForAll('.wr-calendar__chip')();\n\n return Promise.all(\n chips.map(async (chip: TestElement) => ({\n label: await chip.text(),\n selected: (await chip.getAttribute('aria-selected')) === 'true',\n current: await chip.hasClass('wr-calendar__chip--current'),\n disabled: (await chip.getAttribute('aria-disabled')) === 'true',\n }))\n );\n }\n\n private async requireView(view: WrCalendarView, method: string): Promise<void> {\n const current = await this.getView();\n if (current === view) return;\n\n throw new Error(\n `WrCalendarHarness.${method}(): the calendar is showing the ${current} view, not the ${view} one — those ` +\n 'elements are not rendered at all. The header walks day → month → year; clicking a chip walks back down.'\n );\n }\n}\n"],"mappings":";;;;;;;AA6BA,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CACxD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAuC,CAAA,GAAE;EACnD,OAAO,IAAI,iBAAiB,sBAAsB,OAAO,CAAC,CACvD,UAAU,QAAQ,QAAQ,OAAO,SAAS,SAAS,iBAAiB,cAAc,QAAQ,QAAO,GAAI,IAAI,CAAC,CAAC,CAC3G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ,CAAC,CAC/G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ,CAAC,CAC/G,UAAU,WAAW,QAAQ,SAAS,OAAO,SAAS,YAAa,MAAM,QAAQ,UAAS,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AAM,eAAY;EAChB,MAAM,KAAK,YAAY,OAAO,cAAc;EAC5C,QAAQ,MAAM,KAAK,cAAc,oBAAoB,CAAC,CAAA,EAAA,CAAI;CAC5D;CAEQ,MAAM,YAAS;EACrB,MAAM,QAAQ,MAAM,KAAK,cAAc,oBAAoB,CAAC,CAAA;EAE5D,OAAO,QAAQ,IACb,MAAM,IAAI,OAAO,UAAuB;GACtC,OAAO,MAAM,KAAK,KAAI;GACtB,UAAW,MAAM,KAAK,aAAa,eAAe,MAAO;GACzD,SAAS,MAAM,KAAK,SAAS,4BAA4B;GACzD,UAAW,MAAM,KAAK,aAAa,eAAe,MAAO;EAC1D,EAAC,CAAC;CAEP;CAEQ,MAAM,YAAY,MAAsB,QAAc;EAC5D,MAAM,UAAU,MAAM,KAAK,QAAO;EAClC,IAAI,YAAY,MAAM;EAEtB,MAAM,IAAI,MACR,qBAAqB,OAAM,kCAAmC,QAAO,iBAAkB,KAAI,qHACgB;CAE/G"}
|
|
1
|
+
{"version":3,"file":"ngwr-calendar-testing.mjs","names":[],"sources":["../../../projects/lib/calendar/testing/wr-calendar-day-harness.ts","../../../projects/lib/calendar/testing/wr-calendar-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrCalendarDayHarnessFilters } from './types';\n\n/**\n * Test harness for one day cell of a `<wr-calendar>` grid.\n *\n * The cell belongs to the calendar, and a date-picker's popup is a calendar in an\n * overlay — so this is the harness for both, re-exported from\n * `ngwr/date-picker/testing` under the name it shipped as\n * (`WrDatePickerDayHarness`). Reach it through `WrCalendarHarness.getDays()`, or\n * through `WrDatePickerHarness.getDay()` / `getDays()`, which scope it to ONE\n * picker's panel — those cells are in the shared overlay container, so a bare query\n * would answer with whichever picker opened first.\n *\n * State is read the way a screen reader reads it (`role`, `aria-selected`,\n * `aria-disabled`) with the `.wr-calendar__day--*` modifiers filling in what\n * ARIA has no word for: today, the spill days of the neighbouring months, and\n * the interior of a picked range.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrCalendarDayHarness extends ComponentHarness {\n static hostSelector = '.wr-calendar__day';\n\n /** Build a predicate that narrows the query. */\n static with(options: WrCalendarDayHarnessFilters = {}): HarnessPredicate<WrCalendarDayHarness> {\n return new HarnessPredicate(WrCalendarDayHarness, options)\n .addOption('text', options.text, (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('selected', options.selected, async (harness, selected) => (await harness.isSelected()) === selected)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled)\n .addOption('inRange', options.inRange, async (harness, inRange) => (await harness.isInRange()) === inRange);\n }\n\n /** The day number as rendered. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** The day number as a number, for mapping a list of cells to dates. */\n async getDayOfMonth(): Promise<number> {\n return Number(await this.getText());\n }\n\n /**\n * What a screen reader announces for this cell — \"Thursday, January 15, 2026\".\n *\n * A SECOND question from {@link getText}, and the reason this method exists:\n * until v14 the cell had no name at all, so the two answers were \"15\" and\n * nothing. A spec that reads only the drawn number passes on a grid that\n * announces bare integers with no month, year or weekday anywhere in it.\n *\n * The string is `calendar.dayLabel` interpolated with the adapter's\n * `longDate`, so it moves with the locale AND with the adapter — assert\n * against the pair your spec provides, not against an English literal.\n */\n async getAccessibleName(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** `'gridcell'` — the cell is a button, and the grid semantics are what a spec should assert. */\n async getRole(): Promise<string | null> {\n return (await this.host()).getAttribute('role');\n }\n\n /** Whether this day is (one end of) the current selection. */\n async isSelected(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-selected')) === 'true';\n }\n\n /**\n * Whether the day refuses selection — `min` / `max` or `dateFilter` ruled it\n * out, or the whole calendar is disabled.\n */\n async isDisabled(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the cell is today's date. */\n async isToday(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar__day--today');\n }\n\n /**\n * Whether the cell belongs to a neighbouring month. The grid is always 6x7, so\n * every month is padded with days that are selectable but not \"in\" the month —\n * which is why `WrDatePickerHarness.getDay` and {@link WrCalendarHarness.getDay} skip them.\n */\n async isOutOfMonth(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar__day--out-of-month');\n }\n\n /** Whether the day lies strictly between the two ends of a picked range. */\n async isInRange(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar__day--in-range');\n }\n\n /**\n * Whether this is the roving cell — the grid's single tab stop, and where the\n * arrow keys move from.\n *\n * At most ONE cell answers `true`, and it is not always one: the calendar's\n * roving date does not follow `next()` / `previous()`, so a grid navigated away\n * from that month has no active cell (and, deliberately or not, no tab stop)\n * until a cell is clicked or the arrows move it.\n */\n async isActive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar__day--focused');\n }\n\n /** Click the cell. A disabled cell swallows the click — assert, do not assume. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate, TestKey, type TestElement } from '@angular/cdk/testing';\n\nimport type { WrCalendarGranularity, WrCalendarMode } from 'ngwr/calendar';\n\nimport type {\n WrCalendarArrowKey,\n WrCalendarChip,\n WrCalendarDayHarnessFilters,\n WrCalendarHarnessFilters,\n WrCalendarView,\n} from './types';\nimport { WrCalendarDayHarness } from './wr-calendar-day-harness';\n\nconst ARROWS: Record<WrCalendarArrowKey, TestKey> = {\n left: TestKey.LEFT_ARROW,\n right: TestKey.RIGHT_ARROW,\n up: TestKey.UP_ARROW,\n down: TestKey.DOWN_ARROW,\n};\n\n/**\n * Test harness for `<wr-calendar>` — the standalone month grid, and the one\n * `<wr-date-picker>` puts in an overlay.\n *\n * **It is three views behind one header.** Clicking the header label walks\n * `day → month → year`, and each view renders something different: a\n * `role=\"grid\"` of day cells, or a `role=\"listbox\"` of chips. Under a\n * `granularity` the calendar opens on the view that granularity picks from, and\n * `quarter` is a fourth view only `granularity=\"quarter\"` reaches. Every day method\n * throws off the day view rather than answering `[]`, which would read as \"this\n * month has no days\".\n *\n * **The roving cell is not the selection.** The grid has one tab stop and the\n * arrows move it; it starts on the selected date, or on today when nothing is\n * picked. And it does NOT follow {@link next} / {@link previous} — a grid paged\n * away from the roving month has no active cell at all, and so no tab stop, until\n * a key or a click puts one back. That is the component's behaviour, and\n * {@link getActiveDayNumber} is how a spec sees it.\n *\n * **Keys go to the host, not to a cell.** The component listens on its own element,\n * so {@link pressArrow} works whether or not jsdom managed to put real focus\n * anywhere — which it often does not, since the calendar moves focus in an\n * `afterNextRender` and a disabled cell cannot take it.\n *\n * @example\n * ```ts\n * const calendar = await loader.getHarness(WrCalendarHarness);\n *\n * expect(await calendar.getHeaderLabel()).toBe('March 2026');\n * await (await calendar.getDay(14)).click();\n * expect(await calendar.getSelectedDayNumbers()).toEqual([14]);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrCalendarHarness extends ComponentHarness {\n static hostSelector = 'wr-calendar';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrCalendarHarnessFilters = {}): HarnessPredicate<WrCalendarHarness> {\n return new HarnessPredicate(WrCalendarHarness, options)\n .addOption('headerLabel', options.headerLabel, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getHeaderLabel(), label)\n )\n .addOption('mode', options.mode, async (harness, mode) => (await harness.getMode()) === mode)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly header = this.locatorFor('.wr-calendar__label');\n private readonly prevButton = this.locatorFor('.wr-calendar__nav--prev');\n private readonly nextButton = this.locatorFor('.wr-calendar__nav--next');\n\n /** Which sub-view is showing. */\n async getView(): Promise<WrCalendarView> {\n if ((await this.locatorForOptional('.wr-calendar__months')()) !== null) return 'month';\n if ((await this.locatorForOptional('.wr-calendar__quarters')()) !== null) return 'quarter';\n if ((await this.locatorForOptional('.wr-calendar__years')()) !== null) return 'year';\n return 'day';\n }\n\n /** Single- or range-selection, from the host modifier. */\n async getMode(): Promise<WrCalendarMode> {\n return (await (await this.host()).hasClass('wr-calendar--range')) ? 'range' : 'single';\n }\n\n /**\n * What one pick names, from the host modifier: a day unless `granularity` says\n * a week, a month, a quarter or a year.\n */\n async getGranularity(): Promise<WrCalendarGranularity> {\n const host = await this.host();\n for (const period of ['week', 'month', 'quarter', 'year'] as const) {\n if (await host.hasClass(`wr-calendar--${period}`)) return period;\n }\n return 'day';\n }\n\n /** Whether the whole calendar refuses interaction. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar--disabled');\n }\n\n /** Whether the calendar is read-only: still browsable, but a day click picks nothing. */\n async isReadonly(): Promise<boolean> {\n return (await this.host()).hasClass('wr-calendar--readonly');\n }\n\n /** The header text — `March 2026`, `2026`, or `2016 – 2027` depending on the view. */\n async getHeaderLabel(): Promise<string> {\n return (await this.header()).text();\n }\n\n /**\n * Click the header — stepping `day → month → year`.\n *\n * The year view is the end of the walk: the header is disabled there, so this\n * throws rather than clicking a button the DOM would ignore.\n */\n async clickHeader(): Promise<void> {\n const header = await this.header();\n if (await header.getProperty<boolean>('disabled')) {\n throw new Error(\n `WrCalendarHarness.clickHeader(): the header is disabled — the calendar is on the ` +\n `${await this.getView()} view, which is where the walk stops (or the whole calendar is disabled).`\n );\n }\n await header.click();\n }\n\n /**\n * Step back — a month, a year or twelve years, depending on the view.\n *\n * The roving day cell does NOT come along: paging is a view change, not a\n * navigation, and the tab stop stays on the month it was in.\n */\n async previous(): Promise<void> {\n await (await this.prevButton()).click();\n }\n\n /** Step forward — a month, a year or twelve years, depending on the view. */\n async next(): Promise<void> {\n await (await this.nextButton()).click();\n }\n\n /**\n * The back arrow's accessible name, which changes with the view — the arrows are\n * icon-only, so this is the only name they have.\n */\n async getPreviousLabel(): Promise<string | null> {\n return (await this.prevButton()).getAttribute('aria-label');\n }\n\n /** The forward arrow's accessible name. */\n async getNextLabel(): Promise<string | null> {\n return (await this.nextButton()).getAttribute('aria-label');\n }\n\n /** The weekday column headers, in the order the adapter's first day of week puts them. */\n async getWeekdayNames(): Promise<string[]> {\n await this.requireView('day', 'getWeekdayNames');\n const names = await this.locatorForAll('.wr-calendar__weekday')();\n return Promise.all(names.map(name => name.text()));\n }\n\n /**\n * Every day cell, in DOM order — 42 of them, since the grid is always six weeks.\n *\n * That includes the spill days of the neighbouring months, which are selectable\n * and not \"in\" the month; {@link getDay} skips them, and\n * `WrCalendarDayHarness.isOutOfMonth()` tells them apart.\n */\n async getDays(filters: WrCalendarDayHarnessFilters = {}): Promise<WrCalendarDayHarness[]> {\n await this.requireView('day', 'getDays');\n return this.locatorForAll(WrCalendarDayHarness.with(filters))();\n }\n\n /**\n * The cell for a day of THIS month.\n *\n * The number alone is ambiguous — a 42-cell grid shows most numbers twice — so\n * the spill days are skipped rather than matched, which is what \"the 3rd\" means\n * to someone reading the calendar.\n */\n async getDay(dayOfMonth: number): Promise<WrCalendarDayHarness> {\n for (const day of await this.getDays({ text: String(dayOfMonth) })) {\n if (!(await day.isOutOfMonth())) return day;\n }\n throw new Error(\n `WrCalendarHarness.getDay(${dayOfMonth}): no such day in ${await this.getHeaderLabel()}. Only cells of ` +\n 'the displayed month count — the grid spills into its neighbours, and those are skipped.'\n );\n }\n\n /** The day numbers currently selected — one in single mode, both ends in range mode. */\n async getSelectedDayNumbers(): Promise<number[]> {\n const selected = await this.getDays({ selected: true });\n return Promise.all(selected.map(day => day.getDayOfMonth()));\n }\n\n /** The day numbers strictly inside a picked range — never the ends. */\n async getInRangeDayNumbers(): Promise<number[]> {\n const inRange = await this.getDays({ inRange: true });\n return Promise.all(inRange.map(day => day.getDayOfMonth()));\n }\n\n /**\n * The day number holding the roving tab stop, or `null` when the grid has none.\n *\n * `null` is a real answer, not a failure: paging with {@link next} leaves the\n * roving date behind in another month, and the grid then has no `tabindex=\"0\"`\n * at all until a key or a click puts one back.\n */\n async getActiveDayNumber(): Promise<number | null> {\n for (const day of await this.getDays()) {\n if (await day.isActive()) return day.getDayOfMonth();\n }\n return null;\n }\n\n /** The month chips, with their state. Throws off the month view. */\n async getMonths(): Promise<WrCalendarChip[]> {\n await this.requireView('month', 'getMonths');\n return this.readChips();\n }\n\n /** The quarter chips, with their state. Throws off the quarter view, which only `granularity=\"quarter\"` has. */\n async getQuarters(): Promise<WrCalendarChip[]> {\n await this.requireView('quarter', 'getQuarters');\n return this.readChips();\n }\n\n /** The year chips, with their state. Throws off the year view. */\n async getYears(): Promise<WrCalendarChip[]> {\n await this.requireView('year', 'getYears');\n return this.readChips();\n }\n\n /**\n * Click a month, quarter or year chip by its printed label, which drops the\n * calendar back one view, the way clicking the header climbed up. Where the chip\n * is what `granularity` picks, the click is the pick and the view stays.\n *\n * Throws on the day view, where there are no chips, and on a label the view does\n * not offer, naming what it does.\n */\n async selectChip(label: string): Promise<void> {\n const view = await this.getView();\n if (view === 'day') {\n throw new Error(\n 'WrCalendarHarness.selectChip(): the calendar is on the day view, which has no chips. Click the ' +\n 'header first — it walks day → month → year.'\n );\n }\n\n for (const chip of await this.locatorForAll('.wr-calendar__chip')()) {\n if ((await chip.text()) === label) {\n await chip.click();\n return;\n }\n }\n\n const offered = (await this.readChips()).map(chip => chip.label);\n throw new Error(`WrCalendarHarness.selectChip(\"${label}\"): the ${view} view offers: ${offered.join(', ')}.`);\n }\n\n /**\n * Press an arrow key — one day left or right, one WEEK up or down.\n *\n * Sent to the host, where the component listens, so this does not depend on jsdom\n * having managed to focus a cell. Under `dir=\"rtl\"` the horizontal pair mirrors:\n * ArrowRight goes back a day, because the grid itself is mirrored.\n */\n async pressArrow(arrow: WrCalendarArrowKey): Promise<void> {\n await (await this.host()).sendKeys(ARROWS[arrow]);\n }\n\n /** Press Home — the first day of the roving cell's week, not of the month. */\n async pressHome(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.HOME);\n }\n\n /** Press End — the last day of the roving cell's week. */\n async pressEnd(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.END);\n }\n\n /** Press PageUp — a month back, or a YEAR back with `shift`. */\n async pressPageUp(options: { shift?: boolean } = {}): Promise<void> {\n const host = await this.host();\n await (options.shift ? host.sendKeys({ shift: true }, TestKey.PAGE_UP) : host.sendKeys(TestKey.PAGE_UP));\n }\n\n /** Press PageDown — a month on, or a YEAR on with `shift`. */\n async pressPageDown(options: { shift?: boolean } = {}): Promise<void> {\n const host = await this.host();\n await (options.shift ? host.sendKeys({ shift: true }, TestKey.PAGE_DOWN) : host.sendKeys(TestKey.PAGE_DOWN));\n }\n\n /** Press Enter — picking the roving day, exactly as clicking it would. */\n async pressEnter(): Promise<void> {\n await (await this.host()).sendKeys(TestKey.ENTER);\n }\n\n /**\n * The role of the element that owns the day rows.\n *\n * Worth asserting rather than assuming: the grid is NOT the host. The host also\n * holds the nav header, and a `role=\"grid\"` may only own rows — so the role sits\n * on the body, and the weekday strip is a row inside it rather than a sibling.\n */\n async getGridRole(): Promise<string | null> {\n const body = await this.locatorForOptional('.wr-calendar__body')();\n return body ? body.getAttribute('role') : null;\n }\n\n /** How many week rows the grid renders — always six, which is what keeps it from reflowing. */\n async getWeekCount(): Promise<number> {\n await this.requireView('day', 'getWeekCount');\n return (await this.locatorForAll('.wr-calendar__week')()).length;\n }\n\n private async readChips(): Promise<WrCalendarChip[]> {\n const chips = await this.locatorForAll('.wr-calendar__chip')();\n\n return Promise.all(\n chips.map(async (chip: TestElement) => ({\n label: await chip.text(),\n selected: (await chip.getAttribute('aria-selected')) === 'true',\n current: await chip.hasClass('wr-calendar__chip--current'),\n disabled: (await chip.getAttribute('aria-disabled')) === 'true',\n }))\n );\n }\n\n private async requireView(view: WrCalendarView, method: string): Promise<void> {\n const current = await this.getView();\n if (current === view) return;\n\n throw new Error(\n `WrCalendarHarness.${method}(): the calendar is showing the ${current} view, not the ${view} one — those ` +\n 'elements are not rendered at all. The header walks day → month → year; clicking a chip walks back down.'\n );\n }\n}\n"],"mappings":";;;;;;;AA6BA,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CACxD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAuC,CAAA,GAAE;EACnD,OAAO,IAAI,iBAAiB,sBAAsB,OAAO,CAAC,CACvD,UAAU,QAAQ,QAAQ,OAAO,SAAS,SAAS,iBAAiB,cAAc,QAAQ,QAAO,GAAI,IAAI,CAAC,CAAC,CAC3G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ,CAAC,CAC/G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ,CAAC,CAC/G,UAAU,WAAW,QAAQ,SAAS,OAAO,SAAS,YAAa,MAAM,QAAQ,UAAS,MAAQ,OAAO;CAC9G;CAGA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,KAAI;CACjC;CAGA,MAAM,gBAAa;EACjB,OAAO,OAAO,MAAM,KAAK,QAAO,CAAE;CACpC;CAcA,MAAM,oBAAiB;EACrB,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,YAAY;CACtD;CAGA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,MAAM;CAChD;CAGA,MAAM,aAAU;EACd,OAAQ,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,eAAe,MAAO;CACvE;CAMA,MAAM,aAAU;EACd,OAAQ,OAAO,MAAM,KAAK,KAAI,EAAA,CAAI,aAAa,eAAe,MAAO;CACvE;CAGA,MAAM,UAAO;EACX,QAAQ,MAAM,KAAK,KAAI,EAAA,CAAI,SAAS,yBAAy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