ngwr 16.5.0 → 16.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/avatar/styles/_index.scss +39 -0
- package/back-top/styles/_index.scss +6 -0
- package/breadcrumbs/styles/_rules.scss +34 -0
- package/button/styles/_index.scss +45 -2
- package/cascader/styles/_rules.scss +7 -0
- package/charts/chart-legend/styles/_index.scss +1 -9
- package/copy-value/styles/_index.scss +4 -0
- package/counter/styles/_index.scss +1 -8
- package/date-picker/styles/_index.scss +15 -9
- package/dialog/styles/_index.scss +37 -0
- package/dropdown/styles/_index.scss +17 -0
- package/editor/styles/_index.scss +1 -8
- package/event-calendar/styles/_index.scss +2 -6
- package/fesm2022/ngwr-affix.mjs +4 -4
- package/fesm2022/ngwr-affix.mjs.map +1 -1
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +12 -5
- package/fesm2022/ngwr-anchor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-aurora.mjs +3 -3
- package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
- package/fesm2022/ngwr-animations-blur-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-click-sparks.mjs +3 -3
- package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
- package/fesm2022/ngwr-animations-confetti.mjs +3 -3
- package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-animations-decode.mjs +3 -3
- package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
- package/fesm2022/ngwr-animations-destruct.mjs +3 -3
- package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
- package/fesm2022/ngwr-animations-dot-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
- package/fesm2022/ngwr-animations-falling-letters.mjs +3 -3
- package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
- package/fesm2022/ngwr-animations-flow-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
- package/fesm2022/ngwr-animations-fluid-cursor.mjs +3 -3
- package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
- package/fesm2022/ngwr-animations-glitch.mjs +3 -3
- package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
- package/fesm2022/ngwr-animations-glow-border.mjs +3 -3
- package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
- package/fesm2022/ngwr-animations-gradient-flow.mjs +3 -3
- package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
- package/fesm2022/ngwr-animations-marquee.mjs +4 -3
- package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-animations-orbit.mjs +3 -3
- package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
- package/fesm2022/ngwr-animations-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-ripple-grid.mjs +3 -3
- package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
- package/fesm2022/ngwr-animations-rotate-reveal.mjs +3 -3
- package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
- package/fesm2022/ngwr-animations-shimmer.mjs +3 -3
- package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
- package/fesm2022/ngwr-animations-spotlight.mjs +3 -3
- package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
- package/fesm2022/ngwr-animations-thread-lines.mjs +3 -3
- package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
- package/fesm2022/ngwr-animations-tilt.mjs +23 -16
- package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
- package/fesm2022/ngwr-animations-typewriter.mjs +3 -3
- package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-avatar.mjs +171 -6
- package/fesm2022/ngwr-avatar.mjs.map +1 -1
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-breadcrumbs.mjs +47 -13
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +38 -9
- package/fesm2022/ngwr-button.mjs.map +1 -1
- package/fesm2022/ngwr-calendar.mjs +3 -3
- package/fesm2022/ngwr-card.mjs +9 -9
- package/fesm2022/ngwr-carousel.mjs +14 -8
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +27 -7
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-charts-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-boxplot-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-bullet-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-calendar-heatmap.mjs +3 -3
- package/fesm2022/ngwr-charts-candlestick-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-chart-legend.mjs +9 -9
- package/fesm2022/ngwr-charts-core.mjs +18 -11
- package/fesm2022/ngwr-charts-core.mjs.map +1 -1
- package/fesm2022/ngwr-charts-donut-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-funnel-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-gauge.mjs +3 -3
- package/fesm2022/ngwr-charts-heatmap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-line-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-meter-group.mjs +7 -5
- package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
- package/fesm2022/ngwr-charts-radar-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-scatter-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-sparkline.mjs +3 -3
- package/fesm2022/ngwr-charts-treemap-chart.mjs +3 -3
- package/fesm2022/ngwr-charts-waterfall-chart.mjs +3 -3
- package/fesm2022/ngwr-checkbox.mjs +9 -8
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker.mjs +27 -7
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +3 -3
- package/fesm2022/ngwr-comment.mjs +7 -6
- package/fesm2022/ngwr-comment.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-context-menu.mjs +16 -17
- 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 +35 -0
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +151 -54
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-date-stamp.mjs +3 -3
- package/fesm2022/ngwr-date.mjs +40 -16
- 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 +35 -24
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +189 -23
- package/fesm2022/ngwr-directives.mjs.map +1 -1
- package/fesm2022/ngwr-divider.mjs +3 -3
- package/fesm2022/ngwr-drawer.mjs +18 -18
- package/fesm2022/ngwr-dropdown-testing.mjs +5 -1
- package/fesm2022/ngwr-dropdown-testing.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +59 -16
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-editor.mjs +6 -5
- package/fesm2022/ngwr-editor.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar.mjs +27 -15
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload-testing.mjs +5 -0
- package/fesm2022/ngwr-file-upload-testing.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +68 -13
- package/fesm2022/ngwr-file-upload.mjs.map +1 -1
- package/fesm2022/ngwr-form.mjs +181 -12
- 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 +100 -11
- package/fesm2022/ngwr-graph.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +6 -6
- package/fesm2022/ngwr-i18n-ar.mjs +21 -2
- package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-cs.mjs +21 -2
- package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-de.mjs +21 -2
- package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +21 -2
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-es.mjs +21 -2
- package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-fr.mjs +21 -2
- package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-he.mjs +21 -2
- package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-hi.mjs +21 -2
- package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-id.mjs +21 -2
- package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-it.mjs +21 -2
- package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ja.mjs +21 -2
- package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-kk.mjs +520 -0
- package/fesm2022/ngwr-i18n-kk.mjs.map +1 -0
- package/fesm2022/ngwr-i18n-ko.mjs +21 -2
- package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-nl.mjs +21 -2
- package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pl.mjs +21 -2
- package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-pt.mjs +21 -2
- package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +21 -2
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-sv.mjs +21 -2
- package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-tr.mjs +21 -2
- package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-uk.mjs +21 -2
- package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-vi.mjs +21 -2
- package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh-tw.mjs +21 -2
- package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-zh.mjs +21 -2
- package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +91 -20
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper.mjs +8 -4
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +27 -4
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +5 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +25 -17
- 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-layout.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +8 -8
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +9 -9
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-load-state.mjs +16 -15
- package/fesm2022/ngwr-load-state.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +8 -8
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +14 -6
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +15 -12
- package/fesm2022/ngwr-meta.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +9 -9
- package/fesm2022/ngwr-page-header.mjs +24 -3
- package/fesm2022/ngwr-page-header.mjs.map +1 -1
- package/fesm2022/ngwr-pagination-testing.mjs +3 -0
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +34 -5
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +35 -28
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +9 -7
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +162 -18
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +75 -10
- package/fesm2022/ngwr-progress.mjs.map +1 -1
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +9 -5
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +77 -11
- package/fesm2022/ngwr-radio.mjs.map +1 -1
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-resizable.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +12 -12
- package/fesm2022/ngwr-schema-form.mjs +20 -7
- package/fesm2022/ngwr-schema-form.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +233 -10
- package/fesm2022/ngwr-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +23 -3
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +106 -26
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar-testing.mjs +17 -1
- package/fesm2022/ngwr-sidebar-testing.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +66 -11
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +3 -3
- package/fesm2022/ngwr-sortable-list.mjs +27 -15
- 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 +6 -6
- package/fesm2022/ngwr-storage.mjs +4 -4
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +5 -5
- package/fesm2022/ngwr-switch.mjs.map +1 -1
- package/fesm2022/ngwr-table-router.mjs +89 -0
- package/fesm2022/ngwr-table-router.mjs.map +1 -0
- package/fesm2022/ngwr-table-testing.mjs +5 -0
- package/fesm2022/ngwr-table-testing.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +307 -47
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-router.mjs +9 -5
- package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +8 -1
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +60 -10
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +5 -5
- 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 +43 -15
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour.mjs +9 -8
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +4 -3
- package/fesm2022/ngwr-transfer.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +3 -3
- package/fesm2022/ngwr-typography.mjs +23 -3
- package/fesm2022/ngwr-typography.mjs.map +1 -1
- package/fesm2022/ngwr-utils-router.mjs +3 -3
- package/fesm2022/ngwr-utils-router.mjs.map +1 -1
- package/fesm2022/ngwr-utils.mjs +74 -4
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-validators.mjs +33 -1
- package/fesm2022/ngwr-validators.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 +18 -13
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +16 -0
- package/form/styles/_index.scss +37 -0
- package/graph/styles/_index.scss +49 -9
- package/i18n/ar.json +19 -2
- package/i18n/cs.json +19 -2
- package/i18n/de.json +19 -2
- package/i18n/en.json +19 -2
- package/i18n/es.json +19 -2
- package/i18n/fr.json +19 -2
- package/i18n/he.json +19 -2
- package/i18n/hi.json +19 -2
- package/i18n/id.json +19 -2
- package/i18n/it.json +19 -2
- package/i18n/ja.json +19 -2
- package/i18n/kk.json +567 -0
- package/i18n/ko.json +19 -2
- package/i18n/nl.json +19 -2
- package/i18n/pl.json +19 -2
- package/i18n/pt.json +19 -2
- package/i18n/ru.json +19 -2
- package/i18n/sv.json +19 -2
- package/i18n/tr.json +19 -2
- package/i18n/uk.json +19 -2
- package/i18n/vi.json +19 -2
- package/i18n/zh-TW.json +19 -2
- package/i18n/zh.json +19 -2
- package/image-cropper/styles/_index.scss +1 -9
- package/input-number/styles/_index.scss +7 -0
- package/layout/styles/_index.scss +13 -1
- package/llms-full.txt +37 -26
- package/llms.txt +4 -1
- package/loading-bar/styles/_rules.scss +6 -0
- package/package.json +16 -8
- package/page-header/styles/_index.scss +18 -0
- package/pagination/styles/_index.scss +6 -0
- package/popover/styles/_index.scss +9 -0
- package/progress/styles/_index.scss +64 -0
- package/schematics/use/symbol-map.json +7 -0
- package/segmented/styles/_index.scss +7 -0
- package/select/styles/_index.scss +7 -0
- package/sidebar/styles/_index.scss +64 -6
- package/skills/ngwr/SKILL.md +7 -6
- package/skills/ngwr/references/catalog.md +7 -5
- package/sortable-list/styles/_rules.scss +1 -9
- package/speed-dial/styles/_index.scss +6 -0
- package/stepper/styles/_index.scss +1 -9
- package/table/styles/_index.scss +168 -30
- package/tabs/styles/_index.scss +9 -0
- package/theme/_index.scss +12 -1
- package/theme/styles/_colors.scss +11 -0
- package/theme/styles/_contrast.scss +6 -0
- package/theme/styles/_focus.scss +3 -1
- package/theme/styles/_index.scss +1 -0
- package/theme/styles/_mixins.scss +45 -0
- package/theme/styles/_print.scss +17 -0
- package/toast/styles/_index.scss +7 -0
- package/tour/styles/_index.scss +9 -0
- package/tree/styles/_index.scss +1 -9
- package/types/ngwr-anchor.d.ts +3 -0
- package/types/ngwr-animations-aurora.d.ts +6 -0
- package/types/ngwr-animations-blur-reveal.d.ts +6 -0
- package/types/ngwr-animations-click-sparks.d.ts +6 -0
- package/types/ngwr-animations-confetti.d.ts +6 -0
- package/types/ngwr-animations-decode.d.ts +6 -0
- package/types/ngwr-animations-destruct.d.ts +6 -0
- package/types/ngwr-animations-dot-grid.d.ts +6 -0
- package/types/ngwr-animations-falling-letters.d.ts +6 -0
- package/types/ngwr-animations-flow-lines.d.ts +6 -0
- package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
- package/types/ngwr-animations-glitch.d.ts +6 -0
- package/types/ngwr-animations-glow-border.d.ts +6 -0
- package/types/ngwr-animations-gradient-flow.d.ts +6 -0
- package/types/ngwr-animations-marquee.d.ts +6 -0
- package/types/ngwr-animations-orbit.d.ts +6 -0
- package/types/ngwr-animations-reveal.d.ts +6 -0
- package/types/ngwr-animations-ripple-grid.d.ts +6 -0
- package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
- package/types/ngwr-animations-shimmer.d.ts +6 -0
- package/types/ngwr-animations-spotlight.d.ts +6 -0
- package/types/ngwr-animations-thread-lines.d.ts +6 -0
- package/types/ngwr-animations-tilt.d.ts +10 -0
- package/types/ngwr-animations-typewriter.d.ts +6 -0
- package/types/ngwr-avatar.d.ts +39 -0
- package/types/ngwr-breadcrumbs.d.ts +25 -0
- package/types/ngwr-button.d.ts +35 -3
- package/types/ngwr-carousel.d.ts +2 -0
- package/types/ngwr-cascader.d.ts +7 -0
- package/types/ngwr-charts-core.d.ts +16 -0
- package/types/ngwr-charts-meter-group.d.ts +2 -0
- package/types/ngwr-checkbox.d.ts +1 -0
- package/types/ngwr-color-picker.d.ts +1 -0
- package/types/ngwr-context-menu.d.ts +1 -1
- package/types/ngwr-date-picker-testing.d.ts +22 -0
- package/types/ngwr-date-picker.d.ts +97 -17
- package/types/ngwr-date.d.ts +51 -0
- package/types/ngwr-dialog.d.ts +39 -8
- package/types/ngwr-directives.d.ts +57 -4
- package/types/ngwr-drawer.d.ts +1 -1
- package/types/ngwr-dropdown-testing.d.ts +8 -1
- package/types/ngwr-dropdown.d.ts +30 -1
- package/types/ngwr-event-calendar.d.ts +4 -0
- package/types/ngwr-file-upload-testing.d.ts +10 -0
- package/types/ngwr-file-upload.d.ts +55 -1
- package/types/ngwr-form.d.ts +87 -1
- package/types/ngwr-graph-testing.d.ts +28 -1
- package/types/ngwr-graph.d.ts +53 -3
- package/types/ngwr-i18n-kk.d.ts +3 -0
- package/types/ngwr-i18n.d.ts +65 -5
- package/types/ngwr-image-cropper.d.ts +6 -0
- package/types/ngwr-input-number.d.ts +8 -0
- package/types/ngwr-input.d.ts +7 -0
- package/types/ngwr-layout.d.ts +1 -1
- package/types/ngwr-loading-bar-router.d.ts +6 -0
- package/types/ngwr-page-header.d.ts +23 -1
- package/types/ngwr-pagination-testing.d.ts +8 -0
- package/types/ngwr-pagination.d.ts +16 -0
- package/types/ngwr-popconfirm.d.ts +1 -1
- package/types/ngwr-popover.d.ts +67 -4
- package/types/ngwr-progress.d.ts +63 -1
- package/types/ngwr-radio.d.ts +47 -5
- package/types/ngwr-scroll.d.ts +86 -0
- package/types/ngwr-segmented.d.ts +7 -0
- package/types/ngwr-select.d.ts +88 -25
- package/types/ngwr-sidebar-testing.d.ts +21 -7
- package/types/ngwr-sidebar.d.ts +66 -4
- package/types/ngwr-sortable-list.d.ts +20 -7
- package/types/ngwr-table-router.d.ts +49 -0
- package/types/ngwr-table-testing.d.ts +7 -0
- package/types/ngwr-table.d.ts +241 -10
- package/types/ngwr-tabs-router.d.ts +7 -1
- package/types/ngwr-tabs-testing.d.ts +5 -1
- package/types/ngwr-tabs.d.ts +34 -1
- package/types/ngwr-toast.d.ts +11 -0
- package/types/ngwr-tour.d.ts +0 -1
- package/types/ngwr-typography.d.ts +7 -0
- package/types/ngwr-utils-router.d.ts +6 -0
- package/types/ngwr-utils.d.ts +69 -2
- package/types/ngwr-validators.d.ts +49 -1
- package/types/ngwr-version.d.ts +1 -1
- package/typography/styles/_index.scss +4 -0
- package/window/styles/_index.scss +1 -9
|
@@ -41,8 +41,14 @@ var WrSidebarItemHarness = class WrSidebarItemHarness extends ComponentHarness {
|
|
|
41
41
|
async isGroup() {
|
|
42
42
|
return (await this.host()).hasClass("wr-sidebar__row--group");
|
|
43
43
|
}
|
|
44
|
+
async isAction() {
|
|
45
|
+
return (await this.host()).hasClass("wr-sidebar__row--action");
|
|
46
|
+
}
|
|
47
|
+
async getShortcut() {
|
|
48
|
+
return (await this.host()).getAttribute("aria-keyshortcuts");
|
|
49
|
+
}
|
|
44
50
|
async click() {
|
|
45
|
-
if (await this.isDisabled()) throw new Error(`WrSidebarItemHarness.click(): "${await this.getTitle()}" is disabled, so it is not a
|
|
51
|
+
if (await this.isDisabled()) throw new Error(`WrSidebarItemHarness.click(): "${await this.getTitle()}" is disabled, so it is text and not a control.`);
|
|
46
52
|
await (await this.host()).click();
|
|
47
53
|
}
|
|
48
54
|
async focus() {
|
|
@@ -125,6 +131,12 @@ var WrSidebarHarness = class WrSidebarHarness extends ComponentHarness {
|
|
|
125
131
|
async getLabel() {
|
|
126
132
|
return (await this.host()).getAttribute("aria-label");
|
|
127
133
|
}
|
|
134
|
+
async getHeaderText() {
|
|
135
|
+
return this.slotText("header");
|
|
136
|
+
}
|
|
137
|
+
async getFooterText() {
|
|
138
|
+
return this.slotText("footer");
|
|
139
|
+
}
|
|
128
140
|
async getItems(filters = {}) {
|
|
129
141
|
return this.locatorForAll(WrSidebarItemHarness.with({
|
|
130
142
|
...filters,
|
|
@@ -170,6 +182,10 @@ var WrSidebarHarness = class WrSidebarHarness extends ComponentHarness {
|
|
|
170
182
|
async closeGroup(title) {
|
|
171
183
|
await (await this.getGroup(title)).close();
|
|
172
184
|
}
|
|
185
|
+
async slotText(slot) {
|
|
186
|
+
const wrapper = await this.locatorFor(`.wr-sidebar__${slot}`)();
|
|
187
|
+
return await wrapper.matchesSelector(":empty") ? null : wrapper.text();
|
|
188
|
+
}
|
|
173
189
|
};
|
|
174
190
|
export { WrSidebarGroupHarness, WrSidebarHarness, WrSidebarItemHarness };
|
|
175
191
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-sidebar-testing.mjs","names":[],"sources":["../../../projects/lib/sidebar/testing/wr-sidebar-item-harness.ts","../../../projects/lib/sidebar/testing/wr-sidebar-group-harness.ts","../../../projects/lib/sidebar/testing/wr-sidebar-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSidebarItemHarnessFilters } from './types';\n\n/** The hidden separator a row's name is joined with. It is spoken, and it is not part of any one piece. */\nconst SEPARATOR = '.wr-sidebar__comma';\n\n/**\n * Test harness for one row of a `<wr-sidebar>`: a page link, a disabled page,\n * or the title row of a group.\n *\n * A row's accessible name is its title, badge and count joined by a hidden\n * separator. Each reader here answers one piece without that separator, so\n * `getTitle()` is `'Guides'` and never `'Guides,'`.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarItemHarness extends ComponentHarness {\n static hostSelector = '.wr-sidebar__row';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarItemHarnessFilters = {}): HarnessPredicate<WrSidebarItemHarness> {\n return new HarnessPredicate(WrSidebarItemHarness, options)\n .addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption('current', options.current, async (harness, current) => (await harness.isCurrent()) === current)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The row's title, trimmed. */\n async getTitle(): Promise<string> {\n return (await this.locatorFor('.wr-sidebar__title')()).text({ exclude: SEPARATOR });\n }\n\n /** The line under the title, or `null`. */\n async getSubtitle(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__subtitle')())?.text()) ?? null;\n }\n\n /** The word badge (`New`, `Soon`), or `null`. */\n async getBadge(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__badge')())?.text({ exclude: SEPARATOR })) ?? null;\n }\n\n /** The count as drawn at the end of the row (`'12'`, `'99+'`), or `null`. */\n async getCount(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__count')())?.text({ exclude: SEPARATOR })) ?? null;\n }\n\n /** The nesting level, from 1, out of the row's `wr-sidebar__row--level-<n>` modifier. Level 3 and deeper read `3`. */\n async getLevel(): Promise<number> {\n const host = await this.host();\n for (const level of [1, 2, 3]) {\n if (await host.hasClass(`wr-sidebar__row--level-${level}`)) return level;\n }\n throw new Error(`WrSidebarItemHarness.getLevel(): \"${await this.getTitle()}\" carries no level modifier.`);\n }\n\n /** Whether this row is the current page, from `aria-current=\"page\"`. */\n async isCurrent(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-current')) === 'page';\n }\n\n /** Whether the row is a disabled page: plain text, out of the tab order. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-sidebar__row--disabled');\n }\n\n /** Whether the row is the title of a group. {@link WrSidebarGroupHarness} opens and closes it. */\n async isGroup(): Promise<boolean> {\n return (await this.host()).hasClass('wr-sidebar__row--group');\n }\n\n /**\n * Click the row: a link navigates, and a group with no page of its own\n * toggles. Throws for a disabled page, which is text and does nothing.\n */\n async click(): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error(`WrSidebarItemHarness.click(): \"${await this.getTitle()}\" is disabled, so it is not a link.`);\n }\n await (await this.host()).click();\n }\n\n /** Move keyboard focus to the row. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Whether the row holds focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSidebarGroupHarnessFilters, WrSidebarItemHarnessFilters } from './types';\nimport { WrSidebarItemHarness } from './wr-sidebar-item-harness';\n\n/**\n * Test harness for one group of a `<wr-sidebar>`: a title row, and the rows it\n * opens.\n *\n * A group comes in two shapes and the harness covers both. Without a page of\n * its own the whole title row is the toggle. With one, the title is a link and\n * the arrow beside it is a separate button: {@link isLink} tells them apart,\n * and {@link toggle} presses whichever element carries `aria-expanded`.\n *\n * Open and closed are read from that attribute. The rows of a closed group\n * stay in the DOM, so {@link isContentHidden} is how a spec checks they are out\n * of reach of the keyboard.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarGroupHarness extends ComponentHarness {\n static hostSelector = 'li.wr-sidebar__group';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarGroupHarnessFilters = {}): HarnessPredicate<WrSidebarGroupHarness> {\n return new HarnessPredicate(WrSidebarGroupHarness, options)\n .addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n // Every first match below is this group's own: its title row and its toggle\n // come before its body, and the groups nested in it are inside that body.\n private readonly row = this.locatorFor(WrSidebarItemHarness);\n private readonly toggleElement = this.locatorFor('[aria-expanded]');\n private readonly body = this.locatorFor('.wr-sidebar__group-wrap');\n\n /** The group's title, trimmed. */\n async getTitle(): Promise<string> {\n return (await this.row()).getTitle();\n }\n\n /** The group's title row, for its subtitle, badge, count and current state. */\n async getRow(): Promise<WrSidebarItemHarness> {\n return this.row();\n }\n\n /** Whether the group is open, from its toggle's `aria-expanded`. */\n async isOpen(): Promise<boolean> {\n return (await (await this.toggleElement()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** Whether the group is a page as well: its title is a link, and the arrow is a button of its own. */\n async isLink(): Promise<boolean> {\n return (await this.toggleElement()).hasClass('wr-sidebar__toggle');\n }\n\n /** The toggle's own accessible name: only a split group's arrow has one, the rest are named by their row. */\n async getToggleLabel(): Promise<string | null> {\n return (await this.toggleElement()).getAttribute('aria-label');\n }\n\n /**\n * Whether the group is closed around the current page, from the\n * `wr-sidebar__row--holds-active` modifier that draws its dot.\n */\n async holdsCurrent(): Promise<boolean> {\n return (await (await this.row()).host()).hasClass('wr-sidebar__row--holds-active');\n }\n\n /** Whether the group's rows are out of reach of the keyboard, from `inert` on its body. */\n async isContentHidden(): Promise<boolean> {\n return (await (await this.body()).getAttribute('inert')) !== null;\n }\n\n /**\n * The rows under this group, in order, nested groups' rows included.\n * Answered whether the group is open or not: ask {@link isOpen} first when\n * the question is what a user can reach.\n */\n async getItems(filters: WrSidebarItemHarnessFilters = {}): Promise<WrSidebarItemHarness[]> {\n return this.locatorForAll(WrSidebarItemHarness.with({ ...filters, ancestor: await this.bodySelector() }))();\n }\n\n /** The titles of the rows under this group, in order. */\n async getItemTitles(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getTitle()));\n }\n\n /** Press the toggle. */\n async toggle(): Promise<void> {\n await (await this.toggleElement()).click();\n }\n\n /** Open the group. An already-open one is left alone. */\n async open(): Promise<void> {\n if (!(await this.isOpen())) await this.toggle();\n }\n\n /** Close the group. An already-closed one is left alone. */\n async close(): Promise<void> {\n if (await this.isOpen()) await this.toggle();\n }\n\n /** The body's own id, which the toggle's `aria-controls` names. */\n private async bodySelector(): Promise<string> {\n return `#${await (await this.toggleElement()).getAttribute('aria-controls')}`;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSidebarGroupHarnessFilters, WrSidebarHarnessFilters, WrSidebarItemHarnessFilters } from './types';\nimport { WrSidebarGroupHarness } from './wr-sidebar-group-harness';\nimport { WrSidebarItemHarness } from './wr-sidebar-item-harness';\n\n/** Not inside a closed group. A closed group keeps its rows in the DOM, behind `inert`. */\nconst REACHABLE = ':not(.wr-sidebar__group-wrap[inert] *)';\n\n/**\n * Test harness for `<wr-sidebar>`, the navigation drawn from data.\n *\n * The sidebar has no collapsed state of its own: its groups open and close,\n * each through a {@link WrSidebarGroupHarness}. A closed group keeps its rows\n * in the DOM so its height can animate, which means a plain query finds links\n * nobody can reach. {@link getItems} and {@link getGroups} answer with what is\n * reachable, the rows outside every closed group, and `clickItem()` on a row\n * inside one fails and names the rows that are there.\n *\n * The current page is asked for separately, across every row, because a\n * collapsed group can hold it: see {@link getCurrentTitles}.\n *\n * @example\n * ```ts\n * const nav = await loader.getHarness(WrSidebarHarness);\n *\n * await nav.openGroup('Settings');\n * await nav.clickItem('Billing');\n * expect(await nav.getCurrentTitles()).toEqual(['Billing']);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarHarness extends ComponentHarness {\n static hostSelector = 'wr-sidebar';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarHarnessFilters = {}): HarnessPredicate<WrSidebarHarness> {\n return new HarnessPredicate(WrSidebarHarness, options).addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabel(), label)\n );\n }\n\n /** The accessible name of the navigation landmark. */\n async getLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** The reachable rows, in order: pages, disabled pages and group titles, outside every closed group. */\n async getItems(filters: WrSidebarItemHarnessFilters = {}): Promise<WrSidebarItemHarness[]> {\n return this.locatorForAll(WrSidebarItemHarness.with({ ...filters, selector: REACHABLE }))();\n }\n\n /** The titles of the reachable rows, in order. */\n async getItemTitles(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getTitle()));\n }\n\n /** The first reachable row with this title, or a failure naming the rows that are reachable. */\n async getItem(title: string | RegExp): Promise<WrSidebarItemHarness> {\n const [item] = await this.getItems({ title });\n if (!item) {\n throw new Error(\n `WrSidebarHarness.getItem(): no reachable row matched ${String(title)}. A row inside a closed group is ` +\n `out of reach: open the group first. Reachable now: ${(await this.getItemTitles()).join(', ')}.`\n );\n }\n return item;\n }\n\n /** The reachable groups, in order. */\n async getGroups(filters: WrSidebarGroupHarnessFilters = {}): Promise<WrSidebarGroupHarness[]> {\n return this.locatorForAll(WrSidebarGroupHarness.with({ ...filters, selector: REACHABLE }))();\n }\n\n /** The first reachable group with this title, or a failure naming the groups that are reachable. */\n async getGroup(title: string | RegExp): Promise<WrSidebarGroupHarness> {\n const [group] = await this.getGroups({ title });\n if (!group) {\n const titles = await Promise.all((await this.getGroups()).map(each => each.getTitle()));\n throw new Error(\n `WrSidebarHarness.getGroup(): no reachable group matched ${String(title)}. Reachable now: ${titles.join(', ')}.`\n );\n }\n return group;\n }\n\n /**\n * The title of every row marked `aria-current=\"page\"`, in order, whether it\n * is reachable or inside a closed group.\n *\n * A list, because the default match is a path prefix: an entry at `['/']`\n * is current on every route unless it asks for an exact match.\n */\n async getCurrentTitles(): Promise<string[]> {\n const current = await this.locatorForAll(WrSidebarItemHarness.with({ current: true }))();\n return Promise.all(current.map(item => item.getTitle()));\n }\n\n /** Click the first reachable row with this title. Throws when it is out of reach, or disabled. */\n async clickItem(title: string | RegExp): Promise<void> {\n await (await this.getItem(title)).click();\n }\n\n /** Whether the first reachable group with this title is open. */\n async isGroupOpen(title: string | RegExp): Promise<boolean> {\n return (await this.getGroup(title)).isOpen();\n }\n\n /** Open the first reachable group with this title. */\n async openGroup(title: string | RegExp): Promise<void> {\n await (await this.getGroup(title)).open();\n }\n\n /** Close the first reachable group with this title. */\n async closeGroup(title: string | RegExp): Promise<void> {\n await (await this.getGroup(title)).close();\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,YAAY;AAYlB,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CACxD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAuC,CAAA,GAAE;EACnD,OAAO,IAAI,iBAAiB,sBAAsB,OAAO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B;EACpC,OAAO,MAAM,KAAK,SAAS,KAAK,EAAA,CAAG,KAAI;CACzC;CAGA,MAAM,WAAW,OAAsB;EACrC,OAAO,MAAM,KAAK,SAAS,KAAK,EAAA,CAAG,MAAK;CAC1C"}
|
|
1
|
+
{"version":3,"file":"ngwr-sidebar-testing.mjs","names":[],"sources":["../../../projects/lib/sidebar/testing/wr-sidebar-item-harness.ts","../../../projects/lib/sidebar/testing/wr-sidebar-group-harness.ts","../../../projects/lib/sidebar/testing/wr-sidebar-harness.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSidebarItemHarnessFilters } from './types';\n\n/** The hidden separator a row's name is joined with. It is spoken, and it is not part of any one piece. */\nconst SEPARATOR = '.wr-sidebar__comma';\n\n/**\n * Test harness for one row of a `<wr-sidebar>`: a page link, an action, a\n * disabled row, or the title row of a group.\n *\n * A row's accessible name is its title, badge and count joined by a hidden\n * separator. Each reader here answers one piece without that separator, so\n * `getTitle()` is `'Guides'` and never `'Guides,'`.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarItemHarness extends ComponentHarness {\n static hostSelector = '.wr-sidebar__row';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarItemHarnessFilters = {}): HarnessPredicate<WrSidebarItemHarness> {\n return new HarnessPredicate(WrSidebarItemHarness, options)\n .addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption('current', options.current, async (harness, current) => (await harness.isCurrent()) === current)\n .addOption('disabled', options.disabled, async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** The row's title, trimmed. */\n async getTitle(): Promise<string> {\n return (await this.locatorFor('.wr-sidebar__title')()).text({ exclude: SEPARATOR });\n }\n\n /** The line under the title, or `null`. */\n async getSubtitle(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__subtitle')())?.text()) ?? null;\n }\n\n /** The word badge (`New`, `Soon`), or `null`. */\n async getBadge(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__badge')())?.text({ exclude: SEPARATOR })) ?? null;\n }\n\n /** The count as drawn at the end of the row (`'12'`, `'99+'`), or `null`. */\n async getCount(): Promise<string | null> {\n return (await (await this.locatorForOptional('.wr-sidebar__count')())?.text({ exclude: SEPARATOR })) ?? null;\n }\n\n /** The nesting level, from 1, out of the row's `wr-sidebar__row--level-<n>` modifier. Level 3 and deeper read `3`. */\n async getLevel(): Promise<number> {\n const host = await this.host();\n for (const level of [1, 2, 3]) {\n if (await host.hasClass(`wr-sidebar__row--level-${level}`)) return level;\n }\n throw new Error(`WrSidebarItemHarness.getLevel(): \"${await this.getTitle()}\" carries no level modifier.`);\n }\n\n /** Whether this row is the current page, from `aria-current=\"page\"`. */\n async isCurrent(): Promise<boolean> {\n return (await (await this.host()).getAttribute('aria-current')) === 'page';\n }\n\n /** Whether the row is a disabled page or action: plain text, out of the tab order. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('wr-sidebar__row--disabled');\n }\n\n /** Whether the row is the title of a group. {@link WrSidebarGroupHarness} opens and closes it. */\n async isGroup(): Promise<boolean> {\n return (await this.host()).hasClass('wr-sidebar__row--group');\n }\n\n /** Whether the row is an action: a button that calls the entry's `action`, never the current page. */\n async isAction(): Promise<boolean> {\n return (await this.host()).hasClass('wr-sidebar__row--action');\n }\n\n /**\n * The chord an action announces, as `aria-keyshortcuts` spells it\n * (`'Control+K Meta+K'` for `'mod+k'`), or `null`. Not the keycap's text: that\n * follows the platform, and jsdom is never a Mac.\n */\n async getShortcut(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-keyshortcuts');\n }\n\n /**\n * Click the row: a link navigates, an action runs, and a group with no page\n * of its own toggles. Throws for a disabled row, which is text and does nothing.\n */\n async click(): Promise<void> {\n if (await this.isDisabled()) {\n throw new Error(\n `WrSidebarItemHarness.click(): \"${await this.getTitle()}\" is disabled, so it is text and not a control.`\n );\n }\n await (await this.host()).click();\n }\n\n /** Move keyboard focus to the row. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Whether the row holds focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSidebarGroupHarnessFilters, WrSidebarItemHarnessFilters } from './types';\nimport { WrSidebarItemHarness } from './wr-sidebar-item-harness';\n\n/**\n * Test harness for one group of a `<wr-sidebar>`: a title row, and the rows it\n * opens.\n *\n * A group comes in two shapes and the harness covers both. Without a page of\n * its own the whole title row is the toggle. With one, the title is a link and\n * the arrow beside it is a separate button: {@link isLink} tells them apart,\n * and {@link toggle} presses whichever element carries `aria-expanded`.\n *\n * Open and closed are read from that attribute. The rows of a closed group\n * stay in the DOM, so {@link isContentHidden} is how a spec checks they are out\n * of reach of the keyboard.\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarGroupHarness extends ComponentHarness {\n static hostSelector = 'li.wr-sidebar__group';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarGroupHarnessFilters = {}): HarnessPredicate<WrSidebarGroupHarness> {\n return new HarnessPredicate(WrSidebarGroupHarness, options)\n .addOption('title', options.title, (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption('open', options.open, async (harness, open) => (await harness.isOpen()) === open);\n }\n\n // Every first match below is this group's own: its title row and its toggle\n // come before its body, and the groups nested in it are inside that body.\n private readonly row = this.locatorFor(WrSidebarItemHarness);\n private readonly toggleElement = this.locatorFor('[aria-expanded]');\n private readonly body = this.locatorFor('.wr-sidebar__group-wrap');\n\n /** The group's title, trimmed. */\n async getTitle(): Promise<string> {\n return (await this.row()).getTitle();\n }\n\n /** The group's title row, for its subtitle, badge, count and current state. */\n async getRow(): Promise<WrSidebarItemHarness> {\n return this.row();\n }\n\n /** Whether the group is open, from its toggle's `aria-expanded`. */\n async isOpen(): Promise<boolean> {\n return (await (await this.toggleElement()).getAttribute('aria-expanded')) === 'true';\n }\n\n /** Whether the group is a page as well: its title is a link, and the arrow is a button of its own. */\n async isLink(): Promise<boolean> {\n return (await this.toggleElement()).hasClass('wr-sidebar__toggle');\n }\n\n /** The toggle's own accessible name: only a split group's arrow has one, the rest are named by their row. */\n async getToggleLabel(): Promise<string | null> {\n return (await this.toggleElement()).getAttribute('aria-label');\n }\n\n /**\n * Whether the group is closed around the current page, from the\n * `wr-sidebar__row--holds-active` modifier that draws its dot.\n */\n async holdsCurrent(): Promise<boolean> {\n return (await (await this.row()).host()).hasClass('wr-sidebar__row--holds-active');\n }\n\n /** Whether the group's rows are out of reach of the keyboard, from `inert` on its body. */\n async isContentHidden(): Promise<boolean> {\n return (await (await this.body()).getAttribute('inert')) !== null;\n }\n\n /**\n * The rows under this group, in order, nested groups' rows included.\n * Answered whether the group is open or not: ask {@link isOpen} first when\n * the question is what a user can reach.\n */\n async getItems(filters: WrSidebarItemHarnessFilters = {}): Promise<WrSidebarItemHarness[]> {\n return this.locatorForAll(WrSidebarItemHarness.with({ ...filters, ancestor: await this.bodySelector() }))();\n }\n\n /** The titles of the rows under this group, in order. */\n async getItemTitles(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getTitle()));\n }\n\n /** Press the toggle. */\n async toggle(): Promise<void> {\n await (await this.toggleElement()).click();\n }\n\n /** Open the group. An already-open one is left alone. */\n async open(): Promise<void> {\n if (!(await this.isOpen())) await this.toggle();\n }\n\n /** Close the group. An already-closed one is left alone. */\n async close(): Promise<void> {\n if (await this.isOpen()) await this.toggle();\n }\n\n /** The body's own id, which the toggle's `aria-controls` names. */\n private async bodySelector(): Promise<string> {\n return `#${await (await this.toggleElement()).getAttribute('aria-controls')}`;\n }\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\n\nimport type { WrSidebarGroupHarnessFilters, WrSidebarHarnessFilters, WrSidebarItemHarnessFilters } from './types';\nimport { WrSidebarGroupHarness } from './wr-sidebar-group-harness';\nimport { WrSidebarItemHarness } from './wr-sidebar-item-harness';\n\n/** Not inside a closed group. A closed group keeps its rows in the DOM, behind `inert`. */\nconst REACHABLE = ':not(.wr-sidebar__group-wrap[inert] *)';\n\n/**\n * Test harness for `<wr-sidebar>`, the navigation drawn from data.\n *\n * The sidebar has no collapsed state of its own: its groups open and close,\n * each through a {@link WrSidebarGroupHarness}. A closed group keeps its rows\n * in the DOM so its height can animate, which means a plain query finds links\n * nobody can reach. {@link getItems} and {@link getGroups} answer with what is\n * reachable, the rows outside every closed group, and `clickItem()` on a row\n * inside one fails and names the rows that are there.\n *\n * The current page is asked for separately, across every row, because a\n * collapsed group can hold it: see {@link getCurrentTitles}.\n *\n * @example\n * ```ts\n * const nav = await loader.getHarness(WrSidebarHarness);\n *\n * await nav.openGroup('Settings');\n * await nav.clickItem('Billing');\n * expect(await nav.getCurrentTitles()).toEqual(['Billing']);\n * ```\n *\n * @see https://ngwr.dev/guides/testing\n */\nexport class WrSidebarHarness extends ComponentHarness {\n static hostSelector = 'wr-sidebar';\n\n /** Build a predicate that narrows the query — pass to `getHarness` / `getAllHarnesses`. */\n static with(options: WrSidebarHarnessFilters = {}): HarnessPredicate<WrSidebarHarness> {\n return new HarnessPredicate(WrSidebarHarness, options).addOption('label', options.label, (harness, label) =>\n HarnessPredicate.stringMatches(harness.getLabel(), label)\n );\n }\n\n /** The accessible name of the navigation landmark. */\n async getLabel(): Promise<string | null> {\n return (await this.host()).getAttribute('aria-label');\n }\n\n /** The text projected into `[wrSidebarHeader]`, or `null` when the slot is unfilled. */\n async getHeaderText(): Promise<string | null> {\n return this.slotText('header');\n }\n\n /** The text projected into `[wrSidebarFooter]`, or `null` when the slot is unfilled. */\n async getFooterText(): Promise<string | null> {\n return this.slotText('footer');\n }\n\n /** The reachable rows, in order: pages, actions, disabled rows and group titles, outside every closed group. */\n async getItems(filters: WrSidebarItemHarnessFilters = {}): Promise<WrSidebarItemHarness[]> {\n return this.locatorForAll(WrSidebarItemHarness.with({ ...filters, selector: REACHABLE }))();\n }\n\n /** The titles of the reachable rows, in order. */\n async getItemTitles(): Promise<string[]> {\n const items = await this.getItems();\n return Promise.all(items.map(item => item.getTitle()));\n }\n\n /** The first reachable row with this title, or a failure naming the rows that are reachable. */\n async getItem(title: string | RegExp): Promise<WrSidebarItemHarness> {\n const [item] = await this.getItems({ title });\n if (!item) {\n throw new Error(\n `WrSidebarHarness.getItem(): no reachable row matched ${String(title)}. A row inside a closed group is ` +\n `out of reach: open the group first. Reachable now: ${(await this.getItemTitles()).join(', ')}.`\n );\n }\n return item;\n }\n\n /** The reachable groups, in order. */\n async getGroups(filters: WrSidebarGroupHarnessFilters = {}): Promise<WrSidebarGroupHarness[]> {\n return this.locatorForAll(WrSidebarGroupHarness.with({ ...filters, selector: REACHABLE }))();\n }\n\n /** The first reachable group with this title, or a failure naming the groups that are reachable. */\n async getGroup(title: string | RegExp): Promise<WrSidebarGroupHarness> {\n const [group] = await this.getGroups({ title });\n if (!group) {\n const titles = await Promise.all((await this.getGroups()).map(each => each.getTitle()));\n throw new Error(\n `WrSidebarHarness.getGroup(): no reachable group matched ${String(title)}. Reachable now: ${titles.join(', ')}.`\n );\n }\n return group;\n }\n\n /**\n * The title of every row marked `aria-current=\"page\"`, in order, whether it\n * is reachable or inside a closed group.\n *\n * A list, because the default match is a path prefix: an entry at `['/']`\n * is current on every route unless it asks for an exact match.\n */\n async getCurrentTitles(): Promise<string[]> {\n const current = await this.locatorForAll(WrSidebarItemHarness.with({ current: true }))();\n return Promise.all(current.map(item => item.getTitle()));\n }\n\n /** Click the first reachable row with this title: a link navigates, an action runs. Throws when it is out of reach, or disabled. */\n async clickItem(title: string | RegExp): Promise<void> {\n await (await this.getItem(title)).click();\n }\n\n /** Whether the first reachable group with this title is open. */\n async isGroupOpen(title: string | RegExp): Promise<boolean> {\n return (await this.getGroup(title)).isOpen();\n }\n\n /** Open the first reachable group with this title. */\n async openGroup(title: string | RegExp): Promise<void> {\n await (await this.getGroup(title)).open();\n }\n\n /** Close the first reachable group with this title. */\n async closeGroup(title: string | RegExp): Promise<void> {\n await (await this.getGroup(title)).close();\n }\n\n /** An unfilled slot holds no element and no text, which is what its `:empty` rule hides it by. */\n private async slotText(slot: 'header' | 'footer'): Promise<string | null> {\n const wrapper = await this.locatorFor(`.wr-sidebar__${slot}`)();\n return (await wrapper.matchesSelector(':empty')) ? null : wrapper.text();\n }\n}\n"],"mappings":";;;;;;;AAYA,MAAM,YAAY;AAYlB,IAAa,uBAAb,MAAa,6BAA6B,iBAAgB;CACxD,OAAO,eAAe;CAGtB,OAAO,KAAK,UAAuC,CAAA,GAAE;EACnD,OAAO,IAAI,iBAAiB,sBAAsB,OAAO,CAAC,CACvD,UAAU,SAAS,QAAQ,QAAQ,SAAS,UAAU,iBAAiB,cAAc,QAAQ,SAAQ,GAAI,KAAK,CAAC,CAAC,CAChH,UAAU,WAAW,QAAQ,SAAS,OAAO,SAAS,YAAa,MAAM,QAAQ,UAAS,MAAQ,OAAO,CAAC,CAC1G,UAAU,YAAY,QAAQ,UAAU,OAAO,SAAS,aAAc,MAAM,QAAQ,WAAU,MAAQ,QAAQ;CACnH;CAGA,MAAM,WAAQ;EACZ,QAAQ,MAAM,KAAK,WAAW,oBAAoB,CAAC,CAAA,EAAA,CAAI,KAAK,EAAE,SAAS,UAAS,CAAE;CACpF;CAGA,MAAM,cAAW;EACf,OAAQ,OAAO,MAAM,KAAK,mBAAmB,uBAAuB,CAAC,CA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MAAM,KAAK,WAAW,gBAAgB,MAAM,CAAC,CAAA;EAC7D,OAAQ,MAAM,QAAQ,gBAAgB,QAAQ,IAAK,OAAO,QAAQ,KAAI;CACxE"}
|
|
@@ -2,12 +2,14 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import { Component, DestroyRef, ElementRef, ViewEncapsulation, afterNextRender, afterRenderEffect, computed, effect, inject, input, isDevMode, signal, untracked } from "@angular/core";
|
|
3
3
|
import { coerceBooleanProperty } from "@angular/cdk/coercion";
|
|
4
4
|
import { NgTemplateOutlet } from "@angular/common";
|
|
5
|
-
import { wrCheckStyles } from "ngwr/utils";
|
|
5
|
+
import { WR_KEYS, wrCheckStyles } from "ngwr/utils";
|
|
6
6
|
import { useI18nFormatter, useI18nText, wrReadI18nText } from "ngwr/i18n";
|
|
7
7
|
import { WrIcon } from "ngwr/icon";
|
|
8
8
|
import { ActivatedRoute, NavigationEnd, Router, RouterLink, containsTree } from "@angular/router";
|
|
9
9
|
import { toSignal } from "@angular/core/rxjs-interop";
|
|
10
10
|
import { filter, map, startWith } from "rxjs";
|
|
11
|
+
import { wrParseHotkeySpec } from "ngwr/hotkey";
|
|
12
|
+
import { WrKbd } from "ngwr/keyboard";
|
|
11
13
|
/**
|
|
12
14
|
* @license
|
|
13
15
|
*
|
|
@@ -17,6 +19,24 @@ import { filter, map, startWith } from "rxjs";
|
|
|
17
19
|
function isGroup(entry) {
|
|
18
20
|
return "children" in entry;
|
|
19
21
|
}
|
|
22
|
+
function isAction(entry) {
|
|
23
|
+
return "action" in entry;
|
|
24
|
+
}
|
|
25
|
+
const ARIA_KEYS = new Map(Object.values(WR_KEYS).map((key) => [key.toLowerCase(), key === WR_KEYS.SPACE ? "Space" : key]));
|
|
26
|
+
function ariaKeyShortcuts(chord) {
|
|
27
|
+
const spell = (mac) => {
|
|
28
|
+
const parsed = wrParseHotkeySpec(chord, mac);
|
|
29
|
+
const key = ARIA_KEYS.get(parsed.key) ?? (parsed.key.length === 1 ? parsed.key.toUpperCase() : parsed.key);
|
|
30
|
+
return [
|
|
31
|
+
parsed.ctrl && "Control",
|
|
32
|
+
parsed.alt && "Alt",
|
|
33
|
+
parsed.shift && "Shift",
|
|
34
|
+
parsed.meta && "Meta",
|
|
35
|
+
key
|
|
36
|
+
].filter(Boolean).join("+");
|
|
37
|
+
};
|
|
38
|
+
return [.../* @__PURE__ */ new Set([spell(false), spell(true)])].join(" ");
|
|
39
|
+
}
|
|
20
40
|
const MAX_LEVEL = 3;
|
|
21
41
|
const KEY_SEPARATOR = "";
|
|
22
42
|
const EXACT_MATCH = {
|
|
@@ -45,6 +65,7 @@ function filled(value) {
|
|
|
45
65
|
}
|
|
46
66
|
function linkOf(entry) {
|
|
47
67
|
if (isGroup(entry)) return entry.url?.length ? entry.url : null;
|
|
68
|
+
if (isAction(entry)) return null;
|
|
48
69
|
return !entry.disabled && entry.url.length ? entry.url : null;
|
|
49
70
|
}
|
|
50
71
|
let sidebarUid = 0;
|
|
@@ -67,6 +88,7 @@ var WrSidebar = class WrSidebar {
|
|
|
67
88
|
...ngDevMode ? { debugName: "autoCollapse" } : /* istanbul ignore next */ {},
|
|
68
89
|
transform: coerceBooleanProperty
|
|
69
90
|
});
|
|
91
|
+
activeTone = input("primary", ...ngDevMode ? [{ debugName: "activeTone" }] : /* istanbul ignore next */ []);
|
|
70
92
|
containsCurrentLabel = wrReadI18nText("sidebar.containsCurrent", "contains the current page");
|
|
71
93
|
subpagesLabel = useI18nFormatter("sidebar.subpages", "Sub-pages of {{title}}");
|
|
72
94
|
separator = wrReadI18nText("sidebar.separator", ",");
|
|
@@ -86,7 +108,7 @@ var WrSidebar = class WrSidebar {
|
|
|
86
108
|
const url = linkOf(entry);
|
|
87
109
|
if (url) {
|
|
88
110
|
const tree = this.router.createUrlTree([...url], { relativeTo: this.route });
|
|
89
|
-
const options = isGroup(entry) ? GROUP_MATCH : matchOptions(entry.activeOptions);
|
|
111
|
+
const options = isGroup(entry) || isAction(entry) ? GROUP_MATCH : matchOptions(entry.activeOptions);
|
|
90
112
|
if (containsTree(current, tree, options)) out.add(key);
|
|
91
113
|
}
|
|
92
114
|
if (isGroup(entry)) visit(entry.children, key);
|
|
@@ -116,9 +138,12 @@ var WrSidebar = class WrSidebar {
|
|
|
116
138
|
const holdsActive = group && !open && below && visible;
|
|
117
139
|
const ancestor = group && open && below;
|
|
118
140
|
const url = linkOf(entry);
|
|
141
|
+
const action = isAction(entry) && !entry.disabled ? entry.action : null;
|
|
142
|
+
const shortcut = action && isAction(entry) ? filled(entry.shortcut) : null;
|
|
119
143
|
const classes = ["wr-sidebar__row", `wr-sidebar__row--level-${Math.min(level, MAX_LEVEL)}`];
|
|
120
144
|
if (group) classes.push("wr-sidebar__row--group");
|
|
121
|
-
if (
|
|
145
|
+
if (isAction(entry)) classes.push("wr-sidebar__row--action");
|
|
146
|
+
if (!group && !url && !action) classes.push("wr-sidebar__row--disabled");
|
|
122
147
|
if (isActive) classes.push("wr-sidebar__row--active");
|
|
123
148
|
if (ancestor) classes.push("wr-sidebar__row--ancestor");
|
|
124
149
|
if (holdsActive) classes.push("wr-sidebar__row--holds-active");
|
|
@@ -143,6 +168,9 @@ var WrSidebar = class WrSidebar {
|
|
|
143
168
|
badgeTail: badge && (count !== null || holdsActive) ? sep : "",
|
|
144
169
|
countTail: count !== null && holdsActive ? sep : "",
|
|
145
170
|
url,
|
|
171
|
+
action,
|
|
172
|
+
shortcut,
|
|
173
|
+
keyShortcuts: shortcut === null ? null : ariaKeyShortcuts(shortcut),
|
|
146
174
|
children: sub?.nodes ?? null,
|
|
147
175
|
open,
|
|
148
176
|
active: isActive,
|
|
@@ -264,7 +292,7 @@ var WrSidebar = class WrSidebar {
|
|
|
264
292
|
}
|
|
265
293
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
266
294
|
minVersion: "12.0.0",
|
|
267
|
-
version: "22.
|
|
295
|
+
version: "22.3.0",
|
|
268
296
|
ngImport: i0,
|
|
269
297
|
type: WrSidebar,
|
|
270
298
|
deps: [],
|
|
@@ -272,7 +300,7 @@ var WrSidebar = class WrSidebar {
|
|
|
272
300
|
});
|
|
273
301
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
274
302
|
minVersion: "17.0.0",
|
|
275
|
-
version: "22.
|
|
303
|
+
version: "22.3.0",
|
|
276
304
|
type: WrSidebar,
|
|
277
305
|
isStandalone: true,
|
|
278
306
|
selector: "wr-sidebar",
|
|
@@ -318,15 +346,25 @@ var WrSidebar = class WrSidebar {
|
|
|
318
346
|
isSignal: true,
|
|
319
347
|
isRequired: false,
|
|
320
348
|
transformFunction: null
|
|
349
|
+
},
|
|
350
|
+
activeTone: {
|
|
351
|
+
classPropertyName: "activeTone",
|
|
352
|
+
publicName: "activeTone",
|
|
353
|
+
isSignal: true,
|
|
354
|
+
isRequired: false,
|
|
355
|
+
transformFunction: null
|
|
321
356
|
}
|
|
322
357
|
},
|
|
323
358
|
host: {
|
|
324
359
|
attributes: { "role": "navigation" },
|
|
325
|
-
properties: {
|
|
360
|
+
properties: {
|
|
361
|
+
"attr.aria-label": "resolvedAriaLabel()",
|
|
362
|
+
"class.wr-sidebar--active-neutral": "activeTone() === 'neutral'"
|
|
363
|
+
},
|
|
326
364
|
classAttribute: "wr-sidebar"
|
|
327
365
|
},
|
|
328
366
|
ngImport: i0,
|
|
329
|
-
template: "<!-- A list, not a <nav>: the host already IS the navigation landmark, and two\n nested ones announce the same list twice. -->\n<ul class=\"wr-sidebar__inner\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n</ul>\n\n<ng-template #rows let-list>\n @for (node of asNodes(list); track node.key) {\n <li\n [class.wr-sidebar__group]=\"!!node.children\"\n [class.wr-sidebar__group--collapsed]=\"!!node.children && !node.open\"\n >\n @if (node.children) {\n @if (node.url) {\n <!-- A group that is also a page: two targets, the title a link and the\n arrow a button of its own. -->\n <div class=\"wr-sidebar__split\">\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n <button\n type=\"button\"\n class=\"wr-sidebar__toggle\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-label]=\"subpagesLabel({ title: node.title })\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n </button>\n </div>\n } @else {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-describedby]=\"node.subtitleId\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n }\n <div class=\"wr-sidebar__group-wrap\" [id]=\"node.listId\" [attr.inert]=\"node.open ? null : ''\">\n <div class=\"wr-sidebar__group-body\">\n <ul class=\"wr-sidebar__list\" [class.wr-sidebar__list--under-icon]=\"!!node.icon\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n } @else if (node.url) {\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n } @else {\n <!-- A span, not a greyed anchor: `pointer-events: none` stops a mouse and\n never the keyboard, so a disabled link stayed a tab stop and Enter\n navigated. An empty `url` is the same case. No `aria-describedby`: a\n span is a nameless generic, so its subtitle is read as plain text. -->\n <span [class]=\"node.rowClass\">\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </span>\n }\n </li>\n }\n</ng-template>\n\n<!-- The inside of every row. The accessible name is the title, then the badge,\n then the count, each piece ending in a hidden separator (`sidebar.separator`)\n when another follows; on a link or a button the subtitle is the description,\n and on a disabled row it is read as text. The separator sits INSIDE the piece\n it follows, and inline: a browser puts a space at every block boundary, so a\n comma element of its own was read as \"Guides , 14\". -->\n<ng-template #row let-value>\n @let node = asNode(value);\n @if (node.icon) {\n <wr-icon class=\"wr-sidebar__icon\" [name]=\"node.icon\" />\n }\n <span class=\"wr-sidebar__title\"\n >{{ node.title }}<span class=\"wr-sidebar__comma\">{{ node.titleTail }}</span></span\n >\n @if (node.badge || node.subtitle) {\n <span class=\"wr-sidebar__meta\">\n @if (node.badge; as badge) {\n <small\n class=\"wr-sidebar__badge\"\n [class.wr-sidebar__badge--neutral]=\"badge.tone === 'neutral'\"\n [class.wr-sidebar__badge--primary]=\"badge.tone === 'primary'\"\n [class.wr-sidebar__badge--danger]=\"badge.tone === 'danger'\"\n >{{ badge.text }}<span class=\"wr-sidebar__comma\">{{ node.badgeTail }}</span></small\n >\n }\n @if (node.subtitle) {\n <span\n class=\"wr-sidebar__subtitle\"\n [attr.aria-hidden]=\"node.url || node.children ? 'true' : null\"\n [attr.id]=\"node.subtitleId\"\n >{{ node.subtitle }}</span\n >\n }\n </span>\n }\n @if (node.count !== null || node.holdsActive || (node.children && !node.url)) {\n <span class=\"wr-sidebar__end\">\n @if (node.count !== null) {\n @if (node.countLabel) {\n <small class=\"wr-sidebar__count\" aria-hidden=\"true\">{{ node.count }}</small>\n <span class=\"wr-sidebar__sr\">{{ node.countLabel }}{{ node.countTail }}</span>\n } @else {\n <small class=\"wr-sidebar__count\"\n >{{ node.count }}<span class=\"wr-sidebar__comma\">{{ node.countTail }}</span></small\n >\n }\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__dot\" aria-hidden=\"true\"></span>\n }\n @if (node.children && !node.url) {\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n }\n </span>\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__sr\">{{ containsCurrentLabel() }}</span>\n }\n</ng-template>\n\n<!-- Inline chrome, not user-customisable. Points at the inline end; turns down when open. -->\n<ng-template #chevron>\n <svg\n class=\"wr-sidebar__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</ng-template>\n",
|
|
367
|
+
template: "<!-- A list, not a <nav>: the host already IS the navigation landmark, and two\n nested ones announce the same list twice. -->\n<!-- Inside the landmark, outside the list: a slot holds anything, not rows.\n Each wrapper is `:empty` until something is projected, and then takes no room. -->\n<div class=\"wr-sidebar__header\">\n <ng-content select=\"[wrSidebarHeader]\" />\n</div>\n\n<ul class=\"wr-sidebar__inner\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n</ul>\n\n<div class=\"wr-sidebar__footer\">\n <ng-content select=\"[wrSidebarFooter]\" />\n</div>\n\n<ng-template #rows let-list>\n @for (node of asNodes(list); track node.key) {\n <li\n [class.wr-sidebar__group]=\"!!node.children\"\n [class.wr-sidebar__group--collapsed]=\"!!node.children && !node.open\"\n >\n @if (node.children) {\n @if (node.url) {\n <!-- A group that is also a page: two targets, the title a link and the\n arrow a button of its own. -->\n <div class=\"wr-sidebar__split\">\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n <button\n type=\"button\"\n class=\"wr-sidebar__toggle\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-label]=\"subpagesLabel({ title: node.title })\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n </button>\n </div>\n } @else {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-describedby]=\"node.subtitleId\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n }\n <div class=\"wr-sidebar__group-wrap\" [id]=\"node.listId\" [attr.inert]=\"node.open ? null : ''\">\n <div class=\"wr-sidebar__group-body\">\n <ul class=\"wr-sidebar__list\" [class.wr-sidebar__list--under-icon]=\"!!node.icon\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n } @else if (node.url) {\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n } @else if (node.action; as action) {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-describedby]=\"node.subtitleId\"\n [attr.aria-keyshortcuts]=\"node.keyShortcuts\"\n (click)=\"action()\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n } @else {\n <!-- A span, not a greyed anchor: `pointer-events: none` stops a mouse and\n never the keyboard, so a disabled link stayed a tab stop and Enter\n navigated. An empty `url` is the same case. No `aria-describedby`: a\n span is a nameless generic, so its subtitle is read as plain text. -->\n <span [class]=\"node.rowClass\">\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </span>\n }\n </li>\n }\n</ng-template>\n\n<!-- The inside of every row. The accessible name is the title, then the badge,\n then the count, each piece ending in a hidden separator (`sidebar.separator`)\n when another follows; on a link or a button the subtitle is the description,\n and on a disabled row it is read as text. The separator sits INSIDE the piece\n it follows, and inline: a browser puts a space at every block boundary, so a\n comma element of its own was read as \"Guides , 14\". -->\n<ng-template #row let-value>\n @let node = asNode(value);\n @if (node.icon) {\n <wr-icon class=\"wr-sidebar__icon\" [name]=\"node.icon\" />\n }\n <span class=\"wr-sidebar__title\"\n >{{ node.title }}<span class=\"wr-sidebar__comma\">{{ node.titleTail }}</span></span\n >\n @if (node.badge || node.subtitle) {\n <span class=\"wr-sidebar__meta\">\n @if (node.badge; as badge) {\n <small\n class=\"wr-sidebar__badge\"\n [class.wr-sidebar__badge--neutral]=\"badge.tone === 'neutral'\"\n [class.wr-sidebar__badge--primary]=\"badge.tone === 'primary'\"\n [class.wr-sidebar__badge--danger]=\"badge.tone === 'danger'\"\n >{{ badge.text }}<span class=\"wr-sidebar__comma\">{{ node.badgeTail }}</span></small\n >\n }\n @if (node.subtitle) {\n <span\n class=\"wr-sidebar__subtitle\"\n [attr.aria-hidden]=\"node.url || node.children || node.action ? 'true' : null\"\n [attr.id]=\"node.subtitleId\"\n >{{ node.subtitle }}</span\n >\n }\n </span>\n }\n @if (node.count !== null || node.holdsActive || node.shortcut || (node.children && !node.url)) {\n <span class=\"wr-sidebar__end\">\n @if (node.count !== null) {\n @if (node.countLabel) {\n <small class=\"wr-sidebar__count\" aria-hidden=\"true\">{{ node.count }}</small>\n <span class=\"wr-sidebar__sr\">{{ node.countLabel }}{{ node.countTail }}</span>\n } @else {\n <small class=\"wr-sidebar__count\"\n >{{ node.count }}<span class=\"wr-sidebar__comma\">{{ node.countTail }}</span></small\n >\n }\n }\n @if (node.shortcut; as chord) {\n <!-- Out of the name: `aria-keyshortcuts` on the button says it once. -->\n <wr-kbd class=\"wr-sidebar__shortcut\" size=\"sm\" aria-hidden=\"true\" [chord]=\"chord\" />\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__dot\" aria-hidden=\"true\"></span>\n }\n @if (node.children && !node.url) {\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n }\n </span>\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__sr\">{{ containsCurrentLabel() }}</span>\n }\n</ng-template>\n\n<!-- Inline chrome, not user-customisable. Points at the inline end; turns down when open. -->\n<ng-template #chevron>\n <svg\n class=\"wr-sidebar__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</ng-template>\n",
|
|
330
368
|
dependencies: [
|
|
331
369
|
{
|
|
332
370
|
kind: "directive",
|
|
@@ -354,6 +392,7 @@ var WrSidebar = class WrSidebar {
|
|
|
354
392
|
"skipLocationChange",
|
|
355
393
|
"replaceUrl",
|
|
356
394
|
"browserUrl",
|
|
395
|
+
"scroll",
|
|
357
396
|
"routerLink"
|
|
358
397
|
]
|
|
359
398
|
},
|
|
@@ -362,6 +401,12 @@ var WrSidebar = class WrSidebar {
|
|
|
362
401
|
type: WrIcon,
|
|
363
402
|
selector: "wr-icon",
|
|
364
403
|
inputs: ["name"]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
kind: "component",
|
|
407
|
+
type: WrKbd,
|
|
408
|
+
selector: "wr-kbd",
|
|
409
|
+
inputs: ["size", "chord"]
|
|
365
410
|
}
|
|
366
411
|
],
|
|
367
412
|
encapsulation: i0.ViewEncapsulation.None
|
|
@@ -369,7 +414,7 @@ var WrSidebar = class WrSidebar {
|
|
|
369
414
|
};
|
|
370
415
|
i0.ɵɵngDeclareClassMetadata({
|
|
371
416
|
minVersion: "12.0.0",
|
|
372
|
-
version: "22.
|
|
417
|
+
version: "22.3.0",
|
|
373
418
|
ngImport: i0,
|
|
374
419
|
type: WrSidebar,
|
|
375
420
|
decorators: [{
|
|
@@ -380,14 +425,16 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
380
425
|
host: {
|
|
381
426
|
class: "wr-sidebar",
|
|
382
427
|
role: "navigation",
|
|
383
|
-
"[attr.aria-label]": "resolvedAriaLabel()"
|
|
428
|
+
"[attr.aria-label]": "resolvedAriaLabel()",
|
|
429
|
+
"[class.wr-sidebar--active-neutral]": "activeTone() === 'neutral'"
|
|
384
430
|
},
|
|
385
431
|
imports: [
|
|
386
432
|
NgTemplateOutlet,
|
|
387
433
|
RouterLink,
|
|
388
|
-
WrIcon
|
|
434
|
+
WrIcon,
|
|
435
|
+
WrKbd
|
|
389
436
|
],
|
|
390
|
-
template: "<!-- A list, not a <nav>: the host already IS the navigation landmark, and two\n nested ones announce the same list twice. -->\n<ul class=\"wr-sidebar__inner\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n</ul>\n\n<ng-template #rows let-list>\n @for (node of asNodes(list); track node.key) {\n <li\n [class.wr-sidebar__group]=\"!!node.children\"\n [class.wr-sidebar__group--collapsed]=\"!!node.children && !node.open\"\n >\n @if (node.children) {\n @if (node.url) {\n <!-- A group that is also a page: two targets, the title a link and the\n arrow a button of its own. -->\n <div class=\"wr-sidebar__split\">\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n <button\n type=\"button\"\n class=\"wr-sidebar__toggle\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-label]=\"subpagesLabel({ title: node.title })\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n </button>\n </div>\n } @else {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-describedby]=\"node.subtitleId\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n }\n <div class=\"wr-sidebar__group-wrap\" [id]=\"node.listId\" [attr.inert]=\"node.open ? null : ''\">\n <div class=\"wr-sidebar__group-body\">\n <ul class=\"wr-sidebar__list\" [class.wr-sidebar__list--under-icon]=\"!!node.icon\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n } @else if (node.url) {\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n } @else {\n <!-- A span, not a greyed anchor: `pointer-events: none` stops a mouse and\n never the keyboard, so a disabled link stayed a tab stop and Enter\n navigated. An empty `url` is the same case. No `aria-describedby`: a\n span is a nameless generic, so its subtitle is read as plain text. -->\n <span [class]=\"node.rowClass\">\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </span>\n }\n </li>\n }\n</ng-template>\n\n<!-- The inside of every row. The accessible name is the title, then the badge,\n then the count, each piece ending in a hidden separator (`sidebar.separator`)\n when another follows; on a link or a button the subtitle is the description,\n and on a disabled row it is read as text. The separator sits INSIDE the piece\n it follows, and inline: a browser puts a space at every block boundary, so a\n comma element of its own was read as \"Guides , 14\". -->\n<ng-template #row let-value>\n @let node = asNode(value);\n @if (node.icon) {\n <wr-icon class=\"wr-sidebar__icon\" [name]=\"node.icon\" />\n }\n <span class=\"wr-sidebar__title\"\n >{{ node.title }}<span class=\"wr-sidebar__comma\">{{ node.titleTail }}</span></span\n >\n @if (node.badge || node.subtitle) {\n <span class=\"wr-sidebar__meta\">\n @if (node.badge; as badge) {\n <small\n class=\"wr-sidebar__badge\"\n [class.wr-sidebar__badge--neutral]=\"badge.tone === 'neutral'\"\n [class.wr-sidebar__badge--primary]=\"badge.tone === 'primary'\"\n [class.wr-sidebar__badge--danger]=\"badge.tone === 'danger'\"\n >{{ badge.text }}<span class=\"wr-sidebar__comma\">{{ node.badgeTail }}</span></small\n >\n }\n @if (node.subtitle) {\n <span\n class=\"wr-sidebar__subtitle\"\n [attr.aria-hidden]=\"node.url || node.children ? 'true' : null\"\n [attr.id]=\"node.subtitleId\"\n >{{ node.subtitle }}</span\n >\n }\n </span>\n }\n @if (node.count !== null || node.holdsActive || (node.children && !node.url)) {\n <span class=\"wr-sidebar__end\">\n @if (node.count !== null) {\n @if (node.countLabel) {\n <small class=\"wr-sidebar__count\" aria-hidden=\"true\">{{ node.count }}</small>\n <span class=\"wr-sidebar__sr\">{{ node.countLabel }}{{ node.countTail }}</span>\n } @else {\n <small class=\"wr-sidebar__count\"\n >{{ node.count }}<span class=\"wr-sidebar__comma\">{{ node.countTail }}</span></small\n >\n }\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__dot\" aria-hidden=\"true\"></span>\n }\n @if (node.children && !node.url) {\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n }\n </span>\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__sr\">{{ containsCurrentLabel() }}</span>\n }\n</ng-template>\n\n<!-- Inline chrome, not user-customisable. Points at the inline end; turns down when open. -->\n<ng-template #chevron>\n <svg\n class=\"wr-sidebar__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</ng-template>\n"
|
|
437
|
+
template: "<!-- A list, not a <nav>: the host already IS the navigation landmark, and two\n nested ones announce the same list twice. -->\n<!-- Inside the landmark, outside the list: a slot holds anything, not rows.\n Each wrapper is `:empty` until something is projected, and then takes no room. -->\n<div class=\"wr-sidebar__header\">\n <ng-content select=\"[wrSidebarHeader]\" />\n</div>\n\n<ul class=\"wr-sidebar__inner\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n</ul>\n\n<div class=\"wr-sidebar__footer\">\n <ng-content select=\"[wrSidebarFooter]\" />\n</div>\n\n<ng-template #rows let-list>\n @for (node of asNodes(list); track node.key) {\n <li\n [class.wr-sidebar__group]=\"!!node.children\"\n [class.wr-sidebar__group--collapsed]=\"!!node.children && !node.open\"\n >\n @if (node.children) {\n @if (node.url) {\n <!-- A group that is also a page: two targets, the title a link and the\n arrow a button of its own. -->\n <div class=\"wr-sidebar__split\">\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n <button\n type=\"button\"\n class=\"wr-sidebar__toggle\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-label]=\"subpagesLabel({ title: node.title })\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n </button>\n </div>\n } @else {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-describedby]=\"node.subtitleId\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n }\n <div class=\"wr-sidebar__group-wrap\" [id]=\"node.listId\" [attr.inert]=\"node.open ? null : ''\">\n <div class=\"wr-sidebar__group-body\">\n <ul class=\"wr-sidebar__list\" [class.wr-sidebar__list--under-icon]=\"!!node.icon\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n } @else if (node.url) {\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n } @else if (node.action; as action) {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-describedby]=\"node.subtitleId\"\n [attr.aria-keyshortcuts]=\"node.keyShortcuts\"\n (click)=\"action()\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n } @else {\n <!-- A span, not a greyed anchor: `pointer-events: none` stops a mouse and\n never the keyboard, so a disabled link stayed a tab stop and Enter\n navigated. An empty `url` is the same case. No `aria-describedby`: a\n span is a nameless generic, so its subtitle is read as plain text. -->\n <span [class]=\"node.rowClass\">\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </span>\n }\n </li>\n }\n</ng-template>\n\n<!-- The inside of every row. The accessible name is the title, then the badge,\n then the count, each piece ending in a hidden separator (`sidebar.separator`)\n when another follows; on a link or a button the subtitle is the description,\n and on a disabled row it is read as text. The separator sits INSIDE the piece\n it follows, and inline: a browser puts a space at every block boundary, so a\n comma element of its own was read as \"Guides , 14\". -->\n<ng-template #row let-value>\n @let node = asNode(value);\n @if (node.icon) {\n <wr-icon class=\"wr-sidebar__icon\" [name]=\"node.icon\" />\n }\n <span class=\"wr-sidebar__title\"\n >{{ node.title }}<span class=\"wr-sidebar__comma\">{{ node.titleTail }}</span></span\n >\n @if (node.badge || node.subtitle) {\n <span class=\"wr-sidebar__meta\">\n @if (node.badge; as badge) {\n <small\n class=\"wr-sidebar__badge\"\n [class.wr-sidebar__badge--neutral]=\"badge.tone === 'neutral'\"\n [class.wr-sidebar__badge--primary]=\"badge.tone === 'primary'\"\n [class.wr-sidebar__badge--danger]=\"badge.tone === 'danger'\"\n >{{ badge.text }}<span class=\"wr-sidebar__comma\">{{ node.badgeTail }}</span></small\n >\n }\n @if (node.subtitle) {\n <span\n class=\"wr-sidebar__subtitle\"\n [attr.aria-hidden]=\"node.url || node.children || node.action ? 'true' : null\"\n [attr.id]=\"node.subtitleId\"\n >{{ node.subtitle }}</span\n >\n }\n </span>\n }\n @if (node.count !== null || node.holdsActive || node.shortcut || (node.children && !node.url)) {\n <span class=\"wr-sidebar__end\">\n @if (node.count !== null) {\n @if (node.countLabel) {\n <small class=\"wr-sidebar__count\" aria-hidden=\"true\">{{ node.count }}</small>\n <span class=\"wr-sidebar__sr\">{{ node.countLabel }}{{ node.countTail }}</span>\n } @else {\n <small class=\"wr-sidebar__count\"\n >{{ node.count }}<span class=\"wr-sidebar__comma\">{{ node.countTail }}</span></small\n >\n }\n }\n @if (node.shortcut; as chord) {\n <!-- Out of the name: `aria-keyshortcuts` on the button says it once. -->\n <wr-kbd class=\"wr-sidebar__shortcut\" size=\"sm\" aria-hidden=\"true\" [chord]=\"chord\" />\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__dot\" aria-hidden=\"true\"></span>\n }\n @if (node.children && !node.url) {\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n }\n </span>\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__sr\">{{ containsCurrentLabel() }}</span>\n }\n</ng-template>\n\n<!-- Inline chrome, not user-customisable. Points at the inline end; turns down when open. -->\n<ng-template #chevron>\n <svg\n class=\"wr-sidebar__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</ng-template>\n"
|
|
391
438
|
}]
|
|
392
439
|
}],
|
|
393
440
|
ctorParameters: () => [],
|
|
@@ -439,6 +486,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
439
486
|
alias: "autoCollapse",
|
|
440
487
|
required: false
|
|
441
488
|
}]
|
|
489
|
+
}],
|
|
490
|
+
activeTone: [{
|
|
491
|
+
type: i0.Input,
|
|
492
|
+
args: [{
|
|
493
|
+
isSignal: true,
|
|
494
|
+
alias: "activeTone",
|
|
495
|
+
required: false
|
|
496
|
+
}]
|
|
442
497
|
}]
|
|
443
498
|
}
|
|
444
499
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngwr-sidebar.mjs","names":[],"sources":["../../../projects/lib/sidebar/sidebar.ts","../../../projects/lib/sidebar/sidebar.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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n signal,\n untracked,\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {\n ActivatedRoute,\n type IsActiveMatchOptions,\n NavigationEnd,\n Router,\n RouterLink,\n containsTree,\n} from '@angular/router';\n\nimport { filter, map, startWith } from 'rxjs';\n\nimport { wrReadI18nText, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrIcon } from 'ngwr/icon';\nimport { wrCheckStyles } from 'ngwr/utils';\n\nimport type { WrSidebarActiveOptions, WrSidebarBadgeTone, WrSidebarEntry, WrSidebarGroup } from './types';\n\nfunction isGroup(entry: WrSidebarEntry): entry is WrSidebarGroup {\n return 'children' in entry;\n}\n\n/** How deep the design goes. Deeper entries still render, with a dev-mode warning. */\nconst MAX_LEVEL = 3;\n\n/**\n * Joins the titles on a path into the key the open state is stored under. A path\n * rather than a title, so two groups called \"Overview\" in different sections stop\n * opening and closing together; a control character, so no title can forge it.\n */\nconst KEY_SEPARATOR = '\\u001f';\n\n/** `{ exact: true }`, spelled the way `RouterLinkActive` spells it. */\nconst EXACT_MATCH: IsActiveMatchOptions = {\n paths: 'exact',\n queryParams: 'exact',\n matrixParams: 'ignored',\n fragment: 'ignored',\n};\n\n/** `{ exact: false }`, the router's default and this component's. */\nconst SUBSET_MATCH: IsActiveMatchOptions = {\n paths: 'subset',\n queryParams: 'subset',\n matrixParams: 'ignored',\n fragment: 'ignored',\n};\n\n/**\n * A group's own link: the exact path, since the children own the paths below it.\n * A prefix match would mark the group AND its current child as the current page.\n */\nconst GROUP_MATCH: Partial<IsActiveMatchOptions> = { paths: 'exact', queryParams: 'subset' };\n\nfunction matchOptions(options: WrSidebarActiveOptions | undefined): Partial<IsActiveMatchOptions> {\n if (!options) return SUBSET_MATCH;\n if ('exact' in options) return options.exact ? EXACT_MATCH : SUBSET_MATCH;\n return options;\n}\n\n/** A string that says something, or `null`: an empty title part draws nothing. */\nfunction filled(value: string | null | undefined): string | null {\n return value === '' ? null : (value ?? null);\n}\n\n/** The commands an entry links to, or `null` when it renders as text or as a plain toggle. */\nfunction linkOf(entry: WrSidebarEntry): readonly (string | number)[] | null {\n if (isGroup(entry)) return entry.url?.length ? entry.url : null;\n return !entry.disabled && entry.url.length ? entry.url : null;\n}\n\n/**\n * Instance counter for the row ids. Deterministic under prerender, unlike\n * `wrRandomId()`, and unique across sidebars: a title-only id collided between two\n * sidebars on one page, and `aria-controls` then pointed at the wrong body.\n */\nlet sidebarUid = 0;\n\n/**\n * Whether `url` is `route` or something below it. A bare `startsWith` matched a\n * SIBLING whose path merely began the same way, so visiting `/table` expanded the\n * group that owns `/tabs`.\n */\nfunction matchesRoute(url: string, route: string): boolean {\n if (!url.startsWith(route)) return false;\n const rest = url.slice(route.length);\n return rest === '' || rest.startsWith('/') || rest.startsWith('?') || rest.startsWith('#');\n}\n\n/** One rendered row, with everything the template needs already decided. */\ninterface SidebarNode {\n /** The title path: what the open state and `track` key on. */\n readonly key: string;\n /** The group body's id, for `aria-controls`. Unique per sidebar and per position. */\n readonly listId: string;\n /** The subtitle's id, for `aria-describedby`, or `null` with no subtitle. */\n readonly subtitleId: string | null;\n readonly title: string;\n readonly subtitle: string | null;\n readonly icon: string | null;\n readonly badge: { readonly text: string; readonly tone: WrSidebarBadgeTone } | null;\n readonly count: string | null;\n readonly countLabel: string | null;\n /** The hidden separator after the title, the badge and the count, when another piece follows. */\n readonly titleTail: string;\n readonly badgeTail: string;\n readonly countTail: string;\n /** Where the row links to. `null` is plain text for a page, a whole-row toggle for a group. */\n readonly url: readonly (string | number)[] | null;\n readonly children: readonly SidebarNode[] | null;\n readonly open: boolean;\n readonly active: boolean;\n /** A collapsed, visible group with the current page somewhere below it. */\n readonly holdsActive: boolean;\n readonly rowClass: string;\n}\n\n/**\n * Navigation drawn from data: pages, and groups of pages that open and close,\n * three levels deep. Every row can carry a subtitle, a word badge and a count.\n *\n * Each title and subtitle takes one line and ends in an ellipsis when it does\n * not fit; the full text stays the accessible name and becomes a tooltip on the\n * part that was cut, measured after render in the browser. A group is a\n * `<button aria-expanded>` that opens its children, or, when it carries a `url`\n * of its own, a link with a separate arrow button beside it. The current page\n * gets `aria-current=\"page\"`, and a collapsed group holding it shows a dot and\n * says so (`sidebar.containsCurrent`).\n *\n * Rows are 32px. Under a coarse pointer (a phone, a tablet) they grow to 44px,\n * and the split arrow to 44 by 44, with no input: the size follows the pointer\n * rather than the container, so the same sidebar in a drawer on a laptop keeps\n * its 32px rows. To force either size, set `--wr-sidebar-row-height`,\n * `--wr-sidebar-row-padding-y` and `--wr-sidebar-chevron-size` on `.wr-sidebar`.\n *\n * The host pads its rows by `--wr-sidebar-padding` (`0.5rem`), so a hovered or\n * current row's tint stays off the edge of whatever holds the nav. Where the\n * container already supplies the inset, set the hook to `0` on `.wr-sidebar`,\n * not on the container: the host declares its own default, which shadows an\n * inherited one.\n *\n * @example\n * ```html\n * <wr-sidebar [entries]=\"[\n * { title: 'Dashboard', url: ['/dashboard'] },\n * {\n * title: 'Settings',\n * count: 2,\n * countLabel: '2 pages',\n * children: [\n * { title: 'Profile', url: ['/settings', 'profile'] },\n * { title: 'Billing', url: ['/settings', 'billing'], badge: { text: 'New', tone: 'primary' } }\n * ]\n * }\n * ]\" />\n * ```\n *\n * @see https://ngwr.dev/reference/components/sidebar\n */\n@Component({\n selector: 'wr-sidebar',\n templateUrl: './sidebar.html',\n encapsulation: ViewEncapsulation.None,\n host: { class: 'wr-sidebar', role: 'navigation', '[attr.aria-label]': 'resolvedAriaLabel()' },\n imports: [NgTemplateOutlet, RouterLink, WrIcon],\n})\nexport class WrSidebar {\n /**\n * The navigation tree. An entry with `children` is a group, which opens on\n * click and on its own when the current route is below it.\n */\n readonly entries = input<readonly WrSidebarEntry[]>([]);\n\n /**\n * Accessible name for the navigation landmark. Falls back to `sidebar.label`,\n * then `'Sidebar'`: a page with a sidebar AND a table of contents has two\n * navigation landmarks, and an unnamed one is announced as just \"navigation\".\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'sidebar.label', 'Sidebar');\n\n /** Icon for a group that names none. `null` draws no icon. @default null */\n readonly defaultGroupIcon = input<string | null>(null);\n\n /** Icon for a page that names none. `null` draws no icon. @default null */\n readonly defaultItemIcon = input<string | null>(null);\n\n /**\n * Open every group above the current route, once per navigation: a group the\n * user closes stays closed until the route changes. @default true\n */\n readonly autoExpand = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Close the groups the previous navigation opened when the next one leaves\n * them, so a long nav does not keep every visited section expanded. A group\n * the user opened or closed by hand is never closed for them. Needs\n * `autoExpand`. @default false\n */\n readonly autoCollapse = input(false, { transform: coerceBooleanProperty });\n\n /** Spoken after a collapsed group that holds the current page. */\n protected readonly containsCurrentLabel = wrReadI18nText('sidebar.containsCurrent', 'contains the current page');\n\n /** The split arrow's name: the group's title is the link beside it. */\n protected readonly subpagesLabel = useI18nFormatter('sidebar.subpages', 'Sub-pages of {{title}}');\n\n /** Joins a row's title, badge and count into one name: `،` in Arabic, `、` in Japanese. */\n protected readonly separator = wrReadI18nText('sidebar.separator', ',');\n\n private readonly opened = signal<ReadonlySet<string>>(new Set());\n\n /** Group keys already seeded from `defaultOpen`, so it seeds once and not again. */\n private readonly seeded = new Set<string>();\n\n private readonly uid = ++sidebarUid;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute, { optional: true });\n private readonly currentUrl = toSignal(\n this.router.events.pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n map(e => e.urlAfterRedirects),\n startWith(this.router.url)\n ),\n { initialValue: this.router.url }\n );\n\n /**\n * The keys of the entries that are the current page, matched the way\n * `RouterLinkActive` matches: an entry's `activeOptions`, a prefix by default.\n * One computation drives `aria-current`, the bar, the ancestors and the dot,\n * so the four cannot disagree.\n */\n private readonly activeKeys = computed<ReadonlySet<string>>(() => {\n const current = this.router.parseUrl(this.currentUrl());\n const out = new Set<string>();\n const visit = (entries: readonly WrSidebarEntry[], parent: string): void => {\n for (const entry of entries) {\n const key = parent ? `${parent}${KEY_SEPARATOR}${entry.title}` : entry.title;\n const url = linkOf(entry);\n if (url) {\n const tree = this.router.createUrlTree([...url], { relativeTo: this.route });\n const options = isGroup(entry) ? GROUP_MATCH : matchOptions(entry.activeOptions);\n if (containsTree(current, tree, options)) out.add(key);\n }\n if (isGroup(entry)) visit(entry.children, key);\n }\n };\n visit(this.entries(), '');\n return out;\n });\n\n /** The tree as the template draws it. */\n protected readonly nodes = computed<readonly SidebarNode[]>(() => {\n const opened = this.opened();\n const active = this.activeKeys();\n const groupIcon = this.defaultGroupIcon();\n const itemIcon = this.defaultItemIcon();\n const sep = this.separator();\n\n const build = (\n entries: readonly WrSidebarEntry[],\n level: number,\n parentKey: string,\n parentId: string,\n visible: boolean\n ): { nodes: readonly SidebarNode[]; holds: boolean } => {\n let holds = false;\n const nodes = entries.map((entry, index) => {\n const key = parentKey ? `${parentKey}${KEY_SEPARATOR}${entry.title}` : entry.title;\n const id = `${parentId}-${index}`;\n const group = isGroup(entry);\n const open = group && opened.has(key);\n const sub = group ? build(entry.children, level + 1, key, id, visible && open) : null;\n const isActive = active.has(key);\n const below = sub?.holds ?? false;\n holds ||= isActive || below;\n\n const holdsActive = group && !open && below && visible;\n const ancestor = group && open && below;\n const url = linkOf(entry);\n const classes = ['wr-sidebar__row', `wr-sidebar__row--level-${Math.min(level, MAX_LEVEL)}`];\n if (group) classes.push('wr-sidebar__row--group');\n if (!group && !url) classes.push('wr-sidebar__row--disabled');\n if (isActive) classes.push('wr-sidebar__row--active');\n if (ancestor) classes.push('wr-sidebar__row--ancestor');\n if (holdsActive) classes.push('wr-sidebar__row--holds-active');\n\n const raw = entry.count ?? null;\n const count = raw === null ? null : String(raw);\n const subtitle = filled(entry.subtitle);\n const badge = entry.badge?.text ? { text: entry.badge.text, tone: entry.badge.tone ?? 'neutral' } : null;\n return {\n key,\n listId: `${id}-list`,\n subtitleId: subtitle === null ? null : `${id}-subtitle`,\n title: entry.title,\n subtitle,\n icon: filled(entry.icon) ?? filled(group ? groupIcon : itemIcon),\n badge,\n count,\n countLabel: count === null ? null : filled(entry.countLabel),\n titleTail: badge || count !== null || holdsActive ? sep : '',\n badgeTail: badge && (count !== null || holdsActive) ? sep : '',\n countTail: count !== null && holdsActive ? sep : '',\n url,\n children: sub?.nodes ?? null,\n open,\n active: isActive,\n holdsActive,\n rowClass: classes.join(' '),\n } satisfies SidebarNode;\n });\n return { nodes, holds };\n };\n\n return build(this.entries(), 1, '', `wr-sidebar-${this.uid}`, true).nodes;\n });\n\n /**\n * Last URL resolved to a set of groups, so a group the user collapsed is not\n * re-opened on the same route. A URL no group holds clears it rather than\n * being recorded: see the effect below.\n */\n private lastAutoUrl: string | null = null;\n\n /** Groups the last navigation opened, which `autoCollapse` may close again. */\n private autoOpened = new Set<string>();\n\n private warnedDepth = false;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sidebar');\n // Seed `defaultOpen` groups, once per group and not once per `entries`\n // emission. Re-seeding meant any later change to the array (a count, a\n // filtered list) re-opened a group the user had deliberately collapsed.\n effect(() => {\n const fresh: string[] = [];\n const visit = (entries: readonly WrSidebarEntry[], parent: string): void => {\n for (const entry of entries) {\n if (!isGroup(entry)) continue;\n const key = parent ? `${parent}${KEY_SEPARATOR}${entry.title}` : entry.title;\n if (entry.defaultOpen && !this.seeded.has(key)) {\n this.seeded.add(key);\n fresh.push(key);\n }\n visit(entry.children, key);\n }\n };\n visit(this.entries(), '');\n if (fresh.length > 0) this.opened.update(prev => new Set([...prev, ...fresh]));\n });\n\n // Open every group above the current URL, and with `autoCollapse` close\n // the ones the previous navigation opened and this one leaves.\n effect(() => {\n if (!this.autoExpand()) return;\n const url = this.currentUrl();\n if (url === this.lastAutoUrl) return;\n const keys = this.groupsAbove(url, this.entries());\n const collapse = this.autoCollapse();\n untracked(() => {\n // Latch AFTER the lookup, never before it. `entries` often arrives from\n // an HTTP call, so the first run matches nothing, and latching first told\n // the re-run that landed with the real nav that this URL was already\n // handled: a deep link stayed collapsed, with the current link out of\n // the tab order. A URL no group holds CLEARS the latch instead, or the\n // way back to a page whose group was closed by hand (Back, an in-page\n // link) found the latch still set and left that group closed.\n this.lastAutoUrl = keys.length === 0 ? null : url;\n\n const opened = this.opened();\n const next = new Set(opened);\n if (collapse) {\n for (const key of this.autoOpened) if (!keys.includes(key)) next.delete(key);\n }\n const fresh = keys.filter(key => !opened.has(key));\n for (const key of fresh) next.add(key);\n this.autoOpened = new Set([...fresh, ...[...this.autoOpened].filter(key => keys.includes(key))]);\n\n if (next.size !== opened.size || [...next].some(key => !opened.has(key))) this.opened.set(next);\n });\n });\n\n if (isDevMode()) {\n effect(() => {\n const depth = this.depthOf(this.entries());\n if (depth <= MAX_LEVEL || this.warnedDepth) return;\n this.warnedDepth = true;\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n `[NGWR] <wr-sidebar>: an entry sits at level ${depth}. The sidebar is designed for ` +\n `${MAX_LEVEL} levels; deeper rows still render, indented once more per level.`\n );\n });\n }\n\n // A tooltip only where the text is actually cut, and on the cut text itself.\n // A `title` on the row would also become the row's description, so a row\n // named \"Charts, 18 pages\" would read its title a second time.\n afterRenderEffect(() => {\n this.nodes();\n this.markCut();\n });\n\n // The width can change with nothing re-rendering: a drawer opening, a\n // resized window, a web font arriving after first paint.\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n if (typeof ResizeObserver !== 'undefined') {\n const observer = new ResizeObserver(() => this.markCut());\n observer.observe(this.host.nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n }\n if ('fonts' in document) void document.fonts.ready.then(() => this.markCut());\n });\n }\n\n protected toggle(key: string): void {\n // Opened or closed by hand, so never closed for the user afterwards.\n this.autoOpened.delete(key);\n this.opened.update(prev => {\n const next = new Set(prev);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n return next;\n });\n }\n\n /** Types the template's recursive context, which `ng-template` leaves as `any`. */\n protected asNodes(value: unknown): readonly SidebarNode[] {\n return value as readonly SidebarNode[];\n }\n\n protected asNode(value: unknown): SidebarNode {\n return value as SidebarNode;\n }\n\n /**\n * A `routerLink` command array as the absolute path it navigates to — resolved\n * against the declaring route, the way `[routerLink]` and `activeKeys` resolve\n * it. Joining the segments by hand read a RELATIVE link (`['settings']`) as\n * `/settings`, so on `/admin/settings` the row lit up as the current page while\n * `autoExpand` left the group above it closed.\n */\n private resolve(link: readonly (string | number)[]): string {\n return this.router.serializeUrl(this.router.createUrlTree([...link], { relativeTo: this.route }));\n }\n\n /** Every group whose subtree links to `url` or above it, by path prefix. */\n private groupsAbove(url: string, entries: readonly WrSidebarEntry[]): string[] {\n const out: string[] = [];\n const visit = (list: readonly WrSidebarEntry[], parent: string): boolean => {\n let hit = false;\n for (const entry of list) {\n const key = parent ? `${parent}${KEY_SEPARATOR}${entry.title}` : entry.title;\n const link = linkOf(entry);\n let self = link !== null && matchesRoute(url, this.resolve(link));\n if (isGroup(entry) && visit(entry.children, key)) {\n out.push(key);\n self = true;\n }\n hit ||= self;\n }\n return hit;\n };\n visit(entries, '');\n return out;\n }\n\n private depthOf(entries: readonly WrSidebarEntry[], level = 1): number {\n let deepest = entries.length > 0 ? level : level - 1;\n for (const entry of entries) {\n if (isGroup(entry)) deepest = Math.max(deepest, this.depthOf(entry.children, level + 1));\n }\n return deepest;\n }\n\n private markCut(): void {\n const cuttable = this.host.nativeElement.querySelectorAll<HTMLElement>('.wr-sidebar__title, .wr-sidebar__subtitle');\n for (const el of cuttable) {\n // A pixel of slack: a fractional width rounds the two reads apart. The\n // tooltip is the element's own text, without the hidden comma inside it.\n if (el.scrollWidth > el.clientWidth + 1) {\n el.title = [...el.childNodes]\n .filter(node => node.nodeType === Node.TEXT_NODE)\n .map(node => node.textContent)\n .join('')\n .trim();\n } else {\n el.removeAttribute('title');\n }\n }\n }\n}\n","<!-- A list, not a <nav>: the host already IS the navigation landmark, and two\n nested ones announce the same list twice. -->\n<ul class=\"wr-sidebar__inner\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n</ul>\n\n<ng-template #rows let-list>\n @for (node of asNodes(list); track node.key) {\n <li\n [class.wr-sidebar__group]=\"!!node.children\"\n [class.wr-sidebar__group--collapsed]=\"!!node.children && !node.open\"\n >\n @if (node.children) {\n @if (node.url) {\n <!-- A group that is also a page: two targets, the title a link and the\n arrow a button of its own. -->\n <div class=\"wr-sidebar__split\">\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n <button\n type=\"button\"\n class=\"wr-sidebar__toggle\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-label]=\"subpagesLabel({ title: node.title })\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n </button>\n </div>\n } @else {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-describedby]=\"node.subtitleId\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n }\n <div class=\"wr-sidebar__group-wrap\" [id]=\"node.listId\" [attr.inert]=\"node.open ? null : ''\">\n <div class=\"wr-sidebar__group-body\">\n <ul class=\"wr-sidebar__list\" [class.wr-sidebar__list--under-icon]=\"!!node.icon\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n } @else if (node.url) {\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n } @else {\n <!-- A span, not a greyed anchor: `pointer-events: none` stops a mouse and\n never the keyboard, so a disabled link stayed a tab stop and Enter\n navigated. An empty `url` is the same case. No `aria-describedby`: a\n span is a nameless generic, so its subtitle is read as plain text. -->\n <span [class]=\"node.rowClass\">\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </span>\n }\n </li>\n }\n</ng-template>\n\n<!-- The inside of every row. The accessible name is the title, then the badge,\n then the count, each piece ending in a hidden separator (`sidebar.separator`)\n when another follows; on a link or a button the subtitle is the description,\n and on a disabled row it is read as text. The separator sits INSIDE the piece\n it follows, and inline: a browser puts a space at every block boundary, so a\n comma element of its own was read as \"Guides , 14\". -->\n<ng-template #row let-value>\n @let node = asNode(value);\n @if (node.icon) {\n <wr-icon class=\"wr-sidebar__icon\" [name]=\"node.icon\" />\n }\n <span class=\"wr-sidebar__title\"\n >{{ node.title }}<span class=\"wr-sidebar__comma\">{{ node.titleTail }}</span></span\n >\n @if (node.badge || node.subtitle) {\n <span class=\"wr-sidebar__meta\">\n @if (node.badge; as badge) {\n <small\n class=\"wr-sidebar__badge\"\n [class.wr-sidebar__badge--neutral]=\"badge.tone === 'neutral'\"\n [class.wr-sidebar__badge--primary]=\"badge.tone === 'primary'\"\n [class.wr-sidebar__badge--danger]=\"badge.tone === 'danger'\"\n >{{ badge.text }}<span class=\"wr-sidebar__comma\">{{ node.badgeTail }}</span></small\n >\n }\n @if (node.subtitle) {\n <span\n class=\"wr-sidebar__subtitle\"\n [attr.aria-hidden]=\"node.url || node.children ? 'true' : null\"\n [attr.id]=\"node.subtitleId\"\n >{{ node.subtitle }}</span\n >\n }\n </span>\n }\n @if (node.count !== null || node.holdsActive || (node.children && !node.url)) {\n <span class=\"wr-sidebar__end\">\n @if (node.count !== null) {\n @if (node.countLabel) {\n <small class=\"wr-sidebar__count\" aria-hidden=\"true\">{{ node.count }}</small>\n <span class=\"wr-sidebar__sr\">{{ node.countLabel }}{{ node.countTail }}</span>\n } @else {\n <small class=\"wr-sidebar__count\"\n >{{ node.count }}<span class=\"wr-sidebar__comma\">{{ node.countTail }}</span></small\n >\n }\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__dot\" aria-hidden=\"true\"></span>\n }\n @if (node.children && !node.url) {\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n }\n </span>\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__sr\">{{ containsCurrentLabel() }}</span>\n }\n</ng-template>\n\n<!-- Inline chrome, not user-customisable. Points at the inline end; turns down when open. -->\n<ng-template #chevron>\n <svg\n class=\"wr-sidebar__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;;;;AA0CA,SAAS,QAAQ,OAAqB;CACpC,OAAO,cAAc;AACvB;AAGA,MAAM,YAAY;AAOlB,MAAM,gBAAgB;AAGtB,MAAM,cAAoC;CACxC,OAAO;CACP,aAAa;CACb,cAAc;CACd,UAAU;AACX;AAGD,MAAM,eAAqC;CACzC,OAAO;CACP,aAAa;CACb,cAAc;CACd,UAAU;AACX;AAMD,MAAM,cAA6C;CAAE,OAAO;CAAS,aAAa;AAAQ;AAE1F,SAAS,aAAa,SAA2C;CAC/D,IAAI,CAAC,SAAS,OAAO;CACrB,IAAI,WAAW,SAAS,OAAO,QAAQ,QAAQ,cAAc;CAC7D,OAAO;AACT;AAGA,SAAS,OAAO,OAAgC;CAC9C,OAAO,UAAU,KAAK,OAAQ,SAAS;AACzC;AAGA,SAAS,OAAO,OAAqB;CACnC,IAAI,QAAQ,KAAK,GAAG,OAAO,MAAM,KAAK,SAAS,MAAM,MAAM;CAC3D,OAAO,CAAC,MAAM,YAAY,MAAM,IAAI,SAAS,MAAM,MAAM;AAC3D;AAOA,IAAI,aAAa;AAOjB,SAAS,aAAa,KAAa,OAAa;CAC9C,IAAI,CAAC,IAAI,WAAW,KAAK,GAAG,OAAO;CACnC,MAAM,OAAO,IAAI,MAAM,MAAM,MAAM;CACnC,OAAO,SAAS,MAAM,KAAK,WAAW,GAAG,KAAK,KAAK,WAAW,GAAG,KAAK,KAAK,WAAW,GAAG;AAC3F;AA+EA,IAAa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/B;IAAE,OAAO;IAAc,MAAM;IAAc,qBAAqB;GAAqB;GAAE,SACpF;IAAC;IAAkB;IAAY;GAAM;GAAC,UAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"ngwr-sidebar.mjs","names":[],"sources":["../../../projects/lib/sidebar/sidebar.ts","../../../projects/lib/sidebar/sidebar.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 { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n afterRenderEffect,\n computed,\n effect,\n inject,\n input,\n isDevMode,\n signal,\n untracked,\n} from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport {\n ActivatedRoute,\n type IsActiveMatchOptions,\n NavigationEnd,\n Router,\n RouterLink,\n containsTree,\n} from '@angular/router';\n\nimport { filter, map, startWith } from 'rxjs';\n\nimport { wrParseHotkeySpec } from 'ngwr/hotkey';\nimport { wrReadI18nText, useI18nFormatter, useI18nText } from 'ngwr/i18n';\nimport { WrIcon } from 'ngwr/icon';\nimport { WrKbd } from 'ngwr/keyboard';\nimport { WR_KEYS, wrCheckStyles } from 'ngwr/utils';\n\nimport type {\n WrSidebarAction,\n WrSidebarActiveOptions,\n WrSidebarActiveTone,\n WrSidebarBadgeTone,\n WrSidebarEntry,\n WrSidebarGroup,\n} from './types';\n\nfunction isGroup(entry: WrSidebarEntry): entry is WrSidebarGroup {\n return 'children' in entry;\n}\n\nfunction isAction(entry: WrSidebarEntry): entry is WrSidebarAction {\n return 'action' in entry;\n}\n\n/** The ARIA name of every named key, by the lowercase form a parsed chord holds. */\nconst ARIA_KEYS: ReadonlyMap<string, string> = new Map(\n Object.values(WR_KEYS).map(key => [key.toLowerCase(), key === WR_KEYS.SPACE ? 'Space' : key])\n);\n\n/**\n * `aria-keyshortcuts` for a chord: key names from the ARIA spec, never localised.\n * `mod` is Control off a Mac and Meta on one, and the server cannot tell which\n * it prints for, so a chord that differs between the two lists both.\n */\nfunction ariaKeyShortcuts(chord: string): string {\n const spell = (mac: boolean): string => {\n const parsed = wrParseHotkeySpec(chord, mac);\n const key = ARIA_KEYS.get(parsed.key) ?? (parsed.key.length === 1 ? parsed.key.toUpperCase() : parsed.key);\n const parts = [parsed.ctrl && 'Control', parsed.alt && 'Alt', parsed.shift && 'Shift', parsed.meta && 'Meta', key];\n return parts.filter(Boolean).join('+');\n };\n return [...new Set([spell(false), spell(true)])].join(' ');\n}\n\n/** How deep the design goes. Deeper entries still render, with a dev-mode warning. */\nconst MAX_LEVEL = 3;\n\n/**\n * Joins the titles on a path into the key the open state is stored under. A path\n * rather than a title, so two groups called \"Overview\" in different sections stop\n * opening and closing together; a control character, so no title can forge it.\n */\nconst KEY_SEPARATOR = '\\u001f';\n\n/** `{ exact: true }`, spelled the way `RouterLinkActive` spells it. */\nconst EXACT_MATCH: IsActiveMatchOptions = {\n paths: 'exact',\n queryParams: 'exact',\n matrixParams: 'ignored',\n fragment: 'ignored',\n};\n\n/** `{ exact: false }`, the router's default and this component's. */\nconst SUBSET_MATCH: IsActiveMatchOptions = {\n paths: 'subset',\n queryParams: 'subset',\n matrixParams: 'ignored',\n fragment: 'ignored',\n};\n\n/**\n * A group's own link: the exact path, since the children own the paths below it.\n * A prefix match would mark the group AND its current child as the current page.\n */\nconst GROUP_MATCH: Partial<IsActiveMatchOptions> = { paths: 'exact', queryParams: 'subset' };\n\nfunction matchOptions(options: WrSidebarActiveOptions | undefined): Partial<IsActiveMatchOptions> {\n if (!options) return SUBSET_MATCH;\n if ('exact' in options) return options.exact ? EXACT_MATCH : SUBSET_MATCH;\n return options;\n}\n\n/** A string that says something, or `null`: an empty title part draws nothing. */\nfunction filled(value: string | null | undefined): string | null {\n return value === '' ? null : (value ?? null);\n}\n\n/** The commands an entry links to, or `null` when it renders as text or as a plain toggle. */\nfunction linkOf(entry: WrSidebarEntry): readonly (string | number)[] | null {\n if (isGroup(entry)) return entry.url?.length ? entry.url : null;\n if (isAction(entry)) return null;\n return !entry.disabled && entry.url.length ? entry.url : null;\n}\n\n/**\n * Instance counter for the row ids. Deterministic under prerender, unlike\n * `wrRandomId()`, and unique across sidebars: a title-only id collided between two\n * sidebars on one page, and `aria-controls` then pointed at the wrong body.\n */\nlet sidebarUid = 0;\n\n/**\n * Whether `url` is `route` or something below it. A bare `startsWith` matched a\n * SIBLING whose path merely began the same way, so visiting `/table` expanded the\n * group that owns `/tabs`.\n */\nfunction matchesRoute(url: string, route: string): boolean {\n if (!url.startsWith(route)) return false;\n const rest = url.slice(route.length);\n return rest === '' || rest.startsWith('/') || rest.startsWith('?') || rest.startsWith('#');\n}\n\n/** One rendered row, with everything the template needs already decided. */\ninterface SidebarNode {\n /** The title path: what the open state and `track` key on. */\n readonly key: string;\n /** The group body's id, for `aria-controls`. Unique per sidebar and per position. */\n readonly listId: string;\n /** The subtitle's id, for `aria-describedby`, or `null` with no subtitle. */\n readonly subtitleId: string | null;\n readonly title: string;\n readonly subtitle: string | null;\n readonly icon: string | null;\n readonly badge: { readonly text: string; readonly tone: WrSidebarBadgeTone } | null;\n readonly count: string | null;\n readonly countLabel: string | null;\n /** The hidden separator after the title, the badge and the count, when another piece follows. */\n readonly titleTail: string;\n readonly badgeTail: string;\n readonly countTail: string;\n /** Where the row links to. `null` is plain text for a page, a whole-row toggle for a group. */\n readonly url: readonly (string | number)[] | null;\n /** What an action row runs. `null` on every other row, and on a disabled action. */\n readonly action: (() => void) | null;\n /** An action's chord as `wr-kbd` takes it and as `aria-keyshortcuts` spells it. */\n readonly shortcut: string | null;\n readonly keyShortcuts: string | null;\n readonly children: readonly SidebarNode[] | null;\n readonly open: boolean;\n readonly active: boolean;\n /** A collapsed, visible group with the current page somewhere below it. */\n readonly holdsActive: boolean;\n readonly rowClass: string;\n}\n\n/**\n * Navigation drawn from data: pages, and groups of pages that open and close,\n * three levels deep. Every row can carry a subtitle, a word badge and a count.\n *\n * Each title and subtitle takes one line and ends in an ellipsis when it does\n * not fit; the full text stays the accessible name and becomes a tooltip on the\n * part that was cut, measured after render in the browser. A group is a\n * `<button aria-expanded>` that opens its children, or, when it carries a `url`\n * of its own, a link with a separate arrow button beside it. The current page\n * gets `aria-current=\"page\"`, and a collapsed group holding it shows a dot and\n * says so (`sidebar.containsCurrent`).\n *\n * An entry with an `action` instead of a `url` is a `<button>` that calls it: the\n * row for Search or New, with an optional `shortcut` chord at its end. It is\n * never the current page.\n *\n * Rows are 32px. Under a coarse pointer (a phone, a tablet) they grow to 44px,\n * and the split arrow to 44 by 44, with no input: the size follows the pointer\n * rather than the container, so the same sidebar in a drawer on a laptop keeps\n * its 32px rows. To force either size, set `--wr-sidebar-row-height`,\n * `--wr-sidebar-row-padding-y` and `--wr-sidebar-chevron-size` on `.wr-sidebar`.\n *\n * The current page is painted through four hooks, `--wr-sidebar-row-active-bg`,\n * `-color`, `-icon` and `-indicator` (the bar on the guide and the dot on a\n * collapsed group), primary by default. `activeTone=\"neutral\"` sets all four to\n * the neutral roles.\n *\n * Two slots take any content: `[wrSidebarHeader]` above the rows (a workspace\n * switcher, a search field) and `[wrSidebarFooter]` below them (the signed-in\n * person, a language menu). Both sit inside the navigation landmark and inside\n * the host's padding, `--wr-sidebar-slot-gap` away from the rows. The footer\n * goes to the end of the host, so in a full-height sider it is at the bottom.\n * An unfilled slot takes no room.\n *\n * The host pads its rows by `--wr-sidebar-padding` (`0.5rem`), so a hovered or\n * current row's tint stays off the edge of whatever holds the nav. Where the\n * container already supplies the inset, set the hook to `0` on `.wr-sidebar`,\n * not on the container: the host declares its own default, which shadows an\n * inherited one.\n *\n * @example\n * ```html\n * <wr-sidebar [entries]=\"[\n * { title: 'Dashboard', url: ['/dashboard'] },\n * {\n * title: 'Settings',\n * count: 2,\n * countLabel: '2 pages',\n * children: [\n * { title: 'Profile', url: ['/settings', 'profile'] },\n * { title: 'Billing', url: ['/settings', 'billing'], badge: { text: 'New', tone: 'primary' } }\n * ]\n * }\n * ]\" />\n * ```\n *\n * @example\n * ```html\n * <wr-sidebar [entries]=\"entries\">\n * <button wr-btn wrSidebarHeader block (click)=\"create()\">New page</button>\n * <button wr-btn wrSidebarFooter block outlined (click)=\"signOut()\">Sign out</button>\n * </wr-sidebar>\n * ```\n *\n * @see https://ngwr.dev/reference/components/sidebar\n */\n@Component({\n selector: 'wr-sidebar',\n templateUrl: './sidebar.html',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'wr-sidebar',\n role: 'navigation',\n '[attr.aria-label]': 'resolvedAriaLabel()',\n '[class.wr-sidebar--active-neutral]': \"activeTone() === 'neutral'\",\n },\n imports: [NgTemplateOutlet, RouterLink, WrIcon, WrKbd],\n})\nexport class WrSidebar {\n /**\n * The navigation tree. An entry with `children` is a group, which opens on\n * click and on its own when the current route is below it.\n */\n readonly entries = input<readonly WrSidebarEntry[]>([]);\n\n /**\n * Accessible name for the navigation landmark. Falls back to `sidebar.label`,\n * then `'Sidebar'`: a page with a sidebar AND a table of contents has two\n * navigation landmarks, and an unnamed one is announced as just \"navigation\".\n */\n readonly ariaLabel = input<string | null>(null);\n\n protected readonly resolvedAriaLabel = useI18nText(this.ariaLabel, 'sidebar.label', 'Sidebar');\n\n /** Icon for a group that names none. `null` draws no icon. @default null */\n readonly defaultGroupIcon = input<string | null>(null);\n\n /** Icon for a page that names none. `null` draws no icon. @default null */\n readonly defaultItemIcon = input<string | null>(null);\n\n /**\n * Open every group above the current route, once per navigation: a group the\n * user closes stays closed until the route changes. @default true\n */\n readonly autoExpand = input(true, { transform: coerceBooleanProperty });\n\n /**\n * Close the groups the previous navigation opened when the next one leaves\n * them, so a long nav does not keep every visited section expanded. A group\n * the user opened or closed by hand is never closed for them. Needs\n * `autoExpand`. @default false\n */\n readonly autoCollapse = input(false, { transform: coerceBooleanProperty });\n\n /**\n * How the current page is painted: the primary tint, or with `'neutral'` a\n * grey one that leaves the primary to the page's own actions. Either way the\n * four `--wr-sidebar-row-active-*` hooks take any colour. @default 'primary'\n */\n readonly activeTone = input<WrSidebarActiveTone>('primary');\n\n /** Spoken after a collapsed group that holds the current page. */\n protected readonly containsCurrentLabel = wrReadI18nText('sidebar.containsCurrent', 'contains the current page');\n\n /** The split arrow's name: the group's title is the link beside it. */\n protected readonly subpagesLabel = useI18nFormatter('sidebar.subpages', 'Sub-pages of {{title}}');\n\n /** Joins a row's title, badge and count into one name: `،` in Arabic, `、` in Japanese. */\n protected readonly separator = wrReadI18nText('sidebar.separator', ',');\n\n private readonly opened = signal<ReadonlySet<string>>(new Set());\n\n /** Group keys already seeded from `defaultOpen`, so it seeds once and not again. */\n private readonly seeded = new Set<string>();\n\n private readonly uid = ++sidebarUid;\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute, { optional: true });\n private readonly currentUrl = toSignal(\n this.router.events.pipe(\n filter((e): e is NavigationEnd => e instanceof NavigationEnd),\n map(e => e.urlAfterRedirects),\n startWith(this.router.url)\n ),\n { initialValue: this.router.url }\n );\n\n /**\n * The keys of the entries that are the current page, matched the way\n * `RouterLinkActive` matches: an entry's `activeOptions`, a prefix by default.\n * One computation drives `aria-current`, the bar, the ancestors and the dot,\n * so the four cannot disagree.\n */\n private readonly activeKeys = computed<ReadonlySet<string>>(() => {\n const current = this.router.parseUrl(this.currentUrl());\n const out = new Set<string>();\n const visit = (entries: readonly WrSidebarEntry[], parent: string): void => {\n for (const entry of entries) {\n const key = parent ? `${parent}${KEY_SEPARATOR}${entry.title}` : entry.title;\n const url = linkOf(entry);\n if (url) {\n const tree = this.router.createUrlTree([...url], { relativeTo: this.route });\n // An action has no link, so it never gets here; the check is for the type.\n const options = isGroup(entry) || isAction(entry) ? GROUP_MATCH : matchOptions(entry.activeOptions);\n if (containsTree(current, tree, options)) out.add(key);\n }\n if (isGroup(entry)) visit(entry.children, key);\n }\n };\n visit(this.entries(), '');\n return out;\n });\n\n /** The tree as the template draws it. */\n protected readonly nodes = computed<readonly SidebarNode[]>(() => {\n const opened = this.opened();\n const active = this.activeKeys();\n const groupIcon = this.defaultGroupIcon();\n const itemIcon = this.defaultItemIcon();\n const sep = this.separator();\n\n const build = (\n entries: readonly WrSidebarEntry[],\n level: number,\n parentKey: string,\n parentId: string,\n visible: boolean\n ): { nodes: readonly SidebarNode[]; holds: boolean } => {\n let holds = false;\n const nodes = entries.map((entry, index) => {\n const key = parentKey ? `${parentKey}${KEY_SEPARATOR}${entry.title}` : entry.title;\n const id = `${parentId}-${index}`;\n const group = isGroup(entry);\n const open = group && opened.has(key);\n const sub = group ? build(entry.children, level + 1, key, id, visible && open) : null;\n const isActive = active.has(key);\n const below = sub?.holds ?? false;\n holds ||= isActive || below;\n\n const holdsActive = group && !open && below && visible;\n const ancestor = group && open && below;\n const url = linkOf(entry);\n const action = isAction(entry) && !entry.disabled ? entry.action : null;\n const shortcut = action && isAction(entry) ? filled(entry.shortcut) : null;\n const classes = ['wr-sidebar__row', `wr-sidebar__row--level-${Math.min(level, MAX_LEVEL)}`];\n if (group) classes.push('wr-sidebar__row--group');\n if (isAction(entry)) classes.push('wr-sidebar__row--action');\n if (!group && !url && !action) classes.push('wr-sidebar__row--disabled');\n if (isActive) classes.push('wr-sidebar__row--active');\n if (ancestor) classes.push('wr-sidebar__row--ancestor');\n if (holdsActive) classes.push('wr-sidebar__row--holds-active');\n\n const raw = entry.count ?? null;\n const count = raw === null ? null : String(raw);\n const subtitle = filled(entry.subtitle);\n const badge = entry.badge?.text ? { text: entry.badge.text, tone: entry.badge.tone ?? 'neutral' } : null;\n return {\n key,\n listId: `${id}-list`,\n subtitleId: subtitle === null ? null : `${id}-subtitle`,\n title: entry.title,\n subtitle,\n icon: filled(entry.icon) ?? filled(group ? groupIcon : itemIcon),\n badge,\n count,\n countLabel: count === null ? null : filled(entry.countLabel),\n titleTail: badge || count !== null || holdsActive ? sep : '',\n badgeTail: badge && (count !== null || holdsActive) ? sep : '',\n countTail: count !== null && holdsActive ? sep : '',\n url,\n action,\n shortcut,\n keyShortcuts: shortcut === null ? null : ariaKeyShortcuts(shortcut),\n children: sub?.nodes ?? null,\n open,\n active: isActive,\n holdsActive,\n rowClass: classes.join(' '),\n } satisfies SidebarNode;\n });\n return { nodes, holds };\n };\n\n return build(this.entries(), 1, '', `wr-sidebar-${this.uid}`, true).nodes;\n });\n\n /**\n * Last URL resolved to a set of groups, so a group the user collapsed is not\n * re-opened on the same route. A URL no group holds clears it rather than\n * being recorded: see the effect below.\n */\n private lastAutoUrl: string | null = null;\n\n /** Groups the last navigation opened, which `autoCollapse` may close again. */\n private autoOpened = new Set<string>();\n\n private warnedDepth = false;\n\n constructor() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) wrCheckStyles('sidebar');\n // Seed `defaultOpen` groups, once per group and not once per `entries`\n // emission. Re-seeding meant any later change to the array (a count, a\n // filtered list) re-opened a group the user had deliberately collapsed.\n effect(() => {\n const fresh: string[] = [];\n const visit = (entries: readonly WrSidebarEntry[], parent: string): void => {\n for (const entry of entries) {\n if (!isGroup(entry)) continue;\n const key = parent ? `${parent}${KEY_SEPARATOR}${entry.title}` : entry.title;\n if (entry.defaultOpen && !this.seeded.has(key)) {\n this.seeded.add(key);\n fresh.push(key);\n }\n visit(entry.children, key);\n }\n };\n visit(this.entries(), '');\n if (fresh.length > 0) this.opened.update(prev => new Set([...prev, ...fresh]));\n });\n\n // Open every group above the current URL, and with `autoCollapse` close\n // the ones the previous navigation opened and this one leaves.\n effect(() => {\n if (!this.autoExpand()) return;\n const url = this.currentUrl();\n if (url === this.lastAutoUrl) return;\n const keys = this.groupsAbove(url, this.entries());\n const collapse = this.autoCollapse();\n untracked(() => {\n // Latch AFTER the lookup, never before it. `entries` often arrives from\n // an HTTP call, so the first run matches nothing, and latching first told\n // the re-run that landed with the real nav that this URL was already\n // handled: a deep link stayed collapsed, with the current link out of\n // the tab order. A URL no group holds CLEARS the latch instead, or the\n // way back to a page whose group was closed by hand (Back, an in-page\n // link) found the latch still set and left that group closed.\n this.lastAutoUrl = keys.length === 0 ? null : url;\n\n const opened = this.opened();\n const next = new Set(opened);\n if (collapse) {\n for (const key of this.autoOpened) if (!keys.includes(key)) next.delete(key);\n }\n const fresh = keys.filter(key => !opened.has(key));\n for (const key of fresh) next.add(key);\n this.autoOpened = new Set([...fresh, ...[...this.autoOpened].filter(key => keys.includes(key))]);\n\n if (next.size !== opened.size || [...next].some(key => !opened.has(key))) this.opened.set(next);\n });\n });\n\n if (isDevMode()) {\n effect(() => {\n const depth = this.depthOf(this.entries());\n if (depth <= MAX_LEVEL || this.warnedDepth) return;\n this.warnedDepth = true;\n // eslint-disable-next-line no-console -- dev-mode validation\n console.warn(\n `[NGWR] <wr-sidebar>: an entry sits at level ${depth}. The sidebar is designed for ` +\n `${MAX_LEVEL} levels; deeper rows still render, indented once more per level.`\n );\n });\n }\n\n // A tooltip only where the text is actually cut, and on the cut text itself.\n // A `title` on the row would also become the row's description, so a row\n // named \"Charts, 18 pages\" would read its title a second time.\n afterRenderEffect(() => {\n this.nodes();\n this.markCut();\n });\n\n // The width can change with nothing re-rendering: a drawer opening, a\n // resized window, a web font arriving after first paint.\n const destroyRef = inject(DestroyRef);\n afterNextRender(() => {\n if (typeof ResizeObserver !== 'undefined') {\n const observer = new ResizeObserver(() => this.markCut());\n observer.observe(this.host.nativeElement);\n destroyRef.onDestroy(() => observer.disconnect());\n }\n if ('fonts' in document) void document.fonts.ready.then(() => this.markCut());\n });\n }\n\n protected toggle(key: string): void {\n // Opened or closed by hand, so never closed for the user afterwards.\n this.autoOpened.delete(key);\n this.opened.update(prev => {\n const next = new Set(prev);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n return next;\n });\n }\n\n /** Types the template's recursive context, which `ng-template` leaves as `any`. */\n protected asNodes(value: unknown): readonly SidebarNode[] {\n return value as readonly SidebarNode[];\n }\n\n protected asNode(value: unknown): SidebarNode {\n return value as SidebarNode;\n }\n\n /**\n * A `routerLink` command array as the absolute path it navigates to — resolved\n * against the declaring route, the way `[routerLink]` and `activeKeys` resolve\n * it. Joining the segments by hand read a RELATIVE link (`['settings']`) as\n * `/settings`, so on `/admin/settings` the row lit up as the current page while\n * `autoExpand` left the group above it closed.\n */\n private resolve(link: readonly (string | number)[]): string {\n return this.router.serializeUrl(this.router.createUrlTree([...link], { relativeTo: this.route }));\n }\n\n /** Every group whose subtree links to `url` or above it, by path prefix. */\n private groupsAbove(url: string, entries: readonly WrSidebarEntry[]): string[] {\n const out: string[] = [];\n const visit = (list: readonly WrSidebarEntry[], parent: string): boolean => {\n let hit = false;\n for (const entry of list) {\n const key = parent ? `${parent}${KEY_SEPARATOR}${entry.title}` : entry.title;\n const link = linkOf(entry);\n let self = link !== null && matchesRoute(url, this.resolve(link));\n if (isGroup(entry) && visit(entry.children, key)) {\n out.push(key);\n self = true;\n }\n hit ||= self;\n }\n return hit;\n };\n visit(entries, '');\n return out;\n }\n\n private depthOf(entries: readonly WrSidebarEntry[], level = 1): number {\n let deepest = entries.length > 0 ? level : level - 1;\n for (const entry of entries) {\n if (isGroup(entry)) deepest = Math.max(deepest, this.depthOf(entry.children, level + 1));\n }\n return deepest;\n }\n\n private markCut(): void {\n const cuttable = this.host.nativeElement.querySelectorAll<HTMLElement>('.wr-sidebar__title, .wr-sidebar__subtitle');\n for (const el of cuttable) {\n // A pixel of slack: a fractional width rounds the two reads apart. The\n // tooltip is the element's own text, without the hidden comma inside it.\n if (el.scrollWidth > el.clientWidth + 1) {\n el.title = [...el.childNodes]\n .filter(node => node.nodeType === Node.TEXT_NODE)\n .map(node => node.textContent)\n .join('')\n .trim();\n } else {\n el.removeAttribute('title');\n }\n }\n }\n}\n","<!-- A list, not a <nav>: the host already IS the navigation landmark, and two\n nested ones announce the same list twice. -->\n<!-- Inside the landmark, outside the list: a slot holds anything, not rows.\n Each wrapper is `:empty` until something is projected, and then takes no room. -->\n<div class=\"wr-sidebar__header\">\n <ng-content select=\"[wrSidebarHeader]\" />\n</div>\n\n<ul class=\"wr-sidebar__inner\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: nodes() }\" />\n</ul>\n\n<div class=\"wr-sidebar__footer\">\n <ng-content select=\"[wrSidebarFooter]\" />\n</div>\n\n<ng-template #rows let-list>\n @for (node of asNodes(list); track node.key) {\n <li\n [class.wr-sidebar__group]=\"!!node.children\"\n [class.wr-sidebar__group--collapsed]=\"!!node.children && !node.open\"\n >\n @if (node.children) {\n @if (node.url) {\n <!-- A group that is also a page: two targets, the title a link and the\n arrow a button of its own. -->\n <div class=\"wr-sidebar__split\">\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n <button\n type=\"button\"\n class=\"wr-sidebar__toggle\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-label]=\"subpagesLabel({ title: node.title })\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n </button>\n </div>\n } @else {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-expanded]=\"node.open\"\n [attr.aria-controls]=\"node.listId\"\n [attr.aria-describedby]=\"node.subtitleId\"\n (click)=\"toggle(node.key)\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n }\n <div class=\"wr-sidebar__group-wrap\" [id]=\"node.listId\" [attr.inert]=\"node.open ? null : ''\">\n <div class=\"wr-sidebar__group-body\">\n <ul class=\"wr-sidebar__list\" [class.wr-sidebar__list--under-icon]=\"!!node.icon\">\n <ng-container [ngTemplateOutlet]=\"rows\" [ngTemplateOutletContext]=\"{ $implicit: node.children }\" />\n </ul>\n </div>\n </div>\n } @else if (node.url) {\n <a\n [class]=\"node.rowClass\"\n [routerLink]=\"node.url\"\n [attr.aria-current]=\"node.active ? 'page' : null\"\n [attr.aria-describedby]=\"node.subtitleId\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </a>\n } @else if (node.action; as action) {\n <button\n type=\"button\"\n [class]=\"node.rowClass\"\n [attr.aria-describedby]=\"node.subtitleId\"\n [attr.aria-keyshortcuts]=\"node.keyShortcuts\"\n (click)=\"action()\"\n >\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </button>\n } @else {\n <!-- A span, not a greyed anchor: `pointer-events: none` stops a mouse and\n never the keyboard, so a disabled link stayed a tab stop and Enter\n navigated. An empty `url` is the same case. No `aria-describedby`: a\n span is a nameless generic, so its subtitle is read as plain text. -->\n <span [class]=\"node.rowClass\">\n <ng-container [ngTemplateOutlet]=\"row\" [ngTemplateOutletContext]=\"{ $implicit: node }\" />\n </span>\n }\n </li>\n }\n</ng-template>\n\n<!-- The inside of every row. The accessible name is the title, then the badge,\n then the count, each piece ending in a hidden separator (`sidebar.separator`)\n when another follows; on a link or a button the subtitle is the description,\n and on a disabled row it is read as text. The separator sits INSIDE the piece\n it follows, and inline: a browser puts a space at every block boundary, so a\n comma element of its own was read as \"Guides , 14\". -->\n<ng-template #row let-value>\n @let node = asNode(value);\n @if (node.icon) {\n <wr-icon class=\"wr-sidebar__icon\" [name]=\"node.icon\" />\n }\n <span class=\"wr-sidebar__title\"\n >{{ node.title }}<span class=\"wr-sidebar__comma\">{{ node.titleTail }}</span></span\n >\n @if (node.badge || node.subtitle) {\n <span class=\"wr-sidebar__meta\">\n @if (node.badge; as badge) {\n <small\n class=\"wr-sidebar__badge\"\n [class.wr-sidebar__badge--neutral]=\"badge.tone === 'neutral'\"\n [class.wr-sidebar__badge--primary]=\"badge.tone === 'primary'\"\n [class.wr-sidebar__badge--danger]=\"badge.tone === 'danger'\"\n >{{ badge.text }}<span class=\"wr-sidebar__comma\">{{ node.badgeTail }}</span></small\n >\n }\n @if (node.subtitle) {\n <span\n class=\"wr-sidebar__subtitle\"\n [attr.aria-hidden]=\"node.url || node.children || node.action ? 'true' : null\"\n [attr.id]=\"node.subtitleId\"\n >{{ node.subtitle }}</span\n >\n }\n </span>\n }\n @if (node.count !== null || node.holdsActive || node.shortcut || (node.children && !node.url)) {\n <span class=\"wr-sidebar__end\">\n @if (node.count !== null) {\n @if (node.countLabel) {\n <small class=\"wr-sidebar__count\" aria-hidden=\"true\">{{ node.count }}</small>\n <span class=\"wr-sidebar__sr\">{{ node.countLabel }}{{ node.countTail }}</span>\n } @else {\n <small class=\"wr-sidebar__count\"\n >{{ node.count }}<span class=\"wr-sidebar__comma\">{{ node.countTail }}</span></small\n >\n }\n }\n @if (node.shortcut; as chord) {\n <!-- Out of the name: `aria-keyshortcuts` on the button says it once. -->\n <wr-kbd class=\"wr-sidebar__shortcut\" size=\"sm\" aria-hidden=\"true\" [chord]=\"chord\" />\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__dot\" aria-hidden=\"true\"></span>\n }\n @if (node.children && !node.url) {\n <ng-container [ngTemplateOutlet]=\"chevron\" />\n }\n </span>\n }\n @if (node.holdsActive) {\n <span class=\"wr-sidebar__sr\">{{ containsCurrentLabel() }}</span>\n }\n</ng-template>\n\n<!-- Inline chrome, not user-customisable. Points at the inline end; turns down when open. -->\n<ng-template #chevron>\n <svg\n class=\"wr-sidebar__chevron\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmDA,SAAS,QAAQ,OAAqB;CACpC,OAAO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