@odx/angular 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +19 -1
- package/cdk/connected-overlay/lib/models/connected-overlay-ref.d.ts +1 -1
- package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +9 -1
- package/cdk/expandable/lib/directives/expandable-container.directive.d.ts +9 -5
- package/cdk/expandable/lib/directives/expandable-item.directive.d.ts +4 -1
- package/cdk/option-control/lib/option-control.d.ts +2 -0
- package/cdk/radio-group-control/lib/radio-control.directive.d.ts +18 -0
- package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +3 -1
- package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +9 -5
- package/components/action-group/action-group.component.d.ts +3 -0
- package/components/area-header/area-header.component.d.ts +2 -1
- package/components/autocomplete/lib/autocomplete.component.d.ts +17 -4
- package/components/autocomplete/lib/components/option/autocomplete-option.component.d.ts +8 -0
- package/components/autocomplete/lib/directives/autocomplete-input-control.directive.d.ts +4 -0
- package/components/avatar/lib/avatar.component.d.ts +6 -2
- package/components/badge/lib/badge.component.d.ts +12 -1
- package/components/badge/lib/badge.directive.d.ts +18 -3
- package/components/bar/lib/directives/bar-button.directive.d.ts +6 -0
- package/components/button/lib/button.component.d.ts +9 -1
- package/components/button-group/lib/button-group.component.d.ts +12 -0
- package/components/calendar/lib/calendar.component.d.ts +11 -0
- package/components/calendar/lib/calendar.config.d.ts +6 -0
- package/components/calendar/lib/calendar.service.d.ts +13 -1
- package/components/calendar/lib/components/calendar-header/calendar-header.component.d.ts +16 -0
- package/components/calendar/lib/daterange.service.d.ts +3 -0
- package/components/calendar/lib/directives/calendar-cell.directive.d.ts +4 -0
- package/components/calendar/lib/directives/calendar-view.directive.d.ts +18 -0
- package/components/calendar/lib/pipes/date-label.pipe.d.ts +4 -0
- package/components/card/lib/card.component.d.ts +26 -2
- package/components/card/lib/components/card-footer/card-footer.component.d.ts +3 -0
- package/components/card/lib/components/launch-card-subtitle/launch-card-subtitle.component.d.ts +3 -0
- package/components/card/lib/directives/card-content.directive.d.ts +3 -0
- package/components/card/lib/directives/card-title.directive.d.ts +3 -0
- package/components/checkbox/lib/checkbox.component.d.ts +9 -2
- package/components/chip/lib/components/chip/chip.component.d.ts +15 -3
- package/components/circular-progress/lib/circular-progress.component.d.ts +15 -2
- package/components/datepicker/lib/datepicker.component.d.ts +28 -1
- package/components/datepicker/lib/directives/datepicker-input-control.directive.d.ts +7 -1
- package/components/daterangepicker/lib/daterangepicker.component.d.ts +4 -0
- package/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.d.ts +3 -1
- package/components/daterangepicker/lib/required.validator.d.ts +8 -0
- package/components/dropdown/lib/dropdown.component.d.ts +6 -4
- package/components/dropdown/lib/dropdown.directive.d.ts +38 -3
- package/components/dropdown/lib/helpers/close-current-dropdown.d.ts +2 -1
- package/components/error-page/lib/error-page.component.d.ts +2 -0
- package/components/footer/lib/footer.component.d.ts +6 -2
- package/components/footer/lib/helpers/create-footer-links.d.ts +1 -2
- package/components/form-field/lib/components/form-field-info/form-field-info.component.d.ts +2 -1
- package/components/form-field/lib/components/form-group/form-group.component.d.ts +7 -2
- package/components/form-field/lib/directives/form-field-error.directive.d.ts +2 -0
- package/components/form-field/lib/directives/form.directive.d.ts +4 -0
- package/components/form-field/lib/form-field.component.d.ts +17 -2
- package/components/form-field/lib/form-field.service.d.ts +27 -6
- package/components/form-field/lib/services/form-field-error.service.d.ts +11 -3
- package/components/header-navigation/lib/header-navigation.component.d.ts +3 -0
- package/components/icon/lib/helpers/unpack-icon-identifier.d.ts +2 -2
- package/components/icon/lib/icon.component.d.ts +13 -1
- package/components/inline-message/lib/inline-message.component.d.ts +5 -1
- package/components/list/lib/components/expandable-list-item/expandable-list-item.component.d.ts +1 -0
- package/components/list/lib/components/list-item/list-item.component.d.ts +10 -1
- package/components/list/lib/list.component.d.ts +1 -0
- package/components/loading-spinner/lib/loading-spinner.component.d.ts +3 -0
- package/components/loading-spinner/lib/loading-spinner.directive.d.ts +7 -0
- package/components/modal/lib/components/modal-header/modal-header.component.d.ts +0 -1
- package/components/modal/lib/components/modal-hero/modal-hero.component.d.ts +3 -0
- package/components/modal/lib/directives/index.d.ts +2 -0
- package/components/modal/lib/directives/prevent-form-method-dialog.directive.d.ts +9 -0
- package/components/modal/lib/directives/prevent-method-dialog.directive.d.ts +9 -0
- package/components/modal/lib/modal.component.d.ts +11 -3
- package/components/modal/lib/modal.module.d.ts +5 -3
- package/components/modal/lib/modal.service.d.ts +7 -5
- package/components/modal/lib/models/modal-ref.d.ts +18 -4
- package/components/notification/lib/components/notification-item/notification-item.component.d.ts +4 -4
- package/components/notification/lib/directives/notification-center.directive.d.ts +6 -3
- package/components/notification/lib/features/with-browser-notifications.d.ts +1 -1
- package/components/notification/lib/features/with-load-notifications.d.ts +2 -1
- package/components/notification/lib/features/with-notification-transformer.d.ts +2 -2
- package/components/notification/lib/features/with-peristent-notifications.d.ts +6 -8
- package/components/notification/lib/features/with-save-notifications.d.ts +1 -1
- package/components/paginator/lib/paginator.component.d.ts +50 -0
- package/components/progress/lib/progress.component.d.ts +6 -1
- package/components/radio-group/lib/components/radio-button/radio-button.component.d.ts +7 -0
- package/components/radio-group/lib/radio-group.component.d.ts +6 -0
- package/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.d.ts +9 -0
- package/components/rail-navigation/lib/rail-navigation.component.d.ts +10 -2
- package/components/rich-list/lib/components/rich-list-item/rich-list-item.component.d.ts +8 -10
- package/components/rich-list/lib/rich-list.component.d.ts +3 -0
- package/components/select/lib/components/select-option/select-option.component.d.ts +1 -0
- package/components/select/lib/directives/select-input-control.directive.d.ts +4 -1
- package/components/select/lib/select.component.d.ts +7 -1
- package/components/slider/lib/slider.directive.d.ts +7 -4
- package/components/spinbox/lib/spinbox.component.d.ts +9 -0
- package/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.d.ts +4 -1
- package/components/table/lib/components/check-cell/check-cell.component.d.ts +4 -1
- package/components/table/lib/components/header-title/header-title.component.d.ts +12 -1
- package/components/table/lib/table.component.d.ts +18 -1
- package/components/timepicker/lib/components/timepicker-option.component.d.ts +9 -1
- package/components/timepicker/lib/directives/timepicker-input-control.directive.d.ts +2 -0
- package/components/timepicker/lib/timepicker.component.d.ts +18 -3
- package/components/timepicker/lib/timepicker.service.d.ts +0 -7
- package/components/toast/lib/components/toast-container/toast-container.component.d.ts +19 -0
- package/components/toast/lib/components/toast-item/toast-item.component.d.ts +57 -1
- package/components/toast/lib/toast.service.d.ts +12 -0
- package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +3 -0
- package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +2 -0
- package/components/tooltip/lib/tooltip.component.d.ts +7 -1
- package/components/tooltip/lib/tooltip.directive.d.ts +15 -2
- package/components/wizard/lib/components/wizard-step/wizard-step.component.d.ts +17 -0
- package/components/wizard/lib/wizard.component.d.ts +13 -1
- package/esm2022/cdk/checkbox-control/lib/checkbox-control.directive.mjs +20 -2
- package/esm2022/cdk/connected-overlay/lib/models/connected-overlay-ref.mjs +2 -2
- package/esm2022/cdk/dynamic-view/lib/dynamic-view.directive.mjs +4 -1
- package/esm2022/cdk/expandable/lib/directives/expandable-container.directive.mjs +10 -6
- package/esm2022/cdk/expandable/lib/directives/expandable-item.directive.mjs +5 -2
- package/esm2022/cdk/option-control/lib/option-control.mjs +3 -1
- package/esm2022/cdk/radio-group-control/lib/radio-control.directive.mjs +19 -1
- package/esm2022/cdk/radio-group-control/lib/radio-group-control.directive.mjs +3 -1
- package/esm2022/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +9 -4
- package/esm2022/components/action-group/action-group.component.mjs +4 -1
- package/esm2022/components/area-header/area-header.component.mjs +3 -2
- package/esm2022/components/autocomplete/lib/autocomplete.component.mjs +8 -5
- package/esm2022/components/autocomplete/lib/components/option/autocomplete-option.component.mjs +9 -1
- package/esm2022/components/autocomplete/lib/directives/autocomplete-input-control.directive.mjs +5 -1
- package/esm2022/components/avatar/lib/avatar.component.mjs +7 -3
- package/esm2022/components/badge/lib/badge.component.mjs +7 -2
- package/esm2022/components/badge/lib/badge.directive.mjs +19 -4
- package/esm2022/components/bar/lib/directives/bar-button.directive.mjs +7 -1
- package/esm2022/components/button/lib/button.component.mjs +10 -2
- package/esm2022/components/button-group/lib/button-group.component.mjs +13 -1
- package/esm2022/components/calendar/lib/calendar.component.mjs +12 -1
- package/esm2022/components/calendar/lib/calendar.config.mjs +1 -1
- package/esm2022/components/calendar/lib/calendar.service.mjs +14 -2
- package/esm2022/components/calendar/lib/components/calendar-header/calendar-header.component.mjs +13 -1
- package/esm2022/components/calendar/lib/daterange.service.mjs +4 -1
- package/esm2022/components/calendar/lib/directives/calendar-cell.directive.mjs +5 -1
- package/esm2022/components/calendar/lib/directives/calendar-view.directive.mjs +17 -1
- package/esm2022/components/calendar/lib/pipes/date-label.pipe.mjs +5 -1
- package/esm2022/components/card/lib/card.component.mjs +25 -1
- package/esm2022/components/card/lib/components/card-footer/card-footer.component.mjs +4 -1
- package/esm2022/components/card/lib/components/launch-card-subtitle/launch-card-subtitle.component.mjs +4 -1
- package/esm2022/components/card/lib/directives/card-content.directive.mjs +4 -1
- package/esm2022/components/card/lib/directives/card-title.directive.mjs +4 -1
- package/esm2022/components/checkbox/lib/checkbox.component.mjs +10 -3
- package/esm2022/components/chip/lib/components/chip/chip.component.mjs +15 -3
- package/esm2022/components/circular-progress/lib/circular-progress.component.mjs +16 -3
- package/esm2022/components/datepicker/lib/datepicker.component.mjs +29 -2
- package/esm2022/components/datepicker/lib/directives/datepicker-input-control.directive.mjs +8 -2
- package/esm2022/components/daterangepicker/lib/daterangepicker.component.mjs +5 -1
- package/esm2022/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.mjs +4 -2
- package/esm2022/components/daterangepicker/lib/required.validator.mjs +9 -9
- package/esm2022/components/dropdown/lib/dropdown.component.mjs +1 -5
- package/esm2022/components/dropdown/lib/dropdown.directive.mjs +31 -4
- package/esm2022/components/dropdown/lib/helpers/close-current-dropdown.mjs +3 -2
- package/esm2022/components/error-page/lib/error-page.component.mjs +3 -1
- package/esm2022/components/footer/lib/footer.component.mjs +7 -3
- package/esm2022/components/footer/lib/helpers/create-footer-links.mjs +2 -3
- package/esm2022/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +3 -2
- package/esm2022/components/form-field/lib/components/form-group/form-group.component.mjs +6 -3
- package/esm2022/components/form-field/lib/directives/form-field-error.directive.mjs +1 -1
- package/esm2022/components/form-field/lib/directives/form.directive.mjs +5 -1
- package/esm2022/components/form-field/lib/form-field.component.mjs +14 -2
- package/esm2022/components/form-field/lib/form-field.service.mjs +28 -7
- package/esm2022/components/form-field/lib/services/form-field-error.service.mjs +12 -4
- package/esm2022/components/header-navigation/lib/header-navigation.component.mjs +1 -1
- package/esm2022/components/icon/lib/helpers/unpack-icon-identifier.mjs +3 -3
- package/esm2022/components/icon/lib/icon.component.mjs +14 -2
- package/esm2022/components/inline-message/lib/inline-message.component.mjs +6 -2
- package/esm2022/components/list/lib/components/expandable-list-item/expandable-list-item.component.mjs +2 -1
- package/esm2022/components/list/lib/components/list-item/list-item.component.mjs +11 -2
- package/esm2022/components/list/lib/list.component.mjs +2 -1
- package/esm2022/components/loading-spinner/lib/loading-spinner.component.mjs +4 -1
- package/esm2022/components/loading-spinner/lib/loading-spinner.directive.mjs +8 -1
- package/esm2022/components/modal/lib/components/modal-header/modal-header.component.mjs +1 -1
- package/esm2022/components/modal/lib/components/modal-hero/modal-hero.component.mjs +4 -1
- package/esm2022/components/modal/lib/directives/index.mjs +3 -1
- package/esm2022/components/modal/lib/directives/prevent-form-method-dialog.directive.mjs +23 -0
- package/esm2022/components/modal/lib/directives/prevent-method-dialog.directive.mjs +23 -0
- package/esm2022/components/modal/lib/modal.component.mjs +36 -17
- package/esm2022/components/modal/lib/modal.module.mjs +10 -4
- package/esm2022/components/modal/lib/modal.service.mjs +4 -3
- package/esm2022/components/modal/lib/models/modal-ref.mjs +19 -5
- package/esm2022/components/notification/lib/components/notification-item/notification-item.component.mjs +5 -5
- package/esm2022/components/notification/lib/directives/notification-center.directive.mjs +7 -4
- package/esm2022/components/notification/lib/features/with-browser-notifications.mjs +4 -5
- package/esm2022/components/notification/lib/features/with-load-notifications.mjs +3 -3
- package/esm2022/components/notification/lib/features/with-notification-transformer.mjs +3 -3
- package/esm2022/components/notification/lib/features/with-peristent-notifications.mjs +7 -9
- package/esm2022/components/notification/lib/features/with-save-notifications.mjs +3 -4
- package/esm2022/components/paginator/lib/paginator.component.mjs +51 -1
- package/esm2022/components/progress/lib/progress.component.mjs +7 -2
- package/esm2022/components/radio-group/lib/components/radio-button/radio-button.component.mjs +3 -1
- package/esm2022/components/radio-group/lib/radio-group.component.mjs +7 -1
- package/esm2022/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.mjs +7 -1
- package/esm2022/components/rail-navigation/lib/rail-navigation.component.mjs +11 -3
- package/esm2022/components/rich-list/lib/components/rich-list-item/rich-list-item.component.mjs +4 -6
- package/esm2022/components/rich-list/lib/rich-list.component.mjs +4 -1
- package/esm2022/components/select/lib/components/select-option/select-option.component.mjs +2 -1
- package/esm2022/components/select/lib/directives/select-input-control.directive.mjs +4 -1
- package/esm2022/components/select/lib/select.component.mjs +8 -2
- package/esm2022/components/slider/lib/slider.directive.mjs +7 -4
- package/esm2022/components/spinbox/lib/spinbox.component.mjs +10 -1
- package/esm2022/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.mjs +5 -2
- package/esm2022/components/table/lib/components/check-cell/check-cell.component.mjs +5 -2
- package/esm2022/components/table/lib/components/header-title/header-title.component.mjs +11 -1
- package/esm2022/components/table/lib/table.component.mjs +15 -1
- package/esm2022/components/timepicker/lib/components/timepicker-option.component.mjs +10 -2
- package/esm2022/components/timepicker/lib/directives/timepicker-input-control.directive.mjs +3 -1
- package/esm2022/components/timepicker/lib/timepicker.component.mjs +14 -4
- package/esm2022/components/timepicker/lib/timepicker.service.mjs +1 -8
- package/esm2022/components/toast/lib/components/toast-container/toast-container.component.mjs +20 -1
- package/esm2022/components/toast/lib/components/toast-item/toast-item.component.mjs +24 -1
- package/esm2022/components/toast/lib/toast.service.mjs +13 -1
- package/esm2022/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +4 -1
- package/esm2022/components/toggle-button-group/lib/toggle-button-group.component.mjs +3 -1
- package/esm2022/components/tooltip/lib/tooltip.component.mjs +6 -2
- package/esm2022/components/tooltip/lib/tooltip.directive.mjs +16 -3
- package/esm2022/components/wizard/lib/components/wizard-step/wizard-step.component.mjs +18 -1
- package/esm2022/components/wizard/lib/wizard.component.mjs +22 -4
- package/esm2022/lib/controllers/disabled.controller.mjs +9 -1
- package/esm2022/lib/controllers/readonly.controller.mjs +3 -1
- package/esm2022/lib/directives/click-outside.directive.mjs +2 -1
- package/esm2022/lib/services/window-ref.mjs +22 -4
- package/esm2022/theming/lib/helpers/prefers-dark-theme.mjs +1 -1
- package/esm2022/theming/lib/theming.service.mjs +3 -1
- package/esm2022/utils/lib/helpers/queue.mjs +24 -14
- package/fesm2022/odx-angular-cdk-checkbox-control.mjs +19 -1
- package/fesm2022/odx-angular-cdk-checkbox-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs +3 -0
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-expandable.mjs +13 -6
- package/fesm2022/odx-angular-cdk-expandable.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-option-control.mjs +2 -0
- package/fesm2022/odx-angular-cdk-option-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-radio-group-control.mjs +20 -0
- package/fesm2022/odx-angular-cdk-radio-group-control.mjs.map +1 -1
- package/fesm2022/odx-angular-components-accordion.mjs +8 -3
- package/fesm2022/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2022/odx-angular-components-action-group.mjs +3 -0
- package/fesm2022/odx-angular-components-action-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-area-header.mjs +2 -1
- package/fesm2022/odx-angular-components-area-header.mjs.map +1 -1
- package/fesm2022/odx-angular-components-autocomplete.mjs +19 -4
- package/fesm2022/odx-angular-components-autocomplete.mjs.map +1 -1
- package/fesm2022/odx-angular-components-avatar.mjs +6 -2
- package/fesm2022/odx-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-badge.mjs +24 -4
- package/fesm2022/odx-angular-components-badge.mjs.map +1 -1
- package/fesm2022/odx-angular-components-bar.mjs +6 -0
- package/fesm2022/odx-angular-components-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-button-group.mjs +12 -0
- package/fesm2022/odx-angular-components-button-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-button.mjs +9 -1
- package/fesm2022/odx-angular-components-button.mjs.map +1 -1
- package/fesm2022/odx-angular-components-calendar.mjs +63 -1
- package/fesm2022/odx-angular-components-calendar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-card.mjs +36 -0
- package/fesm2022/odx-angular-components-card.mjs.map +1 -1
- package/fesm2022/odx-angular-components-checkbox.mjs +9 -2
- package/fesm2022/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2022/odx-angular-components-chip.mjs +14 -2
- package/fesm2022/odx-angular-components-chip.mjs.map +1 -1
- package/fesm2022/odx-angular-components-circular-progress.mjs +15 -2
- package/fesm2022/odx-angular-components-circular-progress.mjs.map +1 -1
- package/fesm2022/odx-angular-components-datepicker.mjs +35 -2
- package/fesm2022/odx-angular-components-datepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-daterangepicker.mjs +15 -9
- package/fesm2022/odx-angular-components-daterangepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-dropdown.mjs +32 -8
- package/fesm2022/odx-angular-components-dropdown.mjs.map +1 -1
- package/fesm2022/odx-angular-components-error-page.mjs +2 -0
- package/fesm2022/odx-angular-components-error-page.mjs.map +1 -1
- package/fesm2022/odx-angular-components-footer.mjs +7 -4
- package/fesm2022/odx-angular-components-footer.mjs.map +1 -1
- package/fesm2022/odx-angular-components-form-field.mjs +62 -13
- package/fesm2022/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2022/odx-angular-components-header-navigation.mjs.map +1 -1
- package/fesm2022/odx-angular-components-icon.mjs +15 -3
- package/fesm2022/odx-angular-components-icon.mjs.map +1 -1
- package/fesm2022/odx-angular-components-inline-message.mjs +5 -1
- package/fesm2022/odx-angular-components-inline-message.mjs.map +1 -1
- package/fesm2022/odx-angular-components-list.mjs +12 -1
- package/fesm2022/odx-angular-components-list.mjs.map +1 -1
- package/fesm2022/odx-angular-components-loading-spinner.mjs +10 -0
- package/fesm2022/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2022/odx-angular-components-modal.mjs +110 -25
- package/fesm2022/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2022/odx-angular-components-notification.mjs +25 -26
- package/fesm2022/odx-angular-components-notification.mjs.map +1 -1
- package/fesm2022/odx-angular-components-paginator.mjs +50 -0
- package/fesm2022/odx-angular-components-paginator.mjs.map +1 -1
- package/fesm2022/odx-angular-components-progress.mjs +6 -1
- package/fesm2022/odx-angular-components-progress.mjs.map +1 -1
- package/fesm2022/odx-angular-components-radio-group.mjs +8 -0
- package/fesm2022/odx-angular-components-radio-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-rail-navigation.mjs +16 -2
- package/fesm2022/odx-angular-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/odx-angular-components-rich-list.mjs +6 -5
- package/fesm2022/odx-angular-components-rich-list.mjs.map +1 -1
- package/fesm2022/odx-angular-components-select.mjs +11 -1
- package/fesm2022/odx-angular-components-select.mjs.map +1 -1
- package/fesm2022/odx-angular-components-slider.mjs +6 -3
- package/fesm2022/odx-angular-components-slider.mjs.map +1 -1
- package/fesm2022/odx-angular-components-spinbox.mjs +9 -0
- package/fesm2022/odx-angular-components-spinbox.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tab-bar.mjs +4 -1
- package/fesm2022/odx-angular-components-tab-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-table.mjs +28 -1
- package/fesm2022/odx-angular-components-table.mjs.map +1 -1
- package/fesm2022/odx-angular-components-timepicker.mjs +24 -11
- package/fesm2022/odx-angular-components-timepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toast.mjs +54 -0
- package/fesm2022/odx-angular-components-toast.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toggle-button-group.mjs +5 -0
- package/fesm2022/odx-angular-components-toggle-button-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tooltip.mjs +20 -3
- package/fesm2022/odx-angular-components-tooltip.mjs.map +1 -1
- package/fesm2022/odx-angular-components-wizard.mjs +38 -3
- package/fesm2022/odx-angular-components-wizard.mjs.map +1 -1
- package/fesm2022/odx-angular-theming.mjs +2 -0
- package/fesm2022/odx-angular-theming.mjs.map +1 -1
- package/fesm2022/odx-angular-utils.mjs +23 -13
- package/fesm2022/odx-angular-utils.mjs.map +1 -1
- package/fesm2022/odx-angular.mjs +32 -3
- package/fesm2022/odx-angular.mjs.map +1 -1
- package/lib/controllers/disabled.controller.d.ts +8 -0
- package/lib/controllers/readonly.controller.d.ts +2 -0
- package/lib/directives/click-outside.directive.d.ts +1 -0
- package/lib/services/window-ref.d.ts +21 -3
- package/package.json +1 -1
- package/theming/lib/theming.service.d.ts +2 -0
- package/utils/lib/helpers/queue.d.ts +23 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-paginator.mjs","sources":["../../../../libs/angular/components/paginator/src/lib/paginator.config.ts","../../../../libs/angular/components/paginator/src/lib/paginator.component.ts","../../../../libs/angular/components/paginator/src/lib/paginator.component.html","../../../../libs/angular/components/paginator/src/lib/paginator.module.ts","../../../../libs/angular/components/paginator/src/odx-angular-components-paginator.ts"],"sourcesContent":["import { DynamicTextContent } from '@odx/angular/cdk/dynamic-view';\nimport { createConfigTokens } from '@odx/angular/utils';\nimport { GetRangeContentFn, GetSummaryContentFn } from './models';\n\nexport interface PaginatorConfig {\n /**\n * Function to generate summary content for paginator, displaying indices and total length.\n * @param startItemIndex The starting index of the current page.\n * @param endItemIndex The ending index of the current page.\n * @param length Total number of items in the dataset.\n * @returns DynamicTextContent for summary display.\n */\n getSummaryContent: GetSummaryContentFn;\n\n /**\n * Function to generate range content for paginator, displaying the current page index and total pages.\n * @param pageIndex The index of the current page.\n * @param totalPages Total number of pages.\n * @returns DynamicTextContent for range display.\n */\n getRangeContent: GetRangeContentFn;\n\n /**\n * Default paginator page size\n * @default 10\n */\n pageSize: number;\n}\n\n/**\n * Generates summary content for display in the paginator.\n * @param startItemIndex Start index of the items on the current page.\n * @param endItemIndex End index of the items on the current page.\n * @param length Total number of items available.\n * @returns Formatted summary as dynamic HTML content.\n */\nconst getSummaryContent: GetSummaryContentFn = (startItemIndex: number, endItemIndex: number, length: number): DynamicTextContent => {\n return `\n <strong>${startItemIndex}</strong>\n to <strong>${endItemIndex}</strong>\n of <strong>${length}</strong>\n `;\n};\n\n/**\n * Generates range content for display in the paginator.\n * @param pageIndex Current page index.\n * @param totalPages Total number of pages available.\n * @returns Formatted range as dynamic HTML content.\n */\nconst getRangeContent: GetRangeContentFn = (pageIndex: number, totalPages: number): DynamicTextContent => {\n return `\n Page <strong>${pageIndex + 1}</strong>\n of <strong>${totalPages}</strong>\n `;\n};\n\n/**\n * Utility for creating and retrieving configuration tokens for the Paginator.\n * This facilitates dependency injection of configuration in Angular applications.\n *\n * @example\n * ```ts\n * // In module providers:\n * providers: [\n * providePaginatorConfig({\n * pageSize: 20,\n * getSummaryContent: (startItemIndex: number, endItemIndex: number, length: number) => `...`\n * }),\n * ]\n * ```\n */\nexport const { PaginatorConfig, PaginatorDefaultConfig, injectPaginatorConfig, providePaginatorConfig } = createConfigTokens(\n 'Paginator',\n '@odx/angular/components/paginator',\n {\n getSummaryContent,\n getRangeContent,\n pageSize: 10,\n },\n);\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { DynamicTextContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent, ButtonSize } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { PageChangeEvent } from './interfaces';\nimport { GetRangeContentFn, GetSummaryContentFn } from './models';\nimport { injectPaginatorConfig } from './paginator.config';\n\n/**\n * Paginator component for navigating between pages of content in a dataset.\n * It provides configurable options for page size, total content length, and navigational controls,\n * and emits an event when the page is changed.\n */\n@CSSComponent('paginator')\n@Component({\n standalone: true,\n selector: 'odx-paginator',\n imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, DynamicViewDirective],\n providers: [DisabledController.connect()],\n templateUrl: './paginator.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.is-disabled]': 'isDisabled',\n },\n})\nexport class PaginatorComponent {\n private readonly disabledController = DisabledController.inject();\n\n private readonly config = injectPaginatorConfig();\n\n private _pageIndex = 0;\n private _pageSize = this.config.pageSize;\n private _length = 0;\n\n protected buttonSize = ButtonSize.SMALL;\n\n public readonly element = injectElement();\n\n /**\n * Function to generate summary content for display, such as \"Items 1-10 of 100\".\n */\n @Input()\n public getSummaryContentFn?: GetSummaryContentFn | null = null;\n\n /**\n * Function to generate range content for display, such as \"Page 1 of 10\".\n */\n @Input()\n public getRangeContentFn?: GetRangeContentFn | null = null;\n\n /**\n * Determines whether the summary content is displayed.\n */\n @Input()\n public showSummary = true;\n\n /**\n * Determines whether buttons for navigating to the first and last pages are displayed.\n */\n @Input()\n public showFirstLastButtons = true;\n\n /**\n * The current page index. Setter ensures the page index is non-negative.\n */\n @Input()\n public set pageIndex(value: number) {\n if (value >= 0) this._pageIndex = value;\n }\n\n /**\n * Gets the current page index, returns -1 if length is zero.\n */\n public get pageIndex(): number {\n return this._length ? this._pageIndex : -1;\n }\n\n /**\n * The number of items per page. Setter ensures the page size is positive.\n */\n @Input()\n public set pageSize(value: number) {\n if (value > 0) this._pageSize = value;\n }\n\n /**\n * Gets the number of items per page.\n */\n public get pageSize(): number {\n return this._pageSize;\n }\n\n /**\n * The total number of items. Setter ensures the length is non-negative.\n */\n @Input()\n public set length(value: number) {\n if (value >= 0) this._length = value;\n }\n\n /**\n * Gets the total number of items.\n */\n public get length(): number {\n return this._length;\n }\n\n /**\n * Event emitted when the page index changes, providing details of the new page context.\n */\n @Output()\n public pageChanged = new EventEmitter<PageChangeEvent>();\n\n /**\n * Determines whether pagination controls are disabled.\n */\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Default function to generate summary content if no function is provided.\n */\n public get defaultGetSummaryContentFn(): GetSummaryContentFn {\n return this.config.getSummaryContent;\n }\n\n /**\n * Default function to generate range content if no function is provided.\n */\n public get defaultGetRangeContentFn(): GetRangeContentFn {\n return this.config.getRangeContent;\n }\n\n /**\n * Computes and returns the dynamic summary content.\n */\n public get summaryContent(): DynamicTextContent {\n const fn = this.getSummaryContentFn ?? this.defaultGetSummaryContentFn;\n return fn(this.startItemIndex + 1, this.endItemIndex, this.length);\n }\n\n /**\n * Computes and returns the dynamic range content.\n */\n public get rangeContent(): DynamicTextContent {\n const fn = this.getRangeContentFn ?? this.defaultGetRangeContentFn;\n return fn(this.pageIndex, this.totalPages);\n }\n\n /**\n * Navigates to the first page.\n */\n public firstPage(): void {\n this.pageChange(0);\n }\n\n /**\n * Navigates to the previous page.\n */\n public previousPage(): void {\n this.pageChange(this._pageIndex - 1);\n }\n\n /**\n * Navigates to the next page.\n */\n public nextPage(): void {\n this.pageChange(this._pageIndex + 1);\n }\n\n /**\n * Navigates to the last page.\n */\n public lastPage(): void {\n this.pageChange(this.totalPages - 1);\n }\n\n /**\n * Determines whether the current page is the first page.\n */\n public get isFirstPage(): boolean {\n return this._pageIndex === 0;\n }\n\n /**\n * Determines whether the current page is the last page.\n */\n public get isLastPage(): boolean {\n return this._pageIndex === this.totalPages - 1;\n }\n\n /**\n * Determines whether the previous button is disabled.\n */\n public get isPreviousDisabled(): boolean {\n return this.isFirstPage || !this._length;\n }\n\n /**\n * Determines whether the next button is disabled.\n */\n public get isNextDisabled(): boolean {\n return this.isLastPage || !this._length;\n }\n\n /**\n * Gets the total number of pages.\n */\n public get totalPages(): number {\n return Math.ceil(this._length / this._pageSize);\n }\n\n /**\n * Gets the index of the first item on the current page.\n */\n public get startItemIndex(): number {\n return this._length ? this._pageIndex * this._pageSize : -1;\n }\n\n /**\n * Gets the index of the last item on the current page.\n */\n public get endItemIndex(): number {\n return Math.min(this.startItemIndex + this._pageSize, this._length);\n }\n\n /**\n * Navigates to the specified page index.\n */\n public pageChange(pageIndex: number): void {\n if (pageIndex < 0) return;\n\n this._pageIndex = pageIndex;\n\n this.pageChanged.emit({\n pageIndex: this._pageIndex,\n length: this._length,\n pageSize: this._pageSize,\n });\n }\n}\n","<div *ngIf=\"showSummary\" class=\"odx-paginator__summary\">\n <ng-template [odxDynamicView]=\"summaryContent\"></ng-template>\n</div>\n\n<div class=\"odx-paginator__navigation\">\n <odx-action-group>\n <button\n *ngIf=\"showFirstLastButtons\"\n odxButton\n [size]=\"buttonSize\"\n class=\"odx-paginator__navigation_first\"\n (click)=\"firstPage()\"\n [disabled]=\"isPreviousDisabled\"\n >\n <odx-icon name=\"chevron-left-end\" iconSet=\"core\"></odx-icon>\n </button>\n\n <button odxButton [size]=\"buttonSize\" class=\"odx-paginator__navigation_previous\" (click)=\"previousPage()\" [disabled]=\"isPreviousDisabled\">\n <odx-icon name=\"chevron-left\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n\n <div class=\"odx-paginator__range\">\n <ng-template [odxDynamicView]=\"rangeContent\"></ng-template>\n </div>\n\n <odx-action-group>\n <button odxButton [size]=\"buttonSize\" class=\"odx-paginator__navigation_next\" (click)=\"nextPage()\" [disabled]=\"isNextDisabled\">\n <odx-icon name=\"chevron-right\" iconSet=\"core\"></odx-icon>\n </button>\n\n <button *ngIf=\"showFirstLastButtons\" [size]=\"buttonSize\" odxButton class=\"odx-paginator__navigation_last\" (click)=\"lastPage()\" [disabled]=\"isNextDisabled\">\n <odx-icon name=\"chevron-right-end\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n","import { NgModule } from '@angular/core';\nimport { PaginatorComponent } from './paginator.component';\n\nconst modules = [PaginatorComponent];\n\n@NgModule({\n imports: modules,\n exports: [...modules],\n})\nexport class PaginatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA;;;;;;AAMG;AACH,MAAM,iBAAiB,GAAwB,CAAC,cAAsB,EAAE,YAAoB,EAAE,MAAc,KAAwB;IAClI,OAAO,CAAA;cACK,cAAc,CAAA;iBACX,YAAY,CAAA;iBACZ,MAAM,CAAA;GACpB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;AAKG;AACH,MAAM,eAAe,GAAsB,CAAC,SAAiB,EAAE,UAAkB,KAAwB;IACvG,OAAO,CAAA;AACU,iBAAA,EAAA,SAAS,GAAG,CAAC,CAAA;iBACf,UAAU,CAAA;GACxB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;;AAcG;AACU,MAAA,EAAE,eAAe,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,GAAG,kBAAkB,CAC1H,WAAW,EACX,mCAAmC,EACnC;IACE,iBAAiB;IACjB,eAAe;AACf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EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHjB,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGL,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACtB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-paginator.mjs","sources":["../../../../libs/angular/components/paginator/src/lib/paginator.config.ts","../../../../libs/angular/components/paginator/src/lib/paginator.component.ts","../../../../libs/angular/components/paginator/src/lib/paginator.component.html","../../../../libs/angular/components/paginator/src/lib/paginator.module.ts","../../../../libs/angular/components/paginator/src/odx-angular-components-paginator.ts"],"sourcesContent":["import { DynamicTextContent } from '@odx/angular/cdk/dynamic-view';\nimport { createConfigTokens } from '@odx/angular/utils';\nimport { GetRangeContentFn, GetSummaryContentFn } from './models';\n\nexport interface PaginatorConfig {\n /**\n * Function to generate summary content for paginator, displaying indices and total length.\n * @param startItemIndex The starting index of the current page.\n * @param endItemIndex The ending index of the current page.\n * @param length Total number of items in the dataset.\n * @returns DynamicTextContent for summary display.\n */\n getSummaryContent: GetSummaryContentFn;\n\n /**\n * Function to generate range content for paginator, displaying the current page index and total pages.\n * @param pageIndex The index of the current page.\n * @param totalPages Total number of pages.\n * @returns DynamicTextContent for range display.\n */\n getRangeContent: GetRangeContentFn;\n\n /**\n * Default paginator page size\n * @default 10\n */\n pageSize: number;\n}\n\n/**\n * Generates summary content for display in the paginator.\n * @param startItemIndex Start index of the items on the current page.\n * @param endItemIndex End index of the items on the current page.\n * @param length Total number of items available.\n * @returns Formatted summary as dynamic HTML content.\n */\nconst getSummaryContent: GetSummaryContentFn = (startItemIndex: number, endItemIndex: number, length: number): DynamicTextContent => {\n return `\n <strong>${startItemIndex}</strong>\n to <strong>${endItemIndex}</strong>\n of <strong>${length}</strong>\n `;\n};\n\n/**\n * Generates range content for display in the paginator.\n * @param pageIndex Current page index.\n * @param totalPages Total number of pages available.\n * @returns Formatted range as dynamic HTML content.\n */\nconst getRangeContent: GetRangeContentFn = (pageIndex: number, totalPages: number): DynamicTextContent => {\n return `\n Page <strong>${pageIndex + 1}</strong>\n of <strong>${totalPages}</strong>\n `;\n};\n\n/**\n * Utility for creating and retrieving configuration tokens for the Paginator.\n * This facilitates dependency injection of configuration in Angular applications.\n *\n * @example\n * ```ts\n * // In module providers:\n * providers: [\n * providePaginatorConfig({\n * pageSize: 20,\n * getSummaryContent: (startItemIndex: number, endItemIndex: number, length: number) => `...`\n * }),\n * ]\n * ```\n */\nexport const { PaginatorConfig, PaginatorDefaultConfig, injectPaginatorConfig, providePaginatorConfig } = createConfigTokens(\n 'Paginator',\n '@odx/angular/components/paginator',\n {\n getSummaryContent,\n getRangeContent,\n pageSize: 10,\n },\n);\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { DynamicTextContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent, ButtonSize } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { PageChangeEvent } from './interfaces';\nimport { GetRangeContentFn, GetSummaryContentFn } from './models';\nimport { injectPaginatorConfig } from './paginator.config';\n\n/**\n * Paginator component for navigating between pages of content in a dataset.\n * It provides configurable options for page size, total content length, and navigational controls,\n * and emits an event when the page is changed.\n */\n@CSSComponent('paginator')\n@Component({\n standalone: true,\n selector: 'odx-paginator',\n imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, DynamicViewDirective],\n providers: [DisabledController.connect()],\n templateUrl: './paginator.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.is-disabled]': 'isDisabled',\n },\n})\nexport class PaginatorComponent {\n private readonly disabledController = DisabledController.inject();\n\n private readonly config = injectPaginatorConfig();\n\n private _pageIndex = 0;\n private _pageSize = this.config.pageSize;\n private _length = 0;\n\n protected buttonSize = ButtonSize.SMALL;\n\n public readonly element = injectElement();\n\n /**\n * Function to generate summary content for display, such as \"Items 1-10 of 100\".\n *\n * @type {GetSummaryContentFn | null}\n * @default null\n */\n @Input()\n public getSummaryContentFn?: GetSummaryContentFn | null = null;\n\n /**\n * Function to generate range content for display, such as \"Page 1 of 10\".\n *\n * @type {GetRangeContentFn | null}\n * @default null\n */\n @Input()\n public getRangeContentFn?: GetRangeContentFn | null = null;\n\n /**\n * Determines whether the summary content is displayed.\n *\n * @type {boolean}\n * @default true\n */\n @Input()\n public showSummary = true;\n\n /**\n * Determines whether buttons for navigating to the first and last pages are displayed.\n *\n * @type {boolean}\n * @default true\n */\n @Input()\n public showFirstLastButtons = true;\n\n /**\n * The current page index. Setter ensures the page index is non-negative.\n *\n * @param {number} value - The new page index.\n */\n @Input()\n public set pageIndex(value: number) {\n if (value >= 0) this._pageIndex = value;\n }\n\n /**\n * Gets the current page index, returns -1 if length is zero.\n *\n * @returns {number}\n */\n public get pageIndex(): number {\n return this._length ? this._pageIndex : -1;\n }\n\n /**\n * The number of items per page. Setter ensures the page size is positive.\n *\n * @param {number} value - The new page size.\n */\n @Input()\n public set pageSize(value: number) {\n if (value > 0) this._pageSize = value;\n }\n\n /**\n * Gets the number of items per page.\n *\n * @returns {number}\n */\n public get pageSize(): number {\n return this._pageSize;\n }\n\n /**\n * The total number of items. Setter ensures the length is non-negative.\n *\n * @param {number} value - The new total number of items.\n */\n @Input()\n public set length(value: number) {\n if (value >= 0) this._length = value;\n }\n\n /**\n * Gets the total number of items.\n *\n * @returns {number}\n */\n public get length(): number {\n return this._length;\n }\n\n /**\n * Event emitted when the page index changes, providing details of the new page context.\n *\n * @emits {PageChangeEvent}\n */\n @Output()\n public pageChanged = new EventEmitter<PageChangeEvent>();\n\n /**\n * Determines whether pagination controls are disabled.\n *\n * @returns {boolean}\n */\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Default function to generate summary content if no function is provided.\n *\n * @returns {GetSummaryContentFn}\n */\n public get defaultGetSummaryContentFn(): GetSummaryContentFn {\n return this.config.getSummaryContent;\n }\n\n /**\n * Default function to generate range content if no function is provided.\n *\n * @returns {GetRangeContentFn}\n */\n public get defaultGetRangeContentFn(): GetRangeContentFn {\n return this.config.getRangeContent;\n }\n\n /**\n * Computes and returns the dynamic summary content.\n *\n * @returns {DynamicTextContent}\n */\n public get summaryContent(): DynamicTextContent {\n const fn = this.getSummaryContentFn ?? this.defaultGetSummaryContentFn;\n return fn(this.startItemIndex + 1, this.endItemIndex, this.length);\n }\n\n /**\n * Computes and returns the dynamic range content.\n *\n * @returns {DynamicTextContent}\n */\n public get rangeContent(): DynamicTextContent {\n const fn = this.getRangeContentFn ?? this.defaultGetRangeContentFn;\n return fn(this.pageIndex, this.totalPages);\n }\n\n /**\n * Navigates to the first page.\n */\n public firstPage(): void {\n this.pageChange(0);\n }\n\n /**\n * Navigates to the previous page.\n */\n public previousPage(): void {\n this.pageChange(this._pageIndex - 1);\n }\n\n /**\n * Navigates to the next page.\n */\n public nextPage(): void {\n this.pageChange(this._pageIndex + 1);\n }\n\n /**\n * Navigates to the last page.\n */\n public lastPage(): void {\n this.pageChange(this.totalPages - 1);\n }\n\n /**\n * Determines whether the current page is the first page.\n *\n * @returns {boolean}\n */\n public get isFirstPage(): boolean {\n return this._pageIndex === 0;\n }\n\n /**\n * Determines whether the current page is the last page.\n *\n * @returns {boolean}\n */\n public get isLastPage(): boolean {\n return this._pageIndex === this.totalPages - 1;\n }\n\n /**\n * Determines whether the previous button is disabled.\n *\n * @returns {boolean}\n */\n public get isPreviousDisabled(): boolean {\n return this.isFirstPage || !this._length;\n }\n\n /**\n * Determines whether the next button is disabled.\n *\n * @returns {boolean}\n */\n public get isNextDisabled(): boolean {\n return this.isLastPage || !this._length;\n }\n\n /**\n * Gets the total number of pages.\n *\n * @returns {number}\n */\n public get totalPages(): number {\n return Math.ceil(this._length / this._pageSize);\n }\n\n /**\n * Gets the index of the first item on the current page.\n *\n * @returns {number}\n */\n public get startItemIndex(): number {\n return this._length ? this._pageIndex * this._pageSize : -1;\n }\n\n /**\n * Gets the index of the last item on the current page.\n *\n * @returns {number}\n */\n public get endItemIndex(): number {\n return Math.min(this.startItemIndex + this._pageSize, this._length);\n }\n\n /**\n * Navigates to the specified page index.\n */\n public pageChange(pageIndex: number): void {\n if (pageIndex < 0) return;\n\n this._pageIndex = pageIndex;\n\n this.pageChanged.emit({\n pageIndex: this._pageIndex,\n length: this._length,\n pageSize: this._pageSize,\n });\n }\n}\n","<div *ngIf=\"showSummary\" class=\"odx-paginator__summary\">\n <ng-template [odxDynamicView]=\"summaryContent\"></ng-template>\n</div>\n\n<div class=\"odx-paginator__navigation\">\n <odx-action-group>\n <button\n *ngIf=\"showFirstLastButtons\"\n odxButton\n [size]=\"buttonSize\"\n class=\"odx-paginator__navigation_first\"\n (click)=\"firstPage()\"\n [disabled]=\"isPreviousDisabled\"\n >\n <odx-icon name=\"chevron-left-end\" iconSet=\"core\"></odx-icon>\n </button>\n\n <button odxButton [size]=\"buttonSize\" class=\"odx-paginator__navigation_previous\" (click)=\"previousPage()\" [disabled]=\"isPreviousDisabled\">\n <odx-icon name=\"chevron-left\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n\n <div class=\"odx-paginator__range\">\n <ng-template [odxDynamicView]=\"rangeContent\"></ng-template>\n </div>\n\n <odx-action-group>\n <button odxButton [size]=\"buttonSize\" class=\"odx-paginator__navigation_next\" (click)=\"nextPage()\" [disabled]=\"isNextDisabled\">\n <odx-icon name=\"chevron-right\" iconSet=\"core\"></odx-icon>\n </button>\n\n <button *ngIf=\"showFirstLastButtons\" [size]=\"buttonSize\" odxButton class=\"odx-paginator__navigation_last\" (click)=\"lastPage()\" [disabled]=\"isNextDisabled\">\n <odx-icon name=\"chevron-right-end\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n","import { NgModule } from '@angular/core';\nimport { PaginatorComponent } from './paginator.component';\n\nconst modules = [PaginatorComponent];\n\n@NgModule({\n imports: modules,\n exports: [...modules],\n})\nexport class PaginatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA6BA;;;;;;AAMG;AACH,MAAM,iBAAiB,GAAwB,CAAC,cAAsB,EAAE,YAAoB,EAAE,MAAc,KAAwB;IAClI,OAAO,CAAA;cACK,cAAc,CAAA;iBACX,YAAY,CAAA;iBACZ,MAAM,CAAA;GACpB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;AAKG;AACH,MAAM,eAAe,GAAsB,CAAC,SAAiB,EAAE,UAAkB,KAAwB;IACvG,OAAO,CAAA;AACU,iBAAA,EAAA,SAAS,GAAG,CAAC,CAAA;iBACf,UAAU,CAAA;GACxB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;;;;;;;;AAcG;AACU,MAAA,EAAE,eAAe,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,GAAG,kBAAkB,CAC1H,WAAW,EACX,mCAAmC,EACnC;IACE,iBAAiB;IACjB,eAAe;AACf,IAAA,QAAQ,EAAE,EAAE;AACb,CAAA;;ACnEH;;;;AAIG;AAcU,IAAA,kBAAkB,GAAxB,MAAM,kBAAkB,CAAA;AAAxB,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC;QAEjD,IAAM,CAAA,MAAA,GAAG,qBAAqB,EAAE,CAAC;QAE1C,IAAU,CAAA,UAAA,GAAG,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AA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACtB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -15,6 +15,8 @@ let ProgressComponent = class ProgressComponent {
|
|
|
15
15
|
/**
|
|
16
16
|
* Indicates if the progress bar is in indeterminate state, which is typically used for loading processes
|
|
17
17
|
* where the completion percentage is unknown.
|
|
18
|
+
*
|
|
19
|
+
* @type {boolean}
|
|
18
20
|
*/
|
|
19
21
|
this.indeterminate = false;
|
|
20
22
|
}
|
|
@@ -26,7 +28,8 @@ let ProgressComponent = class ProgressComponent {
|
|
|
26
28
|
}
|
|
27
29
|
/**
|
|
28
30
|
* Sets the current value of the progress bar. Accepts a number between 0 and 100 or -1 for indeterminate.
|
|
29
|
-
*
|
|
31
|
+
*
|
|
32
|
+
* @param {number} value - The new value of the progress bar. -1 sets the bar to indeterminate.
|
|
30
33
|
*/
|
|
31
34
|
set value(value) {
|
|
32
35
|
if (value <= 100 && value >= -1) {
|
|
@@ -36,6 +39,8 @@ let ProgressComponent = class ProgressComponent {
|
|
|
36
39
|
}
|
|
37
40
|
/**
|
|
38
41
|
* Gets the current value of the progress bar.
|
|
42
|
+
*
|
|
43
|
+
* @returns {number}
|
|
39
44
|
*/
|
|
40
45
|
get value() {
|
|
41
46
|
return this._value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-progress.mjs","sources":["../../../../libs/angular/components/progress/src/lib/progress.component.ts","../../../../libs/angular/components/progress/src/lib/progress.component.html","../../../../libs/angular/components/progress/src/odx-angular-components-progress.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, numberAttribute, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Progress component for visually indicating the completion level of a task or process.\n * The component can display definite progress or operate in an indeterminate mode to indicate ongoing activity.\n */\n@CSSComponent('progress')\n@Component({\n selector: 'odx-progress',\n templateUrl: './progress.component.html',\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.aria-valuenow]': 'ariaValueNow',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuemin]': '0',\n '[attr.role]': '\"meter\"',\n },\n})\nexport class ProgressComponent {\n private _value = 0;\n\n protected get ariaValueNow(): null | number {\n return this.indeterminate ? null : this.value;\n }\n\n protected get progressValue(): number {\n return this.indeterminate ? 1 : this.value / 100;\n }\n\n public readonly element = injectElement();\n\n /**\n * Indicates if the progress bar is in indeterminate state, which is typically used for loading processes\n * where the completion percentage is unknown.\n */\n @CSSModifier()\n public indeterminate = false;\n\n /**\n * Sets the current value of the progress bar. Accepts a number between 0 and 100 or -1 for indeterminate.\n * @param value The new value of the progress bar. -1 sets the bar to indeterminate.\n */\n @Input({ transform: numberAttribute })\n public set value(value: number) {\n if (value <= 100 && value >= -1) {\n this._value = value;\n this.indeterminate = value === -1;\n }\n }\n\n /**\n * Gets the current value of the progress bar.\n */\n public get value(): number {\n return this._value;\n }\n}\n","<div class=\"odx-progress__indicator\" style=\"transform: scaleX({{ progressValue }})\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIA;;;AAGG;AAeU,IAAA,iBAAiB,GAAvB,MAAM,iBAAiB,CAAA;AAAvB,IAAA,WAAA,GAAA;QACG,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;QAUH,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"odx-angular-components-progress.mjs","sources":["../../../../libs/angular/components/progress/src/lib/progress.component.ts","../../../../libs/angular/components/progress/src/lib/progress.component.html","../../../../libs/angular/components/progress/src/odx-angular-components-progress.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, numberAttribute, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Progress component for visually indicating the completion level of a task or process.\n * The component can display definite progress or operate in an indeterminate mode to indicate ongoing activity.\n */\n@CSSComponent('progress')\n@Component({\n selector: 'odx-progress',\n templateUrl: './progress.component.html',\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.aria-valuenow]': 'ariaValueNow',\n '[attr.aria-valuemax]': '100',\n '[attr.aria-valuemin]': '0',\n '[attr.role]': '\"meter\"',\n },\n})\nexport class ProgressComponent {\n private _value = 0;\n\n protected get ariaValueNow(): null | number {\n return this.indeterminate ? null : this.value;\n }\n\n protected get progressValue(): number {\n return this.indeterminate ? 1 : this.value / 100;\n }\n\n public readonly element = injectElement();\n\n /**\n * Indicates if the progress bar is in indeterminate state, which is typically used for loading processes\n * where the completion percentage is unknown.\n *\n * @type {boolean}\n */\n @CSSModifier()\n public indeterminate = false;\n\n /**\n * Sets the current value of the progress bar. Accepts a number between 0 and 100 or -1 for indeterminate.\n *\n * @param {number} value - The new value of the progress bar. -1 sets the bar to indeterminate.\n */\n @Input({ transform: numberAttribute })\n public set value(value: number) {\n if (value <= 100 && value >= -1) {\n this._value = value;\n this.indeterminate = value === -1;\n }\n }\n\n /**\n * Gets the current value of the progress bar.\n *\n * @returns {number}\n */\n public get value(): number {\n return this._value;\n }\n}\n","<div class=\"odx-progress__indicator\" style=\"transform: scaleX({{ progressValue }})\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIA;;;AAGG;AAeU,IAAA,iBAAiB,GAAvB,MAAM,iBAAiB,CAAA;AAAvB,IAAA,WAAA,GAAA;QACG,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;QAUH,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;;;AAKG;QAEI,IAAa,C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A,WAAW,EAAE;;AACe,CAAA,EAAA,iBAAA,CAAA,SAAA,EAAA,eAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AApBlB,iBAAiB,GAAA,UAAA,CAAA;IAd7B,YAAY,CAAC,UAAU,CAAC;AAcZ,CAAA,EAAA,iBAAiB,CA2C7B,CAAA;4FA3CY,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAb7B,SAAS;+BACE,cAAc,EAAA,UAAA,EAEZ,IAAI,EAAA,aAAA,EACD,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA;AACJ,wBAAA,sBAAsB,EAAE,cAAc;AACtC,wBAAA,sBAAsB,EAAE,KAAK;AAC7B,wBAAA,sBAAsB,EAAE,GAAG;AAC3B,wBAAA,aAAa,EAAE,SAAS;AACzB,qBAAA,EAAA,QAAA,EAAA,kGAAA,EAAA,CAAA;AAsBM,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,aAAa,MAQT,KAAK,EAAA,CAAA;sBADf,KAAK;uBAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAA;;;AEjDvC;;AAEG;;;;"}
|
|
@@ -12,6 +12,8 @@ import { injectElement } from '@odx/angular/utils';
|
|
|
12
12
|
* Represents a radio button component.
|
|
13
13
|
* @extends {RadioControlDirective<T>}
|
|
14
14
|
*
|
|
15
|
+
* @template T - The type of the radio button value.
|
|
16
|
+
*
|
|
15
17
|
* @remarks
|
|
16
18
|
* To add subtitle text to the radio button, use class `odx-radio-button__subtitle` in template's content.
|
|
17
19
|
*
|
|
@@ -60,7 +62,10 @@ var RadioGroupComponent_1;
|
|
|
60
62
|
* RadioGroupComponent manages a group of radio buttons, providing Angular form control integration
|
|
61
63
|
* and additional states like disabled and readonly. It supports both vertical and horizontal layouts.
|
|
62
64
|
*
|
|
65
|
+
* @template T - The type of the value handled by the radio group.
|
|
66
|
+
*
|
|
63
67
|
* The component extends the `RadioGroupControlDirective`, which provides the core functionality for managing.
|
|
68
|
+
*
|
|
64
69
|
* @see {RadioGroupControlDirective}
|
|
65
70
|
*/
|
|
66
71
|
let RadioGroupComponent = class RadioGroupComponent extends RadioGroupControlDirective {
|
|
@@ -70,6 +75,9 @@ let RadioGroupComponent = class RadioGroupComponent extends RadioGroupControlDir
|
|
|
70
75
|
/**
|
|
71
76
|
* Determines whether the radio buttons are arranged horizontally.
|
|
72
77
|
* When set to `true`, radio buttons are aligned side by side.
|
|
78
|
+
*
|
|
79
|
+
* @type {boolean}
|
|
80
|
+
* @default false
|
|
73
81
|
*/
|
|
74
82
|
this.horizontal = false;
|
|
75
83
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-radio-group.mjs","sources":["../../../../libs/angular/components/radio-group/src/lib/components/radio-button/radio-button.component.ts","../../../../libs/angular/components/radio-group/src/lib/components/radio-button/radio-button.component.html","../../../../libs/angular/components/radio-group/src/lib/radio-group.component.ts","../../../../libs/angular/components/radio-group/src/lib/radio-group.component.html","../../../../libs/angular/components/radio-group/src/lib/radio-group.module.ts","../../../../libs/angular/components/radio-group/src/odx-angular-components-radio-group.ts"],"sourcesContent":["import { ObserversModule } from '@angular/cdk/observers';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { RadioControlDirective } from '@odx/angular/cdk/radio-group-control';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents a radio button component.\n * @extends {RadioControlDirective<T>}\n *\n * @remarks\n * To add subtitle text to the radio button, use class `odx-radio-button__subtitle` in template's content.\n *\n * @example\n * ```html\n * <odx-radio-group>\n * <odx-radio-button [value]=\"'a'\" >\n * Radio button label\n * <span class=\"odx-radio-button__subtitle\">Subtitle text</span>\n * </odx-radio-button>\n * </odx-radio-group>\n * ```\n */\n@CSSComponent('radio-button')\n@Component({\n standalone: true,\n selector: 'odx-radio-button',\n templateUrl: './radio-button.component.html',\n imports: [ObserversModule],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n})\nexport class RadioButtonComponent<T = unknown> extends RadioControlDirective<T> implements AfterViewInit {\n @CSSModifier()\n protected withLabel = false;\n\n public readonly element = injectElement();\n\n @ViewChild('content')\n public contentElement!: ElementRef<HTMLDivElement>;\n\n public ngAfterViewInit(): void {\n this.onContentChange();\n }\n\n protected onContentChange() {\n this.withLabel = !!this.contentElement.nativeElement.textContent?.trim();\n }\n}\n","<label class=\"odx-radio-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.isRequired || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.isRequired\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <div class=\"odx-radio-button__indicator\"></div>\n <div class=\"odx-radio-button__content\" [cdkObserveContentDisabled]=\"disabledController?.disabled\" (cdkObserveContent)=\"onContentChange()\" #content>\n <ng-content></ng-content>\n <ng-content select=\".odx-radio-button__subtitle\" />\n </div>\n</label>\n","import { ChangeDetectionStrategy, Component, forwardRef, Input, ViewEncapsulation } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { RADIO_GROUP_CONTROL, RadioGroupControlDirective } from '@odx/angular/cdk/radio-group-control';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RadioGroupComponent manages a group of radio buttons, providing Angular form control integration\n * and additional states like disabled and readonly. It supports both vertical and horizontal layouts.\n *\n * The component extends the `RadioGroupControlDirective`, which provides the core functionality for managing.\n * @see {RadioGroupControlDirective}\n */\n@CSSComponent('radio-group')\n@Component({\n standalone: true,\n selector: 'odx-radio-group',\n templateUrl: 'radio-group.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: RADIO_GROUP_CONTROL,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: false,\n },\n DisabledController.connect(),\n ReadonlyController.connect(),\n ],\n})\nexport class RadioGroupComponent<T = unknown> extends RadioGroupControlDirective<T> {\n public readonly element = injectElement();\n\n /**\n * Determines whether the radio buttons are arranged horizontally.\n * When set to `true`, radio buttons are aligned side by side.\n */\n @CSSModifier()\n @Input()\n public horizontal = false;\n}\n","<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RadioButtonComponent } from './components';\nimport { RadioGroupComponent } from './radio-group.component';\n\nconst modules = [RadioGroupComponent, RadioButtonComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RadioGroupModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAOA
|
|
1
|
+
{"version":3,"file":"odx-angular-components-radio-group.mjs","sources":["../../../../libs/angular/components/radio-group/src/lib/components/radio-button/radio-button.component.ts","../../../../libs/angular/components/radio-group/src/lib/components/radio-button/radio-button.component.html","../../../../libs/angular/components/radio-group/src/lib/radio-group.component.ts","../../../../libs/angular/components/radio-group/src/lib/radio-group.component.html","../../../../libs/angular/components/radio-group/src/lib/radio-group.module.ts","../../../../libs/angular/components/radio-group/src/odx-angular-components-radio-group.ts"],"sourcesContent":["import { ObserversModule } from '@angular/cdk/observers';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { RadioControlDirective } from '@odx/angular/cdk/radio-group-control';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents a radio button component.\n * @extends {RadioControlDirective<T>}\n *\n * @template T - The type of the radio button value.\n *\n * @remarks\n * To add subtitle text to the radio button, use class `odx-radio-button__subtitle` in template's content.\n *\n * @example\n * ```html\n * <odx-radio-group>\n * <odx-radio-button [value]=\"'a'\" >\n * Radio button label\n * <span class=\"odx-radio-button__subtitle\">Subtitle text</span>\n * </odx-radio-button>\n * </odx-radio-group>\n * ```\n */\n@CSSComponent('radio-button')\n@Component({\n standalone: true,\n selector: 'odx-radio-button',\n templateUrl: './radio-button.component.html',\n imports: [ObserversModule],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n})\nexport class RadioButtonComponent<T = unknown> extends RadioControlDirective<T> implements AfterViewInit {\n @CSSModifier()\n protected withLabel = false;\n\n public readonly element = injectElement();\n\n /**\n * The reference to the content element of the radio button component.\n *\n * @type {ElementRef<HTMLDivElement>}\n */\n @ViewChild('content')\n public contentElement!: ElementRef<HTMLDivElement>;\n\n public ngAfterViewInit(): void {\n this.onContentChange();\n }\n\n protected onContentChange() {\n this.withLabel = !!this.contentElement.nativeElement.textContent?.trim();\n }\n}\n","<label class=\"odx-radio-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.isRequired || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.isRequired\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <div class=\"odx-radio-button__indicator\"></div>\n <div class=\"odx-radio-button__content\" [cdkObserveContentDisabled]=\"disabledController?.disabled\" (cdkObserveContent)=\"onContentChange()\" #content>\n <ng-content></ng-content>\n <ng-content select=\".odx-radio-button__subtitle\" />\n </div>\n</label>\n","import { ChangeDetectionStrategy, Component, forwardRef, Input, ViewEncapsulation } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { RADIO_GROUP_CONTROL, RadioGroupControlDirective } from '@odx/angular/cdk/radio-group-control';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RadioGroupComponent manages a group of radio buttons, providing Angular form control integration\n * and additional states like disabled and readonly. It supports both vertical and horizontal layouts.\n *\n * @template T - The type of the value handled by the radio group.\n *\n * The component extends the `RadioGroupControlDirective`, which provides the core functionality for managing.\n *\n * @see {RadioGroupControlDirective}\n */\n@CSSComponent('radio-group')\n@Component({\n standalone: true,\n selector: 'odx-radio-group',\n templateUrl: 'radio-group.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: RADIO_GROUP_CONTROL,\n useExisting: forwardRef(() => RadioGroupComponent),\n multi: false,\n },\n DisabledController.connect(),\n ReadonlyController.connect(),\n ],\n})\nexport class RadioGroupComponent<T = unknown> extends RadioGroupControlDirective<T> {\n public readonly element = injectElement();\n\n /**\n * Determines whether the radio buttons are arranged horizontally.\n * When set to `true`, radio buttons are aligned side by side.\n *\n * @type {boolean}\n * @default false\n */\n @CSSModifier()\n @Input()\n public horizontal = false;\n}\n","<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RadioButtonComponent } from './components';\nimport { RadioGroupComponent } from './radio-group.component';\n\nconst modules = [RadioGroupComponent, RadioButtonComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RadioGroupModule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U,CAAC,yBAAyB,CAAC;AAClD,4BAAA,KAAK,EAAE,KAAK;AACb,yBAAA;wBACD,kBAAkB,CAAC,OAAO,EAAE;wBAC5B,kBAAkB,CAAC,OAAO,EAAE;AAC7B,qBAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,CAAA;8BAcM,UAAU,EAAA,CAAA;sBADhB,KAAK;;;AEvCR,MAAM,OAAO,GAAG,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;MAM/C,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAhB,gBAAgB,EAAA,OAAA,EAAA,CANZ,mBAAmB,EAAE,oBAAoB,aAI9C,UAAU,EAJL,mBAAmB,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM7C,gBAAgB,EAAA,OAAA,EAAA,CANS,oBAAoB,EAI9C,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -24,10 +24,16 @@ let RailNavigationItemComponent = class RailNavigationItemComponent {
|
|
|
24
24
|
/**
|
|
25
25
|
* Indicates whether the navigation item is selected. This can be manually set or derived from router state.
|
|
26
26
|
* Uses booleanAttribute transformer for attribute binding.
|
|
27
|
+
*
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
* @default false
|
|
27
30
|
*/
|
|
28
31
|
this.isSelected = false;
|
|
29
32
|
/**
|
|
30
33
|
* Optional input to specify the icon set from which the icon should be taken.
|
|
34
|
+
*
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @default 'core'
|
|
31
37
|
*/
|
|
32
38
|
this.iconSet = 'core';
|
|
33
39
|
}
|
|
@@ -67,22 +73,30 @@ let RailNavigationComponent = class RailNavigationComponent {
|
|
|
67
73
|
this.element = injectElement();
|
|
68
74
|
/**
|
|
69
75
|
* Indicates whether the rail navigation is open. Uses booleanAttribute transformer for attribute binding.
|
|
76
|
+
*
|
|
77
|
+
* @type {boolean}
|
|
78
|
+
* @default true
|
|
70
79
|
*/
|
|
71
80
|
this.isOpen = true;
|
|
72
81
|
/**
|
|
73
82
|
* Specifies the visual variant of the rail navigation.
|
|
74
|
-
*
|
|
83
|
+
*
|
|
84
|
+
* @type {RailNavigationVariant}
|
|
85
|
+
* @default RailNavigationVariant.DEFAULT
|
|
75
86
|
*/
|
|
76
87
|
this.variant = RailNavigationVariant.DEFAULT;
|
|
77
88
|
/**
|
|
78
89
|
* Emits changes to the `isOpen` state, allowing for external reaction to state changes.
|
|
90
|
+
*
|
|
91
|
+
* @emits {boolean} - The new state of the rail navigation.
|
|
79
92
|
*/
|
|
80
93
|
this.isOpenChange = new EventEmitter();
|
|
81
94
|
}
|
|
82
95
|
/**
|
|
83
96
|
* Toggles the open state of the rail navigation. Optionally accepts a boolean to force the state to open or closed.
|
|
84
97
|
* Does not perform any action if the variant is set to BAR.
|
|
85
|
-
*
|
|
98
|
+
*
|
|
99
|
+
* @param {boolean | undefined} forceState - Optionally force the toggle to a specific state.
|
|
86
100
|
*/
|
|
87
101
|
toggle(forceState) {
|
|
88
102
|
if (this.variant === RailNavigationVariant.BAR)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-rail-navigation.mjs","sources":["../../../../libs/angular/components/rail-navigation/src/lib/components/rail-navigation-item/rail-navigation-item.component.ts","../../../../libs/angular/components/rail-navigation/src/lib/components/rail-navigation-item/rail-navigation-item.component.html","../../../../libs/angular/components/rail-navigation/src/lib/models/rail-navigation-variant.ts","../../../../libs/angular/components/rail-navigation/src/lib/rail-navigation.component.ts","../../../../libs/angular/components/rail-navigation/src/lib/rail-navigation.component.html","../../../../libs/angular/components/rail-navigation/src/lib/rail-navigation.module.ts","../../../../libs/angular/components/rail-navigation/src/odx-angular-components-rail-navigation.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, inject, Input, ViewEncapsulation } from '@angular/core';\nimport { RouterLinkActive } from '@angular/router';\nimport { WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RailNavigationItemComponent represents an individual navigation item within a rail navigation system.\n * This component can be used as either a link or a button and integrates with Angular's RouterLinkActive to\n * optionally highlight active navigation items.\n * Has host directives for disabled and tabindex states.\n *\n * @see {WithDisabledState}\n * @see {WithTabIndex}\n */\n@CSSComponent('rail-navigation-item')\n@Component({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'a[odxRailNavigationItem][iconName], button[odxRailNavigationItem][iconName]',\n templateUrl: './rail-navigation-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [IconComponent],\n hostDirectives: [WithDisabledState, WithTabIndex],\n host: {\n '[class.is-selected]': 'isSelected || routerLinkActive?.isActive',\n },\n})\nexport class RailNavigationItemComponent {\n protected readonly routerLinkActive = inject(RouterLinkActive, { optional: true });\n\n public readonly element = injectElement();\n\n /**\n * Indicates whether the navigation item is selected. This can be manually set or derived from router state.\n * Uses booleanAttribute transformer for attribute binding.\n */\n @Input({ transform: booleanAttribute })\n public isSelected = false;\n\n /**\n * The name of the icon to be displayed. This input is required.\n */\n @Input({ required: true })\n public iconName!: string;\n\n /**\n * Optional input to specify the icon set from which the icon should be taken.\n */\n @Input()\n public iconSet = 'core';\n}\n","<odx-icon [name]=\"iconName\" [iconSet]=\"iconSet\" size=\"large\"></odx-icon>\n<span class=\"odx-rail-navigation-item__container\">\n <ng-content></ng-content>\n</span>\n","export type RailNavigationVariant = (typeof RailNavigationVariant)[keyof typeof RailNavigationVariant];\n\nexport const RailNavigationVariant = {\n DEFAULT: 'default',\n BAR: 'bar',\n} as const;\n","import { booleanAttribute, ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { RailNavigationItemComponent } from './components/rail-navigation-item/rail-navigation-item.component';\nimport { RailNavigationVariant } from './models';\n\n/**\n * RailNavigationComponent provides a navigational sidebar that can toggle between open and closed states.\n * It supports different visual variants and can integrate individual navigation items\n * for complex navigation structures.\n */\n@CSSComponent('rail-navigation')\n@Component({\n standalone: true,\n selector: 'odx-rail-navigation',\n templateUrl: 'rail-navigation.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [RailNavigationItemComponent],\n host: {\n '[class.is-open]': 'isOpen',\n },\n})\nexport class RailNavigationComponent {\n public readonly element = injectElement();\n\n /**\n * Indicates whether the rail navigation is open. Uses booleanAttribute transformer for attribute binding.\n */\n @Input({ transform: booleanAttribute })\n public isOpen = true;\n\n /**\n * Specifies the visual variant of the rail navigation.\n * @see {RailNavigationVariant}\n */\n @CSSModifier()\n @Input()\n public variant: RailNavigationVariant = RailNavigationVariant.DEFAULT;\n\n /**\n * Emits changes to the `isOpen` state, allowing for external reaction to state changes.\n */\n @Output()\n public isOpenChange = new EventEmitter<boolean>();\n\n /**\n * Toggles the open state of the rail navigation. Optionally accepts a boolean to force the state to open or closed.\n * Does not perform any action if the variant is set to BAR.\n * @param forceState Optionally force the toggle to a specific state.\n */\n public toggle(forceState?: boolean): void {\n if (this.variant === RailNavigationVariant.BAR) return;\n this.isOpen = forceState ?? !this.isOpen;\n this.isOpenChange.emit(this.isOpen);\n }\n\n /**\n * Explicitly opens the rail navigation, setting `isOpen` to true.\n */\n public open(): void {\n this.toggle(true);\n }\n\n /**\n * Explicitly closes the rail navigation, setting `isOpen` to false.\n */\n public close(): void {\n this.toggle(false);\n }\n}\n","<nav class=\"odx-rail-navigation__content\">\n <ng-content selector=\"a[odxRailNavigationItem], button[odxRailNavigationItem]\"></ng-content>\n</nav>\n<button odxRailNavigationItem class=\"odx-rail-navigation__expand\" iconName=\"chevron-right\" (click)=\"toggle()\"></button>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RailNavigationItemComponent } from './components/rail-navigation-item/rail-navigation-item.component';\nimport { RailNavigationComponent } from './rail-navigation.component';\n\nconst modules = [RailNavigationComponent, RailNavigationItemComponent];\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RailNavigationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAOA;;;;;;;;AAQG;AAeU,IAAA,2BAA2B,GAAjC,MAAM,2BAA2B,CAAA;AAAjC,IAAA,WAAA,GAAA;QACc,IAAgB,CAAA,gBAAA,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAEnE,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;AAGG;QAEI,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAQ1B;;AAEG;QAEI,IAAO,CAAA,OAAA,GAAG,MAAM,CAAC;AACzB,KAAA;+GAvBY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,2BAA2B,EASlB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6EAAA,EAAA,MAAA,EAAA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;gBAS/B,OAAO,EAAA,CAAA;sBADb,KAAK;gBAOC,YAAY,EAAA,CAAA;sBADlB,MAAM;;;AEtCT,MAAM,OAAO,GAAG,CAAC,uBAAuB,EAAE,2BAA2B,CAAC,CAAC;MAK1D,oBAAoB,CAAA;+GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAApB,oBAAoB,EAAA,OAAA,EAAA,CALhB,uBAAuB,EAAE,2BAA2B,aAGzD,UAAU,EAHL,uBAAuB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;gHAKxD,oBAAoB,EAAA,OAAA,EAAA,CAHtB,OAAO,EACN,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-rail-navigation.mjs","sources":["../../../../libs/angular/components/rail-navigation/src/lib/components/rail-navigation-item/rail-navigation-item.component.ts","../../../../libs/angular/components/rail-navigation/src/lib/components/rail-navigation-item/rail-navigation-item.component.html","../../../../libs/angular/components/rail-navigation/src/lib/models/rail-navigation-variant.ts","../../../../libs/angular/components/rail-navigation/src/lib/rail-navigation.component.ts","../../../../libs/angular/components/rail-navigation/src/lib/rail-navigation.component.html","../../../../libs/angular/components/rail-navigation/src/lib/rail-navigation.module.ts","../../../../libs/angular/components/rail-navigation/src/odx-angular-components-rail-navigation.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, inject, Input, ViewEncapsulation } from '@angular/core';\nimport { RouterLinkActive } from '@angular/router';\nimport { WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RailNavigationItemComponent represents an individual navigation item within a rail navigation system.\n * This component can be used as either a link or a button and integrates with Angular's RouterLinkActive to\n * optionally highlight active navigation items.\n * Has host directives for disabled and tabindex states.\n *\n * @see {WithDisabledState}\n * @see {WithTabIndex}\n */\n@CSSComponent('rail-navigation-item')\n@Component({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'a[odxRailNavigationItem][iconName], button[odxRailNavigationItem][iconName]',\n templateUrl: './rail-navigation-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [IconComponent],\n hostDirectives: [WithDisabledState, WithTabIndex],\n host: {\n '[class.is-selected]': 'isSelected || routerLinkActive?.isActive',\n },\n})\nexport class RailNavigationItemComponent {\n protected readonly routerLinkActive = inject(RouterLinkActive, { optional: true });\n\n public readonly element = injectElement();\n\n /**\n * Indicates whether the navigation item is selected. This can be manually set or derived from router state.\n * Uses booleanAttribute transformer for attribute binding.\n *\n * @type {boolean}\n * @default false\n */\n @Input({ transform: booleanAttribute })\n public isSelected = false;\n\n /**\n * The name of the icon to be displayed. This input is required.\n *\n * @type {string}\n * @required\n */\n @Input({ required: true })\n public iconName!: string;\n\n /**\n * Optional input to specify the icon set from which the icon should be taken.\n *\n * @type {string}\n * @default 'core'\n */\n @Input()\n public iconSet = 'core';\n}\n","<odx-icon [name]=\"iconName\" [iconSet]=\"iconSet\" size=\"large\"></odx-icon>\n<span class=\"odx-rail-navigation-item__container\">\n <ng-content></ng-content>\n</span>\n","export type RailNavigationVariant = (typeof RailNavigationVariant)[keyof typeof RailNavigationVariant];\n\nexport const RailNavigationVariant = {\n DEFAULT: 'default',\n BAR: 'bar',\n} as const;\n","import { booleanAttribute, ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { RailNavigationItemComponent } from './components/rail-navigation-item/rail-navigation-item.component';\nimport { RailNavigationVariant } from './models';\n\n/**\n * RailNavigationComponent provides a navigational sidebar that can toggle between open and closed states.\n * It supports different visual variants and can integrate individual navigation items\n * for complex navigation structures.\n */\n@CSSComponent('rail-navigation')\n@Component({\n standalone: true,\n selector: 'odx-rail-navigation',\n templateUrl: 'rail-navigation.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [RailNavigationItemComponent],\n host: {\n '[class.is-open]': 'isOpen',\n },\n})\nexport class RailNavigationComponent {\n public readonly element = injectElement();\n\n /**\n * Indicates whether the rail navigation is open. Uses booleanAttribute transformer for attribute binding.\n *\n * @type {boolean}\n * @default true\n */\n @Input({ transform: booleanAttribute })\n public isOpen = true;\n\n /**\n * Specifies the visual variant of the rail navigation.\n *\n * @type {RailNavigationVariant}\n * @default RailNavigationVariant.DEFAULT\n */\n @CSSModifier()\n @Input()\n public variant: RailNavigationVariant = RailNavigationVariant.DEFAULT;\n\n /**\n * Emits changes to the `isOpen` state, allowing for external reaction to state changes.\n *\n * @emits {boolean} - The new state of the rail navigation.\n */\n @Output()\n public isOpenChange = new EventEmitter<boolean>();\n\n /**\n * Toggles the open state of the rail navigation. Optionally accepts a boolean to force the state to open or closed.\n * Does not perform any action if the variant is set to BAR.\n *\n * @param {boolean | undefined} forceState - Optionally force the toggle to a specific state.\n */\n public toggle(forceState?: boolean): void {\n if (this.variant === RailNavigationVariant.BAR) return;\n this.isOpen = forceState ?? !this.isOpen;\n this.isOpenChange.emit(this.isOpen);\n }\n\n /**\n * Explicitly opens the rail navigation, setting `isOpen` to true.\n */\n public open(): void {\n this.toggle(true);\n }\n\n /**\n * Explicitly closes the rail navigation, setting `isOpen` to false.\n */\n public close(): void {\n this.toggle(false);\n }\n}\n","<nav class=\"odx-rail-navigation__content\">\n <ng-content selector=\"a[odxRailNavigationItem], button[odxRailNavigationItem]\"></ng-content>\n</nav>\n<button odxRailNavigationItem class=\"odx-rail-navigation__expand\" iconName=\"chevron-right\" (click)=\"toggle()\"></button>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RailNavigationItemComponent } from './components/rail-navigation-item/rail-navigation-item.component';\nimport { RailNavigationComponent } from './rail-navigation.component';\n\nconst modules = [RailNavigationComponent, RailNavigationItemComponent];\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RailNavigationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAOA;;;;;;;;AAQG;AAeU,IAAA,2BAA2B,GAAjC,MAAM,2BAA2B,CAAA;AAAjC,IAAA,WAAA,GAAA;QACc,IAAgB,CAAA,gBAAA,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAEnE,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;;;;AAMG;QAEI,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAW1B;;;;;AAKG;QAEI,IAAO,CAAA,OAAA,GAAG,MAAM,CAAC;AACzB,KAAA;+GAhCY,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,2BAA2B,EAYlB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6EAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,CAAA,YAAA,EAAA,YAAA,EAAA,gBAAgB,CC1CtC,EAAA,QAAA,EAAA,UAA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AE7CT,MAAM,OAAO,GAAG,CAAC,uBAAuB,EAAE,2BAA2B,CAAC,CAAC;MAK1D,oBAAoB,CAAA;+GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAApB,oBAAoB,EAAA,OAAA,EAAA,CALhB,uBAAuB,EAAE,2BAA2B,aAGzD,UAAU,EAHL,uBAAuB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;gHAKxD,oBAAoB,EAAA,OAAA,EAAA,CAHtB,OAAO,EACN,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -74,11 +74,9 @@ let RichListItemComponent = class RichListItemComponent {
|
|
|
74
74
|
this.expandableItem = inject(ExpandableItemDirective, { self: true });
|
|
75
75
|
this.element = injectElement();
|
|
76
76
|
/**
|
|
77
|
-
* Emits an event whenever the expanded state of the `RichListItemComponent` changes.
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* in the item's expanded state, providing an opportunity to implement custom behaviors or actions
|
|
81
|
-
* based on the expansion/collapse of the item.
|
|
77
|
+
* Emits an event whenever the expanded state of the `RichListItemComponent` changes.
|
|
78
|
+
*
|
|
79
|
+
* @emits {boolean} The new expanded state of the component.
|
|
82
80
|
*/
|
|
83
81
|
this.expandedChange = new EventEmitter();
|
|
84
82
|
}
|
|
@@ -141,6 +139,9 @@ let RichListComponent = class RichListComponent {
|
|
|
141
139
|
/**
|
|
142
140
|
* Determines whether the list is displayed in a condensed format.
|
|
143
141
|
* This makes the list more compact by reducing the padding and margins.
|
|
142
|
+
*
|
|
143
|
+
* @type {boolean}
|
|
144
|
+
* @default false
|
|
144
145
|
*/
|
|
145
146
|
this.condensed = false;
|
|
146
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-rich-list.mjs","sources":["../../../../libs/angular/components/rich-list/src/lib/components/rich-list-content/rich-list-content.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-header/rich-list-header.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-header/rich-list-header.component.html","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-item/rich-list-item.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-item/rich-list-item.component.html","../../../../libs/angular/components/rich-list/src/lib/rich-list.component.ts","../../../../libs/angular/components/rich-list/src/lib/rich-list.component.html","../../../../libs/angular/components/rich-list/src/lib/rich-list.module.ts","../../../../libs/angular/components/rich-list/src/odx-angular-components-rich-list.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RichListItemContentComponent provides a container for rich content within a `RichListItemComponent`.\n * It is used to wrap content that should be styled according to the rich list design.\n */\n@CSSComponent('rich-list-content')\n@Component({\n standalone: true,\n selector: 'odx-rich-list-content',\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class RichListItemContentComponent {\n public readonly element = injectElement();\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n// TODO: rename component class name and file names to match the component name\n/**\n * RichListItemHeaderComponent provides a container for header content within a `RichListItemComponent`.\n * It is used to wrap content that should be styled according to the rich list design.\n */\n@CSSComponent('rich-list-item-header')\n@Component({\n standalone: true,\n selector: 'odx-rich-list-header, odx-rich-list-item-header',\n templateUrl: 'rich-list-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [ActionGroupComponent],\n})\nexport class RichListItemHeaderComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-checkbox\"></ng-content>\n<ng-content select=\"odx-avatar\"></ng-content>\n<div class=\"odx-rich-list-header__title\">\n <ng-content></ng-content>\n</div>\n<odx-action-group class=\"odx-rich-list-header__action-group\">\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\"></ng-content>\n</odx-action-group>\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, ContentChild, EventEmitter, Output, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { collapse, expand } from '@odx/angular/animations';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { RichListItemContentComponent } from '../rich-list-content/rich-list-content.component';\n\n/**\n * RichListItemComponent is a list item component that displays rich content and supports expandable functionality.\n * It can be used in conjunction with the `RichListComponent` to create a list of items with rich content.\n * The component can be expanded to show additional content or details, providing a dynamic user experience.\n * It also supports a disabled state, which prevents user interaction with the item.\n * Has host directive ExpandableItemDirective with inputs `expanded` and `id`.\n *\n * @see {ExpandableItemDirective}\n */\n@CSSComponent('rich-list-item')\n@Component({\n selector: 'odx-rich-list-item',\n templateUrl: './rich-list-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, CoreModule, ActionGroupComponent, IconComponent, ButtonComponent],\n providers: [DisabledController.connect()],\n hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n host: {\n '[class.is-disabled]': 'isDisabled',\n '[class.odx-rich-list-item--expanded]': 'expandableItem.expanded',\n '[class.odx-rich-list-item--empty]': 'empty',\n '[attr.id]': 'expandableItem.id',\n },\n animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])],\n})\nexport class RichListItemComponent {\n private readonly disabledController = DisabledController.inject();\n\n @ContentChild(RichListItemContentComponent)\n private readonly content?: RichListItemContentComponent;\n\n public readonly expandableItem = inject(ExpandableItemDirective, { self: true });\n public readonly element = injectElement();\n\n /**\n * Emits an event whenever the expanded state of the `RichListItemComponent` changes. This EventEmitter\n * outputs a boolean value that indicates the new expanded state of the component: `true` for expanded\n * and `false` for collapsed. This allows for external components or services to react to changes\n * in the item's expanded state, providing an opportunity to implement custom behaviors or actions\n * based on the expansion/collapse of the item.\n */\n @Output()\n public expandedChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * Toggles the expanded state of the component.\n *\n * This method is a key function of the `RichListItemComponent`, enabling dynamic interaction with the component's presentation.\n * When invoked, it switches this item current state. If the item is currently expanded (showing additional content or details),\n * calling `toggle` will collapse it, hiding these elements from view.\n */\n public toggle(): void {\n this.expandableItem.toggle();\n }\n\n public get titleId(): string {\n return `${this.expandableItem.id}-title`;\n }\n\n public get slotId(): string {\n return `${this.expandableItem.id}-slot`;\n }\n\n public get empty(): boolean {\n return !this.content;\n }\n\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n public onAnimationEnd(): void {\n this.expandedChange.emit(this.expandableItem.expanded);\n }\n}\n","<div class=\"odx-rich-list-item__header\" [attr.id]=\"titleId\" [attr.aria-expanded]=\"expandableItem.expanded\" [attr.aria-controls]=\"slotId\">\n <ng-content select=\"odx-rich-list-item-header\"></ng-content>\n <odx-action-group class=\"odx-rich-list-item__expand-button\">\n <button odxButton (click)=\"toggle()\">\n <odx-icon class=\"odx-rich-list-item__icon\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n<div\n class=\"odx-rich-list-item__slot\"\n *ngIf=\"expandableItem.expanded\"\n @expandSlotAnimation\n (@expandSlotAnimation.done)=\"onAnimationEnd()\"\n [attr.aria-labelledby]=\"titleId\"\n [attr.id]=\"slotId\"\n>\n <ng-content select=\"odx-rich-list-content\"></ng-content>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, booleanAttribute } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RichListComponent is designed to display a list with rich content in each item,\n * supporting expandable functionality. It can operate in a condensed mode to save space.\n * Has host directive ExpandableContainerDirective with an input `multiple`.\n *\n * @see {ExpandableContainerDirective}\n */\n@CSSComponent('rich-list')\n@Component({\n selector: 'odx-rich-list',\n templateUrl: './rich-list.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class RichListComponent {\n public readonly element = injectElement();\n\n /**\n * Determines whether the list is displayed in a condensed format.\n * This makes the list more compact by reducing the padding and margins.\n */\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public condensed = false;\n}\n","<ng-content select=\"odx-rich-list-item\"></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RichListItemComponent, RichListItemHeaderComponent } from './components';\nimport { RichListItemContentComponent } from './components/rich-list-content/rich-list-content.component';\nimport { RichListComponent } from './rich-list.component';\n\nconst modules = [RichListComponent, RichListItemComponent, RichListItemHeaderComponent, RichListItemContentComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RichListModule {}\n","/**\n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EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YANV,iBAAiB,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,4BAA4B,CAIxG,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,iBAAiB,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA,EAAA;AAMvG,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EANS,OAAA,EAAA,CAAA,qBAAqB,EAAE,2BAA2B,EAI1E,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-rich-list.mjs","sources":["../../../../libs/angular/components/rich-list/src/lib/components/rich-list-content/rich-list-content.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-header/rich-list-header.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-header/rich-list-header.component.html","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-item/rich-list-item.component.ts","../../../../libs/angular/components/rich-list/src/lib/components/rich-list-item/rich-list-item.component.html","../../../../libs/angular/components/rich-list/src/lib/rich-list.component.ts","../../../../libs/angular/components/rich-list/src/lib/rich-list.component.html","../../../../libs/angular/components/rich-list/src/lib/rich-list.module.ts","../../../../libs/angular/components/rich-list/src/odx-angular-components-rich-list.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RichListItemContentComponent provides a container for rich content within a `RichListItemComponent`.\n * It is used to wrap content that should be styled according to the rich list design.\n */\n@CSSComponent('rich-list-content')\n@Component({\n standalone: true,\n selector: 'odx-rich-list-content',\n template: ` <ng-content></ng-content> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class RichListItemContentComponent {\n public readonly element = injectElement();\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n// TODO: rename component class name and file names to match the component name\n/**\n * RichListItemHeaderComponent provides a container for header content within a `RichListItemComponent`.\n * It is used to wrap content that should be styled according to the rich list design.\n */\n@CSSComponent('rich-list-item-header')\n@Component({\n standalone: true,\n selector: 'odx-rich-list-header, odx-rich-list-item-header',\n templateUrl: 'rich-list-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [ActionGroupComponent],\n})\nexport class RichListItemHeaderComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-checkbox\"></ng-content>\n<ng-content select=\"odx-avatar\"></ng-content>\n<div class=\"odx-rich-list-header__title\">\n <ng-content></ng-content>\n</div>\n<odx-action-group class=\"odx-rich-list-header__action-group\">\n <ng-content select=\"[odxButton]\" ngProjectAs=\"[odxButton]\"></ng-content>\n</odx-action-group>\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, ContentChild, EventEmitter, Output, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { collapse, expand } from '@odx/angular/animations';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { RichListItemContentComponent } from '../rich-list-content/rich-list-content.component';\n\n/**\n * RichListItemComponent is a list item component that displays rich content and supports expandable functionality.\n * It can be used in conjunction with the `RichListComponent` to create a list of items with rich content.\n * The component can be expanded to show additional content or details, providing a dynamic user experience.\n * It also supports a disabled state, which prevents user interaction with the item.\n * Has host directive ExpandableItemDirective with inputs `expanded` and `id`.\n *\n * @see {ExpandableItemDirective}\n */\n@CSSComponent('rich-list-item')\n@Component({\n selector: 'odx-rich-list-item',\n templateUrl: './rich-list-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, CoreModule, ActionGroupComponent, IconComponent, ButtonComponent],\n providers: [DisabledController.connect()],\n hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n host: {\n '[class.is-disabled]': 'isDisabled',\n '[class.odx-rich-list-item--expanded]': 'expandableItem.expanded',\n '[class.odx-rich-list-item--empty]': 'empty',\n '[attr.id]': 'expandableItem.id',\n },\n animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])],\n})\nexport class RichListItemComponent {\n private readonly disabledController = DisabledController.inject();\n\n @ContentChild(RichListItemContentComponent)\n private readonly content?: RichListItemContentComponent;\n\n public readonly expandableItem = inject(ExpandableItemDirective, { self: true });\n public readonly element = injectElement();\n\n /**\n * Emits an event whenever the expanded state of the `RichListItemComponent` changes.\n *\n * @emits {boolean} The new expanded state of the component.\n */\n @Output()\n public expandedChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * Toggles the expanded state of the component.\n *\n * This method is a key function of the `RichListItemComponent`, enabling dynamic interaction with the component's presentation.\n * When invoked, it switches this item current state. If the item is currently expanded (showing additional content or details),\n * calling `toggle` will collapse it, hiding these elements from view.\n */\n public toggle(): void {\n this.expandableItem.toggle();\n }\n\n protected get titleId(): string {\n return `${this.expandableItem.id}-title`;\n }\n\n protected get slotId(): string {\n return `${this.expandableItem.id}-slot`;\n }\n\n protected get empty(): boolean {\n return !this.content;\n }\n\n protected get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n protected onAnimationEnd(): void {\n this.expandedChange.emit(this.expandableItem.expanded);\n }\n}\n","<div class=\"odx-rich-list-item__header\" [attr.id]=\"titleId\" [attr.aria-expanded]=\"expandableItem.expanded\" [attr.aria-controls]=\"slotId\">\n <ng-content select=\"odx-rich-list-item-header\"></ng-content>\n <odx-action-group class=\"odx-rich-list-item__expand-button\">\n <button odxButton (click)=\"toggle()\">\n <odx-icon class=\"odx-rich-list-item__icon\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n </button>\n </odx-action-group>\n</div>\n<div\n class=\"odx-rich-list-item__slot\"\n *ngIf=\"expandableItem.expanded\"\n @expandSlotAnimation\n (@expandSlotAnimation.done)=\"onAnimationEnd()\"\n [attr.aria-labelledby]=\"titleId\"\n [attr.id]=\"slotId\"\n>\n <ng-content select=\"odx-rich-list-content\"></ng-content>\n</div>\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, booleanAttribute } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * RichListComponent is designed to display a list with rich content in each item,\n * supporting expandable functionality. It can operate in a condensed mode to save space.\n * Has host directive ExpandableContainerDirective with an input `multiple`.\n *\n * @see {ExpandableContainerDirective}\n */\n@CSSComponent('rich-list')\n@Component({\n selector: 'odx-rich-list',\n templateUrl: './rich-list.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class RichListComponent {\n public readonly element = injectElement();\n\n /**\n * Determines whether the list is displayed in a condensed format.\n * This makes the list more compact by reducing the padding and margins.\n *\n * @type {boolean}\n * @default false\n */\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public condensed = false;\n}\n","<ng-content select=\"odx-rich-list-item\"></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RichListItemComponent, RichListItemHeaderComponent } from './components';\nimport { RichListItemContentComponent } from './components/rich-list-content/rich-list-content.component';\nimport { RichListComponent } from './rich-list.component';\n\nconst modules = [RichListComponent, RichListItemComponent, RichListItemHeaderComponent, RichListItemContentComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RichListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAIA;;;AAGG;AASU,IAAA,4BAA4B,GAAlC,MAAM,4BAA4B,CAAA;AAAlC,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAC3C,KAAA;+GAFY,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,4BAA4B,iFAJ7B,CAA6B,2BAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,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,OAAA,EAAA,CAAA,qBAAqB,EAAE,2BAA2B,EAI1E,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -25,6 +25,7 @@ const SELECT_CONTROL = new InjectionToken('@odx/angular/components/select::Selec
|
|
|
25
25
|
* and can be disabled as needed.
|
|
26
26
|
* It extends OptionControl to provide additional behavior specific to select components.
|
|
27
27
|
*
|
|
28
|
+
* @template T - The type of the value selected in the option.
|
|
28
29
|
* @see {OptionControl}
|
|
29
30
|
*/
|
|
30
31
|
let SelectOptionComponent = class SelectOptionComponent extends OptionControl {
|
|
@@ -130,6 +131,9 @@ let SelectInputControlDirective = class SelectInputControlDirective extends Inpu
|
|
|
130
131
|
/**
|
|
131
132
|
* Dynamic content to be displayed when no matching search results are found.
|
|
132
133
|
* This can be specified as HTML content or a string.
|
|
134
|
+
*
|
|
135
|
+
* @type {DynamicContent | null}
|
|
136
|
+
* @default null
|
|
133
137
|
*/
|
|
134
138
|
this.notFoundContent = null;
|
|
135
139
|
}
|
|
@@ -184,6 +188,8 @@ var SelectComponent_1;
|
|
|
184
188
|
* SelectComponent provides an advanced dropdown list that supports autocomplete, multiple selection,
|
|
185
189
|
* and accessibility features. It extends AutocompleteControl for seamless integration with Angular forms.
|
|
186
190
|
*
|
|
191
|
+
* @template T - The type of the value selected in the select.
|
|
192
|
+
*
|
|
187
193
|
* @see {AutocompleteControl}
|
|
188
194
|
*/
|
|
189
195
|
let SelectComponent = class SelectComponent extends AutocompleteControl {
|
|
@@ -196,24 +202,28 @@ let SelectComponent = class SelectComponent extends AutocompleteControl {
|
|
|
196
202
|
* Placeholder text for the select input when no option is selected.
|
|
197
203
|
*
|
|
198
204
|
* @type {string}
|
|
205
|
+
* @default ''
|
|
199
206
|
*/
|
|
200
207
|
this.placeholder = '';
|
|
201
208
|
/**
|
|
202
209
|
* Sets whether multiple options can be selected.
|
|
203
210
|
*
|
|
204
211
|
* @type {boolean}
|
|
212
|
+
* @default false
|
|
205
213
|
*/
|
|
206
214
|
this.multiple = false;
|
|
207
215
|
/**
|
|
208
216
|
* Custom template for displaying the selected option.
|
|
209
217
|
*
|
|
210
218
|
* @type {TemplateRef<{ $implicit: T }> | null}
|
|
219
|
+
* @default null
|
|
211
220
|
*/
|
|
212
221
|
this.selectedOptionTemplate = null;
|
|
213
222
|
/**
|
|
214
223
|
* Function to determine if two options are identical, useful for detecting changes in selection.
|
|
215
224
|
*
|
|
216
225
|
* @type {IdentityMatcher<T | null>}
|
|
226
|
+
* @default ODX_DEFAULT_IDENTITY_MATCHER
|
|
217
227
|
*
|
|
218
228
|
* @example
|
|
219
229
|
* ```ts
|
|
@@ -272,7 +282,7 @@ let SelectComponent = class SelectComponent extends AutocompleteControl {
|
|
|
272
282
|
* @returns {boolean} Whether the option is selected.
|
|
273
283
|
*/
|
|
274
284
|
isOptionSelected(option) {
|
|
275
|
-
if (option
|
|
285
|
+
if (option) {
|
|
276
286
|
if (this.multiple && Array.isArray(this.value)) {
|
|
277
287
|
return this.value.some((val) => this.identityMatcher(option.value, val));
|
|
278
288
|
}
|