@odx/angular 6.0.0 → 6.0.1
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 +7 -0
- package/animations/lib/expand.d.ts +44 -0
- package/animations/lib/fade.d.ts +70 -0
- package/animations/lib/slide.d.ts +21 -0
- package/animations/lib/wait-for-child-animations.d.ts +38 -0
- package/breakpoints/lib/breakpoints.config.d.ts +38 -0
- package/breakpoints/lib/breakpoints.service.d.ts +43 -0
- package/breakpoints/lib/directives/match-breakpoints.directive.d.ts +36 -0
- package/breakpoints/lib/helpers/configure-breakpoint.d.ts +19 -0
- package/cdk/a11y/lib/directives/interactive.directive.d.ts +32 -0
- package/cdk/a11y/lib/directives/list-focus-manager-option.directive.d.ts +22 -0
- package/cdk/a11y/lib/directives/list-focus-manager.directive.d.ts +17 -0
- package/cdk/active-indicator/lib/active-indicator.directive.d.ts +63 -0
- package/cdk/autocomplete-control/lib/autocomplete-control.d.ts +53 -0
- package/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +3 -0
- package/cdk/connected-overlay/lib/connected-overlay.service.d.ts +44 -0
- package/cdk/connected-overlay/lib/helpers/compute-overlay-position.d.ts +10 -0
- package/cdk/connected-overlay/lib/models/connected-overlay-ref.d.ts +49 -0
- package/cdk/custom-form-control/lib/custom-form-control.d.ts +108 -0
- package/cdk/custom-form-control/lib/input-control.directive.d.ts +75 -0
- package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +25 -0
- package/cdk/dynamic-view/lib/dynamic-view.service.d.ts +30 -0
- package/cdk/dynamic-view/lib/helpers/create-projectable-nodes.d.ts +22 -0
- package/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.d.ts +22 -0
- package/cdk/dynamic-view/lib/helpers/is-dynamic-view.d.ts +22 -0
- package/cdk/dynamic-view/lib/models/dynamic-component-ref.d.ts +39 -0
- package/cdk/dynamic-view/lib/models/dynamic-template-ref.d.ts +36 -0
- package/cdk/event-plugins/lib/event-plugins.config.d.ts +35 -0
- package/cdk/event-plugins/lib/models/event-plugin.d.ts +57 -0
- package/cdk/event-plugins/lib/plugins/debounce-event-plugin.d.ts +32 -0
- package/cdk/event-plugins/lib/plugins/defer-event-plugin.d.ts +24 -0
- package/cdk/expandable/lib/directives/expandable-container.directive.d.ts +41 -0
- package/cdk/expandable/lib/directives/expandable-item.directive.d.ts +47 -0
- package/cdk/option-control/lib/option-control.d.ts +47 -0
- package/cdk/radio-group-control/lib/radio-control.directive.d.ts +8 -0
- package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +11 -0
- package/components/accordion/lib/accordion.component.d.ts +8 -0
- package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +37 -1
- package/components/accordion/lib/directives/accordion-item-title.d.ts +3 -0
- package/components/action-group/action-group.component.d.ts +6 -0
- package/components/area-header/area-header.component.d.ts +8 -0
- package/components/area-header/directives/area-header-content.directive.d.ts +3 -0
- package/components/area-header/directives/area-header-subtitle.directive.d.ts +3 -0
- package/components/autocomplete/lib/autocomplete.component.d.ts +17 -0
- package/components/avatar/lib/avatar.component.d.ts +8 -0
- package/components/badge/lib/badge.component.d.ts +10 -0
- package/components/badge/lib/badge.directive.d.ts +15 -0
- package/components/bar/lib/bar.component.d.ts +7 -0
- package/components/bar/lib/directives/bar-button.directive.d.ts +3 -0
- package/components/bar/lib/directives/bar-label.directive.d.ts +3 -0
- package/components/breadcrumbs/lib/breadcrumbs.component.d.ts +3 -0
- package/components/button/lib/button.component.d.ts +10 -0
- package/components/button-group/lib/button-group.component.d.ts +15 -0
- package/components/calendar/lib/calendar.component.d.ts +48 -0
- package/components/calendar/lib/calendar.config.d.ts +17 -0
- package/components/calendar/lib/calendar.service.d.ts +48 -0
- package/components/calendar/lib/components/calendar-header/calendar-header.component.d.ts +24 -0
- package/components/calendar/lib/components/calendar-month/calendar-month.component.d.ts +6 -0
- package/components/calendar/lib/components/calendar-year/calendar-year.component.d.ts +6 -0
- package/components/calendar/lib/components/calendar-years/calendar-years.component.d.ts +6 -0
- package/components/calendar/lib/daterange.service.d.ts +16 -0
- package/components/calendar/lib/directives/calendar-cell.directive.d.ts +37 -0
- package/components/calendar/lib/directives/calendar-view.directive.d.ts +41 -0
- package/components/calendar/lib/pipes/date-label.pipe.d.ts +5 -0
- package/components/calendar/lib/services/calendar-month.service.d.ts +1 -0
- package/components/calendar/lib/services/calendar-year.service.d.ts +1 -0
- package/components/calendar/lib/services/calendar-years.service.d.ts +1 -0
- package/components/calendar/lib/utils/check-cell-in-range.d.ts +1 -0
- package/components/calendar/lib/utils/check-identical-date.d.ts +1 -0
- package/components/calendar/lib/utils/get-A11y-label.d.ts +1 -0
- package/components/calendar/lib/utils/is-date-disabled.d.ts +1 -0
- package/components/calendar/lib/utils/parse-date.d.ts +1 -0
- package/components/calendar/lib/utils/validate-daterange.d.ts +1 -0
- package/components/calendar/lib/utils/validate-max-date.d.ts +1 -0
- package/components/calendar/lib/utils/validate-min-date.d.ts +1 -0
- package/components/calendar/lib/utils/validate-next-date-set.d.ts +1 -0
- package/components/calendar/lib/utils/validate-previous-date-set.d.ts +1 -0
- package/components/checkbox/lib/checkbox.component.d.ts +32 -0
- package/components/checkbox/lib/checkbox.validator.d.ts +23 -0
- package/components/chip/lib/components/chip/chip.component.d.ts +14 -0
- package/components/chip/lib/components/chip-list/chip-list.component.d.ts +3 -0
- package/components/chip/lib/components/chip-list-row/chip-list-row.component.d.ts +3 -0
- package/components/circular-progress/lib/circular-progress.component.d.ts +20 -0
- package/components/content-box/lib/content-box.component.d.ts +3 -0
- package/components/content-box/lib/directives/content-box-footer.directive.d.ts +3 -0
- package/components/content-box/lib/directives/content-box-header.directive.d.ts +3 -0
- package/components/datepicker/lib/datepicker.component.d.ts +47 -0
- package/components/datepicker/lib/datepicker.config.d.ts +19 -0
- package/components/datepicker/lib/directives/datepicker-input-control.directive.d.ts +30 -0
- package/components/datepicker/lib/utils/get-datepicker-input-pattern.d.ts +2 -0
- package/components/datepicker/lib/utils/get-datepicker-input-value-as-date.d.ts +1 -0
- package/components/daterangepicker/lib/daterangepicker.component.d.ts +89 -0
- package/components/daterangepicker/lib/daterangepicker.config.d.ts +19 -0
- package/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.d.ts +30 -0
- package/components/daterangepicker/lib/range.validator.d.ts +15 -0
- package/components/daterangepicker/lib/required.validator.d.ts +6 -0
- package/components/daterangepicker/lib/utils/get-daterangepicker-input-pattern.d.ts +2 -0
- package/components/daterangepicker/lib/utils/get-daterangepicker-input-value-as-date.d.ts +1 -0
- package/components/dropdown/lib/dropdown.component.d.ts +16 -0
- package/components/dropdown/lib/dropdown.directive.d.ts +67 -0
- package/components/dropdown/lib/helpers/close-current-dropdown.d.ts +5 -0
- package/components/error-page/lib/error-page.component.d.ts +7 -0
- package/components/error-page/lib/error-page.config.d.ts +18 -0
- package/components/footer/lib/footer.component.d.ts +9 -6
- package/components/footer/lib/footer.config.d.ts +2 -0
- package/components/form-field/lib/components/form-field-info/form-field-info.component.d.ts +13 -0
- package/components/form-field/lib/components/form-group/form-group.component.d.ts +16 -0
- package/components/form-field/lib/directives/form-field-control.directive.d.ts +5 -0
- package/components/form-field/lib/directives/form-field-error.directive.d.ts +6 -0
- package/components/form-field/lib/directives/form-field-hint.directive.d.ts +3 -0
- package/components/form-field/lib/directives/form-field-label.directive.d.ts +3 -0
- package/components/form-field/lib/directives/form.directive.d.ts +13 -0
- package/components/form-field/lib/form-field.component.d.ts +20 -0
- package/components/form-field/lib/form-field.service.d.ts +42 -0
- package/components/form-field/lib/services/form-field-error.service.d.ts +24 -0
- package/components/header/lib/directives/header-avatar.directive.d.ts +4 -0
- package/components/header/lib/directives/header-title.directive.d.ts +3 -0
- package/components/header/lib/header.component.d.ts +3 -0
- package/components/header-navigation/lib/directives/header-navigation-link.directive.d.ts +3 -0
- package/components/header-navigation/lib/header-navigation.component.d.ts +6 -0
- package/components/icon/lib/helpers/unpack-icon-identifier.d.ts +14 -0
- package/components/icon/lib/icon.component.d.ts +24 -0
- package/components/icon/lib/icon.config.d.ts +26 -0
- package/components/inline-message/lib/inline-message.component.d.ts +13 -0
- package/components/link/link.directive.d.ts +3 -0
- package/components/list/lib/components/expandable-list-item/expandable-list-item.component.d.ts +6 -0
- package/components/list/lib/components/list-item/list-item.component.d.ts +17 -1
- package/components/list/lib/list.component.d.ts +5 -0
- package/components/loading-spinner/lib/loading-spinner.component.d.ts +8 -0
- package/components/loading-spinner/lib/loading-spinner.directive.d.ts +22 -0
- package/components/logo/logo.directive.d.ts +15 -0
- package/components/main-menu/lib/directives/main-menu-button.directive.d.ts +5 -1
- package/components/main-menu/lib/directives/main-menu-close.directive.d.ts +3 -0
- package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +16 -0
- package/components/main-menu/lib/helpers/create-main-menu-links.d.ts +1 -0
- package/components/main-menu/lib/main-menu.component.d.ts +42 -0
- package/components/main-menu/lib/main-menu.config.d.ts +31 -0
- package/components/main-menu/lib/main-menu.service.d.ts +28 -0
- package/components/mainfilter-group/lib/mainfilter-group.component.d.ts +4 -0
- package/components/menu/lib/directives/menu-item.directive.d.ts +6 -0
- package/components/menu/lib/menu.component.d.ts +13 -1
- package/components/menu/lib/menu.directive.d.ts +31 -0
- package/components/modal/lib/components/basic-modal/basic-modal.component.d.ts +14 -0
- package/components/modal/lib/components/modal-footer/modal-footer.component.d.ts +3 -0
- package/components/modal/lib/components/modal-header/modal-header.component.d.ts +9 -0
- package/components/modal/lib/components/modal-hero/modal-hero.component.d.ts +21 -0
- package/components/modal/lib/directives/modal-close.directive.d.ts +25 -1
- package/components/modal/lib/directives/modal-content.directive.d.ts +3 -0
- package/components/modal/lib/directives/modal-dismiss.directive.d.ts +18 -1
- package/components/modal/lib/helpers/inject-modal-ref.d.ts +21 -0
- package/components/modal/lib/helpers/provide-modal-ref.d.ts +9 -0
- package/components/modal/lib/modal.component.d.ts +25 -0
- package/components/modal/lib/modal.config.d.ts +33 -0
- package/components/modal/lib/modal.directive.d.ts +29 -0
- package/components/modal/lib/modal.service.d.ts +54 -0
- package/components/modal/lib/models/modal-ref.d.ts +34 -0
- package/components/navigation-back/lib/navigation-back.component.d.ts +3 -0
- package/components/notification/lib/components/notification-center/notification-center.component.d.ts +0 -2
- package/components/notification/lib/directives/notification-center.directive.d.ts +18 -4
- package/components/notification/lib/helpers/get-notifications-by-tag.d.ts +1 -0
- package/components/notification/lib/helpers/sort-notifications.d.ts +1 -0
- package/components/notification/lib/helpers/to-notification-collection.d.ts +1 -0
- package/components/notification/lib/models/notification-feature.d.ts +15 -0
- package/components/notification/lib/notification.config.d.ts +54 -0
- package/components/notification/lib/notification.logger.d.ts +1 -0
- package/components/notification/lib/notification.service.d.ts +55 -0
- package/components/notification/lib/notification.tokens.d.ts +3 -0
- package/components/notification/lib/services/notification-center.service.d.ts +9 -0
- package/components/paginator/lib/paginator.component.d.ts +89 -0
- package/components/paginator/lib/paginator.config.d.ts +24 -2
- package/components/progress/lib/progress.component.d.ts +15 -0
- package/components/radio-group/lib/radio-group.component.d.ts +11 -0
- package/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.d.ts +19 -0
- package/components/rail-navigation/lib/rail-navigation.component.d.ts +26 -0
- package/components/rich-list/lib/components/rich-list-content/rich-list-content.component.d.ts +4 -0
- package/components/rich-list/lib/components/rich-list-header/rich-list-header.component.d.ts +4 -0
- package/components/rich-list/lib/components/rich-list-item/rich-list-item.component.d.ts +9 -1
- package/components/rich-list/lib/rich-list.component.d.ts +9 -2
- package/components/select/lib/components/select-option/select-option.component.d.ts +39 -2
- package/components/select/lib/directives/select-input-control.directive.d.ts +11 -0
- package/components/select/lib/pipes/select-search-filter.pipe.d.ts +10 -0
- package/components/select/lib/select.component.d.ts +59 -0
- package/components/slider/lib/slider.directive.d.ts +19 -0
- package/components/spinbox/lib/spinbox.component.d.ts +16 -0
- package/components/switch/lib/switch.component.d.ts +10 -0
- package/components/switch/lib/switch.validator.d.ts +12 -0
- package/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.d.ts +28 -0
- package/components/tab-bar/lib/tab-bar.component.d.ts +69 -0
- package/components/table/lib/components/check-cell/check-cell.component.d.ts +18 -0
- package/components/table/lib/components/header-title/header-title.component.d.ts +33 -1
- package/components/table/lib/directives/table-cell.directive.d.ts +4 -0
- package/components/table/lib/directives/table-row.directive.d.ts +4 -0
- package/components/table/lib/table.component.d.ts +36 -0
- package/components/timepicker/lib/timepicker.component.d.ts +11 -2
- package/components/timepicker/lib/utils/generate-time-stamps.d.ts +2 -1
- package/components/timepicker/lib/utils/ngx-mask-helper.d.ts +2 -2
- package/components/toast/lib/toast.config.d.ts +26 -0
- package/components/toast/lib/toast.service.d.ts +35 -0
- package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +11 -0
- package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +12 -0
- package/components/tooltip/lib/tooltip.component.d.ts +20 -0
- package/components/tooltip/lib/tooltip.directive.d.ts +35 -0
- package/components/wizard/lib/components/wizard-step/wizard-step.component.d.ts +34 -0
- package/components/wizard/lib/wizard.component.d.ts +20 -0
- package/esm2022/animations/lib/expand.mjs +45 -1
- package/esm2022/animations/lib/fade.mjs +71 -1
- package/esm2022/animations/lib/slide.mjs +22 -1
- package/esm2022/animations/lib/wait-for-child-animations.mjs +39 -1
- package/esm2022/breakpoints/lib/breakpoints.config.mjs +39 -1
- package/esm2022/breakpoints/lib/breakpoints.service.mjs +44 -1
- package/esm2022/breakpoints/lib/directives/match-breakpoints.directive.mjs +37 -1
- package/esm2022/breakpoints/lib/helpers/configure-breakpoint.mjs +20 -1
- package/esm2022/cdk/a11y/lib/directives/interactive.directive.mjs +33 -1
- package/esm2022/cdk/a11y/lib/directives/list-focus-manager-option.directive.mjs +23 -1
- package/esm2022/cdk/a11y/lib/directives/list-focus-manager.directive.mjs +18 -1
- package/esm2022/cdk/active-indicator/lib/active-indicator.directive.mjs +64 -1
- package/esm2022/cdk/autocomplete-control/lib/autocomplete-control.mjs +39 -1
- package/esm2022/cdk/checkbox-control/lib/checkbox-control.directive.mjs +4 -1
- package/esm2022/cdk/connected-overlay/lib/connected-overlay.service.mjs +45 -1
- package/esm2022/cdk/connected-overlay/lib/helpers/compute-overlay-position.mjs +11 -1
- package/esm2022/cdk/connected-overlay/lib/models/connected-overlay-ref.mjs +50 -1
- package/esm2022/cdk/custom-form-control/lib/custom-form-control.mjs +109 -3
- package/esm2022/cdk/custom-form-control/lib/input-control.directive.mjs +76 -1
- package/esm2022/cdk/dynamic-view/lib/dynamic-view.directive.mjs +18 -1
- package/esm2022/cdk/dynamic-view/lib/dynamic-view.service.mjs +31 -1
- package/esm2022/cdk/dynamic-view/lib/helpers/create-projectable-nodes.mjs +23 -1
- package/esm2022/cdk/dynamic-view/lib/helpers/is-dynamic-text-content.mjs +23 -1
- package/esm2022/cdk/dynamic-view/lib/helpers/is-dynamic-view.mjs +23 -1
- package/esm2022/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +40 -1
- package/esm2022/cdk/dynamic-view/lib/models/dynamic-template-ref.mjs +37 -1
- package/esm2022/cdk/event-plugins/lib/event-plugins.config.mjs +36 -1
- package/esm2022/cdk/event-plugins/lib/models/event-plugin.mjs +45 -1
- package/esm2022/cdk/event-plugins/lib/plugins/debounce-event-plugin.mjs +33 -1
- package/esm2022/cdk/event-plugins/lib/plugins/defer-event-plugin.mjs +25 -1
- package/esm2022/cdk/expandable/lib/directives/expandable-container.directive.mjs +42 -1
- package/esm2022/cdk/expandable/lib/directives/expandable-item.directive.mjs +48 -1
- package/esm2022/cdk/option-control/lib/option-control.mjs +48 -1
- package/esm2022/cdk/radio-group-control/lib/radio-control.directive.mjs +9 -1
- package/esm2022/cdk/radio-group-control/lib/radio-group-control.directive.mjs +12 -1
- package/esm2022/components/accordion/lib/accordion.component.mjs +9 -1
- package/esm2022/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +31 -1
- package/esm2022/components/accordion/lib/directives/accordion-item-title.mjs +4 -1
- package/esm2022/components/action-group/action-group.component.mjs +7 -1
- package/esm2022/components/area-header/area-header.component.mjs +9 -1
- package/esm2022/components/area-header/directives/area-header-content.directive.mjs +4 -1
- package/esm2022/components/area-header/directives/area-header-subtitle.directive.mjs +4 -1
- package/esm2022/components/autocomplete/lib/autocomplete.component.mjs +18 -1
- package/esm2022/components/avatar/lib/avatar.component.mjs +9 -1
- package/esm2022/components/badge/lib/badge.component.mjs +11 -1
- package/esm2022/components/badge/lib/badge.directive.mjs +16 -1
- package/esm2022/components/bar/lib/bar.component.mjs +8 -1
- package/esm2022/components/bar/lib/directives/bar-button.directive.mjs +4 -1
- package/esm2022/components/bar/lib/directives/bar-label.directive.mjs +4 -1
- package/esm2022/components/breadcrumbs/lib/breadcrumbs.component.mjs +4 -1
- package/esm2022/components/button/lib/button.component.mjs +11 -1
- package/esm2022/components/button-group/lib/button-group.component.mjs +16 -1
- package/esm2022/components/calendar/lib/calendar.component.mjs +35 -1
- package/esm2022/components/calendar/lib/calendar.config.mjs +18 -1
- package/esm2022/components/calendar/lib/calendar.service.mjs +49 -1
- package/esm2022/components/calendar/lib/components/calendar-header/calendar-header.component.mjs +19 -1
- package/esm2022/components/calendar/lib/components/calendar-month/calendar-month.component.mjs +7 -1
- package/esm2022/components/calendar/lib/components/calendar-year/calendar-year.component.mjs +7 -1
- package/esm2022/components/calendar/lib/components/calendar-years/calendar-years.component.mjs +7 -1
- package/esm2022/components/calendar/lib/daterange.service.mjs +17 -1
- package/esm2022/components/calendar/lib/directives/calendar-cell.directive.mjs +26 -1
- package/esm2022/components/calendar/lib/directives/calendar-view.directive.mjs +39 -1
- package/esm2022/components/calendar/lib/pipes/date-label.pipe.mjs +6 -1
- package/esm2022/components/calendar/lib/services/calendar-month.service.mjs +2 -1
- package/esm2022/components/calendar/lib/services/calendar-year.service.mjs +2 -1
- package/esm2022/components/calendar/lib/services/calendar-years.service.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/check-cell-in-range.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/check-identical-date.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/get-A11y-label.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/is-date-disabled.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/parse-date.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/validate-daterange.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/validate-max-date.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/validate-min-date.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/validate-next-date-set.mjs +2 -1
- package/esm2022/components/calendar/lib/utils/validate-previous-date-set.mjs +2 -1
- package/esm2022/components/checkbox/lib/checkbox.component.mjs +33 -1
- package/esm2022/components/checkbox/lib/checkbox.validator.mjs +24 -1
- package/esm2022/components/chip/lib/components/chip/chip.component.mjs +15 -1
- package/esm2022/components/chip/lib/components/chip-list/chip-list.component.mjs +4 -1
- package/esm2022/components/chip/lib/components/chip-list-row/chip-list-row.component.mjs +4 -1
- package/esm2022/components/circular-progress/lib/circular-progress.component.mjs +21 -1
- package/esm2022/components/content-box/lib/content-box.component.mjs +4 -1
- package/esm2022/components/content-box/lib/directives/content-box-footer.directive.mjs +4 -1
- package/esm2022/components/content-box/lib/directives/content-box-header.directive.mjs +4 -1
- package/esm2022/components/datepicker/lib/datepicker.component.mjs +33 -1
- package/esm2022/components/datepicker/lib/datepicker.config.mjs +20 -1
- package/esm2022/components/datepicker/lib/directives/datepicker-input-control.directive.mjs +31 -1
- package/esm2022/components/datepicker/lib/utils/get-datepicker-input-pattern.mjs +3 -1
- package/esm2022/components/datepicker/lib/utils/get-datepicker-input-value-as-date.mjs +2 -1
- package/esm2022/components/daterangepicker/lib/daterangepicker.component.mjs +65 -1
- package/esm2022/components/daterangepicker/lib/daterangepicker.config.mjs +20 -1
- package/esm2022/components/daterangepicker/lib/directives/daterangepicker-input-control.directive.mjs +31 -1
- package/esm2022/components/daterangepicker/lib/range.validator.mjs +16 -1
- package/esm2022/components/daterangepicker/lib/required.validator.mjs +15 -1
- package/esm2022/components/daterangepicker/lib/utils/get-daterangepicker-input-pattern.mjs +3 -1
- package/esm2022/components/daterangepicker/lib/utils/get-daterangepicker-input-value-as-date.mjs +2 -1
- package/esm2022/components/dropdown/lib/dropdown.component.mjs +8 -1
- package/esm2022/components/dropdown/lib/dropdown.directive.mjs +55 -1
- package/esm2022/components/dropdown/lib/helpers/close-current-dropdown.mjs +6 -1
- package/esm2022/components/error-page/lib/error-page.component.mjs +8 -1
- package/esm2022/components/error-page/lib/error-page.config.mjs +9 -1
- package/esm2022/components/footer/lib/footer.component.mjs +10 -7
- package/esm2022/components/footer/lib/footer.config.mjs +3 -1
- package/esm2022/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +14 -1
- package/esm2022/components/form-field/lib/components/form-group/form-group.component.mjs +13 -1
- package/esm2022/components/form-field/lib/directives/form-field-control.directive.mjs +6 -1
- package/esm2022/components/form-field/lib/directives/form-field-error.directive.mjs +4 -1
- package/esm2022/components/form-field/lib/directives/form-field-hint.directive.mjs +4 -1
- package/esm2022/components/form-field/lib/directives/form-field-label.directive.mjs +4 -1
- package/esm2022/components/form-field/lib/directives/form.directive.mjs +14 -1
- package/esm2022/components/form-field/lib/form-field.component.mjs +14 -1
- package/esm2022/components/form-field/lib/form-field.service.mjs +43 -1
- package/esm2022/components/form-field/lib/services/form-field-error.service.mjs +25 -1
- package/esm2022/components/header/lib/directives/header-avatar.directive.mjs +5 -1
- package/esm2022/components/header/lib/directives/header-title.directive.mjs +4 -1
- package/esm2022/components/header/lib/header.component.mjs +4 -1
- package/esm2022/components/header-navigation/lib/directives/header-navigation-link.directive.mjs +4 -1
- package/esm2022/components/header-navigation/lib/header-navigation.component.mjs +4 -1
- package/esm2022/components/icon/lib/helpers/unpack-icon-identifier.mjs +15 -1
- package/esm2022/components/icon/lib/icon.component.mjs +25 -1
- package/esm2022/components/icon/lib/icon.config.mjs +20 -1
- package/esm2022/components/inline-message/lib/inline-message.component.mjs +14 -1
- package/esm2022/components/link/link.directive.mjs +4 -1
- package/esm2022/components/list/lib/components/expandable-list-item/expandable-list-item.component.mjs +7 -1
- package/esm2022/components/list/lib/components/list-item/list-item.component.mjs +18 -2
- package/esm2022/components/list/lib/list.component.mjs +6 -1
- package/esm2022/components/loading-spinner/lib/loading-spinner.component.mjs +10 -2
- package/esm2022/components/loading-spinner/lib/loading-spinner.directive.mjs +23 -1
- package/esm2022/components/logo/logo.directive.mjs +16 -1
- package/esm2022/components/main-menu/lib/directives/main-menu-button.directive.mjs +5 -1
- package/esm2022/components/main-menu/lib/directives/main-menu-close.directive.mjs +4 -1
- package/esm2022/components/main-menu/lib/directives/main-menu-item.directive.mjs +17 -1
- package/esm2022/components/main-menu/lib/helpers/create-main-menu-links.mjs +2 -1
- package/esm2022/components/main-menu/lib/main-menu.component.mjs +37 -1
- package/esm2022/components/main-menu/lib/main-menu.config.mjs +32 -1
- package/esm2022/components/main-menu/lib/main-menu.service.mjs +29 -1
- package/esm2022/components/mainfilter-group/lib/mainfilter-group.component.mjs +5 -1
- package/esm2022/components/menu/lib/directives/menu-item.directive.mjs +7 -1
- package/esm2022/components/menu/lib/menu.component.mjs +13 -1
- package/esm2022/components/menu/lib/menu.directive.mjs +19 -1
- package/esm2022/components/modal/lib/components/basic-modal/basic-modal.component.mjs +15 -1
- package/esm2022/components/modal/lib/components/modal-footer/modal-footer.component.mjs +4 -1
- package/esm2022/components/modal/lib/components/modal-header/modal-header.component.mjs +4 -1
- package/esm2022/components/modal/lib/components/modal-hero/modal-hero.component.mjs +12 -1
- package/esm2022/components/modal/lib/directives/modal-close.directive.mjs +25 -1
- package/esm2022/components/modal/lib/directives/modal-content.directive.mjs +4 -1
- package/esm2022/components/modal/lib/directives/modal-dismiss.directive.mjs +18 -1
- package/esm2022/components/modal/lib/helpers/inject-modal-ref.mjs +22 -1
- package/esm2022/components/modal/lib/helpers/provide-modal-ref.mjs +10 -1
- package/esm2022/components/modal/lib/modal.component.mjs +21 -2
- package/esm2022/components/modal/lib/modal.config.mjs +34 -1
- package/esm2022/components/modal/lib/modal.directive.mjs +25 -1
- package/esm2022/components/modal/lib/modal.service.mjs +39 -1
- package/esm2022/components/modal/lib/models/modal-ref.mjs +34 -1
- package/esm2022/components/navigation-back/lib/navigation-back.component.mjs +4 -1
- package/esm2022/components/notification/lib/components/notification-center/notification-center.component.mjs +1 -3
- package/esm2022/components/notification/lib/directives/notification-center.directive.mjs +19 -5
- package/esm2022/components/notification/lib/helpers/get-notifications-by-tag.mjs +2 -1
- package/esm2022/components/notification/lib/helpers/sort-notifications.mjs +2 -1
- package/esm2022/components/notification/lib/helpers/to-notification-collection.mjs +2 -1
- package/esm2022/components/notification/lib/models/notification-feature.mjs +16 -1
- package/esm2022/components/notification/lib/notification.config.mjs +45 -1
- package/esm2022/components/notification/lib/notification.logger.mjs +2 -1
- package/esm2022/components/notification/lib/notification.service.mjs +56 -1
- package/esm2022/components/notification/lib/notification.tokens.mjs +4 -1
- package/esm2022/components/notification/lib/services/notification-center.service.mjs +10 -1
- package/esm2022/components/paginator/lib/paginator.component.mjs +90 -1
- package/esm2022/components/paginator/lib/paginator.config.mjs +29 -1
- package/esm2022/components/progress/lib/progress.component.mjs +16 -1
- package/esm2022/components/radio-group/lib/radio-group.component.mjs +13 -2
- package/esm2022/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.mjs +17 -1
- package/esm2022/components/rail-navigation/lib/rail-navigation.component.mjs +27 -1
- package/esm2022/components/rich-list/lib/components/rich-list-content/rich-list-content.component.mjs +5 -1
- package/esm2022/components/rich-list/lib/components/rich-list-header/rich-list-header.component.mjs +5 -1
- package/esm2022/components/rich-list/lib/components/rich-list-item/rich-list-item.component.mjs +10 -2
- package/esm2022/components/rich-list/lib/rich-list.component.mjs +10 -3
- package/esm2022/components/select/lib/components/select-option/select-option.component.mjs +47 -6
- package/esm2022/components/select/lib/directives/select-input-control.directive.mjs +12 -2
- package/esm2022/components/select/lib/pipes/select-search-filter.pipe.mjs +11 -1
- package/esm2022/components/select/lib/select.component.mjs +56 -2
- package/esm2022/components/slider/lib/slider.directive.mjs +20 -1
- package/esm2022/components/spinbox/lib/spinbox.component.mjs +17 -1
- package/esm2022/components/switch/lib/switch.component.mjs +11 -1
- package/esm2022/components/switch/lib/switch.validator.mjs +13 -1
- package/esm2022/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.mjs +29 -1
- package/esm2022/components/tab-bar/lib/tab-bar.component.mjs +70 -1
- package/esm2022/components/table/lib/components/check-cell/check-cell.component.mjs +19 -1
- package/esm2022/components/table/lib/components/header-title/header-title.component.mjs +30 -2
- package/esm2022/components/table/lib/directives/table-cell.directive.mjs +5 -1
- package/esm2022/components/table/lib/directives/table-row.directive.mjs +5 -1
- package/esm2022/components/table/lib/table.component.mjs +30 -1
- package/esm2022/components/timepicker/lib/timepicker.component.mjs +15 -6
- package/esm2022/components/timepicker/lib/utils/generate-time-stamps.mjs +5 -3
- package/esm2022/components/timepicker/lib/utils/ngx-mask-helper.mjs +3 -3
- package/esm2022/components/toast/lib/toast.config.mjs +27 -1
- package/esm2022/components/toast/lib/toast.service.mjs +36 -1
- package/esm2022/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +12 -1
- package/esm2022/components/toggle-button-group/lib/toggle-button-group.component.mjs +14 -2
- package/esm2022/components/tooltip/lib/tooltip.component.mjs +18 -1
- package/esm2022/components/tooltip/lib/tooltip.directive.mjs +36 -1
- package/esm2022/components/wizard/lib/components/wizard-step/wizard-step.component.mjs +35 -1
- package/esm2022/components/wizard/lib/wizard.component.mjs +21 -1
- package/esm2022/internal/translate/lib/translate.config.mjs +32 -1
- package/esm2022/internal/translate/lib/translate.service.mjs +30 -1
- package/esm2022/lib/controllers/controller.mjs +26 -1
- package/esm2022/lib/controllers/disabled.controller.mjs +60 -1
- package/esm2022/lib/controllers/readonly.controller.mjs +57 -1
- package/esm2022/lib/directives/click-outside.directive.mjs +30 -1
- package/esm2022/lib/directives/delegate-focus.directive.mjs +15 -1
- package/esm2022/lib/services/window-ref.mjs +67 -1
- package/esm2022/lib/tokens/identity-matcher.mjs +25 -1
- package/esm2022/lib/tokens/string-search-handler.mjs +25 -1
- package/esm2022/lib/tokens/stringify.mjs +26 -1
- package/esm2022/localization/lib/features/with-http-language-header.mjs +54 -1
- package/esm2022/localization/lib/features/with-http-language-query-param.mjs +52 -1
- package/esm2022/localization/lib/loaders/browser-language-loader.mjs +33 -1
- package/esm2022/localization/lib/localization.config.mjs +71 -1
- package/esm2022/localization/lib/localization.service.mjs +42 -3
- package/esm2022/rxjs/index.mjs +2 -2
- package/esm2022/rxjs/lib/delay-until.mjs +23 -1
- package/esm2022/rxjs/lib/from-element-mutation.mjs +22 -1
- package/esm2022/rxjs/lib/from-element-resize.mjs +25 -1
- package/esm2022/rxjs/lib/from-events.mjs +25 -1
- package/esm2022/rxjs/lib/from-query-list.mjs +24 -0
- package/esm2022/sdk/lib/application-environment.mjs +51 -1
- package/esm2022/theming/lib/helpers/prefers-dark-theme.mjs +19 -1
- package/esm2022/theming/lib/helpers/resolve-theme.mjs +26 -1
- package/esm2022/theming/lib/helpers/theme-storage.mjs +43 -1
- package/esm2022/theming/lib/theming.config.mjs +34 -1
- package/esm2022/theming/lib/theming.service.mjs +32 -1
- package/esm2022/utils/lib/decorators/pure.mjs +52 -1
- package/esm2022/utils/lib/helpers/angular.mjs +37 -1
- package/esm2022/utils/lib/helpers/array.mjs +5 -1
- package/esm2022/utils/lib/helpers/build-url.mjs +21 -1
- package/esm2022/utils/lib/helpers/build-website-url.mjs +3 -2
- package/esm2022/utils/lib/helpers/cache-storage-client.mjs +52 -1
- package/esm2022/utils/lib/helpers/coercion.mjs +18 -1
- package/esm2022/utils/lib/helpers/debounce.mjs +28 -1
- package/esm2022/utils/lib/helpers/defer-fn.mjs +21 -1
- package/esm2022/utils/lib/helpers/dom.mjs +71 -1
- package/esm2022/utils/lib/helpers/get-axis.mjs +21 -1
- package/esm2022/utils/lib/helpers/get-language-code.mjs +18 -1
- package/esm2022/utils/lib/helpers/get-opposite-side.mjs +22 -1
- package/esm2022/utils/lib/helpers/get-side.mjs +18 -1
- package/esm2022/utils/lib/helpers/get-unique-id.mjs +34 -1
- package/esm2022/utils/lib/helpers/match-url.mjs +41 -1
- package/esm2022/utils/lib/helpers/ng-changes.mjs +30 -1
- package/esm2022/utils/lib/helpers/provide-config.mjs +57 -1
- package/esm2022/utils/lib/helpers/queue.mjs +84 -1
- package/esm2022/utils/lib/helpers/type-guards.mjs +58 -1
- package/esm2022/utils/lib/helpers/until-destroyed.mjs +39 -1
- package/fesm2022/odx-angular-animations.mjs +173 -0
- package/fesm2022/odx-angular-animations.mjs.map +1 -1
- package/fesm2022/odx-angular-breakpoints.mjs +136 -0
- package/fesm2022/odx-angular-breakpoints.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-a11y.mjs +71 -0
- package/fesm2022/odx-angular-cdk-a11y.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-active-indicator.mjs +63 -0
- package/fesm2022/odx-angular-cdk-active-indicator.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-autocomplete-control.mjs +38 -0
- package/fesm2022/odx-angular-cdk-autocomplete-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-checkbox-control.mjs +3 -0
- package/fesm2022/odx-angular-cdk-checkbox-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs +103 -0
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-custom-form-control.mjs +183 -2
- package/fesm2022/odx-angular-cdk-custom-form-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs +188 -0
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-event-plugins.mjs +135 -0
- package/fesm2022/odx-angular-cdk-event-plugins.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-expandable.mjs +88 -0
- package/fesm2022/odx-angular-cdk-expandable.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-option-control.mjs +47 -0
- package/fesm2022/odx-angular-cdk-option-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-radio-group-control.mjs +19 -0
- package/fesm2022/odx-angular-cdk-radio-group-control.mjs.map +1 -1
- package/fesm2022/odx-angular-components-accordion.mjs +41 -0
- package/fesm2022/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2022/odx-angular-components-action-group.mjs +6 -0
- package/fesm2022/odx-angular-components-action-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-area-header.mjs +14 -0
- package/fesm2022/odx-angular-components-area-header.mjs.map +1 -1
- package/fesm2022/odx-angular-components-autocomplete.mjs +17 -0
- package/fesm2022/odx-angular-components-autocomplete.mjs.map +1 -1
- package/fesm2022/odx-angular-components-avatar.mjs +8 -0
- package/fesm2022/odx-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-badge.mjs +25 -0
- package/fesm2022/odx-angular-components-badge.mjs.map +1 -1
- package/fesm2022/odx-angular-components-bar.mjs +13 -0
- package/fesm2022/odx-angular-components-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-breadcrumbs.mjs +3 -0
- package/fesm2022/odx-angular-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/odx-angular-components-button-group.mjs +15 -0
- package/fesm2022/odx-angular-components-button-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-button.mjs +10 -0
- package/fesm2022/odx-angular-components-button.mjs.map +1 -1
- package/fesm2022/odx-angular-components-calendar.mjs +232 -0
- package/fesm2022/odx-angular-components-calendar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-checkbox.mjs +55 -0
- package/fesm2022/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2022/odx-angular-components-chip.mjs +20 -0
- package/fesm2022/odx-angular-components-chip.mjs.map +1 -1
- package/fesm2022/odx-angular-components-circular-progress.mjs +20 -0
- package/fesm2022/odx-angular-components-circular-progress.mjs.map +1 -1
- package/fesm2022/odx-angular-components-content-box.mjs +9 -0
- package/fesm2022/odx-angular-components-content-box.mjs.map +1 -1
- package/fesm2022/odx-angular-components-datepicker.mjs +84 -0
- package/fesm2022/odx-angular-components-datepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-daterangepicker.mjs +145 -0
- package/fesm2022/odx-angular-components-daterangepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-dropdown.mjs +66 -0
- package/fesm2022/odx-angular-components-dropdown.mjs.map +1 -1
- package/fesm2022/odx-angular-components-error-page.mjs +15 -0
- package/fesm2022/odx-angular-components-error-page.mjs.map +1 -1
- package/fesm2022/odx-angular-components-footer.mjs +11 -6
- package/fesm2022/odx-angular-components-footer.mjs.map +1 -1
- package/fesm2022/odx-angular-components-form-field.mjs +131 -0
- package/fesm2022/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2022/odx-angular-components-header-navigation.mjs +6 -0
- package/fesm2022/odx-angular-components-header-navigation.mjs.map +1 -1
- package/fesm2022/odx-angular-components-header.mjs +10 -0
- package/fesm2022/odx-angular-components-header.mjs.map +1 -1
- package/fesm2022/odx-angular-components-icon.mjs +57 -0
- package/fesm2022/odx-angular-components-icon.mjs.map +1 -1
- package/fesm2022/odx-angular-components-inline-message.mjs +13 -0
- package/fesm2022/odx-angular-components-inline-message.mjs.map +1 -1
- package/fesm2022/odx-angular-components-link.mjs +3 -0
- package/fesm2022/odx-angular-components-link.mjs.map +1 -1
- package/fesm2022/odx-angular-components-list.mjs +28 -1
- package/fesm2022/odx-angular-components-list.mjs.map +1 -1
- package/fesm2022/odx-angular-components-loading-spinner.mjs +30 -0
- package/fesm2022/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2022/odx-angular-components-logo.mjs +15 -0
- package/fesm2022/odx-angular-components-logo.mjs.map +1 -1
- package/fesm2022/odx-angular-components-main-menu.mjs +119 -0
- package/fesm2022/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2022/odx-angular-components-mainfilter-group.mjs +4 -0
- package/fesm2022/odx-angular-components-mainfilter-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-menu.mjs +36 -0
- package/fesm2022/odx-angular-components-menu.mjs.map +1 -1
- package/fesm2022/odx-angular-components-modal.mjs +252 -0
- package/fesm2022/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2022/odx-angular-components-navigation-back.mjs +3 -0
- package/fesm2022/odx-angular-components-navigation-back.mjs.map +1 -1
- package/fesm2022/odx-angular-components-notification.mjs +148 -6
- package/fesm2022/odx-angular-components-notification.mjs.map +1 -1
- package/fesm2022/odx-angular-components-paginator.mjs +117 -0
- package/fesm2022/odx-angular-components-paginator.mjs.map +1 -1
- package/fesm2022/odx-angular-components-progress.mjs +15 -0
- package/fesm2022/odx-angular-components-progress.mjs.map +1 -1
- package/fesm2022/odx-angular-components-radio-group.mjs +11 -0
- package/fesm2022/odx-angular-components-radio-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-rail-navigation.mjs +42 -0
- package/fesm2022/odx-angular-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/odx-angular-components-rich-list.mjs +26 -3
- package/fesm2022/odx-angular-components-rich-list.mjs.map +1 -1
- package/fesm2022/odx-angular-components-select.mjs +122 -7
- package/fesm2022/odx-angular-components-select.mjs.map +1 -1
- package/fesm2022/odx-angular-components-slider.mjs +19 -0
- package/fesm2022/odx-angular-components-slider.mjs.map +1 -1
- package/fesm2022/odx-angular-components-spinbox.mjs +16 -0
- package/fesm2022/odx-angular-components-spinbox.mjs.map +1 -1
- package/fesm2022/odx-angular-components-switch.mjs +22 -0
- package/fesm2022/odx-angular-components-switch.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tab-bar.mjs +97 -0
- package/fesm2022/odx-angular-components-tab-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-table.mjs +84 -1
- package/fesm2022/odx-angular-components-table.mjs.map +1 -1
- package/fesm2022/odx-angular-components-timepicker.mjs +20 -9
- package/fesm2022/odx-angular-components-timepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toast.mjs +61 -0
- package/fesm2022/odx-angular-components-toast.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toggle-button-group.mjs +23 -0
- package/fesm2022/odx-angular-components-toggle-button-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tooltip.mjs +52 -0
- package/fesm2022/odx-angular-components-tooltip.mjs.map +1 -1
- package/fesm2022/odx-angular-components-wizard.mjs +54 -0
- package/fesm2022/odx-angular-components-wizard.mjs.map +1 -1
- package/fesm2022/odx-angular-internal-translate.mjs +60 -0
- package/fesm2022/odx-angular-internal-translate.mjs.map +1 -1
- package/fesm2022/odx-angular-localization.mjs +247 -2
- package/fesm2022/odx-angular-localization.mjs.map +1 -1
- package/fesm2022/odx-angular-rxjs.mjs +115 -5
- package/fesm2022/odx-angular-rxjs.mjs.map +1 -1
- package/fesm2022/odx-angular-sdk.mjs +50 -0
- package/fesm2022/odx-angular-sdk.mjs.map +1 -1
- package/fesm2022/odx-angular-theming.mjs +149 -0
- package/fesm2022/odx-angular-theming.mjs.map +1 -1
- package/fesm2022/odx-angular-utils.mjs +709 -1
- package/fesm2022/odx-angular-utils.mjs.map +1 -1
- package/fesm2022/odx-angular.mjs +322 -0
- package/fesm2022/odx-angular.mjs.map +1 -1
- package/internal/translate/lib/translate.config.d.ts +31 -0
- package/internal/translate/lib/translate.service.d.ts +29 -0
- package/lib/controllers/controller.d.ts +25 -0
- package/lib/controllers/disabled.controller.d.ts +59 -0
- package/lib/controllers/readonly.controller.d.ts +56 -0
- package/lib/directives/click-outside.directive.d.ts +29 -0
- package/lib/directives/delegate-focus.directive.d.ts +14 -0
- package/lib/services/window-ref.d.ts +66 -0
- package/lib/tokens/identity-matcher.d.ts +41 -0
- package/lib/tokens/string-search-handler.d.ts +39 -0
- package/lib/tokens/stringify.d.ts +42 -0
- package/localization/lib/features/with-http-language-header.d.ts +63 -0
- package/localization/lib/features/with-http-language-query-param.d.ts +61 -0
- package/localization/lib/loaders/browser-language-loader.d.ts +32 -0
- package/localization/lib/localization.config.d.ts +81 -0
- package/localization/lib/localization.service.d.ts +39 -0
- package/package.json +1 -1
- package/rxjs/index.d.ts +1 -1
- package/rxjs/lib/delay-until.d.ts +22 -0
- package/rxjs/lib/from-element-mutation.d.ts +21 -0
- package/rxjs/lib/from-element-resize.d.ts +24 -0
- package/rxjs/lib/from-events.d.ts +24 -0
- package/rxjs/lib/from-query-list.d.ts +22 -0
- package/sdk/lib/application-environment.d.ts +59 -0
- package/theming/lib/helpers/prefers-dark-theme.d.ts +18 -0
- package/theming/lib/helpers/resolve-theme.d.ts +25 -0
- package/theming/lib/helpers/theme-storage.d.ts +42 -0
- package/theming/lib/theming.config.d.ts +46 -0
- package/theming/lib/theming.service.d.ts +31 -0
- package/utils/lib/decorators/pure.d.ts +51 -0
- package/utils/lib/helpers/angular.d.ts +36 -0
- package/utils/lib/helpers/array.d.ts +4 -0
- package/utils/lib/helpers/build-url.d.ts +20 -0
- package/utils/lib/helpers/build-website-url.d.ts +2 -1
- package/utils/lib/helpers/cache-storage-client.d.ts +51 -0
- package/utils/lib/helpers/coercion.d.ts +17 -0
- package/utils/lib/helpers/debounce.d.ts +27 -0
- package/utils/lib/helpers/defer-fn.d.ts +20 -0
- package/utils/lib/helpers/dom.d.ts +70 -0
- package/utils/lib/helpers/get-axis.d.ts +20 -0
- package/utils/lib/helpers/get-language-code.d.ts +17 -0
- package/utils/lib/helpers/get-opposite-side.d.ts +21 -0
- package/utils/lib/helpers/get-side.d.ts +17 -0
- package/utils/lib/helpers/get-unique-id.d.ts +33 -0
- package/utils/lib/helpers/match-url.d.ts +40 -0
- package/utils/lib/helpers/ng-changes.d.ts +52 -0
- package/utils/lib/helpers/provide-config.d.ts +56 -0
- package/utils/lib/helpers/queue.d.ts +83 -0
- package/utils/lib/helpers/type-guards.d.ts +57 -0
- package/utils/lib/helpers/until-destroyed.d.ts +38 -0
- package/esm2022/rxjs/lib/form-query-list.mjs +0 -5
- package/rxjs/lib/form-query-list.d.ts +0 -3
|
@@ -3,16 +3,60 @@ import { numberAttribute, Injectable, makeEnvironmentProviders } from '@angular/
|
|
|
3
3
|
import { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
4
4
|
import { isFunction, debounce } from '@odx/angular/utils';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* An abstract class for implementing custom event plugins in Angular. This class provides
|
|
8
|
+
* the core functionality required to create a custom event listener with specific behavior,
|
|
9
|
+
* allowing developers to extend Angular's native event handling capabilities.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* Extending EventPlugin to create a custom event plugin:
|
|
13
|
+
* ```ts
|
|
14
|
+
* @Injectable()
|
|
15
|
+
* class CustomEventPlugin extends EventPlugin {
|
|
16
|
+
* public readonly modifier = /custom/;
|
|
17
|
+
*
|
|
18
|
+
* public addEventListener(element: HTMLElement, eventName: string, handler: EventListener): Function {
|
|
19
|
+
* // Custom logic for adding an event listener
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ```html
|
|
25
|
+
* <div (click.custom)="handleClick($event)"></div>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
6
28
|
class EventPlugin {
|
|
29
|
+
/**
|
|
30
|
+
* Adds a global event listener.
|
|
31
|
+
*
|
|
32
|
+
* @returns {Function} - A function that does nothing.
|
|
33
|
+
*/
|
|
7
34
|
addGlobalEventListener() {
|
|
8
35
|
return () => void 0;
|
|
9
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the event plugin supports the given event name.
|
|
39
|
+
*
|
|
40
|
+
* @param {string} eventName - The name of the event.
|
|
41
|
+
* @returns {boolean} - `true` if the event plugin supports the event, `false` otherwise.
|
|
42
|
+
*/
|
|
10
43
|
supports(eventName) {
|
|
11
44
|
return this.modifier.test(eventName);
|
|
12
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Gets the NgZone instance from the event manager.
|
|
48
|
+
*
|
|
49
|
+
* @returns {NgZone} - The NgZone instance.
|
|
50
|
+
*/
|
|
13
51
|
getZone() {
|
|
14
52
|
return this.manager.getZone();
|
|
15
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Tears down the event listener.
|
|
56
|
+
*
|
|
57
|
+
* @param {Function | null} listener - The event listener function.
|
|
58
|
+
* @returns {Function} - A function that can be called to clean up the listener.
|
|
59
|
+
*/
|
|
16
60
|
teardown(listener) {
|
|
17
61
|
return () => (isFunction(listener) ? listener() : void 0);
|
|
18
62
|
}
|
|
@@ -21,6 +65,38 @@ class EventPlugin {
|
|
|
21
65
|
/* istanbul ignore file */
|
|
22
66
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
23
67
|
const DEFAULT_DELAY = 250;
|
|
68
|
+
/**
|
|
69
|
+
* A service that extends `EventPlugin` for debouncing events. This service wraps event listeners
|
|
70
|
+
* and ensures that they are triggered no more than once per specified delay period. It is
|
|
71
|
+
* particularly useful for handling events that fire frequently, such as mouse movements
|
|
72
|
+
* or keystrokes, in a performant manner.
|
|
73
|
+
*
|
|
74
|
+
* The delay period can be specified directly in the event name using the syntax
|
|
75
|
+
* `(eventName.debounce.delay)`, where `delay` is the debounce duration in milliseconds.
|
|
76
|
+
* If no delay is specified, a default delay of 250 milliseconds is used.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* Provide the `DebounceEventPlugin` in an Angular module:
|
|
80
|
+
* ```ts
|
|
81
|
+
* @NgModule({
|
|
82
|
+
* providers: [
|
|
83
|
+
* ...
|
|
84
|
+
* provideEventPlugins(),
|
|
85
|
+
* ...
|
|
86
|
+
* ],
|
|
87
|
+
* })
|
|
88
|
+
* export class AppModule {}
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* In a component template, apply the debounce modifier to an event, specifying a custom delay:
|
|
92
|
+
* ```html
|
|
93
|
+
* <button (click.debounce.400)="handleClick($event)"></button>
|
|
94
|
+
* ```
|
|
95
|
+
* In a component template, apply the debounce modifier with the default delay:
|
|
96
|
+
* ```html
|
|
97
|
+
* <input (keyup.debounce)="onKeyUp($event)" placeholder="Type here...">
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
24
100
|
class DebounceEventPlugin extends EventPlugin {
|
|
25
101
|
constructor() {
|
|
26
102
|
super(...arguments);
|
|
@@ -51,6 +127,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
51
127
|
|
|
52
128
|
/* istanbul ignore file */
|
|
53
129
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
130
|
+
/**
|
|
131
|
+
* A service that extends `EventPlugin` to allow event handlers to be deferred until the end of the current call stack.
|
|
132
|
+
* This can improve performance by avoiding triggering Angular's change detection unnecessarily.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* Provide the `DeferEventPlugin` in an Angular module:
|
|
136
|
+
* ```ts
|
|
137
|
+
* @NgModule({
|
|
138
|
+
* providers: [
|
|
139
|
+
* ...
|
|
140
|
+
* provideEventPlugins(),
|
|
141
|
+
* ...
|
|
142
|
+
* ],
|
|
143
|
+
* })
|
|
144
|
+
* export class AppModule {}
|
|
145
|
+
* ```
|
|
146
|
+
*
|
|
147
|
+
* In your Angular component:
|
|
148
|
+
* ```html
|
|
149
|
+
* <button (click.defer)="handleClick($event)"></button>
|
|
150
|
+
* ```
|
|
151
|
+
*
|
|
152
|
+
* The `.defer` modifier in the event name `click.defer` indicates that the event handler should be deferred.
|
|
153
|
+
*/
|
|
54
154
|
class DeferEventPlugin extends EventPlugin {
|
|
55
155
|
constructor() {
|
|
56
156
|
super(...arguments);
|
|
@@ -79,6 +179,41 @@ const EVENT_PLUGINS = PLUGINS.map((useClass) => ({
|
|
|
79
179
|
useClass,
|
|
80
180
|
multi: true,
|
|
81
181
|
}));
|
|
182
|
+
/**
|
|
183
|
+
* Provides a set of custom event plugins to Angular's event handling system. This function
|
|
184
|
+
* registers custom event plugins like `DebounceEventPlugin` and `DeferEventPlugin`, enhancing
|
|
185
|
+
* the capabilities of Angular's native event management. By using `EVENT_MANAGER_PLUGINS`, these
|
|
186
|
+
* plugins are integrated into Angular's event system and can be utilized in templates and components
|
|
187
|
+
* to handle events with custom behaviors such as debouncing or deferring event execution.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* Registering the event plugins in an Angular module:
|
|
191
|
+
* ```ts
|
|
192
|
+
* @NgModule({
|
|
193
|
+
* imports: [
|
|
194
|
+
* BrowserModule,
|
|
195
|
+
* BrowserAnimationsModule,
|
|
196
|
+
* // other imports...
|
|
197
|
+
* ],
|
|
198
|
+
* declarations: [AppComponent],
|
|
199
|
+
* providers: [
|
|
200
|
+
* provideEventPlugins(),
|
|
201
|
+
* ],
|
|
202
|
+
* bootstrap: [AppComponent],
|
|
203
|
+
* })
|
|
204
|
+
* export class AppModule {}
|
|
205
|
+
* ```
|
|
206
|
+
* Assuming `DebounceEventPlugin` modifies event names with a `.debounce` modifier:
|
|
207
|
+
* ```html
|
|
208
|
+
* <button (click.debounce)="handleDebouncedClick($event)">Click Me</button>
|
|
209
|
+
* ```
|
|
210
|
+
* Assuming `DeferEventPlugin` modifies event names with a `.defer` modifier:
|
|
211
|
+
* ```html
|
|
212
|
+
* <div (mouseenter.defer)="handleDeferredMouseEnter($event)"></div>
|
|
213
|
+
* ```
|
|
214
|
+
*
|
|
215
|
+
* @returns {EnvironmentProviders} - A configuration object for Angular's DI system, to be used with `makeEnvironmentProviders`.
|
|
216
|
+
*/
|
|
82
217
|
function provideEventPlugins() {
|
|
83
218
|
return makeEnvironmentProviders(EVENT_PLUGINS);
|
|
84
219
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-event-plugins.mjs","sources":["../../../../libs/angular/cdk/event-plugins/src/lib/models/event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/plugins/debounce-event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/plugins/defer-event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/event-plugins.config.ts","../../../../libs/angular/cdk/event-plugins/src/odx-angular-cdk-event-plugins.ts"],"sourcesContent":["/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { NgZone } from '@angular/core';\nimport { EventManager } from '@angular/platform-browser';\nimport { isFunction } from '@odx/angular/utils';\n\ntype EventManagerArg = ConstructorParameters<typeof EventManager>[0][0];\n\ntype EventManagerPlugin = {\n [K in keyof EventManagerArg]: EventManagerArg[K];\n};\n\nexport abstract class EventPlugin implements EventManagerPlugin {\n protected abstract readonly modifier: RegExp;\n\n public manager!: EventManager;\n\n public abstract addEventListener(element: HTMLElement, eventName: string, handler: EventListener): Function;\n\n public addGlobalEventListener(): Function {\n return () => void 0;\n }\n\n public supports(eventName: string): boolean {\n return this.modifier.test(eventName);\n }\n\n protected getZone(): NgZone {\n return this.manager.getZone();\n }\n\n protected teardown(listener: Function | null): () => void {\n return () => (isFunction(listener) ? listener() : void 0);\n }\n}\n","/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { Injectable, numberAttribute } from '@angular/core';\nimport { debounce } from '@odx/angular/utils';\nimport { EventPlugin } from '../models';\n\nconst DEFAULT_DELAY = 250;\n\n@Injectable()\nexport class DebounceEventPlugin extends EventPlugin {\n public readonly modifier = /debounce/;\n\n public addEventListener(element: HTMLElement, eventName: string, originalHandler: EventListener): Function {\n const [name, , delay] = eventName.split('.');\n const handler = this.createHandler(originalHandler, numberAttribute(delay, DEFAULT_DELAY));\n\n return this.runOutsideAngular(() => this.manager.addEventListener(element, name, handler));\n }\n\n private createHandler(originalHandler: EventListener, delay: number): (event: Event) => void {\n const innerHandler = (event: Event): void => this.getZone().runGuarded(() => originalHandler(event));\n\n return debounce(innerHandler, delay);\n }\n\n private runOutsideAngular(addListener: () => Function): () => void {\n let listener: Function | null = null;\n this.getZone().runOutsideAngular(() => {\n listener = addListener();\n });\n\n return this.teardown(listener);\n }\n}\n","/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { Injectable } from '@angular/core';\nimport { EventPlugin } from '../models';\n\n@Injectable()\nexport class DeferEventPlugin extends EventPlugin {\n public readonly modifier = /defer/;\n\n public addEventListener(element: HTMLElement, eventName: string, originalHandler: EventListener): Function {\n const [name] = eventName.split('.');\n const handler = this.createHandler(originalHandler);\n\n return this.getZone().runOutsideAngular(() => this.manager.addEventListener(element, name, handler));\n }\n\n private createHandler(originalHandler: EventListener): (event: Event) => void {\n return (event: Event): void => {\n setTimeout(() => this.getZone().runGuarded(() => originalHandler(event)), 0);\n };\n }\n}\n","import { makeEnvironmentProviders, EnvironmentProviders, Provider } from '@angular/core';\nimport { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';\nimport { DebounceEventPlugin, DeferEventPlugin } from './plugins';\n\nconst PLUGINS = [DebounceEventPlugin, DeferEventPlugin];\n\nexport const EVENT_PLUGINS: Provider[] = PLUGINS.map((useClass) => ({\n provide: EVENT_MANAGER_PLUGINS,\n useClass,\n multi: true,\n}));\n\nexport function provideEventPlugins(): EnvironmentProviders {\n return makeEnvironmentProviders(EVENT_PLUGINS);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAYsB,WAAW,CAAA;IAOxB,sBAAsB,GAAA;AAC3B,QAAA,OAAO,MAAM,KAAK,CAAC,CAAC;KACrB;AAEM,IAAA,QAAQ,CAAC,SAAiB,EAAA;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACtC;IAES,OAAO,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;KAC/B;AAES,IAAA,QAAQ,CAAC,QAAyB,EAAA;AAC1C,QAAA,OAAO,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;KAC3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;AACZ,CAAA,CAAC,EAAE;SAEY,mBAAmB,GAAA;AACjC,IAAA,OAAO,wBAAwB,CAAC,aAAa,CAAC,CAAC;AACjD;;ACdA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-event-plugins.mjs","sources":["../../../../libs/angular/cdk/event-plugins/src/lib/models/event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/plugins/debounce-event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/plugins/defer-event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/event-plugins.config.ts","../../../../libs/angular/cdk/event-plugins/src/odx-angular-cdk-event-plugins.ts"],"sourcesContent":["/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { NgZone } from '@angular/core';\nimport { EventManager } from '@angular/platform-browser';\nimport { isFunction } from '@odx/angular/utils';\n\ntype EventManagerArg = ConstructorParameters<typeof EventManager>[0][0];\n\ntype EventManagerPlugin = {\n [K in keyof EventManagerArg]: EventManagerArg[K];\n};\n\n/**\n * An abstract class for implementing custom event plugins in Angular. This class provides\n * the core functionality required to create a custom event listener with specific behavior,\n * allowing developers to extend Angular's native event handling capabilities.\n *\n * @example\n * Extending EventPlugin to create a custom event plugin:\n * ```ts\n * @Injectable()\n * class CustomEventPlugin extends EventPlugin {\n * public readonly modifier = /custom/;\n *\n * public addEventListener(element: HTMLElement, eventName: string, handler: EventListener): Function {\n * // Custom logic for adding an event listener\n * }\n * }\n * ```\n *\n * ```html\n * <div (click.custom)=\"handleClick($event)\"></div>\n * ```\n */\nexport abstract class EventPlugin implements EventManagerPlugin {\n protected abstract readonly modifier: RegExp;\n\n /**\n * The event manager for handling events.\n *\n * @type {EventManager}\n */\n public manager!: EventManager;\n\n /**\n * Adds an event listener to the given element.\n *\n * @param {HTMLElement} element - The element to attach the event listener to.\n * @param {string} eventName - The name of the event.\n * @param {EventListener} handler - The event listener function.\n * @returns {Function} - A function that can be called to remove the event listener.\n */\n public abstract addEventListener(element: HTMLElement, eventName: string, handler: EventListener): Function;\n\n /**\n * Adds a global event listener.\n *\n * @returns {Function} - A function that does nothing.\n */\n public addGlobalEventListener(): Function {\n return () => void 0;\n }\n\n /**\n * Checks if the event plugin supports the given event name.\n *\n * @param {string} eventName - The name of the event.\n * @returns {boolean} - `true` if the event plugin supports the event, `false` otherwise.\n */\n public supports(eventName: string): boolean {\n return this.modifier.test(eventName);\n }\n\n /**\n * Gets the NgZone instance from the event manager.\n *\n * @returns {NgZone} - The NgZone instance.\n */\n protected getZone(): NgZone {\n return this.manager.getZone();\n }\n\n /**\n * Tears down the event listener.\n *\n * @param {Function | null} listener - The event listener function.\n * @returns {Function} - A function that can be called to clean up the listener.\n */\n protected teardown(listener: Function | null): () => void {\n return () => (isFunction(listener) ? listener() : void 0);\n }\n}\n","/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { Injectable, numberAttribute } from '@angular/core';\nimport { debounce } from '@odx/angular/utils';\nimport { EventPlugin } from '../models';\n\nconst DEFAULT_DELAY = 250;\n\n/**\n * A service that extends `EventPlugin` for debouncing events. This service wraps event listeners\n * and ensures that they are triggered no more than once per specified delay period. It is\n * particularly useful for handling events that fire frequently, such as mouse movements\n * or keystrokes, in a performant manner.\n *\n * The delay period can be specified directly in the event name using the syntax\n * `(eventName.debounce.delay)`, where `delay` is the debounce duration in milliseconds.\n * If no delay is specified, a default delay of 250 milliseconds is used.\n *\n * @example\n * Provide the `DebounceEventPlugin` in an Angular module:\n * ```ts\n * @NgModule({\n * providers: [\n * ...\n * provideEventPlugins(),\n * ...\n * ],\n * })\n * export class AppModule {}\n * ```\n *\n * In a component template, apply the debounce modifier to an event, specifying a custom delay:\n * ```html\n * <button (click.debounce.400)=\"handleClick($event)\"></button>\n * ```\n * In a component template, apply the debounce modifier with the default delay:\n * ```html\n * <input (keyup.debounce)=\"onKeyUp($event)\" placeholder=\"Type here...\">\n * ```\n */\n@Injectable()\nexport class DebounceEventPlugin extends EventPlugin {\n public readonly modifier = /debounce/;\n\n public addEventListener(element: HTMLElement, eventName: string, originalHandler: EventListener): Function {\n const [name, , delay] = eventName.split('.');\n const handler = this.createHandler(originalHandler, numberAttribute(delay, DEFAULT_DELAY));\n\n return this.runOutsideAngular(() => this.manager.addEventListener(element, name, handler));\n }\n\n private createHandler(originalHandler: EventListener, delay: number): (event: Event) => void {\n const innerHandler = (event: Event): void => this.getZone().runGuarded(() => originalHandler(event));\n\n return debounce(innerHandler, delay);\n }\n\n private runOutsideAngular(addListener: () => Function): () => void {\n let listener: Function | null = null;\n this.getZone().runOutsideAngular(() => {\n listener = addListener();\n });\n\n return this.teardown(listener);\n }\n}\n","/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/ban-types */\nimport { Injectable } from '@angular/core';\nimport { EventPlugin } from '../models';\n\n/**\n * A service that extends `EventPlugin` to allow event handlers to be deferred until the end of the current call stack.\n * This can improve performance by avoiding triggering Angular's change detection unnecessarily.\n *\n * @example\n * Provide the `DeferEventPlugin` in an Angular module:\n * ```ts\n * @NgModule({\n * providers: [\n * ...\n * provideEventPlugins(),\n * ...\n * ],\n * })\n * export class AppModule {}\n * ```\n *\n * In your Angular component:\n * ```html\n * <button (click.defer)=\"handleClick($event)\"></button>\n * ```\n *\n * The `.defer` modifier in the event name `click.defer` indicates that the event handler should be deferred.\n */\n@Injectable()\nexport class DeferEventPlugin extends EventPlugin {\n public readonly modifier = /defer/;\n\n public addEventListener(element: HTMLElement, eventName: string, originalHandler: EventListener): Function {\n const [name] = eventName.split('.');\n const handler = this.createHandler(originalHandler);\n\n return this.getZone().runOutsideAngular(() => this.manager.addEventListener(element, name, handler));\n }\n\n private createHandler(originalHandler: EventListener): (event: Event) => void {\n return (event: Event): void => {\n setTimeout(() => this.getZone().runGuarded(() => originalHandler(event)), 0);\n };\n }\n}\n","import { EnvironmentProviders, Provider, makeEnvironmentProviders } from '@angular/core';\nimport { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';\nimport { DebounceEventPlugin, DeferEventPlugin } from './plugins';\n\nconst PLUGINS = [DebounceEventPlugin, DeferEventPlugin];\n\nexport const EVENT_PLUGINS: Provider[] = PLUGINS.map((useClass) => ({\n provide: EVENT_MANAGER_PLUGINS,\n useClass,\n multi: true,\n}));\n\n/**\n * Provides a set of custom event plugins to Angular's event handling system. This function\n * registers custom event plugins like `DebounceEventPlugin` and `DeferEventPlugin`, enhancing\n * the capabilities of Angular's native event management. By using `EVENT_MANAGER_PLUGINS`, these\n * plugins are integrated into Angular's event system and can be utilized in templates and components\n * to handle events with custom behaviors such as debouncing or deferring event execution.\n *\n * @example\n * Registering the event plugins in an Angular module:\n * ```ts\n * @NgModule({\n * imports: [\n * BrowserModule,\n * BrowserAnimationsModule,\n * // other imports...\n * ],\n * declarations: [AppComponent],\n * providers: [\n * provideEventPlugins(),\n * ],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n * ```\n * Assuming `DebounceEventPlugin` modifies event names with a `.debounce` modifier:\n * ```html\n * <button (click.debounce)=\"handleDebouncedClick($event)\">Click Me</button>\n * ```\n * Assuming `DeferEventPlugin` modifies event names with a `.defer` modifier:\n * ```html\n * <div (mouseenter.defer)=\"handleDeferredMouseEnter($event)\"></div>\n * ```\n *\n * @returns {EnvironmentProviders} - A configuration object for Angular's DI system, to be used with `makeEnvironmentProviders`.\n */\nexport function provideEventPlugins(): EnvironmentProviders {\n return makeEnvironmentProviders(EVENT_PLUGINS);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYA;;;;;;;;;;;;;;;;;;;;;AAqBG;MACmB,WAAW,CAAA;AAoB/B;;;;AAIG;IACI,sBAAsB,GAAA;AAC3B,QAAA,OAAO,MAAM,KAAK,CAAC,CAAC;KACrB;AAED;;;;;AAKG;AACI,IAAA,QAAQ,CAAC,SAAiB,EAAA;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACtC;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A,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;mHAAhB,gBAAgB,EAAA,CAAA,CAAA,EAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;;;ACzBX,MAAM,OAAO,GAAG,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAEjD,MAAM,aAAa,GAAe,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,MAAM;AAClE,IAAA,OAAO,EAAE,qBAAqB;IAC9B,QAAQ;AACR,IAAA,KAAK,EAAE,IAAI;AACZ,CAAA,CAAC,EAAE;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,wBAAwB,CAAC,aAAa,CAAC,CAAC;AACjD;;ACjDA;;AAEG;;;;"}
|
|
@@ -5,11 +5,22 @@ import { getUniqueId } from '@odx/angular/utils';
|
|
|
5
5
|
const ODX_EXPANDABLE_CONTAINER = new InjectionToken('@odx/angular/cdk/expandable::ExpandableContainer');
|
|
6
6
|
const ODX_EXPANDABLE_ITEM = new InjectionToken('@odx/angular/cdk/expandable::ExpandableItem');
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* `ExpandableContainerDirective` provides a container for managing a group of expandable items,
|
|
10
|
+
* allowing them to expand or collapse. It supports the functionality to either allow multiple
|
|
11
|
+
* items to be expanded simultaneously or restrict to a single item at a time.
|
|
12
|
+
*
|
|
13
|
+
* This directive uses Angular's dependency injection to optionally inject a parent `ExpandableItem` or `ExpandableContainer`,
|
|
14
|
+
* enabling nested expandable structures. The `multiple` property can be set to dictate the expand/collapse behavior.
|
|
15
|
+
*/
|
|
8
16
|
class ExpandableContainerDirective {
|
|
9
17
|
constructor() {
|
|
10
18
|
this.expandedItems = new Set();
|
|
11
19
|
this.parentItem = inject(ODX_EXPANDABLE_ITEM, { optional: true, skipSelf: true });
|
|
12
20
|
this.parentContainer = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });
|
|
21
|
+
/**
|
|
22
|
+
* Determines whether multiple items can be expanded within the container.
|
|
23
|
+
*/
|
|
13
24
|
this.multiple = this.parentContainer?.multiple ?? false;
|
|
14
25
|
}
|
|
15
26
|
ngOnInit() {
|
|
@@ -18,18 +29,39 @@ class ExpandableContainerDirective {
|
|
|
18
29
|
ngOnDestroy() {
|
|
19
30
|
this.parentItem?.removeChild(this);
|
|
20
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Collapses all the expanded items within the expandable container.
|
|
34
|
+
*/
|
|
21
35
|
collapseAll() {
|
|
22
36
|
this.expandedItems.forEach((item) => item.collapse());
|
|
23
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Collapses the specified item.
|
|
40
|
+
*
|
|
41
|
+
* @param item - The item to collapse.
|
|
42
|
+
*/
|
|
24
43
|
collapse(item) {
|
|
25
44
|
this.expandedItems.delete(item);
|
|
26
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Expands the specified item.
|
|
48
|
+
* If `multiple` is set to `false`, it collapses all other items before expanding the specified item.
|
|
49
|
+
* @param item - The item to expand.
|
|
50
|
+
*/
|
|
27
51
|
expand(item) {
|
|
28
52
|
if (!this.multiple) {
|
|
29
53
|
this.collapseAll();
|
|
30
54
|
}
|
|
31
55
|
this.expandedItems.add(item);
|
|
32
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Toggles the expansion state of the specified item.
|
|
59
|
+
* If `forceState` is provided, it will set the expansion state to the specified value.
|
|
60
|
+
* If `forceState` is not provided, it will toggle the expansion state of the item.
|
|
61
|
+
*
|
|
62
|
+
* @param item - The item to toggle the expansion state for.
|
|
63
|
+
* @param forceState - Optional. The desired expansion state to set for the item.
|
|
64
|
+
*/
|
|
33
65
|
toggle(item, forceState) {
|
|
34
66
|
const shouldExpand = forceState ?? !this.isExpanded(item);
|
|
35
67
|
if (shouldExpand) {
|
|
@@ -39,9 +71,18 @@ class ExpandableContainerDirective {
|
|
|
39
71
|
this.collapse(item);
|
|
40
72
|
}
|
|
41
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Checks if the specified item is expanded.
|
|
76
|
+
* @param item - The item to check.
|
|
77
|
+
* @returns `true` if the item is expanded, `false` otherwise.
|
|
78
|
+
*/
|
|
42
79
|
isExpanded(item) {
|
|
43
80
|
return this.expandedItems.has(item);
|
|
44
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Checks if there is any expanded item.
|
|
84
|
+
* @returns {boolean} True if there is at least one expanded item, false otherwise.
|
|
85
|
+
*/
|
|
45
86
|
hasExpandedItem() {
|
|
46
87
|
return this.expandedItems.size > 0;
|
|
47
88
|
}
|
|
@@ -61,14 +102,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
61
102
|
args: [{ transform: booleanAttribute }]
|
|
62
103
|
}] } });
|
|
63
104
|
|
|
105
|
+
/**
|
|
106
|
+
* `ExpandableItemDirective` allows you to manage the expansion state of an item within an expandable container, such as an accordion or a nested list. It provides methods to expand, collapse, and toggle the item, and automatically registers itself with a parent expandable container if one is available.
|
|
107
|
+
*
|
|
108
|
+
* You can control the expanded state programmatically by binding to the `expanded` property.
|
|
109
|
+
*/
|
|
64
110
|
class ExpandableItemDirective {
|
|
65
111
|
constructor() {
|
|
66
112
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
67
113
|
this.childContainers = new Set();
|
|
68
114
|
this.container = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });
|
|
69
115
|
this._expanded = false;
|
|
116
|
+
/** Unique identifier for the expandable item. */
|
|
70
117
|
this.id = getUniqueId('odx-expandable-item');
|
|
71
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* Controls the expanded state of the item.
|
|
121
|
+
*
|
|
122
|
+
* @param {boolean} value - When `true`, expands the item; when `false`, collapses the item.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* Bind to the expanded state:
|
|
126
|
+
* ```html
|
|
127
|
+
* <div odxExpandableItem [expanded]="isItemExpanded"></div>
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
72
130
|
set expanded(value) {
|
|
73
131
|
if (this._expanded === value)
|
|
74
132
|
return;
|
|
@@ -82,21 +140,51 @@ class ExpandableItemDirective {
|
|
|
82
140
|
}
|
|
83
141
|
this.changeDetectorRef.markForCheck();
|
|
84
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Gets a value indicating whether the item is expanded.
|
|
145
|
+
* If the item is contained within a container, it checks the container's `isExpanded` method.
|
|
146
|
+
* Otherwise, it returns the value of the `_expanded` property.
|
|
147
|
+
*
|
|
148
|
+
* @type {boolean} `true` if the item is expanded; otherwise, `false`.
|
|
149
|
+
*/
|
|
85
150
|
get expanded() {
|
|
86
151
|
return this.container?.isExpanded(this) ?? this._expanded;
|
|
87
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Toggles the expansion state of the item, optionally forcing a specific state.
|
|
155
|
+
*
|
|
156
|
+
* @param {boolean} forceState - When provided, forces the expansion state to the specified value.
|
|
157
|
+
*/
|
|
88
158
|
toggle(forceState) {
|
|
89
159
|
this.expanded = forceState ?? !this.expanded;
|
|
90
160
|
}
|
|
161
|
+
/** Expands the item.
|
|
162
|
+
*
|
|
163
|
+
* @returns {void}
|
|
164
|
+
*/
|
|
91
165
|
expand() {
|
|
92
166
|
this.toggle(true);
|
|
93
167
|
}
|
|
168
|
+
/** Collapses the item.
|
|
169
|
+
*
|
|
170
|
+
* @returns {void}
|
|
171
|
+
*/
|
|
94
172
|
collapse() {
|
|
95
173
|
this.toggle(false);
|
|
96
174
|
}
|
|
175
|
+
/** Adds a child container to the item.
|
|
176
|
+
*
|
|
177
|
+
* @param {ExpandableContainer} container - The child container to add.
|
|
178
|
+
* @returns {void}
|
|
179
|
+
*/
|
|
97
180
|
addChild(container) {
|
|
98
181
|
this.childContainers.add(container);
|
|
99
182
|
}
|
|
183
|
+
/** Removes a child container from the item.
|
|
184
|
+
*
|
|
185
|
+
* @param {ExpandableContainer} container - The child container to remove.
|
|
186
|
+
* @returns {void}
|
|
187
|
+
*/
|
|
100
188
|
removeChild(container) {
|
|
101
189
|
this.childContainers.delete(container);
|
|
102
190
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-expandable.mjs","sources":["../../../../libs/angular/cdk/expandable/src/lib/expandable.tokens.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-container.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-item.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/expandable.module.ts","../../../../libs/angular/cdk/expandable/src/odx-angular-cdk-expandable.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ExpandableContainer, ExpandableItem } from './facade';\n\nexport const ODX_EXPANDABLE_CONTAINER = new InjectionToken<ExpandableContainer>('@odx/angular/cdk/expandable::ExpandableContainer');\nexport const ODX_EXPANDABLE_ITEM = new InjectionToken<ExpandableItem>('@odx/angular/cdk/expandable::ExpandableItem');\n","import { booleanAttribute, Directive, inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ODX_EXPANDABLE_CONTAINER, ODX_EXPANDABLE_ITEM } from '../expandable.tokens';\nimport type { ExpandableContainer, ExpandableItem } from '../facade';\n\n@Directive({\n standalone: true,\n selector: '[odxExpandableContainer]',\n exportAs: 'odxExpandableContainer',\n providers: [{ provide: ODX_EXPANDABLE_CONTAINER, useExisting: ExpandableContainerDirective }],\n})\nexport class ExpandableContainerDirective implements ExpandableContainer, OnInit, OnDestroy {\n private readonly expandedItems = new Set<ExpandableItem>();\n private readonly parentItem = inject(ODX_EXPANDABLE_ITEM, { optional: true, skipSelf: true });\n private readonly parentContainer = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n\n @Input({ transform: booleanAttribute })\n public multiple = this.parentContainer?.multiple ?? false;\n\n public ngOnInit(): void {\n this.parentItem?.addChild(this);\n }\n\n public ngOnDestroy(): void {\n this.parentItem?.removeChild(this);\n }\n\n public collapseAll(): void {\n this.expandedItems.forEach((item) => item.collapse());\n }\n\n public collapse(item: ExpandableItem): void {\n this.expandedItems.delete(item);\n }\n\n public expand(item: ExpandableItem): void {\n if (!this.multiple) {\n this.collapseAll();\n }\n this.expandedItems.add(item);\n }\n\n public toggle(item: ExpandableItem, forceState?: boolean): void {\n const shouldExpand = forceState ?? !this.isExpanded(item);\n if (shouldExpand) {\n this.expand(item);\n } else {\n this.collapse(item);\n }\n }\n\n public isExpanded(item: ExpandableItem): boolean {\n return this.expandedItems.has(item);\n }\n\n public hasExpandedItem(): boolean {\n return this.expandedItems.size > 0;\n }\n}\n","import { booleanAttribute, ChangeDetectorRef, Directive, inject, Input } from '@angular/core';\nimport { getUniqueId } from '@odx/angular/utils';\nimport { ODX_EXPANDABLE_CONTAINER, ODX_EXPANDABLE_ITEM } from '../expandable.tokens';\nimport type { ExpandableContainer, ExpandableItem } from '../facade';\n\n@Directive({\n standalone: true,\n selector: '[odxExpandableItem]',\n exportAs: 'odxExpandableItem',\n providers: [{ provide: ODX_EXPANDABLE_ITEM, useExisting: ExpandableItemDirective }],\n})\nexport class ExpandableItemDirective implements ExpandableItem {\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly childContainers = new Set<ExpandableContainer>();\n private readonly container = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n private _expanded = false;\n\n @Input()\n public id = getUniqueId('odx-expandable-item');\n\n @Input({ transform: booleanAttribute })\n public set expanded(value: boolean) {\n if (this._expanded === value) return;\n this._expanded = value;\n if (this._expanded) {\n this.container?.expand(this);\n } else {\n this.closeAllChildren();\n this.container?.collapse(this);\n }\n this.changeDetectorRef.markForCheck();\n }\n public get expanded(): boolean {\n return this.container?.isExpanded(this) ?? this._expanded;\n }\n\n public toggle(forceState?: boolean): void {\n this.expanded = forceState ?? !this.expanded;\n }\n\n public expand(): void {\n this.toggle(true);\n }\n\n public collapse(): void {\n this.toggle(false);\n }\n\n public addChild(container: ExpandableContainer): void {\n this.childContainers.add(container);\n }\n\n public removeChild(container: ExpandableContainer): void {\n this.childContainers.delete(container);\n }\n\n private closeAllChildren(): void {\n this.childContainers.forEach((container) => container.collapseAll());\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ExpandableContainerDirective, ExpandableItemDirective } from './directives';\n\nconst modules = [ExpandableContainerDirective, ExpandableItemDirective];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class ExpandableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,wBAAwB,GAAG,IAAI,cAAc,CAAsB,kDAAkD,EAAE;MACvH,mBAAmB,GAAG,IAAI,cAAc,CAAiB,6CAA6C;;MCMtG,4BAA4B,CAAA;AANzC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC1C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7E,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAGjG,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,IAAI,KAAK,CAAC;AAyC3D,KAAA;IAvCQ,QAAQ,GAAA;AACb,QAAA,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;KACjC;IAEM,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KACpC;IAEM,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,IAA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uB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAMzD,gBAAgB,EAAA,CAAA,CAAA,EAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-expandable.mjs","sources":["../../../../libs/angular/cdk/expandable/src/lib/expandable.tokens.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-container.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-item.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/expandable.module.ts","../../../../libs/angular/cdk/expandable/src/odx-angular-cdk-expandable.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ExpandableContainer, ExpandableItem } from './facade';\n\nexport const ODX_EXPANDABLE_CONTAINER = new InjectionToken<ExpandableContainer>('@odx/angular/cdk/expandable::ExpandableContainer');\nexport const ODX_EXPANDABLE_ITEM = new InjectionToken<ExpandableItem>('@odx/angular/cdk/expandable::ExpandableItem');\n","import { booleanAttribute, Directive, inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ODX_EXPANDABLE_CONTAINER, ODX_EXPANDABLE_ITEM } from '../expandable.tokens';\nimport type { ExpandableContainer, ExpandableItem } from '../facade';\n\n/**\n * `ExpandableContainerDirective` provides a container for managing a group of expandable items,\n * allowing them to expand or collapse. It supports the functionality to either allow multiple\n * items to be expanded simultaneously or restrict to a single item at a time.\n *\n * This directive uses Angular's dependency injection to optionally inject a parent `ExpandableItem` or `ExpandableContainer`,\n * enabling nested expandable structures. The `multiple` property can be set to dictate the expand/collapse behavior.\n */\n@Directive({\n standalone: true,\n selector: '[odxExpandableContainer]',\n exportAs: 'odxExpandableContainer',\n providers: [{ provide: ODX_EXPANDABLE_CONTAINER, useExisting: ExpandableContainerDirective }],\n})\nexport class ExpandableContainerDirective implements ExpandableContainer, OnInit, OnDestroy {\n private readonly expandedItems = new Set<ExpandableItem>();\n private readonly parentItem = inject(ODX_EXPANDABLE_ITEM, { optional: true, skipSelf: true });\n private readonly parentContainer = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n\n /**\n * Determines whether multiple items can be expanded within the container.\n */\n @Input({ transform: booleanAttribute })\n public multiple = this.parentContainer?.multiple ?? false;\n\n public ngOnInit(): void {\n this.parentItem?.addChild(this);\n }\n\n public ngOnDestroy(): void {\n this.parentItem?.removeChild(this);\n }\n\n /**\n * Collapses all the expanded items within the expandable container.\n */\n public collapseAll(): void {\n this.expandedItems.forEach((item) => item.collapse());\n }\n\n /**\n * Collapses the specified item.\n *\n * @param item - The item to collapse.\n */\n public collapse(item: ExpandableItem): void {\n this.expandedItems.delete(item);\n }\n\n /**\n * Expands the specified item.\n * If `multiple` is set to `false`, it collapses all other items before expanding the specified item.\n * @param item - The item to expand.\n */\n public expand(item: ExpandableItem): void {\n if (!this.multiple) {\n this.collapseAll();\n }\n this.expandedItems.add(item);\n }\n\n /**\n * Toggles the expansion state of the specified item.\n * If `forceState` is provided, it will set the expansion state to the specified value.\n * If `forceState` is not provided, it will toggle the expansion state of the item.\n *\n * @param item - The item to toggle the expansion state for.\n * @param forceState - Optional. The desired expansion state to set for the item.\n */\n public toggle(item: ExpandableItem, forceState?: boolean): void {\n const shouldExpand = forceState ?? !this.isExpanded(item);\n if (shouldExpand) {\n this.expand(item);\n } else {\n this.collapse(item);\n }\n }\n\n /**\n * Checks if the specified item is expanded.\n * @param item - The item to check.\n * @returns `true` if the item is expanded, `false` otherwise.\n */\n public isExpanded(item: ExpandableItem): boolean {\n return this.expandedItems.has(item);\n }\n\n /**\n * Checks if there is any expanded item.\n * @returns {boolean} True if there is at least one expanded item, false otherwise.\n */\n public hasExpandedItem(): boolean {\n return this.expandedItems.size > 0;\n }\n}\n","import { booleanAttribute, ChangeDetectorRef, Directive, inject, Input } from '@angular/core';\nimport { getUniqueId } from '@odx/angular/utils';\nimport { ODX_EXPANDABLE_CONTAINER, ODX_EXPANDABLE_ITEM } from '../expandable.tokens';\nimport type { ExpandableContainer, ExpandableItem } from '../facade';\n\n/**\n * `ExpandableItemDirective` allows you to manage the expansion state of an item within an expandable container, such as an accordion or a nested list. It provides methods to expand, collapse, and toggle the item, and automatically registers itself with a parent expandable container if one is available.\n *\n * You can control the expanded state programmatically by binding to the `expanded` property.\n */\n@Directive({\n standalone: true,\n selector: '[odxExpandableItem]',\n exportAs: 'odxExpandableItem',\n providers: [{ provide: ODX_EXPANDABLE_ITEM, useExisting: ExpandableItemDirective }],\n})\nexport class ExpandableItemDirective implements ExpandableItem {\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly childContainers = new Set<ExpandableContainer>();\n private readonly container = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n private _expanded = false;\n\n /** Unique identifier for the expandable item. */\n @Input()\n public id = getUniqueId('odx-expandable-item');\n\n /**\n * Controls the expanded state of the item.\n *\n * @param {boolean} value - When `true`, expands the item; when `false`, collapses the item.\n *\n * @example\n * Bind to the expanded state:\n * ```html\n * <div odxExpandableItem [expanded]=\"isItemExpanded\"></div>\n * ```\n */\n @Input({ transform: booleanAttribute })\n public set expanded(value: boolean) {\n if (this._expanded === value) return;\n this._expanded = value;\n if (this._expanded) {\n this.container?.expand(this);\n } else {\n this.closeAllChildren();\n this.container?.collapse(this);\n }\n this.changeDetectorRef.markForCheck();\n }\n\n /**\n * Gets a value indicating whether the item is expanded.\n * If the item is contained within a container, it checks the container's `isExpanded` method.\n * Otherwise, it returns the value of the `_expanded` property.\n *\n * @type {boolean} `true` if the item is expanded; otherwise, `false`.\n */\n public get expanded(): boolean {\n return this.container?.isExpanded(this) ?? this._expanded;\n }\n\n /**\n * Toggles the expansion state of the item, optionally forcing a specific state.\n *\n * @param {boolean} forceState - When provided, forces the expansion state to the specified value.\n */\n public toggle(forceState?: boolean): void {\n this.expanded = forceState ?? !this.expanded;\n }\n\n /** Expands the item.\n *\n * @returns {void}\n */\n public expand(): void {\n this.toggle(true);\n }\n\n /** Collapses the item.\n *\n * @returns {void}\n */\n public collapse(): void {\n this.toggle(false);\n }\n\n /** Adds a child container to the item.\n *\n * @param {ExpandableContainer} container - The child container to add.\n * @returns {void}\n */\n public addChild(container: ExpandableContainer): void {\n this.childContainers.add(container);\n }\n\n /** Removes a child container from the item.\n *\n * @param {ExpandableContainer} container - The child container to remove.\n * @returns {void}\n */\n public removeChild(container: ExpandableContainer): void {\n this.childContainers.delete(container);\n }\n\n private closeAllChildren(): void {\n this.childContainers.forEach((container) => container.collapseAll());\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ExpandableContainerDirective, ExpandableItemDirective } from './directives';\n\nconst modules = [ExpandableContainerDirective, ExpandableItemDirective];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class ExpandableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,wBAAwB,GAAG,IAAI,cAAc,CAAsB,kDAAkD,EAAE;MACvH,mBAAmB,GAAG,IAAI,cAAc,CAAiB,6CAA6C;;ACAnH;;;;;;;AAOG;MAOU,4BAA4B,CAAA;AANzC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC1C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7E,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAExG;;AAEG;QAEI,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC,eAAe,EAA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AAA;sBADlB,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;;;AClCxC,MAAM,OAAO,GAAG,CAAC,4BAA4B,EAAE,uBAAuB,CAAC,CAAC;MAM3D,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,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,gBAAgB,YANZ,4BAA4B,EAAE,uBAAuB,CAArD,EAAA,OAAA,EAAA,CAAA,4BAA4B,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAMzD,gBAAgB,EAAA,CAAA,CAAA,EAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -2,20 +2,67 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { inject, ChangeDetectorRef, Directive, Input, HostListener } from '@angular/core';
|
|
3
3
|
import { untilDestroyed, injectElement } from '@odx/angular/utils';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* `OptionControl` is an abstract directive that serves as a base class for implementing selectable options in a dropdown
|
|
7
|
+
* list or a similar component. It integrates with CDK's `Highlightable` interface to provide keyboard navigation support.
|
|
8
|
+
*
|
|
9
|
+
* This base class handles the visual feedback for active and selected states and provides a structure for defining
|
|
10
|
+
* how an option is selected.
|
|
11
|
+
*
|
|
12
|
+
* Extend `OptionControl` to create a concrete option component:
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* @Component({
|
|
16
|
+
* selector: 'my-option',
|
|
17
|
+
* templateUrl: './my-option.component.html',
|
|
18
|
+
* providers: [{ provide: OptionControl, useExisting: forwardRef(() => MyOptionComponent) }],
|
|
19
|
+
* })
|
|
20
|
+
* class MyOptionComponent extends OptionControl<MyDataType> {
|
|
21
|
+
* @Input() override value: MyDataType | null = null;
|
|
22
|
+
*
|
|
23
|
+
* protected override selectOption(): void {
|
|
24
|
+
* // Custom logic for when this option is selected
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* Implement `selectOption` in subclasses to define what happens when an option is selected, such as updating a model
|
|
30
|
+
* or closing a dropdown.
|
|
31
|
+
*/
|
|
5
32
|
class OptionControl {
|
|
6
33
|
constructor() {
|
|
7
34
|
this.takeUntilDestroyed = untilDestroyed();
|
|
8
35
|
this.cdr = inject(ChangeDetectorRef);
|
|
9
36
|
this.isActive = false;
|
|
37
|
+
/**
|
|
38
|
+
* Represents the value of the option control.
|
|
39
|
+
*
|
|
40
|
+
* @type {T} - The type of the value.
|
|
41
|
+
*/
|
|
10
42
|
this.value = null;
|
|
11
43
|
this.element = injectElement();
|
|
12
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Sets the active styles for the option control.
|
|
47
|
+
*
|
|
48
|
+
* @returns {void}
|
|
49
|
+
*/
|
|
13
50
|
setActiveStyles() {
|
|
14
51
|
this.isActive = true;
|
|
15
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Sets the inactive styles for the option control.
|
|
55
|
+
*
|
|
56
|
+
* @returns {void}
|
|
57
|
+
*/
|
|
16
58
|
setInactiveStyles() {
|
|
17
59
|
this.isActive = false;
|
|
18
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves the label of the option control.
|
|
63
|
+
*
|
|
64
|
+
* @returns {string} - The label of the option control.
|
|
65
|
+
*/
|
|
19
66
|
getLabel() {
|
|
20
67
|
return this.element.nativeElement.textContent?.trim() ?? '';
|
|
21
68
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-option-control.mjs","sources":["../../../../libs/angular/cdk/option-control/src/lib/option-control.ts","../../../../libs/angular/cdk/option-control/src/odx-angular-cdk-option-control.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { ChangeDetectorRef, Directive, ElementRef, HostListener, inject, Input } from '@angular/core';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\n\n@Directive({\n standalone: true,\n host: {\n role: 'option',\n '[class.odx-option]': 'true',\n '[class.is-active]': 'isActive',\n '[attr.aria-selected]': 'isSelected',\n '[class.is-selected]': 'isSelected',\n },\n})\nexport abstract class OptionControl<T> implements Highlightable {\n protected readonly takeUntilDestroyed = untilDestroyed();\n protected readonly cdr = inject(ChangeDetectorRef);\n\n protected isActive = false;\n\n @Input()\n public value: T | null = null;\n\n public readonly element: ElementRef<HTMLElement> = injectElement();\n\n public setActiveStyles(): void {\n this.isActive = true;\n }\n\n public setInactiveStyles(): void {\n this.isActive = false;\n }\n\n public getLabel(): string {\n return this.element.nativeElement.textContent?.trim() ?? '';\n }\n\n protected abstract selectOption(): void;\n\n @HostListener('click', ['$event'])\n protected select(event: Event): void {\n event.stopPropagation();\n event.preventDefault();\n\n this.selectOption();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-option-control.mjs","sources":["../../../../libs/angular/cdk/option-control/src/lib/option-control.ts","../../../../libs/angular/cdk/option-control/src/odx-angular-cdk-option-control.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { ChangeDetectorRef, Directive, ElementRef, HostListener, inject, Input } from '@angular/core';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\n\n/**\n * `OptionControl` is an abstract directive that serves as a base class for implementing selectable options in a dropdown\n * list or a similar component. It integrates with CDK's `Highlightable` interface to provide keyboard navigation support.\n *\n * This base class handles the visual feedback for active and selected states and provides a structure for defining\n * how an option is selected.\n *\n * Extend `OptionControl` to create a concrete option component:\n * @example\n * ```ts\n * @Component({\n * selector: 'my-option',\n * templateUrl: './my-option.component.html',\n * providers: [{ provide: OptionControl, useExisting: forwardRef(() => MyOptionComponent) }],\n * })\n * class MyOptionComponent extends OptionControl<MyDataType> {\n * @Input() override value: MyDataType | null = null;\n *\n * protected override selectOption(): void {\n * // Custom logic for when this option is selected\n * }\n * }\n * ```\n *\n * Implement `selectOption` in subclasses to define what happens when an option is selected, such as updating a model\n * or closing a dropdown.\n */\n@Directive({\n standalone: true,\n host: {\n role: 'option',\n '[class.odx-option]': 'true',\n '[class.is-active]': 'isActive',\n '[attr.aria-selected]': 'isSelected',\n '[class.is-selected]': 'isSelected',\n },\n})\nexport abstract class OptionControl<T> implements Highlightable {\n protected readonly takeUntilDestroyed = untilDestroyed();\n protected readonly cdr = inject(ChangeDetectorRef);\n\n protected isActive = false;\n\n /**\n * Represents the value of the option control.\n *\n * @type {T} - The type of the value.\n */\n @Input()\n public value: T | null = null;\n\n public readonly element: ElementRef<HTMLElement> = injectElement();\n\n /**\n * Sets the active styles for the option control.\n *\n * @returns {void}\n */\n public setActiveStyles(): void {\n this.isActive = true;\n }\n\n /**\n * Sets the inactive styles for the option control.\n *\n * @returns {void}\n */\n public setInactiveStyles(): void {\n this.isActive = false;\n }\n\n /**\n * Retrieves the label of the option control.\n *\n * @returns {string} - The label of the option control.\n */\n public getLabel(): string {\n return this.element.nativeElement.textContent?.trim() ?? '';\n }\n\n protected abstract selectOption(): void;\n\n @HostListener('click', ['$event'])\n protected select(event: Event): void {\n event.stopPropagation();\n event.preventDefault();\n\n this.selectOption();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;MAWmB,aAAa,CAAA;AAV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AA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,oBAAoB,EAAE,MAAM;AAC5B,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,YAAY;AACpC,qBAAA;AACF,iBAAA,CAAA;8BAaQ,KAAK,EAAA,CAAA;sBADX,KAAK;gBAmCI,MAAM,EAAA,CAAA;sBADf,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACtFnC;;AAEG;;;;"}
|
|
@@ -5,6 +5,17 @@ import { injectElement, booleanToAttributeString } from '@odx/angular/utils';
|
|
|
5
5
|
import { CustomFormControl } from '@odx/angular/cdk/custom-form-control';
|
|
6
6
|
|
|
7
7
|
const RADIO_GROUP_CONTROL = new InjectionToken('@odx/angular/cdk/radio-group-control::RadioGroupControl');
|
|
8
|
+
/**
|
|
9
|
+
* A directive that provides radio group functionality for its child radio button components.
|
|
10
|
+
* It tracks the value and selection state of a group of `odxRadioControl` directives.
|
|
11
|
+
*
|
|
12
|
+
* This directive extends `CustomFormControl` to integrate seamlessly with Angular Forms API,
|
|
13
|
+
* providing form control methods and properties. It supports form control states like disabled
|
|
14
|
+
* and readonly through `DisabledController` and `ReadonlyController` directives.
|
|
15
|
+
*
|
|
16
|
+
* It uses Angular's dependency injection to provide itself as `RADIO_GROUP_CONTROL` token,
|
|
17
|
+
* allowing child radio buttons to communicate with the radio group directive.
|
|
18
|
+
*/
|
|
8
19
|
class RadioGroupControlDirective extends CustomFormControl {
|
|
9
20
|
constructor() {
|
|
10
21
|
super(null);
|
|
@@ -46,6 +57,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
46
57
|
args: ['focusout', ['$event']]
|
|
47
58
|
}] } });
|
|
48
59
|
|
|
60
|
+
/**
|
|
61
|
+
* A directive that provides radio button functionality within a radio group.
|
|
62
|
+
* It tracks the active state based on the current value of the parent `odxRadioGroupControl`.
|
|
63
|
+
*
|
|
64
|
+
* This directive integrates with Angular Forms through `DisabledController` and `ReadonlyController` directives,
|
|
65
|
+
* enabling form control states like disabled and readonly. It automatically updates its classes
|
|
66
|
+
* to reflect these states and the active (checked) state.
|
|
67
|
+
*/
|
|
49
68
|
class RadioControlDirective {
|
|
50
69
|
get ariaChecked() {
|
|
51
70
|
return booleanToAttributeString(this.isActive);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-radio-group-control.mjs","sources":["../../../../libs/angular/cdk/radio-group-control/src/lib/radio-group-control.directive.ts","../../../../libs/angular/cdk/radio-group-control/src/lib/radio-control.directive.ts","../../../../libs/angular/cdk/radio-group-control/src/lib/radio-group-control.module.ts","../../../../libs/angular/cdk/radio-group-control/src/odx-angular-cdk-radio-group-control.ts"],"sourcesContent":["import { Directive, forwardRef, HostListener, InjectionToken } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { injectElement } from '@odx/angular/utils';\n\nexport const RADIO_GROUP_CONTROL = new InjectionToken<RadioGroupControlDirective>('@odx/angular/cdk/radio-group-control::RadioGroupControl');\n\n@Directive({\n standalone: true,\n selector: '[odxRadioGroupControl]',\n providers: [\n {\n provide: RADIO_GROUP_CONTROL,\n useExisting: forwardRef(() => RadioGroupControlDirective),\n multi: false,\n },\n DisabledController.connect(),\n ReadonlyController.connect(),\n ],\n})\nexport class RadioGroupControlDirective<T = unknown> extends CustomFormControl<T | null> {\n private readonly hostElement = injectElement();\n\n constructor() {\n super(null);\n }\n\n @HostListener('focusout', ['$event'])\n public onFocusOut(event: FocusEvent): void {\n if (event.target !== this.hostElement.nativeElement) {\n this.onTouched();\n }\n }\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { detectControllerChanges, DisabledController, ReadonlyController } from '@odx/angular';\nimport { booleanToAttributeString } from '@odx/angular/utils';\nimport { RADIO_GROUP_CONTROL } from './radio-group-control.directive';\n\n@Directive({\n standalone: true,\n selector: '[odxRadioControl]',\n host: {\n '[class.is-active]': 'isActive',\n '[class.is-disabled]': 'disabledController?.disabled',\n '[class.is-readonly]': 'readonlyController?.readonly',\n '[class.has-error]': 'radioGroupControl.hasError',\n },\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n})\nexport class RadioControlDirective<T = unknown> {\n protected readonly disabledController = DisabledController.inject();\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly radioGroupControl = inject(RADIO_GROUP_CONTROL, { skipSelf: true });\n\n @Input()\n public value: T | null = null;\n\n public get ariaChecked(): string {\n return booleanToAttributeString(this.isActive);\n }\n\n public get isActive(): boolean {\n return this.radioGroupControl.value === this.value;\n }\n\n constructor() {\n detectControllerChanges(this.radioGroupControl).subscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RadioControlDirective } from './radio-control.directive';\nimport { RadioGroupControlDirective } from './radio-group-control.directive';\n\nconst modules = [RadioGroupControlDirective, RadioControlDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RadioGroupControlModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc,CAA6B,yDAAyD,EAAE;
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-radio-group-control.mjs","sources":["../../../../libs/angular/cdk/radio-group-control/src/lib/radio-group-control.directive.ts","../../../../libs/angular/cdk/radio-group-control/src/lib/radio-control.directive.ts","../../../../libs/angular/cdk/radio-group-control/src/lib/radio-group-control.module.ts","../../../../libs/angular/cdk/radio-group-control/src/odx-angular-cdk-radio-group-control.ts"],"sourcesContent":["import { Directive, forwardRef, HostListener, InjectionToken } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { injectElement } from '@odx/angular/utils';\n\nexport const RADIO_GROUP_CONTROL = new InjectionToken<RadioGroupControlDirective>('@odx/angular/cdk/radio-group-control::RadioGroupControl');\n\n/**\n * A directive that provides radio group functionality for its child radio button components.\n * It tracks the value and selection state of a group of `odxRadioControl` directives.\n *\n * This directive extends `CustomFormControl` to integrate seamlessly with Angular Forms API,\n * providing form control methods and properties. It supports form control states like disabled\n * and readonly through `DisabledController` and `ReadonlyController` directives.\n *\n * It uses Angular's dependency injection to provide itself as `RADIO_GROUP_CONTROL` token,\n * allowing child radio buttons to communicate with the radio group directive.\n */\n@Directive({\n standalone: true,\n selector: '[odxRadioGroupControl]',\n providers: [\n {\n provide: RADIO_GROUP_CONTROL,\n useExisting: forwardRef(() => RadioGroupControlDirective),\n multi: false,\n },\n DisabledController.connect(),\n ReadonlyController.connect(),\n ],\n})\nexport class RadioGroupControlDirective<T = unknown> extends CustomFormControl<T | null> {\n private readonly hostElement = injectElement();\n\n constructor() {\n super(null);\n }\n\n @HostListener('focusout', ['$event'])\n public onFocusOut(event: FocusEvent): void {\n if (event.target !== this.hostElement.nativeElement) {\n this.onTouched();\n }\n }\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { detectControllerChanges, DisabledController, ReadonlyController } from '@odx/angular';\nimport { booleanToAttributeString } from '@odx/angular/utils';\nimport { RADIO_GROUP_CONTROL } from './radio-group-control.directive';\n\n/**\n * A directive that provides radio button functionality within a radio group.\n * It tracks the active state based on the current value of the parent `odxRadioGroupControl`.\n *\n * This directive integrates with Angular Forms through `DisabledController` and `ReadonlyController` directives,\n * enabling form control states like disabled and readonly. It automatically updates its classes\n * to reflect these states and the active (checked) state.\n */\n@Directive({\n standalone: true,\n selector: '[odxRadioControl]',\n host: {\n '[class.is-active]': 'isActive',\n '[class.is-disabled]': 'disabledController?.disabled',\n '[class.is-readonly]': 'readonlyController?.readonly',\n '[class.has-error]': 'radioGroupControl.hasError',\n },\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n})\nexport class RadioControlDirective<T = unknown> {\n protected readonly disabledController = DisabledController.inject();\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly radioGroupControl = inject(RADIO_GROUP_CONTROL, { skipSelf: true });\n\n @Input()\n public value: T | null = null;\n\n public get ariaChecked(): string {\n return booleanToAttributeString(this.isActive);\n }\n\n public get isActive(): boolean {\n return this.radioGroupControl.value === this.value;\n }\n\n constructor() {\n detectControllerChanges(this.radioGroupControl).subscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RadioControlDirective } from './radio-control.directive';\nimport { RadioGroupControlDirective } from './radio-group-control.directive';\n\nconst modules = [RadioGroupControlDirective, RadioControlDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RadioGroupControlModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc,CAA6B,yDAAyD,EAAE;AAE7I;;;;;;;;;;AAUG;AAcG,MAAO,0BAAwC,SAAQ,iBAA2B,CAAA;AAGtF,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,IAAI,CAAC,CAAC;QAHG,IAAW,CAAA,WAAA,GAAG,aAAa,EAAE,CAAC;KAI9C;AAGM,IAAA,UAAU,CAAC,KAAiB,EAAA;QACjC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,WAAW,CAAC,aAAa,EAAE;YACnD,IAAI,CAAC,SAAS,EAAE,CAAC;AAClB,SAAA;KACF;+GAZU,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA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