@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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ComponentRef, InjectionToken, type InputSignalWithTransform } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import type { SdsModalComponent } from './modal.component';
|
|
4
|
+
/** Data passed through `SdsModalConfig.data`, injectable by a component opened via `SdsModalService`. */
|
|
5
|
+
export declare const SDS_MODAL_DATA: InjectionToken<unknown>;
|
|
6
|
+
/** Inputs of a component (`input()`, `input.required()` and `model()`) with the type each one accepts. */
|
|
7
|
+
type InputSignalTypes<Signal> = Signal extends InputSignalWithTransform<infer Read, infer Write> ? {
|
|
8
|
+
read: Read;
|
|
9
|
+
write: Write;
|
|
10
|
+
} : never;
|
|
11
|
+
export type SdsModalInputs<Component> = {
|
|
12
|
+
[Key in keyof Component as InputSignalTypes<Component[Key]> extends never ? never : Key]?: InputSignalTypes<Component[Key]>['write'];
|
|
13
|
+
};
|
|
14
|
+
/** Modal options, taken from the inputs of `SdsModalComponent` (except `open`), so a new input shows up here on its own. */
|
|
15
|
+
export type SdsModalOptions = Omit<SdsModalInputs<SdsModalComponent>, 'open'>;
|
|
16
|
+
/** Handle to a Modal opened by `SdsModalService.open()`; opened components can inject it to close the Modal. */
|
|
17
|
+
export declare class SdsModalRef<Result = unknown, Component = unknown> {
|
|
18
|
+
/** Resolves with the value given to `close()`, or `undefined` when dismissed (cancel, X or Escape). */
|
|
19
|
+
readonly closed: Promise<Result | undefined>;
|
|
20
|
+
private readonly confirmedSubject;
|
|
21
|
+
private readonly tertiaryClickedSubject;
|
|
22
|
+
private readonly backClickedSubject;
|
|
23
|
+
/** Emits when the primary button is clicked; the Modal stays open until `close()` is called. */
|
|
24
|
+
readonly confirmed: Observable<void>;
|
|
25
|
+
/** Emits when the tertiary action is clicked; the Modal stays open. */
|
|
26
|
+
readonly tertiaryClicked: Observable<void>;
|
|
27
|
+
/** Emits when the back button is clicked; the Modal stays open. */
|
|
28
|
+
readonly backClicked: Observable<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Instance of the component opened as content. `open()` types it as the component, or as `undefined`
|
|
31
|
+
* for a `TemplateRef`; it is not set yet while that component is being constructed.
|
|
32
|
+
*/
|
|
33
|
+
get componentInstance(): Component;
|
|
34
|
+
private contentInstance?;
|
|
35
|
+
private resolveClosed;
|
|
36
|
+
private modalComponentRef?;
|
|
37
|
+
private disposeContent?;
|
|
38
|
+
private result;
|
|
39
|
+
private isFinished;
|
|
40
|
+
constructor();
|
|
41
|
+
/** Closes the Modal and resolves `closed` with the given result. */
|
|
42
|
+
close(result?: Result): void;
|
|
43
|
+
/** Changes options of the open Modal, e.g. `update({ loading: true })` while saving. */
|
|
44
|
+
update(changes: Partial<SdsModalOptions>): void;
|
|
45
|
+
/** @internal Stores the instance of the component created as the Modal content. */
|
|
46
|
+
_setComponentInstance(instance: Component): void;
|
|
47
|
+
/** @internal Binds the ref to the Modal created by the service. */
|
|
48
|
+
_attach(modalComponentRef: ComponentRef<SdsModalComponent>, disposeContent: () => void): void;
|
|
49
|
+
private finish;
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type SdsModalSize = 'small' | 'default' | 'full';
|
|
4
|
+
export type SdsModalRole = 'dialog' | 'alertdialog';
|
|
5
|
+
export declare class SdsModalComponent {
|
|
6
|
+
private static idCounter;
|
|
7
|
+
/** Whether the Modal is open (two-way bindable). It has no built-in trigger. */
|
|
8
|
+
readonly open: import("@angular/core").ModelSignal<boolean>;
|
|
9
|
+
/** Modal size: `small` (480px), `default` (width per viewport, grows with the content) or `full` (viewport minus margins). */
|
|
10
|
+
readonly size: import("@angular/core").InputSignal<SdsModalSize>;
|
|
11
|
+
/** Title, also used as the modal's accessible name; it should describe the task (e.g. "Editar contato"). */
|
|
12
|
+
readonly heading: import("@angular/core").InputSignal<string>;
|
|
13
|
+
/** Label of the primary button; it must describe the action, never "OK" or "Sim". Omit it for read-only content, leaving only "Fechar". */
|
|
14
|
+
readonly confirmLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
15
|
+
/** Role of the dialog; `alertdialog` is for urgent decisions and links the content as its description. */
|
|
16
|
+
readonly dialogRole: import("@angular/core").InputSignal<SdsModalRole>;
|
|
17
|
+
/** Shows the "Cancelar" button next to the primary one; read-only modals always keep their "Fechar" button. */
|
|
18
|
+
readonly showCancel: import("@angular/core").InputSignal<boolean>;
|
|
19
|
+
/** Label of the tertiary action, shown before the other buttons. */
|
|
20
|
+
readonly tertiaryLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
21
|
+
/** Shows the back button in the header for internal navigation. */
|
|
22
|
+
readonly showBack: import("@angular/core").InputSignal<boolean>;
|
|
23
|
+
/** Shows the close (X) button in the header; it behaves like the secondary button. */
|
|
24
|
+
readonly showClose: import("@angular/core").InputSignal<boolean>;
|
|
25
|
+
/** Paints the primary button with the destructive color and focuses the secondary button on open. */
|
|
26
|
+
readonly destructive: import("@angular/core").InputSignal<boolean>;
|
|
27
|
+
/** While `true` every action is disabled and Escape does not close, as the primary action is processing. */
|
|
28
|
+
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
29
|
+
/** Emits when the primary button is clicked; the consumer closes the Modal by setting `open` to `false`. */
|
|
30
|
+
readonly confirmed: import("@angular/core").OutputEmitterRef<void>;
|
|
31
|
+
/** Emits when the Modal is dismissed via the secondary button, X or Escape; `open` is set to `false` right after. */
|
|
32
|
+
readonly cancelled: import("@angular/core").OutputEmitterRef<void>;
|
|
33
|
+
/** Emits when the tertiary action is clicked; the Modal stays open. */
|
|
34
|
+
readonly tertiaryClicked: import("@angular/core").OutputEmitterRef<void>;
|
|
35
|
+
/** Emits when the back button is clicked; the Modal stays open. */
|
|
36
|
+
readonly backClicked: import("@angular/core").OutputEmitterRef<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Optional `#body` template, used instead of `ng-content`. Unlike `ng-content`, which lives in the
|
|
39
|
+
* parent view, it is only instantiated while the Modal is open.
|
|
40
|
+
*/
|
|
41
|
+
protected readonly bodyTemplate: import("@angular/core").Signal<TemplateRef<void> | undefined>;
|
|
42
|
+
private readonly overlay;
|
|
43
|
+
private readonly overlayContainer;
|
|
44
|
+
private readonly destroyRef;
|
|
45
|
+
private readonly ngZone;
|
|
46
|
+
private readonly portal;
|
|
47
|
+
/** Makes the content area keyboard-scrollable only while it overflows. */
|
|
48
|
+
protected readonly isContentScrollable: import("@angular/core").WritableSignal<boolean>;
|
|
49
|
+
/** Whether the content has any text; an alertdialog only points `aria-describedby` at a non-empty description. */
|
|
50
|
+
protected readonly hasContentText: import("@angular/core").WritableSignal<boolean>;
|
|
51
|
+
protected readonly _titleId: string;
|
|
52
|
+
protected readonly _descriptionId: string;
|
|
53
|
+
protected readonly panelClass: import("@angular/core").Signal<string>;
|
|
54
|
+
protected readonly hasTertiary: import("@angular/core").Signal<boolean>;
|
|
55
|
+
protected readonly hasPrimary: import("@angular/core").Signal<boolean>;
|
|
56
|
+
protected readonly hasSecondary: import("@angular/core").Signal<boolean>;
|
|
57
|
+
protected readonly isAlertDialog: import("@angular/core").Signal<boolean>;
|
|
58
|
+
protected readonly secondaryLabelKey: import("@angular/core").Signal<"platform.scala-ng.modal_cancel" | "platform.scala-ng.modal_close">;
|
|
59
|
+
private overlayRef?;
|
|
60
|
+
private lastHeading?;
|
|
61
|
+
private keydownSubscription?;
|
|
62
|
+
private triggerElement;
|
|
63
|
+
private releaseExclusiveSlot?;
|
|
64
|
+
private isDestroyed;
|
|
65
|
+
private stopObservingContent?;
|
|
66
|
+
private stopObservingText?;
|
|
67
|
+
constructor();
|
|
68
|
+
protected confirm(): void;
|
|
69
|
+
protected tertiary(): void;
|
|
70
|
+
protected back(): void;
|
|
71
|
+
protected cancel(): void;
|
|
72
|
+
private show;
|
|
73
|
+
private hide;
|
|
74
|
+
private releaseExclusiveSlotIfHeld;
|
|
75
|
+
private observeContentText;
|
|
76
|
+
private observeContentOverflow;
|
|
77
|
+
private panelElement;
|
|
78
|
+
private titleElement;
|
|
79
|
+
private focusInitialElement;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsModalComponent, never>;
|
|
81
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsModalComponent, "sds-modal", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "heading": { "alias": "heading"; "required": true; "isSignal": true; }; "confirmLabel": { "alias": "confirmLabel"; "required": false; "isSignal": true; }; "dialogRole": { "alias": "dialogRole"; "required": false; "isSignal": true; }; "showCancel": { "alias": "showCancel"; "required": false; "isSignal": true; }; "tertiaryLabel": { "alias": "tertiaryLabel"; "required": false; "isSignal": true; }; "showBack": { "alias": "showBack"; "required": false; "isSignal": true; }; "showClose": { "alias": "showClose"; "required": false; "isSignal": true; }; "destructive": { "alias": "destructive"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "confirmed": "confirmed"; "cancelled": "cancelled"; "tertiaryClicked": "tertiaryClicked"; "backClicked": "backClicked"; }, ["bodyTemplate"], ["*"], true, never>;
|
|
82
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { TemplateRef, Type } from '@angular/core';
|
|
2
|
+
import { SdsModalInputs, SdsModalOptions, SdsModalRef } from './modal-ref';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface SdsModalConfig<Data = unknown> extends SdsModalOptions {
|
|
5
|
+
/** Title, also used as the modal's accessible name. */
|
|
6
|
+
heading: string;
|
|
7
|
+
/** Value injectable by the opened component via `SDS_MODAL_DATA`, or read from the template context. */
|
|
8
|
+
data?: Data;
|
|
9
|
+
/** Closes the Modal when the router starts a navigation, resolving `closed` with `undefined`; defaults to `true`. */
|
|
10
|
+
closeOnNavigation?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Config of a Modal whose content is a component, which also takes values for the component inputs. */
|
|
13
|
+
export interface SdsModalComponentConfig<Component = unknown, Data = unknown> extends SdsModalConfig<Data> {
|
|
14
|
+
/** Values for the component's `input()`s, applied before it is shown; an unknown input throws. */
|
|
15
|
+
inputs?: SdsModalInputs<Component>;
|
|
16
|
+
}
|
|
17
|
+
export interface SdsModalConfirmConfig {
|
|
18
|
+
/** Direct question or statement about the action, also used as the modal's accessible name. */
|
|
19
|
+
heading: string;
|
|
20
|
+
/** Label of the confirm button; it must describe the action (e.g. "Excluir"), never "OK" or "Sim". */
|
|
21
|
+
confirmLabel: string;
|
|
22
|
+
/** Explanatory text; describe the consequences when the action is irreversible. */
|
|
23
|
+
message?: string;
|
|
24
|
+
/** Shows the "Cancelar" button; when `false` the modal is a simple confirmation. */
|
|
25
|
+
showCancel?: boolean;
|
|
26
|
+
/** Paints the confirm button with the destructive color and focuses "Cancelar" on open. */
|
|
27
|
+
destructive?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Action run when the confirm button is clicked. While it runs the modal shows `loading`; the modal closes
|
|
30
|
+
* and `confirm()` resolves `true` once it succeeds. If it throws, the modal stays open for a retry, so
|
|
31
|
+
* handle and report the error inside the function.
|
|
32
|
+
*/
|
|
33
|
+
onConfirm?: () => unknown;
|
|
34
|
+
/** Closes the modal when the router starts a navigation, resolving `false`; defaults to `true`. */
|
|
35
|
+
closeOnNavigation?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Context of a `TemplateRef` opened by `SdsModalService.open()`. */
|
|
38
|
+
export interface SdsModalTemplateContext<Data = unknown, Result = unknown> {
|
|
39
|
+
$implicit: SdsModalRef<Result>;
|
|
40
|
+
data: Data | undefined;
|
|
41
|
+
}
|
|
42
|
+
export declare class SdsModalService {
|
|
43
|
+
private readonly applicationRef;
|
|
44
|
+
private readonly environmentInjector;
|
|
45
|
+
private readonly router;
|
|
46
|
+
/**
|
|
47
|
+
* Opens a Modal whose body is a component or a `TemplateRef`. The opened content closes it through
|
|
48
|
+
* the injected `SdsModalRef`; the footer buttons only emit on the ref.
|
|
49
|
+
*/
|
|
50
|
+
open<Result = unknown, Data = unknown, Content = unknown>(content: Type<Content>, config: SdsModalComponentConfig<Content, Data>): SdsModalRef<Result, Content>;
|
|
51
|
+
open<Result = unknown, Data = unknown>(content: TemplateRef<SdsModalTemplateContext<Data, Result>>, config: SdsModalConfig<Data>): SdsModalRef<Result, undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Opens a small confirmation modal (`alertdialog`, no close button) and resolves `true` when
|
|
54
|
+
* confirmed, `false` when cancelled or dismissed with Escape.
|
|
55
|
+
*/
|
|
56
|
+
confirm(config: SdsModalConfirmConfig): Promise<boolean>;
|
|
57
|
+
private mount;
|
|
58
|
+
private closeOnNextNavigation;
|
|
59
|
+
private createContent;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsModalService, never>;
|
|
61
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SdsModalService>;
|
|
62
|
+
}
|
package/package.json
CHANGED
|
@@ -124,6 +124,12 @@
|
|
|
124
124
|
"esm2022": "./esm2022/list/seniorsistemas-scala-ng-list.mjs",
|
|
125
125
|
"types": "./list/index.d.ts"
|
|
126
126
|
},
|
|
127
|
+
"./loading-state": {
|
|
128
|
+
"default": "./fesm2022/seniorsistemas-scala-ng-loading-state.mjs",
|
|
129
|
+
"esm": "./esm2022/loading-state/seniorsistemas-scala-ng-loading-state.mjs",
|
|
130
|
+
"esm2022": "./esm2022/loading-state/seniorsistemas-scala-ng-loading-state.mjs",
|
|
131
|
+
"types": "./loading-state/index.d.ts"
|
|
132
|
+
},
|
|
127
133
|
"./locale": {
|
|
128
134
|
"default": "./fesm2022/seniorsistemas-scala-ng-locale.mjs",
|
|
129
135
|
"esm": "./esm2022/locale/seniorsistemas-scala-ng-locale.mjs",
|
|
@@ -136,6 +142,12 @@
|
|
|
136
142
|
"esm2022": "./esm2022/mask/seniorsistemas-scala-ng-mask.mjs",
|
|
137
143
|
"types": "./mask/index.d.ts"
|
|
138
144
|
},
|
|
145
|
+
"./modal": {
|
|
146
|
+
"default": "./fesm2022/seniorsistemas-scala-ng-modal.mjs",
|
|
147
|
+
"esm": "./esm2022/modal/seniorsistemas-scala-ng-modal.mjs",
|
|
148
|
+
"esm2022": "./esm2022/modal/seniorsistemas-scala-ng-modal.mjs",
|
|
149
|
+
"types": "./modal/index.d.ts"
|
|
150
|
+
},
|
|
139
151
|
"./package.json": {
|
|
140
152
|
"default": "./package.json"
|
|
141
153
|
},
|
|
@@ -199,6 +211,12 @@
|
|
|
199
211
|
"esm2022": "./esm2022/spinner/seniorsistemas-scala-ng-spinner.mjs",
|
|
200
212
|
"types": "./spinner/index.d.ts"
|
|
201
213
|
},
|
|
214
|
+
"./split-button": {
|
|
215
|
+
"default": "./fesm2022/seniorsistemas-scala-ng-split-button.mjs",
|
|
216
|
+
"esm": "./esm2022/split-button/seniorsistemas-scala-ng-split-button.mjs",
|
|
217
|
+
"esm2022": "./esm2022/split-button/seniorsistemas-scala-ng-split-button.mjs",
|
|
218
|
+
"types": "./split-button/index.d.ts"
|
|
219
|
+
},
|
|
202
220
|
"./stats-card": {
|
|
203
221
|
"default": "./fesm2022/seniorsistemas-scala-ng-stats-card.mjs",
|
|
204
222
|
"esm": "./esm2022/stats-card/seniorsistemas-scala-ng-stats-card.mjs",
|
|
@@ -240,6 +258,9 @@
|
|
|
240
258
|
},
|
|
241
259
|
"module": "fesm2022/seniorsistemas-scala-ng.mjs",
|
|
242
260
|
"name": "@seniorsistemas/scala-ng",
|
|
261
|
+
"ng-update": {
|
|
262
|
+
"migrations": "./schematics/migrations.json"
|
|
263
|
+
},
|
|
243
264
|
"peerDependencies": {
|
|
244
265
|
"@angular/cdk": "^18.2.0",
|
|
245
266
|
"@angular/common": "^18.2.0",
|
|
@@ -255,5 +276,5 @@
|
|
|
255
276
|
"schematics": "./schematics/collection.json",
|
|
256
277
|
"sideEffects": false,
|
|
257
278
|
"typings": "index.d.ts",
|
|
258
|
-
"version": "2.
|
|
279
|
+
"version": "2.5.0"
|
|
259
280
|
}
|
package/page-header/README.md
CHANGED
|
@@ -153,7 +153,7 @@ npm install @seniorsistemas/scala-ng
|
|
|
153
153
|
Importe o componente diretamente no seu standalone component:
|
|
154
154
|
|
|
155
155
|
```typescript
|
|
156
|
-
import { SdsPageHeaderComponent } from
|
|
156
|
+
import { SdsPageHeaderComponent } from '@seniorsistemas/scala-ng/page-header';
|
|
157
157
|
|
|
158
158
|
@Component({
|
|
159
159
|
imports: [SdsPageHeaderComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SdsPageHeaderComponent, type SdsPageHeaderAction, type SdsPageHeaderActionsConfig, } from
|
|
1
|
+
export { SdsPageHeaderComponent, type SdsPageHeaderAction, type SdsPageHeaderActionsConfig, } from './src/page-header/page-header.component';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type SelectButtonItem } from
|
|
2
|
-
import { type SdsTieredMenuItem } from
|
|
1
|
+
import { type SelectButtonItem } from '@seniorsistemas/scala-ng/select-button';
|
|
2
|
+
import { type SdsTieredMenuItem } from '@seniorsistemas/scala-ng/tiered-menu';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export interface SdsPageHeaderAction {
|
|
5
5
|
/** Visible label. Omit for an icon-only button — `ariaLabel` becomes required in practice then. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SdsPaginatorComponent } from
|
|
2
|
-
export type { PaginatorPageEvent } from
|
|
1
|
+
export { SdsPaginatorComponent } from './src/paginator/paginator.component';
|
|
2
|
+
export type { PaginatorPageEvent } from './src/paginator/paginator.models';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FormControl } from
|
|
2
|
-
import type { SelectOption } from
|
|
3
|
-
import type { PaginatorPageEvent } from
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import type { SelectOption } from '@seniorsistemas/scala-ng/select';
|
|
3
|
+
import type { PaginatorPageEvent } from './paginator.models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SdsPaginatorComponent {
|
|
6
6
|
private readonly injector;
|
package/panel/README.md
CHANGED
|
@@ -93,7 +93,7 @@ npm install @seniorsistemas/scala-ng
|
|
|
93
93
|
Importe o componente diretamente no seu standalone component:
|
|
94
94
|
|
|
95
95
|
```typescript
|
|
96
|
-
import { SdsPanelComponent } from
|
|
96
|
+
import { SdsPanelComponent } from '@seniorsistemas/scala-ng/panel';
|
|
97
97
|
|
|
98
98
|
@Component({
|
|
99
99
|
imports: [SdsPanelComponent],
|
package/panel/public-api.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { SdsPanelComponent, type SdsPanelHeaderAction } from
|
|
1
|
+
export { SdsPanelComponent, type SdsPanelHeaderAction } from './src/panel/panel.component';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TemplateRef } from
|
|
2
|
-
import { SdsContentLifecycleComponent, type ContentLifecycleHost, type ContentLifecycleMode } from
|
|
3
|
-
import { type SdsTieredMenuItem } from
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { SdsContentLifecycleComponent, type ContentLifecycleHost, type ContentLifecycleMode } from '@seniorsistemas/scala-ng/content-lifecycle';
|
|
3
|
+
import { type SdsTieredMenuItem } from '@seniorsistemas/scala-ng/tiered-menu';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
6
|
* Configuração do botão de ação do header. `label`, `icon` e `ariaLabel` descrevem o mesmo botão
|
package/progress-bar/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Scala Design System — `@seniorsistemas/scala-ng/progress-bar`
|
|
4
4
|
|
|
5
|
-
Medidor de valor: mostra quanto de um total já foi atingido, como saldos, cotas, metas, limites e consumo, com meta opcional e status quando o valor tem faixa boa ou ruim. Para o progresso de operações do sistema (upload, importação), use o Loading Bar.
|
|
5
|
+
Medidor de valor: mostra quanto de um total já foi atingido, como saldos, cotas, metas, limites e consumo, com meta opcional e status quando o valor tem faixa boa ou ruim. Para o progresso de operações do sistema (upload, importação), use o `sds-progress-bar` com `size="small"` (Loading Bar) — veja o README de Loading States.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@ Medidor de valor: mostra quanto de um total já foi atingido, como saldos, cotas
|
|
|
10
10
|
|
|
11
11
|
Use para dar uma leitura imediata de "quanto já foi usado ou atingido" de um total: o saldo de férias, a cota de treinamentos, o consumo de créditos, o orçamento de um período. O valor sempre aparece também em texto, fora da barra, então a barra reforça a leitura em vez de substituí-la.
|
|
12
12
|
|
|
13
|
-
É a escolha certa para um valor dentro de uma escala conhecida. **Não** é a escolha para upload, importação (use
|
|
13
|
+
É a escolha certa para um valor dentro de uma escala conhecida. **Não** é a escolha para upload, importação (use `size="small"`, a Loading Bar) nem para etapas de um fluxo (use o Stepper).
|
|
14
14
|
|
|
15
15
|
## Anatomy
|
|
16
16
|
|
|
@@ -70,7 +70,7 @@ O componente é anunciado como um medidor (`role="meter"`), não como um carrega
|
|
|
70
70
|
|
|
71
71
|
**Quando não usar**
|
|
72
72
|
|
|
73
|
-
- Upload, importação ou carregamento → use o Loading Bar.
|
|
73
|
+
- Upload, importação ou carregamento → use o `sds-progress-bar` com `size="small"` (Loading Bar) — veja o README de Loading States.
|
|
74
74
|
- Etapas de um fluxo → use o Stepper.
|
|
75
75
|
- Para um valor sem escala conhecida.
|
|
76
76
|
|
|
@@ -98,7 +98,7 @@ npm install @seniorsistemas/scala-ng
|
|
|
98
98
|
Importe o componente diretamente no seu standalone component:
|
|
99
99
|
|
|
100
100
|
```typescript
|
|
101
|
-
import { SdsProgressBarComponent } from
|
|
101
|
+
import { SdsProgressBarComponent } from '@seniorsistemas/scala-ng/progress-bar';
|
|
102
102
|
|
|
103
103
|
@Component({
|
|
104
104
|
imports: [SdsProgressBarComponent],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SdsProgressBarComponent } from
|
|
2
|
-
export type { SdsProgressBarLayout, SdsProgressBarSize, } from
|
|
3
|
-
export { getSdsProgressBarStatus } from
|
|
4
|
-
export type { SdsProgressBarRanges, SdsProgressBarStatus, } from
|
|
1
|
+
export { SdsProgressBarComponent } from './src/progress-bar/progress-bar.component';
|
|
2
|
+
export type { SdsProgressBarLayout, SdsProgressBarSize, } from './src/progress-bar/progress-bar.component';
|
|
3
|
+
export { getSdsProgressBarStatus } from './src/progress-bar/progress-bar.utils';
|
|
4
|
+
export type { SdsProgressBarRanges, SdsProgressBarStatus, } from './src/progress-bar/progress-bar.utils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SdsProgressBarStatus } from
|
|
1
|
+
import { SdsProgressBarStatus } from './progress-bar.utils';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export type SdsProgressBarLayout =
|
|
4
|
-
export type SdsProgressBarSize =
|
|
3
|
+
export type SdsProgressBarLayout = 'stacked' | 'inline';
|
|
4
|
+
export type SdsProgressBarSize = 'default' | 'small';
|
|
5
5
|
interface SdsProgressBarStatusTokens {
|
|
6
6
|
readonly fill: string;
|
|
7
7
|
readonly text: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SdsProgressBarStatus =
|
|
1
|
+
export type SdsProgressBarStatus = 'default' | 'positive' | 'warning' | 'destructive';
|
|
2
2
|
/** Value ranges that drive the automatic status, following the HTML `<meter>` model. */
|
|
3
3
|
export interface SdsProgressBarRanges {
|
|
4
4
|
/** Upper limit of the low range. Defaults to `min`. */
|
package/public-api.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export { createTheme, type SdsTheme, type ThemeConfig, type ThemeOverrides, type ThemeVariant, } from
|
|
2
|
-
export { type SemanticToken } from
|
|
3
|
-
export { SDS_THEME_MODE_STORAGE_KEY, SDS_THEME_NAME_STORAGE_KEY, SdsThemeService, type Mode, } from
|
|
4
|
-
export { buildDisplayRows, filterComboboxOptions, getComboboxOptionEl, type ComboboxDisplayRow, type ComboboxItem, } from
|
|
5
|
-
export { syncControlState } from
|
|
6
|
-
export { FocusableItemAdapter, type FocusableItem } from
|
|
7
|
-
export { CHIP_STATE_CLASSES, buildChipContainerClasses, focusChip, handleChipRemove, stopChipActivationKeys, type ChipBaseVisualState, type ChipContainerClassOptions, } from
|
|
8
|
-
export { _resetAriaHideForTesting, hideNonDialogContentFromAssistiveTechnology, restoreNonDialogContentFromAssistiveTechnology, } from
|
|
9
|
-
export {
|
|
1
|
+
export { createTheme, type SdsTheme, type ThemeConfig, type ThemeOverrides, type ThemeVariant, } from './lib/theme/create-theme';
|
|
2
|
+
export { type SemanticToken } from './lib/theme/semantic-tokens';
|
|
3
|
+
export { SDS_THEME_MODE_STORAGE_KEY, SDS_THEME_NAME_STORAGE_KEY, SdsThemeService, type Mode, } from './lib/theme/theme.service';
|
|
4
|
+
export { buildDisplayRows, filterComboboxOptions, getComboboxOptionEl, type ComboboxDisplayRow, type ComboboxItem, } from './lib/combobox/combobox.utils';
|
|
5
|
+
export { syncControlState } from './lib/forms/control-state.utils';
|
|
6
|
+
export { FocusableItemAdapter, type FocusableItem } from './lib/a11y/focusable-item.utils';
|
|
7
|
+
export { CHIP_STATE_CLASSES, buildChipContainerClasses, focusChip, handleChipRemove, stopChipActivationKeys, type ChipBaseVisualState, type ChipContainerClassOptions, } from './lib/chip/chip.utils';
|
|
8
|
+
export { _resetAriaHideForTesting, hideNonDialogContentFromAssistiveTechnology, restoreNonDialogContentFromAssistiveTechnology, } from './lib/overlay/aria-hide.utils';
|
|
9
|
+
export { _resetExclusiveDialogForTesting, acquireExclusiveDialog, } from './lib/overlay/exclusive-dialog.utils';
|
|
10
|
+
export { _resetScrollLockForTesting, lockPageScroll, unlockPageScroll, } from './lib/overlay/scroll-lock.utils';
|
|
11
|
+
export { observeVerticalOverflow } from './lib/overlay/scrollable-region.utils';
|
package/radio-button/README.md
CHANGED
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
SdsRadioButtonComponent,
|
|
111
111
|
SdsRadioButtonGroupComponent,
|
|
112
112
|
type RadioButtonGroupItem,
|
|
113
|
-
} from
|
|
113
|
+
} from '@seniorsistemas/scala-ng/radio-button';
|
|
114
114
|
|
|
115
115
|
@Component({
|
|
116
116
|
imports: [SdsRadioButtonComponent, SdsRadioButtonGroupComponent],
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { type RadioButtonGroupItem } from
|
|
2
|
-
export { SdsRadioButtonGroupComponent } from
|
|
3
|
-
export { SdsRadioButtonComponent } from
|
|
1
|
+
export { type RadioButtonGroupItem } from './src/radio-button-group/models/radio-button-group.models';
|
|
2
|
+
export { SdsRadioButtonGroupComponent } from './src/radio-button-group/radio-button-group.component';
|
|
3
|
+
export { SdsRadioButtonComponent } from './src/radio-button/radio-button.component';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OnDestroy, OnInit } from
|
|
2
|
-
import { AbstractControl, ControlValueAccessor } from
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SdsRadioButtonComponent<T = unknown> implements ControlValueAccessor, OnInit, OnDestroy {
|
|
5
5
|
private static idCounter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ControlValueAccessor } from
|
|
2
|
-
import { RadioButtonGroupItem } from
|
|
3
|
-
import { RadioGroupErrorSource } from
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import { RadioButtonGroupItem } from './models/radio-button-group.models';
|
|
3
|
+
import { RadioGroupErrorSource } from './radio-button-group-error.token';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class SdsRadioButtonGroupComponent<T> implements ControlValueAccessor, RadioGroupErrorSource {
|
|
6
6
|
private readonly ngControl;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrateTemplate = migrateTemplate;
|
|
4
|
+
exports.migrateSpinnerToLoadingState = migrateSpinnerToLoadingState;
|
|
5
|
+
const SPINNER_TAG = /<sds-spinner((?:\s[^>]*?)?)\s*(?:\/>|>\s*<\/sds-spinner>)/g;
|
|
6
|
+
const CONTROL_FLOW_SPINNER = /@if\s*\(([^)]+)\)\s*\{\s*(<sds-spinner(?:\s[^>]*?)?\s*(?:\/>|>\s*<\/sds-spinner>))\s*\}/g;
|
|
7
|
+
const SUPPORTED_SIZES = new Set(['16', '20']);
|
|
8
|
+
function readSize(attributes) {
|
|
9
|
+
const match = /(?:\[size\]|size)\s*=\s*"(?:'?)(\d+)(?:'?)"/.exec(attributes);
|
|
10
|
+
return match ? match[1] : '20';
|
|
11
|
+
}
|
|
12
|
+
function convertSpinner(attributes, condition) {
|
|
13
|
+
const size = readSize(attributes);
|
|
14
|
+
if (!size || !SUPPORTED_SIZES.has(size)) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
let remaining = attributes;
|
|
18
|
+
let loading = condition;
|
|
19
|
+
const ngIf = /\s\*ngIf\s*=\s*"([^"]+)"/.exec(remaining);
|
|
20
|
+
if (ngIf) {
|
|
21
|
+
loading = ngIf[1];
|
|
22
|
+
remaining = remaining.replace(ngIf[0], '');
|
|
23
|
+
}
|
|
24
|
+
if (!loading) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
remaining = remaining.replace(/\s(?:\[size\]|size)\s*=\s*"[^"]*"/, '');
|
|
28
|
+
const sizeToken = size === '16' ? "'small'" : "'default'";
|
|
29
|
+
return `<span class="inline-block size-[${size}px]"${remaining} *sdsLoadingState="${loading}; variant: 'spinner'; size: ${sizeToken}"></span>`;
|
|
30
|
+
}
|
|
31
|
+
/** Rewrites `<sds-spinner>` usages in a template. Returns the new text and how many usages could not be converted. */
|
|
32
|
+
function migrateTemplate(content) {
|
|
33
|
+
const withoutControlFlow = content.replace(CONTROL_FLOW_SPINNER, (match, condition, spinner) => {
|
|
34
|
+
const attributes = /<sds-spinner((?:\s[^>]*?)?)\s*(?:\/>|>)/.exec(spinner)?.[1] ?? '';
|
|
35
|
+
return convertSpinner(attributes, condition.trim()) ?? match;
|
|
36
|
+
});
|
|
37
|
+
const migrated = withoutControlFlow.replace(SPINNER_TAG, (match, attributes) => convertSpinner(attributes, undefined) ?? match);
|
|
38
|
+
const pending = (migrated.match(/<sds-spinner/g) ?? []).length;
|
|
39
|
+
return { content: migrated, pending };
|
|
40
|
+
}
|
|
41
|
+
function migrateTypeScript(content, pending) {
|
|
42
|
+
if (pending > 0 || !content.includes('SdsSpinnerComponent')) {
|
|
43
|
+
return content;
|
|
44
|
+
}
|
|
45
|
+
return content
|
|
46
|
+
.replace(/@seniorsistemas\/scala-ng\/spinner/g, '@seniorsistemas/scala-ng/loading-state')
|
|
47
|
+
.replace(/\bSdsSpinnerComponent\b/g, 'SdsLoadingStateDirective');
|
|
48
|
+
}
|
|
49
|
+
function migrateSpinnerToLoadingState() {
|
|
50
|
+
return (tree, context) => {
|
|
51
|
+
tree.visit((path) => {
|
|
52
|
+
if (path.includes('node_modules/') || !/\.(html|ts)$/.test(path)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const original = tree.read(path)?.toString('utf-8');
|
|
56
|
+
if (!original ||
|
|
57
|
+
(!original.includes('sds-spinner') && !original.includes('SdsSpinnerComponent'))) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const template = migrateTemplate(original);
|
|
61
|
+
const updated = path.endsWith('.ts')
|
|
62
|
+
? migrateTypeScript(template.content, template.pending)
|
|
63
|
+
: template.content;
|
|
64
|
+
if (updated !== original) {
|
|
65
|
+
tree.overwrite(path, updated);
|
|
66
|
+
}
|
|
67
|
+
if (template.pending > 0) {
|
|
68
|
+
context.logger.warn(`${path}: ${template.pending} <sds-spinner> usage(s) need manual migration to *sdsLoadingState ` +
|
|
69
|
+
`(sds-spinner is deprecated and will be removed in v3.0.0).`);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return tree;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../projects/scala-ng/schematics/migrate-spinner-to-loading-state/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"migrate-spinner-to-loading-state": {
|
|
5
|
+
"version": "2.5.0",
|
|
6
|
+
"description": "Replaces <sds-spinner> with *sdsLoadingState (variant spinner).",
|
|
7
|
+
"factory": "./migrate-spinner-to-loading-state/index#migrateSpinnerToLoadingState"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|