@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
|
@@ -8,11 +8,11 @@ import { SdsTooltipDirective } from '@seniorsistemas/scala-ng/tooltip';
|
|
|
8
8
|
class SdsPageHeaderComponent {
|
|
9
9
|
static idCounter = 0;
|
|
10
10
|
_titleId;
|
|
11
|
-
titleElementRef = viewChild(
|
|
11
|
+
titleElementRef = viewChild('titleEl');
|
|
12
12
|
/** Page title. The component's floor — always rendered, everything else here is optional. */
|
|
13
13
|
heading = input.required();
|
|
14
14
|
/** Supporting text below the title row; truncates to two lines. Omitted when empty. */
|
|
15
|
-
description = input(
|
|
15
|
+
description = input('');
|
|
16
16
|
/** Shows the automatic route breadcrumb trail (`sds-breadcrumb-router`). Turn off on top-level pages. */
|
|
17
17
|
hasBreadcrumb = input(true);
|
|
18
18
|
/** Heading level, rendered as the matching `<h1>`–`<h6>`; adjust to match the host screen's hierarchy. */
|
|
@@ -22,7 +22,7 @@ class SdsPageHeaderComponent {
|
|
|
22
22
|
/** Scope-filter segments (`sds-select-button`) rendered below the title. Omitted when empty. */
|
|
23
23
|
scopeFilterItems = input([]);
|
|
24
24
|
/** Accessible name for the scope filter; falls back to a translated default when empty. */
|
|
25
|
-
scopeFilterAriaLabel = input(
|
|
25
|
+
scopeFilterAriaLabel = input('');
|
|
26
26
|
/** Two-way bound scope-filter selection. */
|
|
27
27
|
scopeFilterValue = model(null);
|
|
28
28
|
hasDescription = computed(() => this.description().length > 0);
|
|
@@ -44,14 +44,14 @@ class SdsPageHeaderComponent {
|
|
|
44
44
|
this.titleElementRef()?.nativeElement.focus();
|
|
45
45
|
}
|
|
46
46
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
47
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsPageHeaderComponent, isStandalone: true, selector: "sds-page-header", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, hasBreadcrumb: { classPropertyName: "hasBreadcrumb", publicName: "hasBreadcrumb", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, scopeFilterItems: { classPropertyName: "scopeFilterItems", publicName: "scopeFilterItems", isSignal: true, isRequired: false, transformFunction: null }, scopeFilterAriaLabel: { classPropertyName: "scopeFilterAriaLabel", publicName: "scopeFilterAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, scopeFilterValue: { classPropertyName: "scopeFilterValue", publicName: "scopeFilterValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { scopeFilterValue: "scopeFilterValueChange" }, host: { attributes: { "role": "region" }, properties: { "attr.aria-labelledby": "_titleId" }, classAttribute: "flex w-full flex-col gap-space-1 border-b border-solid border-color-border bg-surface-default px-space-2-5 py-space-2" }, viewQueries: [{ propertyName: "titleElementRef", first: true, predicate: ["titleEl"], descendants: true, isSignal: true }], ngImport: i0, template: "@let resolvedMoreActionsAriaLabel =
|
|
47
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsPageHeaderComponent, isStandalone: true, selector: "sds-page-header", inputs: { heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: true, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, hasBreadcrumb: { classPropertyName: "hasBreadcrumb", publicName: "hasBreadcrumb", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, scopeFilterItems: { classPropertyName: "scopeFilterItems", publicName: "scopeFilterItems", isSignal: true, isRequired: false, transformFunction: null }, scopeFilterAriaLabel: { classPropertyName: "scopeFilterAriaLabel", publicName: "scopeFilterAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, scopeFilterValue: { classPropertyName: "scopeFilterValue", publicName: "scopeFilterValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { scopeFilterValue: "scopeFilterValueChange" }, host: { attributes: { "role": "region" }, properties: { "attr.aria-labelledby": "_titleId" }, classAttribute: "flex w-full flex-col gap-space-1 border-b border-solid border-color-border bg-surface-default px-space-2-5 py-space-2" }, viewQueries: [{ propertyName: "titleElementRef", first: true, predicate: ["titleEl"], descendants: true, isSignal: true }], ngImport: i0, template: "@let resolvedMoreActionsAriaLabel = 'platform.scala-ng.page_header_more_actions_label' | translate;\n@let resolvedScopeFilterAriaLabel =\n scopeFilterAriaLabel() || ('platform.scala-ng.page_header_scope_filter_label' | translate);\n\n@if (hasBreadcrumb()) {\n @defer (on idle; prefetch on immediate) {\n <sds-breadcrumb-router />\n } @placeholder {\n <div class=\"h-[29px]\"></div>\n }\n}\n\n<div class=\"flex flex-col gap-space-0-75\">\n <div class=\"flex items-center gap-space-3\">\n <!-- Native heading tags instead of the ARIA heading role, so every assistive technology recognizes them. -->\n @switch (headingLevel()) {\n @default {\n <h1\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h1>\n }\n @case (2) {\n <h2\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h2>\n }\n @case (3) {\n <h3\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h3>\n }\n @case (4) {\n <h4\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h4>\n }\n @case (5) {\n <h5\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h5>\n }\n @case (6) {\n <h6\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h6>\n }\n }\n\n @if (hasActions()) {\n @defer (on idle; prefetch on immediate) {\n <div class=\"flex shrink-0 items-center gap-space-1\">\n @if (actions()?.secondaryAction; as action) {\n <button\n sdsButton\n type=\"secondary\"\n [disabled]=\"action.disabled ?? false\"\n [attr.aria-label]=\"action.label ? null : action.ariaLabel\"\n [sdsTooltip]=\"action.tooltip || (action.label ? '' : (action.ariaLabel ?? ''))\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <i\n sdsLeadingIcon\n [class]=\"action.icon\"\n aria-hidden=\"true\"\n ></i>\n }\n @if (action.label) {\n {{ action.label }}\n }\n </button>\n }\n @if (actions()?.primaryAction; as action) {\n <button\n sdsButton\n type=\"primary\"\n [disabled]=\"action.disabled ?? false\"\n [attr.aria-label]=\"action.label ? null : action.ariaLabel\"\n [sdsTooltip]=\"action.tooltip || (action.label ? '' : (action.ariaLabel ?? ''))\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <i\n sdsLeadingIcon\n [class]=\"action.icon\"\n aria-hidden=\"true\"\n ></i>\n }\n @if (action.label) {\n {{ action.label }}\n }\n </button>\n }\n @if (actions()?.moreActions?.length) {\n <button\n sdsButton\n type=\"secondary\"\n [sdsTieredMenu]=\"actions()!.moreActions!\"\n [attr.aria-label]=\"resolvedMoreActionsAriaLabel\"\n [sdsTooltip]=\"resolvedMoreActionsAriaLabel\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid fa-ellipsis-vertical\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n </div>\n } @placeholder {\n <div class=\"h-[40px] w-[40px] shrink-0\"></div>\n }\n }\n </div>\n\n @if (hasDescription()) {\n <p\n class=\"line-clamp-2 text-font-size-2 font-font-weight-regular leading-line-height-150 text-color-text-neutral-secondary\"\n >\n {{ description() }}\n </p>\n }\n</div>\n\n@if (hasScopeFilter()) {\n @defer (on idle; prefetch on immediate) {\n <sds-select-button\n [items]=\"scopeFilterItems()\"\n [ariaLabel]=\"resolvedScopeFilterAriaLabel\"\n [(ngModel)]=\"scopeFilterValue\"\n />\n } @placeholder {\n <div class=\"h-[38px]\"></div>\n }\n}\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: SdsTooltipDirective, selector: "[sdsTooltip]", inputs: ["sdsTooltip", "sdsTooltipContext", "sdsTooltipTitle", "sdsTooltipPosition", "sdsTooltipShowArrow", "sdsTooltipOpenDelay", "sdsTooltipTouchDismiss", "sdsTooltipDisabled", "sdsTooltipCheckTruncatedText", "sdsTooltipFocusable", "sdsTooltipDescribeHost", "sdsTooltipAnchor", "sdsTooltipKeepOpenOnPress"] }], deferBlockDependencies: [() => [import('@seniorsistemas/scala-ng/breadcrumb').then(m => m.SdsBreadcrumbRouterComponent)], () => [import('@seniorsistemas/scala-ng/button').then(m => m.SdsButtonComponent), import('@seniorsistemas/scala-ng/tiered-menu').then(m => m.SdsTieredMenuDirective), SdsTooltipDirective], () => [i1.NgControlStatus, i1.NgModel, import('@seniorsistemas/scala-ng/select-button').then(m => m.SdsSelectButtonComponent)]] });
|
|
48
48
|
}
|
|
49
49
|
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.14", ngImport: i0, type: SdsPageHeaderComponent, resolveDeferredDeps: () => [import('@seniorsistemas/scala-ng/breadcrumb').then(m => m.SdsBreadcrumbRouterComponent), import('@seniorsistemas/scala-ng/button').then(m => m.SdsButtonComponent), import('@seniorsistemas/scala-ng/tiered-menu').then(m => m.SdsTieredMenuDirective), import('@seniorsistemas/scala-ng/select-button').then(m => m.SdsSelectButtonComponent)], resolveMetadata: (SdsBreadcrumbRouterComponent, SdsButtonComponent, SdsTieredMenuDirective, SdsSelectButtonComponent) => ({ decorators: [{
|
|
50
50
|
type: Component,
|
|
51
|
-
args: [{ selector:
|
|
52
|
-
class:
|
|
53
|
-
role:
|
|
54
|
-
|
|
51
|
+
args: [{ selector: 'sds-page-header', standalone: true, host: {
|
|
52
|
+
class: 'flex w-full flex-col gap-space-1 border-b border-solid border-color-border bg-surface-default px-space-2-5 py-space-2',
|
|
53
|
+
role: 'region',
|
|
54
|
+
'[attr.aria-labelledby]': '_titleId',
|
|
55
55
|
}, imports: [
|
|
56
56
|
FormsModule,
|
|
57
57
|
TranslatePipe,
|
|
@@ -60,7 +60,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "18.2.14", n
|
|
|
60
60
|
SdsSelectButtonComponent,
|
|
61
61
|
SdsTieredMenuDirective,
|
|
62
62
|
SdsTooltipDirective,
|
|
63
|
-
], template: "@let resolvedMoreActionsAriaLabel =
|
|
63
|
+
], template: "@let resolvedMoreActionsAriaLabel = 'platform.scala-ng.page_header_more_actions_label' | translate;\n@let resolvedScopeFilterAriaLabel =\n scopeFilterAriaLabel() || ('platform.scala-ng.page_header_scope_filter_label' | translate);\n\n@if (hasBreadcrumb()) {\n @defer (on idle; prefetch on immediate) {\n <sds-breadcrumb-router />\n } @placeholder {\n <div class=\"h-[29px]\"></div>\n }\n}\n\n<div class=\"flex flex-col gap-space-0-75\">\n <div class=\"flex items-center gap-space-3\">\n <!-- Native heading tags instead of the ARIA heading role, so every assistive technology recognizes them. -->\n @switch (headingLevel()) {\n @default {\n <h1\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h1>\n }\n @case (2) {\n <h2\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h2>\n }\n @case (3) {\n <h3\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h3>\n }\n @case (4) {\n <h4\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h4>\n }\n @case (5) {\n <h5\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h5>\n }\n @case (6) {\n <h6\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h6>\n }\n }\n\n @if (hasActions()) {\n @defer (on idle; prefetch on immediate) {\n <div class=\"flex shrink-0 items-center gap-space-1\">\n @if (actions()?.secondaryAction; as action) {\n <button\n sdsButton\n type=\"secondary\"\n [disabled]=\"action.disabled ?? false\"\n [attr.aria-label]=\"action.label ? null : action.ariaLabel\"\n [sdsTooltip]=\"action.tooltip || (action.label ? '' : (action.ariaLabel ?? ''))\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <i\n sdsLeadingIcon\n [class]=\"action.icon\"\n aria-hidden=\"true\"\n ></i>\n }\n @if (action.label) {\n {{ action.label }}\n }\n </button>\n }\n @if (actions()?.primaryAction; as action) {\n <button\n sdsButton\n type=\"primary\"\n [disabled]=\"action.disabled ?? false\"\n [attr.aria-label]=\"action.label ? null : action.ariaLabel\"\n [sdsTooltip]=\"action.tooltip || (action.label ? '' : (action.ariaLabel ?? ''))\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <i\n sdsLeadingIcon\n [class]=\"action.icon\"\n aria-hidden=\"true\"\n ></i>\n }\n @if (action.label) {\n {{ action.label }}\n }\n </button>\n }\n @if (actions()?.moreActions?.length) {\n <button\n sdsButton\n type=\"secondary\"\n [sdsTieredMenu]=\"actions()!.moreActions!\"\n [attr.aria-label]=\"resolvedMoreActionsAriaLabel\"\n [sdsTooltip]=\"resolvedMoreActionsAriaLabel\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid fa-ellipsis-vertical\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n </div>\n } @placeholder {\n <div class=\"h-[40px] w-[40px] shrink-0\"></div>\n }\n }\n </div>\n\n @if (hasDescription()) {\n <p\n class=\"line-clamp-2 text-font-size-2 font-font-weight-regular leading-line-height-150 text-color-text-neutral-secondary\"\n >\n {{ description() }}\n </p>\n }\n</div>\n\n@if (hasScopeFilter()) {\n @defer (on idle; prefetch on immediate) {\n <sds-select-button\n [items]=\"scopeFilterItems()\"\n [ariaLabel]=\"resolvedScopeFilterAriaLabel\"\n [(ngModel)]=\"scopeFilterValue\"\n />\n } @placeholder {\n <div class=\"h-[38px]\"></div>\n }\n}\n" }]
|
|
64
64
|
}], ctorParameters: () => [], propDecorators: null }) });
|
|
65
65
|
|
|
66
66
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-scala-ng-page-header.mjs","sources":["../../projects/scala-ng/page-header/src/page-header/page-header.component.ts","../../projects/scala-ng/page-header/src/page-header/page-header.component.html","../../projects/scala-ng/page-header/seniorsistemas-scala-ng-page-header.ts"],"sourcesContent":["import { Component, computed, ElementRef, input, model, viewChild } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { TranslatePipe } from \"@ngx-translate/core\";\nimport { SdsBreadcrumbRouterComponent } from \"@seniorsistemas/scala-ng/breadcrumb\";\nimport { SdsButtonComponent } from \"@seniorsistemas/scala-ng/button\";\nimport {\n SdsSelectButtonComponent,\n type SelectButtonItem,\n} from \"@seniorsistemas/scala-ng/select-button\";\nimport {\n SdsTieredMenuDirective,\n type SdsTieredMenuItem,\n} from \"@seniorsistemas/scala-ng/tiered-menu\";\nimport { SdsTooltipDirective } from \"@seniorsistemas/scala-ng/tooltip\";\n\nexport interface SdsPageHeaderAction {\n /** Visible label. Omit for an icon-only button — `ariaLabel` becomes required in practice then. */\n label?: string;\n icon?: string;\n /** Accessible name used when the button has no visible label. */\n ariaLabel?: string;\n /** Tooltip text, also announced as the button's description; icon-only buttons fall back to `ariaLabel`. */\n tooltip?: string;\n disabled?: boolean;\n onClick: () => void;\n}\n\nexport interface SdsPageHeaderActionsConfig {\n secondaryAction?: SdsPageHeaderAction;\n primaryAction?: SdsPageHeaderAction;\n /** Ações de menor peso, agrupadas no botão \"Mais\" (a partir de 3 ações no total). */\n moreActions?: SdsTieredMenuItem[];\n}\n\n@Component({\n selector: \"sds-page-header\",\n standalone: true,\n host: {\n class:\n \"flex w-full flex-col gap-space-1 border-b border-solid border-color-border bg-surface-default px-space-2-5 py-space-2\",\n role: \"region\",\n \"[attr.aria-labelledby]\": \"_titleId\",\n },\n imports: [\n FormsModule,\n TranslatePipe,\n SdsBreadcrumbRouterComponent,\n SdsButtonComponent,\n SdsSelectButtonComponent,\n SdsTieredMenuDirective,\n SdsTooltipDirective,\n ],\n templateUrl: \"./page-header.component.html\",\n})\nexport class SdsPageHeaderComponent<T = unknown, R = unknown> {\n private static idCounter = 0;\n\n protected readonly _titleId: string;\n\n private readonly titleElementRef = viewChild<ElementRef<HTMLElement>>(\"titleEl\");\n\n /** Page title. The component's floor — always rendered, everything else here is optional. */\n readonly heading = input.required<string>();\n\n /** Supporting text below the title row; truncates to two lines. Omitted when empty. */\n readonly description = input<string>(\"\");\n\n /** Shows the automatic route breadcrumb trail (`sds-breadcrumb-router`). Turn off on top-level pages. */\n readonly hasBreadcrumb = input<boolean>(true);\n\n /** Heading level, rendered as the matching `<h1>`–`<h6>`; adjust to match the host screen's hierarchy. */\n readonly headingLevel = input<1 | 2 | 3 | 4 | 5 | 6>(1);\n\n /** Secondary/primary/\"more options\" actions, rendered left to right; the primary action never groups into \"more\". */\n readonly actions = input<SdsPageHeaderActionsConfig | null>(null);\n\n /** Scope-filter segments (`sds-select-button`) rendered below the title. Omitted when empty. */\n readonly scopeFilterItems = input<SelectButtonItem<T, R>[]>([]);\n\n /** Accessible name for the scope filter; falls back to a translated default when empty. */\n readonly scopeFilterAriaLabel = input<string>(\"\");\n\n /** Two-way bound scope-filter selection. */\n readonly scopeFilterValue = model<T | null>(null);\n\n protected readonly hasDescription = computed(() => this.description().length > 0);\n\n protected readonly hasActions = computed(() => {\n const config = this.actions();\n return (\n !!config &&\n (!!config.secondaryAction || !!config.primaryAction || (config.moreActions?.length ?? 0) > 0)\n );\n });\n\n protected readonly hasScopeFilter = computed(() => this.scopeFilterItems().length > 0);\n\n constructor() {\n SdsPageHeaderComponent.idCounter++;\n this._titleId = `sds-page-header-title-${SdsPageHeaderComponent.idCounter}`;\n }\n\n /**\n * Moves focus to the title. Call this after navigating or reloading the page's content so screen\n * readers announce the change — nothing else here signals that the page changed.\n */\n focusTitle(): void {\n this.titleElementRef()?.nativeElement.focus();\n }\n}\n","@let resolvedMoreActionsAriaLabel = \"platform.scala-ng.page_header_more_actions_label\" | translate;\n@let resolvedScopeFilterAriaLabel =\n scopeFilterAriaLabel() || (\"platform.scala-ng.page_header_scope_filter_label\" | translate);\n\n@if (hasBreadcrumb()) {\n @defer (on idle; prefetch on immediate) {\n <sds-breadcrumb-router />\n } @placeholder {\n <div class=\"h-[29px]\"></div>\n }\n}\n\n<div class=\"flex flex-col gap-space-0-75\">\n <div class=\"flex items-center gap-space-3\">\n <!-- Native heading tags instead of the ARIA heading role, so every assistive technology recognizes them. -->\n @switch (headingLevel()) {\n @default {\n <h1\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h1>\n }\n @case (2) {\n <h2\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h2>\n }\n @case (3) {\n <h3\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h3>\n }\n @case (4) {\n <h4\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h4>\n }\n @case (5) {\n <h5\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h5>\n }\n @case (6) {\n <h6\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h6>\n }\n }\n\n @if (hasActions()) {\n @defer (on idle; prefetch on immediate) {\n <div class=\"flex shrink-0 items-center gap-space-1\">\n @if (actions()?.secondaryAction; as action) {\n <button\n sdsButton\n type=\"secondary\"\n [disabled]=\"action.disabled ?? false\"\n [attr.aria-label]=\"action.label ? null : action.ariaLabel\"\n [sdsTooltip]=\"action.tooltip || (action.label ? '' : (action.ariaLabel ?? ''))\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <i\n sdsLeadingIcon\n [class]=\"action.icon\"\n aria-hidden=\"true\"\n ></i>\n }\n @if (action.label) {\n {{ action.label }}\n }\n </button>\n }\n @if (actions()?.primaryAction; as action) {\n <button\n sdsButton\n type=\"primary\"\n [disabled]=\"action.disabled ?? false\"\n [attr.aria-label]=\"action.label ? null : action.ariaLabel\"\n [sdsTooltip]=\"action.tooltip || (action.label ? '' : (action.ariaLabel ?? ''))\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <i\n sdsLeadingIcon\n [class]=\"action.icon\"\n aria-hidden=\"true\"\n ></i>\n }\n @if (action.label) {\n {{ action.label }}\n }\n </button>\n }\n @if (actions()?.moreActions?.length) {\n <button\n sdsButton\n type=\"secondary\"\n [sdsTieredMenu]=\"actions()!.moreActions!\"\n [attr.aria-label]=\"resolvedMoreActionsAriaLabel\"\n [sdsTooltip]=\"resolvedMoreActionsAriaLabel\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid fa-ellipsis-vertical\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n </div>\n } @placeholder {\n <div class=\"h-[40px] w-[40px] shrink-0\"></div>\n }\n }\n </div>\n\n @if (hasDescription()) {\n <p\n class=\"line-clamp-2 text-font-size-2 font-font-weight-regular leading-line-height-150 text-color-text-neutral-secondary\"\n >\n {{ description() }}\n </p>\n }\n</div>\n\n@if (hasScopeFilter()) {\n @defer (on idle; prefetch on immediate) {\n <sds-select-button\n [items]=\"scopeFilterItems()\"\n [ariaLabel]=\"resolvedScopeFilterAriaLabel\"\n [(ngModel)]=\"scopeFilterValue\"\n />\n } @placeholder {\n <div class=\"h-[38px]\"></div>\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAsDa,sBAAsB,CAAA;AACzB,IAAA,OAAO,SAAS,GAAG,CAAC,CAAC;AAEV,IAAA,QAAQ,CAAS;AAEnB,IAAA,eAAe,GAAG,SAAS,CAA0B,SAAS,CAAC,CAAC;;AAGxE,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,EAAU,CAAC;;AAGnC,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;;AAGhC,IAAA,aAAa,GAAG,KAAK,CAAU,IAAI,CAAC,CAAC;;AAGrC,IAAA,YAAY,GAAG,KAAK,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,CAAA,CAAA,EAAA,CAAA,CAAA;;iGAIV,sBAAsB,EAAA,mBAAA,EAAA,MAAA,CAAA,OAAA,qCAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,4BAAA,CAAA,EAAA,OAAA,iCAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,kBAAA,CAAA,EAAA,OAAA,sCAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,sBAAA,CAAA,EAAA,OAAA,wCAAA,CAAA,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,CAAA,wBAAA,CAAA,CAAA,EAAA,eAAA,EAAA,CAAA,4BAAA,EAAA,kBAAA,EAAA,sBAAA,EAAA,wBAAA,MAAA,EAAA,UAAA,EAAA,CAAA;sBApBlC,SAAS;mCACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EACV,IAAA,EAAA;AACJ,4BAAA,KAAK,EACH,uHAAuH;AACzH,4BAAA,IAAI,EAAE,QAAQ;AACd,4BAAA,wBAAwB,EAAE,UAAU;yBACrC,EACQ,OAAA,EAAA;4BACP,WAAW;4BACX,aAAa;4BACb,4BAA4B;4BAC5B,kBAAkB;4BAClB,wBAAwB;4BACxB,sBAAsB;4BACtB,mBAAmB;AACpB,yBAAA,EAAA,QAAA,EAAA,41LAAA,EAAA,CAAA;;;AEnDH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-scala-ng-page-header.mjs","sources":["../../projects/scala-ng/page-header/src/page-header/page-header.component.ts","../../projects/scala-ng/page-header/src/page-header/page-header.component.html","../../projects/scala-ng/page-header/seniorsistemas-scala-ng-page-header.ts"],"sourcesContent":["import { Component, computed, ElementRef, input, model, viewChild } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { SdsBreadcrumbRouterComponent } from '@seniorsistemas/scala-ng/breadcrumb';\nimport { SdsButtonComponent } from '@seniorsistemas/scala-ng/button';\nimport {\n SdsSelectButtonComponent,\n type SelectButtonItem,\n} from '@seniorsistemas/scala-ng/select-button';\nimport {\n SdsTieredMenuDirective,\n type SdsTieredMenuItem,\n} from '@seniorsistemas/scala-ng/tiered-menu';\nimport { SdsTooltipDirective } from '@seniorsistemas/scala-ng/tooltip';\n\nexport interface SdsPageHeaderAction {\n /** Visible label. Omit for an icon-only button — `ariaLabel` becomes required in practice then. */\n label?: string;\n icon?: string;\n /** Accessible name used when the button has no visible label. */\n ariaLabel?: string;\n /** Tooltip text, also announced as the button's description; icon-only buttons fall back to `ariaLabel`. */\n tooltip?: string;\n disabled?: boolean;\n onClick: () => void;\n}\n\nexport interface SdsPageHeaderActionsConfig {\n secondaryAction?: SdsPageHeaderAction;\n primaryAction?: SdsPageHeaderAction;\n /** Ações de menor peso, agrupadas no botão \"Mais\" (a partir de 3 ações no total). */\n moreActions?: SdsTieredMenuItem[];\n}\n\n@Component({\n selector: 'sds-page-header',\n standalone: true,\n host: {\n class:\n 'flex w-full flex-col gap-space-1 border-b border-solid border-color-border bg-surface-default px-space-2-5 py-space-2',\n role: 'region',\n '[attr.aria-labelledby]': '_titleId',\n },\n imports: [\n FormsModule,\n TranslatePipe,\n SdsBreadcrumbRouterComponent,\n SdsButtonComponent,\n SdsSelectButtonComponent,\n SdsTieredMenuDirective,\n SdsTooltipDirective,\n ],\n templateUrl: './page-header.component.html',\n})\nexport class SdsPageHeaderComponent<T = unknown, R = unknown> {\n private static idCounter = 0;\n\n protected readonly _titleId: string;\n\n private readonly titleElementRef = viewChild<ElementRef<HTMLElement>>('titleEl');\n\n /** Page title. The component's floor — always rendered, everything else here is optional. */\n readonly heading = input.required<string>();\n\n /** Supporting text below the title row; truncates to two lines. Omitted when empty. */\n readonly description = input<string>('');\n\n /** Shows the automatic route breadcrumb trail (`sds-breadcrumb-router`). Turn off on top-level pages. */\n readonly hasBreadcrumb = input<boolean>(true);\n\n /** Heading level, rendered as the matching `<h1>`–`<h6>`; adjust to match the host screen's hierarchy. */\n readonly headingLevel = input<1 | 2 | 3 | 4 | 5 | 6>(1);\n\n /** Secondary/primary/\"more options\" actions, rendered left to right; the primary action never groups into \"more\". */\n readonly actions = input<SdsPageHeaderActionsConfig | null>(null);\n\n /** Scope-filter segments (`sds-select-button`) rendered below the title. Omitted when empty. */\n readonly scopeFilterItems = input<SelectButtonItem<T, R>[]>([]);\n\n /** Accessible name for the scope filter; falls back to a translated default when empty. */\n readonly scopeFilterAriaLabel = input<string>('');\n\n /** Two-way bound scope-filter selection. */\n readonly scopeFilterValue = model<T | null>(null);\n\n protected readonly hasDescription = computed(() => this.description().length > 0);\n\n protected readonly hasActions = computed(() => {\n const config = this.actions();\n return (\n !!config &&\n (!!config.secondaryAction || !!config.primaryAction || (config.moreActions?.length ?? 0) > 0)\n );\n });\n\n protected readonly hasScopeFilter = computed(() => this.scopeFilterItems().length > 0);\n\n constructor() {\n SdsPageHeaderComponent.idCounter++;\n this._titleId = `sds-page-header-title-${SdsPageHeaderComponent.idCounter}`;\n }\n\n /**\n * Moves focus to the title. Call this after navigating or reloading the page's content so screen\n * readers announce the change — nothing else here signals that the page changed.\n */\n focusTitle(): void {\n this.titleElementRef()?.nativeElement.focus();\n }\n}\n","@let resolvedMoreActionsAriaLabel = 'platform.scala-ng.page_header_more_actions_label' | translate;\n@let resolvedScopeFilterAriaLabel =\n scopeFilterAriaLabel() || ('platform.scala-ng.page_header_scope_filter_label' | translate);\n\n@if (hasBreadcrumb()) {\n @defer (on idle; prefetch on immediate) {\n <sds-breadcrumb-router />\n } @placeholder {\n <div class=\"h-[29px]\"></div>\n }\n}\n\n<div class=\"flex flex-col gap-space-0-75\">\n <div class=\"flex items-center gap-space-3\">\n <!-- Native heading tags instead of the ARIA heading role, so every assistive technology recognizes them. -->\n @switch (headingLevel()) {\n @default {\n <h1\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h1>\n }\n @case (2) {\n <h2\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h2>\n }\n @case (3) {\n <h3\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h3>\n }\n @case (4) {\n <h4\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h4>\n }\n @case (5) {\n <h5\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h5>\n }\n @case (6) {\n <h6\n #titleEl\n [id]=\"_titleId\"\n tabindex=\"-1\"\n class=\"min-w-0 flex-1 truncate text-font-size-6 font-font-weight-medium leading-line-height-125 text-color-text-neutral-primary outline-none\"\n [sdsTooltip]=\"heading()\"\n [sdsTooltipCheckTruncatedText]=\"true\"\n >\n {{ heading() }}\n </h6>\n }\n }\n\n @if (hasActions()) {\n @defer (on idle; prefetch on immediate) {\n <div class=\"flex shrink-0 items-center gap-space-1\">\n @if (actions()?.secondaryAction; as action) {\n <button\n sdsButton\n type=\"secondary\"\n [disabled]=\"action.disabled ?? false\"\n [attr.aria-label]=\"action.label ? null : action.ariaLabel\"\n [sdsTooltip]=\"action.tooltip || (action.label ? '' : (action.ariaLabel ?? ''))\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <i\n sdsLeadingIcon\n [class]=\"action.icon\"\n aria-hidden=\"true\"\n ></i>\n }\n @if (action.label) {\n {{ action.label }}\n }\n </button>\n }\n @if (actions()?.primaryAction; as action) {\n <button\n sdsButton\n type=\"primary\"\n [disabled]=\"action.disabled ?? false\"\n [attr.aria-label]=\"action.label ? null : action.ariaLabel\"\n [sdsTooltip]=\"action.tooltip || (action.label ? '' : (action.ariaLabel ?? ''))\"\n (click)=\"action.onClick()\"\n >\n @if (action.icon) {\n <i\n sdsLeadingIcon\n [class]=\"action.icon\"\n aria-hidden=\"true\"\n ></i>\n }\n @if (action.label) {\n {{ action.label }}\n }\n </button>\n }\n @if (actions()?.moreActions?.length) {\n <button\n sdsButton\n type=\"secondary\"\n [sdsTieredMenu]=\"actions()!.moreActions!\"\n [attr.aria-label]=\"resolvedMoreActionsAriaLabel\"\n [sdsTooltip]=\"resolvedMoreActionsAriaLabel\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid fa-ellipsis-vertical\"\n aria-hidden=\"true\"\n ></i>\n </button>\n }\n </div>\n } @placeholder {\n <div class=\"h-[40px] w-[40px] shrink-0\"></div>\n }\n }\n </div>\n\n @if (hasDescription()) {\n <p\n class=\"line-clamp-2 text-font-size-2 font-font-weight-regular leading-line-height-150 text-color-text-neutral-secondary\"\n >\n {{ description() }}\n </p>\n }\n</div>\n\n@if (hasScopeFilter()) {\n @defer (on idle; prefetch on immediate) {\n <sds-select-button\n [items]=\"scopeFilterItems()\"\n [ariaLabel]=\"resolvedScopeFilterAriaLabel\"\n [(ngModel)]=\"scopeFilterValue\"\n />\n } @placeholder {\n <div class=\"h-[38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;AACpB,yBAAA,EAAA,QAAA,EAAA,w1LAAA,EAAA,CAAA;;;AEnDH;;AAEG;;;;"}
|
|
@@ -29,9 +29,9 @@ function computePageRange(page, pageSize, totalItems) {
|
|
|
29
29
|
class SdsPaginatorComponent {
|
|
30
30
|
injector = inject(Injector);
|
|
31
31
|
document = inject(DOCUMENT);
|
|
32
|
-
navigation = viewChild.required(
|
|
33
|
-
previousButton = viewChild.required(
|
|
34
|
-
nextButton = viewChild.required(
|
|
32
|
+
navigation = viewChild.required('navigation');
|
|
33
|
+
previousButton = viewChild.required('previousButton', { read: ElementRef });
|
|
34
|
+
nextButton = viewChild.required('nextButton', { read: ElementRef });
|
|
35
35
|
/** Navigation button the keyboard user was on, kept while focus is parked on the landmark. */
|
|
36
36
|
focusedNavigationButton = null;
|
|
37
37
|
/** Página atual, 1-based. */
|
|
@@ -102,10 +102,10 @@ class SdsPaginatorComponent {
|
|
|
102
102
|
}
|
|
103
103
|
_onFocusIn(event) {
|
|
104
104
|
if (event.target === this.previousButton().nativeElement) {
|
|
105
|
-
this.focusedNavigationButton =
|
|
105
|
+
this.focusedNavigationButton = 'previous';
|
|
106
106
|
}
|
|
107
107
|
else if (event.target === this.nextButton().nativeElement) {
|
|
108
|
-
this.focusedNavigationButton =
|
|
108
|
+
this.focusedNavigationButton = 'next';
|
|
109
109
|
}
|
|
110
110
|
else if (event.target !== this.navigation().nativeElement) {
|
|
111
111
|
this.focusedNavigationButton = null;
|
|
@@ -129,7 +129,7 @@ class SdsPaginatorComponent {
|
|
|
129
129
|
const previousButton = this.previousButton().nativeElement;
|
|
130
130
|
const nextButton = this.nextButton().nativeElement;
|
|
131
131
|
const navigation = this.navigation().nativeElement;
|
|
132
|
-
const lastButton = this.focusedNavigationButton ===
|
|
132
|
+
const lastButton = this.focusedNavigationButton === 'previous' ? previousButton : nextButton;
|
|
133
133
|
const otherButton = lastButton === previousButton ? nextButton : previousButton;
|
|
134
134
|
const activeElement = this.document.activeElement;
|
|
135
135
|
const focusIsLost = activeElement === null ||
|
|
@@ -148,19 +148,19 @@ class SdsPaginatorComponent {
|
|
|
148
148
|
this.pageChange.emit({ page: 1, pageSize: newSize });
|
|
149
149
|
}
|
|
150
150
|
static JUMP_ALLOWED_KEYS = new Set([
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
151
|
+
'Backspace',
|
|
152
|
+
'Delete',
|
|
153
|
+
'Tab',
|
|
154
|
+
'ArrowLeft',
|
|
155
|
+
'ArrowRight',
|
|
156
|
+
'ArrowUp',
|
|
157
|
+
'ArrowDown',
|
|
158
|
+
'Home',
|
|
159
|
+
'End',
|
|
160
|
+
'Escape',
|
|
161
161
|
]);
|
|
162
162
|
_onJumpKeydown(event) {
|
|
163
|
-
if (event.key ===
|
|
163
|
+
if (event.key === 'Enter') {
|
|
164
164
|
event.preventDefault();
|
|
165
165
|
this._onJumpCommit();
|
|
166
166
|
return;
|
|
@@ -189,18 +189,18 @@ class SdsPaginatorComponent {
|
|
|
189
189
|
this.pageChange.emit({ page: clamped, pageSize: this.pageSize() });
|
|
190
190
|
}
|
|
191
191
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
192
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsPaginatorComponent, isStandalone: true, selector: "sds-paginator", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showCounter: { classPropertyName: "showCounter", publicName: "showCounter", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null }, showJumpToPage: { classPropertyName: "showJumpToPage", publicName: "showJumpToPage", isSignal: true, isRequired: false, transformFunction: null }, showPageIndicator: { classPropertyName: "showPageIndicator", publicName: "showPageIndicator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, viewQueries: [{ propertyName: "navigation", first: true, predicate: ["navigation"], descendants: true, isSignal: true }, { propertyName: "previousButton", first: true, predicate: ["previousButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "nextButton", first: true, predicate: ["nextButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<nav\n #navigation\n class=\"flex w-full flex-wrap items-center gap-space-2 focus:outline-none\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'platform.scala-ng.paginator_navigation_label' | translate\"\n (focusin)=\"_onFocusIn($event)\"\n (focusout)=\"_onFocusOut($event)\"\n>\n @if (showCounter()) {\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{\n
|
|
192
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SdsPaginatorComponent, isStandalone: true, selector: "sds-paginator", inputs: { page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, showCounter: { classPropertyName: "showCounter", publicName: "showCounter", isSignal: true, isRequired: false, transformFunction: null }, showPageSize: { classPropertyName: "showPageSize", publicName: "showPageSize", isSignal: true, isRequired: false, transformFunction: null }, showJumpToPage: { classPropertyName: "showJumpToPage", publicName: "showJumpToPage", isSignal: true, isRequired: false, transformFunction: null }, showPageIndicator: { classPropertyName: "showPageIndicator", publicName: "showPageIndicator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, viewQueries: [{ propertyName: "navigation", first: true, predicate: ["navigation"], descendants: true, isSignal: true }, { propertyName: "previousButton", first: true, predicate: ["previousButton"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "nextButton", first: true, predicate: ["nextButton"], descendants: true, read: ElementRef, isSignal: true }], ngImport: i0, template: "<nav\n #navigation\n class=\"flex w-full flex-wrap items-center gap-space-2 focus:outline-none\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'platform.scala-ng.paginator_navigation_label' | translate\"\n (focusin)=\"_onFocusIn($event)\"\n (focusout)=\"_onFocusOut($event)\"\n>\n @if (showCounter()) {\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{\n 'platform.scala-ng.paginator_showing'\n | translate: { first: pageRange().start, last: pageRange().end, total: totalItems() }\n }}\n </span>\n }\n\n <div class=\"min-w-space-2 flex-1\"></div>\n\n @if (showPageSize()) {\n <div class=\"flex items-center gap-space-1\">\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{ 'platform.scala-ng.paginator_items_per_page' | translate }}:\n </span>\n <div class=\"w-20\">\n <sds-select\n size=\"small\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n [label]=\"'platform.scala-ng.paginator_items_per_page' | translate\"\n [options]=\"pageSizeSelectOptions()\"\n [disabled]=\"loading()\"\n [ngModel]=\"pageSize()\"\n (ngModelChange)=\"_onPageSizeSelect($event)\"\n />\n </div>\n </div>\n }\n\n @if (showJumpToPage()) {\n <div class=\"flex items-center gap-space-1\">\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{ 'platform.scala-ng.paginator_go_to_page' | translate }}:\n </span>\n <sds-input\n size=\"small\"\n [label]=\"'platform.scala-ng.paginator_go_to_page_aria' | translate\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n type=\"text\"\n inputMode=\"numeric\"\n containerClassName=\"w-16\"\n [formControl]=\"jumpControl\"\n (inputKeydown)=\"_onJumpKeydown($event)\"\n (focusOut)=\"_onJumpCommit()\"\n />\n </div>\n }\n\n <button\n #previousButton\n sdsButton\n type=\"ghost\"\n size=\"small\"\n [disabled]=\"isPreviousDisabled()\"\n (click)=\"_onPrev()\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid fa-chevron-left text-xs\"\n aria-hidden=\"true\"\n ></i>\n {{ 'platform.scala-ng.paginator_previous' | translate }}\n </button>\n\n @if (showPageIndicator()) {\n <span\n class=\"min-w-[120px] whitespace-nowrap text-center text-font-size-2 text-color-text-neutral-secondary\"\n >\n {{ 'platform.scala-ng.paginator_page_of' | translate: { page: page(), total: pageCount() } }}\n </span>\n }\n\n <button\n #nextButton\n sdsButton\n type=\"ghost\"\n size=\"small\"\n [disabled]=\"isNextDisabled()\"\n (click)=\"_onNext()\"\n >\n {{ 'platform.scala-ng.paginator_next' | translate }}\n <i\n sdsTrailingIcon\n class=\"fa-solid fa-chevron-right text-xs\"\n aria-hidden=\"true\"\n ></i>\n </button>\n</nav>\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: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: SdsButtonComponent, selector: "button[sdsButton], a[sdsButton]", inputs: ["type", "destructive", "disabled", "size"] }, { kind: "component", type: SdsInputComponent, selector: "sds-input", inputs: ["label", "subtitle", "icon", "type", "placeholder", "size", "readonly", "showDefaultIcon", "showNativeDropdown", "errorMessages", "validMessage", "adviceMessage", "inputClassName", "containerClassName", "showLabel", "showHelper", "required", "loading", "state", "nativeInputAttrs", "inputId", "mask", "unmask", "maskPatterns", "showMaskTyped", "placeHolderCharacter", "prefix", "suffix", "clearIfNotMatch", "leadZeroDateTime", "hiddenInput", "inputMode", "maskHint", "separator", "thousandSeparator", "decimalDigits"], outputs: ["focusIn", "focusOut", "inputClick", "inputKeydown", "maskFilled"] }, { kind: "component", type: SdsSelectComponent, selector: "sds-select", inputs: ["options", "placeholder", "label", "optionalText", "required", "helperText", "size", "multiple", "showSelectAll", "disabled", "readonly", "leadingIcon", "showLabel", "showHelper", "showFilter", "filterPlaceholder", "filterBy", "errorMessages", "validMessage", "loading", "emptyMessage", "compareWith"] }] });
|
|
193
193
|
}
|
|
194
194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsPaginatorComponent, decorators: [{
|
|
195
195
|
type: Component,
|
|
196
|
-
args: [{ selector:
|
|
196
|
+
args: [{ selector: 'sds-paginator', standalone: true, imports: [
|
|
197
197
|
FormsModule,
|
|
198
198
|
ReactiveFormsModule,
|
|
199
199
|
TranslatePipe,
|
|
200
200
|
SdsButtonComponent,
|
|
201
201
|
SdsInputComponent,
|
|
202
202
|
SdsSelectComponent,
|
|
203
|
-
], template: "<nav\n #navigation\n class=\"flex w-full flex-wrap items-center gap-space-2 focus:outline-none\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'platform.scala-ng.paginator_navigation_label' | translate\"\n (focusin)=\"_onFocusIn($event)\"\n (focusout)=\"_onFocusOut($event)\"\n>\n @if (showCounter()) {\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{\n
|
|
203
|
+
], template: "<nav\n #navigation\n class=\"flex w-full flex-wrap items-center gap-space-2 focus:outline-none\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'platform.scala-ng.paginator_navigation_label' | translate\"\n (focusin)=\"_onFocusIn($event)\"\n (focusout)=\"_onFocusOut($event)\"\n>\n @if (showCounter()) {\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{\n 'platform.scala-ng.paginator_showing'\n | translate: { first: pageRange().start, last: pageRange().end, total: totalItems() }\n }}\n </span>\n }\n\n <div class=\"min-w-space-2 flex-1\"></div>\n\n @if (showPageSize()) {\n <div class=\"flex items-center gap-space-1\">\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{ 'platform.scala-ng.paginator_items_per_page' | translate }}:\n </span>\n <div class=\"w-20\">\n <sds-select\n size=\"small\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n [label]=\"'platform.scala-ng.paginator_items_per_page' | translate\"\n [options]=\"pageSizeSelectOptions()\"\n [disabled]=\"loading()\"\n [ngModel]=\"pageSize()\"\n (ngModelChange)=\"_onPageSizeSelect($event)\"\n />\n </div>\n </div>\n }\n\n @if (showJumpToPage()) {\n <div class=\"flex items-center gap-space-1\">\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{ 'platform.scala-ng.paginator_go_to_page' | translate }}:\n </span>\n <sds-input\n size=\"small\"\n [label]=\"'platform.scala-ng.paginator_go_to_page_aria' | translate\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n type=\"text\"\n inputMode=\"numeric\"\n containerClassName=\"w-16\"\n [formControl]=\"jumpControl\"\n (inputKeydown)=\"_onJumpKeydown($event)\"\n (focusOut)=\"_onJumpCommit()\"\n />\n </div>\n }\n\n <button\n #previousButton\n sdsButton\n type=\"ghost\"\n size=\"small\"\n [disabled]=\"isPreviousDisabled()\"\n (click)=\"_onPrev()\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid fa-chevron-left text-xs\"\n aria-hidden=\"true\"\n ></i>\n {{ 'platform.scala-ng.paginator_previous' | translate }}\n </button>\n\n @if (showPageIndicator()) {\n <span\n class=\"min-w-[120px] whitespace-nowrap text-center text-font-size-2 text-color-text-neutral-secondary\"\n >\n {{ 'platform.scala-ng.paginator_page_of' | translate: { page: page(), total: pageCount() } }}\n </span>\n }\n\n <button\n #nextButton\n sdsButton\n type=\"ghost\"\n size=\"small\"\n [disabled]=\"isNextDisabled()\"\n (click)=\"_onNext()\"\n >\n {{ 'platform.scala-ng.paginator_next' | translate }}\n <i\n sdsTrailingIcon\n class=\"fa-solid fa-chevron-right text-xs\"\n aria-hidden=\"true\"\n ></i>\n </button>\n</nav>\n" }]
|
|
204
204
|
}], ctorParameters: () => [] });
|
|
205
205
|
|
|
206
206
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-scala-ng-paginator.mjs","sources":["../../projects/scala-ng/paginator/src/paginator/paginator.utils.ts","../../projects/scala-ng/paginator/src/paginator/paginator.component.ts","../../projects/scala-ng/paginator/src/paginator/paginator.component.html","../../projects/scala-ng/paginator/seniorsistemas-scala-ng-paginator.ts"],"sourcesContent":["/** Quantas páginas existem no total, dado o total de itens e o tamanho de página. Nunca menor que 1, mesmo com `totalItems` zerado. */\nexport function computePageCount(totalItems: number, pageSize: number): number {\n return Math.max(1, Math.ceil(totalItems / pageSize));\n}\n\n/**\n * Intervalo (1-based, inclusivo) de itens exibidos na página atual. `end` nunca ultrapassa\n * `totalItems` — a última página, mesmo parcial, mostra o total real de itens, não `page * pageSize`.\n */\nexport function computePageRange(\n page: number,\n pageSize: number,\n totalItems: number,\n): { start: number; end: number } {\n if (totalItems === 0) {\n return { start: 0, end: 0 };\n }\n return {\n start: (page - 1) * pageSize + 1,\n end: Math.min(page * pageSize, totalItems),\n };\n}\n","import { DOCUMENT } from \"@angular/common\";\nimport {\n afterNextRender,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n output,\n viewChild,\n} from \"@angular/core\";\nimport { FormControl, FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { TranslatePipe } from \"@ngx-translate/core\";\nimport { SdsButtonComponent } from \"@seniorsistemas/scala-ng/button\";\nimport { SdsInputComponent } from \"@seniorsistemas/scala-ng/input\";\nimport type { SelectOption } from \"@seniorsistemas/scala-ng/select\";\nimport { SdsSelectComponent } from \"@seniorsistemas/scala-ng/select\";\nimport type { PaginatorPageEvent } from \"./paginator.models\";\nimport { computePageCount, computePageRange } from \"./paginator.utils\";\n\n@Component({\n selector: \"sds-paginator\",\n standalone: true,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n TranslatePipe,\n SdsButtonComponent,\n SdsInputComponent,\n SdsSelectComponent,\n ],\n templateUrl: \"./paginator.component.html\",\n})\nexport class SdsPaginatorComponent {\n private readonly injector = inject(Injector);\n private readonly document = inject(DOCUMENT);\n private readonly navigation = viewChild.required<ElementRef<HTMLElement>>(\"navigation\");\n private readonly previousButton = viewChild.required(\"previousButton\", { read: ElementRef });\n private readonly nextButton = viewChild.required(\"nextButton\", { read: ElementRef });\n\n /** Navigation button the keyboard user was on, kept while focus is parked on the landmark. */\n private focusedNavigationButton: \"previous\" | \"next\" | null = null;\n\n /** Página atual, 1-based. */\n readonly page = input<number>(1);\n /** Quantidade de itens exibidos por página. */\n readonly pageSize = input<number>(10);\n /** Total de itens paginados. */\n readonly totalItems = input.required<number>();\n /** Opções exibidas no seletor \"Itens por página\". */\n readonly pageSizeOptions = input<number[]>([10, 25, 50, 100]);\n /** Quando `true`, desabilita todos os controles interativos (seletor, campo \"ir para\" e navegação). */\n readonly loading = input<boolean>(false);\n /** Exibe o texto \"Mostrando X-Y de Z itens\". */\n readonly showCounter = input<boolean>(true);\n /** Exibe o seletor \"Itens por página\". */\n readonly showPageSize = input<boolean>(true);\n /** Exibe o campo \"Ir para\" (navegação direta por número de página). */\n readonly showJumpToPage = input<boolean>(true);\n /** Exibe o texto \"Página X de Y\". */\n readonly showPageIndicator = input<boolean>(true);\n\n /** Emitido ao navegar (anterior/próximo/ir-para) ou trocar o tamanho de página. */\n readonly pageChange = output<PaginatorPageEvent>();\n\n protected readonly pageCount = computed(() =>\n computePageCount(this.totalItems(), this.pageSize()),\n );\n protected readonly isFirstPage = computed(() => this.page() <= 1);\n protected readonly isLastPage = computed(() => this.page() >= this.pageCount());\n protected readonly isPreviousDisabled = computed(() => this.isFirstPage() || this.loading());\n protected readonly isNextDisabled = computed(() => this.isLastPage() || this.loading());\n protected readonly pageRange = computed(() =>\n computePageRange(this.page(), this.pageSize(), this.totalItems()),\n );\n\n protected readonly pageSizeSelectOptions = computed<SelectOption<number>[]>(() =>\n this.pageSizeOptions().map((size) => ({ label: String(size), value: size })),\n );\n\n protected readonly jumpControl = new FormControl(String(this.page()), { nonNullable: true });\n\n constructor() {\n // `FormControl#setValue`/`enable`/`disable` synchronously call the bound `sds-input`'s CVA\n // methods (`writeValue`/`setDisabledState`), which write to that component's own signals —\n // a one-directional, non-cyclic side effect these two effects exist specifically to cause,\n // so `allowSignalWrites` is the sanctioned escape hatch here, not a footgun.\n effect(\n () => {\n const page = String(this.page());\n if (this.jumpControl.value !== page) {\n this.jumpControl.setValue(page, { emitEvent: false });\n }\n },\n { allowSignalWrites: true },\n );\n effect(\n () => {\n if (this.loading()) {\n this.jumpControl.disable({ emitEvent: false });\n } else {\n this.jumpControl.enable({ emitEvent: false });\n }\n },\n { allowSignalWrites: true },\n );\n // A natively disabled button drops focus to <body>; keep it inside the paginator instead.\n effect(() => {\n this.isPreviousDisabled();\n this.isNextDisabled();\n afterNextRender(() => this.keepNavigationFocus(), { injector: this.injector });\n });\n }\n\n protected _onPrev(): void {\n if (this.isFirstPage() || this.loading()) {\n return;\n }\n this.pageChange.emit({ page: this.page() - 1, pageSize: this.pageSize() });\n }\n\n protected _onNext(): void {\n if (this.isLastPage() || this.loading()) {\n return;\n }\n this.pageChange.emit({ page: this.page() + 1, pageSize: this.pageSize() });\n }\n\n protected _onFocusIn(event: FocusEvent): void {\n if (event.target === this.previousButton().nativeElement) {\n this.focusedNavigationButton = \"previous\";\n } else if (event.target === this.nextButton().nativeElement) {\n this.focusedNavigationButton = \"next\";\n } else if (event.target !== this.navigation().nativeElement) {\n this.focusedNavigationButton = null;\n }\n }\n\n protected _onFocusOut(event: FocusEvent): void {\n const blurredElement = event.target as HTMLElement;\n // Focus lost because the button was just disabled, not because the user moved away.\n if (blurredElement instanceof HTMLButtonElement && blurredElement.disabled) {\n return;\n }\n const nextTarget = event.relatedTarget;\n if (!(nextTarget instanceof Node && this.navigation().nativeElement.contains(nextTarget))) {\n this.focusedNavigationButton = null;\n }\n }\n\n private keepNavigationFocus(): void {\n if (this.focusedNavigationButton === null) {\n return;\n }\n const previousButton: HTMLButtonElement = this.previousButton().nativeElement;\n const nextButton: HTMLButtonElement = this.nextButton().nativeElement;\n const navigation = this.navigation().nativeElement;\n const lastButton = this.focusedNavigationButton === \"previous\" ? previousButton : nextButton;\n const otherButton = lastButton === previousButton ? nextButton : previousButton;\n const activeElement = this.document.activeElement;\n const focusIsLost =\n activeElement === null ||\n activeElement === this.document.body ||\n activeElement === navigation ||\n (activeElement === lastButton && lastButton.disabled);\n if (!focusIsLost) {\n return;\n }\n const target = [lastButton, otherButton].find((button) => !button.disabled) ?? navigation;\n if (target !== activeElement) {\n target.focus();\n }\n }\n\n protected _onPageSizeSelect(newSize: number): void {\n this.pageChange.emit({ page: 1, pageSize: newSize });\n }\n\n private static readonly JUMP_ALLOWED_KEYS = new Set([\n \"Backspace\",\n \"Delete\",\n \"Tab\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"Home\",\n \"End\",\n \"Escape\",\n ]);\n\n protected _onJumpKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n this._onJumpCommit();\n return;\n }\n const isDigit = /^\\d$/.test(event.key);\n const isAllowed =\n event.ctrlKey ||\n event.metaKey ||\n event.altKey ||\n isDigit ||\n SdsPaginatorComponent.JUMP_ALLOWED_KEYS.has(event.key);\n if (!isAllowed) {\n event.preventDefault();\n }\n }\n\n protected _onJumpCommit(): void {\n const parsed = Number.parseInt(this.jumpControl.value, 10);\n if (Number.isNaN(parsed)) {\n this.jumpControl.setValue(String(this.page()), { emitEvent: false });\n return;\n }\n const clamped = Math.min(Math.max(parsed, 1), this.pageCount());\n if (clamped === this.page()) {\n this.jumpControl.setValue(String(this.page()), { emitEvent: false });\n return;\n }\n this.pageChange.emit({ page: clamped, pageSize: this.pageSize() });\n }\n}\n","<nav\n #navigation\n class=\"flex w-full flex-wrap items-center gap-space-2 focus:outline-none\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'platform.scala-ng.paginator_navigation_label' | translate\"\n (focusin)=\"_onFocusIn($event)\"\n (focusout)=\"_onFocusOut($event)\"\n>\n @if (showCounter()) {\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{\n \"platform.scala-ng.paginator_showing\"\n | translate: { first: pageRange().start, last: pageRange().end, total: totalItems() }\n }}\n </span>\n }\n\n <div class=\"min-w-space-2 flex-1\"></div>\n\n @if (showPageSize()) {\n <div class=\"flex items-center gap-space-1\">\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{ \"platform.scala-ng.paginator_items_per_page\" | translate }}:\n </span>\n <div class=\"w-20\">\n <sds-select\n size=\"small\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n [label]=\"'platform.scala-ng.paginator_items_per_page' | translate\"\n [options]=\"pageSizeSelectOptions()\"\n [disabled]=\"loading()\"\n [ngModel]=\"pageSize()\"\n (ngModelChange)=\"_onPageSizeSelect($event)\"\n />\n </div>\n </div>\n }\n\n @if (showJumpToPage()) {\n <div class=\"flex items-center gap-space-1\">\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{ \"platform.scala-ng.paginator_go_to_page\" | translate }}:\n </span>\n <sds-input\n size=\"small\"\n [label]=\"'platform.scala-ng.paginator_go_to_page_aria' | translate\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n type=\"text\"\n inputMode=\"numeric\"\n containerClassName=\"w-16\"\n [formControl]=\"jumpControl\"\n (inputKeydown)=\"_onJumpKeydown($event)\"\n (focusOut)=\"_onJumpCommit()\"\n />\n </div>\n }\n\n <button\n #previousButton\n sdsButton\n type=\"ghost\"\n size=\"small\"\n [disabled]=\"isPreviousDisabled()\"\n (click)=\"_onPrev()\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid fa-chevron-left text-xs\"\n aria-hidden=\"true\"\n ></i>\n {{ \"platform.scala-ng.paginator_previous\" | translate }}\n </button>\n\n @if (showPageIndicator()) {\n <span\n class=\"min-w-[120px] whitespace-nowrap text-center text-font-size-2 text-color-text-neutral-secondary\"\n >\n {{ \"platform.scala-ng.paginator_page_of\" | translate: { page: page(), total: pageCount() } }}\n </span>\n }\n\n <button\n #nextButton\n sdsButton\n type=\"ghost\"\n size=\"small\"\n [disabled]=\"isNextDisabled()\"\n (click)=\"_onNext()\"\n >\n {{ \"platform.scala-ng.paginator_next\" | translate }}\n <i\n sdsTrailingIcon\n class=\"fa-solid fa-chevron-right text-xs\"\n aria-hidden=\"true\"\n ></i>\n </button>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACgB,SAAA,gBAAgB,CAAC,UAAkB,EAAE,QAAgB,EAAA;AACnE,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;;AAGG;SACa,gBAAgB,CAC9B,IAAY,EACZ,QAAgB,EAChB,UAAkB,EAAA;AAElB,IAAA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AAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,iBAAiB,yoBACjB,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,cAAA,EAAA,UAAA,EAAA,YAAA,EAAA,MAAA,EAAA,UAAA,EAAA,eAAA,EAAA,UAAA,EAAA,UAAA,EAAA,aAAA,EAAA,WAAA,EAAA,YAAA,EAAA,YAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,eAAA,EAAA,cAAA,EAAA,SAAA,EAAA,cAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAIT,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,SAAS;+BACE,eAAe,EAAA,UAAA,EACb,IAAI,EACP,OAAA,EAAA;wBACP,WAAW;wBACX,mBAAmB;wBACnB,aAAa;wBACb,kBAAkB;wBAClB,iBAAiB;wBACjB,kBAAkB;AACnB,qBAAA,EAAA,QAAA,EAAA,i9FAAA,EAAA,CAAA;;;AEhCH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-scala-ng-paginator.mjs","sources":["../../projects/scala-ng/paginator/src/paginator/paginator.utils.ts","../../projects/scala-ng/paginator/src/paginator/paginator.component.ts","../../projects/scala-ng/paginator/src/paginator/paginator.component.html","../../projects/scala-ng/paginator/seniorsistemas-scala-ng-paginator.ts"],"sourcesContent":["/** Quantas páginas existem no total, dado o total de itens e o tamanho de página. Nunca menor que 1, mesmo com `totalItems` zerado. */\nexport function computePageCount(totalItems: number, pageSize: number): number {\n return Math.max(1, Math.ceil(totalItems / pageSize));\n}\n\n/**\n * Intervalo (1-based, inclusivo) de itens exibidos na página atual. `end` nunca ultrapassa\n * `totalItems` — a última página, mesmo parcial, mostra o total real de itens, não `page * pageSize`.\n */\nexport function computePageRange(\n page: number,\n pageSize: number,\n totalItems: number,\n): { start: number; end: number } {\n if (totalItems === 0) {\n return { start: 0, end: 0 };\n }\n return {\n start: (page - 1) * pageSize + 1,\n end: Math.min(page * pageSize, totalItems),\n };\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n afterNextRender,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { SdsButtonComponent } from '@seniorsistemas/scala-ng/button';\nimport { SdsInputComponent } from '@seniorsistemas/scala-ng/input';\nimport type { SelectOption } from '@seniorsistemas/scala-ng/select';\nimport { SdsSelectComponent } from '@seniorsistemas/scala-ng/select';\nimport type { PaginatorPageEvent } from './paginator.models';\nimport { computePageCount, computePageRange } from './paginator.utils';\n\n@Component({\n selector: 'sds-paginator',\n standalone: true,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n TranslatePipe,\n SdsButtonComponent,\n SdsInputComponent,\n SdsSelectComponent,\n ],\n templateUrl: './paginator.component.html',\n})\nexport class SdsPaginatorComponent {\n private readonly injector = inject(Injector);\n private readonly document = inject(DOCUMENT);\n private readonly navigation = viewChild.required<ElementRef<HTMLElement>>('navigation');\n private readonly previousButton = viewChild.required('previousButton', { read: ElementRef });\n private readonly nextButton = viewChild.required('nextButton', { read: ElementRef });\n\n /** Navigation button the keyboard user was on, kept while focus is parked on the landmark. */\n private focusedNavigationButton: 'previous' | 'next' | null = null;\n\n /** Página atual, 1-based. */\n readonly page = input<number>(1);\n /** Quantidade de itens exibidos por página. */\n readonly pageSize = input<number>(10);\n /** Total de itens paginados. */\n readonly totalItems = input.required<number>();\n /** Opções exibidas no seletor \"Itens por página\". */\n readonly pageSizeOptions = input<number[]>([10, 25, 50, 100]);\n /** Quando `true`, desabilita todos os controles interativos (seletor, campo \"ir para\" e navegação). */\n readonly loading = input<boolean>(false);\n /** Exibe o texto \"Mostrando X-Y de Z itens\". */\n readonly showCounter = input<boolean>(true);\n /** Exibe o seletor \"Itens por página\". */\n readonly showPageSize = input<boolean>(true);\n /** Exibe o campo \"Ir para\" (navegação direta por número de página). */\n readonly showJumpToPage = input<boolean>(true);\n /** Exibe o texto \"Página X de Y\". */\n readonly showPageIndicator = input<boolean>(true);\n\n /** Emitido ao navegar (anterior/próximo/ir-para) ou trocar o tamanho de página. */\n readonly pageChange = output<PaginatorPageEvent>();\n\n protected readonly pageCount = computed(() =>\n computePageCount(this.totalItems(), this.pageSize()),\n );\n protected readonly isFirstPage = computed(() => this.page() <= 1);\n protected readonly isLastPage = computed(() => this.page() >= this.pageCount());\n protected readonly isPreviousDisabled = computed(() => this.isFirstPage() || this.loading());\n protected readonly isNextDisabled = computed(() => this.isLastPage() || this.loading());\n protected readonly pageRange = computed(() =>\n computePageRange(this.page(), this.pageSize(), this.totalItems()),\n );\n\n protected readonly pageSizeSelectOptions = computed<SelectOption<number>[]>(() =>\n this.pageSizeOptions().map((size) => ({ label: String(size), value: size })),\n );\n\n protected readonly jumpControl = new FormControl(String(this.page()), { nonNullable: true });\n\n constructor() {\n // `FormControl#setValue`/`enable`/`disable` synchronously call the bound `sds-input`'s CVA\n // methods (`writeValue`/`setDisabledState`), which write to that component's own signals —\n // a one-directional, non-cyclic side effect these two effects exist specifically to cause,\n // so `allowSignalWrites` is the sanctioned escape hatch here, not a footgun.\n effect(\n () => {\n const page = String(this.page());\n if (this.jumpControl.value !== page) {\n this.jumpControl.setValue(page, { emitEvent: false });\n }\n },\n { allowSignalWrites: true },\n );\n effect(\n () => {\n if (this.loading()) {\n this.jumpControl.disable({ emitEvent: false });\n } else {\n this.jumpControl.enable({ emitEvent: false });\n }\n },\n { allowSignalWrites: true },\n );\n // A natively disabled button drops focus to <body>; keep it inside the paginator instead.\n effect(() => {\n this.isPreviousDisabled();\n this.isNextDisabled();\n afterNextRender(() => this.keepNavigationFocus(), { injector: this.injector });\n });\n }\n\n protected _onPrev(): void {\n if (this.isFirstPage() || this.loading()) {\n return;\n }\n this.pageChange.emit({ page: this.page() - 1, pageSize: this.pageSize() });\n }\n\n protected _onNext(): void {\n if (this.isLastPage() || this.loading()) {\n return;\n }\n this.pageChange.emit({ page: this.page() + 1, pageSize: this.pageSize() });\n }\n\n protected _onFocusIn(event: FocusEvent): void {\n if (event.target === this.previousButton().nativeElement) {\n this.focusedNavigationButton = 'previous';\n } else if (event.target === this.nextButton().nativeElement) {\n this.focusedNavigationButton = 'next';\n } else if (event.target !== this.navigation().nativeElement) {\n this.focusedNavigationButton = null;\n }\n }\n\n protected _onFocusOut(event: FocusEvent): void {\n const blurredElement = event.target as HTMLElement;\n // Focus lost because the button was just disabled, not because the user moved away.\n if (blurredElement instanceof HTMLButtonElement && blurredElement.disabled) {\n return;\n }\n const nextTarget = event.relatedTarget;\n if (!(nextTarget instanceof Node && this.navigation().nativeElement.contains(nextTarget))) {\n this.focusedNavigationButton = null;\n }\n }\n\n private keepNavigationFocus(): void {\n if (this.focusedNavigationButton === null) {\n return;\n }\n const previousButton: HTMLButtonElement = this.previousButton().nativeElement;\n const nextButton: HTMLButtonElement = this.nextButton().nativeElement;\n const navigation = this.navigation().nativeElement;\n const lastButton = this.focusedNavigationButton === 'previous' ? previousButton : nextButton;\n const otherButton = lastButton === previousButton ? nextButton : previousButton;\n const activeElement = this.document.activeElement;\n const focusIsLost =\n activeElement === null ||\n activeElement === this.document.body ||\n activeElement === navigation ||\n (activeElement === lastButton && lastButton.disabled);\n if (!focusIsLost) {\n return;\n }\n const target = [lastButton, otherButton].find((button) => !button.disabled) ?? navigation;\n if (target !== activeElement) {\n target.focus();\n }\n }\n\n protected _onPageSizeSelect(newSize: number): void {\n this.pageChange.emit({ page: 1, pageSize: newSize });\n }\n\n private static readonly JUMP_ALLOWED_KEYS = new Set([\n 'Backspace',\n 'Delete',\n 'Tab',\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n 'Escape',\n ]);\n\n protected _onJumpKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n event.preventDefault();\n this._onJumpCommit();\n return;\n }\n const isDigit = /^\\d$/.test(event.key);\n const isAllowed =\n event.ctrlKey ||\n event.metaKey ||\n event.altKey ||\n isDigit ||\n SdsPaginatorComponent.JUMP_ALLOWED_KEYS.has(event.key);\n if (!isAllowed) {\n event.preventDefault();\n }\n }\n\n protected _onJumpCommit(): void {\n const parsed = Number.parseInt(this.jumpControl.value, 10);\n if (Number.isNaN(parsed)) {\n this.jumpControl.setValue(String(this.page()), { emitEvent: false });\n return;\n }\n const clamped = Math.min(Math.max(parsed, 1), this.pageCount());\n if (clamped === this.page()) {\n this.jumpControl.setValue(String(this.page()), { emitEvent: false });\n return;\n }\n this.pageChange.emit({ page: clamped, pageSize: this.pageSize() });\n }\n}\n","<nav\n #navigation\n class=\"flex w-full flex-wrap items-center gap-space-2 focus:outline-none\"\n tabindex=\"-1\"\n [attr.aria-label]=\"'platform.scala-ng.paginator_navigation_label' | translate\"\n (focusin)=\"_onFocusIn($event)\"\n (focusout)=\"_onFocusOut($event)\"\n>\n @if (showCounter()) {\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{\n 'platform.scala-ng.paginator_showing'\n | translate: { first: pageRange().start, last: pageRange().end, total: totalItems() }\n }}\n </span>\n }\n\n <div class=\"min-w-space-2 flex-1\"></div>\n\n @if (showPageSize()) {\n <div class=\"flex items-center gap-space-1\">\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{ 'platform.scala-ng.paginator_items_per_page' | translate }}:\n </span>\n <div class=\"w-20\">\n <sds-select\n size=\"small\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n [label]=\"'platform.scala-ng.paginator_items_per_page' | translate\"\n [options]=\"pageSizeSelectOptions()\"\n [disabled]=\"loading()\"\n [ngModel]=\"pageSize()\"\n (ngModelChange)=\"_onPageSizeSelect($event)\"\n />\n </div>\n </div>\n }\n\n @if (showJumpToPage()) {\n <div class=\"flex items-center gap-space-1\">\n <span class=\"whitespace-nowrap text-font-size-2 text-color-text-neutral-secondary\">\n {{ 'platform.scala-ng.paginator_go_to_page' | translate }}:\n </span>\n <sds-input\n size=\"small\"\n [label]=\"'platform.scala-ng.paginator_go_to_page_aria' | translate\"\n [showLabel]=\"false\"\n [showHelper]=\"false\"\n type=\"text\"\n inputMode=\"numeric\"\n containerClassName=\"w-16\"\n [formControl]=\"jumpControl\"\n (inputKeydown)=\"_onJumpKeydown($event)\"\n (focusOut)=\"_onJumpCommit()\"\n />\n </div>\n }\n\n <button\n #previousButton\n sdsButton\n type=\"ghost\"\n size=\"small\"\n [disabled]=\"isPreviousDisabled()\"\n (click)=\"_onPrev()\"\n >\n <i\n sdsLeadingIcon\n class=\"fa-solid fa-chevron-left text-xs\"\n aria-hidden=\"true\"\n ></i>\n {{ 'platform.scala-ng.paginator_previous' | translate }}\n </button>\n\n @if (showPageIndicator()) {\n <span\n class=\"min-w-[120px] whitespace-nowrap text-center text-font-size-2 text-color-text-neutral-secondary\"\n >\n {{ 'platform.scala-ng.paginator_page_of' | translate: { page: page(), total: pageCount() } }}\n </span>\n }\n\n <button\n #nextButton\n sdsButton\n type=\"ghost\"\n size=\"small\"\n [disabled]=\"isNextDisabled()\"\n (click)=\"_onNext()\"\n >\n {{ 'platform.scala-ng.paginator_next' | translate }}\n <i\n sdsTrailingIcon\n class=\"fa-solid fa-chevron-right text-xs\"\n aria-hidden=\"true\"\n ></i>\n </button>\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AACgB,SAAA,gBAAgB,CAAC,UAAkB,EAAE,QAAgB,EAAA;AACnE,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;;AAGG;SACa,gBAAgB,CAC9B,IAAY,EACZ,QAAgB,EAChB,UAAkB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AAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,iBAAiB,opBACjB,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,cAAA,EAAA,UAAA,EAAA,YAAA,EAAA,MAAA,EAAA,UAAA,EAAA,eAAA,EAAA,UAAA,EAAA,UAAA,EAAA,aAAA,EAAA,WAAA,EAAA,YAAA,EAAA,YAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,eAAA,EAAA,cAAA,EAAA,SAAA,EAAA,cAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAIT,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAbjC,SAAS;+BACE,eAAe,EAAA,UAAA,EACb,IAAI,EACP,OAAA,EAAA;wBACP,WAAW;wBACX,mBAAmB;wBACnB,aAAa;wBACb,kBAAkB;wBAClB,iBAAiB;wBACjB,kBAAkB;AACnB,qBAAA,EAAA,QAAA,EAAA,q8FAAA,EAAA,CAAA;;;AEhCH;;AAEG;;;;"}
|
|
@@ -17,11 +17,11 @@ class SdsPanelComponent {
|
|
|
17
17
|
/** Whether the panel is expanded. Only has an effect when `collapsible` is `true`. */
|
|
18
18
|
expanded = model(true);
|
|
19
19
|
/** Label of the footer tertiary (ghost) button; the button shows only when non-empty. */
|
|
20
|
-
tertiaryLabel = input(
|
|
20
|
+
tertiaryLabel = input('');
|
|
21
21
|
/** Label of the footer secondary button; the button shows only when non-empty. */
|
|
22
|
-
secondaryLabel = input(
|
|
22
|
+
secondaryLabel = input('');
|
|
23
23
|
/** Label of the footer primary button; the button shows only when non-empty. */
|
|
24
|
-
primaryLabel = input(
|
|
24
|
+
primaryLabel = input('');
|
|
25
25
|
/** Emits when the footer tertiary button is clicked. */
|
|
26
26
|
tertiaryClick = output();
|
|
27
27
|
/** Emits when the footer secondary button is clicked. */
|
|
@@ -42,24 +42,24 @@ class SdsPanelComponent {
|
|
|
42
42
|
* When `collapsible`, the whole header toggles on click, so interactive elements
|
|
43
43
|
* inside need `$event.stopPropagation()`.
|
|
44
44
|
*/
|
|
45
|
-
headerTemplate = contentChild(
|
|
45
|
+
headerTemplate = contentChild('header');
|
|
46
46
|
/** Replaces the body; falls back to `ng-content`. */
|
|
47
|
-
bodyTemplate = contentChild(
|
|
47
|
+
bodyTemplate = contentChild('body');
|
|
48
48
|
/**
|
|
49
49
|
* Controls when the `#body` template is created/destroyed: `"always"` (mounted up front),
|
|
50
50
|
* `"lazy"` (mounted on first expand) or `"destroy"` (destroyed after each collapse animation).
|
|
51
51
|
* Values other than `"always"` require `#body`, since plain `ng-content` can't be controlled.
|
|
52
52
|
*/
|
|
53
|
-
contentLifecycle = input(
|
|
53
|
+
contentLifecycle = input('always');
|
|
54
54
|
/** Replaces the default footer buttons. */
|
|
55
|
-
footerTemplate = contentChild(
|
|
55
|
+
footerTemplate = contentChild('footer');
|
|
56
56
|
isBodyVisible = computed(() => !this.collapsible() || this.expanded());
|
|
57
57
|
hasFooter = computed(() => !!this.tertiaryLabel() ||
|
|
58
58
|
!!this.secondaryLabel() ||
|
|
59
59
|
!!this.primaryLabel() ||
|
|
60
60
|
!!this.footerTemplate());
|
|
61
61
|
hasHeaderAction = computed(() => !!this.headerAction()?.label || this.headerActionMenuItems().length > 0);
|
|
62
|
-
collapseRowsClass = computed(() => this.isBodyVisible() ?
|
|
62
|
+
collapseRowsClass = computed(() => this.isBodyVisible() ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]');
|
|
63
63
|
/** Keyboard focus on the toggle; the focus outline is drawn on the whole panel, per the DS spec. */
|
|
64
64
|
isToggleFocused = signal(false);
|
|
65
65
|
constructor() {
|
|
@@ -69,7 +69,7 @@ class SdsPanelComponent {
|
|
|
69
69
|
}
|
|
70
70
|
/** Tells the content lifecycle the collapse animation ended, so `"destroy"` mode can unmount the body. */
|
|
71
71
|
onCollapseTransitionEnd(event, bodyContent) {
|
|
72
|
-
const isOwnGridTransition = event.target === event.currentTarget && event.propertyName ===
|
|
72
|
+
const isOwnGridTransition = event.target === event.currentTarget && event.propertyName === 'grid-template-rows';
|
|
73
73
|
if (isOwnGridTransition) {
|
|
74
74
|
bodyContent.notifyCollapseTransitionEnd();
|
|
75
75
|
}
|
|
@@ -80,7 +80,7 @@ class SdsPanelComponent {
|
|
|
80
80
|
/** Mouse clicks also focus the toggle; only keyboard focus (`:focus-visible`) shows the outline. */
|
|
81
81
|
handleToggleFocus(event) {
|
|
82
82
|
const toggleButton = event.target;
|
|
83
|
-
this.isToggleFocused.set(toggleButton.matches(
|
|
83
|
+
this.isToggleFocused.set(toggleButton.matches(':focus-visible'));
|
|
84
84
|
}
|
|
85
85
|
onHeaderClick() {
|
|
86
86
|
if (this.collapsible()) {
|
|
@@ -97,10 +97,10 @@ class SdsPanelComponent {
|
|
|
97
97
|
}
|
|
98
98
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SdsPanelComponent, decorators: [{
|
|
99
99
|
type: Component,
|
|
100
|
-
args: [{ selector:
|
|
101
|
-
class:
|
|
102
|
-
role:
|
|
103
|
-
|
|
100
|
+
args: [{ selector: 'sds-panel', standalone: true, host: {
|
|
101
|
+
class: 'block',
|
|
102
|
+
role: 'region',
|
|
103
|
+
'[attr.aria-label]': 'heading()',
|
|
104
104
|
}, imports: [
|
|
105
105
|
NgTemplateOutlet,
|
|
106
106
|
SdsButtonComponent,
|