@ids-group-ltd/ids-design-system 0.11.3 → 0.12.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/CHANGELOG.md +253 -13
- package/components/README.md +86 -0
- package/components.md +12 -4
- package/docs/agent/INDEX.md +1 -0
- package/docs/agent/platform/body-scroll-lock-service.md +12 -0
- package/docs/agent/platform/toast-service.md +4 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +70 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +573 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +86 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +615 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +30 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +188 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +59 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +92 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +204 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +100 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +23 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +180 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +78 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +49 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +73 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +397 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +1231 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +51 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +35 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +109 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +111 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +52 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +92 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +62 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +164 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +223 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +63 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +53 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +43 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +286 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +329 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +612 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +69 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +191 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +23 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +43 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +85 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +95 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +240 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +41 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +235 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +62 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +173 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +123 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +461 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +107 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +185 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +32 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +204 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +25 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +53 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +99 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +26 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +74 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +76 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +1802 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +381 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +44 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +158 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +671 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +41 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +547 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +34 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +218 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +18 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +153 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +48 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +1338 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +325 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +101 -0
- package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +56 -0
- package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +37 -0
- package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +72 -14030
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.11.0.json +0 -2
- package/migrations/0.11.1.json +2 -1
- package/migrations/0.11.2.json +2 -1
- package/migrations/0.11.3.json +3 -2
- package/migrations/0.11.4.json +247 -0
- package/migrations/0.12.0.json +22 -0
- package/migrations/0.4.0.json +2 -1
- package/migrations/0.7.1.json +2 -1
- package/migrations/0.8.0.json +6 -5
- package/package.json +573 -1
- package/styles/_control-label.scss +18 -0
- package/styles/_ds-color.scss +6 -0
- package/styles/_focus.scss +16 -0
- package/styles/_skeleton-shimmer.scss +10 -26
- package/themes/README.md +4 -4
- package/themes/_semantic.scss +11 -2
- package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +48 -0
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +260 -0
- package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +75 -0
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +226 -0
- package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +13 -0
- package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +99 -0
- package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +25 -0
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +61 -0
- package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +66 -0
- package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +10 -0
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +90 -0
- package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-card.d.ts +24 -0
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +41 -0
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +79 -0
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +251 -0
- package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +25 -0
- package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +38 -0
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +45 -0
- package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +73 -0
- package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +36 -0
- package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +83 -0
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +56 -0
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +121 -0
- package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +39 -0
- package/types/ids-group-ltd-ids-design-system-components-list.d.ts +29 -0
- package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +82 -0
- package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +124 -0
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +213 -0
- package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +52 -0
- package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +13 -0
- package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +21 -0
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +80 -0
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +48 -0
- package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +22 -0
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +106 -0
- package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +33 -0
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +82 -0
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +40 -0
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +152 -0
- package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +92 -0
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +131 -0
- package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +16 -0
- package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +51 -0
- package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +11 -0
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +38 -0
- package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +44 -0
- package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +12 -0
- package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +40 -0
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +791 -0
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +118 -0
- package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +26 -0
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +85 -0
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +188 -0
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +24 -0
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +167 -0
- package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +18 -0
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +66 -0
- package/types/ids-group-ltd-ids-design-system-components-topbar.d.ts +8 -0
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +46 -0
- package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +18 -0
- package/types/ids-group-ltd-ids-design-system-components.d.ts +604 -0
- package/types/ids-group-ltd-ids-design-system-core.d.ts +428 -0
- package/types/ids-group-ltd-ids-design-system-icons.d.ts +52 -0
- package/types/ids-group-ltd-ids-design-system-overlay.d.ts +32 -0
- package/types/ids-group-ltd-ids-design-system-theme.d.ts +29 -0
- package/types/ids-group-ltd-ids-design-system.d.ts +72 -5544
- package/LICENSE +0 -21
- package/README.md +0 -73
|
@@ -0,0 +1,1802 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { input, inject, TemplateRef, Directive, booleanAttribute, computed, model, output, linkedSignal, signal, contentChildren, viewChild, Injector, DestroyRef, afterNextRender, ElementRef, effect, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { RouterLink } from '@angular/router';
|
|
4
|
+
import { resolveWithConfig, devWarn } from '@ids-group-ltd/ids-design-system/core';
|
|
5
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
6
|
+
import { moveItemInArray, CdkDropList, CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
7
|
+
import { ButtonComponent } from '@ids-group-ltd/ids-design-system/components/button';
|
|
8
|
+
import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
|
|
9
|
+
import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
|
|
10
|
+
import { PaginationComponent } from '@ids-group-ltd/ids-design-system/components/pagination';
|
|
11
|
+
import { LoadingOverlayComponent } from '@ids-group-ltd/ids-design-system/components/loading-overlay';
|
|
12
|
+
import { PopoverComponent } from '@ids-group-ltd/ids-design-system/components/popover';
|
|
13
|
+
import { BottomSheetComponent } from '@ids-group-ltd/ids-design-system/components/bottom-sheet';
|
|
14
|
+
import { MenuComponent, MenuItemComponent } from '@ids-group-ltd/ids-design-system/components/menu';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Projects a custom cell template into <ds-table> for a specific column.
|
|
18
|
+
*
|
|
19
|
+
* Usage:
|
|
20
|
+
* <ds-table [data]="rows" [columns]="cols">
|
|
21
|
+
* <ng-template dsCellTemplate="product" let-row>
|
|
22
|
+
* <div>{{ asRule(row).product }}</div>
|
|
23
|
+
* </ng-template>
|
|
24
|
+
* </ds-table>
|
|
25
|
+
*
|
|
26
|
+
* The template context type is `unknown` because Angular cannot propagate
|
|
27
|
+
* the parent <ds-table>'s row type to projected templates. Consumers should
|
|
28
|
+
* narrow the row with a typed helper method on the host component.
|
|
29
|
+
*
|
|
30
|
+
* Context shape:
|
|
31
|
+
* - $implicit: the row object (typed `unknown`)
|
|
32
|
+
* - row: alias for the row object (typed `unknown`)
|
|
33
|
+
*/
|
|
34
|
+
class CellTemplateDirective {
|
|
35
|
+
/** The `key` of the column this template replaces, matched against the table's
|
|
36
|
+
* `columns`. A key no column declares renders nothing and warns nowhere. */
|
|
37
|
+
dsCellTemplate = input.required(...(ngDevMode ? [{ debugName: "dsCellTemplate" }] : /* istanbul ignore next */ []));
|
|
38
|
+
template = inject((TemplateRef));
|
|
39
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CellTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
40
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: CellTemplateDirective, isStandalone: true, selector: "[dsCellTemplate]", inputs: { dsCellTemplate: { classPropertyName: "dsCellTemplate", publicName: "dsCellTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
|
|
41
|
+
}
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CellTemplateDirective, decorators: [{
|
|
43
|
+
type: Directive,
|
|
44
|
+
args: [{
|
|
45
|
+
selector: '[dsCellTemplate]',
|
|
46
|
+
standalone: true,
|
|
47
|
+
}]
|
|
48
|
+
}], propDecorators: { dsCellTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsCellTemplate", required: true }] }] } });
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Projects a custom filter into a `ds-table` header popover, for a criterion the
|
|
52
|
+
* built-in checklist cannot express: a date range, a numeric threshold, an async
|
|
53
|
+
* option list.
|
|
54
|
+
*
|
|
55
|
+
* ```html
|
|
56
|
+
* <ds-table [data]="rows" [columns]="cols">
|
|
57
|
+
* <ng-template
|
|
58
|
+
* dsHeaderFilter="opened"
|
|
59
|
+
* [active]="!!range()"
|
|
60
|
+
* let-close="close"
|
|
61
|
+
* >
|
|
62
|
+
* <ds-date-picker mode="range" [(value)]="range" />
|
|
63
|
+
* <ds-button size="sm" (pressed)="apply(); close()">Apply</ds-button>
|
|
64
|
+
* </ng-template>
|
|
65
|
+
* </ds-table>
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* The table still owns the header button, the popover and the active-filter
|
|
69
|
+
* styling — only the panel's contents change. It cannot know whether YOUR
|
|
70
|
+
* criterion is set, though, so `active` is how the highlight gets told; without
|
|
71
|
+
* it a custom filter renders but the header never marks itself filtered.
|
|
72
|
+
*
|
|
73
|
+
* The column is typed `unknown` for the same reason `dsCellTemplate`'s row is:
|
|
74
|
+
* Angular cannot propagate the parent table's row type into a projected
|
|
75
|
+
* template. Narrow it with a typed helper on the host.
|
|
76
|
+
*/
|
|
77
|
+
class HeaderFilterDirective {
|
|
78
|
+
/** Key of the column this filter belongs to. */
|
|
79
|
+
dsHeaderFilter = input.required(...(ngDevMode ? [{ debugName: "dsHeaderFilter" }] : /* istanbul ignore next */ []));
|
|
80
|
+
/** Whether YOUR criterion is currently set, which drives the header's
|
|
81
|
+
* active-filter styling. */
|
|
82
|
+
active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
|
|
83
|
+
template = inject((TemplateRef));
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HeaderFilterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
85
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HeaderFilterDirective, isStandalone: true, selector: "ng-template[dsHeaderFilter]", inputs: { dsHeaderFilter: { classPropertyName: "dsHeaderFilter", publicName: "dsHeaderFilter", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
86
|
+
}
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HeaderFilterDirective, decorators: [{
|
|
88
|
+
type: Directive,
|
|
89
|
+
args: [{
|
|
90
|
+
selector: 'ng-template[dsHeaderFilter]',
|
|
91
|
+
standalone: true,
|
|
92
|
+
}]
|
|
93
|
+
}], propDecorators: { dsHeaderFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsHeaderFilter", required: true }] }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }] } });
|
|
94
|
+
|
|
95
|
+
const NUMERIC = /^-?\d+(\.\d+)?$/;
|
|
96
|
+
// Assumed viewport until the scroller has been measured. Tall enough to fill a
|
|
97
|
+
// laptop screen, so the first paint is not visibly short, and nowhere near the
|
|
98
|
+
// row count a virtualized table is reached for.
|
|
99
|
+
const VIRTUAL_FALLBACK_HEIGHT = 720;
|
|
100
|
+
// Rows kept rendered past each edge of the viewport, so a flick does not expose
|
|
101
|
+
// blank space before the next range lands.
|
|
102
|
+
const VIRTUAL_OVERSCAN = 6;
|
|
103
|
+
/** Rendered values that read as "no data", matched case-insensitively. Wider
|
|
104
|
+
* than the empty string because consumers render placeholders. */
|
|
105
|
+
const BLANK_CELL = new Set(['', '—', '-', '–', 'n/a', 'never', 'none']);
|
|
106
|
+
/** Normalises "no data" to a single `null`, so the comparator has one blank
|
|
107
|
+
* case to test and TypeScript narrows the rest without a cast. */
|
|
108
|
+
function sortableOf(value) {
|
|
109
|
+
if (value === null || value === undefined) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
if (typeof value === 'string' && BLANK_CELL.has(value.trim().toLowerCase())) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
/** Both sides are known non-blank here. `numeric: true` keeps "item 10" after
|
|
118
|
+
* "item 9" instead of before it. */
|
|
119
|
+
function compareSortValues(first, second) {
|
|
120
|
+
if (first instanceof Date && second instanceof Date) {
|
|
121
|
+
return first.getTime() - second.getTime();
|
|
122
|
+
}
|
|
123
|
+
if (typeof first === 'number' && typeof second === 'number') {
|
|
124
|
+
return first - second;
|
|
125
|
+
}
|
|
126
|
+
const firstText = String(first);
|
|
127
|
+
const secondText = String(second);
|
|
128
|
+
if (NUMERIC.test(firstText) && NUMERIC.test(secondText)) {
|
|
129
|
+
return Number(firstText) - Number(secondText);
|
|
130
|
+
}
|
|
131
|
+
// `sensitivity: 'base'` so "Ångström" sorts next to "Angstrom" and casing does
|
|
132
|
+
// not split a column into two runs.
|
|
133
|
+
return firstText.localeCompare(secondText, undefined, {
|
|
134
|
+
numeric: true,
|
|
135
|
+
sensitivity: 'base',
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
class TableComponent {
|
|
139
|
+
/** Rows to render. */
|
|
140
|
+
data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
|
|
141
|
+
/** Row identity used for tracking, selection, expansion and the active-row
|
|
142
|
+
* highlight. Defaults to `row.id`; pass an accessor for display-only data
|
|
143
|
+
* with no natural key (`[rowId]="row => row.channel + row.sentAt"`), which
|
|
144
|
+
* beats mapping synthetic ids into the data just to satisfy the table. */
|
|
145
|
+
rowId = input(null, ...(ngDevMode ? [{ debugName: "rowId" }] : /* istanbul ignore next */ []));
|
|
146
|
+
/** Column definitions driving headers, cells and sorting. */
|
|
147
|
+
columns = input.required(...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
|
|
148
|
+
/** Adds a checkbox column for row/select-all selection. */
|
|
149
|
+
selectable = input(false, { ...(ngDevMode ? { debugName: "selectable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
150
|
+
/** Opt-in outer border + radius. Off by default so tables flush inside a
|
|
151
|
+
* `<ds-card padding="none">` don't double-border.
|
|
152
|
+
* When `true`, the scroll-wrap gets a `var(--border-default)` outline and
|
|
153
|
+
* `var(--radius-md)` radius — useful when the table stands alone in a padded card.
|
|
154
|
+
* Unset falls back to `DS_CONFIG.table.bordered`, then `false`. */
|
|
155
|
+
bordered = input(null, { ...(ngDevMode ? { debugName: "bordered" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
156
|
+
/** false — no loading state.
|
|
157
|
+
* `true` — the table picks: skeleton rows while it has nothing to show, overlay
|
|
158
|
+
* once rows are on screen. Prefer it; the right choice is a function of the row
|
|
159
|
+
* count, which only the table holds.
|
|
160
|
+
* 'skeleton' — first-load placeholder; rows are replaced with shimmer rows.
|
|
161
|
+
* 'overlay' — re-fetch indicator; existing rows stay visible behind
|
|
162
|
+
* a translucent overlay with a centred spinner. Pin either one only to
|
|
163
|
+
* override the rule deliberately. */
|
|
164
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
165
|
+
/** The mode actually rendered. Skeletons replace what the reader is looking at and
|
|
166
|
+
* an overlay on an empty card says nothing, so `true` resolves per state rather
|
|
167
|
+
* than picking a favourite. */
|
|
168
|
+
loadingMode = computed(() => {
|
|
169
|
+
const loading = this.loading();
|
|
170
|
+
if (loading === false) {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
if (loading === true) {
|
|
174
|
+
return this.filteredData().length ? 'overlay' : 'skeleton';
|
|
175
|
+
}
|
|
176
|
+
return loading;
|
|
177
|
+
}, ...(ngDevMode ? [{ debugName: "loadingMode" }] : /* istanbul ignore next */ []));
|
|
178
|
+
/** Keeps the header row pinned while the body scrolls. */
|
|
179
|
+
stickyHeader = input(true, { ...(ngDevMode ? { debugName: "stickyHeader" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
180
|
+
/** Caps the scroll body height (any CSS length, e.g. `'320px'`) and scrolls it
|
|
181
|
+
* vertically — pair with `stickyHeader` for a self-contained scroll region.
|
|
182
|
+
* `null` (default) lets the table grow to its content. */
|
|
183
|
+
maxHeight = input(null, ...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
|
|
184
|
+
/** Row density — `'compact'` tightens cell padding for spreadsheet-dense lists. */
|
|
185
|
+
density = input('default', ...(ngDevMode ? [{ debugName: "density" }] : /* istanbul ignore next */ []));
|
|
186
|
+
/** Tints odd rows for easier row-tracking across wide tables. */
|
|
187
|
+
zebra = input(false, { ...(ngDevMode ? { debugName: "zebra" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
188
|
+
/** Animate the body height when the row set changes (page/filter) instead of
|
|
189
|
+
* snapping. Opt-in; instant under reduced-motion (the DS zeroes the token). */
|
|
190
|
+
animateHeight = input(false, { ...(ngDevMode ? { debugName: "animateHeight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
191
|
+
/** Two-way set of currently selected row ids. */
|
|
192
|
+
selectedIds = model(new Set(), ...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
|
|
193
|
+
/** Column key currently sorted by; `null` when unsorted. Two-way bindable
|
|
194
|
+
* (`[(sortKey)]`) or one-way from your own state with `(sortChange)`. */
|
|
195
|
+
sortKey = input(null, ...(ngDevMode ? [{ debugName: "sortKey" }] : /* istanbul ignore next */ []));
|
|
196
|
+
/** Emitted for `[(sortKey)]`. `sortChange` carries the same click with both
|
|
197
|
+
* halves at once, which is usually the one to listen to. */
|
|
198
|
+
sortKeyChange = output();
|
|
199
|
+
/** Sort direction for `sortKey`. */
|
|
200
|
+
sortDir = input(null, ...(ngDevMode ? [{ debugName: "sortDir" }] : /* istanbul ignore next */ []));
|
|
201
|
+
/** Emitted for `[(sortDir)]`. */
|
|
202
|
+
sortDirChange = output();
|
|
203
|
+
/**
|
|
204
|
+
* What the header marks, and what a client sort reads.
|
|
205
|
+
*
|
|
206
|
+
* `linkedSignal` over BOTH inputs, not a `model`: Angular writes an input only
|
|
207
|
+
* when the bound expression changed, diffing against the value IT last wrote, and
|
|
208
|
+
* an internal `.set()` never updates that slot. Seeding from both means a host
|
|
209
|
+
* answering with its own default re-seeds the pair even when one half of that
|
|
210
|
+
* default equals what it last bound. A host that binds neither never re-seeds, so
|
|
211
|
+
* the optimistic state survives.
|
|
212
|
+
*/
|
|
213
|
+
sortState = linkedSignal(() => ({ key: this.sortKey(), dir: this.sortDir() }), ...(ngDevMode ? [{ debugName: "sortState" }] : /* istanbul ignore next */ []));
|
|
214
|
+
activeSortKey = computed(() => this.sortState().key, ...(ngDevMode ? [{ debugName: "activeSortKey" }] : /* istanbul ignore next */ []));
|
|
215
|
+
activeSortDir = computed(() => this.sortState().dir, ...(ngDevMode ? [{ debugName: "activeSortDir" }] : /* istanbul ignore next */ []));
|
|
216
|
+
/** Sort states a column cycles through on click. Default includes null
|
|
217
|
+
* (unsorted); pass ['asc','desc'] to forbid the unsorted state (e.g.
|
|
218
|
+
* server-paged lists). */
|
|
219
|
+
sortingOrder = input(['asc', 'desc', null], ...(ngDevMode ? [{ debugName: "sortingOrder" }] : /* istanbul ignore next */ []));
|
|
220
|
+
/**
|
|
221
|
+
* Wording for the sort announcement, so it can be translated. Receives the
|
|
222
|
+
* column's label and the new direction; return an empty string to say nothing.
|
|
223
|
+
*/
|
|
224
|
+
sortAnnouncement = input((label, dir) => dir
|
|
225
|
+
? `Sorted by ${label}, ${dir === 'asc' ? 'ascending' : 'descending'}`
|
|
226
|
+
: `Sorting cleared`, ...(ngDevMode ? [{ debugName: "sortAnnouncement" }] : /* istanbul ignore next */ []));
|
|
227
|
+
/**
|
|
228
|
+
* Wording for the row-range announcement, so it can be translated. Receives
|
|
229
|
+
* the 1-based first and last row on screen and the total; return an empty
|
|
230
|
+
* string to say nothing.
|
|
231
|
+
*/
|
|
232
|
+
rangeAnnouncement = input((first, last, total) => `Showing ${first}–${last} of ${total}`, ...(ngDevMode ? [{ debugName: "rangeAnnouncement" }] : /* istanbul ignore next */ []));
|
|
233
|
+
/** Number of shimmer rows rendered while `loading` is `'skeleton'`. */
|
|
234
|
+
skeletonRows = input(5, ...(ngDevMode ? [{ debugName: "skeletonRows" }] : /* istanbul ignore next */ []));
|
|
235
|
+
/** Accessible name for the table (rendered as a visually-hidden caption).
|
|
236
|
+
* Without it, screen-reader users get an unlabelled table. */
|
|
237
|
+
caption = input('', ...(ngDevMode ? [{ debugName: "caption" }] : /* istanbul ignore next */ []));
|
|
238
|
+
/** When true, each row becomes a keyboard-operable control (role=button,
|
|
239
|
+
* tabindex, Enter/Space → rowClicked) with an accessible name from the first
|
|
240
|
+
* column. Off by default so non-navigating tables don't advertise a false
|
|
241
|
+
* click affordance. Also the gate for the hover/pressed row tints. */
|
|
242
|
+
rowInteractive = input(false, { ...(ngDevMode ? { debugName: "rowInteractive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
243
|
+
/** Id of the row rendered as current (highlight + `aria-current`) — e.g. the
|
|
244
|
+
* row whose detail drawer or side panel is open. `null` — none. */
|
|
245
|
+
activeRowId = input(null, ...(ngDevMode ? [{ debugName: "activeRowId" }] : /* istanbul ignore next */ []));
|
|
246
|
+
/** Client-side row filter — case-insensitive substring match against cell
|
|
247
|
+
* text. Columns with `filterable: true` restrict the match set (none
|
|
248
|
+
* marked — every column matches, hidden ones included). '' — no filtering. */
|
|
249
|
+
filterQuery = input('', ...(ngDevMode ? [{ debugName: "filterQuery" }] : /* istanbul ignore next */ []));
|
|
250
|
+
/** Two-way per-column set-filters: column key → the still-checked values.
|
|
251
|
+
* A column absent from the map (or with every value checked) is unfiltered. */
|
|
252
|
+
columnFilters = model(new Map(), ...(ngDevMode ? [{ debugName: "columnFilters" }] : /* istanbul ignore next */ []));
|
|
253
|
+
/** Two-way set of hidden column keys. `null` (default) derives the set from
|
|
254
|
+
* each column's `hidden` flag; the column picker then owns it. Binding a
|
|
255
|
+
* Set takes over — `hidden` flags are ignored. */
|
|
256
|
+
hiddenKeys = model(null, ...(ngDevMode ? [{ debugName: "hiddenKeys" }] : /* istanbul ignore next */ []));
|
|
257
|
+
/** Enables drag-to-resize handles on each column header. */
|
|
258
|
+
resizableColumns = input(false, { ...(ngDevMode ? { debugName: "resizableColumns" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
259
|
+
/** Two-way per-column pixel width overrides (keyed by column key), set by
|
|
260
|
+
* dragging a resize handle. Seeded from `column.width` where unset. */
|
|
261
|
+
columnWidths = model(new Map(), ...(ngDevMode ? [{ debugName: "columnWidths" }] : /* istanbul ignore next */ []));
|
|
262
|
+
/** Enables drag + up/down reordering in the column panel. */
|
|
263
|
+
reorderableColumns = input(false, { ...(ngDevMode ? { debugName: "reorderableColumns" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
264
|
+
/** Two-way column order as a list of keys. `null` (default) keeps declaration
|
|
265
|
+
* order; the column panel owns it once the user reorders. Keys absent from
|
|
266
|
+
* the list fall back to declaration order after the listed ones. */
|
|
267
|
+
columnOrder = model(null, ...(ngDevMode ? [{ debugName: "columnOrder" }] : /* istanbul ignore next */ []));
|
|
268
|
+
/** Round-trip `columnOrder`, `columnWidths` and `hiddenKeys` through
|
|
269
|
+
* `localStorage`, so a reader's column layout survives a reload. Needs
|
|
270
|
+
* `storageKey` — without one there is nothing to key a screen by, and two
|
|
271
|
+
* tables would overwrite each other. Off by default. */
|
|
272
|
+
persistLayout = input(false, { ...(ngDevMode ? { debugName: "persistLayout" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
273
|
+
/** Screen id the persisted layout is stored under. Pick something stable per
|
|
274
|
+
* table, not per route instance. */
|
|
275
|
+
storageKey = input('', ...(ngDevMode ? [{ debugName: "storageKey" }] : /* istanbul ignore next */ []));
|
|
276
|
+
/** Render an export button in the table's toolbar row. Off by default. Leave it
|
|
277
|
+
* off and drive `runExport()` from your own button — in a page header, a filter
|
|
278
|
+
* bar, the `[toolbar]` slot — reading `exporting()` for its loading state. */
|
|
279
|
+
exportButton = input(false, { ...(ngDevMode ? { debugName: "exportButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
280
|
+
/** Filename the export button downloads as. */
|
|
281
|
+
exportFilename = input('table.csv', ...(ngDevMode ? [{ debugName: "exportFilename" }] : /* istanbul ignore next */ []));
|
|
282
|
+
/**
|
|
283
|
+
* Where the export button gets its data. A server-paged table only HAS the
|
|
284
|
+
* current page, so exporting without this silently exports one page.
|
|
285
|
+
*
|
|
286
|
+
* Return ROWS and the table serializes them the same way it serializes its
|
|
287
|
+
* own. Return a `Blob` (or a URL string) and the table just downloads it —
|
|
288
|
+
* which is what you want when the backend already formatted the file with its
|
|
289
|
+
* own number formats, its own columns, or a sheet the table never held.
|
|
290
|
+
*/
|
|
291
|
+
exportFetcher = input(null, ...(ngDevMode ? [{ debugName: "exportFetcher" }] : /* istanbul ignore next */ []));
|
|
292
|
+
/** Fires when `exportFetcher` rejects. Without it a failed export is silent —
|
|
293
|
+
* the button simply re-enables and no file arrives. */
|
|
294
|
+
exportFailed = output();
|
|
295
|
+
exportingState = signal(false, ...(ngDevMode ? [{ debugName: "exportingState" }] : /* istanbul ignore next */ []));
|
|
296
|
+
/** True while `exportFetcher` is in flight. Public so a button OUTSIDE the table
|
|
297
|
+
* can show the same in-flight state as the built-in one. */
|
|
298
|
+
exporting = this.exportingState.asReadonly();
|
|
299
|
+
exportStatusState = signal('', ...(ngDevMode ? [{ debugName: "exportStatusState" }] : /* istanbul ignore next */ []));
|
|
300
|
+
eventsAtExport = signal('', ...(ngDevMode ? [{ debugName: "eventsAtExport" }] : /* istanbul ignore next */ []));
|
|
301
|
+
/** Announced in the table's live region while an export is running or after it
|
|
302
|
+
* failed, so the button's own disabled state is not the only signal. */
|
|
303
|
+
exportStatus = this.exportStatusState.asReadonly();
|
|
304
|
+
/** Keeps the horizontal scrollbar reachable on tall tables: the scroll
|
|
305
|
+
* container's native bar is hidden and a proxy stuck to the bottom of the
|
|
306
|
+
* nearest scroll ancestor mirrors it both ways. Off by default. Unset falls
|
|
307
|
+
* back to `DS_CONFIG.table.stickyScrollbar`, then `false`. */
|
|
308
|
+
stickyScrollbar = input(null, { ...(ngDevMode ? { debugName: "stickyScrollbar" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
|
|
309
|
+
/** Rows per page. `null` (default) disables pagination — all rows render. */
|
|
310
|
+
pageSize = model(null, ...(ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []));
|
|
311
|
+
/** Current 1-based page. Only meaningful when `pageSize()` is set. */
|
|
312
|
+
page = model(1, ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
|
|
313
|
+
/** Selectable page-size choices shown in the pagination control. */
|
|
314
|
+
pageSizeOptions = input([10, 25, 50, 100], ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
|
|
315
|
+
/** Shows the page-size picker in the footer pager. Set false for a table whose
|
|
316
|
+
* page size is fixed — the standalone `ds-pagination` has always taken this. */
|
|
317
|
+
showPageSize = input(true, { ...(ngDevMode ? { debugName: "showPageSize" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
318
|
+
/** Shows the "N of M" range label in the footer pager. */
|
|
319
|
+
showLabel = input(true, { ...(ngDevMode ? { debugName: "showLabel" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
320
|
+
/** Server-side total row count. `null` (default) = client paging: the table
|
|
321
|
+
* slices `data()` itself and the pager counts the rows in hand. When set, the
|
|
322
|
+
* host has already sliced to one page — the pager uses this count and the
|
|
323
|
+
* table renders `data()` as-is (no internal slice). */
|
|
324
|
+
total = input(null, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
|
|
325
|
+
/** Scroll the table into view on a page change (opt-in) — keeps a bottom
|
|
326
|
+
* pager from leaving the viewport on the previous page's last rows. */
|
|
327
|
+
scrollToTopOnPageChange = input(false, { ...(ngDevMode ? { debugName: "scrollToTopOnPageChange" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
328
|
+
/** Who sorts — see `TableSortMode`. Unset resolves to `'server'`: the table
|
|
329
|
+
* emits `(sortChange)` and reorders nothing, which is what a paged table
|
|
330
|
+
* needs. Declare `'client'` when the table holds every row, or `'none'` to
|
|
331
|
+
* drop the affordance entirely. */
|
|
332
|
+
sortMode = input(null, ...(ngDevMode ? [{ debugName: "sortMode" }] : /* istanbul ignore next */ []));
|
|
333
|
+
/** Who filters — see `TableFilterMode`. Unset resolves to `'server'`: the
|
|
334
|
+
* table tracks the selection in `columnFilters` for the host to turn into a
|
|
335
|
+
* request, and runs no local pass. Declare `'client'` when the table holds
|
|
336
|
+
* every row and should filter them itself. */
|
|
337
|
+
filterMode = input(null, ...(ngDevMode ? [{ debugName: "filterMode" }] : /* istanbul ignore next */ []));
|
|
338
|
+
/**
|
|
339
|
+
* The full value domain per column key, for a header filter the table cannot
|
|
340
|
+
* derive itself. Without it the checklist is built from the rows in hand,
|
|
341
|
+
* which on a server-paged table offers only the values that happen to be on
|
|
342
|
+
* the current page.
|
|
343
|
+
*/
|
|
344
|
+
columnFilterOptions = input(new Map(), ...(ngDevMode ? [{ debugName: "columnFilterOptions" }] : /* istanbul ignore next */ []));
|
|
345
|
+
filterModeResolved = computed(() => this.filterMode() ?? 'server', ...(ngDevMode ? [{ debugName: "filterModeResolved" }] : /* istanbul ignore next */ []));
|
|
346
|
+
sortModeResolved = computed(() => this.sortMode() ?? 'server', ...(ngDevMode ? [{ debugName: "sortModeResolved" }] : /* istanbul ignore next */ []));
|
|
347
|
+
borderedResolved = resolveWithConfig(this.bordered, (config) => config.table?.bordered, false);
|
|
348
|
+
stickyScrollbarResolved = resolveWithConfig(this.stickyScrollbar, (config) => config.table?.stickyScrollbar, false);
|
|
349
|
+
/** Pin the first data column (and the select column) on horizontal scroll. */
|
|
350
|
+
stickyFirstColumn = input(false, { ...(ngDevMode ? { debugName: "stickyFirstColumn" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
351
|
+
/**
|
|
352
|
+
* Render only the rows in view, padding the rest with two spacer rows. Opt-in,
|
|
353
|
+
* and it needs `maxHeight` — without a bounded scroller there is no viewport to
|
|
354
|
+
* window against, so nothing is virtualized (dev-warned).
|
|
355
|
+
*
|
|
356
|
+
* Every row must be the same height, which is `virtualRowSize`: the arithmetic
|
|
357
|
+
* that decides what is in view has no other way to know where a row starts. So
|
|
358
|
+
* virtual mode forces `table-layout: fixed` and single-line cells, and the
|
|
359
|
+
* expansion panel is suppressed — a row that can grow breaks the maths.
|
|
360
|
+
*/
|
|
361
|
+
virtualScroll = input(false, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
362
|
+
/** Row height in px in virtual mode. Must match what the rows actually
|
|
363
|
+
* measure, so it drives the CSS height rather than merely describing it. */
|
|
364
|
+
virtualRowSize = input(44, ...(ngDevMode ? [{ debugName: "virtualRowSize" }] : /* istanbul ignore next */ []));
|
|
365
|
+
/**
|
|
366
|
+
* Fetch rows as they scroll into view instead of receiving them all.
|
|
367
|
+
*
|
|
368
|
+
* `data` becomes a SPARSE array `total` long: put each fetched row at its
|
|
369
|
+
* absolute index and leave the rest empty. Every gap inside the window
|
|
370
|
+
* renders a skeleton row, and `(lazyLoad)` asks for the range covering it.
|
|
371
|
+
*
|
|
372
|
+
* Needs `virtualScroll` — without a window there is nothing to load
|
|
373
|
+
* lazily AGAINST — and `total`, which is what the scrollbar is sized from.
|
|
374
|
+
*/
|
|
375
|
+
lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
376
|
+
/** The range now on screen that `data` has gaps in — fetch it and write the
|
|
377
|
+
* rows back at their absolute indices. Re-emits only when the range moves. */
|
|
378
|
+
lazyLoad = output();
|
|
379
|
+
/** Fires with the row on click (or Enter/Space when `rowInteractive`). */
|
|
380
|
+
rowClicked = output();
|
|
381
|
+
/** Fires whenever sort key/direction changes, in every `sortMode` but `'none'`. */
|
|
382
|
+
sortChange = output();
|
|
383
|
+
/** Row-action menu items rendered as a trailing kebab (⋮) column.
|
|
384
|
+
* Empty (default) — no column. Menu clicks never trigger `rowClicked`. */
|
|
385
|
+
rowActions = input([], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
|
|
386
|
+
/** Fires with the chosen action and its row when a kebab menu item is selected. */
|
|
387
|
+
rowActionSelected = output();
|
|
388
|
+
/** Fires when an `editable` cell is committed (Enter or blur) with the new value. */
|
|
389
|
+
cellEdited = output();
|
|
390
|
+
/** Cell templates supplied as an explicit map instead of (or in addition to)
|
|
391
|
+
* projected `dsCellTemplate` directives. Lets a wrapper component collect
|
|
392
|
+
* the directives itself and pass them down, since content projected through
|
|
393
|
+
* a wrapper's `<ng-content>` is not seen by this component's content query.
|
|
394
|
+
* Entries here override projected ones. */
|
|
395
|
+
cellTemplateMap = input({}, ...(ngDevMode ? [{ debugName: "cellTemplateMap" }] : /* istanbul ignore next */ []));
|
|
396
|
+
/** Empty-state template, as an alternative to the `[empty]` content slot —
|
|
397
|
+
* again for wrappers that can't rely on slot re-projection. */
|
|
398
|
+
emptyTemplate = input(null, ...(ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []));
|
|
399
|
+
/** When true, each row renders a leading chevron button that toggles an
|
|
400
|
+
* inline expansion panel below it. */
|
|
401
|
+
expandableRows = input(false, { ...(ngDevMode ? { debugName: "expandableRows" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
402
|
+
/** Two-way set of currently expanded row ids. */
|
|
403
|
+
expandedIds = model(new Set(), ...(ngDevMode ? [{ debugName: "expandedIds" }] : /* istanbul ignore next */ []));
|
|
404
|
+
/** `'single'` collapses the open row when another expander is clicked.
|
|
405
|
+
* Enforced on interaction only: a set seeded with several ids is left alone
|
|
406
|
+
* (and warned about in dev) rather than silently rewritten under the host. */
|
|
407
|
+
expandMode = input('multiple', ...(ngDevMode ? [{ debugName: "expandMode" }] : /* istanbul ignore next */ []));
|
|
408
|
+
/** Renders an expand-all/collapse-all chevron in the expander column header,
|
|
409
|
+
* page-scoped when paginating, like select-all. Suppressed under
|
|
410
|
+
* `expandMode="single"`, which it would contradict. */
|
|
411
|
+
expandAllToggle = input(false, { ...(ngDevMode ? { debugName: "expandAllToggle" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
412
|
+
/** Fires with the row when an expander opens it — including each row opened
|
|
413
|
+
* by expand-all, so a host lazy-loading panel content sees every one. */
|
|
414
|
+
rowExpanded = output();
|
|
415
|
+
/** Fires with the row when an expander closes it, the row auto-closed by
|
|
416
|
+
* `expandMode="single"` included. It carries a row, so it cannot speak for an
|
|
417
|
+
* id whose row is no longer in `data()` — under server-side paging that id is
|
|
418
|
+
* cleared silently. `expandedIds` is the complete signal; this one is the
|
|
419
|
+
* convenient one. */
|
|
420
|
+
rowCollapsed = output();
|
|
421
|
+
/** Template rendered inside an expanded row's panel.
|
|
422
|
+
* Context: `$implicit` = row, `row` = row. */
|
|
423
|
+
rowExpandTemplate = input(null, ...(ngDevMode ? [{ debugName: "rowExpandTemplate" }] : /* istanbul ignore next */ []));
|
|
424
|
+
cellTemplateDirectives = contentChildren(CellTemplateDirective, ...(ngDevMode ? [{ debugName: "cellTemplateDirectives" }] : /* istanbul ignore next */ []));
|
|
425
|
+
cellTemplates = computed(() => {
|
|
426
|
+
const map = {};
|
|
427
|
+
for (const dir of this.cellTemplateDirectives()) {
|
|
428
|
+
map[dir.dsCellTemplate()] = dir.template;
|
|
429
|
+
}
|
|
430
|
+
return { ...map, ...this.cellTemplateMap() };
|
|
431
|
+
}, ...(ngDevMode ? [{ debugName: "cellTemplates" }] : /* istanbul ignore next */ []));
|
|
432
|
+
cellTemplate(col) {
|
|
433
|
+
return this.cellTemplates()[col.key] ?? null;
|
|
434
|
+
}
|
|
435
|
+
tableClasses = computed(() => {
|
|
436
|
+
const parts = ['table'];
|
|
437
|
+
if (this.stickyHeader()) {
|
|
438
|
+
parts.push('sticky-header');
|
|
439
|
+
}
|
|
440
|
+
if (this.density() === 'compact') {
|
|
441
|
+
parts.push('compact');
|
|
442
|
+
}
|
|
443
|
+
if (this.zebra()) {
|
|
444
|
+
parts.push('zebra');
|
|
445
|
+
}
|
|
446
|
+
if (this.virtualizing()) {
|
|
447
|
+
parts.push('virtual');
|
|
448
|
+
}
|
|
449
|
+
return parts.join(' ');
|
|
450
|
+
}, ...(ngDevMode ? [{ debugName: "tableClasses" }] : /* istanbul ignore next */ []));
|
|
451
|
+
isSkeletonLoading = computed(() => this.loadingMode() === 'skeleton', ...(ngDevMode ? [{ debugName: "isSkeletonLoading" }] : /* istanbul ignore next */ []));
|
|
452
|
+
isOverlayLoading = computed(() => this.loadingMode() === 'overlay', ...(ngDevMode ? [{ debugName: "isOverlayLoading" }] : /* istanbul ignore next */ []));
|
|
453
|
+
/** The empty row is a CLAIM about the data — "there are none" — so it must not
|
|
454
|
+
* appear while the table is still asking, in EITHER loading mode. `overlay` is
|
|
455
|
+
* what a list uses on every read after the first, so suppressing only under
|
|
456
|
+
* `skeleton` paints "No rows yet" under the spinner on a zero-row reload. */
|
|
457
|
+
showsEmptyRow = computed(() => this.loadingMode() === false && !this.filteredData().length, ...(ngDevMode ? [{ debugName: "showsEmptyRow" }] : /* istanbul ignore next */ []));
|
|
458
|
+
effectiveHiddenKeys = computed(() => this.hiddenKeys() ??
|
|
459
|
+
new Set(this.columns()
|
|
460
|
+
.filter((col) => col.hidden)
|
|
461
|
+
.map((col) => col.key)), ...(ngDevMode ? [{ debugName: "effectiveHiddenKeys" }] : /* istanbul ignore next */ []));
|
|
462
|
+
orderedColumns = computed(() => {
|
|
463
|
+
const order = this.columnOrder();
|
|
464
|
+
const columns = this.columns();
|
|
465
|
+
if (!order) {
|
|
466
|
+
return columns;
|
|
467
|
+
}
|
|
468
|
+
const byKey = new Map(columns.map((col) => [col.key, col]));
|
|
469
|
+
const placed = new Set();
|
|
470
|
+
const out = [];
|
|
471
|
+
for (const key of order) {
|
|
472
|
+
const col = byKey.get(key);
|
|
473
|
+
if (col && !placed.has(key)) {
|
|
474
|
+
out.push(col);
|
|
475
|
+
placed.add(key);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
for (const col of columns) {
|
|
479
|
+
if (!placed.has(col.key)) {
|
|
480
|
+
out.push(col);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return out;
|
|
484
|
+
}, ...(ngDevMode ? [{ debugName: "orderedColumns" }] : /* istanbul ignore next */ []));
|
|
485
|
+
visibleColumns = computed(() => this.orderedColumns().filter((col) => !this.effectiveHiddenKeys().has(col.key)), ...(ngDevMode ? [{ debugName: "visibleColumns" }] : /* istanbul ignore next */ []));
|
|
486
|
+
hideableColumns = computed(() => this.columns().filter((col) => col.hideable), ...(ngDevMode ? [{ debugName: "hideableColumns" }] : /* istanbul ignore next */ []));
|
|
487
|
+
hasColumnPicker = computed(() => this.hideableColumns().length > 0 || this.reorderableColumns(), ...(ngDevMode ? [{ debugName: "hasColumnPicker" }] : /* istanbul ignore next */ []));
|
|
488
|
+
hasUtilityColumn = computed(() => this.hasRowActions() || this.hasColumnPicker(), ...(ngDevMode ? [{ debugName: "hasUtilityColumn" }] : /* istanbul ignore next */ []));
|
|
489
|
+
isColumnVisible(col) {
|
|
490
|
+
return !this.effectiveHiddenKeys().has(col.key);
|
|
491
|
+
}
|
|
492
|
+
/** The last visible column can't be hidden — an all-hidden grid is useless. */
|
|
493
|
+
isColumnLocked(col) {
|
|
494
|
+
return this.isColumnVisible(col) && this.visibleColumns().length === 1;
|
|
495
|
+
}
|
|
496
|
+
toggleColumn(col) {
|
|
497
|
+
if (!col.hideable || this.isColumnLocked(col)) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
const next = new Set(this.effectiveHiddenKeys());
|
|
501
|
+
if (next.has(col.key)) {
|
|
502
|
+
next.delete(col.key);
|
|
503
|
+
}
|
|
504
|
+
else {
|
|
505
|
+
next.add(col.key);
|
|
506
|
+
}
|
|
507
|
+
this.hiddenKeys.set(next);
|
|
508
|
+
}
|
|
509
|
+
moveColumn(col, delta) {
|
|
510
|
+
const keys = this.orderedColumns().map((column) => column.key);
|
|
511
|
+
const from = keys.indexOf(col.key);
|
|
512
|
+
const to = from + delta;
|
|
513
|
+
if (from < 0 || to < 0 || to >= keys.length) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
moveItemInArray(keys, from, to);
|
|
517
|
+
this.columnOrder.set(keys);
|
|
518
|
+
}
|
|
519
|
+
onColumnDrop(event) {
|
|
520
|
+
const keys = this.orderedColumns().map((column) => column.key);
|
|
521
|
+
moveItemInArray(keys, event.previousIndex, event.currentIndex);
|
|
522
|
+
this.columnOrder.set(keys);
|
|
523
|
+
}
|
|
524
|
+
resetColumns() {
|
|
525
|
+
this.columnOrder.set(null);
|
|
526
|
+
this.hiddenKeys.set(null);
|
|
527
|
+
this.columnWidths.set(new Map());
|
|
528
|
+
}
|
|
529
|
+
columnFilterPopover = viewChild('columnFilterPopover', ...(ngDevMode ? [{ debugName: "columnFilterPopover" }] : /* istanbul ignore next */ []));
|
|
530
|
+
/** The column whose filter menu is open — drives the distinct-value list. */
|
|
531
|
+
filterColumn = signal(null, ...(ngDevMode ? [{ debugName: "filterColumn" }] : /* istanbul ignore next */ []));
|
|
532
|
+
filterSearch = signal('', ...(ngDevMode ? [{ debugName: "filterSearch" }] : /* istanbul ignore next */ []));
|
|
533
|
+
headerFilters = contentChildren(HeaderFilterDirective, ...(ngDevMode ? [{ debugName: "headerFilters" }] : /* istanbul ignore next */ []));
|
|
534
|
+
headerFilterByKey = computed(() => {
|
|
535
|
+
const map = new Map();
|
|
536
|
+
for (const filter of this.headerFilters()) {
|
|
537
|
+
map.set(filter.dsHeaderFilter(), filter);
|
|
538
|
+
}
|
|
539
|
+
return map;
|
|
540
|
+
}, ...(ngDevMode ? [{ debugName: "headerFilterByKey" }] : /* istanbul ignore next */ []));
|
|
541
|
+
headerFilterFor(col) {
|
|
542
|
+
return this.headerFilterByKey().get(col.key);
|
|
543
|
+
}
|
|
544
|
+
hasColumnFilter(col) {
|
|
545
|
+
if (this.filterModeResolved() === 'none') {
|
|
546
|
+
return false;
|
|
547
|
+
}
|
|
548
|
+
return col.filter === 'set' || !!this.headerFilterFor(col);
|
|
549
|
+
}
|
|
550
|
+
isColumnFiltered(col) {
|
|
551
|
+
// A projected filter owns its own criterion, so only the host can say
|
|
552
|
+
// whether it is set; the table still draws the highlight.
|
|
553
|
+
const projected = this.headerFilterFor(col);
|
|
554
|
+
if (projected) {
|
|
555
|
+
return projected.active();
|
|
556
|
+
}
|
|
557
|
+
const allowed = this.columnFilters().get(col.key);
|
|
558
|
+
return !!allowed && allowed.size < this.optionsFor(col).length;
|
|
559
|
+
}
|
|
560
|
+
optionsFor(col) {
|
|
561
|
+
const supplied = this.columnFilterOptions().get(col.key);
|
|
562
|
+
if (supplied) {
|
|
563
|
+
return supplied;
|
|
564
|
+
}
|
|
565
|
+
const seen = new Set();
|
|
566
|
+
for (const row of this.data()) {
|
|
567
|
+
seen.add(this.cellValue(row, col));
|
|
568
|
+
}
|
|
569
|
+
return [...seen].sort((a, b) => a.localeCompare(b));
|
|
570
|
+
}
|
|
571
|
+
filterValues = computed(() => {
|
|
572
|
+
const col = this.filterColumn();
|
|
573
|
+
if (!col) {
|
|
574
|
+
return [];
|
|
575
|
+
}
|
|
576
|
+
const needle = this.filterSearch().trim().toLowerCase();
|
|
577
|
+
const values = this.optionsFor(col);
|
|
578
|
+
return needle
|
|
579
|
+
? values.filter((value) => value.toLowerCase().includes(needle))
|
|
580
|
+
: values;
|
|
581
|
+
}, ...(ngDevMode ? [{ debugName: "filterValues" }] : /* istanbul ignore next */ []));
|
|
582
|
+
filterSelectedCount = computed(() => {
|
|
583
|
+
const col = this.filterColumn();
|
|
584
|
+
if (!col) {
|
|
585
|
+
return 0;
|
|
586
|
+
}
|
|
587
|
+
const allowed = this.columnFilters().get(col.key);
|
|
588
|
+
return allowed ? allowed.size : this.optionsFor(col).length;
|
|
589
|
+
}, ...(ngDevMode ? [{ debugName: "filterSelectedCount" }] : /* istanbul ignore next */ []));
|
|
590
|
+
isFilterValueChecked(value) {
|
|
591
|
+
const col = this.filterColumn();
|
|
592
|
+
if (!col) {
|
|
593
|
+
return false;
|
|
594
|
+
}
|
|
595
|
+
const allowed = this.columnFilters().get(col.key);
|
|
596
|
+
return !allowed || allowed.has(value);
|
|
597
|
+
}
|
|
598
|
+
onColumnFilterClick(col, event) {
|
|
599
|
+
event.stopPropagation();
|
|
600
|
+
this.filterColumn.set(col);
|
|
601
|
+
this.filterSearch.set('');
|
|
602
|
+
this.columnFilterPopover()?.toggle(event.currentTarget);
|
|
603
|
+
}
|
|
604
|
+
onFilterSearch(event) {
|
|
605
|
+
this.filterSearch.set(event.target.value);
|
|
606
|
+
}
|
|
607
|
+
toggleFilterValue(value) {
|
|
608
|
+
const col = this.filterColumn();
|
|
609
|
+
if (!col) {
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
const distinct = this.optionsFor(col);
|
|
613
|
+
const current = new Set(this.columnFilters().get(col.key) ?? distinct);
|
|
614
|
+
if (current.has(value)) {
|
|
615
|
+
current.delete(value);
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
current.add(value);
|
|
619
|
+
}
|
|
620
|
+
const next = new Map(this.columnFilters());
|
|
621
|
+
// Every value checked again → drop the entry so the column reads unfiltered.
|
|
622
|
+
if (current.size >= distinct.length) {
|
|
623
|
+
next.delete(col.key);
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
next.set(col.key, current);
|
|
627
|
+
}
|
|
628
|
+
this.columnFilters.set(next);
|
|
629
|
+
}
|
|
630
|
+
headerFilterContext(col) {
|
|
631
|
+
return {
|
|
632
|
+
$implicit: col,
|
|
633
|
+
column: col,
|
|
634
|
+
close: () => this.columnFilterPopover()?.close(),
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
clearColumnFilter() {
|
|
638
|
+
const col = this.filterColumn();
|
|
639
|
+
if (!col) {
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
642
|
+
const next = new Map(this.columnFilters());
|
|
643
|
+
next.delete(col.key);
|
|
644
|
+
this.columnFilters.set(next);
|
|
645
|
+
}
|
|
646
|
+
injector = inject(Injector);
|
|
647
|
+
destroyRef = inject(DestroyRef);
|
|
648
|
+
editInput = viewChild('editInput', ...(ngDevMode ? [{ debugName: "editInput" }] : /* istanbul ignore next */ []));
|
|
649
|
+
editingCell = signal(null, ...(ngDevMode ? [{ debugName: "editingCell" }] : /* istanbul ignore next */ []));
|
|
650
|
+
editDraft = signal('', ...(ngDevMode ? [{ debugName: "editDraft" }] : /* istanbul ignore next */ []));
|
|
651
|
+
isEditing(row, col) {
|
|
652
|
+
const cell = this.editingCell();
|
|
653
|
+
return !!cell && cell.rowId === this.rowKey(row) && cell.key === col.key;
|
|
654
|
+
}
|
|
655
|
+
startEdit(row, col, event) {
|
|
656
|
+
if (!col.editable) {
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
659
|
+
event.stopPropagation();
|
|
660
|
+
this.editDraft.set(this.cellValue(row, col));
|
|
661
|
+
this.editingCell.set({ rowId: this.rowKey(row), key: col.key });
|
|
662
|
+
afterNextRender(() => {
|
|
663
|
+
const input = this.editInput()?.nativeElement;
|
|
664
|
+
input?.focus();
|
|
665
|
+
input?.select();
|
|
666
|
+
}, { injector: this.injector });
|
|
667
|
+
}
|
|
668
|
+
onEditInput(event) {
|
|
669
|
+
this.editDraft.set(event.target.value);
|
|
670
|
+
}
|
|
671
|
+
commitEdit(row, col) {
|
|
672
|
+
if (!this.isEditing(row, col)) {
|
|
673
|
+
return;
|
|
674
|
+
}
|
|
675
|
+
this.editingCell.set(null);
|
|
676
|
+
this.cellEdited.emit({ row, key: col.key, value: this.editDraft() });
|
|
677
|
+
}
|
|
678
|
+
cancelEdit() {
|
|
679
|
+
this.editingCell.set(null);
|
|
680
|
+
}
|
|
681
|
+
// One notch is a comfortable nudge; a page is roughly a short column.
|
|
682
|
+
static RESIZE_STEP = 16;
|
|
683
|
+
static RESIZE_PAGE = 64;
|
|
684
|
+
static MIN_COLUMN_WIDTH = 48;
|
|
685
|
+
resizeState = null;
|
|
686
|
+
/** `'content'` is not a pixel value — it is carried by a class instead, see
|
|
687
|
+
* `fitsContent`. */
|
|
688
|
+
columnWidth(col) {
|
|
689
|
+
const dragged = this.columnWidths().get(col.key);
|
|
690
|
+
if (dragged !== undefined) {
|
|
691
|
+
return dragged;
|
|
692
|
+
}
|
|
693
|
+
return typeof col.width === 'number' ? col.width : null;
|
|
694
|
+
}
|
|
695
|
+
/** Shrink-to-content mode, unless the user has dragged this column — a drag is a
|
|
696
|
+
* deliberate pixel width and must win over the declared intent. */
|
|
697
|
+
fitsContent(col) {
|
|
698
|
+
return col.width === 'content' && !this.columnWidths().has(col.key);
|
|
699
|
+
}
|
|
700
|
+
/** Clip width for `truncate`. `'content'` has no clip width — the column is as
|
|
701
|
+
* wide as its widest cell, so there is nothing to ellipsis against. */
|
|
702
|
+
clipWidth(col) {
|
|
703
|
+
return typeof col.width === 'number'
|
|
704
|
+
? col.width
|
|
705
|
+
: col.width === 'content'
|
|
706
|
+
? null
|
|
707
|
+
: 240;
|
|
708
|
+
}
|
|
709
|
+
onResizeStart(col, event) {
|
|
710
|
+
event.preventDefault();
|
|
711
|
+
event.stopPropagation();
|
|
712
|
+
const header = event.target.closest('th');
|
|
713
|
+
if (!header) {
|
|
714
|
+
return;
|
|
715
|
+
}
|
|
716
|
+
this.lockMeasuredWidths(header);
|
|
717
|
+
this.resizeState = {
|
|
718
|
+
key: col.key,
|
|
719
|
+
startX: event.clientX,
|
|
720
|
+
startWidth: header.offsetWidth,
|
|
721
|
+
};
|
|
722
|
+
event.target.setPointerCapture(event.pointerId);
|
|
723
|
+
}
|
|
724
|
+
/**
|
|
725
|
+
* Freeze the columns at what they currently measure, once, before the first
|
|
726
|
+
* drag moves anything.
|
|
727
|
+
*
|
|
728
|
+
* Without it only the dragged column has a width and the rest are still
|
|
729
|
+
* auto-sized, so the browser redistributes the remainder across them and
|
|
730
|
+
* columns the reader never touched visibly jump. Measuring first means the
|
|
731
|
+
* drag changes one column and leaves the others where they were — the
|
|
732
|
+
* auto-sized geometry is kept rather than lost at the first grab.
|
|
733
|
+
*
|
|
734
|
+
* Reads the header row that is actually on screen rather than assuming a
|
|
735
|
+
* column order.
|
|
736
|
+
*/
|
|
737
|
+
lockMeasuredWidths(from) {
|
|
738
|
+
const columns = this.visibleColumns();
|
|
739
|
+
if (columns.every((col) => this.columnWidth(col) !== null)) {
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
const headerRow = from.parentElement;
|
|
743
|
+
if (!headerRow) {
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
const widths = new Map(this.columnWidths());
|
|
747
|
+
for (const col of columns) {
|
|
748
|
+
if (this.columnWidth(col) !== null) {
|
|
749
|
+
continue;
|
|
750
|
+
}
|
|
751
|
+
const cell = headerRow.querySelector(`th[data-col-key="${CSS.escape(col.key)}"]`);
|
|
752
|
+
if (cell) {
|
|
753
|
+
widths.set(col.key, Math.max(TableComponent.MIN_COLUMN_WIDTH, cell.offsetWidth));
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
this.columnWidths.set(widths);
|
|
757
|
+
}
|
|
758
|
+
onResizeMove(event) {
|
|
759
|
+
if (!this.resizeState) {
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
const width = this.clampColumnWidth(this.resizeState.startWidth + (event.clientX - this.resizeState.startX));
|
|
763
|
+
const next = new Map(this.columnWidths());
|
|
764
|
+
next.set(this.resizeState.key, Math.round(width));
|
|
765
|
+
this.columnWidths.set(next);
|
|
766
|
+
}
|
|
767
|
+
onResizeEnd() {
|
|
768
|
+
this.resizeState = null;
|
|
769
|
+
}
|
|
770
|
+
resizeFocus = signal(null, ...(ngDevMode ? [{ debugName: "resizeFocus" }] : /* istanbul ignore next */ []));
|
|
771
|
+
/**
|
|
772
|
+
* The widest a single column may be dragged: the scroll viewport.
|
|
773
|
+
*
|
|
774
|
+
* A column wider than the viewport can never be seen whole, and long text has
|
|
775
|
+
* its own affordance here — `truncate` clips it and the clip popover shows the
|
|
776
|
+
* rest — so nothing is lost by stopping at the edge. The ceiling exists at all
|
|
777
|
+
* because `aria-valuemax` has to be TRUE: a focusable `role="separator"` is a
|
|
778
|
+
* range widget, and announcing a bound that neither resize path applies is
|
|
779
|
+
* worse than announcing none.
|
|
780
|
+
*/
|
|
781
|
+
columnWidthCeiling() {
|
|
782
|
+
return Math.max(TableComponent.MIN_COLUMN_WIDTH, this.scrollWrap().nativeElement.clientWidth);
|
|
783
|
+
}
|
|
784
|
+
clampColumnWidth(width) {
|
|
785
|
+
return Math.min(this.columnWidthCeiling(), Math.max(TableComponent.MIN_COLUMN_WIDTH, width));
|
|
786
|
+
}
|
|
787
|
+
onResizeFocus(col, event) {
|
|
788
|
+
const target = event.target;
|
|
789
|
+
this.resizeFocus.set({
|
|
790
|
+
key: col.key,
|
|
791
|
+
measured: this.resolvedColumnWidth(col, target),
|
|
792
|
+
max: this.columnWidthCeiling(),
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
onResizeBlur() {
|
|
796
|
+
this.resizeFocus.set(null);
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* The separator's range, and only while it holds focus — that is when a range
|
|
800
|
+
* widget is announced, and an auto-sized column has no width to report until
|
|
801
|
+
* something measures one. Measuring on every change detection to fill an
|
|
802
|
+
* attribute nothing is reading would force layout once per resizable column.
|
|
803
|
+
*
|
|
804
|
+
* `now` prefers `columnWidth`, which the first arrow key makes known and keeps
|
|
805
|
+
* live; the focus measurement only covers the moment before that.
|
|
806
|
+
*/
|
|
807
|
+
resizeRange(col) {
|
|
808
|
+
const focused = this.resizeFocus();
|
|
809
|
+
if (focused?.key !== col.key) {
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
812
|
+
return {
|
|
813
|
+
now: this.columnWidth(col) ?? focused.measured,
|
|
814
|
+
min: TableComponent.MIN_COLUMN_WIDTH,
|
|
815
|
+
max: focused.max,
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
resolvedColumnWidth(col, from) {
|
|
819
|
+
const known = this.columnWidth(col);
|
|
820
|
+
if (known !== null) {
|
|
821
|
+
return known;
|
|
822
|
+
}
|
|
823
|
+
return from?.closest('th')?.offsetWidth ?? TableComponent.MIN_COLUMN_WIDTH;
|
|
824
|
+
}
|
|
825
|
+
onResizeKey(col, event) {
|
|
826
|
+
const target = event.target;
|
|
827
|
+
const step = TableComponent.RESIZE_STEP;
|
|
828
|
+
const page = TableComponent.RESIZE_PAGE;
|
|
829
|
+
const delta = event.key === 'ArrowLeft'
|
|
830
|
+
? -step
|
|
831
|
+
: event.key === 'ArrowRight'
|
|
832
|
+
? step
|
|
833
|
+
: event.key === 'PageDown'
|
|
834
|
+
? -page
|
|
835
|
+
: event.key === 'PageUp'
|
|
836
|
+
? page
|
|
837
|
+
: event.key === 'Home'
|
|
838
|
+
? 'auto'
|
|
839
|
+
: null;
|
|
840
|
+
if (delta === null) {
|
|
841
|
+
return;
|
|
842
|
+
}
|
|
843
|
+
event.preventDefault();
|
|
844
|
+
this.stepColumnWidth(col, delta, target.closest('th'));
|
|
845
|
+
}
|
|
846
|
+
/**
|
|
847
|
+
* The header cell is passed when the caller has it — the column panel does
|
|
848
|
+
* not, so it is looked up by `data-col-key`, and the measurement matters:
|
|
849
|
+
* stepping an auto-sized column has to start from what it currently RENDERS,
|
|
850
|
+
* not from the minimum.
|
|
851
|
+
*/
|
|
852
|
+
stepColumnWidth(col, delta, from) {
|
|
853
|
+
const header = from ?? this.headerCellFor(col);
|
|
854
|
+
if (header) {
|
|
855
|
+
this.lockMeasuredWidths(header);
|
|
856
|
+
}
|
|
857
|
+
const widths = new Map(this.columnWidths());
|
|
858
|
+
if (delta === 'auto') {
|
|
859
|
+
widths.delete(col.key);
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
const current = this.resolvedColumnWidth(col, header ?? undefined);
|
|
863
|
+
widths.set(col.key, this.clampColumnWidth(Math.round(current + delta)));
|
|
864
|
+
}
|
|
865
|
+
this.columnWidths.set(widths);
|
|
866
|
+
}
|
|
867
|
+
headerCellFor(col) {
|
|
868
|
+
return this.scrollWrap().nativeElement.querySelector(`th[data-col-key="${CSS.escape(col.key)}"]`);
|
|
869
|
+
}
|
|
870
|
+
onColumnWidthStep(col, delta) {
|
|
871
|
+
this.stepColumnWidth(col, delta, null);
|
|
872
|
+
}
|
|
873
|
+
resizeStep = TableComponent.RESIZE_STEP;
|
|
874
|
+
filteredData = computed(() => {
|
|
875
|
+
const query = this.filterQuery().trim().toLowerCase();
|
|
876
|
+
// In 'server' mode the host has already filtered; running the set filters
|
|
877
|
+
// again here would filter the filtered. `filterQuery` is deliberately left
|
|
878
|
+
// alone — it is a separate input with its own client/server story.
|
|
879
|
+
const setFilters = this.filterModeResolved() === 'client'
|
|
880
|
+
? this.columnFilters()
|
|
881
|
+
: new Map();
|
|
882
|
+
const columns = this.columns();
|
|
883
|
+
if (!query && setFilters.size === 0) {
|
|
884
|
+
return this.data();
|
|
885
|
+
}
|
|
886
|
+
const marked = columns.filter((col) => col.filterable);
|
|
887
|
+
const scope = marked.length ? marked : columns;
|
|
888
|
+
const activeSetFilters = [...setFilters]
|
|
889
|
+
.map(([key, allowed]) => ({
|
|
890
|
+
col: columns.find((col) => col.key === key),
|
|
891
|
+
allowed,
|
|
892
|
+
}))
|
|
893
|
+
.filter((entry) => !!entry.col);
|
|
894
|
+
return this.data().filter((row) => {
|
|
895
|
+
if (query &&
|
|
896
|
+
!scope.some((col) => this.cellValue(row, col).toLowerCase().includes(query))) {
|
|
897
|
+
return false;
|
|
898
|
+
}
|
|
899
|
+
return activeSetFilters.every(({ col, allowed }) => allowed.has(this.cellValue(row, col)));
|
|
900
|
+
});
|
|
901
|
+
}, ...(ngDevMode ? [{ debugName: "filteredData" }] : /* istanbul ignore next */ []));
|
|
902
|
+
sortedData = computed(() => {
|
|
903
|
+
const rows = this.filteredData();
|
|
904
|
+
if (this.sortModeResolved() !== 'client') {
|
|
905
|
+
return rows;
|
|
906
|
+
}
|
|
907
|
+
const key = this.activeSortKey();
|
|
908
|
+
const dir = this.activeSortDir();
|
|
909
|
+
if (!key || !dir) {
|
|
910
|
+
return rows;
|
|
911
|
+
}
|
|
912
|
+
const column = this.columns().find((col) => col.key === key);
|
|
913
|
+
if (!column) {
|
|
914
|
+
return rows;
|
|
915
|
+
}
|
|
916
|
+
const direction = dir === 'asc' ? 1 : -1;
|
|
917
|
+
const sortValue = column.sortValue;
|
|
918
|
+
return rows.slice().sort((a, b) => {
|
|
919
|
+
const aValue = sortableOf(sortValue ? sortValue(a) : this.cellValue(a, column));
|
|
920
|
+
const bValue = sortableOf(sortValue ? sortValue(b) : this.cellValue(b, column));
|
|
921
|
+
// Blanks sink in BOTH directions, so `direction` is deliberately not
|
|
922
|
+
// applied to this branch — a descending sort must not open with a screen
|
|
923
|
+
// of empty rows.
|
|
924
|
+
if (aValue === null || bValue === null) {
|
|
925
|
+
if (aValue === null && bValue === null) {
|
|
926
|
+
return 0;
|
|
927
|
+
}
|
|
928
|
+
return aValue === null ? 1 : -1;
|
|
929
|
+
}
|
|
930
|
+
return compareSortValues(aValue, bValue) * direction;
|
|
931
|
+
});
|
|
932
|
+
}, ...(ngDevMode ? [{ debugName: "sortedData" }] : /* istanbul ignore next */ []));
|
|
933
|
+
pagedData = computed(() => {
|
|
934
|
+
const size = this.pageSize();
|
|
935
|
+
// Server-side paging (`total` set): the host already sliced to one page.
|
|
936
|
+
if (size === null || this.total() !== null) {
|
|
937
|
+
return this.sortedData();
|
|
938
|
+
}
|
|
939
|
+
const start = (this.page() - 1) * size;
|
|
940
|
+
return this.sortedData().slice(start, start + size);
|
|
941
|
+
}, ...(ngDevMode ? [{ debugName: "pagedData" }] : /* istanbul ignore next */ []));
|
|
942
|
+
/** Virtual mode windows this further; `rowSlots` is what the loop walks. */
|
|
943
|
+
displayData = computed(() => this.pageSize() !== null ? this.pagedData() : this.sortedData(), ...(ngDevMode ? [{ debugName: "displayData" }] : /* istanbul ignore next */ []));
|
|
944
|
+
/**
|
|
945
|
+
* The single live-region line. Loading wins while it lasts — a sort
|
|
946
|
+
* announcement over rows that are being replaced tells the reader about a
|
|
947
|
+
* state they cannot inspect yet.
|
|
948
|
+
*
|
|
949
|
+
* `aria-live="polite"` does not announce a region's INITIAL content, so the
|
|
950
|
+
* unsorted first render is silent; only real changes speak.
|
|
951
|
+
*/
|
|
952
|
+
statusMessage = computed(() => {
|
|
953
|
+
if (this.loadingMode() !== false) {
|
|
954
|
+
return 'Loading…';
|
|
955
|
+
}
|
|
956
|
+
const events = this.eventMessages();
|
|
957
|
+
// The export line holds the region until the events line has something NEW to say, so
|
|
958
|
+
// "Export failed" survives until the reader moves on rather than for a guessed interval.
|
|
959
|
+
// Compared against a snapshot rather than cleared, because a computed cannot write.
|
|
960
|
+
if (this.exportStatus() && events === this.eventsAtExport()) {
|
|
961
|
+
return this.exportStatus();
|
|
962
|
+
}
|
|
963
|
+
return events;
|
|
964
|
+
}, ...(ngDevMode ? [{ debugName: "statusMessage" }] : /* istanbul ignore next */ []));
|
|
965
|
+
eventMessages = computed(() => [this.sortMessage(), this.rangeMessage(), this.expansionMessage()]
|
|
966
|
+
.filter(Boolean)
|
|
967
|
+
.join('. '), ...(ngDevMode ? [{ debugName: "eventMessages" }] : /* istanbul ignore next */ []));
|
|
968
|
+
/** Only from two rows up: a single expander announces itself through its own
|
|
969
|
+
* `aria-expanded`, and repeating that here would say everything twice. */
|
|
970
|
+
expansionMessage = computed(() => {
|
|
971
|
+
const open = this.expandedIds();
|
|
972
|
+
if (open.size < 2) {
|
|
973
|
+
return '';
|
|
974
|
+
}
|
|
975
|
+
const onPage = this.displayData().filter((row) => open.has(this.rowKey(row))).length;
|
|
976
|
+
return onPage < 2 ? '' : `${onPage} rows expanded`;
|
|
977
|
+
}, ...(ngDevMode ? [{ debugName: "expansionMessage" }] : /* istanbul ignore next */ []));
|
|
978
|
+
sortMessage = computed(() => {
|
|
979
|
+
const key = this.activeSortKey();
|
|
980
|
+
const dir = this.activeSortDir();
|
|
981
|
+
if (!key) {
|
|
982
|
+
return '';
|
|
983
|
+
}
|
|
984
|
+
const label = this.columns().find((col) => col.key === key)?.label ?? key;
|
|
985
|
+
return this.sortAnnouncement()(label, dir);
|
|
986
|
+
}, ...(ngDevMode ? [{ debugName: "sortMessage" }] : /* istanbul ignore next */ []));
|
|
987
|
+
rangeMessage = computed(() => {
|
|
988
|
+
const size = this.pageSize();
|
|
989
|
+
if (size === null) {
|
|
990
|
+
return '';
|
|
991
|
+
}
|
|
992
|
+
const rows = this.displayData().length;
|
|
993
|
+
if (rows === 0) {
|
|
994
|
+
return '';
|
|
995
|
+
}
|
|
996
|
+
const first = (this.page() - 1) * size + 1;
|
|
997
|
+
const total = this.total() ?? this.filteredData().length;
|
|
998
|
+
return this.rangeAnnouncement()(first, first + rows - 1, total);
|
|
999
|
+
}, ...(ngDevMode ? [{ debugName: "rangeMessage" }] : /* istanbul ignore next */ []));
|
|
1000
|
+
/** Virtual mode needs a bounded scroller to window against. */
|
|
1001
|
+
virtualizing = computed(() => this.virtualScroll() && !!this.maxHeight(), ...(ngDevMode ? [{ debugName: "virtualizing" }] : /* istanbul ignore next */ []));
|
|
1002
|
+
/** Drives the CSS row height from the same number the arithmetic uses, so the
|
|
1003
|
+
* two cannot drift — which would make every offset progressively wrong. */
|
|
1004
|
+
virtualRowHeight = computed(() => `${this.virtualRowSize()}px`, ...(ngDevMode ? [{ debugName: "virtualRowHeight" }] : /* istanbul ignore next */ []));
|
|
1005
|
+
/** How many rows the scroller spans. Lazy counts the rows that EXIST, not the
|
|
1006
|
+
* ones that have arrived — otherwise the spacers shrink to the loaded slice
|
|
1007
|
+
* and the scrollbar lies about the length of the list. */
|
|
1008
|
+
virtualCount = computed(() => this.lazy()
|
|
1009
|
+
? (this.total() ?? this.displayData().length)
|
|
1010
|
+
: this.displayData().length, ...(ngDevMode ? [{ debugName: "virtualCount" }] : /* istanbul ignore next */ []));
|
|
1011
|
+
virtualWindow = computed(() => {
|
|
1012
|
+
if (!this.virtualizing()) {
|
|
1013
|
+
return null;
|
|
1014
|
+
}
|
|
1015
|
+
const rowSize = Math.max(1, this.virtualRowSize());
|
|
1016
|
+
const count = this.virtualCount();
|
|
1017
|
+
const height = this.viewportHeight() || VIRTUAL_FALLBACK_HEIGHT;
|
|
1018
|
+
const firstVisible = Math.floor(this.scrollTop() / rowSize);
|
|
1019
|
+
const start = Math.max(0, firstVisible - VIRTUAL_OVERSCAN);
|
|
1020
|
+
const end = Math.min(count, firstVisible + Math.ceil(height / rowSize) + VIRTUAL_OVERSCAN);
|
|
1021
|
+
return {
|
|
1022
|
+
start,
|
|
1023
|
+
end,
|
|
1024
|
+
padTop: start * rowSize,
|
|
1025
|
+
padBottom: Math.max(0, count - end) * rowSize,
|
|
1026
|
+
};
|
|
1027
|
+
}, ...(ngDevMode ? [{ debugName: "virtualWindow" }] : /* istanbul ignore next */ []));
|
|
1028
|
+
/**
|
|
1029
|
+
* What the row loop walks: each slot carries its ABSOLUTE index, and a `null`
|
|
1030
|
+
* row is a gap the host has not filled yet.
|
|
1031
|
+
*
|
|
1032
|
+
* Absolute rather than loop-relative because everything downstream needs it —
|
|
1033
|
+
* striping parity, the skeleton's width seed, and the range `(lazyLoad)` asks
|
|
1034
|
+
* for. Outside lazy mode every slot is filled, so the extra object per visible
|
|
1035
|
+
* row buys uniformity for the ~25 rows windowing keeps in the DOM.
|
|
1036
|
+
*/
|
|
1037
|
+
rowSlots = computed(() => {
|
|
1038
|
+
const window = this.virtualWindow();
|
|
1039
|
+
const data = this.displayData();
|
|
1040
|
+
const start = window ? window.start : 0;
|
|
1041
|
+
const end = window ? window.end : data.length;
|
|
1042
|
+
const slots = [];
|
|
1043
|
+
for (let index = start; index < end; index++) {
|
|
1044
|
+
slots.push({ row: data[index] ?? null, index });
|
|
1045
|
+
}
|
|
1046
|
+
return slots;
|
|
1047
|
+
}, ...(ngDevMode ? [{ debugName: "rowSlots" }] : /* istanbul ignore next */ []));
|
|
1048
|
+
/** Zebra striping cannot come from `:nth-child` while windowing — the parity
|
|
1049
|
+
* of a rendered row depends on its ABSOLUTE index, and the spacer rows are
|
|
1050
|
+
* children too. Matches `:nth-child(odd)`, which is 1-based. */
|
|
1051
|
+
isStriped(absoluteIndex) {
|
|
1052
|
+
return !!this.virtualWindow() && absoluteIndex % 2 === 0;
|
|
1053
|
+
}
|
|
1054
|
+
allSelected = computed(() => {
|
|
1055
|
+
const data = this.displayData();
|
|
1056
|
+
if (data.length === 0) {
|
|
1057
|
+
return false;
|
|
1058
|
+
}
|
|
1059
|
+
const sel = this.selectedIds();
|
|
1060
|
+
return data.every((row) => sel.has(this.rowKey(row)));
|
|
1061
|
+
}, ...(ngDevMode ? [{ debugName: "allSelected" }] : /* istanbul ignore next */ []));
|
|
1062
|
+
someSelected = computed(() => {
|
|
1063
|
+
const data = this.displayData();
|
|
1064
|
+
const sel = this.selectedIds();
|
|
1065
|
+
return data.some((row) => sel.has(this.rowKey(row))) && !this.allSelected();
|
|
1066
|
+
}, ...(ngDevMode ? [{ debugName: "someSelected" }] : /* istanbul ignore next */ []));
|
|
1067
|
+
selectAllLabel = computed(() => this.pageSize() !== null
|
|
1068
|
+
? 'Select all rows on this page'
|
|
1069
|
+
: 'Select all rows', ...(ngDevMode ? [{ debugName: "selectAllLabel" }] : /* istanbul ignore next */ []));
|
|
1070
|
+
allExpanded = computed(() => {
|
|
1071
|
+
const data = this.displayData();
|
|
1072
|
+
if (data.length === 0) {
|
|
1073
|
+
return false;
|
|
1074
|
+
}
|
|
1075
|
+
const open = this.expandedIds();
|
|
1076
|
+
return data.every((row) => open.has(this.rowKey(row)));
|
|
1077
|
+
}, ...(ngDevMode ? [{ debugName: "allExpanded" }] : /* istanbul ignore next */ []));
|
|
1078
|
+
expandAllVisible = computed(() => this.expandAllToggle() && this.expandMode() !== 'single', ...(ngDevMode ? [{ debugName: "expandAllVisible" }] : /* istanbul ignore next */ []));
|
|
1079
|
+
expandAllLabel = computed(() => {
|
|
1080
|
+
const scope = this.pageSize() !== null ? ' on this page' : '';
|
|
1081
|
+
return this.allExpanded()
|
|
1082
|
+
? `Collapse all rows${scope}`
|
|
1083
|
+
: `Expand all rows${scope}`;
|
|
1084
|
+
}, ...(ngDevMode ? [{ debugName: "expandAllLabel" }] : /* istanbul ignore next */ []));
|
|
1085
|
+
skeletonArray = computed(() => Array(this.skeletonRows()).fill(0), ...(ngDevMode ? [{ debugName: "skeletonArray" }] : /* istanbul ignore next */ []));
|
|
1086
|
+
expandedColspan = computed(() => {
|
|
1087
|
+
let count = this.visibleColumns().length;
|
|
1088
|
+
if (this.selectable()) {
|
|
1089
|
+
count += 1;
|
|
1090
|
+
}
|
|
1091
|
+
if (this.expandableRows()) {
|
|
1092
|
+
count += 1;
|
|
1093
|
+
}
|
|
1094
|
+
if (this.hasUtilityColumn()) {
|
|
1095
|
+
count += 1;
|
|
1096
|
+
}
|
|
1097
|
+
return count;
|
|
1098
|
+
}, ...(ngDevMode ? [{ debugName: "expandedColspan" }] : /* istanbul ignore next */ []));
|
|
1099
|
+
hasRowActions = computed(() => this.rowActions().length > 0, ...(ngDevMode ? [{ debugName: "hasRowActions" }] : /* istanbul ignore next */ []));
|
|
1100
|
+
menuRow = signal(null, ...(ngDevMode ? [{ debugName: "menuRow" }] : /* istanbul ignore next */ []));
|
|
1101
|
+
rowMenuPopover = viewChild('rowMenuPopover', ...(ngDevMode ? [{ debugName: "rowMenuPopover" }] : /* istanbul ignore next */ []));
|
|
1102
|
+
columnPickerPopover = viewChild('columnPickerPopover', ...(ngDevMode ? [{ debugName: "columnPickerPopover" }] : /* istanbul ignore next */ []));
|
|
1103
|
+
columnSheetOpen = signal(false, ...(ngDevMode ? [{ debugName: "columnSheetOpen" }] : /* istanbul ignore next */ []));
|
|
1104
|
+
coarsePointerState = signal(false, ...(ngDevMode ? [{ debugName: "coarsePointerState" }] : /* istanbul ignore next */ []));
|
|
1105
|
+
/** Whether the column panel opens as a sheet and the drag handle stands down.
|
|
1106
|
+
* Keyed on the pointer, not the viewport — see the matching media query in
|
|
1107
|
+
* `table.component.scss`. */
|
|
1108
|
+
coarsePointer = this.coarsePointerState.asReadonly();
|
|
1109
|
+
columnPickerOpened = computed(() => this.coarsePointer()
|
|
1110
|
+
? this.columnSheetOpen()
|
|
1111
|
+
: (this.columnPickerPopover()?.opened() ?? false), ...(ngDevMode ? [{ debugName: "columnPickerOpened" }] : /* istanbul ignore next */ []));
|
|
1112
|
+
onColumnPickerClick(event) {
|
|
1113
|
+
if (this.coarsePointer()) {
|
|
1114
|
+
this.columnSheetOpen.set(true);
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
this.columnPickerPopover()?.toggle(event.currentTarget);
|
|
1118
|
+
}
|
|
1119
|
+
hasTruncate = computed(() => this.columns().some((col) => col.truncate), ...(ngDevMode ? [{ debugName: "hasTruncate" }] : /* istanbul ignore next */ []));
|
|
1120
|
+
cellTextPopover = viewChild('cellTextPopover', ...(ngDevMode ? [{ debugName: "cellTextPopover" }] : /* istanbul ignore next */ []));
|
|
1121
|
+
cellPopoverText = signal('', ...(ngDevMode ? [{ debugName: "cellPopoverText" }] : /* istanbul ignore next */ []));
|
|
1122
|
+
onCellClipClick(row, col, event) {
|
|
1123
|
+
const element = event.currentTarget;
|
|
1124
|
+
if (!TableComponent.isClipped(element)) {
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
event.stopPropagation();
|
|
1128
|
+
this.cellPopoverText.set(this.cellValue(row, col));
|
|
1129
|
+
this.cellTextPopover()?.toggle(element);
|
|
1130
|
+
}
|
|
1131
|
+
/** Clipped horizontally — itself or anything it renders. A `dsCellTemplate`
|
|
1132
|
+
* puts the ellipsis on a descendant, so testing only the wrapper misses it. */
|
|
1133
|
+
static isClipped(element) {
|
|
1134
|
+
if (element.scrollWidth > element.clientWidth) {
|
|
1135
|
+
return true;
|
|
1136
|
+
}
|
|
1137
|
+
return [...element.querySelectorAll('*')].some((child) => child.scrollWidth > child.clientWidth);
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* A header narrowed by resizing clips its own label, and the label is the only
|
|
1141
|
+
* thing naming the column — so the full text has to stay reachable. Set on
|
|
1142
|
+
* enter rather than always, because a `title` on every header would fire a
|
|
1143
|
+
* tooltip on hover for text that is perfectly readable.
|
|
1144
|
+
*/
|
|
1145
|
+
onHeaderEnter(event, col) {
|
|
1146
|
+
const element = event.currentTarget;
|
|
1147
|
+
const label = element.querySelector('.th-label') ?? element;
|
|
1148
|
+
if (TableComponent.isClipped(label)) {
|
|
1149
|
+
element.setAttribute('title', col.label);
|
|
1150
|
+
}
|
|
1151
|
+
else {
|
|
1152
|
+
element.removeAttribute('title');
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
scrollWrap = viewChild.required('scrollWrap');
|
|
1156
|
+
hscrollProxy = viewChild('hscrollProxy', ...(ngDevMode ? [{ debugName: "hscrollProxy" }] : /* istanbul ignore next */ []));
|
|
1157
|
+
tableHead = viewChild('tableHead', ...(ngDevMode ? [{ debugName: "tableHead" }] : /* istanbul ignore next */ []));
|
|
1158
|
+
hostElement = inject(ElementRef);
|
|
1159
|
+
hscrollContentWidth = signal(0, ...(ngDevMode ? [{ debugName: "hscrollContentWidth" }] : /* istanbul ignore next */ []));
|
|
1160
|
+
hscrollNeeded = signal(false, ...(ngDevMode ? [{ debugName: "hscrollNeeded" }] : /* istanbul ignore next */ []));
|
|
1161
|
+
scrollTop = signal(0, ...(ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []));
|
|
1162
|
+
viewportHeight = signal(0, ...(ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []));
|
|
1163
|
+
lastLazyRequest = null;
|
|
1164
|
+
constructor() {
|
|
1165
|
+
this.watchPointer();
|
|
1166
|
+
// The scrim starts below the header, so it needs the header's height. Measured, not summed
|
|
1167
|
+
// from padding and line-height: `vertical-align: middle` on the inline-flex label extends
|
|
1168
|
+
// the line box past the strut by a font-metric amount no calc() can carry, and a sum is
|
|
1169
|
+
// blind to a taller control in the header.
|
|
1170
|
+
effect(() => {
|
|
1171
|
+
if (!this.isOverlayLoading()) {
|
|
1172
|
+
return;
|
|
1173
|
+
}
|
|
1174
|
+
const head = this.tableHead()?.nativeElement;
|
|
1175
|
+
if (!head) {
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
this.hostElement.nativeElement.style.setProperty('--_table-head-h', `${head.getBoundingClientRect().height}px`);
|
|
1179
|
+
});
|
|
1180
|
+
// One effect for both halves, because the restore CANNOT run in the
|
|
1181
|
+
// constructor: input signals are not set yet there, so storageKey() is still
|
|
1182
|
+
// '' and the restore silently no-ops. The first run with a usable key
|
|
1183
|
+
// restores; every later run saves.
|
|
1184
|
+
effect(() => {
|
|
1185
|
+
const key = this.layoutKey();
|
|
1186
|
+
const order = this.columnOrder();
|
|
1187
|
+
const widths = this.columnWidths();
|
|
1188
|
+
const hidden = this.hiddenKeys();
|
|
1189
|
+
if (!key) {
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
if (!this.layoutRestored) {
|
|
1193
|
+
this.layoutRestored = true;
|
|
1194
|
+
this.restoreLayout(key);
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
this.saveLayout(key, order, widths, hidden);
|
|
1198
|
+
});
|
|
1199
|
+
// A table holding ALL its rows is the exception, and `total` unbound is how
|
|
1200
|
+
// it says so — so that is where the reminder goes.
|
|
1201
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1202
|
+
devWarn(() => this.sortMode() === null &&
|
|
1203
|
+
this.total() === null &&
|
|
1204
|
+
this.columns().some((col) => col.sortable)
|
|
1205
|
+
? '[ds-table] sortable columns default to sortMode="server", so a header click only emits (sortChange) and the table reorders nothing itself. This table binds no `total`, which usually means it holds every row — declare sortMode="client" to sort them in place.'
|
|
1206
|
+
: null);
|
|
1207
|
+
devWarn(() => this.filterMode() === null &&
|
|
1208
|
+
this.total() === null &&
|
|
1209
|
+
this.columns().some((col) => col.filter === 'set')
|
|
1210
|
+
? '[ds-table] a header filter defaults to filterMode="server", so ticking a value only updates `columnFilters` and filters nothing locally. This table binds no `total`, which usually means it holds every row — declare filterMode="client" to filter them in place.'
|
|
1211
|
+
: null);
|
|
1212
|
+
}
|
|
1213
|
+
effect((onCleanup) => {
|
|
1214
|
+
if (!this.virtualizing()) {
|
|
1215
|
+
return;
|
|
1216
|
+
}
|
|
1217
|
+
const wrap = this.scrollWrap().nativeElement;
|
|
1218
|
+
const onScroll = () => this.scrollTop.set(wrap.scrollTop);
|
|
1219
|
+
const measure = () => this.viewportHeight.set(wrap.clientHeight);
|
|
1220
|
+
wrap.addEventListener('scroll', onScroll, { passive: true });
|
|
1221
|
+
const resizeObserver = new ResizeObserver(measure);
|
|
1222
|
+
resizeObserver.observe(wrap);
|
|
1223
|
+
measure();
|
|
1224
|
+
onScroll();
|
|
1225
|
+
onCleanup(() => {
|
|
1226
|
+
wrap.removeEventListener('scroll', onScroll);
|
|
1227
|
+
resizeObserver.disconnect();
|
|
1228
|
+
});
|
|
1229
|
+
});
|
|
1230
|
+
// Ask for the visible range whenever it has gaps. Keyed on the range itself,
|
|
1231
|
+
// so scrolling within an already-requested window stays quiet and a request
|
|
1232
|
+
// in flight is not repeated every frame — the host is free to answer slowly.
|
|
1233
|
+
effect(() => {
|
|
1234
|
+
if (!this.lazy()) {
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1237
|
+
const slots = this.rowSlots();
|
|
1238
|
+
const gaps = slots.filter((slot) => slot.row === null);
|
|
1239
|
+
if (gaps.length === 0) {
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
const first = gaps[0].index;
|
|
1243
|
+
const rows = gaps[gaps.length - 1].index - first + 1;
|
|
1244
|
+
// Contained, not equal: the viewport is measured after the first paint, so
|
|
1245
|
+
// the window grows by an overscan or two right after opening and an
|
|
1246
|
+
// exact-match guard would fetch the same rows twice.
|
|
1247
|
+
const covered = this.lastLazyRequest &&
|
|
1248
|
+
first >= this.lastLazyRequest.first &&
|
|
1249
|
+
first + rows <= this.lastLazyRequest.first + this.lastLazyRequest.rows;
|
|
1250
|
+
if (covered) {
|
|
1251
|
+
return;
|
|
1252
|
+
}
|
|
1253
|
+
this.lastLazyRequest = { first, rows };
|
|
1254
|
+
this.lazyLoad.emit({ first, rows });
|
|
1255
|
+
});
|
|
1256
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1257
|
+
devWarn(() => this.lazy() && !this.virtualScroll()
|
|
1258
|
+
? '[ds-table] lazy needs virtualScroll: without a window there is no range to fetch, so every gap in `data` renders a skeleton row and (lazyLoad) never narrows. Set virtualScroll (and maxHeight), or hand the table its rows outright.'
|
|
1259
|
+
: null);
|
|
1260
|
+
devWarn(() => this.lazy() && this.total() === null
|
|
1261
|
+
? '[ds-table] lazy needs `total`: the scroller is sized from the rows that EXIST, and without it the spacers collapse to the slice that has arrived — the scrollbar then lies about the length of the list.'
|
|
1262
|
+
: null);
|
|
1263
|
+
devWarn(() => this.lazy() && this.sortMode() === 'client'
|
|
1264
|
+
? '[ds-table] lazy with sortMode="client" sorts only the rows that happen to have arrived, which is a different order every time a window loads. The server owns the order here — drop sortMode or declare "server".'
|
|
1265
|
+
: null);
|
|
1266
|
+
devWarn(() => this.virtualScroll() && !this.maxHeight()
|
|
1267
|
+
? '[ds-table] virtualScroll needs maxHeight — without a bounded scroller there is no viewport to window against, so every row renders and nothing is virtualized. Set maxHeight (e.g. "480px").'
|
|
1268
|
+
: null);
|
|
1269
|
+
devWarn(() => this.virtualScroll() && this.expandableRows()
|
|
1270
|
+
? '[ds-table] virtualScroll and expandableRows do not combine: an expanded row is taller than virtualRowSize, and every offset after it would be wrong. The expander renders but the panel is suppressed — move the detail into a modal or a drawer, or drop virtualScroll.'
|
|
1271
|
+
: null);
|
|
1272
|
+
devWarn(() => this.expandAllToggle() && this.expandMode() === 'single'
|
|
1273
|
+
? '[ds-table] expandAllToggle contradicts expandMode="single" — expanding every row is the one thing single mode exists to prevent. The header toggle is suppressed; drop one of the two.'
|
|
1274
|
+
: null);
|
|
1275
|
+
devWarn(() => this.expandAllToggle() && !this.expandableRows()
|
|
1276
|
+
? '[ds-table] expandAllToggle needs expandableRows — without it there is no expander column to put the toggle in, so it renders nothing. Set expandableRows.'
|
|
1277
|
+
: null);
|
|
1278
|
+
devWarn(() => this.expandMode() === 'single' && this.expandedIds().size > 1
|
|
1279
|
+
? '[ds-table] expandMode="single" was given expandedIds holding several rows. A two-way model is the host\'s to write, so it is left as passed rather than rewritten — the next expander click collapses back to one.'
|
|
1280
|
+
: null);
|
|
1281
|
+
devWarn(() => this.virtualScroll() && this.pageSize() !== null
|
|
1282
|
+
? '[ds-table] virtualScroll with pageSize paginates a window of a page. Virtual scrolling is what pagination was for on a long list — pick one.'
|
|
1283
|
+
: null);
|
|
1284
|
+
}
|
|
1285
|
+
// Assigning an equal scrollLeft fires no scroll event, so the two mirrors
|
|
1286
|
+
// can't loop.
|
|
1287
|
+
effect((onCleanup) => {
|
|
1288
|
+
const proxy = this.hscrollProxy()?.nativeElement;
|
|
1289
|
+
if (!proxy) {
|
|
1290
|
+
return;
|
|
1291
|
+
}
|
|
1292
|
+
const wrap = this.scrollWrap().nativeElement;
|
|
1293
|
+
const fromWrap = () => {
|
|
1294
|
+
proxy.scrollLeft = wrap.scrollLeft;
|
|
1295
|
+
};
|
|
1296
|
+
const fromProxy = () => {
|
|
1297
|
+
wrap.scrollLeft = proxy.scrollLeft;
|
|
1298
|
+
};
|
|
1299
|
+
wrap.addEventListener('scroll', fromWrap, { passive: true });
|
|
1300
|
+
proxy.addEventListener('scroll', fromProxy, { passive: true });
|
|
1301
|
+
const measure = () => {
|
|
1302
|
+
this.hscrollContentWidth.set(wrap.scrollWidth);
|
|
1303
|
+
// Both are rounded integers, so a fractional layout width makes an
|
|
1304
|
+
// unscrollable wrap report one px more than it holds.
|
|
1305
|
+
this.hscrollNeeded.set(wrap.scrollWidth > wrap.clientWidth + 1);
|
|
1306
|
+
};
|
|
1307
|
+
// The wrap's own box never changes with content — watch the table too
|
|
1308
|
+
// (column toggles, data swaps change its width).
|
|
1309
|
+
const resizeObserver = new ResizeObserver(measure);
|
|
1310
|
+
resizeObserver.observe(wrap);
|
|
1311
|
+
const table = wrap.querySelector('table');
|
|
1312
|
+
if (table) {
|
|
1313
|
+
resizeObserver.observe(table);
|
|
1314
|
+
}
|
|
1315
|
+
measure();
|
|
1316
|
+
onCleanup(() => {
|
|
1317
|
+
wrap.removeEventListener('scroll', fromWrap);
|
|
1318
|
+
proxy.removeEventListener('scroll', fromProxy);
|
|
1319
|
+
resizeObserver.disconnect();
|
|
1320
|
+
});
|
|
1321
|
+
});
|
|
1322
|
+
// Opt-in height tween. Observer fires pre-paint: freezing the old height
|
|
1323
|
+
// here stops the jump being painted; disconnect during the anim so its own
|
|
1324
|
+
// resizes don't re-trigger it; clip (not hidden) avoids a scroll container.
|
|
1325
|
+
effect((onCleanup) => {
|
|
1326
|
+
if (!this.animateHeight()) {
|
|
1327
|
+
return;
|
|
1328
|
+
}
|
|
1329
|
+
const wrap = this.scrollWrap().nativeElement;
|
|
1330
|
+
let previousHeight = null;
|
|
1331
|
+
let previousWidth = null;
|
|
1332
|
+
let heightAnim = null;
|
|
1333
|
+
const observer = new ResizeObserver((entries) => {
|
|
1334
|
+
const entry = entries[0];
|
|
1335
|
+
const box = entry.borderBoxSize?.[0];
|
|
1336
|
+
const nextHeight = box ? box.blockSize : entry.contentRect.height;
|
|
1337
|
+
const nextWidth = box ? box.inlineSize : entry.contentRect.width;
|
|
1338
|
+
const fromHeight = previousHeight;
|
|
1339
|
+
const widthChanged = nextWidth !== previousWidth;
|
|
1340
|
+
previousHeight = nextHeight;
|
|
1341
|
+
previousWidth = nextWidth;
|
|
1342
|
+
// Only a height change at a stable width is a row-set swap; skip the
|
|
1343
|
+
// first measure and width-driven reflows (window/column resize) so the
|
|
1344
|
+
// tween doesn't chase a resize.
|
|
1345
|
+
if (fromHeight === null || widthChanged || nextHeight === fromHeight) {
|
|
1346
|
+
return;
|
|
1347
|
+
}
|
|
1348
|
+
const styles = getComputedStyle(wrap);
|
|
1349
|
+
const duration = this.parseDurationMs(styles.getPropertyValue('--duration-base'));
|
|
1350
|
+
if (duration <= 0) {
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
observer.disconnect();
|
|
1354
|
+
heightAnim?.cancel();
|
|
1355
|
+
wrap.style.height = `${fromHeight}px`;
|
|
1356
|
+
wrap.style.overflowY = 'clip';
|
|
1357
|
+
heightAnim = wrap.animate([{ height: `${fromHeight}px` }, { height: `${nextHeight}px` }], {
|
|
1358
|
+
duration,
|
|
1359
|
+
easing: styles.getPropertyValue('--ease-standard').trim() || 'ease-out',
|
|
1360
|
+
});
|
|
1361
|
+
heightAnim.onfinish = heightAnim.oncancel = () => {
|
|
1362
|
+
heightAnim = null;
|
|
1363
|
+
wrap.style.height = '';
|
|
1364
|
+
wrap.style.overflowY = '';
|
|
1365
|
+
observer.observe(wrap);
|
|
1366
|
+
};
|
|
1367
|
+
});
|
|
1368
|
+
observer.observe(wrap);
|
|
1369
|
+
onCleanup(() => {
|
|
1370
|
+
if (heightAnim) {
|
|
1371
|
+
heightAnim.onfinish = heightAnim.oncancel = null;
|
|
1372
|
+
heightAnim.cancel();
|
|
1373
|
+
heightAnim = null;
|
|
1374
|
+
}
|
|
1375
|
+
wrap.style.height = '';
|
|
1376
|
+
wrap.style.overflowY = '';
|
|
1377
|
+
observer.disconnect();
|
|
1378
|
+
});
|
|
1379
|
+
});
|
|
1380
|
+
// Client-side paging only (with `total` set the host owns the clamp): when a
|
|
1381
|
+
// filter shrinks the result set below the current page, pull `page` back to
|
|
1382
|
+
// the last page that still has rows so the body never renders empty.
|
|
1383
|
+
effect(() => {
|
|
1384
|
+
const size = this.pageSize();
|
|
1385
|
+
if (size === null || this.total() !== null) {
|
|
1386
|
+
return;
|
|
1387
|
+
}
|
|
1388
|
+
const lastPage = Math.max(1, Math.ceil(this.filteredData().length / size));
|
|
1389
|
+
if (this.page() > lastPage) {
|
|
1390
|
+
this.page.set(lastPage);
|
|
1391
|
+
}
|
|
1392
|
+
});
|
|
1393
|
+
let previousPage = this.page();
|
|
1394
|
+
effect(() => {
|
|
1395
|
+
const current = this.page();
|
|
1396
|
+
const enabled = this.scrollToTopOnPageChange();
|
|
1397
|
+
if (current !== previousPage && enabled) {
|
|
1398
|
+
this.scrollWrap().nativeElement.scrollIntoView({ block: 'start' });
|
|
1399
|
+
}
|
|
1400
|
+
previousPage = current;
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
parseDurationMs(raw) {
|
|
1404
|
+
const value = raw.trim();
|
|
1405
|
+
if (value.endsWith('ms')) {
|
|
1406
|
+
return parseFloat(value);
|
|
1407
|
+
}
|
|
1408
|
+
if (value.endsWith('s')) {
|
|
1409
|
+
return parseFloat(value) * 1000;
|
|
1410
|
+
}
|
|
1411
|
+
return parseFloat(value) || 0;
|
|
1412
|
+
}
|
|
1413
|
+
onRowMenuClick(row, event) {
|
|
1414
|
+
event.stopPropagation();
|
|
1415
|
+
this.menuRow.set(row);
|
|
1416
|
+
this.rowMenuPopover()?.toggle(event.currentTarget);
|
|
1417
|
+
}
|
|
1418
|
+
isMenuOpenFor(row) {
|
|
1419
|
+
return this.menuRow() === row && !!this.rowMenuPopover()?.opened();
|
|
1420
|
+
}
|
|
1421
|
+
isActionDisabled(action) {
|
|
1422
|
+
const row = this.menuRow();
|
|
1423
|
+
return row !== null && !!action.disabled?.(row);
|
|
1424
|
+
}
|
|
1425
|
+
/** Items that apply to `row`. Called from the trigger's own gate as well as the
|
|
1426
|
+
* menu, so a row with nothing applicable shows no kebab instead of an empty one. */
|
|
1427
|
+
actionsFor(row) {
|
|
1428
|
+
return this.rowActions().filter((action) => !action.hidden?.(row));
|
|
1429
|
+
}
|
|
1430
|
+
hasActionsFor(row) {
|
|
1431
|
+
return this.actionsFor(row).length > 0;
|
|
1432
|
+
}
|
|
1433
|
+
visibleRowActions = computed(() => {
|
|
1434
|
+
const row = this.menuRow();
|
|
1435
|
+
return row === null ? [] : this.actionsFor(row);
|
|
1436
|
+
}, ...(ngDevMode ? [{ debugName: "visibleRowActions" }] : /* istanbul ignore next */ []));
|
|
1437
|
+
/** Empty unless the item is actually disabled for this row: a reason on a live
|
|
1438
|
+
* item would read as a caveat on something that works. */
|
|
1439
|
+
actionReason(action) {
|
|
1440
|
+
const row = this.menuRow();
|
|
1441
|
+
if (row === null || !action.disabled?.(row)) {
|
|
1442
|
+
return '';
|
|
1443
|
+
}
|
|
1444
|
+
const reason = action.disabledReason;
|
|
1445
|
+
return typeof reason === 'function' ? reason(row) : (reason ?? '');
|
|
1446
|
+
}
|
|
1447
|
+
onRowAction(action) {
|
|
1448
|
+
const row = this.menuRow();
|
|
1449
|
+
if (row === null) {
|
|
1450
|
+
return;
|
|
1451
|
+
}
|
|
1452
|
+
this.rowActionSelected.emit({ action, row });
|
|
1453
|
+
}
|
|
1454
|
+
isExpanded(row) {
|
|
1455
|
+
return this.expandedIds().has(this.rowKey(row));
|
|
1456
|
+
}
|
|
1457
|
+
onToggleExpand(row, event) {
|
|
1458
|
+
event.stopPropagation();
|
|
1459
|
+
const key = this.rowKey(row);
|
|
1460
|
+
const open = this.expandedIds();
|
|
1461
|
+
if (open.has(key)) {
|
|
1462
|
+
const next = new Set(open);
|
|
1463
|
+
next.delete(key);
|
|
1464
|
+
this.expandedIds.set(next);
|
|
1465
|
+
this.rowCollapsed.emit(row);
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
if (this.expandMode() === 'single') {
|
|
1469
|
+
// `data()` rather than `displayData()` so a row left open on another page
|
|
1470
|
+
// is reported too — but an event carries a row, so an id whose row is not
|
|
1471
|
+
// loaded at all is dropped without one. Documented on `rowCollapsed`.
|
|
1472
|
+
const closing = open.size > 0
|
|
1473
|
+
? this.data().filter((other) => open.has(this.rowKey(other)))
|
|
1474
|
+
: [];
|
|
1475
|
+
this.expandedIds.set(new Set([key]));
|
|
1476
|
+
closing.forEach((other) => this.rowCollapsed.emit(other));
|
|
1477
|
+
this.rowExpanded.emit(row);
|
|
1478
|
+
return;
|
|
1479
|
+
}
|
|
1480
|
+
const next = new Set(open);
|
|
1481
|
+
next.add(key);
|
|
1482
|
+
this.expandedIds.set(next);
|
|
1483
|
+
this.rowExpanded.emit(row);
|
|
1484
|
+
}
|
|
1485
|
+
onToggleExpandAll() {
|
|
1486
|
+
const rows = this.displayData();
|
|
1487
|
+
const open = this.expandedIds();
|
|
1488
|
+
const collapsing = this.allExpanded();
|
|
1489
|
+
const changed = rows.filter((row) => open.has(this.rowKey(row)) === collapsing);
|
|
1490
|
+
if (changed.length === 0) {
|
|
1491
|
+
return;
|
|
1492
|
+
}
|
|
1493
|
+
const next = new Set(open);
|
|
1494
|
+
rows.forEach((row) => {
|
|
1495
|
+
if (collapsing) {
|
|
1496
|
+
next.delete(this.rowKey(row));
|
|
1497
|
+
}
|
|
1498
|
+
else {
|
|
1499
|
+
next.add(this.rowKey(row));
|
|
1500
|
+
}
|
|
1501
|
+
});
|
|
1502
|
+
this.expandedIds.set(next);
|
|
1503
|
+
changed.forEach((row) => collapsing ? this.rowCollapsed.emit(row) : this.rowExpanded.emit(row));
|
|
1504
|
+
}
|
|
1505
|
+
isSelected(row) {
|
|
1506
|
+
return this.selectedIds().has(this.rowKey(row));
|
|
1507
|
+
}
|
|
1508
|
+
onToggleAll(event) {
|
|
1509
|
+
const checked = event.target.checked;
|
|
1510
|
+
const next = new Set(this.selectedIds());
|
|
1511
|
+
if (checked) {
|
|
1512
|
+
this.displayData().forEach((row) => next.add(this.rowKey(row)));
|
|
1513
|
+
}
|
|
1514
|
+
else {
|
|
1515
|
+
this.displayData().forEach((row) => next.delete(this.rowKey(row)));
|
|
1516
|
+
}
|
|
1517
|
+
this.selectedIds.set(next);
|
|
1518
|
+
}
|
|
1519
|
+
onToggleRow(row, event) {
|
|
1520
|
+
event.stopPropagation();
|
|
1521
|
+
const checked = event.target.checked;
|
|
1522
|
+
const next = new Set(this.selectedIds());
|
|
1523
|
+
if (checked) {
|
|
1524
|
+
next.add(this.rowKey(row));
|
|
1525
|
+
}
|
|
1526
|
+
else {
|
|
1527
|
+
next.delete(this.rowKey(row));
|
|
1528
|
+
}
|
|
1529
|
+
this.selectedIds.set(next);
|
|
1530
|
+
}
|
|
1531
|
+
selectionBeforeGesture = '';
|
|
1532
|
+
onRowMousedown() {
|
|
1533
|
+
this.selectionBeforeGesture = window.getSelection()?.toString() ?? '';
|
|
1534
|
+
}
|
|
1535
|
+
onRowClick(row, event) {
|
|
1536
|
+
if (event.target.closest('input')) {
|
|
1537
|
+
return;
|
|
1538
|
+
}
|
|
1539
|
+
// Only a selection created by this gesture blocks the click — a stale one
|
|
1540
|
+
// mousedown can't collapse (user-select:none content) must not wedge rows.
|
|
1541
|
+
const selection = window.getSelection()?.toString() ?? '';
|
|
1542
|
+
if (selection && selection !== this.selectionBeforeGesture) {
|
|
1543
|
+
return;
|
|
1544
|
+
}
|
|
1545
|
+
this.rowClicked.emit(row);
|
|
1546
|
+
}
|
|
1547
|
+
onRowKey(row, event) {
|
|
1548
|
+
// Only the row's own key opens the row: a key pressed on a control inside a
|
|
1549
|
+
// cell belongs to that control (Space on the select box, Enter on a button).
|
|
1550
|
+
if (!this.rowInteractive() || event.target !== event.currentTarget) {
|
|
1551
|
+
return;
|
|
1552
|
+
}
|
|
1553
|
+
event.preventDefault();
|
|
1554
|
+
this.rowClicked.emit(row);
|
|
1555
|
+
}
|
|
1556
|
+
rowAriaLabel(row) {
|
|
1557
|
+
const first = this.visibleColumns()[0];
|
|
1558
|
+
return first ? this.cellValue(row, first) : '';
|
|
1559
|
+
}
|
|
1560
|
+
/** Row identity — the `rowId` accessor when given, else `row.id`. Public so a
|
|
1561
|
+
* host reading `selectedIds`/`expandedIds` can compute the same keys. */
|
|
1562
|
+
rowKey(row) {
|
|
1563
|
+
const accessor = this.rowId();
|
|
1564
|
+
if (accessor) {
|
|
1565
|
+
return accessor(row);
|
|
1566
|
+
}
|
|
1567
|
+
return String(row.id ?? '');
|
|
1568
|
+
}
|
|
1569
|
+
sortableCol(col) {
|
|
1570
|
+
return !!col.sortable && this.sortModeResolved() !== 'none';
|
|
1571
|
+
}
|
|
1572
|
+
ariaSort(col) {
|
|
1573
|
+
if (!this.sortableCol(col)) {
|
|
1574
|
+
return null;
|
|
1575
|
+
}
|
|
1576
|
+
if (this.activeSortKey() === col.key && this.activeSortDir()) {
|
|
1577
|
+
return this.activeSortDir() === 'asc' ? 'ascending' : 'descending';
|
|
1578
|
+
}
|
|
1579
|
+
return 'none';
|
|
1580
|
+
}
|
|
1581
|
+
onSort(col) {
|
|
1582
|
+
if (!this.sortableCol(col)) {
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1585
|
+
const order = this.sortingOrder();
|
|
1586
|
+
const currentKey = this.activeSortKey();
|
|
1587
|
+
let dir;
|
|
1588
|
+
if (currentKey !== col.key) {
|
|
1589
|
+
dir = order[0] ?? null;
|
|
1590
|
+
}
|
|
1591
|
+
else {
|
|
1592
|
+
const currentIndex = order.indexOf(this.activeSortDir());
|
|
1593
|
+
dir = order[(currentIndex + 1) % order.length] ?? null;
|
|
1594
|
+
}
|
|
1595
|
+
// The key survives "unsorted" — `dir === null` alone means that. Nulling it too
|
|
1596
|
+
// desynced a host that maps off `sortKey` back to its own default sort.
|
|
1597
|
+
this.sortState.set({ key: col.key, dir });
|
|
1598
|
+
this.sortKeyChange.emit(col.key);
|
|
1599
|
+
this.sortDirChange.emit(dir);
|
|
1600
|
+
this.sortChange.emit({ key: col.key, dir });
|
|
1601
|
+
}
|
|
1602
|
+
headerClasses(col) {
|
|
1603
|
+
const parts = [];
|
|
1604
|
+
if (this.sortableCol(col)) {
|
|
1605
|
+
parts.push('sortable');
|
|
1606
|
+
}
|
|
1607
|
+
if (this.activeSortKey() === col.key && this.activeSortDir()) {
|
|
1608
|
+
parts.push(`sorted-${this.activeSortDir()}`);
|
|
1609
|
+
}
|
|
1610
|
+
return parts.join(' ');
|
|
1611
|
+
}
|
|
1612
|
+
sortIcon(col) {
|
|
1613
|
+
if (this.activeSortKey() !== col.key || !this.activeSortDir()) {
|
|
1614
|
+
return 'sort';
|
|
1615
|
+
}
|
|
1616
|
+
return this.activeSortDir() === 'asc' ? 'sortAsc' : 'sortDesc';
|
|
1617
|
+
}
|
|
1618
|
+
cellValue(row, col) {
|
|
1619
|
+
if (col.cell) {
|
|
1620
|
+
return col.cell(row);
|
|
1621
|
+
}
|
|
1622
|
+
return String(row[col.key] ?? '');
|
|
1623
|
+
}
|
|
1624
|
+
cellLink(row, col) {
|
|
1625
|
+
return col.link?.(row) ?? null;
|
|
1626
|
+
}
|
|
1627
|
+
/** Serialises the visible columns of the rows the TABLE HOLDS as a CSV download.
|
|
1628
|
+
* On a server-paged table that is one page — prefer `runExport()`, which goes
|
|
1629
|
+
* through `exportFetcher` and exports the whole set. Pass `rows` to serialise a
|
|
1630
|
+
* set you fetched yourself. */
|
|
1631
|
+
exportCsv(filename = 'table.csv', rows) {
|
|
1632
|
+
if (typeof document === 'undefined') {
|
|
1633
|
+
return;
|
|
1634
|
+
}
|
|
1635
|
+
const columns = this.visibleColumns();
|
|
1636
|
+
const escapeCell = (value) => /[",\r\n]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value;
|
|
1637
|
+
const header = columns.map((col) => escapeCell(col.label));
|
|
1638
|
+
const body = (rows ?? this.sortedData()).map((row) => columns.map((col) => escapeCell(this.cellValue(row, col))));
|
|
1639
|
+
// Leading BOM so Excel reads UTF-8 (accented labels/values) correctly.
|
|
1640
|
+
const csv = '' + [header, ...body].map((cells) => cells.join(',')).join('\r\n');
|
|
1641
|
+
const url = URL.createObjectURL(new Blob([csv], { type: 'text/csv;charset=utf-8;' }));
|
|
1642
|
+
const link = document.createElement('a');
|
|
1643
|
+
link.href = url;
|
|
1644
|
+
link.download = filename;
|
|
1645
|
+
link.click();
|
|
1646
|
+
URL.revokeObjectURL(url);
|
|
1647
|
+
}
|
|
1648
|
+
// localStorage, not session: a column layout the reader arranged should still
|
|
1649
|
+
// be there tomorrow. Every access is guarded — Safari private mode throws on
|
|
1650
|
+
// write, and a quota error must not take the table down with it.
|
|
1651
|
+
layoutKey() {
|
|
1652
|
+
const key = this.storageKey().trim();
|
|
1653
|
+
return this.persistLayout() && key ? `ds-table:${key}` : null;
|
|
1654
|
+
}
|
|
1655
|
+
layoutRestored = false;
|
|
1656
|
+
restoreLayout(key) {
|
|
1657
|
+
try {
|
|
1658
|
+
const raw = localStorage.getItem(key);
|
|
1659
|
+
if (!raw) {
|
|
1660
|
+
return;
|
|
1661
|
+
}
|
|
1662
|
+
const saved = JSON.parse(raw);
|
|
1663
|
+
// Only apply what was actually stored: a table that has never been
|
|
1664
|
+
// rearranged must keep its declaration order and `hidden` flags.
|
|
1665
|
+
if (saved.order) {
|
|
1666
|
+
this.columnOrder.set(saved.order);
|
|
1667
|
+
}
|
|
1668
|
+
if (saved.widths) {
|
|
1669
|
+
this.columnWidths.set(new Map(saved.widths));
|
|
1670
|
+
}
|
|
1671
|
+
if (saved.hidden) {
|
|
1672
|
+
this.hiddenKeys.set(new Set(saved.hidden));
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
catch {
|
|
1676
|
+
// Unreadable or from an older shape: fall back to the declared layout.
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
saveLayout(key, order, widths, hidden) {
|
|
1680
|
+
try {
|
|
1681
|
+
localStorage.setItem(key, JSON.stringify({
|
|
1682
|
+
order,
|
|
1683
|
+
widths: [...widths],
|
|
1684
|
+
hidden: hidden ? [...hidden] : null,
|
|
1685
|
+
}));
|
|
1686
|
+
}
|
|
1687
|
+
catch {
|
|
1688
|
+
// Full or blocked: a lost column layout is not worth an error.
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
/** Runs the export the built-in button runs: awaits `exportFetcher` when one is
|
|
1692
|
+
* given — so a server-paged table exports the whole set rather than the page it
|
|
1693
|
+
* holds — downloads the result, drives `exporting`, writes the live region and
|
|
1694
|
+
* emits `exportFailed`. Public so the button can live anywhere:
|
|
1695
|
+
* `<ds-button [loading]="table.exporting()" (pressed)="table.runExport()">`. */
|
|
1696
|
+
async runExport() {
|
|
1697
|
+
const fetcher = this.exportFetcher();
|
|
1698
|
+
if (!fetcher) {
|
|
1699
|
+
this.exportCsv(this.exportFilename());
|
|
1700
|
+
return;
|
|
1701
|
+
}
|
|
1702
|
+
this.exportingState.set(true);
|
|
1703
|
+
this.announceExport('Preparing export…');
|
|
1704
|
+
try {
|
|
1705
|
+
const result = await fetcher();
|
|
1706
|
+
if (typeof result === 'string' || result instanceof Blob) {
|
|
1707
|
+
this.downloadFile(result, this.exportFilename());
|
|
1708
|
+
}
|
|
1709
|
+
else {
|
|
1710
|
+
this.exportCsv(this.exportFilename(), result);
|
|
1711
|
+
}
|
|
1712
|
+
this.announceExport('Export ready');
|
|
1713
|
+
}
|
|
1714
|
+
catch (error) {
|
|
1715
|
+
this.announceExport('Export failed');
|
|
1716
|
+
this.exportFailed.emit(error);
|
|
1717
|
+
}
|
|
1718
|
+
finally {
|
|
1719
|
+
this.exportingState.set(false);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
announceExport(status) {
|
|
1723
|
+
this.eventsAtExport.set(this.eventMessages());
|
|
1724
|
+
this.exportStatusState.set(status);
|
|
1725
|
+
}
|
|
1726
|
+
/** Hands a ready-made file to the browser. Only a Blob gets its object URL
|
|
1727
|
+
* revoked — a URL the caller supplied is theirs to manage. */
|
|
1728
|
+
downloadFile(source, filename) {
|
|
1729
|
+
if (typeof document === 'undefined') {
|
|
1730
|
+
return;
|
|
1731
|
+
}
|
|
1732
|
+
const url = source instanceof Blob ? URL.createObjectURL(source) : source;
|
|
1733
|
+
const link = document.createElement('a');
|
|
1734
|
+
link.href = url;
|
|
1735
|
+
link.download = filename;
|
|
1736
|
+
link.click();
|
|
1737
|
+
if (source instanceof Blob) {
|
|
1738
|
+
URL.revokeObjectURL(url);
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
/** Deterministic per-cell width so skeleton rows look organic but stable
|
|
1742
|
+
* across re-renders. */
|
|
1743
|
+
skeletonWidth(col, rowIndex) {
|
|
1744
|
+
const seed = `${col.key}-${rowIndex}`;
|
|
1745
|
+
let hash = 0;
|
|
1746
|
+
for (let charIndex = 0; charIndex < seed.length; charIndex++) {
|
|
1747
|
+
hash = (hash + seed.charCodeAt(charIndex)) | 0;
|
|
1748
|
+
}
|
|
1749
|
+
const widths = ['45%', '55%', '65%', '75%', '85%'];
|
|
1750
|
+
return widths[Math.abs(hash) % widths.length] ?? '70%';
|
|
1751
|
+
}
|
|
1752
|
+
watchPointer() {
|
|
1753
|
+
if (typeof window === 'undefined' || !window.matchMedia) {
|
|
1754
|
+
return;
|
|
1755
|
+
}
|
|
1756
|
+
const coarse = window.matchMedia('(hover: none) and (pointer: coarse)');
|
|
1757
|
+
const sync = () => this.coarsePointerState.set(coarse.matches);
|
|
1758
|
+
sync();
|
|
1759
|
+
coarse.addEventListener('change', sync);
|
|
1760
|
+
this.destroyRef.onDestroy(() => coarse.removeEventListener('change', sync));
|
|
1761
|
+
}
|
|
1762
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1763
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: TableComponent, isStandalone: true, selector: "ds-table", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, rowId: { classPropertyName: "rowId", publicName: "rowId", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, bordered: { classPropertyName: "bordered", publicName: "bordered", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "stickyHeader", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null }, density: { classPropertyName: "density", publicName: "density", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, animateHeight: { classPropertyName: "animateHeight", publicName: "animateHeight", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, sortKey: { classPropertyName: "sortKey", publicName: "sortKey", isSignal: true, isRequired: false, transformFunction: null }, sortDir: { classPropertyName: "sortDir", publicName: "sortDir", isSignal: true, isRequired: false, transformFunction: null }, sortingOrder: { classPropertyName: "sortingOrder", publicName: "sortingOrder", isSignal: true, isRequired: false, transformFunction: null }, sortAnnouncement: { classPropertyName: "sortAnnouncement", publicName: "sortAnnouncement", isSignal: true, isRequired: false, transformFunction: null }, rangeAnnouncement: { classPropertyName: "rangeAnnouncement", publicName: "rangeAnnouncement", isSignal: true, isRequired: false, transformFunction: null }, skeletonRows: { classPropertyName: "skeletonRows", publicName: "skeletonRows", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, rowInteractive: { classPropertyName: "rowInteractive", publicName: "rowInteractive", isSignal: true, isRequired: false, transformFunction: null }, activeRowId: { classPropertyName: "activeRowId", publicName: "activeRowId", isSignal: true, isRequired: false, transformFunction: null }, filterQuery: { classPropertyName: "filterQuery", publicName: "filterQuery", isSignal: true, isRequired: false, transformFunction: null }, columnFilters: { classPropertyName: "columnFilters", publicName: "columnFilters", isSignal: true, isRequired: false, transformFunction: null }, hiddenKeys: { classPropertyName: "hiddenKeys", publicName: "hiddenKeys", isSignal: true, isRequired: false, transformFunction: null }, resizableColumns: { classPropertyName: "resizableColumns", publicName: "resizableColumns", isSignal: true, isRequired: false, transformFunction: null }, columnWidths: { classPropertyName: "columnWidths", publicName: "columnWidths", isSignal: true, isRequired: false, transformFunction: null }, reorderableColumns: { classPropertyName: "reorderableColumns", publicName: "reorderableColumns", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, persistLayout: { classPropertyName: "persistLayout", publicName: "persistLayout", isSignal: true, isRequired: false, transformFunction: null }, storageKey: { classPropertyName: "storageKey", publicName: "storageKey", isSignal: true, isRequired: false, transformFunction: null }, exportButton: { classPropertyName: "exportButton", publicName: "exportButton", isSignal: true, isRequired: false, transformFunction: null }, exportFilename: { classPropertyName: "exportFilename", publicName: "exportFilename", isSignal: true, isRequired: false, transformFunction: null }, exportFetcher: { classPropertyName: "exportFetcher", publicName: "exportFetcher", isSignal: true, isRequired: false, transformFunction: null }, stickyScrollbar: { classPropertyName: "stickyScrollbar", publicName: "stickyScrollbar", 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 }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null }, showLabel: { classPropertyName: "showLabel", publicName: "showLabel", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, scrollToTopOnPageChange: { classPropertyName: "scrollToTopOnPageChange", publicName: "scrollToTopOnPageChange", isSignal: true, isRequired: false, transformFunction: null }, sortMode: { classPropertyName: "sortMode", publicName: "sortMode", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, columnFilterOptions: { classPropertyName: "columnFilterOptions", publicName: "columnFilterOptions", isSignal: true, isRequired: false, transformFunction: null }, stickyFirstColumn: { classPropertyName: "stickyFirstColumn", publicName: "stickyFirstColumn", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualRowSize: { classPropertyName: "virtualRowSize", publicName: "virtualRowSize", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, cellTemplateMap: { classPropertyName: "cellTemplateMap", publicName: "cellTemplateMap", isSignal: true, isRequired: false, transformFunction: null }, emptyTemplate: { classPropertyName: "emptyTemplate", publicName: "emptyTemplate", isSignal: true, isRequired: false, transformFunction: null }, expandableRows: { classPropertyName: "expandableRows", publicName: "expandableRows", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, expandMode: { classPropertyName: "expandMode", publicName: "expandMode", isSignal: true, isRequired: false, transformFunction: null }, expandAllToggle: { classPropertyName: "expandAllToggle", publicName: "expandAllToggle", isSignal: true, isRequired: false, transformFunction: null }, rowExpandTemplate: { classPropertyName: "rowExpandTemplate", publicName: "rowExpandTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIds: "selectedIdsChange", sortKeyChange: "sortKeyChange", sortDirChange: "sortDirChange", columnFilters: "columnFiltersChange", hiddenKeys: "hiddenKeysChange", columnWidths: "columnWidthsChange", columnOrder: "columnOrderChange", exportFailed: "exportFailed", pageSize: "pageSizeChange", page: "pageChange", lazyLoad: "lazyLoad", rowClicked: "rowClicked", sortChange: "sortChange", rowActionSelected: "rowActionSelected", cellEdited: "cellEdited", expandedIds: "expandedIdsChange", rowExpanded: "rowExpanded", rowCollapsed: "rowCollapsed" }, host: { properties: { "class.bordered": "borderedResolved()", "class.selectable": "selectable()", "class.pinned": "stickyFirstColumn()", "class.expandable": "expandableRows()", "class.sticky-scrollbar": "stickyScrollbarResolved()", "class.resizable": "resizableColumns()" } }, queries: [{ propertyName: "cellTemplateDirectives", predicate: CellTemplateDirective, isSignal: true }, { propertyName: "headerFilters", predicate: HeaderFilterDirective, isSignal: true }], viewQueries: [{ propertyName: "columnFilterPopover", first: true, predicate: ["columnFilterPopover"], descendants: true, isSignal: true }, { propertyName: "editInput", first: true, predicate: ["editInput"], descendants: true, isSignal: true }, { propertyName: "rowMenuPopover", first: true, predicate: ["rowMenuPopover"], descendants: true, isSignal: true }, { propertyName: "columnPickerPopover", first: true, predicate: ["columnPickerPopover"], descendants: true, isSignal: true }, { propertyName: "cellTextPopover", first: true, predicate: ["cellTextPopover"], descendants: true, isSignal: true }, { propertyName: "scrollWrap", first: true, predicate: ["scrollWrap"], descendants: true, isSignal: true }, { propertyName: "hscrollProxy", first: true, predicate: ["hscrollProxy"], descendants: true, isSignal: true }, { propertyName: "tableHead", first: true, predicate: ["tableHead"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"table-toolbar\">\n <div class=\"toolbar-slot\">\n <ng-content select=\"[toolbar]\"></ng-content>\n </div>\n\n @if (exportButton()) {\n <ds-button\n color=\"neutral\"\n variant=\"outline\"\n size=\"sm\"\n [disabled]=\"exporting()\"\n (pressed)=\"runExport()\"\n >\n {{ exporting() ? 'Preparing\u2026' : 'Export CSV' }}\n </ds-button>\n }\n</div>\n\n<!-- Wraps the SCROLL CONTAINER, not the table inside it: the scrim is\n `position: absolute; inset: 0`, so from in there it is sized to one viewport of\n the table and scrolls away with the content. -->\n<ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, var(--_table-head-h, 40px))'\"\n [inertContent]=\"false\"\n>\n <div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\"\n >\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {{ statusMessage() }}\n </div>\n\n <table\n [class]=\"tableClasses()\"\n [style.--_table-virtual-row-h]=\"virtualRowHeight()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\"\n >\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead #tableHead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\"\n />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n @if (expandAllVisible()) {\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-label]=\"expandAllLabel()\"\n (click)=\"onToggleExpandAll()\"\n >\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"allExpanded()\"\n [size]=\"16\"\n />\n </button>\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.fit-content]=\"fitsContent(col)\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n [attr.data-col-key]=\"col.key\"\n (pointerenter)=\"onHeaderEnter($event, col)\"\n >\n @if (sortableCol(col)) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\"\n >\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\"\n >\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\"\n >\n <ds-icon\n name=\"filter\"\n [size]=\"12\"\n />\n </button>\n }\n\n @if (resizableColumns()) {\n @let range = resizeRange(col);\n\n <span\n class=\"col-resize\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Resize ' + col.label\"\n [attr.aria-valuenow]=\"range?.now ?? null\"\n [attr.aria-valuemin]=\"range?.min ?? null\"\n [attr.aria-valuemax]=\"range?.max ?? null\"\n (focus)=\"onResizeFocus(col, $event)\"\n (blur)=\"onResizeBlur()\"\n (pointerdown)=\"onResizeStart(col, $event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd()\"\n (pointercancel)=\"onResizeEnd()\"\n (keydown)=\"onResizeKey(col, $event)\"\n >\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\"\n >\n @if (hasColumnPicker()) {\n <button\n type=\"button\"\n class=\"col-picker-btn\"\n aria-haspopup=\"dialog\"\n aria-label=\"Choose columns\"\n [attr.aria-expanded]=\"columnPickerOpened()\"\n (click)=\"onColumnPickerClick($event)\"\n >\n <ds-icon\n name=\"grid\"\n [size]=\"14\"\n />\n </button>\n } @else {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- Matches what the scrim covers, which is everything below the header:\n a row keeps its tabindex and its Enter handler otherwise, so a keyboard\n user could open a row whose data is mid-replacement while the pointer\n was stopped by the scrim. The header stays live on purpose \u2014 re-sorting\n is what puts the scrim up in the first place. -->\n <tbody [attr.inert]=\"isOverlayLoading() ? '' : null\">\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: rowIndex }\"\n >\n </ng-container>\n }\n } @else if (showsEmptyRow()) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\"\n >\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padTop\"\n >\n </tr>\n }\n\n @for (slot of rowSlots(); track slot.index) {\n @if (slot.row; as row) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.stripe]=\"isStriped(slot.index)\"\n [class.active]=\"rowKey(row) === activeRowId()\"\n [attr.aria-current]=\"\n rowKey(row) === activeRowId() ? 'true' : null\n \"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\"\n >\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\"\n >\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\"\n />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n [class.interactive-cell]=\"col.interactive\"\n [class.fit-content]=\"fitsContent(col)\"\n (dblclick)=\"startEdit(row, col, $event)\"\n >\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\"\n />\n } @else if (cellTemplate(col); as tpl) {\n @if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- same pointer-only enhancement as the plain truncate branch below; the value stays in the DOM for AT -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"clipWidth(col)\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\"\n >\n </ng-container>\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\"\n >\n </ng-container>\n }\n } @else if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- pointer-only enhancement: the clip is visual (CSS ellipsis), keyboard/AT users already get the full DOM text + title; a tab stop per cell would wreck keyboard traversal -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"clipWidth(col)\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\"\n >\n @if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </span>\n } @else if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions() && hasActionsFor(row)) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ds-icon\n name=\"moreV\"\n [size]=\"16\"\n />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (\n expandableRows() &&\n isExpanded(row) &&\n rowExpandTemplate() &&\n !virtualizing()\n ) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n </td>\n </tr>\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: slot.index }\"\n >\n </ng-container>\n }\n }\n\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padBottom\"\n >\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n</ds-loading-overlay>\n\n@if (stickyScrollbarResolved()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\"\n >\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\"\n >\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSize]=\"showPageSize()\"\n [showLabel]=\"showLabel()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\"\n />\n </div>\n}\n\n@if (hasTruncate()) {\n <ds-popover #cellTextPopover>\n <div class=\"cell-text-pop\">\n {{ cellPopoverText() }}\n </div>\n </ds-popover>\n}\n\n@if (filterColumn()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\"\n >\n @if (headerFilterFor(filterColumn()!); as projected) {\n <div class=\"col-filter col-filter-custom\">\n <ng-container\n [ngTemplateOutlet]=\"projected.template\"\n [ngTemplateOutletContext]=\"headerFilterContext(filterColumn()!)\"\n />\n </div>\n } @else {\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search\u2026\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\"\n />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\"\n >\n Clear\n </button>\n </div>\n </div>\n }\n </ds-popover>\n}\n\n@if (hasColumnPicker()) {\n <ds-popover\n #columnPickerPopover\n align=\"end\"\n panelRole=\"dialog\"\n panelLabel=\"Column visibility\"\n >\n <ng-container [ngTemplateOutlet]=\"columnPanel\"></ng-container>\n </ds-popover>\n\n <ds-bottom-sheet\n title=\"Columns\"\n [(open)]=\"columnSheetOpen\"\n >\n <ng-container [ngTemplateOutlet]=\"columnPanel\"></ng-container>\n </ds-bottom-sheet>\n\n <ng-template #columnPanel>\n <div\n class=\"col-picker\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (\n col of orderedColumns();\n track col.key;\n let first = $first;\n let last = $last\n ) {\n <div\n class=\"col-picker-row\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderableColumns()\"\n >\n @if (reorderableColumns()) {\n <span\n class=\"col-drag\"\n cdkDragHandle\n aria-hidden=\"true\"\n >\n <ds-icon\n name=\"drag\"\n [size]=\"14\"\n />\n </span>\n }\n\n <label class=\"col-picker-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isColumnVisible(col)\"\n [disabled]=\"!col.hideable || isColumnLocked(col)\"\n (change)=\"toggleColumn(col)\"\n />\n {{ col.label }}\n </label>\n\n @if (resizableColumns()) {\n <span class=\"col-width\">\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Narrow ' + col.label\"\n (click)=\"onColumnWidthStep(col, -resizeStep)\"\n >\n <ds-icon\n name=\"minus\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Widen ' + col.label\"\n (click)=\"onColumnWidthStep(col, resizeStep)\"\n >\n <ds-icon\n name=\"plus\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn col-width-auto\"\n [attr.aria-label]=\"'Fit ' + col.label + ' to its content'\"\n (click)=\"onColumnWidthStep(col, 'auto')\"\n >\n Fit\n </button>\n </span>\n }\n\n @if (reorderableColumns()) {\n <span class=\"col-move\">\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move up\"\n [disabled]=\"first\"\n (click)=\"moveColumn(col, -1)\"\n >\n <ds-icon\n name=\"chevronUp\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move down\"\n [disabled]=\"last\"\n (click)=\"moveColumn(col, 1)\"\n >\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </button>\n </span>\n }\n </div>\n }\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"resetColumns()\"\n >\n Reset to default\n </button>\n </div>\n </ng-template>\n}\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\"\n >\n <ds-menu>\n @for (action of visibleRowActions(); track action.id) {\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n [description]=\"actionReason(action)\"\n (pressed)=\"onRowAction(action)\"\n >\n {{ action.label }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && someSelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n\n<!-- One skeleton row, shared by loading=\"skeleton\" and the gaps a lazy\n window has not filled yet. `$implicit` is the row's index: skeletonWidth\n varies the bar lengths from it, so a block of them does not read as a grid. -->\n<ng-template\n #skeletonRow\n let-rowIndex\n>\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </td>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n >\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:block;position:relative}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.bordered) .scroll-wrap{border:var(--border-width-default) solid var(--_table-border);border-radius:var(--_table-radius)}.scroll-wrap{--_table-border: var(--ds-table-border, var(--border-default));--_table-radius: var(--ds-table-radius, var(--ds-radius-control));--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));width:100%;overflow:auto hidden;-webkit-overflow-scrolling:touch;background:var(--surface-default);box-sizing:border-box}.scroll-wrap.scroll-y{overflow-y:auto}:host(.sticky-scrollbar) .scroll-wrap{scrollbar-width:none}:host(.sticky-scrollbar) .scroll-wrap::-webkit-scrollbar{display:none}:host(.resizable) thead th{position:relative;overflow:hidden}@media(hover:none)and (pointer:coarse){.col-resize{display:none}}.col-resize{position:absolute;inset-block:0;right:0;width:var(--space-2);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none}.col-resize:after{content:\"\";position:absolute;inset-block:var(--space-2);right:0;width:var(--border-width-default);background-color:transparent;transition:background-color var(--duration-fast) var(--ease-standard)}.col-resize:hover:after,.col-resize:active:after,.col-resize:focus-visible:after{background-color:var(--_table-sort-active-icon-color)}.col-resize:focus-visible{outline:none}.col-resize:focus-visible:after{width:var(--border-width-strong)}.hscroll-proxy{position:sticky;bottom:var(--ds-table-hscroll-bottom, 0);overflow:auto hidden}.hscroll-spacer{height:1px}.hscroll-hidden{display:none}.table{--_table-min-width: var(--ds-table-min-width, 0);--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));--_table-row-hover-bg-color: var(--ds-table-row-hover-bg-color, var(--surface-secondary));--_table-row-selected-bg-color: var(--ds-table-row-selected-bg-color, var(--accent-subtitle));--_table-row-pressed-bg-color: var(--ds-table-row-pressed-bg-color, var(--surface-muted));--_table-row-active-bg-color: var(--ds-table-row-active-bg-color, var(--accent-subtitle));--_table-row-stripe-bg-color: var(--ds-table-row-stripe-bg-color, var(--surface-secondary));--_table-cell-link-color: var(--ds-table-cell-link-color, var(--accent));--_table-cell-link-decoration: var(--ds-table-cell-link-decoration, underline);--_table-head-text-color: var(--ds-table-head-text-color, var(--text-secondary));--_table-head-bg-color: var(--ds-table-head-bg-color, var(--surface-secondary));--_table-head-fs: var(--ds-table-head-fs, var(--font-size-xs));--_table-divider: var(--ds-table-divider, var(--border-divider));--_table-sort-active-icon-color: var(--ds-table-sort-active-icon-color, var(--accent));--_table-icon-btn-color: var(--ds-table-icon-btn-color, var(--icon-default));--_table-icon-btn-color-hover: var(--ds-table-icon-btn-color-hover, var(--icon-strong));--_table-icon-btn-focus-color: var(--ds-table-icon-btn-focus-color, var(--accent));--_table-cell-pad-x: var(--ds-table-cell-pad-x, var(--table-cell-pad-x));--_table-cell-pad-y: var(--ds-table-cell-pad-y, var(--table-cell-pad-y));--_table-cell-pad-top: var(--ds-table-cell-pad-top, var(--_table-cell-pad-y));--_table-cell-pad-right: var(--ds-table-cell-pad-right, var(--_table-cell-pad-x));--_table-cell-pad-bottom: var(--ds-table-cell-pad-bottom, var(--_table-cell-pad-y));--_table-cell-pad-left: var(--ds-table-cell-pad-left, var(--_table-cell-pad-x));--_table-head-pad-top: var(--ds-table-head-pad-top, var(--table-head-pad-y));--_table-head-pad-bottom: var(--ds-table-head-pad-bottom, var(--table-head-pad-y));--_table-head-border-color: var(--ds-table-head-border-color, var(--_table-divider));--_table-head-weight: var(--ds-table-head-weight, var(--font-weight-bold));--_table-head-tracking: var(--ds-table-head-tracking, var(--letter-spacing-wider));width:100%;border-collapse:collapse;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--_table-bg-color)}.table th.fit-content,.table td.fit-content{width:1%;white-space:nowrap}.table thead th{text-align:left;padding:var(--_table-head-pad-top) var(--_table-cell-pad-right) var(--_table-head-pad-bottom) var(--_table-cell-pad-left);font:var(--_table-head-weight) var(--_table-head-fs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_table-head-tracking);text-transform:uppercase;color:var(--_table-head-text-color);background-color:var(--_table-head-bg-color);border-bottom:var(--border-width-default) solid var(--_table-head-border-color);white-space:nowrap}.table thead th .th-label{display:inline-flex;align-items:center;vertical-align:middle;appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-align:left}.table thead th button.th-label{cursor:pointer;-webkit-user-select:none;user-select:none;transition:color var(--duration-fast) var(--ease-standard)}.table thead th button.th-label:hover{color:var(--text-secondary)}.table thead th button.th-label:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset);border-radius:var(--radius-sm)}.table thead th .sort-icon{display:inline-block;width:var(--sort-ic-size);height:var(--sort-ic-size);margin-left:var(--sort-ic-gap);vertical-align:middle;transform:translateY(-1px);color:var(--icon-default);opacity:var(--sort-ic-opacity-idle);transition:opacity var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.table thead th .sort-icon .icon{width:var(--sort-ic-size);height:var(--sort-ic-size);display:block}.table thead th.sorted-asc .sort-icon,.table thead th.sorted-desc .sort-icon{opacity:1;color:var(--_table-sort-active-icon-color)}.table thead th.numeric{text-align:right}.table thead th.select-col,.table thead th.expand-col,.table thead th.actions-col{width:var(--space-10)}.table.sticky-header thead th{position:sticky;top:0}.table.sticky-header thead th:not(.pin-select,.pin-first,.pin-expand){z-index:var(--table-sticky-header-z)}.table tbody td{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left);line-height:var(--line-height-flat);transition:background-color var(--duration-fast) var(--ease-standard);box-shadow:inset 0 calc(-1 * var(--border-width-default)) 0 var(--_table-divider);vertical-align:middle}.table tbody td.numeric{text-align:right}.table tbody td.empty{text-align:center;color:var(--text-tertiary);padding:var(--space-4)}.table tbody tr:last-child td{box-shadow:none}.table tbody tr.clickable:not(.active):hover td{background-color:var(--_table-row-hover-bg-color)}.table tbody tr.clickable:hover td.interactive-cell,.table tbody tr td .cell-link{color:var(--_table-cell-link-color);text-decoration:var(--_table-cell-link-decoration)}.table tbody tr.selected td{background-color:var(--_table-row-selected-bg-color)}.table tbody tr.active td{background-color:var(--_table-row-active-bg-color)}.table tbody tr.clickable:active td{background-color:var(--_table-row-pressed-bg-color)}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}.table tbody .expand-col,.table tbody .actions-col{width:var(--space-10)}.table tbody .expand-panel-cell{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left)}.table tbody .cell-clip{display:block;overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}.table .expand-chev{display:block;transition:transform var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.table .expand-chev{transition:none}}.table .expand-chev.is-expanded{transform:rotate(90deg)}.table .expand-btn,.table .row-actions-btn,.table .col-picker-btn{display:flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);padding:0;border:0;background:none;cursor:pointer;color:var(--_table-icon-btn-color);border-radius:var(--ds-radius-inner);transition:color var(--duration-fast) var(--ease-standard)}.table .expand-btn:hover,.table .row-actions-btn:hover,.table .col-picker-btn:hover{color:var(--_table-icon-btn-color-hover)}.table .expand-btn:focus-visible,.table .row-actions-btn:focus-visible,.table .col-picker-btn:focus-visible{outline:var(--border-width-strong, 2px) solid var(--_table-icon-btn-focus-color);outline-offset:var(--focus-ring-offset)}.table.compact{--table-cell-pad-x: var(--space-3);--table-cell-pad-y: var(--space-2);--table-head-pad-y: var(--space-2)}.table{min-width:var(--_table-min-width)}.table.zebra:not(.virtual) tbody tr:nth-child(odd) td{background-color:var(--_table-row-stripe-bg-color)}.table.zebra.virtual tbody tr.stripe td{background-color:var(--_table-row-stripe-bg-color)}.table.virtual{table-layout:fixed}.table.virtual tbody tr:not(.spacer){height:var(--_table-virtual-row-h)}.table.virtual tbody td{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}.table tbody tr.spacer{padding:0;border:0;background:none}.table tbody tr.spacer:hover td{background-color:transparent}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--ds-radius-inner);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.col-width{display:inline-flex;gap:var(--space-1);align-items:center;margin-left:auto}.col-width-auto{width:auto;padding-inline:var(--space-2);font:var(--font-weight-medium) var(--font-size-xs)/var(--line-height-base) var(--font-sans)}.col-move{display:inline-flex;gap:var(--space-1)}.col-width-btn,.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer}.col-width-btn:hover:not(:disabled),.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-width-btn:disabled,.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}.col-filter-btn{display:inline-flex;margin-left:var(--space-1);padding:0;border:0;background:none;color:var(--icon-default);opacity:.5;cursor:pointer;vertical-align:middle;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.col-filter-btn:hover{opacity:1;color:var(--icon-strong)}.col-filter-btn.active{opacity:1;color:var(--_table-sort-active-icon-color)}.col-filter{display:grid;gap:var(--space-2);min-width:180px}.col-filter-search{width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--ds-radius-inner);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.col-filter-search:focus-visible{outline:0;border-color:var(--accent)}.col-filter-list{display:grid;gap:var(--space-1);max-height:240px;overflow-y:auto}.col-filter-option{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-filter-empty{color:var(--text-tertiary);font-size:var(--font-size-s);padding:var(--space-1) 0}.col-filter-footer{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-divider)}.col-filter-count{color:var(--text-tertiary);font-size:var(--font-size-xs)}.col-filter-footer .col-reset{margin-top:0}.editable-cell{cursor:text}.cell-edit{width:100%;box-sizing:border-box;margin:calc(-1 * var(--space-1)) 0;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--accent);border-radius:var(--ds-radius-inner);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.cell-edit:focus-visible{outline:0}.cell-text-pop{max-width:360px;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary)}:host(.pinned){--_table-select-w: var(--ds-table-select-col-w, var(--space-10))}:host(.pinned) .table{border-collapse:separate;border-spacing:0}:host(.pinned) .table tbody td{box-shadow:none;border-bottom:var(--border-width-default) solid var(--_table-divider)}:host(.pinned) .table tbody tr:last-child td{border-bottom:0}:host(.pinned) .pin-select,:host(.pinned) .pin-first{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned) thead .pin-select,:host(.pinned) thead .pin-first{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned) tbody tr.clickable:not(.active):hover .pin-first,:host(.pinned) tbody tr.clickable:not(.active):hover .pin-select{background-color:var(--_table-row-hover-bg-color)}:host(.pinned) tbody tr.selected .pin-first,:host(.pinned) tbody tr.selected .pin-select{background-color:var(--_table-row-selected-bg-color)}:host(.pinned) tbody tr.active .pin-first,:host(.pinned) tbody tr.active .pin-select{background-color:var(--_table-row-active-bg-color)}:host(.pinned) tbody tr.clickable:active .pin-first,:host(.pinned) tbody tr.clickable:active .pin-select{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.selectable) .pin-first{left:var(--_table-select-w)}:host(.pinned.expandable){--_table-expand-w: var(--ds-table-expand-col-w, var(--space-10))}:host(.pinned.expandable) .pin-expand{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned.expandable) thead .pin-expand{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned.expandable) tbody tr.clickable:not(.active):hover .pin-expand{background-color:var(--_table-row-hover-bg-color)}:host(.pinned.expandable) tbody tr.selected .pin-expand{background-color:var(--_table-row-selected-bg-color)}:host(.pinned.expandable) tbody tr.active .pin-expand{background-color:var(--_table-row-active-bg-color)}:host(.pinned.expandable) tbody tr.clickable:active .pin-expand{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.expandable) .pin-first{left:var(--_table-expand-w)}:host(.pinned.selectable.expandable) .pin-expand{left:var(--_table-select-w)}:host(.pinned.selectable.expandable) .pin-first{left:calc(var(--_table-select-w) + var(--_table-expand-w))}.pagination-footer{padding:var(--space-3) var(--ds-table-cell-pad-x, var(--table-cell-pad-x)) var(--space-3);border-top:var(--border-width-default) solid var(--ds-table-divider, var(--border-divider))}.bulk-bar{position:sticky;bottom:var(--bulk-bar-offset);display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--surface-inverted);color:var(--text-inverted);border-radius:var(--radius-lg);box-shadow:var(--shadow-toast);margin:var(--space-4) auto 0;width:fit-content}.bulk-bar .count{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans)}.bulk-bar .sep{width:var(--border-width-default);height:var(--space-4);background:var(--border-inverted)}.bulk-bar{--ds-button-label-color: var(--text-inverted);--ds-button-bg-color: transparent;--ds-button-bg-color-hover: var(--surface-inverted-hover);--ds-button-bg-color-active: var(--surface-inverted-hover)}.table-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-2)}.table-toolbar:not(:has(.toolbar-slot>*,>ds-button)){display:none}.toolbar-slot{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:var(--space-2);min-width:0}.toolbar-slot ::ng-deep>:only-child{flex:1 1 auto;min-width:0}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "size", "type", "disabled", "loading", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }, { kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline"] }, { kind: "component", type: PaginationComponent, selector: "ds-pagination", inputs: ["total", "pageSize", "currentPage", "pageSizeOptions", "showLabel", "showPageSize"], outputs: ["pageSizeChange", "currentPageChange"] }, { kind: "component", type: LoadingOverlayComponent, selector: "ds-loading-overlay", inputs: ["loading", "label", "blur", "spinnerSize", "insetTop", "inertContent"] }, { kind: "component", type: PopoverComponent, selector: "ds-popover", inputs: ["align", "placement", "arrow", "panelRole", "panelLabel"] }, { kind: "component", type: BottomSheetComponent, selector: "ds-bottom-sheet", inputs: ["open", "title", "snapPoints"], outputs: ["openChange", "closed"] }, { kind: "component", type: MenuComponent, selector: "ds-menu" }, { kind: "component", type: MenuItemComponent, selector: "ds-menu-item", inputs: ["icon", "disabled", "error", "quiet", "description", "submenu"], outputs: ["pressed"] }, { 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: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type:
|
|
1764
|
+
// Only instantiated when a column sets `link`, so a consumer app with no router
|
|
1765
|
+
// provided still renders the table — the directive is never constructed.
|
|
1766
|
+
RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
1767
|
+
}
|
|
1768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TableComponent, decorators: [{
|
|
1769
|
+
type: Component,
|
|
1770
|
+
args: [{ selector: 'ds-table', standalone: true, imports: [
|
|
1771
|
+
ButtonComponent,
|
|
1772
|
+
IconComponent,
|
|
1773
|
+
NgTemplateOutlet,
|
|
1774
|
+
SkeletonComponent,
|
|
1775
|
+
PaginationComponent,
|
|
1776
|
+
LoadingOverlayComponent,
|
|
1777
|
+
PopoverComponent,
|
|
1778
|
+
BottomSheetComponent,
|
|
1779
|
+
MenuComponent,
|
|
1780
|
+
MenuItemComponent,
|
|
1781
|
+
CdkDropList,
|
|
1782
|
+
CdkDrag,
|
|
1783
|
+
CdkDragHandle,
|
|
1784
|
+
// Only instantiated when a column sets `link`, so a consumer app with no router
|
|
1785
|
+
// provided still renders the table — the directive is never constructed.
|
|
1786
|
+
RouterLink,
|
|
1787
|
+
], encapsulation: ViewEncapsulation.Emulated, host: {
|
|
1788
|
+
'[class.bordered]': 'borderedResolved()',
|
|
1789
|
+
'[class.selectable]': 'selectable()',
|
|
1790
|
+
'[class.pinned]': 'stickyFirstColumn()',
|
|
1791
|
+
'[class.expandable]': 'expandableRows()',
|
|
1792
|
+
'[class.sticky-scrollbar]': 'stickyScrollbarResolved()',
|
|
1793
|
+
'[class.resizable]': 'resizableColumns()',
|
|
1794
|
+
}, template: "<div class=\"table-toolbar\">\n <div class=\"toolbar-slot\">\n <ng-content select=\"[toolbar]\"></ng-content>\n </div>\n\n @if (exportButton()) {\n <ds-button\n color=\"neutral\"\n variant=\"outline\"\n size=\"sm\"\n [disabled]=\"exporting()\"\n (pressed)=\"runExport()\"\n >\n {{ exporting() ? 'Preparing\u2026' : 'Export CSV' }}\n </ds-button>\n }\n</div>\n\n<!-- Wraps the SCROLL CONTAINER, not the table inside it: the scrim is\n `position: absolute; inset: 0`, so from in there it is sized to one viewport of\n the table and scrolls away with the content. -->\n<ds-loading-overlay\n [loading]=\"isOverlayLoading()\"\n [blur]=\"true\"\n [insetTop]=\"'var(--ds-table-head-h, var(--_table-head-h, 40px))'\"\n [inertContent]=\"false\"\n>\n <div\n #scrollWrap\n class=\"scroll-wrap\"\n [class.scroll-y]=\"maxHeight()\"\n [style.max-height]=\"maxHeight()\"\n >\n <div\n class=\"visually-hidden\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {{ statusMessage() }}\n </div>\n\n <table\n [class]=\"tableClasses()\"\n [style.--_table-virtual-row-h]=\"virtualRowHeight()\"\n [attr.role]=\"rowInteractive() ? 'grid' : null\"\n [attr.aria-busy]=\"loading() !== false ? 'true' : null\"\n >\n @if (caption()) {\n <caption class=\"visually-hidden\">\n {{\n caption()\n }}\n </caption>\n }\n\n <thead #tableHead>\n <tr>\n @if (selectable()) {\n <th\n scope=\"col\"\n class=\"select-col pin-select\"\n >\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"selectAllLabel()\"\n [checked]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (change)=\"onToggleAll($event)\"\n />\n </th>\n }\n\n @if (expandableRows()) {\n <th\n scope=\"col\"\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n @if (expandAllVisible()) {\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-label]=\"expandAllLabel()\"\n (click)=\"onToggleExpandAll()\"\n >\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"allExpanded()\"\n [size]=\"16\"\n />\n </button>\n }\n </th>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <th\n scope=\"col\"\n [class]=\"headerClasses(col)\"\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.fit-content]=\"fitsContent(col)\"\n [style.width.px]=\"columnWidth(col)\"\n [style.min-width.px]=\"columnWidth(col)\"\n [style.max-width.px]=\"columnWidth(col)\"\n [attr.aria-sort]=\"ariaSort(col)\"\n [attr.data-col-key]=\"col.key\"\n (pointerenter)=\"onHeaderEnter($event, col)\"\n >\n @if (sortableCol(col)) {\n <button\n type=\"button\"\n class=\"th-label\"\n (click)=\"onSort(col)\"\n >\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n\n <ds-icon\n class=\"sort-icon\"\n [name]=\"sortIcon(col)\"\n [size]=\"12\"\n >\n </ds-icon>\n </button>\n } @else {\n <span class=\"th-label\">\n @if (col.label) {\n {{ col.label }}\n } @else if (col.srLabel) {\n <span class=\"visually-hidden\">\n {{ col.srLabel }}\n </span>\n }\n </span>\n }\n\n @if (hasColumnFilter(col)) {\n <button\n type=\"button\"\n class=\"col-filter-btn\"\n aria-haspopup=\"dialog\"\n [class.active]=\"isColumnFiltered(col)\"\n [attr.aria-label]=\"'Filter ' + col.label\"\n (click)=\"onColumnFilterClick(col, $event)\"\n >\n <ds-icon\n name=\"filter\"\n [size]=\"12\"\n />\n </button>\n }\n\n @if (resizableColumns()) {\n @let range = resizeRange(col);\n\n <span\n class=\"col-resize\"\n role=\"separator\"\n tabindex=\"0\"\n aria-orientation=\"vertical\"\n [attr.aria-label]=\"'Resize ' + col.label\"\n [attr.aria-valuenow]=\"range?.now ?? null\"\n [attr.aria-valuemin]=\"range?.min ?? null\"\n [attr.aria-valuemax]=\"range?.max ?? null\"\n (focus)=\"onResizeFocus(col, $event)\"\n (blur)=\"onResizeBlur()\"\n (pointerdown)=\"onResizeStart(col, $event)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd()\"\n (pointercancel)=\"onResizeEnd()\"\n (keydown)=\"onResizeKey(col, $event)\"\n >\n </span>\n }\n </th>\n }\n\n @if (hasUtilityColumn()) {\n <th\n scope=\"col\"\n class=\"actions-col\"\n >\n @if (hasColumnPicker()) {\n <button\n type=\"button\"\n class=\"col-picker-btn\"\n aria-haspopup=\"dialog\"\n aria-label=\"Choose columns\"\n [attr.aria-expanded]=\"columnPickerOpened()\"\n (click)=\"onColumnPickerClick($event)\"\n >\n <ds-icon\n name=\"grid\"\n [size]=\"14\"\n />\n </button>\n } @else {\n <span class=\"visually-hidden\">\n Actions\n </span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <!-- Matches what the scrim covers, which is everything below the header:\n a row keeps its tabindex and its Enter handler otherwise, so a keyboard\n user could open a row whose data is mid-replacement while the pointer\n was stopped by the scrim. The header stays live on purpose \u2014 re-sorting\n is what puts the scrim up in the first place. -->\n <tbody [attr.inert]=\"isOverlayLoading() ? '' : null\">\n @if (isSkeletonLoading()) {\n @for (_ of skeletonArray(); track $index; let rowIndex = $index) {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: rowIndex }\"\n >\n </ng-container>\n }\n } @else if (showsEmptyRow()) {\n <tr>\n <td\n class=\"empty\"\n [attr.colspan]=\"expandedColspan()\"\n >\n @if (emptyTemplate()) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate()!\">\n </ng-container>\n } @else {\n <ng-content select=\"[empty]\"></ng-content>\n }\n </td>\n </tr>\n } @else {\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padTop\"\n >\n </tr>\n }\n\n @for (slot of rowSlots(); track slot.index) {\n @if (slot.row; as row) {\n <tr\n [class.selected]=\"isSelected(row)\"\n [class.expanded]=\"isExpanded(row)\"\n [class.clickable]=\"rowInteractive()\"\n [class.stripe]=\"isStriped(slot.index)\"\n [class.active]=\"rowKey(row) === activeRowId()\"\n [attr.aria-current]=\"\n rowKey(row) === activeRowId() ? 'true' : null\n \"\n [attr.tabindex]=\"rowInteractive() ? 0 : null\"\n [attr.aria-label]=\"rowInteractive() ? rowAriaLabel(row) : null\"\n (mousedown)=\"onRowMousedown()\"\n (click)=\"onRowClick(row, $event)\"\n (keydown.enter)=\"onRowKey(row, $event)\"\n (keydown.space)=\"onRowKey(row, $event)\"\n >\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [attr.aria-label]=\"'Select ' + rowAriaLabel(row)\"\n [checked]=\"isSelected(row)\"\n (change)=\"onToggleRow(row, $event)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n <button\n type=\"button\"\n class=\"expand-btn\"\n [attr.aria-expanded]=\"isExpanded(row)\"\n [attr.aria-label]=\"\n isExpanded(row) ? 'Collapse row' : 'Expand row'\n \"\n (click)=\"onToggleExpand(row, $event)\"\n >\n <ds-icon\n class=\"expand-chev\"\n name=\"chevronRight\"\n [class.is-expanded]=\"isExpanded(row)\"\n [size]=\"16\"\n />\n </button>\n </td>\n }\n\n @for (\n col of visibleColumns();\n track col.key;\n let first = $first\n ) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n [class.editable-cell]=\"col.editable\"\n [class.interactive-cell]=\"col.interactive\"\n [class.fit-content]=\"fitsContent(col)\"\n (dblclick)=\"startEdit(row, col, $event)\"\n >\n @if (isEditing(row, col)) {\n <input\n #editInput\n type=\"text\"\n class=\"cell-edit\"\n [value]=\"editDraft()\"\n (input)=\"onEditInput($event)\"\n (click)=\"$event.stopPropagation()\"\n (keydown.enter)=\"commitEdit(row, col)\"\n (keydown.escape)=\"cancelEdit()\"\n (blur)=\"commitEdit(row, col)\"\n />\n } @else if (cellTemplate(col); as tpl) {\n @if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- same pointer-only enhancement as the plain truncate branch below; the value stays in the DOM for AT -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"clipWidth(col)\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\"\n >\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\"\n >\n </ng-container>\n </span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: row,\n row: row,\n }\"\n >\n </ng-container>\n }\n } @else if (col.truncate) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- pointer-only enhancement: the clip is visual (CSS ellipsis), keyboard/AT users already get the full DOM text + title; a tab stop per cell would wreck keyboard traversal -->\n <span\n class=\"cell-clip\"\n [style.max-width.px]=\"clipWidth(col)\"\n [attr.title]=\"cellValue(row, col)\"\n (click)=\"onCellClipClick(row, col, $event)\"\n >\n @if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </span>\n } @else if (cellLink(row, col); as target) {\n <a\n class=\"cell-link\"\n [routerLink]=\"target\"\n (click)=\"$event.stopPropagation()\"\n >\n {{ cellValue(row, col) }}\n </a>\n } @else {\n {{ cellValue(row, col) }}\n }\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\">\n @if (hasRowActions() && hasActionsFor(row)) {\n <button\n type=\"button\"\n class=\"row-actions-btn\"\n aria-haspopup=\"menu\"\n [attr.aria-expanded]=\"isMenuOpenFor(row)\"\n [attr.aria-label]=\"'Actions for ' + rowAriaLabel(row)\"\n (click)=\"onRowMenuClick(row, $event)\"\n (keydown.enter)=\"$event.stopPropagation()\"\n (keydown.space)=\"$event.stopPropagation()\"\n >\n <ds-icon\n name=\"moreV\"\n [size]=\"16\"\n />\n </button>\n }\n </td>\n }\n </tr>\n\n @if (\n expandableRows() &&\n isExpanded(row) &&\n rowExpandTemplate() &&\n !virtualizing()\n ) {\n <tr class=\"expand-panel-row\">\n <td\n class=\"expand-panel-cell\"\n [attr.colspan]=\"expandedColspan()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"rowExpandTemplate()!\"\n [ngTemplateOutletContext]=\"{ $implicit: row, row: row }\"\n >\n </ng-container>\n </td>\n </tr>\n }\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"skeletonRow\"\n [ngTemplateOutletContext]=\"{ $implicit: slot.index }\"\n >\n </ng-container>\n }\n }\n\n @if (virtualWindow(); as window) {\n <tr\n class=\"spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"window.padBottom\"\n >\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n</ds-loading-overlay>\n\n@if (stickyScrollbarResolved()) {\n <div\n #hscrollProxy\n class=\"hscroll-proxy\"\n aria-hidden=\"true\"\n [class.hscroll-hidden]=\"!hscrollNeeded()\"\n >\n <div\n class=\"hscroll-spacer\"\n [style.width.px]=\"hscrollContentWidth()\"\n >\n </div>\n </div>\n}\n\n@if (pageSize(); as size) {\n <div class=\"pagination-footer\">\n <ds-pagination\n [total]=\"total() ?? filteredData().length\"\n [pageSize]=\"size\"\n [pageSizeOptions]=\"pageSizeOptions()\"\n [showPageSize]=\"showPageSize()\"\n [showLabel]=\"showLabel()\"\n [(currentPage)]=\"page\"\n (pageSizeChange)=\"pageSize.set($event)\"\n />\n </div>\n}\n\n@if (hasTruncate()) {\n <ds-popover #cellTextPopover>\n <div class=\"cell-text-pop\">\n {{ cellPopoverText() }}\n </div>\n </ds-popover>\n}\n\n@if (filterColumn()) {\n <ds-popover\n #columnFilterPopover\n align=\"start\"\n panelRole=\"dialog\"\n panelLabel=\"Filter values\"\n >\n @if (headerFilterFor(filterColumn()!); as projected) {\n <div class=\"col-filter col-filter-custom\">\n <ng-container\n [ngTemplateOutlet]=\"projected.template\"\n [ngTemplateOutletContext]=\"headerFilterContext(filterColumn()!)\"\n />\n </div>\n } @else {\n <div class=\"col-filter\">\n <input\n type=\"text\"\n class=\"col-filter-search\"\n placeholder=\"Search\u2026\"\n [value]=\"filterSearch()\"\n (input)=\"onFilterSearch($event)\"\n (click)=\"$event.stopPropagation()\"\n />\n\n <div class=\"col-filter-list\">\n @for (value of filterValues(); track value) {\n <label class=\"col-filter-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isFilterValueChecked(value)\"\n (change)=\"toggleFilterValue(value)\"\n />\n {{ value || '(empty)' }}\n </label>\n } @empty {\n <div class=\"col-filter-empty\">\n No matches\n </div>\n }\n </div>\n\n <div class=\"col-filter-footer\">\n <span class=\"col-filter-count\">\n {{ filterSelectedCount() }} selected\n </span>\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"clearColumnFilter()\"\n >\n Clear\n </button>\n </div>\n </div>\n }\n </ds-popover>\n}\n\n@if (hasColumnPicker()) {\n <ds-popover\n #columnPickerPopover\n align=\"end\"\n panelRole=\"dialog\"\n panelLabel=\"Column visibility\"\n >\n <ng-container [ngTemplateOutlet]=\"columnPanel\"></ng-container>\n </ds-popover>\n\n <ds-bottom-sheet\n title=\"Columns\"\n [(open)]=\"columnSheetOpen\"\n >\n <ng-container [ngTemplateOutlet]=\"columnPanel\"></ng-container>\n </ds-bottom-sheet>\n\n <ng-template #columnPanel>\n <div\n class=\"col-picker\"\n cdkDropList\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @for (\n col of orderedColumns();\n track col.key;\n let first = $first;\n let last = $last\n ) {\n <div\n class=\"col-picker-row\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderableColumns()\"\n >\n @if (reorderableColumns()) {\n <span\n class=\"col-drag\"\n cdkDragHandle\n aria-hidden=\"true\"\n >\n <ds-icon\n name=\"drag\"\n [size]=\"14\"\n />\n </span>\n }\n\n <label class=\"col-picker-option\">\n <input\n type=\"checkbox\"\n class=\"check\"\n [checked]=\"isColumnVisible(col)\"\n [disabled]=\"!col.hideable || isColumnLocked(col)\"\n (change)=\"toggleColumn(col)\"\n />\n {{ col.label }}\n </label>\n\n @if (resizableColumns()) {\n <span class=\"col-width\">\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Narrow ' + col.label\"\n (click)=\"onColumnWidthStep(col, -resizeStep)\"\n >\n <ds-icon\n name=\"minus\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn\"\n [attr.aria-label]=\"'Widen ' + col.label\"\n (click)=\"onColumnWidthStep(col, resizeStep)\"\n >\n <ds-icon\n name=\"plus\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-width-btn col-width-auto\"\n [attr.aria-label]=\"'Fit ' + col.label + ' to its content'\"\n (click)=\"onColumnWidthStep(col, 'auto')\"\n >\n Fit\n </button>\n </span>\n }\n\n @if (reorderableColumns()) {\n <span class=\"col-move\">\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move up\"\n [disabled]=\"first\"\n (click)=\"moveColumn(col, -1)\"\n >\n <ds-icon\n name=\"chevronUp\"\n [size]=\"14\"\n />\n </button>\n\n <button\n type=\"button\"\n class=\"col-move-btn\"\n aria-label=\"Move down\"\n [disabled]=\"last\"\n (click)=\"moveColumn(col, 1)\"\n >\n <ds-icon\n name=\"chevronDown\"\n [size]=\"14\"\n />\n </button>\n </span>\n }\n </div>\n }\n\n <button\n type=\"button\"\n class=\"col-reset\"\n (click)=\"resetColumns()\"\n >\n Reset to default\n </button>\n </div>\n </ng-template>\n}\n\n@if (hasRowActions()) {\n <ds-popover\n #rowMenuPopover\n align=\"end\"\n >\n <ds-menu>\n @for (action of visibleRowActions(); track action.id) {\n <ds-menu-item\n [icon]=\"action.icon ?? null\"\n [error]=\"action.error ?? false\"\n [disabled]=\"isActionDisabled(action)\"\n [description]=\"actionReason(action)\"\n (pressed)=\"onRowAction(action)\"\n >\n {{ action.label }}\n </ds-menu-item>\n }\n </ds-menu>\n </ds-popover>\n}\n\n@if (selectable() && someSelected()) {\n <div class=\"bulk-bar\">\n <span class=\"count\">\n {{ selectedIds().size }} selected\n </span>\n\n <span class=\"sep\"></span>\n\n <ng-content select=\"[bulk-actions]\"></ng-content>\n </div>\n}\n\n<!-- One skeleton row, shared by loading=\"skeleton\" and the gaps a lazy\n window has not filled yet. `$implicit` is the row's index: skeletonWidth\n varies the bar lengths from it, so a block of them does not read as a grid. -->\n<ng-template\n #skeletonRow\n let-rowIndex\n>\n <tr>\n @if (selectable()) {\n <td class=\"select-col pin-select\">\n <ds-skeleton\n width=\"14px\"\n height=\"14px\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (expandableRows()) {\n <td\n class=\"expand-col\"\n [class.pin-expand]=\"stickyFirstColumn()\"\n >\n </td>\n }\n\n @for (col of visibleColumns(); track col.key; let first = $first) {\n <td\n [class.numeric]=\"col.align === 'right'\"\n [class.pin-first]=\"first && stickyFirstColumn()\"\n >\n <ds-skeleton\n height=\"14px\"\n [width]=\"skeletonWidth(col, rowIndex)\"\n [inline]=\"true\"\n />\n </td>\n }\n\n @if (hasUtilityColumn()) {\n <td class=\"actions-col\"></td>\n }\n </tr>\n</ng-template>\n", styles: ["@charset \"UTF-8\";:host{display:block;position:relative}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}:host(.bordered) .scroll-wrap{border:var(--border-width-default) solid var(--_table-border);border-radius:var(--_table-radius)}.scroll-wrap{--_table-border: var(--ds-table-border, var(--border-default));--_table-radius: var(--ds-table-radius, var(--ds-radius-control));--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));width:100%;overflow:auto hidden;-webkit-overflow-scrolling:touch;background:var(--surface-default);box-sizing:border-box}.scroll-wrap.scroll-y{overflow-y:auto}:host(.sticky-scrollbar) .scroll-wrap{scrollbar-width:none}:host(.sticky-scrollbar) .scroll-wrap::-webkit-scrollbar{display:none}:host(.resizable) thead th{position:relative;overflow:hidden}@media(hover:none)and (pointer:coarse){.col-resize{display:none}}.col-resize{position:absolute;inset-block:0;right:0;width:var(--space-2);cursor:col-resize;touch-action:none;-webkit-user-select:none;user-select:none}.col-resize:after{content:\"\";position:absolute;inset-block:var(--space-2);right:0;width:var(--border-width-default);background-color:transparent;transition:background-color var(--duration-fast) var(--ease-standard)}.col-resize:hover:after,.col-resize:active:after,.col-resize:focus-visible:after{background-color:var(--_table-sort-active-icon-color)}.col-resize:focus-visible{outline:none}.col-resize:focus-visible:after{width:var(--border-width-strong)}.hscroll-proxy{position:sticky;bottom:var(--ds-table-hscroll-bottom, 0);overflow:auto hidden}.hscroll-spacer{height:1px}.hscroll-hidden{display:none}.table{--_table-min-width: var(--ds-table-min-width, 0);--_table-bg-color: var(--ds-table-bg-color, var(--surface-default));--_table-row-hover-bg-color: var(--ds-table-row-hover-bg-color, var(--surface-secondary));--_table-row-selected-bg-color: var(--ds-table-row-selected-bg-color, var(--accent-subtitle));--_table-row-pressed-bg-color: var(--ds-table-row-pressed-bg-color, var(--surface-muted));--_table-row-active-bg-color: var(--ds-table-row-active-bg-color, var(--accent-subtitle));--_table-row-stripe-bg-color: var(--ds-table-row-stripe-bg-color, var(--surface-secondary));--_table-cell-link-color: var(--ds-table-cell-link-color, var(--accent));--_table-cell-link-decoration: var(--ds-table-cell-link-decoration, underline);--_table-head-text-color: var(--ds-table-head-text-color, var(--text-secondary));--_table-head-bg-color: var(--ds-table-head-bg-color, var(--surface-secondary));--_table-head-fs: var(--ds-table-head-fs, var(--font-size-xs));--_table-divider: var(--ds-table-divider, var(--border-divider));--_table-sort-active-icon-color: var(--ds-table-sort-active-icon-color, var(--accent));--_table-icon-btn-color: var(--ds-table-icon-btn-color, var(--icon-default));--_table-icon-btn-color-hover: var(--ds-table-icon-btn-color-hover, var(--icon-strong));--_table-icon-btn-focus-color: var(--ds-table-icon-btn-focus-color, var(--accent));--_table-cell-pad-x: var(--ds-table-cell-pad-x, var(--table-cell-pad-x));--_table-cell-pad-y: var(--ds-table-cell-pad-y, var(--table-cell-pad-y));--_table-cell-pad-top: var(--ds-table-cell-pad-top, var(--_table-cell-pad-y));--_table-cell-pad-right: var(--ds-table-cell-pad-right, var(--_table-cell-pad-x));--_table-cell-pad-bottom: var(--ds-table-cell-pad-bottom, var(--_table-cell-pad-y));--_table-cell-pad-left: var(--ds-table-cell-pad-left, var(--_table-cell-pad-x));--_table-head-pad-top: var(--ds-table-head-pad-top, var(--table-head-pad-y));--_table-head-pad-bottom: var(--ds-table-head-pad-bottom, var(--table-head-pad-y));--_table-head-border-color: var(--ds-table-head-border-color, var(--_table-divider));--_table-head-weight: var(--ds-table-head-weight, var(--font-weight-bold));--_table-head-tracking: var(--ds-table-head-tracking, var(--letter-spacing-wider));width:100%;border-collapse:collapse;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--_table-bg-color)}.table th.fit-content,.table td.fit-content{width:1%;white-space:nowrap}.table thead th{text-align:left;padding:var(--_table-head-pad-top) var(--_table-cell-pad-right) var(--_table-head-pad-bottom) var(--_table-cell-pad-left);font:var(--_table-head-weight) var(--_table-head-fs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--_table-head-tracking);text-transform:uppercase;color:var(--_table-head-text-color);background-color:var(--_table-head-bg-color);border-bottom:var(--border-width-default) solid var(--_table-head-border-color);white-space:nowrap}.table thead th .th-label{display:inline-flex;align-items:center;vertical-align:middle;appearance:none;background:none;border:0;margin:0;padding:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;text-align:left}.table thead th button.th-label{cursor:pointer;-webkit-user-select:none;user-select:none;transition:color var(--duration-fast) var(--ease-standard)}.table thead th button.th-label:hover{color:var(--text-secondary)}.table thead th button.th-label:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:var(--focus-ring-offset);border-radius:var(--radius-sm)}.table thead th .sort-icon{display:inline-block;width:var(--sort-ic-size);height:var(--sort-ic-size);margin-left:var(--sort-ic-gap);vertical-align:middle;transform:translateY(-1px);color:var(--icon-default);opacity:var(--sort-ic-opacity-idle);transition:opacity var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard)}.table thead th .sort-icon .icon{width:var(--sort-ic-size);height:var(--sort-ic-size);display:block}.table thead th.sorted-asc .sort-icon,.table thead th.sorted-desc .sort-icon{opacity:1;color:var(--_table-sort-active-icon-color)}.table thead th.numeric{text-align:right}.table thead th.select-col,.table thead th.expand-col,.table thead th.actions-col{width:var(--space-10)}.table.sticky-header thead th{position:sticky;top:0}.table.sticky-header thead th:not(.pin-select,.pin-first,.pin-expand){z-index:var(--table-sticky-header-z)}.table tbody td{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left);line-height:var(--line-height-flat);transition:background-color var(--duration-fast) var(--ease-standard);box-shadow:inset 0 calc(-1 * var(--border-width-default)) 0 var(--_table-divider);vertical-align:middle}.table tbody td.numeric{text-align:right}.table tbody td.empty{text-align:center;color:var(--text-tertiary);padding:var(--space-4)}.table tbody tr:last-child td{box-shadow:none}.table tbody tr.clickable:not(.active):hover td{background-color:var(--_table-row-hover-bg-color)}.table tbody tr.clickable:hover td.interactive-cell,.table tbody tr td .cell-link{color:var(--_table-cell-link-color);text-decoration:var(--_table-cell-link-decoration)}.table tbody tr.selected td{background-color:var(--_table-row-selected-bg-color)}.table tbody tr.active td{background-color:var(--_table-row-active-bg-color)}.table tbody tr.clickable:active td{background-color:var(--_table-row-pressed-bg-color)}.table tbody tr.clickable{cursor:pointer}.table tbody tr.clickable:focus-visible{outline:var(--border-width-strong, 2px) solid var(--accent);outline-offset:-2px}.table tbody .expand-col,.table tbody .actions-col{width:var(--space-10)}.table tbody .expand-panel-cell{padding:var(--_table-cell-pad-top) var(--_table-cell-pad-right) var(--_table-cell-pad-bottom) var(--_table-cell-pad-left)}.table tbody .cell-clip{display:block;overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}.table .expand-chev{display:block;transition:transform var(--duration-base) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.table .expand-chev{transition:none}}.table .expand-chev.is-expanded{transform:rotate(90deg)}.table .expand-btn,.table .row-actions-btn,.table .col-picker-btn{display:flex;align-items:center;justify-content:center;width:var(--space-6);height:var(--space-6);padding:0;border:0;background:none;cursor:pointer;color:var(--_table-icon-btn-color);border-radius:var(--ds-radius-inner);transition:color var(--duration-fast) var(--ease-standard)}.table .expand-btn:hover,.table .row-actions-btn:hover,.table .col-picker-btn:hover{color:var(--_table-icon-btn-color-hover)}.table .expand-btn:focus-visible,.table .row-actions-btn:focus-visible,.table .col-picker-btn:focus-visible{outline:var(--border-width-strong, 2px) solid var(--_table-icon-btn-focus-color);outline-offset:var(--focus-ring-offset)}.table.compact{--table-cell-pad-x: var(--space-3);--table-cell-pad-y: var(--space-2);--table-head-pad-y: var(--space-2)}.table{min-width:var(--_table-min-width)}.table.zebra:not(.virtual) tbody tr:nth-child(odd) td{background-color:var(--_table-row-stripe-bg-color)}.table.zebra.virtual tbody tr.stripe td{background-color:var(--_table-row-stripe-bg-color)}.table.virtual{table-layout:fixed}.table.virtual tbody tr:not(.spacer){height:var(--_table-virtual-row-h)}.table.virtual tbody td{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}.table tbody tr.spacer{padding:0;border:0;background:none}.table tbody tr.spacer:hover td{background-color:transparent}.col-picker{display:grid;gap:var(--space-2);min-width:160px}.col-picker-row{display:flex;align-items:center;gap:var(--space-2)}.col-picker-row.cdk-drag-preview{background-color:var(--surface-default);border-radius:var(--ds-radius-inner);box-shadow:var(--shadow-popover);padding:var(--space-1) var(--space-2)}.col-picker-row.cdk-drag-placeholder{opacity:.4}.col-picker.cdk-drop-list-dragging .col-picker-row:not(.cdk-drag-placeholder){transition:transform var(--duration-fast) var(--ease-standard)}.col-drag{display:inline-flex;color:var(--icon-default);cursor:grab}.col-drag:active{cursor:grabbing}.col-picker-option{display:flex;align-items:center;gap:var(--space-2);flex:1;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-picker-option:has(input:disabled){color:var(--text-tertiary);cursor:default}.col-width{display:inline-flex;gap:var(--space-1);align-items:center;margin-left:auto}.col-width-auto{width:auto;padding-inline:var(--space-2);font:var(--font-weight-medium) var(--font-size-xs)/var(--line-height-base) var(--font-sans)}.col-move{display:inline-flex;gap:var(--space-1)}.col-width-btn,.col-move-btn{display:inline-flex;padding:0;border:0;background:none;color:var(--icon-default);cursor:pointer}.col-width-btn:hover:not(:disabled),.col-move-btn:hover:not(:disabled){color:var(--icon-strong)}.col-width-btn:disabled,.col-move-btn:disabled{color:var(--text-disabled);cursor:default}.col-reset{margin-top:var(--space-1);padding:0;border:0;background:none;color:var(--accent);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);cursor:pointer;text-align:left}.col-reset:hover{text-decoration:underline}.col-filter-btn{display:inline-flex;margin-left:var(--space-1);padding:0;border:0;background:none;color:var(--icon-default);opacity:.5;cursor:pointer;vertical-align:middle;transition:color var(--duration-fast) var(--ease-standard),opacity var(--duration-fast) var(--ease-standard)}.col-filter-btn:hover{opacity:1;color:var(--icon-strong)}.col-filter-btn.active{opacity:1;color:var(--_table-sort-active-icon-color)}.col-filter{display:grid;gap:var(--space-2);min-width:180px}.col-filter-search{width:100%;box-sizing:border-box;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--border-default);border-radius:var(--ds-radius-inner);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.col-filter-search:focus-visible{outline:0;border-color:var(--accent)}.col-filter-list{display:grid;gap:var(--space-1);max-height:240px;overflow-y:auto}.col-filter-option{display:flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);cursor:pointer}.col-filter-empty{color:var(--text-tertiary);font-size:var(--font-size-s);padding:var(--space-1) 0}.col-filter-footer{display:flex;align-items:center;justify-content:space-between;padding-top:var(--space-1);border-top:var(--border-width-default) solid var(--border-divider)}.col-filter-count{color:var(--text-tertiary);font-size:var(--font-size-xs)}.col-filter-footer .col-reset{margin-top:0}.editable-cell{cursor:text}.cell-edit{width:100%;box-sizing:border-box;margin:calc(-1 * var(--space-1)) 0;padding:var(--space-1) var(--space-2);border:var(--border-width-default) solid var(--accent);border-radius:var(--ds-radius-inner);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary);background-color:var(--surface-default)}.cell-edit:focus-visible{outline:0}.cell-text-pop{max-width:360px;overflow-wrap:anywhere;font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--text-primary)}:host(.pinned){--_table-select-w: var(--ds-table-select-col-w, var(--space-10))}:host(.pinned) .table{border-collapse:separate;border-spacing:0}:host(.pinned) .table tbody td{box-shadow:none;border-bottom:var(--border-width-default) solid var(--_table-divider)}:host(.pinned) .table tbody tr:last-child td{border-bottom:0}:host(.pinned) .pin-select,:host(.pinned) .pin-first{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned) thead .pin-select,:host(.pinned) thead .pin-first{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned) tbody tr.clickable:not(.active):hover .pin-first,:host(.pinned) tbody tr.clickable:not(.active):hover .pin-select{background-color:var(--_table-row-hover-bg-color)}:host(.pinned) tbody tr.selected .pin-first,:host(.pinned) tbody tr.selected .pin-select{background-color:var(--_table-row-selected-bg-color)}:host(.pinned) tbody tr.active .pin-first,:host(.pinned) tbody tr.active .pin-select{background-color:var(--_table-row-active-bg-color)}:host(.pinned) tbody tr.clickable:active .pin-first,:host(.pinned) tbody tr.clickable:active .pin-select{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.selectable) .pin-first{left:var(--_table-select-w)}:host(.pinned.expandable){--_table-expand-w: var(--ds-table-expand-col-w, var(--space-10))}:host(.pinned.expandable) .pin-expand{position:sticky;left:0;z-index:var(--table-sticky-col-z);background-color:var(--_table-bg-color)}:host(.pinned.expandable) thead .pin-expand{z-index:var(--table-sticky-corner-z);background-color:var(--_table-head-bg-color)}:host(.pinned.expandable) tbody tr.clickable:not(.active):hover .pin-expand{background-color:var(--_table-row-hover-bg-color)}:host(.pinned.expandable) tbody tr.selected .pin-expand{background-color:var(--_table-row-selected-bg-color)}:host(.pinned.expandable) tbody tr.active .pin-expand{background-color:var(--_table-row-active-bg-color)}:host(.pinned.expandable) tbody tr.clickable:active .pin-expand{background-color:var(--_table-row-pressed-bg-color)}:host(.pinned.expandable) .pin-first{left:var(--_table-expand-w)}:host(.pinned.selectable.expandable) .pin-expand{left:var(--_table-select-w)}:host(.pinned.selectable.expandable) .pin-first{left:calc(var(--_table-select-w) + var(--_table-expand-w))}.pagination-footer{padding:var(--space-3) var(--ds-table-cell-pad-x, var(--table-cell-pad-x)) var(--space-3);border-top:var(--border-width-default) solid var(--ds-table-divider, var(--border-divider))}.bulk-bar{position:sticky;bottom:var(--bulk-bar-offset);display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:var(--surface-inverted);color:var(--text-inverted);border-radius:var(--radius-lg);box-shadow:var(--shadow-toast);margin:var(--space-4) auto 0;width:fit-content}.bulk-bar .count{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-flat) var(--font-sans)}.bulk-bar .sep{width:var(--border-width-default);height:var(--space-4);background:var(--border-inverted)}.bulk-bar{--ds-button-label-color: var(--text-inverted);--ds-button-bg-color: transparent;--ds-button-bg-color-hover: var(--surface-inverted-hover);--ds-button-bg-color-active: var(--surface-inverted-hover)}.table-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-2);margin-bottom:var(--space-2)}.table-toolbar:not(:has(.toolbar-slot>*,>ds-button)){display:none}.toolbar-slot{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:var(--space-2);min-width:0}.toolbar-slot ::ng-deep>:only-child{flex:1 1 auto;min-width:0}\n"] }]
|
|
1795
|
+
}], ctorParameters: () => [], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], rowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowId", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], selectable: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectable", required: false }] }], bordered: [{ type: i0.Input, args: [{ isSignal: true, alias: "bordered", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyHeader", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], density: [{ type: i0.Input, args: [{ isSignal: true, alias: "density", required: false }] }], zebra: [{ type: i0.Input, args: [{ isSignal: true, alias: "zebra", required: false }] }], animateHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateHeight", required: false }] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], sortKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortKey", required: false }] }], sortKeyChange: [{ type: i0.Output, args: ["sortKeyChange"] }], sortDir: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortDir", required: false }] }], sortDirChange: [{ type: i0.Output, args: ["sortDirChange"] }], sortingOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortingOrder", required: false }] }], sortAnnouncement: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortAnnouncement", required: false }] }], rangeAnnouncement: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeAnnouncement", required: false }] }], skeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeletonRows", required: false }] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], rowInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowInteractive", required: false }] }], activeRowId: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeRowId", required: false }] }], filterQuery: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterQuery", required: false }] }], columnFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilters", required: false }] }, { type: i0.Output, args: ["columnFiltersChange"] }], hiddenKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenKeys", required: false }] }, { type: i0.Output, args: ["hiddenKeysChange"] }], resizableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizableColumns", required: false }] }], columnWidths: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidths", required: false }] }, { type: i0.Output, args: ["columnWidthsChange"] }], reorderableColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "reorderableColumns", required: false }] }], columnOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnOrder", required: false }] }, { type: i0.Output, args: ["columnOrderChange"] }], persistLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "persistLayout", required: false }] }], storageKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "storageKey", required: false }] }], exportButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportButton", required: false }] }], exportFilename: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFilename", required: false }] }], exportFetcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFetcher", required: false }] }], exportFailed: [{ type: i0.Output, args: ["exportFailed"] }], stickyScrollbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyScrollbar", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }, { type: i0.Output, args: ["pageSizeChange"] }], page: [{ type: i0.Input, args: [{ isSignal: true, alias: "page", required: false }] }, { type: i0.Output, args: ["pageChange"] }], pageSizeOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeOptions", required: false }] }], showPageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageSize", required: false }] }], showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabel", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }], scrollToTopOnPageChange: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollToTopOnPageChange", required: false }] }], sortMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortMode", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], columnFilterOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnFilterOptions", required: false }] }], stickyFirstColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "stickyFirstColumn", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualRowSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualRowSize", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], lazyLoad: [{ type: i0.Output, args: ["lazyLoad"] }], rowClicked: [{ type: i0.Output, args: ["rowClicked"] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", required: false }] }], rowActionSelected: [{ type: i0.Output, args: ["rowActionSelected"] }], cellEdited: [{ type: i0.Output, args: ["cellEdited"] }], cellTemplateMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "cellTemplateMap", required: false }] }], emptyTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyTemplate", required: false }] }], expandableRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandableRows", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], expandMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandMode", required: false }] }], expandAllToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandAllToggle", required: false }] }], rowExpanded: [{ type: i0.Output, args: ["rowExpanded"] }], rowCollapsed: [{ type: i0.Output, args: ["rowCollapsed"] }], rowExpandTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowExpandTemplate", required: false }] }], cellTemplateDirectives: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CellTemplateDirective), { isSignal: true }] }], columnFilterPopover: [{ type: i0.ViewChild, args: ['columnFilterPopover', { isSignal: true }] }], headerFilters: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => HeaderFilterDirective), { isSignal: true }] }], editInput: [{ type: i0.ViewChild, args: ['editInput', { isSignal: true }] }], rowMenuPopover: [{ type: i0.ViewChild, args: ['rowMenuPopover', { isSignal: true }] }], columnPickerPopover: [{ type: i0.ViewChild, args: ['columnPickerPopover', { isSignal: true }] }], cellTextPopover: [{ type: i0.ViewChild, args: ['cellTextPopover', { isSignal: true }] }], scrollWrap: [{ type: i0.ViewChild, args: ['scrollWrap', { isSignal: true }] }], hscrollProxy: [{ type: i0.ViewChild, args: ['hscrollProxy', { isSignal: true }] }], tableHead: [{ type: i0.ViewChild, args: ['tableHead', { isSignal: true }] }] } });
|
|
1796
|
+
|
|
1797
|
+
/**
|
|
1798
|
+
* Generated bundle index. Do not edit.
|
|
1799
|
+
*/
|
|
1800
|
+
|
|
1801
|
+
export { CellTemplateDirective, HeaderFilterDirective, TableComponent };
|
|
1802
|
+
//# sourceMappingURL=ids-group-ltd-ids-design-system-components-table.mjs.map
|