ngwr 14.3.1 → 14.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/avatar/styles/_index.scss +4 -2
- package/badge/styles/_index.scss +4 -1
- package/badge/styles/_tag.scss +3 -0
- package/cascader/styles/_rules.scss +3 -0
- package/command-palette/styles/_index.scss +23 -0
- package/context-menu/styles/_index.scss +13 -1
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +17 -4
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-alert.mjs +4 -4
- package/fesm2022/ngwr-alert.mjs.map +1 -1
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart-testing.mjs +18 -2
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text.mjs +3 -3
- package/fesm2022/ngwr-border-glow.mjs +3 -3
- package/fesm2022/ngwr-breadcrumbs.mjs +7 -7
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs +12 -9
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-heatmap.mjs +35 -7
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +32 -4
- 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-testing.mjs +87 -17
- package/fesm2022/ngwr-cascader-testing.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +76 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox-testing.mjs +13 -2
- package/fesm2022/ngwr-checkbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +42 -7
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text.mjs +3 -3
- package/fesm2022/ngwr-click-spark.mjs +3 -3
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +24 -8
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +16 -3
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +47 -15
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-adapters-fns.mjs +3 -3
- package/fesm2022/ngwr-date-adapters-luxon.mjs +3 -3
- package/fesm2022/ngwr-date-picker.mjs +111 -28
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +3 -3
- package/fesm2022/ngwr-decrypt-text.mjs +3 -3
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +27 -16
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-donut-chart-testing.mjs +18 -2
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart.mjs +4 -4
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +7 -7
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +66 -20
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +54 -16
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +6 -6
- package/fesm2022/ngwr-falling-text.mjs +3 -3
- package/fesm2022/ngwr-file-upload.mjs +18 -5
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +66 -14
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text.mjs +3 -3
- package/fesm2022/ngwr-gauge-testing.mjs +16 -2
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -1
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text.mjs +3 -3
- package/fesm2022/ngwr-gradient-text.mjs +3 -3
- package/fesm2022/ngwr-graph-testing.mjs +243 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -0
- package/fesm2022/ngwr-graph.mjs +1112 -0
- package/fesm2022/ngwr-graph.mjs.map +1 -0
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +7 -0
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +7 -0
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +7 -0
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +23 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +7 -0
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +7 -0
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +7 -0
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +7 -0
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +7 -0
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +7 -0
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +7 -0
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +7 -0
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +7 -0
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +7 -0
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +7 -0
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +7 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +7 -0
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +7 -0
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +7 -0
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +7 -0
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-TW.mjs +7 -0
- package/fesm2022/ngwr-i18n-zh-TW.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +7 -0
- 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.mjs +15 -6
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +38 -6
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob-testing.mjs +11 -3
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -1
- package/fesm2022/ngwr-knob.mjs +19 -4
- package/fesm2022/ngwr-knob.mjs.map +1 -1
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +27 -6
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs +18 -2
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart.mjs +22 -4
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +7 -7
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-markdown.mjs +6 -6
- package/fesm2022/ngwr-marquee.mjs +3 -3
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +24 -8
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +125 -10
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +33 -6
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +21 -21
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +25 -9
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +22 -5
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +243 -37
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- 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-testing.mjs +12 -3
- package/fesm2022/ngwr-rating-testing.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +19 -4
- package/fesm2022/ngwr-rating.mjs.map +1 -1
- package/fesm2022/ngwr-result.mjs +13 -13
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text.mjs +3 -3
- package/fesm2022/ngwr-schema-form.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +37 -4
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +24 -10
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text.mjs +6 -6
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +18 -5
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card.mjs +6 -6
- package/fesm2022/ngwr-squircle.mjs +28 -9
- package/fesm2022/ngwr-squircle.mjs.map +1 -1
- package/fesm2022/ngwr-star-border.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +20 -13
- package/fesm2022/ngwr-statistic.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +18 -18
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs.mjs +6 -6
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-tilt-card.mjs +6 -6
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +29 -12
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +26 -12
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +88 -11
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +24 -0
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +81 -9
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- 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-waves.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +30 -13
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/form/styles/_index.scss +63 -0
- package/graph/styles/_index.scss +113 -0
- package/i18n/ar.json +9 -2
- package/i18n/cs.json +9 -2
- package/i18n/de.json +9 -2
- package/i18n/en.json +11 -4
- package/i18n/es.json +9 -2
- package/i18n/fr.json +9 -2
- package/i18n/he.json +9 -2
- package/i18n/hi.json +9 -2
- package/i18n/id.json +9 -2
- package/i18n/it.json +9 -2
- package/i18n/ja.json +9 -2
- package/i18n/ko.json +9 -2
- package/i18n/nl.json +9 -2
- package/i18n/pl.json +9 -2
- package/i18n/pt.json +9 -2
- package/i18n/ru.json +9 -2
- package/i18n/sv.json +9 -2
- package/i18n/tr.json +9 -2
- package/i18n/uk.json +9 -2
- package/i18n/vi.json +9 -2
- package/i18n/zh-TW.json +9 -2
- package/i18n/zh.json +9 -2
- package/input-otp/styles/_index.scss +5 -1
- package/line-chart/styles/_index.scss +5 -3
- package/llms-full.txt +13 -3
- package/llms.txt +8 -6
- package/markdown/styles/_index.scss +4 -1
- package/mention/styles/_index.scss +22 -1
- package/package.json +10 -1
- package/radio/styles/_index.scss +3 -0
- package/result/styles/_index.scss +12 -0
- package/schematics/migrations/v14/index.js +6 -3
- package/schematics/migrations.json +1 -1
- package/schematics/ng-add/index.js +34 -5
- package/schematics/use/symbol-map.json +2 -0
- package/segmented/styles/_index.scss +12 -1
- package/select/styles/_index.scss +20 -1
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +2 -0
- package/statistic/styles/_index.scss +4 -0
- package/stepper/styles/_index.scss +36 -0
- package/styles.scss +1 -0
- package/switch/styles/_index.scss +3 -0
- package/table/styles/_index.scss +12 -0
- package/tabs/styles/_index.scss +4 -1
- package/textarea/styles/_index.scss +6 -1
- package/theme/styles/_colors.scss +11 -0
- package/theme/styles/_contrast.scss +136 -0
- package/theme/styles/_focus.scss +7 -0
- package/theme/styles/_index.scss +1 -0
- package/theme/styles/_mixins.scss +15 -8
- package/timeline/styles/_index.scss +28 -1
- package/toast/styles/_index.scss +11 -0
- package/tree/styles/_index.scss +27 -1
- package/types/ngwr-badge.d.ts +1 -1
- package/types/ngwr-bar-chart-testing.d.ts +11 -1
- package/types/ngwr-button.d.ts +1 -1
- package/types/ngwr-calendar-heatmap-testing.d.ts +10 -5
- package/types/ngwr-calendar-heatmap.d.ts +22 -0
- package/types/ngwr-calendar.d.ts +21 -0
- package/types/ngwr-cascader-testing.d.ts +74 -17
- package/types/ngwr-cascader.d.ts +35 -0
- package/types/ngwr-checkbox-testing.d.ts +12 -1
- package/types/ngwr-checkbox.d.ts +10 -0
- package/types/ngwr-clipboard.d.ts +1 -1
- package/types/ngwr-color-picker.d.ts +8 -0
- package/types/ngwr-confetti.d.ts +1 -1
- package/types/ngwr-context-menu.d.ts +10 -0
- package/types/ngwr-cookie.d.ts +1 -1
- package/types/ngwr-date-adapters-fns.d.ts +1 -1
- package/types/ngwr-date-adapters-luxon.d.ts +1 -1
- package/types/ngwr-date-picker.d.ts +16 -0
- package/types/ngwr-date.d.ts +9 -3
- package/types/ngwr-density.d.ts +1 -1
- package/types/ngwr-dialog.d.ts +2 -1
- package/types/ngwr-donut-chart-testing.d.ts +11 -1
- package/types/ngwr-drawer.d.ts +29 -1
- package/types/ngwr-dropdown.d.ts +25 -0
- package/types/ngwr-file-upload.d.ts +11 -0
- package/types/ngwr-form.d.ts +25 -0
- package/types/ngwr-gauge-testing.d.ts +9 -1
- package/types/ngwr-graph-testing.d.ts +190 -0
- package/types/ngwr-graph.d.ts +203 -0
- package/types/ngwr-hotkey.d.ts +1 -1
- package/types/ngwr-i18n.d.ts +1 -1
- package/types/ngwr-input-number.d.ts +12 -2
- package/types/ngwr-input-otp.d.ts +12 -0
- package/types/ngwr-knob-testing.d.ts +11 -3
- package/types/ngwr-knob.d.ts +13 -0
- package/types/ngwr-lightbox.d.ts +15 -0
- package/types/ngwr-line-chart-testing.d.ts +11 -1
- package/types/ngwr-line-chart.d.ts +18 -0
- package/types/ngwr-loading-bar.d.ts +1 -1
- package/types/ngwr-markdown.d.ts +1 -1
- package/types/ngwr-media.d.ts +1 -1
- package/types/ngwr-mention.d.ts +7 -0
- package/types/ngwr-meta.d.ts +1 -1
- package/types/ngwr-overlay.d.ts +64 -6
- package/types/ngwr-pagination.d.ts +16 -0
- package/types/ngwr-platform.d.ts +3 -3
- package/types/ngwr-popconfirm.d.ts +1 -0
- package/types/ngwr-popover-testing.d.ts +22 -5
- package/types/ngwr-popover.d.ts +44 -8
- package/types/ngwr-rating-testing.d.ts +12 -3
- package/types/ngwr-rating.d.ts +13 -0
- package/types/ngwr-scroll.d.ts +1 -1
- package/types/ngwr-segmented.d.ts +16 -0
- package/types/ngwr-select.d.ts +7 -0
- package/types/ngwr-squircle.d.ts +22 -3
- package/types/ngwr-statistic.d.ts +0 -1
- package/types/ngwr-storage.d.ts +1 -1
- package/types/ngwr-theme.d.ts +1 -1
- package/types/ngwr-toast.d.ts +3 -1
- package/types/ngwr-tour.d.ts +7 -1
- package/types/ngwr-transfer.d.ts +52 -0
- package/types/ngwr-tree-testing.d.ts +20 -0
- package/types/ngwr-tree.d.ts +43 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +2 -1
- package/typography/styles/_index.scss +26 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-popover.mjs","sources":["../../../projects/lib/popover/interfaces/popover-position.ts","../../../projects/lib/popover/internal/text-panel.ts","../../../projects/lib/popover/popover.ts","../../../projects/lib/popover/ngwr-popover.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 type { ConnectedPosition } from '@angular/cdk/overlay';\n\nexport type WrPopoverPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/**\n * The CDK geometry for each placement — one position, no fallbacks.\n *\n * The 8px offset is the gap between the trigger and the panel, and it is the\n * reason a flip list matters rather than being a nicety: the flexible strategy\n * emits `offsetX` as a `transform` on the pane, AFTER `withPush` has already\n * decided the coordinate. Push therefore parks a right-anchored panel flush\n * against the viewport edge and the offset then shoves it 8px back out, so a\n * side placement that does not fit loses its border and corner off-screen no\n * matter how hard push works. Flipping to a placement that fits is the only\n * recovery, which is what `WR_POPOVER_FALLBACKS` is for.\n *\n * @internal\n */\nexport const WR_POPOVER_POSITIONS: Record<WrPopoverPosition, ConnectedPosition> = {\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },\n 'top-start': { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 },\n 'top-end': { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },\n 'bottom-start': { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },\n 'bottom-end': { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },\n 'left-start': { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },\n 'left-end': { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },\n 'right-start': { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },\n 'right-end': { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },\n};\n\n/**\n * What each placement is allowed to flip to when it does not fit, best first.\n * The requested placement always leads, so a panel that fits never moves.\n *\n * Alignment is preserved down the whole chain — a `-start` popover stays\n * `-start` — because the alignment is the author's answer to \"which end of the\n * trigger does this belong to\", and a flip is about the side, not about that.\n *\n * The two axes are deliberately NOT symmetric. A block-axis placement (`top*` /\n * `bottom*`) flips only to its opposite, the classic behaviour, so a dropdown-ish\n * panel can never surprise anyone by appearing beside its trigger. An inline-axis\n * one (`left*` / `right*`) also gets the two block-axis sides, because on a phone\n * NEITHER side fits: at 375px a 233px panel beside a mid-page trigger overflows\n * by 109px to the right and 97px to the left, and only below/above has room.\n *\n * @internal\n */\nexport const WR_POPOVER_FALLBACKS: Record<WrPopoverPosition, readonly WrPopoverPosition[]> = {\n top: ['top', 'bottom'],\n 'top-start': ['top-start', 'bottom-start'],\n 'top-end': ['top-end', 'bottom-end'],\n bottom: ['bottom', 'top'],\n 'bottom-start': ['bottom-start', 'top-start'],\n 'bottom-end': ['bottom-end', 'top-end'],\n left: ['left', 'right', 'bottom', 'top'],\n 'left-start': ['left-start', 'right-start', 'bottom-start', 'top-start'],\n 'left-end': ['left-end', 'right-end', 'bottom-end', 'top-end'],\n right: ['right', 'left', 'bottom', 'top'],\n 'right-start': ['right-start', 'left-start', 'bottom-start', 'top-start'],\n 'right-end': ['right-end', 'left-end', 'bottom-end', 'top-end'],\n};\n\n/**\n * The list `withPositions()` wants, with every link tagged so the pane names the\n * placement it ACTUALLY took rather than the one that was asked for.\n *\n * The tag is what keeps the arrow honest. It is drawn by\n * `.wr-popover-overlay--<placement> > *::after`, so a panel that flipped while\n * the class stayed put would point at a side it no longer sits on. CDK applies a\n * position's own `panelClass` in `_applyPosition` and clears it again on the next\n * one, which is exactly the bookkeeping this needs — hence the class rather than\n * a `positionChanges` subscription.\n *\n * @param paneClass The pane's base class: `wr-popover-overlay` or\n * `wr-tooltip-overlay`. The two modes key their arrows off different\n * selectors, so the prefix cannot live in the table.\n *\n * @internal\n */\nexport function wrPopoverPositions(position: WrPopoverPosition, paneClass: string): ConnectedPosition[] {\n return WR_POPOVER_FALLBACKS[position].map(name => ({\n ...WR_POPOVER_POSITIONS[name],\n panelClass: `${paneClass}--${name}`,\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Internal floating label rendered when `<… [wrPopover]=\"'…'\" mode=\"tooltip\">`\n * receives a string instead of a template. Not part of the public template\n * API — use the `WrPopover` directive in tooltip mode instead.\n *\n * @internal\n */\n@Component({\n selector: 'wr-popover-text',\n template: '{{ text() }}',\n encapsulation: ViewEncapsulation.None,\n // No `role=\"tooltip\"` here on purpose: the overlay pane this is attached to\n // is the element `aria-describedby` resolves to, and it carries the role.\n // Setting it here too nested one tooltip inside another.\n host: { class: 'wr-tooltip' },\n})\nexport class WrPopoverTextPanel {\n readonly text = input.required<string>();\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 { Directionality } from '@angular/cdk/bidi';\nimport { type BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport type { ComponentRef, TemplateRef } from '@angular/core';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { WR_OVERLAY, WR_RESPONSIVE_OVERLAYS, WrOutsideClick, wrMirrorOffsets, wrPresentAsSheet } from 'ngwr/overlay';\nimport { numAttr } from 'ngwr/utils';\n\nimport { type WrPopoverPosition, wrPopoverPositions } from './interfaces';\nimport { WrPopoverTextPanel } from './internal/text-panel';\n\n/**\n * Anchored content panel. The same directive covers two shapes:\n *\n * - **Popover** (default, `mode=\"popover\"`) — `[wrPopover]` takes a\n * `TemplateRef`. Opens on click or hover. Use for rich anchored content:\n * forms, summaries, menus.\n *\n * - **Tooltip** (`mode=\"tooltip\"`) — `[wrPopover]` takes a plain string.\n * Shown on hover and focus, dismissed on blur / pointer-leave / Escape.\n * Uses `aria-describedby` instead of `aria-haspopup` and is rendered into\n * a small dark text panel.\n *\n * Built on CDK Overlay so it auto-flips, closes on outside-click and Escape.\n *\n * @example\n * ```html\n * <!-- Popover with template content -->\n * <button wr-btn [wrPopover]=\"info\">Details</button>\n * <ng-template #info>\n * <div style=\"padding: 1rem; max-width: 18rem\">Anything you can render.</div>\n * </ng-template>\n *\n * <!-- Tooltip with plain text -->\n * <button wr-btn [wrPopover]=\"'Save changes'\" mode=\"tooltip\" position=\"top\">\n * Save\n * </button>\n * ```\n *\n * @see https://ngwr.dev/reference/components/popover\n */\nlet popoverUid = 0;\n\n@Directive({\n selector: '[wrPopover]',\n exportAs: 'wrPopover',\n host: {\n // Marks the trigger the way `[wrDropdown]` marks its own. Popover-mode\n // content is a `TemplateRef`, so it is always bound as `[wrPopover]=\"…\"`,\n // which leaves no attribute in the DOM at all, and a closed tooltip\n // publishes no ARIA either — so without this there is nothing to find a\n // trigger by. (Only the static string form, `wrPopover=\"text\"`, would be.)\n class: 'wr-popover-trigger',\n '[attr.aria-haspopup]': 'isTooltip() ? null : \"dialog\"',\n '[attr.aria-expanded]': 'isTooltip() ? null : isOpen()',\n '[attr.aria-controls]': '!isTooltip() && isOpen() ? panelId : null',\n '[attr.aria-describedby]': 'isTooltip() && isOpen() ? panelId : null',\n '(click)': 'onClick($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class WrPopover {\n /**\n * Content to render inside the panel.\n * - In **popover** mode (default): pass a `TemplateRef`.\n * - In **tooltip** mode: pass a plain string.\n */\n readonly content = input.required<TemplateRef<unknown> | string>({ alias: 'wrPopover' });\n\n /**\n * Shape preset.\n *\n * - `'popover'` (default) — template content, click trigger, dialog\n * semantics.\n * - `'tooltip'` — text content, hover+focus trigger, `role=\"tooltip\"`,\n * `aria-describedby` on the host.\n */\n readonly mode = input<'popover' | 'tooltip'>('popover');\n\n /**\n * How the popover opens. Ignored in tooltip mode — tooltips are always\n * hover+focus. @default 'click'\n */\n readonly trigger = input<'click' | 'hover'>('click');\n\n /** Anchor side. @default 'bottom' for popover, 'top' for tooltip */\n readonly position = input<WrPopoverPosition | null>(null);\n\n /** Tooltip only — delay before showing, in ms. @default 120 */\n readonly showDelay = input(120, { transform: numAttr(120) });\n\n /** Tooltip only — delay before hiding, in ms. @default 60 */\n readonly hideDelay = input(60, { transform: numAttr(60) });\n\n /**\n * Popover mode only — present the panel as a full-width bottom-sheet on\n * small viewports instead of an anchored panel. `undefined` follows the\n * app-wide `provideWrResponsiveOverlays()` setting; `true`/`false`\n * overrides it. Tooltips never become sheets. @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /**\n * Popover mode only — accessible name of the panel. `role=\"dialog\"` with no\n * name announces as a bare \"dialog\", so the catalog's `popover.label` is used\n * when nothing is given. A popover has no universal name; whenever the panel\n * has a heading or a purpose, pass it.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires after the panel opens. */\n readonly opened = output<void>();\n\n /** Fires after the panel closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n\n /** @internal */\n readonly isOpen = signal(false);\n\n /** @internal */\n protected readonly isTooltip = computed(() => this.mode() === 'tooltip');\n\n /** Auto-generated id for `aria-controls` / `aria-describedby`. */\n protected readonly panelId = `wr-popover-${++popoverUid}`;\n\n private readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'popover.label', 'Popover');\n\n private readonly resolvedPosition = computed<WrPopoverPosition>(\n () => this.position() ?? (this.isTooltip() ? 'top' : 'bottom')\n );\n\n private overlayRef: OverlayRef | null = null;\n private textPanelRef: ComponentRef<WrPopoverTextPanel> | null = null;\n private hoverCloseTimer: ReturnType<typeof setTimeout> | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n // The tooltip string is pushed into the panel when the panel is created, and\n // `openOverlay()` returns early while one is already up — so a `content()`\n // change with the tooltip on screen never reached it and the label stayed on\n // the string it opened with (hover a Copy button, click it, it still reads\n // \"Copy\"). Keeping the ref and pushing from an effect is how `wr-date-picker`\n // feeds its own panel refs.\n effect(() => {\n const content = this.content();\n this.textPanelRef?.setInput('text', typeof content === 'string' ? content : '');\n });\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.closeOverlay();\n });\n }\n\n open(): void {\n this.isOpen.set(true);\n }\n\n close(): void {\n this.isOpen.set(false);\n }\n\n toggle(): void {\n this.isOpen.update(v => !v);\n }\n\n // Host listeners\n\n /** @internal */\n protected onClick(event: MouseEvent): void {\n if (this.isTooltip() || this.trigger() !== 'click') return;\n event.stopPropagation();\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.isTooltip()) {\n this.scheduleShow();\n return;\n }\n if (this.trigger() !== 'hover') return;\n this.clearHoverClose();\n this.isOpen.set(true);\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n const related = event.relatedTarget as Node | null;\n if (this.isTooltip()) {\n // Crossing straight from the trigger onto the panel does not even arm the\n // hide, the same bail-out the popover arm below has had. The panel's own\n // `mouseenter` would cancel it a moment later anyway; not arming it is\n // what removes the race.\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n this.scheduleHide();\n return;\n }\n if (this.trigger() !== 'hover') return;\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n // Delay so the pointer can cross the gap between trigger and panel —\n // entering the panel cancels the close (see attach listeners).\n this.scheduleHoverClose();\n }\n\n /** @internal */\n protected onFocus(): void {\n if (!this.isTooltip()) return;\n this.scheduleShow();\n }\n\n /** @internal */\n protected onBlur(): void {\n if (!this.isTooltip()) return;\n this.scheduleHide();\n }\n\n /** @internal */\n protected onEscape(): void {\n if (!this.isTooltip()) return;\n this.clearTimers();\n this.isOpen.set(false);\n }\n\n // Tooltip timers\n\n private scheduleShow(): void {\n if (this.isOpen()) {\n this.clearTimers();\n return;\n }\n const text = this.content();\n if (typeof text === 'string' && !text) return;\n this.clearTimers();\n this.showTimer = setTimeout(() => this.isOpen.set(true), this.showDelay());\n }\n\n private scheduleHide(): void {\n this.clearTimers();\n this.hideTimer = setTimeout(() => this.isOpen.set(false), this.hideDelay());\n }\n\n private clearTimers(): void {\n if (this.showTimer) {\n clearTimeout(this.showTimer);\n this.showTimer = null;\n }\n if (this.hideTimer) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n // Overlay\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const tooltip = this.isTooltip();\n const position = this.resolvedPosition();\n\n // Sheet presentation is popover-only — tooltips are transient labels and\n // never dock to the bottom. On small viewports (when opted in) detach\n // from the trigger and slide the panel up from the bottom edge.\n const asSheet = !tooltip && wrPresentAsSheet(this.responsive(), this.responsiveConfig);\n const paneClass = tooltip ? 'wr-tooltip-overlay' : 'wr-popover-overlay';\n\n const positionStrategy = asSheet\n ? this.overlay.position().global().centerHorizontally().bottom('0')\n : this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), this.isRtl()))\n .withPush(true);\n\n // The `--<placement>` half is no longer set here: each fallback position\n // carries its own, so the pane names the placement it landed on instead of\n // the one that was requested, and the arrow follows a flip. A sheet has no\n // anchor and so no placement class at all.\n const overlayClass = asSheet ? [paneClass, 'wr-overlay-sheet'] : [paneClass];\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),\n width: asSheet ? '100%' : undefined,\n hasBackdrop: asSheet,\n backdropClass: asSheet ? 'wr-overlay-backdrop' : undefined,\n panelClass: overlayClass,\n });\n\n if (asSheet) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.isOpen.set(false));\n }\n\n const content = this.content();\n\n if (tooltip) {\n // Text content rendered via the internal text panel — accepts a\n // string and wraps it in the `.wr-tooltip` shell.\n const text = typeof content === 'string' ? content : '';\n const ref = this.overlayRef.attach(new ComponentPortal(WrPopoverTextPanel, this.vcr));\n ref.setInput('text', text);\n this.textPanelRef = ref;\n // The pane is the element `aria-describedby` points at (it carries\n // `panelId`), so this is the role that has to be `tooltip` — the inner\n // `wr-popover-text` host deliberately carries none, or the description\n // would be a tooltip nested inside a tooltip.\n this.overlayRef.overlayElement.setAttribute('role', 'tooltip');\n } else if (typeof content !== 'string') {\n const view = this.overlayRef.attach(new TemplatePortal(content, this.vcr));\n const pane = this.overlayRef.overlayElement;\n // Popover mode is a non-modal dialog: the docstring promised dialog\n // semantics but nothing ever set a role, so a screen reader met an\n // unnamed generic container. `aria-modal=\"false\"` is explicit — focus is\n // deliberately NOT trapped, the panel closes on outside click / Escape.\n pane.setAttribute('role', 'dialog');\n pane.setAttribute('aria-modal', 'false');\n // A named dialog: `role=\"dialog\"` with no name announces as a bare\n // \"dialog\" and trips axe's `aria-dialog-name`.\n pane.setAttribute('aria-label', this.resolvedAriaLabel());\n\n if (this.trigger() === 'click') {\n // Render the projected content before focus moves, the way\n // `wr-popconfirm` does — a reader announcing the dialog reads what is in\n // it, and on an empty pane that is nothing.\n view.detectChanges();\n // Focus has to ENTER the panel. The overlay container sits at the end of\n // `<body>`, so Tab from the trigger went to the next control on the page\n // and left the dialog stranded behind it (WCAG F85). The pane takes it\n // rather than the first control inside: a popover's content is\n // arbitrary, and landing on a text field would raise the on-screen\n // keyboard and skip whatever the panel says above it. Tab from the pane\n // reaches that first control anyway, since the pane precedes its own\n // content in document order.\n //\n // Click-triggered only — a hover popover must not pull the caret out of\n // what the user is typing in, and `scheduleHoverClose()` would then\n // dispose the pane out from under the focused element.\n pane.tabIndex = -1;\n pane.focus();\n }\n }\n this.overlayRef.overlayElement.id = this.panelId;\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.isOpen.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.isOpen.set(false);\n }\n });\n\n // Both hover shapes keep the panel up while the pointer is on it: for a\n // popover so the pointer can cross the gap, for a tooltip because WCAG\n // 1.4.13 requires it (Hoverable).\n if (tooltip || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayLeave);\n }\n\n this.opened.emit();\n }\n\n private closeOverlay(): void {\n if (!this.overlayRef) return;\n if (this.isTooltip() || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayLeave);\n }\n this.clearHoverClose();\n // Take the focus back before the pane goes, and only if it was in there.\n //\n // A popover is not a tooltip: it attaches a `TemplatePortal` under\n // `role=\"dialog\"`, so a form or a menu inside it is the point, and Escape\n // arrives through the overlay's `keydownEvents()` no matter where the caret\n // is. Disposing with focus inside dropped it on `<body>`, and the next Tab\n // restarted from the top of the document. `wr-date-picker` and\n // `wr-popconfirm` already guard it exactly this way; leaving focus alone\n // when it had already moved is what stops the close from fighting the user\n // for the caret.\n const pane = this.overlayRef.overlayElement;\n const focusWasInside = pane.contains(this.host.nativeElement.ownerDocument.activeElement);\n this.overlayRef.dispose();\n this.overlayRef = null;\n // Disposing destroys the panel component; a retained ref would pin its view.\n this.textPanelRef = null;\n if (focusWasInside) this.host.nativeElement.focus();\n this.closed.emit();\n }\n\n private readonly onOverlayLeave = (event: MouseEvent): void => {\n const related = event.relatedTarget as Node | null;\n if (related && this.host.nativeElement.contains(related)) return;\n // A tooltip leaves on its own `hideDelay`, the same one the trigger uses; a\n // hover popover has the longer grace period for crossing the gap back.\n if (this.isTooltip()) this.scheduleHide();\n else this.scheduleHoverClose();\n };\n\n private readonly onOverlayEnter = (): void => {\n // Two different timers can be in flight: `hideTimer`, armed by the trigger's\n // own `mouseleave` in tooltip mode, and `hoverCloseTimer` in popover mode.\n // Cancelling only the second would leave a tooltip disappearing `hideDelay`\n // after the pointer arrived on it.\n this.clearTimers();\n this.clearHoverClose();\n };\n\n private scheduleHoverClose(): void {\n this.clearHoverClose();\n this.hoverCloseTimer = setTimeout(() => this.isOpen.set(false), 120);\n }\n\n private clearHoverClose(): void {\n if (this.hoverCloseTimer) {\n clearTimeout(this.hoverCloseTimer);\n this.hoverCloseTimer = null;\n }\n }\n\n /**\n * Whether the app reads right-to-left.\n *\n * Optional inject: `Directionality` is root-provided, so this is never null in\n * an app — but a bare `TestBed` that provides nothing should still get a\n * component that works, and defaulting to LTR is the honest fallback.\n */\n private isRtl(): boolean {\n return this.dir?.value === 'rtl';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;;;AAKG;AAkBH;;;;;;;;;;;;;AAaG;AACI,MAAM,oBAAoB,GAAiD;IAChF,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,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;;;;AAMJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,sBAAsB,EAAE,+BAA+B;AACvD,wBAAA,sBAAsB,EAAE,+BAA+B;AACvD,wBAAA,sBAAsB,EAAE,2CAA2C;AACnE,wBAAA,yBAAyB,EAAE,0CAA0C;AACrE,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,cAAc,EAAE,gBAAgB;AAChC,wBAAA,cAAc,EAAE,sBAAsB;AACtC,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,QAAQ,EAAE,UAAU;AACpB,wBAAA,kBAAkB,EAAE,YAAY;AACjC,qBAAA;AACF,iBAAA;;;ACtFD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-popover.mjs","sources":["../../../projects/lib/popover/interfaces/popover-position.ts","../../../projects/lib/popover/internal/keystroke.ts","../../../projects/lib/popover/internal/text-panel.ts","../../../projects/lib/popover/popover.ts","../../../projects/lib/popover/ngwr-popover.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 type { ConnectedPosition } from '@angular/cdk/overlay';\n\nexport type WrPopoverPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/**\n * The CDK geometry for each placement — one position, no fallbacks.\n *\n * The 8px offset is the gap between the trigger and the panel, and it is the\n * reason a flip list matters rather than being a nicety: the flexible strategy\n * emits `offsetX` as a `transform` on the pane, AFTER `withPush` has already\n * decided the coordinate. Push therefore parks a right-anchored panel flush\n * against the viewport edge and the offset then shoves it 8px back out, so a\n * side placement that does not fit loses its border and corner off-screen no\n * matter how hard push works. Flipping to a placement that fits is the only\n * recovery, which is what `WR_POPOVER_FALLBACKS` is for.\n *\n * @internal\n */\nexport const WR_POPOVER_POSITIONS: Record<WrPopoverPosition, ConnectedPosition> = {\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -8 },\n 'top-start': { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -8 },\n 'top-end': { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', offsetY: -8 },\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 8 },\n 'bottom-start': { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 8 },\n 'bottom-end': { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 8 },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -8 },\n 'left-start': { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top', offsetX: -8 },\n 'left-end': { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom', offsetX: -8 },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 8 },\n 'right-start': { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top', offsetX: 8 },\n 'right-end': { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom', offsetX: 8 },\n};\n\n/**\n * What each placement is allowed to flip to when it does not fit, best first.\n * The requested placement always leads, so a panel that fits never moves.\n *\n * Alignment is preserved down the whole chain — a `-start` popover stays\n * `-start` — because the alignment is the author's answer to \"which end of the\n * trigger does this belong to\", and a flip is about the side, not about that.\n *\n * The two axes are deliberately NOT symmetric. A block-axis placement (`top*` /\n * `bottom*`) flips only to its opposite, the classic behaviour, so a dropdown-ish\n * panel can never surprise anyone by appearing beside its trigger. An inline-axis\n * one (`left*` / `right*`) also gets the two block-axis sides, because on a phone\n * NEITHER side fits: at 375px a 233px panel beside a mid-page trigger overflows\n * by 109px to the right and 97px to the left, and only below/above has room.\n *\n * @internal\n */\nexport const WR_POPOVER_FALLBACKS: Record<WrPopoverPosition, readonly WrPopoverPosition[]> = {\n top: ['top', 'bottom'],\n 'top-start': ['top-start', 'bottom-start'],\n 'top-end': ['top-end', 'bottom-end'],\n bottom: ['bottom', 'top'],\n 'bottom-start': ['bottom-start', 'top-start'],\n 'bottom-end': ['bottom-end', 'top-end'],\n left: ['left', 'right', 'bottom', 'top'],\n 'left-start': ['left-start', 'right-start', 'bottom-start', 'top-start'],\n 'left-end': ['left-end', 'right-end', 'bottom-end', 'top-end'],\n right: ['right', 'left', 'bottom', 'top'],\n 'right-start': ['right-start', 'left-start', 'bottom-start', 'top-start'],\n 'right-end': ['right-end', 'left-end', 'bottom-end', 'top-end'],\n};\n\n/**\n * The list `withPositions()` wants, with every link tagged so the pane names the\n * placement it ACTUALLY took rather than the one that was asked for.\n *\n * The tag is what keeps the arrow honest. It is drawn by\n * `.wr-popover-overlay--<placement> > *::after`, so a panel that flipped while\n * the class stayed put would point at a side it no longer sits on. CDK applies a\n * position's own `panelClass` in `_applyPosition` and clears it again on the next\n * one, which is exactly the bookkeeping this needs — hence the class rather than\n * a `positionChanges` subscription.\n *\n * @param paneClass The pane's base class: `wr-popover-overlay` or\n * `wr-tooltip-overlay`. The two modes key their arrows off different\n * selectors, so the prefix cannot live in the table.\n *\n * @internal\n */\nexport function wrPopoverPositions(position: WrPopoverPosition, paneClass: string): ConnectedPosition[] {\n return WR_POPOVER_FALLBACKS[position].map(name => ({\n ...WR_POPOVER_POSITIONS[name],\n panelClass: `${paneClass}--${name}`,\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 { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, PLATFORM_ID, Service, inject } from '@angular/core';\n\n/** `FocusMonitor._setOrigin`'s own window — see the class docs for why it matches. */\nconst KEYSTROKE_WINDOW_MS = 1;\n\n/**\n * The key of the keystroke being handled RIGHT NOW — `null` between them.\n *\n * `FocusMonitor` answers \"the most recent input modality was a keyboard\", which\n * is a weaker statement than \"the user's own key put focus here\", and the gap\n * between the two is exactly where a tooltip goes wrong. The origin is whatever\n * was pressed within the last millisecond (`_setOrigin` clears it on a 1ms\n * timer), and an overlay dismissed with Escape hands focus BACK to its trigger\n * synchronously, inside that same keystroke — CDK's keyboard dispatcher listens\n * on `<body>` in the bubble phase, the modality detector on `document` in\n * capture, so the modality is always already `keyboard` by the time the drawer\n * runs. Same for a ✕ activated with Enter. So the CDK reports `keyboard` for a\n * hand-back and a tooltip reading the origin alone still shows itself unbidden,\n * which is the whole failure it was meant to stop.\n *\n * The KEY separates them: `Tab` and the arrows are how a user moves focus,\n * `Escape` and `Enter` dismiss and activate. A focus that lands during one of\n * those was moved by a script.\n *\n * One passive capture listener for the whole app, constructed with the first\n * `[wrPopover]` and never before it — beside the three `InputModalityDetector`\n * already installs.\n *\n * The key expires on the CDK's own 1ms window rather than on a bare macrotask,\n * and matching it is the point: the key is only ever read to EXPLAIN a keyboard\n * origin, so it must not run out while the origin it explains is still live. A\n * `setTimeout(0)` close would land in exactly that gap — key already forgotten,\n * origin still `keyboard` — and read as a Tab. Everything a keystroke does\n * synchronously, its default action and the click Enter dispatches included,\n * happens long before either timer; anything that waits past them is judged\n * `program` by the CDK and never reaches this question.\n *\n * Popover-local on purpose; no other component in the catalog asks this yet.\n */\n@Service()\nexport class WrCurrentKeystroke {\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private current: string | null = null;\n private clearTimer: ReturnType<typeof setTimeout> | null = null;\n\n /** `KeyboardEvent.key` for the keystroke in flight, `null` outside one. */\n get key(): string | null {\n return this.current;\n }\n\n constructor() {\n if (!this.isBrowser) return;\n\n const record = (event: KeyboardEvent): void => {\n this.current = event.key;\n if (this.clearTimer) clearTimeout(this.clearTimer);\n this.clearTimer = setTimeout(() => (this.current = null), KEYSTROKE_WINDOW_MS);\n };\n\n // Capture, so the key is on record before any handler deeper in the tree\n // gets to move focus with it.\n this.doc.addEventListener('keydown', record, { capture: true, passive: true });\n this.destroyRef.onDestroy(() => {\n if (this.clearTimer) clearTimeout(this.clearTimer);\n this.doc.removeEventListener('keydown', record, { capture: true });\n });\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 { Component, ViewEncapsulation, input } from '@angular/core';\n\n/**\n * Internal floating label rendered when `<… [wrPopover]=\"'…'\" mode=\"tooltip\">`\n * receives a string instead of a template. Not part of the public template\n * API — use the `WrPopover` directive in tooltip mode instead.\n *\n * @internal\n */\n@Component({\n selector: 'wr-popover-text',\n template: '{{ text() }}',\n encapsulation: ViewEncapsulation.None,\n // No `role=\"tooltip\"` here on purpose: the overlay pane this is attached to\n // is the element `aria-describedby` resolves to, and it carries the role.\n // Setting it here too nested one tooltip inside another.\n host: { class: 'wr-tooltip' },\n})\nexport class WrPopoverTextPanel {\n readonly text = input.required<string>();\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 { FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { type BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport type { ComponentRef, TemplateRef } from '@angular/core';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n ViewContainerRef,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport {\n WR_OVERLAY,\n WR_RESPONSIVE_OVERLAYS,\n WrOutsideClick,\n wrFollowDirection,\n wrMirrorOffsets,\n wrPresentAsSheet,\n} from 'ngwr/overlay';\nimport { KEYS, numAttr } from 'ngwr/utils';\n\nimport { type WrPopoverPosition, wrPopoverPositions } from './interfaces';\nimport { WrCurrentKeystroke } from './internal/keystroke';\nimport { WrPopoverTextPanel } from './internal/text-panel';\n\n/**\n * Keys the USER moves focus with: Tab through the page, the arrows / Home /\n * End through a composite that roves its own tabindex.\n *\n * A roving arrow move is a script `.focus()` call too — the difference from a\n * dismissal is not who called `focus()` but whether the keystroke was a\n * NAVIGATION or an action. Anything absent from this list (Escape, Enter,\n * Space, a character) does something else for a living, so focus that lands\n * during one of them was placed by a script and a tooltip stays shut.\n */\nconst NAVIGATION_KEYS = new Set<string>([\n KEYS.TAB,\n KEYS.ARROW_UP,\n KEYS.ARROW_DOWN,\n KEYS.ARROW_LEFT,\n KEYS.ARROW_RIGHT,\n KEYS.HOME,\n KEYS.END,\n KEYS.PAGE_UP,\n KEYS.PAGE_DOWN,\n]);\n\n/**\n * Anchored content panel. The same directive covers two shapes:\n *\n * - **Popover** (default, `mode=\"popover\"`) — `[wrPopover]` takes a\n * `TemplateRef`. Opens on click or hover. Use for rich anchored content:\n * forms, summaries, menus.\n *\n * - **Tooltip** (`mode=\"tooltip\"`) — `[wrPopover]` takes a plain string.\n * Shown on hover and when the KEYBOARD puts focus on the trigger — never for\n * a `.focus()` call, which is what a dialog or drawer does when it hands\n * focus back. Dismissed when focus leaves / on pointer-leave / Escape. Uses\n * `aria-describedby` instead of `aria-haspopup` and is rendered into a small\n * dark text panel.\n *\n * Built on CDK Overlay so it auto-flips, closes on outside-click and Escape.\n *\n * @example\n * ```html\n * <!-- Popover with template content -->\n * <button wr-btn [wrPopover]=\"info\">Details</button>\n * <ng-template #info>\n * <div style=\"padding: 1rem; max-width: 18rem\">Anything you can render.</div>\n * </ng-template>\n *\n * <!-- Tooltip with plain text -->\n * <button wr-btn [wrPopover]=\"'Save changes'\" mode=\"tooltip\" position=\"top\">\n * Save\n * </button>\n * ```\n *\n * @see https://ngwr.dev/reference/components/popover\n */\nlet popoverUid = 0;\n\n@Directive({\n selector: '[wrPopover]',\n exportAs: 'wrPopover',\n host: {\n // Marks the trigger the way `[wrDropdown]` marks its own. Popover-mode\n // content is a `TemplateRef`, so it is always bound as `[wrPopover]=\"…\"`,\n // which leaves no attribute in the DOM at all, and a closed tooltip\n // publishes no ARIA either — so without this there is nothing to find a\n // trigger by. (Only the static string form, `wrPopover=\"text\"`, would be.)\n class: 'wr-popover-trigger',\n '[attr.aria-haspopup]': 'isTooltip() ? null : \"dialog\"',\n '[attr.aria-expanded]': 'isTooltip() ? null : isOpen()',\n '[attr.aria-controls]': '!isTooltip() && isOpen() ? panelId : null',\n '[attr.aria-describedby]': 'isTooltip() && isOpen() ? panelId : null',\n '(click)': 'onClick($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n // No `(focus)` / `(blur)` here: a tooltip answers the KEYBOARD, and a plain\n // focus event cannot say where the focus came from. `FocusMonitor` can — see\n // the constructor.\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class WrPopover {\n /**\n * Content to render inside the panel.\n * - In **popover** mode (default): pass a `TemplateRef`.\n * - In **tooltip** mode: pass a plain string.\n */\n readonly content = input.required<TemplateRef<unknown> | string>({ alias: 'wrPopover' });\n\n /**\n * Shape preset.\n *\n * - `'popover'` (default) — template content, click trigger, dialog\n * semantics.\n * - `'tooltip'` — text content, hover / keyboard-focus trigger,\n * `role=\"tooltip\"`, `aria-describedby` on the host.\n */\n readonly mode = input<'popover' | 'tooltip'>('popover');\n\n /**\n * How the popover opens. Ignored in tooltip mode — a tooltip is always hover\n * plus keyboard focus. @default 'click'\n */\n readonly trigger = input<'click' | 'hover'>('click');\n\n /** Anchor side. @default 'bottom' for popover, 'top' for tooltip */\n readonly position = input<WrPopoverPosition | null>(null);\n\n /** Tooltip only — delay before showing, in ms. @default 120 */\n readonly showDelay = input(120, { transform: numAttr(120) });\n\n /** Tooltip only — delay before hiding, in ms. @default 60 */\n readonly hideDelay = input(60, { transform: numAttr(60) });\n\n /**\n * Popover mode only — present the panel as a full-width bottom-sheet on\n * small viewports instead of an anchored panel. `undefined` follows the\n * app-wide `provideWrResponsiveOverlays()` setting; `true`/`false`\n * overrides it. Tooltips never become sheets. @default undefined\n */\n readonly responsive = input<boolean | undefined, BooleanInput>(undefined, {\n transform: (v: BooleanInput): boolean | undefined => (v == null ? undefined : coerceBooleanProperty(v)),\n });\n\n /**\n * Popover mode only — accessible name of the panel. `role=\"dialog\"` with no\n * name announces as a bare \"dialog\", so the catalog's `popover.label` is used\n * when nothing is given. A popover has no universal name; whenever the panel\n * has a heading or a purpose, pass it.\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires after the panel opens. */\n readonly opened = output<void>();\n\n /** Fires after the panel closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly keystroke = inject(WrCurrentKeystroke);\n private readonly overlay = inject(WR_OVERLAY);\n private readonly dir = inject(Directionality, { optional: true });\n private readonly outsideClick = inject(WrOutsideClick);\n private readonly responsiveConfig = inject(WR_RESPONSIVE_OVERLAYS);\n private readonly vcr = inject(ViewContainerRef);\n private readonly scrollStrategies = inject(ScrollStrategyOptions);\n private readonly destroyRef = inject(DestroyRef);\n private readonly injector = inject(Injector);\n\n /** @internal */\n readonly isOpen = signal(false);\n\n /** @internal */\n protected readonly isTooltip = computed(() => this.mode() === 'tooltip');\n\n /** Auto-generated id for `aria-controls` / `aria-describedby`. */\n protected readonly panelId = `wr-popover-${++popoverUid}`;\n\n private readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'popover.label', 'Popover');\n\n private readonly resolvedPosition = computed<WrPopoverPosition>(\n () => this.position() ?? (this.isTooltip() ? 'top' : 'bottom')\n );\n\n private overlayRef: OverlayRef | null = null;\n private textPanelRef: ComponentRef<WrPopoverTextPanel> | null = null;\n /** Whether the HOST itself holds focus — not a descendant of it. */\n private hostFocused = false;\n private hoverCloseTimer: ReturnType<typeof setTimeout> | null = null;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n // The tooltip string is pushed into the panel when the panel is created, and\n // `openOverlay()` returns early while one is already up — so a `content()`\n // change with the tooltip on screen never reached it and the label stayed on\n // the string it opened with (hover a Copy button, click it, it still reads\n // \"Copy\"). Keeping the ref and pushing from an effect is how `wr-date-picker`\n // feeds its own panel refs.\n effect(() => {\n const content = this.content();\n this.textPanelRef?.setInput('text', typeof content === 'string' ? content : '');\n });\n // A tooltip answers the USER'S KEYBOARD, not every focus there is.\n //\n // `(focus)` fired for a programmatic one too, and something hands focus back\n // to a trigger constantly: `WrDrawer` and `WrDialog` restore the element that\n // was active when they opened, this directive does the same for its own\n // popover, and any app may call `.focus()`. So closing a drawer opened from a\n // button with a tooltip re-showed that tooltip with NOTHING left to dismiss\n // it — the pointer is elsewhere, so no `mouseleave`, and focus stays on the\n // button, so no blur. A pane stranded under the trigger, reported from a real\n // app. The event alone cannot tell those apart; `FocusMonitor` is the CDK's\n // answer to where a focus came from, and it is what Material's tooltip reads\n // for the same reason. Mouse and touch origins are deliberately ignored:\n // hover already drives both, and acting on them would show the tooltip twice\n // over.\n //\n // The origin alone is NOT enough, though, and reading it as if it were leaves\n // the reported bug half open: the CDK's `keyboard` means \"a key went down\n // within the last millisecond\", and the dismissal that hands focus back is\n // itself a keystroke — Escape on a drawer, Enter on its ✕. See\n // `WrCurrentKeystroke` for the key that tells a navigation from a dismissal.\n //\n // Monitored in EVERY mode rather than only under `mode=\"tooltip\"` — the mode\n // is an input and may flip after this runs, and a subscription that only\n // half-exists is the failure this fix is about. The handler asks instead. The\n // cost is the CDK's own `cdk-*-focused` classes on the host, which nothing in\n // ngwr styles.\n //\n // `afterNextRender` because monitoring binds document listeners: there is no\n // DOM to bind them to on the server.\n afterNextRender(() => {\n this.focusMonitor\n .monitor(this.host)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin => {\n if (origin) {\n this.hostFocused = true;\n if (this.isTooltip() && origin === 'keyboard' && this.fromNavigationKey()) this.scheduleShow();\n return;\n }\n // A null origin is a blur, and the CDK reports one for a DESCENDANT\n // too: `_onFocus` bails when the event target is not the monitored\n // element, `_onBlur` has no such guard. The old `(blur)` binding never\n // bubbled, so hiding on one is new — hover a wrapper, click the button\n // inside it, tab away, and the tooltip the POINTER opened vanished\n // while the pointer never moved. Only the host's own focus counts.\n if (!this.hostFocused) return;\n this.hostFocused = false;\n if (this.isTooltip()) this.scheduleHide();\n });\n });\n this.destroyRef.onDestroy(() => {\n this.clearTimers();\n this.closeOverlay(false);\n // Completes the subject `monitor()` handed out and drops the global\n // listeners it registered for this element; the pipe above unsubscribes\n // either way, but the CDK's own bookkeeping only clears from here.\n this.focusMonitor.stopMonitoring(this.host);\n });\n }\n\n open(): void {\n this.isOpen.set(true);\n }\n\n close(): void {\n this.isOpen.set(false);\n }\n\n toggle(): void {\n this.isOpen.update(v => !v);\n }\n\n // Host listeners\n\n /** @internal */\n protected onClick(event: MouseEvent): void {\n if (this.isTooltip() || this.trigger() !== 'click') return;\n event.stopPropagation();\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.isTooltip()) {\n this.scheduleShow();\n return;\n }\n if (this.trigger() !== 'hover') return;\n this.clearHoverClose();\n this.isOpen.set(true);\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n const related = event.relatedTarget as Node | null;\n if (this.isTooltip()) {\n // Crossing straight from the trigger onto the panel does not even arm the\n // hide, the same bail-out the popover arm below has had. The panel's own\n // `mouseenter` would cancel it a moment later anyway; not arming it is\n // what removes the race.\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n this.scheduleHide();\n return;\n }\n if (this.trigger() !== 'hover') return;\n if (related && this.overlayRef?.overlayElement.contains(related)) return;\n // Delay so the pointer can cross the gap between trigger and panel —\n // entering the panel cancels the close (see attach listeners).\n this.scheduleHoverClose();\n }\n\n /** @internal */\n protected onEscape(): void {\n if (!this.isTooltip()) return;\n this.clearTimers();\n this.isOpen.set(false);\n }\n\n /**\n * Whether the keystroke in flight is one the user moves focus with.\n *\n * Asked only of a `keyboard` origin, which the CDK grants to any focus landing\n * within a millisecond of a keydown — including the hand-back a drawer\n * performs while Escape is still being handled. That is the reported bug's\n * keyboard half, and the origin cannot see it.\n *\n * NO key on record answers `true`, and that polarity is chosen rather than\n * inherited: a keyboard modality with no keystroke behind it is a screen\n * reader's virtual cursor (the CDK reads its synthetic mousedown as\n * `keyboard`) or a deliberate `focusVia(el, 'keyboard')`, and both are the\n * user. Refusing wants positive evidence of a key that does something other\n * than navigate — silence must not cost an AT user the hint. The two windows\n * are aligned so that \"keyboard origin, no key\" cannot mean \"the key just\n * expired\"; what it does still admit is a `FocusMonitorDetectionMode.EVENTUAL`\n * app, where the CDK never expires an origin at all.\n */\n private fromNavigationKey(): boolean {\n const key = this.keystroke.key;\n return key === null || NAVIGATION_KEYS.has(key);\n }\n\n // Tooltip timers\n\n private scheduleShow(): void {\n if (this.isOpen()) {\n this.clearTimers();\n return;\n }\n const text = this.content();\n if (typeof text === 'string' && !text) return;\n this.clearTimers();\n this.showTimer = setTimeout(() => this.isOpen.set(true), this.showDelay());\n }\n\n private scheduleHide(): void {\n this.clearTimers();\n this.hideTimer = setTimeout(() => this.isOpen.set(false), this.hideDelay());\n }\n\n private clearTimers(): void {\n if (this.showTimer) {\n clearTimeout(this.showTimer);\n this.showTimer = null;\n }\n if (this.hideTimer) {\n clearTimeout(this.hideTimer);\n this.hideTimer = null;\n }\n }\n\n // Overlay\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const tooltip = this.isTooltip();\n const position = this.resolvedPosition();\n\n // Sheet presentation is popover-only — tooltips are transient labels and\n // never dock to the bottom. On small viewports (when opted in) detach\n // from the trigger and slide the panel up from the bottom edge.\n const asSheet = !tooltip && wrPresentAsSheet(this.responsive(), this.responsiveConfig);\n const paneClass = tooltip ? 'wr-tooltip-overlay' : 'wr-popover-overlay';\n\n // Kept as its own binding rather than inlined into the ternary: it is the\n // half a direction flip has to rebuild, and a sheet — anchored to nothing —\n // has no list at all, which is what `null` says here.\n const connected = asSheet\n ? null\n : this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), this.isRtl()))\n .withPush(true);\n\n const positionStrategy = connected ?? this.overlay.position().global().centerHorizontally().bottom('0');\n\n // The `--<placement>` half is no longer set here: each fallback position\n // carries its own, so the pane names the placement it landed on instead of\n // the one that was requested, and the arrow follows a flip. A sheet has no\n // anchor and so no placement class at all.\n const overlayClass = asSheet ? [paneClass, 'wr-overlay-sheet'] : [paneClass];\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: asSheet ? this.scrollStrategies.block() : this.scrollStrategies.reposition(),\n width: asSheet ? '100%' : undefined,\n hasBackdrop: asSheet,\n backdropClass: asSheet ? 'wr-overlay-backdrop' : undefined,\n panelClass: overlayClass,\n });\n\n // The CDK read the direction once, just now, and will never look again — so\n // an app that flips while this panel is up mirrors the page around a pane\n // still rendering `ltr`, with `wr-segmented` and friends inside it already\n // laying themselves out the other way. Rebuilding the list matters as much\n // as the attribute: `wrMirrorOffsets` turned the 8px gap around at open, and\n // an unmirrored offset puts a side-placed panel back on top of its trigger.\n // A sheet has no list, and `connected?.` is what says so — the arguments are\n // never evaluated for one.\n wrFollowDirection(this.overlayRef, this.dir, this.injector, direction =>\n connected?.withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), direction === 'rtl'))\n );\n\n if (asSheet) {\n this.overlayRef\n .backdropClick()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.isOpen.set(false));\n }\n\n const content = this.content();\n\n if (tooltip) {\n // Text content rendered via the internal text panel — accepts a\n // string and wraps it in the `.wr-tooltip` shell.\n const text = typeof content === 'string' ? content : '';\n const ref = this.overlayRef.attach(new ComponentPortal(WrPopoverTextPanel, this.vcr));\n ref.setInput('text', text);\n this.textPanelRef = ref;\n // The pane is the element `aria-describedby` points at (it carries\n // `panelId`), so this is the role that has to be `tooltip` — the inner\n // `wr-popover-text` host deliberately carries none, or the description\n // would be a tooltip nested inside a tooltip.\n this.overlayRef.overlayElement.setAttribute('role', 'tooltip');\n } else if (typeof content !== 'string') {\n const view = this.overlayRef.attach(new TemplatePortal(content, this.vcr));\n const pane = this.overlayRef.overlayElement;\n // Popover mode is a non-modal dialog: the docstring promised dialog\n // semantics but nothing ever set a role, so a screen reader met an\n // unnamed generic container. `aria-modal=\"false\"` is explicit — focus is\n // deliberately NOT trapped, the panel closes on outside click / Escape.\n pane.setAttribute('role', 'dialog');\n pane.setAttribute('aria-modal', 'false');\n // A named dialog: `role=\"dialog\"` with no name announces as a bare\n // \"dialog\" and trips axe's `aria-dialog-name`.\n pane.setAttribute('aria-label', this.resolvedAriaLabel());\n\n if (this.trigger() === 'click') {\n // Render the projected content before focus moves, the way\n // `wr-popconfirm` does — a reader announcing the dialog reads what is in\n // it, and on an empty pane that is nothing.\n view.detectChanges();\n // Focus has to ENTER the panel. The overlay container sits at the end of\n // `<body>`, so Tab from the trigger went to the next control on the page\n // and left the dialog stranded behind it (WCAG F85). The pane takes it\n // rather than the first control inside: a popover's content is\n // arbitrary, and landing on a text field would raise the on-screen\n // keyboard and skip whatever the panel says above it. Tab from the pane\n // reaches that first control anyway, since the pane precedes its own\n // content in document order.\n //\n // Click-triggered only — a hover popover must not pull the caret out of\n // what the user is typing in, and `scheduleHoverClose()` would then\n // dispose the pane out from under the focused element.\n pane.tabIndex = -1;\n pane.focus();\n }\n }\n this.overlayRef.overlayElement.id = this.panelId;\n\n this.outsideClick\n .outsidePointerEvents(this.overlayRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (this.host.nativeElement.contains(event.target as Node)) return;\n this.isOpen.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.isOpen.set(false);\n }\n });\n\n // Both hover shapes keep the panel up while the pointer is on it: for a\n // popover so the pointer can cross the gap, for a tooltip because WCAG\n // 1.4.13 requires it (Hoverable).\n if (tooltip || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayLeave);\n }\n\n this.opened.emit();\n }\n\n /**\n * Tear the overlay down, and tell the host — unless the host is going away\n * with it.\n *\n * `notify: false` is the DESTROY path, and it is not a nicety. An `output()`\n * belongs to the view that declares it, so emitting from `onDestroy` is\n * refused: Angular logs `NG0953: Unexpected emit for destroyed OutputRef` and\n * the listener never runs. Measured — a `(closed)` handler on a dropdown whose\n * host view is removed while the menu is open fired zero times and left a\n * console error behind. There is nobody to notify at that point, because the\n * consumer's own view is being torn down in the same pass; `wr-popconfirm`\n * already disposes without emitting, and this brings the other two into line.\n *\n * The focus hand-back is skipped for the same reason — the host element is on\n * its way out of the document.\n */\n private closeOverlay(notify = true): void {\n if (!this.overlayRef) return;\n if (this.isTooltip() || this.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseenter', this.onOverlayEnter);\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayLeave);\n }\n this.clearHoverClose();\n // Take the focus back before the pane goes, and only if it was in there.\n //\n // A popover is not a tooltip: it attaches a `TemplatePortal` under\n // `role=\"dialog\"`, so a form or a menu inside it is the point, and Escape\n // arrives through the overlay's `keydownEvents()` no matter where the caret\n // is. Disposing with focus inside dropped it on `<body>`, and the next Tab\n // restarted from the top of the document. `wr-date-picker` and\n // `wr-popconfirm` already guard it exactly this way; leaving focus alone\n // when it had already moved is what stops the close from fighting the user\n // for the caret.\n const pane = this.overlayRef.overlayElement;\n const focusWasInside = pane.contains(this.host.nativeElement.ownerDocument.activeElement);\n this.overlayRef.dispose();\n this.overlayRef = null;\n // Disposing destroys the panel component; a retained ref would pin its view.\n this.textPanelRef = null;\n if (notify) {\n if (focusWasInside) this.host.nativeElement.focus();\n this.closed.emit();\n }\n }\n\n private readonly onOverlayLeave = (event: MouseEvent): void => {\n const related = event.relatedTarget as Node | null;\n if (related && this.host.nativeElement.contains(related)) return;\n // A tooltip leaves on its own `hideDelay`, the same one the trigger uses; a\n // hover popover has the longer grace period for crossing the gap back.\n if (this.isTooltip()) this.scheduleHide();\n else this.scheduleHoverClose();\n };\n\n private readonly onOverlayEnter = (): void => {\n // Two different timers can be in flight: `hideTimer`, armed by the trigger's\n // own `mouseleave` in tooltip mode, and `hoverCloseTimer` in popover mode.\n // Cancelling only the second would leave a tooltip disappearing `hideDelay`\n // after the pointer arrived on it.\n this.clearTimers();\n this.clearHoverClose();\n };\n\n private scheduleHoverClose(): void {\n this.clearHoverClose();\n this.hoverCloseTimer = setTimeout(() => this.isOpen.set(false), 120);\n }\n\n private clearHoverClose(): void {\n if (this.hoverCloseTimer) {\n clearTimeout(this.hoverCloseTimer);\n this.hoverCloseTimer = null;\n }\n }\n\n /**\n * Whether the app reads right-to-left.\n *\n * Optional inject: `Directionality` is root-provided, so this is never null in\n * an app — but a bare `TestBed` that provides nothing should still get a\n * component that works, and defaulting to LTR is the honest fallback.\n */\n private isRtl(): boolean {\n return this.dir?.value === 'rtl';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;AAKG;AAkBH;;;;;;;;;;;;;AAaG;AACI,MAAM,oBAAoB,GAAiD;IAChF,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ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,sBAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,iCAAA,EAAA,oBAAA,EAAA,+BAAA,EAAA,oBAAA,EAAA,2CAAA,EAAA,uBAAA,EAAA,0CAAA,EAAA,EAAA,cAAA,EAAA,oBAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBAvBrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,IAAI,EAAE;;;;;;AAMJ,wBAAA,KAAK,EAAE,oBAAoB;AAC3B,wBAAA,sBAAsB,EAAE,+BAA+B;AACvD,wBAAA,sBAAsB,EAAE,+BAA+B;AACvD,wBAAA,sBAAsB,EAAE,2CAA2C;AACnE,wBAAA,yBAAyB,EAAE,0CAA0C;AACrE,wBAAA,SAAS,EAAE,iBAAiB;AAC5B,wBAAA,cAAc,EAAE,gBAAgB;AAChC,wBAAA,cAAc,EAAE,sBAAsB;;;;AAItC,wBAAA,kBAAkB,EAAE,YAAY;AACjC,qBAAA;AACF,iBAAA;;;AC1HD;;AAEG;;;;"}
|
|
@@ -42,10 +42,10 @@ class WrProgress {
|
|
|
42
42
|
...(ngDevMode ? [{ debugName: "clamped" }] : /* istanbul ignore next */ []));
|
|
43
43
|
classes = computed(() => `wr-progress wr-progress--${this.color()}`, /* @ts-ignore */
|
|
44
44
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
45
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
46
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
45
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrProgress, isStandalone: true, selector: "wr-progress", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar", "aria-valuemin": "0", "aria-valuemax": "100" }, properties: { "attr.aria-valuenow": "clamped()", "attr.aria-label": "resolvedAriaLabel()", "class": "classes()" } }, ngImport: i0, template: `<div class="wr-progress__bar" [style.width.%]="clamped()"></div>`, isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
47
47
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrProgress, decorators: [{
|
|
49
49
|
type: Component,
|
|
50
50
|
args: [{
|
|
51
51
|
selector: 'wr-progress',
|
|
@@ -164,10 +164,10 @@ class WrPullToRefresh {
|
|
|
164
164
|
this.refresh.emit();
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
168
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
167
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrPullToRefresh, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
168
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrPullToRefresh, isStandalone: true, selector: "wr-pull-to-refresh", inputs: { refreshing: { classPropertyName: "refreshing", publicName: "refreshing", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, threshold: { classPropertyName: "threshold", publicName: "threshold", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { refresh: "refresh" }, host: { listeners: { "touchstart": "onTouchStart($event)", "touchmove": "onTouchMove($event)", "touchend": "onTouchEnd()", "touchcancel": "onTouchCancel()" }, properties: { "class.wr-pull-to-refresh--animating": "!dragging()" }, classAttribute: "wr-pull-to-refresh" }, ngImport: i0, template: "@if (distance() > 0 || refreshing()) {\n <div class=\"wr-pull-to-refresh__indicator\" [style.height.px]=\"distance()\" aria-hidden=\"true\">\n <wr-spinner class=\"wr-pull-to-refresh__spinner\" size=\"sm\" [style.opacity]=\"progress()\" />\n </div>\n}\n<div class=\"wr-pull-to-refresh__content\" [style.transform]=\"contentTransform()\">\n <ng-content />\n</div>\n", dependencies: [{ kind: "component", type: WrSpinner, selector: "wr-spinner", inputs: ["size", "ariaLabel"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
169
169
|
}
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrPullToRefresh, decorators: [{
|
|
171
171
|
type: Component,
|
|
172
172
|
args: [{ selector: 'wr-pull-to-refresh', encapsulation: ViewEncapsulation.None, host: {
|
|
173
173
|
class: 'wr-pull-to-refresh',
|
package/fesm2022/ngwr-qr.mjs
CHANGED
|
@@ -1106,10 +1106,10 @@ class WrQr {
|
|
|
1106
1106
|
drawQrCode(el, opts);
|
|
1107
1107
|
});
|
|
1108
1108
|
}
|
|
1109
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
1110
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.
|
|
1109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrQr, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: WrQr, isStandalone: true, selector: "wr-qr", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, iconUrl: { classPropertyName: "iconUrl", publicName: "iconUrl", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.background": "bgColor()" }, classAttribute: "wr-qr" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true, isSignal: true }], ngImport: i0, template: "<!--\n Always emit the canvas \u2014 painting is guarded in the effect instead. Gating\n the element itself on the platform makes the server and client render\n different structures, which breaks hydration; a bare canvas costs nothing\n and matches how the other canvas-backed components behave.\n-->\n<canvas #canvas role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\"></canvas>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
1111
1111
|
}
|
|
1112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
1112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrQr, decorators: [{
|
|
1113
1113
|
type: Component,
|
|
1114
1114
|
args: [{ selector: 'wr-qr', encapsulation: ViewEncapsulation.None, host: { class: 'wr-qr', '[style.background]': 'bgColor()' }, template: "<!--\n Always emit the canvas \u2014 painting is guarded in the effect instead. Gating\n the element itself on the platform makes the server and client render\n different structures, which breaks hydration; a bare canvas costs nothing\n and matches how the other canvas-backed components behave.\n-->\n<canvas #canvas role=\"img\" [attr.aria-label]=\"resolvedAriaLabel()\"></canvas>\n" }]
|
|
1115
1115
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }], iconUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconUrl", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], canvas: [{ type: i0.ViewChild, args: ['canvas', { isSignal: true }] }] } });
|
package/fesm2022/ngwr-radio.mjs
CHANGED
|
@@ -113,10 +113,10 @@ class WrRadio {
|
|
|
113
113
|
onBlur() {
|
|
114
114
|
this.group?.markTouched();
|
|
115
115
|
}
|
|
116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
117
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrRadio, isStandalone: true, selector: "wr-radio", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "attr.id": "null" } }, ngImport: i0, template: "<label class=\"wr-radio__label\" [for]=\"id()\">\n <input\n class=\"wr-radio__input\"\n type=\"radio\"\n [id]=\"id()\"\n [name]=\"name()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n (click)=\"onInputClick($event)\"\n (change)=\"onSelect()\"\n (blur)=\"onBlur()\"\n />\n\n <span class=\"wr-radio__dot\" aria-hidden=\"true\">\n @if (icon(); as iconName) {\n <wr-icon class=\"wr-radio__icon\" [name]=\"iconName\" />\n }\n </span>\n\n <span class=\"wr-radio__text\">\n <ng-content />\n </span>\n</label>\n", dependencies: [{ kind: "component", type: WrIcon, selector: "wr-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrRadio, decorators: [{
|
|
120
120
|
type: Component,
|
|
121
121
|
args: [{ selector: 'wr-radio', encapsulation: ViewEncapsulation.None, host: {
|
|
122
122
|
'[class]': 'classes()',
|
|
@@ -203,8 +203,8 @@ class WrRadioGroup {
|
|
|
203
203
|
markTouched() {
|
|
204
204
|
this.touch.emit();
|
|
205
205
|
}
|
|
206
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
207
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
206
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: WrRadioGroup, isStandalone: true, selector: "wr-radio-group", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touch: "touch" }, host: { attributes: { "role": "radiogroup" }, properties: { "attr.aria-readonly": "readonly() || null", "attr.aria-invalid": "fieldAria.ariaInvalid()", "attr.aria-describedby": "fieldAria.describedBy()" }, classAttribute: "wr-radio-group" }, providers: [
|
|
208
208
|
{
|
|
209
209
|
provide: WR_RADIO_GROUP,
|
|
210
210
|
// eslint-disable-next-line @angular-eslint/no-forward-ref
|
|
@@ -212,7 +212,7 @@ class WrRadioGroup {
|
|
|
212
212
|
},
|
|
213
213
|
], ngImport: i0, template: '<ng-content />', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
214
214
|
}
|
|
215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrRadioGroup, decorators: [{
|
|
216
216
|
type: Component,
|
|
217
217
|
args: [{
|
|
218
218
|
selector: 'wr-radio-group',
|
|
@@ -267,10 +267,19 @@ class WrRatingHarness extends ComponentHarness {
|
|
|
267
267
|
return (await (await this.row()).getAttribute('aria-disabled')) === 'true';
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
|
-
* Whether the rating is
|
|
270
|
+
* Whether the rating is a tab stop.
|
|
271
271
|
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
272
|
+
* `disabled` only, never `readonly` — and the distinction is deliberate, not
|
|
273
|
+
* incidental. A disabled control leaves the tab order; a READ-ONLY one stays
|
|
274
|
+
* in it, keeps announcing its value, and still submits, which is the whole
|
|
275
|
+
* difference between "you may not" and "there is nothing here". The component
|
|
276
|
+
* records that driving this off an `interactive()` that folded the two
|
|
277
|
+
* together made `readonly` unreachable, with an `aria-describedby` pointing
|
|
278
|
+
* at an element nobody could focus.
|
|
279
|
+
*
|
|
280
|
+
* This docblock used to describe exactly that fixed bug — "false while
|
|
281
|
+
* readonly or disabled" — so a reader trusting it would have asserted the
|
|
282
|
+
* behaviour the component was changed to stop having.
|
|
274
283
|
*/
|
|
275
284
|
async isFocusable() {
|
|
276
285
|
const tabIndex = await (await this.row()).getAttribute('tabindex');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-rating-testing.mjs","sources":["../../../projects/lib/rating/testing/wr-rating-item-harness.ts","../../../projects/lib/rating/testing/wr-rating-harness.ts","../../../projects/lib/rating/testing/ngwr-rating-testing.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 { WrRatingItemHarnessFilters } from './interfaces';\n\n/** The star's own box, once it is known to have one. */\ninterface WrRatingItemBox {\n readonly left: number;\n readonly top: number;\n readonly width: number;\n readonly height: number;\n}\n\n/**\n * Test harness for one star of a `<wr-rating>`.\n *\n * A star is invisible to a screen reader — the row above it is the `slider` and\n * owns the whole accessible story — but it carries the state the eye reads: how\n * far it is filled, whether it is still a click target, and, while the pointer is\n * over the row, the PREVIEW rather than the committed value. That is the reason\n * this exists as a harness of its own.\n *\n * The fill is read from `--wr-rating-fill`, the per-star custom property the\n * component sets and the stylesheet clips the filled glyph with — a public token,\n * and the only place a half star exists in the DOM.\n *\n * @example\n * ```ts\n * const rating = await loader.getHarness(WrRatingHarness.with({ label: 'Overall' }));\n * const [, , third] = await rating.getItems();\n *\n * expect(await third.isPartiallyFilled()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrRatingItemHarness extends ComponentHarness {\n static hostSelector = '.wr-rating__slot';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrRatingItemHarnessFilters = {}): HarnessPredicate<WrRatingItemHarness> {\n return new HarnessPredicate(WrRatingItemHarness, options)\n .addOption('fill', options.fill, async (harness, fill) => (await harness.getFill()) === fill)\n .addOption(\n 'interactive',\n options.interactive,\n async (harness, interactive) => (await harness.isInteractive()) === interactive\n );\n }\n\n /**\n * How much of this star is painted, `0` to `1`.\n *\n * While the pointer is over the rating this is the PREVIEW — the component\n * paints `hoverValue ?? value`, so a hovered star reads full before anything is\n * committed. `WrRatingHarness.getValue()` is the committed one.\n */\n async getFill(): Promise<number> {\n const raw = (await (await this.host()).getCssValue('--wr-rating-fill')).trim();\n const fill = Number.parseFloat(raw);\n if (Number.isNaN(fill)) {\n throw new Error(\n `WrRatingItemHarness: could not read this star's fill — \\`--wr-rating-fill\\` computed to \"${raw}\". ` +\n 'The rating sets it per star; an environment that drops custom properties cannot answer this.'\n );\n }\n return fill;\n }\n\n /** Whether the star is painted whole. */\n async isFilled(): Promise<boolean> {\n return (await this.getFill()) >= 1;\n }\n\n /**\n * Whether the star is painted part-way — a half star.\n *\n * Any fractional value paints one, not only `step=\"0.5\"`: the step governs the\n * keyboard and the pointer, but a fraction written straight into `value` is only\n * clamped to `[0, count]`, never snapped — so `[value]=\"3.5\"` half-fills star four\n * on a whole-star rating.\n */\n async isPartiallyFilled(): Promise<boolean> {\n const fill = await this.getFill();\n return fill > 0 && fill < 1;\n }\n\n /** Whether the star still takes the pointer — a readonly or disabled rating drops the modifier. */\n async isInteractive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-rating__slot--interactive');\n }\n\n /**\n * Click this star, picking it whole — star three sets the value to `3`.\n *\n * Clicking the value the rating ALREADY holds clears it instead; that is the\n * component's toggle-off, not an accident of this harness.\n *\n * Needs real layout: the component snaps the value from where the pointer sits\n * inside the star, so this aims at the star's inline-END edge. In jsdom every\n * element is 0×0 and a pointer position over one cannot mean anything — this\n * throws rather than committing the `NaN` such a click computes. Reach for\n * `WrRatingHarness.setValue()` there, which drives the keyboard.\n */\n async click(): Promise<void> {\n const { width, height } = await this.box();\n await (await this.host()).click(await this.inlineEndX(width), height / 2);\n }\n\n /**\n * Click the leading half of this star — `2.5` on star three.\n *\n * On a whole-star rating this is the same as {@link click}: the component snaps\n * UP to its `step`, so half of star three is still three stars. Carries the same\n * layout requirement.\n */\n async clickHalf(): Promise<void> {\n const { width, height } = await this.box();\n await (await this.host()).click(width / 2, height / 2);\n }\n\n /**\n * Move the pointer onto this star, previewing it whole.\n *\n * Sends `mousemove` rather than the `TestElement.hover()` pair: the rating\n * tracks the pointer's x across a star to decide whether it is over the half or\n * the whole, so `mouseenter` alone tells it nothing and leaves the preview\n * unchanged. `WrRatingHarness.unhover()` ends it. Carries the same layout\n * requirement as {@link click}.\n */\n async hover(): Promise<void> {\n const { left, top, width, height } = await this.box();\n const clientX = left + (await this.inlineEndX(width));\n await (await this.host()).dispatchEvent('mousemove', { clientX, clientY: top + height / 2 });\n }\n\n /**\n * The x, relative to the star's own box, that lands on its inline-END edge —\n * the far side of the star, where the rating reads a whole one.\n *\n * The component measures the pointer from the star's inline-START edge, which\n * is the right one once `dir=\"rtl\"` mirrors the row; aiming at the physical\n * right edge there reads ratio 0 and picks one star FEWER. So the side is asked\n * for rather than assumed: `direction` is a computed style, which the harness\n * can read in every environment — jsdom included, where it inherits from an\n * ancestor `dir` attribute like any other browser.\n */\n private async inlineEndX(width: number): Promise<number> {\n const direction = await (await this.host()).getCssValue('direction');\n return direction === 'rtl' ? 0 : width;\n }\n\n /** The star's box, or a failure that names the reason it has none. */\n private async box(): Promise<WrRatingItemBox> {\n const { left, top, width, height } = await (await this.host()).getDimensions();\n if (!width) {\n throw new Error(\n 'WrRatingItemHarness: this star has no layout, so a pointer position over it means nothing — the ' +\n 'rating reads the value off where the pointer sits INSIDE the star. Every element is 0×0 in jsdom: ' +\n 'use `WrRatingHarness.setValue()`, which drives the keyboard, or stub `getBoundingClientRect`.'\n );\n }\n return { left, top, width, height };\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 } from '@angular/cdk/testing';\n\nimport type { WrRatingSize } from 'ngwr/rating';\n\nimport type { WrRatingHarnessFilters, WrRatingItemHarnessFilters } from './interfaces';\nimport { WrRatingItemHarness } from './wr-rating-item-harness';\n\n/**\n * Test harness for `<wr-rating>` — the root of a two-class family, since a star\n * carries state of its own: {@link WrRatingItemHarness}.\n *\n * The stars are decoration. Everything a screen reader is told lives on the\n * `.wr-rating__row` inside them, which is the `slider`: `aria-valuenow` is the\n * committed value, `aria-valuemax` the top of the range, and the row — not the\n * host — is the tab stop. So this harness reads the row and, for writes, drives\n * its KEYBOARD: arrows step by the rating's own `step`, `Home` / `End` jump to\n * the ends, `Delete` clears. That is the accessible path, and it is the only one a\n * unit test can take unaided, because the pointer path snaps the value from where\n * the cursor sits inside a star — which needs layout jsdom does not have, so a\n * spec that wants it has to stub the star's box (see\n * {@link WrRatingItemHarness.click}).\n *\n * @example\n * ```ts\n * const rating = await loader.getHarness(WrRatingHarness.with({ label: 'Overall' }));\n *\n * await rating.setValue(4);\n * expect(await rating.getValue()).toBe(4);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrRatingHarness extends ComponentHarness {\n static hostSelector = 'wr-rating';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrRatingHarnessFilters = {}): HarnessPredicate<WrRatingHarness> {\n return new HarnessPredicate(WrRatingHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('value', options.value, async (harness, value) => (await harness.getValue()) === value)\n .addOption('readonly', options.readonly, async (harness, readonly) => (await harness.isReadonly()) === readonly)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly row = this.locatorFor('.wr-rating__row');\n\n /**\n * What the control announces itself as — `slider`.\n *\n * Not a `radiogroup`: the value is a number on a continuum with a `step`, the\n * arrows move it and `Home` / `End` bound it, and that is a slider's contract\n * rather than a group of one-of-N choices.\n */\n async getRole(): Promise<string | null> {\n return (await this.row()).getAttribute('role');\n }\n\n /**\n * The rating's accessible name, from `ariaLabel` or the i18n catalogue.\n *\n * A rating projects no text, so this is the only name it has — and it sits on\n * the row, not on the host, because the row is what carries the role.\n */\n async getLabel(): Promise<string | null> {\n return (await this.row()).getAttribute('aria-label');\n }\n\n /**\n * The committed value, from `aria-valuenow` — what a screen reader is told, not\n * what is painted, which during a hover is the preview instead.\n *\n * A CLEARED rating is announced as `0`, exactly like a rating of zero stars:\n * `value` is `number | null` and ARIA has no null. So `0` here means \"zero or\n * nothing\" — assert the bound model when the difference matters, and see\n * {@link clear}.\n */\n async getValue(): Promise<number> {\n const raw = await (await this.row()).getAttribute('aria-valuenow');\n const value = Number.parseFloat(raw ?? '');\n if (Number.isNaN(value)) {\n throw new Error(`WrRatingHarness: the slider announces aria-valuenow=\"${raw}\", which is not a number.`);\n }\n return value;\n }\n\n /** The top of the range, from `aria-valuemax` — the `count` of stars. */\n async getMax(): Promise<number> {\n const raw = await (await this.row()).getAttribute('aria-valuemax');\n return Number.parseFloat(raw ?? '');\n }\n\n /** How many stars are painted. Should always agree with {@link getMax}. */\n async getCount(): Promise<number> {\n return (await this.getItems()).length;\n }\n\n /** The stars, left to right. */\n async getItems(filters: WrRatingItemHarnessFilters = {}): Promise<WrRatingItemHarness[]> {\n return this.locatorForAll(WrRatingItemHarness.with(filters))();\n }\n\n /**\n * Each star's fill ratio, left to right — `[1, 1, 0.5, 0, 0]` for two and a\n * half stars out of five.\n *\n * This is what the eye sees, so it follows the hover preview while there is one;\n * {@link getValue} stays on the committed value throughout.\n */\n async getFills(): Promise<number[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getFill()));\n }\n\n /** The control size. `'md'` is the default and paints no modifier of its own. */\n async getSize(): Promise<WrRatingSize> {\n const host = await this.host();\n if (await host.hasClass('wr-rating--sm')) return 'sm';\n if (await host.hasClass('wr-rating--lg')) return 'lg';\n return 'md';\n }\n\n /**\n * Whether the rating displays a value it will not let you change.\n *\n * Read from `aria-readonly` rather than from the `wr-rating--readonly` class:\n * both are public, but the attribute is the one a screen reader acts on, and a\n * rating that looks read-only without saying so is the bug worth catching.\n */\n async isReadonly(): Promise<boolean> {\n return (await (await this.row()).getAttribute('aria-readonly')) === 'true';\n }\n\n /** Whether the rating refuses interaction — `aria-disabled`, for the same reason. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.row()).getAttribute('aria-disabled')) === 'true';\n }\n\n /**\n * Whether the rating is in the tab order.\n *\n * A rating that takes no input takes itself out of it (`tabindex=\"-1\"`), so this\n * is `false` while readonly or disabled.\n */\n async isFocusable(): Promise<boolean> {\n const tabIndex = await (await this.row()).getAttribute('tabindex');\n return Number.parseInt(tabIndex ?? '-1', 10) >= 0;\n }\n\n /**\n * Set the rating, from the keyboard.\n *\n * `Home` first, then one `ArrowUp` per step — the step is not in the DOM, so\n * the only honest way to reach a value is to walk to it and watch where the\n * rating lands. (The top of the range takes `End` instead of walking there.) A\n * host counting value changes therefore sees the intermediate ones, which is what\n * a keyboard user produces too.\n *\n * The BLOCK-axis arrow, deliberately: the stars lie on the inline axis, so\n * `ArrowRight` raises the value in LTR and lowers it under `dir=\"rtl\"`, where\n * the arrows follow visual order. `ArrowUp` means \"more\" in both, so a spec\n * written against this harness reads the same either way.\n *\n * Throws rather than settling for a near miss: on a value outside `[0, max]`, on\n * one the step cannot land on (`2.5` on a whole-star rating), and on a rating\n * that took no input at all because it is readonly or disabled.\n *\n * `setValue(0)` commits ZERO. It is {@link clear} that returns the model to\n * `null`, and the two are indistinguishable from the DOM.\n */\n async setValue(value: number): Promise<void> {\n const max = await this.getMax();\n if (!Number.isFinite(value) || value < 0 || value > max) {\n throw new Error(`WrRatingHarness: ${value} is outside this rating's range of [0, ${max}].`);\n }\n\n const row = await this.row();\n await row.sendKeys(TestKey.HOME);\n\n if (value === max) {\n await row.sendKeys(TestKey.END);\n } else {\n let current = await this.getValue();\n while (current < value) {\n await row.sendKeys(TestKey.UP_ARROW);\n const next = await this.getValue();\n // Standing still means the rating is not listening; the check below says why.\n if (next === current) break;\n if (next > value) {\n throw new Error(\n `WrRatingHarness: this rating cannot land on ${value} — one step took it from ${current} to ` +\n `${next}, so ${value} is not a multiple of its \\`step\\`.`\n );\n }\n current = next;\n }\n }\n\n const landed = await this.getValue();\n if (landed !== value) {\n throw new Error(\n `WrRatingHarness: asked for ${value}, but the rating reads ${landed} — a readonly or disabled ` +\n 'rating takes no input.'\n );\n }\n }\n\n /**\n * Clear the rating, the way `Delete` does — the bound value becomes `null`, not\n * `0`.\n *\n * The slider then announces `aria-valuenow=\"0\"` and every star empties, so\n * {@link getValue} cannot tell you this happened. Assert the model.\n */\n async clear(): Promise<void> {\n await (await this.row()).sendKeys(TestKey.DELETE);\n }\n\n /**\n * Bump the rating up by one step — one `ArrowUp`, the arrow that means \"more\"\n * in both reading directions (see {@link setValue}).\n *\n * The step is the rating's, not this harness's, so this is also how a spec finds\n * out what it is: clear the rating, step up once, read the value.\n * Already at the top, this does nothing; the value clamps rather than wrapping.\n */\n async stepUp(): Promise<void> {\n await (await this.row()).sendKeys(TestKey.UP_ARROW);\n }\n\n /** Bump the rating down by one step — one `ArrowDown`. Clamps at `0`. */\n async stepDown(): Promise<void> {\n await (await this.row()).sendKeys(TestKey.DOWN_ARROW);\n }\n\n /**\n * End a hover preview, dropping the stars back to the committed value.\n *\n * It lives here rather than on the star because the component listens for\n * `mouseleave` on the ROW: leaving one star for the next is not leaving the\n * rating.\n */\n async unhover(): Promise<void> {\n await (await this.row()).mouseAway();\n }\n\n /** Move keyboard focus to the rating — onto the row, which is the tab stop. */\n async focus(): Promise<void> {\n return (await this.row()).focus();\n }\n\n /** Blur the rating. This is what emits `touch`, so a bound field marks itself touched. */\n async blur(): Promise<void> {\n return (await this.row()).blur();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.row()).isFocused();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAcH;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG,MAAO,mBAAoB,SAAQ,gBAAgB,CAAA;AACvD,IAAA,OAAO,YAAY,GAAG,kBAAkB;;AAGxC,IAAA,OAAO,IAAI,CAAC,OAAA,GAAsC,EAAE,EAAA;AAClD,QAAA,OAAO,IAAI,gBAAgB,CAAC,mBAAmB,EAAE,OAAO;aACrD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,OAAO,EAAE,IAAI,KAAK,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI;aAC3F,SAAS,CACR,aAAa,EACb,OAAO,CAAC,WAAW,EACnB,OAAO,OAAO,EAAE,WAAW,KAAK,CAAC,MAAM,OAAO,CAAC,aAAa,EAAE,MAAM,WAAW,CAChF;IACL;AAEA;;;;;;AAMG;AACH,IAAA,MAAM,OAAO,GAAA;QACX,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,kBAAkB,CAAC,EA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I,EAAE;IAClC;AAEA,IAAA,MAAM,SAAS,GAAA;QACb,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE;IACvC;;;ACxQF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngwr-rating-testing.mjs","sources":["../../../projects/lib/rating/testing/wr-rating-item-harness.ts","../../../projects/lib/rating/testing/wr-rating-harness.ts","../../../projects/lib/rating/testing/ngwr-rating-testing.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 { WrRatingItemHarnessFilters } from './interfaces';\n\n/** The star's own box, once it is known to have one. */\ninterface WrRatingItemBox {\n readonly left: number;\n readonly top: number;\n readonly width: number;\n readonly height: number;\n}\n\n/**\n * Test harness for one star of a `<wr-rating>`.\n *\n * A star is invisible to a screen reader — the row above it is the `slider` and\n * owns the whole accessible story — but it carries the state the eye reads: how\n * far it is filled, whether it is still a click target, and, while the pointer is\n * over the row, the PREVIEW rather than the committed value. That is the reason\n * this exists as a harness of its own.\n *\n * The fill is read from `--wr-rating-fill`, the per-star custom property the\n * component sets and the stylesheet clips the filled glyph with — a public token,\n * and the only place a half star exists in the DOM.\n *\n * @example\n * ```ts\n * const rating = await loader.getHarness(WrRatingHarness.with({ label: 'Overall' }));\n * const [, , third] = await rating.getItems();\n *\n * expect(await third.isPartiallyFilled()).toBe(true);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrRatingItemHarness extends ComponentHarness {\n static hostSelector = '.wr-rating__slot';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrRatingItemHarnessFilters = {}): HarnessPredicate<WrRatingItemHarness> {\n return new HarnessPredicate(WrRatingItemHarness, options)\n .addOption('fill', options.fill, async (harness, fill) => (await harness.getFill()) === fill)\n .addOption(\n 'interactive',\n options.interactive,\n async (harness, interactive) => (await harness.isInteractive()) === interactive\n );\n }\n\n /**\n * How much of this star is painted, `0` to `1`.\n *\n * While the pointer is over the rating this is the PREVIEW — the component\n * paints `hoverValue ?? value`, so a hovered star reads full before anything is\n * committed. `WrRatingHarness.getValue()` is the committed one.\n */\n async getFill(): Promise<number> {\n const raw = (await (await this.host()).getCssValue('--wr-rating-fill')).trim();\n const fill = Number.parseFloat(raw);\n if (Number.isNaN(fill)) {\n throw new Error(\n `WrRatingItemHarness: could not read this star's fill — \\`--wr-rating-fill\\` computed to \"${raw}\". ` +\n 'The rating sets it per star; an environment that drops custom properties cannot answer this.'\n );\n }\n return fill;\n }\n\n /** Whether the star is painted whole. */\n async isFilled(): Promise<boolean> {\n return (await this.getFill()) >= 1;\n }\n\n /**\n * Whether the star is painted part-way — a half star.\n *\n * Any fractional value paints one, not only `step=\"0.5\"`: the step governs the\n * keyboard and the pointer, but a fraction written straight into `value` is only\n * clamped to `[0, count]`, never snapped — so `[value]=\"3.5\"` half-fills star four\n * on a whole-star rating.\n */\n async isPartiallyFilled(): Promise<boolean> {\n const fill = await this.getFill();\n return fill > 0 && fill < 1;\n }\n\n /** Whether the star still takes the pointer — a readonly or disabled rating drops the modifier. */\n async isInteractive(): Promise<boolean> {\n return (await this.host()).hasClass('wr-rating__slot--interactive');\n }\n\n /**\n * Click this star, picking it whole — star three sets the value to `3`.\n *\n * Clicking the value the rating ALREADY holds clears it instead; that is the\n * component's toggle-off, not an accident of this harness.\n *\n * Needs real layout: the component snaps the value from where the pointer sits\n * inside the star, so this aims at the star's inline-END edge. In jsdom every\n * element is 0×0 and a pointer position over one cannot mean anything — this\n * throws rather than committing the `NaN` such a click computes. Reach for\n * `WrRatingHarness.setValue()` there, which drives the keyboard.\n */\n async click(): Promise<void> {\n const { width, height } = await this.box();\n await (await this.host()).click(await this.inlineEndX(width), height / 2);\n }\n\n /**\n * Click the leading half of this star — `2.5` on star three.\n *\n * On a whole-star rating this is the same as {@link click}: the component snaps\n * UP to its `step`, so half of star three is still three stars. Carries the same\n * layout requirement.\n */\n async clickHalf(): Promise<void> {\n const { width, height } = await this.box();\n await (await this.host()).click(width / 2, height / 2);\n }\n\n /**\n * Move the pointer onto this star, previewing it whole.\n *\n * Sends `mousemove` rather than the `TestElement.hover()` pair: the rating\n * tracks the pointer's x across a star to decide whether it is over the half or\n * the whole, so `mouseenter` alone tells it nothing and leaves the preview\n * unchanged. `WrRatingHarness.unhover()` ends it. Carries the same layout\n * requirement as {@link click}.\n */\n async hover(): Promise<void> {\n const { left, top, width, height } = await this.box();\n const clientX = left + (await this.inlineEndX(width));\n await (await this.host()).dispatchEvent('mousemove', { clientX, clientY: top + height / 2 });\n }\n\n /**\n * The x, relative to the star's own box, that lands on its inline-END edge —\n * the far side of the star, where the rating reads a whole one.\n *\n * The component measures the pointer from the star's inline-START edge, which\n * is the right one once `dir=\"rtl\"` mirrors the row; aiming at the physical\n * right edge there reads ratio 0 and picks one star FEWER. So the side is asked\n * for rather than assumed: `direction` is a computed style, which the harness\n * can read in every environment — jsdom included, where it inherits from an\n * ancestor `dir` attribute like any other browser.\n */\n private async inlineEndX(width: number): Promise<number> {\n const direction = await (await this.host()).getCssValue('direction');\n return direction === 'rtl' ? 0 : width;\n }\n\n /** The star's box, or a failure that names the reason it has none. */\n private async box(): Promise<WrRatingItemBox> {\n const { left, top, width, height } = await (await this.host()).getDimensions();\n if (!width) {\n throw new Error(\n 'WrRatingItemHarness: this star has no layout, so a pointer position over it means nothing — the ' +\n 'rating reads the value off where the pointer sits INSIDE the star. Every element is 0×0 in jsdom: ' +\n 'use `WrRatingHarness.setValue()`, which drives the keyboard, or stub `getBoundingClientRect`.'\n );\n }\n return { left, top, width, height };\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 } from '@angular/cdk/testing';\n\nimport type { WrRatingSize } from 'ngwr/rating';\n\nimport type { WrRatingHarnessFilters, WrRatingItemHarnessFilters } from './interfaces';\nimport { WrRatingItemHarness } from './wr-rating-item-harness';\n\n/**\n * Test harness for `<wr-rating>` — the root of a two-class family, since a star\n * carries state of its own: {@link WrRatingItemHarness}.\n *\n * The stars are decoration. Everything a screen reader is told lives on the\n * `.wr-rating__row` inside them, which is the `slider`: `aria-valuenow` is the\n * committed value, `aria-valuemax` the top of the range, and the row — not the\n * host — is the tab stop. So this harness reads the row and, for writes, drives\n * its KEYBOARD: arrows step by the rating's own `step`, `Home` / `End` jump to\n * the ends, `Delete` clears. That is the accessible path, and it is the only one a\n * unit test can take unaided, because the pointer path snaps the value from where\n * the cursor sits inside a star — which needs layout jsdom does not have, so a\n * spec that wants it has to stub the star's box (see\n * {@link WrRatingItemHarness.click}).\n *\n * @example\n * ```ts\n * const rating = await loader.getHarness(WrRatingHarness.with({ label: 'Overall' }));\n *\n * await rating.setValue(4);\n * expect(await rating.getValue()).toBe(4);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrRatingHarness extends ComponentHarness {\n static hostSelector = 'wr-rating';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrRatingHarnessFilters = {}): HarnessPredicate<WrRatingHarness> {\n return new HarnessPredicate(WrRatingHarness, options)\n .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('value', options.value, async (harness, value) => (await harness.getValue()) === value)\n .addOption('readonly', options.readonly, async (harness, readonly) => (await harness.isReadonly()) === readonly)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n private readonly row = this.locatorFor('.wr-rating__row');\n\n /**\n * What the control announces itself as — `slider`.\n *\n * Not a `radiogroup`: the value is a number on a continuum with a `step`, the\n * arrows move it and `Home` / `End` bound it, and that is a slider's contract\n * rather than a group of one-of-N choices.\n */\n async getRole(): Promise<string | null> {\n return (await this.row()).getAttribute('role');\n }\n\n /**\n * The rating's accessible name, from `ariaLabel` or the i18n catalogue.\n *\n * A rating projects no text, so this is the only name it has — and it sits on\n * the row, not on the host, because the row is what carries the role.\n */\n async getLabel(): Promise<string | null> {\n return (await this.row()).getAttribute('aria-label');\n }\n\n /**\n * The committed value, from `aria-valuenow` — what a screen reader is told, not\n * what is painted, which during a hover is the preview instead.\n *\n * A CLEARED rating is announced as `0`, exactly like a rating of zero stars:\n * `value` is `number | null` and ARIA has no null. So `0` here means \"zero or\n * nothing\" — assert the bound model when the difference matters, and see\n * {@link clear}.\n */\n async getValue(): Promise<number> {\n const raw = await (await this.row()).getAttribute('aria-valuenow');\n const value = Number.parseFloat(raw ?? '');\n if (Number.isNaN(value)) {\n throw new Error(`WrRatingHarness: the slider announces aria-valuenow=\"${raw}\", which is not a number.`);\n }\n return value;\n }\n\n /** The top of the range, from `aria-valuemax` — the `count` of stars. */\n async getMax(): Promise<number> {\n const raw = await (await this.row()).getAttribute('aria-valuemax');\n return Number.parseFloat(raw ?? '');\n }\n\n /** How many stars are painted. Should always agree with {@link getMax}. */\n async getCount(): Promise<number> {\n return (await this.getItems()).length;\n }\n\n /** The stars, left to right. */\n async getItems(filters: WrRatingItemHarnessFilters = {}): Promise<WrRatingItemHarness[]> {\n return this.locatorForAll(WrRatingItemHarness.with(filters))();\n }\n\n /**\n * Each star's fill ratio, left to right — `[1, 1, 0.5, 0, 0]` for two and a\n * half stars out of five.\n *\n * This is what the eye sees, so it follows the hover preview while there is one;\n * {@link getValue} stays on the committed value throughout.\n */\n async getFills(): Promise<number[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getFill()));\n }\n\n /** The control size. `'md'` is the default and paints no modifier of its own. */\n async getSize(): Promise<WrRatingSize> {\n const host = await this.host();\n if (await host.hasClass('wr-rating--sm')) return 'sm';\n if (await host.hasClass('wr-rating--lg')) return 'lg';\n return 'md';\n }\n\n /**\n * Whether the rating displays a value it will not let you change.\n *\n * Read from `aria-readonly` rather than from the `wr-rating--readonly` class:\n * both are public, but the attribute is the one a screen reader acts on, and a\n * rating that looks read-only without saying so is the bug worth catching.\n */\n async isReadonly(): Promise<boolean> {\n return (await (await this.row()).getAttribute('aria-readonly')) === 'true';\n }\n\n /** Whether the rating refuses interaction — `aria-disabled`, for the same reason. */\n async isDisabled(): Promise<boolean> {\n return (await (await this.row()).getAttribute('aria-disabled')) === 'true';\n }\n\n /**\n * Whether the rating is a tab stop.\n *\n * `disabled` only, never `readonly` — and the distinction is deliberate, not\n * incidental. A disabled control leaves the tab order; a READ-ONLY one stays\n * in it, keeps announcing its value, and still submits, which is the whole\n * difference between \"you may not\" and \"there is nothing here\". The component\n * records that driving this off an `interactive()` that folded the two\n * together made `readonly` unreachable, with an `aria-describedby` pointing\n * at an element nobody could focus.\n *\n * This docblock used to describe exactly that fixed bug — \"false while\n * readonly or disabled\" — so a reader trusting it would have asserted the\n * behaviour the component was changed to stop having.\n */\n async isFocusable(): Promise<boolean> {\n const tabIndex = await (await this.row()).getAttribute('tabindex');\n return Number.parseInt(tabIndex ?? '-1', 10) >= 0;\n }\n\n /**\n * Set the rating, from the keyboard.\n *\n * `Home` first, then one `ArrowUp` per step — the step is not in the DOM, so\n * the only honest way to reach a value is to walk to it and watch where the\n * rating lands. (The top of the range takes `End` instead of walking there.) A\n * host counting value changes therefore sees the intermediate ones, which is what\n * a keyboard user produces too.\n *\n * The BLOCK-axis arrow, deliberately: the stars lie on the inline axis, so\n * `ArrowRight` raises the value in LTR and lowers it under `dir=\"rtl\"`, where\n * the arrows follow visual order. `ArrowUp` means \"more\" in both, so a spec\n * written against this harness reads the same either way.\n *\n * Throws rather than settling for a near miss: on a value outside `[0, max]`, on\n * one the step cannot land on (`2.5` on a whole-star rating), and on a rating\n * that took no input at all because it is readonly or disabled.\n *\n * `setValue(0)` commits ZERO. It is {@link clear} that returns the model to\n * `null`, and the two are indistinguishable from the DOM.\n */\n async setValue(value: number): Promise<void> {\n const max = await this.getMax();\n if (!Number.isFinite(value) || value < 0 || value > max) {\n throw new Error(`WrRatingHarness: ${value} is outside this rating's range of [0, ${max}].`);\n }\n\n const row = await this.row();\n await row.sendKeys(TestKey.HOME);\n\n if (value === max) {\n await row.sendKeys(TestKey.END);\n } else {\n let current = await this.getValue();\n while (current < value) {\n await row.sendKeys(TestKey.UP_ARROW);\n const next = await this.getValue();\n // Standing still means the rating is not listening; the check below says why.\n if (next === current) break;\n if (next > value) {\n throw new Error(\n `WrRatingHarness: this rating cannot land on ${value} — one step took it from ${current} to ` +\n `${next}, so ${value} is not a multiple of its \\`step\\`.`\n );\n }\n current = next;\n }\n }\n\n const landed = await this.getValue();\n if (landed !== value) {\n throw new Error(\n `WrRatingHarness: asked for ${value}, but the rating reads ${landed} — a readonly or disabled ` +\n 'rating takes no input.'\n );\n }\n }\n\n /**\n * Clear the rating, the way `Delete` does — the bound value becomes `null`, not\n * `0`.\n *\n * The slider then announces `aria-valuenow=\"0\"` and every star empties, so\n * {@link getValue} cannot tell you this happened. Assert the model.\n */\n async clear(): Promise<void> {\n await (await this.row()).sendKeys(TestKey.DELETE);\n }\n\n /**\n * Bump the rating up by one step — one `ArrowUp`, the arrow that means \"more\"\n * in both reading directions (see {@link setValue}).\n *\n * The step is the rating's, not this harness's, so this is also how a spec finds\n * out what it is: clear the rating, step up once, read the value.\n * Already at the top, this does nothing; the value clamps rather than wrapping.\n */\n async stepUp(): Promise<void> {\n await (await this.row()).sendKeys(TestKey.UP_ARROW);\n }\n\n /** Bump the rating down by one step — one `ArrowDown`. Clamps at `0`. */\n async stepDown(): Promise<void> {\n await (await this.row()).sendKeys(TestKey.DOWN_ARROW);\n }\n\n /**\n * End a hover preview, dropping the stars back to the committed value.\n *\n * It lives here rather than on the star because the component listens for\n * `mouseleave` on the ROW: leaving one star for the next is not leaving the\n * rating.\n */\n async unhover(): Promise<void> {\n await (await this.row()).mouseAway();\n }\n\n /** Move keyboard focus to the rating — onto the row, which is the tab stop. */\n async focus(): Promise<void> {\n return (await this.row()).focus();\n }\n\n /** Blur the rating. This is what emits `touch`, so a bound field marks itself touched. */\n async blur(): Promise<void> {\n return (await this.row()).blur();\n }\n\n async isFocused(): Promise<boolean> {\n return (await this.row()).isFocused();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;AAcH;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACG,MAAO,mBAAoB,SAAQ,gBAAgB,CAAA;AACvD,IAAA,OAAO,YAAY,GAAG,kBAAkB;;AAGxC,IAAA,OAAO,IAAI,CAAC,OAAA,GAAsC,EAAE,EAAA;AAClD,QAAA,OAAO,IAAI,gBAAgB,CAAC,mBAAmB,EAAE,OAAO;aACrD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,OAAO,EAAE,IAAI,KAAK,CAAC,MAAM,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI;aAC3F,SAAS,CACR,aAAa,EACb,OAAO,CAAC,WAAW,EACnB,OAAO,OAAO,EAAE,WAAW,KAAK,CAAC,MAAM,OAAO,CAAC,aAAa,EAAE,MAAM,WAAW,CAChF;IACL;AAEA;;;;;;AAMG;AACH,IAAA,MAAM,OAAO,GAAA;QACX,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,kBAAkB,CAAC,EAAE,IAAI,EAAE;QAC9E,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC;AACnC,QAAA,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;AACtB,YAAA,MAAM,IAAI,KAAK,CACb,CAAA,yFAAA,EAA4F,GAAG,CAAA,GAAA,CAAK;AAClG,gBAAA,8FAA8F,CACjG;QACH;AACA,QAAA,OAAO,IAAI;IACb;;AAGA,IAAA,MAAM,QAAQ,GAAA;QACZ,OAAO,CAAC,MA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A,IAAI,MAAM,KAAK,KAAK,EAAE;AACpB,YAAA,MAAM,IAAI,KAAK,CACb,8BAA8B,KAAK,CAAA,uBAAA,EAA0B,MAAM,CAAA,0BAAA,CAA4B;AAC7F,gBAAA,wBAAwB,CAC3B;QACH;IACF;AAEA;;;;;;AAMG;AACH,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACnD;AAEA;;;;;;;AAOG;AACH,IAAA,MAAM,MAAM,GAAA;AACV,QAAA,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC;IACrD;;AAGA,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC;IACvD;AAEA;;;;;;AAMG;AACH,IAAA,MAAM,OAAO,GAAA;QACX,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE;IACtC;;AAGA,IAAA,MAAM,KAAK,GAAA;QACT,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE;IACnC;;AAGA,IAAA,MAAM,IAAI,GAAA;QACR,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE;IAClC;AAEA,IAAA,MAAM,SAAS,GAAA;QACb,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE;IACvC;;;ACjRF;;AAEG;;;;"}
|
package/fesm2022/ngwr-rating.mjs
CHANGED
|
@@ -90,6 +90,21 @@ class WrRating {
|
|
|
90
90
|
directionality = inject(Directionality, { optional: true });
|
|
91
91
|
/** The surrounding `<wr-form-field>`'s error state. @internal */
|
|
92
92
|
fieldAria = useFormFieldAria();
|
|
93
|
+
/**
|
|
94
|
+
* The field's label wins over the built-in default, and an explicit
|
|
95
|
+
* `ariaLabel` wins over both.
|
|
96
|
+
*
|
|
97
|
+
* `<wr-form-field label="…">` renders a `<label for>` that cannot reach this
|
|
98
|
+
* control — `for` binds only to a LABELABLE element and the focusable part
|
|
99
|
+
* here carries a role instead — so the field's label named nothing and this
|
|
100
|
+
* announced its own generic default. A consumer who wrote
|
|
101
|
+
* `<wr-form-field label="Overall satisfaction">` heard "Rating".
|
|
102
|
+
*/
|
|
103
|
+
labelledBy = computed(() => (this.ariaLabel() ? null : this.fieldAria.labelledBy()), /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
105
|
+
/** `null` once `aria-labelledby` is carrying the name, or the two are announced together. */
|
|
106
|
+
nameLabel = computed(() => (this.labelledBy() ? null : this.resolvedAriaLabel()), /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "nameLabel" }] : /* istanbul ignore next */ []));
|
|
93
108
|
classes = computed(() => {
|
|
94
109
|
const parts = ['wr-rating'];
|
|
95
110
|
const size = this.size();
|
|
@@ -218,12 +233,12 @@ class WrRating {
|
|
|
218
233
|
this.value.set(value);
|
|
219
234
|
this.hoverValue.set(null);
|
|
220
235
|
}
|
|
221
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
222
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
236
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrRating, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
237
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: WrRating, isStandalone: true, selector: "wr-rating", inputs: { count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", touch: "touch" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"announcedValue()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n [attr.tabindex]=\"focusable() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n (blur)=\"onBlur()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n", encapsulation: i0.ViewEncapsulation.None });
|
|
223
238
|
}
|
|
224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: WrRating, decorators: [{
|
|
225
240
|
type: Component,
|
|
226
|
-
args: [{ selector: 'wr-rating', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"
|
|
241
|
+
args: [{ selector: 'wr-rating', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, template: "<div\n class=\"wr-rating__row\"\n role=\"slider\"\n [attr.aria-label]=\"nameLabel()\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"count()\"\n [attr.aria-valuenow]=\"announcedValue()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"disabled() || null\"\n [attr.aria-invalid]=\"fieldAria.ariaInvalid()\"\n [attr.aria-describedby]=\"fieldAria.describedBy()\"\n [attr.tabindex]=\"focusable() ? 0 : -1\"\n (keydown)=\"onKeydown($event)\"\n (mouseleave)=\"onLeave()\"\n (blur)=\"onBlur()\"\n>\n @for (slot of slots(); track $index) {\n <!-- The parent row owns keyboard focus + handlers; slots are pointer-only\n click targets, so the a11y rules below are intentionally suppressed. -->\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events,@angular-eslint/template/interactive-supports-focus -->\n <span\n class=\"wr-rating__slot\"\n [class.wr-rating__slot--interactive]=\"interactive()\"\n [style.--wr-rating-fill]=\"fillFor($index)\"\n (mousemove)=\"onSlotMove($event, $index)\"\n (click)=\"onSlotClick($event, $index)\"\n >\n <!-- Outline (always visible) -->\n <svg class=\"wr-rating__icon wr-rating__icon--bg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n <!-- Filled overlay, clipped by --wr-rating-fill (0..1) -->\n <svg class=\"wr-rating__icon wr-rating__icon--fg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path\n d=\"M12 2.5l2.95 5.98 6.6.96-4.78 4.66 1.13 6.58L12 17.6l-5.9 3.08 1.13-6.58L2.45 9.44l6.6-.96L12 2.5z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n stroke-width=\"1.4\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n }\n</div>\n" }]
|
|
227
242
|
}], propDecorators: { count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
|
|
228
243
|
|
|
229
244
|
/**
|