ngwr 15.6.0 → 15.7.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/animations/aurora/styles/_index.scss +44 -0
- package/animations/blur-reveal/styles/_index.scss +70 -0
- package/animations/click-sparks/styles/_index.scss +88 -0
- package/animations/confetti/styles/_index.scss +35 -0
- package/animations/core/styles/_mixins.scss +21 -0
- package/animations/decode/styles/_index.scss +68 -0
- package/animations/destruct/styles/_index.scss +31 -0
- package/animations/dot-grid/styles/_index.scss +41 -0
- package/animations/falling-letters/styles/_index.scss +72 -0
- package/animations/flow-lines/styles/_index.scss +39 -0
- package/animations/fluid-cursor/styles/_index.scss +44 -0
- package/animations/glitch/styles/_index.scss +189 -0
- package/animations/glow-border/styles/_index.scss +89 -0
- package/animations/gradient-flow/styles/_index.scss +101 -0
- package/animations/marquee/styles/_index.scss +179 -0
- package/animations/orbit/styles/_index.scss +77 -0
- package/animations/reveal/styles/_index.scss +96 -0
- package/animations/ripple-grid/styles/_index.scss +42 -0
- package/animations/rotate-reveal/styles/_index.scss +132 -0
- package/animations/shimmer/styles/_index.scss +102 -0
- package/animations/spotlight/styles/_index.scss +119 -0
- package/animations/thread-lines/styles/_index.scss +41 -0
- package/animations/typewriter/styles/_index.scss +94 -0
- package/date-picker/styles/_index.scss +28 -13
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-animations-aurora.mjs +1000 -0
- package/fesm2022/ngwr-animations-aurora.mjs.map +1 -0
- package/fesm2022/ngwr-animations-blur-reveal.mjs +227 -0
- package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -0
- package/fesm2022/ngwr-animations-click-sparks.mjs +145 -0
- package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -0
- package/fesm2022/ngwr-animations-confetti.mjs +233 -0
- package/fesm2022/ngwr-animations-confetti.mjs.map +1 -0
- package/fesm2022/ngwr-animations-core.mjs +343 -0
- package/fesm2022/ngwr-animations-core.mjs.map +1 -0
- package/fesm2022/ngwr-animations-decode.mjs +301 -0
- package/fesm2022/ngwr-animations-decode.mjs.map +1 -0
- package/fesm2022/ngwr-animations-destruct.mjs +232 -0
- package/fesm2022/ngwr-animations-destruct.mjs.map +1 -0
- package/fesm2022/ngwr-animations-dot-grid.mjs +330 -0
- package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -0
- package/fesm2022/ngwr-animations-falling-letters.mjs +526 -0
- package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -0
- package/fesm2022/ngwr-animations-flow-lines.mjs +1102 -0
- package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -0
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +1187 -0
- package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -0
- package/fesm2022/ngwr-animations-glitch.mjs +164 -0
- package/fesm2022/ngwr-animations-glitch.mjs.map +1 -0
- package/fesm2022/ngwr-animations-glow-border.mjs +81 -0
- package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -0
- package/fesm2022/ngwr-animations-gradient-flow.mjs +81 -0
- package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -0
- package/fesm2022/ngwr-animations-marquee.mjs +321 -0
- package/fesm2022/ngwr-animations-marquee.mjs.map +1 -0
- package/fesm2022/ngwr-animations-orbit.mjs +264 -0
- package/fesm2022/ngwr-animations-orbit.mjs.map +1 -0
- package/fesm2022/ngwr-animations-reveal.mjs +279 -0
- package/fesm2022/ngwr-animations-reveal.mjs.map +1 -0
- package/fesm2022/ngwr-animations-ripple-grid.mjs +320 -0
- package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -0
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +285 -0
- package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -0
- package/fesm2022/ngwr-animations-shimmer.mjs +121 -0
- package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -0
- package/fesm2022/ngwr-animations-spotlight.mjs +90 -0
- package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -0
- package/fesm2022/ngwr-animations-thread-lines.mjs +926 -0
- package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -0
- package/fesm2022/ngwr-animations-tilt.mjs +134 -0
- package/fesm2022/ngwr-animations-tilt.mjs.map +1 -0
- package/fesm2022/ngwr-animations-typewriter.mjs +335 -0
- package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -0
- 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-breadcrumbs.mjs +6 -6
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +3 -3
- package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +6 -6
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-meter-group.mjs +3 -3
- package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +7 -4
- package/fesm2022/ngwr-clipboard.mjs.map +1 -1
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +11 -9
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +7 -6
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-comment.mjs +6 -6
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +17 -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-picker.mjs +34 -26
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +6 -6
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +24 -22
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +16 -13
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +27 -24
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +15 -13
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +4 -4
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +7 -7
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-graph.mjs +6 -6
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +6 -1
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +6 -1
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +6 -1
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +6 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +6 -1
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +6 -1
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +6 -1
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +6 -1
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +6 -1
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +6 -1
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +6 -1
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +6 -1
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +6 -1
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +6 -1
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +6 -1
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +6 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +6 -1
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +6 -1
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +6 -1
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +6 -1
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +6 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +6 -1
- 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 +3 -3
- package/fesm2022/ngwr-input-otp.mjs +3 -3
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +7 -6
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +6 -6
- package/fesm2022/ngwr-load-state.mjs +15 -15
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +27 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +3 -3
- package/fesm2022/ngwr-pipes.mjs +27 -27
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +12 -10
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +15 -15
- 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.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form.mjs +3 -3
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select.mjs +16 -16
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sortable-list.mjs +9 -9
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +6 -6
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +19 -19
- 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-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +17 -15
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +7 -7
- package/fesm2022/ngwr-transfer.mjs +4 -4
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +5 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +5 -5
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-window.mjs +17 -16
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/i18n/ar.json +7 -0
- package/i18n/cs.json +7 -0
- package/i18n/de.json +7 -0
- package/i18n/en.json +7 -0
- package/i18n/es.json +7 -0
- package/i18n/fr.json +7 -0
- package/i18n/he.json +7 -0
- package/i18n/hi.json +7 -0
- package/i18n/id.json +7 -0
- package/i18n/it.json +7 -0
- package/i18n/ja.json +7 -0
- package/i18n/ko.json +7 -0
- package/i18n/nl.json +7 -0
- package/i18n/pl.json +7 -0
- package/i18n/pt.json +7 -0
- package/i18n/ru.json +7 -0
- package/i18n/sv.json +7 -0
- package/i18n/tr.json +7 -0
- package/i18n/uk.json +7 -0
- package/i18n/vi.json +7 -0
- package/i18n/zh-TW.json +7 -0
- package/i18n/zh.json +7 -0
- package/llms-full.txt +162 -2
- package/llms.txt +1 -0
- package/package.json +119 -1
- package/schematics/use/rule.js +1 -0
- package/schematics/use/symbol-map.json +23 -0
- package/skills/ngwr/SKILL.md +3 -2
- package/skills/ngwr/references/catalog.md +23 -0
- package/theme/_index.scss +7 -1
- package/theme/styles/_index.scss +1 -0
- package/theme/styles/_scrollbar.scss +69 -0
- package/theme/styles/_variables.scss +8 -0
- package/types/ngwr-animations-aurora.d.ts +186 -0
- package/types/ngwr-animations-blur-reveal.d.ts +84 -0
- package/types/ngwr-animations-click-sparks.d.ts +67 -0
- package/types/ngwr-animations-confetti.d.ts +93 -0
- package/types/ngwr-animations-core.d.ts +294 -0
- package/types/ngwr-animations-decode.d.ts +104 -0
- package/types/ngwr-animations-destruct.d.ts +96 -0
- package/types/ngwr-animations-dot-grid.d.ts +87 -0
- package/types/ngwr-animations-falling-letters.d.ts +165 -0
- package/types/ngwr-animations-flow-lines.d.ts +208 -0
- package/types/ngwr-animations-fluid-cursor.d.ts +183 -0
- package/types/ngwr-animations-glitch.d.ts +86 -0
- package/types/ngwr-animations-glow-border.d.ts +29 -0
- package/types/ngwr-animations-gradient-flow.d.ts +38 -0
- package/types/ngwr-animations-marquee.d.ts +148 -0
- package/types/ngwr-animations-orbit.d.ts +112 -0
- package/types/ngwr-animations-reveal.d.ts +134 -0
- package/types/ngwr-animations-ripple-grid.d.ts +74 -0
- package/types/ngwr-animations-rotate-reveal.d.ts +134 -0
- package/types/ngwr-animations-shimmer.d.ts +68 -0
- package/types/ngwr-animations-spotlight.d.ts +36 -0
- package/types/ngwr-animations-thread-lines.d.ts +155 -0
- package/types/ngwr-animations-tilt.d.ts +49 -0
- package/types/ngwr-animations-typewriter.d.ts +144 -0
- package/types/ngwr-clipboard.d.ts +1 -0
- package/types/ngwr-color-picker.d.ts +1 -0
- package/types/ngwr-command-palette.d.ts +1 -0
- package/types/ngwr-compare.d.ts +1 -1
- package/types/ngwr-context-menu.d.ts +1 -0
- package/types/ngwr-dialog.d.ts +1 -0
- package/types/ngwr-directives.d.ts +1 -0
- package/types/ngwr-drawer.d.ts +9 -2
- package/types/ngwr-dropdown.d.ts +1 -0
- package/types/ngwr-lightbox.d.ts +1 -0
- package/types/ngwr-overlay.d.ts +19 -0
- package/types/ngwr-popconfirm.d.ts +1 -0
- package/types/ngwr-sortable-list.d.ts +1 -1
- package/types/ngwr-splitter.d.ts +1 -1
- package/types/ngwr-stepper.d.ts +1 -1
- package/types/ngwr-timeline.d.ts +1 -1
- package/types/ngwr-utils.d.ts +11 -6
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +1 -0
- package/virtual-scroll/styles/_rules.scss +5 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-popover.mjs","names":["DOCUMENT","DOCUMENT"],"sources":["../../../projects/lib/popover/internal/chart-tooltip-panel.ts","../../../projects/lib/popover/internal/chart-tooltip-panel.html","../../../projects/lib/popover/internal/viewport-margin.ts","../../../projects/lib/popover/chart-tooltip.ts","../../../projects/lib/popover/internal/keystroke.ts","../../../projects/lib/popover/internal/text-panel.ts","../../../projects/lib/popover/types/popover-position.ts","../../../projects/lib/popover/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 { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrChartTooltipDatum } from '../types';\n\n/**\n * The chip a chart's hover tooltip renders into. Not part of the template API —\n * `useChartTooltip()` attaches it.\n *\n * It wears `.wr-tooltip` as well as its own class, so it IS the library's\n * tooltip: the same surface, border, radius, type and arrow as\n * `[wrPopover] mode=\"tooltip\"`, and an app that retints `--wr-tooltip-bg`\n * retints this one with the rest. Only the inside is its own — a swatch, a\n * label and a value, laid out rather than joined into one string, so no\n * separator has to be translated.\n *\n * With `rows`, those three become a heading in `.wr-chart-tooltip__head` and\n * each row a line of its own under it, again a swatch, a label and a value.\n * Without them the chip is exactly the single line it always was: no heading\n * wrapper, no modifier, so no chart that never passes rows draws anything new.\n *\n * @internal\n */\n@Component({\n selector: 'wr-chart-tooltip',\n templateUrl: './chart-tooltip-panel.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-tooltip wr-chart-tooltip',\n '[class.wr-chart-tooltip--rows]': 'rows().length > 0',\n },\n imports: [NgTemplateOutlet],\n})\nexport class WrChartTooltipPanel {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('popover');\n }\n\n readonly datum = input.required<WrChartTooltipDatum>();\n\n protected readonly rows = computed(() => this.datum().rows ?? []);\n}\n","@let d = datum();\n<!-- The heading: the section's swatch, name and value. An empty value draws nothing,\n since a heading over rows usually has none of its own. -->\n<ng-template #head>\n @if (d.color) {\n <span class=\"wr-chart-tooltip__swatch\" [style.background]=\"d.color\"></span>\n }\n @if (d.label) {\n <span class=\"wr-chart-tooltip__label\">{{ d.label }}</span>\n }\n @if (d.value) {\n <span class=\"wr-chart-tooltip__value\">{{ d.value }}</span>\n }\n</ng-template>\n\n@if (rows().length > 0) {\n <!-- Wrapped only here, so a chip with no rows keeps the DOM every chart drew before. -->\n @if (d.color || d.label || d.value) {\n <span class=\"wr-chart-tooltip__head\"><ng-container [ngTemplateOutlet]=\"head\" /></span>\n }\n @for (row of rows(); track $index) {\n <span class=\"wr-chart-tooltip__row\">\n @if (row.color) {\n <span class=\"wr-chart-tooltip__row-swatch\" [style.background]=\"row.color\"></span>\n }\n <span class=\"wr-chart-tooltip__row-label\">{{ row.label }}</span>\n <span class=\"wr-chart-tooltip__row-value\">{{ row.value }}</span>\n </span>\n }\n} @else {\n <ng-container [ngTemplateOutlet]=\"head\" />\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\n/**\n * How close, in px, `withPush` may park a pane to the viewport edge — 8px, the\n * `--wr-space-sm` step. Without it a 224px panel opened `bottom-end` from a\n * phone's header landed at exactly `x = 0`, its border and corner on the glass,\n * and a chart's tooltip for the last candle of a candlestick ran 0.7px past the\n * right edge of a 390px screen.\n *\n * The CDK measures the right and bottom edges against the viewport width and\n * height with the margin taken off BOTH sides, so a pane pushed back from one\n * of those stops 16px short of it rather than 8 — measured, and left alone.\n *\n * Shared by `[wrPopover]` and `useChartTooltip()`, so the two cannot drift.\n */\nexport const VIEWPORT_MARGIN = 8;\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 { ConnectedPosition, FlexibleConnectedPositionStrategy, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport {\n type ComponentRef,\n DestroyRef,\n ElementRef,\n Injector,\n type Signal,\n afterRenderEffect,\n computed,\n inject,\n signal,\n untracked,\n} from '@angular/core';\n\nimport type { Subscription } from 'rxjs';\n\nimport { WR_OVERLAY, wrFollowDirection } from 'ngwr/overlay';\n\nimport { WrChartTooltipPanel } from './internal/chart-tooltip-panel';\nimport { VIEWPORT_MARGIN } from './internal/viewport-margin';\nimport type { WrChartTooltip, WrChartTooltipTarget } from './types';\n\n/**\n * How long the tooltip outlives the pointer leaving a section, or reporting another\n * one on its way to the chip, in ms.\n *\n * Long enough to cross the 8px gap onto the chip, which is what keeps it hoverable,\n * and to pass through the gutter between two bars or two heatmap days without a\n * flash. The same order as `[wrPopover]`'s `hideDelay`.\n */\nconst GRACE = 100;\n\n/**\n * How close the arrow's middle may come to the end of the chip's edge, in px from the\n * padding box: the chip's inner corner radius (5px) plus half the rotated square's\n * diagonal (4.24px), rounded up. An anchor further out than that — a chip pushed flush\n * against the viewport by a section on its very edge — keeps the arrow on the straight\n * part of the chip rather than off its corner.\n */\nconst ARROW_INSET = 10;\n\n/**\n * How far back past its anchor a chip that runs AWAY from the anchor starts: far enough\n * for the arrow to sit on the anchor without meeting `ARROW_INSET`.\n */\nconst REACH_BACK = ARROW_INSET + 4;\n\ntype Side = NonNullable<WrChartTooltipTarget['side']>;\ntype Anchor = NonNullable<WrChartTooltipTarget['anchor']>;\n\ninterface Box {\n readonly left: number;\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n}\n\ntype Edge = 'left' | 'center' | 'right';\ntype Rise = 'top' | 'center' | 'bottom';\n\n/** A placement in PHYSICAL terms: which chip edge the arrow hangs off, and the geometry. */\ninterface Physical {\n readonly originX: Edge;\n readonly originY: Rise;\n readonly overlayX: Edge;\n readonly overlayY: Rise;\n readonly offsetX?: number;\n readonly offsetY?: number;\n readonly arrow: Side;\n}\n\nconst ABOVE: Physical = {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -8,\n arrow: 'bottom',\n};\nconst BELOW: Physical = {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 8,\n arrow: 'top',\n};\n\n/**\n * Every placement a side may take, best first.\n *\n * `top` and `bottom` flip to each other, the way every tooltip does. A side placement\n * never flips to the far side: its anchor is a point on a donut's outer arc, and the far\n * side of that point is the donut. Where there is no room beside the anchor — a 200px\n * ring on a phone leaves about 85px either side — the chip goes above it, then below,\n * running AWAY from the ring with the anchor just inside its near end. Measured in\n * Chromium at 375px, a chip centred on the nine o'clock point lay 40px deep over the\n * ring, and one running away from it 13px. Centred above and below come last, and when\n * nothing fits `withPush` slides the best of them into view.\n */\nconst FALLBACKS: Record<Side, readonly Physical[]> = {\n top: [ABOVE, BELOW],\n bottom: [BELOW, ABOVE],\n right: [\n { originX: 'right', originY: 'center', overlayX: 'left', overlayY: 'center', offsetX: 8, arrow: 'left' },\n { ...ABOVE, overlayX: 'left', offsetX: -REACH_BACK },\n { ...BELOW, overlayX: 'left', offsetX: -REACH_BACK },\n ABOVE,\n BELOW,\n ],\n left: [\n { originX: 'left', originY: 'center', overlayX: 'right', overlayY: 'center', offsetX: -8, arrow: 'right' },\n { ...ABOVE, overlayX: 'right', offsetX: REACH_BACK },\n { ...BELOW, overlayX: 'right', offsetX: REACH_BACK },\n ABOVE,\n BELOW,\n ],\n};\n\n/**\n * The position list for a side, in the logical vocabulary the CDK and the arrow\n * stylesheet speak.\n *\n * A chart's geometry does not mirror — an SVG arc at three o'clock is on the right in\n * both directions — so the list is written physically and translated here. The CDK\n * resolves `start` / `end` against the overlay's direction, and applies `offsetX` as a\n * physical translate, so under RTL the edges swap and the offsets stay as they are. The\n * pane class names the edge the arrow hangs off in the stylesheet's terms: its side\n * placements hang the arrow off an INLINE edge, so the chip's physical left edge is\n * `--right` in LTR and `--left` in RTL. Along that edge the arrow is placed by\n * measurement, so a chip that runs away from its anchor needs no class of its own.\n */\nfunction chartTooltipPositions(side: Side, rtl: boolean): ConnectedPosition[] {\n const x = (edge: Edge): 'start' | 'center' | 'end' =>\n edge === 'center' ? 'center' : (edge === 'left') !== rtl ? 'start' : 'end';\n const arrowClass: Record<Side, string> = {\n top: 'bottom',\n bottom: 'top',\n left: rtl ? 'left' : 'right',\n right: rtl ? 'right' : 'left',\n };\n return FALLBACKS[side].map(place => ({\n originX: x(place.originX),\n originY: place.originY,\n overlayX: x(place.overlayX),\n overlayY: place.overlayY,\n offsetX: place.offsetX,\n offsetY: place.offsetY,\n panelClass: `wr-tooltip-overlay--${arrowClass[place.arrow]}`,\n }));\n}\n\n/** Where an anchor is right now, in viewport pixels. */\nfunction boxOf(anchor: Anchor): Box {\n if (anchor instanceof Element) return anchor.getBoundingClientRect();\n const width = anchor.width ?? 0;\n const height = anchor.height ?? 0;\n return { left: anchor.x, top: anchor.y, right: anchor.x + width, bottom: anchor.y + height };\n}\n\n/**\n * A hover tooltip for a chart's sections, with ONE overlay per chart.\n *\n * **Why not `[wrPopover] mode=\"tooltip\"` on every section.** It fits the look\n * and not the shape. A year of `wr-calendar-heatmap` is 371 days, and a directive\n * per day is 371 focus monitors and 371 overlays-in-waiting for a tooltip only\n * one of them can show; and most sections are not an element a directive could\n * point at — a donut's slice is a `<path>` whose box is most of the ring, a\n * sparkline's point is a coordinate. So the chart says which section is under\n * the pointer and where to point, and this owns the single overlay, the timers\n * and the teardown. What IS shared with the directive is everything a reader\n * sees: the `.wr-tooltip` chip, its arrow, the placements with their flip, and\n * Escape.\n *\n * **The chip points AT the section it describes**, with its arrow on the anchor:\n * above a heatmap's day, above a bar's top edge, off the outside of a donut's arc.\n * The arrow is placed from a measurement rather than centred, because the chip is\n * not always centred on its anchor — `withPush` slides it along the viewport edge\n * for the first and last week of a year — and an arrow at the chip's middle would\n * then point at a neighbour. The measurement is written to\n * `--wr-chart-tooltip-arrow` on the chip, and the stylesheet puts the arrow there.\n *\n * **A chip at its section sits over the sections beside it**, and it is hoverable\n * (below), so the way onto it can cross another section: straight up from a heatmap\n * day runs through the day above. Switching the moment that day reported itself\n * would move the chip away from a pointer on its way to it — WCAG 1.4.13 with extra\n * steps. So the strip between the anchor and the chip is a bridge: another section\n * reported from inside it waits out the same grace a leave does, a pointer still\n * closing in on the chip starts that grace again however slowly it moves, and\n * landing on the chip cancels the switch. Anywhere else a new section switches at\n * once, so scanning a row of days does not lag. The cost is in the other direction: a\n * pointer that keeps on going up a heatmap's column is moving onto the chip, so it\n * passes over it and the days under it read out only once it comes out the far side.\n *\n * **Why an overlay and not a positioned child, the way `wr-line-chart` draws its\n * own.** A child is clipped by every `overflow` between it and the page, and a\n * chart sits inside those constantly: `wr-calendar-heatmap` IS a scroll\n * container, and a sparkline in a `wr-table` cell sits under two more.\n *\n * **Pointer only, deliberately.** No section of any chart is a tab stop, and\n * this does not make one — a year of days in the tab order would be the defect.\n * The pane is `aria-hidden`: every value it shows is already the section's\n * accessible name or the chart's own, and an orphan tooltip nothing describes\n * reads as a stray line at the end of the document. It is never the only way to\n * a value.\n *\n * SSR-safe: nothing here touches the DOM until a pointer event has moved a\n * section, and the render effect that opens the overlay never runs on a server.\n *\n * Call from an injection context — a chart's field initialiser.\n *\n * @param enabled The chart's `tooltip` input. Turning it off closes an open tooltip.\n * @param resolve What to show for section `index`, and where. It runs after\n * render, so it may read the DOM the section just drew; the signals it reads\n * are tracked, so a data change under an open tooltip re-reads it, and a\n * section that no longer exists (`null`) closes it. It runs again whenever the\n * chart may have moved under an open chip — a scroll anywhere, a viewport\n * resize, the chart or its anchor element changing size.\n * @param sectionAt For a chart whose sections are chosen by POSITION rather than by\n * element — a sparkline picks the point nearest the pointer's x, anywhere over the\n * drawing — the section at a viewport point, or `null` off the drawing. The chip\n * points at the point from inside the drawing, so without this a pointer scrubbing\n * above the line lands on the chip and the chart stops hearing it: measured in\n * Chromium, a scrub along the top of a sparkline showed 9 of its 12 values. Asked on\n * every pointer event while a chip is up, wherever the pointer is over the chart or its\n * own chip; straight up from a point onto its chip stays on that point, so the chip is\n * still hoverable. Anywhere else the chip closes after the usual grace.\n *\n * @internal\n */\nexport function useChartTooltip(\n enabled: Signal<boolean>,\n resolve: (index: number) => WrChartTooltipTarget | null,\n sectionAt?: (x: number, y: number) => number | null\n): WrChartTooltip {\n const overlay = inject(WR_OVERLAY);\n const doc = inject(DOCUMENT);\n const dir = inject(Directionality, { optional: true });\n const viewport = inject(ViewportRuler);\n const host = inject(ElementRef).nativeElement as Element;\n const injector = inject(Injector);\n\n const hovered = signal<number | null>(null);\n const active = computed(() => (enabled() ? hovered() : null));\n\n /**\n * The section Escape dismissed. It stays shut for as long as the pointer stays\n * on that section — WCAG 1.4.13 asks for dismissal WITHOUT moving the pointer,\n * and a sparkline re-reports its section on every `mousemove`, so a plain\n * close would reopen on the next pixel.\n */\n let dismissed: number | null = null;\n\n let overlayRef: OverlayRef | null = null;\n let strategy: FlexibleConnectedPositionStrategy | null = null;\n let panel: ComponentRef<WrChartTooltipPanel> | null = null;\n let side: Side = 'top';\n let anchor: Anchor | null = null;\n let resized: Subscription | null = null;\n let observer: ResizeObserver | null = null;\n let observed: Element | null = null;\n\n /** Where the pointer last was, while a chip is up. `null` until it moves. */\n let pointer: { readonly x: number; readonly y: number } | null = null;\n\n /**\n * What the grace period settles on when it runs out: another section, `null` for\n * none, or `undefined` for nothing pending — the chip stays as it is.\n */\n let pending: number | null | undefined;\n let graceTimer: ReturnType<typeof setTimeout> | null = null;\n /** The pointer's distance from the chip when the grace last (re)started. */\n let approach = Number.POSITIVE_INFINITY;\n\n const chipBox = (): DOMRect | null => {\n const box = overlayRef?.overlayElement.getBoundingClientRect();\n // Nothing laid out (a unit test, a pane not attached yet) is no chip to reach.\n return box && box.width > 0 && box.height > 0 ? box : null;\n };\n\n /**\n * Whether the pointer is in the strip between the anchor and the chip — as wide\n * as the chip along the edge it hangs off, so a diagonal approach counts too.\n */\n const inBridge = (): boolean => {\n const chip = chipBox();\n if (!pointer || !chip || !anchor) return false;\n const at = boxOf(anchor);\n const { x, y } = pointer;\n const across = x >= chip.left && x <= chip.right;\n const along = y >= chip.top && y <= chip.bottom;\n if (chip.bottom <= at.top) return across && y >= chip.bottom && y <= at.top;\n if (chip.top >= at.bottom) return across && y >= at.bottom && y <= chip.top;\n if (chip.right <= at.left) return along && x >= chip.right && x <= at.left;\n if (chip.left >= at.right) return along && x >= at.right && x <= chip.left;\n return false;\n };\n\n const distanceToChip = (): number => {\n const chip = chipBox();\n if (!pointer || !chip) return Number.POSITIVE_INFINITY;\n const dx = Math.max(chip.left - pointer.x, 0, pointer.x - chip.right);\n const dy = Math.max(chip.top - pointer.y, 0, pointer.y - chip.bottom);\n return Math.hypot(dx, dy);\n };\n\n const cancelGrace = (): void => {\n pending = undefined;\n if (graceTimer === null) return;\n clearTimeout(graceTimer);\n graceTimer = null;\n };\n\n const settle = (): void => {\n const next = pending;\n cancelGrace();\n if (next !== undefined) hovered.set(next);\n };\n\n const restartGrace = (): void => {\n if (graceTimer !== null) clearTimeout(graceTimer);\n graceTimer = setTimeout(settle, GRACE);\n };\n\n // An armed grace is left to run rather than restarted: a grid reports the gap\n // between two squares on every `mousemove`, and restarting would keep a tooltip\n // up for as long as the pointer kept moving through it. Only closing in on the\n // chip restarts it — see `track`.\n const defer = (next: number | null): void => {\n pending = next;\n if (graceTimer !== null) return;\n approach = distanceToChip();\n restartGrace();\n };\n\n const enter = (index: number): void => {\n if (!enabled()) return;\n if (index === dismissed) {\n cancelGrace();\n return;\n }\n dismissed = null;\n const showing = hovered();\n if (index === showing) {\n cancelGrace();\n return;\n }\n if (showing !== null && inBridge()) {\n defer(index);\n return;\n }\n cancelGrace();\n hovered.set(index);\n };\n\n /**\n * Put the arrow on the anchor, wherever the chip landed along it. Measured off the\n * PANE, which is exactly the chip's box: the chip itself scales in from 96% and\n * would read short for the length of its entry animation.\n */\n const aim = (): void => {\n if (!overlayRef || !panel || !anchor) return;\n const pane = overlayRef.overlayElement;\n const chip = panel.location.nativeElement as HTMLElement;\n const at = boxOf(anchor);\n const box = pane.getBoundingClientRect();\n const across =\n pane.classList.contains('wr-tooltip-overlay--top') || pane.classList.contains('wr-tooltip-overlay--bottom');\n // The arrow is positioned inside the chip's padding box, so its border comes off.\n const border = across ? chip.clientLeft : chip.clientTop;\n const inner = (across ? box.width : box.height) - 2 * border;\n if (inner <= 2 * ARROW_INSET) return;\n const target = across ? (at.left + at.right) / 2 - box.left : (at.top + at.bottom) / 2 - box.top;\n const offset = Math.min(inner - ARROW_INSET, Math.max(ARROW_INSET, target - border));\n chip.style.setProperty('--wr-chart-tooltip-arrow', `${Math.round(offset * 100) / 100}px`);\n };\n\n const place = (): void => {\n if (!overlayRef || !strategy || !anchor) return;\n strategy.setOrigin(anchor);\n overlayRef.updatePosition();\n aim();\n };\n\n /** Watch whatever can move the anchor without a scroll or a viewport resize. */\n const observe = (): void => {\n const next = anchor instanceof Element ? anchor : null;\n if (!observer || next === observed) return;\n if (observed) observer.unobserve(observed);\n observed = next;\n if (next) observer.observe(next);\n };\n\n /**\n * Point the open chip at wherever its section is NOW. A box anchor is a set of\n * viewport numbers, so it goes stale the moment anything scrolls, and the CDK's\n * own reposition listens to the window and to registered `cdkScrollable`s only —\n * not to `wr-calendar-heatmap`, which is a scroll container of its own, nor to a\n * `wr-table` a sparkline sits in. One capture listener on the document hears\n * every one of them; a viewport resize and a `ResizeObserver` on the chart cover\n * the rest.\n */\n const reanchor = (): void => {\n const index = untracked(active);\n if (!overlayRef || index === null) return;\n const target = untracked(() => resolve(index));\n if (!target?.anchor) return;\n anchor = target.anchor;\n observe();\n place();\n };\n\n /**\n * The pointer, wherever it goes while a chip is up. Captured on the document, so it\n * is current before any section's own `mouseenter` / `mousemove` handler runs.\n */\n const track = (event: MouseEvent): void => {\n const { clientX: x, clientY: y } = event;\n pointer = { x, y };\n // A chart scrubbed by position hears the pointer wherever it is over the drawing,\n // chip or not — see `sectionAt` — but only where what is under the pointer is the\n // chart or its own chip. A box says nothing about what covers it: a chip from the\n // chart beside it can lie over this drawing, and the drawing's edge is a fraction of\n // a pixel wider than what hit-tests as it. A `mouseout` goes to the element left, so\n // the one under the pointer is its `relatedTarget`.\n const under = event.type === 'mouseout' ? event.relatedTarget : event.target;\n const ours = under instanceof Node && (host.contains(under) || !!overlayRef?.overlayElement.contains(under));\n const scrubbed = sectionAt && ours ? sectionAt(x, y) : null;\n if (scrubbed !== null) {\n enter(scrubbed);\n return;\n }\n // On the chip: its own `mouseenter` cancels whatever is pending. Asked of the\n // geometry rather than of the event, because the first event of that move is the\n // section's `mouseout`, whose target is the section being left.\n const chip = chipBox();\n const onChip = chip !== null && x >= chip.left && x <= chip.right && y >= chip.top && y <= chip.bottom;\n // Off the drawing of a chart scrubbed by position, nothing is hovered, whatever the\n // drawing's own `mouseleave` did — it only fires once, and a chip can move over or\n // off a resting pointer without any. Measured in Chromium before this: a pointer\n // leaving a sparkline across its right edge re-entered the last point in the capture\n // phase of the same move, cancelled the grace the leave was about to arm, and left\n // the chip up for good beside the next chart's own.\n if (sectionAt && !onChip && graceTimer === null) defer(null);\n if (graceTimer === null || onChip) return;\n if (inBridge()) {\n const distance = distanceToChip();\n if (distance < approach) {\n approach = distance;\n restartGrace();\n }\n } else if (pending !== undefined && pending !== null) {\n // Out of the bridge while a section waits: nothing is on its way to the chip.\n settle();\n }\n };\n\n const close = (): void => {\n if (!overlayRef) return;\n doc.removeEventListener('scroll', reanchor, true);\n for (const type of ['mousemove', 'mouseover', 'mouseout'] as const) {\n doc.removeEventListener(type, track, true);\n }\n resized?.unsubscribe();\n observer?.disconnect();\n // Disposing detaches the pane with its listeners and completes\n // `keydownEvents()`, so nothing registered in `open()` outlives it.\n overlayRef.dispose();\n overlayRef = null;\n strategy = null;\n panel = null;\n anchor = null;\n resized = null;\n observer = null;\n observed = null;\n pointer = null;\n };\n\n const open = (target: WrChartTooltipTarget & { readonly anchor: Anchor }): void => {\n const wanted = target.side ?? 'top';\n anchor = target.anchor;\n if (!overlayRef) {\n side = wanted;\n const direction = dir?.value ?? 'ltr';\n // `withGrowAfterOpen`: past its first pass the CDK never gives the pane a box\n // larger than the last one, and this pane is passed from section to section. A\n // chip once pushed against the viewport edge — a donut's nine o'clock on a phone —\n // left every later chip that box, so the next one overflowed its pane and the arrow,\n // measured off the pane, pointed 9–13px wide of its slice. `wr-dropdown` hit the same.\n //\n // `withViewportMargin`, as `[wrPopover]` has: pushed by a section on the very edge,\n // the chip otherwise landed flush against the glass — the last candle of a\n // candlestick at 390px put it at 292–390.7, past the viewport — and `aim` keeps the\n // arrow on the anchor from wherever it parks.\n strategy = overlay\n .position()\n .flexibleConnectedTo(anchor)\n .withPositions(chartTooltipPositions(side, direction === 'rtl'))\n .withPush(true)\n .withGrowAfterOpen(true)\n .withViewportMargin(VIEWPORT_MARGIN);\n overlayRef = overlay.create({\n positionStrategy: strategy,\n // No scroll strategy: `reanchor` repositions, for every scroll container.\n panelClass: 'wr-tooltip-overlay',\n // The direction the list above was translated for — the CDK would otherwise\n // take the document's, and a chart under a `[dir]` would open on the wrong side.\n direction,\n });\n doc.addEventListener('scroll', reanchor, { capture: true, passive: true });\n for (const type of ['mousemove', 'mouseover', 'mouseout'] as const) {\n doc.addEventListener(type, track, { capture: true, passive: true });\n }\n // After the CDK's own subscription, which re-applies against the stale anchor.\n resized = viewport.change().subscribe(reanchor);\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(reanchor);\n observer.observe(host);\n }\n // The chip lands on the same PHYSICAL side in both directions, so the list is\n // translated again rather than the side changed, and the arrow's measurement holds.\n wrFollowDirection(overlayRef, dir, injector, direction =>\n strategy?.withPositions(chartTooltipPositions(side, direction === 'rtl'))\n );\n\n const pane = overlayRef.overlayElement;\n pane.setAttribute('aria-hidden', 'true');\n // Hoverable: the pointer may move onto the chip without losing it, and a switch\n // or a hide it was racing is off. Leaving it starts the same grace a section\n // does; landing back on a section decides through `enter()`.\n pane.addEventListener('mouseenter', cancelGrace);\n pane.addEventListener('mouseleave', () => defer(null));\n\n // Escape reaches the topmost overlay wherever focus is — the CDK's keyboard\n // dispatcher routes it — which is what makes a tooltip nothing can focus\n // dismissible at all.\n overlayRef.keydownEvents().subscribe(event => {\n if (event.key !== 'Escape') return;\n dismissed = hovered();\n cancelGrace();\n hovered.set(null);\n });\n\n panel = overlayRef.attach(new ComponentPortal(WrChartTooltipPanel, null, injector));\n } else if (wanted !== side) {\n side = wanted;\n strategy?.withPositions(chartTooltipPositions(side, overlayRef.getDirection() === 'rtl'));\n }\n observe();\n\n panel?.setInput('datum', target.datum);\n // Rendered NOW rather than on the next pass: the position is centred on the\n // anchor, so it has to be measured against the text it is about to show, not\n // the previous section's.\n panel?.changeDetectorRef.detectChanges();\n place();\n };\n\n afterRenderEffect(() => {\n const index = active();\n const target = index === null ? null : resolve(index);\n // Untracked: the overlay's own construction reads signals (the direction\n // follower creates an effect), and none of them should re-run this.\n untracked(() => {\n if (target?.anchor) open({ ...target, anchor: target.anchor });\n else close();\n });\n });\n\n inject(DestroyRef).onDestroy(() => {\n cancelGrace();\n close();\n });\n\n return {\n active,\n enter,\n leave(event?: MouseEvent): void {\n dismissed = null;\n // Straight onto the chip: its own `mouseenter` would cancel the grace a\n // moment later anyway, and not arming it is what removes the race.\n const to = event?.relatedTarget;\n if (to instanceof Node && overlayRef?.overlayElement.contains(to)) return;\n defer(null);\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 { 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\nimport { wrCheckStyles } from 'ngwr/utils';\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 constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('popover');\n }\n\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 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 { FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\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 { WR_OVERLAY, WrOutsideClick, wrFollowDirection, wrMirrorOffsets } from 'ngwr/overlay';\nimport { getFocusableElements, KEYS, numAttr, toClassList, wrCheckStyles, type WrClassInput } from 'ngwr/utils';\n\nimport { WrCurrentKeystroke } from './internal/keystroke';\nimport { WrPopoverTextPanel } from './internal/text-panel';\nimport { VIEWPORT_MARGIN } from './internal/viewport-margin';\nimport { type WrPopoverPosition, wrPopoverPositions } from './types';\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. A\n * click popover also closes when Tab leaves it, by way of the trigger, so focus\n * moves on as if the panel were rendered beside it.\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 '(keydown.enter)': 'onActivateKey($event)',\n '(keydown.space)': 'onActivateKey($event)',\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. A `hover` popover still opens from the keyboard, with\n * Enter or Space on the trigger, and then takes focus the way a click one\n * does. @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 — 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 /**\n * Extra CSS classes for the popover's (or tooltip's) overlay pane.\n *\n * The pane is appended to the overlay container, not to this component, so\n * nothing in the consumer's own template encloses it and no descendant rule\n * written around the trigger can reach it. This input is the only per-instance\n * handle on it. A space-separated string works as well as an array.\n */\n readonly panelClass = input<WrClassInput>(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 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 /**\n * Whether Enter or Space opened a `trigger=\"hover\"` popover. The pointer owns\n * a hover popover and must leave the caret alone; the keyboard has nothing\n * else to reach the content with, so a keyboard open moves focus in, exactly\n * as a click popover's open does.\n */\n private openedByKeyboard = false;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('popover');\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 /**\n * Flip the panel, from the TRIGGER.\n *\n * A control outside the trigger should use {@link open} / {@link close}\n * instead: the click reaching it has already run the document's\n * capture-phase outside-click listener, which closed the panel — so\n * `toggle()` reads `false` and flips it straight back open, and the panel\n * can never be closed from there.\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 /**\n * Enter or Space on a `trigger=\"hover\"` popover's trigger opens it, for the\n * keyboard user the pointer-only trigger left out — the trigger announces a\n * dialog popup with `aria-haspopup`, and hover is something a keyboard cannot\n * do. `wr-dropdown` opens a hover menu from the keyboard the same way. A click\n * popover needs none of this: its trigger's own click answers both keys.\n *\n * @internal\n */\n protected onActivateKey(event: Event): void {\n if (this.isTooltip() || this.trigger() !== 'hover' || this.isOpen()) return;\n event.preventDefault();\n this.openedByKeyboard = true;\n this.isOpen.set(true);\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 const paneClass = tooltip ? 'wr-tooltip-overlay' : 'wr-popover-overlay';\n\n // Kept as its own binding: it is the half a direction flip has to rebuild.\n const connected = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), this.isRtl()))\n .withPush(true)\n .withViewportMargin(VIEWPORT_MARGIN);\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.\n const overlayClass = toClassList(paneClass, this.panelClass());\n\n this.overlayRef = this.overlay.create({\n positionStrategy: connected,\n scrollStrategy: this.scrollStrategies.reposition(),\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 wrFollowDirection(this.overlayRef, this.dir, this.injector, direction =>\n connected.withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), direction === 'rtl'))\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' || this.openedByKeyboard) {\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- or keyboard-opened only — a hover popover must not pull the\n // caret out of what the user is typing in, and `scheduleHoverClose()`\n // would then dispose the pane out from under the focused element.\n pane.tabIndex = -1;\n pane.focus();\n // And it has to LEAVE with the panel. Non-modal means Tab is not\n // trapped, not that it walks out and strands the dialog open behind it:\n // the pane sits at the end of `<body>`, so Tab past its last control went\n // to the browser chrome and Shift+Tab past its first to the foot of the\n // page, each with `aria-expanded` still true. See `onPaneKeydown`.\n pane.addEventListener('keydown', this.onPaneKeydown);\n pane.addEventListener('focusout', this.onPaneFocusOut);\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 this.openedByKeyboard = false;\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 // Before the dispose: Chromium fires `focusout` for a focused node as it is\n // removed, and the pane is about to be.\n pane.removeEventListener('keydown', this.onPaneKeydown);\n pane.removeEventListener('focusout', this.onPaneFocusOut);\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 /**\n * Tab off either end of a click popover takes focus back to the trigger and\n * closes the panel — the disclosure pattern, for a non-modal popup whose DOM\n * sits nowhere near its trigger.\n *\n * Forward, the trigger is focused WITHOUT `preventDefault`: the browser's own\n * Tab then runs from there, so focus lands on whatever follows the trigger in\n * the page, which is where a panel rendered in place would have let it go.\n * Backward, the trigger itself is the destination, so the default is stopped.\n * The pane counts as the first stop (it precedes its content) and, when\n * nothing inside can take focus, as the last as well.\n *\n * The pane is disposed right here, not by the `isOpen` effect: that runs after\n * the browser's Tab, and a trigger that is the last stop before the overlay\n * container would send that Tab straight back into the still-attached pane.\n *\n * Stops are told by `tabIndex`, because `getFocusableElements` lists every\n * focusable element and a roving composite parks its other items at -1. What\n * that misreads — a native radio group, one stop that lists as several —\n * falls through to `onPaneFocusOut`, which still closes the panel; it just\n * cannot choose where focus goes.\n */\n private readonly onPaneKeydown = (event: KeyboardEvent): void => {\n const pane = this.overlayRef?.overlayElement;\n // A control inside that spends Tab on itself (`wr-mention` accepting a\n // suggestion) has said so by preventing it.\n if (!pane || event.key !== KEYS.TAB || event.defaultPrevented) return;\n const active = this.host.nativeElement.ownerDocument.activeElement;\n const stops = getFocusableElements(pane).filter(el => el.tabIndex >= 0);\n if (event.shiftKey) {\n if (active !== pane && active !== stops[0]) return;\n event.preventDefault();\n } else if (active !== (stops.at(-1) ?? pane)) {\n return;\n }\n this.host.nativeElement.focus();\n this.closeOverlay();\n this.isOpen.set(false);\n };\n\n /**\n * Focus that leaves the panel by any other road closes it, and is left where\n * it went — the close hands focus back only when it was still inside.\n *\n * A `null` destination is three different things, and only one of them is\n * leaving: Tab walking off the end of the document. The window losing focus\n * (switching tabs) and the focused control being removed from the panel\n * report `null` too, and closing for either would shut a panel the user is\n * still working in.\n */\n private readonly onPaneFocusOut = (event: FocusEvent): void => {\n const next = event.relatedTarget as Node | null;\n if (next ? this.holdsFocus(next) : this.keystroke.key !== KEYS.TAB) return;\n this.isOpen.set(false);\n };\n\n /**\n * Whether focus on `node` still belongs to this panel: inside the pane, on\n * the trigger (a press there is about to toggle it, and closing first would\n * have that click open it again), or in an overlay opened AFTER this one. A\n * `wr-date-picker` or `wr-dropdown` inside the panel moves focus into a pane\n * of its own, later in the same container, and closing under it would destroy\n * the control that opened it — the same stacking `WrOutsideClick` honours.\n */\n private holdsFocus(node: Node): boolean {\n const ref = this.overlayRef;\n if (!ref) return false;\n if (ref.overlayElement.contains(node) || this.host.nativeElement.contains(node)) return true;\n const box = ref.hostElement;\n return (\n (box.parentElement?.contains(node) ?? false) &&\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n (box.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0\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"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,IAAa,sBAAb,MAAa,oBAAmB;CAC9B,cAAA;EACE,IAA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AA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA;GAAA,QAAA;GAAA,QAAA;EAAA;EAAA,MAAA;GAAA,WAAA;IAAA,SAAA;IAAA,cAAA;IAAA,cAAA;IAAA,kBAAA;IAAA,iBAAA;IAAA,iBAAA;GAAA;GAAA,YAAA;IAAA,sBAAA;IAAA,sBAAA;IAAA,sBAAA;IAAA,yBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA,CAAA,WAAA;EAAA,UAAA;CAAA,CAAA;;AAAT,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAzBrB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,MAAM;IAMJ,OAAO;IACP,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,2BAA2B;IAC3B,WAAW;IACX,gBAAgB;IAChB,gBAAgB;IAIhB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;GACpB;EACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-popover.mjs","names":["DOCUMENT","DOCUMENT"],"sources":["../../../projects/lib/popover/internal/chart-tooltip-panel.ts","../../../projects/lib/popover/internal/chart-tooltip-panel.html","../../../projects/lib/popover/internal/viewport-margin.ts","../../../projects/lib/popover/chart-tooltip.ts","../../../projects/lib/popover/internal/keystroke.ts","../../../projects/lib/popover/internal/text-panel.ts","../../../projects/lib/popover/types/popover-position.ts","../../../projects/lib/popover/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 { NgTemplateOutlet } from '@angular/common';\nimport { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrChartTooltipDatum } from '../types';\n\n/**\n * The chip a chart's hover tooltip renders into. Not part of the template API —\n * `useChartTooltip()` attaches it.\n *\n * It wears `.wr-tooltip` as well as its own class, so it IS the library's\n * tooltip: the same surface, border, radius, type and arrow as\n * `[wrPopover] mode=\"tooltip\"`, and an app that retints `--wr-tooltip-bg`\n * retints this one with the rest. Only the inside is its own — a swatch, a\n * label and a value, laid out rather than joined into one string, so no\n * separator has to be translated.\n *\n * With `rows`, those three become a heading in `.wr-chart-tooltip__head` and\n * each row a line of its own under it, again a swatch, a label and a value.\n * Without them the chip is exactly the single line it always was: no heading\n * wrapper, no modifier, so no chart that never passes rows draws anything new.\n *\n * @internal\n */\n@Component({\n selector: 'wr-chart-tooltip',\n templateUrl: './chart-tooltip-panel.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-tooltip wr-chart-tooltip',\n '[class.wr-chart-tooltip--rows]': 'rows().length > 0',\n },\n imports: [NgTemplateOutlet],\n})\nexport class WrChartTooltipPanel {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('popover');\n }\n\n readonly datum = input.required<WrChartTooltipDatum>();\n\n protected readonly rows = computed(() => this.datum().rows ?? []);\n}\n","@let d = datum();\n<!-- The heading: the section's swatch, name and value. An empty value draws nothing,\n since a heading over rows usually has none of its own. -->\n<ng-template #head>\n @if (d.color) {\n <span class=\"wr-chart-tooltip__swatch\" [style.background]=\"d.color\"></span>\n }\n @if (d.label) {\n <span class=\"wr-chart-tooltip__label\">{{ d.label }}</span>\n }\n @if (d.value) {\n <span class=\"wr-chart-tooltip__value\">{{ d.value }}</span>\n }\n</ng-template>\n\n@if (rows().length > 0) {\n <!-- Wrapped only here, so a chip with no rows keeps the DOM every chart drew before. -->\n @if (d.color || d.label || d.value) {\n <span class=\"wr-chart-tooltip__head\"><ng-container [ngTemplateOutlet]=\"head\" /></span>\n }\n @for (row of rows(); track $index) {\n <span class=\"wr-chart-tooltip__row\">\n @if (row.color) {\n <span class=\"wr-chart-tooltip__row-swatch\" [style.background]=\"row.color\"></span>\n }\n <span class=\"wr-chart-tooltip__row-label\">{{ row.label }}</span>\n <span class=\"wr-chart-tooltip__row-value\">{{ row.value }}</span>\n </span>\n }\n} @else {\n <ng-container [ngTemplateOutlet]=\"head\" />\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\n/**\n * How close, in px, `withPush` may park a pane to the viewport edge — 8px, the\n * `--wr-space-sm` step. Without it a 224px panel opened `bottom-end` from a\n * phone's header landed at exactly `x = 0`, its border and corner on the glass,\n * and a chart's tooltip for the last candle of a candlestick ran 0.7px past the\n * right edge of a 390px screen.\n *\n * The CDK measures the right and bottom edges against the viewport width and\n * height with the margin taken off BOTH sides, so a pane pushed back from one\n * of those stops 16px short of it rather than 8 — measured, and left alone.\n *\n * Shared by `[wrPopover]` and `useChartTooltip()`, so the two cannot drift.\n */\nexport const VIEWPORT_MARGIN = 8;\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 { ConnectedPosition, FlexibleConnectedPositionStrategy, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport {\n type ComponentRef,\n DestroyRef,\n ElementRef,\n Injector,\n type Signal,\n afterRenderEffect,\n computed,\n inject,\n signal,\n untracked,\n} from '@angular/core';\n\nimport type { Subscription } from 'rxjs';\n\nimport { WR_OVERLAY, wrFollowDirection } from 'ngwr/overlay';\n\nimport { WrChartTooltipPanel } from './internal/chart-tooltip-panel';\nimport { VIEWPORT_MARGIN } from './internal/viewport-margin';\nimport type { WrChartTooltip, WrChartTooltipTarget } from './types';\n\n/**\n * How long the tooltip outlives the pointer leaving a section, or reporting another\n * one on its way to the chip, in ms.\n *\n * Long enough to cross the 8px gap onto the chip, which is what keeps it hoverable,\n * and to pass through the gutter between two bars or two heatmap days without a\n * flash. The same order as `[wrPopover]`'s `hideDelay`.\n */\nconst GRACE = 100;\n\n/**\n * How close the arrow's middle may come to the end of the chip's edge, in px from the\n * padding box: the chip's inner corner radius (5px) plus half the rotated square's\n * diagonal (4.24px), rounded up. An anchor further out than that — a chip pushed flush\n * against the viewport by a section on its very edge — keeps the arrow on the straight\n * part of the chip rather than off its corner.\n */\nconst ARROW_INSET = 10;\n\n/**\n * How far back past its anchor a chip that runs AWAY from the anchor starts: far enough\n * for the arrow to sit on the anchor without meeting `ARROW_INSET`.\n */\nconst REACH_BACK = ARROW_INSET + 4;\n\ntype Side = NonNullable<WrChartTooltipTarget['side']>;\ntype Anchor = NonNullable<WrChartTooltipTarget['anchor']>;\n\ninterface Box {\n readonly left: number;\n readonly top: number;\n readonly right: number;\n readonly bottom: number;\n}\n\ntype Edge = 'left' | 'center' | 'right';\ntype Rise = 'top' | 'center' | 'bottom';\n\n/** A placement in PHYSICAL terms: which chip edge the arrow hangs off, and the geometry. */\ninterface Physical {\n readonly originX: Edge;\n readonly originY: Rise;\n readonly overlayX: Edge;\n readonly overlayY: Rise;\n readonly offsetX?: number;\n readonly offsetY?: number;\n readonly arrow: Side;\n}\n\nconst ABOVE: Physical = {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -8,\n arrow: 'bottom',\n};\nconst BELOW: Physical = {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: 8,\n arrow: 'top',\n};\n\n/**\n * Every placement a side may take, best first.\n *\n * `top` and `bottom` flip to each other, the way every tooltip does. A side placement\n * never flips to the far side: its anchor is a point on a donut's outer arc, and the far\n * side of that point is the donut. Where there is no room beside the anchor — a 200px\n * ring on a phone leaves about 85px either side — the chip goes above it, then below,\n * running AWAY from the ring with the anchor just inside its near end. Measured in\n * Chromium at 375px, a chip centred on the nine o'clock point lay 40px deep over the\n * ring, and one running away from it 13px. Centred above and below come last, and when\n * nothing fits `withPush` slides the best of them into view.\n */\nconst FALLBACKS: Record<Side, readonly Physical[]> = {\n top: [ABOVE, BELOW],\n bottom: [BELOW, ABOVE],\n right: [\n { originX: 'right', originY: 'center', overlayX: 'left', overlayY: 'center', offsetX: 8, arrow: 'left' },\n { ...ABOVE, overlayX: 'left', offsetX: -REACH_BACK },\n { ...BELOW, overlayX: 'left', offsetX: -REACH_BACK },\n ABOVE,\n BELOW,\n ],\n left: [\n { originX: 'left', originY: 'center', overlayX: 'right', overlayY: 'center', offsetX: -8, arrow: 'right' },\n { ...ABOVE, overlayX: 'right', offsetX: REACH_BACK },\n { ...BELOW, overlayX: 'right', offsetX: REACH_BACK },\n ABOVE,\n BELOW,\n ],\n};\n\n/**\n * The position list for a side, in the logical vocabulary the CDK and the arrow\n * stylesheet speak.\n *\n * A chart's geometry does not mirror — an SVG arc at three o'clock is on the right in\n * both directions — so the list is written physically and translated here. The CDK\n * resolves `start` / `end` against the overlay's direction, and applies `offsetX` as a\n * physical translate, so under RTL the edges swap and the offsets stay as they are. The\n * pane class names the edge the arrow hangs off in the stylesheet's terms: its side\n * placements hang the arrow off an INLINE edge, so the chip's physical left edge is\n * `--right` in LTR and `--left` in RTL. Along that edge the arrow is placed by\n * measurement, so a chip that runs away from its anchor needs no class of its own.\n */\nfunction chartTooltipPositions(side: Side, rtl: boolean): ConnectedPosition[] {\n const x = (edge: Edge): 'start' | 'center' | 'end' =>\n edge === 'center' ? 'center' : (edge === 'left') !== rtl ? 'start' : 'end';\n const arrowClass: Record<Side, string> = {\n top: 'bottom',\n bottom: 'top',\n left: rtl ? 'left' : 'right',\n right: rtl ? 'right' : 'left',\n };\n return FALLBACKS[side].map(place => ({\n originX: x(place.originX),\n originY: place.originY,\n overlayX: x(place.overlayX),\n overlayY: place.overlayY,\n offsetX: place.offsetX,\n offsetY: place.offsetY,\n panelClass: `wr-tooltip-overlay--${arrowClass[place.arrow]}`,\n }));\n}\n\n/** Where an anchor is right now, in viewport pixels. */\nfunction boxOf(anchor: Anchor): Box {\n if (anchor instanceof Element) return anchor.getBoundingClientRect();\n const width = anchor.width ?? 0;\n const height = anchor.height ?? 0;\n return { left: anchor.x, top: anchor.y, right: anchor.x + width, bottom: anchor.y + height };\n}\n\n/**\n * A hover tooltip for a chart's sections, with ONE overlay per chart.\n *\n * **Why not `[wrPopover] mode=\"tooltip\"` on every section.** It fits the look\n * and not the shape. A year of `wr-calendar-heatmap` is 371 days, and a directive\n * per day is 371 focus monitors and 371 overlays-in-waiting for a tooltip only\n * one of them can show; and most sections are not an element a directive could\n * point at — a donut's slice is a `<path>` whose box is most of the ring, a\n * sparkline's point is a coordinate. So the chart says which section is under\n * the pointer and where to point, and this owns the single overlay, the timers\n * and the teardown. What IS shared with the directive is everything a reader\n * sees: the `.wr-tooltip` chip, its arrow, the placements with their flip, and\n * Escape.\n *\n * **The chip points AT the section it describes**, with its arrow on the anchor:\n * above a heatmap's day, above a bar's top edge, off the outside of a donut's arc.\n * The arrow is placed from a measurement rather than centred, because the chip is\n * not always centred on its anchor — `withPush` slides it along the viewport edge\n * for the first and last week of a year — and an arrow at the chip's middle would\n * then point at a neighbour. The measurement is written to\n * `--wr-chart-tooltip-arrow` on the chip, and the stylesheet puts the arrow there.\n *\n * **A chip at its section sits over the sections beside it**, and it is hoverable\n * (below), so the way onto it can cross another section: straight up from a heatmap\n * day runs through the day above. Switching the moment that day reported itself\n * would move the chip away from a pointer on its way to it — WCAG 1.4.13 with extra\n * steps. So the strip between the anchor and the chip is a bridge: another section\n * reported from inside it waits out the same grace a leave does, a pointer still\n * closing in on the chip starts that grace again however slowly it moves, and\n * landing on the chip cancels the switch. Anywhere else a new section switches at\n * once, so scanning a row of days does not lag. The cost is in the other direction: a\n * pointer that keeps on going up a heatmap's column is moving onto the chip, so it\n * passes over it and the days under it read out only once it comes out the far side.\n *\n * **Why an overlay and not a positioned child, the way `wr-line-chart` draws its\n * own.** A child is clipped by every `overflow` between it and the page, and a\n * chart sits inside those constantly: `wr-calendar-heatmap` IS a scroll\n * container, and a sparkline in a `wr-table` cell sits under two more.\n *\n * **Pointer only, deliberately.** No section of any chart is a tab stop, and\n * this does not make one — a year of days in the tab order would be the defect.\n * The pane is `aria-hidden`: every value it shows is already the section's\n * accessible name or the chart's own, and an orphan tooltip nothing describes\n * reads as a stray line at the end of the document. It is never the only way to\n * a value.\n *\n * SSR-safe: nothing here touches the DOM until a pointer event has moved a\n * section, and the render effect that opens the overlay never runs on a server.\n *\n * Call from an injection context — a chart's field initialiser.\n *\n * @param enabled The chart's `tooltip` input. Turning it off closes an open tooltip.\n * @param resolve What to show for section `index`, and where. It runs after\n * render, so it may read the DOM the section just drew; the signals it reads\n * are tracked, so a data change under an open tooltip re-reads it, and a\n * section that no longer exists (`null`) closes it. It runs again whenever the\n * chart may have moved under an open chip — a scroll anywhere, a viewport\n * resize, the chart or its anchor element changing size.\n * @param sectionAt For a chart whose sections are chosen by POSITION rather than by\n * element — a sparkline picks the point nearest the pointer's x, anywhere over the\n * drawing — the section at a viewport point, or `null` off the drawing. The chip\n * points at the point from inside the drawing, so without this a pointer scrubbing\n * above the line lands on the chip and the chart stops hearing it: measured in\n * Chromium, a scrub along the top of a sparkline showed 9 of its 12 values. Asked on\n * every pointer event while a chip is up, wherever the pointer is over the chart or its\n * own chip; straight up from a point onto its chip stays on that point, so the chip is\n * still hoverable. Anywhere else the chip closes after the usual grace.\n *\n * @internal\n */\nexport function useChartTooltip(\n enabled: Signal<boolean>,\n resolve: (index: number) => WrChartTooltipTarget | null,\n sectionAt?: (x: number, y: number) => number | null\n): WrChartTooltip {\n const overlay = inject(WR_OVERLAY);\n const doc = inject(DOCUMENT);\n const dir = inject(Directionality, { optional: true });\n const viewport = inject(ViewportRuler);\n const host = inject(ElementRef).nativeElement as Element;\n const injector = inject(Injector);\n\n const hovered = signal<number | null>(null);\n const active = computed(() => (enabled() ? hovered() : null));\n\n /**\n * The section Escape dismissed. It stays shut for as long as the pointer stays\n * on that section — WCAG 1.4.13 asks for dismissal WITHOUT moving the pointer,\n * and a sparkline re-reports its section on every `mousemove`, so a plain\n * close would reopen on the next pixel.\n */\n let dismissed: number | null = null;\n\n let overlayRef: OverlayRef | null = null;\n let strategy: FlexibleConnectedPositionStrategy | null = null;\n let panel: ComponentRef<WrChartTooltipPanel> | null = null;\n let side: Side = 'top';\n let anchor: Anchor | null = null;\n let resized: Subscription | null = null;\n let observer: ResizeObserver | null = null;\n let observed: Element | null = null;\n\n /** Where the pointer last was, while a chip is up. `null` until it moves. */\n let pointer: { readonly x: number; readonly y: number } | null = null;\n\n /**\n * What the grace period settles on when it runs out: another section, `null` for\n * none, or `undefined` for nothing pending — the chip stays as it is.\n */\n let pending: number | null | undefined;\n let graceTimer: ReturnType<typeof setTimeout> | null = null;\n /** The pointer's distance from the chip when the grace last (re)started. */\n let approach = Number.POSITIVE_INFINITY;\n\n const chipBox = (): DOMRect | null => {\n const box = overlayRef?.overlayElement.getBoundingClientRect();\n // Nothing laid out (a unit test, a pane not attached yet) is no chip to reach.\n return box && box.width > 0 && box.height > 0 ? box : null;\n };\n\n /**\n * Whether the pointer is in the strip between the anchor and the chip — as wide\n * as the chip along the edge it hangs off, so a diagonal approach counts too.\n */\n const inBridge = (): boolean => {\n const chip = chipBox();\n if (!pointer || !chip || !anchor) return false;\n const at = boxOf(anchor);\n const { x, y } = pointer;\n const across = x >= chip.left && x <= chip.right;\n const along = y >= chip.top && y <= chip.bottom;\n if (chip.bottom <= at.top) return across && y >= chip.bottom && y <= at.top;\n if (chip.top >= at.bottom) return across && y >= at.bottom && y <= chip.top;\n if (chip.right <= at.left) return along && x >= chip.right && x <= at.left;\n if (chip.left >= at.right) return along && x >= at.right && x <= chip.left;\n return false;\n };\n\n const distanceToChip = (): number => {\n const chip = chipBox();\n if (!pointer || !chip) return Number.POSITIVE_INFINITY;\n const dx = Math.max(chip.left - pointer.x, 0, pointer.x - chip.right);\n const dy = Math.max(chip.top - pointer.y, 0, pointer.y - chip.bottom);\n return Math.hypot(dx, dy);\n };\n\n const cancelGrace = (): void => {\n pending = undefined;\n if (graceTimer === null) return;\n clearTimeout(graceTimer);\n graceTimer = null;\n };\n\n const settle = (): void => {\n const next = pending;\n cancelGrace();\n if (next !== undefined) hovered.set(next);\n };\n\n const restartGrace = (): void => {\n if (graceTimer !== null) clearTimeout(graceTimer);\n graceTimer = setTimeout(settle, GRACE);\n };\n\n // An armed grace is left to run rather than restarted: a grid reports the gap\n // between two squares on every `mousemove`, and restarting would keep a tooltip\n // up for as long as the pointer kept moving through it. Only closing in on the\n // chip restarts it — see `track`.\n const defer = (next: number | null): void => {\n pending = next;\n if (graceTimer !== null) return;\n approach = distanceToChip();\n restartGrace();\n };\n\n const enter = (index: number): void => {\n if (!enabled()) return;\n if (index === dismissed) {\n cancelGrace();\n return;\n }\n dismissed = null;\n const showing = hovered();\n if (index === showing) {\n cancelGrace();\n return;\n }\n if (showing !== null && inBridge()) {\n defer(index);\n return;\n }\n cancelGrace();\n hovered.set(index);\n };\n\n /**\n * Put the arrow on the anchor, wherever the chip landed along it. Measured off the\n * PANE, which is exactly the chip's box: the chip itself scales in from 96% and\n * would read short for the length of its entry animation.\n */\n const aim = (): void => {\n if (!overlayRef || !panel || !anchor) return;\n const pane = overlayRef.overlayElement;\n const chip = panel.location.nativeElement as HTMLElement;\n const at = boxOf(anchor);\n const box = pane.getBoundingClientRect();\n const across =\n pane.classList.contains('wr-tooltip-overlay--top') || pane.classList.contains('wr-tooltip-overlay--bottom');\n // The arrow is positioned inside the chip's padding box, so its border comes off.\n const border = across ? chip.clientLeft : chip.clientTop;\n const inner = (across ? box.width : box.height) - 2 * border;\n if (inner <= 2 * ARROW_INSET) return;\n const target = across ? (at.left + at.right) / 2 - box.left : (at.top + at.bottom) / 2 - box.top;\n const offset = Math.min(inner - ARROW_INSET, Math.max(ARROW_INSET, target - border));\n chip.style.setProperty('--wr-chart-tooltip-arrow', `${Math.round(offset * 100) / 100}px`);\n };\n\n const place = (): void => {\n if (!overlayRef || !strategy || !anchor) return;\n strategy.setOrigin(anchor);\n overlayRef.updatePosition();\n aim();\n };\n\n /** Watch whatever can move the anchor without a scroll or a viewport resize. */\n const observe = (): void => {\n const next = anchor instanceof Element ? anchor : null;\n if (!observer || next === observed) return;\n if (observed) observer.unobserve(observed);\n observed = next;\n if (next) observer.observe(next);\n };\n\n /**\n * Point the open chip at wherever its section is NOW. A box anchor is a set of\n * viewport numbers, so it goes stale the moment anything scrolls, and the CDK's\n * own reposition listens to the window and to registered `cdkScrollable`s only —\n * not to `wr-calendar-heatmap`, which is a scroll container of its own, nor to a\n * `wr-table` a sparkline sits in. One capture listener on the document hears\n * every one of them; a viewport resize and a `ResizeObserver` on the chart cover\n * the rest.\n */\n const reanchor = (): void => {\n const index = untracked(active);\n if (!overlayRef || index === null) return;\n const target = untracked(() => resolve(index));\n if (!target?.anchor) return;\n anchor = target.anchor;\n observe();\n place();\n };\n\n /**\n * The pointer, wherever it goes while a chip is up. Captured on the document, so it\n * is current before any section's own `mouseenter` / `mousemove` handler runs.\n */\n const track = (event: MouseEvent): void => {\n const { clientX: x, clientY: y } = event;\n pointer = { x, y };\n // A chart scrubbed by position hears the pointer wherever it is over the drawing,\n // chip or not — see `sectionAt` — but only where what is under the pointer is the\n // chart or its own chip. A box says nothing about what covers it: a chip from the\n // chart beside it can lie over this drawing, and the drawing's edge is a fraction of\n // a pixel wider than what hit-tests as it. A `mouseout` goes to the element left, so\n // the one under the pointer is its `relatedTarget`.\n const under = event.type === 'mouseout' ? event.relatedTarget : event.target;\n const ours = under instanceof Node && (host.contains(under) || !!overlayRef?.overlayElement.contains(under));\n const scrubbed = sectionAt && ours ? sectionAt(x, y) : null;\n if (scrubbed !== null) {\n enter(scrubbed);\n return;\n }\n // On the chip: its own `mouseenter` cancels whatever is pending. Asked of the\n // geometry rather than of the event, because the first event of that move is the\n // section's `mouseout`, whose target is the section being left.\n const chip = chipBox();\n const onChip = chip !== null && x >= chip.left && x <= chip.right && y >= chip.top && y <= chip.bottom;\n // Off the drawing of a chart scrubbed by position, nothing is hovered, whatever the\n // drawing's own `mouseleave` did — it only fires once, and a chip can move over or\n // off a resting pointer without any. Measured in Chromium before this: a pointer\n // leaving a sparkline across its right edge re-entered the last point in the capture\n // phase of the same move, cancelled the grace the leave was about to arm, and left\n // the chip up for good beside the next chart's own.\n if (sectionAt && !onChip && graceTimer === null) defer(null);\n if (graceTimer === null || onChip) return;\n if (inBridge()) {\n const distance = distanceToChip();\n if (distance < approach) {\n approach = distance;\n restartGrace();\n }\n } else if (pending !== undefined && pending !== null) {\n // Out of the bridge while a section waits: nothing is on its way to the chip.\n settle();\n }\n };\n\n const close = (): void => {\n if (!overlayRef) return;\n doc.removeEventListener('scroll', reanchor, true);\n for (const type of ['mousemove', 'mouseover', 'mouseout'] as const) {\n doc.removeEventListener(type, track, true);\n }\n resized?.unsubscribe();\n observer?.disconnect();\n // Disposing detaches the pane with its listeners and completes\n // `keydownEvents()`, so nothing registered in `open()` outlives it.\n overlayRef.dispose();\n overlayRef = null;\n strategy = null;\n panel = null;\n anchor = null;\n resized = null;\n observer = null;\n observed = null;\n pointer = null;\n };\n\n const open = (target: WrChartTooltipTarget & { readonly anchor: Anchor }): void => {\n const wanted = target.side ?? 'top';\n anchor = target.anchor;\n if (!overlayRef) {\n side = wanted;\n const direction = dir?.value ?? 'ltr';\n // `withGrowAfterOpen`: past its first pass the CDK never gives the pane a box\n // larger than the last one, and this pane is passed from section to section. A\n // chip once pushed against the viewport edge — a donut's nine o'clock on a phone —\n // left every later chip that box, so the next one overflowed its pane and the arrow,\n // measured off the pane, pointed 9–13px wide of its slice. `wr-dropdown` hit the same.\n //\n // `withViewportMargin`, as `[wrPopover]` has: pushed by a section on the very edge,\n // the chip otherwise landed flush against the glass — the last candle of a\n // candlestick at 390px put it at 292–390.7, past the viewport — and `aim` keeps the\n // arrow on the anchor from wherever it parks.\n strategy = overlay\n .position()\n .flexibleConnectedTo(anchor)\n .withPositions(chartTooltipPositions(side, direction === 'rtl'))\n .withPush(true)\n .withGrowAfterOpen(true)\n .withViewportMargin(VIEWPORT_MARGIN);\n overlayRef = overlay.create({\n positionStrategy: strategy,\n // No scroll strategy: `reanchor` repositions, for every scroll container.\n panelClass: 'wr-tooltip-overlay',\n // The direction the list above was translated for — the CDK would otherwise\n // take the document's, and a chart under a `[dir]` would open on the wrong side.\n direction,\n });\n doc.addEventListener('scroll', reanchor, { capture: true, passive: true });\n for (const type of ['mousemove', 'mouseover', 'mouseout'] as const) {\n doc.addEventListener(type, track, { capture: true, passive: true });\n }\n // After the CDK's own subscription, which re-applies against the stale anchor.\n resized = viewport.change().subscribe(reanchor);\n if (typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(reanchor);\n observer.observe(host);\n }\n // The chip lands on the same PHYSICAL side in both directions, so the list is\n // translated again rather than the side changed, and the arrow's measurement holds.\n wrFollowDirection(overlayRef, dir, injector, direction =>\n strategy?.withPositions(chartTooltipPositions(side, direction === 'rtl'))\n );\n\n const pane = overlayRef.overlayElement;\n pane.setAttribute('aria-hidden', 'true');\n // Hoverable: the pointer may move onto the chip without losing it, and a switch\n // or a hide it was racing is off. Leaving it starts the same grace a section\n // does; landing back on a section decides through `enter()`.\n pane.addEventListener('mouseenter', cancelGrace);\n pane.addEventListener('mouseleave', () => defer(null));\n\n // Escape reaches the topmost overlay wherever focus is — the CDK's keyboard\n // dispatcher routes it — which is what makes a tooltip nothing can focus\n // dismissible at all.\n overlayRef.keydownEvents().subscribe(event => {\n if (event.key !== 'Escape') return;\n dismissed = hovered();\n cancelGrace();\n hovered.set(null);\n });\n\n panel = overlayRef.attach(new ComponentPortal(WrChartTooltipPanel, null, injector));\n } else if (wanted !== side) {\n side = wanted;\n strategy?.withPositions(chartTooltipPositions(side, overlayRef.getDirection() === 'rtl'));\n }\n observe();\n\n panel?.setInput('datum', target.datum);\n // Rendered NOW rather than on the next pass: the position is centred on the\n // anchor, so it has to be measured against the text it is about to show, not\n // the previous section's.\n panel?.changeDetectorRef.detectChanges();\n place();\n };\n\n afterRenderEffect(() => {\n const index = active();\n const target = index === null ? null : resolve(index);\n // Untracked: the overlay's own construction reads signals (the direction\n // follower creates an effect), and none of them should re-run this.\n untracked(() => {\n if (target?.anchor) open({ ...target, anchor: target.anchor });\n else close();\n });\n });\n\n inject(DestroyRef).onDestroy(() => {\n cancelGrace();\n close();\n });\n\n return {\n active,\n enter,\n leave(event?: MouseEvent): void {\n dismissed = null;\n // Straight onto the chip: its own `mouseenter` would cancel the grace a\n // moment later anyway, and not arming it is what removes the race.\n const to = event?.relatedTarget;\n if (to instanceof Node && overlayRef?.overlayElement.contains(to)) return;\n defer(null);\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 { 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\nimport { wrCheckStyles } from 'ngwr/utils';\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 constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('popover');\n }\n\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 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 { FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\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 { WR_OVERLAY, WrOutsideClick, wrFollowDirection, wrMirrorOffsets } from 'ngwr/overlay';\nimport {\n getFocusableElements,\n KEYS,\n numAttr,\n toClassList,\n wrCheckStyles,\n wrRestoreFocus,\n type WrClassInput,\n} from 'ngwr/utils';\n\nimport { WrCurrentKeystroke } from './internal/keystroke';\nimport { WrPopoverTextPanel } from './internal/text-panel';\nimport { VIEWPORT_MARGIN } from './internal/viewport-margin';\nimport { type WrPopoverPosition, wrPopoverPositions } from './types';\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. A\n * click popover also closes when Tab leaves it, by way of the trigger, so focus\n * moves on as if the panel were rendered beside it.\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 '(keydown.enter)': 'onActivateKey($event)',\n '(keydown.space)': 'onActivateKey($event)',\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. A `hover` popover still opens from the keyboard, with\n * Enter or Space on the trigger, and then takes focus the way a click one\n * does. @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 — 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 /**\n * Extra CSS classes for the popover's (or tooltip's) overlay pane.\n *\n * The pane is appended to the overlay container, not to this component, so\n * nothing in the consumer's own template encloses it and no descendant rule\n * written around the trigger can reach it. This input is the only per-instance\n * handle on it. A space-separated string works as well as an array.\n */\n readonly panelClass = input<WrClassInput>(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 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 /**\n * Whether Enter or Space opened a `trigger=\"hover\"` popover. The pointer owns\n * a hover popover and must leave the caret alone; the keyboard has nothing\n * else to reach the content with, so a keyboard open moves focus in, exactly\n * as a click popover's open does.\n */\n private openedByKeyboard = false;\n private showTimer: ReturnType<typeof setTimeout> | null = null;\n private hideTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('popover');\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 /**\n * Flip the panel, from the TRIGGER.\n *\n * A control outside the trigger should use {@link open} / {@link close}\n * instead: the click reaching it has already run the document's\n * capture-phase outside-click listener, which closed the panel — so\n * `toggle()` reads `false` and flips it straight back open, and the panel\n * can never be closed from there.\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 /**\n * Enter or Space on a `trigger=\"hover\"` popover's trigger opens it, for the\n * keyboard user the pointer-only trigger left out — the trigger announces a\n * dialog popup with `aria-haspopup`, and hover is something a keyboard cannot\n * do. `wr-dropdown` opens a hover menu from the keyboard the same way. A click\n * popover needs none of this: its trigger's own click answers both keys.\n *\n * @internal\n */\n protected onActivateKey(event: Event): void {\n if (this.isTooltip() || this.trigger() !== 'hover' || this.isOpen()) return;\n event.preventDefault();\n this.openedByKeyboard = true;\n this.isOpen.set(true);\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 const paneClass = tooltip ? 'wr-tooltip-overlay' : 'wr-popover-overlay';\n\n // Kept as its own binding: it is the half a direction flip has to rebuild.\n const connected = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), this.isRtl()))\n .withPush(true)\n .withViewportMargin(VIEWPORT_MARGIN);\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.\n const overlayClass = toClassList(paneClass, this.panelClass());\n\n this.overlayRef = this.overlay.create({\n positionStrategy: connected,\n scrollStrategy: this.scrollStrategies.reposition(),\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 wrFollowDirection(this.overlayRef, this.dir, this.injector, direction =>\n connected.withPositions(wrMirrorOffsets(wrPopoverPositions(position, paneClass), direction === 'rtl'))\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' || this.openedByKeyboard) {\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- or keyboard-opened only — a hover popover must not pull the\n // caret out of what the user is typing in, and `scheduleHoverClose()`\n // would then dispose the pane out from under the focused element.\n pane.tabIndex = -1;\n pane.focus();\n // And it has to LEAVE with the panel. Non-modal means Tab is not\n // trapped, not that it walks out and strands the dialog open behind it:\n // the pane sits at the end of `<body>`, so Tab past its last control went\n // to the browser chrome and Shift+Tab past its first to the foot of the\n // page, each with `aria-expanded` still true. See `onPaneKeydown`.\n pane.addEventListener('keydown', this.onPaneKeydown);\n pane.addEventListener('focusout', this.onPaneFocusOut);\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 this.openedByKeyboard = false;\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 // Before the dispose: Chromium fires `focusout` for a focused node as it is\n // removed, and the pane is about to be.\n pane.removeEventListener('keydown', this.onPaneKeydown);\n pane.removeEventListener('focusout', this.onPaneFocusOut);\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) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.closed.emit();\n }\n }\n\n /**\n * Tab off either end of a click popover takes focus back to the trigger and\n * closes the panel — the disclosure pattern, for a non-modal popup whose DOM\n * sits nowhere near its trigger.\n *\n * Forward, the trigger is focused WITHOUT `preventDefault`: the browser's own\n * Tab then runs from there, so focus lands on whatever follows the trigger in\n * the page, which is where a panel rendered in place would have let it go.\n * Backward, the trigger itself is the destination, so the default is stopped.\n * The pane counts as the first stop (it precedes its content) and, when\n * nothing inside can take focus, as the last as well.\n *\n * The pane is disposed right here, not by the `isOpen` effect: that runs after\n * the browser's Tab, and a trigger that is the last stop before the overlay\n * container would send that Tab straight back into the still-attached pane.\n *\n * Stops are told by `tabIndex`, because `getFocusableElements` lists every\n * focusable element and a roving composite parks its other items at -1. What\n * that misreads — a native radio group, one stop that lists as several —\n * falls through to `onPaneFocusOut`, which still closes the panel; it just\n * cannot choose where focus goes.\n */\n private readonly onPaneKeydown = (event: KeyboardEvent): void => {\n const pane = this.overlayRef?.overlayElement;\n // A control inside that spends Tab on itself (`wr-mention` accepting a\n // suggestion) has said so by preventing it.\n if (!pane || event.key !== KEYS.TAB || event.defaultPrevented) return;\n const active = this.host.nativeElement.ownerDocument.activeElement;\n const stops = getFocusableElements(pane).filter(el => el.tabIndex >= 0);\n if (event.shiftKey) {\n if (active !== pane && active !== stops[0]) return;\n event.preventDefault();\n } else if (active !== (stops.at(-1) ?? pane)) {\n return;\n }\n wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.closeOverlay();\n this.isOpen.set(false);\n };\n\n /**\n * Focus that leaves the panel by any other road closes it, and is left where\n * it went — the close hands focus back only when it was still inside.\n *\n * A `null` destination is three different things, and only one of them is\n * leaving: Tab walking off the end of the document. The window losing focus\n * (switching tabs) and the focused control being removed from the panel\n * report `null` too, and closing for either would shut a panel the user is\n * still working in.\n */\n private readonly onPaneFocusOut = (event: FocusEvent): void => {\n const next = event.relatedTarget as Node | null;\n if (next ? this.holdsFocus(next) : this.keystroke.key !== KEYS.TAB) return;\n this.isOpen.set(false);\n };\n\n /**\n * Whether focus on `node` still belongs to this panel: inside the pane, on\n * the trigger (a press there is about to toggle it, and closing first would\n * have that click open it again), or in an overlay opened AFTER this one. A\n * `wr-date-picker` or `wr-dropdown` inside the panel moves focus into a pane\n * of its own, later in the same container, and closing under it would destroy\n * the control that opened it — the same stacking `WrOutsideClick` honours.\n */\n private holdsFocus(node: Node): boolean {\n const ref = this.overlayRef;\n if (!ref) return false;\n if (ref.overlayElement.contains(node) || this.host.nativeElement.contains(node)) return true;\n const box = ref.hostElement;\n return (\n (box.parentElement?.contains(node) ?? false) &&\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n (box.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0\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"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,IAAa,sBAAb,MAAa,oBAAmB;CAC9B,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,SAAS;CAC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AAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,WAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA;GAAA,QAAA;GAAA,QAAA;EAAA;EAAA,MAAA;GAAA,WAAA;IAAA,SAAA;IAAA,cAAA;IAAA,cAAA;IAAA,kBAAA;IAAA,iBAAA;IAAA,iBAAA;GAAA;GAAA,YAAA;IAAA,sBAAA;IAAA,sBAAA;IAAA,sBAAA;IAAA,yBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA,CAAA,WAAA;EAAA,UAAA;CAAA,CAAA;;AAAT,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAzBrB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,MAAM;IAMJ,OAAO;IACP,wBAAwB;IACxB,wBAAwB;IACxB,wBAAwB;IACxB,2BAA2B;IAC3B,WAAW;IACX,gBAAgB;IAChB,gBAAgB;IAIhB,oBAAoB;IACpB,mBAAmB;IACnB,mBAAmB;GACpB;EACF,CAAA"}
|
|
@@ -24,7 +24,7 @@ var WrProgress = class WrProgress {
|
|
|
24
24
|
classes = computed(() => `wr-progress wr-progress--${this.color()}`, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
25
25
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
26
26
|
minVersion: "12.0.0",
|
|
27
|
-
version: "22.2.
|
|
27
|
+
version: "22.2.5",
|
|
28
28
|
ngImport: i0,
|
|
29
29
|
type: WrProgress,
|
|
30
30
|
deps: [],
|
|
@@ -32,7 +32,7 @@ var WrProgress = class WrProgress {
|
|
|
32
32
|
});
|
|
33
33
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
34
34
|
minVersion: "17.1.0",
|
|
35
|
-
version: "22.2.
|
|
35
|
+
version: "22.2.5",
|
|
36
36
|
type: WrProgress,
|
|
37
37
|
isStandalone: true,
|
|
38
38
|
selector: "wr-progress",
|
|
@@ -79,7 +79,7 @@ var WrProgress = class WrProgress {
|
|
|
79
79
|
};
|
|
80
80
|
i0.ɵɵngDeclareClassMetadata({
|
|
81
81
|
minVersion: "12.0.0",
|
|
82
|
-
version: "22.2.
|
|
82
|
+
version: "22.2.5",
|
|
83
83
|
ngImport: i0,
|
|
84
84
|
type: WrProgress,
|
|
85
85
|
decorators: [{
|
|
@@ -85,7 +85,7 @@ var WrPullToRefresh = class WrPullToRefresh {
|
|
|
85
85
|
}
|
|
86
86
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
87
87
|
minVersion: "12.0.0",
|
|
88
|
-
version: "22.2.
|
|
88
|
+
version: "22.2.5",
|
|
89
89
|
ngImport: i0,
|
|
90
90
|
type: WrPullToRefresh,
|
|
91
91
|
deps: [],
|
|
@@ -93,7 +93,7 @@ var WrPullToRefresh = class WrPullToRefresh {
|
|
|
93
93
|
});
|
|
94
94
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
95
95
|
minVersion: "17.0.0",
|
|
96
|
-
version: "22.2.
|
|
96
|
+
version: "22.2.5",
|
|
97
97
|
type: WrPullToRefresh,
|
|
98
98
|
isStandalone: true,
|
|
99
99
|
selector: "wr-pull-to-refresh",
|
|
@@ -144,7 +144,7 @@ var WrPullToRefresh = class WrPullToRefresh {
|
|
|
144
144
|
};
|
|
145
145
|
i0.ɵɵngDeclareClassMetadata({
|
|
146
146
|
minVersion: "12.0.0",
|
|
147
|
-
version: "22.2.
|
|
147
|
+
version: "22.2.5",
|
|
148
148
|
ngImport: i0,
|
|
149
149
|
type: WrPullToRefresh,
|
|
150
150
|
decorators: [{
|
package/fesm2022/ngwr-qr.mjs
CHANGED
|
@@ -1012,7 +1012,7 @@ var WrQr = class WrQr {
|
|
|
1012
1012
|
}
|
|
1013
1013
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1014
1014
|
minVersion: "12.0.0",
|
|
1015
|
-
version: "22.2.
|
|
1015
|
+
version: "22.2.5",
|
|
1016
1016
|
ngImport: i0,
|
|
1017
1017
|
type: WrQr,
|
|
1018
1018
|
deps: [],
|
|
@@ -1020,7 +1020,7 @@ var WrQr = class WrQr {
|
|
|
1020
1020
|
});
|
|
1021
1021
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1022
1022
|
minVersion: "17.2.0",
|
|
1023
|
-
version: "22.2.
|
|
1023
|
+
version: "22.2.5",
|
|
1024
1024
|
type: WrQr,
|
|
1025
1025
|
isStandalone: true,
|
|
1026
1026
|
selector: "wr-qr",
|
|
@@ -1107,7 +1107,7 @@ var WrQr = class WrQr {
|
|
|
1107
1107
|
};
|
|
1108
1108
|
i0.ɵɵngDeclareClassMetadata({
|
|
1109
1109
|
minVersion: "12.0.0",
|
|
1110
|
-
version: "22.2.
|
|
1110
|
+
version: "22.2.5",
|
|
1111
1111
|
ngImport: i0,
|
|
1112
1112
|
type: WrQr,
|
|
1113
1113
|
decorators: [{
|
package/fesm2022/ngwr-radio.mjs
CHANGED
|
@@ -57,7 +57,7 @@ var WrRadio = class WrRadio {
|
|
|
57
57
|
}
|
|
58
58
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
59
59
|
minVersion: "12.0.0",
|
|
60
|
-
version: "22.2.
|
|
60
|
+
version: "22.2.5",
|
|
61
61
|
ngImport: i0,
|
|
62
62
|
type: WrRadio,
|
|
63
63
|
deps: [],
|
|
@@ -65,7 +65,7 @@ var WrRadio = class WrRadio {
|
|
|
65
65
|
});
|
|
66
66
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
67
67
|
minVersion: "17.0.0",
|
|
68
|
-
version: "22.2.
|
|
68
|
+
version: "22.2.5",
|
|
69
69
|
type: WrRadio,
|
|
70
70
|
isStandalone: true,
|
|
71
71
|
selector: "wr-radio",
|
|
@@ -123,7 +123,7 @@ var WrRadio = class WrRadio {
|
|
|
123
123
|
};
|
|
124
124
|
i0.ɵɵngDeclareClassMetadata({
|
|
125
125
|
minVersion: "12.0.0",
|
|
126
|
-
version: "22.2.
|
|
126
|
+
version: "22.2.5",
|
|
127
127
|
ngImport: i0,
|
|
128
128
|
type: WrRadio,
|
|
129
129
|
decorators: [{
|
|
@@ -223,7 +223,7 @@ var WrRadioGroup = class WrRadioGroup {
|
|
|
223
223
|
}
|
|
224
224
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
225
225
|
minVersion: "12.0.0",
|
|
226
|
-
version: "22.2.
|
|
226
|
+
version: "22.2.5",
|
|
227
227
|
ngImport: i0,
|
|
228
228
|
type: WrRadioGroup,
|
|
229
229
|
deps: [],
|
|
@@ -231,7 +231,7 @@ var WrRadioGroup = class WrRadioGroup {
|
|
|
231
231
|
});
|
|
232
232
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
233
233
|
minVersion: "17.1.0",
|
|
234
|
-
version: "22.2.
|
|
234
|
+
version: "22.2.5",
|
|
235
235
|
type: WrRadioGroup,
|
|
236
236
|
isStandalone: true,
|
|
237
237
|
selector: "wr-radio-group",
|
|
@@ -291,7 +291,7 @@ var WrRadioGroup = class WrRadioGroup {
|
|
|
291
291
|
};
|
|
292
292
|
i0.ɵɵngDeclareClassMetadata({
|
|
293
293
|
minVersion: "12.0.0",
|
|
294
|
-
version: "22.2.
|
|
294
|
+
version: "22.2.5",
|
|
295
295
|
ngImport: i0,
|
|
296
296
|
type: WrRadioGroup,
|
|
297
297
|
decorators: [{
|