ngwr 16.2.0 → 16.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/badge/styles/_tag.scss +73 -1
- package/calendar/styles/_index.scss +22 -0
- package/carousel/styles/_index.scss +53 -1
- package/cascader/styles/_rules.scss +7 -0
- package/color-picker/styles/_index.scss +21 -0
- package/date-picker/styles/_index.scss +19 -0
- package/dropdown/styles/_index.scss +13 -19
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert-testing.mjs +70 -0
- package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +17 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-aurora.mjs +3 -3
- package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
- package/fesm2022/ngwr-animations-confetti.mjs +3 -3
- package/fesm2022/ngwr-animations-decode.mjs +3 -3
- package/fesm2022/ngwr-animations-destruct.mjs +3 -3
- package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
- package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
- package/fesm2022/ngwr-animations-glitch.mjs +3 -3
- package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
- package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
- package/fesm2022/ngwr-animations-marquee.mjs +3 -3
- package/fesm2022/ngwr-animations-orbit.mjs +3 -3
- package/fesm2022/ngwr-animations-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
- package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
- package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-tilt.mjs +3 -3
- package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +129 -11
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
- package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger-testing.mjs +45 -0
- package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-testing.mjs +18 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +500 -73
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel-testing.mjs +24 -1
- package/fesm2022/ngwr-carousel-testing.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +73 -10
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +45 -37
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +153 -37
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +10 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare-testing.mjs +84 -0
- package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +28 -13
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-copy-value.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker-testing.mjs +30 -4
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +342 -69
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +59 -8
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +18 -18
- package/fesm2022/ngwr-directives.mjs +15 -15
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +51 -29
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +11 -3
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +70 -99
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +4 -3
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +186 -33
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +279 -16
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +30 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +664 -43
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +27 -8
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +27 -8
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +27 -8
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +27 -8
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +27 -8
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +27 -8
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +27 -8
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +27 -8
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +27 -8
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +27 -8
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +27 -8
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +27 -8
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +27 -8
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +27 -8
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +27 -8
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +27 -8
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +27 -8
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +27 -8
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +27 -8
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +27 -8
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +27 -8
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +27 -8
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number-testing.mjs +11 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +68 -7
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +23 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +24 -1
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +152 -36
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox.mjs +8 -8
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +8 -8
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +15 -15
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +175 -13
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +6 -3
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +31 -29
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +44 -63
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +7 -1
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +58 -156
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +50 -9
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-resizable-testing.mjs +113 -0
- package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
- package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-schema-form.mjs +416 -19
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select-testing.mjs +19 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +361 -84
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider-testing.mjs +6 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +21 -3
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list.mjs +29 -12
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +42 -11
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-testing.mjs +157 -3
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +1051 -74
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs-testing.mjs +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +15 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +11 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +128 -16
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +40 -19
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour-testing.mjs +13 -1
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tour.mjs +19 -15
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer-testing.mjs +6 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +24 -5
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +62 -2
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +978 -79
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +97 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +33 -22
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +156 -0
- package/graph/styles/_index.scss +87 -0
- package/i18n/ar.json +29 -8
- package/i18n/cs.json +29 -8
- package/i18n/de.json +29 -8
- package/i18n/en.json +29 -8
- package/i18n/es.json +29 -8
- package/i18n/fr.json +29 -8
- package/i18n/he.json +29 -8
- package/i18n/hi.json +29 -8
- package/i18n/id.json +29 -8
- package/i18n/it.json +29 -8
- package/i18n/ja.json +29 -8
- package/i18n/ko.json +29 -8
- package/i18n/nl.json +29 -8
- package/i18n/pl.json +29 -8
- package/i18n/pt.json +29 -8
- package/i18n/ru.json +29 -8
- package/i18n/sv.json +29 -8
- package/i18n/tr.json +29 -8
- package/i18n/uk.json +29 -8
- package/i18n/vi.json +29 -8
- package/i18n/zh-TW.json +29 -8
- package/i18n/zh.json +29 -8
- package/input/styles/_index.scss +68 -1
- package/input-otp/styles/_index.scss +14 -0
- package/llms-full.txt +53 -21
- package/llms.txt +57 -24
- package/overlay/styles/_arrow.scss +4 -4
- package/package.json +33 -1
- package/popconfirm/styles/_index.scss +3 -11
- package/progress/styles/_index.scss +32 -0
- package/schema-form/styles/_index.scss +78 -0
- package/schematics/collection.json +5 -0
- package/schematics/eject/index.js +158 -0
- package/schematics/eject/schema.js +8 -0
- package/schematics/eject/schema.json +24 -0
- package/schematics/eject/source.js +295 -0
- package/schematics/use/rule.js +2 -0
- package/schematics/use/symbol-map.json +5 -0
- package/select/styles/_index.scss +127 -22
- package/skills/ngwr/SKILL.md +31 -4
- package/skills/ngwr/references/catalog.md +9 -1
- package/slider/styles/_index.scss +22 -0
- package/table/styles/_index.scss +191 -3
- package/textarea/styles/_index.scss +80 -0
- package/theme/styles/_focus.scss +16 -1
- package/theme/styles/_motion.scss +5 -0
- package/transfer/styles/_index.scss +84 -0
- package/tree/styles/_index.scss +138 -5
- package/types/ngwr-alert-testing.d.ts +88 -0
- package/types/ngwr-badge.d.ts +72 -2
- package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
- package/types/ngwr-burger-testing.d.ts +51 -0
- package/types/ngwr-calendar-testing.d.ts +18 -6
- package/types/ngwr-calendar.d.ts +272 -22
- package/types/ngwr-carousel-testing.d.ts +27 -6
- package/types/ngwr-carousel.d.ts +42 -6
- package/types/ngwr-cascader.d.ts +13 -6
- package/types/ngwr-charts-chart-legend.d.ts +9 -4
- package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
- package/types/ngwr-charts-line-chart.d.ts +7 -4
- package/types/ngwr-color-picker-testing.d.ts +15 -4
- package/types/ngwr-color-picker.d.ts +76 -6
- package/types/ngwr-compare-testing.d.ts +72 -0
- package/types/ngwr-context-menu.d.ts +2 -0
- package/types/ngwr-date-picker-testing.d.ts +23 -8
- package/types/ngwr-date-picker.d.ts +100 -9
- package/types/ngwr-date.d.ts +71 -1
- package/types/ngwr-drawer.d.ts +9 -0
- package/types/ngwr-dropdown-testing.d.ts +20 -0
- package/types/ngwr-dropdown.d.ts +26 -6
- package/types/ngwr-event-calendar.d.ts +66 -8
- package/types/ngwr-file-upload-testing.d.ts +31 -2
- package/types/ngwr-file-upload.d.ts +156 -3
- package/types/ngwr-form.d.ts +47 -3
- package/types/ngwr-graph-testing.d.ts +36 -3
- package/types/ngwr-graph.d.ts +309 -13
- package/types/ngwr-input-number-testing.d.ts +10 -0
- package/types/ngwr-input-number.d.ts +30 -1
- package/types/ngwr-input-otp.d.ts +10 -0
- package/types/ngwr-input-testing.d.ts +30 -0
- package/types/ngwr-input.d.ts +54 -3
- package/types/ngwr-overlay.d.ts +84 -5
- package/types/ngwr-pipes.d.ts +2 -1
- package/types/ngwr-popconfirm-testing.d.ts +12 -3
- package/types/ngwr-popconfirm.d.ts +28 -3
- package/types/ngwr-popover-testing.d.ts +19 -2
- package/types/ngwr-popover.d.ts +22 -2
- package/types/ngwr-progress.d.ts +29 -1
- package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
- package/types/ngwr-resizable-testing.d.ts +116 -0
- package/types/ngwr-schema-form-testing.d.ts +260 -0
- package/types/ngwr-schema-form.d.ts +76 -6
- package/types/ngwr-select-testing.d.ts +20 -0
- package/types/ngwr-select.d.ts +149 -11
- package/types/ngwr-sidebar-testing.d.ts +176 -0
- package/types/ngwr-slider-testing.d.ts +3 -1
- package/types/ngwr-slider.d.ts +21 -1
- package/types/ngwr-sortable-list.d.ts +6 -0
- package/types/ngwr-stepper.d.ts +20 -11
- package/types/ngwr-table-testing.d.ts +122 -7
- package/types/ngwr-table.d.ts +572 -50
- package/types/ngwr-tabs-testing.d.ts +14 -17
- package/types/ngwr-tabs.d.ts +6 -0
- package/types/ngwr-textarea-testing.d.ts +10 -0
- package/types/ngwr-textarea.d.ts +48 -2
- package/types/ngwr-toast.d.ts +8 -1
- package/types/ngwr-tour-testing.d.ts +10 -0
- package/types/ngwr-tour.d.ts +11 -2
- package/types/ngwr-transfer-testing.d.ts +3 -0
- package/types/ngwr-transfer.d.ts +24 -1
- package/types/ngwr-tree-testing.d.ts +65 -1
- package/types/ngwr-tree.d.ts +335 -12
- package/types/ngwr-utils.d.ts +107 -1
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-dropdown.mjs","names":[],"sources":["../../../projects/lib/dropdown/dropdown-chain.ts","../../../projects/lib/dropdown/types/dropdown-position.ts","../../../projects/lib/dropdown/dropdown.ts","../../../projects/lib/dropdown/dropdown-menu.ts","../../../projects/lib/dropdown/dropdown-item.ts","../../../projects/lib/dropdown/dropdown-item.html","../../../projects/lib/dropdown/dropdown-submenu.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\n/** Open levels by their pane, so an item can find the level it was rendered in. */\nconst levels = new WeakMap<HTMLElement, WrDropdownLevel>();\n\n/**\n * One open menu of a dropdown: the root, or a submenu hanging off an item.\n *\n * Every level is its own overlay pane, a sibling of the others in the overlay\n * container, so neither the DOM nor the injector tree says which pane opened\n * which. This is that link.\n *\n * @internal\n */\nexport interface WrDropdownLevel {\n readonly pane: HTMLElement;\n /** `null` on the root menu. */\n readonly parent: WrDropdownLevel | null;\n /** The submenu open from one of this pane's items. */\n child: WrDropdownLevel | null;\n /** Close this level and every level below it. */\n close(): void;\n /** Root only: the pointer left a pane below for `related`. */\n pointerLeft?(related: EventTarget | null): void;\n}\n\n/** @internal */\nexport function wrDropdownRegisterLevel(level: WrDropdownLevel): void {\n levels.set(level.pane, level);\n if (level.parent) level.parent.child = level;\n}\n\n/** @internal */\nexport function wrDropdownReleaseLevel(level: WrDropdownLevel): void {\n levels.delete(level.pane);\n if (level.parent?.child === level) level.parent.child = null;\n}\n\n/** The open level `el` is rendered in. @internal */\nexport function wrDropdownLevelAround(el: HTMLElement): WrDropdownLevel | null {\n const pane = el.closest<HTMLElement>('.wr-dropdown-overlay');\n return (pane && levels.get(pane)) ?? null;\n}\n\n/** The level at or below `from` whose pane holds `node`. @internal */\nexport function wrDropdownLevelOf(from: WrDropdownLevel, node: unknown): WrDropdownLevel | null {\n if (!(node instanceof Node)) return null;\n for (let level: WrDropdownLevel | null = from; level; level = level.child) {\n if (level.pane.contains(node)) return level;\n }\n return null;\n}\n\n/** The focus stops of one pane. A disabled item is not one. @internal */\nexport function wrDropdownItems(pane: HTMLElement): HTMLElement[] {\n return Array.from(pane.querySelectorAll<HTMLElement>('.wr-dropdown-item:not(.wr-dropdown-item--disabled)'));\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\n/**\n * Where the dropdown menu opens, relative to the trigger.\n */\nexport type WrDropdownPosition =\n 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right';\n\n/**\n * The CDK geometry for each placement — one position, no fallbacks.\n *\n * No `offsetX` / `offsetY`, unlike `wr-popover`'s table: the gap between the\n * trigger and the menu is PADDING on the pane (`.wr-dropdown-overlay--<placement>`),\n * so the pointer crossing it is still over the overlay and a `trigger=\"hover\"`\n * menu does not close on the way in. It also means nothing here is\n * direction-dependent, which is why the directive needs no `wrMirrorOffsets`.\n *\n * @internal\n */\nexport const WR_DROPDOWN_POSITIONS: Record<WrDropdownPosition, ConnectedPosition> = {\n top: { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom' },\n 'top-start': { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n 'top-end': { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' },\n bottom: { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top' },\n 'bottom-start': { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n 'bottom-end': { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n left: { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center' },\n right: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center' },\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 menu that fits never moves.\n *\n * The same chains as `wr-popover`'s, restricted to the eight placements a\n * dropdown offers — which needs no editing, since every link in those eight\n * chains is itself one of the eight. Alignment is kept down the chain, a\n * block-axis placement only flips to its opposite, and a side placement may\n * also fall below or above, because on a phone neither side of a mid-page\n * trigger has the room. Once it has, the directive drops the side links for as\n * long as the menu stays open — the gap changes axis with the placement, so a\n * pane is only measured correctly against links on one axis at a time.\n *\n * Each list used to hold ONE position. With `withPush(true)` and nothing to\n * fall back to, a menu that did not fit below its trigger was pushed back up\n * over it instead — measured in Chromium at 1280×700 with a `bottom-start`\n * trigger 40px above the fold: the menu's top landed at 626, inside the\n * trigger's 630–660 box, covering the control that opened it.\n *\n * @internal\n */\nexport const WR_DROPDOWN_FALLBACKS: Record<WrDropdownPosition, readonly WrDropdownPosition[]> = {\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 right: ['right', 'left', 'bottom', 'top'],\n};\n\n/**\n * The list `withPositions()` wants — the chain in `WR_DROPDOWN_FALLBACKS` order,\n * as fresh objects, so the directive can tell which link the CDK landed on by\n * the IDENTITY of the position it reports back.\n *\n * Deliberately untagged, and this is where the dropdown parts from `wr-popover`,\n * which puts each placement's class in the position's own `panelClass`. The CDK\n * takes those classes off the pane BEFORE it measures it for fit, and here the\n * class carries the gap, as padding — so a tagged list is measured without its\n * gap. A menu with less room than that gap was judged to fit and the flexible\n * bounding box squeezed it instead: measured in Chromium at 1280×700 with 2px to\n * spare below the trigger, the menu's box shrank from 74px to 68px and its last\n * row ran through the bottom border. The directive writes the class itself, which\n * the CDK leaves alone, so the pane is measured with the gap it will render with.\n *\n * @internal\n */\nexport function wrDropdownPositions(position: WrDropdownPosition): ConnectedPosition[] {\n return WR_DROPDOWN_FALLBACKS[position].map(name => ({ ...WR_DROPDOWN_POSITIONS[name] }));\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n ViewContainerRef,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { WR_OVERLAY, WrOutsideClick, wrFollowDirection } from 'ngwr/overlay';\nimport { wrToClassList, wrCheckStyles, type WrClassInput, wrRestoreFocus } from 'ngwr/utils';\n\nimport {\n type WrDropdownLevel,\n wrDropdownItems,\n wrDropdownLevelOf,\n wrDropdownRegisterLevel,\n wrDropdownReleaseLevel,\n} from './dropdown-chain';\nimport type { WrDropdownMenu } from './dropdown-menu';\nimport {\n WR_DROPDOWN_FALLBACKS,\n WR_DROPDOWN_POSITIONS,\n type WrDropdownPosition,\n type WrDropdownTrigger,\n wrDropdownPositions,\n} from './types';\n\n/** Whether a placement puts the menu BESIDE its trigger, where the gap is inline padding. */\nconst isSidePlacement = (name: WrDropdownPosition): boolean => name === 'left' || name === 'right';\n\n/**\n * Attach to any element to open a `<wr-dropdown-menu>` as a CDK overlay.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"menu\" position=\"bottom-start\" trigger=\"click\">\n * Actions\n * </button>\n *\n * <wr-dropdown-menu #menu>\n * <wr-dropdown-item icon=\"copy\" (click)=\"copy()\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\" (click)=\"remove()\">Delete</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\nlet triggerUid = 0;\n\n@Directive({\n selector: '[wrDropdown]',\n exportAs: 'wrDropdown',\n host: {\n class: 'wr-dropdown-trigger',\n '[attr.id]': 'triggerId',\n '[attr.aria-haspopup]': '\"menu\"',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'isOpen() ? menu().menuId() : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class WrDropdown {\n /** Menu to open. Pass a `<wr-dropdown-menu>` template reference. */\n readonly menu = input.required<WrDropdownMenu>({ alias: 'wrDropdown' });\n\n /**\n * How the menu opens. `manual` leaves the host alone, for one menu shared by\n * many anchors: a click handler records the row, then calls `open()`.\n *\n * @default 'click'\n * @example\n * ```html\n * <button #trigger=\"wrDropdown\" [wrDropdown]=\"menu\" trigger=\"manual\" (click)=\"pick(row); trigger.open()\">\n * ```\n */\n readonly trigger = input<WrDropdownTrigger>('click');\n\n /**\n * Where the menu anchors relative to the trigger. A placement that does not\n * fit flips to the opposite side (a `left` / `right` menu may also drop below\n * or above, and then stays there until it closes), and the pane's\n * `wr-dropdown-overlay--<placement>` class names the side it actually took.\n * @default 'bottom-start'\n */\n readonly position = input<WrDropdownPosition>('bottom-start');\n\n /**\n * Draw a small arrow on the menu's edge, pointing at the trigger — the one\n * `wr-popover` and `wr-popconfirm` draw, from the same shared rule. It follows\n * the placement the menu actually took, so a flipped menu points the right\n * way, and it widens the gap to the trigger from 0.25rem to popover's 0.5rem\n * so the tip does not touch the control.\n *\n * Turn it off on a menu with no padding of its own (`--wr-dropdown-padding: 0`)\n * or one that clips its overflow: the square reaches about 3px inside the\n * menu's border, over the first row, and `overflow` cuts its tip off.\n * Read when the menu opens. @default true\n */\n readonly arrow = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Extra CSS classes for the menu'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 menu opens. */\n readonly opened = output<void>();\n\n /** Fires after the menu closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly overlay = inject(WR_OVERLAY);\n /**\n * The reading direction the open menu has to keep up with.\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 menu\n * that opens, with simply nothing ambient to follow.\n */\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 injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly openState = signal(false);\n\n /** Whether the menu is open. Read-only: `open()` and `close()` change it. */\n readonly isOpen = this.openState.asReadonly();\n\n /** The id used only when the consumer's element carries none of its own. */\n private readonly fallbackId = `wr-dropdown-trigger-${++triggerUid}`;\n\n /**\n * Id the menu names itself after. The trigger is the CONSUMER's own element, so\n * an `id` they already put there wins: overwriting it broke `<label for>`,\n * `document.getElementById` and any `aria-labelledby` aimed at that button from\n * elsewhere in their app. The generated one is only a fallback so the menu has\n * something to reference.\n *\n * A GETTER, read fresh by the host binding on every pass, rather than a field\n * resolved in the constructor. A static `id=\"…\"` is on the element before a\n * directive is instantiated and so was already honoured; a BOUND `[id]` is\n * not — it lands with the rest of the template's bindings, which run before\n * host bindings but after construction, so the constructor read an empty\n * string, fell through to the fallback, and the host binding then wrote that\n * fallback over the value the template had just set. Everything bound was\n * lost — `[id]`, `[attr.id]` and an interpolated `id=\"dd-{{ n }}\"` alike —\n * while the static form survived, which is the shape that makes it look like\n * a naming convention rather than a defect.\n *\n * `.id` rather than `getAttribute`: it is always a string, and an empty one is\n * no id at all, so it falls through to the fallback.\n */\n protected get triggerId(): string {\n return this.host.nativeElement.id || this.fallbackId;\n }\n\n private overlayRef: OverlayRef | null = null;\n\n /** The root menu's link to the submenus open below it. */\n private level: WrDropdownLevel | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n // The host view carrying `[wrDropdown]` can be destroyed while the menu is\n // open — a route change, or an `@if` around the trigger. The overlay lives\n // in the CDK container, not in that view, so nothing removes it unless we do.\n this.destroyRef.onDestroy(() => this.closeOverlay(false));\n\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n }\n\n /** Open the menu. */\n open(): void {\n this.openState.set(true);\n }\n\n /** Close the menu. */\n close(): void {\n this.openState.set(false);\n }\n\n /** Toggle the menu. */\n toggle(): void {\n this.openState.update(v => !v);\n }\n\n // Host listeners\n\n /** @internal */\n /**\n * Whether the pointer, rather than the keyboard, opened the current menu.\n *\n * A hover-opened menu must not take focus — the APG shows a menu on hover and\n * leaves the caret where it was — while a keyboard-opened one must. The\n * trigger MODE cannot answer that on its own: a `trigger=\"hover\"` menu is\n * still openable with Enter, and that open should focus the first item.\n */\n private openedByPointer = false;\n\n protected onClick(event: MouseEvent): void {\n if (this.trigger() !== 'click') return;\n event.stopPropagation();\n this.openedByPointer = false;\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.trigger() !== 'hover') return;\n // A POINTER opened this, so the menu must not take the keyboard with it —\n // see `openedByPointer`.\n this.openedByPointer = true;\n this.openState.set(true);\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n if (this.trigger() !== 'hover') return;\n const related = event.relatedTarget as Node | null;\n if (this.inMenus(related)) return;\n this.openState.set(false);\n }\n\n // Overlay management\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const requested = this.position();\n // A list of fresh objects, kept: the CDK reports the link it landed on by\n // handing that same object back, which is how the pane learns its placement.\n const positions = wrDropdownPositions(requested);\n\n // `withGrowAfterOpen`: past the first pass the CDK never gives the pane a box\n // larger than the last one it gave it. A menu measured with the wrong gap\n // (see the `positionChanges` handler below) is laid out once in a box sized\n // for the placement it is about to leave, and without this the pass that\n // corrects it inherits that box — a `right` menu with 70px below its trigger\n // moved above it into a 70px box and was squeezed all the same. The menu's\n // content does not change while it is open, so the box only ever grows back\n // to what the menu already needs.\n const connected = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(positions)\n .withPush(true)\n .withGrowAfterOpen(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy: connected,\n scrollStrategy: this.scrollStrategies.reposition(),\n // The menu starts on the placement it asked for, which is what the CDK\n // measures it with — see `wrDropdownPositions` for why that class must\n // already be on the pane rather than arrive with the position.\n panelClass: wrToClassList(\n 'wr-dropdown-overlay',\n `wr-dropdown-overlay--${requested}`,\n this.arrow() && 'wr-dropdown-overlay--arrow',\n this.panelClass()\n ),\n });\n\n // When the menu flips, the pane has to name the side it actually took: the\n // gap padding belongs on the edge facing the trigger and the arrow hangs off\n // that same edge, and both key off this class. The CDK emits synchronously\n // from inside its own `apply()`, so the swap lands in the same frame as the\n // move, and the next measurement (a scroll, a resize) sees the new gap.\n const ref = this.overlayRef;\n const pane = ref.overlayElement;\n // Index-aligned: `links[i]` is the object the CDK hands back for `chain[i]`.\n let chain = WR_DROPDOWN_FALLBACKS[requested];\n let links = positions;\n connected.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ connectionPair }) => {\n const landed = chain[links.indexOf(connectionPair)];\n if (!landed) return;\n for (const name of Object.keys(WR_DROPDOWN_POSITIONS)) {\n pane.classList.toggle(`wr-dropdown-overlay--${name}`, name === landed);\n }\n\n // A `left` / `right` menu that fell below or above was tested for fit\n // with the WRONG gap. The CDK measures the pane once per pass, for every\n // link, with the class on it at the time — the side placement's, whose\n // gap is inline padding — so the block link was judged by a box one gap\n // shorter than the one the swap above has just given it, and a menu with\n // less room than that gap was squeezed instead of flipped. Measured in\n // Chromium at 375×700, `right` with 76px below the trigger: the menu shrank\n // from 74px to 68px and its last row ran through the bottom border.\n //\n // So the sides are dropped for as long as this menu stays open and the\n // pane is measured again, now carrying the block gap, against block links\n // only. Not re-admitted afterwards: measured with a block gap, a side link\n // looks one gap narrower than it renders, which is the same mistake the\n // other way round and a menu that would flap between the two. Deferred to\n // a microtask because this runs INSIDE the CDK's `apply()`, which records\n // the link it landed on after this returns — a nested pass would have that\n // record overwritten by the outer one. A microtask still lands before the\n // frame is painted.\n if (isSidePlacement(landed) || !chain.some(isSidePlacement)) return;\n const kept = chain.flatMap((name, i) => (isSidePlacement(name) ? [] : [i]));\n chain = kept.map(i => chain[i]);\n links = kept.map(i => links[i]);\n connected.withPositions(links);\n queueMicrotask(() => {\n if (this.overlayRef === ref) ref.updatePosition();\n });\n });\n\n // `create()` above froze the direction into the ref as a string, and nothing\n // in the CDK ever revisits it. This menu is where it shows first: the docs\n // site keeps its own LTR/RTL switch INSIDE a dropdown, so the flip is made\n // from within the one panel that has to answer it.\n //\n // No callback — `WR_DROPDOWN_POSITIONS` anchors on `start` / `end` and\n // carries no `offsetX`, so letting the CDK re-resolve those against the new\n // direction is the whole job.\n wrFollowDirection(this.overlayRef, this.dir, this.injector);\n\n // Wire trigger id into menu so it can render aria-labelledby.\n this.menu().triggerId.set(this.triggerId);\n\n const portal = new TemplatePortal(this.menu().contentTpl(), this.vcr);\n this.overlayRef.attach(portal);\n\n this.level = {\n pane,\n parent: null,\n child: null,\n close: () => this.close(),\n pointerLeft: related => this.onMenusLeave(related),\n };\n wrDropdownRegisterLevel(this.level);\n\n // Focus the first menu item after the menu renders — unless a POINTER\n // opened it. This used to be unconditional, so merely sweeping the cursor\n // over a `trigger=\"hover\"` menu yanked the caret out of whatever the user\n // was typing; the APG's own rule is that hover shows a menu and does not\n // move focus into it. A keyboard open (Enter / Space / ArrowDown) still\n // focuses the first item, on a hover trigger too.\n if (!this.openedByPointer) queueMicrotask(() => this.focusItemAt(0));\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.openState.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n this.handleMenuKeydown(event);\n });\n\n if (this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayMouseLeave);\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.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayMouseLeave);\n }\n // Take the focus back before the pane goes, or it lands on `<body>` and the\n // next Tab starts from the top of the document. Only when focus is actually\n // inside the menu: closing a menu nobody was in must not steal the caret\n // from wherever the user has since moved.\n // Submenus count, and are read before they close: each hands focus to its\n // own item on the way out.\n const focusWasInside = this.inMenus(document.activeElement);\n if (this.level) {\n this.level.child?.close();\n wrDropdownReleaseLevel(this.level);\n this.level = null;\n }\n this.overlayRef.dispose();\n this.overlayRef = null;\n if (notify) {\n if (focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.closed.emit();\n }\n }\n\n // Keyboard handling\n\n /** @internal Trigger keydown — ArrowDown/Up/Enter/Space open the menu. */\n protected onKeydown(event: KeyboardEvent): void {\n if (this.isOpen() || this.trigger() === 'manual') return;\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n // Opened from the keyboard — including on a `hover` trigger, which stays\n // keyboard-operable — so the first item SHOULD take focus.\n this.openedByPointer = false;\n this.open();\n }\n }\n\n private handleMenuKeydown(event: KeyboardEvent): void {\n // The one keyboard handler of the whole chain: a submenu pane does not\n // listen, so the dispatcher brings its keys here, and the pane they were\n // typed in is the one the arrows walk.\n const level = this.level && wrDropdownLevelOf(this.level, event.target);\n const submenu = level?.parent ? level : null;\n const items = this.getItems(level?.pane);\n if (items.length === 0 && event.key !== 'Escape' && event.key !== 'Tab') return;\n const current = document.activeElement as HTMLElement | null;\n const idx = current ? items.indexOf(current) : -1;\n\n // CDK's keyboard dispatcher feeds this overlay EVERY document keydown, not\n // just the ones typed into it — and a `trigger=\"hover\"` menu is open with\n // the caret deliberately left wherever the user was (see `openedByPointer`).\n // So ownership is checked here rather than assumed: without it, ArrowDown /\n // ArrowUp / Home / End pressed in an unrelated field were `preventDefault`ed\n // and yanked focus into the menu. The trigger counts as ours — a hover menu\n // that the user has tabbed back to should still open to the keyboard.\n const typedIn = event.target;\n const ours = typedIn instanceof Node && (this.host.nativeElement.contains(typedIn) || level !== null);\n // Escape (and Tab) still close from anywhere — routing to the topmost\n // overlay regardless of focus is the dispatcher's whole job. Escape just\n // must not drag the caret onto the trigger from a field the user is in.\n if (!ours && event.key !== 'Escape' && event.key !== 'Tab') return;\n\n // Escape, or the arrow pointing back at the parent menu, steps out of a\n // submenu one level and lands on the item that owns it.\n if (submenu && (event.key === 'Escape' || event.key === (this.dir?.value === 'rtl' ? 'ArrowRight' : 'ArrowLeft'))) {\n event.preventDefault();\n submenu.close();\n return;\n }\n\n const focusAt = (index: number): void => {\n event.preventDefault();\n items[index]?.focus();\n };\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault();\n this.openState.set(false);\n if (ours) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n break;\n case 'Tab':\n // Tab closes the menu and moves on, in either direction, from the\n // TRIGGER. Left alone, the browser's Tab runs from the item, and the\n // menu sits in the overlay container at the end of `<body>`: Tab went\n // to the top of the page and Shift+Tab to the footer, and the close\n // then found focus outside the pane and had nothing to hand back. So\n // the trigger takes focus here, synchronously and with no\n // `preventDefault`, and the browser's own Tab carries on from it to\n // its real neighbour — by the time the close runs, focus is already\n // past the pane and `closeOverlay` leaves it there. Not from a field\n // outside the menu, for the reason Escape gives above.\n if (ours) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.openState.set(false);\n break;\n case 'ArrowDown':\n focusAt(idx < items.length - 1 ? idx + 1 : 0);\n break;\n case 'ArrowUp':\n focusAt(idx > 0 ? idx - 1 : items.length - 1);\n break;\n case 'Home':\n focusAt(0);\n break;\n case 'End':\n focusAt(items.length - 1);\n break;\n default:\n break;\n }\n }\n\n /** The focus stops of `pane`, the root menu's own by default. */\n private getItems(pane = this.overlayRef?.overlayElement): readonly HTMLElement[] {\n return pane ? wrDropdownItems(pane) : [];\n }\n\n /** Whether `node` is in the root menu or in a submenu open below it. */\n private inMenus(node: unknown): boolean {\n return this.level !== null && wrDropdownLevelOf(this.level, node) !== null;\n }\n\n /** A `trigger=\"hover\"` menu closes once the pointer is off the trigger and every pane. */\n private onMenusLeave(related: EventTarget | null): void {\n if (this.trigger() !== 'hover') return;\n if (related instanceof Node && this.host.nativeElement.contains(related)) return;\n if (this.inMenus(related)) return;\n this.openState.set(false);\n }\n\n private focusItemAt(index: number): void {\n const items = this.getItems();\n if (items.length === 0) return;\n const clamped = ((index % items.length) + items.length) % items.length;\n items[clamped]?.focus();\n }\n\n private readonly onOverlayMouseLeave = (event: MouseEvent): void => this.onMenusLeave(event.relatedTarget);\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, TemplateRef, ViewEncapsulation, signal, viewChild } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nlet uid = 0;\n\n/**\n * Holds the menu content rendered when a {@link WrDropdown} opens.\n *\n * The component itself doesn't render anywhere — the directive grabs its\n * internal `<ng-template>` and portals it into an overlay.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"menu\">Actions</button>\n * <wr-dropdown-menu #menu>\n * <wr-dropdown-item icon=\"copy\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\">Delete</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\n@Component({\n selector: 'wr-dropdown-menu',\n template:\n '<ng-template><div class=\"wr-dropdown-menu\" role=\"menu\" [attr.id]=\"menuId()\" [attr.aria-labelledby]=\"triggerId() || null\"><ng-content /></div></ng-template>',\n exportAs: 'wrDropdownMenu',\n encapsulation: ViewEncapsulation.None,\n // A BOUND display rather than a static `style` attribute: Angular writes a\n // binding through `style.setProperty`, which no CSP governs, while a real\n // `style=\"…\"` attribute is refused under `style-src 'self'` — and this host\n // would then lay out an empty box in the middle of the content.\n host: { '[style.display]': \"'none'\" },\n})\nexport class WrDropdownMenu {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n }\n\n /** The internal template the directive portals into the overlay. @internal */\n readonly contentTpl = viewChild.required(TemplateRef);\n\n /** Stable id used on the menu element and referenced from the trigger's `aria-controls`. */\n readonly menuId = signal(`wr-dropdown-menu-${++uid}`);\n\n /** Trigger element id, set by the directive for `aria-labelledby` wiring. */\n readonly triggerId = signal<string | null>(null);\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, ViewEncapsulation, computed, inject, input } from '@angular/core';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Single row inside a `<wr-dropdown-menu>`.\n *\n * @example\n * ```html\n * <wr-dropdown-item icon=\"copy\" (click)=\"copy()\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\" disabled>Delete</wr-dropdown-item>\n * ```\n */\n@Component({\n selector: 'wr-dropdown-item',\n templateUrl: './dropdown-item.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'menuitem',\n class: 'wr-dropdown-item',\n '[class]': 'classes()',\n '[attr.tabindex]': '-1',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '(keydown.enter)': 'activate($event)',\n '(keydown.space)': 'activate($event)',\n },\n imports: [WrIcon],\n})\nexport class WrDropdownItem {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n }\n\n /** Optional leading icon name. @default null */\n readonly icon = input<WrIconName | null>(null);\n\n /** Disable interaction (suppresses pointer + keyboard). @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n protected readonly classes = computed(() => {\n const parts: string[] = [];\n if (this.disabled()) parts.push('wr-dropdown-item--disabled');\n return parts.join(' ');\n });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** @internal Keyboard activation — fires the same click consumers bind to. */\n protected activate(event: Event): void {\n if (this.disabled()) return;\n event.preventDefault();\n this.host.nativeElement.click();\n }\n}\n","@if (icon(); as name) {\n <wr-icon class=\"wr-dropdown-item__icon\" [name]=\"name\" />\n}\n<span class=\"wr-dropdown-item__label\">\n <ng-content />\n</span>\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 ConnectedPosition, type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, Injector, ViewContainerRef, inject, input, signal } from '@angular/core';\n\nimport type { Subscription } from 'rxjs';\n\nimport { WR_OVERLAY, WrOutsideClick, wrFollowDirection } from 'ngwr/overlay';\nimport { wrCheckStyles, wrNumAttr, wrRestoreFocus } from 'ngwr/utils';\n\nimport {\n type WrDropdownLevel,\n wrDropdownItems,\n wrDropdownLevelAround,\n wrDropdownLevelOf,\n wrDropdownRegisterLevel,\n wrDropdownReleaseLevel,\n} from './dropdown-chain';\nimport type { WrDropdownMenu } from './dropdown-menu';\n\n/**\n * Beside the item at the inline end, then at the inline start, each first with\n * the tops aligned and then the bottoms. `start` / `end` and no offsets, so the\n * CDK mirrors the list under RTL by itself.\n */\nconst POSITIONS: ConnectedPosition[] = [\n { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n];\n\nlet itemUid = 0;\n\n/**\n * Put on a `<wr-dropdown-item>` to open another `<wr-dropdown-menu>` beside it.\n * The submenu's own items can carry it too, to any depth.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"file\">File</button>\n *\n * <wr-dropdown-menu #file>\n * <wr-dropdown-item>New</wr-dropdown-item>\n * <wr-dropdown-item [wrDropdownSubmenu]=\"exportAs\">Export</wr-dropdown-item>\n * </wr-dropdown-menu>\n *\n * <wr-dropdown-menu #exportAs>\n * <wr-dropdown-item (click)=\"export('csv')\">CSV</wr-dropdown-item>\n * <wr-dropdown-item (click)=\"export('pdf')\">PDF</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\n@Directive({\n selector: '[wrDropdownSubmenu]',\n exportAs: 'wrDropdownSubmenu',\n host: {\n class: 'wr-dropdown-submenu-trigger',\n '[attr.id]': 'itemId',\n 'aria-haspopup': 'menu',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'isOpen() ? menu().menuId() : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class WrDropdownSubmenu {\n /** Menu to open beside the item. Pass a `<wr-dropdown-menu>` template reference. */\n readonly menu = input.required<WrDropdownMenu>({ alias: 'wrDropdownSubmenu' });\n\n /** How long the pointer rests on the item before the submenu opens, in ms. @default 150 */\n readonly showDelay = input(150, { transform: wrNumAttr(150) });\n\n /**\n * How long the submenu stays once the pointer has left both the item and the\n * submenu, in ms. Long enough to cross a neighbouring item on the way in.\n * @default 150\n */\n readonly hideDelay = input(150, { transform: wrNumAttr(150) });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\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 injector = inject(Injector);\n\n private readonly openState = signal(false);\n\n /** Whether the submenu is open. Read-only: `open()` and `close()` change it. */\n readonly isOpen = this.openState.asReadonly();\n\n private readonly fallbackId = `wr-dropdown-submenu-trigger-${++itemUid}`;\n\n /** The consumer's own `id` wins, read fresh for the reason `WrDropdown` gives. */\n protected get itemId(): string {\n return this.host.nativeElement.id || this.fallbackId;\n }\n\n private overlayRef: OverlayRef | null = null;\n private level: WrDropdownLevel | null = null;\n private outside: Subscription | null = null;\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('dropdown');\n // The item is projected content: it outlives the pane it was rendered in,\n // and goes only with the consumer's own view.\n inject(DestroyRef).onDestroy(() => this.dispose(false));\n }\n\n /** Open the submenu and move focus to its first item. The item has to be in an open menu. */\n open(): void {\n this.show(true);\n }\n\n /** Close the submenu and every submenu below it. */\n close(): void {\n this.dispose(true);\n }\n\n /** @internal A real click opens; Enter and Space arrive as a click with no pointer behind it. */\n protected onClick(event: MouseEvent): void {\n this.show(event.detail === 0);\n }\n\n /** @internal The arrow pointing the way the menus cascade walks into the submenu. */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key !== (this.dir?.value === 'rtl' ? 'ArrowLeft' : 'ArrowRight') || this.disabled) return;\n event.preventDefault();\n this.show(true);\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n this.clearTimers();\n if (this.overlayRef || this.disabled) return;\n this.showTimer = setTimeout(() => this.show(false), this.showDelay());\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n this.clearTimers();\n if (!this.level || wrDropdownLevelOf(this.level, event.relatedTarget)) return;\n this.hideLater();\n }\n\n private get disabled(): boolean {\n return this.host.nativeElement.getAttribute('aria-disabled') === 'true';\n }\n\n /** A pointer shows the submenu and leaves the caret alone; the keyboard walks in. */\n private show(focus: boolean): void {\n this.clearTimers();\n if (!this.overlayRef) this.attach();\n if (focus && this.overlayRef) wrDropdownItems(this.overlayRef.overlayElement)[0]?.focus();\n }\n\n private attach(): void {\n const parent = wrDropdownLevelAround(this.host.nativeElement);\n if (!parent || this.disabled) return;\n parent.child?.close();\n\n const ref = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(POSITIONS)\n .withPush(true)\n .withGrowAfterOpen(true),\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: ['wr-dropdown-overlay', 'wr-dropdown-overlay--submenu'],\n });\n wrFollowDirection(ref, this.dir, this.injector);\n\n this.menu().triggerId.set(this.itemId);\n ref.attach(new TemplatePortal(this.menu().contentTpl(), this.vcr));\n\n const pane = ref.overlayElement;\n pane.addEventListener('mouseenter', this.clearTimers);\n pane.addEventListener('mouseleave', this.onPaneLeave);\n pane.addEventListener('click', this.onPaneClick);\n\n // Listening is also what keeps a click INSIDE this pane from reading as a\n // click outside the menus under it: the registry stops at the first pane\n // that holds the target.\n this.outside = this.outsideClick.outsidePointerEvents(ref).subscribe(event => {\n if (!this.host.nativeElement.contains(event.target as Node)) this.close();\n });\n\n // No `keydownEvents()` subscription: the CDK routes keys to the topmost\n // overlay that listens, and the root menu answers for every level.\n this.overlayRef = ref;\n this.level = { pane, parent, child: null, close: () => this.close() };\n wrDropdownRegisterLevel(this.level);\n this.openState.set(true);\n }\n\n private dispose(restoreFocus: boolean): void {\n this.clearTimers();\n const ref = this.overlayRef;\n const level = this.level;\n if (!ref || !level) return;\n\n // Read before the levels below go, since each hands focus up to its own item.\n const focusWasInside = wrDropdownLevelOf(level, document.activeElement) !== null;\n level.child?.close();\n wrDropdownReleaseLevel(level);\n\n const pane = ref.overlayElement;\n pane.removeEventListener('mouseenter', this.clearTimers);\n pane.removeEventListener('mouseleave', this.onPaneLeave);\n pane.removeEventListener('click', this.onPaneClick);\n this.outside?.unsubscribe();\n this.outside = null;\n\n ref.dispose();\n this.overlayRef = null;\n this.level = null;\n this.openState.set(false);\n if (restoreFocus && focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n }\n\n private hideLater(): void {\n this.hideTimer = setTimeout(() => this.close(), this.hideDelay());\n }\n\n private readonly clearTimers = (): void => {\n if (this.showTimer !== null) clearTimeout(this.showTimer);\n if (this.hideTimer !== null) clearTimeout(this.hideTimer);\n this.showTimer = this.hideTimer = null;\n };\n\n private readonly onPaneLeave = (event: MouseEvent): void => {\n const level = this.level;\n const related = event.relatedTarget;\n if (!level) return;\n if (related instanceof Node && this.host.nativeElement.contains(related)) return;\n if (wrDropdownLevelOf(level, related)) return;\n this.clearTimers();\n this.hideLater();\n\n let root = level;\n while (root.parent) root = root.parent;\n root.pointerLeft?.(related);\n };\n\n /** Choosing a leaf closes every submenu, up to the root menu's own item. */\n private readonly onPaneClick = (event: MouseEvent): void => {\n const item = event.target instanceof Element ? event.target.closest('.wr-dropdown-item') : null;\n if (!item || item.matches('.wr-dropdown-item--disabled, .wr-dropdown-submenu-trigger')) return;\n\n let top = this.level;\n while (top?.parent?.parent) top = top.parent;\n top?.close();\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAQA,MAAM,yBAAS,IAAI,QAAO;AAwB1B,SAAgB,wBAAwB,OAAsB;CAC5D,OAAO,IAAI,MAAM,MAAM,KAAK;CAC5B,IAAI,MAAM,QAAQ,MAAM,OAAO,QAAQ;AACzC;AAGA,SAAgB,uBAAuB,OAAsB;CAC3D,OAAO,OAAO,MAAM,IAAI;CACxB,IAAI,MAAM,QAAQ,UAAU,OAAO,MAAM,OAAO,QAAQ;AAC1D;AAGA,SAAgB,sBAAsB,IAAe;CACnD,MAAM,OAAO,GAAG,QAAqB,sBAAsB;CAC3D,QAAQ,QAAQ,OAAO,IAAI,IAAI,MAAM;AACvC;AAGA,SAAgB,kBAAkB,MAAuB,MAAa;CACpE,IAAI,EAAE,gBAAgB,OAAO,OAAO;CACpC,KAAK,IAAI,QAAgC,MAAM,OAAO,QAAQ,MAAM,OAClE,IAAI,MAAM,KAAK,SAAS,IAAI,GAAG,OAAO;CAExC,OAAO;AACT;AAGA,SAAgB,gBAAgB,MAAiB;CAC/C,OAAO,MAAM,KAAK,KAAK,iBAA8B,oDAAoD,CAAC;AAC5G;;;;;;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EAAA,UAAA;EAAA,MAAA;EAAiB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAjB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAiB,cAAA;EAAA,UAAA;EAAA,QAAA;GAAA,MAAA;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;EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,iBAAA,OAAA;GAAA,WAAA;IAAA,SAAA;IAAA,WAAA;IAAA,cAAA;IAAA,cAAA;GAAA;GAAA,YAAA;IAAA,WAAA;IAAA,sBAAA;IAAA,sBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA,CAAA,mBAAA;EAAA,UAAA;CAAA,CAAA;;AAAjB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAf7B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,MAAM;IACJ,OAAO;IACP,aAAa;IACb,iBAAiB;IACjB,wBAAwB;IACxB,wBAAwB;IACxB,WAAW;IACX,aAAa;IACb,gBAAgB;IAChB,gBAAgB;GACjB;EACF,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-dropdown.mjs","names":[],"sources":["../../../projects/lib/dropdown/dropdown-chain.ts","../../../projects/lib/dropdown/types/dropdown-position.ts","../../../projects/lib/dropdown/dropdown.ts","../../../projects/lib/dropdown/dropdown-menu.ts","../../../projects/lib/dropdown/dropdown-item.ts","../../../projects/lib/dropdown/dropdown-item.html","../../../projects/lib/dropdown/dropdown-submenu.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 { wrTypeahead } from 'ngwr/utils';\n\n/** Open levels by their pane, so an item can find the level it was rendered in. */\nconst levels = new WeakMap<HTMLElement, WrDropdownLevel>();\n\n/**\n * Type a letter to move to the next item of this pane that starts with it.\n *\n * On the pane and in the capture phase, so each level keeps its own run and a\n * Space that belongs to one (\"save a\" for \"Save as\") stops before the item's\n * own Space activates it. The listener goes with the pane.\n */\nfunction listenForTypeahead(pane: HTMLElement, locale?: () => string | undefined): void {\n const typeahead = wrTypeahead({ locale });\n pane.addEventListener(\n 'keydown',\n event => {\n const items = wrDropdownItems(pane);\n const index = typeahead.handleKey(\n event,\n items.map(item => item.textContent),\n items.indexOf(document.activeElement as HTMLElement)\n );\n if (index === null) return;\n event.preventDefault();\n if (event.key === ' ') event.stopPropagation();\n items[index]?.focus();\n },\n true\n );\n}\n\n/**\n * One open menu of a dropdown: the root, or a submenu hanging off an item.\n *\n * Every level is its own overlay pane, a sibling of the others in the overlay\n * container, so neither the DOM nor the injector tree says which pane opened\n * which. This is that link.\n *\n * @internal\n */\nexport interface WrDropdownLevel {\n readonly pane: HTMLElement;\n /** `null` on the root menu. */\n readonly parent: WrDropdownLevel | null;\n /** The submenu open from one of this pane's items. */\n child: WrDropdownLevel | null;\n /** Close this level and every level below it. */\n close(): void;\n /** Root only: the pointer left a pane below for `related`. */\n pointerLeft?(related: EventTarget | null): void;\n}\n\n/**\n * `locale` is the interface language, for the type-ahead's case folding.\n *\n * @internal\n */\nexport function wrDropdownRegisterLevel(level: WrDropdownLevel, locale?: () => string | undefined): void {\n levels.set(level.pane, level);\n if (level.parent) level.parent.child = level;\n listenForTypeahead(level.pane, locale);\n}\n\n/** @internal */\nexport function wrDropdownReleaseLevel(level: WrDropdownLevel): void {\n levels.delete(level.pane);\n if (level.parent?.child === level) level.parent.child = null;\n}\n\n/** The open level `el` is rendered in. @internal */\nexport function wrDropdownLevelAround(el: HTMLElement): WrDropdownLevel | null {\n const pane = el.closest<HTMLElement>('.wr-dropdown-overlay');\n return (pane && levels.get(pane)) ?? null;\n}\n\n/** The level at or below `from` whose pane holds `node`. @internal */\nexport function wrDropdownLevelOf(from: WrDropdownLevel, node: unknown): WrDropdownLevel | null {\n if (!(node instanceof Node)) return null;\n for (let level: WrDropdownLevel | null = from; level; level = level.child) {\n if (level.pane.contains(node)) return level;\n }\n return null;\n}\n\n/** The focus stops of one pane. A disabled item is not one. @internal */\nexport function wrDropdownItems(pane: HTMLElement): HTMLElement[] {\n return Array.from(pane.querySelectorAll<HTMLElement>('.wr-dropdown-item:not(.wr-dropdown-item--disabled)'));\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\nimport { type WrAnchoredPosition, wrAnchoredPositions } from 'ngwr/overlay';\n\n/**\n * Where the dropdown menu opens, relative to the trigger.\n */\nexport type WrDropdownPosition = WrAnchoredPosition;\n\n/**\n * The list `withPositions()` wants — the shared fallback chain `wr-popover`\n * walks, as fresh objects, so the directive can tell which link the CDK landed\n * on by the IDENTITY of the position it reports back.\n *\n * No gap, unlike `wr-popover`'s list: the distance between the trigger and the\n * menu is PADDING on the pane (`.wr-dropdown-overlay--<placement>`), so the\n * pointer crossing it is still over the overlay and a `trigger=\"hover\"` menu\n * does not close on the way in. It also means nothing here is\n * direction-dependent, which is why the directive needs no `wrMirrorOffsets`.\n *\n * Deliberately untagged too, where `wr-popover` puts each placement's class in\n * the position's own `panelClass`. The CDK takes those classes off the pane\n * BEFORE it measures it for fit, and here the class carries the gap, as padding\n * — so a tagged list is measured without its gap. A menu with less room than\n * that gap was judged to fit and the flexible bounding box squeezed it instead:\n * measured in Chromium at 1280×700 with 2px to spare below the trigger, the\n * menu's box shrank from 74px to 68px and its last row ran through the bottom\n * border. The directive writes the class itself, which the CDK leaves alone, so\n * the pane is measured with the gap it will render with. Once a side placement\n * has fallen below or above, the directive drops the side links for as long as\n * the menu stays open — the gap changes axis with the placement, so a pane is\n * only measured correctly against links on one axis at a time.\n *\n * @internal\n */\nexport function wrDropdownPositions(position: WrDropdownPosition): ConnectedPosition[] {\n return wrAnchoredPositions(position);\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n DestroyRef,\n Directive,\n ElementRef,\n Injector,\n ViewContainerRef,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport {\n WR_ANCHORED_FALLBACKS,\n WR_ANCHORED_POSITIONS,\n WR_OVERLAY,\n WrOutsideClick,\n wrFollowDirection,\n} from 'ngwr/overlay';\nimport { WR_LIVE_LOCALE, wrToClassList, wrCheckStyles, type WrClassInput, wrRestoreFocus } from 'ngwr/utils';\n\nimport {\n type WrDropdownLevel,\n wrDropdownItems,\n wrDropdownLevelOf,\n wrDropdownRegisterLevel,\n wrDropdownReleaseLevel,\n} from './dropdown-chain';\nimport type { WrDropdownMenu } from './dropdown-menu';\nimport { type WrDropdownPosition, type WrDropdownTrigger, wrDropdownPositions } from './types';\n\n/** Whether a placement puts the menu BESIDE its trigger, where the gap is inline padding. */\nconst isSidePlacement = (name: WrDropdownPosition): boolean => name.startsWith('left') || name.startsWith('right');\n\n/**\n * Attach to any element to open a `<wr-dropdown-menu>` as a CDK overlay.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"menu\" position=\"bottom-start\" trigger=\"click\">\n * Actions\n * </button>\n *\n * <wr-dropdown-menu #menu>\n * <wr-dropdown-item icon=\"copy\" (click)=\"copy()\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\" (click)=\"remove()\">Delete</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\nlet triggerUid = 0;\n\n@Directive({\n selector: '[wrDropdown]',\n exportAs: 'wrDropdown',\n host: {\n class: 'wr-dropdown-trigger',\n '[class.wr-dropdown-trigger--disabled]': 'disabled()',\n '[attr.id]': 'triggerId',\n '[attr.aria-haspopup]': 'disabled() ? null : \"menu\"',\n '[attr.aria-expanded]': 'disabled() ? null : isOpen()',\n '[attr.aria-controls]': 'isOpen() ? menu().menuId() : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class WrDropdown {\n /** Menu to open. Pass a `<wr-dropdown-menu>` template reference. */\n readonly menu = input.required<WrDropdownMenu>({ alias: 'wrDropdown' });\n\n /**\n * How the menu opens. `manual` leaves the host alone, for one menu shared by\n * many anchors: a click handler records the row, then calls `open()`.\n *\n * @default 'click'\n * @example\n * ```html\n * <button #trigger=\"wrDropdown\" [wrDropdown]=\"menu\" trigger=\"manual\" (click)=\"pick(row); trigger.open()\">\n * ```\n */\n readonly trigger = input<WrDropdownTrigger>('click');\n\n /**\n * Where the menu anchors relative to the trigger: the twelve placements\n * `wr-popover` takes. A placement that does not fit flips to the opposite side\n * (a `left*` / `right*` menu may also drop below or above, and then stays\n * there until it closes), and the pane's\n * `wr-dropdown-overlay--<placement>` class names the side it actually took.\n * @default 'bottom-start'\n */\n readonly position = input<WrDropdownPosition>('bottom-start');\n\n /**\n * Draw a small arrow on the menu's edge, pointing at the trigger — the one\n * `wr-popover` and `wr-popconfirm` draw, from the same shared rule. It follows\n * the placement the menu actually took, so a flipped menu points the right\n * way, and it widens the gap to the trigger from 0.25rem to popover's 0.5rem\n * so the tip does not touch the control.\n *\n * Turn it off on a menu with no padding of its own (`--wr-dropdown-padding: 0`)\n * or one that clips its overflow: the square reaches about 3px inside the\n * menu's border, over the first row, and `overflow` cuts its tip off.\n * Read when the menu opens. @default true\n */\n readonly arrow = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Turns the trigger off: no click, hover or key opens the menu, `open()` and\n * `toggle()` do nothing (a `manual` trigger included), and an open menu\n * closes. The host publishes no popup ARIA meanwhile and carries\n * `wr-dropdown-trigger--disabled`.\n *\n * The host's own `disabled` stays yours: the directive never sets it.\n *\n * @default false\n */\n readonly disabled = input(false, { alias: 'wrDropdownDisabled', transform: coerceBooleanProperty });\n\n /**\n * Extra CSS classes for the menu'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 menu opens. */\n readonly opened = output<void>();\n\n /** Fires after the menu closes. */\n readonly closed = output<void>();\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly overlay = inject(WR_OVERLAY);\n /**\n * The reading direction the open menu has to keep up with.\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 menu\n * that opens, with simply nothing ambient to follow.\n */\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 injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly liveLocale = inject(WR_LIVE_LOCALE, { optional: true });\n\n private readonly openState = signal(false);\n\n /** Whether the menu is open. Read-only: `open()` and `close()` change it. */\n readonly isOpen = this.openState.asReadonly();\n\n /** The id used only when the consumer's element carries none of its own. */\n private readonly fallbackId = `wr-dropdown-trigger-${++triggerUid}`;\n\n /**\n * Id the menu names itself after. The trigger is the CONSUMER's own element, so\n * an `id` they already put there wins: overwriting it broke `<label for>`,\n * `document.getElementById` and any `aria-labelledby` aimed at that button from\n * elsewhere in their app. The generated one is only a fallback so the menu has\n * something to reference.\n *\n * A GETTER, read fresh by the host binding on every pass, rather than a field\n * resolved in the constructor. A static `id=\"…\"` is on the element before a\n * directive is instantiated and so was already honoured; a BOUND `[id]` is\n * not — it lands with the rest of the template's bindings, which run before\n * host bindings but after construction, so the constructor read an empty\n * string, fell through to the fallback, and the host binding then wrote that\n * fallback over the value the template had just set. Everything bound was\n * lost — `[id]`, `[attr.id]` and an interpolated `id=\"dd-{{ n }}\"` alike —\n * while the static form survived, which is the shape that makes it look like\n * a naming convention rather than a defect.\n *\n * `.id` rather than `getAttribute`: it is always a string, and an empty one is\n * no id at all, so it falls through to the fallback.\n */\n protected get triggerId(): string {\n return this.host.nativeElement.id || this.fallbackId;\n }\n\n private overlayRef: OverlayRef | null = null;\n\n /** The root menu's link to the submenus open below it. */\n private level: WrDropdownLevel | null = null;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n // The host view carrying `[wrDropdown]` can be destroyed while the menu is\n // open — a route change, or an `@if` around the trigger. The overlay lives\n // in the CDK container, not in that view, so nothing removes it unless we do.\n this.destroyRef.onDestroy(() => this.closeOverlay(false));\n\n effect(() => {\n if (this.isOpen()) {\n this.openOverlay();\n } else {\n this.closeOverlay();\n }\n });\n effect(() => {\n if (this.disabled()) this.openState.set(false);\n });\n }\n\n /** Open the menu. Does nothing while the trigger is disabled. */\n open(): void {\n if (this.disabled()) return;\n this.openState.set(true);\n }\n\n /** Close the menu. */\n close(): void {\n this.openState.set(false);\n }\n\n /** Toggle the menu. */\n toggle(): void {\n if (this.isOpen()) this.close();\n else this.open();\n }\n\n // Host listeners\n\n /** @internal */\n /**\n * Whether the pointer, rather than the keyboard, opened the current menu.\n *\n * A hover-opened menu must not take focus — the APG shows a menu on hover and\n * leaves the caret where it was — while a keyboard-opened one must. The\n * trigger MODE cannot answer that on its own: a `trigger=\"hover\"` menu is\n * still openable with Enter, and that open should focus the first item.\n */\n private openedByPointer = false;\n\n protected onClick(event: MouseEvent): void {\n if (this.disabled() || this.trigger() !== 'click') return;\n event.stopPropagation();\n this.openedByPointer = false;\n this.toggle();\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n if (this.trigger() !== 'hover') return;\n // A POINTER opened this, so the menu must not take the keyboard with it —\n // see `openedByPointer`.\n this.openedByPointer = true;\n this.open();\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n if (this.trigger() !== 'hover') return;\n const related = event.relatedTarget as Node | null;\n if (this.inMenus(related)) return;\n this.openState.set(false);\n }\n\n // Overlay management\n\n private openOverlay(): void {\n if (this.overlayRef) return;\n\n const requested = this.position();\n // A list of fresh objects, kept: the CDK reports the link it landed on by\n // handing that same object back, which is how the pane learns its placement.\n const positions = wrDropdownPositions(requested);\n\n // `withGrowAfterOpen`: past the first pass the CDK never gives the pane a box\n // larger than the last one it gave it. A menu measured with the wrong gap\n // (see the `positionChanges` handler below) is laid out once in a box sized\n // for the placement it is about to leave, and without this the pass that\n // corrects it inherits that box — a `right` menu with 70px below its trigger\n // moved above it into a 70px box and was squeezed all the same. The menu's\n // content does not change while it is open, so the box only ever grows back\n // to what the menu already needs.\n const connected = this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(positions)\n .withPush(true)\n .withGrowAfterOpen(true);\n\n this.overlayRef = this.overlay.create({\n positionStrategy: connected,\n scrollStrategy: this.scrollStrategies.reposition(),\n // The menu starts on the placement it asked for, which is what the CDK\n // measures it with — see `wrDropdownPositions` for why that class must\n // already be on the pane rather than arrive with the position.\n panelClass: wrToClassList(\n 'wr-dropdown-overlay',\n `wr-dropdown-overlay--${requested}`,\n this.arrow() && 'wr-dropdown-overlay--arrow',\n this.panelClass()\n ),\n });\n\n // When the menu flips, the pane has to name the side it actually took: the\n // gap padding belongs on the edge facing the trigger and the arrow hangs off\n // that same edge, and both key off this class. The CDK emits synchronously\n // from inside its own `apply()`, so the swap lands in the same frame as the\n // move, and the next measurement (a scroll, a resize) sees the new gap.\n const ref = this.overlayRef;\n const pane = ref.overlayElement;\n // Index-aligned: `links[i]` is the object the CDK hands back for `chain[i]`.\n let chain = WR_ANCHORED_FALLBACKS[requested];\n let links = positions;\n connected.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ connectionPair }) => {\n const landed = chain[links.indexOf(connectionPair)];\n if (!landed) return;\n for (const name of Object.keys(WR_ANCHORED_POSITIONS)) {\n pane.classList.toggle(`wr-dropdown-overlay--${name}`, name === landed);\n }\n\n // A `left` / `right` menu that fell below or above was tested for fit\n // with the WRONG gap. The CDK measures the pane once per pass, for every\n // link, with the class on it at the time — the side placement's, whose\n // gap is inline padding — so the block link was judged by a box one gap\n // shorter than the one the swap above has just given it, and a menu with\n // less room than that gap was squeezed instead of flipped. Measured in\n // Chromium at 375×700, `right` with 76px below the trigger: the menu shrank\n // from 74px to 68px and its last row ran through the bottom border.\n //\n // So the sides are dropped for as long as this menu stays open and the\n // pane is measured again, now carrying the block gap, against block links\n // only. Not re-admitted afterwards: measured with a block gap, a side link\n // looks one gap narrower than it renders, which is the same mistake the\n // other way round and a menu that would flap between the two. Deferred to\n // a microtask because this runs INSIDE the CDK's `apply()`, which records\n // the link it landed on after this returns — a nested pass would have that\n // record overwritten by the outer one. A microtask still lands before the\n // frame is painted.\n if (isSidePlacement(landed) || !chain.some(isSidePlacement)) return;\n const kept = chain.flatMap((name, i) => (isSidePlacement(name) ? [] : [i]));\n chain = kept.map(i => chain[i]);\n links = kept.map(i => links[i]);\n connected.withPositions(links);\n queueMicrotask(() => {\n if (this.overlayRef === ref) ref.updatePosition();\n });\n });\n\n // `create()` above froze the direction into the ref as a string, and nothing\n // in the CDK ever revisits it. This menu is where it shows first: the docs\n // site keeps its own LTR/RTL switch INSIDE a dropdown, so the flip is made\n // from within the one panel that has to answer it.\n //\n // No callback — `WR_ANCHORED_POSITIONS` anchors on `start` / `end` and\n // carries no `offsetX`, so letting the CDK re-resolve those against the new\n // direction is the whole job.\n wrFollowDirection(this.overlayRef, this.dir, this.injector);\n\n // Wire trigger id into menu so it can render aria-labelledby.\n this.menu().triggerId.set(this.triggerId);\n\n const portal = new TemplatePortal(this.menu().contentTpl(), this.vcr);\n this.overlayRef.attach(portal);\n\n this.level = {\n pane,\n parent: null,\n child: null,\n close: () => this.close(),\n pointerLeft: related => this.onMenusLeave(related),\n };\n wrDropdownRegisterLevel(this.level, () => this.liveLocale?.());\n\n // Focus the first menu item after the menu renders — unless a POINTER\n // opened it. This used to be unconditional, so merely sweeping the cursor\n // over a `trigger=\"hover\"` menu yanked the caret out of whatever the user\n // was typing; the APG's own rule is that hover shows a menu and does not\n // move focus into it. A keyboard open (Enter / Space / ArrowDown) still\n // focuses the first item, on a hover trigger too.\n if (!this.openedByPointer) queueMicrotask(() => this.focusItemAt(0));\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.openState.set(false);\n });\n\n this.overlayRef\n .keydownEvents()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n this.handleMenuKeydown(event);\n });\n\n if (this.trigger() === 'hover') {\n this.overlayRef.overlayElement.addEventListener('mouseleave', this.onOverlayMouseLeave);\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.trigger() === 'hover') {\n this.overlayRef.overlayElement.removeEventListener('mouseleave', this.onOverlayMouseLeave);\n }\n // Take the focus back before the pane goes, or it lands on `<body>` and the\n // next Tab starts from the top of the document. Only when focus is actually\n // inside the menu: closing a menu nobody was in must not steal the caret\n // from wherever the user has since moved.\n // Submenus count, and are read before they close: each hands focus to its\n // own item on the way out.\n const focusWasInside = this.inMenus(document.activeElement);\n if (this.level) {\n this.level.child?.close();\n wrDropdownReleaseLevel(this.level);\n this.level = null;\n }\n this.overlayRef.dispose();\n this.overlayRef = null;\n if (notify) {\n if (focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.closed.emit();\n }\n }\n\n // Keyboard handling\n\n /** @internal Trigger keydown — ArrowDown/Up/Enter/Space open the menu. */\n protected onKeydown(event: KeyboardEvent): void {\n if (this.disabled() || this.isOpen() || this.trigger() === 'manual') return;\n if (event.key === 'ArrowDown' || event.key === 'ArrowUp' || event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n // Opened from the keyboard — including on a `hover` trigger, which stays\n // keyboard-operable — so the first item SHOULD take focus.\n this.openedByPointer = false;\n this.open();\n }\n }\n\n private handleMenuKeydown(event: KeyboardEvent): void {\n // The one keyboard handler of the whole chain: a submenu pane does not\n // listen, so the dispatcher brings its keys here, and the pane they were\n // typed in is the one the arrows walk.\n const level = this.level && wrDropdownLevelOf(this.level, event.target);\n const submenu = level?.parent ? level : null;\n const items = this.getItems(level?.pane);\n if (items.length === 0 && event.key !== 'Escape' && event.key !== 'Tab') return;\n const current = document.activeElement as HTMLElement | null;\n const idx = current ? items.indexOf(current) : -1;\n\n // CDK's keyboard dispatcher feeds this overlay EVERY document keydown, not\n // just the ones typed into it — and a `trigger=\"hover\"` menu is open with\n // the caret deliberately left wherever the user was (see `openedByPointer`).\n // So ownership is checked here rather than assumed: without it, ArrowDown /\n // ArrowUp / Home / End pressed in an unrelated field were `preventDefault`ed\n // and yanked focus into the menu. The trigger counts as ours — a hover menu\n // that the user has tabbed back to should still open to the keyboard.\n const typedIn = event.target;\n const ours = typedIn instanceof Node && (this.host.nativeElement.contains(typedIn) || level !== null);\n // Escape (and Tab) still close from anywhere — routing to the topmost\n // overlay regardless of focus is the dispatcher's whole job. Escape just\n // must not drag the caret onto the trigger from a field the user is in.\n if (!ours && event.key !== 'Escape' && event.key !== 'Tab') return;\n\n // Escape, or the arrow pointing back at the parent menu, steps out of a\n // submenu one level and lands on the item that owns it.\n if (submenu && (event.key === 'Escape' || event.key === (this.dir?.value === 'rtl' ? 'ArrowRight' : 'ArrowLeft'))) {\n event.preventDefault();\n submenu.close();\n return;\n }\n\n const focusAt = (index: number): void => {\n event.preventDefault();\n items[index]?.focus();\n };\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault();\n this.openState.set(false);\n if (ours) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n break;\n case 'Tab':\n // Tab closes the menu and moves on, in either direction, from the\n // TRIGGER. Left alone, the browser's Tab runs from the item, and the\n // menu sits in the overlay container at the end of `<body>`: Tab went\n // to the top of the page and Shift+Tab to the footer, and the close\n // then found focus outside the pane and had nothing to hand back. So\n // the trigger takes focus here, synchronously and with no\n // `preventDefault`, and the browser's own Tab carries on from it to\n // its real neighbour — by the time the close runs, focus is already\n // past the pane and `closeOverlay` leaves it there. Not from a field\n // outside the menu, for the reason Escape gives above.\n if (ours) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n this.openState.set(false);\n break;\n case 'ArrowDown':\n focusAt(idx < items.length - 1 ? idx + 1 : 0);\n break;\n case 'ArrowUp':\n focusAt(idx > 0 ? idx - 1 : items.length - 1);\n break;\n case 'Home':\n focusAt(0);\n break;\n case 'End':\n focusAt(items.length - 1);\n break;\n default:\n break;\n }\n }\n\n /** The focus stops of `pane`, the root menu's own by default. */\n private getItems(pane = this.overlayRef?.overlayElement): readonly HTMLElement[] {\n return pane ? wrDropdownItems(pane) : [];\n }\n\n /** Whether `node` is in the root menu or in a submenu open below it. */\n private inMenus(node: unknown): boolean {\n return this.level !== null && wrDropdownLevelOf(this.level, node) !== null;\n }\n\n /** A `trigger=\"hover\"` menu closes once the pointer is off the trigger and every pane. */\n private onMenusLeave(related: EventTarget | null): void {\n if (this.trigger() !== 'hover') return;\n if (related instanceof Node && this.host.nativeElement.contains(related)) return;\n if (this.inMenus(related)) return;\n this.openState.set(false);\n }\n\n private focusItemAt(index: number): void {\n const items = this.getItems();\n if (items.length === 0) return;\n const clamped = ((index % items.length) + items.length) % items.length;\n items[clamped]?.focus();\n }\n\n private readonly onOverlayMouseLeave = (event: MouseEvent): void => this.onMenusLeave(event.relatedTarget);\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, TemplateRef, ViewEncapsulation, signal, viewChild } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nlet uid = 0;\n\n/**\n * Holds the menu content rendered when a {@link WrDropdown} opens.\n *\n * The component itself doesn't render anywhere — the directive grabs its\n * internal `<ng-template>` and portals it into an overlay.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"menu\">Actions</button>\n * <wr-dropdown-menu #menu>\n * <wr-dropdown-item icon=\"copy\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\">Delete</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\n@Component({\n selector: 'wr-dropdown-menu',\n template:\n '<ng-template><div class=\"wr-dropdown-menu\" role=\"menu\" [attr.id]=\"menuId()\" [attr.aria-labelledby]=\"triggerId() || null\"><ng-content /></div></ng-template>',\n exportAs: 'wrDropdownMenu',\n encapsulation: ViewEncapsulation.None,\n // A BOUND display rather than a static `style` attribute: Angular writes a\n // binding through `style.setProperty`, which no CSP governs, while a real\n // `style=\"…\"` attribute is refused under `style-src 'self'` — and this host\n // would then lay out an empty box in the middle of the content.\n host: { '[style.display]': \"'none'\" },\n})\nexport class WrDropdownMenu {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n }\n\n /** The internal template the directive portals into the overlay. @internal */\n readonly contentTpl = viewChild.required(TemplateRef);\n\n /** Stable id used on the menu element and referenced from the trigger's `aria-controls`. */\n readonly menuId = signal(`wr-dropdown-menu-${++uid}`);\n\n /** Trigger element id, set by the directive for `aria-labelledby` wiring. */\n readonly triggerId = signal<string | null>(null);\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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, ViewEncapsulation, computed, inject, input } from '@angular/core';\n\nimport { WrIcon, type WrIconName } from 'ngwr/icon';\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Single row inside a `<wr-dropdown-menu>`.\n *\n * @example\n * ```html\n * <wr-dropdown-item icon=\"copy\" (click)=\"copy()\">Copy</wr-dropdown-item>\n * <wr-dropdown-item icon=\"trash\" disabled>Delete</wr-dropdown-item>\n * ```\n */\n@Component({\n selector: 'wr-dropdown-item',\n templateUrl: './dropdown-item.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'menuitem',\n class: 'wr-dropdown-item',\n '[class]': 'classes()',\n '[attr.tabindex]': '-1',\n '[attr.aria-disabled]': 'disabled() ? true : null',\n '(keydown.enter)': 'activate($event)',\n '(keydown.space)': 'activate($event)',\n },\n imports: [WrIcon],\n})\nexport class WrDropdownItem {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('dropdown');\n }\n\n /** Optional leading icon name. @default null */\n readonly icon = input<WrIconName | null>(null);\n\n /** Disable interaction (suppresses pointer + keyboard). @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n protected readonly classes = computed(() => {\n const parts: string[] = [];\n if (this.disabled()) parts.push('wr-dropdown-item--disabled');\n return parts.join(' ');\n });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** @internal Keyboard activation — fires the same click consumers bind to. */\n protected activate(event: Event): void {\n if (this.disabled()) return;\n event.preventDefault();\n this.host.nativeElement.click();\n }\n}\n","@if (icon(); as name) {\n <wr-icon class=\"wr-dropdown-item__icon\" [name]=\"name\" />\n}\n<span class=\"wr-dropdown-item__label\">\n <ng-content />\n</span>\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 ConnectedPosition, type OverlayRef, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { DestroyRef, Directive, ElementRef, Injector, ViewContainerRef, inject, input, signal } from '@angular/core';\n\nimport type { Subscription } from 'rxjs';\n\nimport { WR_OVERLAY, WrOutsideClick, wrFollowDirection } from 'ngwr/overlay';\nimport { WR_LIVE_LOCALE, wrCheckStyles, wrNumAttr, wrRestoreFocus } from 'ngwr/utils';\n\nimport {\n type WrDropdownLevel,\n wrDropdownItems,\n wrDropdownLevelAround,\n wrDropdownLevelOf,\n wrDropdownRegisterLevel,\n wrDropdownReleaseLevel,\n} from './dropdown-chain';\nimport type { WrDropdownMenu } from './dropdown-menu';\n\n/**\n * Beside the item at the inline end, then at the inline start, each first with\n * the tops aligned and then the bottoms. `start` / `end` and no offsets, so the\n * CDK mirrors the list under RTL by itself.\n */\nconst POSITIONS: ConnectedPosition[] = [\n { originX: 'end', originY: 'top', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'end', overlayY: 'top' },\n { originX: 'end', originY: 'bottom', overlayX: 'start', overlayY: 'bottom' },\n { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n];\n\nlet itemUid = 0;\n\n/**\n * Put on a `<wr-dropdown-item>` to open another `<wr-dropdown-menu>` beside it.\n * The submenu's own items can carry it too, to any depth.\n *\n * @example\n * ```html\n * <button [wrDropdown]=\"file\">File</button>\n *\n * <wr-dropdown-menu #file>\n * <wr-dropdown-item>New</wr-dropdown-item>\n * <wr-dropdown-item [wrDropdownSubmenu]=\"exportAs\">Export</wr-dropdown-item>\n * </wr-dropdown-menu>\n *\n * <wr-dropdown-menu #exportAs>\n * <wr-dropdown-item (click)=\"export('csv')\">CSV</wr-dropdown-item>\n * <wr-dropdown-item (click)=\"export('pdf')\">PDF</wr-dropdown-item>\n * </wr-dropdown-menu>\n * ```\n *\n * @see https://ngwr.dev/reference/components/dropdown\n */\n@Directive({\n selector: '[wrDropdownSubmenu]',\n exportAs: 'wrDropdownSubmenu',\n host: {\n class: 'wr-dropdown-submenu-trigger',\n '[attr.id]': 'itemId',\n 'aria-haspopup': 'menu',\n '[attr.aria-expanded]': 'isOpen()',\n '[attr.aria-controls]': 'isOpen() ? menu().menuId() : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n '(mouseenter)': 'onMouseEnter()',\n '(mouseleave)': 'onMouseLeave($event)',\n },\n})\nexport class WrDropdownSubmenu {\n /** Menu to open beside the item. Pass a `<wr-dropdown-menu>` template reference. */\n readonly menu = input.required<WrDropdownMenu>({ alias: 'wrDropdownSubmenu' });\n\n /** How long the pointer rests on the item before the submenu opens, in ms. @default 150 */\n readonly showDelay = input(150, { transform: wrNumAttr(150) });\n\n /**\n * How long the submenu stays once the pointer has left both the item and the\n * submenu, in ms. Long enough to cross a neighbouring item on the way in.\n * @default 150\n */\n readonly hideDelay = input(150, { transform: wrNumAttr(150) });\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\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 injector = inject(Injector);\n private readonly liveLocale = inject(WR_LIVE_LOCALE, { optional: true });\n\n private readonly openState = signal(false);\n\n /** Whether the submenu is open. Read-only: `open()` and `close()` change it. */\n readonly isOpen = this.openState.asReadonly();\n\n private readonly fallbackId = `wr-dropdown-submenu-trigger-${++itemUid}`;\n\n /** The consumer's own `id` wins, read fresh for the reason `WrDropdown` gives. */\n protected get itemId(): string {\n return this.host.nativeElement.id || this.fallbackId;\n }\n\n private overlayRef: OverlayRef | null = null;\n private level: WrDropdownLevel | null = null;\n private outside: Subscription | null = null;\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('dropdown');\n // The item is projected content: it outlives the pane it was rendered in,\n // and goes only with the consumer's own view.\n inject(DestroyRef).onDestroy(() => this.dispose(false));\n }\n\n /** Open the submenu and move focus to its first item. The item has to be in an open menu. */\n open(): void {\n this.show(true);\n }\n\n /** Close the submenu and every submenu below it. */\n close(): void {\n this.dispose(true);\n }\n\n /** @internal A real click opens; Enter and Space arrive as a click with no pointer behind it. */\n protected onClick(event: MouseEvent): void {\n this.show(event.detail === 0);\n }\n\n /** @internal The arrow pointing the way the menus cascade walks into the submenu. */\n protected onKeydown(event: KeyboardEvent): void {\n if (event.key !== (this.dir?.value === 'rtl' ? 'ArrowLeft' : 'ArrowRight') || this.disabled) return;\n event.preventDefault();\n this.show(true);\n }\n\n /** @internal */\n protected onMouseEnter(): void {\n this.clearTimers();\n if (this.overlayRef || this.disabled) return;\n this.showTimer = setTimeout(() => this.show(false), this.showDelay());\n }\n\n /** @internal */\n protected onMouseLeave(event: MouseEvent): void {\n this.clearTimers();\n if (!this.level || wrDropdownLevelOf(this.level, event.relatedTarget)) return;\n this.hideLater();\n }\n\n private get disabled(): boolean {\n return this.host.nativeElement.getAttribute('aria-disabled') === 'true';\n }\n\n /** A pointer shows the submenu and leaves the caret alone; the keyboard walks in. */\n private show(focus: boolean): void {\n this.clearTimers();\n if (!this.overlayRef) this.attach();\n if (focus && this.overlayRef) wrDropdownItems(this.overlayRef.overlayElement)[0]?.focus();\n }\n\n private attach(): void {\n const parent = wrDropdownLevelAround(this.host.nativeElement);\n if (!parent || this.disabled) return;\n parent.child?.close();\n\n const ref = this.overlay.create({\n positionStrategy: this.overlay\n .position()\n .flexibleConnectedTo(this.host)\n .withPositions(POSITIONS)\n .withPush(true)\n .withGrowAfterOpen(true),\n scrollStrategy: this.scrollStrategies.reposition(),\n panelClass: ['wr-dropdown-overlay', 'wr-dropdown-overlay--submenu'],\n });\n wrFollowDirection(ref, this.dir, this.injector);\n\n this.menu().triggerId.set(this.itemId);\n ref.attach(new TemplatePortal(this.menu().contentTpl(), this.vcr));\n\n const pane = ref.overlayElement;\n pane.addEventListener('mouseenter', this.clearTimers);\n pane.addEventListener('mouseleave', this.onPaneLeave);\n pane.addEventListener('click', this.onPaneClick);\n\n // Listening is also what keeps a click INSIDE this pane from reading as a\n // click outside the menus under it: the registry stops at the first pane\n // that holds the target.\n this.outside = this.outsideClick.outsidePointerEvents(ref).subscribe(event => {\n if (!this.host.nativeElement.contains(event.target as Node)) this.close();\n });\n\n // No `keydownEvents()` subscription: the CDK routes keys to the topmost\n // overlay that listens, and the root menu answers for every level.\n this.overlayRef = ref;\n this.level = { pane, parent, child: null, close: () => this.close() };\n wrDropdownRegisterLevel(this.level, () => this.liveLocale?.());\n this.openState.set(true);\n }\n\n private dispose(restoreFocus: boolean): void {\n this.clearTimers();\n const ref = this.overlayRef;\n const level = this.level;\n if (!ref || !level) return;\n\n // Read before the levels below go, since each hands focus up to its own item.\n const focusWasInside = wrDropdownLevelOf(level, document.activeElement) !== null;\n level.child?.close();\n wrDropdownReleaseLevel(level);\n\n const pane = ref.overlayElement;\n pane.removeEventListener('mouseenter', this.clearTimers);\n pane.removeEventListener('mouseleave', this.onPaneLeave);\n pane.removeEventListener('click', this.onPaneClick);\n this.outside?.unsubscribe();\n this.outside = null;\n\n ref.dispose();\n this.overlayRef = null;\n this.level = null;\n this.openState.set(false);\n if (restoreFocus && focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);\n }\n\n private hideLater(): void {\n this.hideTimer = setTimeout(() => this.close(), this.hideDelay());\n }\n\n private readonly clearTimers = (): void => {\n if (this.showTimer !== null) clearTimeout(this.showTimer);\n if (this.hideTimer !== null) clearTimeout(this.hideTimer);\n this.showTimer = this.hideTimer = null;\n };\n\n private readonly onPaneLeave = (event: MouseEvent): void => {\n const level = this.level;\n const related = event.relatedTarget;\n if (!level) return;\n if (related instanceof Node && this.host.nativeElement.contains(related)) return;\n if (wrDropdownLevelOf(level, related)) return;\n this.clearTimers();\n this.hideLater();\n\n let root = level;\n while (root.parent) root = root.parent;\n root.pointerLeft?.(related);\n };\n\n /** Choosing a leaf closes every submenu, up to the root menu's own item. */\n private readonly onPaneClick = (event: MouseEvent): void => {\n const item = event.target instanceof Element ? event.target.closest('.wr-dropdown-item') : null;\n if (!item || item.matches('.wr-dropdown-item--disabled, .wr-dropdown-submenu-trigger')) return;\n\n let top = this.level;\n while (top?.parent?.parent) top = top.parent;\n top?.close();\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAUA,MAAM,yBAAS,IAAI,QAAO;AAS1B,SAAS,mBAAmB,MAAmB,QAAiC;CAC9E,MAAM,YAAY,YAAY,EAAE,OAAM,CAAE;CACxC,KAAK,iBACH,YACA,UAAQ;EACN,MAAM,QAAQ,gBAAgB,IAAI;EAClC,MAAM,QAAQ,UAAU,UACtB,OACA,MAAM,KAAI,SAAQ,KAAK,WAAW,GAClC,MAAM,QAAQ,SAAS,aAA4B,C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;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,MAAM;IACJ,OAAO;IACP,aAAa;IACb,iBAAiB;IACjB,wBAAwB;IACxB,wBAAwB;IACxB,WAAW;IACX,aAAa;IACb,gBAAgB;IAChB,gBAAgB;GACjB;EACF,CAAA"}
|
package/fesm2022/ngwr-editor.mjs
CHANGED
|
@@ -1519,7 +1519,7 @@ var WrEditor = class WrEditor {
|
|
|
1519
1519
|
}
|
|
1520
1520
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1521
1521
|
minVersion: "12.0.0",
|
|
1522
|
-
version: "22.2.
|
|
1522
|
+
version: "22.2.6",
|
|
1523
1523
|
ngImport: i0,
|
|
1524
1524
|
type: WrEditor,
|
|
1525
1525
|
deps: [],
|
|
@@ -1527,7 +1527,7 @@ var WrEditor = class WrEditor {
|
|
|
1527
1527
|
});
|
|
1528
1528
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1529
1529
|
minVersion: "17.0.0",
|
|
1530
|
-
version: "22.2.
|
|
1530
|
+
version: "22.2.6",
|
|
1531
1531
|
type: WrEditor,
|
|
1532
1532
|
isStandalone: true,
|
|
1533
1533
|
selector: "wr-editor",
|
|
@@ -1669,6 +1669,7 @@ var WrEditor = class WrEditor {
|
|
|
1669
1669
|
"showDelay",
|
|
1670
1670
|
"hideDelay",
|
|
1671
1671
|
"wrPopoverOrigin",
|
|
1672
|
+
"wrPopoverDisabled",
|
|
1672
1673
|
"ariaLabel",
|
|
1673
1674
|
"panelClass"
|
|
1674
1675
|
],
|
|
@@ -1681,7 +1682,7 @@ var WrEditor = class WrEditor {
|
|
|
1681
1682
|
};
|
|
1682
1683
|
i0.ɵɵngDeclareClassMetadata({
|
|
1683
1684
|
minVersion: "12.0.0",
|
|
1684
|
-
version: "22.2.
|
|
1685
|
+
version: "22.2.6",
|
|
1685
1686
|
ngImport: i0,
|
|
1686
1687
|
type: WrEditor,
|
|
1687
1688
|
decorators: [{
|