@odx/angular 12.4.2 → 12.6.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/cdk/autocomplete-control/lib/autocomplete-control.d.ts +3 -3
- package/components/bar/lib/directives/bar-button.directive.d.ts +2 -1
- package/components/select/lib/directives/index.d.ts +1 -0
- package/components/select/lib/directives/select-all.directive.d.ts +13 -0
- package/components/select/lib/select.component.d.ts +24 -3
- package/esm2022/cdk/autocomplete-control/lib/autocomplete-control.mjs +2 -2
- package/esm2022/components/autocomplete/lib/autocomplete.component.mjs +2 -2
- package/esm2022/components/bar/lib/directives/bar-button.directive.mjs +5 -7
- package/esm2022/components/select/lib/components/select-option/select-option.component.mjs +2 -3
- package/esm2022/components/select/lib/directives/index.mjs +2 -1
- package/esm2022/components/select/lib/directives/select-all.directive.mjs +33 -0
- package/esm2022/components/select/lib/select.component.mjs +69 -16
- package/fesm2022/odx-angular-animations.mjs.map +1 -1
- package/fesm2022/odx-angular-breakpoints.mjs +1 -1
- package/fesm2022/odx-angular-breakpoints.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-a11y.mjs +1 -1
- package/fesm2022/odx-angular-cdk-a11y.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-active-indicator.mjs +1 -1
- package/fesm2022/odx-angular-cdk-active-indicator.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-autocomplete-control.mjs +2 -2
- package/fesm2022/odx-angular-cdk-autocomplete-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-checkbox-control.mjs +1 -1
- package/fesm2022/odx-angular-cdk-checkbox-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs +1 -1
- package/fesm2022/odx-angular-cdk-connected-overlay.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-custom-form-control.mjs +1 -1
- package/fesm2022/odx-angular-cdk-custom-form-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs +1 -1
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-event-plugins.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-expandable.mjs +1 -1
- package/fesm2022/odx-angular-cdk-expandable.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-option-control.mjs +1 -1
- package/fesm2022/odx-angular-cdk-option-control.mjs.map +1 -1
- package/fesm2022/odx-angular-cdk-radio-group-control.mjs +1 -1
- package/fesm2022/odx-angular-cdk-radio-group-control.mjs.map +1 -1
- package/fesm2022/odx-angular-components-accordion.mjs +1 -1
- package/fesm2022/odx-angular-components-accordion.mjs.map +1 -1
- package/fesm2022/odx-angular-components-action-group.mjs +1 -1
- package/fesm2022/odx-angular-components-action-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-area-header.mjs +1 -1
- package/fesm2022/odx-angular-components-area-header.mjs.map +1 -1
- package/fesm2022/odx-angular-components-autocomplete.mjs +2 -2
- package/fesm2022/odx-angular-components-autocomplete.mjs.map +1 -1
- package/fesm2022/odx-angular-components-avatar.mjs +1 -1
- package/fesm2022/odx-angular-components-avatar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-badge.mjs +1 -1
- package/fesm2022/odx-angular-components-badge.mjs.map +1 -1
- package/fesm2022/odx-angular-components-bar.mjs +5 -7
- package/fesm2022/odx-angular-components-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-breadcrumbs.mjs +1 -1
- package/fesm2022/odx-angular-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/odx-angular-components-button-group.mjs +1 -1
- package/fesm2022/odx-angular-components-button-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-button.mjs +1 -1
- package/fesm2022/odx-angular-components-button.mjs.map +1 -1
- package/fesm2022/odx-angular-components-calendar.mjs +2 -2
- package/fesm2022/odx-angular-components-calendar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-card.mjs +2 -2
- package/fesm2022/odx-angular-components-card.mjs.map +1 -1
- package/fesm2022/odx-angular-components-checkbox.mjs +1 -1
- package/fesm2022/odx-angular-components-checkbox.mjs.map +1 -1
- package/fesm2022/odx-angular-components-chip.mjs +1 -1
- package/fesm2022/odx-angular-components-chip.mjs.map +1 -1
- package/fesm2022/odx-angular-components-circular-progress.mjs +1 -1
- package/fesm2022/odx-angular-components-circular-progress.mjs.map +1 -1
- package/fesm2022/odx-angular-components-content-box.mjs +1 -1
- 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 +3 -3
- package/fesm2022/odx-angular-components-daterangepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-dropdown.mjs +1 -1
- package/fesm2022/odx-angular-components-dropdown.mjs.map +1 -1
- package/fesm2022/odx-angular-components-error-page.mjs +1 -1
- package/fesm2022/odx-angular-components-error-page.mjs.map +1 -1
- package/fesm2022/odx-angular-components-footer.mjs +2 -2
- package/fesm2022/odx-angular-components-footer.mjs.map +1 -1
- package/fesm2022/odx-angular-components-form-field.mjs +1 -1
- package/fesm2022/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2022/odx-angular-components-header-navigation.mjs +1 -1
- package/fesm2022/odx-angular-components-header-navigation.mjs.map +1 -1
- package/fesm2022/odx-angular-components-header.mjs +1 -1
- package/fesm2022/odx-angular-components-header.mjs.map +1 -1
- package/fesm2022/odx-angular-components-icon.mjs +1 -1
- package/fesm2022/odx-angular-components-icon.mjs.map +1 -1
- package/fesm2022/odx-angular-components-inline-message.mjs +1 -1
- package/fesm2022/odx-angular-components-inline-message.mjs.map +1 -1
- package/fesm2022/odx-angular-components-link.mjs.map +1 -1
- package/fesm2022/odx-angular-components-list.mjs +2 -2
- package/fesm2022/odx-angular-components-list.mjs.map +1 -1
- package/fesm2022/odx-angular-components-loading-spinner.mjs +1 -1
- package/fesm2022/odx-angular-components-loading-spinner.mjs.map +1 -1
- package/fesm2022/odx-angular-components-logo.mjs +1 -1
- package/fesm2022/odx-angular-components-logo.mjs.map +1 -1
- package/fesm2022/odx-angular-components-main-menu.mjs +2 -2
- package/fesm2022/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2022/odx-angular-components-mainfilter-group.mjs +1 -1
- package/fesm2022/odx-angular-components-mainfilter-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-menu.mjs +1 -1
- package/fesm2022/odx-angular-components-menu.mjs.map +1 -1
- package/fesm2022/odx-angular-components-modal.mjs +1 -1
- package/fesm2022/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2022/odx-angular-components-navigation-back.mjs +1 -1
- package/fesm2022/odx-angular-components-navigation-back.mjs.map +1 -1
- package/fesm2022/odx-angular-components-notification-testing.mjs.map +1 -1
- package/fesm2022/odx-angular-components-notification.mjs +3 -3
- package/fesm2022/odx-angular-components-notification.mjs.map +1 -1
- package/fesm2022/odx-angular-components-paginator.mjs +1 -1
- package/fesm2022/odx-angular-components-paginator.mjs.map +1 -1
- package/fesm2022/odx-angular-components-progress.mjs +1 -1
- package/fesm2022/odx-angular-components-progress.mjs.map +1 -1
- package/fesm2022/odx-angular-components-radio-group.mjs +1 -1
- package/fesm2022/odx-angular-components-radio-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-rail-navigation.mjs +1 -1
- package/fesm2022/odx-angular-components-rail-navigation.mjs.map +1 -1
- package/fesm2022/odx-angular-components-rich-list.mjs +1 -1
- package/fesm2022/odx-angular-components-rich-list.mjs.map +1 -1
- package/fesm2022/odx-angular-components-search-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-select.mjs +101 -19
- package/fesm2022/odx-angular-components-select.mjs.map +1 -1
- package/fesm2022/odx-angular-components-slider.mjs +1 -1
- package/fesm2022/odx-angular-components-slider.mjs.map +1 -1
- package/fesm2022/odx-angular-components-spinbox.mjs +1 -1
- package/fesm2022/odx-angular-components-spinbox.mjs.map +1 -1
- package/fesm2022/odx-angular-components-switch.mjs +1 -1
- package/fesm2022/odx-angular-components-switch.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tab-bar.mjs +1 -1
- package/fesm2022/odx-angular-components-tab-bar.mjs.map +1 -1
- package/fesm2022/odx-angular-components-table.mjs +1 -1
- package/fesm2022/odx-angular-components-table.mjs.map +1 -1
- package/fesm2022/odx-angular-components-timepicker.mjs +2 -2
- package/fesm2022/odx-angular-components-timepicker.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toast.mjs +1 -1
- package/fesm2022/odx-angular-components-toast.mjs.map +1 -1
- package/fesm2022/odx-angular-components-toggle-button-group.mjs +1 -1
- package/fesm2022/odx-angular-components-toggle-button-group.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tooltip.mjs +1 -1
- package/fesm2022/odx-angular-components-tooltip.mjs.map +1 -1
- package/fesm2022/odx-angular-components-wizard.mjs +1 -1
- package/fesm2022/odx-angular-components-wizard.mjs.map +1 -1
- package/fesm2022/odx-angular-internal-translate.mjs.map +1 -1
- package/fesm2022/odx-angular-internal.mjs.map +1 -1
- package/fesm2022/odx-angular-localization.mjs.map +1 -1
- package/fesm2022/odx-angular-rxjs.mjs.map +1 -1
- package/fesm2022/odx-angular-sdk.mjs.map +1 -1
- package/fesm2022/odx-angular-theming.mjs.map +1 -1
- package/fesm2022/odx-angular-utils.mjs.map +1 -1
- package/fesm2022/odx-angular.mjs +2 -2
- package/fesm2022/odx-angular.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-event-plugins.mjs","sources":["../../../../libs/angular/cdk/event-plugins/src/lib/models/event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/plugins/debounce-event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/plugins/defer-event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/event-plugins.config.ts","../../../../libs/angular/cdk/event-plugins/src/odx-angular-cdk-event-plugins.ts"],"sourcesContent":["/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nimport { NgZone } from '@angular/core';\nimport { EventManager } from '@angular/platform-browser';\nimport { isFunction } from '@odx/angular/utils';\n\ntype EventManagerArg = ConstructorParameters<typeof EventManager>[0][0];\n\ntype EventManagerPlugin = {\n [K in keyof EventManagerArg]: EventManagerArg[K];\n};\n\n/**\n * An abstract class for implementing custom event plugins in Angular. This class provides\n * the core functionality required to create a custom event listener with specific behavior,\n * allowing developers to extend Angular's native event handling capabilities.\n *\n * @example\n * Extending EventPlugin to create a custom event plugin:\n * ```ts\n * @Injectable()\n * class CustomEventPlugin extends EventPlugin {\n * public readonly modifier = /custom/;\n *\n * public addEventListener(element: HTMLElement, eventName: string, handler: EventListener): Function {\n * // Custom logic for adding an event listener\n * }\n * }\n * ```\n *\n * ```html\n * <div (click.custom)=\"handleClick($event)\"></div>\n * ```\n */\nexport abstract class EventPlugin implements EventManagerPlugin {\n protected abstract readonly modifier: RegExp;\n\n /**\n * The event manager for handling events.\n *\n * @type {EventManager}\n */\n public manager!: EventManager;\n\n /**\n * Adds an event listener to the given element.\n *\n * @param {HTMLElement} element - The element to attach the event listener to.\n * @param {string} eventName - The name of the event.\n * @param {EventListener} handler - The event listener function.\n * @returns {Function} - A function that can be called to remove the event listener.\n */\n public abstract addEventListener(element: HTMLElement, eventName: string, handler: EventListener): Function;\n\n /**\n * Adds a global event listener.\n *\n * @returns {Function} - A function that does nothing.\n */\n public addGlobalEventListener(): Function {\n return () => void 0;\n }\n\n /**\n * Checks if the event plugin supports the given event name.\n *\n * @param {string} eventName - The name of the event.\n * @returns {boolean} - `true` if the event plugin supports the event, `false` otherwise.\n */\n public supports(eventName: string): boolean {\n return this.modifier.test(eventName);\n }\n\n /**\n * Gets the NgZone instance from the event manager.\n *\n * @returns {NgZone} - The NgZone instance.\n */\n protected getZone(): NgZone {\n return this.manager.getZone();\n }\n\n /**\n * Tears down the event listener.\n *\n * @param {Function | null} listener - The event listener function.\n * @returns {Function} - A function that can be called to clean up the listener.\n */\n protected teardown(listener: Function | null): () => void {\n return () => (isFunction(listener) ? listener() : void 0);\n }\n}\n","/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nimport { Injectable, numberAttribute } from '@angular/core';\nimport { debounce } from '@odx/angular/utils';\nimport { EventPlugin } from '../models';\n\nconst DEFAULT_DELAY = 250;\n\n/**\n * A service that extends `EventPlugin` for debouncing events. This service wraps event listeners\n * and ensures that they are triggered no more than once per specified delay period. It is\n * particularly useful for handling events that fire frequently, such as mouse movements\n * or keystrokes, in a performant manner.\n *\n * The delay period can be specified directly in the event name using the syntax\n * `(eventName.debounce.delay)`, where `delay` is the debounce duration in milliseconds.\n * If no delay is specified, a default delay of 250 milliseconds is used.\n *\n * @example\n * Provide the `DebounceEventPlugin` in an Angular module:\n * ```ts\n * @NgModule({\n * providers: [\n * ...\n * provideEventPlugins(),\n * ...\n * ],\n * })\n * export class AppModule {}\n * ```\n *\n * In a component template, apply the debounce modifier to an event, specifying a custom delay:\n * ```html\n * <button (click.debounce.400)=\"handleClick($event)\"></button>\n * ```\n * In a component template, apply the debounce modifier with the default delay:\n * ```html\n * <input (keyup.debounce)=\"onKeyUp($event)\" placeholder=\"Type here...\">\n * ```\n */\n@Injectable()\nexport class DebounceEventPlugin extends EventPlugin {\n public readonly modifier = /debounce/;\n\n public addEventListener(element: HTMLElement, eventName: string, originalHandler: EventListener): Function {\n const [name, , delay] = eventName.split('.');\n const handler = this.createHandler(originalHandler, numberAttribute(delay, DEFAULT_DELAY));\n\n return this.runOutsideAngular(() => this.manager.addEventListener(element, name, handler));\n }\n\n private createHandler(originalHandler: EventListener, delay: number): (event: Event) => void {\n const innerHandler = (event: Event): void => this.getZone().runGuarded(() => originalHandler(event));\n\n return debounce(innerHandler, delay);\n }\n\n private runOutsideAngular(addListener: () => Function): () => void {\n let listener: Function | null = null;\n this.getZone().runOutsideAngular(() => {\n listener = addListener();\n });\n\n return this.teardown(listener);\n }\n}\n","/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nimport { Injectable } from '@angular/core';\nimport { EventPlugin } from '../models';\n\n/**\n * A service that extends `EventPlugin` to allow event handlers to be deferred until the end of the current call stack.\n * This can improve performance by avoiding triggering Angular's change detection unnecessarily.\n *\n * @example\n * Provide the `DeferEventPlugin` in an Angular module:\n * ```ts\n * @NgModule({\n * providers: [\n * ...\n * provideEventPlugins(),\n * ...\n * ],\n * })\n * export class AppModule {}\n * ```\n *\n * In your Angular component:\n * ```html\n * <button (click.defer)=\"handleClick($event)\"></button>\n * ```\n *\n * The `.defer` modifier in the event name `click.defer` indicates that the event handler should be deferred.\n */\n@Injectable()\nexport class DeferEventPlugin extends EventPlugin {\n public readonly modifier = /defer/;\n\n public addEventListener(element: HTMLElement, eventName: string, originalHandler: EventListener): Function {\n const [name] = eventName.split('.');\n const handler = this.createHandler(originalHandler);\n\n return this.getZone().runOutsideAngular(() => this.manager.addEventListener(element, name, handler));\n }\n\n private createHandler(originalHandler: EventListener): (event: Event) => void {\n return (event: Event): void => {\n setTimeout(() => this.getZone().runGuarded(() => originalHandler(event)), 0);\n };\n }\n}\n","import { EnvironmentProviders, Provider, makeEnvironmentProviders } from '@angular/core';\nimport { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';\nimport { DebounceEventPlugin, DeferEventPlugin } from './plugins';\n\nconst PLUGINS = [DebounceEventPlugin, DeferEventPlugin];\n\nexport const EVENT_PLUGINS: Provider[] = PLUGINS.map((useClass) => ({\n provide: EVENT_MANAGER_PLUGINS,\n useClass,\n multi: true,\n}));\n\n/**\n * Provides a set of custom event plugins to Angular's event handling system. This function\n * registers custom event plugins like `DebounceEventPlugin` and `DeferEventPlugin`, enhancing\n * the capabilities of Angular's native event management. By using `EVENT_MANAGER_PLUGINS`, these\n * plugins are integrated into Angular's event system and can be utilized in templates and components\n * to handle events with custom behaviors such as debouncing or deferring event execution.\n *\n * @example\n * Registering the event plugins in an Angular module:\n * ```ts\n * @NgModule({\n * imports: [\n * BrowserModule,\n * BrowserAnimationsModule,\n * // other imports...\n * ],\n * declarations: [AppComponent],\n * providers: [\n * provideEventPlugins(),\n * ],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n * ```\n * Assuming `DebounceEventPlugin` modifies event names with a `.debounce` modifier:\n * ```html\n * <button (click.debounce)=\"handleDebouncedClick($event)\">Click Me</button>\n * ```\n * Assuming `DeferEventPlugin` modifies event names with a `.defer` modifier:\n * ```html\n * <div (mouseenter.defer)=\"handleDeferredMouseEnter($event)\"></div>\n * ```\n *\n * @returns {EnvironmentProviders} - A configuration object for Angular's DI system, to be used with `makeEnvironmentProviders`.\n */\nexport function provideEventPlugins(): EnvironmentProviders {\n return makeEnvironmentProviders(EVENT_PLUGINS);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYA;;;;;;;;;;;;;;;;;;;;;AAqBG;MACmB,WAAW,CAAA;AAoB/B;;;;AAIG;IACI,sBAAsB,GAAA;AAC3B,QAAA,OAAO,MAAM,KAAK,CAAC;;AAGrB;;;;;AAKG;AACI,IAAA,QAAQ,CAAC,SAAiB,EAAA;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;;AAGtC;;;;AAIG;IACO,OAAO,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;;AAG/B;;;;;AAKG;AACO,IAAA,QAAQ,CAAC,QAAyB,EAAA;AAC1C,QAAA,OAAO,OAAO,UAAU,CAAC,QAAQ,CAAC,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC;;AAE5D;;AC3FD;AACA;AAKA,MAAM,aAAa,GAAG,GAAG;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;AAEG,MAAO,mBAAoB,SAAQ,WAAW,CAAA;AADpD,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ular/cdk/event-plugins/src/lib/models/event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/plugins/debounce-event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/plugins/defer-event-plugin.ts","../../../../libs/angular/cdk/event-plugins/src/lib/event-plugins.config.ts","../../../../libs/angular/cdk/event-plugins/src/odx-angular-cdk-event-plugins.ts"],"sourcesContent":["/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nimport { NgZone } from '@angular/core';\nimport { EventManager } from '@angular/platform-browser';\nimport { isFunction } from '@odx/angular/utils';\n\ntype EventManagerArg = ConstructorParameters<typeof EventManager>[0][0];\n\ntype EventManagerPlugin = {\n [K in keyof EventManagerArg]: EventManagerArg[K];\n};\n\n/**\n * An abstract class for implementing custom event plugins in Angular. This class provides\n * the core functionality required to create a custom event listener with specific behavior,\n * allowing developers to extend Angular's native event handling capabilities.\n *\n * @example\n * Extending EventPlugin to create a custom event plugin:\n * ```ts\n * @Injectable()\n * class CustomEventPlugin extends EventPlugin {\n * public readonly modifier = /custom/;\n *\n * public addEventListener(element: HTMLElement, eventName: string, handler: EventListener): Function {\n * // Custom logic for adding an event listener\n * }\n * }\n * ```\n *\n * ```html\n * <div (click.custom)=\"handleClick($event)\"></div>\n * ```\n */\nexport abstract class EventPlugin implements EventManagerPlugin {\n protected abstract readonly modifier: RegExp;\n\n /**\n * The event manager for handling events.\n *\n * @type {EventManager}\n */\n public manager!: EventManager;\n\n /**\n * Adds an event listener to the given element.\n *\n * @param {HTMLElement} element - The element to attach the event listener to.\n * @param {string} eventName - The name of the event.\n * @param {EventListener} handler - The event listener function.\n * @returns {Function} - A function that can be called to remove the event listener.\n */\n public abstract addEventListener(element: HTMLElement, eventName: string, handler: EventListener): Function;\n\n /**\n * Adds a global event listener.\n *\n * @returns {Function} - A function that does nothing.\n */\n public addGlobalEventListener(): Function {\n return () => void 0;\n }\n\n /**\n * Checks if the event plugin supports the given event name.\n *\n * @param {string} eventName - The name of the event.\n * @returns {boolean} - `true` if the event plugin supports the event, `false` otherwise.\n */\n public supports(eventName: string): boolean {\n return this.modifier.test(eventName);\n }\n\n /**\n * Gets the NgZone instance from the event manager.\n *\n * @returns {NgZone} - The NgZone instance.\n */\n protected getZone(): NgZone {\n return this.manager.getZone();\n }\n\n /**\n * Tears down the event listener.\n *\n * @param {Function | null} listener - The event listener function.\n * @returns {Function} - A function that can be called to clean up the listener.\n */\n protected teardown(listener: Function | null): () => void {\n return () => (isFunction(listener) ? listener() : void 0);\n }\n}\n","/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nimport { Injectable, numberAttribute } from '@angular/core';\nimport { debounce } from '@odx/angular/utils';\nimport { EventPlugin } from '../models';\n\nconst DEFAULT_DELAY = 250;\n\n/**\n * A service that extends `EventPlugin` for debouncing events. This service wraps event listeners\n * and ensures that they are triggered no more than once per specified delay period. It is\n * particularly useful for handling events that fire frequently, such as mouse movements\n * or keystrokes, in a performant manner.\n *\n * The delay period can be specified directly in the event name using the syntax\n * `(eventName.debounce.delay)`, where `delay` is the debounce duration in milliseconds.\n * If no delay is specified, a default delay of 250 milliseconds is used.\n *\n * @example\n * Provide the `DebounceEventPlugin` in an Angular module:\n * ```ts\n * @NgModule({\n * providers: [\n * ...\n * provideEventPlugins(),\n * ...\n * ],\n * })\n * export class AppModule {}\n * ```\n *\n * In a component template, apply the debounce modifier to an event, specifying a custom delay:\n * ```html\n * <button (click.debounce.400)=\"handleClick($event)\"></button>\n * ```\n * In a component template, apply the debounce modifier with the default delay:\n * ```html\n * <input (keyup.debounce)=\"onKeyUp($event)\" placeholder=\"Type here...\">\n * ```\n */\n@Injectable()\nexport class DebounceEventPlugin extends EventPlugin {\n public readonly modifier = /debounce/;\n\n public addEventListener(element: HTMLElement, eventName: string, originalHandler: EventListener): Function {\n const [name, , delay] = eventName.split('.');\n const handler = this.createHandler(originalHandler, numberAttribute(delay, DEFAULT_DELAY));\n\n return this.runOutsideAngular(() => this.manager.addEventListener(element, name, handler));\n }\n\n private createHandler(originalHandler: EventListener, delay: number): (event: Event) => void {\n const innerHandler = (event: Event): void => this.getZone().runGuarded(() => originalHandler(event));\n\n return debounce(innerHandler, delay);\n }\n\n private runOutsideAngular(addListener: () => Function): () => void {\n let listener: Function | null = null;\n this.getZone().runOutsideAngular(() => {\n listener = addListener();\n });\n\n return this.teardown(listener);\n }\n}\n","/* istanbul ignore file */\n/* eslint-disable @typescript-eslint/no-unsafe-function-type */\nimport { Injectable } from '@angular/core';\nimport { EventPlugin } from '../models';\n\n/**\n * A service that extends `EventPlugin` to allow event handlers to be deferred until the end of the current call stack.\n * This can improve performance by avoiding triggering Angular's change detection unnecessarily.\n *\n * @example\n * Provide the `DeferEventPlugin` in an Angular module:\n * ```ts\n * @NgModule({\n * providers: [\n * ...\n * provideEventPlugins(),\n * ...\n * ],\n * })\n * export class AppModule {}\n * ```\n *\n * In your Angular component:\n * ```html\n * <button (click.defer)=\"handleClick($event)\"></button>\n * ```\n *\n * The `.defer` modifier in the event name `click.defer` indicates that the event handler should be deferred.\n */\n@Injectable()\nexport class DeferEventPlugin extends EventPlugin {\n public readonly modifier = /defer/;\n\n public addEventListener(element: HTMLElement, eventName: string, originalHandler: EventListener): Function {\n const [name] = eventName.split('.');\n const handler = this.createHandler(originalHandler);\n\n return this.getZone().runOutsideAngular(() => this.manager.addEventListener(element, name, handler));\n }\n\n private createHandler(originalHandler: EventListener): (event: Event) => void {\n return (event: Event): void => {\n setTimeout(() => this.getZone().runGuarded(() => originalHandler(event)), 0);\n };\n }\n}\n","import { EnvironmentProviders, Provider, makeEnvironmentProviders } from '@angular/core';\nimport { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';\nimport { DebounceEventPlugin, DeferEventPlugin } from './plugins';\n\nconst PLUGINS = [DebounceEventPlugin, DeferEventPlugin];\n\nexport const EVENT_PLUGINS: Provider[] = PLUGINS.map((useClass) => ({\n provide: EVENT_MANAGER_PLUGINS,\n useClass,\n multi: true,\n}));\n\n/**\n * Provides a set of custom event plugins to Angular's event handling system. This function\n * registers custom event plugins like `DebounceEventPlugin` and `DeferEventPlugin`, enhancing\n * the capabilities of Angular's native event management. By using `EVENT_MANAGER_PLUGINS`, these\n * plugins are integrated into Angular's event system and can be utilized in templates and components\n * to handle events with custom behaviors such as debouncing or deferring event execution.\n *\n * @example\n * Registering the event plugins in an Angular module:\n * ```ts\n * @NgModule({\n * imports: [\n * BrowserModule,\n * BrowserAnimationsModule,\n * // other imports...\n * ],\n * declarations: [AppComponent],\n * providers: [\n * provideEventPlugins(),\n * ],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n * ```\n * Assuming `DebounceEventPlugin` modifies event names with a `.debounce` modifier:\n * ```html\n * <button (click.debounce)=\"handleDebouncedClick($event)\">Click Me</button>\n * ```\n * Assuming `DeferEventPlugin` modifies event names with a `.defer` modifier:\n * ```html\n * <div (mouseenter.defer)=\"handleDeferredMouseEnter($event)\"></div>\n * ```\n *\n * @returns {EnvironmentProviders} - A configuration object for Angular's DI system, to be used with `makeEnvironmentProviders`.\n */\nexport function provideEventPlugins(): EnvironmentProviders {\n return makeEnvironmentProviders(EVENT_PLUGINS);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYA;;;;;;;;;;;;;;;;;;;;;AAqBG;MACmB,WAAW,CAAA;AAoB/B;;;;AAIG;IACI,sBAAsB,GAAA;AAC3B,QAAA,OAAO,MAAM,KAAK,CAAC,CAAC;KACrB;AAED;;;;;AAKG;AACI,IAAA,QAAQ,CAAC,SAAiB,EAAA;QAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACtC;AAED;;;;AAIG;IACO,OAAO,GAAA;AACf,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;KAC/B;AAED;;;;;AAKG;AACO,IAAA,QAAQ,CAAC,QAAyB,EAAA;AAC1C,QAAA,O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AAC,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;AAEjD,MAAM,aAAa,GAAe,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,MAAM;AAClE,IAAA,OAAO,EAAE,qBAAqB;IAC9B,QAAQ;AACR,IAAA,KAAK,EAAE,IAAI;AACZ,CAAA,CAAC,EAAE;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,wBAAwB,CAAC,aAAa,CAAC,CAAC;AACjD;;ACjDA;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, booleanAttribute,
|
|
2
|
+
import { InjectionToken, inject, booleanAttribute, Directive, Input, ChangeDetectorRef, NgModule } from '@angular/core';
|
|
3
3
|
import { getUniqueId } from '@odx/angular/utils';
|
|
4
4
|
|
|
5
5
|
const ODX_EXPANDABLE_CONTAINER = new InjectionToken('@odx/angular/cdk/expandable::ExpandableContainer');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-expandable.mjs","sources":["../../../../libs/angular/cdk/expandable/src/lib/expandable.tokens.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-container.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-item.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/expandable.module.ts","../../../../libs/angular/cdk/expandable/src/odx-angular-cdk-expandable.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ExpandableContainer, ExpandableItem } from './facade';\n\nexport const ODX_EXPANDABLE_CONTAINER = new InjectionToken<ExpandableContainer>('@odx/angular/cdk/expandable::ExpandableContainer');\nexport const ODX_EXPANDABLE_ITEM = new InjectionToken<ExpandableItem>('@odx/angular/cdk/expandable::ExpandableItem');\n","import { booleanAttribute, Directive, inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ODX_EXPANDABLE_CONTAINER, ODX_EXPANDABLE_ITEM } from '../expandable.tokens';\nimport type { ExpandableContainer, ExpandableItem } from '../facade';\n\n/**\n * `ExpandableContainerDirective` provides a container for managing a group of expandable items,\n * allowing them to expand or collapse. It supports the functionality to either allow multiple\n * items to be expanded simultaneously or restrict to a single item at a time.\n *\n * This directive uses Angular's dependency injection to optionally inject a parent `ExpandableItem` or `ExpandableContainer`,\n * enabling nested expandable structures. The `multiple` property can be set to dictate the expand/collapse behavior.\n */\n@Directive({\n standalone: true,\n selector: '[odxExpandableContainer]',\n exportAs: 'odxExpandableContainer',\n providers: [{ provide: ODX_EXPANDABLE_CONTAINER, useExisting: ExpandableContainerDirective }],\n})\nexport class ExpandableContainerDirective implements ExpandableContainer, OnInit, OnDestroy {\n private readonly expandedItems = new Set<ExpandableItem>();\n private readonly parentItem = inject(ODX_EXPANDABLE_ITEM, { optional: true, skipSelf: true });\n private readonly parentContainer = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n\n /**\n * Determines whether multiple items can be expanded within the container.\n *\n * @type {boolean}\n * @default false\n */\n @Input({ transform: booleanAttribute })\n public multiple = this.parentContainer?.multiple ?? false;\n\n public ngOnInit(): void {\n this.parentItem?.addChild(this);\n }\n\n public ngOnDestroy(): void {\n this.parentItem?.removeChild(this);\n }\n\n /**\n * Collapses all the expanded items within the expandable container.\n */\n public collapseAll(): void {\n this.expandedItems.forEach((item) => item.collapse());\n }\n\n /**\n * Collapses the specified item.\n *\n * @param {ExpandableItem} item - The item to collapse.\n */\n public collapse(item: ExpandableItem): void {\n this.expandedItems.delete(item);\n }\n\n /**\n * Expands the specified item.\n * If `multiple` is set to `false`, it collapses all other items before expanding the specified item.\n * @param {ExpandableItem} item - The item to expand.\n */\n public expand(item: ExpandableItem): void {\n if (!this.multiple) {\n this.collapseAll();\n }\n this.expandedItems.add(item);\n }\n\n /**\n * Toggles the expansion state of the specified item.\n * If `forceState` is provided, it will set the expansion state to the specified value.\n * If `forceState` is not provided, it will toggle the expansion state of the item.\n *\n * @param {ExpandableItem} item - The item to toggle the expansion state for.\n * @param {boolean} forceState - Optional. The desired expansion state to set for the item.\n */\n public toggle(item: ExpandableItem, forceState?: boolean): void {\n const shouldExpand = forceState ?? !this.isExpanded(item);\n if (shouldExpand) {\n this.expand(item);\n } else {\n this.collapse(item);\n }\n }\n\n /**\n * Checks if the specified item is expanded.\n * @param {ExpandableItem} item - The item to check.\n * @returns `true` if the item is expanded, `false` otherwise.\n */\n public isExpanded(item: ExpandableItem): boolean {\n return this.expandedItems.has(item);\n }\n\n /**\n * Checks if there is any expanded item.\n *\n * @returns {boolean} True if there is at least one expanded item, false otherwise.\n */\n public hasExpandedItem(): boolean {\n return this.expandedItems.size > 0;\n }\n}\n","import { booleanAttribute, ChangeDetectorRef, Directive, inject, Input } from '@angular/core';\nimport { getUniqueId } from '@odx/angular/utils';\nimport { ODX_EXPANDABLE_CONTAINER, ODX_EXPANDABLE_ITEM } from '../expandable.tokens';\nimport type { ExpandableContainer, ExpandableItem } from '../facade';\n\n/**\n * `ExpandableItemDirective` allows you to manage the expansion state of an item within an expandable container, such as an accordion or a nested list. It provides methods to expand, collapse, and toggle the item, and automatically registers itself with a parent expandable container if one is available.\n *\n * You can control the expanded state programmatically by binding to the `expanded` property.\n */\n@Directive({\n standalone: true,\n selector: '[odxExpandableItem]',\n exportAs: 'odxExpandableItem',\n providers: [{ provide: ODX_EXPANDABLE_ITEM, useExisting: ExpandableItemDirective }],\n})\nexport class ExpandableItemDirective implements ExpandableItem {\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly childContainers = new Set<ExpandableContainer>();\n private _expanded = false;\n\n /**\n * Container which can be set manually.\n */\n @Input()\n public container: ExpandableContainer | null = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n\n /** Unique identifier for the expandable item.\n *\n * @type {string}\n */\n @Input()\n public id = getUniqueId('odx-expandable-item');\n\n /**\n * Controls the expanded state of the item.\n *\n * @param {boolean} value - When `true`, expands the item; when `false`, collapses the item.\n *\n * @example\n * Bind to the expanded state:\n * ```html\n * <div odxExpandableItem [expanded]=\"isItemExpanded\"></div>\n * ```\n */\n @Input({ transform: booleanAttribute })\n public set expanded(value: boolean) {\n if (this._expanded === value) return;\n this._expanded = value;\n if (this._expanded) {\n this.container?.expand(this);\n } else {\n this.closeAllChildren();\n this.container?.collapse(this);\n }\n this.changeDetectorRef.markForCheck();\n }\n\n /**\n * Gets a value indicating whether the item is expanded.\n * If the item is contained within a container, it checks the container's `isExpanded` method.\n * Otherwise, it returns the value of the `_expanded` property.\n *\n * @type {boolean} `true` if the item is expanded; otherwise, `false`.\n */\n public get expanded(): boolean {\n return this.container?.isExpanded(this) ?? this._expanded;\n }\n\n /**\n * Toggles the expansion state of the item, optionally forcing a specific state.\n *\n * @param {boolean} forceState - When provided, forces the expansion state to the specified value.\n */\n public toggle(forceState?: boolean): void {\n this.expanded = forceState ?? !this.expanded;\n }\n\n /** Expands the item.\n *\n * @returns {void}\n */\n public expand(): void {\n this.toggle(true);\n }\n\n /** Collapses the item.\n *\n * @returns {void}\n */\n public collapse(): void {\n this.toggle(false);\n }\n\n /** Adds a child container to the item.\n *\n * @param {ExpandableContainer} container - The child container to add.\n * @returns {void}\n */\n public addChild(container: ExpandableContainer): void {\n this.childContainers.add(container);\n }\n\n /** Removes a child container from the item.\n *\n * @param {ExpandableContainer} container - The child container to remove.\n * @returns {void}\n */\n public removeChild(container: ExpandableContainer): void {\n this.childContainers.delete(container);\n }\n\n private closeAllChildren(): void {\n this.childContainers.forEach((container) => container.collapseAll());\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ExpandableContainerDirective, ExpandableItemDirective } from './directives';\n\nconst modules = [ExpandableContainerDirective, ExpandableItemDirective];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class ExpandableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,wBAAwB,GA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AI;AAChB,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,mBAAmB;oBAC7B,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAyB,uBAAA,EAAE,CAAC;AACpF,iBAAA;8BAUQ,SAAS,EAAA,CAAA;sBADf;gBAQM,EAAE,EAAA,CAAA;sBADR;gBAeU,QAAQ,EAAA,CAAA;sBADlB,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;;AC1CxC,MAAM,OAAO,GAAG,CAAC,4BAA4B,EAAE,uBAAuB,CAAC;MAM1D,gBAAgB,CAAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YANZ,4BAA4B,EAAE,uBAAuB,CAArD,EAAA,OAAA,EAAA,CAAA,4BAA4B,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;gHAMzD,gBAAgB,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-expandable.mjs","sources":["../../../../libs/angular/cdk/expandable/src/lib/expandable.tokens.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-container.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/directives/expandable-item.directive.ts","../../../../libs/angular/cdk/expandable/src/lib/expandable.module.ts","../../../../libs/angular/cdk/expandable/src/odx-angular-cdk-expandable.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { ExpandableContainer, ExpandableItem } from './facade';\n\nexport const ODX_EXPANDABLE_CONTAINER = new InjectionToken<ExpandableContainer>('@odx/angular/cdk/expandable::ExpandableContainer');\nexport const ODX_EXPANDABLE_ITEM = new InjectionToken<ExpandableItem>('@odx/angular/cdk/expandable::ExpandableItem');\n","import { booleanAttribute, Directive, inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ODX_EXPANDABLE_CONTAINER, ODX_EXPANDABLE_ITEM } from '../expandable.tokens';\nimport type { ExpandableContainer, ExpandableItem } from '../facade';\n\n/**\n * `ExpandableContainerDirective` provides a container for managing a group of expandable items,\n * allowing them to expand or collapse. It supports the functionality to either allow multiple\n * items to be expanded simultaneously or restrict to a single item at a time.\n *\n * This directive uses Angular's dependency injection to optionally inject a parent `ExpandableItem` or `ExpandableContainer`,\n * enabling nested expandable structures. The `multiple` property can be set to dictate the expand/collapse behavior.\n */\n@Directive({\n standalone: true,\n selector: '[odxExpandableContainer]',\n exportAs: 'odxExpandableContainer',\n providers: [{ provide: ODX_EXPANDABLE_CONTAINER, useExisting: ExpandableContainerDirective }],\n})\nexport class ExpandableContainerDirective implements ExpandableContainer, OnInit, OnDestroy {\n private readonly expandedItems = new Set<ExpandableItem>();\n private readonly parentItem = inject(ODX_EXPANDABLE_ITEM, { optional: true, skipSelf: true });\n private readonly parentContainer = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n\n /**\n * Determines whether multiple items can be expanded within the container.\n *\n * @type {boolean}\n * @default false\n */\n @Input({ transform: booleanAttribute })\n public multiple = this.parentContainer?.multiple ?? false;\n\n public ngOnInit(): void {\n this.parentItem?.addChild(this);\n }\n\n public ngOnDestroy(): void {\n this.parentItem?.removeChild(this);\n }\n\n /**\n * Collapses all the expanded items within the expandable container.\n */\n public collapseAll(): void {\n this.expandedItems.forEach((item) => item.collapse());\n }\n\n /**\n * Collapses the specified item.\n *\n * @param {ExpandableItem} item - The item to collapse.\n */\n public collapse(item: ExpandableItem): void {\n this.expandedItems.delete(item);\n }\n\n /**\n * Expands the specified item.\n * If `multiple` is set to `false`, it collapses all other items before expanding the specified item.\n * @param {ExpandableItem} item - The item to expand.\n */\n public expand(item: ExpandableItem): void {\n if (!this.multiple) {\n this.collapseAll();\n }\n this.expandedItems.add(item);\n }\n\n /**\n * Toggles the expansion state of the specified item.\n * If `forceState` is provided, it will set the expansion state to the specified value.\n * If `forceState` is not provided, it will toggle the expansion state of the item.\n *\n * @param {ExpandableItem} item - The item to toggle the expansion state for.\n * @param {boolean} forceState - Optional. The desired expansion state to set for the item.\n */\n public toggle(item: ExpandableItem, forceState?: boolean): void {\n const shouldExpand = forceState ?? !this.isExpanded(item);\n if (shouldExpand) {\n this.expand(item);\n } else {\n this.collapse(item);\n }\n }\n\n /**\n * Checks if the specified item is expanded.\n * @param {ExpandableItem} item - The item to check.\n * @returns `true` if the item is expanded, `false` otherwise.\n */\n public isExpanded(item: ExpandableItem): boolean {\n return this.expandedItems.has(item);\n }\n\n /**\n * Checks if there is any expanded item.\n *\n * @returns {boolean} True if there is at least one expanded item, false otherwise.\n */\n public hasExpandedItem(): boolean {\n return this.expandedItems.size > 0;\n }\n}\n","import { booleanAttribute, ChangeDetectorRef, Directive, inject, Input } from '@angular/core';\nimport { getUniqueId } from '@odx/angular/utils';\nimport { ODX_EXPANDABLE_CONTAINER, ODX_EXPANDABLE_ITEM } from '../expandable.tokens';\nimport type { ExpandableContainer, ExpandableItem } from '../facade';\n\n/**\n * `ExpandableItemDirective` allows you to manage the expansion state of an item within an expandable container, such as an accordion or a nested list. It provides methods to expand, collapse, and toggle the item, and automatically registers itself with a parent expandable container if one is available.\n *\n * You can control the expanded state programmatically by binding to the `expanded` property.\n */\n@Directive({\n standalone: true,\n selector: '[odxExpandableItem]',\n exportAs: 'odxExpandableItem',\n providers: [{ provide: ODX_EXPANDABLE_ITEM, useExisting: ExpandableItemDirective }],\n})\nexport class ExpandableItemDirective implements ExpandableItem {\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly childContainers = new Set<ExpandableContainer>();\n private _expanded = false;\n\n /**\n * Container which can be set manually.\n */\n @Input()\n public container: ExpandableContainer | null = inject(ODX_EXPANDABLE_CONTAINER, { optional: true, skipSelf: true });\n\n /** Unique identifier for the expandable item.\n *\n * @type {string}\n */\n @Input()\n public id = getUniqueId('odx-expandable-item');\n\n /**\n * Controls the expanded state of the item.\n *\n * @param {boolean} value - When `true`, expands the item; when `false`, collapses the item.\n *\n * @example\n * Bind to the expanded state:\n * ```html\n * <div odxExpandableItem [expanded]=\"isItemExpanded\"></div>\n * ```\n */\n @Input({ transform: booleanAttribute })\n public set expanded(value: boolean) {\n if (this._expanded === value) return;\n this._expanded = value;\n if (this._expanded) {\n this.container?.expand(this);\n } else {\n this.closeAllChildren();\n this.container?.collapse(this);\n }\n this.changeDetectorRef.markForCheck();\n }\n\n /**\n * Gets a value indicating whether the item is expanded.\n * If the item is contained within a container, it checks the container's `isExpanded` method.\n * Otherwise, it returns the value of the `_expanded` property.\n *\n * @type {boolean} `true` if the item is expanded; otherwise, `false`.\n */\n public get expanded(): boolean {\n return this.container?.isExpanded(this) ?? this._expanded;\n }\n\n /**\n * Toggles the expansion state of the item, optionally forcing a specific state.\n *\n * @param {boolean} forceState - When provided, forces the expansion state to the specified value.\n */\n public toggle(forceState?: boolean): void {\n this.expanded = forceState ?? !this.expanded;\n }\n\n /** Expands the item.\n *\n * @returns {void}\n */\n public expand(): void {\n this.toggle(true);\n }\n\n /** Collapses the item.\n *\n * @returns {void}\n */\n public collapse(): void {\n this.toggle(false);\n }\n\n /** Adds a child container to the item.\n *\n * @param {ExpandableContainer} container - The child container to add.\n * @returns {void}\n */\n public addChild(container: ExpandableContainer): void {\n this.childContainers.add(container);\n }\n\n /** Removes a child container from the item.\n *\n * @param {ExpandableContainer} container - The child container to remove.\n * @returns {void}\n */\n public removeChild(container: ExpandableContainer): void {\n this.childContainers.delete(container);\n }\n\n private closeAllChildren(): void {\n this.childContainers.forEach((container) => container.collapseAll());\n }\n}\n","import { NgModule } from '@angular/core';\nimport { ExpandableContainerDirective, ExpandableItemDirective } from './directives';\n\nconst modules = [ExpandableContainerDirective, ExpandableItemDirective];\n\n@NgModule({\n imports: modules,\n exports: modules,\n})\nexport class ExpandableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,wBAAwB,GAAG,IAAI,cAAc,CAAsB,kDAAkD,EAAE;MACvH,mBAAmB,GAAG,IAAI,cAAc,CAAiB,6CAA6C;;ACAnH;;;;;;;AAOG;MAOU,4BAA4B,CAAA;AANzC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;AAC1C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC7E,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAExG;;;;;AAKG;QAEI,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,IAAI,KAAK,CAAC;AAwE3D,KAAA;IAtEQ,QAAQ,GAAA;AACb,QAAA,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;KACjC;IAEM,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KACpC;AAED;;AAEG;IACI,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC,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,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YANZ,4BAA4B,EAAE,uBAAuB,CAArD,EAAA,OAAA,EAAA,CAAA,4BAA4B,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAMzD,gBAAgB,EAAA,CAAA,CAAA,EAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,OAAO;AACjB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef,
|
|
2
|
+
import { inject, ChangeDetectorRef, Directive, Input, HostListener } from '@angular/core';
|
|
3
3
|
import { untilDestroyed, injectElement, deferFn } from '@odx/angular/utils';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-option-control.mjs","sources":["../../../../libs/angular/cdk/option-control/src/lib/option-control.ts","../../../../libs/angular/cdk/option-control/src/odx-angular-cdk-option-control.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { ChangeDetectorRef, Directive, ElementRef, HostListener, inject, Input } from '@angular/core';\nimport { deferFn, injectElement, untilDestroyed } from '@odx/angular/utils';\n\n/**\n * `OptionControl` is an abstract directive that serves as a base class for implementing selectable options in a dropdown\n * list or a similar component. It integrates with CDK's `Highlightable` interface to provide keyboard navigation support.\n *\n * @param {T} - The type of the value.\n *\n * This base class handles the visual feedback for active and selected states and provides a structure for defining\n * how an option is selected.\n *\n * Extend `OptionControl` to create a concrete option component:\n * @example\n * ```ts\n * @Component({\n * selector: 'my-option',\n * templateUrl: './my-option.component.html',\n * providers: [{ provide: OptionControl, useExisting: forwardRef(() => MyOptionComponent) }],\n * })\n * class MyOptionComponent extends OptionControl<MyDataType> {\n * @Input() override value: MyDataType | null = null;\n *\n * protected override selectOption(): void {\n * // Custom logic for when this option is selected\n * }\n * }\n * ```\n *\n * Implement `selectOption` in subclasses to define what happens when an option is selected, such as updating a model\n * or closing a dropdown.\n */\n@Directive({\n standalone: true,\n host: {\n role: 'option',\n '[class.odx-option]': 'true',\n '[class.is-active]': 'isActive',\n '[attr.aria-selected]': 'isSelected',\n '[class.is-selected]': 'isSelected',\n },\n})\nexport abstract class OptionControl<T> implements Highlightable {\n protected readonly takeUntilDestroyed = untilDestroyed();\n protected readonly cdr = inject(ChangeDetectorRef);\n\n protected isActive = false;\n\n /**\n * Represents the value of the option control.\n *\n * @type {T} - The type of the value.\n */\n @Input()\n public value: T | null = null;\n\n public readonly element: ElementRef<HTMLElement> = injectElement();\n\n /**\n * Sets the active styles for the option control.\n *\n * @returns {void}\n */\n public abstract setActiveStyles(): void;\n\n /**\n * Sets the inactive styles for the option control.\n *\n * @returns {void}\n */\n public setInactiveStyles(): void {\n deferFn(() => {\n this.isActive = false;\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Retrieves the label of the option control.\n *\n * @returns {string} - The label of the option control.\n */\n public getLabel(): string {\n return this.element.nativeElement.textContent?.trim() ?? '';\n }\n\n protected abstract selectOption(): void;\n\n @HostListener('click', ['$event'])\n protected select(event: Event): void {\n event.stopPropagation();\n event.preventDefault();\n\n this.selectOption();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;MAWmB,aAAa,CAAA;AAVnC,IAAA,WAAA,GAAA;QAWqB,IAAkB,CAAA,kBAAA,GAAG,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-option-control.mjs","sources":["../../../../libs/angular/cdk/option-control/src/lib/option-control.ts","../../../../libs/angular/cdk/option-control/src/odx-angular-cdk-option-control.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { ChangeDetectorRef, Directive, ElementRef, HostListener, inject, Input } from '@angular/core';\nimport { deferFn, injectElement, untilDestroyed } from '@odx/angular/utils';\n\n/**\n * `OptionControl` is an abstract directive that serves as a base class for implementing selectable options in a dropdown\n * list or a similar component. It integrates with CDK's `Highlightable` interface to provide keyboard navigation support.\n *\n * @param {T} - The type of the value.\n *\n * This base class handles the visual feedback for active and selected states and provides a structure for defining\n * how an option is selected.\n *\n * Extend `OptionControl` to create a concrete option component:\n * @example\n * ```ts\n * @Component({\n * selector: 'my-option',\n * templateUrl: './my-option.component.html',\n * providers: [{ provide: OptionControl, useExisting: forwardRef(() => MyOptionComponent) }],\n * })\n * class MyOptionComponent extends OptionControl<MyDataType> {\n * @Input() override value: MyDataType | null = null;\n *\n * protected override selectOption(): void {\n * // Custom logic for when this option is selected\n * }\n * }\n * ```\n *\n * Implement `selectOption` in subclasses to define what happens when an option is selected, such as updating a model\n * or closing a dropdown.\n */\n@Directive({\n standalone: true,\n host: {\n role: 'option',\n '[class.odx-option]': 'true',\n '[class.is-active]': 'isActive',\n '[attr.aria-selected]': 'isSelected',\n '[class.is-selected]': 'isSelected',\n },\n})\nexport abstract class OptionControl<T> implements Highlightable {\n protected readonly takeUntilDestroyed = untilDestroyed();\n protected readonly cdr = inject(ChangeDetectorRef);\n\n protected isActive = false;\n\n /**\n * Represents the value of the option control.\n *\n * @type {T} - The type of the value.\n */\n @Input()\n public value: T | null = null;\n\n public readonly element: ElementRef<HTMLElement> = injectElement();\n\n /**\n * Sets the active styles for the option control.\n *\n * @returns {void}\n */\n public abstract setActiveStyles(): void;\n\n /**\n * Sets the inactive styles for the option control.\n *\n * @returns {void}\n */\n public setInactiveStyles(): void {\n deferFn(() => {\n this.isActive = false;\n this.cdr.markForCheck();\n });\n }\n\n /**\n * Retrieves the label of the option control.\n *\n * @returns {string} - The label of the option control.\n */\n public getLabel(): string {\n return this.element.nativeElement.textContent?.trim() ?? '';\n }\n\n protected abstract selectOption(): void;\n\n @HostListener('click', ['$event'])\n protected select(event: Event): void {\n event.stopPropagation();\n event.preventDefault();\n\n this.selectOption();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;MAWmB,aAAa,CAAA;AAVnC,IAAA,WAAA,GAAA;QAWqB,IAAkB,CAAA,kBAAA,GAAG,cAAc,EAAE,CAAC;AACtC,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAEzC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAE3B;;;;AAIG;QAEI,IAAK,CAAA,KAAA,GAAa,IAAI,CAAC;QAEd,IAAO,CAAA,OAAA,GAA4B,aAAa,EAAE,CAAC;AAuCpE,KAAA;AA9BC;;;;AAIG;IACI,iBAAiB,GAAA;QACtB,OAAO,CAAC,MAAK;AACX,YAAA,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;AACtB,YAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;AAC1B,SAAC,CAAC,CAAC;KACJ;AAED;;;;AAIG;IACI,QAAQ,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;KAC7D;AAKS,IAAA,MAAM,CAAC,KAAY,EAAA;QAC3B,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,KAAK,CAAC,cAAc,EAAE,CAAC;QAEvB,IAAI,CAAC,YAAY,EAAE,CAAC;KACrB;+GApDmB,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,gBAAA,EAAA,EAAA,UAAA,EAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,mBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,oBAAoB,EAAE,MAAM;AAC5B,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,YAAY;AACpC,qBAAA;AACF,iBAAA,CAAA;8BAaQ,KAAK,EAAA,CAAA;sBADX,KAAK;gBAoCI,MAAM,EAAA,CAAA;sBADf,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACzFnC;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, forwardRef,
|
|
2
|
+
import { InjectionToken, forwardRef, Directive, HostListener, inject, Input, NgModule } from '@angular/core';
|
|
3
3
|
import { DisabledController, ReadonlyController, detectControllerChanges, CoreModule } from '@odx/angular';
|
|
4
4
|
import { injectElement, booleanToAttributeString } from '@odx/angular/utils';
|
|
5
5
|
import { CustomFormControl } from '@odx/angular/cdk/custom-form-control';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-cdk-radio-group-control.mjs","sources":["../../../../libs/angular/cdk/radio-group-control/src/lib/radio-group-control.directive.ts","../../../../libs/angular/cdk/radio-group-control/src/lib/radio-control.directive.ts","../../../../libs/angular/cdk/radio-group-control/src/lib/radio-group-control.module.ts","../../../../libs/angular/cdk/radio-group-control/src/odx-angular-cdk-radio-group-control.ts"],"sourcesContent":["import { Directive, forwardRef, HostListener, InjectionToken } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { injectElement } from '@odx/angular/utils';\n\nexport const RADIO_GROUP_CONTROL = new InjectionToken<RadioGroupControlDirective>('@odx/angular/cdk/radio-group-control::RadioGroupControl');\n\n/**\n * A directive that provides radio group functionality for its child radio button components.\n * It tracks the value and selection state of a group of `odxRadioControl` directives.\n *\n * This directive extends `CustomFormControl` to integrate seamlessly with Angular Forms API,\n * providing form control methods and properties. It supports form control states like disabled\n * and readonly through `DisabledController` and `ReadonlyController` directives.\n *\n * It uses Angular's dependency injection to provide itself as `RADIO_GROUP_CONTROL` token,\n * allowing child radio buttons to communicate with the radio group directive.\n *\n * @template T - The type of the value.\n */\n@Directive({\n standalone: true,\n selector: '[odxRadioGroupControl]',\n providers: [\n {\n provide: RADIO_GROUP_CONTROL,\n useExisting: forwardRef(() => RadioGroupControlDirective),\n multi: false,\n },\n DisabledController.connect(),\n ReadonlyController.connect(),\n ],\n})\nexport class RadioGroupControlDirective<T = unknown> extends CustomFormControl<T | null> {\n private readonly hostElement = injectElement();\n\n constructor() {\n super(null);\n }\n\n @HostListener('focusout', ['$event'])\n protected onFocusOut(event: FocusEvent): void {\n if (event.target !== this.hostElement.nativeElement) {\n this.onTouched();\n }\n }\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { detectControllerChanges, DisabledController, ReadonlyController } from '@odx/angular';\nimport { booleanToAttributeString } from '@odx/angular/utils';\nimport { RADIO_GROUP_CONTROL } from './radio-group-control.directive';\n\n/**\n * A directive that provides radio button functionality within a radio group.\n * It tracks the active state based on the current value of the parent `odxRadioGroupControl`.\n *\n * This directive integrates with Angular Forms through `DisabledController` and `ReadonlyController` directives,\n * enabling form control states like disabled and readonly. It automatically updates its classes\n * to reflect these states and the active (checked) state.\n *\n * @template T - The type of the value.\n */\n@Directive({\n standalone: true,\n selector: '[odxRadioControl]',\n host: {\n '[class.is-active]': 'isActive',\n '[class.is-disabled]': 'disabledController?.disabled',\n '[class.is-readonly]': 'readonlyController?.readonly',\n '[class.has-error]': 'radioGroupControl.hasError',\n },\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n})\nexport class RadioControlDirective<T = unknown> {\n protected readonly disabledController = DisabledController.inject();\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly radioGroupControl = inject(RADIO_GROUP_CONTROL, { skipSelf: true });\n\n /**\n * The value of the radio control.\n *\n * @type {T | null}\n * @default null\n */\n @Input()\n public value: T | null = null;\n\n /**\n * The `aria-checked` attribute value.\n *\n * @type {string}\n */\n public get ariaChecked(): string {\n return booleanToAttributeString(this.isActive);\n }\n\n /**\n * Gets a value indicating whether the radio control is active.\n *\n * @type {boolean}\n */\n public get isActive(): boolean {\n return this.radioGroupControl.value === this.value;\n }\n\n constructor() {\n detectControllerChanges(this.radioGroupControl).subscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RadioControlDirective } from './radio-control.directive';\nimport { RadioGroupControlDirective } from './radio-group-control.directive';\n\nconst modules = [RadioGroupControlDirective, RadioControlDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RadioGroupControlModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc,CAA6B,yDAAyD;
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-radio-group-control.mjs","sources":["../../../../libs/angular/cdk/radio-group-control/src/lib/radio-group-control.directive.ts","../../../../libs/angular/cdk/radio-group-control/src/lib/radio-control.directive.ts","../../../../libs/angular/cdk/radio-group-control/src/lib/radio-group-control.module.ts","../../../../libs/angular/cdk/radio-group-control/src/odx-angular-cdk-radio-group-control.ts"],"sourcesContent":["import { Directive, forwardRef, HostListener, InjectionToken } from '@angular/core';\nimport { DisabledController, ReadonlyController } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { injectElement } from '@odx/angular/utils';\n\nexport const RADIO_GROUP_CONTROL = new InjectionToken<RadioGroupControlDirective>('@odx/angular/cdk/radio-group-control::RadioGroupControl');\n\n/**\n * A directive that provides radio group functionality for its child radio button components.\n * It tracks the value and selection state of a group of `odxRadioControl` directives.\n *\n * This directive extends `CustomFormControl` to integrate seamlessly with Angular Forms API,\n * providing form control methods and properties. It supports form control states like disabled\n * and readonly through `DisabledController` and `ReadonlyController` directives.\n *\n * It uses Angular's dependency injection to provide itself as `RADIO_GROUP_CONTROL` token,\n * allowing child radio buttons to communicate with the radio group directive.\n *\n * @template T - The type of the value.\n */\n@Directive({\n standalone: true,\n selector: '[odxRadioGroupControl]',\n providers: [\n {\n provide: RADIO_GROUP_CONTROL,\n useExisting: forwardRef(() => RadioGroupControlDirective),\n multi: false,\n },\n DisabledController.connect(),\n ReadonlyController.connect(),\n ],\n})\nexport class RadioGroupControlDirective<T = unknown> extends CustomFormControl<T | null> {\n private readonly hostElement = injectElement();\n\n constructor() {\n super(null);\n }\n\n @HostListener('focusout', ['$event'])\n protected onFocusOut(event: FocusEvent): void {\n if (event.target !== this.hostElement.nativeElement) {\n this.onTouched();\n }\n }\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { detectControllerChanges, DisabledController, ReadonlyController } from '@odx/angular';\nimport { booleanToAttributeString } from '@odx/angular/utils';\nimport { RADIO_GROUP_CONTROL } from './radio-group-control.directive';\n\n/**\n * A directive that provides radio button functionality within a radio group.\n * It tracks the active state based on the current value of the parent `odxRadioGroupControl`.\n *\n * This directive integrates with Angular Forms through `DisabledController` and `ReadonlyController` directives,\n * enabling form control states like disabled and readonly. It automatically updates its classes\n * to reflect these states and the active (checked) state.\n *\n * @template T - The type of the value.\n */\n@Directive({\n standalone: true,\n selector: '[odxRadioControl]',\n host: {\n '[class.is-active]': 'isActive',\n '[class.is-disabled]': 'disabledController?.disabled',\n '[class.is-readonly]': 'readonlyController?.readonly',\n '[class.has-error]': 'radioGroupControl.hasError',\n },\n providers: [DisabledController.connect(), ReadonlyController.connect()],\n})\nexport class RadioControlDirective<T = unknown> {\n protected readonly disabledController = DisabledController.inject();\n protected readonly readonlyController = ReadonlyController.inject();\n protected readonly radioGroupControl = inject(RADIO_GROUP_CONTROL, { skipSelf: true });\n\n /**\n * The value of the radio control.\n *\n * @type {T | null}\n * @default null\n */\n @Input()\n public value: T | null = null;\n\n /**\n * The `aria-checked` attribute value.\n *\n * @type {string}\n */\n public get ariaChecked(): string {\n return booleanToAttributeString(this.isActive);\n }\n\n /**\n * Gets a value indicating whether the radio control is active.\n *\n * @type {boolean}\n */\n public get isActive(): boolean {\n return this.radioGroupControl.value === this.value;\n }\n\n constructor() {\n detectControllerChanges(this.radioGroupControl).subscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { RadioControlDirective } from './radio-control.directive';\nimport { RadioGroupControlDirective } from './radio-group-control.directive';\n\nconst modules = [RadioGroupControlDirective, RadioControlDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class RadioGroupControlModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAKa,mBAAmB,GAAG,IAAI,cAAc,CAA6B,yDAAyD,EAAE;AAE7I;;;;;;;;;;;;AAYG;AAcG,MAAO,0BAAwC,SAAQ,iBAA2B,CAAA;AAGtF,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,IAAI,CAAC,CAAC;QAHG,IAAW,CAAA,WAAA,GAAG,aAAa,E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oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, inject, EventEmitter, Input, Output, Directive, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@odx/angular/cdk/expandable';
|
|
5
5
|
import { ExpandableContainerDirective, ExpandableItemDirective } from '@odx/angular/cdk/expandable';
|
|
6
6
|
import { CSSComponent } from '@odx/angular/internal';
|
|
@@ -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\" />\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;AAC1C;+GAFY,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;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;;ADqBa,kBAAkB,GAAA,UAAA,CAAA;IAT9B,YAAY,CAAC,WAAW;AASZ,CAAA,EAAA,kBAAkB,CAE9B;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,UAAU,CAAC,EAAE,CAAC,EAAA,QAAA,EAAA,gDAAA,EAAA;;;AEVrF;;;;;;;AAOG;AAmBU,IAAA,sBAAsB,GAA5B,MAAM,sBAAsB,CAAA;AAA5B,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB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AA,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;gHAM3E,eAAe,EAAA,OAAA,EAAA,CANS,sBAAsB,EAI/C,UAAU,CAAA,EAAA,CAAA,CAAA;;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;;;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,UAAU,CAAC,EAAE,CAAC,EAAA,QAAA,EAAA,gDAAA,EAAA,CAAA;;;AEVrF;;;;;;;AAOG;AAmBU,IAAA,sBAAs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E,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;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { booleanAttribute,
|
|
3
|
+
import { booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
4
4
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
5
5
|
import { injectElement } from '@odx/angular/utils';
|
|
6
6
|
|
|
@@ -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\" />\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;
|
|
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;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Directive, NgModule } from '@angular/core';
|
|
5
5
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
6
6
|
import { injectElement } from '@odx/angular/utils';
|
|
7
7
|
import { CoreModule } from '@odx/angular';
|
|
@@ -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]\" />\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;
|
|
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;QAC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AAA;+GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,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;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject,
|
|
3
|
+
import { InjectionToken, inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, forwardRef, ContentChildren, ContentChild, HostListener, Pipe, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@odx/angular';
|
|
5
5
|
import { CoreModule, ReadonlyController, WithTabIndex, ClickOutsideDirective } from '@odx/angular';
|
|
6
6
|
import { AutocompleteControl, ODX_SEARCH_FILTER_HOST, BaseSearchFilterPipe } from '@odx/angular/cdk/autocomplete-control';
|
|
@@ -99,7 +99,7 @@ let AutocompleteComponent = class AutocompleteComponent extends AutocompleteCont
|
|
|
99
99
|
return;
|
|
100
100
|
if (this.value)
|
|
101
101
|
this.updateSearchField(this.value);
|
|
102
|
-
this.initKeyManager(this.options);
|
|
102
|
+
this.initKeyManager(this.options.toArray());
|
|
103
103
|
this.handleQueryListOption(this.options);
|
|
104
104
|
this.handleSearchFieldChanges();
|
|
105
105
|
this.handleClickOutside();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-autocomplete.mjs","sources":["../../../../libs/angular/components/autocomplete/src/lib/autocomplete.tokens.ts","../../../../libs/angular/components/autocomplete/src/lib/components/option/autocomplete-option.component.ts","../../../../libs/angular/components/autocomplete/src/lib/components/option/autocomplete-option.component.html","../../../../libs/angular/components/autocomplete/src/lib/directives/autocomplete-input-control.directive.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.component.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.component.html","../../../../libs/angular/components/autocomplete/src/lib/pipes/autocomplete-search-filter.pipe.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.module.ts","../../../../libs/angular/components/autocomplete/src/odx-angular-components-autocomplete.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { AutocompleteComponent } from './autocomplete.component';\n\nexport const AUTOCOMPLETE_CONTROL = new InjectionToken<AutocompleteComponent>('@odx/angular/components/autocomplete::AutocompleteComponent');\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn } from '@odx/angular/utils';\nimport { AUTOCOMPLETE_CONTROL } from '../../autocomplete.tokens';\n\n/**\n * Represents an option component for the autocomplete control.\n *\n * @template T - The type of the option value.\n */\n@CSSComponent('autocomplete-option')\n@Component({\n standalone: true,\n selector: 'odx-autocomplete-option',\n imports: [CoreModule],\n templateUrl: './autocomplete-option.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AutocompleteOptionComponent<T> extends OptionControl<T> {\n protected readonly autocompleteControl = inject(AUTOCOMPLETE_CONTROL);\n\n /**\n * Sets the active styles for the option component.\n */\n public setActiveStyles(): void {\n deferFn(() => {\n this.isActive = true;\n this.cdr.markForCheck();\n });\n\n if (this.autocompleteControl.isOpen) {\n this.autocompleteControl.scrollOptionIntoView(this);\n }\n }\n\n protected selectOption(): void {\n this.autocompleteControl.selectOption(this);\n }\n}\n","<ng-content />\n","import { Directive } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { CSSComponent } from '@odx/angular/internal';\n\n/**\n * Directive for controlling the input in an autocomplete component.\n * Extends the base InputControlDirective class.\n */\n@CSSComponent('autocomplete__control')\n@Directive({\n standalone: true,\n selector: 'input[odxAutocompleteControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n },\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithTabIndex],\n})\nexport class AutocompleteInputControlDirective extends InputControlDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n forwardRef,\n HostListener,\n inject,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ClickOutsideDirective } from '@odx/angular';\nimport { AutocompleteControl, ODX_SEARCH_FILTER_HOST } from '@odx/angular/cdk/autocomplete-control';\nimport { DropdownDirective } from '@odx/angular/components/dropdown';\nimport { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn } from '@odx/angular/utils';\nimport { filter, tap } from 'rxjs';\nimport { AUTOCOMPLETE_CONTROL } from './autocomplete.tokens';\nimport { AutocompleteOptionComponent } from './components';\nimport { AutocompleteInputControlDirective } from './directives';\n\n/**\n * Represents an autocomplete component that provides user interface for a dropdown list to select from as users type.\n * It extends `AutocompleteControl`, integrating custom logic for handling keyboard and mouse events,\n * managing the dropdown state, and updating the associated search field.\n *\n * @see {AutocompleteControl}\n *\n * @template T - The type of the value handled by the autocomplete.\n */\n@CSSComponent('autocomplete')\n@Component({\n standalone: true,\n selector: 'odx-autocomplete',\n imports: [DropdownDirective, LoadingSpinnerModule],\n templateUrl: './autocomplete.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AUTOCOMPLETE_CONTROL,\n useExisting: forwardRef(() => AutocompleteComponent),\n },\n {\n provide: ODX_SEARCH_FILTER_HOST,\n useExisting: AUTOCOMPLETE_CONTROL,\n },\n ],\n hostDirectives: [ClickOutsideDirective],\n})\nexport class AutocompleteComponent<T = unknown> extends AutocompleteControl<T | null> implements AfterViewInit {\n private readonly defaultActiveOptionIndex = 0;\n private patchValueFlag = false;\n protected readonly clickOutsideDirective = inject(ClickOutsideDirective, { host: true });\n\n /**\n * The list of autocomplete options.\n *\n * @type {QueryList<AutocompleteOptionComponent<T>> | undefined}\n */\n @ContentChildren(AutocompleteOptionComponent, { descendants: true, emitDistinctChangesOnly: true })\n public options?: QueryList<AutocompleteOptionComponent<T>>;\n\n /**\n * The search field input control.\n *\n * @type {AutocompleteInputControlDirective | undefined}\n */\n @ContentChild(AutocompleteInputControlDirective)\n public searchField?: AutocompleteInputControlDirective;\n\n public override ngAfterViewInit(): void {\n if (!this.options) return;\n if (this.value) this.updateSearchField(this.value);\n this.initKeyManager(this.options);\n this.handleQueryListOption(this.options);\n this.handleSearchFieldChanges();\n this.handleClickOutside();\n }\n\n /**\n * Selects an option, updates the value, updates the search field display,\n * emits the selected value, and closes the dropdown.\n *\n * @param {AutocompleteOptionComponent<T> | null} option - The option component to select. If the option is undefined or its value is undefined,\n * no action is taken.\n */\n public selectOption(option?: AutocompleteOptionComponent<T> | null): void {\n if (!option?.value) return;\n\n this.updateValue(option.value);\n this.updateSearchField(option.value);\n\n this.optionSelected.emit(option.value);\n\n this.closeDropdown();\n }\n\n /**\n * Resets the search field to its initial state and updates the value of the autocomplete\n * to an empty string or initial value.\n */\n public resetSearchField(): void {\n this.updateValue('' as T);\n this.searchField?.reset();\n }\n\n protected handleQueryListOption(options: QueryList<AutocompleteOptionComponent<T>>): void {\n options.changes\n .pipe(\n tap(() => deferFn(() => this.updateDropdownState())),\n filter(() => this.isOpen),\n this.takeUntilDestroyed(),\n )\n .subscribe(() => {\n deferFn(() => this.activateSelectedOption());\n });\n }\n\n protected handleSearchFieldChanges(): void {\n this.searchField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => this.triggerControllerChange());\n }\n\n protected handleClickOutside(): void {\n this.clickOutsideDirective.odxClickOutside.pipe(this.takeUntilDestroyed()).subscribe(() => this.clickOutside());\n }\n\n protected clickOutside(): void {\n this.closeDropdown();\n this.blurSelectSearchField();\n }\n\n protected updateDropdownState(): void {\n if (this.patchValueFlag) {\n this.patchValueFlag = false;\n return;\n }\n\n if (this.isOpen && !this.hasOptions) {\n this.closeDropdown();\n } else if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n }\n }\n\n @HostListener('click')\n protected handleClickEvent() {\n if (this.isLoading && this.isOpen) {\n this.closeDropdown();\n this.blurSelectSearchField();\n return;\n }\n\n if (this.isReadonly || this.isDisabled) return;\n\n if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n }\n }\n\n @HostListener('keydown', ['$event'])\n protected handleKeyboardEvent(event: KeyboardEvent) {\n if (this.isReadonly || this.isDisabled) return;\n\n if (event.key === 'Escape') {\n this.resetSearchField();\n this.blurSelectSearchField();\n return;\n }\n\n if (this.isOpen && this.hasOptions) {\n if (event.key === 'Enter' || event.key === 'Tab') {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.selectOption(this.keyManager?.activeItem as AutocompleteOptionComponent<T> | undefined);\n return;\n }\n }\n\n if (event.key === 'Enter') {\n this.optionSelected.emit((this.value ?? '') as T);\n return;\n }\n\n if (!this.isOpen && event.key === 'Tab') {\n return;\n }\n\n deferFn(() => {\n if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n }\n });\n\n this.keyManager?.onKeydown(event);\n }\n\n protected activateSelectedOption(): void {\n this.keyManager?.setActiveItem(this.defaultActiveOptionIndex);\n }\n\n protected override onDropdownClosed(): void {\n super.onDropdownClosed();\n this.blurSelectSearchField();\n }\n\n private updateSearchField(value: T): void {\n if (!this.searchField) return;\n this.patchValueFlag = true;\n this.searchField.nativeElementValue = this.stringify?.(value) ?? (value as string);\n }\n\n private blurSelectSearchField(): void {\n this.searchField?.blur();\n }\n}\n","<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","import { Pipe, PipeTransform } from '@angular/core';\nimport { BaseSearchFilterPipe } from '@odx/angular/cdk/autocomplete-control';\n\n@Pipe({\n pure: false,\n name: 'odxAutocompleteSearchFilter',\n standalone: true,\n})\nexport class AutocompleteSearchFilterPipe extends BaseSearchFilterPipe implements PipeTransform {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AutocompleteComponent } from './autocomplete.component';\nimport { AutocompleteOptionComponent } from './components';\nimport { AutocompleteInputControlDirective } from './directives';\nimport { AutocompleteSearchFilterPipe } from './pipes';\n\nconst modules = [AutocompleteComponent, AutocompleteInputControlDirective, AutocompleteSearchFilterPipe, AutocompleteOptionComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class AutocompleteModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAGa,oBAAoB,GAAG,IAAI,cAAc,CAAwB,6DAA6D;;ACI3I;;;;AAIG;AAUI,IAAM,2BAA2B,GAAjC,MAAM,2BAA+B,SAAQ,aAAgB,CAAA;AAA7D,IAAA,WAAA,GAAA;;AACc,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAmBtE;AAjBC;;AAEG;IACI,eAAe,GAAA;QACpB,OAAO,CAAC,MAAK;AACX,YAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;AACpB,YAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE;AACzB,SAAC,CAAC;AAEF,QAAA,IAAI,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE;AACnC,YAAA,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,IAAI,CAAC;;;IAI7C,YAAY,GAAA;AACpB,QAAA,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,IAAI,CAAC;;+GAlBlC,2BAA2B,EAAA,IAAA,E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AAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YANd,qBAAqB,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,2BAA2B,CAIxH,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,qBAAqB,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAMvH,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,kBAAkB,EANd,OAAA,EAAA,CAAA,qBAAqB,EAAmE,2BAA2B,EAIxH,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAET,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA;;;ACZD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-autocomplete.mjs","sources":["../../../../libs/angular/components/autocomplete/src/lib/autocomplete.tokens.ts","../../../../libs/angular/components/autocomplete/src/lib/components/option/autocomplete-option.component.ts","../../../../libs/angular/components/autocomplete/src/lib/components/option/autocomplete-option.component.html","../../../../libs/angular/components/autocomplete/src/lib/directives/autocomplete-input-control.directive.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.component.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.component.html","../../../../libs/angular/components/autocomplete/src/lib/pipes/autocomplete-search-filter.pipe.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.module.ts","../../../../libs/angular/components/autocomplete/src/odx-angular-components-autocomplete.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { AutocompleteComponent } from './autocomplete.component';\n\nexport const AUTOCOMPLETE_CONTROL = new InjectionToken<AutocompleteComponent>('@odx/angular/components/autocomplete::AutocompleteComponent');\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn } from '@odx/angular/utils';\nimport { AUTOCOMPLETE_CONTROL } from '../../autocomplete.tokens';\n\n/**\n * Represents an option component for the autocomplete control.\n *\n * @template T - The type of the option value.\n */\n@CSSComponent('autocomplete-option')\n@Component({\n standalone: true,\n selector: 'odx-autocomplete-option',\n imports: [CoreModule],\n templateUrl: './autocomplete-option.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AutocompleteOptionComponent<T> extends OptionControl<T> {\n protected readonly autocompleteControl = inject(AUTOCOMPLETE_CONTROL);\n\n /**\n * Sets the active styles for the option component.\n */\n public setActiveStyles(): void {\n deferFn(() => {\n this.isActive = true;\n this.cdr.markForCheck();\n });\n\n if (this.autocompleteControl.isOpen) {\n this.autocompleteControl.scrollOptionIntoView(this);\n }\n }\n\n protected selectOption(): void {\n this.autocompleteControl.selectOption(this);\n }\n}\n","<ng-content />\n","import { Directive } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { CSSComponent } from '@odx/angular/internal';\n\n/**\n * Directive for controlling the input in an autocomplete component.\n * Extends the base InputControlDirective class.\n */\n@CSSComponent('autocomplete__control')\n@Directive({\n standalone: true,\n selector: 'input[odxAutocompleteControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n },\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithTabIndex],\n})\nexport class AutocompleteInputControlDirective extends InputControlDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n forwardRef,\n HostListener,\n inject,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ClickOutsideDirective } from '@odx/angular';\nimport { AutocompleteControl, ODX_SEARCH_FILTER_HOST } from '@odx/angular/cdk/autocomplete-control';\nimport { DropdownDirective } from '@odx/angular/components/dropdown';\nimport { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn } from '@odx/angular/utils';\nimport { filter, tap } from 'rxjs';\nimport { AUTOCOMPLETE_CONTROL } from './autocomplete.tokens';\nimport { AutocompleteOptionComponent } from './components';\nimport { AutocompleteInputControlDirective } from './directives';\n\n/**\n * Represents an autocomplete component that provides user interface for a dropdown list to select from as users type.\n * It extends `AutocompleteControl`, integrating custom logic for handling keyboard and mouse events,\n * managing the dropdown state, and updating the associated search field.\n *\n * @see {AutocompleteControl}\n *\n * @template T - The type of the value handled by the autocomplete.\n */\n@CSSComponent('autocomplete')\n@Component({\n standalone: true,\n selector: 'odx-autocomplete',\n imports: [DropdownDirective, LoadingSpinnerModule],\n templateUrl: './autocomplete.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: AUTOCOMPLETE_CONTROL,\n useExisting: forwardRef(() => AutocompleteComponent),\n },\n {\n provide: ODX_SEARCH_FILTER_HOST,\n useExisting: AUTOCOMPLETE_CONTROL,\n },\n ],\n hostDirectives: [ClickOutsideDirective],\n})\nexport class AutocompleteComponent<T = unknown> extends AutocompleteControl<T | null> implements AfterViewInit {\n private readonly defaultActiveOptionIndex = 0;\n private patchValueFlag = false;\n protected readonly clickOutsideDirective = inject(ClickOutsideDirective, { host: true });\n\n /**\n * The list of autocomplete options.\n *\n * @type {QueryList<AutocompleteOptionComponent<T>> | undefined}\n */\n @ContentChildren(AutocompleteOptionComponent, { descendants: true, emitDistinctChangesOnly: true })\n public options?: QueryList<AutocompleteOptionComponent<T>>;\n\n /**\n * The search field input control.\n *\n * @type {AutocompleteInputControlDirective | undefined}\n */\n @ContentChild(AutocompleteInputControlDirective)\n public searchField?: AutocompleteInputControlDirective;\n\n public override ngAfterViewInit(): void {\n if (!this.options) return;\n if (this.value) this.updateSearchField(this.value);\n this.initKeyManager(this.options.toArray());\n this.handleQueryListOption(this.options);\n this.handleSearchFieldChanges();\n this.handleClickOutside();\n }\n\n /**\n * Selects an option, updates the value, updates the search field display,\n * emits the selected value, and closes the dropdown.\n *\n * @param {AutocompleteOptionComponent<T> | null} option - The option component to select. If the option is undefined or its value is undefined,\n * no action is taken.\n */\n public selectOption(option?: AutocompleteOptionComponent<T> | null): void {\n if (!option?.value) return;\n\n this.updateValue(option.value);\n this.updateSearchField(option.value);\n\n this.optionSelected.emit(option.value);\n\n this.closeDropdown();\n }\n\n /**\n * Resets the search field to its initial state and updates the value of the autocomplete\n * to an empty string or initial value.\n */\n public resetSearchField(): void {\n this.updateValue('' as T);\n this.searchField?.reset();\n }\n\n protected handleQueryListOption(options: QueryList<AutocompleteOptionComponent<T>>): void {\n options.changes\n .pipe(\n tap(() => deferFn(() => this.updateDropdownState())),\n filter(() => this.isOpen),\n this.takeUntilDestroyed(),\n )\n .subscribe(() => {\n deferFn(() => this.activateSelectedOption());\n });\n }\n\n protected handleSearchFieldChanges(): void {\n this.searchField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => this.triggerControllerChange());\n }\n\n protected handleClickOutside(): void {\n this.clickOutsideDirective.odxClickOutside.pipe(this.takeUntilDestroyed()).subscribe(() => this.clickOutside());\n }\n\n protected clickOutside(): void {\n this.closeDropdown();\n this.blurSelectSearchField();\n }\n\n protected updateDropdownState(): void {\n if (this.patchValueFlag) {\n this.patchValueFlag = false;\n return;\n }\n\n if (this.isOpen && !this.hasOptions) {\n this.closeDropdown();\n } else if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n }\n }\n\n @HostListener('click')\n protected handleClickEvent() {\n if (this.isLoading && this.isOpen) {\n this.closeDropdown();\n this.blurSelectSearchField();\n return;\n }\n\n if (this.isReadonly || this.isDisabled) return;\n\n if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n }\n }\n\n @HostListener('keydown', ['$event'])\n protected handleKeyboardEvent(event: KeyboardEvent) {\n if (this.isReadonly || this.isDisabled) return;\n\n if (event.key === 'Escape') {\n this.resetSearchField();\n this.blurSelectSearchField();\n return;\n }\n\n if (this.isOpen && this.hasOptions) {\n if (event.key === 'Enter' || event.key === 'Tab') {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.selectOption(this.keyManager?.activeItem as AutocompleteOptionComponent<T> | undefined);\n return;\n }\n }\n\n if (event.key === 'Enter') {\n this.optionSelected.emit((this.value ?? '') as T);\n return;\n }\n\n if (!this.isOpen && event.key === 'Tab') {\n return;\n }\n\n deferFn(() => {\n if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n }\n });\n\n this.keyManager?.onKeydown(event);\n }\n\n protected activateSelectedOption(): void {\n this.keyManager?.setActiveItem(this.defaultActiveOptionIndex);\n }\n\n protected override onDropdownClosed(): void {\n super.onDropdownClosed();\n this.blurSelectSearchField();\n }\n\n private updateSearchField(value: T): void {\n if (!this.searchField) return;\n this.patchValueFlag = true;\n this.searchField.nativeElementValue = this.stringify?.(value) ?? (value as string);\n }\n\n private blurSelectSearchField(): void {\n this.searchField?.blur();\n }\n}\n","<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","import { Pipe, PipeTransform } from '@angular/core';\nimport { BaseSearchFilterPipe } from '@odx/angular/cdk/autocomplete-control';\n\n@Pipe({\n pure: false,\n name: 'odxAutocompleteSearchFilter',\n standalone: true,\n})\nexport class AutocompleteSearchFilterPipe extends BaseSearchFilterPipe implements PipeTransform {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AutocompleteComponent } from './autocomplete.component';\nimport { AutocompleteOptionComponent } from './components';\nimport { AutocompleteInputControlDirective } from './directives';\nimport { AutocompleteSearchFilterPipe } from './pipes';\n\nconst modules = [AutocompleteComponent, AutocompleteInputControlDirective, AutocompleteSearchFilterPipe, AutocompleteOptionComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class AutocompleteModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAGa,oBAAoB,GAAG,IAAI,cAAc,CAAwB,6DAA6D;;ACI3I;;;;AAIG;AAUI,IAAM,2BAA2B,GAAjC,MAAM,2BAA+B,SAAQ,aAAgB,CAAA;AAA7D,IAAA,WAAA,GAAA;;AACc,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAmBvE,KAAA;AAjBC;;AAEG;IACI,eAAe,GAAA;QACpB,OAAO,CAAC,MAAK;AACX,YAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;AACrB,YAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;AAC1B,SAAC,CAAC,CAAC;AA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,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EANd,OAAA,EAAA,CAAA,qBAAqB,EAAmE,2BAA2B,EAIxH,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
4
4
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
5
5
|
import { injectElement } from '@odx/angular/utils';
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-avatar.mjs","sources":["../../../../libs/angular/components/avatar/src/lib/models/avatar-size.ts","../../../../libs/angular/components/avatar/src/lib/models/avatar-variant.ts","../../../../libs/angular/components/avatar/src/lib/avatar.component.ts","../../../../libs/angular/components/avatar/src/lib/avatar.component.html","../../../../libs/angular/components/avatar/src/odx-angular-components-avatar.ts"],"sourcesContent":["export type AvatarSize = typeof AvatarSize[keyof typeof AvatarSize];\n\nexport const AvatarSize = {\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n","export type AvatarVariant = (typeof AvatarVariant)[keyof typeof AvatarVariant];\n\nexport const AvatarVariant = {\n CIRCLE: 'circle',\n RECTANGLE: 'rectangle',\n} as const;\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { AvatarSize, AvatarVariant } from './models';\n\n@CSSComponent('avatar')\n@Component({\n standalone: true,\n selector: 'odx-avatar',\n templateUrl: 'avatar.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AvatarComponent {\n public readonly element = injectElement();\n\n /**\n * The size of the avatar.\n *\n * @type {AvatarSize}\n * @default AvatarSize.SMALL\n */\n @CSSModifier()\n @Input()\n public size?: AvatarSize | null = AvatarSize.SMALL;\n\n /**\n * The variant of the avatar.\n *\n * @type {AvatarVariant}\n * @default AvatarVariant.CIRCLE\n */\n @CSSModifier()\n @Input()\n public variant?: AvatarVariant | null = AvatarVariant.CIRCLE;\n}\n","<ng-content />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEa,MAAA,UAAU,GAAG;AACxB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,OAAO;;;ACHH,MAAA,aAAa,GAAG;AAC3B,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,SAAS,EAAE,WAAW;;;ACSX,IAAA,eAAe,GAArB,MAAM,eAAe,CAAA;AAArB,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"odx-angular-components-avatar.mjs","sources":["../../../../libs/angular/components/avatar/src/lib/models/avatar-size.ts","../../../../libs/angular/components/avatar/src/lib/models/avatar-variant.ts","../../../../libs/angular/components/avatar/src/lib/avatar.component.ts","../../../../libs/angular/components/avatar/src/lib/avatar.component.html","../../../../libs/angular/components/avatar/src/odx-angular-components-avatar.ts"],"sourcesContent":["export type AvatarSize = typeof AvatarSize[keyof typeof AvatarSize];\n\nexport const AvatarSize = {\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n","export type AvatarVariant = (typeof AvatarVariant)[keyof typeof AvatarVariant];\n\nexport const AvatarVariant = {\n CIRCLE: 'circle',\n RECTANGLE: 'rectangle',\n} as const;\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { AvatarSize, AvatarVariant } from './models';\n\n@CSSComponent('avatar')\n@Component({\n standalone: true,\n selector: 'odx-avatar',\n templateUrl: 'avatar.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AvatarComponent {\n public readonly element = injectElement();\n\n /**\n * The size of the avatar.\n *\n * @type {AvatarSize}\n * @default AvatarSize.SMALL\n */\n @CSSModifier()\n @Input()\n public size?: AvatarSize | null = AvatarSize.SMALL;\n\n /**\n * The variant of the avatar.\n *\n * @type {AvatarVariant}\n * @default AvatarVariant.CIRCLE\n */\n @CSSModifier()\n @Input()\n public variant?: AvatarVariant | null = AvatarVariant.CIRCLE;\n}\n","<ng-content />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEa,MAAA,UAAU,GAAG;AACxB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,OAAO;;;ACHH,MAAA,aAAa,GAAG;AAC3B,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,SAAS,EAAE,WAAW;;;ACSX,IAAA,eAAe,GAArB,MAAM,eAAe,CAAA;AAArB,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAE1C;;;;;AAKG;AAGI,QAAA,IAAA,CAAA,IAAI,GAAuB,UAAU,CAAC,KAAK,CAAC;AAEnD;;;;;AAKG;AAGI,QAAA,IAAA,CAAA,OAAO,GAA0B,aAAa,CAAC,MAAM,CAAC;AAC9D,KAAA;+GAtBY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,oHCb5B,kBACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;ADuBS,UAAA,CAAA;AAFN,IAAA,WAAW,EAAE;;AAEqC,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAU5C,UAAA,CAAA;AAFN,IAAA,WAAW,EAAE;;AAE+C,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AArBlD,eAAe,GAAA,UAAA,CAAA;IAR3B,YAAY,CAAC,QAAQ,CAAC;AAQV,CAAA,EAAA,eAAe,CAsB3B,CAAA;4FAtBY,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;iCACI,IAAI,EAAA,QAAA,EACN,YAAY,EAEP,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kBAAA,EAAA,CAAA;8BAaxC,IAAI,EAAA,CAAA;sBADV,KAAK;gBAWC,OAAO,EAAA,CAAA;sBADb,KAAK;;;AEjCR;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { booleanAttribute,
|
|
3
|
+
import { booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, inject, Injector, numberAttribute, Directive } from '@angular/core';
|
|
4
4
|
import { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';
|
|
5
5
|
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
6
6
|
import { injectElement, Position, isPresent } from '@odx/angular/utils';
|