ngwr 16.1.0 → 16.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/badge/styles/_tag.scss +73 -1
- package/calendar/styles/_index.scss +22 -0
- package/cascader/styles/_rules.scss +7 -0
- package/color-picker/styles/_index.scss +21 -0
- package/date-picker/styles/_index.scss +108 -1
- package/dropdown/styles/_index.scss +40 -10
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert-testing.mjs +70 -0
- package/fesm2022/ngwr-alert-testing.mjs.map +1 -0
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +17 -6
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-aurora.mjs +3 -3
- package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
- package/fesm2022/ngwr-animations-confetti.mjs +3 -3
- package/fesm2022/ngwr-animations-decode.mjs +3 -3
- package/fesm2022/ngwr-animations-destruct.mjs +3 -3
- package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
- package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
- package/fesm2022/ngwr-animations-glitch.mjs +3 -3
- package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
- package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
- package/fesm2022/ngwr-animations-marquee.mjs +3 -3
- package/fesm2022/ngwr-animations-orbit.mjs +3 -3
- package/fesm2022/ngwr-animations-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
- package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
- package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-tilt.mjs +3 -3
- package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +129 -11
- package/fesm2022/ngwr-badge.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs-testing.mjs +83 -0
- package/fesm2022/ngwr-breadcrumbs-testing.mjs.map +1 -0
- package/fesm2022/ngwr-breadcrumbs.mjs +8 -8
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger-testing.mjs +45 -0
- package/fesm2022/ngwr-burger-testing.mjs.map +1 -0
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-testing.mjs +18 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +500 -73
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +6 -6
- package/fesm2022/ngwr-cascader.mjs +37 -16
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-bar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +26 -11
- package/fesm2022/ngwr-charts-chart-legend.mjs.map +1 -1
- package/fesm2022/ngwr-charts-core.mjs +3 -3
- package/fesm2022/ngwr-charts-donut-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart-testing.mjs +3 -2
- package/fesm2022/ngwr-charts-line-chart-testing.mjs.map +1 -1
- package/fesm2022/ngwr-charts-line-chart.mjs +17 -7
- package/fesm2022/ngwr-charts-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-meter-group.mjs +5 -4
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-radar-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-scatter-chart.mjs +5 -4
- package/fesm2022/ngwr-charts-scatter-chart.mjs.map +1 -1
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +6 -6
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +11 -1
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +153 -37
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +10 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare-testing.mjs +84 -0
- package/fesm2022/ngwr-compare-testing.mjs.map +1 -0
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +12 -12
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-copy-value.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +6 -6
- package/fesm2022/ngwr-date-picker-testing.mjs +48 -4
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +492 -75
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +76 -12
- package/fesm2022/ngwr-date-stamp.mjs.map +1 -1
- package/fesm2022/ngwr-date.mjs +144 -12
- package/fesm2022/ngwr-date.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +18 -18
- package/fesm2022/ngwr-directives.mjs +15 -15
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +51 -29
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown-testing.mjs +48 -5
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +407 -116
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +4 -3
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +186 -33
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +34 -2
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +274 -15
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +9 -9
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-graph-testing.mjs +3 -0
- package/fesm2022/ngwr-graph-testing.mjs.map +1 -1
- package/fesm2022/ngwr-graph.mjs +102 -42
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +26 -6
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +26 -6
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +26 -6
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +26 -6
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +26 -6
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +26 -6
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +26 -6
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +26 -6
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +26 -6
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +26 -6
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +26 -6
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ko.mjs +26 -6
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +26 -6
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +26 -6
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +26 -6
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +26 -6
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +26 -6
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +26 -6
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +26 -6
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +26 -6
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +26 -6
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +26 -6
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +9 -9
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +3 -3
- package/fesm2022/ngwr-input-number-testing.mjs +11 -0
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +68 -7
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +23 -3
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input-testing.mjs +24 -1
- package/fesm2022/ngwr-input-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +152 -36
- package/fesm2022/ngwr-input.mjs.map +1 -1
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox-testing.mjs +26 -0
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +249 -13
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +8 -8
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +15 -15
- package/fesm2022/ngwr-loading-bar.mjs +6 -6
- package/fesm2022/ngwr-mention.mjs +6 -6
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-overlay.mjs +175 -13
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination.mjs +5 -3
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +57 -33
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm-testing.mjs +5 -2
- package/fesm2022/ngwr-popconfirm-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +44 -63
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover-testing.mjs +7 -1
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +58 -156
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +50 -9
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs +57 -0
- package/fesm2022/ngwr-pull-to-refresh-testing.mjs.map +1 -0
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +3 -3
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-resizable-testing.mjs +113 -0
- package/fesm2022/ngwr-resizable-testing.mjs.map +1 -0
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form-testing.mjs +336 -0
- package/fesm2022/ngwr-schema-form-testing.mjs.map +1 -0
- package/fesm2022/ngwr-schema-form.mjs +418 -19
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented.mjs +3 -3
- package/fesm2022/ngwr-select-testing.mjs +19 -0
- package/fesm2022/ngwr-select-testing.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +263 -83
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +176 -0
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sidebar.mjs +3 -3
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider-testing.mjs +23 -0
- package/fesm2022/ngwr-slider-testing.mjs.map +1 -1
- package/fesm2022/ngwr-slider.mjs +108 -14
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sortable-list-testing.mjs +103 -0
- package/fesm2022/ngwr-sortable-list-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sortable-list.mjs +284 -63
- package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
- package/fesm2022/ngwr-speed-dial.mjs +3 -3
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper.mjs +42 -11
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +3 -3
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table-testing.mjs +88 -2
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +891 -74
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +3 -3
- package/fesm2022/ngwr-tabs-testing.mjs +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +15 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea-testing.mjs +11 -0
- package/fesm2022/ngwr-textarea-testing.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +128 -16
- package/fesm2022/ngwr-textarea.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +3 -3
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +40 -19
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +6 -6
- package/fesm2022/ngwr-transfer-testing.mjs +6 -0
- package/fesm2022/ngwr-transfer-testing.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +24 -5
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree-testing.mjs +62 -2
- package/fesm2022/ngwr-tree-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +966 -78
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +34 -1
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +3 -3
- package/fesm2022/ngwr-window.mjs +33 -22
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +156 -0
- package/i18n/ar.json +28 -6
- package/i18n/cs.json +28 -6
- package/i18n/de.json +28 -6
- package/i18n/en.json +28 -6
- package/i18n/es.json +28 -6
- package/i18n/fr.json +28 -6
- package/i18n/he.json +28 -6
- package/i18n/hi.json +28 -6
- package/i18n/id.json +28 -6
- package/i18n/it.json +28 -6
- package/i18n/ja.json +28 -6
- package/i18n/ko.json +28 -6
- package/i18n/nl.json +28 -6
- package/i18n/pl.json +28 -6
- package/i18n/pt.json +28 -6
- package/i18n/ru.json +28 -6
- package/i18n/sv.json +28 -6
- package/i18n/tr.json +28 -6
- package/i18n/uk.json +28 -6
- package/i18n/vi.json +28 -6
- package/i18n/zh-TW.json +28 -6
- package/i18n/zh.json +28 -6
- package/input/styles/_index.scss +68 -1
- package/input-otp/styles/_index.scss +14 -0
- package/lightbox/styles/_rules.scss +96 -0
- package/llms-full.txt +61 -25
- package/llms.txt +12 -0
- package/overlay/styles/_arrow.scss +4 -4
- package/package.json +37 -1
- package/popconfirm/styles/_index.scss +3 -11
- package/progress/styles/_index.scss +32 -0
- package/schema-form/styles/_index.scss +78 -0
- package/schematics/use/rule.js +2 -0
- package/schematics/use/symbol-map.json +5 -0
- package/select/styles/_index.scss +114 -22
- package/skills/ngwr/SKILL.md +1 -1
- package/skills/ngwr/references/catalog.md +11 -2
- package/slider/styles/_index.scss +128 -0
- package/sortable-list/styles/_rules.scss +23 -1
- package/table/styles/_index.scss +167 -3
- package/textarea/styles/_index.scss +80 -0
- package/theme/styles/_focus.scss +5 -0
- package/theme/styles/_motion.scss +5 -0
- package/transfer/styles/_index.scss +84 -0
- package/tree/styles/_index.scss +138 -5
- package/types/ngwr-alert-testing.d.ts +88 -0
- package/types/ngwr-badge.d.ts +72 -2
- package/types/ngwr-breadcrumbs-testing.d.ts +92 -0
- package/types/ngwr-burger-testing.d.ts +51 -0
- package/types/ngwr-calendar-testing.d.ts +18 -6
- package/types/ngwr-calendar.d.ts +272 -22
- package/types/ngwr-cascader.d.ts +10 -1
- package/types/ngwr-charts-chart-legend.d.ts +9 -4
- package/types/ngwr-charts-line-chart-testing.d.ts +4 -1
- package/types/ngwr-charts-line-chart.d.ts +7 -4
- package/types/ngwr-color-picker-testing.d.ts +15 -4
- package/types/ngwr-color-picker.d.ts +76 -6
- package/types/ngwr-compare-testing.d.ts +72 -0
- package/types/ngwr-date-picker-testing.d.ts +40 -8
- package/types/ngwr-date-picker.d.ts +178 -10
- package/types/ngwr-date-stamp-testing.d.ts +1 -1
- package/types/ngwr-date-stamp.d.ts +53 -7
- package/types/ngwr-date.d.ts +188 -15
- package/types/ngwr-drawer.d.ts +9 -0
- package/types/ngwr-dropdown-testing.d.ts +73 -5
- package/types/ngwr-dropdown.d.ts +124 -6
- package/types/ngwr-event-calendar.d.ts +66 -8
- package/types/ngwr-file-upload-testing.d.ts +31 -2
- package/types/ngwr-file-upload.d.ts +148 -1
- package/types/ngwr-form.d.ts +47 -3
- package/types/ngwr-graph-testing.d.ts +8 -3
- package/types/ngwr-graph.d.ts +147 -7
- package/types/ngwr-input-number-testing.d.ts +10 -0
- package/types/ngwr-input-number.d.ts +30 -1
- package/types/ngwr-input-otp.d.ts +10 -0
- package/types/ngwr-input-testing.d.ts +30 -0
- package/types/ngwr-input.d.ts +54 -3
- package/types/ngwr-lightbox-testing.d.ts +27 -0
- package/types/ngwr-lightbox.d.ts +71 -6
- package/types/ngwr-overlay.d.ts +84 -5
- package/types/ngwr-pipes.d.ts +34 -13
- package/types/ngwr-popconfirm-testing.d.ts +12 -3
- package/types/ngwr-popconfirm.d.ts +28 -3
- package/types/ngwr-popover-testing.d.ts +19 -2
- package/types/ngwr-popover.d.ts +22 -2
- package/types/ngwr-progress.d.ts +29 -1
- package/types/ngwr-pull-to-refresh-testing.d.ts +83 -0
- package/types/ngwr-resizable-testing.d.ts +116 -0
- package/types/ngwr-schema-form-testing.d.ts +260 -0
- package/types/ngwr-schema-form.d.ts +76 -6
- package/types/ngwr-select-testing.d.ts +20 -0
- package/types/ngwr-select.d.ts +112 -11
- package/types/ngwr-sidebar-testing.d.ts +176 -0
- package/types/ngwr-slider-testing.d.ts +10 -1
- package/types/ngwr-slider.d.ts +109 -3
- package/types/ngwr-sortable-list-testing.d.ts +79 -0
- package/types/ngwr-sortable-list.d.ts +119 -10
- package/types/ngwr-stepper.d.ts +20 -11
- package/types/ngwr-table-testing.d.ts +70 -6
- package/types/ngwr-table.d.ts +480 -50
- package/types/ngwr-tabs-testing.d.ts +14 -17
- package/types/ngwr-tabs.d.ts +6 -0
- package/types/ngwr-textarea-testing.d.ts +10 -0
- package/types/ngwr-textarea.d.ts +48 -2
- package/types/ngwr-toast.d.ts +8 -1
- package/types/ngwr-transfer-testing.d.ts +3 -0
- package/types/ngwr-transfer.d.ts +24 -1
- package/types/ngwr-tree-testing.d.ts +65 -1
- package/types/ngwr-tree.d.ts +333 -12
- package/types/ngwr-utils.d.ts +28 -0
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-window.d.ts +7 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, ViewContainerRef, ViewEncapsulation, computed, effect, inject, input, output, signal, viewChild } from "@angular/core";
|
|
3
3
|
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
4
|
-
import { wrCheckStyles, wrRestoreFocus, wrToClassList } from "ngwr/utils";
|
|
4
|
+
import { wrCheckStyles, wrNumAttr, wrRestoreFocus, wrToClassList } from "ngwr/utils";
|
|
5
5
|
import { WrIcon } from "ngwr/icon";
|
|
6
6
|
import { Directionality } from "@angular/cdk/bidi";
|
|
7
7
|
import { ScrollStrategyOptions } from "@angular/cdk/overlay";
|
|
8
8
|
import { TemplatePortal } from "@angular/cdk/portal";
|
|
9
9
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
10
|
-
import { WR_OVERLAY, WrOutsideClick, wrFollowDirection } from "ngwr/overlay";
|
|
10
|
+
import { WR_ANCHORED_FALLBACKS, WR_ANCHORED_POSITIONS, WR_OVERLAY, WrOutsideClick, wrAnchoredPositions, wrFollowDirection } from "ngwr/overlay";
|
|
11
11
|
import { FocusMonitor } from "@angular/cdk/a11y";
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
@@ -15,78 +15,35 @@ import { FocusMonitor } from "@angular/cdk/a11y";
|
|
|
15
15
|
* Use of this source code is governed by an MIT-style license that can be
|
|
16
16
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
originY: "bottom",
|
|
46
|
-
overlayX: "start",
|
|
47
|
-
overlayY: "top"
|
|
48
|
-
},
|
|
49
|
-
"bottom-end": {
|
|
50
|
-
originX: "end",
|
|
51
|
-
originY: "bottom",
|
|
52
|
-
overlayX: "end",
|
|
53
|
-
overlayY: "top"
|
|
54
|
-
},
|
|
55
|
-
left: {
|
|
56
|
-
originX: "start",
|
|
57
|
-
originY: "center",
|
|
58
|
-
overlayX: "end",
|
|
59
|
-
overlayY: "center"
|
|
60
|
-
},
|
|
61
|
-
right: {
|
|
62
|
-
originX: "end",
|
|
63
|
-
originY: "center",
|
|
64
|
-
overlayX: "start",
|
|
65
|
-
overlayY: "center"
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const WR_DROPDOWN_FALLBACKS = {
|
|
69
|
-
top: ["top", "bottom"],
|
|
70
|
-
"top-start": ["top-start", "bottom-start"],
|
|
71
|
-
"top-end": ["top-end", "bottom-end"],
|
|
72
|
-
bottom: ["bottom", "top"],
|
|
73
|
-
"bottom-start": ["bottom-start", "top-start"],
|
|
74
|
-
"bottom-end": ["bottom-end", "top-end"],
|
|
75
|
-
left: [
|
|
76
|
-
"left",
|
|
77
|
-
"right",
|
|
78
|
-
"bottom",
|
|
79
|
-
"top"
|
|
80
|
-
],
|
|
81
|
-
right: [
|
|
82
|
-
"right",
|
|
83
|
-
"left",
|
|
84
|
-
"bottom",
|
|
85
|
-
"top"
|
|
86
|
-
]
|
|
87
|
-
};
|
|
18
|
+
const levels = /* @__PURE__ */ new WeakMap();
|
|
19
|
+
function wrDropdownRegisterLevel(level) {
|
|
20
|
+
levels.set(level.pane, level);
|
|
21
|
+
if (level.parent) level.parent.child = level;
|
|
22
|
+
}
|
|
23
|
+
function wrDropdownReleaseLevel(level) {
|
|
24
|
+
levels.delete(level.pane);
|
|
25
|
+
if (level.parent?.child === level) level.parent.child = null;
|
|
26
|
+
}
|
|
27
|
+
function wrDropdownLevelAround(el) {
|
|
28
|
+
const pane = el.closest(".wr-dropdown-overlay");
|
|
29
|
+
return (pane && levels.get(pane)) ?? null;
|
|
30
|
+
}
|
|
31
|
+
function wrDropdownLevelOf(from, node) {
|
|
32
|
+
if (!(node instanceof Node)) return null;
|
|
33
|
+
for (let level = from; level; level = level.child) if (level.pane.contains(node)) return level;
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
function wrDropdownItems(pane) {
|
|
37
|
+
return Array.from(pane.querySelectorAll(".wr-dropdown-item:not(.wr-dropdown-item--disabled)"));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @license
|
|
41
|
+
*
|
|
42
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
43
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
44
|
+
*/
|
|
88
45
|
function wrDropdownPositions(position) {
|
|
89
|
-
return
|
|
46
|
+
return wrAnchoredPositions(position);
|
|
90
47
|
}
|
|
91
48
|
/**
|
|
92
49
|
* @license
|
|
@@ -94,7 +51,7 @@ function wrDropdownPositions(position) {
|
|
|
94
51
|
* Use of this source code is governed by an MIT-style license that can be
|
|
95
52
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
96
53
|
*/
|
|
97
|
-
const isSidePlacement = (name) => name
|
|
54
|
+
const isSidePlacement = (name) => name.startsWith("left") || name.startsWith("right");
|
|
98
55
|
let triggerUid = 0;
|
|
99
56
|
var WrDropdown = class WrDropdown {
|
|
100
57
|
menu = input.required({
|
|
@@ -107,6 +64,11 @@ var WrDropdown = class WrDropdown {
|
|
|
107
64
|
...ngDevMode ? { debugName: "arrow" } : /* istanbul ignore next */ {},
|
|
108
65
|
transform: coerceBooleanProperty
|
|
109
66
|
});
|
|
67
|
+
disabled = input(false, {
|
|
68
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
69
|
+
alias: "wrDropdownDisabled",
|
|
70
|
+
transform: coerceBooleanProperty
|
|
71
|
+
});
|
|
110
72
|
panelClass = input(null, ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
|
|
111
73
|
opened = output();
|
|
112
74
|
closed = output();
|
|
@@ -126,6 +88,7 @@ var WrDropdown = class WrDropdown {
|
|
|
126
88
|
return this.host.nativeElement.id || this.fallbackId;
|
|
127
89
|
}
|
|
128
90
|
overlayRef = null;
|
|
91
|
+
level = null;
|
|
129
92
|
constructor() {
|
|
130
93
|
if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("dropdown");
|
|
131
94
|
this.destroyRef.onDestroy(() => this.closeOverlay(false));
|
|
@@ -133,19 +96,24 @@ var WrDropdown = class WrDropdown {
|
|
|
133
96
|
if (this.isOpen()) this.openOverlay();
|
|
134
97
|
else this.closeOverlay();
|
|
135
98
|
});
|
|
99
|
+
effect(() => {
|
|
100
|
+
if (this.disabled()) this.openState.set(false);
|
|
101
|
+
});
|
|
136
102
|
}
|
|
137
103
|
open() {
|
|
104
|
+
if (this.disabled()) return;
|
|
138
105
|
this.openState.set(true);
|
|
139
106
|
}
|
|
140
107
|
close() {
|
|
141
108
|
this.openState.set(false);
|
|
142
109
|
}
|
|
143
110
|
toggle() {
|
|
144
|
-
this.
|
|
111
|
+
if (this.isOpen()) this.close();
|
|
112
|
+
else this.open();
|
|
145
113
|
}
|
|
146
114
|
openedByPointer = false;
|
|
147
115
|
onClick(event) {
|
|
148
|
-
if (this.trigger() !== "click") return;
|
|
116
|
+
if (this.disabled() || this.trigger() !== "click") return;
|
|
149
117
|
event.stopPropagation();
|
|
150
118
|
this.openedByPointer = false;
|
|
151
119
|
this.toggle();
|
|
@@ -153,12 +121,12 @@ var WrDropdown = class WrDropdown {
|
|
|
153
121
|
onMouseEnter() {
|
|
154
122
|
if (this.trigger() !== "hover") return;
|
|
155
123
|
this.openedByPointer = true;
|
|
156
|
-
this.
|
|
124
|
+
this.open();
|
|
157
125
|
}
|
|
158
126
|
onMouseLeave(event) {
|
|
159
127
|
if (this.trigger() !== "hover") return;
|
|
160
128
|
const related = event.relatedTarget;
|
|
161
|
-
if (
|
|
129
|
+
if (this.inMenus(related)) return;
|
|
162
130
|
this.openState.set(false);
|
|
163
131
|
}
|
|
164
132
|
openOverlay() {
|
|
@@ -173,12 +141,12 @@ var WrDropdown = class WrDropdown {
|
|
|
173
141
|
});
|
|
174
142
|
const ref = this.overlayRef;
|
|
175
143
|
const pane = ref.overlayElement;
|
|
176
|
-
let chain =
|
|
144
|
+
let chain = WR_ANCHORED_FALLBACKS[requested];
|
|
177
145
|
let links = positions;
|
|
178
146
|
connected.positionChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(({ connectionPair }) => {
|
|
179
147
|
const landed = chain[links.indexOf(connectionPair)];
|
|
180
148
|
if (!landed) return;
|
|
181
|
-
for (const name of Object.keys(
|
|
149
|
+
for (const name of Object.keys(WR_ANCHORED_POSITIONS)) pane.classList.toggle(`wr-dropdown-overlay--${name}`, name === landed);
|
|
182
150
|
if (isSidePlacement(landed) || !chain.some(isSidePlacement)) return;
|
|
183
151
|
const kept = chain.flatMap((name, i) => isSidePlacement(name) ? [] : [i]);
|
|
184
152
|
chain = kept.map((i) => chain[i]);
|
|
@@ -192,6 +160,14 @@ var WrDropdown = class WrDropdown {
|
|
|
192
160
|
this.menu().triggerId.set(this.triggerId);
|
|
193
161
|
const portal = new TemplatePortal(this.menu().contentTpl(), this.vcr);
|
|
194
162
|
this.overlayRef.attach(portal);
|
|
163
|
+
this.level = {
|
|
164
|
+
pane,
|
|
165
|
+
parent: null,
|
|
166
|
+
child: null,
|
|
167
|
+
close: () => this.close(),
|
|
168
|
+
pointerLeft: (related) => this.onMenusLeave(related)
|
|
169
|
+
};
|
|
170
|
+
wrDropdownRegisterLevel(this.level);
|
|
195
171
|
if (!this.openedByPointer) queueMicrotask(() => this.focusItemAt(0));
|
|
196
172
|
this.outsideClick.outsidePointerEvents(this.overlayRef).pipe(takeUntilDestroyed(this.destroyRef)).subscribe((event) => {
|
|
197
173
|
if (this.host.nativeElement.contains(event.target)) return;
|
|
@@ -206,8 +182,12 @@ var WrDropdown = class WrDropdown {
|
|
|
206
182
|
closeOverlay(notify = true) {
|
|
207
183
|
if (!this.overlayRef) return;
|
|
208
184
|
if (this.trigger() === "hover") this.overlayRef.overlayElement.removeEventListener("mouseleave", this.onOverlayMouseLeave);
|
|
209
|
-
const
|
|
210
|
-
|
|
185
|
+
const focusWasInside = this.inMenus(document.activeElement);
|
|
186
|
+
if (this.level) {
|
|
187
|
+
this.level.child?.close();
|
|
188
|
+
wrDropdownReleaseLevel(this.level);
|
|
189
|
+
this.level = null;
|
|
190
|
+
}
|
|
211
191
|
this.overlayRef.dispose();
|
|
212
192
|
this.overlayRef = null;
|
|
213
193
|
if (notify) {
|
|
@@ -216,7 +196,7 @@ var WrDropdown = class WrDropdown {
|
|
|
216
196
|
}
|
|
217
197
|
}
|
|
218
198
|
onKeydown(event) {
|
|
219
|
-
if (this.isOpen() || this.trigger() === "manual") return;
|
|
199
|
+
if (this.disabled() || this.isOpen() || this.trigger() === "manual") return;
|
|
220
200
|
if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
|
|
221
201
|
event.preventDefault();
|
|
222
202
|
this.openedByPointer = false;
|
|
@@ -224,13 +204,24 @@ var WrDropdown = class WrDropdown {
|
|
|
224
204
|
}
|
|
225
205
|
}
|
|
226
206
|
handleMenuKeydown(event) {
|
|
227
|
-
const
|
|
207
|
+
const level = this.level && wrDropdownLevelOf(this.level, event.target);
|
|
208
|
+
const submenu = level?.parent ? level : null;
|
|
209
|
+
const items = this.getItems(level?.pane);
|
|
228
210
|
if (items.length === 0 && event.key !== "Escape" && event.key !== "Tab") return;
|
|
229
211
|
const current = document.activeElement;
|
|
230
212
|
const idx = current ? items.indexOf(current) : -1;
|
|
231
213
|
const typedIn = event.target;
|
|
232
|
-
const ours = typedIn instanceof Node && (this.host.nativeElement.contains(typedIn) ||
|
|
214
|
+
const ours = typedIn instanceof Node && (this.host.nativeElement.contains(typedIn) || level !== null);
|
|
233
215
|
if (!ours && event.key !== "Escape" && event.key !== "Tab") return;
|
|
216
|
+
if (submenu && (event.key === "Escape" || event.key === (this.dir?.value === "rtl" ? "ArrowRight" : "ArrowLeft"))) {
|
|
217
|
+
event.preventDefault();
|
|
218
|
+
submenu.close();
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const focusAt = (index) => {
|
|
222
|
+
event.preventDefault();
|
|
223
|
+
items[index]?.focus();
|
|
224
|
+
};
|
|
234
225
|
switch (event.key) {
|
|
235
226
|
case "Escape":
|
|
236
227
|
event.preventDefault();
|
|
@@ -242,39 +233,38 @@ var WrDropdown = class WrDropdown {
|
|
|
242
233
|
this.openState.set(false);
|
|
243
234
|
break;
|
|
244
235
|
case "ArrowDown":
|
|
245
|
-
|
|
246
|
-
this.focusItemAt(idx < items.length - 1 ? idx + 1 : 0);
|
|
236
|
+
focusAt(idx < items.length - 1 ? idx + 1 : 0);
|
|
247
237
|
break;
|
|
248
238
|
case "ArrowUp":
|
|
249
|
-
|
|
250
|
-
this.focusItemAt(idx > 0 ? idx - 1 : items.length - 1);
|
|
239
|
+
focusAt(idx > 0 ? idx - 1 : items.length - 1);
|
|
251
240
|
break;
|
|
252
241
|
case "Home":
|
|
253
|
-
|
|
254
|
-
this.focusItemAt(0);
|
|
242
|
+
focusAt(0);
|
|
255
243
|
break;
|
|
256
|
-
case "End":
|
|
257
|
-
event.preventDefault();
|
|
258
|
-
this.focusItemAt(items.length - 1);
|
|
244
|
+
case "End": focusAt(items.length - 1);
|
|
259
245
|
}
|
|
260
246
|
}
|
|
261
|
-
getItems() {
|
|
262
|
-
|
|
263
|
-
|
|
247
|
+
getItems(pane = this.overlayRef?.overlayElement) {
|
|
248
|
+
return pane ? wrDropdownItems(pane) : [];
|
|
249
|
+
}
|
|
250
|
+
inMenus(node) {
|
|
251
|
+
return this.level !== null && wrDropdownLevelOf(this.level, node) !== null;
|
|
252
|
+
}
|
|
253
|
+
onMenusLeave(related) {
|
|
254
|
+
if (this.trigger() !== "hover") return;
|
|
255
|
+
if (related instanceof Node && this.host.nativeElement.contains(related)) return;
|
|
256
|
+
if (this.inMenus(related)) return;
|
|
257
|
+
this.openState.set(false);
|
|
264
258
|
}
|
|
265
259
|
focusItemAt(index) {
|
|
266
260
|
const items = this.getItems();
|
|
267
261
|
if (items.length === 0) return;
|
|
268
262
|
items[(index % items.length + items.length) % items.length]?.focus();
|
|
269
263
|
}
|
|
270
|
-
onOverlayMouseLeave = (event) =>
|
|
271
|
-
const related = event.relatedTarget;
|
|
272
|
-
if (related && this.host.nativeElement.contains(related)) return;
|
|
273
|
-
this.openState.set(false);
|
|
274
|
-
};
|
|
264
|
+
onOverlayMouseLeave = (event) => this.onMenusLeave(event.relatedTarget);
|
|
275
265
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
276
266
|
minVersion: "12.0.0",
|
|
277
|
-
version: "22.2.
|
|
267
|
+
version: "22.2.6",
|
|
278
268
|
ngImport: i0,
|
|
279
269
|
type: WrDropdown,
|
|
280
270
|
deps: [],
|
|
@@ -282,7 +272,7 @@ var WrDropdown = class WrDropdown {
|
|
|
282
272
|
});
|
|
283
273
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
284
274
|
minVersion: "17.1.0",
|
|
285
|
-
version: "22.2.
|
|
275
|
+
version: "22.2.6",
|
|
286
276
|
type: WrDropdown,
|
|
287
277
|
isStandalone: true,
|
|
288
278
|
selector: "[wrDropdown]",
|
|
@@ -315,6 +305,13 @@ var WrDropdown = class WrDropdown {
|
|
|
315
305
|
isRequired: false,
|
|
316
306
|
transformFunction: null
|
|
317
307
|
},
|
|
308
|
+
disabled: {
|
|
309
|
+
classPropertyName: "disabled",
|
|
310
|
+
publicName: "wrDropdownDisabled",
|
|
311
|
+
isSignal: true,
|
|
312
|
+
isRequired: false,
|
|
313
|
+
transformFunction: null
|
|
314
|
+
},
|
|
318
315
|
panelClass: {
|
|
319
316
|
classPropertyName: "panelClass",
|
|
320
317
|
publicName: "panelClass",
|
|
@@ -335,9 +332,10 @@ var WrDropdown = class WrDropdown {
|
|
|
335
332
|
"mouseleave": "onMouseLeave($event)"
|
|
336
333
|
},
|
|
337
334
|
properties: {
|
|
335
|
+
"class.wr-dropdown-trigger--disabled": "disabled()",
|
|
338
336
|
"attr.id": "triggerId",
|
|
339
|
-
"attr.aria-haspopup": "\"menu\"",
|
|
340
|
-
"attr.aria-expanded": "isOpen()",
|
|
337
|
+
"attr.aria-haspopup": "disabled() ? null : \"menu\"",
|
|
338
|
+
"attr.aria-expanded": "disabled() ? null : isOpen()",
|
|
341
339
|
"attr.aria-controls": "isOpen() ? menu().menuId() : null"
|
|
342
340
|
},
|
|
343
341
|
classAttribute: "wr-dropdown-trigger"
|
|
@@ -348,7 +346,7 @@ var WrDropdown = class WrDropdown {
|
|
|
348
346
|
};
|
|
349
347
|
i0.ɵɵngDeclareClassMetadata({
|
|
350
348
|
minVersion: "12.0.0",
|
|
351
|
-
version: "22.2.
|
|
349
|
+
version: "22.2.6",
|
|
352
350
|
ngImport: i0,
|
|
353
351
|
type: WrDropdown,
|
|
354
352
|
decorators: [{
|
|
@@ -358,9 +356,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
358
356
|
exportAs: "wrDropdown",
|
|
359
357
|
host: {
|
|
360
358
|
class: "wr-dropdown-trigger",
|
|
359
|
+
"[class.wr-dropdown-trigger--disabled]": "disabled()",
|
|
361
360
|
"[attr.id]": "triggerId",
|
|
362
|
-
"[attr.aria-haspopup]": "\"menu\"",
|
|
363
|
-
"[attr.aria-expanded]": "isOpen()",
|
|
361
|
+
"[attr.aria-haspopup]": "disabled() ? null : \"menu\"",
|
|
362
|
+
"[attr.aria-expanded]": "disabled() ? null : isOpen()",
|
|
364
363
|
"[attr.aria-controls]": "isOpen() ? menu().menuId() : null",
|
|
365
364
|
"(click)": "onClick($event)",
|
|
366
365
|
"(keydown)": "onKeydown($event)",
|
|
@@ -403,6 +402,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
403
402
|
required: false
|
|
404
403
|
}]
|
|
405
404
|
}],
|
|
405
|
+
disabled: [{
|
|
406
|
+
type: i0.Input,
|
|
407
|
+
args: [{
|
|
408
|
+
isSignal: true,
|
|
409
|
+
alias: "wrDropdownDisabled",
|
|
410
|
+
required: false
|
|
411
|
+
}]
|
|
412
|
+
}],
|
|
406
413
|
panelClass: [{
|
|
407
414
|
type: i0.Input,
|
|
408
415
|
args: [{
|
|
@@ -437,7 +444,7 @@ var WrDropdownMenu = class WrDropdownMenu {
|
|
|
437
444
|
triggerId = signal(null, ...ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []);
|
|
438
445
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
439
446
|
minVersion: "12.0.0",
|
|
440
|
-
version: "22.2.
|
|
447
|
+
version: "22.2.6",
|
|
441
448
|
ngImport: i0,
|
|
442
449
|
type: WrDropdownMenu,
|
|
443
450
|
deps: [],
|
|
@@ -445,7 +452,7 @@ var WrDropdownMenu = class WrDropdownMenu {
|
|
|
445
452
|
});
|
|
446
453
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
447
454
|
minVersion: "17.2.0",
|
|
448
|
-
version: "22.2.
|
|
455
|
+
version: "22.2.6",
|
|
449
456
|
type: WrDropdownMenu,
|
|
450
457
|
isStandalone: true,
|
|
451
458
|
selector: "wr-dropdown-menu",
|
|
@@ -466,7 +473,7 @@ var WrDropdownMenu = class WrDropdownMenu {
|
|
|
466
473
|
};
|
|
467
474
|
i0.ɵɵngDeclareClassMetadata({
|
|
468
475
|
minVersion: "12.0.0",
|
|
469
|
-
version: "22.2.
|
|
476
|
+
version: "22.2.6",
|
|
470
477
|
ngImport: i0,
|
|
471
478
|
type: WrDropdownMenu,
|
|
472
479
|
decorators: [{
|
|
@@ -513,7 +520,7 @@ var WrDropdownItem = class WrDropdownItem {
|
|
|
513
520
|
}
|
|
514
521
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
515
522
|
minVersion: "12.0.0",
|
|
516
|
-
version: "22.2.
|
|
523
|
+
version: "22.2.6",
|
|
517
524
|
ngImport: i0,
|
|
518
525
|
type: WrDropdownItem,
|
|
519
526
|
deps: [],
|
|
@@ -521,7 +528,7 @@ var WrDropdownItem = class WrDropdownItem {
|
|
|
521
528
|
});
|
|
522
529
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
523
530
|
minVersion: "17.0.0",
|
|
524
|
-
version: "22.2.
|
|
531
|
+
version: "22.2.6",
|
|
525
532
|
type: WrDropdownItem,
|
|
526
533
|
isStandalone: true,
|
|
527
534
|
selector: "wr-dropdown-item",
|
|
@@ -567,7 +574,7 @@ var WrDropdownItem = class WrDropdownItem {
|
|
|
567
574
|
};
|
|
568
575
|
i0.ɵɵngDeclareClassMetadata({
|
|
569
576
|
minVersion: "12.0.0",
|
|
570
|
-
version: "22.2.
|
|
577
|
+
version: "22.2.6",
|
|
571
578
|
ngImport: i0,
|
|
572
579
|
type: WrDropdownItem,
|
|
573
580
|
decorators: [{
|
|
@@ -608,6 +615,290 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
608
615
|
}]
|
|
609
616
|
}
|
|
610
617
|
});
|
|
611
|
-
|
|
618
|
+
/**
|
|
619
|
+
* @license
|
|
620
|
+
*
|
|
621
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
622
|
+
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
623
|
+
*/
|
|
624
|
+
const POSITIONS = [
|
|
625
|
+
{
|
|
626
|
+
originX: "end",
|
|
627
|
+
originY: "top",
|
|
628
|
+
overlayX: "start",
|
|
629
|
+
overlayY: "top"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
originX: "start",
|
|
633
|
+
originY: "top",
|
|
634
|
+
overlayX: "end",
|
|
635
|
+
overlayY: "top"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
originX: "end",
|
|
639
|
+
originY: "bottom",
|
|
640
|
+
overlayX: "start",
|
|
641
|
+
overlayY: "bottom"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
originX: "start",
|
|
645
|
+
originY: "bottom",
|
|
646
|
+
overlayX: "end",
|
|
647
|
+
overlayY: "bottom"
|
|
648
|
+
}
|
|
649
|
+
];
|
|
650
|
+
let itemUid = 0;
|
|
651
|
+
var WrDropdownSubmenu = class WrDropdownSubmenu {
|
|
652
|
+
menu = input.required({
|
|
653
|
+
...ngDevMode ? { debugName: "menu" } : /* istanbul ignore next */ {},
|
|
654
|
+
alias: "wrDropdownSubmenu"
|
|
655
|
+
});
|
|
656
|
+
showDelay = input(150, {
|
|
657
|
+
...ngDevMode ? { debugName: "showDelay" } : /* istanbul ignore next */ {},
|
|
658
|
+
transform: wrNumAttr(150)
|
|
659
|
+
});
|
|
660
|
+
hideDelay = input(150, {
|
|
661
|
+
...ngDevMode ? { debugName: "hideDelay" } : /* istanbul ignore next */ {},
|
|
662
|
+
transform: wrNumAttr(150)
|
|
663
|
+
});
|
|
664
|
+
host = inject(ElementRef);
|
|
665
|
+
focusMonitor = inject(FocusMonitor);
|
|
666
|
+
overlay = inject(WR_OVERLAY);
|
|
667
|
+
dir = inject(Directionality, { optional: true });
|
|
668
|
+
outsideClick = inject(WrOutsideClick);
|
|
669
|
+
vcr = inject(ViewContainerRef);
|
|
670
|
+
scrollStrategies = inject(ScrollStrategyOptions);
|
|
671
|
+
injector = inject(Injector);
|
|
672
|
+
openState = signal(false, ...ngDevMode ? [{ debugName: "openState" }] : /* istanbul ignore next */ []);
|
|
673
|
+
isOpen = this.openState.asReadonly();
|
|
674
|
+
fallbackId = `wr-dropdown-submenu-trigger-${++itemUid}`;
|
|
675
|
+
get itemId() {
|
|
676
|
+
return this.host.nativeElement.id || this.fallbackId;
|
|
677
|
+
}
|
|
678
|
+
overlayRef = null;
|
|
679
|
+
level = null;
|
|
680
|
+
outside = null;
|
|
681
|
+
showTimer = null;
|
|
682
|
+
hideTimer = null;
|
|
683
|
+
constructor() {
|
|
684
|
+
if (typeof ngDevMode === "undefined" || ngDevMode) wrCheckStyles("dropdown");
|
|
685
|
+
inject(DestroyRef).onDestroy(() => this.dispose(false));
|
|
686
|
+
}
|
|
687
|
+
open() {
|
|
688
|
+
this.show(true);
|
|
689
|
+
}
|
|
690
|
+
close() {
|
|
691
|
+
this.dispose(true);
|
|
692
|
+
}
|
|
693
|
+
onClick(event) {
|
|
694
|
+
this.show(event.detail === 0);
|
|
695
|
+
}
|
|
696
|
+
onKeydown(event) {
|
|
697
|
+
if (event.key !== (this.dir?.value === "rtl" ? "ArrowLeft" : "ArrowRight") || this.disabled) return;
|
|
698
|
+
event.preventDefault();
|
|
699
|
+
this.show(true);
|
|
700
|
+
}
|
|
701
|
+
onMouseEnter() {
|
|
702
|
+
this.clearTimers();
|
|
703
|
+
if (this.overlayRef || this.disabled) return;
|
|
704
|
+
this.showTimer = setTimeout(() => this.show(false), this.showDelay());
|
|
705
|
+
}
|
|
706
|
+
onMouseLeave(event) {
|
|
707
|
+
this.clearTimers();
|
|
708
|
+
if (!this.level || wrDropdownLevelOf(this.level, event.relatedTarget)) return;
|
|
709
|
+
this.hideLater();
|
|
710
|
+
}
|
|
711
|
+
get disabled() {
|
|
712
|
+
return this.host.nativeElement.getAttribute("aria-disabled") === "true";
|
|
713
|
+
}
|
|
714
|
+
show(focus) {
|
|
715
|
+
this.clearTimers();
|
|
716
|
+
if (!this.overlayRef) this.attach();
|
|
717
|
+
if (focus && this.overlayRef) wrDropdownItems(this.overlayRef.overlayElement)[0]?.focus();
|
|
718
|
+
}
|
|
719
|
+
attach() {
|
|
720
|
+
const parent = wrDropdownLevelAround(this.host.nativeElement);
|
|
721
|
+
if (!parent || this.disabled) return;
|
|
722
|
+
parent.child?.close();
|
|
723
|
+
const ref = this.overlay.create({
|
|
724
|
+
positionStrategy: this.overlay.position().flexibleConnectedTo(this.host).withPositions(POSITIONS).withPush(true).withGrowAfterOpen(true),
|
|
725
|
+
scrollStrategy: this.scrollStrategies.reposition(),
|
|
726
|
+
panelClass: ["wr-dropdown-overlay", "wr-dropdown-overlay--submenu"]
|
|
727
|
+
});
|
|
728
|
+
wrFollowDirection(ref, this.dir, this.injector);
|
|
729
|
+
this.menu().triggerId.set(this.itemId);
|
|
730
|
+
ref.attach(new TemplatePortal(this.menu().contentTpl(), this.vcr));
|
|
731
|
+
const pane = ref.overlayElement;
|
|
732
|
+
pane.addEventListener("mouseenter", this.clearTimers);
|
|
733
|
+
pane.addEventListener("mouseleave", this.onPaneLeave);
|
|
734
|
+
pane.addEventListener("click", this.onPaneClick);
|
|
735
|
+
this.outside = this.outsideClick.outsidePointerEvents(ref).subscribe((event) => {
|
|
736
|
+
if (!this.host.nativeElement.contains(event.target)) this.close();
|
|
737
|
+
});
|
|
738
|
+
this.overlayRef = ref;
|
|
739
|
+
this.level = {
|
|
740
|
+
pane,
|
|
741
|
+
parent,
|
|
742
|
+
child: null,
|
|
743
|
+
close: () => this.close()
|
|
744
|
+
};
|
|
745
|
+
wrDropdownRegisterLevel(this.level);
|
|
746
|
+
this.openState.set(true);
|
|
747
|
+
}
|
|
748
|
+
dispose(restoreFocus) {
|
|
749
|
+
this.clearTimers();
|
|
750
|
+
const ref = this.overlayRef;
|
|
751
|
+
const level = this.level;
|
|
752
|
+
if (!ref || !level) return;
|
|
753
|
+
const focusWasInside = wrDropdownLevelOf(level, document.activeElement) !== null;
|
|
754
|
+
level.child?.close();
|
|
755
|
+
wrDropdownReleaseLevel(level);
|
|
756
|
+
const pane = ref.overlayElement;
|
|
757
|
+
pane.removeEventListener("mouseenter", this.clearTimers);
|
|
758
|
+
pane.removeEventListener("mouseleave", this.onPaneLeave);
|
|
759
|
+
pane.removeEventListener("click", this.onPaneClick);
|
|
760
|
+
this.outside?.unsubscribe();
|
|
761
|
+
this.outside = null;
|
|
762
|
+
ref.dispose();
|
|
763
|
+
this.overlayRef = null;
|
|
764
|
+
this.level = null;
|
|
765
|
+
this.openState.set(false);
|
|
766
|
+
if (restoreFocus && focusWasInside) wrRestoreFocus(this.host.nativeElement, this.focusMonitor);
|
|
767
|
+
}
|
|
768
|
+
hideLater() {
|
|
769
|
+
this.hideTimer = setTimeout(() => this.close(), this.hideDelay());
|
|
770
|
+
}
|
|
771
|
+
clearTimers = () => {
|
|
772
|
+
if (this.showTimer !== null) clearTimeout(this.showTimer);
|
|
773
|
+
if (this.hideTimer !== null) clearTimeout(this.hideTimer);
|
|
774
|
+
this.showTimer = this.hideTimer = null;
|
|
775
|
+
};
|
|
776
|
+
onPaneLeave = (event) => {
|
|
777
|
+
const level = this.level;
|
|
778
|
+
const related = event.relatedTarget;
|
|
779
|
+
if (!level) return;
|
|
780
|
+
if (related instanceof Node && this.host.nativeElement.contains(related)) return;
|
|
781
|
+
if (wrDropdownLevelOf(level, related)) return;
|
|
782
|
+
this.clearTimers();
|
|
783
|
+
this.hideLater();
|
|
784
|
+
let root = level;
|
|
785
|
+
while (root.parent) root = root.parent;
|
|
786
|
+
root.pointerLeft?.(related);
|
|
787
|
+
};
|
|
788
|
+
onPaneClick = (event) => {
|
|
789
|
+
const item = event.target instanceof Element ? event.target.closest(".wr-dropdown-item") : null;
|
|
790
|
+
if (!item || item.matches(".wr-dropdown-item--disabled, .wr-dropdown-submenu-trigger")) return;
|
|
791
|
+
let top = this.level;
|
|
792
|
+
while (top?.parent?.parent) top = top.parent;
|
|
793
|
+
top?.close();
|
|
794
|
+
};
|
|
795
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
796
|
+
minVersion: "12.0.0",
|
|
797
|
+
version: "22.2.6",
|
|
798
|
+
ngImport: i0,
|
|
799
|
+
type: WrDropdownSubmenu,
|
|
800
|
+
deps: [],
|
|
801
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
802
|
+
});
|
|
803
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
804
|
+
minVersion: "17.1.0",
|
|
805
|
+
version: "22.2.6",
|
|
806
|
+
type: WrDropdownSubmenu,
|
|
807
|
+
isStandalone: true,
|
|
808
|
+
selector: "[wrDropdownSubmenu]",
|
|
809
|
+
inputs: {
|
|
810
|
+
menu: {
|
|
811
|
+
classPropertyName: "menu",
|
|
812
|
+
publicName: "wrDropdownSubmenu",
|
|
813
|
+
isSignal: true,
|
|
814
|
+
isRequired: true,
|
|
815
|
+
transformFunction: null
|
|
816
|
+
},
|
|
817
|
+
showDelay: {
|
|
818
|
+
classPropertyName: "showDelay",
|
|
819
|
+
publicName: "showDelay",
|
|
820
|
+
isSignal: true,
|
|
821
|
+
isRequired: false,
|
|
822
|
+
transformFunction: null
|
|
823
|
+
},
|
|
824
|
+
hideDelay: {
|
|
825
|
+
classPropertyName: "hideDelay",
|
|
826
|
+
publicName: "hideDelay",
|
|
827
|
+
isSignal: true,
|
|
828
|
+
isRequired: false,
|
|
829
|
+
transformFunction: null
|
|
830
|
+
}
|
|
831
|
+
},
|
|
832
|
+
host: {
|
|
833
|
+
attributes: { "aria-haspopup": "menu" },
|
|
834
|
+
listeners: {
|
|
835
|
+
"click": "onClick($event)",
|
|
836
|
+
"keydown": "onKeydown($event)",
|
|
837
|
+
"mouseenter": "onMouseEnter()",
|
|
838
|
+
"mouseleave": "onMouseLeave($event)"
|
|
839
|
+
},
|
|
840
|
+
properties: {
|
|
841
|
+
"attr.id": "itemId",
|
|
842
|
+
"attr.aria-expanded": "isOpen()",
|
|
843
|
+
"attr.aria-controls": "isOpen() ? menu().menuId() : null"
|
|
844
|
+
},
|
|
845
|
+
classAttribute: "wr-dropdown-submenu-trigger"
|
|
846
|
+
},
|
|
847
|
+
exportAs: ["wrDropdownSubmenu"],
|
|
848
|
+
ngImport: i0
|
|
849
|
+
});
|
|
850
|
+
};
|
|
851
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
852
|
+
minVersion: "12.0.0",
|
|
853
|
+
version: "22.2.6",
|
|
854
|
+
ngImport: i0,
|
|
855
|
+
type: WrDropdownSubmenu,
|
|
856
|
+
decorators: [{
|
|
857
|
+
type: Directive,
|
|
858
|
+
args: [{
|
|
859
|
+
selector: "[wrDropdownSubmenu]",
|
|
860
|
+
exportAs: "wrDropdownSubmenu",
|
|
861
|
+
host: {
|
|
862
|
+
class: "wr-dropdown-submenu-trigger",
|
|
863
|
+
"[attr.id]": "itemId",
|
|
864
|
+
"aria-haspopup": "menu",
|
|
865
|
+
"[attr.aria-expanded]": "isOpen()",
|
|
866
|
+
"[attr.aria-controls]": "isOpen() ? menu().menuId() : null",
|
|
867
|
+
"(click)": "onClick($event)",
|
|
868
|
+
"(keydown)": "onKeydown($event)",
|
|
869
|
+
"(mouseenter)": "onMouseEnter()",
|
|
870
|
+
"(mouseleave)": "onMouseLeave($event)"
|
|
871
|
+
}
|
|
872
|
+
}]
|
|
873
|
+
}],
|
|
874
|
+
ctorParameters: () => [],
|
|
875
|
+
propDecorators: {
|
|
876
|
+
menu: [{
|
|
877
|
+
type: i0.Input,
|
|
878
|
+
args: [{
|
|
879
|
+
isSignal: true,
|
|
880
|
+
alias: "wrDropdownSubmenu",
|
|
881
|
+
required: true
|
|
882
|
+
}]
|
|
883
|
+
}],
|
|
884
|
+
showDelay: [{
|
|
885
|
+
type: i0.Input,
|
|
886
|
+
args: [{
|
|
887
|
+
isSignal: true,
|
|
888
|
+
alias: "showDelay",
|
|
889
|
+
required: false
|
|
890
|
+
}]
|
|
891
|
+
}],
|
|
892
|
+
hideDelay: [{
|
|
893
|
+
type: i0.Input,
|
|
894
|
+
args: [{
|
|
895
|
+
isSignal: true,
|
|
896
|
+
alias: "hideDelay",
|
|
897
|
+
required: false
|
|
898
|
+
}]
|
|
899
|
+
}]
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
export { WrDropdown, WrDropdownItem, WrDropdownMenu, WrDropdownSubmenu };
|
|
612
903
|
|
|
613
904
|
//# sourceMappingURL=ngwr-dropdown.mjs.map
|