@odx/angular 1.0.0-rc.7 → 1.0.0-rc.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/cdk/a11y/README.md +3 -0
- package/cdk/a11y/index.d.ts +2 -0
- package/cdk/a11y/lib/a11y.module.d.ts +11 -0
- package/cdk/a11y/lib/directives/index.d.ts +3 -0
- package/cdk/a11y/lib/directives/interactive.directive.d.ts +11 -0
- package/cdk/a11y/lib/directives/list-focus-manager-option.directive.d.ts +11 -0
- package/cdk/a11y/lib/directives/list-focus-manager.directive.d.ts +12 -0
- package/cdk/active-indicator/lib/active-indicator.directive.d.ts +3 -2
- package/cdk/checkbox-control/lib/checkbox-control.directive.d.ts +1 -1
- package/cdk/connected-overlay/lib/connected-overlay.component.d.ts +1 -1
- package/cdk/connected-overlay/lib/models/connected-overlay-options.d.ts +1 -0
- package/cdk/custom-form-control/lib/control.directive.d.ts +1 -1
- package/cdk/custom-form-control/lib/custom-form-control.d.ts +1 -1
- package/cdk/dynamic-view/lib/dynamic-view.component.d.ts +1 -1
- package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +1 -1
- package/cdk/expandable/index.d.ts +1 -0
- package/cdk/expandable/lib/directives/expandable-item.directive.d.ts +2 -2
- package/cdk/expandable/lib/directives/extandable-container.directive.d.ts +2 -2
- package/cdk/expandable/lib/expandable.tokens.d.ts +3 -0
- package/cdk/expandable/lib/facade/expandable-container.d.ts +4 -4
- package/cdk/expandable/lib/facade/expandable-item.d.ts +6 -6
- package/cdk/radio-group-control/lib/radio-control.directive.d.ts +1 -1
- package/cdk/radio-group-control/lib/radio-group-control.directive.d.ts +1 -1
- package/components/accordion/lib/accordion.component.d.ts +1 -1
- package/components/accordion/lib/components/accordion-item/accordion-item.component.d.ts +1 -1
- package/components/accordion/lib/directives/accordion-item-title.d.ts +1 -1
- package/components/action-group/action-group.component.d.ts +1 -1
- package/components/area-header/area-header.component.d.ts +1 -1
- package/components/area-header/directives/area-header-content.directive.d.ts +1 -1
- package/components/area-header/directives/area-header-subtitle.directive.d.ts +1 -1
- package/components/avatar/lib/avatar.component.d.ts +1 -1
- package/components/badge/lib/badge.component.d.ts +1 -1
- package/components/badge/lib/badge.directive.d.ts +1 -1
- package/components/bar/README.md +3 -0
- package/components/bar/index.d.ts +5 -0
- package/components/bar/lib/bar.component.d.ts +6 -0
- package/components/bar/lib/bar.module.d.ts +10 -0
- package/components/bar/lib/directives/bar-button.directive.d.ts +10 -0
- package/components/bar/lib/directives/bar-label.directive.d.ts +6 -0
- package/components/bar/lib/models/bar-button-variant.d.ts +5 -0
- package/components/breadcrumbs/README.md +3 -0
- package/components/breadcrumbs/index.d.ts +1 -0
- package/components/breadcrumbs/lib/breadcrumbs.component.d.ts +17 -0
- package/components/button/lib/button.component.d.ts +3 -4
- package/components/button-group/lib/button-group.component.d.ts +1 -1
- package/components/checkbox/lib/checkbox.component.d.ts +2 -1
- package/components/checkbox/lib/checkbox.validator.d.ts +1 -1
- package/components/chip/lib/chip.component.d.ts +1 -1
- package/components/circular-progress/lib/circular-progress.component.d.ts +1 -1
- package/components/content-box/lib/content-box.component.d.ts +1 -1
- package/components/content-box/lib/directives/content-box-footer-directive.d.ts +1 -1
- package/components/content-box/lib/directives/content-box-header-directive.d.ts +1 -1
- package/components/dropdown/index.d.ts +2 -0
- package/components/dropdown/lib/dropdown.component.d.ts +2 -1
- package/components/dropdown/lib/dropdown.directive.d.ts +13 -4
- package/components/dropdown/lib/helpers/close-current-dropdown.d.ts +1 -0
- package/components/dropdown/lib/helpers/index.d.ts +1 -0
- package/components/dropdown/lib/models/close-dropdown-event.d.ts +4 -0
- package/components/dropdown/lib/models/dropdown-options.d.ts +1 -1
- package/components/dropdown/lib/models/index.d.ts +1 -0
- package/components/form-field/lib/components/form-field-info/form-field-info.component.d.ts +1 -1
- package/components/form-field/lib/components/form-group/form-group.component.d.ts +1 -1
- package/components/form-field/lib/directives/form-field-control.directive.d.ts +1 -1
- package/components/form-field/lib/directives/form-field-error.directive.d.ts +1 -1
- package/components/form-field/lib/directives/form-field-hint.directive.d.ts +1 -1
- package/components/form-field/lib/directives/form-field-label.directive.d.ts +1 -1
- package/components/form-field/lib/directives/form.directive.d.ts +1 -1
- package/components/form-field/lib/form-field.component.d.ts +2 -1
- package/components/header/lib/directives/header-avatar.directive.d.ts +1 -1
- package/components/header/lib/directives/header-title.directive.d.ts +1 -1
- package/components/header/lib/header.component.d.ts +1 -1
- package/components/header/lib/header.module.d.ts +2 -3
- package/components/icon/lib/icon.component.d.ts +1 -1
- package/components/icon/lib/models/icon-size.d.ts +2 -1
- package/components/inline-message/index.d.ts +1 -1
- package/components/inline-message/lib/inline-message.component.d.ts +2 -2
- package/components/inline-message/lib/models/index.d.ts +1 -0
- package/components/launch-tile/README.md +3 -0
- package/components/launch-tile/index.d.ts +3 -0
- package/components/launch-tile/lib/components/index.d.ts +2 -0
- package/components/launch-tile/lib/components/launch-tile-footer/launch-tile-footer.component.d.ts +5 -0
- package/components/launch-tile/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.d.ts +5 -0
- package/components/launch-tile/lib/launch-tile.component.d.ts +13 -0
- package/components/launch-tile/lib/launch-tile.module.d.ts +14 -0
- package/components/link/link.directive.d.ts +2 -4
- package/components/list/lib/components/index.d.ts +1 -1
- package/components/list/lib/components/{list-item.component.d.ts → list-item/list-item.component.d.ts} +2 -4
- package/components/list/lib/list.component.d.ts +2 -1
- package/components/list/lib/list.module.d.ts +1 -1
- package/components/loading-spinner/lib/loading-spinner.component.d.ts +1 -1
- package/components/loading-spinner/lib/loading-spinner.directive.d.ts +2 -2
- package/components/logo/logo.directive.d.ts +1 -1
- package/components/main-menu/lib/directives/main-menu-button.directive.d.ts +1 -1
- package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +2 -4
- package/components/main-menu/lib/main-menu.component.d.ts +1 -1
- package/components/menu/README.md +3 -0
- package/components/menu/index.d.ts +4 -0
- package/components/menu/lib/directives/index.d.ts +1 -0
- package/components/menu/lib/directives/menu-item.directive.d.ts +9 -0
- package/components/menu/lib/menu.component.d.ts +8 -0
- package/components/menu/lib/menu.directive.d.ts +16 -0
- package/components/menu/lib/menu.module.d.ts +10 -0
- package/components/modal/lib/components/basic-modal/basic-modal.component.d.ts +10 -0
- package/components/modal/lib/components/index.d.ts +2 -0
- package/components/modal/lib/components/modal-footer/modal-footer.component.d.ts +1 -1
- package/components/modal/lib/components/modal-header/modal-header.component.d.ts +1 -1
- package/components/modal/lib/components/modal-hero/modal-hero.component.d.ts +11 -0
- package/components/modal/lib/directives/modal-close.directive.d.ts +2 -2
- package/components/modal/lib/directives/modal-content.directive.d.ts +1 -1
- package/components/modal/lib/directives/modal-dismiss.directive.d.ts +1 -1
- package/components/modal/lib/helpers/inject-modal-ref.d.ts +1 -1
- package/components/modal/lib/modal.component.d.ts +7 -3
- package/components/modal/lib/modal.directive.d.ts +1 -1
- package/components/modal/lib/modal.module.d.ts +9 -8
- package/components/modal/lib/modal.service.d.ts +2 -1
- package/components/modal/lib/models/basic-modal-options.d.ts +17 -0
- package/components/modal/lib/models/index.d.ts +2 -0
- package/components/modal/lib/models/modal-hero-variant.d.ts +7 -0
- package/components/progress/lib/progress.component.d.ts +2 -2
- package/components/radio-group/lib/components/radio-button/radio-button.component.d.ts +2 -2
- package/components/radio-group/lib/radio-group.component.d.ts +1 -1
- package/components/rail-navigation/lib/components/rail-navigation-item.component.d.ts +2 -4
- package/components/rail-navigation/lib/rail-navigation.component.d.ts +1 -1
- package/components/select/lib/components/option/option.component.d.ts +1 -1
- package/components/select/lib/directives/select-search-field.directive.d.ts +1 -1
- package/components/select/lib/select.component.d.ts +4 -4
- package/components/slider/lib/slider.directive.d.ts +2 -3
- package/components/spinbox/lib/spinbox.component.d.ts +2 -2
- package/components/switch/lib/switch.component.d.ts +2 -1
- package/components/switch/lib/switch.validator.d.ts +1 -1
- package/components/tab-bar/README.md +3 -0
- package/components/tab-bar/index.d.ts +4 -0
- package/components/tab-bar/lib/components/index.d.ts +1 -0
- package/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.d.ts +20 -0
- package/components/tab-bar/lib/models/index.d.ts +1 -0
- package/components/tab-bar/lib/models/tab-change-event.d.ts +5 -0
- package/components/tab-bar/lib/tab-bar.component.d.ts +31 -0
- package/components/tab-bar/lib/tab-bar.config.d.ts +3 -0
- package/components/tab-bar/lib/tab-bar.module.d.ts +9 -0
- package/components/toast/README.md +3 -0
- package/components/toast/index.d.ts +5 -0
- package/components/toast/lib/components/index.d.ts +2 -0
- package/components/toast/lib/components/toast-container/toast-container.component.d.ts +23 -0
- package/components/toast/lib/components/toast-item/toast-item.component.d.ts +20 -0
- package/components/toast/lib/models/index.d.ts +5 -0
- package/components/toast/lib/models/toast-action.d.ts +7 -0
- package/components/toast/lib/models/toast-ref.d.ts +7 -0
- package/components/toast/lib/models/toast-variant.d.ts +7 -0
- package/components/toast/lib/models/toast.d.ts +10 -0
- package/components/toast/lib/models/toast.options.d.ts +4 -0
- package/components/toast/lib/toast.config.d.ts +3 -0
- package/components/toast/lib/toast.module.d.ts +13 -0
- package/components/toast/lib/toast.service.d.ts +16 -0
- package/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.d.ts +1 -1
- package/components/toggle-button-group/lib/toggle-button-group.component.d.ts +2 -2
- package/components/tooltip/lib/tooltip.component.d.ts +1 -1
- package/components/tooltip/lib/tooltip.directive.d.ts +1 -1
- package/esm2020/animations/lib/expand.mjs +6 -4
- package/esm2020/cdk/a11y/index.mjs +3 -0
- package/esm2020/cdk/a11y/lib/a11y.module.mjs +19 -0
- package/esm2020/cdk/a11y/lib/directives/index.mjs +4 -0
- package/esm2020/cdk/a11y/lib/directives/interactive.directive.mjs +49 -0
- package/esm2020/cdk/a11y/lib/directives/list-focus-manager-option.directive.mjs +28 -0
- package/esm2020/cdk/a11y/lib/directives/list-focus-manager.directive.mjs +40 -0
- package/esm2020/cdk/a11y/odx-angular-cdk-a11y.mjs +5 -0
- package/esm2020/cdk/active-indicator/lib/active-indicator.directive.mjs +11 -10
- package/esm2020/cdk/checkbox-control/lib/checkbox-control.directive.mjs +4 -4
- package/esm2020/cdk/connected-overlay/lib/connected-overlay.component.mjs +8 -4
- package/esm2020/cdk/connected-overlay/lib/connected-overlay.service.mjs +4 -4
- package/esm2020/cdk/connected-overlay/lib/helpers/compute-overlay-position.mjs +3 -3
- package/esm2020/cdk/connected-overlay/lib/models/connected-overlay-options.mjs +3 -2
- package/esm2020/cdk/custom-form-control/lib/control.directive.mjs +4 -4
- package/esm2020/cdk/custom-form-control/lib/custom-form-control.mjs +4 -4
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.component.mjs +4 -4
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.directive.mjs +4 -4
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.service.mjs +4 -4
- package/esm2020/cdk/expandable/index.mjs +2 -1
- package/esm2020/cdk/expandable/lib/directives/expandable-item.directive.mjs +7 -8
- package/esm2020/cdk/expandable/lib/directives/extandable-container.directive.mjs +5 -7
- package/esm2020/cdk/expandable/lib/expandable.module.mjs +5 -5
- package/esm2020/cdk/expandable/lib/expandable.tokens.mjs +3 -0
- package/esm2020/cdk/expandable/lib/facade/expandable-container.mjs +2 -3
- package/esm2020/cdk/expandable/lib/facade/expandable-item.mjs +2 -3
- package/esm2020/cdk/radio-group-control/lib/radio-control.directive.mjs +4 -4
- package/esm2020/cdk/radio-group-control/lib/radio-group-control.directive.mjs +4 -4
- package/esm2020/cdk/radio-group-control/lib/radio-group-control.module.mjs +5 -5
- package/esm2020/components/accordion/lib/accordion.component.mjs +6 -6
- package/esm2020/components/accordion/lib/accordion.module.mjs +5 -5
- package/esm2020/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +8 -6
- package/esm2020/components/accordion/lib/directives/accordion-item-title.mjs +4 -4
- package/esm2020/components/action-group/action-group.component.mjs +4 -4
- package/esm2020/components/area-header/area-header.component.mjs +4 -4
- package/esm2020/components/area-header/area-header.module.mjs +5 -5
- package/esm2020/components/area-header/directives/area-header-content.directive.mjs +4 -4
- package/esm2020/components/area-header/directives/area-header-subtitle.directive.mjs +4 -4
- package/esm2020/components/avatar/lib/avatar.component.mjs +4 -4
- package/esm2020/components/badge/lib/badge.component.mjs +4 -4
- package/esm2020/components/badge/lib/badge.directive.mjs +4 -4
- package/esm2020/components/bar/index.mjs +6 -0
- package/esm2020/components/bar/lib/bar.component.mjs +21 -0
- package/esm2020/components/bar/lib/bar.module.mjs +20 -0
- package/esm2020/components/bar/lib/directives/bar-button.directive.mjs +39 -0
- package/esm2020/components/bar/lib/directives/bar-label.directive.mjs +24 -0
- package/esm2020/components/bar/lib/models/bar-button-variant.mjs +5 -0
- package/esm2020/components/bar/odx-angular-components-bar.mjs +5 -0
- package/esm2020/components/breadcrumbs/index.mjs +2 -0
- package/esm2020/components/breadcrumbs/lib/breadcrumbs.component.mjs +50 -0
- package/esm2020/components/breadcrumbs/odx-angular-components-breadcrumbs.mjs +5 -0
- package/esm2020/components/button/lib/button.component.mjs +8 -12
- package/esm2020/components/button-group/lib/button-group.component.mjs +4 -4
- package/esm2020/components/checkbox/lib/checkbox.component.mjs +7 -6
- package/esm2020/components/checkbox/lib/checkbox.module.mjs +5 -5
- package/esm2020/components/checkbox/lib/checkbox.validator.mjs +4 -4
- package/esm2020/components/chip/lib/chip.component.mjs +4 -4
- package/esm2020/components/circular-progress/lib/circular-progress.component.mjs +5 -5
- package/esm2020/components/content-box/lib/content-box.component.mjs +4 -4
- package/esm2020/components/content-box/lib/content-box.module.mjs +5 -5
- package/esm2020/components/content-box/lib/directives/content-box-footer-directive.mjs +4 -4
- package/esm2020/components/content-box/lib/directives/content-box-header-directive.mjs +4 -4
- package/esm2020/components/dropdown/index.mjs +3 -1
- package/esm2020/components/dropdown/lib/dropdown.component.mjs +15 -6
- package/esm2020/components/dropdown/lib/dropdown.directive.mjs +48 -17
- package/esm2020/components/dropdown/lib/dropdown.module.mjs +5 -5
- package/esm2020/components/dropdown/lib/helpers/close-current-dropdown.mjs +5 -0
- package/esm2020/components/dropdown/lib/helpers/index.mjs +2 -0
- package/esm2020/components/dropdown/lib/models/close-dropdown-event.mjs +7 -0
- package/esm2020/components/dropdown/lib/models/dropdown-options.mjs +2 -1
- package/esm2020/components/dropdown/lib/models/index.mjs +2 -1
- package/esm2020/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +4 -4
- package/esm2020/components/form-field/lib/components/form-group/form-group.component.mjs +4 -4
- package/esm2020/components/form-field/lib/directives/form-field-control.directive.mjs +4 -4
- package/esm2020/components/form-field/lib/directives/form-field-error.directive.mjs +4 -4
- package/esm2020/components/form-field/lib/directives/form-field-hint.directive.mjs +4 -4
- package/esm2020/components/form-field/lib/directives/form-field-label.directive.mjs +4 -4
- package/esm2020/components/form-field/lib/directives/form.directive.mjs +4 -4
- package/esm2020/components/form-field/lib/form-field.component.mjs +8 -7
- package/esm2020/components/form-field/lib/form-field.module.mjs +5 -5
- package/esm2020/components/form-field/lib/form-field.service.mjs +4 -4
- package/esm2020/components/form-field/lib/services/form-field-error.service.mjs +4 -4
- package/esm2020/components/header/lib/directives/header-avatar.directive.mjs +4 -4
- package/esm2020/components/header/lib/directives/header-title.directive.mjs +4 -4
- package/esm2020/components/header/lib/header.component.mjs +5 -6
- package/esm2020/components/header/lib/header.module.mjs +7 -11
- package/esm2020/components/icon/lib/icon.component.mjs +4 -4
- package/esm2020/components/icon/lib/models/icon-size.mjs +2 -1
- package/esm2020/components/inline-message/index.mjs +2 -2
- package/esm2020/components/inline-message/lib/inline-message.component.mjs +5 -5
- package/esm2020/components/inline-message/lib/models/index.mjs +2 -0
- package/esm2020/components/launch-tile/index.mjs +4 -0
- package/esm2020/components/launch-tile/lib/components/index.mjs +3 -0
- package/esm2020/components/launch-tile/lib/components/launch-tile-footer/launch-tile-footer.component.mjs +13 -0
- package/esm2020/components/launch-tile/lib/components/launch-tile-subtitle/launch-tile-subtitle.component.mjs +13 -0
- package/esm2020/components/launch-tile/lib/launch-tile.component.mjs +51 -0
- package/esm2020/components/launch-tile/lib/launch-tile.module.mjs +23 -0
- package/esm2020/components/launch-tile/odx-angular-components-launch-tile.mjs +5 -0
- package/esm2020/components/link/link.directive.mjs +7 -14
- package/esm2020/components/list/lib/components/index.mjs +2 -2
- package/esm2020/components/list/lib/components/list-item/list-item.component.mjs +40 -0
- package/esm2020/components/list/lib/list.component.mjs +17 -9
- package/esm2020/components/list/lib/list.module.mjs +6 -6
- package/esm2020/components/loading-spinner/lib/loading-spinner.component.mjs +4 -4
- package/esm2020/components/loading-spinner/lib/loading-spinner.directive.mjs +9 -9
- package/esm2020/components/loading-spinner/lib/loading-spinner.module.mjs +5 -5
- package/esm2020/components/logo/logo.directive.mjs +4 -4
- package/esm2020/components/main-menu/lib/directives/main-menu-button.directive.mjs +4 -4
- package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +7 -13
- package/esm2020/components/main-menu/lib/main-menu.component.mjs +8 -8
- package/esm2020/components/main-menu/lib/main-menu.module.mjs +5 -5
- package/esm2020/components/main-menu/lib/main-menu.service.mjs +4 -4
- package/esm2020/components/menu/index.mjs +5 -0
- package/esm2020/components/menu/lib/directives/index.mjs +2 -0
- package/esm2020/components/menu/lib/directives/menu-item.directive.mjs +39 -0
- package/esm2020/components/menu/lib/menu.component.mjs +35 -0
- package/esm2020/components/menu/lib/menu.directive.mjs +51 -0
- package/esm2020/components/menu/lib/menu.module.mjs +20 -0
- package/esm2020/components/menu/odx-angular-components-menu.mjs +5 -0
- package/esm2020/components/modal/lib/components/basic-modal/basic-modal.component.mjs +42 -0
- package/esm2020/components/modal/lib/components/index.mjs +3 -1
- package/esm2020/components/modal/lib/components/modal-footer/modal-footer.component.mjs +4 -4
- package/esm2020/components/modal/lib/components/modal-header/modal-header.component.mjs +4 -4
- package/esm2020/components/modal/lib/components/modal-hero/modal-hero.component.mjs +39 -0
- package/esm2020/components/modal/lib/directives/modal-close.directive.mjs +10 -5
- package/esm2020/components/modal/lib/directives/modal-content.directive.mjs +4 -4
- package/esm2020/components/modal/lib/directives/modal-dismiss.directive.mjs +4 -4
- package/esm2020/components/modal/lib/helpers/inject-modal-ref.mjs +1 -1
- package/esm2020/components/modal/lib/modal.component.mjs +19 -9
- package/esm2020/components/modal/lib/modal.directive.mjs +4 -4
- package/esm2020/components/modal/lib/modal.module.mjs +33 -7
- package/esm2020/components/modal/lib/modal.service.mjs +14 -5
- package/esm2020/components/modal/lib/models/basic-modal-options.mjs +2 -0
- package/esm2020/components/modal/lib/models/index.mjs +3 -1
- package/esm2020/components/modal/lib/models/modal-hero-variant.mjs +7 -0
- package/esm2020/components/modal/lib/services/open-modal-manager.service.mjs +4 -4
- package/esm2020/components/progress/lib/progress.component.mjs +6 -6
- package/esm2020/components/radio-group/lib/components/radio-button/radio-button.component.mjs +8 -9
- package/esm2020/components/radio-group/lib/radio-group.component.mjs +6 -6
- package/esm2020/components/radio-group/lib/radio-group.module.mjs +5 -5
- package/esm2020/components/rail-navigation/lib/components/rail-navigation-item.component.mjs +7 -12
- package/esm2020/components/rail-navigation/lib/rail-navigation.component.mjs +4 -4
- package/esm2020/components/rail-navigation/lib/rail-navigation.module.mjs +5 -5
- package/esm2020/components/select/lib/components/option/option.component.mjs +5 -5
- package/esm2020/components/select/lib/directives/select-search-field.directive.mjs +4 -4
- package/esm2020/components/select/lib/pipes/select-search-filter.pipe.mjs +4 -4
- package/esm2020/components/select/lib/select.component.mjs +15 -19
- package/esm2020/components/select/lib/select.module.mjs +5 -5
- package/esm2020/components/slider/lib/slider.directive.mjs +7 -10
- package/esm2020/components/spinbox/lib/spinbox.component.mjs +5 -5
- package/esm2020/components/switch/lib/switch.component.mjs +7 -6
- package/esm2020/components/switch/lib/switch.module.mjs +5 -5
- package/esm2020/components/switch/lib/switch.validator.mjs +4 -4
- package/esm2020/components/tab-bar/index.mjs +5 -0
- package/esm2020/components/tab-bar/lib/components/index.mjs +2 -0
- package/esm2020/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.mjs +70 -0
- package/esm2020/components/tab-bar/lib/models/index.mjs +2 -0
- package/esm2020/components/tab-bar/lib/models/tab-change-event.mjs +2 -0
- package/esm2020/components/tab-bar/lib/tab-bar.component.mjs +115 -0
- package/esm2020/components/tab-bar/lib/tab-bar.config.mjs +3 -0
- package/esm2020/components/tab-bar/lib/tab-bar.module.mjs +19 -0
- package/esm2020/components/tab-bar/odx-angular-components-tab-bar.mjs +5 -0
- package/esm2020/components/toast/index.mjs +6 -0
- package/esm2020/components/toast/lib/components/index.mjs +3 -0
- package/esm2020/components/toast/lib/components/toast-container/toast-container.component.mjs +87 -0
- package/esm2020/components/toast/lib/components/toast-item/toast-item.component.mjs +74 -0
- package/esm2020/components/toast/lib/models/index.mjs +6 -0
- package/esm2020/components/toast/lib/models/toast-action.mjs +2 -0
- package/esm2020/components/toast/lib/models/toast-ref.mjs +2 -0
- package/esm2020/components/toast/lib/models/toast-variant.mjs +7 -0
- package/esm2020/components/toast/lib/models/toast.mjs +2 -0
- package/esm2020/components/toast/lib/models/toast.options.mjs +2 -0
- package/esm2020/components/toast/lib/toast.config.mjs +6 -0
- package/esm2020/components/toast/lib/toast.module.mjs +26 -0
- package/esm2020/components/toast/lib/toast.service.mjs +38 -0
- package/esm2020/components/toast/odx-angular-components-toast.mjs +5 -0
- package/esm2020/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +6 -10
- package/esm2020/components/toggle-button-group/lib/toggle-button-group.component.mjs +15 -7
- package/esm2020/components/toggle-button-group/lib/toggle-button-group.module.mjs +5 -5
- package/esm2020/components/tooltip/lib/tooltip.component.mjs +4 -4
- package/esm2020/components/tooltip/lib/tooltip.directive.mjs +4 -4
- package/esm2020/lib/controllers/controller.mjs +6 -6
- package/esm2020/lib/controllers/disabled.controller.mjs +21 -42
- package/esm2020/lib/controllers/readonly.controller.mjs +6 -6
- package/esm2020/lib/core.module.mjs +7 -7
- package/esm2020/lib/directives/click-outside.directive.mjs +7 -6
- package/esm2020/lib/directives/index.mjs +4 -1
- package/esm2020/lib/directives/let.directive.mjs +36 -0
- package/esm2020/lib/directives/with-disabled-state.directive.mjs +41 -0
- package/esm2020/lib/directives/with-tabindex.directive.mjs +23 -0
- package/esm2020/lib/services/window-ref.mjs +9 -5
- package/esm2020/rxjs/index.mjs +2 -1
- package/esm2020/rxjs/lib/form-query-list.mjs +5 -0
- package/esm2020/utils/lib/helpers/dom.mjs +8 -1
- package/esm2020/utils/lib/helpers/event-manager.mjs +4 -4
- package/esm2020/utils/lib/helpers/get-unique-id.mjs +7 -0
- package/esm2020/utils/lib/helpers/index.mjs +3 -1
- package/esm2020/utils/lib/helpers/provide-module-config.mjs +1 -1
- package/esm2020/utils/lib/helpers/queue.mjs +24 -0
- package/fesm2015/odx-angular-animations.mjs +5 -3
- package/fesm2015/odx-angular-animations.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-a11y.mjs +132 -0
- package/fesm2015/odx-angular-cdk-a11y.mjs.map +1 -0
- package/fesm2015/odx-angular-cdk-active-indicator.mjs +12 -9
- package/fesm2015/odx-angular-cdk-active-indicator.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-checkbox-control.mjs +3 -3
- package/fesm2015/odx-angular-cdk-checkbox-control.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-connected-overlay.mjs +14 -9
- package/fesm2015/odx-angular-cdk-connected-overlay.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-custom-form-control.mjs +6 -6
- package/fesm2015/odx-angular-cdk-custom-form-control.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-dynamic-view.mjs +9 -9
- package/fesm2015/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-expandable.mjs +16 -22
- package/fesm2015/odx-angular-cdk-expandable.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-radio-group-control.mjs +10 -10
- package/fesm2015/odx-angular-cdk-radio-group-control.mjs.map +1 -1
- package/fesm2015/odx-angular-components-accordion.mjs +19 -17
- package/fesm2015/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2015/odx-angular-components-action-group.mjs +3 -3
- package/fesm2015/odx-angular-components-action-group.mjs.map +1 -1
- package/fesm2015/odx-angular-components-area-header.mjs +13 -13
- package/fesm2015/odx-angular-components-area-header.mjs.map +1 -1
- package/fesm2015/odx-angular-components-avatar.mjs +3 -3
- package/fesm2015/odx-angular-components-avatar.mjs.map +1 -1
- package/fesm2015/odx-angular-components-badge.mjs +6 -6
- package/fesm2015/odx-angular-components-badge.mjs.map +1 -1
- package/fesm2015/odx-angular-components-bar.mjs +96 -0
- package/fesm2015/odx-angular-components-bar.mjs.map +1 -0
- package/fesm2015/odx-angular-components-breadcrumbs.mjs +56 -0
- package/fesm2015/odx-angular-components-breadcrumbs.mjs.map +1 -0
- package/fesm2015/odx-angular-components-button-group.mjs +3 -3
- package/fesm2015/odx-angular-components-button-group.mjs.map +1 -1
- package/fesm2015/odx-angular-components-button.mjs +7 -11
- package/fesm2015/odx-angular-components-button.mjs.map +1 -1
- package/fesm2015/odx-angular-components-checkbox.mjs +13 -12
- package/fesm2015/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2015/odx-angular-components-chip.mjs +3 -3
- package/fesm2015/odx-angular-components-chip.mjs.map +1 -1
- package/fesm2015/odx-angular-components-circular-progress.mjs +4 -4
- package/fesm2015/odx-angular-components-circular-progress.mjs.map +1 -1
- package/fesm2015/odx-angular-components-content-box.mjs +13 -13
- package/fesm2015/odx-angular-components-content-box.mjs.map +1 -1
- package/fesm2015/odx-angular-components-dropdown.mjs +92 -40
- package/fesm2015/odx-angular-components-dropdown.mjs.map +1 -1
- package/fesm2015/odx-angular-components-form-field.mjs +37 -36
- package/fesm2015/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2015/odx-angular-components-header.mjs +16 -20
- package/fesm2015/odx-angular-components-header.mjs.map +1 -1
- package/fesm2015/odx-angular-components-icon.mjs +4 -3
- package/fesm2015/odx-angular-components-icon.mjs.map +1 -1
- package/fesm2015/odx-angular-components-inline-message.mjs +3 -3
- package/fesm2015/odx-angular-components-inline-message.mjs.map +1 -1
- package/fesm2015/odx-angular-components-launch-tile.mjs +95 -0
- package/fesm2015/odx-angular-components-launch-tile.mjs.map +1 -0
- package/fesm2015/odx-angular-components-link.mjs +6 -14
- package/fesm2015/odx-angular-components-link.mjs.map +1 -1
- package/fesm2015/odx-angular-components-list.mjs +22 -25
- package/fesm2015/odx-angular-components-list.mjs.map +1 -1
- package/fesm2015/odx-angular-components-loading-spinner.mjs +15 -15
- package/fesm2015/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2015/odx-angular-components-logo.mjs +3 -3
- package/fesm2015/odx-angular-components-logo.mjs.map +1 -1
- package/fesm2015/odx-angular-components-main-menu.mjs +22 -30
- package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2015/odx-angular-components-menu.mjs +127 -0
- package/fesm2015/odx-angular-components-menu.mjs.map +1 -0
- package/fesm2015/odx-angular-components-modal.mjs +161 -55
- package/fesm2015/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2015/odx-angular-components-progress.mjs +5 -5
- package/fesm2015/odx-angular-components-progress.mjs.map +1 -1
- package/fesm2015/odx-angular-components-radio-group.mjs +15 -16
- package/fesm2015/odx-angular-components-radio-group.mjs.map +1 -1
- package/fesm2015/odx-angular-components-rail-navigation.mjs +13 -19
- package/fesm2015/odx-angular-components-rail-navigation.mjs.map +1 -1
- package/fesm2015/odx-angular-components-select.mjs +28 -32
- package/fesm2015/odx-angular-components-select.mjs.map +1 -1
- package/fesm2015/odx-angular-components-slider.mjs +6 -9
- package/fesm2015/odx-angular-components-slider.mjs.map +1 -1
- package/fesm2015/odx-angular-components-spinbox.mjs +5 -5
- package/fesm2015/odx-angular-components-spinbox.mjs.map +1 -1
- package/fesm2015/odx-angular-components-switch.mjs +13 -12
- package/fesm2015/odx-angular-components-switch.mjs.map +1 -1
- package/fesm2015/odx-angular-components-tab-bar.mjs +200 -0
- package/fesm2015/odx-angular-components-tab-bar.mjs.map +1 -0
- package/fesm2015/odx-angular-components-toast.mjs +221 -0
- package/fesm2015/odx-angular-components-toast.mjs.map +1 -0
- package/fesm2015/odx-angular-components-toggle-button-group.mjs +23 -19
- package/fesm2015/odx-angular-components-toggle-button-group.mjs.map +1 -1
- package/fesm2015/odx-angular-components-tooltip.mjs +6 -6
- package/fesm2015/odx-angular-components-tooltip.mjs.map +1 -1
- package/fesm2015/odx-angular-rxjs.mjs +6 -2
- package/fesm2015/odx-angular-rxjs.mjs.map +1 -1
- package/fesm2015/odx-angular-utils.mjs +41 -5
- package/fesm2015/odx-angular-utils.mjs.map +1 -1
- package/fesm2015/odx-angular.mjs +140 -64
- package/fesm2015/odx-angular.mjs.map +1 -1
- package/fesm2020/odx-angular-animations.mjs +5 -3
- package/fesm2020/odx-angular-animations.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-a11y.mjs +128 -0
- package/fesm2020/odx-angular-cdk-a11y.mjs.map +1 -0
- package/fesm2020/odx-angular-cdk-active-indicator.mjs +10 -9
- package/fesm2020/odx-angular-cdk-active-indicator.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-checkbox-control.mjs +3 -3
- package/fesm2020/odx-angular-cdk-checkbox-control.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-connected-overlay.mjs +14 -9
- package/fesm2020/odx-angular-cdk-connected-overlay.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-custom-form-control.mjs +6 -6
- package/fesm2020/odx-angular-cdk-custom-form-control.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-dynamic-view.mjs +9 -9
- package/fesm2020/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-expandable.mjs +16 -22
- package/fesm2020/odx-angular-cdk-expandable.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-radio-group-control.mjs +10 -10
- package/fesm2020/odx-angular-cdk-radio-group-control.mjs.map +1 -1
- package/fesm2020/odx-angular-components-accordion.mjs +19 -17
- package/fesm2020/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2020/odx-angular-components-action-group.mjs +3 -3
- package/fesm2020/odx-angular-components-action-group.mjs.map +1 -1
- package/fesm2020/odx-angular-components-area-header.mjs +13 -13
- package/fesm2020/odx-angular-components-area-header.mjs.map +1 -1
- package/fesm2020/odx-angular-components-avatar.mjs +3 -3
- package/fesm2020/odx-angular-components-avatar.mjs.map +1 -1
- package/fesm2020/odx-angular-components-badge.mjs +6 -6
- package/fesm2020/odx-angular-components-badge.mjs.map +1 -1
- package/fesm2020/odx-angular-components-bar.mjs +96 -0
- package/fesm2020/odx-angular-components-bar.mjs.map +1 -0
- package/fesm2020/odx-angular-components-breadcrumbs.mjs +56 -0
- package/fesm2020/odx-angular-components-breadcrumbs.mjs.map +1 -0
- package/fesm2020/odx-angular-components-button-group.mjs +3 -3
- package/fesm2020/odx-angular-components-button-group.mjs.map +1 -1
- package/fesm2020/odx-angular-components-button.mjs +7 -11
- package/fesm2020/odx-angular-components-button.mjs.map +1 -1
- package/fesm2020/odx-angular-components-checkbox.mjs +13 -12
- package/fesm2020/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2020/odx-angular-components-chip.mjs +3 -3
- package/fesm2020/odx-angular-components-chip.mjs.map +1 -1
- package/fesm2020/odx-angular-components-circular-progress.mjs +4 -4
- package/fesm2020/odx-angular-components-circular-progress.mjs.map +1 -1
- package/fesm2020/odx-angular-components-content-box.mjs +13 -13
- package/fesm2020/odx-angular-components-content-box.mjs.map +1 -1
- package/fesm2020/odx-angular-components-dropdown.mjs +91 -40
- package/fesm2020/odx-angular-components-dropdown.mjs.map +1 -1
- package/fesm2020/odx-angular-components-form-field.mjs +37 -36
- package/fesm2020/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2020/odx-angular-components-header.mjs +16 -20
- package/fesm2020/odx-angular-components-header.mjs.map +1 -1
- package/fesm2020/odx-angular-components-icon.mjs +4 -3
- package/fesm2020/odx-angular-components-icon.mjs.map +1 -1
- package/fesm2020/odx-angular-components-inline-message.mjs +3 -3
- package/fesm2020/odx-angular-components-inline-message.mjs.map +1 -1
- package/fesm2020/odx-angular-components-launch-tile.mjs +94 -0
- package/fesm2020/odx-angular-components-launch-tile.mjs.map +1 -0
- package/fesm2020/odx-angular-components-link.mjs +6 -13
- package/fesm2020/odx-angular-components-link.mjs.map +1 -1
- package/fesm2020/odx-angular-components-list.mjs +22 -24
- package/fesm2020/odx-angular-components-list.mjs.map +1 -1
- package/fesm2020/odx-angular-components-loading-spinner.mjs +15 -15
- package/fesm2020/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2020/odx-angular-components-logo.mjs +3 -3
- package/fesm2020/odx-angular-components-logo.mjs.map +1 -1
- package/fesm2020/odx-angular-components-main-menu.mjs +22 -29
- package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2020/odx-angular-components-menu.mjs +129 -0
- package/fesm2020/odx-angular-components-menu.mjs.map +1 -0
- package/fesm2020/odx-angular-components-modal.mjs +166 -55
- package/fesm2020/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2020/odx-angular-components-progress.mjs +5 -5
- package/fesm2020/odx-angular-components-progress.mjs.map +1 -1
- package/fesm2020/odx-angular-components-radio-group.mjs +15 -16
- package/fesm2020/odx-angular-components-radio-group.mjs.map +1 -1
- package/fesm2020/odx-angular-components-rail-navigation.mjs +13 -18
- package/fesm2020/odx-angular-components-rail-navigation.mjs.map +1 -1
- package/fesm2020/odx-angular-components-select.mjs +28 -32
- package/fesm2020/odx-angular-components-select.mjs.map +1 -1
- package/fesm2020/odx-angular-components-slider.mjs +6 -9
- package/fesm2020/odx-angular-components-slider.mjs.map +1 -1
- package/fesm2020/odx-angular-components-spinbox.mjs +5 -5
- package/fesm2020/odx-angular-components-spinbox.mjs.map +1 -1
- package/fesm2020/odx-angular-components-switch.mjs +13 -12
- package/fesm2020/odx-angular-components-switch.mjs.map +1 -1
- package/fesm2020/odx-angular-components-tab-bar.mjs +195 -0
- package/fesm2020/odx-angular-components-tab-bar.mjs.map +1 -0
- package/fesm2020/odx-angular-components-toast.mjs +220 -0
- package/fesm2020/odx-angular-components-toast.mjs.map +1 -0
- package/fesm2020/odx-angular-components-toggle-button-group.mjs +23 -19
- package/fesm2020/odx-angular-components-toggle-button-group.mjs.map +1 -1
- package/fesm2020/odx-angular-components-tooltip.mjs +6 -6
- package/fesm2020/odx-angular-components-tooltip.mjs.map +1 -1
- package/fesm2020/odx-angular-rxjs.mjs +6 -2
- package/fesm2020/odx-angular-rxjs.mjs.map +1 -1
- package/fesm2020/odx-angular-utils.mjs +42 -5
- package/fesm2020/odx-angular-utils.mjs.map +1 -1
- package/fesm2020/odx-angular.mjs +137 -63
- package/fesm2020/odx-angular.mjs.map +1 -1
- package/lib/controllers/controller.d.ts +1 -1
- package/lib/controllers/disabled.controller.d.ts +4 -9
- package/lib/controllers/readonly.controller.d.ts +4 -2
- package/lib/core.module.d.ts +3 -2
- package/lib/directives/click-outside.directive.d.ts +1 -1
- package/lib/directives/index.d.ts +3 -0
- package/lib/directives/let.directive.d.ts +17 -0
- package/lib/directives/with-disabled-state.directive.d.ts +13 -0
- package/lib/directives/with-tabindex.directive.d.ts +7 -0
- package/lib/services/window-ref.d.ts +2 -0
- package/package.json +67 -11
- package/rxjs/index.d.ts +1 -0
- package/rxjs/lib/form-query-list.d.ts +3 -0
- package/utils/lib/helpers/dom.d.ts +1 -0
- package/utils/lib/helpers/get-unique-id.d.ts +1 -0
- package/utils/lib/helpers/index.d.ts +2 -0
- package/utils/lib/helpers/provide-module-config.d.ts +1 -1
- package/utils/lib/helpers/queue.d.ts +11 -0
- package/esm2020/components/list/lib/components/list-item.component.mjs +0 -46
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { InjectionToken, inject, ElementRef, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, HostListener, ChangeDetectorRef, ViewChild, ViewChildren, ContentChildren, NgModule } from '@angular/core';
|
|
7
|
+
import { DisabledController, CoreModule } from '@odx/angular';
|
|
8
|
+
import { IconComponent } from '@odx/angular/components/icon';
|
|
9
|
+
import { CSSComponent, CSSModifier } from '@odx/angular/internal';
|
|
10
|
+
import { deferFn, Transform, untilDestroyed, injectElement, applyStyles, cssTranslate, px } from '@odx/angular/utils';
|
|
11
|
+
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
12
|
+
import { ActiveIndicatorDirective } from '@odx/angular/cdk/active-indicator';
|
|
13
|
+
import { fromQueryList, fromElementResize$ } from '@odx/angular/rxjs';
|
|
14
|
+
import { BehaviorSubject, merge, debounceTime, tap, fromEvent } from 'rxjs';
|
|
15
|
+
|
|
16
|
+
const TAB_BAR = new InjectionToken('tabBar');
|
|
17
|
+
|
|
18
|
+
let TabBarItemComponent = class TabBarItemComponent {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.disabledController = DisabledController.inject();
|
|
21
|
+
this.tabBar = inject(TAB_BAR);
|
|
22
|
+
this.isActive = false;
|
|
23
|
+
this.element = inject(ElementRef);
|
|
24
|
+
this.closable = false;
|
|
25
|
+
this.tabClose = new EventEmitter();
|
|
26
|
+
}
|
|
27
|
+
get disabled() {
|
|
28
|
+
return !!this.disabledController?.disabled;
|
|
29
|
+
}
|
|
30
|
+
setActiveStyles() {
|
|
31
|
+
deferFn(() => (this.isActive = true));
|
|
32
|
+
}
|
|
33
|
+
setInactiveStyles() {
|
|
34
|
+
deferFn(() => (this.isActive = false));
|
|
35
|
+
}
|
|
36
|
+
onClick() {
|
|
37
|
+
if (this.disabled)
|
|
38
|
+
return;
|
|
39
|
+
this.tabBar.activateItem(this);
|
|
40
|
+
}
|
|
41
|
+
handleClose(event) {
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
if (this.disabled || !this.closable)
|
|
44
|
+
return;
|
|
45
|
+
this.tabBar.removeItem(this);
|
|
46
|
+
this.tabClose.emit(this);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
TabBarItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: TabBarItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
+
TabBarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: TabBarItemComponent, isStandalone: true, selector: "odx-tab-bar-item", inputs: { closable: "closable" }, outputs: { tabClose: "tabClose" }, host: { attributes: { "role": "tab" }, listeners: { "click": "onClick()" }, properties: { "class.is-disabled": "disabled", "class.is-active": "isActive", "attr.aria-selected": "isActive", "class.is-closable": "closable" } }, providers: [DisabledController.connect()], ngImport: i0, template: "<ng-content select=\"odx-icon\"></ng-content>\n<ng-content></ng-content>\n<odx-icon name=\"close\" size=\"small\" *ngIf=\"closable\" (click)=\"handleClose($event)\"></odx-icon>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
51
|
+
__decorate([
|
|
52
|
+
Transform(coerceBooleanProperty),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], TabBarItemComponent.prototype, "closable", void 0);
|
|
55
|
+
TabBarItemComponent = __decorate([
|
|
56
|
+
CSSComponent('tab-bar-item')
|
|
57
|
+
], TabBarItemComponent);
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: TabBarItemComponent, decorators: [{
|
|
59
|
+
type: Component,
|
|
60
|
+
args: [{ selector: 'odx-tab-bar-item', standalone: true, imports: [CommonModule, IconComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DisabledController.connect()], host: {
|
|
61
|
+
'[class.is-disabled]': 'disabled',
|
|
62
|
+
'[class.is-active]': 'isActive',
|
|
63
|
+
'[attr.aria-selected]': 'isActive',
|
|
64
|
+
'[class.is-closable]': 'closable',
|
|
65
|
+
role: 'tab',
|
|
66
|
+
}, template: "<ng-content select=\"odx-icon\"></ng-content>\n<ng-content></ng-content>\n<odx-icon name=\"close\" size=\"small\" *ngIf=\"closable\" (click)=\"handleClose($event)\"></odx-icon>\n" }]
|
|
67
|
+
}], propDecorators: { closable: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], tabClose: [{
|
|
70
|
+
type: Output
|
|
71
|
+
}], onClick: [{
|
|
72
|
+
type: HostListener,
|
|
73
|
+
args: ['click']
|
|
74
|
+
}] } });
|
|
75
|
+
|
|
76
|
+
var TabBarComponent_1;
|
|
77
|
+
let TabBarComponent = TabBarComponent_1 = class TabBarComponent {
|
|
78
|
+
constructor() {
|
|
79
|
+
this.changeDetector = inject(ChangeDetectorRef);
|
|
80
|
+
this.takeUntilDestroyed = untilDestroyed();
|
|
81
|
+
this.selectedIndex$$ = new BehaviorSubject(0);
|
|
82
|
+
this.activeItem = null;
|
|
83
|
+
this.element = injectElement();
|
|
84
|
+
this.overflowLeft = false;
|
|
85
|
+
this.overflowRight = false;
|
|
86
|
+
this.selectedTabChanged = new EventEmitter();
|
|
87
|
+
}
|
|
88
|
+
set selectedIndex(value) {
|
|
89
|
+
this.selectedIndex$$.next(coerceNumberProperty(value));
|
|
90
|
+
}
|
|
91
|
+
ngAfterViewInit() {
|
|
92
|
+
this.keyManager = new ActiveDescendantKeyManager(this.tabs).withWrap().withHomeAndEnd().withHorizontalOrientation('ltr').withVerticalOrientation(false);
|
|
93
|
+
const updatePanelPosition$ = merge(this.selectedTabChanged, fromQueryList(this.tabs), fromElementResize$(this.element.nativeElement)).pipe(debounceTime(0), tap(() => this.updatePanelPosition()));
|
|
94
|
+
const updateActionVisibility$ = fromEvent(this.tabBarPanelElement.nativeElement, 'transitionend').pipe(tap(({ target }) => target === this.tabBarPanelElement.nativeElement && this.updateActionVisbility()));
|
|
95
|
+
const activeItemChange$ = merge(this.keyManager.change.pipe(tap(() => this.activeItemChange())), this.selectedIndex$$.pipe(tap((index) => this.keyManager?.setActiveItem(index))));
|
|
96
|
+
merge(activeItemChange$, updatePanelPosition$, updateActionVisibility$).pipe(this.takeUntilDestroyed()).subscribe();
|
|
97
|
+
}
|
|
98
|
+
activateItem(item) {
|
|
99
|
+
if (item === this.activeItem)
|
|
100
|
+
return;
|
|
101
|
+
const selectedIndex = item ? this.tabs.toArray().indexOf(item) : -1;
|
|
102
|
+
this.keyManager?.setActiveItem(selectedIndex);
|
|
103
|
+
}
|
|
104
|
+
removeItem(item) {
|
|
105
|
+
if (this.activeItem !== item)
|
|
106
|
+
return;
|
|
107
|
+
deferFn(() => this.keyManager?.setPreviousItemActive());
|
|
108
|
+
}
|
|
109
|
+
onKeydown(event) {
|
|
110
|
+
this.keyManager?.onKeydown(event);
|
|
111
|
+
}
|
|
112
|
+
updatePanelPosition() {
|
|
113
|
+
const activeElement = this.activeItem?.element.nativeElement;
|
|
114
|
+
if (!activeElement)
|
|
115
|
+
return;
|
|
116
|
+
const panelRect = this.tabBarPanelElement.nativeElement.getBoundingClientRect();
|
|
117
|
+
const tabBarRect = this.element.nativeElement.getBoundingClientRect();
|
|
118
|
+
const maxPanelPositionX = Math.floor(tabBarRect.width - panelRect.width);
|
|
119
|
+
const panelPositionX = tabBarRect.width / 2 - activeElement.offsetLeft - activeElement.offsetWidth / 2;
|
|
120
|
+
const positionX = Math.min(0, Math.max(panelPositionX, maxPanelPositionX));
|
|
121
|
+
applyStyles(this.tabBarPanelElement.nativeElement, {
|
|
122
|
+
transform: cssTranslate(px(positionX), 0),
|
|
123
|
+
});
|
|
124
|
+
this.updateActionVisbility();
|
|
125
|
+
}
|
|
126
|
+
updateActionVisbility() {
|
|
127
|
+
const panelRect = this.tabBarPanelElement.nativeElement.getBoundingClientRect();
|
|
128
|
+
const tabBarRect = this.element.nativeElement.getBoundingClientRect();
|
|
129
|
+
this.overflowLeft = panelRect.left < tabBarRect.left;
|
|
130
|
+
this.overflowRight = panelRect.right > tabBarRect.right;
|
|
131
|
+
this.changeDetector.detectChanges();
|
|
132
|
+
}
|
|
133
|
+
activeItemChange() {
|
|
134
|
+
const { activeItemIndex, activeItem } = this.keyManager ?? {};
|
|
135
|
+
this.activeItem = activeItem ?? null;
|
|
136
|
+
this.selectedTabChanged.emit({ selectedIndex: activeItemIndex ?? -1, selectedTab: this.keyManager?.activeItem ?? null });
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
TabBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: TabBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
+
TabBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: TabBarComponent, isStandalone: true, selector: "odx-tab-bar", inputs: { selectedIndex: "selectedIndex" }, outputs: { selectedTabChanged: "selectedTabChanged" }, host: { attributes: { "role": "tabpanel", "tabindex": "0" }, listeners: { "keydown": "onKeydown($event)" } }, providers: [{ provide: TAB_BAR, useExisting: TabBarComponent_1 }], queries: [{ propertyName: "tabs", predicate: TabBarItemComponent }], viewQueries: [{ propertyName: "tabBarPanelElement", first: true, predicate: ["tabBarPanel"], descendants: true }, { propertyName: "tabActionElements", predicate: ["tabAction"], descendants: true }], ngImport: i0, template: "<button\n #tabAction\n class=\"odx-tab-bar__action odx-tab-bar__action--prev\"\n [class.is-active]=\"overflowLeft\"\n (click)=\"keyManager?.setPreviousItemActive()\"\n tabindex=\"-1\"\n>\n <odx-icon class=\"tab-bar-action-icon\" name=\"chevron-left\"></odx-icon>\n</button>\n<div class=\"odx-tab-bar__inner\">\n <div class=\"odx-tab-bar__panel\" role=\"tablist\" #tabBarPanel>\n <ng-content></ng-content>\n <div class=\"odx-tab-bar__indicator\" [odxActiveIndicator]=\"activeItem?.element?.nativeElement\" odxActiveIndicatorPosition=\"start\"></div>\n </div>\n</div>\n<button\n #tabAction\n class=\"odx-tab-bar__action odx-tab-bar__action--next\"\n [class.is-active]=\"overflowRight\"\n (click)=\"keyManager?.setNextItemActive()\"\n tabindex=\"-1\"\n>\n <odx-icon class=\"tab-bar-action-icon\" name=\"chevron-right\"></odx-icon>\n</button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }, { kind: "directive", type: ActiveIndicatorDirective, selector: "[odxActiveIndicator]", inputs: ["odxActiveIndicator", "odxActiveIndicatorParent", "odxActiveIndicatorDirection", "odxActiveIndicatorPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
141
|
+
__decorate([
|
|
142
|
+
CSSModifier(),
|
|
143
|
+
__metadata("design:type", Object)
|
|
144
|
+
], TabBarComponent.prototype, "overflowLeft", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
CSSModifier(),
|
|
147
|
+
__metadata("design:type", Object)
|
|
148
|
+
], TabBarComponent.prototype, "overflowRight", void 0);
|
|
149
|
+
TabBarComponent = TabBarComponent_1 = __decorate([
|
|
150
|
+
CSSComponent('tab-bar')
|
|
151
|
+
], TabBarComponent);
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: TabBarComponent, decorators: [{
|
|
153
|
+
type: Component,
|
|
154
|
+
args: [{ selector: 'odx-tab-bar', standalone: true, imports: [CommonModule, IconComponent, ActiveIndicatorDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: TAB_BAR, useExisting: TabBarComponent }], host: {
|
|
155
|
+
role: 'tabpanel',
|
|
156
|
+
tabindex: '0',
|
|
157
|
+
}, template: "<button\n #tabAction\n class=\"odx-tab-bar__action odx-tab-bar__action--prev\"\n [class.is-active]=\"overflowLeft\"\n (click)=\"keyManager?.setPreviousItemActive()\"\n tabindex=\"-1\"\n>\n <odx-icon class=\"tab-bar-action-icon\" name=\"chevron-left\"></odx-icon>\n</button>\n<div class=\"odx-tab-bar__inner\">\n <div class=\"odx-tab-bar__panel\" role=\"tablist\" #tabBarPanel>\n <ng-content></ng-content>\n <div class=\"odx-tab-bar__indicator\" [odxActiveIndicator]=\"activeItem?.element?.nativeElement\" odxActiveIndicatorPosition=\"start\"></div>\n </div>\n</div>\n<button\n #tabAction\n class=\"odx-tab-bar__action odx-tab-bar__action--next\"\n [class.is-active]=\"overflowRight\"\n (click)=\"keyManager?.setNextItemActive()\"\n tabindex=\"-1\"\n>\n <odx-icon class=\"tab-bar-action-icon\" name=\"chevron-right\"></odx-icon>\n</button>\n" }]
|
|
158
|
+
}], propDecorators: { tabBarPanelElement: [{
|
|
159
|
+
type: ViewChild,
|
|
160
|
+
args: ['tabBarPanel']
|
|
161
|
+
}], tabActionElements: [{
|
|
162
|
+
type: ViewChildren,
|
|
163
|
+
args: ['tabAction']
|
|
164
|
+
}], tabs: [{
|
|
165
|
+
type: ContentChildren,
|
|
166
|
+
args: [TabBarItemComponent]
|
|
167
|
+
}], overflowLeft: [], overflowRight: [], selectedIndex: [{
|
|
168
|
+
type: Input
|
|
169
|
+
}], selectedTabChanged: [{
|
|
170
|
+
type: Output
|
|
171
|
+
}], onKeydown: [{
|
|
172
|
+
type: HostListener,
|
|
173
|
+
args: ['keydown', ['$event']]
|
|
174
|
+
}] } });
|
|
175
|
+
|
|
176
|
+
const modules = [TabBarComponent, TabBarItemComponent];
|
|
177
|
+
class TabBarModule {
|
|
178
|
+
}
|
|
179
|
+
TabBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: TabBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
180
|
+
TabBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: TabBarModule, imports: [TabBarComponent, TabBarItemComponent], exports: [CoreModule, TabBarComponent, TabBarItemComponent] });
|
|
181
|
+
TabBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: TabBarModule, imports: [modules, CoreModule] });
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: TabBarModule, decorators: [{
|
|
183
|
+
type: NgModule,
|
|
184
|
+
args: [{
|
|
185
|
+
imports: modules,
|
|
186
|
+
exports: [CoreModule, ...modules],
|
|
187
|
+
}]
|
|
188
|
+
}] });
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Generated bundle index. Do not edit.
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
export { TabBarComponent, TabBarItemComponent, TabBarModule };
|
|
195
|
+
//# sourceMappingURL=odx-angular-components-tab-bar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-components-tab-bar.mjs","sources":["../../../../libs/angular/components/tab-bar/src/lib/tab-bar.config.ts","../../../../libs/angular/components/tab-bar/src/lib/components/tab-bar-item/tab-bar-item.component.ts","../../../../libs/angular/components/tab-bar/src/lib/components/tab-bar-item/tab-bar-item.component.html","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.component.ts","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.component.html","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.module.ts","../../../../libs/angular/components/tab-bar/src/odx-angular-components-tab-bar.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { TabBarComponent } from './tab-bar.component';\n\nexport const TAB_BAR = new InjectionToken<TabBarComponent>('tabBar');\n","import { Highlightable } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostListener, inject, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, Transform } from '@odx/angular/utils';\nimport { TAB_BAR } from '../../tab-bar.config';\n\n@CSSComponent('tab-bar-item')\n@Component({\n selector: 'odx-tab-bar-item',\n standalone: true,\n imports: [CommonModule, IconComponent],\n templateUrl: './tab-bar-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DisabledController.connect()],\n host: {\n '[class.is-disabled]': 'disabled',\n '[class.is-active]': 'isActive',\n '[attr.aria-selected]': 'isActive',\n '[class.is-closable]': 'closable',\n role: 'tab',\n },\n})\nexport class TabBarItemComponent implements Highlightable {\n public static ngAcceptInputType_closable: BooleanInput;\n\n private readonly disabledController = DisabledController.inject();\n private readonly tabBar = inject(TAB_BAR);\n\n protected isActive = false;\n\n public readonly element: ElementRef<HTMLElement> = inject(ElementRef);\n\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n @Transform(coerceBooleanProperty)\n @Input()\n public closable = false;\n\n @Output()\n public tabClose = new EventEmitter<TabBarItemComponent>();\n\n public setActiveStyles(): void {\n deferFn(() => (this.isActive = true));\n }\n\n public setInactiveStyles(): void {\n deferFn(() => (this.isActive = false));\n }\n\n @HostListener('click')\n protected onClick(): void {\n if (this.disabled) return;\n this.tabBar.activateItem(this);\n }\n\n protected handleClose(event: Event): void {\n event.stopPropagation();\n if (this.disabled || !this.closable) return;\n this.tabBar.removeItem(this);\n this.tabClose.emit(this);\n }\n}\n","<ng-content select=\"odx-icon\"></ng-content>\n<ng-content></ng-content>\n<odx-icon name=\"close\" size=\"small\" *ngIf=\"closable\" (click)=\"handleClose($event)\"></odx-icon>\n","import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n HostListener,\n inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n ViewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ActiveIndicatorDirective } from '@odx/angular/cdk/active-indicator';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { fromElementResize$, fromQueryList } from '@odx/angular/rxjs';\nimport { applyStyles, cssTranslate, deferFn, injectElement, px, untilDestroyed } from '@odx/angular/utils';\nimport { BehaviorSubject, debounceTime, fromEvent, merge, tap } from 'rxjs';\nimport { TabBarItemComponent } from './components';\nimport { TabChangeEvent } from './models';\nimport { TAB_BAR } from './tab-bar.config';\n\n@CSSComponent('tab-bar')\n@Component({\n selector: 'odx-tab-bar',\n standalone: true,\n imports: [CommonModule, IconComponent, ActiveIndicatorDirective],\n templateUrl: './tab-bar.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: TAB_BAR, useExisting: TabBarComponent }],\n host: {\n role: 'tabpanel',\n tabindex: '0',\n },\n})\nexport class TabBarComponent implements AfterViewInit {\n public static ngAcceptInputType_selectedIndex: NumberInput;\n\n private readonly changeDetector = inject(ChangeDetectorRef);\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly selectedIndex$$ = new BehaviorSubject(0);\n\n protected activeItem: TabBarItemComponent | null = null;\n\n protected keyManager?: ActiveDescendantKeyManager<TabBarItemComponent>;\n\n @ViewChild('tabBarPanel')\n protected tabBarPanelElement!: ElementRef<HTMLElement>;\n\n @ViewChildren('tabAction')\n protected tabActionElements!: QueryList<ElementRef<HTMLElement>>;\n\n @ContentChildren(TabBarItemComponent)\n protected tabs!: QueryList<TabBarItemComponent>;\n\n public readonly element = injectElement();\n\n @CSSModifier()\n public overflowLeft = false;\n\n @CSSModifier()\n public overflowRight = false;\n\n @Input()\n public set selectedIndex(value: unknown) {\n this.selectedIndex$$.next(coerceNumberProperty(value));\n }\n\n @Output()\n public selectedTabChanged = new EventEmitter<TabChangeEvent>();\n\n public ngAfterViewInit(): void {\n this.keyManager = new ActiveDescendantKeyManager(this.tabs).withWrap().withHomeAndEnd().withHorizontalOrientation('ltr').withVerticalOrientation(false);\n const updatePanelPosition$ = merge(this.selectedTabChanged, fromQueryList(this.tabs), fromElementResize$(this.element.nativeElement)).pipe(\n debounceTime(0),\n tap(() => this.updatePanelPosition())\n );\n const updateActionVisibility$ = fromEvent(this.tabBarPanelElement.nativeElement, 'transitionend').pipe(\n tap(({ target }) => target === this.tabBarPanelElement.nativeElement && this.updateActionVisbility())\n );\n const activeItemChange$ = merge(\n this.keyManager.change.pipe(tap(() => this.activeItemChange())),\n this.selectedIndex$$.pipe(tap((index) => this.keyManager?.setActiveItem(index)))\n );\n merge(activeItemChange$, updatePanelPosition$, updateActionVisibility$).pipe(this.takeUntilDestroyed()).subscribe();\n }\n\n public activateItem(item?: TabBarItemComponent | null): void {\n if (item === this.activeItem) return;\n const selectedIndex = item ? this.tabs.toArray().indexOf(item) : -1;\n this.keyManager?.setActiveItem(selectedIndex);\n }\n\n public removeItem(item: TabBarItemComponent): void {\n if (this.activeItem !== item) return;\n deferFn(() => this.keyManager?.setPreviousItemActive());\n }\n\n @HostListener('keydown', ['$event'])\n protected onKeydown(event: KeyboardEvent): void {\n this.keyManager?.onKeydown(event);\n }\n\n private updatePanelPosition(): void {\n const activeElement = this.activeItem?.element.nativeElement;\n if (!activeElement) return;\n const panelRect = this.tabBarPanelElement.nativeElement.getBoundingClientRect();\n const tabBarRect = this.element.nativeElement.getBoundingClientRect();\n const maxPanelPositionX = Math.floor(tabBarRect.width - panelRect.width);\n const panelPositionX = tabBarRect.width / 2 - activeElement.offsetLeft - activeElement.offsetWidth / 2;\n const positionX = Math.min(0, Math.max(panelPositionX, maxPanelPositionX));\n applyStyles(this.tabBarPanelElement.nativeElement, {\n transform: cssTranslate(px(positionX), 0),\n });\n this.updateActionVisbility();\n }\n\n private updateActionVisbility(): void {\n const panelRect = this.tabBarPanelElement.nativeElement.getBoundingClientRect();\n const tabBarRect = this.element.nativeElement.getBoundingClientRect();\n this.overflowLeft = panelRect.left < tabBarRect.left;\n this.overflowRight = panelRect.right > tabBarRect.right;\n this.changeDetector.detectChanges();\n }\n\n private activeItemChange(): void {\n const { activeItemIndex, activeItem } = this.keyManager ?? {};\n this.activeItem = activeItem ?? null;\n this.selectedTabChanged.emit({ selectedIndex: activeItemIndex ?? -1, selectedTab: this.keyManager?.activeItem ?? null });\n }\n}\n","<button\n #tabAction\n class=\"odx-tab-bar__action odx-tab-bar__action--prev\"\n [class.is-active]=\"overflowLeft\"\n (click)=\"keyManager?.setPreviousItemActive()\"\n tabindex=\"-1\"\n>\n <odx-icon class=\"tab-bar-action-icon\" name=\"chevron-left\"></odx-icon>\n</button>\n<div class=\"odx-tab-bar__inner\">\n <div class=\"odx-tab-bar__panel\" role=\"tablist\" #tabBarPanel>\n <ng-content></ng-content>\n <div class=\"odx-tab-bar__indicator\" [odxActiveIndicator]=\"activeItem?.element?.nativeElement\" odxActiveIndicatorPosition=\"start\"></div>\n </div>\n</div>\n<button\n #tabAction\n class=\"odx-tab-bar__action odx-tab-bar__action--next\"\n [class.is-active]=\"overflowRight\"\n (click)=\"keyManager?.setNextItemActive()\"\n tabindex=\"-1\"\n>\n <odx-icon class=\"tab-bar-action-icon\" name=\"chevron-right\"></odx-icon>\n</button>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { TabBarItemComponent } from './components';\nimport { TabBarComponent } from './tab-bar.component';\n\nconst modules = [TabBarComponent, TabBarItemComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class TabBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGO,MAAM,OAAO,GAAG,IAAI,cAAc,CAAkB,QAAQ,CAAC;;ACwBvD,IAAA,mBAAmB,GAAzB,MAAM,mBAAmB,CAAA;AAAzB,IAAA,WAAA,GAAA;AAGY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC;AACjD,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;QAEhC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAEX,QAAA,IAAA,CAAA,OAAO,GAA4B,MAAM,CAAC,UAAU,CAAC,CAAC;QAQ/D,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAGjB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAAuB,CAAC;AAsB3D,KAAA;AA/BC,IAAA,IAAW,QAAQ,GAAA;AACjB,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC;KAC5C;IASM,eAAe,GAAA;AACpB,QAAA,OAAO,CAAC,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC;KACvC;IAEM,iBAAiB,GAAA;AACtB,QAAA,OAAO,CAAC,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC;KACxC;IAGS,OAAO,GAAA;QACf,IAAI,IAAI,CAAC,QAAQ;YAAE,OAAO;AAC1B,QAAA,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;KAChC;AAES,IAAA,WAAW,CAAC,KAAY,EAAA;QAChC,KAAK,CAAC,eAAe,EAAE,CAAC;AACxB,QAAA,IAAI,IAAI,CAAC,QAA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AC,WAAW,CAAA;gBAIf,IAAI,EAAA,CAAA;sBADb,eAAe;uBAAC,mBAAmB,CAAA;gBAM7B,YAAY,EAAA,EAAA,EAGZ,aAAa,EAAA,EAAA,EAGT,aAAa,EAAA,CAAA;sBADvB,KAAK;gBAMC,kBAAkB,EAAA,CAAA;sBADxB,MAAM;gBA+BG,SAAS,EAAA,CAAA;sBADlB,YAAY;uBAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,CAAA;;;AEtGrC,MAAM,OAAO,GAAG,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;MAM1C,YAAY,CAAA;;yGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;0GAAZ,YAAY,EAAA,OAAA,EAAA,CANR,eAAe,EAAE,mBAAmB,aAIzC,UAAU,EAJL,eAAe,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;0GAMxC,YAAY,EAAA,OAAA,EAAA,CAHd,OAAO,EACN,UAAU,CAAA,EAAA,CAAA,CAAA;2FAET,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import { trigger, transition, group, useAnimation } from '@angular/animations';
|
|
3
|
+
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
4
|
+
import * as i1 from '@angular/common';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, inject, Renderer2, NgModule } from '@angular/core';
|
|
8
|
+
import { WindowRef, CoreModule } from '@odx/angular';
|
|
9
|
+
import { expand, fadeIn, slideInRight, collapse } from '@odx/angular/animations';
|
|
10
|
+
import { ChipComponent } from '@odx/angular/components/chip';
|
|
11
|
+
import { HeaderComponent } from '@odx/angular/components/header';
|
|
12
|
+
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
13
|
+
import { createModuleConfigTokens, Queue, getUniqueId, untilDestroyed, injectElement, px, Transform, provideModuleConfig } from '@odx/angular/utils';
|
|
14
|
+
import { Subject, share, timer, tap, map } from 'rxjs';
|
|
15
|
+
import { deepmerge } from 'deepmerge-ts';
|
|
16
|
+
import { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';
|
|
17
|
+
import { ActionGroupComponent } from '@odx/angular/components/action-group';
|
|
18
|
+
import { ButtonComponent } from '@odx/angular/components/button';
|
|
19
|
+
import { IconComponent } from '@odx/angular/components/icon';
|
|
20
|
+
|
|
21
|
+
const { ToastDefaultModuleConfig, ToastModuleConfig, injectToastModuleConfig } = createModuleConfigTokens('Toast', '@odx/angular/components/toast', {
|
|
22
|
+
dismissable: true,
|
|
23
|
+
duration: 0,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
class ToastService {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.queue = new Queue();
|
|
29
|
+
this.onRemove$$ = new Subject();
|
|
30
|
+
this.defaultOptions = injectToastModuleConfig();
|
|
31
|
+
this.queue$ = this.queue.value$;
|
|
32
|
+
this.onRemove$ = this.onRemove$$.pipe(share());
|
|
33
|
+
}
|
|
34
|
+
add(item, options = {}) {
|
|
35
|
+
return this.queue.add({
|
|
36
|
+
id: item.id ?? getUniqueId('odx-toast'),
|
|
37
|
+
item,
|
|
38
|
+
options: deepmerge(this.defaultOptions, options),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
remove(itemRef) {
|
|
42
|
+
this.queue.remove(itemRef);
|
|
43
|
+
this.onRemove$$.next(itemRef);
|
|
44
|
+
}
|
|
45
|
+
clear() {
|
|
46
|
+
this.queue.clear();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
ToastService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
50
|
+
ToastService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastService, providedIn: 'root' });
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastService, decorators: [{
|
|
52
|
+
type: Injectable,
|
|
53
|
+
args: [{
|
|
54
|
+
providedIn: 'root',
|
|
55
|
+
}]
|
|
56
|
+
}] });
|
|
57
|
+
|
|
58
|
+
const ToastVariant = {
|
|
59
|
+
DEFAULT: 'default',
|
|
60
|
+
WARNING: 'warning',
|
|
61
|
+
DANGER: 'danger',
|
|
62
|
+
SUCCESS: 'success',
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
let ToastItemComponent = class ToastItemComponent {
|
|
66
|
+
constructor() {
|
|
67
|
+
this.takeUntilDestroyed = untilDestroyed();
|
|
68
|
+
this.element = injectElement();
|
|
69
|
+
this.dismiss = new EventEmitter();
|
|
70
|
+
}
|
|
71
|
+
get icon() {
|
|
72
|
+
switch (this.variant) {
|
|
73
|
+
case ToastVariant.WARNING:
|
|
74
|
+
return 'warning';
|
|
75
|
+
case ToastVariant.DANGER:
|
|
76
|
+
return 'danger';
|
|
77
|
+
case ToastVariant.SUCCESS:
|
|
78
|
+
return 'check';
|
|
79
|
+
default:
|
|
80
|
+
return 'info';
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
ngOnInit() {
|
|
84
|
+
const { duration } = this.options;
|
|
85
|
+
if (duration > 0) {
|
|
86
|
+
timer(duration)
|
|
87
|
+
.pipe(this.takeUntilDestroyed(), tap(() => this.onDismiss()))
|
|
88
|
+
.subscribe();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
onDismiss() {
|
|
92
|
+
this.dismiss.next();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
ToastItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
96
|
+
ToastItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: ToastItemComponent, isStandalone: true, selector: "odx-toast", inputs: { id: "id", title: "title", description: "description", variant: "variant", actions: "actions", options: "options" }, outputs: { dismiss: "dismiss" }, host: { properties: { "attr.id": "id" } }, ngImport: i0, template: "<div class=\"odx-toast-item__content\">\n <odx-icon [name]=\"icon\"></odx-icon>\n <div class=\"odx-toast-item__text-content\">\n <p class=\"odx-toast-item__title\">\n <ng-template [odxDynamicView]=\"title\"> </ng-template>\n </p>\n <p class=\"odx-toast-item__description\" *ngIf=\"description\">\n <ng-template [odxDynamicView]=\"description\"> </ng-template>\n </p>\n </div>\n <button odxButton class=\"odx-toast-item__close\" (click)=\"onDismiss()\" *ngIf=\"options?.dismissable\">\n <odx-icon name=\"close\"></odx-icon>\n </button>\n</div>\n<odx-action-group class=\"odx-toast-item__buttons\" *ngIf=\"!!actions?.length\">\n <button odxButton (click)=\"action.action()\" *ngFor=\"let action of actions\">\n <odx-icon [name]=\"action.leftIcon\" alignLeft *ngIf=\"action.leftIcon\"></odx-icon>\n <ng-template [odxDynamicView]=\"action.label\"> </ng-template>\n <odx-icon [name]=\"action.rightIcon\" alignRight *ngIf=\"action.rightIcon\"></odx-icon>\n </button>\n</odx-action-group>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
97
|
+
__decorate([
|
|
98
|
+
CSSModifier({ default: ToastVariant.DEFAULT }),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], ToastItemComponent.prototype, "variant", void 0);
|
|
101
|
+
ToastItemComponent = __decorate([
|
|
102
|
+
CSSComponent('toast-item')
|
|
103
|
+
], ToastItemComponent);
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastItemComponent, decorators: [{
|
|
105
|
+
type: Component,
|
|
106
|
+
args: [{ selector: 'odx-toast', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CommonModule, IconComponent, ButtonComponent, DynamicViewDirective, ActionGroupComponent], host: {
|
|
107
|
+
'[attr.id]': 'id',
|
|
108
|
+
}, template: "<div class=\"odx-toast-item__content\">\n <odx-icon [name]=\"icon\"></odx-icon>\n <div class=\"odx-toast-item__text-content\">\n <p class=\"odx-toast-item__title\">\n <ng-template [odxDynamicView]=\"title\"> </ng-template>\n </p>\n <p class=\"odx-toast-item__description\" *ngIf=\"description\">\n <ng-template [odxDynamicView]=\"description\"> </ng-template>\n </p>\n </div>\n <button odxButton class=\"odx-toast-item__close\" (click)=\"onDismiss()\" *ngIf=\"options?.dismissable\">\n <odx-icon name=\"close\"></odx-icon>\n </button>\n</div>\n<odx-action-group class=\"odx-toast-item__buttons\" *ngIf=\"!!actions?.length\">\n <button odxButton (click)=\"action.action()\" *ngFor=\"let action of actions\">\n <odx-icon [name]=\"action.leftIcon\" alignLeft *ngIf=\"action.leftIcon\"></odx-icon>\n <ng-template [odxDynamicView]=\"action.label\"> </ng-template>\n <odx-icon [name]=\"action.rightIcon\" alignRight *ngIf=\"action.rightIcon\"></odx-icon>\n </button>\n</odx-action-group>\n" }]
|
|
109
|
+
}], propDecorators: { id: [{
|
|
110
|
+
type: Input
|
|
111
|
+
}], title: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], description: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}], variant: [{
|
|
116
|
+
type: Input
|
|
117
|
+
}], actions: [{
|
|
118
|
+
type: Input
|
|
119
|
+
}], options: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}], dismiss: [{
|
|
122
|
+
type: Output
|
|
123
|
+
}] } });
|
|
124
|
+
|
|
125
|
+
var ToastContainerComponent_1;
|
|
126
|
+
const TOAST_ANIMATION_DELAY = '125ms';
|
|
127
|
+
let ToastContainerComponent = ToastContainerComponent_1 = class ToastContainerComponent {
|
|
128
|
+
constructor() {
|
|
129
|
+
this.windowRef = inject(WindowRef);
|
|
130
|
+
this.renderer = inject(Renderer2);
|
|
131
|
+
this.toastService = inject(ToastService);
|
|
132
|
+
this.element = injectElement();
|
|
133
|
+
this.items$ = this.toastService.queue$.pipe(map((refs) => refs.slice(0, this.maxItems)));
|
|
134
|
+
this.hiddenToasts$ = this.toastService.queue$.pipe(map((refs) => Math.max(0, refs.length - this.maxItems)));
|
|
135
|
+
this.maxItems = 3;
|
|
136
|
+
this.dismiss = this.toastService.onRemove$;
|
|
137
|
+
}
|
|
138
|
+
ngAfterViewInit() {
|
|
139
|
+
if (ToastContainerComponent_1.INITIALIZED) {
|
|
140
|
+
throw new Error('Only one toast container per application allowed');
|
|
141
|
+
}
|
|
142
|
+
ToastContainerComponent_1.INITIALIZED = true;
|
|
143
|
+
const headerElement = this.windowRef.queryByComponent(HeaderComponent);
|
|
144
|
+
if (headerElement) {
|
|
145
|
+
this.renderer.setStyle(this.element.nativeElement, 'top', px(headerElement.offsetHeight));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
ngOnDestroy() {
|
|
149
|
+
ToastContainerComponent_1.INITIALIZED = false;
|
|
150
|
+
}
|
|
151
|
+
onDismiss(itemRef) {
|
|
152
|
+
this.toastService.remove(itemRef);
|
|
153
|
+
}
|
|
154
|
+
trackById(_, ref) {
|
|
155
|
+
return ref.id;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
ToastContainerComponent.INITIALIZED = false;
|
|
159
|
+
ToastContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
160
|
+
ToastContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: ToastContainerComponent, isStandalone: true, selector: "odx-toast-container", inputs: { maxItems: "maxItems" }, outputs: { dismiss: "dismiss" }, ngImport: i0, template: "<odx-toast\n @slide\n [id]=\"toastRef.id\"\n [title]=\"toastRef.item.title\"\n [description]=\"toastRef.item.description\"\n [actions]=\"toastRef.item.actions ?? []\"\n [variant]=\"toastRef.item.variant\"\n [options]=\"toastRef.options\"\n (dismiss)=\"onDismiss(toastRef)\"\n *ngFor=\"let toastRef of items$ | async; trackBy: trackById\"\n></odx-toast>\n<odx-chip class=\"odx-toast-container__counter\" *ngIf=\"hiddenToasts$ | async as more\">{{ more }} more Notifications</odx-chip>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "component", type: ChipComponent, selector: "odx-chip", inputs: ["removable", "size", "variant"], outputs: ["remove"] }, { kind: "component", type: ToastItemComponent, selector: "odx-toast", inputs: ["id", "title", "description", "variant", "actions", "options"], outputs: ["dismiss"] }], animations: [
|
|
161
|
+
trigger('slide', [
|
|
162
|
+
transition(':enter', group([
|
|
163
|
+
useAnimation(expand),
|
|
164
|
+
useAnimation(fadeIn(), { params: { delay: TOAST_ANIMATION_DELAY } }),
|
|
165
|
+
useAnimation(slideInRight, { params: { delay: TOAST_ANIMATION_DELAY } }),
|
|
166
|
+
])),
|
|
167
|
+
transition(':leave', group([useAnimation(collapse)])),
|
|
168
|
+
]),
|
|
169
|
+
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
170
|
+
__decorate([
|
|
171
|
+
Transform(coerceNumberProperty),
|
|
172
|
+
__metadata("design:type", Object)
|
|
173
|
+
], ToastContainerComponent.prototype, "maxItems", void 0);
|
|
174
|
+
ToastContainerComponent = ToastContainerComponent_1 = __decorate([
|
|
175
|
+
CSSComponent('toast-container')
|
|
176
|
+
], ToastContainerComponent);
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastContainerComponent, decorators: [{
|
|
178
|
+
type: Component,
|
|
179
|
+
args: [{ selector: 'odx-toast-container', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CommonModule, ChipComponent, ToastItemComponent], animations: [
|
|
180
|
+
trigger('slide', [
|
|
181
|
+
transition(':enter', group([
|
|
182
|
+
useAnimation(expand),
|
|
183
|
+
useAnimation(fadeIn(), { params: { delay: TOAST_ANIMATION_DELAY } }),
|
|
184
|
+
useAnimation(slideInRight, { params: { delay: TOAST_ANIMATION_DELAY } }),
|
|
185
|
+
])),
|
|
186
|
+
transition(':leave', group([useAnimation(collapse)])),
|
|
187
|
+
]),
|
|
188
|
+
], template: "<odx-toast\n @slide\n [id]=\"toastRef.id\"\n [title]=\"toastRef.item.title\"\n [description]=\"toastRef.item.description\"\n [actions]=\"toastRef.item.actions ?? []\"\n [variant]=\"toastRef.item.variant\"\n [options]=\"toastRef.options\"\n (dismiss)=\"onDismiss(toastRef)\"\n *ngFor=\"let toastRef of items$ | async; trackBy: trackById\"\n></odx-toast>\n<odx-chip class=\"odx-toast-container__counter\" *ngIf=\"hiddenToasts$ | async as more\">{{ more }} more Notifications</odx-chip>\n" }]
|
|
189
|
+
}], propDecorators: { maxItems: [{
|
|
190
|
+
type: Input
|
|
191
|
+
}], dismiss: [{
|
|
192
|
+
type: Output
|
|
193
|
+
}] } });
|
|
194
|
+
|
|
195
|
+
const modules = [ToastContainerComponent, ToastItemComponent];
|
|
196
|
+
class ToastModule {
|
|
197
|
+
static forRoot(config) {
|
|
198
|
+
return {
|
|
199
|
+
ngModule: ToastModule,
|
|
200
|
+
providers: [provideModuleConfig(ToastModuleConfig, config)],
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
ToastModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
205
|
+
ToastModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: ToastModule, imports: [ToastContainerComponent, ToastItemComponent], exports: [CoreModule, ToastContainerComponent, ToastItemComponent] });
|
|
206
|
+
ToastModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastModule, imports: [modules, CoreModule] });
|
|
207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToastModule, decorators: [{
|
|
208
|
+
type: NgModule,
|
|
209
|
+
args: [{
|
|
210
|
+
imports: modules,
|
|
211
|
+
exports: [CoreModule, ...modules],
|
|
212
|
+
}]
|
|
213
|
+
}] });
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Generated bundle index. Do not edit.
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
export { ToastContainerComponent, ToastDefaultModuleConfig, ToastItemComponent, ToastModule, ToastModuleConfig, ToastService, ToastVariant, injectToastModuleConfig };
|
|
220
|
+
//# sourceMappingURL=odx-angular-components-toast.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-components-toast.mjs","sources":["../../../../libs/angular/components/toast/src/lib/toast.config.ts","../../../../libs/angular/components/toast/src/lib/toast.service.ts","../../../../libs/angular/components/toast/src/lib/models/toast-variant.ts","../../../../libs/angular/components/toast/src/lib/components/toast-item/toast-item.component.ts","../../../../libs/angular/components/toast/src/lib/components/toast-item/toast-item.component.html","../../../../libs/angular/components/toast/src/lib/components/toast-container/toast-container.component.ts","../../../../libs/angular/components/toast/src/lib/components/toast-container/toast-container.component.html","../../../../libs/angular/components/toast/src/lib/toast.module.ts","../../../../libs/angular/components/toast/src/odx-angular-components-toast.ts"],"sourcesContent":["import { createModuleConfigTokens } from '@odx/angular/utils';\nimport { ToastOptions } from './models/toast.options';\n\nexport type ToastModuleConfig = ToastOptions;\n\nexport const { ToastDefaultModuleConfig, ToastModuleConfig, injectToastModuleConfig } = createModuleConfigTokens('Toast', '@odx/angular/components/toast', {\n dismissable: true,\n duration: 0,\n} as ToastModuleConfig);\n","import { Injectable } from '@angular/core';\nimport { getUniqueId, Queue } from '@odx/angular/utils';\nimport { deepmerge } from 'deepmerge-ts';\nimport { share, Subject } from 'rxjs';\nimport { Toast, ToastOptions, ToastRef } from './models';\nimport { injectToastModuleConfig } from './toast.config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ToastService {\n private readonly queue = new Queue<ToastRef>();\n private readonly onRemove$$ = new Subject<ToastRef>();\n private readonly defaultOptions = injectToastModuleConfig();\n\n public readonly queue$ = this.queue.value$;\n public readonly onRemove$ = this.onRemove$$.pipe(share());\n\n public add(item: Toast, options: Partial<ToastOptions> = {}): ToastRef {\n return this.queue.add({\n id: item.id ?? getUniqueId('odx-toast'),\n item,\n options: deepmerge(this.defaultOptions, options) as ToastOptions,\n });\n }\n\n public remove(itemRef: ToastRef): void {\n this.queue.remove(itemRef);\n this.onRemove$$.next(itemRef);\n }\n\n public clear(): void {\n this.queue.clear();\n }\n}\n","export type ToastVariant = (typeof ToastVariant)[keyof typeof ToastVariant];\n\nexport const ToastVariant = {\n DEFAULT: 'default',\n WARNING: 'warning',\n DANGER: 'danger',\n SUCCESS: 'success',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';\nimport { DynamicTextContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { tap, timer } from 'rxjs';\nimport { ToastAction, ToastOptions, ToastVariant } from '../../models';\n\n@CSSComponent('toast-item')\n@Component({\n selector: 'odx-toast',\n templateUrl: './toast-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, IconComponent, ButtonComponent, DynamicViewDirective, ActionGroupComponent],\n host: {\n '[attr.id]': 'id',\n },\n})\nexport class ToastItemComponent implements OnInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n\n public readonly element = injectElement();\n\n public get icon(): string {\n switch (this.variant) {\n case ToastVariant.WARNING:\n return 'warning';\n case ToastVariant.DANGER:\n return 'danger';\n case ToastVariant.SUCCESS:\n return 'check';\n default:\n return 'info';\n }\n }\n\n @Input()\n public id!: string;\n\n @Input()\n public title!: DynamicTextContent;\n\n @Input()\n public description?: DynamicTextContent | null;\n\n @CSSModifier({ default: ToastVariant.DEFAULT })\n @Input()\n public variant?: ToastVariant;\n\n @Input()\n public actions?: ToastAction[];\n\n @Input()\n public options!: ToastOptions;\n\n @Output()\n public readonly dismiss = new EventEmitter<void>();\n\n public ngOnInit(): void {\n const { duration } = this.options;\n if (duration > 0) {\n timer(duration)\n .pipe(\n this.takeUntilDestroyed(),\n tap(() => this.onDismiss())\n )\n .subscribe();\n }\n }\n\n public onDismiss(): void {\n this.dismiss.next();\n }\n}\n","<div class=\"odx-toast-item__content\">\n <odx-icon [name]=\"icon\"></odx-icon>\n <div class=\"odx-toast-item__text-content\">\n <p class=\"odx-toast-item__title\">\n <ng-template [odxDynamicView]=\"title\"> </ng-template>\n </p>\n <p class=\"odx-toast-item__description\" *ngIf=\"description\">\n <ng-template [odxDynamicView]=\"description\"> </ng-template>\n </p>\n </div>\n <button odxButton class=\"odx-toast-item__close\" (click)=\"onDismiss()\" *ngIf=\"options?.dismissable\">\n <odx-icon name=\"close\"></odx-icon>\n </button>\n</div>\n<odx-action-group class=\"odx-toast-item__buttons\" *ngIf=\"!!actions?.length\">\n <button odxButton (click)=\"action.action()\" *ngFor=\"let action of actions\">\n <odx-icon [name]=\"action.leftIcon\" alignLeft *ngIf=\"action.leftIcon\"></odx-icon>\n <ng-template [odxDynamicView]=\"action.label\"> </ng-template>\n <odx-icon [name]=\"action.rightIcon\" alignRight *ngIf=\"action.rightIcon\"></odx-icon>\n </button>\n</odx-action-group>\n","import { group, transition, trigger, useAnimation } from '@angular/animations';\nimport { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport { CommonModule } from '@angular/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, inject, Input, OnDestroy, Output, Renderer2, ViewEncapsulation } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { collapse, expand, fadeIn, slideInRight } from '@odx/angular/animations';\nimport { ChipComponent } from '@odx/angular/components/chip';\nimport { HeaderComponent } from '@odx/angular/components/header';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement, px, Transform } from '@odx/angular/utils';\nimport { map, Observable } from 'rxjs';\nimport { ToastRef } from '../../models';\nimport { ToastService } from '../../toast.service';\nimport { ToastItemComponent } from '../toast-item/toast-item.component';\n\nconst TOAST_ANIMATION_DELAY = '125ms';\n@CSSComponent('toast-container')\n@Component({\n selector: 'odx-toast-container',\n templateUrl: './toast-container.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, ChipComponent, ToastItemComponent],\n animations: [\n trigger('slide', [\n transition(\n ':enter',\n group([\n useAnimation(expand),\n useAnimation(fadeIn(), { params: { delay: TOAST_ANIMATION_DELAY } }),\n useAnimation(slideInRight, { params: { delay: TOAST_ANIMATION_DELAY } }),\n ])\n ),\n transition(':leave', group([useAnimation(collapse)])),\n ]),\n ],\n})\nexport class ToastContainerComponent implements AfterViewInit, OnDestroy {\n private static INITIALIZED = false;\n public static ngAcceptInputType_maxItems: NumberInput;\n\n private readonly windowRef = inject(WindowRef);\n private readonly renderer = inject(Renderer2);\n private readonly toastService = inject(ToastService);\n\n public readonly element = injectElement();\n\n public readonly items$: Observable<ToastRef[]> = this.toastService.queue$.pipe(map((refs) => refs.slice(0, this.maxItems)));\n public readonly hiddenToasts$: Observable<number> = this.toastService.queue$.pipe(map((refs) => Math.max(0, refs.length - this.maxItems)));\n\n @Input()\n @Transform(coerceNumberProperty)\n public maxItems = 3;\n\n @Output()\n public readonly dismiss = this.toastService.onRemove$;\n\n public ngAfterViewInit(): void {\n if (ToastContainerComponent.INITIALIZED) {\n throw new Error('Only one toast container per application allowed');\n }\n ToastContainerComponent.INITIALIZED = true;\n const headerElement = this.windowRef.queryByComponent(HeaderComponent);\n if (headerElement) {\n this.renderer.setStyle(this.element.nativeElement, 'top', px(headerElement.offsetHeight));\n }\n }\n\n public ngOnDestroy(): void {\n ToastContainerComponent.INITIALIZED = false;\n }\n\n protected onDismiss(itemRef: ToastRef): void {\n this.toastService.remove(itemRef);\n }\n\n protected trackById(_: number, ref: ToastRef): ToastRef['id'] {\n return ref.id;\n }\n}\n","<odx-toast\n @slide\n [id]=\"toastRef.id\"\n [title]=\"toastRef.item.title\"\n [description]=\"toastRef.item.description\"\n [actions]=\"toastRef.item.actions ?? []\"\n [variant]=\"toastRef.item.variant\"\n [options]=\"toastRef.options\"\n (dismiss)=\"onDismiss(toastRef)\"\n *ngFor=\"let toastRef of items$ | async; trackBy: trackById\"\n></odx-toast>\n<odx-chip class=\"odx-toast-container__counter\" *ngIf=\"hiddenToasts$ | async as more\">{{ more }} more Notifications</odx-chip>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ModuleConfigDependencies, ModuleConfigProvider, provideModuleConfig } from '@odx/angular/utils';\nimport { ToastContainerComponent, ToastItemComponent } from './components';\nimport { ToastModuleConfig } from './toast.config';\n\nconst modules = [ToastContainerComponent, ToastItemComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class ToastModule {\n public static forRoot<D extends ModuleConfigDependencies>(config: ModuleConfigProvider<Partial<ToastModuleConfig>, D>): ModuleWithProviders<ToastModule> {\n return {\n ngModule: ToastModule,\n providers: [provideModuleConfig(ToastModuleConfig, config)],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAKO,MAAM,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,GAAG,wBAAwB,CAAC,OAAO,EAAE,+BAA+B,EAAE;AACzJ,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,CAAC;AACS,CAAA;;MCET,YAAY,CAAA;AAHzB,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,KAAK,EAAY,CAAC;AAC9B,QAAA,IAAA,CAAA,UAAU,G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|
19
|
-
ToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
20
|
-
ToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
19
|
+
ToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToggleButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
ToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: ToggleButtonComponent, isStandalone: true, selector: "odx-toggle-button", host: { attributes: { "role": "button" } }, providers: [DisabledController.connect(), ReadonlyController.connect()], usesInheritance: true, ngImport: i0, template: "<label class=\"odx-toggle-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.isRequired || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.isRequired\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <ng-content></ng-content>\n</label>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
21
21
|
ToggleButtonComponent = __decorate([
|
|
22
22
|
CSSComponent('toggle-button')
|
|
23
23
|
], ToggleButtonComponent);
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToggleButtonComponent, decorators: [{
|
|
25
25
|
type: Component,
|
|
26
|
-
args: [{ standalone: true, selector: 'odx-toggle-button', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
27
|
-
'[class.is-active]': 'isActive',
|
|
28
|
-
'[class.is-disabled]': 'disabledController?.disabled',
|
|
29
|
-
'[class.is-readonly]': 'readonlyController?.readonly',
|
|
30
|
-
'[class.has-error]': 'radioGroupControl.hasError',
|
|
26
|
+
args: [{ standalone: true, selector: 'odx-toggle-button', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [DisabledController.connect(), ReadonlyController.connect()], host: {
|
|
31
27
|
role: 'button',
|
|
32
|
-
},
|
|
28
|
+
}, template: "<label class=\"odx-toggle-button__label\">\n <input\n class=\"odx-radio-button__input\"\n type=\"radio\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"radioGroupControl.hasError || null\"\n [attr.aria-readonly]=\"readonlyController?.readonly || null\"\n [attr.aria-required]=\"radioGroupControl.isRequired || null\"\n [checked]=\"isActive\"\n [disabled]=\"disabledController?.disabled || readonlyController?.readonly\"\n [name]=\"radioGroupControl.name\"\n [readonly]=\"readonlyController?.readonly\"\n [required]=\"radioGroupControl.isRequired\"\n [value]=\"value\"\n (change)=\"radioGroupControl.updateValue(value)\"\n />\n <ng-content></ng-content>\n</label>\n" }]
|
|
33
29
|
}] });
|
|
34
30
|
|
|
35
31
|
var ToggleButtonGroupComponent_1;
|
|
36
32
|
let ToggleButtonGroupComponent = ToggleButtonGroupComponent_1 = class ToggleButtonGroupComponent extends RadioGroupControlDirective {
|
|
37
33
|
constructor() {
|
|
38
34
|
super(...arguments);
|
|
39
|
-
this.element = injectElement();
|
|
40
35
|
this.activeElement$ = defer(() => merge(this.toggleButtons.changes, this.change$)).pipe(startWith(undefined), map(() => this.toggleButtons.find((button) => button.isActive)?.element.nativeElement ?? null), tap((activeElement) => this.element.nativeElement.classList.toggle('is-active', !!activeElement)));
|
|
36
|
+
this.element = injectElement();
|
|
41
37
|
}
|
|
42
38
|
};
|
|
43
|
-
ToggleButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
44
|
-
ToggleButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
39
|
+
ToggleButtonGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToggleButtonGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
+
ToggleButtonGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.4", type: ToggleButtonGroupComponent, isStandalone: true, selector: "odx-toggle-button-group", providers: [
|
|
41
|
+
{
|
|
42
|
+
provide: RADIO_GROUP_CONTROL,
|
|
43
|
+
useExisting: ToggleButtonGroupComponent_1,
|
|
44
|
+
multi: false,
|
|
45
|
+
},
|
|
45
46
|
DisabledController.connect(),
|
|
46
47
|
ReadonlyController.connect(),
|
|
47
|
-
{ provide: RADIO_GROUP_CONTROL, useExisting: ToggleButtonGroupComponent_1, multi: false },
|
|
48
48
|
], queries: [{ propertyName: "toggleButtons", predicate: ToggleButtonComponent }], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"odx-toggle-button\"> </ng-content>\n<div class=\"odx-toggle-button-group__indicator\" [odxActiveIndicator]=\"activeElement$ | async\"></div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: ActiveIndicatorDirective, selector: "[odxActiveIndicator]", inputs: ["odxActiveIndicator", "odxActiveIndicatorParent", "odxActiveIndicatorDirection", "odxActiveIndicatorPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
49
49
|
ToggleButtonGroupComponent = ToggleButtonGroupComponent_1 = __decorate([
|
|
50
50
|
CSSComponent('toggle-button-group')
|
|
51
51
|
], ToggleButtonGroupComponent);
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToggleButtonGroupComponent, decorators: [{
|
|
53
53
|
type: Component,
|
|
54
54
|
args: [{ standalone: true, selector: 'odx-toggle-button-group', imports: [CommonModule, ActiveIndicatorDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
55
|
+
{
|
|
56
|
+
provide: RADIO_GROUP_CONTROL,
|
|
57
|
+
useExisting: ToggleButtonGroupComponent,
|
|
58
|
+
multi: false,
|
|
59
|
+
},
|
|
55
60
|
DisabledController.connect(),
|
|
56
61
|
ReadonlyController.connect(),
|
|
57
|
-
{ provide: RADIO_GROUP_CONTROL, useExisting: ToggleButtonGroupComponent, multi: false },
|
|
58
62
|
], template: "<ng-content select=\"odx-toggle-button\"> </ng-content>\n<div class=\"odx-toggle-button-group__indicator\" [odxActiveIndicator]=\"activeElement$ | async\"></div>\n" }]
|
|
59
63
|
}], propDecorators: { toggleButtons: [{
|
|
60
64
|
type: ContentChildren,
|
|
@@ -64,10 +68,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
64
68
|
const modules = [ToggleButtonGroupComponent, ToggleButtonComponent];
|
|
65
69
|
class ToggleButtonGroupModule {
|
|
66
70
|
}
|
|
67
|
-
ToggleButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
68
|
-
ToggleButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
69
|
-
ToggleButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
71
|
+
ToggleButtonGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToggleButtonGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
72
|
+
ToggleButtonGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.4", ngImport: i0, type: ToggleButtonGroupModule, imports: [ToggleButtonGroupComponent, ToggleButtonComponent], exports: [CoreModule, ToggleButtonGroupComponent, ToggleButtonComponent] });
|
|
73
|
+
ToggleButtonGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToggleButtonGroupModule, imports: [modules, CoreModule] });
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: ToggleButtonGroupModule, decorators: [{
|
|
71
75
|
type: NgModule,
|
|
72
76
|
args: [{
|
|
73
77
|
imports: modules,
|