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-sortable-list.mjs","names":[],"sources":["../../../projects/lib/sortable-list/tokens/sortable-list.token.ts","../../../projects/lib/sortable-list/sortable-list.ts","../../../projects/lib/sortable-list/sortable-list.html","../../../projects/lib/sortable-list/sortable-item.ts","../../../projects/lib/sortable-list/drag-handle.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 { InjectionToken, type WritableSignal, signal } from '@angular/core';\n\nimport type { WrSortableList } from '../sortable-list';\nimport type { WrSortableListContext } from '../types';\n\n/**\n * Token a `<wr-sortable-item>` injects to find its parent `<wr-sortable-list>`.\n *\n * Rows arrive through `<ng-content>`, so nothing in the list's template can\n * bind to them and the child has to reach up — the same shape\n * `<wr-carousel-slide>` and `<wr-tab>` use.\n *\n * @internal\n */\nexport const WR_SORTABLE_LIST = new InjectionToken<WrSortableListContext>('WR_SORTABLE_LIST');\n\n/**\n * Every live `<wr-sortable-list>` of the application. A list reads its group\n * out of it, so two lists connect by name with no common ancestor: each column\n * of a board can sit in its own component.\n *\n * @internal\n */\nexport const WR_SORTABLE_LISTS = new InjectionToken<WritableSignal<readonly WrSortableList[]>>('WR_SORTABLE_LISTS', {\n providedIn: 'root',\n factory: () => signal<readonly WrSortableList[]>([]),\n});\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type CdkDrag, type CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n type WritableSignal,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport { wrReadI18nText, useI18nFormatter } from 'ngwr/i18n';\n\nimport { WR_SORTABLE_LIST, WR_SORTABLE_LISTS } from './tokens';\nimport type {\n WrSortableCanEnter,\n WrSortableListContext,\n WrSortableMoveEnd,\n WrSortableMoveEvent,\n WrSortableReorderEvent,\n} from './types';\n\n/** Whether `b` comes after `a` in the document. */\nfunction follows(a: HTMLElement, b: HTMLElement): boolean {\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n return (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0;\n}\n\n/** Counted, not random: the list prerenders, so the id has to match on rehydration. */\nlet sortableListUid = 0;\n\n/**\n * Drag-to-reorder list. Wraps CDK's `cdkDropList` + `cdkDrag` with a\n * signal-based items binding — the source array is updated in place and\n * emitted via 2-way `[(items)]`.\n *\n * Write the loop yourself and project a `<wr-sortable-item>` per row. Until\n * v15 the list owned the loop and rendered one unnamed `<ng-template\n * let-row let-i=\"index\">`, which said nothing in the markup about where those\n * variables came from and gave a row no way to carry anything of its own. Put\n * `wrDragHandle` on an element inside a row to restrict drag start to a\n * handle; there is no input for it, the directive's presence is the switch.\n *\n * Every row is a tab stop: Space or Enter picks it up, the arrow keys move it,\n * Space or Enter drops it and Escape puts it back. CDK's `cdkDrag` ships no key\n * handling of its own, so without this the component's only function was\n * unreachable from a keyboard.\n *\n * Reading direction: a `horizontal` list follows the VISUAL order, so under\n * `dir=\"rtl\"` ArrowLeft moves the held row toward the higher index — the same\n * rule `wr-slider` applies to its track. A vertical list never mirrors.\n *\n * What that does NOT answer is WCAG 2.5.7, which asks for a POINTER alternative\n * to the drag. Click-to-pick-up is the obvious candidate and is not safe here:\n * the CDK's drag-drop bundle installs no click suppressor of any kind, so the\n * mouseup ending a drag still produces a click, and a row that grabbed itself on\n * click would be picking itself straight back up. A visible move-up /\n * move-down affordance is the remaining answer, and that is a design change.\n *\n * Lists that share a `group` exchange items, by drag and by keyboard. The\n * target list emits `move` once, and both lists write `[(items)]`; `reorder`\n * stays for a move inside one list. Lists find each other through a root\n * registry and are handed to `cdkDropListConnectedTo`, not through\n * `cdkDropListGroup`, which needs a common ancestor directive and so cannot\n * join lists that live in separate components.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\" (reorder)=\"onReorder($event)\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle>≡</span>\n * {{ row.label }}\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sortable-list\n */\n@Component({\n selector: 'wr-sortable-list',\n templateUrl: './sortable-list.html',\n styleUrl: './sortable-list.scss',\n encapsulation: ViewEncapsulation.None,\n // On the host, not in the template: rows are projected, and a projected\n // `cdkDrag` resolves its drop list through the element injector, which\n // never passes through this component's own view.\n hostDirectives: [CdkDropList],\n host: {\n class: 'wr-sortable-list',\n '[class.wr-sortable-list--connected]': '!!group()',\n '[class.wr-sortable-list--empty]': 'items().length === 0',\n '[attr.id]': 'id() ?? fallbackId',\n },\n providers: [{ provide: WR_SORTABLE_LIST, useExisting: WrSortableList }],\n})\nexport class WrSortableList<T = unknown> implements WrSortableListContext {\n /** Items to render. Two-way — emits the reordered array on drop. */\n readonly items = model.required<T[]>();\n\n /** Layout direction. Drives CDK's `cdkDropListOrientation`. @default 'vertical' */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Disable all dragging. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Locked axis — restrict drag movement to one axis even diagonally. */\n readonly lockAxis = input<'x' | 'y' | undefined>(undefined);\n\n /**\n * Delay (ms) before a drag begins after the pointer goes down. The touch\n * delay is the fix for the classic CDK touch snag: without it, the\n * `touch-action: none` CDK puts on each item blocks scrolling the list on a\n * phone. With a small touch delay, a quick swipe scrolls and a brief hold\n * starts the drag; mouse stays instant. Pass a single number to apply one\n * delay to both pointers. @default { touch: 150, mouse: 0 }\n */\n readonly dragStartDelay = input<number | { touch: number; mouse: number }>({ touch: 150, mouse: 0 });\n\n /**\n * Name of the group this list belongs to. Lists with the same group exchange\n * items, wherever they sit in the page. @default null\n */\n readonly group = input<string | null>(null);\n\n /**\n * Refuses an item coming from another list of the group, by drag and by\n * keyboard alike. An item can always return to the list it left.\n * @default null\n */\n readonly canEnter = input<WrSortableCanEnter<T> | null>(null);\n\n /**\n * Accessible name of the list. A keyboard move into this list announces it;\n * without one the announcement falls back to the list's position in the group.\n * @default null\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** The host's `id`, and what tells the lists of a `move` apart. Generated when omitted. */\n readonly id = input<string>();\n\n /** Fired after a successful reorder with the new array + indices. Not fired for a move between lists. */\n readonly reorder = output<WrSortableReorderEvent<T>>();\n\n /**\n * Fired once on the list an item ARRIVED in from another list of the group,\n * after both lists have written `items`. The list it left emits nothing but\n * `itemsChange`.\n */\n readonly move = output<WrSortableMoveEvent<T>>();\n\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly dropList = inject<CdkDropList<WrSortableList<T>>>(CdkDropList, { self: true });\n private readonly lists = inject(WR_SORTABLE_LISTS) as unknown as WritableSignal<readonly WrSortableList<T>[]>;\n private readonly listEl = viewChild.required<ElementRef<HTMLElement>>('list');\n\n /** The other lists of this list's group. */\n private readonly peers = computed(() => {\n const group = this.group();\n return group ? this.lists().filter(list => list !== this && list.group() === group) : [];\n });\n\n /**\n * Ambient reading direction, for the keyboard path.\n *\n * Optional so a bare `TestBed` — or any consumer that never set a direction —\n * needs no provider; `Directionality` is root-provided, so `null` only ever\n * means \"nobody asked\", which is LTR. Nothing caches a direction-derived\n * value: `isRtl()` is read inside the key handler, so a runtime flip needs no\n * subscription to `Directionality.change`.\n *\n * The POINTER path already mirrors without this — `cdkDropList` injects\n * `Directionality` itself and feeds it to `DropListRef.withDirection`, so a\n * horizontal drag has always followed the visual order. The keyboard path was\n * the half that did not, which is why the two disagreed.\n */\n private readonly dir = inject(Directionality, { optional: true });\n\n /**\n * The rows, in projection order, which is the order the consumer's own loop\n * rendered them in — so a row's position here IS its index into `items()`.\n *\n * Collected on construction rather than through `contentChildren`, because\n * the keyboard path has to resolve an index DURING a keydown and a query\n * signal is only guaranteed current after change detection. A row that\n * Angular destroys drops out on the next lookup: the element is gone from\n * the DOM, so `indexOf` cannot find it and the stale entry is swept then.\n */\n private readonly rows: { readonly host: ElementRef<HTMLElement> }[] = [];\n\n /** Index of the row the keyboard is holding, or `null` when nothing is held. */\n readonly grabbedIndex = signal<number | null>(null);\n\n /** Live-region text. Written by the keyboard path only. */\n protected readonly announcement = signal('');\n\n private readonly uid = ++sortableListUid;\n\n /** Links every row to the key model via `aria-describedby`. */\n readonly keyHelpId = `wr-sortable-list-help-${this.uid}`;\n\n protected readonly fallbackId = `wr-sortable-list-${this.uid}`;\n\n private readonly keyHelp = wrReadI18nText(\n 'sortableList.keyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n private readonly groupKeyHelp = wrReadI18nText(\n 'sortableList.groupKeyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it, within its list or into the next one. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n protected readonly resolvedKeyHelp = computed(() => (this.group() ? this.groupKeyHelp() : this.keyHelp()));\n\n private readonly grabbedText = useI18nFormatter('sortableList.grabbed', 'Grabbed. {{index}} of {{total}}.');\n private readonly movedText = useI18nFormatter('sortableList.moved', '{{index}} of {{total}}.');\n private readonly droppedText = useI18nFormatter('sortableList.dropped', 'Dropped. {{index}} of {{total}}.');\n private readonly cancelledText = wrReadI18nText('sortableList.cancelled', 'Move cancelled.');\n private readonly movedToText = useI18nFormatter('sortableList.movedTo', 'Moved to {{list}}. {{index}} of {{total}}.');\n private readonly listPositionText = useI18nFormatter('sortableList.listPosition', 'list {{index}} of {{total}}');\n\n /** Where the held row started, which can be another list. Escape puts it back there. */\n private grabOrigin: WrSortableMoveEnd<T> | null = null;\n\n /** True while a keyboard move is handing focus back — see `onRowFocusout`. */\n private restoringFocus = false;\n\n constructor() {\n this.lists.update(lists => [...lists, this]);\n inject(DestroyRef).onDestroy(() => this.lists.update(lists => lists.filter(list => list !== this)));\n\n const dropList = this.dropList;\n dropList.data = this;\n dropList.elementContainerSelector = '.wr-sortable-list__list';\n dropList.enterPredicate = (drag: CdkDrag<T>) => {\n const from = drag.dropContainer?.data as WrSortableList<T> | undefined;\n return !!from && this.accepts(drag.data, from);\n };\n dropList.dropped.subscribe((event: CdkDragDrop<WrSortableList<T>>) => this.onDrop(event));\n\n // Assigned, not bound: a host directive's inputs are out of a host binding's reach.\n effect(() => {\n dropList.id = this.id() ?? this.fallbackId;\n dropList.orientation = this.orientation();\n dropList.disabled = this.disabled();\n dropList.connectedTo = this.peers().map(list => list.dropList);\n });\n\n // The CDK resolves the selector above only on the list a drag STARTS in. A\n // list that only ever receives would append the placeholder to the host,\n // beside the rows' container rather than in it.\n afterNextRender(() => dropList._dropListRef.withElementContainer(this.listEl().nativeElement));\n }\n\n private onDrop(event: CdkDragDrop<WrSortableList<T>>): void {\n if (event.previousContainer !== event.container) {\n const source = event.previousContainer.data;\n const item = source.removeAt(event.previousIndex);\n this.insertAt(item, event.currentIndex);\n this.move.emit({\n item,\n from: { list: source, index: event.previousIndex },\n to: { list: this, index: event.currentIndex },\n });\n return;\n }\n if (event.previousIndex === event.currentIndex) return;\n const next = this.items().slice();\n moveItemInArray(next, event.previousIndex, event.currentIndex);\n this.items.set(next);\n this.reorder.emit({\n items: next,\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n item: next[event.currentIndex],\n });\n }\n\n /**\n * The keyboard reorder path: pick up, move, drop — deliberately a two-step\n * grab rather than \"an arrow moves the focused row\", so that arrowing through\n * a list a user is only reading can never rearrange it.\n *\n * Keys are handled only when the ROW itself is the event target; a button or\n * an input projected into the row template keeps every key it would normally\n * get.\n */\n /** @internal A row registering itself on construction. */\n register(item: { readonly host: ElementRef<HTMLElement> }): void {\n this.rows.push(item);\n }\n\n /**\n * @internal A row's position among its live siblings.\n *\n * Read off the DOM rather than off the registration order, because a row can\n * be added, removed or moved by the consumer's own loop and construction\n * order survives none of those. Rows whose element has left the document are\n * swept here, which is the only place that can tell.\n */\n indexOf(item: { readonly host: ElementRef<HTMLElement> }): number {\n this.sortRows();\n return this.rows.indexOf(item);\n }\n\n /**\n * Drops rows whose element has left the document and puts the rest into\n * document order.\n *\n * Its own method because `relocate` needs it too: that one focuses\n * `rows[to]` after the move, and without a re-sort it reached into an array\n * still ordered as the list looked BEFORE the move.\n */\n private sortRows(): void {\n for (let i = this.rows.length - 1; i >= 0; i -= 1) {\n if (!this.rows[i].host.nativeElement.isConnected) this.rows.splice(i, 1);\n }\n this.rows.sort((a, b) => (follows(a.host.nativeElement, b.host.nativeElement) ? -1 : 1));\n }\n\n /** @internal */\n onRowKeydown(event: KeyboardEvent, index: number): void {\n if (this.disabled() || event.target !== event.currentTarget) return;\n\n const grabbed = this.grabbedIndex();\n const horizontal = this.orientation() === 'horizontal';\n // The horizontal arrows name a SIDE of the row, so they follow the reading\n // direction: a horizontal list under `dir=\"rtl\"` paints index 0 at the right,\n // so the key that raises the index is ArrowLeft. Raising it on ArrowRight\n // regardless moved the held item away from the arrow the user pressed — the\n // one failure in this set a user cannot rationalise, because it inverts their\n // model of the list silently. The block arrows name a value's direction in a\n // column and never mirror, which is why only the horizontal pair is swapped.\n const rtl = this.dir?.value === 'rtl';\n const inlineForward = rtl ? 'ArrowLeft' : 'ArrowRight';\n const inlineBack = rtl ? 'ArrowRight' : 'ArrowLeft';\n const forward = horizontal ? inlineForward : 'ArrowDown';\n const back = horizontal ? inlineBack : 'ArrowUp';\n // The arrows of the other axis walk the group: columns sit side by side, so\n // a vertical list hands the row over on the inline pair, mirrored like above.\n const nextList = horizontal ? 'ArrowDown' : inlineForward;\n const previousList = horizontal ? 'ArrowUp' : inlineBack;\n\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n if (grabbed === null) this.grab(index);\n else this.drop();\n return;\n }\n\n if (grabbed === null) return;\n\n if (event.key === 'Escape') {\n event.preventDefault();\n // Held only while a row is grabbed — an Escape typed anywhere else has to\n // keep reaching whatever dialog or overlay the list is sitting in.\n event.stopPropagation();\n this.cancelGrab();\n return;\n }\n\n if (event.key === forward || event.key === back) {\n event.preventDefault();\n this.moveGrabbed(event.key === forward ? 1 : -1);\n return;\n }\n\n if (this.group() && (event.key === nextList || event.key === previousList)) {\n event.preventDefault();\n this.moveToList(event.key === nextList ? 1 : -1);\n }\n }\n\n /**\n * Focus leaving a held row ends the gesture as a drop rather than dropping the\n * change on the floor — `[(items)]` has already been written by then, so a\n * silent release would leave `reorder` never reporting a move that happened.\n * The guard is what makes it safe: moving a focused node in the DOM blurs it,\n * so every keyboard move fires this too.\n */\n /** @internal */\n onRowFocusout(): void {\n if (this.restoringFocus || this.grabbedIndex() === null) return;\n this.drop();\n }\n\n private grab(index: number): void {\n this.grabOrigin = { list: this, index };\n this.grabbedIndex.set(index);\n this.announcement.set(this.grabbedText(this.position(index)));\n }\n\n private moveGrabbed(delta: number): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n const to = from + delta;\n if (to < 0 || to >= this.items().length) return;\n\n this.relocate(from, to);\n this.grabbedIndex.set(to);\n this.announcement.set(this.movedText(this.position(to)));\n }\n\n /**\n * Hands the held row to the nearest list of the group, in document order,\n * that takes it. A list that refuses is stepped over, since a drag can reach\n * any list of the group and the keyboard must not reach fewer.\n */\n private moveToList(step: 1 | -1): void {\n const from = this.grabbedIndex();\n const origin = this.grabOrigin;\n if (from === null || !origin) return;\n\n const group = this.groupLists();\n const item = this.items()[from];\n let at = group.indexOf(this) + step;\n while (group[at] && !group[at].accepts(item, origin.list)) at += step;\n const target = group[at];\n if (!target) return;\n\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n this.announcement.set('');\n this.removeAt(from);\n\n const to = Math.min(from, target.items().length);\n target.insertAt(item, to);\n target.grabOrigin = origin;\n target.grabbedIndex.set(to);\n const list =\n target.ariaLabel() ?? target.listPositionText({ index: group.indexOf(target) + 1, total: group.length });\n target.announcement.set(target.movedToText({ list, ...target.position(to) }));\n target.focusRow(to);\n }\n\n private drop(): void {\n const to = this.grabbedIndex();\n const origin = this.grabOrigin;\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n if (to === null || !origin) return;\n\n this.announcement.set(this.droppedText(this.position(to)));\n if (origin.list !== this) {\n this.move.emit({ item: this.items()[to], from: origin, to: { list: this, index: to } });\n return;\n }\n if (origin.index === to) return;\n // One event per gesture, the way a drag emits one on drop — not one per\n // arrow press, which would put a host that persists on `reorder` through a\n // write per keystroke. `[(items)]` still updates on every press, because\n // the rendered order has to follow the row the user is moving.\n this.reorder.emit({ items: this.items(), previousIndex: origin.index, currentIndex: to, item: this.items()[to] });\n }\n\n private cancelGrab(): void {\n const from = this.grabbedIndex();\n const origin = this.grabOrigin;\n if (from === null || !origin) return;\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n\n if (origin.list === this) {\n if (from !== origin.index) this.relocate(from, origin.index);\n this.announcement.set(this.cancelledText());\n return;\n }\n this.announcement.set('');\n origin.list.insertAt(this.removeAt(from), origin.index);\n origin.list.announcement.set(origin.list.cancelledText());\n origin.list.focusRow(origin.index);\n }\n\n /** Whether this list takes `item` from another list of the group. */\n private accepts(item: T, from: WrSortableList<T>): boolean {\n return !this.disabled() && (from === this || (this.canEnter()?.(item, from) ?? true));\n }\n\n /** This list and its peers, in document order. */\n private groupLists(): WrSortableList<T>[] {\n return [this, ...this.peers()].sort((a, b) => (follows(a.host.nativeElement, b.host.nativeElement) ? -1 : 1));\n }\n\n private removeAt(index: number): T {\n const next = this.items().slice();\n const [item] = next.splice(index, 1);\n this.items.set(next);\n return item;\n }\n\n private insertAt(item: T, index: number): void {\n const next = this.items().slice();\n next.splice(index, 0, item);\n this.items.set(next);\n }\n\n private relocate(from: number, to: number): void {\n const next = this.items().slice();\n moveItemInArray(next, from, to);\n this.items.set(next);\n this.focusRow(to);\n }\n\n private focusRow(to: number): void {\n // The row is the same DOM node moved to another slot, and moving a focused\n // node hands focus back to `<body>` — so it has to be taken again once the\n // move has rendered. `afterNextRender`, never a microtask: zoneless change\n // detection runs in a macrotask, so a microtask would fire while the row is\n // still at its old index and focus the wrong one. (jsdom keeps focus across\n // a node move, so no spec here can express that half.)\n this.restoringFocus = true;\n afterNextRender(\n () => {\n // Re-sorted FIRST. `this.rows` is only ever put into document order by\n // `indexOf`, and nothing calls it between the move and here — so the\n // array was still in the order it had BEFORE the move, and `rows[to]`\n // was whichever row used to be at that slot. `sortRows()` is the same\n // sweep-and-sort `indexOf` runs; after it, index `to` is the row the\n // move actually put there.\n this.sortRows();\n this.rows[to]?.host.nativeElement.focus();\n this.restoringFocus = false;\n },\n { injector: this.injector }\n );\n }\n\n private position(index: number): { index: number; total: number } {\n return { index: index + 1, total: this.items().length };\n }\n}\n\nexport type { WrSortableCanEnter, WrSortableMoveEnd, WrSortableMoveEvent, WrSortableReorderEvent } from './types';\n","<!--\n `role=\"list\"` on the container and `role=\"listitem\"` on each row rather than\n bare divs: every row is a tab stop, and a focusable element with no role at\n all is announced as loose text. The list role is what gives the reader the\n position of the row focus lands on.\n\n Rows arrive through `<ng-content>` — the consumer writes the loop, so the\n markup says what each row is instead of hiding it in an unnamed template.\n-->\n<div #list role=\"list\" class=\"wr-sortable-list__list\" [attr.aria-label]=\"ariaLabel()\">\n <ng-content />\n @if (items().length === 0) {\n <!-- A row of its own, so the list announces what it shows; hidden by `:empty` when nothing is projected. -->\n <div role=\"listitem\" class=\"wr-sortable-list__empty\"><ng-content select=\"[wrSortableListEmpty]\" /></div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only — a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\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 { CdkDrag } from '@angular/cdk/drag-drop';\nimport { Component, ElementRef, ViewEncapsulation, computed, effect, inject } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WR_SORTABLE_LIST } from './tokens';\n\n/**\n * One row of a {@link WrSortableList}. Write the loop yourself and put whatever\n * the row shows inside it.\n *\n * It replaced a single unnamed `<ng-template let-row let-i=\"index\">` that the\n * list rendered per item. Two things were wrong with that. The template had no\n * name, so nothing in the markup said what the context variables were or where\n * they came from — a reader had to open the component to learn that `let-row`\n * is the item and `let-i` the index. And a row could not carry anything of its\n * own: every per-row decision had to be an input on the LIST, or a branch\n * inside one template.\n *\n * The row is the tab stop, so the keyboard contract lives here: Space or Enter\n * picks it up, the arrows move it, Space or Enter drops it, Escape puts it\n * back. The list owns the array and the announcements, and this delegates to\n * it — an item knows its own position and nothing else.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle>≡</span>\n * {{ row.label }}\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sortable-list\n */\n@Component({\n selector: 'wr-sortable-item',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [CdkDrag],\n host: {\n class: 'wr-sortable-list__item',\n role: 'listitem',\n '[class.wr-sortable-list__item--grabbed]': 'grabbed()',\n '[attr.tabindex]': 'list.disabled() ? null : 0',\n '[attr.aria-describedby]': 'list.disabled() ? null : list.keyHelpId',\n '(keydown)': 'onKeydown($event)',\n '(focusout)': 'list.onRowFocusout()',\n },\n})\nexport class WrSortableItem {\n /** @internal The list this row belongs to. Read by the host bindings above. */\n protected readonly list = inject(WR_SORTABLE_LIST);\n\n private readonly drag = inject(CdkDrag);\n\n /** @internal */\n readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Position among the list's rows, which IS the index into `items()`: the\n * consumer's own loop renders them in that order.\n *\n * `indexOf` resolves by DOCUMENT ORDER over a plain array and touches no\n * signal, so the `computed` needs a producer that changes whenever a position\n * can. That producer is the `items` ARRAY, not its length: a reorder keeps the\n * count, so a length-keyed index stayed on the slot the row had left, the\n * highlight stayed behind with it, and a second pick-up of the same row moved\n * its old neighbour instead. Host bindings run after the consumer's `@for`\n * has moved the nodes, so the recomputation reads the new order.\n */\n protected readonly index = computed(() => {\n this.list.items();\n return this.list.indexOf(this);\n });\n\n protected readonly grabbed = computed(() => this.list.grabbedIndex() === this.index());\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sortable-list');\n this.list.register(this);\n\n // Assigned rather than bound, because these belong to the LIST and a host\n // binding cannot reach another directive's input. `CdkDrag` reads all\n // three as plain properties on every gesture, so writing them from an\n // effect is enough and a runtime change takes effect on the next drag.\n effect(() => {\n this.drag.disabled = this.list.disabled();\n this.drag.lockAxis = this.list.lockAxis() ?? null;\n this.drag.dragStartDelay = this.list.dragStartDelay();\n });\n\n // What a connected list's `canEnter` is asked about.\n effect(() => {\n this.drag.data = this.list.items()[this.index()];\n });\n }\n\n /**\n * @internal Resolves the position at the moment of the key, off the DOM,\n * rather than through the cached `index`: nothing has to have rendered\n * between two presses for the answer to be right.\n */\n protected onKeydown(event: KeyboardEvent): void {\n this.list.onRowKeydown(event, this.list.indexOf(this));\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { CdkDragHandle } from '@angular/cdk/drag-drop';\nimport { Directive } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Drag handle for {@link WrSortableList} (and any nested `cdkDrag`).\n * Composes CDK's `cdkDragHandle` via `hostDirectives` so consumers don't\n * need to import the CDK selector directly.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle class=\"grip\">≡</span>\n * <span>{{ row.label }}</span>\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n */\n@Directive({\n selector: '[wrDragHandle]',\n hostDirectives: [CdkDragHandle],\n host: { class: 'wr-drag-handle' },\n})\nexport class WrDragHandle {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sortable-list');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAqBA,MAAa,mBAAmB,IAAI,eAAsC,kBAAkB;AAS5F,MAAa,oBAAoB,IAAI,eAA0D,qBAAqB;CAClH,YAAY;CACZ,eAAe,OAAkC,CAAA,CAAE;AACpD,CAAA;;;;;;;ACOD,SAAS,QAAQ,GAAgB,GAAc;CAE7C,QAAQ,EAAE,wBAAwB,CAAC,IAAI,KAAK,iCAAiC;AAC/E;AAGA,IAAI,kBAAkB;AAoEtB,IAAa,iBAAb,MAAa,eAAc;CAEhB,QAAQ,MAAM,SAAe,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAG7B,cAAc,MAAiC,YAAW,GAAA,YAAA,CAAA,EAAA,WAAA,c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
1
|
+
{"version":3,"file":"ngwr-sortable-list.mjs","names":["DOCUMENT"],"sources":["../../../projects/lib/sortable-list/tokens/sortable-list.token.ts","../../../projects/lib/sortable-list/sortable-list.ts","../../../projects/lib/sortable-list/sortable-list.html","../../../projects/lib/sortable-list/sortable-item.ts","../../../projects/lib/sortable-list/drag-handle.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 { InjectionToken, type WritableSignal, signal } from '@angular/core';\n\nimport type { WrSortableList } from '../sortable-list';\nimport type { WrSortableListContext } from '../types';\n\n/**\n * Token a `<wr-sortable-item>` injects to find its parent `<wr-sortable-list>`.\n *\n * Rows arrive through `<ng-content>`, so nothing in the list's template can\n * bind to them and the child has to reach up — the same shape\n * `<wr-carousel-slide>` and `<wr-tab>` use.\n *\n * @internal\n */\nexport const WR_SORTABLE_LIST = new InjectionToken<WrSortableListContext>('WR_SORTABLE_LIST');\n\n/**\n * Every live `<wr-sortable-list>` of the application. A list reads its group\n * out of it, so two lists connect by name with no common ancestor: each column\n * of a board can sit in its own component.\n *\n * @internal\n */\nexport const WR_SORTABLE_LISTS = new InjectionToken<WritableSignal<readonly WrSortableList[]>>('WR_SORTABLE_LISTS', {\n providedIn: 'root',\n factory: () => signal<readonly WrSortableList[]>([]),\n});\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { type CdkDrag, type CdkDragDrop, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n Injector,\n type WritableSignal,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\n\nimport { wrReadI18nText, useI18nFormatter } from 'ngwr/i18n';\n\nimport { WR_SORTABLE_LIST, WR_SORTABLE_LISTS } from './tokens';\nimport type {\n WrSortableCanEnter,\n WrSortableListContext,\n WrSortableMoveEnd,\n WrSortableMoveEvent,\n WrSortableReorderEvent,\n} from './types';\n\n/** Whether `b` comes after `a` in the document. */\nfunction follows(a: HTMLElement, b: HTMLElement): boolean {\n // eslint-disable-next-line no-bitwise -- compareDocumentPosition answers with a bitmask\n return (a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0;\n}\n\n/** Counted, not random: the list prerenders, so the id has to match on rehydration. */\nlet sortableListUid = 0;\n\n/**\n * Drag-to-reorder list. Wraps CDK's `cdkDropList` + `cdkDrag` with a\n * signal-based items binding — the source array is updated in place and\n * emitted via 2-way `[(items)]`.\n *\n * Write the loop yourself and project a `<wr-sortable-item>` per row. Until\n * v15 the list owned the loop and rendered one unnamed `<ng-template\n * let-row let-i=\"index\">`, which said nothing in the markup about where those\n * variables came from and gave a row no way to carry anything of its own. Put\n * `wrDragHandle` on an element inside a row to restrict drag start to a\n * handle; there is no input for it, the directive's presence is the switch.\n *\n * Every row is a tab stop: Space or Enter picks it up, the arrow keys move it,\n * Space or Enter drops it and Escape puts it back. CDK's `cdkDrag` ships no key\n * handling of its own, so without this the component's only function was\n * unreachable from a keyboard.\n *\n * Reading direction: a `horizontal` list follows the VISUAL order, so under\n * `dir=\"rtl\"` ArrowLeft moves the held row toward the higher index — the same\n * rule `wr-slider` applies to its track. A vertical list never mirrors.\n *\n * What that does NOT answer is WCAG 2.5.7, which asks for a POINTER alternative\n * to the drag. Click-to-pick-up is the obvious candidate and is not safe here:\n * the CDK's drag-drop bundle installs no click suppressor of any kind, so the\n * mouseup ending a drag still produces a click, and a row that grabbed itself on\n * click would be picking itself straight back up. A visible move-up /\n * move-down affordance is the remaining answer, and that is a design change.\n *\n * Lists that share a `group` exchange items, by drag and by keyboard. The\n * target list emits `move` once, and both lists write `[(items)]`; `reorder`\n * stays for a move inside one list. Lists find each other through a root\n * registry and are handed to `cdkDropListConnectedTo`, not through\n * `cdkDropListGroup`, which needs a common ancestor directive and so cannot\n * join lists that live in separate components.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\" (reorder)=\"onReorder($event)\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle>≡</span>\n * {{ row.label }}\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sortable-list\n */\n@Component({\n selector: 'wr-sortable-list',\n templateUrl: './sortable-list.html',\n styleUrl: './sortable-list.scss',\n encapsulation: ViewEncapsulation.None,\n // On the host, not in the template: rows are projected, and a projected\n // `cdkDrag` resolves its drop list through the element injector, which\n // never passes through this component's own view.\n hostDirectives: [CdkDropList],\n host: {\n class: 'wr-sortable-list',\n '[class.wr-sortable-list--connected]': '!!group()',\n '[class.wr-sortable-list--empty]': 'items().length === 0',\n '[attr.id]': 'id() ?? fallbackId',\n },\n providers: [{ provide: WR_SORTABLE_LIST, useExisting: WrSortableList }],\n})\nexport class WrSortableList<T = unknown> implements WrSortableListContext {\n /** Items to render. Two-way — emits the reordered array on drop. */\n readonly items = model.required<T[]>();\n\n /** Layout direction. Drives CDK's `cdkDropListOrientation`. @default 'vertical' */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Disable all dragging. @default false */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Locked axis — restrict drag movement to one axis even diagonally. */\n readonly lockAxis = input<'x' | 'y' | undefined>(undefined);\n\n /**\n * Delay (ms) before a drag begins after the pointer goes down. The touch\n * delay is the fix for the classic CDK touch snag: without it, the\n * `touch-action: none` CDK puts on each item blocks scrolling the list on a\n * phone. With a small touch delay, a quick swipe scrolls and a brief hold\n * starts the drag; mouse stays instant. Pass a single number to apply one\n * delay to both pointers. @default { touch: 150, mouse: 0 }\n */\n readonly dragStartDelay = input<number | { touch: number; mouse: number }>({ touch: 150, mouse: 0 });\n\n /**\n * Name of the group this list belongs to. Lists with the same group exchange\n * items, wherever they sit in the page. @default null\n */\n readonly group = input<string | null>(null);\n\n /**\n * Refuses an item coming from another list of the group, by drag and by\n * keyboard alike. An item can always return to the list it left.\n * @default null\n */\n readonly canEnter = input<WrSortableCanEnter<T> | null>(null);\n\n /**\n * Accessible name of the list. A keyboard move into this list announces it;\n * without one the announcement falls back to the list's position in the group.\n * @default null\n */\n readonly ariaLabel = input<string | null>(null);\n\n /** The host's `id`, and what tells the lists of a `move` apart. Generated when omitted. */\n readonly id = input<string>();\n\n /** Fired after a successful reorder with the new array + indices. Not fired for a move between lists. */\n readonly reorder = output<WrSortableReorderEvent<T>>();\n\n /**\n * Fired once on the list an item ARRIVED in from another list of the group,\n * after both lists have written `items`. The list it left emits nothing but\n * `itemsChange`.\n */\n readonly move = output<WrSortableMoveEvent<T>>();\n\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly dropList = inject<CdkDropList<WrSortableList<T>>>(CdkDropList, { self: true });\n private readonly lists = inject(WR_SORTABLE_LISTS) as unknown as WritableSignal<readonly WrSortableList<T>[]>;\n private readonly listEl = viewChild.required<ElementRef<HTMLElement>>('list');\n\n /** The other lists of this list's group. */\n private readonly peers = computed(() => {\n const group = this.group();\n return group ? this.lists().filter(list => list !== this && list.group() === group) : [];\n });\n\n /**\n * Ambient reading direction, for the keyboard path.\n *\n * Optional so a bare `TestBed` — or any consumer that never set a direction —\n * needs no provider; `Directionality` is root-provided, so `null` only ever\n * means \"nobody asked\", which is LTR. Nothing caches a direction-derived\n * value: `isRtl()` is read inside the key handler, so a runtime flip needs no\n * subscription to `Directionality.change`.\n *\n * The POINTER path already mirrors without this — `cdkDropList` injects\n * `Directionality` itself and feeds it to `DropListRef.withDirection`, so a\n * horizontal drag has always followed the visual order. The keyboard path was\n * the half that did not, which is why the two disagreed.\n */\n private readonly dir = inject(Directionality, { optional: true });\n\n /**\n * The rows, in projection order, which is the order the consumer's own loop\n * rendered them in — so a row's position here IS its index into `items()`.\n *\n * Collected on construction rather than through `contentChildren`, because\n * the keyboard path has to resolve an index DURING a keydown and a query\n * signal is only guaranteed current after change detection. A row that\n * Angular destroys drops out on the next lookup: the element is gone from\n * the DOM, so `indexOf` cannot find it and the stale entry is swept then.\n */\n private readonly rows: { readonly host: ElementRef<HTMLElement> }[] = [];\n\n /** Index of the row the keyboard is holding, or `null` when nothing is held. */\n readonly grabbedIndex = signal<number | null>(null);\n\n /** Live-region text. Written by the keyboard path only. */\n protected readonly announcement = signal('');\n\n private readonly uid = ++sortableListUid;\n\n /** Links every row to the key model via `aria-describedby`. */\n readonly keyHelpId = `wr-sortable-list-help-${this.uid}`;\n\n protected readonly fallbackId = `wr-sortable-list-${this.uid}`;\n\n private readonly keyHelp = wrReadI18nText(\n 'sortableList.keyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n private readonly groupKeyHelp = wrReadI18nText(\n 'sortableList.groupKeyHelp',\n 'Press Space to pick this item up, then use the arrow keys to move it, within its list or into the next one. ' +\n 'Press Space again to drop it, or Escape to put it back.'\n );\n protected readonly resolvedKeyHelp = computed(() => (this.group() ? this.groupKeyHelp() : this.keyHelp()));\n\n private readonly grabbedText = useI18nFormatter('sortableList.grabbed', 'Grabbed. {{index}} of {{total}}.');\n private readonly movedText = useI18nFormatter('sortableList.moved', '{{index}} of {{total}}.');\n private readonly droppedText = useI18nFormatter('sortableList.dropped', 'Dropped. {{index}} of {{total}}.');\n private readonly cancelledText = wrReadI18nText('sortableList.cancelled', 'Move cancelled.');\n private readonly movedToText = useI18nFormatter('sortableList.movedTo', 'Moved to {{list}}. {{index}} of {{total}}.');\n private readonly listPositionText = useI18nFormatter('sortableList.listPosition', 'list {{index}} of {{total}}');\n\n /** Where the held row started, which can be another list. Escape puts it back there. */\n private grabOrigin: WrSortableMoveEnd<T> | null = null;\n\n /** True while a keyboard move is handing focus back — see `onRowFocusout`. */\n private restoringFocus = false;\n\n constructor() {\n this.lists.update(lists => [...lists, this]);\n inject(DestroyRef).onDestroy(() => this.lists.update(lists => lists.filter(list => list !== this)));\n\n const dropList = this.dropList;\n dropList.data = this;\n dropList.elementContainerSelector = '.wr-sortable-list__list';\n dropList.enterPredicate = (drag: CdkDrag<T>) => {\n const from = drag.dropContainer?.data as WrSortableList<T> | undefined;\n return !!from && this.accepts(drag.data, from);\n };\n dropList.dropped.subscribe((event: CdkDragDrop<WrSortableList<T>>) => this.onDrop(event));\n\n // Assigned, not bound: a host directive's inputs are out of a host binding's reach.\n effect(() => {\n dropList.id = this.id() ?? this.fallbackId;\n dropList.orientation = this.orientation();\n dropList.disabled = this.disabled();\n dropList.connectedTo = this.peers().map(list => list.dropList);\n });\n\n // The CDK resolves the selector above only on the list a drag STARTS in. A\n // list that only ever receives would append the placeholder to the host,\n // beside the rows' container rather than in it.\n afterNextRender(() => dropList._dropListRef.withElementContainer(this.listEl().nativeElement));\n }\n\n /** Rows whose pointer drag Escape cancelled; the drop that follows is ignored. */\n private readonly cancelledDrags = new WeakSet<object>();\n\n /** @internal A row's pointer drag was cancelled with Escape. */\n cancelDrag(drag: object): void {\n this.cancelledDrags.add(drag);\n }\n\n private onDrop(event: CdkDragDrop<WrSortableList<T>>): void {\n if (event.item && this.lists().some(list => list.cancelledDrags.delete(event.item))) return;\n if (event.previousContainer !== event.container) {\n const source = event.previousContainer.data;\n const item = source.removeAt(event.previousIndex);\n this.insertAt(item, event.currentIndex);\n this.move.emit({\n item,\n from: { list: source, index: event.previousIndex },\n to: { list: this, index: event.currentIndex },\n });\n return;\n }\n if (event.previousIndex === event.currentIndex) return;\n const next = this.items().slice();\n moveItemInArray(next, event.previousIndex, event.currentIndex);\n this.items.set(next);\n this.reorder.emit({\n items: next,\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n item: next[event.currentIndex],\n });\n }\n\n /**\n * The keyboard reorder path: pick up, move, drop — deliberately a two-step\n * grab rather than \"an arrow moves the focused row\", so that arrowing through\n * a list a user is only reading can never rearrange it.\n *\n * Keys are handled only when the ROW itself is the event target; a button or\n * an input projected into the row template keeps every key it would normally\n * get.\n */\n /** @internal A row registering itself on construction. */\n register(item: { readonly host: ElementRef<HTMLElement> }): void {\n this.rows.push(item);\n }\n\n /**\n * @internal A row's position among its live siblings.\n *\n * Read off the DOM rather than off the registration order, because a row can\n * be added, removed or moved by the consumer's own loop and construction\n * order survives none of those. Rows whose element has left the document are\n * swept here, which is the only place that can tell.\n */\n indexOf(item: { readonly host: ElementRef<HTMLElement> }): number {\n this.sortRows();\n return this.rows.indexOf(item);\n }\n\n /**\n * Drops rows whose element has left the document and puts the rest into\n * document order.\n *\n * Its own method because `relocate` needs it too: that one focuses\n * `rows[to]` after the move, and without a re-sort it reached into an array\n * still ordered as the list looked BEFORE the move.\n */\n private sortRows(): void {\n for (let i = this.rows.length - 1; i >= 0; i -= 1) {\n if (!this.rows[i].host.nativeElement.isConnected) this.rows.splice(i, 1);\n }\n this.rows.sort((a, b) => (follows(a.host.nativeElement, b.host.nativeElement) ? -1 : 1));\n }\n\n /** @internal */\n onRowKeydown(event: KeyboardEvent, index: number): void {\n if (this.disabled() || event.target !== event.currentTarget) return;\n\n const grabbed = this.grabbedIndex();\n const horizontal = this.orientation() === 'horizontal';\n // The horizontal arrows name a SIDE of the row, so they follow the reading\n // direction: a horizontal list under `dir=\"rtl\"` paints index 0 at the right,\n // so the key that raises the index is ArrowLeft. Raising it on ArrowRight\n // regardless moved the held item away from the arrow the user pressed — the\n // one failure in this set a user cannot rationalise, because it inverts their\n // model of the list silently. The block arrows name a value's direction in a\n // column and never mirror, which is why only the horizontal pair is swapped.\n const rtl = this.dir?.value === 'rtl';\n const inlineForward = rtl ? 'ArrowLeft' : 'ArrowRight';\n const inlineBack = rtl ? 'ArrowRight' : 'ArrowLeft';\n const forward = horizontal ? inlineForward : 'ArrowDown';\n const back = horizontal ? inlineBack : 'ArrowUp';\n // The arrows of the other axis walk the group: columns sit side by side, so\n // a vertical list hands the row over on the inline pair, mirrored like above.\n const nextList = horizontal ? 'ArrowDown' : inlineForward;\n const previousList = horizontal ? 'ArrowUp' : inlineBack;\n\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n if (grabbed === null) this.grab(index);\n else this.drop();\n return;\n }\n\n if (grabbed === null) return;\n\n if (event.key === 'Escape') {\n event.preventDefault();\n // Held only while a row is grabbed — an Escape typed anywhere else has to\n // keep reaching whatever dialog or overlay the list is sitting in.\n event.stopPropagation();\n this.cancelGrab();\n return;\n }\n\n if (event.key === forward || event.key === back) {\n event.preventDefault();\n this.moveGrabbed(event.key === forward ? 1 : -1);\n return;\n }\n\n if (this.group() && (event.key === nextList || event.key === previousList)) {\n event.preventDefault();\n this.moveToList(event.key === nextList ? 1 : -1);\n }\n }\n\n /**\n * Focus leaving a held row ends the gesture as a drop rather than dropping the\n * change on the floor — `[(items)]` has already been written by then, so a\n * silent release would leave `reorder` never reporting a move that happened.\n * The guard is what makes it safe: moving a focused node in the DOM blurs it,\n * so every keyboard move fires this too.\n */\n /** @internal */\n onRowFocusout(): void {\n if (this.restoringFocus || this.grabbedIndex() === null) return;\n this.drop();\n }\n\n private grab(index: number): void {\n this.grabOrigin = { list: this, index };\n this.grabbedIndex.set(index);\n this.announcement.set(this.grabbedText(this.position(index)));\n }\n\n private moveGrabbed(delta: number): void {\n const from = this.grabbedIndex();\n if (from === null) return;\n const to = from + delta;\n if (to < 0 || to >= this.items().length) return;\n\n this.relocate(from, to);\n this.grabbedIndex.set(to);\n this.announcement.set(this.movedText(this.position(to)));\n }\n\n /**\n * Hands the held row to the nearest list of the group, in document order,\n * that takes it. A list that refuses is stepped over, since a drag can reach\n * any list of the group and the keyboard must not reach fewer.\n */\n private moveToList(step: 1 | -1): void {\n const from = this.grabbedIndex();\n const origin = this.grabOrigin;\n if (from === null || !origin) return;\n\n const group = this.groupLists();\n const item = this.items()[from];\n let at = group.indexOf(this) + step;\n while (group[at] && !group[at].accepts(item, origin.list)) at += step;\n const target = group[at];\n if (!target) return;\n\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n this.announcement.set('');\n this.removeAt(from);\n\n const to = Math.min(from, target.items().length);\n target.insertAt(item, to);\n target.grabOrigin = origin;\n target.grabbedIndex.set(to);\n const list =\n target.ariaLabel() ?? target.listPositionText({ index: group.indexOf(target) + 1, total: group.length });\n target.announcement.set(target.movedToText({ list, ...target.position(to) }));\n target.focusRow(to);\n }\n\n private drop(): void {\n const to = this.grabbedIndex();\n const origin = this.grabOrigin;\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n if (to === null || !origin) return;\n\n this.announcement.set(this.droppedText(this.position(to)));\n if (origin.list !== this) {\n this.move.emit({ item: this.items()[to], from: origin, to: { list: this, index: to } });\n return;\n }\n if (origin.index === to) return;\n // One event per gesture, the way a drag emits one on drop — not one per\n // arrow press, which would put a host that persists on `reorder` through a\n // write per keystroke. `[(items)]` still updates on every press, because\n // the rendered order has to follow the row the user is moving.\n this.reorder.emit({ items: this.items(), previousIndex: origin.index, currentIndex: to, item: this.items()[to] });\n }\n\n private cancelGrab(): void {\n const from = this.grabbedIndex();\n const origin = this.grabOrigin;\n if (from === null || !origin) return;\n this.grabbedIndex.set(null);\n this.grabOrigin = null;\n\n if (origin.list === this) {\n if (from !== origin.index) this.relocate(from, origin.index);\n this.announcement.set(this.cancelledText());\n return;\n }\n this.announcement.set('');\n origin.list.insertAt(this.removeAt(from), origin.index);\n origin.list.announcement.set(origin.list.cancelledText());\n origin.list.focusRow(origin.index);\n }\n\n /** Whether this list takes `item` from another list of the group. */\n private accepts(item: T, from: WrSortableList<T>): boolean {\n return !this.disabled() && (from === this || (this.canEnter()?.(item, from) ?? true));\n }\n\n /** This list and its peers, in document order. */\n private groupLists(): WrSortableList<T>[] {\n return [this, ...this.peers()].sort((a, b) => (follows(a.host.nativeElement, b.host.nativeElement) ? -1 : 1));\n }\n\n private removeAt(index: number): T {\n const next = this.items().slice();\n const [item] = next.splice(index, 1);\n this.items.set(next);\n return item;\n }\n\n private insertAt(item: T, index: number): void {\n const next = this.items().slice();\n next.splice(index, 0, item);\n this.items.set(next);\n }\n\n private relocate(from: number, to: number): void {\n const next = this.items().slice();\n moveItemInArray(next, from, to);\n this.items.set(next);\n this.focusRow(to);\n }\n\n private focusRow(to: number): void {\n // The row is the same DOM node moved to another slot, and moving a focused\n // node hands focus back to `<body>` — so it has to be taken again once the\n // move has rendered. `afterNextRender`, never a microtask: zoneless change\n // detection runs in a macrotask, so a microtask would fire while the row is\n // still at its old index and focus the wrong one. (jsdom keeps focus across\n // a node move, so no spec here can express that half.)\n this.restoringFocus = true;\n afterNextRender(\n () => {\n // Re-sorted FIRST. `this.rows` is only ever put into document order by\n // `indexOf`, and nothing calls it between the move and here — so the\n // array was still in the order it had BEFORE the move, and `rows[to]`\n // was whichever row used to be at that slot. `sortRows()` is the same\n // sweep-and-sort `indexOf` runs; after it, index `to` is the row the\n // move actually put there.\n this.sortRows();\n this.rows[to]?.host.nativeElement.focus();\n this.restoringFocus = false;\n },\n { injector: this.injector }\n );\n }\n\n private position(index: number): { index: number; total: number } {\n return { index: index + 1, total: this.items().length };\n }\n}\n\nexport type { WrSortableCanEnter, WrSortableMoveEnd, WrSortableMoveEvent, WrSortableReorderEvent } from './types';\n","<!--\n `role=\"list\"` on the container and `role=\"listitem\"` on each row rather than\n bare divs: every row is a tab stop, and a focusable element with no role at\n all is announced as loose text. The list role is what gives the reader the\n position of the row focus lands on.\n\n Rows arrive through `<ng-content>` — the consumer writes the loop, so the\n markup says what each row is instead of hiding it in an unnamed template.\n-->\n<div #list role=\"list\" class=\"wr-sortable-list__list\" [attr.aria-label]=\"ariaLabel()\">\n <ng-content />\n @if (items().length === 0) {\n <!-- A row of its own, so the list announces what it shows; hidden by `:empty` when nothing is projected. -->\n <div role=\"listitem\" class=\"wr-sortable-list__empty\"><ng-content select=\"[wrSortableListEmpty]\" /></div>\n }\n</div>\n\n<!--\n The key model, on every row rather than once on the container: focus lands on\n a row and never on the list itself, so a description hung on the list would\n never be read out.\n-->\n<p class=\"wr-sortable-list__sr-only\" [id]=\"keyHelpId\">{{ resolvedKeyHelp() }}</p>\n\n<!--\n Position announcements, written by the keyboard path only — a drag already\n gives sighted feedback, and announcing every pointer move would flood the\n region.\n-->\n<p class=\"wr-sortable-list__sr-only\" role=\"status\">{{ announcement() }}</p>\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 { CdkDrag } from '@angular/cdk/drag-drop';\nimport { DOCUMENT } from '@angular/common';\nimport { Component, DestroyRef, ElementRef, ViewEncapsulation, computed, effect, inject } from '@angular/core';\n\nimport { wrCheckStyles, wrWatchDragCancel } from 'ngwr/utils';\n\nimport { WR_SORTABLE_LIST } from './tokens';\n\n/**\n * One row of a {@link WrSortableList}. Write the loop yourself and put whatever\n * the row shows inside it.\n *\n * It replaced a single unnamed `<ng-template let-row let-i=\"index\">` that the\n * list rendered per item. Two things were wrong with that. The template had no\n * name, so nothing in the markup said what the context variables were or where\n * they came from — a reader had to open the component to learn that `let-row`\n * is the item and `let-i` the index. And a row could not carry anything of its\n * own: every per-row decision had to be an input on the LIST, or a branch\n * inside one template.\n *\n * The row is the tab stop, so the keyboard contract lives here: Space or Enter\n * picks it up, the arrows move it, Space or Enter drops it, Escape puts it\n * back. The list owns the array and the announcements, and this delegates to\n * it — an item knows its own position and nothing else.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle>≡</span>\n * {{ row.label }}\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sortable-list\n */\n@Component({\n selector: 'wr-sortable-item',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [CdkDrag],\n host: {\n class: 'wr-sortable-list__item',\n role: 'listitem',\n '[class.wr-sortable-list__item--grabbed]': 'grabbed()',\n '[attr.tabindex]': 'list.disabled() ? null : 0',\n '[attr.aria-describedby]': 'list.disabled() ? null : list.keyHelpId',\n '(keydown)': 'onKeydown($event)',\n '(focusout)': 'list.onRowFocusout()',\n },\n})\nexport class WrSortableItem {\n /** @internal The list this row belongs to. Read by the host bindings above. */\n protected readonly list = inject(WR_SORTABLE_LIST);\n\n private readonly drag = inject(CdkDrag);\n\n /** @internal */\n readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Position among the list's rows, which IS the index into `items()`: the\n * consumer's own loop renders them in that order.\n *\n * `indexOf` resolves by DOCUMENT ORDER over a plain array and touches no\n * signal, so the `computed` needs a producer that changes whenever a position\n * can. That producer is the `items` ARRAY, not its length: a reorder keeps the\n * count, so a length-keyed index stayed on the slot the row had left, the\n * highlight stayed behind with it, and a second pick-up of the same row moved\n * its old neighbour instead. Host bindings run after the consumer's `@for`\n * has moved the nodes, so the recomputation reads the new order.\n */\n protected readonly index = computed(() => {\n this.list.items();\n return this.list.indexOf(this);\n });\n\n protected readonly grabbed = computed(() => this.list.grabbedIndex() === this.index());\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sortable-list');\n this.list.register(this);\n\n // Assigned rather than bound, because these belong to the LIST and a host\n // binding cannot reach another directive's input. `CdkDrag` reads all\n // three as plain properties on every gesture, so writing them from an\n // effect is enough and a runtime change takes effect on the next drag.\n effect(() => {\n this.drag.disabled = this.list.disabled();\n this.drag.lockAxis = this.list.lockAxis() ?? null;\n this.drag.dragStartDelay = this.list.dragStartDelay();\n });\n\n // Escape cancels a pointer drag; CDK has no cancel of its own.\n const doc = inject(DOCUMENT);\n let stopCancel: (() => void) | null = null;\n this.drag.started.subscribe(event => {\n stopCancel?.();\n stopCancel = wrWatchDragCancel(doc, event.event, () => this.list.cancelDrag(this.drag));\n });\n this.drag.ended.subscribe(() => {\n stopCancel?.();\n stopCancel = null;\n });\n inject(DestroyRef).onDestroy(() => stopCancel?.());\n\n // What a connected list's `canEnter` is asked about.\n effect(() => {\n this.drag.data = this.list.items()[this.index()];\n });\n }\n\n /**\n * @internal Resolves the position at the moment of the key, off the DOM,\n * rather than through the cached `index`: nothing has to have rendered\n * between two presses for the answer to be right.\n */\n protected onKeydown(event: KeyboardEvent): void {\n this.list.onRowKeydown(event, this.list.indexOf(this));\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { CdkDragHandle } from '@angular/cdk/drag-drop';\nimport { Directive } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\n/**\n * Drag handle for {@link WrSortableList} (and any nested `cdkDrag`).\n * Composes CDK's `cdkDragHandle` via `hostDirectives` so consumers don't\n * need to import the CDK selector directly.\n *\n * @example\n * ```html\n * <wr-sortable-list [(items)]=\"rows\">\n * @for (row of rows(); track row.id) {\n * <wr-sortable-item>\n * <span wrDragHandle class=\"grip\">≡</span>\n * <span>{{ row.label }}</span>\n * </wr-sortable-item>\n * }\n * </wr-sortable-list>\n * ```\n */\n@Directive({\n selector: '[wrDragHandle]',\n hostDirectives: [CdkDragHandle],\n host: { class: 'wr-drag-handle' },\n})\nexport class WrDragHandle {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sortable-list');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAa,mBAAmB,IAAI,eAAsC,kBAAkB;AAS5F,MAAa,oBAAoB,IAAI,eAA0D,qBAAqB;CAClH,YAAY;CACZ,eAAe,OAAkC,CAAA,CAAE;AACpD,CAAA;;;;;;;ACOD,SAAS,QAAQ,GAAgB,GAAc;CAE7C,QAAQ,EAAE,wBAAwB,CAAC,IAAI,KAAK,iCAAiC;AAC/E;AAGA,IAAI,kBAAkB;AAoEtB,IAAa,i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ACf;EACF,CAAA;;;;;;;;;;AC1BD,IAAa,eAAb,MAAa,aAAY;CACvB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,eAAe;CAClF;CAHW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAZ,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAY,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,iBAAA;EAAA,gBAAA,CAAA,EAAA,WAAA,GAAA,cAAA,CAAA;EAAA,UAAA;CAAA,CAAA;;AAAZ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EALxB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,gBAAgB,CAAC,aAAa;GAC9B,MAAM,EAAE,OAAO,iBAAgB;EAChC,CAAA"}
|
|
@@ -64,7 +64,7 @@ var WrSpeedDial = class WrSpeedDial {
|
|
|
64
64
|
}
|
|
65
65
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
66
66
|
minVersion: "12.0.0",
|
|
67
|
-
version: "22.2.
|
|
67
|
+
version: "22.2.6",
|
|
68
68
|
ngImport: i0,
|
|
69
69
|
type: WrSpeedDial,
|
|
70
70
|
deps: [],
|
|
@@ -72,7 +72,7 @@ var WrSpeedDial = class WrSpeedDial {
|
|
|
72
72
|
});
|
|
73
73
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
74
74
|
minVersion: "17.0.0",
|
|
75
|
-
version: "22.2.
|
|
75
|
+
version: "22.2.6",
|
|
76
76
|
type: WrSpeedDial,
|
|
77
77
|
isStandalone: true,
|
|
78
78
|
selector: "wr-speed-dial",
|
|
@@ -156,7 +156,7 @@ var WrSpeedDial = class WrSpeedDial {
|
|
|
156
156
|
};
|
|
157
157
|
i0.ɵɵngDeclareClassMetadata({
|
|
158
158
|
minVersion: "12.0.0",
|
|
159
|
-
version: "22.2.
|
|
159
|
+
version: "22.2.6",
|
|
160
160
|
ngImport: i0,
|
|
161
161
|
type: WrSpeedDial,
|
|
162
162
|
decorators: [{
|
|
@@ -21,7 +21,7 @@ var WrSpinner = class WrSpinner {
|
|
|
21
21
|
}, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
22
22
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
23
|
minVersion: "12.0.0",
|
|
24
|
-
version: "22.2.
|
|
24
|
+
version: "22.2.6",
|
|
25
25
|
ngImport: i0,
|
|
26
26
|
type: WrSpinner,
|
|
27
27
|
deps: [],
|
|
@@ -29,7 +29,7 @@ var WrSpinner = class WrSpinner {
|
|
|
29
29
|
});
|
|
30
30
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
31
|
minVersion: "17.1.0",
|
|
32
|
-
version: "22.2.
|
|
32
|
+
version: "22.2.6",
|
|
33
33
|
type: WrSpinner,
|
|
34
34
|
isStandalone: true,
|
|
35
35
|
selector: "wr-spinner",
|
|
@@ -64,7 +64,7 @@ var WrSpinner = class WrSpinner {
|
|
|
64
64
|
};
|
|
65
65
|
i0.ɵɵngDeclareClassMetadata({
|
|
66
66
|
minVersion: "12.0.0",
|
|
67
|
-
version: "22.2.
|
|
67
|
+
version: "22.2.6",
|
|
68
68
|
ngImport: i0,
|
|
69
69
|
type: WrSpinner,
|
|
70
70
|
decorators: [{
|
|
@@ -79,7 +79,7 @@ var WrSplitter = class WrSplitter {
|
|
|
79
79
|
}
|
|
80
80
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
81
81
|
minVersion: "12.0.0",
|
|
82
|
-
version: "22.2.
|
|
82
|
+
version: "22.2.6",
|
|
83
83
|
ngImport: i0,
|
|
84
84
|
type: WrSplitter,
|
|
85
85
|
deps: [],
|
|
@@ -87,7 +87,7 @@ var WrSplitter = class WrSplitter {
|
|
|
87
87
|
});
|
|
88
88
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
89
89
|
minVersion: "17.1.0",
|
|
90
|
-
version: "22.2.
|
|
90
|
+
version: "22.2.6",
|
|
91
91
|
type: WrSplitter,
|
|
92
92
|
isStandalone: true,
|
|
93
93
|
selector: "wr-splitter",
|
|
@@ -147,7 +147,7 @@ var WrSplitter = class WrSplitter {
|
|
|
147
147
|
};
|
|
148
148
|
i0.ɵɵngDeclareClassMetadata({
|
|
149
149
|
minVersion: "12.0.0",
|
|
150
|
-
version: "22.2.
|
|
150
|
+
version: "22.2.6",
|
|
151
151
|
ngImport: i0,
|
|
152
152
|
type: WrSplitter,
|
|
153
153
|
decorators: [{
|
|
@@ -98,7 +98,7 @@ var WrStatistic = class WrStatistic {
|
|
|
98
98
|
}, ...ngDevMode ? [{ debugName: "deltaText" }] : /* istanbul ignore next */ []);
|
|
99
99
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
100
100
|
minVersion: "12.0.0",
|
|
101
|
-
version: "22.2.
|
|
101
|
+
version: "22.2.6",
|
|
102
102
|
ngImport: i0,
|
|
103
103
|
type: WrStatistic,
|
|
104
104
|
deps: [],
|
|
@@ -106,7 +106,7 @@ var WrStatistic = class WrStatistic {
|
|
|
106
106
|
});
|
|
107
107
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
108
108
|
minVersion: "17.0.0",
|
|
109
|
-
version: "22.2.
|
|
109
|
+
version: "22.2.6",
|
|
110
110
|
type: WrStatistic,
|
|
111
111
|
isStandalone: true,
|
|
112
112
|
selector: "wr-statistic",
|
|
@@ -202,7 +202,7 @@ var WrStatistic = class WrStatistic {
|
|
|
202
202
|
};
|
|
203
203
|
i0.ɵɵngDeclareClassMetadata({
|
|
204
204
|
minVersion: "12.0.0",
|
|
205
|
-
version: "22.2.
|
|
205
|
+
version: "22.2.6",
|
|
206
206
|
ngImport: i0,
|
|
207
207
|
type: WrStatistic,
|
|
208
208
|
decorators: [{
|
|
@@ -369,7 +369,7 @@ var WrStatisticCountdown = class WrStatisticCountdown {
|
|
|
369
369
|
}
|
|
370
370
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
371
371
|
minVersion: "12.0.0",
|
|
372
|
-
version: "22.2.
|
|
372
|
+
version: "22.2.6",
|
|
373
373
|
ngImport: i0,
|
|
374
374
|
type: WrStatisticCountdown,
|
|
375
375
|
deps: [],
|
|
@@ -377,7 +377,7 @@ var WrStatisticCountdown = class WrStatisticCountdown {
|
|
|
377
377
|
});
|
|
378
378
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
379
379
|
minVersion: "17.0.0",
|
|
380
|
-
version: "22.2.
|
|
380
|
+
version: "22.2.6",
|
|
381
381
|
type: WrStatisticCountdown,
|
|
382
382
|
isStandalone: true,
|
|
383
383
|
selector: "wr-statistic-countdown",
|
|
@@ -427,7 +427,7 @@ var WrStatisticCountdown = class WrStatisticCountdown {
|
|
|
427
427
|
};
|
|
428
428
|
i0.ɵɵngDeclareClassMetadata({
|
|
429
429
|
minVersion: "12.0.0",
|
|
430
|
-
version: "22.2.
|
|
430
|
+
version: "22.2.6",
|
|
431
431
|
ngImport: i0,
|
|
432
432
|
type: WrStatisticCountdown,
|
|
433
433
|
decorators: [{
|
|
@@ -504,7 +504,7 @@ var WrStatisticGroup = class WrStatisticGroup {
|
|
|
504
504
|
});
|
|
505
505
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
506
506
|
minVersion: "12.0.0",
|
|
507
|
-
version: "22.2.
|
|
507
|
+
version: "22.2.6",
|
|
508
508
|
ngImport: i0,
|
|
509
509
|
type: WrStatisticGroup,
|
|
510
510
|
deps: [],
|
|
@@ -512,7 +512,7 @@ var WrStatisticGroup = class WrStatisticGroup {
|
|
|
512
512
|
});
|
|
513
513
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
514
514
|
minVersion: "17.1.0",
|
|
515
|
-
version: "22.2.
|
|
515
|
+
version: "22.2.6",
|
|
516
516
|
type: WrStatisticGroup,
|
|
517
517
|
isStandalone: true,
|
|
518
518
|
selector: "wr-statistic-group",
|
|
@@ -547,7 +547,7 @@ var WrStatisticGroup = class WrStatisticGroup {
|
|
|
547
547
|
};
|
|
548
548
|
i0.ɵɵngDeclareClassMetadata({
|
|
549
549
|
minVersion: "12.0.0",
|
|
550
|
-
version: "22.2.
|
|
550
|
+
version: "22.2.6",
|
|
551
551
|
ngImport: i0,
|
|
552
552
|
type: WrStatisticGroup,
|
|
553
553
|
decorators: [{
|
|
@@ -36,7 +36,7 @@ var WrStep = class WrStep {
|
|
|
36
36
|
isActive = computed(() => this._index() === this.stepper.active(), ...ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []);
|
|
37
37
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
38
38
|
minVersion: "12.0.0",
|
|
39
|
-
version: "22.2.
|
|
39
|
+
version: "22.2.6",
|
|
40
40
|
ngImport: i0,
|
|
41
41
|
type: WrStep,
|
|
42
42
|
deps: [],
|
|
@@ -44,7 +44,7 @@ var WrStep = class WrStep {
|
|
|
44
44
|
});
|
|
45
45
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
46
46
|
minVersion: "17.1.0",
|
|
47
|
-
version: "22.2.
|
|
47
|
+
version: "22.2.6",
|
|
48
48
|
type: WrStep,
|
|
49
49
|
isStandalone: true,
|
|
50
50
|
selector: "wr-step",
|
|
@@ -97,7 +97,7 @@ var WrStep = class WrStep {
|
|
|
97
97
|
};
|
|
98
98
|
i0.ɵɵngDeclareClassMetadata({
|
|
99
99
|
minVersion: "12.0.0",
|
|
100
|
-
version: "22.2.
|
|
100
|
+
version: "22.2.6",
|
|
101
101
|
ngImport: i0,
|
|
102
102
|
type: WrStep,
|
|
103
103
|
decorators: [{
|
|
@@ -162,7 +162,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
162
162
|
* Use of this source code is governed by an MIT-style license that can be
|
|
163
163
|
* found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
|
|
164
164
|
*/
|
|
165
|
-
const NO_OVERRIDE = signal(null).asReadonly();
|
|
166
165
|
var WrStepper = class WrStepper {
|
|
167
166
|
active = model(0, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
168
167
|
orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
|
|
@@ -175,8 +174,10 @@ var WrStepper = class WrStepper {
|
|
|
175
174
|
transform: coerceBooleanProperty
|
|
176
175
|
});
|
|
177
176
|
steps = contentChildren(WrStep, ...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
|
|
178
|
-
optionalLabel =
|
|
179
|
-
completedLabel =
|
|
177
|
+
optionalLabel = input(null, ...ngDevMode ? [{ debugName: "optionalLabel" }] : /* istanbul ignore next */ []);
|
|
178
|
+
completedLabel = input(null, ...ngDevMode ? [{ debugName: "completedLabel" }] : /* istanbul ignore next */ []);
|
|
179
|
+
resolvedOptionalLabel = useI18nText(this.optionalLabel, "stepper.optional", "optional");
|
|
180
|
+
resolvedCompletedLabel = useI18nText(this.completedLabel, "stepper.completed", "completed");
|
|
180
181
|
classes = computed(() => {
|
|
181
182
|
const parts = [`wr-stepper--${this.orientation()}`];
|
|
182
183
|
if (this.linear()) parts.push("wr-stepper--linear");
|
|
@@ -224,7 +225,7 @@ var WrStepper = class WrStepper {
|
|
|
224
225
|
}
|
|
225
226
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
226
227
|
minVersion: "12.0.0",
|
|
227
|
-
version: "22.2.
|
|
228
|
+
version: "22.2.6",
|
|
228
229
|
ngImport: i0,
|
|
229
230
|
type: WrStepper,
|
|
230
231
|
deps: [],
|
|
@@ -232,7 +233,7 @@ var WrStepper = class WrStepper {
|
|
|
232
233
|
});
|
|
233
234
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
234
235
|
minVersion: "17.0.0",
|
|
235
|
-
version: "22.2.
|
|
236
|
+
version: "22.2.6",
|
|
236
237
|
type: WrStepper,
|
|
237
238
|
isStandalone: true,
|
|
238
239
|
selector: "wr-stepper",
|
|
@@ -264,6 +265,20 @@ var WrStepper = class WrStepper {
|
|
|
264
265
|
isSignal: true,
|
|
265
266
|
isRequired: false,
|
|
266
267
|
transformFunction: null
|
|
268
|
+
},
|
|
269
|
+
optionalLabel: {
|
|
270
|
+
classPropertyName: "optionalLabel",
|
|
271
|
+
publicName: "optionalLabel",
|
|
272
|
+
isSignal: true,
|
|
273
|
+
isRequired: false,
|
|
274
|
+
transformFunction: null
|
|
275
|
+
},
|
|
276
|
+
completedLabel: {
|
|
277
|
+
classPropertyName: "completedLabel",
|
|
278
|
+
publicName: "completedLabel",
|
|
279
|
+
isSignal: true,
|
|
280
|
+
isRequired: false,
|
|
281
|
+
transformFunction: null
|
|
267
282
|
}
|
|
268
283
|
},
|
|
269
284
|
outputs: { active: "activeChange" },
|
|
@@ -281,13 +296,13 @@ var WrStepper = class WrStepper {
|
|
|
281
296
|
isSignal: true
|
|
282
297
|
}],
|
|
283
298
|
ngImport: i0,
|
|
284
|
-
template: "<ol class=\"wr-stepper__headers\" role=\"list\">\n @for (step of steps(); track $index) {\n <li\n class=\"wr-stepper__header\"\n [class.wr-stepper__header--active]=\"$index === active()\"\n [class.wr-stepper__header--completed]=\"isCompleted($index)\"\n [class.wr-stepper__header--reachable]=\"isReachable($index)\"\n [class.wr-stepper__header--disabled]=\"step.disabled()\"\n >\n <button\n type=\"button\"\n class=\"wr-stepper__header-button\"\n [disabled]=\"!isReachable($index) || step.disabled()\"\n [attr.aria-current]=\"$index === active() ? 'step' : null\"\n (click)=\"onHeaderClick($index)\"\n >\n <span class=\"wr-stepper__indicator\" aria-hidden=\"true\">\n @if (isCompleted($index)) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M3 7.5 L6 10.5 L11 4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n {{ $index + 1 }}\n }\n </span>\n <span class=\"wr-stepper__label\">\n {{ step.label() }}\n @if (isCompleted($index)) {\n <span class=\"wr-stepper__sr-only\"> {{
|
|
299
|
+
template: "<ol class=\"wr-stepper__headers\" role=\"list\">\n @for (step of steps(); track $index) {\n <li\n class=\"wr-stepper__header\"\n [class.wr-stepper__header--active]=\"$index === active()\"\n [class.wr-stepper__header--completed]=\"isCompleted($index)\"\n [class.wr-stepper__header--reachable]=\"isReachable($index)\"\n [class.wr-stepper__header--disabled]=\"step.disabled()\"\n >\n <button\n type=\"button\"\n class=\"wr-stepper__header-button\"\n [disabled]=\"!isReachable($index) || step.disabled()\"\n [attr.aria-current]=\"$index === active() ? 'step' : null\"\n (click)=\"onHeaderClick($index)\"\n >\n <span class=\"wr-stepper__indicator\" aria-hidden=\"true\">\n @if (isCompleted($index)) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M3 7.5 L6 10.5 L11 4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n {{ $index + 1 }}\n }\n </span>\n <span class=\"wr-stepper__label\">\n {{ step.label() }}\n @if (isCompleted($index)) {\n <span class=\"wr-stepper__sr-only\"> {{ resolvedCompletedLabel() }} </span>\n }\n @if (step.optional()) {\n <small class=\"wr-stepper__optional\">{{ resolvedOptionalLabel() }}</small>\n }\n @if (step.description()) {\n <small class=\"wr-stepper__description\">{{ step.description() }}</small>\n }\n </span>\n </button>\n @if (!$last) {\n <span class=\"wr-stepper__connector\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n</ol>\n\n<div class=\"wr-stepper__body\">\n <ng-content />\n</div>\n",
|
|
285
300
|
encapsulation: i0.ViewEncapsulation.None
|
|
286
301
|
});
|
|
287
302
|
};
|
|
288
303
|
i0.ɵɵngDeclareClassMetadata({
|
|
289
304
|
minVersion: "12.0.0",
|
|
290
|
-
version: "22.2.
|
|
305
|
+
version: "22.2.6",
|
|
291
306
|
ngImport: i0,
|
|
292
307
|
type: WrStepper,
|
|
293
308
|
decorators: [{
|
|
@@ -303,7 +318,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
303
318
|
provide: WR_STEPPER,
|
|
304
319
|
useExisting: forwardRef(() => WrStepper)
|
|
305
320
|
}],
|
|
306
|
-
template: "<ol class=\"wr-stepper__headers\" role=\"list\">\n @for (step of steps(); track $index) {\n <li\n class=\"wr-stepper__header\"\n [class.wr-stepper__header--active]=\"$index === active()\"\n [class.wr-stepper__header--completed]=\"isCompleted($index)\"\n [class.wr-stepper__header--reachable]=\"isReachable($index)\"\n [class.wr-stepper__header--disabled]=\"step.disabled()\"\n >\n <button\n type=\"button\"\n class=\"wr-stepper__header-button\"\n [disabled]=\"!isReachable($index) || step.disabled()\"\n [attr.aria-current]=\"$index === active() ? 'step' : null\"\n (click)=\"onHeaderClick($index)\"\n >\n <span class=\"wr-stepper__indicator\" aria-hidden=\"true\">\n @if (isCompleted($index)) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M3 7.5 L6 10.5 L11 4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n {{ $index + 1 }}\n }\n </span>\n <span class=\"wr-stepper__label\">\n {{ step.label() }}\n @if (isCompleted($index)) {\n <span class=\"wr-stepper__sr-only\"> {{
|
|
321
|
+
template: "<ol class=\"wr-stepper__headers\" role=\"list\">\n @for (step of steps(); track $index) {\n <li\n class=\"wr-stepper__header\"\n [class.wr-stepper__header--active]=\"$index === active()\"\n [class.wr-stepper__header--completed]=\"isCompleted($index)\"\n [class.wr-stepper__header--reachable]=\"isReachable($index)\"\n [class.wr-stepper__header--disabled]=\"step.disabled()\"\n >\n <button\n type=\"button\"\n class=\"wr-stepper__header-button\"\n [disabled]=\"!isReachable($index) || step.disabled()\"\n [attr.aria-current]=\"$index === active() ? 'step' : null\"\n (click)=\"onHeaderClick($index)\"\n >\n <span class=\"wr-stepper__indicator\" aria-hidden=\"true\">\n @if (isCompleted($index)) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M3 7.5 L6 10.5 L11 4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n {{ $index + 1 }}\n }\n </span>\n <span class=\"wr-stepper__label\">\n {{ step.label() }}\n @if (isCompleted($index)) {\n <span class=\"wr-stepper__sr-only\"> {{ resolvedCompletedLabel() }} </span>\n }\n @if (step.optional()) {\n <small class=\"wr-stepper__optional\">{{ resolvedOptionalLabel() }}</small>\n }\n @if (step.description()) {\n <small class=\"wr-stepper__description\">{{ step.description() }}</small>\n }\n </span>\n </button>\n @if (!$last) {\n <span class=\"wr-stepper__connector\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n</ol>\n\n<div class=\"wr-stepper__body\">\n <ng-content />\n</div>\n"
|
|
307
322
|
}]
|
|
308
323
|
}],
|
|
309
324
|
ctorParameters: () => [],
|
|
@@ -346,6 +361,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
346
361
|
steps: [{
|
|
347
362
|
type: i0.ContentChildren,
|
|
348
363
|
args: [i0.forwardRef(() => WrStep), { isSignal: true }]
|
|
364
|
+
}],
|
|
365
|
+
optionalLabel: [{
|
|
366
|
+
type: i0.Input,
|
|
367
|
+
args: [{
|
|
368
|
+
isSignal: true,
|
|
369
|
+
alias: "optionalLabel",
|
|
370
|
+
required: false
|
|
371
|
+
}]
|
|
372
|
+
}],
|
|
373
|
+
completedLabel: [{
|
|
374
|
+
type: i0.Input,
|
|
375
|
+
args: [{
|
|
376
|
+
isSignal: true,
|
|
377
|
+
alias: "completedLabel",
|
|
378
|
+
required: false
|
|
379
|
+
}]
|
|
349
380
|
}]
|
|
350
381
|
}
|
|
351
382
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-stepper.mjs","names":[],"sources":["../../../projects/lib/stepper/tokens.ts","../../../projects/lib/stepper/step.ts","../../../projects/lib/stepper/stepper.ts","../../../projects/lib/stepper/stepper.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken, type Signal } from '@angular/core';\n\n/** Surface a {@link WrStepper} provides for its child `<wr-step>`s. */\nexport interface WrStepperContext {\n /** Index of the currently visible step. */\n readonly active: Signal<number>;\n /** Linear mode — steps after the latest completed one are locked. */\n readonly linear: Signal<boolean>;\n}\n\nexport const WR_STEPPER = new InjectionToken<WrStepperContext>('WR_STEPPER');\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, ViewEncapsulation, computed, inject, input, signal } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WR_STEPPER } from './tokens';\n\n/**\n * One step in a {@link WrStepper}. Project as a child:\n *\n * ```html\n * <wr-stepper>\n * <wr-step label=\"Account\"> … </wr-step>\n * <wr-step label=\"Profile\" description=\"Optional\"> … </wr-step>\n * </wr-stepper>\n * ```\n *\n * The stepper hides every step except the active one via a host class —\n * each step still mounts once, so component state survives navigation.\n *\n * @see https://ngwr.dev/reference/components/stepper\n */\n@Component({\n selector: 'wr-step',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-step',\n '[class.wr-step--active]': 'isActive()',\n },\n})\nexport class WrStep {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('stepper');\n }\n\n /** Header label. */\n readonly label = input<string>('');\n\n /** Secondary text shown under the label. */\n readonly description = input<string>('');\n\n /** Marks the step as optional in the header. */\n readonly optional = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Override completion state. When unset, the stepper auto-derives it\n * from the active index (any step before `active` is completed).\n */\n readonly completed = input<boolean | null>(null);\n\n /** Disables the header — also blocks header clicks. */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Stepper-assigned index. Set by the parent when contentChildren updates. */\n readonly _index = signal(-1);\n\n private readonly stepper = inject(WR_STEPPER);\n\n protected readonly isActive = computed(() => this._index() === this.stepper.active());\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 {\n Component,\n ViewEncapsulation,\n computed,\n contentChildren,\n effect,\n forwardRef,\n input,\n model,\n signal,\n} from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WrStep } from './step';\nimport { WR_STEPPER, type WrStepperContext } from './tokens';\n\n/** A label with no consumer input to forward — see `optionalLabel` below. */\nconst NO_OVERRIDE = signal<string | null>(null).asReadonly();\n\n/**\n * Multi-step wizard container. Children are `<wr-step>` components — the\n * stepper renders one numbered header per step (with connectors) and the\n * body of the currently active one.\n *\n * Two-way bind `[(active)]` to the active step index. Set `linear=\"true\"`\n * to forbid jumping past incomplete steps.\n *\n * @example\n * ```html\n * <wr-stepper [(active)]=\"step\" linear>\n * <wr-step label=\"Account\">…</wr-step>\n * <wr-step label=\"Profile\">…</wr-step>\n * <wr-step label=\"Confirm\">…</wr-step>\n * </wr-stepper>\n * ```\n *\n * @see https://ngwr.dev/reference/components/stepper\n */\n@Component({\n selector: 'wr-stepper',\n templateUrl: './stepper.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-stepper', '[class]': 'classes()' },\n providers: [\n {\n provide: WR_STEPPER,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrStepper),\n },\n ],\n})\nexport class WrStepper implements WrStepperContext {\n /** Index of the currently visible step. */\n readonly active = model(0);\n\n /** Layout direction. @default 'horizontal' */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /** Lock steps after the latest completed one. @default false */\n readonly linear = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Drop a horizontal stepper to a vertical layout when its own box is too\n * narrow for the row (a container query on its own width, not the\n * viewport — so it adapts inside a narrow column or side panel). No effect\n * when `orientation` is already `vertical`. @default false\n */\n readonly responsive = input(false, { transform: coerceBooleanProperty });\n\n protected readonly steps = contentChildren(WrStep);\n\n /**\n * The \"optional\" badge sits INSIDE the header button's label span, so the word\n * is part of the step's accessible name — a hard-coded literal announced English\n * to every locale, not just showed it. Catalog-only rather than an input: the\n * badge is one word shared by every step, and an app that wants other wording\n * overrides `stepper.optional` once instead of on every `<wr-step>`.\n */\n protected readonly optionalLabel = useI18nText(NO_OVERRIDE, 'stepper.optional', 'optional');\n\n /**\n * The check mark that replaces a completed step's number is `aria-hidden`, so\n * the state it draws reached nobody who cannot see it. This word goes into the\n * header button's name instead, visually hidden. Catalog-only, for the reason\n * `optionalLabel` is.\n */\n protected readonly completedLabel = useI18nText(NO_OVERRIDE, 'stepper.completed', 'completed');\n\n protected readonly classes = computed(() => {\n const parts = [`wr-stepper--${this.orientation()}`];\n if (this.linear()) parts.push('wr-stepper--linear');\n if (this.responsive()) parts.push('wr-stepper--responsive');\n return parts.join(' ');\n });\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('stepper');\n // Push each step's index down so it can compute its own active state.\n effect(() => {\n this.steps().forEach((step, i) => step._index.set(i));\n });\n\n // `active` is a plain `model`, so `[(active)]` and an `@if`-shrunk step list\n // both write into it unchecked — only `goTo` clamped. Out of range no step\n // matches `.wr-step--active`, and since `.wr-step` is `display: none` until it\n // does, the stepper renders its header row over an empty body with no header\n // carrying `aria-current=\"step\"`. Same guard as `wr-carousel`; the `last < 0`\n // return keeps it quiet until `contentChildren` resolves.\n effect(() => {\n const last = this.steps().length - 1;\n if (last < 0) return;\n const clamped = Math.min(Math.max(0, this.active()), last);\n if (clamped !== this.active()) this.active.set(clamped);\n });\n }\n\n /** Is the step at `index` considered completed? */\n protected isCompleted(index: number): boolean {\n const override = this.steps()[index]?.completed();\n if (override !== null && override !== undefined) return override;\n return index < this.active();\n }\n\n /** Is the step at `index` reachable for direct header clicks? */\n protected isReachable(index: number): boolean {\n if (this.steps()[index]?.disabled()) return false;\n if (!this.linear()) return true;\n if (index <= this.active()) return true;\n for (let i = 0; i < index; i++) {\n if (!this.isCompleted(i)) return false;\n }\n return true;\n }\n\n protected onHeaderClick(index: number): void {\n if (this.isReachable(index)) this.goTo(index);\n }\n\n // Imperative API\n\n goTo(index: number): void {\n const last = this.steps().length - 1;\n if (last < 0) return;\n const clamped = Math.min(Math.max(0, index), last);\n this.active.set(clamped);\n }\n\n next(): void {\n this.goTo(this.active() + 1);\n }\n\n prev(): void {\n this.goTo(this.active() - 1);\n }\n}\n","<ol class=\"wr-stepper__headers\" role=\"list\">\n @for (step of steps(); track $index) {\n <li\n class=\"wr-stepper__header\"\n [class.wr-stepper__header--active]=\"$index === active()\"\n [class.wr-stepper__header--completed]=\"isCompleted($index)\"\n [class.wr-stepper__header--reachable]=\"isReachable($index)\"\n [class.wr-stepper__header--disabled]=\"step.disabled()\"\n >\n <button\n type=\"button\"\n class=\"wr-stepper__header-button\"\n [disabled]=\"!isReachable($index) || step.disabled()\"\n [attr.aria-current]=\"$index === active() ? 'step' : null\"\n (click)=\"onHeaderClick($index)\"\n >\n <span class=\"wr-stepper__indicator\" aria-hidden=\"true\">\n @if (isCompleted($index)) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M3 7.5 L6 10.5 L11 4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n {{ $index + 1 }}\n }\n </span>\n <span class=\"wr-stepper__label\">\n {{ step.label() }}\n @if (isCompleted($index)) {\n <span class=\"wr-stepper__sr-only\"> {{ completedLabel() }} </span>\n }\n @if (step.optional()) {\n <small class=\"wr-stepper__optional\">{{ optionalLabel() }}</small>\n }\n @if (step.description()) {\n <small class=\"wr-stepper__description\">{{ step.description() }}</small>\n }\n </span>\n </button>\n @if (!$last) {\n <span class=\"wr-stepper__connector\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n</ol>\n\n<div class=\"wr-stepper__body\">\n <ng-content />\n</div>\n"],"mappings":";;;;;;;;;;;AAiBA,MAAa,aAAa,IAAI,eAAiC,YAAY;;;;;;;ACqB3E,IAAa,SAAb,MAAa,OAAM;CACjB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,SAAS;CAC5E;CAGS,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAGzB,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAG/B,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAM1D,YAAY,MAAsB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAGvC,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAG1D,SAAS,OAAO,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAEX,UAAU,OAAO,UAAU;CAEzB,WAAW,eAAe,KAAK,OAAM,M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AA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,MAAM,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-stepper.mjs","names":[],"sources":["../../../projects/lib/stepper/tokens.ts","../../../projects/lib/stepper/step.ts","../../../projects/lib/stepper/stepper.ts","../../../projects/lib/stepper/stepper.html"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken, type Signal } from '@angular/core';\n\n/** Surface a {@link WrStepper} provides for its child `<wr-step>`s. */\nexport interface WrStepperContext {\n /** Index of the currently visible step. */\n readonly active: Signal<number>;\n /** Linear mode — steps after the latest completed one are locked. */\n readonly linear: Signal<boolean>;\n}\n\nexport const WR_STEPPER = new InjectionToken<WrStepperContext>('WR_STEPPER');\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, ViewEncapsulation, computed, inject, input, signal } from '@angular/core';\n\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WR_STEPPER } from './tokens';\n\n/**\n * One step in a {@link WrStepper}. Project as a child:\n *\n * ```html\n * <wr-stepper>\n * <wr-step label=\"Account\"> … </wr-step>\n * <wr-step label=\"Profile\" description=\"Optional\"> … </wr-step>\n * </wr-stepper>\n * ```\n *\n * The stepper hides every step except the active one via a host class —\n * each step still mounts once, so component state survives navigation.\n *\n * @see https://ngwr.dev/reference/components/stepper\n */\n@Component({\n selector: 'wr-step',\n template: '<ng-content />',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-step',\n '[class.wr-step--active]': 'isActive()',\n },\n})\nexport class WrStep {\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('stepper');\n }\n\n /** Header label. */\n readonly label = input<string>('');\n\n /** Secondary text shown under the label. */\n readonly description = input<string>('');\n\n /** Marks the step as optional in the header. */\n readonly optional = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Override completion state. When unset, the stepper auto-derives it\n * from the active index (any step before `active` is completed).\n */\n readonly completed = input<boolean | null>(null);\n\n /** Disables the header — also blocks header clicks. */\n readonly disabled = input(false, { transform: coerceBooleanProperty });\n\n /** Stepper-assigned index. Set by the parent when contentChildren updates. */\n readonly _index = signal(-1);\n\n private readonly stepper = inject(WR_STEPPER);\n\n protected readonly isActive = computed(() => this._index() === this.stepper.active());\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 {\n Component,\n ViewEncapsulation,\n computed,\n contentChildren,\n effect,\n forwardRef,\n input,\n model,\n} from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport { WrStep } from './step';\nimport { WR_STEPPER, type WrStepperContext } from './tokens';\n\n/**\n * Multi-step wizard container. Children are `<wr-step>` components — the\n * stepper renders one numbered header per step (with connectors) and the\n * body of the currently active one.\n *\n * Two-way bind `[(active)]` to the active step index. Set `linear=\"true\"`\n * to forbid jumping past incomplete steps.\n *\n * @example\n * ```html\n * <wr-stepper [(active)]=\"step\" linear>\n * <wr-step label=\"Account\">…</wr-step>\n * <wr-step label=\"Profile\">…</wr-step>\n * <wr-step label=\"Confirm\">…</wr-step>\n * </wr-stepper>\n * ```\n *\n * @see https://ngwr.dev/reference/components/stepper\n */\n@Component({\n selector: 'wr-stepper',\n templateUrl: './stepper.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-stepper', '[class]': 'classes()' },\n providers: [\n {\n provide: WR_STEPPER,\n // eslint-disable-next-line @angular-eslint/no-forward-ref\n useExisting: forwardRef(() => WrStepper),\n },\n ],\n})\nexport class WrStepper implements WrStepperContext {\n /** Index of the currently visible step. */\n readonly active = model(0);\n\n /** Layout direction. @default 'horizontal' */\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /** Lock steps after the latest completed one. @default false */\n readonly linear = input(false, { transform: coerceBooleanProperty });\n\n /**\n * Drop a horizontal stepper to a vertical layout when its own box is too\n * narrow for the row (a container query on its own width, not the\n * viewport — so it adapts inside a narrow column or side panel). No effect\n * when `orientation` is already `vertical`. @default false\n */\n readonly responsive = input(false, { transform: coerceBooleanProperty });\n\n protected readonly steps = contentChildren(WrStep);\n\n /**\n * The word of the \"optional\" badge, which sits inside the header button's label\n * and so is part of each optional step's accessible name. One input on the\n * stepper covers every step. Falls back to `stepper.optional`, then `'optional'`.\n */\n readonly optionalLabel = input<string | null>(null);\n\n /**\n * The word a completed step's header button carries after its label, visually\n * hidden: the check mark that replaces the number is `aria-hidden`. Falls back\n * to `stepper.completed`, then `'completed'`.\n */\n readonly completedLabel = input<string | null>(null);\n\n protected readonly resolvedOptionalLabel = useI18nText(this.optionalLabel, 'stepper.optional', 'optional');\n protected readonly resolvedCompletedLabel = useI18nText(this.completedLabel, 'stepper.completed', 'completed');\n\n protected readonly classes = computed(() => {\n const parts = [`wr-stepper--${this.orientation()}`];\n if (this.linear()) parts.push('wr-stepper--linear');\n if (this.responsive()) parts.push('wr-stepper--responsive');\n return parts.join(' ');\n });\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('stepper');\n // Push each step's index down so it can compute its own active state.\n effect(() => {\n this.steps().forEach((step, i) => step._index.set(i));\n });\n\n // `active` is a plain `model`, so `[(active)]` and an `@if`-shrunk step list\n // both write into it unchecked — only `goTo` clamped. Out of range no step\n // matches `.wr-step--active`, and since `.wr-step` is `display: none` until it\n // does, the stepper renders its header row over an empty body with no header\n // carrying `aria-current=\"step\"`. Same guard as `wr-carousel`; the `last < 0`\n // return keeps it quiet until `contentChildren` resolves.\n effect(() => {\n const last = this.steps().length - 1;\n if (last < 0) return;\n const clamped = Math.min(Math.max(0, this.active()), last);\n if (clamped !== this.active()) this.active.set(clamped);\n });\n }\n\n /** Is the step at `index` considered completed? */\n protected isCompleted(index: number): boolean {\n const override = this.steps()[index]?.completed();\n if (override !== null && override !== undefined) return override;\n return index < this.active();\n }\n\n /** Is the step at `index` reachable for direct header clicks? */\n protected isReachable(index: number): boolean {\n if (this.steps()[index]?.disabled()) return false;\n if (!this.linear()) return true;\n if (index <= this.active()) return true;\n for (let i = 0; i < index; i++) {\n if (!this.isCompleted(i)) return false;\n }\n return true;\n }\n\n protected onHeaderClick(index: number): void {\n if (this.isReachable(index)) this.goTo(index);\n }\n\n // Imperative API\n\n goTo(index: number): void {\n const last = this.steps().length - 1;\n if (last < 0) return;\n const clamped = Math.min(Math.max(0, index), last);\n this.active.set(clamped);\n }\n\n next(): void {\n this.goTo(this.active() + 1);\n }\n\n prev(): void {\n this.goTo(this.active() - 1);\n }\n}\n","<ol class=\"wr-stepper__headers\" role=\"list\">\n @for (step of steps(); track $index) {\n <li\n class=\"wr-stepper__header\"\n [class.wr-stepper__header--active]=\"$index === active()\"\n [class.wr-stepper__header--completed]=\"isCompleted($index)\"\n [class.wr-stepper__header--reachable]=\"isReachable($index)\"\n [class.wr-stepper__header--disabled]=\"step.disabled()\"\n >\n <button\n type=\"button\"\n class=\"wr-stepper__header-button\"\n [disabled]=\"!isReachable($index) || step.disabled()\"\n [attr.aria-current]=\"$index === active() ? 'step' : null\"\n (click)=\"onHeaderClick($index)\"\n >\n <span class=\"wr-stepper__indicator\" aria-hidden=\"true\">\n @if (isCompleted($index)) {\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\">\n <path\n d=\"M3 7.5 L6 10.5 L11 4.5\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.75\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n } @else {\n {{ $index + 1 }}\n }\n </span>\n <span class=\"wr-stepper__label\">\n {{ step.label() }}\n @if (isCompleted($index)) {\n <span class=\"wr-stepper__sr-only\"> {{ resolvedCompletedLabel() }} </span>\n }\n @if (step.optional()) {\n <small class=\"wr-stepper__optional\">{{ resolvedOptionalLabel() }}</small>\n }\n @if (step.description()) {\n <small class=\"wr-stepper__description\">{{ step.description() }}</small>\n }\n </span>\n </button>\n @if (!$last) {\n <span class=\"wr-stepper__connector\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n</ol>\n\n<div class=\"wr-stepper__body\">\n <ng-content />\n</div>\n"],"mappings":";;;;;;;;;;;AAiBA,MAAa,aAAa,IAAI,eAAiC,YAAY;;;;;;;ACqB3E,IAAa,SAAb,MAAa,OAAM;CACjB,cAAA;EACE,IAAI,OAAO,cAAc,eAAe,WAAW,cAAc,SAAS;CAC5E;CAGS,QAAQ,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAGzB,cAAc,MAAc,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAG/B,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAM1D,YAAY,MAAsB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAGvC,WAAW,MAAM,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAqB,CAAA;CAG1D,SAAS,OAAO,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAEX,UAAU,OAAO,UAAU;CAEzB,WAAW,eAAe,KAAK,OAAM,MAAO,KAAK,QAAQ,OAA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