ngwr 11.1.0 → 12.0.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/README.md +7 -7
- package/burger/styles/_index.scss +1 -1
- package/button/styles/_index.scss +2 -2
- package/calendar/styles/_index.scss +32 -12
- package/calendar-heatmap/styles/_index.scss +20 -0
- package/carousel/styles/_index.scss +23 -1
- package/cascader/styles/_index.scss +15 -3
- package/checkbox/styles/_index.scss +2 -2
- package/circular-text/styles/_index.scss +11 -0
- package/collapse/styles/_index.scss +2 -2
- package/color-picker/styles/_index.scss +3 -3
- package/command-palette/styles/_index.scss +12 -0
- package/compare/styles/_index.scss +18 -2
- package/context-menu/styles/_index.scss +21 -2
- package/date-picker/styles/_index.scss +5 -5
- package/descriptions/styles/_index.scss +1 -1
- package/drag-drop/styles/_index.scss +28 -1
- package/drawer/styles/_index.scss +37 -0
- package/dropdown/styles/_index.scss +2 -2
- package/event-calendar/styles/_index.scss +67 -10
- package/fesm2022/ngwr-action-sheet-testing.mjs +313 -0
- package/fesm2022/ngwr-action-sheet-testing.mjs.map +1 -0
- package/fesm2022/ngwr-action-sheet.mjs +3 -3
- package/fesm2022/ngwr-affix.mjs +3 -3
- package/fesm2022/ngwr-alert.mjs +3 -3
- package/fesm2022/ngwr-anchor.mjs +3 -3
- package/fesm2022/ngwr-aurora.mjs +3 -3
- package/fesm2022/ngwr-avatar.mjs +3 -3
- package/fesm2022/ngwr-back-top.mjs +3 -3
- package/fesm2022/ngwr-badge.mjs +6 -6
- package/fesm2022/ngwr-bar-chart-testing.mjs +107 -0
- package/fesm2022/ngwr-bar-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-bar-chart.mjs +3 -3
- package/fesm2022/ngwr-blur-text-testing.mjs +203 -0
- package/fesm2022/ngwr-blur-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-blur-text.mjs +18 -4
- package/fesm2022/ngwr-blur-text.mjs.map +1 -1
- package/fesm2022/ngwr-border-glow-testing.mjs +325 -0
- package/fesm2022/ngwr-border-glow-testing.mjs.map +1 -0
- package/fesm2022/ngwr-border-glow.mjs +4 -4
- package/fesm2022/ngwr-border-glow.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +29 -17
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-burger.mjs +3 -3
- package/fesm2022/ngwr-button.mjs +6 -6
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs +95 -0
- package/fesm2022/ngwr-calendar-heatmap-testing.mjs.map +1 -0
- package/fesm2022/ngwr-calendar-heatmap.mjs +17 -5
- package/fesm2022/ngwr-calendar-heatmap.mjs.map +1 -1
- package/fesm2022/ngwr-calendar-testing.mjs +368 -0
- package/fesm2022/ngwr-calendar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-calendar.mjs +228 -10
- package/fesm2022/ngwr-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +10 -10
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-carousel.mjs +124 -24
- package/fesm2022/ngwr-carousel.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +60 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-checkbox.mjs +14 -6
- package/fesm2022/ngwr-checkbox.mjs.map +1 -1
- package/fesm2022/ngwr-circular-text-testing.mjs +230 -0
- package/fesm2022/ngwr-circular-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-circular-text.mjs +4 -4
- package/fesm2022/ngwr-circular-text.mjs.map +1 -1
- package/fesm2022/ngwr-click-spark.mjs +27 -7
- package/fesm2022/ngwr-click-spark.mjs.map +1 -1
- package/fesm2022/ngwr-clipboard.mjs +3 -3
- package/fesm2022/ngwr-collapse.mjs +9 -9
- package/fesm2022/ngwr-color-picker-testing.mjs +452 -0
- package/fesm2022/ngwr-color-picker-testing.mjs.map +1 -0
- package/fesm2022/ngwr-color-picker.mjs +126 -10
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-command-palette.mjs +14 -5
- package/fesm2022/ngwr-command-palette.mjs.map +1 -1
- package/fesm2022/ngwr-compare.mjs +3 -3
- package/fesm2022/ngwr-confetti.mjs +31 -6
- package/fesm2022/ngwr-confetti.mjs.map +1 -1
- package/fesm2022/ngwr-config.mjs +9 -0
- package/fesm2022/ngwr-config.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu-testing.mjs +30 -11
- package/fesm2022/ngwr-context-menu-testing.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +358 -48
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-cookie.mjs +3 -3
- package/fesm2022/ngwr-counter.mjs +25 -9
- package/fesm2022/ngwr-counter.mjs.map +1 -1
- package/fesm2022/{ngwr-date-adapter-fns.mjs → ngwr-date-adapters-fns.mjs} +37 -10
- package/fesm2022/ngwr-date-adapters-fns.mjs.map +1 -0
- package/fesm2022/{ngwr-date-adapter-luxon.mjs → ngwr-date-adapters-luxon.mjs} +5 -5
- package/fesm2022/ngwr-date-adapters-luxon.mjs.map +1 -0
- package/fesm2022/ngwr-date-picker-testing.mjs +21 -85
- package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +119 -37
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/{ngwr-date-adapter.mjs → ngwr-date.mjs} +36 -10
- package/fesm2022/ngwr-date.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text-testing.mjs +261 -0
- package/fesm2022/ngwr-decrypt-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-decrypt-text.mjs +9 -4
- package/fesm2022/ngwr-decrypt-text.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +6 -6
- package/fesm2022/ngwr-descriptions.mjs +6 -6
- package/fesm2022/ngwr-dialog.mjs +73 -18
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-directives.mjs +12 -12
- package/fesm2022/ngwr-divider.mjs +52 -5
- package/fesm2022/ngwr-divider.mjs.map +1 -1
- package/fesm2022/ngwr-donut-chart-testing.mjs +97 -0
- package/fesm2022/ngwr-donut-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-donut-chart.mjs +7 -7
- package/fesm2022/ngwr-donut-chart.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +160 -11
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +156 -64
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +58 -12
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-empty.mjs +3 -3
- package/fesm2022/ngwr-event-calendar-testing.mjs +446 -0
- package/fesm2022/ngwr-event-calendar-testing.mjs.map +1 -0
- package/fesm2022/ngwr-event-calendar.mjs +66 -28
- package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
- package/fesm2022/ngwr-falling-text-testing.mjs +220 -0
- package/fesm2022/ngwr-falling-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-falling-text.mjs +75 -46
- package/fesm2022/ngwr-falling-text.mjs.map +1 -1
- package/fesm2022/ngwr-file-upload.mjs +3 -3
- package/fesm2022/ngwr-form.mjs +32 -15
- package/fesm2022/ngwr-form.mjs.map +1 -1
- package/fesm2022/ngwr-fuzzy-text-testing.mjs +134 -0
- package/fesm2022/ngwr-fuzzy-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-fuzzy-text.mjs +21 -11
- package/fesm2022/ngwr-fuzzy-text.mjs.map +1 -1
- package/fesm2022/ngwr-gauge-testing.mjs +86 -0
- package/fesm2022/ngwr-gauge-testing.mjs.map +1 -0
- package/fesm2022/ngwr-gauge.mjs +3 -3
- package/fesm2022/ngwr-glitch-text-testing.mjs +215 -0
- package/fesm2022/ngwr-glitch-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-glitch-text.mjs +7 -7
- package/fesm2022/ngwr-glitch-text.mjs.map +1 -1
- package/fesm2022/ngwr-gradient-text-testing.mjs +258 -0
- package/fesm2022/ngwr-gradient-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-gradient-text.mjs +4 -4
- package/fesm2022/ngwr-gradient-text.mjs.map +1 -1
- package/fesm2022/ngwr-hotkey.mjs +24 -9
- package/fesm2022/ngwr-hotkey.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +87 -1
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +69 -1
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +26 -15
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +6 -6
- package/fesm2022/ngwr-image-cropper-testing.mjs +200 -0
- package/fesm2022/ngwr-image-cropper-testing.mjs.map +1 -0
- package/fesm2022/ngwr-image-cropper.mjs +156 -11
- package/fesm2022/ngwr-image-cropper.mjs.map +1 -1
- package/fesm2022/ngwr-input-number-testing.mjs +15 -10
- package/fesm2022/ngwr-input-number-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-number.mjs +89 -15
- package/fesm2022/ngwr-input-number.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp-testing.mjs +12 -6
- package/fesm2022/ngwr-input-otp-testing.mjs.map +1 -1
- package/fesm2022/ngwr-input-otp.mjs +24 -5
- package/fesm2022/ngwr-input-otp.mjs.map +1 -1
- package/fesm2022/ngwr-input.mjs +15 -15
- package/fesm2022/ngwr-keyboard.mjs +3 -3
- package/fesm2022/ngwr-knob-testing.mjs +220 -0
- package/fesm2022/ngwr-knob-testing.mjs.map +1 -0
- package/fesm2022/ngwr-knob.mjs +3 -3
- package/fesm2022/ngwr-layout.mjs +15 -15
- package/fesm2022/ngwr-lightbox-testing.mjs +223 -0
- package/fesm2022/ngwr-lightbox-testing.mjs.map +1 -0
- package/fesm2022/ngwr-lightbox.mjs +11 -4
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-line-chart-testing.mjs +119 -0
- package/fesm2022/ngwr-line-chart-testing.mjs.map +1 -0
- package/fesm2022/ngwr-line-chart.mjs +73 -26
- package/fesm2022/ngwr-line-chart.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +7 -7
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-loading-bar.mjs +7 -7
- package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
- package/fesm2022/ngwr-markdown.mjs +66 -8
- package/fesm2022/ngwr-markdown.mjs.map +1 -1
- package/fesm2022/ngwr-marquee-testing.mjs +336 -0
- package/fesm2022/ngwr-marquee-testing.mjs.map +1 -0
- package/fesm2022/ngwr-marquee.mjs +4 -4
- package/fesm2022/ngwr-marquee.mjs.map +1 -1
- package/fesm2022/ngwr-media.mjs +3 -3
- package/fesm2022/ngwr-mention.mjs +108 -13
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-meta.mjs +6 -6
- package/fesm2022/ngwr-meter-group-testing.mjs +100 -0
- package/fesm2022/ngwr-meter-group-testing.mjs.map +1 -0
- package/fesm2022/ngwr-meter-group.mjs +3 -3
- package/fesm2022/ngwr-overlay.mjs +34 -7
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-page-header.mjs +3 -3
- package/fesm2022/ngwr-pagination-testing.mjs +6 -6
- package/fesm2022/ngwr-pagination-testing.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +17 -13
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-pipes.mjs +39 -26
- package/fesm2022/ngwr-pipes.mjs.map +1 -1
- package/fesm2022/ngwr-platform.mjs +9 -9
- package/fesm2022/ngwr-popconfirm.mjs +6 -6
- package/fesm2022/ngwr-popover-testing.mjs +7 -2
- package/fesm2022/ngwr-popover-testing.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +169 -33
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-progress.mjs +3 -3
- package/fesm2022/ngwr-pull-to-refresh.mjs +3 -3
- package/fesm2022/ngwr-qr.mjs +42 -5
- package/fesm2022/ngwr-qr.mjs.map +1 -1
- package/fesm2022/ngwr-radio.mjs +6 -6
- package/fesm2022/ngwr-rating.mjs +3 -3
- package/fesm2022/ngwr-result.mjs +21 -30
- package/fesm2022/ngwr-result.mjs.map +1 -1
- package/fesm2022/ngwr-rotating-text-testing.mjs +220 -0
- package/fesm2022/ngwr-rotating-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-rotating-text.mjs +4 -4
- package/fesm2022/ngwr-rotating-text.mjs.map +1 -1
- package/fesm2022/ngwr-scroll.mjs +3 -3
- package/fesm2022/ngwr-segmented-testing.mjs +14 -1
- package/fesm2022/ngwr-segmented-testing.mjs.map +1 -1
- package/fesm2022/ngwr-segmented.mjs +29 -6
- package/fesm2022/ngwr-segmented.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +227 -43
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-shiny-text-testing.mjs +237 -0
- package/fesm2022/ngwr-shiny-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-shiny-text.mjs +11 -9
- package/fesm2022/ngwr-shiny-text.mjs.map +1 -1
- package/fesm2022/ngwr-sidebar.mjs +31 -16
- package/fesm2022/ngwr-sidebar.mjs.map +1 -1
- package/fesm2022/ngwr-skeleton.mjs +3 -3
- package/fesm2022/ngwr-slider.mjs +143 -14
- package/fesm2022/ngwr-slider.mjs.map +1 -1
- package/fesm2022/ngwr-sparkline-testing.mjs +76 -0
- package/fesm2022/ngwr-sparkline-testing.mjs.map +1 -0
- package/fesm2022/ngwr-sparkline.mjs +3 -3
- package/fesm2022/ngwr-speed-dial-testing.mjs +281 -0
- package/fesm2022/ngwr-speed-dial-testing.mjs.map +1 -0
- package/fesm2022/ngwr-speed-dial.mjs +27 -12
- package/fesm2022/ngwr-speed-dial.mjs.map +1 -1
- package/fesm2022/ngwr-spinner.mjs +3 -3
- package/fesm2022/ngwr-splash-cursor-testing.mjs +89 -0
- package/fesm2022/ngwr-splash-cursor-testing.mjs.map +1 -0
- package/fesm2022/ngwr-splash-cursor.mjs +3 -3
- package/fesm2022/ngwr-split-text-testing.mjs +224 -0
- package/fesm2022/ngwr-split-text-testing.mjs.map +1 -0
- package/fesm2022/ngwr-split-text.mjs +31 -5
- package/fesm2022/ngwr-split-text.mjs.map +1 -1
- package/fesm2022/ngwr-splitter-testing.mjs +245 -0
- package/fesm2022/ngwr-splitter-testing.mjs.map +1 -0
- package/fesm2022/ngwr-splitter.mjs +3 -3
- package/fesm2022/ngwr-spotlight-card-testing.mjs +368 -0
- package/fesm2022/ngwr-spotlight-card-testing.mjs.map +1 -0
- package/fesm2022/ngwr-spotlight-card.mjs +7 -7
- package/fesm2022/ngwr-spotlight-card.mjs.map +1 -1
- package/fesm2022/ngwr-squircle.mjs +6 -6
- package/fesm2022/ngwr-star-border-testing.mjs +172 -0
- package/fesm2022/ngwr-star-border-testing.mjs.map +1 -0
- package/fesm2022/ngwr-star-border.mjs +4 -4
- package/fesm2022/ngwr-star-border.mjs.map +1 -1
- package/fesm2022/ngwr-statistic.mjs +9 -9
- package/fesm2022/ngwr-stepper-testing.mjs +8 -8
- package/fesm2022/ngwr-stepper-testing.mjs.map +1 -1
- package/fesm2022/ngwr-stepper.mjs +33 -8
- package/fesm2022/ngwr-stepper.mjs.map +1 -1
- package/fesm2022/ngwr-storage.mjs +17 -5
- package/fesm2022/ngwr-storage.mjs.map +1 -1
- package/fesm2022/ngwr-switch.mjs +3 -3
- package/fesm2022/ngwr-table.mjs +110 -40
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-tabs-testing.mjs +11 -10
- package/fesm2022/ngwr-tabs-testing.mjs.map +1 -1
- package/fesm2022/ngwr-tabs.mjs +51 -11
- package/fesm2022/ngwr-tabs.mjs.map +1 -1
- package/fesm2022/ngwr-textarea.mjs +3 -3
- package/fesm2022/ngwr-theme.mjs +181 -4
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tilt-card-testing.mjs +190 -0
- package/fesm2022/ngwr-tilt-card-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tilt-card.mjs +26 -8
- package/fesm2022/ngwr-tilt-card.mjs.map +1 -1
- package/fesm2022/ngwr-timeline.mjs +6 -6
- package/fesm2022/ngwr-toast.mjs +44 -15
- package/fesm2022/ngwr-toast.mjs.map +1 -1
- package/fesm2022/ngwr-toolbar.mjs +3 -3
- package/fesm2022/ngwr-tour-testing.mjs +173 -0
- package/fesm2022/ngwr-tour-testing.mjs.map +1 -0
- package/fesm2022/ngwr-tour.mjs +34 -10
- package/fesm2022/ngwr-tour.mjs.map +1 -1
- package/fesm2022/ngwr-transfer.mjs +3 -3
- package/fesm2022/ngwr-tree.mjs +36 -11
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-typewriter-testing.mjs +242 -0
- package/fesm2022/ngwr-typewriter-testing.mjs.map +1 -0
- package/fesm2022/ngwr-typewriter.mjs +13 -5
- package/fesm2022/ngwr-typewriter.mjs.map +1 -1
- package/fesm2022/ngwr-typography.mjs +3 -3
- package/fesm2022/ngwr-utils.mjs +5 -2
- package/fesm2022/ngwr-utils.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-virtual-scroll.mjs +4 -4
- package/fesm2022/ngwr-virtual-scroll.mjs.map +1 -1
- package/fesm2022/ngwr-waves-testing.mjs +128 -0
- package/fesm2022/ngwr-waves-testing.mjs.map +1 -0
- package/fesm2022/ngwr-waves.mjs +4 -4
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/fesm2022/ngwr-window-testing.mjs +361 -0
- package/fesm2022/ngwr-window-testing.mjs.map +1 -0
- package/fesm2022/ngwr-window.mjs +175 -31
- package/fesm2022/ngwr-window.mjs.map +1 -1
- package/file-upload/styles/_index.scss +2 -2
- package/glitch-text/styles/_index.scss +27 -12
- package/i18n/en.json +71 -7
- package/i18n/ru.json +71 -7
- package/image-cropper/styles/_index.scss +19 -0
- package/input/styles/_index.scss +2 -2
- package/input-number/styles/_index.scss +2 -2
- package/input-otp/styles/_index.scss +9 -2
- package/knob/styles/_index.scss +1 -1
- package/lightbox/styles/_index.scss +16 -2
- package/line-chart/styles/_index.scss +28 -14
- package/list/styles/_index.scss +1 -1
- package/llms-full.txt +161 -19
- package/llms.txt +45 -10
- package/markdown/styles/_index.scss +3 -3
- package/mcp/api.js +6 -4
- package/mcp/catalog.js +40 -3
- package/mcp/providers.js +42 -0
- package/mcp/tools.js +22 -30
- package/meter-group/styles/_index.scss +1 -1
- package/overlay/styles/_index.scss +33 -1
- package/package.json +161 -12
- package/pagination/styles/_index.scss +23 -1
- package/popover/styles/_index.scss +16 -7
- package/progress/styles/_index.scss +1 -1
- package/radio/styles/_index.scss +2 -2
- package/rating/styles/_index.scss +1 -1
- package/schematics/collection.json +1 -1
- package/schematics/migrations/v12/index.js +65 -0
- package/schematics/migrations/v7/index.js +12 -1
- package/schematics/migrations/v8/index.js +10 -1
- package/schematics/migrations.json +5 -0
- package/schematics/ng-add/index.js +8 -3
- package/schematics/provider/index.js +80 -13
- package/schematics/use/index.js +9 -129
- package/schematics/use/rule.js +206 -0
- package/schematics/use/symbol-map.json +4 -4
- package/segmented/styles/_index.scss +14 -3
- package/select/styles/_index.scss +14 -2
- package/sidebar/styles/_index.scss +12 -10
- package/skills/ngwr/SKILL.md +117 -0
- package/skills/ngwr/references/catalog.md +212 -0
- package/skills/ngwr/references/setup.md +78 -0
- package/slider/styles/_index.scss +1 -1
- package/speed-dial/styles/_index.scss +1 -1
- package/stepper/styles/_index.scss +12 -3
- package/switch/styles/_index.scss +2 -2
- package/table/styles/_index.scss +61 -12
- package/tabs/styles/_index.scss +1 -1
- package/textarea/styles/_index.scss +1 -1
- package/theme/styles/_colors.scss +142 -56
- package/theme/styles/_dark.scss +46 -3
- package/theme/styles/_focus.scss +28 -5
- package/theme/styles/_mixins.scss +1 -1
- package/theme/styles/_variables.scss +67 -0
- package/transfer/styles/_index.scss +26 -3
- package/tree/styles/_index.scss +29 -6
- package/types/ngwr-action-sheet-testing.d.ts +260 -0
- package/types/ngwr-bar-chart-testing.d.ts +85 -0
- package/types/ngwr-blur-text-testing.d.ts +180 -0
- package/types/ngwr-blur-text.d.ts +20 -4
- package/types/ngwr-border-glow-testing.d.ts +219 -0
- package/types/ngwr-breadcrumbs.d.ts +17 -10
- package/types/ngwr-calendar-heatmap-testing.d.ts +79 -0
- package/types/ngwr-calendar-testing.d.ts +277 -0
- package/types/ngwr-calendar.d.ts +76 -0
- package/types/ngwr-carousel.d.ts +85 -6
- package/types/ngwr-cascader.d.ts +17 -0
- package/types/ngwr-checkbox.d.ts +13 -0
- package/types/ngwr-circular-text-testing.d.ts +196 -0
- package/types/ngwr-click-spark.d.ts +4 -0
- package/types/ngwr-color-picker-testing.d.ts +299 -0
- package/types/ngwr-color-picker.d.ts +34 -2
- package/types/ngwr-confetti.d.ts +8 -0
- package/types/ngwr-config.d.ts +10 -1
- package/types/ngwr-context-menu-testing.d.ts +24 -11
- package/types/ngwr-context-menu.d.ts +71 -1
- package/types/ngwr-counter.d.ts +1 -0
- package/types/{ngwr-date-adapter-fns.d.ts → ngwr-date-adapters-fns.d.ts} +33 -6
- package/types/{ngwr-date-adapter-luxon.d.ts → ngwr-date-adapters-luxon.d.ts} +1 -1
- package/types/ngwr-date-picker-testing.d.ts +17 -72
- package/types/ngwr-date-picker.d.ts +8 -4
- package/types/{ngwr-date-adapter.d.ts → ngwr-date.d.ts} +24 -5
- package/types/ngwr-decrypt-text-testing.d.ts +222 -0
- package/types/ngwr-dialog.d.ts +38 -1
- package/types/ngwr-divider.d.ts +25 -0
- package/types/ngwr-donut-chart-testing.d.ts +83 -0
- package/types/ngwr-donut-chart.d.ts +3 -3
- package/types/ngwr-drag-drop.d.ts +56 -2
- package/types/ngwr-drawer.d.ts +68 -5
- package/types/ngwr-dropdown.d.ts +9 -0
- package/types/ngwr-event-calendar-testing.d.ts +301 -0
- package/types/ngwr-event-calendar.d.ts +17 -8
- package/types/ngwr-falling-text-testing.d.ts +188 -0
- package/types/ngwr-falling-text.d.ts +1 -1
- package/types/ngwr-form.d.ts +12 -2
- package/types/ngwr-fuzzy-text-testing.d.ts +130 -0
- package/types/ngwr-gauge-testing.d.ts +71 -0
- package/types/ngwr-glitch-text-testing.d.ts +201 -0
- package/types/ngwr-gradient-text-testing.d.ts +186 -0
- package/types/ngwr-i18n.d.ts +13 -4
- package/types/ngwr-image-cropper-testing.d.ts +173 -0
- package/types/ngwr-image-cropper.d.ts +71 -5
- package/types/ngwr-input-number-testing.d.ts +15 -10
- package/types/ngwr-input-number.d.ts +44 -5
- package/types/ngwr-input-otp-testing.d.ts +12 -6
- package/types/ngwr-input-otp.d.ts +15 -1
- package/types/ngwr-knob-testing.d.ts +150 -0
- package/types/ngwr-lightbox-testing.d.ts +154 -0
- package/types/ngwr-lightbox.d.ts +6 -0
- package/types/ngwr-line-chart-testing.d.ts +93 -0
- package/types/ngwr-line-chart.d.ts +20 -3
- package/types/ngwr-markdown.d.ts +11 -0
- package/types/ngwr-marquee-testing.d.ts +280 -0
- package/types/ngwr-mention.d.ts +32 -0
- package/types/ngwr-meter-group-testing.d.ts +77 -0
- package/types/ngwr-overlay.d.ts +20 -1
- package/types/ngwr-pagination-testing.d.ts +4 -4
- package/types/ngwr-pipes.d.ts +1 -1
- package/types/ngwr-popover-testing.d.ts +7 -2
- package/types/ngwr-popover.d.ts +1 -0
- package/types/ngwr-result.d.ts +6 -0
- package/types/ngwr-rotating-text-testing.d.ts +191 -0
- package/types/ngwr-segmented-testing.d.ts +9 -0
- package/types/ngwr-segmented.d.ts +21 -1
- package/types/ngwr-select.d.ts +100 -6
- package/types/ngwr-shiny-text-testing.d.ts +165 -0
- package/types/ngwr-shiny-text.d.ts +4 -2
- package/types/ngwr-sidebar.d.ts +14 -5
- package/types/ngwr-slider.d.ts +84 -1
- package/types/ngwr-sparkline-testing.d.ts +69 -0
- package/types/ngwr-speed-dial-testing.d.ts +199 -0
- package/types/ngwr-speed-dial.d.ts +22 -3
- package/types/ngwr-splash-cursor-testing.d.ts +95 -0
- package/types/ngwr-split-text-testing.d.ts +209 -0
- package/types/ngwr-split-text.d.ts +21 -0
- package/types/ngwr-splitter-testing.d.ts +174 -0
- package/types/ngwr-spotlight-card-testing.d.ts +303 -0
- package/types/ngwr-star-border-testing.d.ts +135 -0
- package/types/ngwr-stepper-testing.d.ts +5 -5
- package/types/ngwr-stepper.d.ts +8 -0
- package/types/ngwr-storage.d.ts +1 -0
- package/types/ngwr-table.d.ts +114 -12
- package/types/ngwr-tabs-testing.d.ts +11 -10
- package/types/ngwr-tabs.d.ts +2 -0
- package/types/ngwr-theme.d.ts +82 -1
- package/types/ngwr-tilt-card-testing.d.ts +158 -0
- package/types/ngwr-tilt-card.d.ts +2 -0
- package/types/ngwr-toast.d.ts +14 -5
- package/types/ngwr-tour-testing.d.ts +143 -0
- package/types/ngwr-tour.d.ts +22 -4
- package/types/ngwr-tree.d.ts +12 -4
- package/types/ngwr-typewriter-testing.d.ts +211 -0
- package/types/ngwr-utils.d.ts +5 -2
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-waves-testing.d.ts +121 -0
- package/types/ngwr-window-testing.d.ts +263 -0
- package/types/ngwr-window.d.ts +66 -21
- package/typography/styles/_index.scss +1 -1
- package/window/styles/_index.scss +116 -42
- package/fesm2022/ngwr-date-adapter-fns.mjs.map +0 -1
- package/fesm2022/ngwr-date-adapter-luxon.mjs.map +0 -1
- package/fesm2022/ngwr-date-adapter.mjs.map +0 -1
package/fesm2022/ngwr-table.mjs
CHANGED
|
@@ -32,10 +32,10 @@ class WrTableCell {
|
|
|
32
32
|
/** Column key the template applies to. */
|
|
33
33
|
columnKey = input.required({ ...(ngDevMode ? { debugName: "columnKey" } : /* istanbul ignore next */ {}), alias: 'wrTableCell' });
|
|
34
34
|
template = inject(TemplateRef);
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
36
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableCell, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
36
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.2", type: WrTableCell, isStandalone: true, selector: "[wrTableCell]", inputs: { columnKey: { classPropertyName: "columnKey", publicName: "wrTableCell", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableCell, decorators: [{
|
|
39
39
|
type: Directive,
|
|
40
40
|
args: [{
|
|
41
41
|
selector: '[wrTableCell]',
|
|
@@ -64,10 +64,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
64
64
|
*/
|
|
65
65
|
class WrTableExpand {
|
|
66
66
|
template = inject(TemplateRef);
|
|
67
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
68
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.
|
|
67
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableExpand, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
68
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: WrTableExpand, isStandalone: true, selector: "ng-template[wrTableExpand]", ngImport: i0 });
|
|
69
69
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableExpand, decorators: [{
|
|
71
71
|
type: Directive,
|
|
72
72
|
args: [{
|
|
73
73
|
selector: 'ng-template[wrTableExpand]',
|
|
@@ -93,8 +93,22 @@ class WrTableFilter {
|
|
|
93
93
|
/** Text shown when the search finds nothing. Falls back to `table.noMatches`. */
|
|
94
94
|
noMatchesLabel = input(null, /* @ts-ignore */
|
|
95
95
|
...(ngDevMode ? [{ debugName: "noMatchesLabel" }] : /* istanbul ignore next */ []));
|
|
96
|
+
/**
|
|
97
|
+
* Placeholder AND accessible name of the search box. Falls back to `table.search`.
|
|
98
|
+
*
|
|
99
|
+
* One string for both because the box has no visible label: the placeholder was
|
|
100
|
+
* its only name, so a hard-coded literal left the control unnamed in every other
|
|
101
|
+
* language rather than merely untranslated.
|
|
102
|
+
*/
|
|
103
|
+
searchLabel = input(null, /* @ts-ignore */
|
|
104
|
+
...(ngDevMode ? [{ debugName: "searchLabel" }] : /* istanbul ignore next */ []));
|
|
105
|
+
/** Label of the clear-selection button. Falls back to `table.reset`. */
|
|
106
|
+
resetLabel = input(null, /* @ts-ignore */
|
|
107
|
+
...(ngDevMode ? [{ debugName: "resetLabel" }] : /* istanbul ignore next */ []));
|
|
96
108
|
resolvedFilterLabel = useI18nText(this.filterLabel, 'table.filter', 'Filter column');
|
|
97
109
|
resolvedNoMatchesLabel = useI18nText(this.noMatchesLabel, 'table.noMatches', 'No matches');
|
|
110
|
+
resolvedSearchLabel = useI18nText(this.searchLabel, 'table.search', 'Search');
|
|
111
|
+
resolvedResetLabel = useI18nText(this.resetLabel, 'table.reset', 'Reset');
|
|
98
112
|
items = input.required(/* @ts-ignore */
|
|
99
113
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
100
114
|
/** Fires whenever the selection changes. */
|
|
@@ -150,13 +164,13 @@ class WrTableFilter {
|
|
|
150
164
|
emitSelected() {
|
|
151
165
|
this.selectionChange.emit(this.items().filter(i => i.selected));
|
|
152
166
|
}
|
|
153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.
|
|
167
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableFilter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
168
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrTableFilter, isStandalone: true, selector: "wr-table-filter", inputs: { filterLabel: { classPropertyName: "filterLabel", publicName: "filterLabel", isSignal: true, isRequired: false, transformFunction: null }, noMatchesLabel: { classPropertyName: "noMatchesLabel", publicName: "noMatchesLabel", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: "<button type=\"button\" class=\"wr-table-filter__trigger\" [wrDropdown]=\"menu\" [attr.aria-label]=\"resolvedFilterLabel()\">\n <svg\n class=\"wr-icon__svg\"\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\n d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\"\n />\n </svg>\n @if (selectedCount() > 0) {\n <span class=\"wr-table-filter__count\">{{ selectedCount() }}</span>\n }\n</button>\n\n<wr-dropdown-menu #menu>\n <div class=\"wr-table-filter__panel\">\n <input\n class=\"wr-table-filter__search\"\n type=\"search\"\n [placeholder]=\"resolvedSearchLabel()\"\n [attr.aria-label]=\"resolvedSearchLabel()\"\n [value]=\"query()\"\n (input)=\"onSearchInput($event)\"\n />\n\n <div class=\"wr-table-filter__list\">\n @for (item of visible(); track item.value) {\n <button\n type=\"button\"\n class=\"wr-table-filter__item\"\n [class.wr-table-filter__item--selected]=\"item.selected\"\n (click)=\"onToggle(item)\"\n >\n <span class=\"wr-table-filter__check\">\n <svg\n class=\"wr-icon__svg\"\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=\"M20 6 9 17l-5-5\" />\n </svg>\n </span>\n <span class=\"wr-table-filter__title\">{{ item.title }}</span>\n </button>\n } @empty {\n <div class=\"wr-table-filter__empty\">{{ resolvedNoMatchesLabel() }}</div>\n }\n </div>\n\n @if (selectedCount() > 0) {\n <button type=\"button\" class=\"wr-table-filter__reset\" (click)=\"onReset()\">{{ resolvedResetLabel() }}</button>\n }\n </div>\n</wr-dropdown-menu>\n", dependencies: [{ kind: "directive", type: WrDropdown, selector: "[wrDropdown]", inputs: ["wrDropdown", "trigger", "position", "responsive"], outputs: ["opened", "closed"] }, { kind: "component", type: WrDropdownMenu, selector: "wr-dropdown-menu", exportAs: ["wrDropdownMenu"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
155
169
|
}
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableFilter, decorators: [{
|
|
157
171
|
type: Component,
|
|
158
|
-
args: [{ selector: 'wr-table-filter', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, imports: [WrDropdown, WrDropdownMenu], template: "<button type=\"button\" class=\"wr-table-filter__trigger\" [wrDropdown]=\"menu\" [attr.aria-label]=\"resolvedFilterLabel()\">\n <svg\n class=\"wr-icon__svg\"\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\n d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\"\n />\n </svg>\n @if (selectedCount() > 0) {\n <span class=\"wr-table-filter__count\">{{ selectedCount() }}</span>\n }\n</button>\n\n<wr-dropdown-menu #menu>\n <div class=\"wr-table-filter__panel\">\n <input\n class=\"wr-table-filter__search\"\n type=\"search\"\n placeholder=\"
|
|
159
|
-
}], propDecorators: { filterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLabel", required: false }] }], noMatchesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noMatchesLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }] } });
|
|
172
|
+
args: [{ selector: 'wr-table-filter', encapsulation: ViewEncapsulation.None, host: { '[class]': 'classes()' }, imports: [WrDropdown, WrDropdownMenu], template: "<button type=\"button\" class=\"wr-table-filter__trigger\" [wrDropdown]=\"menu\" [attr.aria-label]=\"resolvedFilterLabel()\">\n <svg\n class=\"wr-icon__svg\"\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\n d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\"\n />\n </svg>\n @if (selectedCount() > 0) {\n <span class=\"wr-table-filter__count\">{{ selectedCount() }}</span>\n }\n</button>\n\n<wr-dropdown-menu #menu>\n <div class=\"wr-table-filter__panel\">\n <input\n class=\"wr-table-filter__search\"\n type=\"search\"\n [placeholder]=\"resolvedSearchLabel()\"\n [attr.aria-label]=\"resolvedSearchLabel()\"\n [value]=\"query()\"\n (input)=\"onSearchInput($event)\"\n />\n\n <div class=\"wr-table-filter__list\">\n @for (item of visible(); track item.value) {\n <button\n type=\"button\"\n class=\"wr-table-filter__item\"\n [class.wr-table-filter__item--selected]=\"item.selected\"\n (click)=\"onToggle(item)\"\n >\n <span class=\"wr-table-filter__check\">\n <svg\n class=\"wr-icon__svg\"\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=\"M20 6 9 17l-5-5\" />\n </svg>\n </span>\n <span class=\"wr-table-filter__title\">{{ item.title }}</span>\n </button>\n } @empty {\n <div class=\"wr-table-filter__empty\">{{ resolvedNoMatchesLabel() }}</div>\n }\n </div>\n\n @if (selectedCount() > 0) {\n <button type=\"button\" class=\"wr-table-filter__reset\" (click)=\"onReset()\">{{ resolvedResetLabel() }}</button>\n }\n </div>\n</wr-dropdown-menu>\n" }]
|
|
173
|
+
}], propDecorators: { filterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLabel", required: false }] }], noMatchesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noMatchesLabel", required: false }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: false }] }], resetLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetLabel", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }] } });
|
|
160
174
|
|
|
161
175
|
/**
|
|
162
176
|
* @license
|
|
@@ -182,10 +196,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
182
196
|
*/
|
|
183
197
|
class WrTableGroupHeader {
|
|
184
198
|
template = inject(TemplateRef);
|
|
185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
186
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.
|
|
199
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableGroupHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
200
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: WrTableGroupHeader, isStandalone: true, selector: "ng-template[wrTableGroupHeader]", ngImport: i0 });
|
|
187
201
|
}
|
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
202
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableGroupHeader, decorators: [{
|
|
189
203
|
type: Directive,
|
|
190
204
|
args: [{ selector: 'ng-template[wrTableGroupHeader]' }]
|
|
191
205
|
}] });
|
|
@@ -213,10 +227,10 @@ class WrTableSort {
|
|
|
213
227
|
return parts.join(' ');
|
|
214
228
|
}, /* @ts-ignore */
|
|
215
229
|
...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
|
|
216
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
217
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.
|
|
230
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableSort, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
231
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.2", type: WrTableSort, isStandalone: true, selector: "wr-table-sort", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()" } }, ngImport: i0, template: '<svg class="wr-icon__svg wr-table-sort__icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 7-7 7 7"/><path d="M12 19V5"/></svg>', isInline: true, encapsulation: i0.ViewEncapsulation.None });
|
|
218
232
|
}
|
|
219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTableSort, decorators: [{
|
|
220
234
|
type: Component,
|
|
221
235
|
args: [{
|
|
222
236
|
selector: 'wr-table-sort',
|
|
@@ -265,9 +279,24 @@ class WrTable {
|
|
|
265
279
|
/** Column definitions, keyed by row property name. */
|
|
266
280
|
columns = input.required(/* @ts-ignore */
|
|
267
281
|
...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
268
|
-
/**
|
|
282
|
+
/**
|
|
283
|
+
* Row items. `null`/`undefined` renders the empty state; use `[loading]` for
|
|
284
|
+
* the spinner.
|
|
285
|
+
*
|
|
286
|
+
* Typed `WrTableRow` (= `object`) rather than `Record<string, unknown>`, so an
|
|
287
|
+
* array of an `interface` binds as readily as an array of a `type` — see
|
|
288
|
+
* {@link WrTableRow} for why those two are not the same to TypeScript.
|
|
289
|
+
*/
|
|
269
290
|
items = input(null, /* @ts-ignore */
|
|
270
291
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
292
|
+
/**
|
|
293
|
+
* The rows as records, for everything downstream that reads a cell by key.
|
|
294
|
+
*
|
|
295
|
+
* One cast at the boundary: the INPUT is wide so any object shape binds, while
|
|
296
|
+
* the body keeps indexing rows the way it always has.
|
|
297
|
+
*/
|
|
298
|
+
rows = computed(() => this.items(), /* @ts-ignore */
|
|
299
|
+
...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
|
|
271
300
|
/** Show the loading spinner overlay. @default false */
|
|
272
301
|
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: coerceBooleanProperty });
|
|
273
302
|
/**
|
|
@@ -338,6 +367,14 @@ class WrTable {
|
|
|
338
367
|
*
|
|
339
368
|
* `pageSize` pages the ROOTS; a root brings its open descendants with it.
|
|
340
369
|
*
|
|
370
|
+
* The function form RETURNS `WrTableRow`s, matching `[items]`: a return is
|
|
371
|
+
* covariant, so an array of `interface`-typed children satisfies it. Declared
|
|
372
|
+
* as records it did not, and a forest that bound to `[items]` could not hand
|
|
373
|
+
* its children back out. The PARAMETER stays `Record<string, unknown>` — that
|
|
374
|
+
* side is contravariant, and widening it would reject the callbacks that
|
|
375
|
+
* compile today while leaving `row['reports']` unindexable. See
|
|
376
|
+
* {@link WrTableRow}.
|
|
377
|
+
*
|
|
341
378
|
* @example
|
|
342
379
|
* ```html
|
|
343
380
|
* <wr-table
|
|
@@ -404,7 +441,17 @@ class WrTable {
|
|
|
404
441
|
/** Accessible name of a group band's collapse toggle. Falls back to `table.toggleGroup`. */
|
|
405
442
|
toggleGroupLabel = input(null, /* @ts-ignore */
|
|
406
443
|
...(ngDevMode ? [{ debugName: "toggleGroupLabel" }] : /* istanbul ignore next */ []));
|
|
444
|
+
/** Accessible name of the loading overlay. Falls back to `table.loading`. */
|
|
445
|
+
loadingLabel = input(null, /* @ts-ignore */
|
|
446
|
+
...(ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []));
|
|
407
447
|
resolvedEmptyLabel = useI18nText(this.emptyLabel, 'table.empty', 'No data');
|
|
448
|
+
/**
|
|
449
|
+
* The loading overlay was a bare spinner in a `<div>` — a busy state with no
|
|
450
|
+
* accessible name, which a screen reader reports as nothing at all while the
|
|
451
|
+
* table sits empty. `table.loading` shipped in both catalogs for it and was
|
|
452
|
+
* never read.
|
|
453
|
+
*/
|
|
454
|
+
resolvedLoadingLabel = useI18nText(this.loadingLabel, 'table.loading', 'Loading…');
|
|
408
455
|
resolvedSortLabel = useI18nText(this.sortLabel, 'table.sort', 'Sort column');
|
|
409
456
|
resolvedSelectAllLabel = useI18nText(this.selectAllLabel, 'table.selectAll', 'Select all rows');
|
|
410
457
|
resolvedSelectRowLabel = useI18nText(this.selectRowLabel, 'table.selectRow', 'Select row');
|
|
@@ -471,24 +518,28 @@ class WrTable {
|
|
|
471
518
|
const server = this.totalItems();
|
|
472
519
|
if (server !== null)
|
|
473
520
|
return server;
|
|
474
|
-
return this.
|
|
521
|
+
return this.rows()?.length ?? 0;
|
|
475
522
|
}, /* @ts-ignore */
|
|
476
523
|
...(ngDevMode ? [{ debugName: "resolvedTotal" }] : /* istanbul ignore next */ []));
|
|
477
524
|
/** Items visible on the current page (client mode slices; server mode passes through). */
|
|
478
525
|
visibleItems = computed(() => {
|
|
479
|
-
const items = this.
|
|
526
|
+
const items = this.rows();
|
|
480
527
|
if (!items)
|
|
481
528
|
return items;
|
|
482
529
|
const size = this.pageSize();
|
|
483
530
|
if (size <= 0 || this.totalItems() !== null)
|
|
484
531
|
return items;
|
|
485
|
-
// Clamped, because `page` is a model the host owns
|
|
486
|
-
// under it — a filter or a delete
|
|
487
|
-
//
|
|
488
|
-
//
|
|
489
|
-
//
|
|
532
|
+
// Clamped at BOTH ends, because `page` is a model the host owns (a `model()`
|
|
533
|
+
// takes no transform) and the data can shrink under it — a filter or a delete
|
|
534
|
+
// used to leave the table showing an empty slice with no way back except
|
|
535
|
+
// paging by hand. The pager clamps its own number downwards only, and it is
|
|
536
|
+
// not even rendered once the data drops below one page. Below 1 the offset
|
|
537
|
+
// goes negative, and `Array.slice` reads a negative start from the END: page
|
|
538
|
+
// 0 emptied the table and page -1 rendered a window counted from the back,
|
|
539
|
+
// with the pager highlighting nothing. `|| 1` folds `0` and `NaN` in.
|
|
490
540
|
const lastPage = Math.max(1, Math.ceil(items.length / size));
|
|
491
|
-
const
|
|
541
|
+
const page = Math.min(Math.max(1, this.page() || 1), lastPage);
|
|
542
|
+
const start = (page - 1) * size;
|
|
492
543
|
return items.slice(start, start + size);
|
|
493
544
|
}, /* @ts-ignore */
|
|
494
545
|
...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
|
|
@@ -675,11 +726,19 @@ class WrTable {
|
|
|
675
726
|
}
|
|
676
727
|
this.pins.set({ left, right, leftEdge, rightEdge });
|
|
677
728
|
}
|
|
678
|
-
/**
|
|
729
|
+
/**
|
|
730
|
+
* Sticky `inset-inline-start` offset (px) for a `pin: 'left'` column, else `null`.
|
|
731
|
+
*
|
|
732
|
+
* The input keeps its physical name — it is public API — but the offset it
|
|
733
|
+
* produces is LOGICAL. `measurePins()` accumulates in DOM order, which is
|
|
734
|
+
* start-to-end semantics, and under `dir="rtl"` the column order mirrors: a
|
|
735
|
+
* `pin: 'left'` column then sits at the physical right, where a `left: 0`
|
|
736
|
+
* sticky inset can never catch it and the column just scrolls away.
|
|
737
|
+
*/
|
|
679
738
|
leftPin(key) {
|
|
680
739
|
return this.pins().left.get(key) ?? null;
|
|
681
740
|
}
|
|
682
|
-
/** Sticky `
|
|
741
|
+
/** Sticky `inset-inline-end` offset (px) for a `pin: 'right'` column, else `null`. See {@link leftPin}. */
|
|
683
742
|
rightPin(key) {
|
|
684
743
|
return this.pins().right.get(key) ?? null;
|
|
685
744
|
}
|
|
@@ -1013,7 +1072,7 @@ class WrTable {
|
|
|
1013
1072
|
walk(children, new Set(seen).add(key));
|
|
1014
1073
|
}
|
|
1015
1074
|
};
|
|
1016
|
-
walk(this.
|
|
1075
|
+
walk(this.rows() ?? [], new Set());
|
|
1017
1076
|
return out;
|
|
1018
1077
|
}
|
|
1019
1078
|
/** Open / close one parent row. */
|
|
@@ -1104,9 +1163,9 @@ class WrTable {
|
|
|
1104
1163
|
/**
|
|
1105
1164
|
* The flat `<tbody>` render list. Ungrouped it is exactly today's rows in
|
|
1106
1165
|
* order (the rendered elements are unchanged; only the `@for` track identity
|
|
1107
|
-
* moves to a stable id). Returns `[]` for
|
|
1108
|
-
*
|
|
1109
|
-
*
|
|
1166
|
+
* moves to a stable id). Returns `[]` for nullish rows, and reads nothing about
|
|
1167
|
+
* `loading()` — suppressing the "no data" row under the spinner is the
|
|
1168
|
+
* template's job, not this one's.
|
|
1110
1169
|
*/
|
|
1111
1170
|
renderRows = computed(() => {
|
|
1112
1171
|
const rows = this.visibleItems();
|
|
@@ -1269,7 +1328,7 @@ class WrTable {
|
|
|
1269
1328
|
* instead of silently reporting roots only.
|
|
1270
1329
|
*/
|
|
1271
1330
|
datasetRows() {
|
|
1272
|
-
return this.treeMode() ? this.allTreeRows() : (this.
|
|
1331
|
+
return this.treeMode() ? this.allTreeRows() : (this.rows() ?? []);
|
|
1273
1332
|
}
|
|
1274
1333
|
selectedRows() {
|
|
1275
1334
|
const keys = new Set(this.selection());
|
|
@@ -1292,10 +1351,17 @@ class WrTable {
|
|
|
1292
1351
|
return sum;
|
|
1293
1352
|
case 'avg':
|
|
1294
1353
|
return Math.round((sum / nums.length) * 100) / 100;
|
|
1354
|
+
// Reduced rather than spread: a summary aggregates the WHOLE dataset (or a
|
|
1355
|
+
// whole group bucket), not the page, and `Math.min(...nums)` throws
|
|
1356
|
+
// `RangeError: Maximum call stack size exceeded` past ~125k arguments — out
|
|
1357
|
+
// of a `computed()` during change detection, which stops the table
|
|
1358
|
+
// rendering. `nums` is non-empty and finite by here, so a seedless reduce is
|
|
1359
|
+
// safe, and it agrees with `Math.min`/`Math.max` on everything a summary
|
|
1360
|
+
// renders (they differ only on the sign of a zero tie).
|
|
1295
1361
|
case 'min':
|
|
1296
|
-
return
|
|
1362
|
+
return nums.reduce((a, b) => (b < a ? b : a));
|
|
1297
1363
|
case 'max':
|
|
1298
|
-
return
|
|
1364
|
+
return nums.reduce((a, b) => (b > a ? b : a));
|
|
1299
1365
|
default:
|
|
1300
1366
|
return '';
|
|
1301
1367
|
}
|
|
@@ -1334,17 +1400,21 @@ class WrTable {
|
|
|
1334
1400
|
templateFor(key) {
|
|
1335
1401
|
return this.cellMap().get(String(key));
|
|
1336
1402
|
}
|
|
1337
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
1338
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: WrTable, isStandalone: true, selector: "wr-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, childrenKey: { classPropertyName: "childrenKey", publicName: "childrenKey", isSignal: true, isRequired: false, transformFunction: null }, treeColumn: { classPropertyName: "treeColumn", publicName: "treeColumn", isSignal: true, isRequired: false, transformFunction: null }, toggleRowLabel: { classPropertyName: "toggleRowLabel", publicName: "toggleRowLabel", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroups: { classPropertyName: "collapsedGroups", publicName: "collapsedGroups", isSignal: true, isRequired: false, transformFunction: null }, groupSummary: { classPropertyName: "groupSummary", publicName: "groupSummary", isSignal: true, isRequired: false, transformFunction: null }, showGroupCount: { classPropertyName: "showGroupCount", publicName: "showGroupCount", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null }, sortLabel: { classPropertyName: "sortLabel", publicName: "sortLabel", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, selectRowLabel: { classPropertyName: "selectRowLabel", publicName: "selectRowLabel", isSignal: true, isRequired: false, transformFunction: null }, expandRowLabel: { classPropertyName: "expandRowLabel", publicName: "expandRowLabel", isSignal: true, isRequired: false, transformFunction: null }, selectGroupLabel: { classPropertyName: "selectGroupLabel", publicName: "selectGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, toggleGroupLabel: { classPropertyName: "toggleGroupLabel", publicName: "toggleGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnOrder: "columnOrderChange", selection: "selectionChange", expanded: "expandedChange", collapsedGroups: "collapsedGroupsChange", sort: "sortChange", filterChange: "filterChange", page: "pageChange" }, host: { properties: { "class.wr-table--responsive": "responsive()", "class.wr-table--virtual": "virtualized()" }, classAttribute: "wr-table" }, queries: [{ propertyName: "cellTemplates", predicate: WrTableCell, isSignal: true }, { propertyName: "expandTpl", first: true, predicate: WrTableExpand, descendants: true, isSignal: true }, { propertyName: "groupTpl", first: true, predicate: WrTableGroupHeader, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerCells", predicate: ["thCell"], descendants: true, isSignal: true }, { propertyName: "scrollEl", first: true, predicate: ["scroll"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\n <div class=\"wr-table__loading\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 0 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n [attr.role]=\"treeMode() ? 'treegrid' : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of displayColumns(); track col.key) {\n <col [style.width.px]=\"colWidth(col.key)\" />\n }\n </colgroup>\n <thead>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n size=\"sm\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (checkedChange)=\"toggleAll($event)\"\n [ariaLabel]=\"resolvedSelectAllLabel()\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n @for (col of displayColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [cdkDragDisabled]=\"!reorderable() || !!col.column.pin\"\n class=\"wr-table__th\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.column.pin\"\n [class.wr-table__th--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__th--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__th--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__th--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button\n type=\"button\"\n class=\"wr-table__sort-btn\"\n [attr.aria-label]=\"resolvedSortLabel()\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [checked]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (checkedChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabel]=\"resolvedSelectGroupLabel()\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-label]=\"resolvedToggleGroupLabel()\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\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 </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\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 <span class=\"wr-table__group-label\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [class.wr-table__tr--child]=\"entry.depth > 0\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n [attr.aria-level]=\"treeMode() ? entry.depth + 1 : null\"\n [attr.aria-posinset]=\"treeMode() ? entry.posinset : null\"\n [attr.aria-setsize]=\"treeMode() ? entry.setsize : null\"\n [attr.aria-expanded]=\"entry.open\"\n [style.--wr-table-depth]=\"treeMode() ? entry.depth : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [checked]=\"isRowSelected(entry.row)\"\n (checkedChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabel]=\"resolvedSelectRowLabel()\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n [attr.aria-label]=\"resolvedExpandRowLabel()\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\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 </button>\n </td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__td\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\n >\n @if (treeMode() && col.key === treeColumnKey()) {\n <span class=\"wr-table__tree-lead\">\n @if (entry.parent) {\n <button\n type=\"button\"\n class=\"wr-table__tree-toggle\"\n [class.wr-table__tree-toggle--open]=\"entry.open\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-label]=\"resolvedToggleRowLabel()\"\n (click)=\"toggleTreeRow(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__tree-icon\"\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 </button>\n } @else {\n <span class=\"wr-table__tree-toggle wr-table__tree-toggle--leaf\" aria-hidden=\"true\"></span>\n }\n </span>\n }\n @if (templateFor(col.key); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"cellContext(entry.row, col.key, col.column)\"\n />\n } @else {\n {{ getValue(entry.row, col.key) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n } @empty {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: WrCheckbox, selector: "wr-checkbox", inputs: ["id", "checkboxValue", "ariaLabel", "checked", "disabled", "size", "icon", "indeterminate"], outputs: ["checkedChange", "touch"] }, { kind: "component", type: WrPagination, selector: "wr-pagination", inputs: ["currentPage", "pageSize", "total", "pageSizeOptions", "showSizeChanger", "showTotal", "align", "size", "shape", "disabled", "responsive", "ofLabel", "prevLabel", "nextLabel", "itemsPerPageLabel", "label"], outputs: ["currentPageChange", "pageSizeChange"] }, { kind: "component", type: WrSpinner, selector: "wr-spinner", inputs: ["size", "ariaLabel"] }, { kind: "component", type: WrTableSort, selector: "wr-table-sort", inputs: ["direction"] }, { kind: "component", type: WrTableFilter, selector: "wr-table-filter", inputs: ["filterLabel", "noMatchesLabel", "items"], outputs: ["selectionChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1403
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1404
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: WrTable, isStandalone: true, selector: "wr-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, childrenKey: { classPropertyName: "childrenKey", publicName: "childrenKey", isSignal: true, isRequired: false, transformFunction: null }, treeColumn: { classPropertyName: "treeColumn", publicName: "treeColumn", isSignal: true, isRequired: false, transformFunction: null }, toggleRowLabel: { classPropertyName: "toggleRowLabel", publicName: "toggleRowLabel", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroups: { classPropertyName: "collapsedGroups", publicName: "collapsedGroups", isSignal: true, isRequired: false, transformFunction: null }, groupSummary: { classPropertyName: "groupSummary", publicName: "groupSummary", isSignal: true, isRequired: false, transformFunction: null }, showGroupCount: { classPropertyName: "showGroupCount", publicName: "showGroupCount", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, emptyLabel: { classPropertyName: "emptyLabel", publicName: "emptyLabel", isSignal: true, isRequired: false, transformFunction: null }, sortLabel: { classPropertyName: "sortLabel", publicName: "sortLabel", isSignal: true, isRequired: false, transformFunction: null }, selectAllLabel: { classPropertyName: "selectAllLabel", publicName: "selectAllLabel", isSignal: true, isRequired: false, transformFunction: null }, selectRowLabel: { classPropertyName: "selectRowLabel", publicName: "selectRowLabel", isSignal: true, isRequired: false, transformFunction: null }, expandRowLabel: { classPropertyName: "expandRowLabel", publicName: "expandRowLabel", isSignal: true, isRequired: false, transformFunction: null }, selectGroupLabel: { classPropertyName: "selectGroupLabel", publicName: "selectGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, toggleGroupLabel: { classPropertyName: "toggleGroupLabel", publicName: "toggleGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnOrder: "columnOrderChange", selection: "selectionChange", expanded: "expandedChange", collapsedGroups: "collapsedGroupsChange", sort: "sortChange", filterChange: "filterChange", page: "pageChange" }, host: { properties: { "class.wr-table--responsive": "responsive()", "class.wr-table--virtual": "virtualized()", "attr.aria-busy": "loading() ? true : null" }, classAttribute: "wr-table" }, queries: [{ propertyName: "cellTemplates", predicate: WrTableCell, isSignal: true }, { propertyName: "expandTpl", first: true, predicate: WrTableExpand, descendants: true, isSignal: true }, { propertyName: "groupTpl", first: true, predicate: WrTableGroupHeader, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerCells", predicate: ["thCell"], descendants: true, isSignal: true }, { propertyName: "scrollEl", first: true, predicate: ["scroll"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\n <div class=\"wr-table__loading\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 0 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n [attr.role]=\"treeMode() ? 'treegrid' : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of displayColumns(); track col.key) {\n <col [style.width.px]=\"colWidth(col.key)\" />\n }\n </colgroup>\n <thead>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <!-- Disabled with nothing to sweep, the way `wr-transfer` guards its\n own select-all. `[checked]` is a one-way binding over a checkbox\n that owns its state, and on zero rows `allSelected()` answers\n `false` before and after the click \u2014 an unchanged input is never\n written back, so the box latched CHECKED over an empty table and\n stayed that way when rows returned. -->\n <wr-checkbox\n size=\"sm\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"pageRowKeys().length === 0\"\n (checkedChange)=\"toggleAll($event)\"\n [ariaLabel]=\"resolvedSelectAllLabel()\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n @for (col of displayColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [cdkDragDisabled]=\"!reorderable() || !!col.column.pin\"\n class=\"wr-table__th\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.column.pin\"\n [class.wr-table__th--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__th--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__th--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__th--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button\n type=\"button\"\n class=\"wr-table__sort-btn\"\n [attr.aria-label]=\"resolvedSortLabel()\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [checked]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (checkedChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabel]=\"resolvedSelectGroupLabel()\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-label]=\"resolvedToggleGroupLabel()\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\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 </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\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 <span class=\"wr-table__group-label\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [class.wr-table__tr--child]=\"entry.depth > 0\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n [attr.aria-level]=\"treeMode() ? entry.depth + 1 : null\"\n [attr.aria-posinset]=\"treeMode() ? entry.posinset : null\"\n [attr.aria-setsize]=\"treeMode() ? entry.setsize : null\"\n [attr.aria-expanded]=\"entry.open\"\n [style.--wr-table-depth]=\"treeMode() ? entry.depth : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [checked]=\"isRowSelected(entry.row)\"\n (checkedChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabel]=\"resolvedSelectRowLabel()\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n [attr.aria-label]=\"resolvedExpandRowLabel()\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\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 </button>\n </td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__td\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\n >\n @if (treeMode() && col.key === treeColumnKey()) {\n <span class=\"wr-table__tree-lead\">\n @if (entry.parent) {\n <button\n type=\"button\"\n class=\"wr-table__tree-toggle\"\n [class.wr-table__tree-toggle--open]=\"entry.open\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-label]=\"resolvedToggleRowLabel()\"\n (click)=\"toggleTreeRow(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__tree-icon\"\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 </button>\n } @else {\n <span class=\"wr-table__tree-toggle wr-table__tree-toggle--leaf\" aria-hidden=\"true\"></span>\n }\n </span>\n }\n @if (templateFor(col.key); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"cellContext(entry.row, col.key, col.column)\"\n />\n } @else {\n {{ getValue(entry.row, col.key) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n <!-- Sibling of the row loop rather than its `@empty` branch, and gated on\n `loading()`. As the `@empty` branch it lived INSIDE `@if (visibleItems())`,\n which passes a nullish `[items]` straight through \u2014 so the input's own\n default rendered a header over a blank body with no \"No data\" anywhere,\n the opposite of what `items`'s docs promise. And the veil is translucent,\n so on the documented `[items]=\"[]\" [loading]=\"true\"` pair the row read\n \"No data\" through the spinner. -->\n @if (!loading() && !renderRows().length) {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: WrCheckbox, selector: "wr-checkbox", inputs: ["id", "checkboxValue", "ariaLabel", "checked", "disabled", "size", "icon", "indeterminate"], outputs: ["checkedChange", "touch"] }, { kind: "component", type: WrPagination, selector: "wr-pagination", inputs: ["currentPage", "pageSize", "total", "pageSizeOptions", "showSizeChanger", "showTotal", "align", "size", "shape", "disabled", "responsive", "ofLabel", "prevLabel", "nextLabel", "itemsPerPageLabel", "label"], outputs: ["currentPageChange", "pageSizeChange"] }, { kind: "component", type: WrSpinner, selector: "wr-spinner", inputs: ["size", "ariaLabel"] }, { kind: "component", type: WrTableSort, selector: "wr-table-sort", inputs: ["direction"] }, { kind: "component", type: WrTableFilter, selector: "wr-table-filter", inputs: ["filterLabel", "noMatchesLabel", "searchLabel", "resetLabel", "items"], outputs: ["selectionChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1339
1405
|
}
|
|
1340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
1406
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: WrTable, decorators: [{
|
|
1341
1407
|
type: Component,
|
|
1342
1408
|
args: [{ selector: 'wr-table', encapsulation: ViewEncapsulation.None, host: {
|
|
1343
1409
|
class: 'wr-table',
|
|
1344
1410
|
'[class.wr-table--responsive]': 'responsive()',
|
|
1345
1411
|
'[class.wr-table--virtual]': 'virtualized()',
|
|
1346
|
-
}, imports: [NgTemplateOutlet, CdkDropList, CdkDrag, WrCheckbox, WrPagination, WrSpinner, WrTableSort, WrTableFilter], template: "@if (loading()) {\n <div class=\"wr-table__loading\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 0 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n [attr.role]=\"treeMode() ? 'treegrid' : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of displayColumns(); track col.key) {\n <col [style.width.px]=\"colWidth(col.key)\" />\n }\n </colgroup>\n <thead>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n size=\"sm\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (checkedChange)=\"toggleAll($event)\"\n [ariaLabel]=\"resolvedSelectAllLabel()\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n @for (col of displayColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [cdkDragDisabled]=\"!reorderable() || !!col.column.pin\"\n class=\"wr-table__th\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.column.pin\"\n [class.wr-table__th--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__th--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__th--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__th--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button\n type=\"button\"\n class=\"wr-table__sort-btn\"\n [attr.aria-label]=\"resolvedSortLabel()\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [checked]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (checkedChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabel]=\"resolvedSelectGroupLabel()\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-label]=\"resolvedToggleGroupLabel()\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\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 </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\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 <span class=\"wr-table__group-label\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [class.wr-table__tr--child]=\"entry.depth > 0\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n [attr.aria-level]=\"treeMode() ? entry.depth + 1 : null\"\n [attr.aria-posinset]=\"treeMode() ? entry.posinset : null\"\n [attr.aria-setsize]=\"treeMode() ? entry.setsize : null\"\n [attr.aria-expanded]=\"entry.open\"\n [style.--wr-table-depth]=\"treeMode() ? entry.depth : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [checked]=\"isRowSelected(entry.row)\"\n (checkedChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabel]=\"resolvedSelectRowLabel()\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n [attr.aria-label]=\"resolvedExpandRowLabel()\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\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 </button>\n </td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__td\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\n >\n @if (treeMode() && col.key === treeColumnKey()) {\n <span class=\"wr-table__tree-lead\">\n @if (entry.parent) {\n <button\n type=\"button\"\n class=\"wr-table__tree-toggle\"\n [class.wr-table__tree-toggle--open]=\"entry.open\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-label]=\"resolvedToggleRowLabel()\"\n (click)=\"toggleTreeRow(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__tree-icon\"\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 </button>\n } @else {\n <span class=\"wr-table__tree-toggle wr-table__tree-toggle--leaf\" aria-hidden=\"true\"></span>\n }\n </span>\n }\n @if (templateFor(col.key); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"cellContext(entry.row, col.key, col.column)\"\n />\n } @else {\n {{ getValue(entry.row, col.key) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n } @empty {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n" }]
|
|
1347
|
-
|
|
1412
|
+
// The rows under the veil are stale while a load is in flight, and nothing
|
|
1413
|
+
// said so: the veil marked itself, not the table it covers. Same pairing as
|
|
1414
|
+
// `wr-card` — mark busy, don't block (the veil is `pointer-events: none`).
|
|
1415
|
+
'[attr.aria-busy]': 'loading() ? true : null',
|
|
1416
|
+
}, imports: [NgTemplateOutlet, CdkDropList, CdkDrag, WrCheckbox, WrPagination, WrSpinner, WrTableSort, WrTableFilter], template: "@if (loading()) {\n <div class=\"wr-table__loading\" role=\"status\" [attr.aria-label]=\"resolvedLoadingLabel()\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 0 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n [attr.role]=\"treeMode() ? 'treegrid' : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of displayColumns(); track col.key) {\n <col [style.width.px]=\"colWidth(col.key)\" />\n }\n </colgroup>\n <thead>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <!-- Disabled with nothing to sweep, the way `wr-transfer` guards its\n own select-all. `[checked]` is a one-way binding over a checkbox\n that owns its state, and on zero rows `allSelected()` answers\n `false` before and after the click \u2014 an unchanged input is never\n written back, so the box latched CHECKED over an empty table and\n stayed that way when rows returned. -->\n <wr-checkbox\n size=\"sm\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n [disabled]=\"pageRowKeys().length === 0\"\n (checkedChange)=\"toggleAll($event)\"\n [ariaLabel]=\"resolvedSelectAllLabel()\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n @for (col of displayColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [cdkDragDisabled]=\"!reorderable() || !!col.column.pin\"\n class=\"wr-table__th\"\n [attr.aria-sort]=\"ariaSortFor(col.key, col.column.sortable)\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.column.pin\"\n [class.wr-table__th--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__th--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__th--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__th--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button\n type=\"button\"\n class=\"wr-table__sort-btn\"\n [attr.aria-label]=\"resolvedSortLabel()\"\n (click)=\"cycleSort(col.key)\"\n >\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [checked]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (checkedChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n [ariaLabel]=\"resolvedSelectGroupLabel()\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n [attr.aria-label]=\"resolvedToggleGroupLabel()\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\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 </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\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 <span class=\"wr-table__group-label\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [class.wr-table__tr--child]=\"entry.depth > 0\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n [attr.aria-level]=\"treeMode() ? entry.depth + 1 : null\"\n [attr.aria-posinset]=\"treeMode() ? entry.posinset : null\"\n [attr.aria-setsize]=\"treeMode() ? entry.setsize : null\"\n [attr.aria-expanded]=\"entry.open\"\n [style.--wr-table-depth]=\"treeMode() ? entry.depth : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [checked]=\"isRowSelected(entry.row)\"\n (checkedChange)=\"toggleRow(entry.row, $event)\"\n [ariaLabel]=\"resolvedSelectRowLabel()\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n [attr.aria-label]=\"resolvedExpandRowLabel()\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\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 </button>\n </td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__td\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\n >\n @if (treeMode() && col.key === treeColumnKey()) {\n <span class=\"wr-table__tree-lead\">\n @if (entry.parent) {\n <button\n type=\"button\"\n class=\"wr-table__tree-toggle\"\n [class.wr-table__tree-toggle--open]=\"entry.open\"\n [attr.aria-expanded]=\"entry.open\"\n [attr.aria-label]=\"resolvedToggleRowLabel()\"\n (click)=\"toggleTreeRow(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__tree-icon\"\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 </button>\n } @else {\n <span class=\"wr-table__tree-toggle wr-table__tree-toggle--leaf\" aria-hidden=\"true\"></span>\n }\n </span>\n }\n @if (templateFor(col.key); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"cellContext(entry.row, col.key, col.column)\"\n />\n } @else {\n {{ getValue(entry.row, col.key) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n <!-- Sibling of the row loop rather than its `@empty` branch, and gated on\n `loading()`. As the `@empty` branch it lived INSIDE `@if (visibleItems())`,\n which passes a nullish `[items]` straight through \u2014 so the input's own\n default rendered a header over a blank body with no \"No data\" anywhere,\n the opposite of what `items`'s docs promise. And the veil is translucent,\n so on the documented `[items]=\"[]\" [loading]=\"true\"` pair the row read\n \"No data\" through the spinner. -->\n @if (!loading() && !renderRows().length) {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">{{ resolvedEmptyLabel() }}</td>\n </tr>\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.inset-inline-start.px]=\"leftPin(col.key)\"\n [style.inset-inline-end.px]=\"rightPin(col.key)\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n" }]
|
|
1417
|
+
}], ctorParameters: () => [], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], responsive: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsive", required: false }] }], reorderable: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderable", required: false }] }], columnOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnOrder", required: false }] }, { type: i0.Output, args: ["columnOrderChange"] }], rowSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowSelection", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], groupBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupBy", required: false }] }], childrenKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "childrenKey", required: false }] }], treeColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeColumn", required: false }] }], toggleRowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleRowLabel", required: false }] }], collapsedGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedGroups", required: false }] }, { type: i0.Output, args: ["collapsedGroupsChange"] }], groupSummary: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupSummary", required: false }] }], showGroupCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "showGroupCount", required: false }] }], sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "sort", required: false }] }, { type: i0.Output, args: ["sortChange"] }], emptyLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyLabel", required: false }] }], sortLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortLabel", required: false }] }], selectAllLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectAllLabel", required: false }] }], selectRowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectRowLabel", required: false }] }], expandRowLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandRowLabel", required: false }] }], selectGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectGroupLabel", required: false }] }], toggleGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleGroupLabel", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], totalItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalItems", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], rowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowHeight", required: false }] }], viewportHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewportHeight", required: false }] }], overscan: [{ type: i0.Input, args: [{ isSignal: true, alias: "overscan", required: false }] }], cellTemplates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => WrTableCell), { isSignal: true }] }], headerCells: [{ type: i0.ViewChildren, args: ['thCell', { isSignal: true }] }], scrollEl: [{ type: i0.ViewChild, args: ['scroll', { isSignal: true }] }], expandTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WrTableExpand), { isSignal: true }] }], groupTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WrTableGroupHeader), { isSignal: true }] }] } });
|
|
1348
1418
|
|
|
1349
1419
|
/**
|
|
1350
1420
|
* Generated bundle index. Do not edit.
|