@odx/angular 10.2.1 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/animations/lib/fade.d.ts +6 -2
- package/cdk/a11y/lib/directives/list-focus-manager-option.directive.d.ts +3 -1
- package/cdk/a11y/lib/directives/list-focus-manager.directive.d.ts +3 -1
- package/cdk/active-indicator/lib/active-indicator.directive.d.ts +3 -1
- package/components/calendar/lib/calendar.component.d.ts +7 -0
- package/components/calendar/lib/directives/calendar-view.directive.d.ts +0 -2
- package/components/card/lib/card.component.d.ts +1 -1
- package/components/checkbox/lib/checkbox.validator.d.ts +2 -2
- package/components/footer/lib/footer.component.d.ts +0 -2
- package/components/main-menu/lib/main-menu.component.d.ts +0 -2
- package/components/modal/lib/components/basic-modal/basic-modal.component.d.ts +0 -2
- package/components/modal/lib/components/modal-hero/modal-hero.component.d.ts +4 -3
- package/components/notification/lib/components/notification-center/notification-center.component.d.ts +0 -2
- package/components/timepicker/lib/timepicker.component.d.ts +0 -2
- package/components/toast/lib/components/toast-container/toast-container.component.d.ts +0 -2
- package/esm2022/animations/lib/fade.mjs +7 -3
- package/esm2022/cdk/a11y/lib/directives/list-focus-manager-option.directive.mjs +4 -2
- package/esm2022/cdk/a11y/lib/directives/list-focus-manager.directive.mjs +4 -2
- package/esm2022/cdk/active-indicator/lib/active-indicator.directive.mjs +4 -2
- package/esm2022/cdk/connected-overlay/lib/connected-overlay.component.mjs +3 -3
- package/esm2022/components/accordion/lib/accordion.component.mjs +3 -3
- package/esm2022/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +4 -5
- package/esm2022/components/action-group/action-group.component.mjs +3 -3
- package/esm2022/components/area-header/area-header.component.mjs +3 -3
- package/esm2022/components/autocomplete/lib/autocomplete.component.mjs +4 -5
- package/esm2022/components/autocomplete/lib/components/option/autocomplete-option.component.mjs +3 -3
- package/esm2022/components/avatar/lib/avatar.component.mjs +3 -3
- package/esm2022/components/badge/lib/badge.component.mjs +3 -3
- package/esm2022/components/bar/lib/bar.component.mjs +3 -3
- package/esm2022/components/breadcrumbs/lib/breadcrumbs.component.mjs +3 -3
- package/esm2022/components/button/lib/button.component.mjs +3 -3
- package/esm2022/components/button-group/lib/button-group.component.mjs +3 -3
- package/esm2022/components/calendar/lib/calendar.component.mjs +11 -4
- package/esm2022/components/calendar/lib/components/calendar-header/calendar-header.component.mjs +3 -3
- package/esm2022/components/calendar/lib/components/calendar-month/calendar-month.component.mjs +3 -3
- package/esm2022/components/calendar/lib/components/calendar-year/calendar-year.component.mjs +3 -3
- package/esm2022/components/calendar/lib/components/calendar-years/calendar-years.component.mjs +4 -5
- package/esm2022/components/calendar/lib/directives/calendar-view.directive.mjs +2 -3
- package/esm2022/components/card/lib/card.component.mjs +3 -3
- package/esm2022/components/card/lib/components/card-footer/card-footer.component.mjs +3 -3
- package/esm2022/components/card/lib/components/card-image/card-image.component.mjs +3 -3
- package/esm2022/components/card/lib/components/launch-card-subtitle/launch-card-subtitle.component.mjs +3 -3
- package/esm2022/components/checkbox/lib/checkbox.validator.mjs +3 -3
- package/esm2022/components/chip/lib/components/chip/chip.component.mjs +3 -3
- package/esm2022/components/chip/lib/components/chip-list/chip-list.component.mjs +3 -3
- package/esm2022/components/chip/lib/components/chip-list-row/chip-list-row.component.mjs +3 -3
- package/esm2022/components/circular-progress/lib/circular-progress.component.mjs +3 -3
- package/esm2022/components/content-box/lib/content-box.component.mjs +3 -3
- package/esm2022/components/datepicker/lib/datepicker.component.mjs +3 -3
- package/esm2022/components/daterangepicker/lib/daterangepicker.component.mjs +3 -3
- package/esm2022/components/dropdown/lib/dropdown.component.mjs +3 -3
- package/esm2022/components/error-page/lib/error-page.component.mjs +3 -4
- package/esm2022/components/footer/lib/footer.component.mjs +4 -5
- package/esm2022/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +3 -3
- package/esm2022/components/form-field/lib/components/form-group/form-group.component.mjs +3 -3
- package/esm2022/components/form-field/lib/form-field.component.mjs +3 -3
- package/esm2022/components/inline-message/lib/inline-message.component.mjs +3 -3
- package/esm2022/components/list/lib/components/expandable-list-item/expandable-list-item.component.mjs +3 -4
- package/esm2022/components/loading-spinner/lib/loading-spinner.component.mjs +3 -3
- package/esm2022/components/main-menu/lib/main-menu.component.mjs +4 -5
- package/esm2022/components/mainfilter-group/lib/mainfilter-group.component.mjs +3 -3
- package/esm2022/components/menu/lib/menu.component.mjs +3 -4
- package/esm2022/components/modal/lib/components/basic-modal/basic-modal.component.mjs +3 -6
- package/esm2022/components/modal/lib/components/modal-footer/modal-footer.component.mjs +3 -3
- package/esm2022/components/modal/lib/components/modal-header/modal-header.component.mjs +3 -4
- package/esm2022/components/modal/lib/components/modal-hero/modal-hero.component.mjs +7 -8
- package/esm2022/components/modal/lib/modal.component.mjs +3 -3
- package/esm2022/components/navigation-back/lib/navigation-back.component.mjs +3 -3
- package/esm2022/components/notification/lib/components/notification-center/notification-center.component.mjs +4 -7
- package/esm2022/components/notification/lib/components/notification-item/notification-item.component.mjs +3 -3
- package/esm2022/components/paginator/lib/paginator.component.mjs +4 -5
- package/esm2022/components/radio-group/lib/components/radio-button/radio-button.component.mjs +3 -3
- package/esm2022/components/radio-group/lib/radio-group.component.mjs +3 -3
- package/esm2022/components/rail-navigation/lib/components/rail-navigation-item/rail-navigation-item.component.mjs +3 -3
- package/esm2022/components/rail-navigation/lib/rail-navigation.component.mjs +3 -3
- package/esm2022/components/rich-list/lib/components/rich-list-content/rich-list-content.component.mjs +3 -3
- package/esm2022/components/rich-list/lib/components/rich-list-item/rich-list-item.component.mjs +3 -4
- package/esm2022/components/rich-list/lib/components/rich-list-item-header/rich-list-item-header.component.mjs +3 -3
- package/esm2022/components/rich-list/lib/rich-list.component.mjs +3 -3
- package/esm2022/components/search-bar/lib/search-bar.component.mjs +3 -3
- package/esm2022/components/select/lib/components/select-option/select-option.component.mjs +3 -3
- package/esm2022/components/select/lib/select.component.mjs +3 -3
- package/esm2022/components/switch/lib/switch.component.mjs +3 -3
- package/esm2022/components/tab-bar/lib/components/tab-bar-item/tab-bar-item.component.mjs +3 -4
- package/esm2022/components/tab-bar/lib/tab-bar.component.mjs +3 -3
- package/esm2022/components/table/lib/components/check-cell/check-cell.component.mjs +3 -3
- package/esm2022/components/table/lib/components/header-title/header-title.component.mjs +4 -5
- package/esm2022/components/table/lib/table.component.mjs +5 -6
- package/esm2022/components/timepicker/lib/components/timepicker-option.component.mjs +3 -3
- package/esm2022/components/timepicker/lib/timepicker.component.mjs +7 -9
- package/esm2022/components/toast/lib/components/toast-container/toast-container.component.mjs +4 -5
- package/esm2022/components/toast/lib/components/toast-item/toast-item.component.mjs +3 -4
- package/esm2022/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +3 -3
- package/esm2022/components/toggle-button-group/lib/toggle-button-group.component.mjs +3 -3
- package/esm2022/components/tooltip/lib/tooltip.component.mjs +3 -3
- package/esm2022/components/wizard/lib/components/wizard-step/wizard-step.component.mjs +3 -3
- package/esm2022/components/wizard/lib/wizard.component.mjs +3 -3
- package/esm2022/lib/core.module.mjs +4 -6
- package/esm2022/utils/lib/helpers/angular.mjs +3 -1
- package/fesm2022/odx-angular-animations.mjs +6 -2
- package/fesm2022/odx-angular-animations.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-a11y.mjs +6 -2
- package/fesm2022/odx-angular-cdk-a11y.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-active-indicator.mjs +3 -1
- package/fesm2022/odx-angular-cdk-active-indicator.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs +2 -2
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs.map +1 -1
- package/fesm2022/odx-angular-components-accordion.mjs +5 -6
- package/fesm2022/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2022/odx-angular-components-action-group.mjs +2 -2
- package/fesm2022/odx-angular-components-action-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-area-header.mjs +2 -2
- package/fesm2022/odx-angular-components-area-header.mjs.map +1 -1
- package/fesm2022/odx-angular-components-autocomplete.mjs +5 -6
- package/fesm2022/odx-angular-components-autocomplete.mjs.map +1 -1
- package/fesm2022/odx-angular-components-avatar.mjs +2 -2
- package/fesm2022/odx-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-badge.mjs +2 -2
- package/fesm2022/odx-angular-components-badge.mjs.map +1 -1
- package/fesm2022/odx-angular-components-bar.mjs +2 -2
- package/fesm2022/odx-angular-components-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-breadcrumbs.mjs +2 -2
- package/fesm2022/odx-angular-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/odx-angular-components-button-group.mjs +2 -2
- package/fesm2022/odx-angular-components-button-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-button.mjs +2 -2
- package/fesm2022/odx-angular-components-button.mjs.map +1 -1
- package/fesm2022/odx-angular-components-calendar.mjs +19 -14
- package/fesm2022/odx-angular-components-calendar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-card.mjs +8 -8
- package/fesm2022/odx-angular-components-card.mjs.map +1 -1
- package/fesm2022/odx-angular-components-checkbox.mjs +2 -2
- package/fesm2022/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2022/odx-angular-components-chip.mjs +6 -6
- package/fesm2022/odx-angular-components-chip.mjs.map +1 -1
- package/fesm2022/odx-angular-components-circular-progress.mjs +2 -2
- package/fesm2022/odx-angular-components-circular-progress.mjs.map +1 -1
- package/fesm2022/odx-angular-components-content-box.mjs +2 -2
- package/fesm2022/odx-angular-components-content-box.mjs.map +1 -1
- package/fesm2022/odx-angular-components-datepicker.mjs +2 -2
- package/fesm2022/odx-angular-components-datepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-daterangepicker.mjs +2 -2
- package/fesm2022/odx-angular-components-daterangepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-dropdown.mjs +2 -2
- package/fesm2022/odx-angular-components-dropdown.mjs.map +1 -1
- package/fesm2022/odx-angular-components-error-page.mjs +2 -3
- package/fesm2022/odx-angular-components-error-page.mjs.map +1 -1
- package/fesm2022/odx-angular-components-footer.mjs +3 -4
- package/fesm2022/odx-angular-components-footer.mjs.map +1 -1
- package/fesm2022/odx-angular-components-form-field.mjs +6 -6
- package/fesm2022/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2022/odx-angular-components-inline-message.mjs +2 -2
- package/fesm2022/odx-angular-components-inline-message.mjs.map +1 -1
- package/fesm2022/odx-angular-components-list.mjs +2 -3
- package/fesm2022/odx-angular-components-list.mjs.map +1 -1
- package/fesm2022/odx-angular-components-loading-spinner.mjs +2 -2
- package/fesm2022/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2022/odx-angular-components-main-menu.mjs +3 -4
- package/fesm2022/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2022/odx-angular-components-mainfilter-group.mjs +2 -2
- package/fesm2022/odx-angular-components-mainfilter-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-menu.mjs +2 -3
- package/fesm2022/odx-angular-components-menu.mjs.map +1 -1
- package/fesm2022/odx-angular-components-modal.mjs +19 -20
- package/fesm2022/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2022/odx-angular-components-navigation-back.mjs +2 -2
- package/fesm2022/odx-angular-components-navigation-back.mjs.map +1 -1
- package/fesm2022/odx-angular-components-notification.mjs +5 -8
- package/fesm2022/odx-angular-components-notification.mjs.map +1 -1
- package/fesm2022/odx-angular-components-paginator.mjs +3 -4
- package/fesm2022/odx-angular-components-paginator.mjs.map +1 -1
- package/fesm2022/odx-angular-components-radio-group.mjs +4 -4
- package/fesm2022/odx-angular-components-radio-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-rail-navigation.mjs +4 -4
- package/fesm2022/odx-angular-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/odx-angular-components-rich-list.mjs +8 -9
- package/fesm2022/odx-angular-components-rich-list.mjs.map +1 -1
- package/fesm2022/odx-angular-components-search-bar.mjs +2 -2
- package/fesm2022/odx-angular-components-search-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-select.mjs +4 -4
- package/fesm2022/odx-angular-components-select.mjs.map +1 -1
- package/fesm2022/odx-angular-components-switch.mjs +2 -2
- package/fesm2022/odx-angular-components-switch.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tab-bar.mjs +4 -5
- package/fesm2022/odx-angular-components-tab-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-table.mjs +8 -9
- package/fesm2022/odx-angular-components-table.mjs.map +1 -1
- package/fesm2022/odx-angular-components-timepicker.mjs +7 -9
- package/fesm2022/odx-angular-components-timepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toast.mjs +5 -6
- package/fesm2022/odx-angular-components-toast.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toggle-button-group.mjs +4 -4
- package/fesm2022/odx-angular-components-toggle-button-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tooltip.mjs +2 -2
- package/fesm2022/odx-angular-components-tooltip.mjs.map +1 -1
- package/fesm2022/odx-angular-components-wizard.mjs +4 -4
- package/fesm2022/odx-angular-components-wizard.mjs.map +1 -1
- package/fesm2022/odx-angular-utils.mjs +2 -0
- package/fesm2022/odx-angular-utils.mjs.map +1 -1
- package/fesm2022/odx-angular.mjs +3 -5
- package/fesm2022/odx-angular.mjs.map +1 -1
- package/lib/core.module.d.ts +2 -3
- package/package.json +1 -2
- package/utils/lib/helpers/angular.d.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-a11y.mjs","sources":["../../../../libs/angular/cdk/a11y/src/lib/directives/interactive.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager-option.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/a11y.module.ts","../../../../libs/angular/cdk/a11y/src/odx-angular-cdk-a11y.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { DisabledController, WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Directive that makes an element interactive, responding to click, Enter key, and Space key events.\n * It automatically handles the disabled state through `DisabledController`, inhibiting interactions when disabled.\n * This directive can be useful for creating custom buttons or interactive elements that are not natively interactive,\n * such as divs or custom components.\n *\n * @Directive\n * @CSSComponent cdk-interactive - A CSS Component class that can be targeted for styling interactive elements.\n * @selector '[odxCdkInteractive]' - Applies this directive to any element with the 'odxCdkInteractive' attribute.\n * @hostDirectives {WithDisabledState, WithTabIndex} - Applies disabled state and tab index handling.\n * @host role='button' - Assigns a role of 'button' to the host element for accessibility.\n *\n * @example\n * Applying the directive to a div element to make it interactive:\n * ```html\n * <div odxCdkInteractive (odxCdkInteractive)=\"onInteract($event)\">\n * Click or press Enter/Space to interact\n * </div>\n * ```\n *\n * @example\n * Using the directive on a custom Angular component\n * ```html\n * <app-custom-button odxCdkInteractive (odxCdkInteractive)=\"onCustomButtonInteract($event)\">\n * </app-custom-button>\n * ```\n */\n@CSSComponent('cdk-interactive')\n@Directive({\n selector: '[odxCdkInteractive]',\n standalone: true,\n hostDirectives: [WithDisabledState, WithTabIndex],\n host: {\n role: 'button',\n },\n})\nexport class InteractiveDirective {\n private readonly disabledController = DisabledController.inject();\n\n public readonly element = injectElement();\n\n /**\n * Emits an event when the element is interacted with via click, Enter key, or Space key.\n *\n * @emits {MouseEvent | KeyboardEvent} - The event that triggered the interaction.\n */\n @Output('odxCdkInteractive')\n public interact = new EventEmitter<MouseEvent | KeyboardEvent>();\n\n @HostListener('click', ['$event'])\n @HostListener('keyup.enter', ['$event'])\n @HostListener('keyup.space', ['$event'])\n protected handleEvents(event: MouseEvent | KeyboardEvent) {\n if (this.disabledController?.disabled) return;\n this.interact.next(event);\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport { Directive } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Directive to make an element focusable as part of a list, integrating with Angular CDK's FocusKeyManager.\n * It listens to the disabled state controlled by `DisabledController` to manage focus correctly based on\n * the enabled state of the element.\n *\n * @example\n * In a component template, apply this directive to list items that should be focusable and managed by a FocusKeyManager:\n * ```html\n * <li odxListFocusManagerOption *ngFor=\"let item of items\">\n * {{ item }}\n * </li>\n * ```\n */\n@Directive({\n selector: '[odxListFocusManagerOption]',\n standalone: true,\n})\nexport class ListFocusManagerOptionDirective implements FocusableOption {\n private readonly disabledController = DisabledController.inject();\n private readonly element = injectElement();\n\n /**\n * Reflects the disabled state of the element, managed by `DisabledController`.\n * If disabled, the element is not focusable.\n *\n * @returns {boolean} True if the directive's host element is disabled.\n */\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Focuses the host element. If the element is disabled, it will not be focused.\n */\n public focus(): void {\n this.element.nativeElement.focus();\n }\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { AfterContentInit, ContentChildren, Directive, HostListener, OnDestroy, QueryList } from '@angular/core';\nimport { deferFn } from '@odx/angular/utils';\nimport { ListFocusManagerOptionDirective } from './list-focus-manager-option.directive';\n\n/**\n * Directive that sets up keyboard navigation for a list or a group of focusable elements.\n * Utilizes `FocusKeyManager` from Angular CDK to manage focus among items.\n * It automatically skips disabled items and wraps around when navigating past the first or last item.\n * Handles keydown events to navigate through the focusable options.\n *\n * @example\n * In a component template, use this directive on a container element and `odxListFocusManagerOption`\n * on each focusable list item:\n * ```html\n * <ul odxListFocusManager>\n * <li odxListFocusManagerOption *ngFor=\"let item of items\">\n * {{ item }}\n * </li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[odxListFocusManager]',\n standalone: true,\n})\nexport class ListFocusManagerDirective implements AfterContentInit, OnDestroy {\n private keyManager: FocusKeyManager<ListFocusManagerOptionDirective> | null = null;\n\n @ContentChildren(ListFocusManagerOptionDirective)\n protected options!: QueryList<ListFocusManagerOptionDirective>;\n\n public ngAfterContentInit(): void {\n this.keyManager = new FocusKeyManager(this.options)\n .withHomeAndEnd()\n .withWrap()\n .skipPredicate((item) => item.disabled);\n deferFn(() => this.keyManager?.setFirstItemActive());\n }\n\n public ngOnDestroy(): void {\n this.keyManager?.destroy();\n this.keyManager = null;\n }\n\n @HostListener('keydown', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n this.keyManager?.onKeydown(event);\n }\n}\n","import { A11yModule as NgCdkA11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { InteractiveDirective, ListFocusManagerDirective, ListFocusManagerOptionDirective } from './directives';\n\nconst modules = [ListFocusManagerDirective, ListFocusManagerOptionDirective, InteractiveDirective];\n\n@NgModule({\n imports: [NgCdkA11yModule, ...modules],\n exports: [CoreModule, NgCdkA11yModule, ...modules],\n})\nexport class A11yModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCdkA11yModule"],"mappings":";;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AAUU,IAAA,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAA1B,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC;QAElD,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;;AAIG;AAEI,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAA8B,CAAC;AASlE,KAAA;AAJW,IAAA,YAAY,CAAC,KAAiC,EAAA;AACtD,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE,QAAQ;YAAE,OAAO;AAC9C,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3B;+GAnBU,oBAAoB,E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A,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAHXA,YAAe,EAHV,yBAAyB,EAAE,+BAA+B,EAAE,oBAAoB,CAIrF,EAAA,OAAA,EAAA,CAAA,UAAU,EAAEA,YAAe,EAJtB,yBAAyB,EAAE,+BAA+B,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;AAMpF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,EAHX,OAAA,EAAA,CAAAA,YAAe,EACf,UAAU,EAAEA,YAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAE1B,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAACA,YAAe,EAAE,GAAG,OAAO,CAAC;oBACtC,OAAO,EAAE,CAAC,UAAU,EAAEA,YAAe,EAAE,GAAG,OAAO,CAAC;AACnD,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-a11y.mjs","sources":["../../../../libs/angular/cdk/a11y/src/lib/directives/interactive.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager-option.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/directives/list-focus-manager.directive.ts","../../../../libs/angular/cdk/a11y/src/lib/a11y.module.ts","../../../../libs/angular/cdk/a11y/src/odx-angular-cdk-a11y.ts"],"sourcesContent":["import { Directive, EventEmitter, HostListener, Output } from '@angular/core';\nimport { DisabledController, WithDisabledState, WithTabIndex } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Directive that makes an element interactive, responding to click, Enter key, and Space key events.\n * It automatically handles the disabled state through `DisabledController`, inhibiting interactions when disabled.\n * This directive can be useful for creating custom buttons or interactive elements that are not natively interactive,\n * such as divs or custom components.\n *\n * @Directive\n * @CSSComponent cdk-interactive - A CSS Component class that can be targeted for styling interactive elements.\n * @selector '[odxCdkInteractive]' - Applies this directive to any element with the 'odxCdkInteractive' attribute.\n * @hostDirectives {WithDisabledState, WithTabIndex} - Applies disabled state and tab index handling.\n * @host role='button' - Assigns a role of 'button' to the host element for accessibility.\n *\n * @example\n * Applying the directive to a div element to make it interactive:\n * ```html\n * <div odxCdkInteractive (odxCdkInteractive)=\"onInteract($event)\">\n * Click or press Enter/Space to interact\n * </div>\n * ```\n *\n * @example\n * Using the directive on a custom Angular component\n * ```html\n * <app-custom-button odxCdkInteractive (odxCdkInteractive)=\"onCustomButtonInteract($event)\">\n * </app-custom-button>\n * ```\n */\n@CSSComponent('cdk-interactive')\n@Directive({\n selector: '[odxCdkInteractive]',\n standalone: true,\n hostDirectives: [WithDisabledState, WithTabIndex],\n host: {\n role: 'button',\n },\n})\nexport class InteractiveDirective {\n private readonly disabledController = DisabledController.inject();\n\n public readonly element = injectElement();\n\n /**\n * Emits an event when the element is interacted with via click, Enter key, or Space key.\n *\n * @emits {MouseEvent | KeyboardEvent} - The event that triggered the interaction.\n */\n @Output('odxCdkInteractive')\n public interact = new EventEmitter<MouseEvent | KeyboardEvent>();\n\n @HostListener('click', ['$event'])\n @HostListener('keyup.enter', ['$event'])\n @HostListener('keyup.space', ['$event'])\n protected handleEvents(event: MouseEvent | KeyboardEvent) {\n if (this.disabledController?.disabled) return;\n this.interact.next(event);\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport { Directive } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Directive to make an element focusable as part of a list, integrating with Angular CDK's FocusKeyManager.\n * It listens to the disabled state controlled by `DisabledController` to manage focus correctly based on\n * the enabled state of the element.\n *\n * @example\n * In a component template, apply this directive to list items that should be focusable and managed by a FocusKeyManager:\n * ```html\n * @for(item of items; track item) {\n * <li odxListFocusManagerOption>\n * {{ item }}\n * </li>\n * }\n * ```\n */\n@Directive({\n selector: '[odxListFocusManagerOption]',\n standalone: true,\n})\nexport class ListFocusManagerOptionDirective implements FocusableOption {\n private readonly disabledController = DisabledController.inject();\n private readonly element = injectElement();\n\n /**\n * Reflects the disabled state of the element, managed by `DisabledController`.\n * If disabled, the element is not focusable.\n *\n * @returns {boolean} True if the directive's host element is disabled.\n */\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Focuses the host element. If the element is disabled, it will not be focused.\n */\n public focus(): void {\n this.element.nativeElement.focus();\n }\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { AfterContentInit, ContentChildren, Directive, HostListener, OnDestroy, QueryList } from '@angular/core';\nimport { deferFn } from '@odx/angular/utils';\nimport { ListFocusManagerOptionDirective } from './list-focus-manager-option.directive';\n\n/**\n * Directive that sets up keyboard navigation for a list or a group of focusable elements.\n * Utilizes `FocusKeyManager` from Angular CDK to manage focus among items.\n * It automatically skips disabled items and wraps around when navigating past the first or last item.\n * Handles keydown events to navigate through the focusable options.\n *\n * @example\n * In a component template, use this directive on a container element and `odxListFocusManagerOption`\n * on each focusable list item:\n * ```html\n * <ul odxListFocusManager>\n * @for(item of items; track item) {\n * <li odxListFocusManagerOption>\n * {{ item }}\n * </li>\n * }\n * </ul>\n * ```\n */\n@Directive({\n selector: '[odxListFocusManager]',\n standalone: true,\n})\nexport class ListFocusManagerDirective implements AfterContentInit, OnDestroy {\n private keyManager: FocusKeyManager<ListFocusManagerOptionDirective> | null = null;\n\n @ContentChildren(ListFocusManagerOptionDirective)\n protected options!: QueryList<ListFocusManagerOptionDirective>;\n\n public ngAfterContentInit(): void {\n this.keyManager = new FocusKeyManager(this.options)\n .withHomeAndEnd()\n .withWrap()\n .skipPredicate((item) => item.disabled);\n deferFn(() => this.keyManager?.setFirstItemActive());\n }\n\n public ngOnDestroy(): void {\n this.keyManager?.destroy();\n this.keyManager = null;\n }\n\n @HostListener('keydown', ['$event'])\n protected onKeyDown(event: KeyboardEvent): void {\n this.keyManager?.onKeydown(event);\n }\n}\n","import { A11yModule as NgCdkA11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { InteractiveDirective, ListFocusManagerDirective, ListFocusManagerOptionDirective } from './directives';\n\nconst modules = [ListFocusManagerDirective, ListFocusManagerOptionDirective, InteractiveDirective];\n\n@NgModule({\n imports: [NgCdkA11yModule, ...modules],\n exports: [CoreModule, NgCdkA11yModule, ...modules],\n})\nexport class A11yModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NgCdkA11yModule"],"mappings":";;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BG;AAUU,IAAA,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAA1B,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC;QAElD,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;;AAIG;AAEI,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,YAAY,EAA8B,CAAC;AASlE,KAAA;AAJW,IAAA,YAAY,CAAC,KAAiC,EAAA;AACtD,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE,QAAQ;YAAE,OAAO;AAC9C,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3B;+GAnBU,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,EAAA,IAAA,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AA,CAAA,EAAA;AAMpF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,EAHX,OAAA,EAAA,CAAAA,YAAe,EACf,UAAU,EAAEA,YAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAE1B,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAACA,YAAe,EAAE,GAAG,OAAO,CAAC;oBACtC,OAAO,EAAE,CAAC,UAAU,EAAEA,YAAe,EAAE,GAAG,OAAO,CAAC;AACnD,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -30,7 +30,9 @@ const ActiveIndicatorPosition = {
|
|
|
30
30
|
* @example
|
|
31
31
|
* ```html
|
|
32
32
|
* <div class="tabs-container" #tabsContainer>
|
|
33
|
-
*
|
|
33
|
+
* @for(tab of tabs; track tab.id) {
|
|
34
|
+
* <div class="tab" [class.active]="tab.isActive" #tabElement>{{ tab.label }}</div>
|
|
35
|
+
* }
|
|
34
36
|
* <div class="indicator" [odxActiveIndicator]="activeTabElement" [odxActiveIndicatorParent]="tabsContainer"></div>
|
|
35
37
|
* </div>
|
|
36
38
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-active-indicator.mjs","sources":["../../../../libs/angular/cdk/active-indicator/src/lib/models/active-indicator-direction.ts","../../../../libs/angular/cdk/active-indicator/src/lib/models/active-indicator-position.ts","../../../../libs/angular/cdk/active-indicator/src/lib/active-indicator.directive.ts","../../../../libs/angular/cdk/active-indicator/src/odx-angular-cdk-active-indicator.ts"],"sourcesContent":["export type ActiveIndicatorDirection = typeof ActiveIndicatorDirection[keyof typeof ActiveIndicatorDirection];\n\nexport const ActiveIndicatorDirection = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n} as const;\n","export type ActiveIndicatorPosition = typeof ActiveIndicatorPosition[keyof typeof ActiveIndicatorPosition];\n\nexport const ActiveIndicatorPosition = {\n START: 'start',\n CENTER: 'center',\n END: 'end',\n} as const;\n","import { AfterViewInit, Directive, Input, OnChanges } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { fromElementResize$ } from '@odx/angular/rxjs';\nimport { NgChanges, applyStyles, disableCSSTransitions, hasChanged, injectElement, isPresent, px, untilDestroyed } from '@odx/angular/utils';\nimport { BehaviorSubject, EMPTY, distinctUntilChanged, switchMap } from 'rxjs';\nimport { ActiveIndicatorPosition } from './models';\nimport { ActiveIndicatorDirection } from './models/active-indicator-direction';\n\n/**\n * `ActiveIndicatorDirective` is designed to adjust an indicator's position and size dynamically to highlight\n * the active element within a container. It's useful for tabs, menus, or any list where an active state is visually represented.\n * The directive can be customized to align the indicator based on the active element's position and supports\n * both horizontal and vertical orientations.\n *\n * To use this directive, apply it to the element you want to use as an active indicator.\n * Then, bind the active element using the `odxActiveIndicator` input. Optionally, specify\n * the container element with `odxActiveIndicatorParent` if the container is not the immediate parent of the indicator.\n *\n * @example\n * ```html\n * <div class=\"tabs-container\" #tabsContainer>\n * <div class=\"tab\" *ngFor=\"let tab of tabs\" [class.active]=\"tab.isActive\" #tabElement>{{ tab.label }}</div>\n * <div class=\"indicator\" [odxActiveIndicator]=\"activeTabElement\" [odxActiveIndicatorParent]=\"tabsContainer\"></div>\n * </div>\n * ```\n *\n * ```ts\n * @Component({\n * selector: 'app-tabs',\n * templateUrl: './tabs.component.html',\n * imports: [ActiveIndicatorDirective, NgForOf],\n * })\n * export class TabsComponent {\n * tabs = [{ label: 'Tab 1', isActive: true }, { label: 'Tab 2', isActive: false }];\n * @ViewChildren('tabElement') tabElements?: QueryList<ElementRef>;\n * @ViewChild('tabsContainer') tabsContainer!: ElementRef;\n *\n * get activeTabElement(): HTMLElement {\n * const activeTab = this.tabElements?.find((tab) => tab.nativeElement.classList.contains('active'));\n * return activeTab ? activeTab.nativeElement : null;\n * }\n * }\n * ```\n */\n@CSSComponent('cdk-active-indicator')\n@Directive({\n standalone: true,\n selector: '[odxActiveIndicator]',\n})\nexport class ActiveIndicatorDirective implements OnChanges, AfterViewInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly parentElement$$ = new BehaviorSubject<HTMLElement | null>(null);\n private readonly onResize$ = this.parentElement$$.pipe(\n distinctUntilChanged(),\n switchMap((parentElement) => {\n return parentElement ? fromElementResize$(parentElement) : EMPTY;\n }),\n );\n\n public readonly element = injectElement();\n\n /**\n * Indicates whether the element is active or not.\n *\n * @type {boolean}\n */\n @CSSModifier()\n public isActive = false;\n\n /**\n * The currently active element to which the indicator should align.\n * It dynamically updates the indicator's position and size based on this element.\n *\n * @type {HTMLElement | null}\n */\n @Input('odxActiveIndicator')\n public activeElement?: HTMLElement | null = null;\n\n /**\n * The parent container element of the active elements.\n * If not set, the indicator's immediate parent element is used.\n *\n * @type {HTMLElement | null}\n */\n @Input('odxActiveIndicatorParent')\n public set parent(value: HTMLElement | null) {\n this.parentElement$$.next(value);\n }\n public get parent(): HTMLElement | null {\n return this.parentElement$$.getValue();\n }\n\n /**\n * The direction in which the indicator should move.\n *\n * @type {ActiveIndicatorDirection}\n */\n @CSSModifier()\n @Input('odxActiveIndicatorDirection')\n public direction: ActiveIndicatorDirection = ActiveIndicatorDirection.HORIZONTAL;\n\n /**\n * The position of the indicator relative to the active element.\n *\n * @type {ActiveIndicatorPosition}\n */\n @Input('odxActiveIndicatorPosition')\n public position: ActiveIndicatorPosition = ActiveIndicatorPosition.CENTER;\n\n public ngAfterViewInit(): void {\n this.onResize$.pipe(this.takeUntilDestroyed()).subscribe(() => this.updateStyles());\n this.parent ??= this.element.nativeElement.parentElement;\n }\n\n public ngOnChanges(changes: NgChanges<ActiveIndicatorDirective>): void {\n if (hasChanged(changes, 'activeElement', false)) {\n this.isActive = !!this.activeElement;\n }\n if (hasChanged(changes, ['activeElement', 'direction', 'position'])) {\n this.updateStyles(!isPresent(changes.activeElement?.previousValue));\n }\n }\n\n private updateStyles(disableTransition = false): void {\n if (!this.activeElement) return;\n const isHorizontal = this.direction === ActiveIndicatorDirection.HORIZONTAL;\n const isVertical = this.direction === ActiveIndicatorDirection.VERTICAL;\n const relativeOffset = this.getIndicatorRelativeOffset();\n\n let transform = null;\n if (isHorizontal) {\n const positionX = this.getIndicatorPositionX(this.activeElement);\n transform = `translateX(${px(positionX)}) translateX(${relativeOffset}%)`;\n }\n if (isVertical) {\n const positionY = this.getIndicatorPositionY(this.activeElement);\n transform = `translateY(${px(positionY)}) translateY(${relativeOffset}%)`;\n }\n\n disableTransition && disableCSSTransitions(this.element.nativeElement, true);\n applyStyles(this.element.nativeElement, {\n transform,\n width: isHorizontal ? px(this.activeElement.offsetWidth) : null,\n height: isVertical ? px(this.activeElement.offsetHeight) : null,\n });\n disableTransition && disableCSSTransitions(this.element.nativeElement, false);\n }\n\n private getIndicatorPositionX(activeElement: HTMLElement): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return activeElement.offsetLeft;\n case ActiveIndicatorPosition.CENTER:\n return activeElement.offsetLeft + activeElement.offsetWidth / 2;\n case ActiveIndicatorPosition.END:\n return activeElement.offsetLeft + activeElement.offsetWidth;\n }\n }\n\n private getIndicatorPositionY(activeElement: HTMLElement): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return activeElement.offsetTop;\n case ActiveIndicatorPosition.CENTER:\n return activeElement.offsetTop + activeElement.offsetHeight / 2;\n case ActiveIndicatorPosition.END:\n return activeElement.offsetTop + activeElement.offsetHeight;\n }\n }\n\n private getIndicatorRelativeOffset(): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return 0;\n case ActiveIndicatorPosition.CENTER:\n return -50;\n case ActiveIndicatorPosition.END:\n return -100;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './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,CAAA,EAAA,wBAAwB,CAmIpC,CAAA;4FAnIY,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,sBAAsB;AACjC,iBAAA,CAAA;AAmBQ,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,QAAQ,MASR,aAAa,EAAA,CAAA;sBADnB,KAAK;uBAAC,oBAAoB,CAAA;gBAUhB,MAAM,EAAA,CAAA;sBADhB,KAAK;uBAAC,0BAA0B,CAAA;gBAe1B,SAAS,EAAA,CAAA;sBADf,KAAK;uBAAC,6BAA6B,CAAA;gBAS7B,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,4BAA4B,CAAA;;;AC1GrC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-active-indicator.mjs","sources":["../../../../libs/angular/cdk/active-indicator/src/lib/models/active-indicator-direction.ts","../../../../libs/angular/cdk/active-indicator/src/lib/models/active-indicator-position.ts","../../../../libs/angular/cdk/active-indicator/src/lib/active-indicator.directive.ts","../../../../libs/angular/cdk/active-indicator/src/odx-angular-cdk-active-indicator.ts"],"sourcesContent":["export type ActiveIndicatorDirection = typeof ActiveIndicatorDirection[keyof typeof ActiveIndicatorDirection];\n\nexport const ActiveIndicatorDirection = {\n HORIZONTAL: 'horizontal',\n VERTICAL: 'vertical',\n} as const;\n","export type ActiveIndicatorPosition = typeof ActiveIndicatorPosition[keyof typeof ActiveIndicatorPosition];\n\nexport const ActiveIndicatorPosition = {\n START: 'start',\n CENTER: 'center',\n END: 'end',\n} as const;\n","import { AfterViewInit, Directive, Input, OnChanges } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { fromElementResize$ } from '@odx/angular/rxjs';\nimport { NgChanges, applyStyles, disableCSSTransitions, hasChanged, injectElement, isPresent, px, untilDestroyed } from '@odx/angular/utils';\nimport { BehaviorSubject, EMPTY, distinctUntilChanged, switchMap } from 'rxjs';\nimport { ActiveIndicatorPosition } from './models';\nimport { ActiveIndicatorDirection } from './models/active-indicator-direction';\n\n/**\n * `ActiveIndicatorDirective` is designed to adjust an indicator's position and size dynamically to highlight\n * the active element within a container. It's useful for tabs, menus, or any list where an active state is visually represented.\n * The directive can be customized to align the indicator based on the active element's position and supports\n * both horizontal and vertical orientations.\n *\n * To use this directive, apply it to the element you want to use as an active indicator.\n * Then, bind the active element using the `odxActiveIndicator` input. Optionally, specify\n * the container element with `odxActiveIndicatorParent` if the container is not the immediate parent of the indicator.\n *\n * @example\n * ```html\n * <div class=\"tabs-container\" #tabsContainer>\n * @for(tab of tabs; track tab.id) {\n * <div class=\"tab\" [class.active]=\"tab.isActive\" #tabElement>{{ tab.label }}</div>\n * }\n * <div class=\"indicator\" [odxActiveIndicator]=\"activeTabElement\" [odxActiveIndicatorParent]=\"tabsContainer\"></div>\n * </div>\n * ```\n *\n * ```ts\n * @Component({\n * selector: 'app-tabs',\n * templateUrl: './tabs.component.html',\n * imports: [ActiveIndicatorDirective, NgForOf],\n * })\n * export class TabsComponent {\n * tabs = [{ label: 'Tab 1', isActive: true }, { label: 'Tab 2', isActive: false }];\n * @ViewChildren('tabElement') tabElements?: QueryList<ElementRef>;\n * @ViewChild('tabsContainer') tabsContainer!: ElementRef;\n *\n * get activeTabElement(): HTMLElement {\n * const activeTab = this.tabElements?.find((tab) => tab.nativeElement.classList.contains('active'));\n * return activeTab ? activeTab.nativeElement : null;\n * }\n * }\n * ```\n */\n@CSSComponent('cdk-active-indicator')\n@Directive({\n standalone: true,\n selector: '[odxActiveIndicator]',\n})\nexport class ActiveIndicatorDirective implements OnChanges, AfterViewInit {\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly parentElement$$ = new BehaviorSubject<HTMLElement | null>(null);\n private readonly onResize$ = this.parentElement$$.pipe(\n distinctUntilChanged(),\n switchMap((parentElement) => {\n return parentElement ? fromElementResize$(parentElement) : EMPTY;\n }),\n );\n\n public readonly element = injectElement();\n\n /**\n * Indicates whether the element is active or not.\n *\n * @type {boolean}\n */\n @CSSModifier()\n public isActive = false;\n\n /**\n * The currently active element to which the indicator should align.\n * It dynamically updates the indicator's position and size based on this element.\n *\n * @type {HTMLElement | null}\n */\n @Input('odxActiveIndicator')\n public activeElement?: HTMLElement | null = null;\n\n /**\n * The parent container element of the active elements.\n * If not set, the indicator's immediate parent element is used.\n *\n * @type {HTMLElement | null}\n */\n @Input('odxActiveIndicatorParent')\n public set parent(value: HTMLElement | null) {\n this.parentElement$$.next(value);\n }\n public get parent(): HTMLElement | null {\n return this.parentElement$$.getValue();\n }\n\n /**\n * The direction in which the indicator should move.\n *\n * @type {ActiveIndicatorDirection}\n */\n @CSSModifier()\n @Input('odxActiveIndicatorDirection')\n public direction: ActiveIndicatorDirection = ActiveIndicatorDirection.HORIZONTAL;\n\n /**\n * The position of the indicator relative to the active element.\n *\n * @type {ActiveIndicatorPosition}\n */\n @Input('odxActiveIndicatorPosition')\n public position: ActiveIndicatorPosition = ActiveIndicatorPosition.CENTER;\n\n public ngAfterViewInit(): void {\n this.onResize$.pipe(this.takeUntilDestroyed()).subscribe(() => this.updateStyles());\n this.parent ??= this.element.nativeElement.parentElement;\n }\n\n public ngOnChanges(changes: NgChanges<ActiveIndicatorDirective>): void {\n if (hasChanged(changes, 'activeElement', false)) {\n this.isActive = !!this.activeElement;\n }\n if (hasChanged(changes, ['activeElement', 'direction', 'position'])) {\n this.updateStyles(!isPresent(changes.activeElement?.previousValue));\n }\n }\n\n private updateStyles(disableTransition = false): void {\n if (!this.activeElement) return;\n const isHorizontal = this.direction === ActiveIndicatorDirection.HORIZONTAL;\n const isVertical = this.direction === ActiveIndicatorDirection.VERTICAL;\n const relativeOffset = this.getIndicatorRelativeOffset();\n\n let transform = null;\n if (isHorizontal) {\n const positionX = this.getIndicatorPositionX(this.activeElement);\n transform = `translateX(${px(positionX)}) translateX(${relativeOffset}%)`;\n }\n if (isVertical) {\n const positionY = this.getIndicatorPositionY(this.activeElement);\n transform = `translateY(${px(positionY)}) translateY(${relativeOffset}%)`;\n }\n\n disableTransition && disableCSSTransitions(this.element.nativeElement, true);\n applyStyles(this.element.nativeElement, {\n transform,\n width: isHorizontal ? px(this.activeElement.offsetWidth) : null,\n height: isVertical ? px(this.activeElement.offsetHeight) : null,\n });\n disableTransition && disableCSSTransitions(this.element.nativeElement, false);\n }\n\n private getIndicatorPositionX(activeElement: HTMLElement): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return activeElement.offsetLeft;\n case ActiveIndicatorPosition.CENTER:\n return activeElement.offsetLeft + activeElement.offsetWidth / 2;\n case ActiveIndicatorPosition.END:\n return activeElement.offsetLeft + activeElement.offsetWidth;\n }\n }\n\n private getIndicatorPositionY(activeElement: HTMLElement): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return activeElement.offsetTop;\n case ActiveIndicatorPosition.CENTER:\n return activeElement.offsetTop + activeElement.offsetHeight / 2;\n case ActiveIndicatorPosition.END:\n return activeElement.offsetTop + activeElement.offsetHeight;\n }\n }\n\n private getIndicatorRelativeOffset(): number {\n switch (this.position) {\n case ActiveIndicatorPosition.START:\n return 0;\n case ActiveIndicatorPosition.CENTER:\n return -50;\n case ActiveIndicatorPosition.END:\n return -100;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAEa,MAAA,wBAAwB,GAAG;AACtC,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,QAAQ,EAAE,UAAU;;;ACFT,MAAA,uBAAuB,GAAG;AACrC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,GAAG,EAAE,KAAK;;;ACGZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCG;AAMU,IAAA,wBAAwB,GAA9B,MAAM,wBAAwB,CAAA;AAA9B,IAAA,WAAA,GA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BAA0B,CAAA;gBAe1B,SAAS,EAAA,CAAA;sBADf,KAAK;uBAAC,6BAA6B,CAAA;gBAS7B,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,4BAA4B,CAAA;;;AC5GrC;;AAEG;;;;"}
|
|
@@ -189,14 +189,14 @@ let ConnectedOverlayComponent = class ConnectedOverlayComponent {
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectedOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
192
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ConnectedOverlayComponent, isStandalone: true, selector: "odx-connected-overlay[popover=\"manual\"]", inputs: { referenceElement: "referenceElement", options: "options" }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "contentElement", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "arrowElement", first: true, predicate: ["arrow"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"odx-cdk-connected-overlay__content {{ options.containerClass }}\" #content>\n <ng-template [odxDynamicView]=\"options.content\" [odxDynamicViewContext]=\"options.context\" [odxDynamicViewInjector]=\"injector\"
|
|
192
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ConnectedOverlayComponent, isStandalone: true, selector: "odx-connected-overlay[popover=\"manual\"]", inputs: { referenceElement: "referenceElement", options: "options" }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "contentElement", first: true, predicate: ["content"], descendants: true, static: true }, { propertyName: "arrowElement", first: true, predicate: ["arrow"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"odx-cdk-connected-overlay__content {{ options.containerClass }}\" #content>\n <ng-template [odxDynamicView]=\"options.content\" [odxDynamicViewContext]=\"options.context\" [odxDynamicViewInjector]=\"injector\" />\n <div class=\"odx-cdk-connected-overlay-arrow\" #arrow></div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
193
193
|
};
|
|
194
194
|
ConnectedOverlayComponent = __decorate([
|
|
195
195
|
CSSComponent('cdk-connected-overlay')
|
|
196
196
|
], ConnectedOverlayComponent);
|
|
197
197
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectedOverlayComponent, decorators: [{
|
|
198
198
|
type: Component,
|
|
199
|
-
args: [{ standalone: true, selector: 'odx-connected-overlay[popover="manual"]', imports: [CoreModule, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"odx-cdk-connected-overlay__content {{ options.containerClass }}\" #content>\n <ng-template [odxDynamicView]=\"options.content\" [odxDynamicViewContext]=\"options.context\" [odxDynamicViewInjector]=\"injector\"
|
|
199
|
+
args: [{ standalone: true, selector: 'odx-connected-overlay[popover="manual"]', imports: [CoreModule, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"odx-cdk-connected-overlay__content {{ options.containerClass }}\" #content>\n <ng-template [odxDynamicView]=\"options.content\" [odxDynamicViewContext]=\"options.context\" [odxDynamicViewInjector]=\"injector\" />\n <div class=\"odx-cdk-connected-overlay-arrow\" #arrow></div>\n</div>\n" }]
|
|
200
200
|
}], propDecorators: { contentElement: [{
|
|
201
201
|
type: ViewChild,
|
|
202
202
|
args: ['content', { static: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-connected-overlay.mjs","sources":["../../../../libs/angular/cdk/connected-overlay/src/lib/helpers/compute-overlay-position.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/models/connected-overlay-options.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/models/connected-overlay-ref.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.component.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.component.html","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.service.ts","../../../../libs/angular/cdk/connected-overlay/src/odx-angular-cdk-connected-overlay.ts"],"sourcesContent":["import { ComputePositionReturn, VirtualElement, arrow, computePosition, flip, hide, shift, size, offset as withOffset } from '@floating-ui/dom';\nimport { applyStyles, getOppositeSide, getSide, px } from '@odx/angular/utils';\nimport { ConnectedOverlayOptions } from '../models';\n\n/**\n * Computes the position of an overlay element relative to a reference element.\n *\n * @param referenceElement - The reference element to position the overlay relative to.\n * @param overlayElement - The overlay element to be positioned.\n * @param contentElement - The content element within the overlay.\n * @param arrowElement - The arrow element within the overlay.\n * @param options - The options for positioning the overlay.\n * @returns A promise that resolves to the computed position of the overlay.\n */\nexport async function computeOverlayPosition(\n referenceElement: VirtualElement,\n overlayElement: HTMLElement,\n contentElement: HTMLElement,\n arrowElement: HTMLElement,\n options: ConnectedOverlayOptions,\n): Promise<ComputePositionReturn> {\n const variablePrefix = '--odx-cdk-connected-overlay';\n const { position, offset, outerPadding, matchReferenceWidth, enableFallback, fallbackAxisSideDirection, strategy, minHeight } = options;\n const arrowSize = options.showArrow ? arrowElement.offsetWidth : 0;\n const arrowMiddleware = options.showArrow ? [arrow({ element: arrowElement, padding: 8 })] : [];\n const flipMiddleWare = enableFallback ? [flip({ fallbackAxisSideDirection })] : [];\n return computePosition(referenceElement, overlayElement, {\n strategy,\n placement: position,\n middleware: [\n withOffset(Math.max(offset, arrowSize + offset)),\n shift({ padding: outerPadding }),\n ...flipMiddleWare,\n size({\n padding: outerPadding,\n apply: ({ availableHeight, rects }) => {\n contentElement.style.setProperty?.(`${variablePrefix}-min-height`, minHeight ? px(Math.min(availableHeight, minHeight)) : null);\n contentElement.style.setProperty?.(`${variablePrefix}-min-width`, matchReferenceWidth ? px(rects.reference.width) : null);\n },\n }),\n ...arrowMiddleware,\n hide({ rootBoundary: 'viewport' }),\n ],\n }).then((result) => {\n overlayElement.style.setProperty?.(`${variablePrefix}-position-x`, px(result.x));\n overlayElement.style.setProperty?.(`${variablePrefix}-position-y`, px(result.y));\n if (options.hiddenClass) {\n overlayElement.classList.toggle(options.hiddenClass, !!result.middlewareData.hide?.referenceHidden);\n }\n if (options.showArrow) {\n const overlaySide = getSide(result.placement);\n const arrowSide = getOppositeSide(result.placement);\n applyStyles(arrowElement, {\n display: null,\n top: px(result.middlewareData.arrow?.y),\n left: px(result.middlewareData.arrow?.x),\n [arrowSide]: px(-arrowSize / 2),\n [overlaySide]: null,\n });\n } else {\n applyStyles(arrowElement, { display: 'none' });\n }\n\n return result;\n });\n}\n","import { Strategy } from '@floating-ui/dom';\nimport { DynamicContent } from '@odx/angular/cdk/dynamic-view';\nimport { Position } from '@odx/angular/utils';\n\nexport interface ConnectedOverlayOptions {\n content?: DynamicContent | null;\n context?: Record<string, unknown>;\n containerClass?: string | null;\n hiddenClass: string | null;\n enableFallback: boolean;\n fallbackAxisSideDirection: 'start' | 'end';\n matchReferenceWidth: boolean;\n minHeight?: number | null;\n offset: number;\n outerPadding: number;\n position: Position;\n strategy: Strategy;\n showArrow?: boolean;\n updateOnAnimationFrame?: boolean;\n hooks?: {\n beforeOpen?: () => void;\n afterOpen?: () => void;\n beforeClose?: () => void;\n afterClose?: () => void;\n };\n}\n\nexport const DefaultConnectedOverlayOptions: ConnectedOverlayOptions = {\n hiddenClass: 'is-hidden',\n enableFallback: false,\n fallbackAxisSideDirection: 'start',\n matchReferenceWidth: false,\n offset: 8,\n outerPadding: 12,\n position: Position.BOTTOM,\n strategy: 'fixed',\n};\n","import { DynamicViewRef } from '@odx/angular/cdk/dynamic-view';\nimport { EMPTY, Observable } from 'rxjs';\nimport { ConnectedOverlayComponent } from '../connected-overlay.component';\nimport { ConnectedOverlayOptions } from './connected-overlay-options';\n\n/**\n * A reference to a connected overlay created by the `ConnectedOverlayService`. This class provides methods to interact\n * with the overlay, such as updating its options or closing it. It encapsulates the `DynamicViewRef` for the overlay's instance,\n * allowing for direct manipulation of the overlay's state and behavior.\n *\n * This example demonstrates how to use a `ConnectedOverlayRef` to update and close a connected overlay in response\n * to user interactions.\n *\n * @example\n * ```ts\n * class MyComponent {\n * private overlayRef?: ConnectedOverlayRef;\n *\n * constructor(private overlayService: ConnectedOverlayService) {}\n *\n * openOverlay() {\n * this.overlayRef = this.overlayService.createOverlay(this.someElementRef.nativeElement, { position: 'bottom' });\n * }\n *\n * updateOverlayPosition() {\n * if (this.overlayRef) {\n * this.overlayRef.update({ position: 'top' });\n * }\n * }\n *\n * closeOverlay() {\n * this.overlayRef?.close();\n * }\n * }\n * ```\n *\n * In this example, `MyComponent` uses the `ConnectedOverlayService` to create an overlay. It stores a reference to\n * the created overlay in `overlayRef`, allowing it to update the overlay's position or close it when necessary.\n */\nexport class ConnectedOverlayRef {\n public readonly element = this.dynamicViewRef.getElement();\n\n /**\n * An Observable that emits when the overlay is closed.\n *\n * @emits {void} - Emits when the overlay is closed.\n *\n */\n public readonly onClose$: Observable<void> = this.dynamicViewRef.getContext().closed ?? EMPTY;\n\n constructor(private readonly dynamicViewRef: DynamicViewRef<typeof ConnectedOverlayComponent>) {}\n\n /**\n * Updates the connected overlay with new options.\n *\n * @param options {Partial<ConnectedOverlayOptions>} - The new options to be applied to the connected overlay.\n */\n public update(options: Partial<ConnectedOverlayOptions>): void {\n this.dynamicViewRef.update({ options: options as ConnectedOverlayOptions });\n }\n\n /**\n * Closes the connected overlay.\n *\n * @returns {void}\n */\n public close(): void {\n this.dynamicViewRef.destroy();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { VirtualElement, autoUpdate } from '@floating-ui/dom';\nimport { CoreModule } from '@odx/angular';\nimport { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgChanges, Side, deferFn, getSide, hasChanged, injectElement, isPresent } from '@odx/angular/utils';\nimport { Subject } from 'rxjs';\nimport { computeOverlayPosition } from './helpers';\nimport { ConnectedOverlayOptions, DefaultConnectedOverlayOptions } from './models';\n\n@CSSComponent('cdk-connected-overlay')\n@Component({\n standalone: true,\n selector: 'odx-connected-overlay[popover=\"manual\"]',\n imports: [CoreModule, DynamicViewDirective],\n templateUrl: 'connected-overlay.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConnectedOverlayComponent implements OnInit, OnChanges, OnDestroy {\n private readonly zone = inject(NgZone);\n private positionUpdater: (() => void) | null = null;\n\n protected readonly injector = inject(Injector);\n protected overlaySide?: Side;\n\n @ViewChild('content', { static: true })\n protected contentElement!: ElementRef<HTMLElement>;\n\n @ViewChild('arrow', { static: true })\n protected arrowElement!: ElementRef<HTMLElement>;\n\n public readonly element = injectElement();\n\n @Input()\n public referenceElement!: VirtualElement;\n\n @Input()\n public options: ConnectedOverlayOptions = DefaultConnectedOverlayOptions;\n\n @Output()\n public closed = new Subject<void>();\n\n public ngOnInit(): void {\n this.options.hooks?.beforeOpen?.();\n deferFn(() => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.element.nativeElement as any)?.showPopover?.();\n this.options.hooks?.afterOpen?.();\n });\n }\n\n public ngOnChanges(changes: NgChanges<ConnectedOverlayComponent>): void {\n if (hasChanged(changes, ['options'], false)) {\n this.overlaySide = getSide(this.options.position);\n }\n if (hasChanged(changes, ['referenceElement', 'options'], false)) {\n this.stopPositionUpdater();\n this.startPositionUpdater();\n }\n }\n\n public ngOnDestroy(): void {\n this.options.hooks?.beforeClose?.();\n this.stopPositionUpdater();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.element.nativeElement as any)?.hidePopover?.();\n this.options.hooks?.afterClose?.();\n }\n\n private startPositionUpdater(): void {\n this.positionUpdater = this.zone.runOutsideAngular(() =>\n autoUpdate(this.referenceElement, this.element.nativeElement, () => this.updatePosition(), {\n elementResize: isPresent(window.ResizeObserver),\n animationFrame: this.options.updateOnAnimationFrame,\n }),\n );\n }\n\n private stopPositionUpdater(): void {\n this.positionUpdater?.();\n this.positionUpdater = null;\n }\n\n private async updatePosition(): Promise<void> {\n return computeOverlayPosition(\n this.referenceElement,\n this.element.nativeElement,\n this.contentElement.nativeElement,\n this.arrowElement.nativeElement,\n this.options,\n ).then(({ placement }) => {\n this.overlaySide = getSide(placement);\n });\n }\n}\n","<div class=\"odx-cdk-connected-overlay__content {{ options.containerClass }}\" #content>\n <ng-template [odxDynamicView]=\"options.content\" [odxDynamicViewContext]=\"options.context\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n <div class=\"odx-cdk-connected-overlay-arrow\" #arrow></div>\n</div>\n","import { inject, Injectable } from '@angular/core';\nimport { VirtualElement } from '@floating-ui/dom';\nimport { DynamicViewRenderingOptions, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { deepmerge } from '@odx/angular/internal';\nimport { ConnectedOverlayComponent } from './connected-overlay.component';\nimport { ConnectedOverlayOptions, ConnectedOverlayRef, DefaultConnectedOverlayOptions } from './models';\n\n/**\n * Service for creating and managing connected overlays. These overlays are UI elements such as popovers, tooltips,\n * or dropdown menus that are positioned relative to a reference element in the DOM. This service leverages the `DynamicViewService`\n * for dynamic component rendering and provides a streamlined API for creating overlays with custom positioning and options.\n *\n * Use the `ConnectedOverlayService` to dynamically create an overlay next to a specific element in your Angular application.\n * This example demonstrates creating a connected overlay next to a button element when the button is clicked.\n *\n * @example\n * ```ts\n * import { Component, ElementRef, ViewChild } from '@angular/core';\n * import { ConnectedOverlayService, ConnectedOverlayOptions } from '@odx/angular/cdk/connected-overlay';\n *\n * @Component({\n * selector: 'app-example',\n * template: `<button #triggerElement>Click me</button>`,\n * })\n * class AppComponent {\n * @ViewChild('triggerElement') triggerElementRef!: ElementRef;\n *\n * constructor(private connectedOverlayService: ConnectedOverlayService) {}\n *\n * showOverlay(): void {\n * const options: Partial<ConnectedOverlayOptions> = {\n * position: 'bottom-start',\n * showArrow: true,\n * content: 'Hello, world!',\n * };\n *\n * this.connectedOverlayService.createOverlay(this.triggerElementRef.nativeElement, options);\n * }\n * }\n * ```\n *\n * This service simplifies the process of creating dynamic, positionally aware overlays that enhance the interactivity\n * and visual appeal of Angular applications.\n */\n@Injectable({ providedIn: 'root' })\nexport class ConnectedOverlayService {\n private readonly dynamicViewService = inject(DynamicViewService);\n\n /**\n * Creates a connected overlay.\n * @param referenceElement - The reference element to which the overlay will be connected.\n * @param options - Optional configuration for the connected overlay.\n * @param renderingOptions - Optional rendering options for the connected overlay.\n * @returns {ConnectedOverlayRef} The created Connected Overlay reference instance.\n */\n public createOverlay(\n referenceElement: VirtualElement,\n options?: Partial<ConnectedOverlayOptions>,\n renderingOptions?: Partial<DynamicViewRenderingOptions>,\n ): ConnectedOverlayRef {\n const dynamicViewRef = this.dynamicViewService.createView(ConnectedOverlayComponent, {\n ...renderingOptions,\n context: { options: deepmerge(DefaultConnectedOverlayOptions, options) as ConnectedOverlayOptions, referenceElement },\n });\n\n return new ConnectedOverlayRef(dynamicViewRef);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["offset","withOffset"],"mappings":";;;;;;;;;;AAIA;;;;;;;;;AASG;AACI,eAAe,sBAAsB,CAC1C,gBAAgC,EAChC,cAA2B,EAC3B,cAA2B,EAC3B,YAAyB,EACzB,OAAgC,EAAA;IAEhC,MAAM,cAAc,GAAG,6BAA6B,CAAC;AACrD,IAAA,MAAM,EAAE,QAAQ,UAAEA,QAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,yBAAyB,EAAE,QA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C,MAAM,EAAA,CAAA;sBADZ,MAAM;;;AE/CT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCG;MAEU,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAqBlE,KAAA;AAnBC;;;;;;AAMG;AACI,IAAA,aAAa,CAClB,gBAAgC,EAChC,OAA0C,EAC1C,gBAAuD,EAAA;QAEvD,MAAM,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,yBAAyB,EAAE;AACnF,YAAA,GAAG,gBAAgB;AACnB,YAAA,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,8BAA8B,EAAE,OAAO,CAA4B,EAAE,gBAAgB,EAAE;AACtH,SAAA,CAAC,CAAC;AAEH,QAAA,OAAO,IAAI,mBAAmB,CAAC,cAAc,CAAC,CAAC;KAChD;+GArBU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA,EAAA;;4FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;AC5ClC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-connected-overlay.mjs","sources":["../../../../libs/angular/cdk/connected-overlay/src/lib/helpers/compute-overlay-position.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/models/connected-overlay-options.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/models/connected-overlay-ref.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.component.ts","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.component.html","../../../../libs/angular/cdk/connected-overlay/src/lib/connected-overlay.service.ts","../../../../libs/angular/cdk/connected-overlay/src/odx-angular-cdk-connected-overlay.ts"],"sourcesContent":["import { ComputePositionReturn, VirtualElement, arrow, computePosition, flip, hide, shift, size, offset as withOffset } from '@floating-ui/dom';\nimport { applyStyles, getOppositeSide, getSide, px } from '@odx/angular/utils';\nimport { ConnectedOverlayOptions } from '../models';\n\n/**\n * Computes the position of an overlay element relative to a reference element.\n *\n * @param referenceElement - The reference element to position the overlay relative to.\n * @param overlayElement - The overlay element to be positioned.\n * @param contentElement - The content element within the overlay.\n * @param arrowElement - The arrow element within the overlay.\n * @param options - The options for positioning the overlay.\n * @returns A promise that resolves to the computed position of the overlay.\n */\nexport async function computeOverlayPosition(\n referenceElement: VirtualElement,\n overlayElement: HTMLElement,\n contentElement: HTMLElement,\n arrowElement: HTMLElement,\n options: ConnectedOverlayOptions,\n): Promise<ComputePositionReturn> {\n const variablePrefix = '--odx-cdk-connected-overlay';\n const { position, offset, outerPadding, matchReferenceWidth, enableFallback, fallbackAxisSideDirection, strategy, minHeight } = options;\n const arrowSize = options.showArrow ? arrowElement.offsetWidth : 0;\n const arrowMiddleware = options.showArrow ? [arrow({ element: arrowElement, padding: 8 })] : [];\n const flipMiddleWare = enableFallback ? [flip({ fallbackAxisSideDirection })] : [];\n return computePosition(referenceElement, overlayElement, {\n strategy,\n placement: position,\n middleware: [\n withOffset(Math.max(offset, arrowSize + offset)),\n shift({ padding: outerPadding }),\n ...flipMiddleWare,\n size({\n padding: outerPadding,\n apply: ({ availableHeight, rects }) => {\n contentElement.style.setProperty?.(`${variablePrefix}-min-height`, minHeight ? px(Math.min(availableHeight, minHeight)) : null);\n contentElement.style.setProperty?.(`${variablePrefix}-min-width`, matchReferenceWidth ? px(rects.reference.width) : null);\n },\n }),\n ...arrowMiddleware,\n hide({ rootBoundary: 'viewport' }),\n ],\n }).then((result) => {\n overlayElement.style.setProperty?.(`${variablePrefix}-position-x`, px(result.x));\n overlayElement.style.setProperty?.(`${variablePrefix}-position-y`, px(result.y));\n if (options.hiddenClass) {\n overlayElement.classList.toggle(options.hiddenClass, !!result.middlewareData.hide?.referenceHidden);\n }\n if (options.showArrow) {\n const overlaySide = getSide(result.placement);\n const arrowSide = getOppositeSide(result.placement);\n applyStyles(arrowElement, {\n display: null,\n top: px(result.middlewareData.arrow?.y),\n left: px(result.middlewareData.arrow?.x),\n [arrowSide]: px(-arrowSize / 2),\n [overlaySide]: null,\n });\n } else {\n applyStyles(arrowElement, { display: 'none' });\n }\n\n return result;\n });\n}\n","import { Strategy } from '@floating-ui/dom';\nimport { DynamicContent } from '@odx/angular/cdk/dynamic-view';\nimport { Position } from '@odx/angular/utils';\n\nexport interface ConnectedOverlayOptions {\n content?: DynamicContent | null;\n context?: Record<string, unknown>;\n containerClass?: string | null;\n hiddenClass: string | null;\n enableFallback: boolean;\n fallbackAxisSideDirection: 'start' | 'end';\n matchReferenceWidth: boolean;\n minHeight?: number | null;\n offset: number;\n outerPadding: number;\n position: Position;\n strategy: Strategy;\n showArrow?: boolean;\n updateOnAnimationFrame?: boolean;\n hooks?: {\n beforeOpen?: () => void;\n afterOpen?: () => void;\n beforeClose?: () => void;\n afterClose?: () => void;\n };\n}\n\nexport const DefaultConnectedOverlayOptions: ConnectedOverlayOptions = {\n hiddenClass: 'is-hidden',\n enableFallback: false,\n fallbackAxisSideDirection: 'start',\n matchReferenceWidth: false,\n offset: 8,\n outerPadding: 12,\n position: Position.BOTTOM,\n strategy: 'fixed',\n};\n","import { DynamicViewRef } from '@odx/angular/cdk/dynamic-view';\nimport { EMPTY, Observable } from 'rxjs';\nimport { ConnectedOverlayComponent } from '../connected-overlay.component';\nimport { ConnectedOverlayOptions } from './connected-overlay-options';\n\n/**\n * A reference to a connected overlay created by the `ConnectedOverlayService`. This class provides methods to interact\n * with the overlay, such as updating its options or closing it. It encapsulates the `DynamicViewRef` for the overlay's instance,\n * allowing for direct manipulation of the overlay's state and behavior.\n *\n * This example demonstrates how to use a `ConnectedOverlayRef` to update and close a connected overlay in response\n * to user interactions.\n *\n * @example\n * ```ts\n * class MyComponent {\n * private overlayRef?: ConnectedOverlayRef;\n *\n * constructor(private overlayService: ConnectedOverlayService) {}\n *\n * openOverlay() {\n * this.overlayRef = this.overlayService.createOverlay(this.someElementRef.nativeElement, { position: 'bottom' });\n * }\n *\n * updateOverlayPosition() {\n * if (this.overlayRef) {\n * this.overlayRef.update({ position: 'top' });\n * }\n * }\n *\n * closeOverlay() {\n * this.overlayRef?.close();\n * }\n * }\n * ```\n *\n * In this example, `MyComponent` uses the `ConnectedOverlayService` to create an overlay. It stores a reference to\n * the created overlay in `overlayRef`, allowing it to update the overlay's position or close it when necessary.\n */\nexport class ConnectedOverlayRef {\n public readonly element = this.dynamicViewRef.getElement();\n\n /**\n * An Observable that emits when the overlay is closed.\n *\n * @emits {void} - Emits when the overlay is closed.\n *\n */\n public readonly onClose$: Observable<void> = this.dynamicViewRef.getContext().closed ?? EMPTY;\n\n constructor(private readonly dynamicViewRef: DynamicViewRef<typeof ConnectedOverlayComponent>) {}\n\n /**\n * Updates the connected overlay with new options.\n *\n * @param options {Partial<ConnectedOverlayOptions>} - The new options to be applied to the connected overlay.\n */\n public update(options: Partial<ConnectedOverlayOptions>): void {\n this.dynamicViewRef.update({ options: options as ConnectedOverlayOptions });\n }\n\n /**\n * Closes the connected overlay.\n *\n * @returns {void}\n */\n public close(): void {\n this.dynamicViewRef.destroy();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Injector,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { VirtualElement, autoUpdate } from '@floating-ui/dom';\nimport { CoreModule } from '@odx/angular';\nimport { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgChanges, Side, deferFn, getSide, hasChanged, injectElement, isPresent } from '@odx/angular/utils';\nimport { Subject } from 'rxjs';\nimport { computeOverlayPosition } from './helpers';\nimport { ConnectedOverlayOptions, DefaultConnectedOverlayOptions } from './models';\n\n@CSSComponent('cdk-connected-overlay')\n@Component({\n standalone: true,\n selector: 'odx-connected-overlay[popover=\"manual\"]',\n imports: [CoreModule, DynamicViewDirective],\n templateUrl: 'connected-overlay.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class ConnectedOverlayComponent implements OnInit, OnChanges, OnDestroy {\n private readonly zone = inject(NgZone);\n private positionUpdater: (() => void) | null = null;\n\n protected readonly injector = inject(Injector);\n protected overlaySide?: Side;\n\n @ViewChild('content', { static: true })\n protected contentElement!: ElementRef<HTMLElement>;\n\n @ViewChild('arrow', { static: true })\n protected arrowElement!: ElementRef<HTMLElement>;\n\n public readonly element = injectElement();\n\n @Input()\n public referenceElement!: VirtualElement;\n\n @Input()\n public options: ConnectedOverlayOptions = DefaultConnectedOverlayOptions;\n\n @Output()\n public closed = new Subject<void>();\n\n public ngOnInit(): void {\n this.options.hooks?.beforeOpen?.();\n deferFn(() => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.element.nativeElement as any)?.showPopover?.();\n this.options.hooks?.afterOpen?.();\n });\n }\n\n public ngOnChanges(changes: NgChanges<ConnectedOverlayComponent>): void {\n if (hasChanged(changes, ['options'], false)) {\n this.overlaySide = getSide(this.options.position);\n }\n if (hasChanged(changes, ['referenceElement', 'options'], false)) {\n this.stopPositionUpdater();\n this.startPositionUpdater();\n }\n }\n\n public ngOnDestroy(): void {\n this.options.hooks?.beforeClose?.();\n this.stopPositionUpdater();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.element.nativeElement as any)?.hidePopover?.();\n this.options.hooks?.afterClose?.();\n }\n\n private startPositionUpdater(): void {\n this.positionUpdater = this.zone.runOutsideAngular(() =>\n autoUpdate(this.referenceElement, this.element.nativeElement, () => this.updatePosition(), {\n elementResize: isPresent(window.ResizeObserver),\n animationFrame: this.options.updateOnAnimationFrame,\n }),\n );\n }\n\n private stopPositionUpdater(): void {\n this.positionUpdater?.();\n this.positionUpdater = null;\n }\n\n private async updatePosition(): Promise<void> {\n return computeOverlayPosition(\n this.referenceElement,\n this.element.nativeElement,\n this.contentElement.nativeElement,\n this.arrowElement.nativeElement,\n this.options,\n ).then(({ placement }) => {\n this.overlaySide = getSide(placement);\n });\n }\n}\n","<div class=\"odx-cdk-connected-overlay__content {{ options.containerClass }}\" #content>\n <ng-template [odxDynamicView]=\"options.content\" [odxDynamicViewContext]=\"options.context\" [odxDynamicViewInjector]=\"injector\" />\n <div class=\"odx-cdk-connected-overlay-arrow\" #arrow></div>\n</div>\n","import { inject, Injectable } from '@angular/core';\nimport { VirtualElement } from '@floating-ui/dom';\nimport { DynamicViewRenderingOptions, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { deepmerge } from '@odx/angular/internal';\nimport { ConnectedOverlayComponent } from './connected-overlay.component';\nimport { ConnectedOverlayOptions, ConnectedOverlayRef, DefaultConnectedOverlayOptions } from './models';\n\n/**\n * Service for creating and managing connected overlays. These overlays are UI elements such as popovers, tooltips,\n * or dropdown menus that are positioned relative to a reference element in the DOM. This service leverages the `DynamicViewService`\n * for dynamic component rendering and provides a streamlined API for creating overlays with custom positioning and options.\n *\n * Use the `ConnectedOverlayService` to dynamically create an overlay next to a specific element in your Angular application.\n * This example demonstrates creating a connected overlay next to a button element when the button is clicked.\n *\n * @example\n * ```ts\n * import { Component, ElementRef, ViewChild } from '@angular/core';\n * import { ConnectedOverlayService, ConnectedOverlayOptions } from '@odx/angular/cdk/connected-overlay';\n *\n * @Component({\n * selector: 'app-example',\n * template: `<button #triggerElement>Click me</button>`,\n * })\n * class AppComponent {\n * @ViewChild('triggerElement') triggerElementRef!: ElementRef;\n *\n * constructor(private connectedOverlayService: ConnectedOverlayService) {}\n *\n * showOverlay(): void {\n * const options: Partial<ConnectedOverlayOptions> = {\n * position: 'bottom-start',\n * showArrow: true,\n * content: 'Hello, world!',\n * };\n *\n * this.connectedOverlayService.createOverlay(this.triggerElementRef.nativeElement, options);\n * }\n * }\n * ```\n *\n * This service simplifies the process of creating dynamic, positionally aware overlays that enhance the interactivity\n * and visual appeal of Angular applications.\n */\n@Injectable({ providedIn: 'root' })\nexport class ConnectedOverlayService {\n private readonly dynamicViewService = inject(DynamicViewService);\n\n /**\n * Creates a connected overlay.\n * @param referenceElement - The reference element to which the overlay will be connected.\n * @param options - Optional configuration for the connected overlay.\n * @param renderingOptions - Optional rendering options for the connected overlay.\n * @returns {ConnectedOverlayRef} The created Connected Overlay reference instance.\n */\n public createOverlay(\n referenceElement: VirtualElement,\n options?: Partial<ConnectedOverlayOptions>,\n renderingOptions?: Partial<DynamicViewRenderingOptions>,\n ): ConnectedOverlayRef {\n const dynamicViewRef = this.dynamicViewService.createView(ConnectedOverlayComponent, {\n ...renderingOptions,\n context: { options: deepmerge(DefaultConnectedOverlayOptions, options) as ConnectedOverlayOptions, referenceElement },\n });\n\n return new ConnectedOverlayRef(dynamicViewRef);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["offset","withOffset"],"mappings":";;;;;;;;;;AAIA;;;;;;;;;AASG;AACI,eAAe,sBAAsB,CAC1C,gBAAgC,EAChC,cAA2B,EAC3B,cAA2B,EAC3B,YAAyB,EACzB,OAAgC,EAAA;IAEhC,MAAM,cAAc,GAAG,6BAA6B,CAAC;AACrD,IAAA,MAAM,EAAE,QAAQ,UAAEA,QAAM,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,yBAAyB,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;AACxI,IAAA,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,YAAY,CAAC,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CAAA;AADpC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAqBlE,KAAA;AAnBC;;;;;;AAMG;AACI,IAAA,aAAa,CAClB,gBAAgC,EAChC,OAA0C,EAC1C,gBAAuD,EAAA;QAEvD,MAAM,cAAc,GAAG,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,yBAAyB,EAAE;AACnF,YAAA,GAAG,gBAAgB;AACnB,YAAA,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,8BAA8B,EAAE,OAAO,CAA4B,EAAE,gBAAgB,EAAE;AACtH,SAAA,CAAC,CAAC;AAEH,QAAA,OAAO,IAAI,mBAAmB,CAAC,cAAc,CAAC,CAAC;KAChD;+GArBU,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA,CAAA,EAAA;;4FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;AC5ClC;;AAEG;;;;"}
|
|
@@ -8,10 +8,9 @@ import { injectElement } from '@odx/angular/utils';
|
|
|
8
8
|
import { DisabledController, CoreModule } from '@odx/angular';
|
|
9
9
|
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
10
10
|
import { expand, collapse } from '@odx/angular/animations';
|
|
11
|
-
import * as
|
|
11
|
+
import * as i2 from '@odx/angular/cdk/a11y';
|
|
12
12
|
import { A11yModule } from '@odx/angular/cdk/a11y';
|
|
13
13
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
14
|
-
import * as i2 from '@angular/common';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Represents an accordion component.
|
|
@@ -26,14 +25,14 @@ let AccordionComponent = class AccordionComponent {
|
|
|
26
25
|
this.element = injectElement();
|
|
27
26
|
}
|
|
28
27
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AccordionComponent, isStandalone: true, selector: "odx-accordion", hostDirectives: [{ directive: i1.ExpandableContainerDirective, inputs: ["multiple", "multiple"] }], ngImport: i0, template: "<ng-content select=\"odx-accordion-item\"
|
|
28
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AccordionComponent, isStandalone: true, selector: "odx-accordion", hostDirectives: [{ directive: i1.ExpandableContainerDirective, inputs: ["multiple", "multiple"] }], ngImport: i0, template: "<ng-content select=\"odx-accordion-item\" />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
30
29
|
};
|
|
31
30
|
AccordionComponent = __decorate([
|
|
32
31
|
CSSComponent('accordion')
|
|
33
32
|
], AccordionComponent);
|
|
34
33
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
35
34
|
type: Component,
|
|
36
|
-
args: [{ selector: 'odx-accordion', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }], template: "<ng-content select=\"odx-accordion-item\"
|
|
35
|
+
args: [{ selector: 'odx-accordion', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }], template: "<ng-content select=\"odx-accordion-item\" />\n" }]
|
|
37
36
|
}] });
|
|
38
37
|
|
|
39
38
|
/**
|
|
@@ -94,7 +93,7 @@ let AccordionItemComponent = class AccordionItemComponent {
|
|
|
94
93
|
this.expandedChange.emit(this.expandableItem.expanded);
|
|
95
94
|
}
|
|
96
95
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
97
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
96
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AccordionItemComponent, isStandalone: true, selector: "odx-accordion-item", inputs: { title: "title" }, outputs: { expandedChange: "expandedChange" }, host: { properties: { "class.is-disabled": "isDisabled", "class.odx-accordion-item--expanded": "isExpanded", "attr.id": "expandableItem.id", "attr.title": "null" } }, providers: [DisabledController.connect()], hostDirectives: [{ directive: i1.ExpandableItemDirective, inputs: ["expanded", "expanded", "id", "id"] }], ngImport: i0, template: "<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title) {\n <div>{{ title }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n@if (isExpanded) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" @expandSlotAnimation (@expandSlotAnimation.done)=\"onAnimationEnd()\">\n <ng-content />\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.InteractiveDirective, selector: "[odxCdkInteractive]", outputs: ["odxCdkInteractive"] }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
98
97
|
};
|
|
99
98
|
AccordionItemComponent = __decorate([
|
|
100
99
|
CSSComponent('accordion-item')
|
|
@@ -106,7 +105,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
106
105
|
'[class.odx-accordion-item--expanded]': 'isExpanded',
|
|
107
106
|
'[attr.id]': 'expandableItem.id',
|
|
108
107
|
'[attr.title]': 'null',
|
|
109
|
-
}, animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], template: "<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n
|
|
108
|
+
}, animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])], template: "<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title) {\n <div>{{ title }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n@if (isExpanded) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" @expandSlotAnimation (@expandSlotAnimation.done)=\"onAnimationEnd()\">\n <ng-content />\n </div>\n}\n" }]
|
|
110
109
|
}], propDecorators: { title: [{
|
|
111
110
|
type: Input
|
|
112
111
|
}], expandedChange: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-accordion.mjs","sources":["../../../../libs/angular/components/accordion/src/lib/accordion.component.ts","../../../../libs/angular/components/accordion/src/lib/accordion.component.html","../../../../libs/angular/components/accordion/src/lib/components/accordion-item/accordion-item.component.ts","../../../../libs/angular/components/accordion/src/lib/components/accordion-item/accordion-item.component.html","../../../../libs/angular/components/accordion/src/lib/directives/accordion-item-title.ts","../../../../libs/angular/components/accordion/src/lib/accordion.module.ts","../../../../libs/angular/components/accordion/src/odx-angular-components-accordion.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an accordion component.\n * Has host directive ExpandableContainerDirective\n *\n * @see {ExpandableContainerDirective}\n *\n * You can manage the expansion state of the accordion items by using the `ExpandableContainerDirective` methods.\n */\n@CSSComponent('accordion')\n@Component({\n selector: 'odx-accordion',\n templateUrl: './accordion.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class AccordionComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-accordion-item\"></ng-content>\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { collapse, expand } from '@odx/angular/animations';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an item in an accordion component.\n * Has host directive ExpandableItemDirective\n *\n * @see {ExpandableItemDirective}\n *\n * You can control the accordion item's expansion state through the ExpandableItemDirective methods.\n */\n@CSSComponent('accordion-item')\n@Component({\n selector: 'odx-accordion-item',\n templateUrl: './accordion-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, CoreModule, IconComponent],\n providers: [DisabledController.connect()],\n hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n host: {\n '[class.is-disabled]': 'isDisabled',\n '[class.odx-accordion-item--expanded]': 'isExpanded',\n '[attr.id]': 'expandableItem.id',\n '[attr.title]': 'null',\n },\n animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])],\n})\nexport class AccordionItemComponent {\n private readonly disabledController = DisabledController.inject();\n protected readonly expandableItem = inject(ExpandableItemDirective, { self: true });\n public readonly element = injectElement();\n\n /**\n * The title of the accordion item.\n *\n * @type {string | null}\n */\n @Input()\n public title?: string | null;\n\n /**\n * Event emitter for the expanded state change of the accordion item.\n *\n * @emits {boolean} The expanded state of the accordion item.\n */\n @Output()\n public expandedChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * Gets a value indicating whether the accordion item is disabled.\n *\n * @returns {boolean} True if the accordion item is disabled, false otherwise.\n */\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Gets a value indicating whether the accordion item is expanded.\n *\n * @returns {boolean} True if the accordion item is expanded, false otherwise.\n */\n public get isExpanded(): boolean {\n return !this.isDisabled && this.expandableItem.expanded;\n }\n\n /**\n * Gets the ID of the title element for accessibility purposes.\n * The ID is generated by appending \"-title\" to the ID of the expandable item.\n *\n * @returns {string} The ID of the title element.\n */\n public get titleId(): string {\n return `${this.expandableItem.id}-title`;\n }\n\n /**\n * Gets the slot ID for the accordion item.\n * The slot ID is generated by appending \"-slot\" to the ID of the expandable item.\n *\n * @returns {string} The slot ID.\n */\n public get slotId(): string {\n return `${this.expandableItem.id}-slot`;\n }\n\n protected onAnimationEnd(): void {\n this.expandedChange.emit(this.expandableItem.expanded);\n }\n}\n","<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n <div *ngIf=\"title; else titleTpl\">\n {{ title }}\n </div>\n <ng-template #titleTpl>\n <ng-content select=\"odx-accordion-item-title\"></ng-content>\n </ng-template>\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n</div>\n<div\n class=\"odx-accordion-item__slot\"\n [attr.id]=\"slotId\"\n [attr.aria-labelledby]=\"titleId\"\n @expandSlotAnimation\n (@expandSlotAnimation.done)=\"onAnimationEnd()\"\n *ngIf=\"isExpanded\"\n>\n <ng-content></ng-content>\n</div>\n","import { Directive } from '@angular/core';\n\n/**\n * Directive for the title of an accordion item.\n */\n@Directive({\n standalone: true,\n selector: 'odx-accordion-item-title',\n})\nexport class AccordionItemTitleDirective {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionItemComponent } from './components';\nimport { AccordionItemTitleDirective } from './directives';\n\nconst modules = [AccordionComponent, AccordionItemComponent, AccordionItemTitleDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class AccordionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA;;;;;;;AAOG;AAUU,IAAA,kBAAkB,GAAxB,MAAM,kBAAkB,CAAA;AAAxB,IAAA,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AAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EANX,OAAA,EAAA,CAAA,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAI5E,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM3E,eAAe,EAAA,OAAA,EAAA,CANS,sBAAsB,EAI/C,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-accordion.mjs","sources":["../../../../libs/angular/components/accordion/src/lib/accordion.component.ts","../../../../libs/angular/components/accordion/src/lib/accordion.component.html","../../../../libs/angular/components/accordion/src/lib/components/accordion-item/accordion-item.component.ts","../../../../libs/angular/components/accordion/src/lib/components/accordion-item/accordion-item.component.html","../../../../libs/angular/components/accordion/src/lib/directives/accordion-item-title.ts","../../../../libs/angular/components/accordion/src/lib/accordion.module.ts","../../../../libs/angular/components/accordion/src/odx-angular-components-accordion.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ExpandableContainerDirective } from '@odx/angular/cdk/expandable';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an accordion component.\n * Has host directive ExpandableContainerDirective\n *\n * @see {ExpandableContainerDirective}\n *\n * You can manage the expansion state of the accordion items by using the `ExpandableContainerDirective` methods.\n */\n@CSSComponent('accordion')\n@Component({\n selector: 'odx-accordion',\n templateUrl: './accordion.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [{ directive: ExpandableContainerDirective, inputs: ['multiple'] }],\n})\nexport class AccordionComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-accordion-item\" />\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, DisabledController } from '@odx/angular';\nimport { collapse, expand } from '@odx/angular/animations';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { ExpandableItemDirective } from '@odx/angular/cdk/expandable';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an item in an accordion component.\n * Has host directive ExpandableItemDirective\n *\n * @see {ExpandableItemDirective}\n *\n * You can control the accordion item's expansion state through the ExpandableItemDirective methods.\n */\n@CSSComponent('accordion-item')\n@Component({\n selector: 'odx-accordion-item',\n templateUrl: './accordion-item.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, CoreModule, IconComponent],\n providers: [DisabledController.connect()],\n hostDirectives: [{ directive: ExpandableItemDirective, inputs: ['expanded', 'id'] }],\n host: {\n '[class.is-disabled]': 'isDisabled',\n '[class.odx-accordion-item--expanded]': 'isExpanded',\n '[attr.id]': 'expandableItem.id',\n '[attr.title]': 'null',\n },\n animations: [trigger('expandSlotAnimation', [transition(':enter', [useAnimation(expand)]), transition(':leave', [useAnimation(collapse)])])],\n})\nexport class AccordionItemComponent {\n private readonly disabledController = DisabledController.inject();\n protected readonly expandableItem = inject(ExpandableItemDirective, { self: true });\n public readonly element = injectElement();\n\n /**\n * The title of the accordion item.\n *\n * @type {string | null}\n */\n @Input()\n public title?: string | null;\n\n /**\n * Event emitter for the expanded state change of the accordion item.\n *\n * @emits {boolean} The expanded state of the accordion item.\n */\n @Output()\n public expandedChange: EventEmitter<boolean> = new EventEmitter();\n\n /**\n * Gets a value indicating whether the accordion item is disabled.\n *\n * @returns {boolean} True if the accordion item is disabled, false otherwise.\n */\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Gets a value indicating whether the accordion item is expanded.\n *\n * @returns {boolean} True if the accordion item is expanded, false otherwise.\n */\n public get isExpanded(): boolean {\n return !this.isDisabled && this.expandableItem.expanded;\n }\n\n /**\n * Gets the ID of the title element for accessibility purposes.\n * The ID is generated by appending \"-title\" to the ID of the expandable item.\n *\n * @returns {string} The ID of the title element.\n */\n public get titleId(): string {\n return `${this.expandableItem.id}-title`;\n }\n\n /**\n * Gets the slot ID for the accordion item.\n * The slot ID is generated by appending \"-slot\" to the ID of the expandable item.\n *\n * @returns {string} The slot ID.\n */\n public get slotId(): string {\n return `${this.expandableItem.id}-slot`;\n }\n\n protected onAnimationEnd(): void {\n this.expandedChange.emit(this.expandableItem.expanded);\n }\n}\n","<div\n role=\"button\"\n class=\"odx-accordion-item__panel\"\n [attr.id]=\"titleId\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"slotId\"\n (odxCdkInteractive)=\"expandableItem.toggle()\"\n>\n @if (title) {\n <div>{{ title }}</div>\n } @else {\n <ng-content select=\"odx-accordion-item-title\" />\n }\n\n <odx-icon class=\"odx-accordion-item__icon\" name=\"chevron-down\" iconSet=\"core\" />\n</div>\n@if (isExpanded) {\n <div class=\"odx-accordion-item__slot\" [attr.id]=\"slotId\" [attr.aria-labelledby]=\"titleId\" @expandSlotAnimation (@expandSlotAnimation.done)=\"onAnimationEnd()\">\n <ng-content />\n </div>\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Directive for the title of an accordion item.\n */\n@Directive({\n standalone: true,\n selector: 'odx-accordion-item-title',\n})\nexport class AccordionItemTitleDirective {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AccordionComponent } from './accordion.component';\nimport { AccordionItemComponent } from './components';\nimport { AccordionItemTitleDirective } from './directives';\n\nconst modules = [AccordionComponent, AccordionItemComponent, AccordionItemTitleDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class AccordionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAKA;;;;;;;AAOG;AAUU,IAAA,kBAAkB,GAAxB,MAAM,kBAAkB,CAAA;AAAxB,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAC3C,KAAA;+GAFY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,6KCtB/B,gDACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;ADqBa,kBAAkB,GAAA,UAAA,CAAA;IAT9B,YAAY,CAAC,WAAW,CAAC;AASb,CAAA,EAAA,kBAAkB,CAE9B,CAAA;4FAFY,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAR9B,SAAS;+BACE,eAAe,EAAA,UAAA,EAEb,IAAI,EACC,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,cAAA,EACrB,CAAC,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,EAAE,CAAC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IAAI;AAChB,oBAAA,QAAQ,EAAE,0BAA0B;AACrC,iBAAA,CAAA;;;ACFD,MAAM,OAAO,GAAG,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAAC,CAAC;MAM7E,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EANX,OAAA,EAAA,CAAA,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAI5E,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,kBAAkB,EAAE,sBAAsB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;gHAM3E,eAAe,EAAA,OAAA,EAAA,CANS,sBAAsB,EAI/C,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -19,7 +19,7 @@ let ActionGroupComponent = class ActionGroupComponent {
|
|
|
19
19
|
this.reverse = false;
|
|
20
20
|
}
|
|
21
21
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ActionGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.12", type: ActionGroupComponent, isStandalone: true, selector: "odx-action-group", inputs: { reverse: ["reverse", "reverse", booleanAttribute] }, ngImport: i0, template: "<ng-content select=\"[odxButton], ng-template\"
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.3.12", type: ActionGroupComponent, isStandalone: true, selector: "odx-action-group", inputs: { reverse: ["reverse", "reverse", booleanAttribute] }, ngImport: i0, template: "<ng-content select=\"[odxButton], ng-template\" />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
23
23
|
};
|
|
24
24
|
__decorate([
|
|
25
25
|
CSSModifier(),
|
|
@@ -30,7 +30,7 @@ ActionGroupComponent = __decorate([
|
|
|
30
30
|
], ActionGroupComponent);
|
|
31
31
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ActionGroupComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
|
-
args: [{ selector: 'odx-action-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-content select=\"[odxButton], ng-template\"
|
|
33
|
+
args: [{ selector: 'odx-action-group', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-content select=\"[odxButton], ng-template\" />\n" }]
|
|
34
34
|
}], propDecorators: { reverse: [{
|
|
35
35
|
type: Input,
|
|
36
36
|
args: [{ transform: booleanAttribute }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-action-group.mjs","sources":["../../../../libs/angular/components/action-group/src/action-group.component.ts","../../../../libs/angular/components/action-group/src/action-group.component.html","../../../../libs/angular/components/action-group/src/odx-angular-components-action-group.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an action group component.\n */\n@CSSComponent('action-group')\n@Component({\n selector: 'odx-action-group',\n templateUrl: './action-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class ActionGroupComponent {\n public readonly element = injectElement();\n\n /**\n * Indicates whether the action group should be displayed in reverse order.\n *\n * @type {boolean}\n * @default false\n */\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public reverse = false;\n}\n","<ng-content select=\"[odxButton], ng-template\"
|
|
1
|
+
{"version":3,"file":"odx-angular-components-action-group.mjs","sources":["../../../../libs/angular/components/action-group/src/action-group.component.ts","../../../../libs/angular/components/action-group/src/action-group.component.html","../../../../libs/angular/components/action-group/src/odx-angular-components-action-group.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents an action group component.\n */\n@CSSComponent('action-group')\n@Component({\n selector: 'odx-action-group',\n templateUrl: './action-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class ActionGroupComponent {\n public readonly element = injectElement();\n\n /**\n * Indicates whether the action group should be displayed in reverse order.\n *\n * @type {boolean}\n * @default false\n */\n @CSSModifier()\n @Input({ transform: booleanAttribute })\n public reverse = false;\n}\n","<ng-content select=\"[odxButton], ng-template\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIA;;AAEG;AASU,IAAA,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAA1B,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;;;AAKG;QAGI,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AACxB,KAAA;+GAZY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAUX,gBAAgB,CAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzBtC,sDACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;ADyBS,UAAA,CAAA;AAFN,IAAA,WAAW,EAAE;;AAES,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAXZ,oBAAoB,GAAA,UAAA,CAAA;IARhC,YAAY,CAAC,cAAc,CAAC;AAQhB,CAAA,EAAA,oBAAoB,CAYhC,CAAA;4FAZY,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;+BACE,kBAAkB,EAAA,aAAA,EAEb,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,QAAA,EAAA,sDAAA,EAAA,CAAA;8BAaT,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;;;AEzBxC;;AAEG;;;;"}
|
|
@@ -32,7 +32,7 @@ let AreaHeaderComponent = class AreaHeaderComponent {
|
|
|
32
32
|
this.size = AreaHeaderSize.LARGE;
|
|
33
33
|
}
|
|
34
34
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AreaHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AreaHeaderComponent, isStandalone: true, selector: "odx-area-header", inputs: { size: "size" }, ngImport: i0, template: "<div class=\"odx-area-header__container\">\n <ng-content select=\"button[odxNavigationBack], a[odxNavigationBack]\"
|
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AreaHeaderComponent, isStandalone: true, selector: "odx-area-header", inputs: { size: "size" }, ngImport: i0, template: "<div class=\"odx-area-header__container\">\n <ng-content select=\"button[odxNavigationBack], a[odxNavigationBack]\" />\n <ng-content select=\"odx-avatar\" />\n <div class=\"odx-area-header__inner\">\n <div class=\"odx-area-header__title\">\n <ng-content />\n </div>\n <ng-content select=\"odx-area-header-subtitle\" />\n </div>\n</div>\n<ng-content select=\"odx-area-header-content\" />\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
36
36
|
};
|
|
37
37
|
__decorate([
|
|
38
38
|
CSSModifier(),
|
|
@@ -43,7 +43,7 @@ AreaHeaderComponent = __decorate([
|
|
|
43
43
|
], AreaHeaderComponent);
|
|
44
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AreaHeaderComponent, decorators: [{
|
|
45
45
|
type: Component,
|
|
46
|
-
args: [{ selector: 'odx-area-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], standalone: true, template: "<div class=\"odx-area-header__container\">\n <ng-content select=\"button[odxNavigationBack], a[odxNavigationBack]\"
|
|
46
|
+
args: [{ selector: 'odx-area-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule], standalone: true, template: "<div class=\"odx-area-header__container\">\n <ng-content select=\"button[odxNavigationBack], a[odxNavigationBack]\" />\n <ng-content select=\"odx-avatar\" />\n <div class=\"odx-area-header__inner\">\n <div class=\"odx-area-header__title\">\n <ng-content />\n </div>\n <ng-content select=\"odx-area-header-subtitle\" />\n </div>\n</div>\n<ng-content select=\"odx-area-header-content\" />\n" }]
|
|
47
47
|
}], propDecorators: { size: [{
|
|
48
48
|
type: Input
|
|
49
49
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-area-header.mjs","sources":["../../../../libs/angular/components/area-header/src/models/area-header-size.ts","../../../../libs/angular/components/area-header/src/area-header.component.ts","../../../../libs/angular/components/area-header/src/area-header.component.html","../../../../libs/angular/components/area-header/src/directives/area-header-content.directive.ts","../../../../libs/angular/components/area-header/src/directives/area-header-subtitle.directive.ts","../../../../libs/angular/components/area-header/src/area-header.module.ts","../../../../libs/angular/components/area-header/src/odx-angular-components-area-header.ts"],"sourcesContent":["export type AreaHeaderSize = typeof AreaHeaderSize[keyof typeof AreaHeaderSize];\n\nexport const AreaHeaderSize = {\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n XLARGE: 'xlarge',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { AreaHeaderSize } from './models';\n\n/**\n * Represents the AreaHeaderComponent.\n */\n@CSSComponent('area-header')\n@Component({\n selector: 'odx-area-header',\n templateUrl: './area-header.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule],\n standalone: true,\n})\nexport class AreaHeaderComponent {\n public readonly element = injectElement();\n\n /**\n * The size of the area header.\n *\n * @type {AreaHeaderSize}\n * @default AreaHeaderSize.LARGE\n */\n @CSSModifier()\n @Input()\n public size: AreaHeaderSize = AreaHeaderSize.LARGE;\n}\n","<div class=\"odx-area-header__container\">\n <ng-content select=\"button[odxNavigationBack], a[odxNavigationBack]\"
|
|
1
|
+
{"version":3,"file":"odx-angular-components-area-header.mjs","sources":["../../../../libs/angular/components/area-header/src/models/area-header-size.ts","../../../../libs/angular/components/area-header/src/area-header.component.ts","../../../../libs/angular/components/area-header/src/area-header.component.html","../../../../libs/angular/components/area-header/src/directives/area-header-content.directive.ts","../../../../libs/angular/components/area-header/src/directives/area-header-subtitle.directive.ts","../../../../libs/angular/components/area-header/src/area-header.module.ts","../../../../libs/angular/components/area-header/src/odx-angular-components-area-header.ts"],"sourcesContent":["export type AreaHeaderSize = typeof AreaHeaderSize[keyof typeof AreaHeaderSize];\n\nexport const AreaHeaderSize = {\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n XLARGE: 'xlarge',\n} as const;\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { AreaHeaderSize } from './models';\n\n/**\n * Represents the AreaHeaderComponent.\n */\n@CSSComponent('area-header')\n@Component({\n selector: 'odx-area-header',\n templateUrl: './area-header.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule],\n standalone: true,\n})\nexport class AreaHeaderComponent {\n public readonly element = injectElement();\n\n /**\n * The size of the area header.\n *\n * @type {AreaHeaderSize}\n * @default AreaHeaderSize.LARGE\n */\n @CSSModifier()\n @Input()\n public size: AreaHeaderSize = AreaHeaderSize.LARGE;\n}\n","<div class=\"odx-area-header__container\">\n <ng-content select=\"button[odxNavigationBack], a[odxNavigationBack]\" />\n <ng-content select=\"odx-avatar\" />\n <div class=\"odx-area-header__inner\">\n <div class=\"odx-area-header__title\">\n <ng-content />\n </div>\n <ng-content select=\"odx-area-header-subtitle\" />\n </div>\n</div>\n<ng-content select=\"odx-area-header-content\" />\n","import { Directive } from '@angular/core';\n\n/**\n * Directive for the content of the area header.\n */\n@Directive({\n selector: 'odx-area-header-content',\n standalone: true,\n host: {\n '[class.odx-area-header__content]': 'true',\n },\n})\nexport class AreaHeaderContentDirective {}\n","import { Directive } from '@angular/core';\n\n/**\n * Directive for displaying a subtitle in the area header component.\n */\n@Directive({\n selector: 'odx-area-header-subtitle',\n standalone: true,\n host: {\n '[class.odx-area-header__subtitle]': 'true',\n },\n})\nexport class AreaHeaderSubtitleDirective {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { AvatarComponent } from '@odx/angular/components/avatar';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { AreaHeaderComponent } from './area-header.component';\nimport { AreaHeaderContentDirective, AreaHeaderSubtitleDirective } from './directives';\n\nconst modules = [\n AreaHeaderComponent,\n AreaHeaderContentDirective,\n AreaHeaderSubtitleDirective,\n AvatarComponent,\n ActionGroupComponent,\n ButtonComponent,\n IconComponent,\n];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class AreaHeaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAEa,MAAA,cAAc,GAAG;AAC5B,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;;;ACAlB;;AAEG;AAUU,IAAA,mBAAmB,GAAzB,MAAM,mBAAmB,CAAA;AAAzB,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;;;AAKG;AAGI,QAAA,IAAA,CAAA,IAAI,GAAmB,cAAc,CAAC,KAAK,CAAC;AACpD,KAAA;+GAZY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAnB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AA,EAAA,IAAA,EAAA,gBAAgB,YAb3B,mBAAmB;YACnB,0BAA0B;YAC1B,2BAA2B;YAC3B,eAAe;YACf,oBAAoB;YACpB,eAAe;YACf,aAAa,CAAA,EAAA,OAAA,EAAA,CAKH,UAAU,EAXpB,mBAAmB;YACnB,0BAA0B;YAC1B,2BAA2B;YAC3B,eAAe;YACf,oBAAoB;YACpB,eAAe;YACf,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;AAOF,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAb3B,mBAAmB;YAGnB,eAAe;YACf,oBAAoB;YACpB,eAAe;AACf,YAAA,aAAa,EAKH,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
@@ -11,7 +11,6 @@ import { deferFn } from '@odx/angular/utils';
|
|
|
11
11
|
import { tap, filter } from 'rxjs';
|
|
12
12
|
import { OptionControl } from '@odx/angular/cdk/option-control';
|
|
13
13
|
import { InputControlDirective } from '@odx/angular/cdk/custom-form-control';
|
|
14
|
-
import * as i2 from '@angular/common';
|
|
15
14
|
|
|
16
15
|
const AUTOCOMPLETE_CONTROL = new InjectionToken('@odx/angular/components/autocomplete::AutocompleteComponent');
|
|
17
16
|
|
|
@@ -41,14 +40,14 @@ let AutocompleteOptionComponent = class AutocompleteOptionComponent extends Opti
|
|
|
41
40
|
this.autocompleteControl.selectOption(this);
|
|
42
41
|
}
|
|
43
42
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AutocompleteOptionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AutocompleteOptionComponent, isStandalone: true, selector: "odx-autocomplete-option", usesInheritance: true, ngImport: i0, template: "<ng-content
|
|
43
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AutocompleteOptionComponent, isStandalone: true, selector: "odx-autocomplete-option", usesInheritance: true, ngImport: i0, template: "<ng-content />\n", dependencies: [{ kind: "ngmodule", type: CoreModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
45
44
|
};
|
|
46
45
|
AutocompleteOptionComponent = __decorate([
|
|
47
46
|
CSSComponent('autocomplete-option')
|
|
48
47
|
], AutocompleteOptionComponent);
|
|
49
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AutocompleteOptionComponent, decorators: [{
|
|
50
49
|
type: Component,
|
|
51
|
-
args: [{ standalone: true, selector: 'odx-autocomplete-option', imports: [CoreModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content
|
|
50
|
+
args: [{ standalone: true, selector: 'odx-autocomplete-option', imports: [CoreModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content />\n" }]
|
|
52
51
|
}] });
|
|
53
52
|
|
|
54
53
|
/**
|
|
@@ -206,7 +205,7 @@ let AutocompleteComponent = class AutocompleteComponent extends AutocompleteCont
|
|
|
206
205
|
this.searchField?.blur();
|
|
207
206
|
}
|
|
208
207
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
209
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
208
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AutocompleteComponent, isStandalone: true, selector: "odx-autocomplete", host: { listeners: { "click": "handleClickEvent()", "keydown": "handleKeyboardEvent($event)" } }, providers: [
|
|
210
209
|
{
|
|
211
210
|
provide: AUTOCOMPLETE_CONTROL,
|
|
212
211
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
@@ -215,7 +214,7 @@ let AutocompleteComponent = class AutocompleteComponent extends AutocompleteCont
|
|
|
215
214
|
provide: ODX_SEARCH_FILTER_HOST,
|
|
216
215
|
useExisting: AUTOCOMPLETE_CONTROL,
|
|
217
216
|
},
|
|
218
|
-
], queries: [{ propertyName: "searchField", first: true, predicate: AutocompleteInputControlDirective, descendants: true }, { propertyName: "options", predicate: AutocompleteOptionComponent, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.ClickOutsideDirective }], ngImport: i0, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-autocomplete__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"dropdownReferenceElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n [odxDropdownOpenTrigger]=\"[]\"\n [odxDropdownClickOutsideActive]=\"false\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownAfterOpen)=\"onDropdownOpened()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n>\n <ng-content select=\"input[odxAutocompleteControl]\"
|
|
217
|
+
], queries: [{ propertyName: "searchField", first: true, predicate: AutocompleteInputControlDirective, descendants: true }, { propertyName: "options", predicate: AutocompleteOptionComponent, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.ClickOutsideDirective }], ngImport: i0, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-autocomplete__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"dropdownReferenceElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n [odxDropdownOpenTrigger]=\"[]\"\n [odxDropdownClickOutsideActive]=\"false\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownAfterOpen)=\"onDropdownOpened()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n>\n <ng-content select=\"input[odxAutocompleteControl]\" />\n</div>\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n @if (hasOptions) {\n <ng-content />\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: LoadingSpinnerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
219
218
|
};
|
|
220
219
|
AutocompleteComponent = __decorate([
|
|
221
220
|
CSSComponent('autocomplete')
|
|
@@ -231,7 +230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
231
230
|
provide: ODX_SEARCH_FILTER_HOST,
|
|
232
231
|
useExisting: AUTOCOMPLETE_CONTROL,
|
|
233
232
|
},
|
|
234
|
-
], hostDirectives: [ClickOutsideDirective], template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-autocomplete__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"dropdownReferenceElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n [odxDropdownOpenTrigger]=\"[]\"\n [odxDropdownClickOutsideActive]=\"false\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownAfterOpen)=\"onDropdownOpened()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n>\n <ng-content select=\"input[odxAutocompleteControl]\"
|
|
233
|
+
], hostDirectives: [ClickOutsideDirective], template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-autocomplete__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"dropdownReferenceElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n [odxDropdownOpenTrigger]=\"[]\"\n [odxDropdownClickOutsideActive]=\"false\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownAfterOpen)=\"onDropdownOpened()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n>\n <ng-content select=\"input[odxAutocompleteControl]\" />\n</div>\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n @if (hasOptions) {\n <ng-content />\n }\n </div>\n</ng-template>\n" }]
|
|
235
234
|
}], propDecorators: { options: [{
|
|
236
235
|
type: ContentChildren,
|
|
237
236
|
args: [AutocompleteOptionComponent, { descendants: true, emitDistinctChangesOnly: true }]
|