@seniorsistemas/scala-ng 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/autocomplete/README.md +5 -1
- package/autocomplete/public-api.d.ts +2 -2
- package/autocomplete/src/autocomplete/autocomplete.component.d.ts +6 -6
- package/autocomplete/src/autocomplete/autocomplete.models.d.ts +2 -2
- package/autocomplete/src/autocomplete/panel/autocomplete-panel.component.d.ts +1 -1
- package/avatar-summary/README.md +1 -1
- package/avatar-summary/public-api.d.ts +2 -2
- package/avatar-summary/src/avatar-summary/avatar-summary.component.d.ts +1 -1
- package/avatar-summary/src/avatar-summary/avatar-summary.models.d.ts +3 -3
- package/avatar-summary/src/avatar-summary/avatar-summary.tokens.d.ts +1 -1
- package/avatar-summary/src/avatar-summary/avatar-summary.utils.d.ts +1 -1
- package/badge/README.md +1 -1
- package/badge/public-api.d.ts +1 -1
- package/badge/src/badge/badge.component.d.ts +1 -1
- package/banner/README.md +1 -1
- package/banner/public-api.d.ts +3 -3
- package/banner/src/banner/banner.component.d.ts +2 -2
- package/banner/src/banner/banner.models.d.ts +1 -1
- package/banner/src/banner-trigger/banner-trigger.directive.d.ts +2 -2
- package/breadcrumb/README.md +7 -7
- package/breadcrumb/public-api.d.ts +5 -5
- package/breadcrumb/src/breadcrumb/breadcrumb.component.d.ts +2 -2
- package/breadcrumb/src/breadcrumb-router/breadcrumb-router.component.d.ts +2 -2
- package/breadcrumb/src/breadcrumb-truncator/breadcrumb-truncator.component.d.ts +3 -3
- package/button/README.md +5 -1
- package/button/public-api.d.ts +1 -1
- package/button/src/button/button.component.d.ts +1 -1
- package/card/README.md +1 -1
- package/card/public-api.d.ts +1 -1
- package/card/src/card/card.component.d.ts +4 -4
- package/checkbox/README.md +5 -5
- package/checkbox/public-api.d.ts +1 -1
- package/checkbox/src/checkbox/checkbox.component.d.ts +1 -1
- package/content-lifecycle/README.md +2 -2
- package/content-lifecycle/public-api.d.ts +2 -2
- package/content-lifecycle/src/content-lifecycle/content-lifecycle.component.d.ts +2 -2
- package/content-lifecycle/src/content-lifecycle/content-lifecycle.models.d.ts +2 -2
- package/date-picker/README.md +6 -6
- package/date-picker/public-api.d.ts +3 -3
- package/date-picker/src/date-picker/date-format.utils.d.ts +2 -2
- package/date-picker/src/date-picker/datepicker.component.d.ts +7 -7
- package/display-tag/README.md +2 -2
- package/display-tag/public-api.d.ts +2 -2
- package/display-tag/src/display-tag/display-tag.component.d.ts +5 -5
- package/drawer/README.md +9 -9
- package/drawer/public-api.d.ts +1 -1
- package/drawer/src/drawer/drawer.component.d.ts +4 -4
- package/empty-state/README.md +1 -1
- package/empty-state/public-api.d.ts +2 -2
- package/empty-state/src/empty-state/empty-state.component.d.ts +1 -1
- package/empty-state/src/empty-state/empty-state.models.d.ts +2 -2
- package/esm2022/autocomplete/public-api.mjs +2 -2
- package/esm2022/autocomplete/src/autocomplete/autocomplete.component.mjs +55 -55
- package/esm2022/autocomplete/src/autocomplete/autocomplete.models.mjs +1 -1
- package/esm2022/autocomplete/src/autocomplete/panel/autocomplete-panel.component.mjs +12 -12
- package/esm2022/avatar-summary/public-api.mjs +2 -2
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.component.mjs +24 -24
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.models.mjs +1 -1
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.tokens.mjs +46 -46
- package/esm2022/avatar-summary/src/avatar-summary/avatar-summary.utils.mjs +4 -4
- package/esm2022/badge/public-api.mjs +2 -2
- package/esm2022/badge/src/badge/badge.component.mjs +25 -25
- package/esm2022/banner/public-api.mjs +3 -3
- package/esm2022/banner/src/banner/banner.component.mjs +33 -33
- package/esm2022/banner/src/banner/banner.models.mjs +1 -1
- package/esm2022/banner/src/banner-trigger/banner-trigger.directive.mjs +11 -11
- package/esm2022/breadcrumb/public-api.mjs +3 -3
- package/esm2022/breadcrumb/src/breadcrumb/breadcrumb.component.mjs +13 -13
- package/esm2022/breadcrumb/src/breadcrumb-item/breadcrumb-item.component.mjs +13 -13
- package/esm2022/breadcrumb/src/breadcrumb-router/breadcrumb-router.component.mjs +11 -11
- package/esm2022/breadcrumb/src/breadcrumb-truncator/breadcrumb-truncator.component.mjs +24 -24
- package/esm2022/button/public-api.mjs +2 -2
- package/esm2022/button/src/button/button.component.mjs +23 -23
- package/esm2022/card/public-api.mjs +2 -2
- package/esm2022/card/src/card/card.component.mjs +37 -37
- package/esm2022/checkbox/public-api.mjs +2 -2
- package/esm2022/checkbox/src/checkbox/checkbox.component.mjs +5 -5
- package/esm2022/content-lifecycle/public-api.mjs +2 -2
- package/esm2022/content-lifecycle/src/content-lifecycle/content-lifecycle.component.mjs +15 -15
- package/esm2022/content-lifecycle/src/content-lifecycle/content-lifecycle.models.mjs +1 -1
- package/esm2022/date-picker/public-api.mjs +3 -3
- package/esm2022/date-picker/src/date-picker/date-format.utils.mjs +39 -39
- package/esm2022/date-picker/src/date-picker/date.utils.mjs +15 -15
- package/esm2022/date-picker/src/date-picker/datepicker.component.mjs +122 -122
- package/esm2022/display-tag/public-api.mjs +2 -2
- package/esm2022/display-tag/src/display-tag/display-tag.component.mjs +36 -36
- package/esm2022/drawer/public-api.mjs +2 -2
- package/esm2022/drawer/src/drawer/drawer.component.mjs +37 -37
- package/esm2022/empty-state/public-api.mjs +2 -2
- package/esm2022/empty-state/src/empty-state/empty-state.component.mjs +26 -26
- package/esm2022/empty-state/src/empty-state/empty-state.models.mjs +1 -1
- package/esm2022/filter-tag/public-api.mjs +2 -2
- package/esm2022/filter-tag/src/filter-tag/filter-tag.component.mjs +12 -12
- package/esm2022/form-field/public-api.mjs +2 -2
- package/esm2022/form-field/src/form-field/form-field.component.mjs +26 -26
- package/esm2022/input/public-api.mjs +2 -2
- package/esm2022/input/src/input/input.component.mjs +55 -44
- package/esm2022/input-feedback/public-api.mjs +2 -2
- package/esm2022/input-feedback/src/input-feedback/input-feedback.component.mjs +12 -12
- package/esm2022/item-strip/public-api.mjs +2 -2
- package/esm2022/item-strip/src/item-strip/item-strip.component.mjs +14 -14
- package/esm2022/item-strip/src/item-strip-item/item-strip-item.component.mjs +37 -37
- package/esm2022/item-strip/src/item-strip-item/item-strip-item.mjs +1 -1
- package/esm2022/lib/a11y/focusable-item.utils.mjs +2 -2
- package/esm2022/lib/chip/chip.utils.mjs +15 -15
- package/esm2022/lib/combobox/combobox.utils.mjs +8 -8
- package/esm2022/lib/forms/control-state.utils.mjs +4 -4
- package/esm2022/lib/overlay/aria-hide.utils.mjs +10 -10
- package/esm2022/lib/overlay/exclusive-dialog.utils.mjs +22 -0
- package/esm2022/lib/overlay/scroll-lock.utils.mjs +5 -5
- package/esm2022/lib/overlay/scrollable-region.utils.mjs +34 -0
- package/esm2022/lib/theme/create-theme.mjs +7 -7
- package/esm2022/lib/theme/semantic-tokens.mjs +1 -1
- package/esm2022/lib/theme/theme.service.mjs +15 -15
- package/esm2022/list/public-api.mjs +2 -2
- package/esm2022/list/src/list/list-id-generator.mjs +4 -4
- package/esm2022/list/src/list/list.component.mjs +16 -16
- package/esm2022/list/src/list/list.models.mjs +2 -2
- package/esm2022/list/src/list/list.tokens.mjs +30 -30
- package/esm2022/list/src/list-group/list-group.component.mjs +7 -7
- package/esm2022/list/src/list-item/list-item-title.utils.mjs +3 -3
- package/esm2022/list/src/list-item/list-item.component.mjs +47 -47
- package/esm2022/loading-state/public-api.mjs +4 -0
- package/esm2022/loading-state/seniorsistemas-scala-ng-loading-state.mjs +5 -0
- package/esm2022/loading-state/src/loading-state/loading-state.directive.mjs +203 -0
- package/esm2022/loading-state/src/loading-state/loading-state.types.mjs +2 -0
- package/esm2022/loading-state/src/loading-state/loading-visibility.utils.mjs +60 -0
- package/esm2022/loading-state/src/pulse/pulse.component.mjs +71 -0
- package/esm2022/loading-state/src/pulse/senior-isotype.component.mjs +11 -0
- package/esm2022/loading-state/src/spinner/loading-spinner.component.mjs +13 -0
- package/esm2022/locale/fallback.mjs +135 -129
- package/esm2022/locale/public-api.mjs +2 -2
- package/esm2022/mask/public-api.mjs +5 -5
- package/esm2022/mask/src/mask/mask.directive.mjs +67 -67
- package/esm2022/mask/src/mask/mask.pipe.mjs +10 -10
- package/esm2022/mask/src/mask/mask.tokens.mjs +16 -16
- package/esm2022/mask/src/mask/mask.utils.mjs +25 -25
- package/esm2022/modal/public-api.mjs +4 -0
- package/esm2022/modal/seniorsistemas-scala-ng-modal.mjs +5 -0
- package/esm2022/modal/src/modal/modal-ref.mjs +84 -0
- package/esm2022/modal/src/modal/modal.component.mjs +262 -0
- package/esm2022/modal/src/modal/modal.service.mjs +119 -0
- package/esm2022/page-header/public-api.mjs +2 -2
- package/esm2022/page-header/src/page-header/page-header.component.mjs +14 -14
- package/esm2022/paginator/public-api.mjs +2 -2
- package/esm2022/paginator/src/paginator/paginator.component.mjs +29 -29
- package/esm2022/panel/public-api.mjs +2 -2
- package/esm2022/panel/src/panel/panel.component.mjs +21 -21
- package/esm2022/progress-bar/public-api.mjs +3 -3
- package/esm2022/progress-bar/src/progress-bar/progress-bar.component.mjs +33 -33
- package/esm2022/progress-bar/src/progress-bar/progress-bar.utils.mjs +5 -5
- package/esm2022/public-api.mjs +11 -9
- package/esm2022/radio-button/public-api.mjs +3 -3
- package/esm2022/radio-button/src/radio-button/radio-button.component.mjs +7 -7
- package/esm2022/radio-button/src/radio-button-group/radio-button-group-error.token.mjs +3 -3
- package/esm2022/radio-button/src/radio-button-group/radio-button-group.component.mjs +7 -7
- package/esm2022/radio-button/src/services/radio-button-registry.service.mjs +4 -4
- package/esm2022/select/public-api.mjs +2 -2
- package/esm2022/select/src/select/select.component.mjs +89 -89
- package/esm2022/select-button/public-api.mjs +2 -2
- package/esm2022/select-button/src/select-button/select-button.component.mjs +131 -131
- package/esm2022/selection-chip/public-api.mjs +2 -2
- package/esm2022/selection-chip/src/selection-chip/selection-chip.component.mjs +24 -24
- package/esm2022/slider/public-api.mjs +2 -2
- package/esm2022/slider/src/slider/slider.component.mjs +82 -82
- package/esm2022/slider/src/slider/slider.types.mjs +1 -1
- package/esm2022/spinner/public-api.mjs +2 -2
- package/esm2022/spinner/src/spinner/spinner.component.mjs +6 -3
- package/esm2022/split-button/public-api.mjs +2 -0
- package/esm2022/split-button/seniorsistemas-scala-ng-split-button.mjs +5 -0
- package/esm2022/split-button/src/split-button/split-button.component.mjs +71 -0
- package/esm2022/stats-card/public-api.mjs +2 -2
- package/esm2022/stats-card/src/stats-card/stats-card.component.mjs +63 -63
- package/esm2022/stats-card/src/stats-card/stats-card.models.mjs +1 -1
- package/esm2022/switch/public-api.mjs +2 -2
- package/esm2022/switch/src/switch/switch.component.mjs +8 -8
- package/esm2022/table/public-api.mjs +3 -3
- package/esm2022/table/src/components/actions-cell/table-actions-cell.component.mjs +7 -7
- package/esm2022/table/src/components/expand-cell/table-expand-cell.component.mjs +4 -4
- package/esm2022/table/src/components/fields/avatar-summary-field-table/avatar-summary-field-table.component.mjs +4 -4
- package/esm2022/table/src/components/fields/base-table-field-config.mjs +1 -1
- package/esm2022/table/src/components/fields/date-field-table/date-field-table.component.mjs +11 -11
- package/esm2022/table/src/components/fields/number-field-table/number-field-table.component.mjs +3 -3
- package/esm2022/table/src/components/fields/rich-field-table/rich-field-table.component.mjs +9 -9
- package/esm2022/table/src/components/fields/string-field-table/string-field-table.component.mjs +3 -3
- package/esm2022/table/src/components/filter-row/table-filter-row.component.mjs +10 -10
- package/esm2022/table/src/components/row-group-header/table-row-group-header.component.mjs +6 -6
- package/esm2022/table/src/components/selection-cell/table-selection-cell.component.mjs +10 -10
- package/esm2022/table/src/components/toolbar/table-toolbar.component.mjs +18 -18
- package/esm2022/table/src/directives/table-actions-column.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-body.directive.mjs +3 -3
- package/esm2022/table/src/directives/table-cell.directive.mjs +9 -9
- package/esm2022/table/src/directives/table-container.directive.mjs +5 -5
- package/esm2022/table/src/directives/table-field.directive.mjs +10 -10
- package/esm2022/table/src/directives/table-grid.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-header-cell.directive.mjs +17 -17
- package/esm2022/table/src/directives/table-header-row.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-paginator-container.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-row-detail-cell.directive.mjs +4 -4
- package/esm2022/table/src/directives/table-row.directive.mjs +10 -10
- package/esm2022/table/src/fields/avatar-summary-table-header.mjs +1 -1
- package/esm2022/table/src/fields/date-table-header.mjs +1 -1
- package/esm2022/table/src/fields/date-utc.utils.mjs +6 -6
- package/esm2022/table/src/fields/number-table-header.mjs +1 -1
- package/esm2022/table/src/fields/rich-table-header.mjs +1 -1
- package/esm2022/table/src/fields/string-table-header.mjs +1 -1
- package/esm2022/table/src/fields/table-header.mjs +1 -1
- package/esm2022/table/src/registry/built-in-field-types.mjs +11 -11
- package/esm2022/table/src/registry/table-field-registry.mjs +7 -7
- package/esm2022/table/src/table/table-toolbar.models.mjs +1 -1
- package/esm2022/table/src/table/table.component.mjs +58 -58
- package/esm2022/table/src/table/table.models.mjs +1 -1
- package/esm2022/table/src/utils/table-filter.utils.mjs +7 -7
- package/esm2022/table/src/utils/table-group.utils.mjs +6 -6
- package/esm2022/table/src/utils/table-lazy-event.utils.mjs +2 -2
- package/esm2022/table/src/utils/table-selection.utils.mjs +4 -4
- package/esm2022/table/src/utils/table-sort.utils.mjs +9 -9
- package/esm2022/tiered-menu/public-api.mjs +2 -2
- package/esm2022/tiered-menu/src/tiered-menu-item-row/tiered-menu-item-row.directive.mjs +8 -8
- package/esm2022/tiered-menu/src/tiered-menu-panel/tiered-menu-panel.component.mjs +16 -16
- package/esm2022/tiered-menu/src/tiered-menu-panel-host/tiered-menu-panel-host.component.mjs +10 -10
- package/esm2022/tiered-menu/src/tiered-menu-trigger/tiered-menu-trigger.directive.mjs +18 -18
- package/esm2022/toast/public-api.mjs +3 -3
- package/esm2022/toast/src/toast/toast.component.mjs +16 -16
- package/esm2022/toast/src/toast/toast.models.mjs +1 -1
- package/esm2022/toast/src/toast-container/toast-container.component.mjs +20 -20
- package/esm2022/toast/src/toast.service.mjs +31 -31
- package/esm2022/tooltip/public-api.mjs +2 -2
- package/esm2022/tooltip/src/tooltip/tooltip-collision-registry.service.mjs +4 -4
- package/esm2022/tooltip/src/tooltip/tooltip-focus-origin.service.mjs +5 -5
- package/esm2022/tooltip/src/tooltip/tooltip.types.mjs +1 -1
- package/esm2022/tooltip/src/tooltip-panel/tooltip-panel.component.mjs +23 -23
- package/esm2022/tooltip/src/tooltip-trigger/tooltip-trigger.directive.mjs +93 -93
- package/fesm2022/seniorsistemas-scala-ng-autocomplete.mjs +51 -51
- package/fesm2022/seniorsistemas-scala-ng-autocomplete.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-avatar-summary.mjs +64 -64
- package/fesm2022/seniorsistemas-scala-ng-avatar-summary.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-badge.mjs +22 -22
- package/fesm2022/seniorsistemas-scala-ng-badge.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-banner.mjs +32 -32
- package/fesm2022/seniorsistemas-scala-ng-banner.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-breadcrumb.mjs +33 -33
- package/fesm2022/seniorsistemas-scala-ng-breadcrumb.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-button.mjs +21 -21
- package/fesm2022/seniorsistemas-scala-ng-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-card.mjs +30 -30
- package/fesm2022/seniorsistemas-scala-ng-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-checkbox.mjs +1 -1
- package/fesm2022/seniorsistemas-scala-ng-checkbox.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-content-lifecycle.mjs +12 -12
- package/fesm2022/seniorsistemas-scala-ng-content-lifecycle.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-date-picker.mjs +159 -159
- package/fesm2022/seniorsistemas-scala-ng-date-picker.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-display-tag.mjs +33 -33
- package/fesm2022/seniorsistemas-scala-ng-display-tag.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-drawer.mjs +29 -29
- package/fesm2022/seniorsistemas-scala-ng-drawer.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-empty-state.mjs +23 -23
- package/fesm2022/seniorsistemas-scala-ng-empty-state.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-filter-tag.mjs +7 -7
- package/fesm2022/seniorsistemas-scala-ng-filter-tag.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-form-field.mjs +22 -22
- package/fesm2022/seniorsistemas-scala-ng-form-field.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-input-feedback.mjs +10 -10
- package/fesm2022/seniorsistemas-scala-ng-input-feedback.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-input.mjs +49 -38
- package/fesm2022/seniorsistemas-scala-ng-input.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-item-strip.mjs +39 -39
- package/fesm2022/seniorsistemas-scala-ng-item-strip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-list.mjs +84 -84
- package/fesm2022/seniorsistemas-scala-ng-list.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-loading-state.mjs +354 -0
- package/fesm2022/seniorsistemas-scala-ng-loading-state.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-locale.mjs +134 -128
- package/fesm2022/seniorsistemas-scala-ng-locale.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-mask.mjs +106 -106
- package/fesm2022/seniorsistemas-scala-ng-mask.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-modal.mjs +466 -0
- package/fesm2022/seniorsistemas-scala-ng-modal.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-page-header.mjs +9 -9
- package/fesm2022/seniorsistemas-scala-ng-page-header.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-paginator.mjs +20 -20
- package/fesm2022/seniorsistemas-scala-ng-paginator.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-panel.mjs +14 -14
- package/fesm2022/seniorsistemas-scala-ng-panel.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-progress-bar.mjs +31 -31
- package/fesm2022/seniorsistemas-scala-ng-progress-bar.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-radio-button.mjs +6 -6
- package/fesm2022/seniorsistemas-scala-ng-radio-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-select-button.mjs +122 -122
- package/fesm2022/seniorsistemas-scala-ng-select-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-select.mjs +76 -76
- package/fesm2022/seniorsistemas-scala-ng-select.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-selection-chip.mjs +19 -19
- package/fesm2022/seniorsistemas-scala-ng-selection-chip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-slider.mjs +72 -72
- package/fesm2022/seniorsistemas-scala-ng-slider.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-spinner.mjs +4 -1
- package/fesm2022/seniorsistemas-scala-ng-spinner.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-split-button.mjs +78 -0
- package/fesm2022/seniorsistemas-scala-ng-split-button.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-stats-card.mjs +58 -58
- package/fesm2022/seniorsistemas-scala-ng-stats-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-switch.mjs +4 -4
- package/fesm2022/seniorsistemas-scala-ng-switch.mjs.map +1 -1
- package/fesm2022/{seniorsistemas-scala-ng-table-table-actions-cell.component-DTzDhrMk.mjs → seniorsistemas-scala-ng-table-table-actions-cell.component-D_eZKncd.mjs} +2 -2
- package/fesm2022/seniorsistemas-scala-ng-table-table-actions-cell.component-D_eZKncd.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-table-table-filter-row.component-C0Y1KaWD.mjs +27 -0
- package/fesm2022/seniorsistemas-scala-ng-table-table-filter-row.component-C0Y1KaWD.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-table-table-toolbar.component-C9s1ObGb.mjs +68 -0
- package/fesm2022/seniorsistemas-scala-ng-table-table-toolbar.component-C9s1ObGb.mjs.map +1 -0
- package/fesm2022/seniorsistemas-scala-ng-table.mjs +138 -138
- package/fesm2022/seniorsistemas-scala-ng-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-tiered-menu.mjs +35 -35
- package/fesm2022/seniorsistemas-scala-ng-tiered-menu.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-toast.mjs +54 -54
- package/fesm2022/seniorsistemas-scala-ng-toast.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng-tooltip.mjs +110 -110
- package/fesm2022/seniorsistemas-scala-ng-tooltip.mjs.map +1 -1
- package/fesm2022/seniorsistemas-scala-ng.mjs +110 -54
- package/fesm2022/seniorsistemas-scala-ng.mjs.map +1 -1
- package/filter-tag/README.md +1 -1
- package/filter-tag/public-api.d.ts +1 -1
- package/filter-tag/src/filter-tag/filter-tag.component.d.ts +1 -1
- package/form-field/public-api.d.ts +2 -2
- package/form-field/src/form-field/form-field.component.d.ts +14 -14
- package/input/README.md +13 -10
- package/input/public-api.d.ts +1 -1
- package/input/src/input/input.component.d.ts +8 -5
- package/input-feedback/README.md +7 -7
- package/input-feedback/public-api.d.ts +1 -1
- package/input-feedback/src/input-feedback/input-feedback.component.d.ts +2 -2
- package/item-strip/README.md +1 -1
- package/item-strip/public-api.d.ts +2 -2
- package/item-strip/src/item-strip/item-strip.component.d.ts +1 -1
- package/item-strip/src/item-strip-item/item-strip-item.component.d.ts +27 -27
- package/item-strip/src/item-strip-item/item-strip-item.d.ts +1 -1
- package/lib/a11y/focusable-item.utils.d.ts +1 -1
- package/lib/chip/chip.utils.d.ts +3 -3
- package/lib/combobox/combobox.utils.d.ts +2 -2
- package/lib/forms/control-state.utils.d.ts +2 -2
- package/lib/overlay/exclusive-dialog.utils.d.ts +7 -0
- package/lib/overlay/scrollable-region.utils.d.ts +5 -0
- package/lib/theme/create-theme.d.ts +2 -2
- package/lib/theme/semantic-tokens.d.ts +1 -1
- package/lib/theme/theme.service.d.ts +1 -1
- package/list/README.md +1 -1
- package/list/public-api.d.ts +2 -2
- package/list/src/list/list.component.d.ts +1 -1
- package/list/src/list/list.models.d.ts +5 -5
- package/list/src/list/list.tokens.d.ts +1 -1
- package/list/src/list-group/list-group.component.d.ts +1 -1
- package/list/src/list-item/list-item.component.d.ts +11 -11
- package/loading-state/README.md +60 -0
- package/loading-state/index.d.ts +5 -0
- package/loading-state/package.json +3 -0
- package/loading-state/public-api.d.ts +5 -0
- package/loading-state/src/loading-state/loading-state.directive.d.ts +37 -0
- package/loading-state/src/loading-state/loading-state.types.d.ts +3 -0
- package/loading-state/src/loading-state/loading-visibility.utils.d.ts +11 -0
- package/loading-state/src/pulse/pulse.component.d.ts +27 -0
- package/loading-state/src/pulse/senior-isotype.component.d.ts +5 -0
- package/loading-state/src/spinner/loading-spinner.component.d.ts +8 -0
- package/locale/public-api.d.ts +1 -1
- package/mask/README.md +1 -1
- package/mask/public-api.d.ts +4 -4
- package/mask/src/mask/mask.directive.d.ts +2 -2
- package/mask/src/mask/mask.pipe.d.ts +2 -2
- package/mask/src/mask/mask.utils.d.ts +1 -1
- package/modal/README.md +435 -0
- package/modal/index.d.ts +5 -0
- package/modal/package.json +3 -0
- package/modal/public-api.d.ts +3 -0
- package/modal/src/modal/modal-ref.d.ts +51 -0
- package/modal/src/modal/modal.component.d.ts +82 -0
- package/modal/src/modal/modal.service.d.ts +62 -0
- package/package.json +22 -1
- package/page-header/README.md +1 -1
- package/page-header/public-api.d.ts +1 -1
- package/page-header/src/page-header/page-header.component.d.ts +2 -2
- package/paginator/public-api.d.ts +2 -2
- package/paginator/src/paginator/paginator.component.d.ts +3 -3
- package/panel/README.md +1 -1
- package/panel/public-api.d.ts +1 -1
- package/panel/src/panel/panel.component.d.ts +3 -3
- package/progress-bar/README.md +4 -4
- package/progress-bar/public-api.d.ts +4 -4
- package/progress-bar/src/progress-bar/progress-bar.component.d.ts +3 -3
- package/progress-bar/src/progress-bar/progress-bar.utils.d.ts +1 -1
- package/public-api.d.ts +11 -9
- package/radio-button/README.md +1 -1
- package/radio-button/public-api.d.ts +3 -3
- package/radio-button/src/radio-button/radio-button.component.d.ts +2 -2
- package/radio-button/src/radio-button-group/radio-button-group-error.token.d.ts +1 -1
- package/radio-button/src/radio-button-group/radio-button-group.component.d.ts +3 -3
- package/radio-button/src/services/radio-button-registry.service.d.ts +1 -1
- package/schematics/migrate-spinner-to-loading-state/index.js +75 -0
- package/schematics/migrate-spinner-to-loading-state/index.js.map +1 -0
- package/schematics/migrations.json +10 -0
- package/schematics/ng-add/index.js +29 -29
- package/select/README.md +19 -15
- package/select/public-api.d.ts +2 -2
- package/select/src/select/select.component.d.ts +11 -11
- package/select-button/README.md +1 -1
- package/select-button/public-api.d.ts +2 -2
- package/select-button/src/select-button/select-button.component.d.ts +7 -7
- package/selection-chip/README.md +1 -1
- package/selection-chip/public-api.d.ts +1 -1
- package/selection-chip/src/selection-chip/selection-chip.component.d.ts +3 -3
- package/slider/README.md +6 -6
- package/slider/public-api.d.ts +2 -2
- package/slider/src/slider/slider.component.d.ts +3 -3
- package/slider/src/slider/slider.types.d.ts +3 -3
- package/spinner/README.md +9 -1
- package/spinner/public-api.d.ts +1 -1
- package/spinner/src/spinner/spinner.component.d.ts +3 -0
- package/split-button/README.md +208 -0
- package/split-button/index.d.ts +5 -0
- package/split-button/package.json +3 -0
- package/split-button/public-api.d.ts +1 -0
- package/split-button/src/split-button/split-button.component.d.ts +29 -0
- package/stats-card/README.md +1 -1
- package/stats-card/public-api.d.ts +2 -2
- package/stats-card/src/stats-card/stats-card.component.d.ts +415 -415
- package/stats-card/src/stats-card/stats-card.models.d.ts +3 -3
- package/styles/tailwind-preset.js +30 -13
- package/styles/tailwind-tokens.js +286 -286
- package/styles/tokens/index.scss +7 -7
- package/styles/tokens/semantic-colors.scss +4 -2
- package/styles.scss +7 -7
- package/switch/README.md +5 -5
- package/switch/public-api.d.ts +1 -1
- package/switch/src/switch/switch.component.d.ts +1 -1
- package/table/README.md +21 -21
- package/table/public-api.d.ts +12 -12
- package/table/src/components/actions-cell/table-actions-cell.component.d.ts +2 -2
- package/table/src/components/fields/avatar-summary-field-table/avatar-summary-field-table.component.d.ts +2 -2
- package/table/src/components/fields/base-table-field-config.d.ts +2 -2
- package/table/src/components/fields/date-field-table/date-field-table.component.d.ts +2 -2
- package/table/src/components/fields/number-field-table/number-field-table.component.d.ts +2 -2
- package/table/src/components/fields/rich-field-table/rich-field-table.component.d.ts +2 -2
- package/table/src/components/fields/string-field-table/string-field-table.component.d.ts +2 -2
- package/table/src/components/filter-row/table-filter-row.component.d.ts +1 -1
- package/table/src/components/selection-cell/table-selection-cell.component.d.ts +2 -2
- package/table/src/components/toolbar/table-toolbar.component.d.ts +3 -3
- package/table/src/directives/table-field.directive.d.ts +1 -1
- package/table/src/fields/avatar-summary-table-header.d.ts +4 -4
- package/table/src/fields/date-table-header.d.ts +3 -3
- package/table/src/fields/number-table-header.d.ts +3 -3
- package/table/src/fields/rich-table-header.d.ts +4 -4
- package/table/src/fields/string-table-header.d.ts +4 -4
- package/table/src/fields/table-header.d.ts +2 -2
- package/table/src/registry/built-in-field-types.d.ts +1 -1
- package/table/src/registry/table-field-registry.d.ts +4 -4
- package/table/src/table/table-toolbar.models.d.ts +1 -1
- package/table/src/table/table.component.d.ts +11 -11
- package/table/src/table/table.models.d.ts +2 -2
- package/table/src/utils/table-filter.utils.d.ts +1 -1
- package/table/src/utils/table-group.utils.d.ts +4 -4
- package/table/src/utils/table-lazy-event.utils.d.ts +3 -3
- package/table/src/utils/table-selection.utils.d.ts +2 -2
- package/table/src/utils/table-sort.utils.d.ts +2 -2
- package/tiered-menu/README.md +2 -2
- package/tiered-menu/public-api.d.ts +2 -2
- package/tiered-menu/src/tiered-menu-panel/tiered-menu-panel.component.d.ts +2 -2
- package/tiered-menu/src/tiered-menu-panel-host/tiered-menu-panel-host.component.d.ts +2 -2
- package/tiered-menu/src/tiered-menu-trigger/tiered-menu-trigger.directive.d.ts +2 -2
- package/toast/README.md +17 -17
- package/toast/public-api.d.ts +3 -3
- package/toast/src/toast/toast.component.d.ts +1 -1
- package/toast/src/toast/toast.models.d.ts +3 -3
- package/toast/src/toast-container/toast-container.component.d.ts +1 -1
- package/toast/src/toast.service.d.ts +5 -5
- package/tooltip/README.md +1 -1
- package/tooltip/public-api.d.ts +2 -2
- package/tooltip/src/tooltip/tooltip-focus-origin.service.d.ts +2 -2
- package/tooltip/src/tooltip/tooltip.types.d.ts +3 -3
- package/tooltip/src/tooltip-panel/tooltip-panel.component.d.ts +4 -4
- package/tooltip/src/tooltip-trigger/tooltip-trigger.directive.d.ts +2 -2
- package/fesm2022/seniorsistemas-scala-ng-table-table-actions-cell.component-DTzDhrMk.mjs.map +0 -1
- package/fesm2022/seniorsistemas-scala-ng-table-table-filter-row.component-BgdQk6tM.mjs +0 -27
- package/fesm2022/seniorsistemas-scala-ng-table-table-filter-row.component-BgdQk6tM.mjs.map +0 -1
- package/fesm2022/seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs +0 -68
- package/fesm2022/seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs.map +0 -1
|
@@ -26,7 +26,7 @@ class SdsTableExpandCellComponent {
|
|
|
26
26
|
}
|
|
27
27
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableExpandCellComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
|
-
args: [{ selector:
|
|
29
|
+
args: [{ selector: 'sds-table-expand-cell', standalone: true, imports: [SdsButtonComponent], template: "<button\n sdsButton\n type=\"ghost\"\n size=\"small\"\n class=\"!h-6 !w-6 !p-0\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"label()\"\n [attr.aria-expanded]=\"expanded()\"\n (click)=\"toggled.emit()\"\n>\n <i\n sdsLeadingIcon\n class=\"fa-solid\"\n [class.fa-caret-down]=\"expanded()\"\n [class.fa-caret-right]=\"!expanded()\"\n aria-hidden=\"true\"\n ></i>\n</button>\n" }]
|
|
30
30
|
}] });
|
|
31
31
|
|
|
32
32
|
class SdsTableRowGroupHeaderComponent {
|
|
@@ -40,12 +40,12 @@ class SdsTableRowGroupHeaderComponent {
|
|
|
40
40
|
}
|
|
41
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableRowGroupHeaderComponent, decorators: [{
|
|
42
42
|
type: Component,
|
|
43
|
-
args: [{ selector:
|
|
43
|
+
args: [{ selector: 'tr[sds-table-row-group-header]', standalone: true, imports: [SdsButtonComponent], host: {
|
|
44
44
|
// Same background as the header/rows (interactive-secondary) — the Figma master component
|
|
45
45
|
// (node 2358:6010) resolves to this token; the group header is differentiated by its bold
|
|
46
46
|
// label/chevron and full-width layout, not by a distinct fill.
|
|
47
|
-
class:
|
|
48
|
-
|
|
47
|
+
class: 'h-[40px] shadow-[inset_0_-1px_0_0_var(--sds-color-border-interactive-secondary)] ' +
|
|
48
|
+
'bg-color-background-interactive-secondary',
|
|
49
49
|
}, template: "<td\n class=\"px-space-1-5 py-space-1 align-middle\"\n [attr.colspan]=\"colspan()\"\n>\n <div class=\"flex items-center\">\n <button\n sdsButton\n size=\"small\"\n type=\"ghost\"\n class=\"!h-6 !py-0 !text-color-text-neutral-primary\"\n [attr.aria-expanded]=\"!collapsed()\"\n (click)=\"toggled.emit()\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid\"\n [class.fa-caret-down]=\"!collapsed()\"\n [class.fa-caret-right]=\"collapsed()\"\n aria-hidden=\"true\"\n ></i>\n <span>{{ label() }}</span>\n <span class=\"text-color-text-neutral-secondary\">({{ count() }})</span>\n </button>\n </div>\n</td>\n" }]
|
|
50
50
|
}] });
|
|
51
51
|
|
|
@@ -55,17 +55,17 @@ class SdsTableSelectionCellComponent {
|
|
|
55
55
|
checked = input(false);
|
|
56
56
|
indeterminate = input(false);
|
|
57
57
|
disabled = input(false);
|
|
58
|
-
radioGroupName = input(
|
|
59
|
-
radioValue = input(
|
|
58
|
+
radioGroupName = input('');
|
|
59
|
+
radioValue = input('');
|
|
60
60
|
radioSelectedValue = input(null);
|
|
61
61
|
checkedChange = output();
|
|
62
62
|
radioSelected = output();
|
|
63
63
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableSelectionCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
64
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsTableSelectionCellComponent, isStandalone: true, selector: "sds-table-selection-cell", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, radioGroupName: { classPropertyName: "radioGroupName", publicName: "radioGroupName", isSignal: true, isRequired: false, transformFunction: null }, radioValue: { classPropertyName: "radioValue", publicName: "radioValue", isSignal: true, isRequired: false, transformFunction: null }, radioSelectedValue: { classPropertyName: "radioSelectedValue", publicName: "radioSelectedValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange", radioSelected: "radioSelected" }, ngImport: i0, template: "@switch (mode()) {\n @case (
|
|
64
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsTableSelectionCellComponent, isStandalone: true, selector: "sds-table-selection-cell", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, radioGroupName: { classPropertyName: "radioGroupName", publicName: "radioGroupName", isSignal: true, isRequired: false, transformFunction: null }, radioValue: { classPropertyName: "radioValue", publicName: "radioValue", isSignal: true, isRequired: false, transformFunction: null }, radioSelectedValue: { classPropertyName: "radioSelectedValue", publicName: "radioSelectedValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange", radioSelected: "radioSelected" }, ngImport: i0, template: "@switch (mode()) {\n @case ('checkbox') {\n <sds-checkbox\n [label]=\"label()\"\n [showLabel]=\"false\"\n [disabled]=\"disabled()\"\n [indeterminate]=\"indeterminate()\"\n [ngModel]=\"checked()\"\n (ngModelChange)=\"checkedChange.emit($event)\"\n />\n }\n @case ('radio') {\n <sds-radio-button\n [label]=\"label()\"\n [showLabel]=\"false\"\n [disabled]=\"disabled()\"\n [name]=\"radioGroupName()\"\n [value]=\"radioValue()\"\n [ngModel]=\"radioSelectedValue()\"\n (ngModelChange)=\"radioSelected.emit($event)\"\n />\n }\n @case ('drag') {\n <i\n class=\"fa-solid fa-grip-vertical cursor-grab text-[var(--sds-color-icon-neutral)] outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-color-border-focused\"\n cdkDragHandle\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"label()\"\n ></i>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: SdsCheckboxComponent, selector: "sds-checkbox", inputs: ["label", "disabled", "readonly", "showLabel", "indeterminate", "inputId", "ariaDescribedBy"], outputs: ["changed", "focused", "blurred"] }, { kind: "component", type: SdsRadioButtonComponent, selector: "sds-radio-button", inputs: ["label", "name", "value", "disabled", "readonly", "showLabel", "inputId"], outputs: ["valueChange", "focused", "blurred"] }] });
|
|
65
65
|
}
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableSelectionCellComponent, decorators: [{
|
|
67
67
|
type: Component,
|
|
68
|
-
args: [{ selector:
|
|
68
|
+
args: [{ selector: 'sds-table-selection-cell', standalone: true, imports: [FormsModule, CdkDragHandle, SdsCheckboxComponent, SdsRadioButtonComponent], template: "@switch (mode()) {\n @case ('checkbox') {\n <sds-checkbox\n [label]=\"label()\"\n [showLabel]=\"false\"\n [disabled]=\"disabled()\"\n [indeterminate]=\"indeterminate()\"\n [ngModel]=\"checked()\"\n (ngModelChange)=\"checkedChange.emit($event)\"\n />\n }\n @case ('radio') {\n <sds-radio-button\n [label]=\"label()\"\n [showLabel]=\"false\"\n [disabled]=\"disabled()\"\n [name]=\"radioGroupName()\"\n [value]=\"radioValue()\"\n [ngModel]=\"radioSelectedValue()\"\n (ngModelChange)=\"radioSelected.emit($event)\"\n />\n }\n @case ('drag') {\n <i\n class=\"fa-solid fa-grip-vertical cursor-grab text-[var(--sds-color-icon-neutral)] outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-color-border-focused\"\n cdkDragHandle\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"label()\"\n ></i>\n }\n}\n" }]
|
|
69
69
|
}] });
|
|
70
70
|
|
|
71
71
|
class SdsTableActionsColumnDirective {
|
|
@@ -75,10 +75,10 @@ class SdsTableActionsColumnDirective {
|
|
|
75
75
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableActionsColumnDirective, decorators: [{
|
|
76
76
|
type: Directive,
|
|
77
77
|
args: [{
|
|
78
|
-
selector:
|
|
78
|
+
selector: 'col[sdsTableActionsColumn]',
|
|
79
79
|
standalone: true,
|
|
80
80
|
// 3 inline 32px buttons + 2 gaps of 4px + 24px (sdsTableCell's px-space-1-5 padding).
|
|
81
|
-
host: { class:
|
|
81
|
+
host: { class: 'w-[128px]' },
|
|
82
82
|
}]
|
|
83
83
|
}] });
|
|
84
84
|
|
|
@@ -89,27 +89,27 @@ class SdsTableBodyDirective {
|
|
|
89
89
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableBodyDirective, decorators: [{
|
|
90
90
|
type: Directive,
|
|
91
91
|
args: [{
|
|
92
|
-
selector:
|
|
92
|
+
selector: 'tbody[sdsTableBody]',
|
|
93
93
|
standalone: true,
|
|
94
94
|
}]
|
|
95
95
|
}] });
|
|
96
96
|
|
|
97
97
|
class SdsTableCellDirective {
|
|
98
|
-
textAlign = input(
|
|
98
|
+
textAlign = input('left');
|
|
99
99
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
100
100
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: SdsTableCellDirective, isStandalone: true, selector: "td[sdsTableCell]", inputs: { textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.text-right": "textAlign() === \"right\"", "class.text-center": "textAlign() === \"center\"", "class.text-left": "textAlign() === \"left\"" }, classAttribute: "px-space-1-5 py-space-1 align-middle text-font-size-2 font-font-weight-regular leading-line-height-150 text-color-text-neutral-primary" }, ngImport: i0 });
|
|
101
101
|
}
|
|
102
102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableCellDirective, decorators: [{
|
|
103
103
|
type: Directive,
|
|
104
104
|
args: [{
|
|
105
|
-
selector:
|
|
105
|
+
selector: 'td[sdsTableCell]',
|
|
106
106
|
standalone: true,
|
|
107
107
|
host: {
|
|
108
|
-
class:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
class: 'px-space-1-5 py-space-1 align-middle text-font-size-2 font-font-weight-regular ' +
|
|
109
|
+
'leading-line-height-150 text-color-text-neutral-primary',
|
|
110
|
+
'[class.text-right]': 'textAlign() === "right"',
|
|
111
|
+
'[class.text-center]': 'textAlign() === "center"',
|
|
112
|
+
'[class.text-left]': 'textAlign() === "left"',
|
|
113
113
|
},
|
|
114
114
|
}]
|
|
115
115
|
}] });
|
|
@@ -121,11 +121,11 @@ class SdsTableContainerDirective {
|
|
|
121
121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableContainerDirective, decorators: [{
|
|
122
122
|
type: Directive,
|
|
123
123
|
args: [{
|
|
124
|
-
selector:
|
|
124
|
+
selector: 'div[sdsTableContainer]',
|
|
125
125
|
standalone: true,
|
|
126
126
|
host: {
|
|
127
|
-
class:
|
|
128
|
-
|
|
127
|
+
class: 'block w-full overflow-hidden rounded-radius-large border border-solid ' +
|
|
128
|
+
'border-color-border',
|
|
129
129
|
},
|
|
130
130
|
}]
|
|
131
131
|
}] });
|
|
@@ -147,7 +147,7 @@ class SdsAvatarSummaryFieldTableComponent {
|
|
|
147
147
|
}
|
|
148
148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsAvatarSummaryFieldTableComponent, decorators: [{
|
|
149
149
|
type: Component,
|
|
150
|
-
args: [{ selector:
|
|
150
|
+
args: [{ selector: 'sds-avatar-summary-field-table', standalone: true, imports: [SdsAvatarSummaryComponent], template: "<div class=\"flex min-w-0 items-center gap-space-2\">\n <sds-avatar-summary\n [type]=\"field().avatarType ?? 'person'\"\n [size]=\"field().size ?? 'small'\"\n [name]=\"cell()\"\n [imageUrl]=\"imageUrl()\"\n [icon]=\"icon()\"\n />\n <span class=\"truncate\">{{ cell() }}</span>\n</div>\n" }]
|
|
151
151
|
}] });
|
|
152
152
|
|
|
153
153
|
const HAS_TIME_ZONE = /(Z|[+-]\d{2}:?\d{2})$/i;
|
|
@@ -163,18 +163,18 @@ function parseUtcDate(value) {
|
|
|
163
163
|
}
|
|
164
164
|
/** Returns a local `Date` carrying the calendar day of `instant` as seen in `timeZone` (browser zone when omitted). */
|
|
165
165
|
function toCalendarDate(instant, timeZone) {
|
|
166
|
-
const parts = new Intl.DateTimeFormat(
|
|
166
|
+
const parts = new Intl.DateTimeFormat('en-US', {
|
|
167
167
|
timeZone,
|
|
168
|
-
year:
|
|
169
|
-
month:
|
|
170
|
-
day:
|
|
168
|
+
year: 'numeric',
|
|
169
|
+
month: '2-digit',
|
|
170
|
+
day: '2-digit',
|
|
171
171
|
}).formatToParts(instant);
|
|
172
172
|
const part = (type) => Number(parts.find((candidate) => candidate.type === type)?.value);
|
|
173
|
-
return new Date(part(
|
|
173
|
+
return new Date(part('year'), part('month') - 1, part('day'));
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
const DATE_FORMAT_TRANSLATION_KEY =
|
|
177
|
-
const DEFAULT_DATE_FORMAT =
|
|
176
|
+
const DATE_FORMAT_TRANSLATION_KEY = 'platform.scala-ng.date_format';
|
|
177
|
+
const DEFAULT_DATE_FORMAT = 'dd/MM/yyyy';
|
|
178
178
|
class SdsDateFieldTableComponent {
|
|
179
179
|
field = input.required();
|
|
180
180
|
cell = input();
|
|
@@ -185,10 +185,10 @@ class SdsDateFieldTableComponent {
|
|
|
185
185
|
this.langChange();
|
|
186
186
|
const instant = parseUtcDate(this.cell());
|
|
187
187
|
if (!instant) {
|
|
188
|
-
return
|
|
188
|
+
return '';
|
|
189
189
|
}
|
|
190
190
|
const translated = this.translate.instant(DATE_FORMAT_TRANSLATION_KEY);
|
|
191
|
-
const format = typeof translated ===
|
|
191
|
+
const format = typeof translated === 'string' && translated && translated !== DATE_FORMAT_TRANSLATION_KEY
|
|
192
192
|
? translated
|
|
193
193
|
: DEFAULT_DATE_FORMAT;
|
|
194
194
|
return formatDateByFormat(toCalendarDate(instant, this.field().timeZone), format);
|
|
@@ -198,7 +198,7 @@ class SdsDateFieldTableComponent {
|
|
|
198
198
|
}
|
|
199
199
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsDateFieldTableComponent, decorators: [{
|
|
200
200
|
type: Component,
|
|
201
|
-
args: [{ selector:
|
|
201
|
+
args: [{ selector: 'sds-date-field-table', standalone: true, template: "<time [attr.datetime]=\"dateTime()\">{{ formatted() }}</time>\n" }]
|
|
202
202
|
}] });
|
|
203
203
|
|
|
204
204
|
class SdsNumberFieldTableComponent {
|
|
@@ -209,7 +209,7 @@ class SdsNumberFieldTableComponent {
|
|
|
209
209
|
}
|
|
210
210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsNumberFieldTableComponent, decorators: [{
|
|
211
211
|
type: Component,
|
|
212
|
-
args: [{ selector:
|
|
212
|
+
args: [{ selector: 'sds-number-field-table', standalone: true, template: "{{ cell() }}\n" }]
|
|
213
213
|
}] });
|
|
214
214
|
|
|
215
215
|
class SdsRichFieldTableComponent {
|
|
@@ -221,7 +221,7 @@ class SdsRichFieldTableComponent {
|
|
|
221
221
|
imageUrl = computed(() => this._rowField(this.field().avatar?.imageUrlField));
|
|
222
222
|
icon = computed(() => this._rowField(this.field().avatar?.iconField));
|
|
223
223
|
// Medium (32px) pairs with the two-line content; Small (24px) keeps single-line cells at 40px.
|
|
224
|
-
avatarSize = computed(() => (this.secondaryText() ?
|
|
224
|
+
avatarSize = computed(() => (this.secondaryText() ? 'medium' : 'small'));
|
|
225
225
|
_rowField(key) {
|
|
226
226
|
if (!key) {
|
|
227
227
|
return undefined;
|
|
@@ -230,11 +230,11 @@ class SdsRichFieldTableComponent {
|
|
|
230
230
|
}
|
|
231
231
|
_toText(value) {
|
|
232
232
|
switch (typeof value) {
|
|
233
|
-
case
|
|
233
|
+
case 'string': {
|
|
234
234
|
return value;
|
|
235
235
|
}
|
|
236
|
-
case
|
|
237
|
-
case
|
|
236
|
+
case 'number':
|
|
237
|
+
case 'boolean': {
|
|
238
238
|
return String(value);
|
|
239
239
|
}
|
|
240
240
|
default: {
|
|
@@ -247,7 +247,7 @@ class SdsRichFieldTableComponent {
|
|
|
247
247
|
}
|
|
248
248
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsRichFieldTableComponent, decorators: [{
|
|
249
249
|
type: Component,
|
|
250
|
-
args: [{ selector:
|
|
250
|
+
args: [{ selector: 'sds-rich-field-table', standalone: true, imports: [SdsAvatarSummaryComponent, SdsTooltipDirective], template: "<div class=\"flex min-w-0 items-center gap-space-1-5\">\n @if (field().avatar; as avatar) {\n <!-- Decorative: the name is rendered next to it, so the avatar never carries information alone. -->\n <span\n class=\"shrink-0\"\n aria-hidden=\"true\"\n >\n <sds-avatar-summary\n [type]=\"avatar.type\"\n [size]=\"avatarSize()\"\n [name]=\"primaryText()\"\n [imageUrl]=\"imageUrl()\"\n [icon]=\"icon()\"\n />\n </span>\n }\n <div class=\"flex min-w-0 flex-col\">\n <span\n class=\"truncate text-font-size-2 leading-line-height-150 text-color-text-neutral-primary\"\n [sdsTooltip]=\"primaryText() ?? ''\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >{{ primaryText() }}</span\n >\n @if (secondaryText(); as supportingText) {\n <span\n class=\"truncate text-font-size-1 leading-line-height-150 text-color-text-neutral-secondary\"\n [sdsTooltip]=\"supportingText\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >{{ supportingText }}</span\n >\n }\n </div>\n</div>\n" }]
|
|
251
251
|
}] });
|
|
252
252
|
|
|
253
253
|
class SdsStringFieldTableComponent {
|
|
@@ -258,15 +258,15 @@ class SdsStringFieldTableComponent {
|
|
|
258
258
|
}
|
|
259
259
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsStringFieldTableComponent, decorators: [{
|
|
260
260
|
type: Component,
|
|
261
|
-
args: [{ selector:
|
|
261
|
+
args: [{ selector: 'sds-string-field-table', standalone: true, template: "<span\n [class.uppercase]=\"field().format === 'upper'\"\n [class.lowercase]=\"field().format === 'lower'\"\n [class.capitalize]=\"field().format === 'capitalize'\"\n >{{ cell() }}</span\n>\n" }]
|
|
262
262
|
}] });
|
|
263
263
|
|
|
264
264
|
const BUILT_IN_FIELD_TYPES = new Map([
|
|
265
|
-
[
|
|
266
|
-
[
|
|
267
|
-
[
|
|
268
|
-
[
|
|
269
|
-
[
|
|
265
|
+
['string', SdsStringFieldTableComponent],
|
|
266
|
+
['number', SdsNumberFieldTableComponent],
|
|
267
|
+
['date', SdsDateFieldTableComponent],
|
|
268
|
+
['avatarSummary', SdsAvatarSummaryFieldTableComponent],
|
|
269
|
+
['rich', SdsRichFieldTableComponent],
|
|
270
270
|
]);
|
|
271
271
|
|
|
272
272
|
/** Resolves the cell component of each header type, falling back to the parent injector's registry. */
|
|
@@ -284,19 +284,19 @@ class TableFieldRegistry {
|
|
|
284
284
|
}
|
|
285
285
|
// Built-in types live in the root factory instead of module-level registration, which `sideEffects: false` lets bundlers drop.
|
|
286
286
|
/** Field registry visible in the current injector. */
|
|
287
|
-
const TABLE_FIELD_REGISTRY = new InjectionToken(
|
|
288
|
-
providedIn:
|
|
287
|
+
const TABLE_FIELD_REGISTRY = new InjectionToken('TABLE_FIELD_REGISTRY', {
|
|
288
|
+
providedIn: 'root',
|
|
289
289
|
factory: () => new TableFieldRegistry(BUILT_IN_FIELD_TYPES, null),
|
|
290
290
|
});
|
|
291
291
|
/** Registers cell components for custom header types or overrides the built-in ones. */
|
|
292
292
|
function withFieldTypes(fieldTypes) {
|
|
293
|
-
return { kind:
|
|
293
|
+
return { kind: 'fieldTypes', fieldTypes };
|
|
294
294
|
}
|
|
295
295
|
/** Configures the `sds-table` in the injector where it is provided; only needed for custom field types. */
|
|
296
296
|
function provideSdsTable(...features) {
|
|
297
297
|
const types = new Map();
|
|
298
298
|
for (const feature of features) {
|
|
299
|
-
if (feature.kind ===
|
|
299
|
+
if (feature.kind === 'fieldTypes') {
|
|
300
300
|
for (const [type, component] of Object.entries(feature.fieldTypes)) {
|
|
301
301
|
types.set(type, component);
|
|
302
302
|
}
|
|
@@ -324,17 +324,17 @@ class SdsTableFieldDirective {
|
|
|
324
324
|
const component = this.registry.resolveField(header.type);
|
|
325
325
|
if (!component) {
|
|
326
326
|
throw new Error(`Trying to use an unsupported table field type (${header.type}). ` +
|
|
327
|
-
|
|
327
|
+
'Register it with provideSdsTable(withFieldTypes({ ... })).');
|
|
328
328
|
}
|
|
329
329
|
this.componentRef = this.viewContainerRef.createComponent(component);
|
|
330
330
|
}
|
|
331
|
-
this.componentRef.setInput(
|
|
332
|
-
if (
|
|
331
|
+
this.componentRef.setInput('field', header);
|
|
332
|
+
if ('cell' in this.componentRef.instance) {
|
|
333
333
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- header.field is a key of the generic row type T, resolved dynamically per column.
|
|
334
|
-
this.componentRef.setInput(
|
|
334
|
+
this.componentRef.setInput('cell', row[header.field]);
|
|
335
335
|
}
|
|
336
|
-
if (
|
|
337
|
-
this.componentRef.setInput(
|
|
336
|
+
if ('row' in this.componentRef.instance) {
|
|
337
|
+
this.componentRef.setInput('row', row);
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
340
|
}
|
|
@@ -344,7 +344,7 @@ class SdsTableFieldDirective {
|
|
|
344
344
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableFieldDirective, decorators: [{
|
|
345
345
|
type: Directive,
|
|
346
346
|
args: [{
|
|
347
|
-
selector:
|
|
347
|
+
selector: '[sdsTableField]',
|
|
348
348
|
standalone: true,
|
|
349
349
|
}]
|
|
350
350
|
}], ctorParameters: () => [] });
|
|
@@ -356,37 +356,37 @@ class SdsTableGridDirective {
|
|
|
356
356
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableGridDirective, decorators: [{
|
|
357
357
|
type: Directive,
|
|
358
358
|
args: [{
|
|
359
|
-
selector:
|
|
359
|
+
selector: 'table[sdsTableGrid]',
|
|
360
360
|
standalone: true,
|
|
361
|
-
host: { class:
|
|
361
|
+
host: { class: 'min-w-full table-fixed border-collapse' },
|
|
362
362
|
}]
|
|
363
363
|
}] });
|
|
364
364
|
|
|
365
365
|
class SdsTableHeaderCellDirective {
|
|
366
366
|
sortable = input(false);
|
|
367
|
-
textAlign = input(
|
|
367
|
+
textAlign = input('left');
|
|
368
368
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableHeaderCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
369
369
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: SdsTableHeaderCellDirective, isStandalone: true, selector: "th[sdsTableHeaderCell]", inputs: { sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cursor-pointer": "sortable()", "class.select-none": "sortable()", "class.hover:bg-color-background-interactive-secondary-hovered": "sortable()", "class.active:bg-color-background-interactive-secondary-pressed": "sortable()", "class.text-right": "textAlign() === \"right\"", "class.text-center": "textAlign() === \"center\"", "class.text-left": "textAlign() === \"left\"" }, classAttribute: "sticky top-0 z-10 h-[40px] shadow-[inset_0_-1px_0_0_var(--sds-color-border-interactive-secondary)] px-space-1-5 py-space-1 align-middle text-font-size-2 font-font-weight-medium leading-line-height-125 text-color-text-neutral-secondary outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-color-border-focused" }, ngImport: i0 });
|
|
370
370
|
}
|
|
371
371
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableHeaderCellDirective, decorators: [{
|
|
372
372
|
type: Directive,
|
|
373
373
|
args: [{
|
|
374
|
-
selector:
|
|
374
|
+
selector: 'th[sdsTableHeaderCell]',
|
|
375
375
|
standalone: true,
|
|
376
376
|
host: {
|
|
377
|
-
class:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
377
|
+
class: 'sticky top-0 z-10 h-[40px] ' +
|
|
378
|
+
'shadow-[inset_0_-1px_0_0_var(--sds-color-border-interactive-secondary)] ' +
|
|
379
|
+
'px-space-1-5 py-space-1 align-middle ' +
|
|
380
|
+
'text-font-size-2 font-font-weight-medium leading-line-height-125 text-color-text-neutral-secondary ' +
|
|
381
|
+
'outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] ' +
|
|
382
|
+
'focus-visible:outline-color-border-focused',
|
|
383
|
+
'[class.cursor-pointer]': 'sortable()',
|
|
384
|
+
'[class.select-none]': 'sortable()',
|
|
385
|
+
'[class.hover:bg-color-background-interactive-secondary-hovered]': 'sortable()',
|
|
386
|
+
'[class.active:bg-color-background-interactive-secondary-pressed]': 'sortable()',
|
|
387
|
+
'[class.text-right]': 'textAlign() === "right"',
|
|
388
|
+
'[class.text-center]': 'textAlign() === "center"',
|
|
389
|
+
'[class.text-left]': 'textAlign() === "left"',
|
|
390
390
|
},
|
|
391
391
|
}]
|
|
392
392
|
}] });
|
|
@@ -398,9 +398,9 @@ class SdsTableHeaderRowDirective {
|
|
|
398
398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableHeaderRowDirective, decorators: [{
|
|
399
399
|
type: Directive,
|
|
400
400
|
args: [{
|
|
401
|
-
selector:
|
|
401
|
+
selector: 'tr[sdsTableHeaderRow]',
|
|
402
402
|
standalone: true,
|
|
403
|
-
host: { class:
|
|
403
|
+
host: { class: 'bg-color-background-interactive-secondary' },
|
|
404
404
|
}]
|
|
405
405
|
}] });
|
|
406
406
|
|
|
@@ -411,10 +411,10 @@ class SdsTablePaginatorContainerDirective {
|
|
|
411
411
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTablePaginatorContainerDirective, decorators: [{
|
|
412
412
|
type: Directive,
|
|
413
413
|
args: [{
|
|
414
|
-
selector:
|
|
414
|
+
selector: 'div[sdsTablePaginatorContainer]',
|
|
415
415
|
standalone: true,
|
|
416
416
|
host: {
|
|
417
|
-
class:
|
|
417
|
+
class: 'block px-space-2',
|
|
418
418
|
},
|
|
419
419
|
}]
|
|
420
420
|
}] });
|
|
@@ -426,10 +426,10 @@ class SdsTableRowDetailCellDirective {
|
|
|
426
426
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableRowDetailCellDirective, decorators: [{
|
|
427
427
|
type: Directive,
|
|
428
428
|
args: [{
|
|
429
|
-
selector:
|
|
429
|
+
selector: 'td[sdsTableRowDetailCell]',
|
|
430
430
|
standalone: true,
|
|
431
431
|
host: {
|
|
432
|
-
class:
|
|
432
|
+
class: 'bg-surface-sunken px-space-2 py-space-2',
|
|
433
433
|
},
|
|
434
434
|
}]
|
|
435
435
|
}] });
|
|
@@ -445,12 +445,12 @@ class SdsTableRowDirective {
|
|
|
445
445
|
*/
|
|
446
446
|
_backgroundClass = computed(() => {
|
|
447
447
|
if (this.selected()) {
|
|
448
|
-
return
|
|
448
|
+
return 'bg-color-background-selected hover:bg-color-background-selected';
|
|
449
449
|
}
|
|
450
450
|
if (this.zebra()) {
|
|
451
|
-
return
|
|
451
|
+
return 'bg-[var(--sds-color-background-highlight-slate-subtle)] hover:bg-color-background-interactive-secondary-hovered';
|
|
452
452
|
}
|
|
453
|
-
return
|
|
453
|
+
return 'hover:bg-color-background-interactive-secondary-hovered';
|
|
454
454
|
});
|
|
455
455
|
/**
|
|
456
456
|
* Divisor inferior via `box-shadow` (não `border`): com `border-collapse`, uma borda real soma
|
|
@@ -458,7 +458,7 @@ class SdsTableRowDirective {
|
|
|
458
458
|
* ação, que têm zero de folga), fazendo a linha oscilar para 41-42px. O box-shadow é pintado por
|
|
459
459
|
* cima do conteúdo, sem reservar espaço de layout.
|
|
460
460
|
*/
|
|
461
|
-
_borderClass = computed(() => this.isLast() ?
|
|
461
|
+
_borderClass = computed(() => this.isLast() ? '' : 'shadow-[inset_0_-1px_0_0_var(--sds-color-border-interactive-secondary)]');
|
|
462
462
|
_hostClass = computed(() => `${this._backgroundClass()} ${this._borderClass()}`.trim());
|
|
463
463
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
464
464
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: SdsTableRowDirective, isStandalone: true, selector: "tr[sdsTableRow]", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, isLast: { classPropertyName: "isLast", publicName: "isLast", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_hostClass()" }, classAttribute: "h-[40px] outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-color-border-focused" }, ngImport: i0 });
|
|
@@ -466,24 +466,24 @@ class SdsTableRowDirective {
|
|
|
466
466
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableRowDirective, decorators: [{
|
|
467
467
|
type: Directive,
|
|
468
468
|
args: [{
|
|
469
|
-
selector:
|
|
469
|
+
selector: 'tr[sdsTableRow]',
|
|
470
470
|
standalone: true,
|
|
471
471
|
host: {
|
|
472
|
-
class:
|
|
473
|
-
|
|
474
|
-
|
|
472
|
+
class: 'h-[40px] outline-none focus-visible:outline focus-visible:outline-2 ' +
|
|
473
|
+
'focus-visible:outline-offset-[-2px] focus-visible:outline-color-border-focused',
|
|
474
|
+
'[class]': '_hostClass()',
|
|
475
475
|
},
|
|
476
476
|
}]
|
|
477
477
|
}] });
|
|
478
478
|
|
|
479
479
|
function normalizeSearchText(value) {
|
|
480
480
|
// Objects are skipped on purpose: String(object) would match the literal "[object Object]".
|
|
481
|
-
const text = typeof value ===
|
|
481
|
+
const text = typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean'
|
|
482
482
|
? String(value)
|
|
483
|
-
:
|
|
483
|
+
: '';
|
|
484
484
|
return text
|
|
485
|
-
.normalize(
|
|
486
|
-
.replaceAll(/\p{Diacritic}/gu,
|
|
485
|
+
.normalize('NFD')
|
|
486
|
+
.replaceAll(/\p{Diacritic}/gu, '')
|
|
487
487
|
.toLowerCase();
|
|
488
488
|
}
|
|
489
489
|
/** Returns only the filters with a non-empty value, or `undefined` when there is none. */
|
|
@@ -502,9 +502,9 @@ function filterRows(rows, filterValues, headers) {
|
|
|
502
502
|
const headerByField = new Map(headers.map((header) => [header.field, header]));
|
|
503
503
|
return rows.filter((row) => activeFilters.every(([field, value]) => {
|
|
504
504
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- field is a key of the generic row type T, resolved dynamically per column.
|
|
505
|
-
const cellValue = String(row[field] ??
|
|
505
|
+
const cellValue = String(row[field] ?? '');
|
|
506
506
|
const filterType = headerByField.get(field)?.filter?.type;
|
|
507
|
-
return filterType ===
|
|
507
|
+
return filterType === 'select'
|
|
508
508
|
? cellValue === value
|
|
509
509
|
: normalizeSearchText(cellValue).includes(normalizeSearchText(value));
|
|
510
510
|
}));
|
|
@@ -521,16 +521,16 @@ function searchRows(rows, term, headers) {
|
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
function isDataRow(item) {
|
|
524
|
-
return item.kind ===
|
|
524
|
+
return item.kind === 'row';
|
|
525
525
|
}
|
|
526
526
|
function buildRenderRows(rows, { groupField, collapsedGroups, keyOf }) {
|
|
527
527
|
if (!groupField) {
|
|
528
|
-
return rows.map((row, rowIndex) => ({ kind:
|
|
528
|
+
return rows.map((row, rowIndex) => ({ kind: 'row', key: keyOf(row), data: row, rowIndex }));
|
|
529
529
|
}
|
|
530
530
|
const order = [];
|
|
531
531
|
const groups = new Map();
|
|
532
532
|
for (const row of rows) {
|
|
533
|
-
const groupValue = String(row[groupField] ??
|
|
533
|
+
const groupValue = String(row[groupField] ?? '');
|
|
534
534
|
if (!groups.has(groupValue)) {
|
|
535
535
|
groups.set(groupValue, []);
|
|
536
536
|
order.push(groupValue);
|
|
@@ -541,7 +541,7 @@ function buildRenderRows(rows, { groupField, collapsedGroups, keyOf }) {
|
|
|
541
541
|
const groupRows = groups.get(groupValue) ?? [];
|
|
542
542
|
const isCollapsed = collapsedGroups.has(groupValue);
|
|
543
543
|
const groupHeader = {
|
|
544
|
-
kind:
|
|
544
|
+
kind: 'group',
|
|
545
545
|
key: groupValue,
|
|
546
546
|
label: groupValue,
|
|
547
547
|
count: groupRows.length,
|
|
@@ -555,7 +555,7 @@ function buildRenderRows(rows, { groupField, collapsedGroups, keyOf }) {
|
|
|
555
555
|
return [
|
|
556
556
|
groupHeader,
|
|
557
557
|
...groupRows.map((row, rowIndex) => ({
|
|
558
|
-
kind:
|
|
558
|
+
kind: 'row',
|
|
559
559
|
key: keyOf(row),
|
|
560
560
|
data: row,
|
|
561
561
|
rowIndex,
|
|
@@ -587,20 +587,20 @@ function buildLazyLoadEvent({ sort, filterValues, search, pagination, }) {
|
|
|
587
587
|
|
|
588
588
|
function getHeaderSelectionState(allSelected, selectedKeys, pageKeys) {
|
|
589
589
|
if (allSelected) {
|
|
590
|
-
return
|
|
590
|
+
return 'checked';
|
|
591
591
|
}
|
|
592
592
|
if (selectedKeys.size === 0) {
|
|
593
|
-
return
|
|
593
|
+
return 'unchecked';
|
|
594
594
|
}
|
|
595
595
|
const allPageSelected = pageKeys.length > 0 && pageKeys.every((key) => selectedKeys.has(key));
|
|
596
|
-
return allPageSelected ?
|
|
596
|
+
return allPageSelected ? 'checked' : 'indeterminate';
|
|
597
597
|
}
|
|
598
598
|
/** True when the selection already covers every record that exists, so there is nothing left to "select all matching". */
|
|
599
599
|
function coversAllRecords(selectedCount, totalRecords) {
|
|
600
600
|
return totalRecords !== undefined && selectedCount >= totalRecords;
|
|
601
601
|
}
|
|
602
602
|
|
|
603
|
-
const collator = new Intl.Collator(
|
|
603
|
+
const collator = new Intl.Collator('pt-BR', { sensitivity: 'base', numeric: true });
|
|
604
604
|
function isNullish(value) {
|
|
605
605
|
return value === null || value === undefined;
|
|
606
606
|
}
|
|
@@ -610,7 +610,7 @@ function compareValues(valueA, valueB) {
|
|
|
610
610
|
if (isNullishA || isNullishB) {
|
|
611
611
|
return Number(isNullishA) - Number(isNullishB);
|
|
612
612
|
}
|
|
613
|
-
if (typeof valueA ===
|
|
613
|
+
if (typeof valueA === 'string' && typeof valueB === 'string') {
|
|
614
614
|
return collator.compare(valueA, valueB);
|
|
615
615
|
}
|
|
616
616
|
if (valueA === valueB) {
|
|
@@ -620,17 +620,17 @@ function compareValues(valueA, valueB) {
|
|
|
620
620
|
}
|
|
621
621
|
function nextSortOrder(order) {
|
|
622
622
|
switch (order) {
|
|
623
|
-
case
|
|
624
|
-
return
|
|
623
|
+
case 'asc': {
|
|
624
|
+
return 'desc';
|
|
625
625
|
}
|
|
626
|
-
case
|
|
626
|
+
case 'desc': {
|
|
627
627
|
return null;
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
function sortRows(rows, sort, headers) {
|
|
632
632
|
const { field, order } = sort;
|
|
633
|
-
const isDateColumn = headers.some((header) => header.field === field && header.type ===
|
|
633
|
+
const isDateColumn = headers.some((header) => header.field === field && header.type === 'date');
|
|
634
634
|
// Date columns compare by instant, so mixed offsets and partial ISO strings still order correctly.
|
|
635
635
|
const sortValue = (row) => {
|
|
636
636
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- field is a key of the generic row type T, resolved dynamically per column.
|
|
@@ -645,7 +645,7 @@ function sortRows(rows, sort, headers) {
|
|
|
645
645
|
return compareValues(valueA, valueB);
|
|
646
646
|
}
|
|
647
647
|
const comparison = compareValues(valueA, valueB);
|
|
648
|
-
return order ===
|
|
648
|
+
return order === 'asc' ? comparison : -comparison;
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
651
|
|
|
@@ -675,7 +675,7 @@ class SdsTableComponent {
|
|
|
675
675
|
/** Campo que identifica unicamente cada linha. Obrigatório quando `selectionMode` ou expansão de linha (`#rowDetail`) estão em uso. */
|
|
676
676
|
dataKey = input();
|
|
677
677
|
/** Modo de seleção de linhas: `"none"`, `"single"` ou `"multiple"`. */
|
|
678
|
-
selectionMode = input(
|
|
678
|
+
selectionMode = input('none');
|
|
679
679
|
/** Chaves (`dataKey`) das linhas selecionadas. Two-way bindable. */
|
|
680
680
|
selectedKeys = model(new Set());
|
|
681
681
|
/** Indica que todas as linhas correspondentes estão selecionadas (seleção "todas" server-side, além da página atual). */
|
|
@@ -687,7 +687,7 @@ class SdsTableComponent {
|
|
|
687
687
|
/** Função que determina se uma linha pode ser expandida. */
|
|
688
688
|
isRowExpandable = input();
|
|
689
689
|
/** Template (`#rowDetail`) do conteúdo exibido ao expandir uma linha. */
|
|
690
|
-
rowDetailTemplate = contentChild(
|
|
690
|
+
rowDetailTemplate = contentChild('rowDetail');
|
|
691
691
|
/** Campo usado para agrupar as linhas visualmente. */
|
|
692
692
|
groupBy = input();
|
|
693
693
|
/** Ativa o listrado (zebra) entre linhas. */
|
|
@@ -723,7 +723,7 @@ class SdsTableComponent {
|
|
|
723
723
|
radioGroupName = `sds-table-radio-${SdsTableComponent._idCounter++}`;
|
|
724
724
|
activeSort = signal(null);
|
|
725
725
|
filterValues = signal({});
|
|
726
|
-
searchValue = signal(
|
|
726
|
+
searchValue = signal('');
|
|
727
727
|
collapsedGroups = signal(new Set());
|
|
728
728
|
everExpandedKeys = signal(new Set());
|
|
729
729
|
// Detail content mounts on first expansion (by toggle or through the `expandedKeys` model)
|
|
@@ -755,8 +755,8 @@ class SdsTableComponent {
|
|
|
755
755
|
const headers = this.headers();
|
|
756
756
|
return headers.map((header) => {
|
|
757
757
|
const hasTextAlign = !!header.textAlign;
|
|
758
|
-
const isNumberField = header.type ===
|
|
759
|
-
const textAlign = isNumberField && !hasTextAlign ?
|
|
758
|
+
const isNumberField = header.type === 'number';
|
|
759
|
+
const textAlign = isNumberField && !hasTextAlign ? 'right' : (header.textAlign ?? 'left');
|
|
760
760
|
const sortable = !!header.sortable;
|
|
761
761
|
return {
|
|
762
762
|
...header,
|
|
@@ -765,7 +765,7 @@ class SdsTableComponent {
|
|
|
765
765
|
};
|
|
766
766
|
});
|
|
767
767
|
});
|
|
768
|
-
hasSelectionColumn = computed(() => this.reorderable() || this.selectionMode() !==
|
|
768
|
+
hasSelectionColumn = computed(() => this.reorderable() || this.selectionMode() !== 'none');
|
|
769
769
|
hasExpandColumn = computed(() => !!this.rowDetailTemplate());
|
|
770
770
|
hasActionsColumn = computed(() => (this.actions()?.length ?? 0) > 0);
|
|
771
771
|
hasAnyColumnFilter = computed(() => this.headers().some((header) => !!header.filter));
|
|
@@ -783,22 +783,22 @@ class SdsTableComponent {
|
|
|
783
783
|
(this.hasActionsColumn() ? 1 : 0));
|
|
784
784
|
selectionCellMode = computed(() => {
|
|
785
785
|
if (this.reorderable()) {
|
|
786
|
-
return
|
|
786
|
+
return 'drag';
|
|
787
787
|
}
|
|
788
|
-
return this.selectionMode() ===
|
|
788
|
+
return this.selectionMode() === 'single' ? 'radio' : 'checkbox';
|
|
789
789
|
});
|
|
790
|
-
selectionCellLabelKey = computed(() => this.selectionCellMode() ===
|
|
791
|
-
?
|
|
792
|
-
:
|
|
790
|
+
selectionCellLabelKey = computed(() => this.selectionCellMode() === 'drag'
|
|
791
|
+
? 'platform.scala-ng.table_reorder_handle_label'
|
|
792
|
+
: 'platform.scala-ng.table_selection_select_row_label');
|
|
793
793
|
singleSelectedKey = computed(() => {
|
|
794
794
|
const [firstKey] = this.selectedKeys();
|
|
795
795
|
return firstKey ?? null;
|
|
796
796
|
});
|
|
797
797
|
toolbarMode = computed(() => {
|
|
798
798
|
if (this.allSelected()) {
|
|
799
|
-
return
|
|
799
|
+
return 'allSelected';
|
|
800
800
|
}
|
|
801
|
-
return this.selectedKeys().size > 0 ?
|
|
801
|
+
return this.selectedKeys().size > 0 ? 'selectionActive' : 'default';
|
|
802
802
|
});
|
|
803
803
|
// In "default" mode the toolbar renders nothing unless the config gives it search, a filter toggle or an action.
|
|
804
804
|
hasToolbarContent = computed(() => {
|
|
@@ -806,7 +806,7 @@ class SdsTableComponent {
|
|
|
806
806
|
if (!config) {
|
|
807
807
|
return false;
|
|
808
808
|
}
|
|
809
|
-
if (this.toolbarMode() !==
|
|
809
|
+
if (this.toolbarMode() !== 'default') {
|
|
810
810
|
return true;
|
|
811
811
|
}
|
|
812
812
|
return !!(config.search ||
|
|
@@ -848,25 +848,25 @@ class SdsTableComponent {
|
|
|
848
848
|
});
|
|
849
849
|
state = computed(() => {
|
|
850
850
|
if (this.loading()) {
|
|
851
|
-
return
|
|
851
|
+
return 'skeleton';
|
|
852
852
|
}
|
|
853
853
|
if (this.error()) {
|
|
854
|
-
return
|
|
854
|
+
return 'error';
|
|
855
855
|
}
|
|
856
|
-
return this.rows().length === 0 ?
|
|
856
|
+
return this.rows().length === 0 ? 'empty' : 'data';
|
|
857
857
|
});
|
|
858
858
|
// Figma hides the header in the empty/error/skeleton states, but the filter row must survive them
|
|
859
859
|
// so the user can still clear a filter that matched nothing.
|
|
860
|
-
showHeader = computed(() => this.state() ===
|
|
860
|
+
showHeader = computed(() => this.state() === 'data' || this.showFilterRow());
|
|
861
861
|
// Distinguishes a genuinely empty table (no filter applied) from a search/filter that
|
|
862
862
|
// matched nothing, so the empty state can show the right icon/copy for each case.
|
|
863
863
|
hasActiveFilter = computed(() => !!this.searchValue() || !!getActiveFilters(this.filterValues()));
|
|
864
864
|
_filterChanged = new Subject();
|
|
865
865
|
constructor() {
|
|
866
866
|
effect(() => {
|
|
867
|
-
const needsDataKey = this.selectionMode() !==
|
|
867
|
+
const needsDataKey = this.selectionMode() !== 'none' || !!this.rowDetailTemplate();
|
|
868
868
|
if (needsDataKey && this.dataKey() === undefined) {
|
|
869
|
-
throw new Error(
|
|
869
|
+
throw new Error('SdsTableComponent: `dataKey` is required when `selectionMode` or row expansion (`#rowDetail` template) are enabled.');
|
|
870
870
|
}
|
|
871
871
|
});
|
|
872
872
|
// Debounced so typing in a column filter doesn't fire `lazyLoad` (and therefore flip the
|
|
@@ -886,7 +886,7 @@ class SdsTableComponent {
|
|
|
886
886
|
return;
|
|
887
887
|
}
|
|
888
888
|
const current = this.activeSort();
|
|
889
|
-
const nextOrder = current?.field === header.field ? nextSortOrder(current.order) :
|
|
889
|
+
const nextOrder = current?.field === header.field ? nextSortOrder(current.order) : 'asc';
|
|
890
890
|
const nextSort = nextOrder
|
|
891
891
|
? { field: header.field, order: nextOrder }
|
|
892
892
|
: null;
|
|
@@ -897,7 +897,7 @@ class SdsTableComponent {
|
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
_onHeaderKeydown(event, header) {
|
|
900
|
-
if (event.key !==
|
|
900
|
+
if (event.key !== 'Enter' && event.key !== ' ') {
|
|
901
901
|
return;
|
|
902
902
|
}
|
|
903
903
|
// Space's default action is scrolling the page — prevent it before the whole `<th>` acts as
|
|
@@ -924,7 +924,7 @@ class SdsTableComponent {
|
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
_trackRenderRow(item, index) {
|
|
927
|
-
return item.kind ===
|
|
927
|
+
return item.kind === 'group' ? `g:${item.key}` : `r:${item.key ?? index}`;
|
|
928
928
|
}
|
|
929
929
|
_onGroupToggle(groupKey) {
|
|
930
930
|
const next = new Set(this.collapsedGroups());
|
|
@@ -1043,16 +1043,16 @@ class SdsTableComponent {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
const sort = this.activeSort();
|
|
1045
1045
|
if (sort?.field !== header.field) {
|
|
1046
|
-
return
|
|
1046
|
+
return 'none';
|
|
1047
1047
|
}
|
|
1048
|
-
return sort.order ===
|
|
1048
|
+
return sort.order === 'asc' ? 'ascending' : 'descending';
|
|
1049
1049
|
}
|
|
1050
1050
|
_sortIconFor(header) {
|
|
1051
1051
|
const sort = this.activeSort();
|
|
1052
1052
|
if (sort?.field === header.field) {
|
|
1053
|
-
return sort.order ===
|
|
1053
|
+
return sort.order === 'asc' ? 'fa-arrow-up-short-wide' : 'fa-arrow-down-wide-short';
|
|
1054
1054
|
}
|
|
1055
|
-
return
|
|
1055
|
+
return 'fa-up-down';
|
|
1056
1056
|
}
|
|
1057
1057
|
_keyOf(row) {
|
|
1058
1058
|
const dataKeyField = this.dataKey();
|
|
@@ -1083,11 +1083,11 @@ class SdsTableComponent {
|
|
|
1083
1083
|
});
|
|
1084
1084
|
}
|
|
1085
1085
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1086
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsTableComponent, isStandalone: true, selector: "sds-table", inputs: { headers: { classPropertyName: "headers", publicName: "headers", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyHeading: { classPropertyName: "emptyHeading", publicName: "emptyHeading", isSignal: true, isRequired: false, transformFunction: null }, emptyDescription: { classPropertyName: "emptyDescription", publicName: "emptyDescription", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectedKeys: { classPropertyName: "selectedKeys", publicName: "selectedKeys", isSignal: true, isRequired: false, transformFunction: null }, allSelected: { classPropertyName: "allSelected", publicName: "allSelected", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, expandedKeys: { classPropertyName: "expandedKeys", publicName: "expandedKeys", isSignal: true, isRequired: false, transformFunction: null }, isRowExpandable: { classPropertyName: "isRowExpandable", publicName: "isRowExpandable", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, paginatorConfig: { classPropertyName: "paginatorConfig", publicName: "paginatorConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad", selectedKeys: "selectedKeysChange", allSelected: "allSelectedChange", expandedKeys: "expandedKeysChange", rowReorder: "rowReorder", toolbarSearch: "toolbarSearch" }, queries: [{ propertyName: "rowDetailTemplate", first: true, predicate: ["rowDetail"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex w-full flex-col gap-space-2\">\n @if (toolbar(); as toolbarConfig) {\n <div [hidden]=\"!hasToolbarContent()\">\n @defer (on idle; prefetch on immediate) {\n <sds-table-toolbar\n [config]=\"toolbarConfig\"\n [mode]=\"toolbarMode()\"\n [selectedCount]=\"selectedKeys().size\"\n [allowSelectAllMatching]=\"selectionMode() === 'multiple'\"\n [totalRecords]=\"totalRecords() ?? rows().length\"\n [searchValue]=\"searchValue()\"\n (searchChange)=\"_onToolbarSearch($event)\"\n (filterToggle)=\"_onFilterToggle()\"\n (selectAllMatching)=\"_onSelectAllMatching()\"\n (clearSelection)=\"_onClearSelection()\"\n />\n } @placeholder {\n <div class=\"h-[56px]\"></div>\n }\n </div>\n }\n\n <div sdsTableContainer>\n <div class=\"overflow-x-auto\">\n <table sdsTableGrid>\n <colgroup>\n @if (hasSelectionColumn()) {\n <col class=\"w-[48px]\" />\n }\n @if (hasExpandColumn()) {\n <col class=\"w-[40px]\" />\n }\n @for (header of headers(); track header.field) {\n <col />\n }\n @if (hasActionsColumn()) {\n <col sdsTableActionsColumn />\n }\n </colgroup>\n @if (showHeader()) {\n <thead>\n <tr sdsTableHeaderRow>\n @if (hasSelectionColumn()) {\n <th sdsTableHeaderCell>\n @if (selectionMode() === \"multiple\") {\n <div class=\"flex items-center justify-center\">\n <sds-table-selection-cell\n mode=\"checkbox\"\n [label]=\"'platform.scala-ng.table_selection_select_all_label' | translate\"\n [checked]=\"headerSelectionState() === 'checked'\"\n [indeterminate]=\"headerSelectionState() === 'indeterminate'\"\n (checkedChange)=\"$event ? _onSelectAllChecked() : _onSelectAllUnchecked()\"\n />\n </div>\n }\n </th>\n }\n @if (hasExpandColumn()) {\n <th sdsTableHeaderCell>\n <div class=\"flex items-center justify-center\">\n <sds-table-expand-cell\n [expanded]=\"allExpanded()\"\n [label]=\"\n (allExpanded()\n ? 'platform.scala-ng.table_collapse_all_label'\n : 'platform.scala-ng.table_expand_all_label'\n ) | translate\n \"\n (toggled)=\"_onExpandAllToggle()\"\n />\n </div>\n </th>\n }\n <!-- 160px: minimum column width that keeps a label + sort icon readable before the table scrolls horizontally. -->\n @for (header of tableHeaders(); track header.field) {\n <th\n sdsTableHeaderCell\n scope=\"col\"\n class=\"min-w-[160px]\"\n [sortable]=\"header.sortable\"\n [textAlign]=\"header.textAlign\"\n [attr.aria-sort]=\"_ariaSortFor($any(header))\"\n [attr.tabindex]=\"header.sortable ? 0 : null\"\n (click)=\"_onHeaderClick($any(header))\"\n (keydown)=\"_onHeaderKeydown($event, $any(header))\"\n >\n <div\n class=\"flex min-w-0 items-center\"\n [class.justify-end]=\"header.textAlign === 'right'\"\n [class.justify-center]=\"header.textAlign === 'center'\"\n >\n <span class=\"truncate\">{{ header.label }}</span>\n @if (header.sortable) {\n <i\n class=\"fa-solid ml-space-0-50 shrink-0\"\n [class]=\"_sortIconFor($any(header))\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </th>\n }\n @if (hasActionsColumn()) {\n <th\n sdsTableHeaderCell\n scope=\"col\"\n >\n <span class=\"sr-only\">\n {{ \"platform.scala-ng.table_actions_column_label\" | translate }}\n </span>\n </th>\n }\n </tr>\n @if (showFilterRow()) {\n @defer (on idle; prefetch on immediate) {\n <tr\n sds-table-filter-row\n [headers]=\"headers()\"\n [hasSelectionColumn]=\"hasSelectionColumn()\"\n [hasExpandColumn]=\"hasExpandColumn()\"\n [hasActionsColumn]=\"hasActionsColumn()\"\n [values]=\"filterValues()\"\n (valueChange)=\"_onFilterValueChange($event.field, $event.value)\"\n ></tr>\n } @placeholder {\n <tr>\n <td\n class=\"h-[56px]\"\n [attr.colspan]=\"totalColumnCount()\"\n ></td>\n </tr>\n }\n }\n </thead>\n }\n <tbody\n sdsTableBody\n cdkDropList\n (cdkDropListDropped)=\"_onDrop($event)\"\n >\n @switch (state()) {\n @case (\"skeleton\") {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n @for (skeletonRow of skeletonRows; track $index) {\n <div\n aria-hidden=\"true\"\n class=\"flex h-[48px] items-center gap-space-2 overflow-hidden px-space-1-5 shadow-[inset_0_-1px_0_0_var(--sds-color-border-interactive-secondary)]\"\n >\n @for (header of headers(); track header.field) {\n <span\n class=\"block h-[12px] w-[100px] shrink-0 rounded-radius-small bg-color-background-interactive-secondary-pressed\"\n ></span>\n }\n </div>\n }\n </td>\n </tr>\n }\n @case (\"error\") {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n <sds-empty-state\n type=\"error\"\n [showIcon]=\"true\"\n [heading]=\"'platform.scala-ng.table_error_heading' | translate\"\n [description]=\"'platform.scala-ng.table_error_description' | translate\"\n />\n </td>\n </tr>\n }\n @case (\"empty\") {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n <sds-empty-state\n [type]=\"hasActiveFilter() ? 'no-results' : 'default'\"\n [showIcon]=\"true\"\n [heading]=\"\n emptyHeading() ??\n (hasActiveFilter()\n ? ('platform.scala-ng.table_empty_no_results_heading' | translate)\n : ('platform.scala-ng.table_empty_heading' | translate))\n \"\n [description]=\"\n emptyDescription() ??\n (hasActiveFilter()\n ? ('platform.scala-ng.table_empty_no_results_description' | translate)\n : ('platform.scala-ng.table_empty_description' | translate))\n \"\n />\n </td>\n </tr>\n }\n @default {\n @for (item of renderRows(); track _trackRenderRow(item, $index); let last = $last) {\n @switch (item.kind) {\n @case (\"group\") {\n <tr\n sds-table-row-group-header\n [label]=\"item.label\"\n [count]=\"item.count\"\n [collapsed]=\"item.collapsed\"\n [colspan]=\"totalColumnCount()\"\n (toggled)=\"_onGroupToggle(item.key)\"\n ></tr>\n }\n @case (\"row\") {\n <tr\n sdsTableRow\n [selected]=\"_isRowSelected(item.key)\"\n [zebra]=\"zebra() && item.rowIndex % 2 === 0\"\n [isLast]=\"last\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderable()\"\n [cdkDragData]=\"item.data\"\n >\n @if (hasSelectionColumn()) {\n <td sdsTableCell>\n <div class=\"flex items-center justify-center\">\n <sds-table-selection-cell\n [mode]=\"selectionCellMode()\"\n [label]=\"selectionCellLabelKey() | translate\"\n [checked]=\"_isRowSelected(item.key)\"\n [radioGroupName]=\"radioGroupName\"\n [radioValue]=\"item.key ?? ''\"\n [radioSelectedValue]=\"singleSelectedKey()\"\n (checkedChange)=\"_onRowCheckedChange(item.key!, $event)\"\n (radioSelected)=\"_onRowRadioSelected($event)\"\n />\n </div>\n </td>\n }\n @if (hasExpandColumn()) {\n <td sdsTableCell>\n @if (_isRowExpandableRow(item.data)) {\n <div class=\"flex items-center justify-center\">\n <sds-table-expand-cell\n [expanded]=\"_isRowExpanded(item.key)\"\n [label]=\"\n (_isRowExpanded(item.key)\n ? 'platform.scala-ng.table_collapse_row_label'\n : 'platform.scala-ng.table_expand_row_label'\n ) | translate\n \"\n (toggled)=\"_onExpandToggle(item.key!)\"\n />\n </div>\n }\n </td>\n }\n @for (header of tableHeaders(); track header.field) {\n <td\n sdsTableCell\n class=\"truncate\"\n [textAlign]=\"header.textAlign\"\n >\n <ng-container\n [sdsTableField]=\"{ header: $any(header), row: item.data }\"\n ></ng-container>\n </td>\n }\n @if (actions(); as tableActions) {\n @if (tableActions.length > 0) {\n <td\n sdsTableCell\n textAlign=\"right\"\n >\n @defer (on viewport; prefetch on idle) {\n <sds-table-actions-cell\n [actions]=\"tableActions\"\n [row]=\"item.data\"\n />\n } @placeholder {\n <!-- size-8: matches the resolved ghost small button (32px), so the row doesn't jump while the deferred content loads. -->\n <span\n class=\"ml-auto block size-8\"\n aria-hidden=\"true\"\n ></span>\n }\n </td>\n }\n }\n </tr>\n @if (rowDetailTemplate(); as detailTemplate) {\n @if (\n _isRowExpandableRow(item.data) && mountedDetailKeys().has(item.key ?? \"\")\n ) {\n <tr [hidden]=\"!_isRowExpanded(item.key)\">\n <td\n sdsTableRowDetailCell\n [attr.colspan]=\"totalColumnCount()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"detailTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.data }\"\n ></ng-container>\n </td>\n </tr>\n }\n }\n }\n }\n }\n }\n }\n </tbody>\n </table>\n </div>\n </div>\n\n @if (paginator()) {\n <div sdsTablePaginatorContainer>\n <sds-paginator\n [page]=\"effectivePage()\"\n [pageSize]=\"pageSize()\"\n [totalItems]=\"totalRecords() ?? rows().length\"\n [pageSizeOptions]=\"resolvedPaginatorConfig().pageSizeOptions\"\n [loading]=\"loading()\"\n [showPageSize]=\"resolvedPaginatorConfig().showPageSize\"\n [showJumpToPage]=\"resolvedPaginatorConfig().showJumpToPage\"\n [showCounter]=\"resolvedPaginatorConfig().showCounter\"\n [showPageIndicator]=\"resolvedPaginatorConfig().showPageIndicator\"\n (pageChange)=\"_onPaginatorChange($event)\"\n />\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], 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: SdsTableGridDirective, selector: "table[sdsTableGrid]" }, { kind: "directive", type: SdsTableContainerDirective, selector: "div[sdsTableContainer]" }, { kind: "directive", type: SdsTableActionsColumnDirective, selector: "col[sdsTableActionsColumn]" }, { kind: "directive", type: SdsTableHeaderRowDirective, selector: "tr[sdsTableHeaderRow]" }, { kind: "directive", type: SdsTableHeaderCellDirective, selector: "th[sdsTableHeaderCell]", inputs: ["sortable", "textAlign"] }, { kind: "directive", type: SdsTableBodyDirective, selector: "tbody[sdsTableBody]" }, { kind: "directive", type: SdsTableRowDirective, selector: "tr[sdsTableRow]", inputs: ["selected", "zebra", "isLast"] }, { kind: "directive", type: SdsTableCellDirective, selector: "td[sdsTableCell]", inputs: ["textAlign"] }, { kind: "directive", type: SdsTableRowDetailCellDirective, selector: "td[sdsTableRowDetailCell]" }, { kind: "directive", type: SdsTablePaginatorContainerDirective, selector: "div[sdsTablePaginatorContainer]" }, { kind: "directive", type: SdsTableFieldDirective, selector: "[sdsTableField]", inputs: ["sdsTableField"] }, { kind: "component", type: SdsTableSelectionCellComponent, selector: "sds-table-selection-cell", inputs: ["mode", "label", "checked", "indeterminate", "disabled", "radioGroupName", "radioValue", "radioSelectedValue"], outputs: ["checkedChange", "radioSelected"] }, { kind: "component", type: SdsTableExpandCellComponent, selector: "sds-table-expand-cell", inputs: ["expanded", "disabled", "label"], outputs: ["toggled"] }, { kind: "component", type: SdsTableRowGroupHeaderComponent, selector: "tr[sds-table-row-group-header]", inputs: ["label", "count", "collapsed", "colspan"], outputs: ["toggled"] }, { kind: "component", type: SdsEmptyStateComponent, selector: "sds-empty-state", inputs: ["type", "heading", "description", "showIcon", "headingLevel", "primaryAction", "secondaryAction"], outputs: ["primaryActionClick", "secondaryActionClick"] }, { kind: "component", type: SdsPaginatorComponent, selector: "sds-paginator", inputs: ["page", "pageSize", "totalItems", "pageSizeOptions", "loading", "showCounter", "showPageSize", "showJumpToPage", "showPageIndicator"], outputs: ["pageChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], deferBlockDependencies: [() => [import('./seniorsistemas-scala-ng-table-table-toolbar.component-2YcqyPlh.mjs').then(m => m.SdsTableToolbarComponent)], () => [import('./seniorsistemas-scala-ng-table-table-filter-row.component-BgdQk6tM.mjs').then(m => m.SdsTableFilterRowComponent)], () => [import('./seniorsistemas-scala-ng-table-table-actions-cell.component-DTzDhrMk.mjs').then(m => m.SdsTableActionsCellComponent)]] });
|
|
1086
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsTableComponent, isStandalone: true, selector: "sds-table", inputs: { headers: { classPropertyName: "headers", publicName: "headers", isSignal: true, isRequired: true, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, emptyHeading: { classPropertyName: "emptyHeading", publicName: "emptyHeading", isSignal: true, isRequired: false, transformFunction: null }, emptyDescription: { classPropertyName: "emptyDescription", publicName: "emptyDescription", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, selectedKeys: { classPropertyName: "selectedKeys", publicName: "selectedKeys", isSignal: true, isRequired: false, transformFunction: null }, allSelected: { classPropertyName: "allSelected", publicName: "allSelected", isSignal: true, isRequired: false, transformFunction: null }, totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, expandedKeys: { classPropertyName: "expandedKeys", publicName: "expandedKeys", isSignal: true, isRequired: false, transformFunction: null }, isRowExpandable: { classPropertyName: "isRowExpandable", publicName: "isRowExpandable", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "zebra", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, paginator: { classPropertyName: "paginator", publicName: "paginator", isSignal: true, isRequired: false, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, paginatorConfig: { classPropertyName: "paginatorConfig", publicName: "paginatorConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { lazyLoad: "lazyLoad", selectedKeys: "selectedKeysChange", allSelected: "allSelectedChange", expandedKeys: "expandedKeysChange", rowReorder: "rowReorder", toolbarSearch: "toolbarSearch" }, queries: [{ propertyName: "rowDetailTemplate", first: true, predicate: ["rowDetail"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex w-full flex-col gap-space-2\">\n @if (toolbar(); as toolbarConfig) {\n <div [hidden]=\"!hasToolbarContent()\">\n @defer (on idle; prefetch on immediate) {\n <sds-table-toolbar\n [config]=\"toolbarConfig\"\n [mode]=\"toolbarMode()\"\n [selectedCount]=\"selectedKeys().size\"\n [allowSelectAllMatching]=\"selectionMode() === 'multiple'\"\n [totalRecords]=\"totalRecords() ?? rows().length\"\n [searchValue]=\"searchValue()\"\n (searchChange)=\"_onToolbarSearch($event)\"\n (filterToggle)=\"_onFilterToggle()\"\n (selectAllMatching)=\"_onSelectAllMatching()\"\n (clearSelection)=\"_onClearSelection()\"\n />\n } @placeholder {\n <div class=\"h-[56px]\"></div>\n }\n </div>\n }\n\n <div sdsTableContainer>\n <div class=\"overflow-x-auto\">\n <table sdsTableGrid>\n <colgroup>\n @if (hasSelectionColumn()) {\n <col class=\"w-[48px]\" />\n }\n @if (hasExpandColumn()) {\n <col class=\"w-[40px]\" />\n }\n @for (header of headers(); track header.field) {\n <col />\n }\n @if (hasActionsColumn()) {\n <col sdsTableActionsColumn />\n }\n </colgroup>\n @if (showHeader()) {\n <thead>\n <tr sdsTableHeaderRow>\n @if (hasSelectionColumn()) {\n <th sdsTableHeaderCell>\n @if (selectionMode() === 'multiple') {\n <div class=\"flex items-center justify-center\">\n <sds-table-selection-cell\n mode=\"checkbox\"\n [label]=\"'platform.scala-ng.table_selection_select_all_label' | translate\"\n [checked]=\"headerSelectionState() === 'checked'\"\n [indeterminate]=\"headerSelectionState() === 'indeterminate'\"\n (checkedChange)=\"$event ? _onSelectAllChecked() : _onSelectAllUnchecked()\"\n />\n </div>\n }\n </th>\n }\n @if (hasExpandColumn()) {\n <th sdsTableHeaderCell>\n <div class=\"flex items-center justify-center\">\n <sds-table-expand-cell\n [expanded]=\"allExpanded()\"\n [label]=\"\n (allExpanded()\n ? 'platform.scala-ng.table_collapse_all_label'\n : 'platform.scala-ng.table_expand_all_label'\n ) | translate\n \"\n (toggled)=\"_onExpandAllToggle()\"\n />\n </div>\n </th>\n }\n <!-- 160px: minimum column width that keeps a label + sort icon readable before the table scrolls horizontally. -->\n @for (header of tableHeaders(); track header.field) {\n <th\n sdsTableHeaderCell\n scope=\"col\"\n class=\"min-w-[160px]\"\n [sortable]=\"header.sortable\"\n [textAlign]=\"header.textAlign\"\n [attr.aria-sort]=\"_ariaSortFor($any(header))\"\n [attr.tabindex]=\"header.sortable ? 0 : null\"\n (click)=\"_onHeaderClick($any(header))\"\n (keydown)=\"_onHeaderKeydown($event, $any(header))\"\n >\n <div\n class=\"flex min-w-0 items-center\"\n [class.justify-end]=\"header.textAlign === 'right'\"\n [class.justify-center]=\"header.textAlign === 'center'\"\n >\n <span class=\"truncate\">{{ header.label }}</span>\n @if (header.sortable) {\n <i\n class=\"fa-solid ml-space-0-50 shrink-0\"\n [class]=\"_sortIconFor($any(header))\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </th>\n }\n @if (hasActionsColumn()) {\n <th\n sdsTableHeaderCell\n scope=\"col\"\n >\n <span class=\"sr-only\">\n {{ 'platform.scala-ng.table_actions_column_label' | translate }}\n </span>\n </th>\n }\n </tr>\n @if (showFilterRow()) {\n @defer (on idle; prefetch on immediate) {\n <tr\n sds-table-filter-row\n [headers]=\"headers()\"\n [hasSelectionColumn]=\"hasSelectionColumn()\"\n [hasExpandColumn]=\"hasExpandColumn()\"\n [hasActionsColumn]=\"hasActionsColumn()\"\n [values]=\"filterValues()\"\n (valueChange)=\"_onFilterValueChange($event.field, $event.value)\"\n ></tr>\n } @placeholder {\n <tr>\n <td\n class=\"h-[56px]\"\n [attr.colspan]=\"totalColumnCount()\"\n ></td>\n </tr>\n }\n }\n </thead>\n }\n <tbody\n sdsTableBody\n cdkDropList\n (cdkDropListDropped)=\"_onDrop($event)\"\n >\n @switch (state()) {\n @case ('skeleton') {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n @for (skeletonRow of skeletonRows; track $index) {\n <div\n aria-hidden=\"true\"\n class=\"flex h-[48px] items-center gap-space-2 overflow-hidden px-space-1-5 shadow-[inset_0_-1px_0_0_var(--sds-color-border-interactive-secondary)]\"\n >\n @for (header of headers(); track header.field) {\n <span\n class=\"block h-[12px] w-[100px] shrink-0 rounded-radius-small bg-color-background-interactive-secondary-pressed\"\n ></span>\n }\n </div>\n }\n </td>\n </tr>\n }\n @case ('error') {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n <sds-empty-state\n type=\"error\"\n [showIcon]=\"true\"\n [heading]=\"'platform.scala-ng.table_error_heading' | translate\"\n [description]=\"'platform.scala-ng.table_error_description' | translate\"\n />\n </td>\n </tr>\n }\n @case ('empty') {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n <sds-empty-state\n [type]=\"hasActiveFilter() ? 'no-results' : 'default'\"\n [showIcon]=\"true\"\n [heading]=\"\n emptyHeading() ??\n (hasActiveFilter()\n ? ('platform.scala-ng.table_empty_no_results_heading' | translate)\n : ('platform.scala-ng.table_empty_heading' | translate))\n \"\n [description]=\"\n emptyDescription() ??\n (hasActiveFilter()\n ? ('platform.scala-ng.table_empty_no_results_description' | translate)\n : ('platform.scala-ng.table_empty_description' | translate))\n \"\n />\n </td>\n </tr>\n }\n @default {\n @for (item of renderRows(); track _trackRenderRow(item, $index); let last = $last) {\n @switch (item.kind) {\n @case ('group') {\n <tr\n sds-table-row-group-header\n [label]=\"item.label\"\n [count]=\"item.count\"\n [collapsed]=\"item.collapsed\"\n [colspan]=\"totalColumnCount()\"\n (toggled)=\"_onGroupToggle(item.key)\"\n ></tr>\n }\n @case ('row') {\n <tr\n sdsTableRow\n [selected]=\"_isRowSelected(item.key)\"\n [zebra]=\"zebra() && item.rowIndex % 2 === 0\"\n [isLast]=\"last\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderable()\"\n [cdkDragData]=\"item.data\"\n >\n @if (hasSelectionColumn()) {\n <td sdsTableCell>\n <div class=\"flex items-center justify-center\">\n <sds-table-selection-cell\n [mode]=\"selectionCellMode()\"\n [label]=\"selectionCellLabelKey() | translate\"\n [checked]=\"_isRowSelected(item.key)\"\n [radioGroupName]=\"radioGroupName\"\n [radioValue]=\"item.key ?? ''\"\n [radioSelectedValue]=\"singleSelectedKey()\"\n (checkedChange)=\"_onRowCheckedChange(item.key!, $event)\"\n (radioSelected)=\"_onRowRadioSelected($event)\"\n />\n </div>\n </td>\n }\n @if (hasExpandColumn()) {\n <td sdsTableCell>\n @if (_isRowExpandableRow(item.data)) {\n <div class=\"flex items-center justify-center\">\n <sds-table-expand-cell\n [expanded]=\"_isRowExpanded(item.key)\"\n [label]=\"\n (_isRowExpanded(item.key)\n ? 'platform.scala-ng.table_collapse_row_label'\n : 'platform.scala-ng.table_expand_row_label'\n ) | translate\n \"\n (toggled)=\"_onExpandToggle(item.key!)\"\n />\n </div>\n }\n </td>\n }\n @for (header of tableHeaders(); track header.field) {\n <td\n sdsTableCell\n class=\"truncate\"\n [textAlign]=\"header.textAlign\"\n >\n <ng-container\n [sdsTableField]=\"{ header: $any(header), row: item.data }\"\n ></ng-container>\n </td>\n }\n @if (actions(); as tableActions) {\n @if (tableActions.length > 0) {\n <td\n sdsTableCell\n textAlign=\"right\"\n >\n @defer (on viewport; prefetch on idle) {\n <sds-table-actions-cell\n [actions]=\"tableActions\"\n [row]=\"item.data\"\n />\n } @placeholder {\n <!-- size-8: matches the resolved ghost small button (32px), so the row doesn't jump while the deferred content loads. -->\n <span\n class=\"ml-auto block size-8\"\n aria-hidden=\"true\"\n ></span>\n }\n </td>\n }\n }\n </tr>\n @if (rowDetailTemplate(); as detailTemplate) {\n @if (\n _isRowExpandableRow(item.data) && mountedDetailKeys().has(item.key ?? '')\n ) {\n <tr [hidden]=\"!_isRowExpanded(item.key)\">\n <td\n sdsTableRowDetailCell\n [attr.colspan]=\"totalColumnCount()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"detailTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.data }\"\n ></ng-container>\n </td>\n </tr>\n }\n }\n }\n }\n }\n }\n }\n </tbody>\n </table>\n </div>\n </div>\n\n @if (paginator()) {\n <div sdsTablePaginatorContainer>\n <sds-paginator\n [page]=\"effectivePage()\"\n [pageSize]=\"pageSize()\"\n [totalItems]=\"totalRecords() ?? rows().length\"\n [pageSizeOptions]=\"resolvedPaginatorConfig().pageSizeOptions\"\n [loading]=\"loading()\"\n [showPageSize]=\"resolvedPaginatorConfig().showPageSize\"\n [showJumpToPage]=\"resolvedPaginatorConfig().showJumpToPage\"\n [showCounter]=\"resolvedPaginatorConfig().showCounter\"\n [showPageIndicator]=\"resolvedPaginatorConfig().showPageIndicator\"\n (pageChange)=\"_onPaginatorChange($event)\"\n />\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], 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: SdsTableGridDirective, selector: "table[sdsTableGrid]" }, { kind: "directive", type: SdsTableContainerDirective, selector: "div[sdsTableContainer]" }, { kind: "directive", type: SdsTableActionsColumnDirective, selector: "col[sdsTableActionsColumn]" }, { kind: "directive", type: SdsTableHeaderRowDirective, selector: "tr[sdsTableHeaderRow]" }, { kind: "directive", type: SdsTableHeaderCellDirective, selector: "th[sdsTableHeaderCell]", inputs: ["sortable", "textAlign"] }, { kind: "directive", type: SdsTableBodyDirective, selector: "tbody[sdsTableBody]" }, { kind: "directive", type: SdsTableRowDirective, selector: "tr[sdsTableRow]", inputs: ["selected", "zebra", "isLast"] }, { kind: "directive", type: SdsTableCellDirective, selector: "td[sdsTableCell]", inputs: ["textAlign"] }, { kind: "directive", type: SdsTableRowDetailCellDirective, selector: "td[sdsTableRowDetailCell]" }, { kind: "directive", type: SdsTablePaginatorContainerDirective, selector: "div[sdsTablePaginatorContainer]" }, { kind: "directive", type: SdsTableFieldDirective, selector: "[sdsTableField]", inputs: ["sdsTableField"] }, { kind: "component", type: SdsTableSelectionCellComponent, selector: "sds-table-selection-cell", inputs: ["mode", "label", "checked", "indeterminate", "disabled", "radioGroupName", "radioValue", "radioSelectedValue"], outputs: ["checkedChange", "radioSelected"] }, { kind: "component", type: SdsTableExpandCellComponent, selector: "sds-table-expand-cell", inputs: ["expanded", "disabled", "label"], outputs: ["toggled"] }, { kind: "component", type: SdsTableRowGroupHeaderComponent, selector: "tr[sds-table-row-group-header]", inputs: ["label", "count", "collapsed", "colspan"], outputs: ["toggled"] }, { kind: "component", type: SdsEmptyStateComponent, selector: "sds-empty-state", inputs: ["type", "heading", "description", "showIcon", "headingLevel", "primaryAction", "secondaryAction"], outputs: ["primaryActionClick", "secondaryActionClick"] }, { kind: "component", type: SdsPaginatorComponent, selector: "sds-paginator", inputs: ["page", "pageSize", "totalItems", "pageSizeOptions", "loading", "showCounter", "showPageSize", "showJumpToPage", "showPageIndicator"], outputs: ["pageChange"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], deferBlockDependencies: [() => [import('./seniorsistemas-scala-ng-table-table-toolbar.component-C9s1ObGb.mjs').then(m => m.SdsTableToolbarComponent)], () => [import('./seniorsistemas-scala-ng-table-table-filter-row.component-C0Y1KaWD.mjs').then(m => m.SdsTableFilterRowComponent)], () => [import('./seniorsistemas-scala-ng-table-table-actions-cell.component-D_eZKncd.mjs').then(m => m.SdsTableActionsCellComponent)]] });
|
|
1087
1087
|
}
|
|
1088
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.14", ngImport: i0, type: SdsTableComponent, resolveDeferredDeps: () => [import('./seniorsistemas-scala-ng-table-table-toolbar.component-
|
|
1088
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.14", ngImport: i0, type: SdsTableComponent, resolveDeferredDeps: () => [import('./seniorsistemas-scala-ng-table-table-toolbar.component-C9s1ObGb.mjs').then(m => m.SdsTableToolbarComponent), import('./seniorsistemas-scala-ng-table-table-filter-row.component-C0Y1KaWD.mjs').then(m => m.SdsTableFilterRowComponent), import('./seniorsistemas-scala-ng-table-table-actions-cell.component-D_eZKncd.mjs').then(m => m.SdsTableActionsCellComponent)], resolveMetadata: (SdsTableToolbarComponent, SdsTableFilterRowComponent, SdsTableActionsCellComponent) => ({ decorators: [{
|
|
1089
1089
|
type: Component,
|
|
1090
|
-
args: [{ selector:
|
|
1090
|
+
args: [{ selector: 'sds-table', standalone: true, imports: [
|
|
1091
1091
|
NgTemplateOutlet,
|
|
1092
1092
|
CdkDropList,
|
|
1093
1093
|
CdkDrag,
|
|
@@ -1111,7 +1111,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.14", n
|
|
|
1111
1111
|
SdsTableActionsCellComponent,
|
|
1112
1112
|
SdsPaginatorComponent,
|
|
1113
1113
|
TranslatePipe,
|
|
1114
|
-
], template: "<div class=\"flex w-full flex-col gap-space-2\">\n @if (toolbar(); as toolbarConfig) {\n <div [hidden]=\"!hasToolbarContent()\">\n @defer (on idle; prefetch on immediate) {\n <sds-table-toolbar\n [config]=\"toolbarConfig\"\n [mode]=\"toolbarMode()\"\n [selectedCount]=\"selectedKeys().size\"\n [allowSelectAllMatching]=\"selectionMode() === 'multiple'\"\n [totalRecords]=\"totalRecords() ?? rows().length\"\n [searchValue]=\"searchValue()\"\n (searchChange)=\"_onToolbarSearch($event)\"\n (filterToggle)=\"_onFilterToggle()\"\n (selectAllMatching)=\"_onSelectAllMatching()\"\n (clearSelection)=\"_onClearSelection()\"\n />\n } @placeholder {\n <div class=\"h-[56px]\"></div>\n }\n </div>\n }\n\n <div sdsTableContainer>\n <div class=\"overflow-x-auto\">\n <table sdsTableGrid>\n <colgroup>\n @if (hasSelectionColumn()) {\n <col class=\"w-[48px]\" />\n }\n @if (hasExpandColumn()) {\n <col class=\"w-[40px]\" />\n }\n @for (header of headers(); track header.field) {\n <col />\n }\n @if (hasActionsColumn()) {\n <col sdsTableActionsColumn />\n }\n </colgroup>\n @if (showHeader()) {\n <thead>\n <tr sdsTableHeaderRow>\n @if (hasSelectionColumn()) {\n <th sdsTableHeaderCell>\n @if (selectionMode() === \"multiple\") {\n <div class=\"flex items-center justify-center\">\n <sds-table-selection-cell\n mode=\"checkbox\"\n [label]=\"'platform.scala-ng.table_selection_select_all_label' | translate\"\n [checked]=\"headerSelectionState() === 'checked'\"\n [indeterminate]=\"headerSelectionState() === 'indeterminate'\"\n (checkedChange)=\"$event ? _onSelectAllChecked() : _onSelectAllUnchecked()\"\n />\n </div>\n }\n </th>\n }\n @if (hasExpandColumn()) {\n <th sdsTableHeaderCell>\n <div class=\"flex items-center justify-center\">\n <sds-table-expand-cell\n [expanded]=\"allExpanded()\"\n [label]=\"\n (allExpanded()\n ? 'platform.scala-ng.table_collapse_all_label'\n : 'platform.scala-ng.table_expand_all_label'\n ) | translate\n \"\n (toggled)=\"_onExpandAllToggle()\"\n />\n </div>\n </th>\n }\n <!-- 160px: minimum column width that keeps a label + sort icon readable before the table scrolls horizontally. -->\n @for (header of tableHeaders(); track header.field) {\n <th\n sdsTableHeaderCell\n scope=\"col\"\n class=\"min-w-[160px]\"\n [sortable]=\"header.sortable\"\n [textAlign]=\"header.textAlign\"\n [attr.aria-sort]=\"_ariaSortFor($any(header))\"\n [attr.tabindex]=\"header.sortable ? 0 : null\"\n (click)=\"_onHeaderClick($any(header))\"\n (keydown)=\"_onHeaderKeydown($event, $any(header))\"\n >\n <div\n class=\"flex min-w-0 items-center\"\n [class.justify-end]=\"header.textAlign === 'right'\"\n [class.justify-center]=\"header.textAlign === 'center'\"\n >\n <span class=\"truncate\">{{ header.label }}</span>\n @if (header.sortable) {\n <i\n class=\"fa-solid ml-space-0-50 shrink-0\"\n [class]=\"_sortIconFor($any(header))\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </th>\n }\n @if (hasActionsColumn()) {\n <th\n sdsTableHeaderCell\n scope=\"col\"\n >\n <span class=\"sr-only\">\n {{ \"platform.scala-ng.table_actions_column_label\" | translate }}\n </span>\n </th>\n }\n </tr>\n @if (showFilterRow()) {\n @defer (on idle; prefetch on immediate) {\n <tr\n sds-table-filter-row\n [headers]=\"headers()\"\n [hasSelectionColumn]=\"hasSelectionColumn()\"\n [hasExpandColumn]=\"hasExpandColumn()\"\n [hasActionsColumn]=\"hasActionsColumn()\"\n [values]=\"filterValues()\"\n (valueChange)=\"_onFilterValueChange($event.field, $event.value)\"\n ></tr>\n } @placeholder {\n <tr>\n <td\n class=\"h-[56px]\"\n [attr.colspan]=\"totalColumnCount()\"\n ></td>\n </tr>\n }\n }\n </thead>\n }\n <tbody\n sdsTableBody\n cdkDropList\n (cdkDropListDropped)=\"_onDrop($event)\"\n >\n @switch (state()) {\n @case (\"skeleton\") {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n @for (skeletonRow of skeletonRows; track $index) {\n <div\n aria-hidden=\"true\"\n class=\"flex h-[48px] items-center gap-space-2 overflow-hidden px-space-1-5 shadow-[inset_0_-1px_0_0_var(--sds-color-border-interactive-secondary)]\"\n >\n @for (header of headers(); track header.field) {\n <span\n class=\"block h-[12px] w-[100px] shrink-0 rounded-radius-small bg-color-background-interactive-secondary-pressed\"\n ></span>\n }\n </div>\n }\n </td>\n </tr>\n }\n @case (\"error\") {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n <sds-empty-state\n type=\"error\"\n [showIcon]=\"true\"\n [heading]=\"'platform.scala-ng.table_error_heading' | translate\"\n [description]=\"'platform.scala-ng.table_error_description' | translate\"\n />\n </td>\n </tr>\n }\n @case (\"empty\") {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n <sds-empty-state\n [type]=\"hasActiveFilter() ? 'no-results' : 'default'\"\n [showIcon]=\"true\"\n [heading]=\"\n emptyHeading() ??\n (hasActiveFilter()\n ? ('platform.scala-ng.table_empty_no_results_heading' | translate)\n : ('platform.scala-ng.table_empty_heading' | translate))\n \"\n [description]=\"\n emptyDescription() ??\n (hasActiveFilter()\n ? ('platform.scala-ng.table_empty_no_results_description' | translate)\n : ('platform.scala-ng.table_empty_description' | translate))\n \"\n />\n </td>\n </tr>\n }\n @default {\n @for (item of renderRows(); track _trackRenderRow(item, $index); let last = $last) {\n @switch (item.kind) {\n @case (\"group\") {\n <tr\n sds-table-row-group-header\n [label]=\"item.label\"\n [count]=\"item.count\"\n [collapsed]=\"item.collapsed\"\n [colspan]=\"totalColumnCount()\"\n (toggled)=\"_onGroupToggle(item.key)\"\n ></tr>\n }\n @case (\"row\") {\n <tr\n sdsTableRow\n [selected]=\"_isRowSelected(item.key)\"\n [zebra]=\"zebra() && item.rowIndex % 2 === 0\"\n [isLast]=\"last\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderable()\"\n [cdkDragData]=\"item.data\"\n >\n @if (hasSelectionColumn()) {\n <td sdsTableCell>\n <div class=\"flex items-center justify-center\">\n <sds-table-selection-cell\n [mode]=\"selectionCellMode()\"\n [label]=\"selectionCellLabelKey() | translate\"\n [checked]=\"_isRowSelected(item.key)\"\n [radioGroupName]=\"radioGroupName\"\n [radioValue]=\"item.key ?? ''\"\n [radioSelectedValue]=\"singleSelectedKey()\"\n (checkedChange)=\"_onRowCheckedChange(item.key!, $event)\"\n (radioSelected)=\"_onRowRadioSelected($event)\"\n />\n </div>\n </td>\n }\n @if (hasExpandColumn()) {\n <td sdsTableCell>\n @if (_isRowExpandableRow(item.data)) {\n <div class=\"flex items-center justify-center\">\n <sds-table-expand-cell\n [expanded]=\"_isRowExpanded(item.key)\"\n [label]=\"\n (_isRowExpanded(item.key)\n ? 'platform.scala-ng.table_collapse_row_label'\n : 'platform.scala-ng.table_expand_row_label'\n ) | translate\n \"\n (toggled)=\"_onExpandToggle(item.key!)\"\n />\n </div>\n }\n </td>\n }\n @for (header of tableHeaders(); track header.field) {\n <td\n sdsTableCell\n class=\"truncate\"\n [textAlign]=\"header.textAlign\"\n >\n <ng-container\n [sdsTableField]=\"{ header: $any(header), row: item.data }\"\n ></ng-container>\n </td>\n }\n @if (actions(); as tableActions) {\n @if (tableActions.length > 0) {\n <td\n sdsTableCell\n textAlign=\"right\"\n >\n @defer (on viewport; prefetch on idle) {\n <sds-table-actions-cell\n [actions]=\"tableActions\"\n [row]=\"item.data\"\n />\n } @placeholder {\n <!-- size-8: matches the resolved ghost small button (32px), so the row doesn't jump while the deferred content loads. -->\n <span\n class=\"ml-auto block size-8\"\n aria-hidden=\"true\"\n ></span>\n }\n </td>\n }\n }\n </tr>\n @if (rowDetailTemplate(); as detailTemplate) {\n @if (\n _isRowExpandableRow(item.data) && mountedDetailKeys().has(item.key ?? \"\")\n ) {\n <tr [hidden]=\"!_isRowExpanded(item.key)\">\n <td\n sdsTableRowDetailCell\n [attr.colspan]=\"totalColumnCount()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"detailTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.data }\"\n ></ng-container>\n </td>\n </tr>\n }\n }\n }\n }\n }\n }\n }\n </tbody>\n </table>\n </div>\n </div>\n\n @if (paginator()) {\n <div sdsTablePaginatorContainer>\n <sds-paginator\n [page]=\"effectivePage()\"\n [pageSize]=\"pageSize()\"\n [totalItems]=\"totalRecords() ?? rows().length\"\n [pageSizeOptions]=\"resolvedPaginatorConfig().pageSizeOptions\"\n [loading]=\"loading()\"\n [showPageSize]=\"resolvedPaginatorConfig().showPageSize\"\n [showJumpToPage]=\"resolvedPaginatorConfig().showJumpToPage\"\n [showCounter]=\"resolvedPaginatorConfig().showCounter\"\n [showPageIndicator]=\"resolvedPaginatorConfig().showPageIndicator\"\n (pageChange)=\"_onPaginatorChange($event)\"\n />\n </div>\n }\n</div>\n" }]
|
|
1114
|
+
], template: "<div class=\"flex w-full flex-col gap-space-2\">\n @if (toolbar(); as toolbarConfig) {\n <div [hidden]=\"!hasToolbarContent()\">\n @defer (on idle; prefetch on immediate) {\n <sds-table-toolbar\n [config]=\"toolbarConfig\"\n [mode]=\"toolbarMode()\"\n [selectedCount]=\"selectedKeys().size\"\n [allowSelectAllMatching]=\"selectionMode() === 'multiple'\"\n [totalRecords]=\"totalRecords() ?? rows().length\"\n [searchValue]=\"searchValue()\"\n (searchChange)=\"_onToolbarSearch($event)\"\n (filterToggle)=\"_onFilterToggle()\"\n (selectAllMatching)=\"_onSelectAllMatching()\"\n (clearSelection)=\"_onClearSelection()\"\n />\n } @placeholder {\n <div class=\"h-[56px]\"></div>\n }\n </div>\n }\n\n <div sdsTableContainer>\n <div class=\"overflow-x-auto\">\n <table sdsTableGrid>\n <colgroup>\n @if (hasSelectionColumn()) {\n <col class=\"w-[48px]\" />\n }\n @if (hasExpandColumn()) {\n <col class=\"w-[40px]\" />\n }\n @for (header of headers(); track header.field) {\n <col />\n }\n @if (hasActionsColumn()) {\n <col sdsTableActionsColumn />\n }\n </colgroup>\n @if (showHeader()) {\n <thead>\n <tr sdsTableHeaderRow>\n @if (hasSelectionColumn()) {\n <th sdsTableHeaderCell>\n @if (selectionMode() === 'multiple') {\n <div class=\"flex items-center justify-center\">\n <sds-table-selection-cell\n mode=\"checkbox\"\n [label]=\"'platform.scala-ng.table_selection_select_all_label' | translate\"\n [checked]=\"headerSelectionState() === 'checked'\"\n [indeterminate]=\"headerSelectionState() === 'indeterminate'\"\n (checkedChange)=\"$event ? _onSelectAllChecked() : _onSelectAllUnchecked()\"\n />\n </div>\n }\n </th>\n }\n @if (hasExpandColumn()) {\n <th sdsTableHeaderCell>\n <div class=\"flex items-center justify-center\">\n <sds-table-expand-cell\n [expanded]=\"allExpanded()\"\n [label]=\"\n (allExpanded()\n ? 'platform.scala-ng.table_collapse_all_label'\n : 'platform.scala-ng.table_expand_all_label'\n ) | translate\n \"\n (toggled)=\"_onExpandAllToggle()\"\n />\n </div>\n </th>\n }\n <!-- 160px: minimum column width that keeps a label + sort icon readable before the table scrolls horizontally. -->\n @for (header of tableHeaders(); track header.field) {\n <th\n sdsTableHeaderCell\n scope=\"col\"\n class=\"min-w-[160px]\"\n [sortable]=\"header.sortable\"\n [textAlign]=\"header.textAlign\"\n [attr.aria-sort]=\"_ariaSortFor($any(header))\"\n [attr.tabindex]=\"header.sortable ? 0 : null\"\n (click)=\"_onHeaderClick($any(header))\"\n (keydown)=\"_onHeaderKeydown($event, $any(header))\"\n >\n <div\n class=\"flex min-w-0 items-center\"\n [class.justify-end]=\"header.textAlign === 'right'\"\n [class.justify-center]=\"header.textAlign === 'center'\"\n >\n <span class=\"truncate\">{{ header.label }}</span>\n @if (header.sortable) {\n <i\n class=\"fa-solid ml-space-0-50 shrink-0\"\n [class]=\"_sortIconFor($any(header))\"\n aria-hidden=\"true\"\n ></i>\n }\n </div>\n </th>\n }\n @if (hasActionsColumn()) {\n <th\n sdsTableHeaderCell\n scope=\"col\"\n >\n <span class=\"sr-only\">\n {{ 'platform.scala-ng.table_actions_column_label' | translate }}\n </span>\n </th>\n }\n </tr>\n @if (showFilterRow()) {\n @defer (on idle; prefetch on immediate) {\n <tr\n sds-table-filter-row\n [headers]=\"headers()\"\n [hasSelectionColumn]=\"hasSelectionColumn()\"\n [hasExpandColumn]=\"hasExpandColumn()\"\n [hasActionsColumn]=\"hasActionsColumn()\"\n [values]=\"filterValues()\"\n (valueChange)=\"_onFilterValueChange($event.field, $event.value)\"\n ></tr>\n } @placeholder {\n <tr>\n <td\n class=\"h-[56px]\"\n [attr.colspan]=\"totalColumnCount()\"\n ></td>\n </tr>\n }\n }\n </thead>\n }\n <tbody\n sdsTableBody\n cdkDropList\n (cdkDropListDropped)=\"_onDrop($event)\"\n >\n @switch (state()) {\n @case ('skeleton') {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n @for (skeletonRow of skeletonRows; track $index) {\n <div\n aria-hidden=\"true\"\n class=\"flex h-[48px] items-center gap-space-2 overflow-hidden px-space-1-5 shadow-[inset_0_-1px_0_0_var(--sds-color-border-interactive-secondary)]\"\n >\n @for (header of headers(); track header.field) {\n <span\n class=\"block h-[12px] w-[100px] shrink-0 rounded-radius-small bg-color-background-interactive-secondary-pressed\"\n ></span>\n }\n </div>\n }\n </td>\n </tr>\n }\n @case ('error') {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n <sds-empty-state\n type=\"error\"\n [showIcon]=\"true\"\n [heading]=\"'platform.scala-ng.table_error_heading' | translate\"\n [description]=\"'platform.scala-ng.table_error_description' | translate\"\n />\n </td>\n </tr>\n }\n @case ('empty') {\n <tr>\n <td\n class=\"p-0\"\n [attr.colspan]=\"totalColumnCount()\"\n >\n <sds-empty-state\n [type]=\"hasActiveFilter() ? 'no-results' : 'default'\"\n [showIcon]=\"true\"\n [heading]=\"\n emptyHeading() ??\n (hasActiveFilter()\n ? ('platform.scala-ng.table_empty_no_results_heading' | translate)\n : ('platform.scala-ng.table_empty_heading' | translate))\n \"\n [description]=\"\n emptyDescription() ??\n (hasActiveFilter()\n ? ('platform.scala-ng.table_empty_no_results_description' | translate)\n : ('platform.scala-ng.table_empty_description' | translate))\n \"\n />\n </td>\n </tr>\n }\n @default {\n @for (item of renderRows(); track _trackRenderRow(item, $index); let last = $last) {\n @switch (item.kind) {\n @case ('group') {\n <tr\n sds-table-row-group-header\n [label]=\"item.label\"\n [count]=\"item.count\"\n [collapsed]=\"item.collapsed\"\n [colspan]=\"totalColumnCount()\"\n (toggled)=\"_onGroupToggle(item.key)\"\n ></tr>\n }\n @case ('row') {\n <tr\n sdsTableRow\n [selected]=\"_isRowSelected(item.key)\"\n [zebra]=\"zebra() && item.rowIndex % 2 === 0\"\n [isLast]=\"last\"\n cdkDrag\n [cdkDragDisabled]=\"!reorderable()\"\n [cdkDragData]=\"item.data\"\n >\n @if (hasSelectionColumn()) {\n <td sdsTableCell>\n <div class=\"flex items-center justify-center\">\n <sds-table-selection-cell\n [mode]=\"selectionCellMode()\"\n [label]=\"selectionCellLabelKey() | translate\"\n [checked]=\"_isRowSelected(item.key)\"\n [radioGroupName]=\"radioGroupName\"\n [radioValue]=\"item.key ?? ''\"\n [radioSelectedValue]=\"singleSelectedKey()\"\n (checkedChange)=\"_onRowCheckedChange(item.key!, $event)\"\n (radioSelected)=\"_onRowRadioSelected($event)\"\n />\n </div>\n </td>\n }\n @if (hasExpandColumn()) {\n <td sdsTableCell>\n @if (_isRowExpandableRow(item.data)) {\n <div class=\"flex items-center justify-center\">\n <sds-table-expand-cell\n [expanded]=\"_isRowExpanded(item.key)\"\n [label]=\"\n (_isRowExpanded(item.key)\n ? 'platform.scala-ng.table_collapse_row_label'\n : 'platform.scala-ng.table_expand_row_label'\n ) | translate\n \"\n (toggled)=\"_onExpandToggle(item.key!)\"\n />\n </div>\n }\n </td>\n }\n @for (header of tableHeaders(); track header.field) {\n <td\n sdsTableCell\n class=\"truncate\"\n [textAlign]=\"header.textAlign\"\n >\n <ng-container\n [sdsTableField]=\"{ header: $any(header), row: item.data }\"\n ></ng-container>\n </td>\n }\n @if (actions(); as tableActions) {\n @if (tableActions.length > 0) {\n <td\n sdsTableCell\n textAlign=\"right\"\n >\n @defer (on viewport; prefetch on idle) {\n <sds-table-actions-cell\n [actions]=\"tableActions\"\n [row]=\"item.data\"\n />\n } @placeholder {\n <!-- size-8: matches the resolved ghost small button (32px), so the row doesn't jump while the deferred content loads. -->\n <span\n class=\"ml-auto block size-8\"\n aria-hidden=\"true\"\n ></span>\n }\n </td>\n }\n }\n </tr>\n @if (rowDetailTemplate(); as detailTemplate) {\n @if (\n _isRowExpandableRow(item.data) && mountedDetailKeys().has(item.key ?? '')\n ) {\n <tr [hidden]=\"!_isRowExpanded(item.key)\">\n <td\n sdsTableRowDetailCell\n [attr.colspan]=\"totalColumnCount()\"\n >\n <ng-container\n [ngTemplateOutlet]=\"detailTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.data }\"\n ></ng-container>\n </td>\n </tr>\n }\n }\n }\n }\n }\n }\n }\n </tbody>\n </table>\n </div>\n </div>\n\n @if (paginator()) {\n <div sdsTablePaginatorContainer>\n <sds-paginator\n [page]=\"effectivePage()\"\n [pageSize]=\"pageSize()\"\n [totalItems]=\"totalRecords() ?? rows().length\"\n [pageSizeOptions]=\"resolvedPaginatorConfig().pageSizeOptions\"\n [loading]=\"loading()\"\n [showPageSize]=\"resolvedPaginatorConfig().showPageSize\"\n [showJumpToPage]=\"resolvedPaginatorConfig().showJumpToPage\"\n [showCounter]=\"resolvedPaginatorConfig().showCounter\"\n [showPageIndicator]=\"resolvedPaginatorConfig().showPageIndicator\"\n (pageChange)=\"_onPaginatorChange($event)\"\n />\n </div>\n }\n</div>\n" }]
|
|
1115
1115
|
}], ctorParameters: () => [], propDecorators: null }) });
|
|
1116
1116
|
|
|
1117
1117
|
/**
|