@odx/angular 12.12.1 → 12.13.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.
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-cdk-dynamic-view.mjs","sources":["../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.component.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/create-projectable-nodes.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/is-dynamic-text-content.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/models/dynamic-component-ref.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/models/dynamic-template-ref.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/is-dynamic-view.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/tokens/dynamic-view-context.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/tokens/dynamic-view-default-host.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.service.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.directive.ts","../../../../libs/angular/cdk/dynamic-view/src/odx-angular-cdk-dynamic-view.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport { injectElement } from '@odx/angular/utils';\nimport { distinctUntilChanged, isObservable, Subscription } from 'rxjs';\nimport { DynamicTextContent } from './facade';\n\n@Component({\n selector: 'odx-dynamic-view',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n})\nexport class DynamicViewComponent implements OnDestroy {\n private readonly element = injectElement();\n private currentSubscription: Subscription | null = null;\n\n @Input()\n public set content(value: DynamicTextContent) {\n if (isObservable(value)) {\n this.ngOnDestroy();\n this.currentSubscription = value.pipe(distinctUntilChanged()).subscribe((innerValue) => {\n this.setContent(innerValue);\n });\n } else {\n this.setContent(value);\n }\n }\n\n public ngOnDestroy(): void {\n this.currentSubscription?.unsubscribe();\n this.currentSubscription = null;\n }\n\n private setContent(value: string): void {\n this.element.nativeElement.innerHTML = value;\n }\n}\n","import { reflectComponentType, Type } from '@angular/core';\n\n/**\n * Prepares an array of node arrays suitable for projection into the `<ng-content>` slots\n * of a dynamically created Angular component based on its content selectors.\n *\n * The function inspects the component's content selectors and aligns the provided nodes\n * for projection according to these selectors. A selector of '*' indicates that the nodes\n * should be projected into this slot. If a content selector does not match '*', an empty\n * array is returned for that slot, indicating no nodes are projected into it.\n *\n * @param {Type<unknown>} component - The component class for which the projectable nodes are being prepared.\n * @param {Node[]} nodes - The nodes intended for projection into the component's `<ng-content>` slots.\n * @returns {Node[][]} An array of node arrays, each corresponding to a `<ng-content>` slot in the component.\n * Each sub-array contains nodes to be projected into the respective `<ng-content>` slot, based on the component's content selectors.\n *\n * @example\n * ```ts\n * // Given a component with two `<ng-content>` slots, the first without a selector and the second with the selector `<ng-content select=\".selector-class\">`,\n * const nodes = [document.createTextNode('Hello'), document.createElement('div')];\n * const projectableNodes = createProjectableNodes(MyComponent, nodes);\n * // projectableNodes would be `[[TextNode, DivElement], []]` for a component with selectors ['*', '.selector-class']\n * ```\n */\nexport function createProjectableNodes(component: Type<unknown>, nodes: Node[]): Node[][] {\n const componentType = reflectComponentType(component);\n if (componentType && componentType.ngContentSelectors.length > 0) {\n return componentType.ngContentSelectors.map((selector) => (selector === '*' ? nodes : []));\n }\n return [];\n}\n","import { isString } from '@odx/angular/utils';\nimport { isObservable } from 'rxjs';\nimport { DynamicTextContent } from '../facade';\n\n/**\n * Type guard function to check if a given value is considered dynamic text content.\n * Dynamic text content can either be a plain string or an Observable. This function\n * facilitates type-safe handling of dynamic text content by checking the type of the value.\n *\n * @param {unknown} value - The value to be checked.\n * @returns {value is DynamicTextContent} Returns `true` if the value is a string or an Observable,\n * indicating it can be used as dynamic text content; otherwise, returns `false`.\n *\n * @example\n * ```ts\n * // Example usage of the isDynamicTextContent function\n * const textValue: unknown = getTextValue(); // This function may return either string or Observable\n *\n * if (isDynamicTextContent(textValue)) {\n * // The type of textValue is now narrowed to DynamicTextContent (string | Observable)\n * console.log('The value can be used as dynamic text content.');\n * } else {\n * console.log('The value is not suitable as dynamic text content.');\n * }\n * ```\n */\nexport function isDynamicTextContent(value: unknown): value is DynamicTextContent {\n return isString(value) || isObservable(value);\n}\n","import { ApplicationRef, ComponentRef, createComponent, EnvironmentInjector, reflectComponentType, Type, ViewRef } from '@angular/core';\nimport { deepmerge } from '@odx/angular/internal';\nimport { isViewContainer } from '@odx/angular/utils';\nimport { GetDynamicViewContext } from '../facade';\nimport { DynamicViewRef } from '../facade/dynamic-view-ref';\nimport { DynamicViewOptions } from './dynamic-view-options';\n\nexport interface DynamicComponentOptions<T extends Type<unknown>> extends DynamicViewOptions<T> {\n component: T;\n}\n\n/**\n * The DynamicComponentRef class is a powerful utility for dynamically creating and managing\n * Angular components at runtime. It encapsulates the logic for component creation, input handling,\n * and lifecycle management, making it easier to work with dynamic components in complex applications.\n *\n * A reference to a dynamically created component, providing methods to manage its lifecycle,\n * detect changes, and update its inputs based on a context.\n *\n * @template T - The type of the component being managed.\n * @template C - The type of the context used to update the component's inputs.\n */\nexport class DynamicComponentRef<T extends Type<unknown>, C extends GetDynamicViewContext<T>> implements DynamicViewRef<T> {\n private readonly application = this.options.injector.get(ApplicationRef);\n private componentRef: ComponentRef<T> | null = null;\n private componentInputs: Record<string, true> | null = null;\n\n constructor(private readonly options: DynamicComponentOptions<T>) {\n const { component, context, injector, projectableNodes, host } = options;\n\n this.componentRef = createComponent(component as Type<T>, {\n environmentInjector: injector.get(EnvironmentInjector),\n elementInjector: injector,\n projectableNodes,\n });\n this.componentInputs =\n reflectComponentType(this.componentRef.componentType)?.inputs.reduce(\n (acc, { propName }) => {\n acc[propName] = true;\n return acc;\n },\n {} as Record<string, true>,\n ) ?? null;\n\n if (isViewContainer(host)) {\n host.insert(this.componentRef.hostView);\n } else {\n this.application.attachView(this.componentRef.hostView);\n if (host) {\n host.appendChild(this.getElement());\n }\n }\n if (context) {\n this.update(context as C);\n }\n }\n\n /**\n * Triggers change detection for the dynamically created component, ensuring that any updates to inputs\n * or internal state are reflected in the view.\n */\n public detectChanges(): void {\n this.componentRef?.changeDetectorRef.detectChanges();\n }\n\n /**\n * Destroys the dynamically created component, cleaning up resources and detaching it from the application view.\n */\n public destroy(): void {\n if (this.componentRef?.hostView.destroyed) {\n this.componentRef = null;\n return;\n }\n if (this.componentRef && !isViewContainer(this.options.host)) {\n this.application.detachView(this.componentRef.hostView);\n }\n this.componentRef?.destroy();\n this.componentRef = null;\n this.componentInputs = null;\n }\n\n /**\n * Retrieves the native element associated with the dynamically created component's host view.\n *\n * @returns {Element} The native DOM element of the component.\n */\n public getElement(): Element {\n return this.componentRef?.location.nativeElement ?? null;\n }\n\n /**\n * Updates the component's inputs based on the provided context. Merges the new context with the existing\n * context and applies the combined context as inputs to the component.\n *\n * @param {C} context - The context containing new values for the component's inputs.\n */\n public update(context: C): void {\n this.options.context = deepmerge({}, this.options.context, context) as C;\n if (!this.componentRef) return;\n for (const key in this.options.context) {\n if (this.componentInputs?.[key]) {\n this.componentRef.setInput(key, this.options.context[key]);\n }\n }\n }\n\n /**\n * Retrieves the current context used for the component's inputs.\n *\n * @returns {GetDynamicViewContext<T>} The current context object.\n */\n public getContext(): GetDynamicViewContext<T> {\n return this.options.context ?? {};\n }\n\n /**\n * Retrieves the view reference associated with the dynamically created component.\n *\n * @returns {ViewRef | null} The view reference, or null if the component has not been created or has been destroyed.\n */\n public getView(): ViewRef | null {\n return this.componentRef?.hostView ?? null;\n }\n}\n","import { ApplicationRef, EmbeddedViewRef, TemplateRef as NgTemplateRef, ViewRef } from '@angular/core';\nimport { deepmerge } from '@odx/angular/internal';\nimport { isViewContainer } from '@odx/angular/utils';\nimport { DynamicViewRef, GetDynamicViewContext } from '../facade';\nimport { DynamicViewOptions } from './dynamic-view-options';\n\nexport interface DynamicTemplateOptions<T extends NgTemplateRef<unknown>> extends DynamicViewOptions<T> {\n template: T;\n}\n\n/**\n * A reference to a dynamically created template, offering methods to manage its lifecycle,\n * detect changes, and update its context. It encapsulates the logic for creating and manipulating\n * an `EmbeddedViewRef` from a given `TemplateRef`.\n *\n * @template T - The type of the `NgTemplateRef` being managed.\n */\nexport class DynamicTemplateRef<T extends NgTemplateRef<unknown> = NgTemplateRef<unknown>> implements DynamicViewRef<T> {\n private readonly application = this.options.injector.get(ApplicationRef);\n private embeddedViewRef: EmbeddedViewRef<unknown> | null = null;\n\n constructor(private readonly options: DynamicTemplateOptions<T>) {\n this.create(options);\n }\n\n /**\n * Triggers change detection on the embedded view created from the template, ensuring that any updates\n * to the context or internal state are reflected in the view.\n */\n public detectChanges(): void {\n this.embeddedViewRef?.detectChanges();\n }\n\n /**\n * Destroys the embedded view associated with the template, cleaning up resources and detaching it from the\n * application view if necessary.\n */\n public destroy(): void {\n if (this.embeddedViewRef?.destroyed) {\n this.embeddedViewRef = null;\n return;\n }\n if (!isViewContainer(this.options.host) && this.embeddedViewRef) {\n this.application.detachView(this.embeddedViewRef);\n }\n this.embeddedViewRef?.destroy();\n this.embeddedViewRef = null;\n }\n\n /**\n * Retrieves the native element associated with the template's embedded view's root node.\n *\n * @returns {Element} The native DOM element of the embedded view's root node, if available.\n */\n public getElement(): Element {\n return this.embeddedViewRef?.rootNodes?.[0] ?? null;\n }\n\n /**\n * Updates the context of the embedded view based on the provided context object. Merges the new context\n * with the existing one and applies the combined context to the embedded view.\n *\n * @param {GetDynamicViewContext<T>} context - The context containing new values for the template's view.\n */\n public update(context: GetDynamicViewContext<T>): void {\n this.options.context = deepmerge({}, this.options.context, context) as GetDynamicViewContext<T>;\n if (this.embeddedViewRef) {\n this.embeddedViewRef.context = this.options.context;\n this.detectChanges();\n }\n }\n\n /**\n * Retrieves the current context used for the template's view.\n *\n * @returns {GetDynamicViewContext<T>} The current context object.\n */\n public getContext(): GetDynamicViewContext<T> {\n return this.options.context ?? {};\n }\n\n /**\n * Retrieves the view reference (`ViewRef`) associated with the dynamically created template's embedded view.\n *\n * @returns {ViewRef | null} The view reference, or null if the template has not been instantiated or has been destroyed.\n */\n public getView(): ViewRef | null {\n return this.embeddedViewRef;\n }\n\n private create({ context, template, host }: DynamicTemplateOptions<T>) {\n if (isViewContainer(host)) {\n this.embeddedViewRef = host.createEmbeddedView(template, context, { injector: this.options.injector });\n } else {\n this.embeddedViewRef = template.createEmbeddedView(context ?? {}, this.options.injector);\n this.application.attachView(this.embeddedViewRef);\n }\n }\n}\n","import { DynamicContent, DynamicViewRef } from '../facade';\nimport { DynamicComponentRef, DynamicTemplateRef } from '../models';\n\n/**\n * Type guard function to check if a given value is a reference to a dynamically created view.\n * This helps in distinguishing between dynamic view references (`DynamicComponentRef` or `DynamicTemplateRef`)\n * and other types of values, facilitating type-safe operations on dynamic views.\n *\n * @param {unknown} value - The value to check.\n * @returns {value is DynamicViewRef<DynamicContent>} `true` if the value is an instance of `DynamicComponentRef`\n * or `DynamicTemplateRef`, indicating it is a dynamic view reference; otherwise, `false`.\n *\n * @example\n * ```ts\n * // Given a value that could be a dynamic view reference or something else\n * const value: unknown = getSomeValue();\n *\n * if (isDynamicView(value)) {\n * // TypeScript now knows `value` is a dynamic view reference, so you can access its methods safely\n * value.detectChanges();\n * } else {\n * console.log('Value is not a dynamic view reference');\n * }\n * ```\n */\nexport function isDynamicView(value: unknown): value is DynamicViewRef<DynamicContent> {\n return value instanceof DynamicComponentRef || value instanceof DynamicTemplateRef;\n}\n","import { InjectionToken, TemplateRef } from '@angular/core';\n\nexport interface DynamicViewContextWithImplicitTemplate<T = unknown> {\n $implicit: TemplateRef<T>;\n}\n\n/**\n * @internal\n * Injection token for the dynamic view context.\n */\nexport const DYNAMIC_VIEW_CONTEXT = new InjectionToken('@odx/angular/cdk/dynamic-view::DynamicViewContext');\n","import { DOCUMENT } from '@angular/common';\nimport { inject, InjectionToken } from '@angular/core';\n\n/**\n * @internal\n * Injection token for the default host element for dynamic views.\n */\nexport const ODX_DYNAMIC_VIEW_DEFAULT_HOST = new InjectionToken<Element>('@odx/angular/cdk/dynamic-view::DynamicViewDefaultHost', {\n providedIn: 'root',\n factory: () => inject(DOCUMENT).body,\n});\n\n/**\n * @internal\n * Retrieves the default host for dynamic views.\n *\n * @returns {Element} The default host element for dynamic views.\n */\nexport function getDynamicViewDefaultHost(): Element {\n return inject(ODX_DYNAMIC_VIEW_DEFAULT_HOST);\n}\n","import { inject, Injectable, Injector } from '@angular/core';\nimport { isComponent, isTemplateRef } from '@odx/angular/utils';\nimport { DynamicViewComponent } from './dynamic-view.component';\nimport { DynamicContent, DynamicViewRef } from './facade';\nimport { isDynamicTextContent } from './helpers';\nimport { DynamicComponentRef, DynamicViewOptions } from './models';\nimport { DynamicTemplateRef } from './models/dynamic-template-ref';\nimport { DYNAMIC_VIEW_CONTEXT, getDynamicViewDefaultHost } from './tokens';\n\n/**\n * A service for creating and managing dynamic views in an Angular application.\n * It supports rendering Angular components, templates, and text content dynamically,\n * allowing for flexible and dynamic content composition.\n */\n@Injectable({ providedIn: 'root' })\nexport class DynamicViewService {\n private readonly injector = inject(Injector);\n private readonly defaultHost = getDynamicViewDefaultHost();\n\n /**\n * Creates and returns a reference to a dynamic view based on the provided content and options.\n * The method supports dynamic creation of components, template references, and text content,\n * providing a unified API for dynamic content rendering.\n *\n * @template T - The type of the content to be dynamically rendered.\n * @param {T} content - The content to be rendered dynamically. This can be a component class,\n * a template reference, or text content.\n * @param {Partial<DynamicViewOptions<T>>} [options={}] - Optional configuration for the dynamic view creation,\n * including a custom injector, context, host element, and additional providers for the dynamic component's injector.\n * @returns {DynamicViewRef<T>} A reference to the dynamically created view, encapsulating the rendered content\n * and providing methods for interaction and management.\n * @throws {Error} Throws an error if the content type is not supported.\n * @example\n * ```ts\n * // Create a dynamic view for a component\n * const componentRef = dynamicViewService.createView(MyComponent, { context: { ... } });\n *\n * // Create a dynamic view for a template reference\n * const templateRef = dynamicViewService.createView(myTemplate, { context: { ... } });\n *\n * // Create a dynamic view for text content\n * const textRef = dynamicViewService.createView('Dynamic text content', {});\n * ```\n */\n public createView<T extends DynamicContent>(content: T, options: Partial<DynamicViewOptions<T>> = {}): DynamicViewRef<T> {\n const viewOptions: DynamicViewOptions<T> = {\n ...options,\n host: options.host ?? this.defaultHost,\n injector: Injector.create({\n providers: [{ provide: DYNAMIC_VIEW_CONTEXT, useValue: options.context }, options.providers ?? []],\n parent: options.injector ?? this.injector,\n }),\n };\n if (isTemplateRef(content)) {\n return new DynamicTemplateRef({ ...viewOptions, template: content });\n }\n if (isComponent(content)) {\n return new DynamicComponentRef({ ...viewOptions, context: options.context, component: content });\n }\n if (isDynamicTextContent(content)) {\n return new DynamicComponentRef({\n ...viewOptions,\n component: DynamicViewComponent,\n context: { content },\n }) as never;\n }\n throw new Error('Content type is not supported');\n }\n}\n","import { Directive, EmbeddedViewRef, inject, Injector, Input, OnChanges, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { hasChanged, isComponent, NgChanges } from '@odx/angular/utils';\nimport { DynamicViewService } from './dynamic-view.service';\nimport { DynamicContent, DynamicViewRef, GetDynamicViewContext } from './facade';\nimport { createProjectableNodes, isDynamicTextContent, isDynamicView } from './helpers';\n\n/**\n * A directive that dynamically renders content based on the provided input. It supports rendering\n * Angular components, templates, and text content, allowing for dynamic and flexible content\n * management within Angular applications.\n *\n * @template T - A type parameter that extends `DynamicContent<unknown>`, representing the type of content to be dynamically rendered.\n */\n@Directive({\n selector: 'ng-template[odxDynamicView]',\n standalone: true,\n})\nexport class DynamicViewDirective<T extends DynamicContent<unknown> = DynamicContent<unknown>> implements OnDestroy, OnInit, OnChanges {\n private readonly dynamicViewService = inject(DynamicViewService);\n private readonly viewContainer = inject(ViewContainerRef);\n private readonly template = inject(TemplateRef);\n private viewRef: DynamicViewRef<T> | null = null;\n private contentViewRef: DynamicViewRef<TemplateRef<unknown>> | null = null;\n\n /**\n * The content to be dynamically rendered. This can be a component, template reference, or text content.\n * The content is wrapped in a `DynamicViewRef`, providing additional control over the dynamically rendered view.\n *\n * @type {T | DynamicViewRef<T> | null}\n * @default null\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxDynamicView')\n public content?: T | DynamicViewRef<T> | null = null;\n\n /**\n * An optional injector to be used for dynamically created components.\n * This allows for custom dependency injection\n * into dynamically rendered components.\n *\n * @type {Injector | undefined}\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxDynamicViewInjector')\n public injector?: Injector;\n\n /**\n * An optional context providing function for dynamically created views. This function returns the context\n * object to be passed to the dynamically rendered content, allowing for dynamic interaction with the content.\n *\n * @type {GetDynamicViewContext<T> | undefined}\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxDynamicViewContext')\n public context?: GetDynamicViewContext<T>;\n\n public ngOnInit(): void {\n this.render();\n }\n\n public ngOnChanges(changes: NgChanges<DynamicViewDirective<DynamicContent>>): void {\n if (hasChanged(changes, 'injector')) {\n this.render();\n }\n if (hasChanged(changes, 'content')) {\n const hasChangedTextContent = isDynamicTextContent(changes.content?.previousValue) && isDynamicTextContent(changes.content?.currentValue);\n this.render(!hasChangedTextContent);\n }\n if (hasChanged(changes, 'context')) {\n this.viewRef?.update(changes.context?.currentValue ?? {});\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy();\n }\n\n /**\n * Retrieves the current `DynamicViewRef` associated with the rendered content, providing access\n * to the view reference for additional operations like updating context or manual destruction.\n *\n * @returns {DynamicViewRef<T> | null} The current view reference for the dynamically rendered content, if available.\n */\n public getView(): DynamicViewRef<T> | null {\n return this.viewRef;\n }\n\n private render(reRender = true) {\n if (!this.content) {\n this.destroy();\n return;\n }\n if (!reRender && this.viewRef) {\n this.viewRef?.update({ content: this.content } as object);\n return;\n }\n this.viewRef?.destroy();\n if (isDynamicView(this.content)) {\n this.viewRef = this.content;\n const hostView = this.viewRef.getView();\n if (hostView) {\n this.viewContainer.insert(hostView);\n }\n } else {\n let projectableNodes: Node[][] = [];\n if (isComponent(this.content)) {\n this.contentViewRef = this.dynamicViewService.createView(this.template, { injector: this.injector });\n const rootNodes = (this.contentViewRef.getView() as EmbeddedViewRef<unknown>).rootNodes;\n projectableNodes = createProjectableNodes(this.content, rootNodes);\n }\n this.viewRef = this.dynamicViewService.createView(this.content, {\n context: this.context ?? undefined,\n injector: this.injector ?? this.viewContainer.injector,\n projectableNodes,\n host: this.viewContainer,\n });\n }\n }\n\n private destroy() {\n this.contentViewRef?.destroy();\n this.viewRef?.destroy();\n this.contentViewRef = null;\n this.viewRef = null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAYa,oBAAoB,CAAA;AAPjC,IAAA,WAAA,GAAA;QAQmB,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;QACnC,IAAmB,CAAA,mBAAA,GAAwB,IAAI,CAAC;AAsBzD,KAAA;IApBC,IACW,OAAO,CAAC,KAAyB,EAAA;AAC1C,QAAA,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE;YACvB,IAAI,CAAC,WAAW,EAAE,CAAC;AACnB,YAAA,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,KAAI;AACrF,gBAAA,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AAC9B,aAAC,CAAC,CAAC;SACJ;aAAM;AACL,YAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;SACxB;KACF;IAEM,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,CAAC;AACxC,QAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;KACjC;AAEO,IAAA,UAAU,CAAC,KAAa,EAAA;QAC9B,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,GAAG,KAAK,CAAC;KAC9C;+GAvBU,oBAAoB,EAAA,IAAA,EAAA,EA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;KACrB;+GA3GU,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,6BAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,EAAA,SAAA,CAAA,EAAA,QAAA,EAAA,CAAA,wBAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,uBAAA,EAAA,SAAA,CAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;8BAiBQ,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,gBAAgB,CAAA;gBAYhB,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,wBAAwB,CAAA;gBAWxB,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,uBAAuB,CAAA;;;ACrDhC;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-cdk-dynamic-view.mjs","sources":["../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.component.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/create-projectable-nodes.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/is-dynamic-text-content.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/models/dynamic-component-ref.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/models/dynamic-template-ref.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/helpers/is-dynamic-view.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/tokens/dynamic-view-context.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/tokens/dynamic-view-default-host.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.service.ts","../../../../libs/angular/cdk/dynamic-view/src/lib/dynamic-view.directive.ts","../../../../libs/angular/cdk/dynamic-view/src/odx-angular-cdk-dynamic-view.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnDestroy, ViewEncapsulation } from '@angular/core';\nimport { injectElement } from '@odx/angular/utils';\nimport { distinctUntilChanged, isObservable, Subscription } from 'rxjs';\nimport { DynamicTextContent } from './facade';\n\n@Component({\n selector: 'odx-dynamic-view',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n})\nexport class DynamicViewComponent implements OnDestroy {\n private readonly element = injectElement();\n private currentSubscription: Subscription | null = null;\n\n @Input()\n public set content(value: DynamicTextContent) {\n if (isObservable(value)) {\n this.ngOnDestroy();\n this.currentSubscription = value.pipe(distinctUntilChanged()).subscribe((innerValue) => {\n this.setContent(innerValue);\n });\n } else {\n this.setContent(value);\n }\n }\n\n public ngOnDestroy(): void {\n this.currentSubscription?.unsubscribe();\n this.currentSubscription = null;\n }\n\n private setContent(value: string): void {\n this.element.nativeElement.innerHTML = value;\n }\n}\n","import { reflectComponentType, Type } from '@angular/core';\n\n/**\n * Prepares an array of node arrays suitable for projection into the `<ng-content>` slots\n * of a dynamically created Angular component based on its content selectors.\n *\n * The function inspects the component's content selectors and aligns the provided nodes\n * for projection according to these selectors. A selector of '*' indicates that the nodes\n * should be projected into this slot. If a content selector does not match '*', an empty\n * array is returned for that slot, indicating no nodes are projected into it.\n *\n * @param {Type<unknown>} component - The component class for which the projectable nodes are being prepared.\n * @param {Node[]} nodes - The nodes intended for projection into the component's `<ng-content>` slots.\n * @returns {Node[][]} An array of node arrays, each corresponding to a `<ng-content>` slot in the component.\n * Each sub-array contains nodes to be projected into the respective `<ng-content>` slot, based on the component's content selectors.\n *\n * @example\n * ```ts\n * // Given a component with two `<ng-content>` slots, the first without a selector and the second with the selector `<ng-content select=\".selector-class\">`,\n * const nodes = [document.createTextNode('Hello'), document.createElement('div')];\n * const projectableNodes = createProjectableNodes(MyComponent, nodes);\n * // projectableNodes would be `[[TextNode, DivElement], []]` for a component with selectors ['*', '.selector-class']\n * ```\n */\nexport function createProjectableNodes(component: Type<unknown>, nodes: Node[]): Node[][] {\n const componentType = reflectComponentType(component);\n if (componentType && componentType.ngContentSelectors.length > 0) {\n return componentType.ngContentSelectors.map((selector) => (selector === '*' ? nodes : []));\n }\n return [];\n}\n","import { isString } from '@odx/angular/utils';\nimport { isObservable } from 'rxjs';\nimport { DynamicTextContent } from '../facade';\n\n/**\n * Type guard function to check if a given value is considered dynamic text content.\n * Dynamic text content can either be a plain string or an Observable. This function\n * facilitates type-safe handling of dynamic text content by checking the type of the value.\n *\n * @param {unknown} value - The value to be checked.\n * @returns {value is DynamicTextContent} Returns `true` if the value is a string or an Observable,\n * indicating it can be used as dynamic text content; otherwise, returns `false`.\n *\n * @example\n * ```ts\n * // Example usage of the isDynamicTextContent function\n * const textValue: unknown = getTextValue(); // This function may return either string or Observable\n *\n * if (isDynamicTextContent(textValue)) {\n * // The type of textValue is now narrowed to DynamicTextContent (string | Observable)\n * console.log('The value can be used as dynamic text content.');\n * } else {\n * console.log('The value is not suitable as dynamic text content.');\n * }\n * ```\n */\nexport function isDynamicTextContent(value: unknown): value is DynamicTextContent {\n return isString(value) || isObservable(value);\n}\n","import { ApplicationRef, ComponentRef, createComponent, EnvironmentInjector, reflectComponentType, Type, ViewRef } from '@angular/core';\nimport { deepmerge } from '@odx/angular/internal';\nimport { isViewContainer } from '@odx/angular/utils';\nimport { GetDynamicViewContext } from '../facade';\nimport { DynamicViewRef } from '../facade/dynamic-view-ref';\nimport { DynamicViewOptions } from './dynamic-view-options';\n\nexport interface DynamicComponentOptions<T extends Type<unknown>> extends DynamicViewOptions<T> {\n component: T;\n}\n\n/**\n * The DynamicComponentRef class is a powerful utility for dynamically creating and managing\n * Angular components at runtime. It encapsulates the logic for component creation, input handling,\n * and lifecycle management, making it easier to work with dynamic components in complex applications.\n *\n * A reference to a dynamically created component, providing methods to manage its lifecycle,\n * detect changes, and update its inputs based on a context.\n *\n * @template T - The type of the component being managed.\n * @template C - The type of the context used to update the component's inputs.\n */\nexport class DynamicComponentRef<T extends Type<unknown>, C extends GetDynamicViewContext<T>> implements DynamicViewRef<T> {\n private readonly application = this.options.injector.get(ApplicationRef);\n private componentRef: ComponentRef<T> | null = null;\n private componentInputs: Record<string, true> | null = null;\n\n constructor(private readonly options: DynamicComponentOptions<T>) {\n const { component, context, injector, projectableNodes, host } = options;\n\n this.componentRef = createComponent(component as Type<T>, {\n environmentInjector: injector.get(EnvironmentInjector),\n elementInjector: injector,\n projectableNodes,\n });\n this.componentInputs =\n reflectComponentType(this.componentRef.componentType)?.inputs.reduce(\n (acc, { propName }) => {\n acc[propName] = true;\n return acc;\n },\n {} as Record<string, true>,\n ) ?? null;\n\n if (isViewContainer(host)) {\n host.insert(this.componentRef.hostView);\n } else {\n this.application.attachView(this.componentRef.hostView);\n if (host) {\n host.appendChild(this.getElement());\n }\n }\n if (context) {\n this.update(context as C);\n }\n }\n\n /**\n * Triggers change detection for the dynamically created component, ensuring that any updates to inputs\n * or internal state are reflected in the view.\n */\n public detectChanges(): void {\n this.componentRef?.changeDetectorRef.detectChanges();\n }\n\n /**\n * Destroys the dynamically created component, cleaning up resources and detaching it from the application view.\n */\n public destroy(): void {\n if (this.componentRef?.hostView.destroyed) {\n this.componentRef = null;\n return;\n }\n if (this.componentRef && !isViewContainer(this.options.host)) {\n this.application.detachView(this.componentRef.hostView);\n }\n this.componentRef?.destroy();\n this.componentRef = null;\n this.componentInputs = null;\n }\n\n /**\n * Retrieves the native element associated with the dynamically created component's host view.\n *\n * @returns {Element} The native DOM element of the component.\n */\n public getElement(): Element {\n return this.componentRef?.location.nativeElement ?? null;\n }\n\n /**\n * Updates the component's inputs based on the provided context. Merges the new context with the existing\n * context and applies the combined context as inputs to the component.\n *\n * @param {C} context - The context containing new values for the component's inputs.\n */\n public update(context: C): void {\n this.options.context = deepmerge({}, this.options.context, context) as C;\n if (!this.componentRef) return;\n for (const key in this.options.context) {\n if (this.componentInputs?.[key]) {\n this.componentRef.setInput(key, this.options.context[key]);\n }\n }\n }\n\n /**\n * Retrieves the current context used for the component's inputs.\n *\n * @returns {GetDynamicViewContext<T>} The current context object.\n */\n public getContext(): GetDynamicViewContext<T> {\n return this.options.context ?? {};\n }\n\n /**\n * Retrieves the view reference associated with the dynamically created component.\n *\n * @returns {ViewRef | null} The view reference, or null if the component has not been created or has been destroyed.\n */\n public getView(): ViewRef | null {\n return this.componentRef?.hostView ?? null;\n }\n}\n","import { ApplicationRef, EmbeddedViewRef, TemplateRef as NgTemplateRef, ViewRef } from '@angular/core';\nimport { deepmerge } from '@odx/angular/internal';\nimport { isViewContainer } from '@odx/angular/utils';\nimport { DynamicViewRef, GetDynamicViewContext } from '../facade';\nimport { DynamicViewOptions } from './dynamic-view-options';\n\nexport interface DynamicTemplateOptions<T extends NgTemplateRef<unknown>> extends DynamicViewOptions<T> {\n template: T;\n}\n\n/**\n * A reference to a dynamically created template, offering methods to manage its lifecycle,\n * detect changes, and update its context. It encapsulates the logic for creating and manipulating\n * an `EmbeddedViewRef` from a given `TemplateRef`.\n *\n * @template T - The type of the `NgTemplateRef` being managed.\n */\nexport class DynamicTemplateRef<T extends NgTemplateRef<unknown> = NgTemplateRef<unknown>> implements DynamicViewRef<T> {\n private readonly application = this.options.injector.get(ApplicationRef);\n private embeddedViewRef: EmbeddedViewRef<unknown> | null = null;\n\n constructor(private readonly options: DynamicTemplateOptions<T>) {\n this.create(options);\n }\n\n /**\n * Triggers change detection on the embedded view created from the template, ensuring that any updates\n * to the context or internal state are reflected in the view.\n */\n public detectChanges(): void {\n this.embeddedViewRef?.detectChanges();\n }\n\n /**\n * Destroys the embedded view associated with the template, cleaning up resources and detaching it from the\n * application view if necessary.\n */\n public destroy(): void {\n if (this.embeddedViewRef?.destroyed) {\n this.embeddedViewRef = null;\n return;\n }\n if (!isViewContainer(this.options.host) && this.embeddedViewRef) {\n this.application.detachView(this.embeddedViewRef);\n }\n this.embeddedViewRef?.destroy();\n this.embeddedViewRef = null;\n }\n\n /**\n * Retrieves the native element associated with the template's embedded view's root node.\n *\n * @returns {Element} The native DOM element of the embedded view's root node, if available.\n */\n public getElement(): Element {\n return this.embeddedViewRef?.rootNodes?.[0] ?? null;\n }\n\n /**\n * Updates the context of the embedded view based on the provided context object. Merges the new context\n * with the existing one and applies the combined context to the embedded view.\n *\n * @param {GetDynamicViewContext<T>} context - The context containing new values for the template's view.\n */\n public update(context: GetDynamicViewContext<T>): void {\n this.options.context = deepmerge({}, this.options.context, context) as GetDynamicViewContext<T>;\n if (this.embeddedViewRef) {\n this.embeddedViewRef.context = this.options.context;\n this.detectChanges();\n }\n }\n\n /**\n * Retrieves the current context used for the template's view.\n *\n * @returns {GetDynamicViewContext<T>} The current context object.\n */\n public getContext(): GetDynamicViewContext<T> {\n return this.options.context ?? {};\n }\n\n /**\n * Retrieves the view reference (`ViewRef`) associated with the dynamically created template's embedded view.\n *\n * @returns {ViewRef | null} The view reference, or null if the template has not been instantiated or has been destroyed.\n */\n public getView(): ViewRef | null {\n return this.embeddedViewRef;\n }\n\n private create({ context, template, host }: DynamicTemplateOptions<T>) {\n if (isViewContainer(host)) {\n this.embeddedViewRef = host.createEmbeddedView(template, context, { injector: this.options.injector });\n } else {\n this.embeddedViewRef = template.createEmbeddedView(context ?? {}, this.options.injector);\n this.application.attachView(this.embeddedViewRef);\n }\n }\n}\n","import { DynamicContent, DynamicViewRef } from '../facade';\nimport { DynamicComponentRef, DynamicTemplateRef } from '../models';\n\n/**\n * Type guard function to check if a given value is a reference to a dynamically created view.\n * This helps in distinguishing between dynamic view references (`DynamicComponentRef` or `DynamicTemplateRef`)\n * and other types of values, facilitating type-safe operations on dynamic views.\n *\n * @param {unknown} value - The value to check.\n * @returns {value is DynamicViewRef<DynamicContent>} `true` if the value is an instance of `DynamicComponentRef`\n * or `DynamicTemplateRef`, indicating it is a dynamic view reference; otherwise, `false`.\n *\n * @example\n * ```ts\n * // Given a value that could be a dynamic view reference or something else\n * const value: unknown = getSomeValue();\n *\n * if (isDynamicView(value)) {\n * // TypeScript now knows `value` is a dynamic view reference, so you can access its methods safely\n * value.detectChanges();\n * } else {\n * console.log('Value is not a dynamic view reference');\n * }\n * ```\n */\nexport function isDynamicView(value: unknown): value is DynamicViewRef<DynamicContent> {\n return value instanceof DynamicComponentRef || value instanceof DynamicTemplateRef;\n}\n","import { InjectionToken, TemplateRef } from '@angular/core';\n\nexport interface DynamicViewContextWithImplicitTemplate<T = unknown> {\n $implicit: TemplateRef<T>;\n}\n\n/**\n * @internal\n * Injection token for the dynamic view context.\n */\nexport const DYNAMIC_VIEW_CONTEXT = new InjectionToken('@odx/angular/cdk/dynamic-view::DynamicViewContext');\n","import { DOCUMENT } from '@angular/common';\nimport { inject, InjectionToken } from '@angular/core';\n\n/**\n * @internal\n * Injection token for the default host element for dynamic views.\n */\nexport const ODX_DYNAMIC_VIEW_DEFAULT_HOST = new InjectionToken<Element>('@odx/angular/cdk/dynamic-view::DynamicViewDefaultHost', {\n providedIn: 'root',\n factory: () => inject(DOCUMENT).body,\n});\n\n/**\n * @internal\n * Retrieves the default host for dynamic views.\n *\n * @returns {Element} The default host element for dynamic views.\n */\nexport function getDynamicViewDefaultHost(): Element {\n return inject(ODX_DYNAMIC_VIEW_DEFAULT_HOST);\n}\n","import { inject, Injectable, Injector } from '@angular/core';\nimport { isComponent, isTemplateRef } from '@odx/angular/utils';\nimport { DynamicViewComponent } from './dynamic-view.component';\nimport { DynamicContent, DynamicViewRef } from './facade';\nimport { isDynamicTextContent } from './helpers';\nimport { DynamicComponentRef, DynamicViewOptions } from './models';\nimport { DynamicTemplateRef } from './models/dynamic-template-ref';\nimport { DYNAMIC_VIEW_CONTEXT, getDynamicViewDefaultHost } from './tokens';\n\n/**\n * A service for creating and managing dynamic views in an Angular application.\n * It supports rendering Angular components, templates, and text content dynamically,\n * allowing for flexible and dynamic content composition.\n */\n@Injectable({ providedIn: 'root' })\nexport class DynamicViewService {\n private readonly injector = inject(Injector);\n private readonly defaultHost = getDynamicViewDefaultHost();\n\n /**\n * Creates and returns a reference to a dynamic view based on the provided content and options.\n * The method supports dynamic creation of components, template references, and text content,\n * providing a unified API for dynamic content rendering.\n *\n * @template T - The type of the content to be dynamically rendered.\n * @param {T} content - The content to be rendered dynamically. This can be a component class,\n * a template reference, or text content.\n * @param {Partial<DynamicViewOptions<T>>} [options={}] - Optional configuration for the dynamic view creation,\n * including a custom injector, context, host element, and additional providers for the dynamic component's injector.\n * @returns {DynamicViewRef<T>} A reference to the dynamically created view, encapsulating the rendered content\n * and providing methods for interaction and management.\n * @throws {Error} Throws an error if the content type is not supported.\n * @example\n * ```ts\n * // Create a dynamic view for a component\n * const componentRef = dynamicViewService.createView(MyComponent, { context: { ... } });\n *\n * // Create a dynamic view for a template reference\n * const templateRef = dynamicViewService.createView(myTemplate, { context: { ... } });\n *\n * // Create a dynamic view for text content\n * const textRef = dynamicViewService.createView('Dynamic text content', {});\n * ```\n */\n public createView<T extends DynamicContent>(content: T, options: Partial<DynamicViewOptions<T>> = {}): DynamicViewRef<T> {\n const viewOptions: DynamicViewOptions<T> = {\n ...options,\n host: options.host ?? this.defaultHost,\n injector: Injector.create({\n providers: [{ provide: DYNAMIC_VIEW_CONTEXT, useValue: options.context }, options.providers ?? []],\n parent: options.injector ?? this.injector,\n }),\n };\n if (isTemplateRef(content)) {\n return new DynamicTemplateRef({ ...viewOptions, template: content });\n }\n if (isComponent(content)) {\n return new DynamicComponentRef({ ...viewOptions, context: options.context, component: content });\n }\n if (isDynamicTextContent(content)) {\n return new DynamicComponentRef({\n ...viewOptions,\n component: DynamicViewComponent,\n context: { content },\n }) as never;\n }\n throw new Error('Content type is not supported');\n }\n}\n","import { Directive, EmbeddedViewRef, inject, Injector, Input, OnChanges, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { hasChanged, isComponent, NgChanges } from '@odx/angular/utils';\nimport { DynamicViewService } from './dynamic-view.service';\nimport { DynamicContent, DynamicViewRef, GetDynamicViewContext } from './facade';\nimport { createProjectableNodes, isDynamicTextContent, isDynamicView } from './helpers';\n\n/**\n * A directive that dynamically renders content based on the provided input. It supports rendering\n * Angular components, templates, and text content, allowing for dynamic and flexible content\n * management within Angular applications.\n *\n * @template T - A type parameter that extends `DynamicContent<unknown>`, representing the type of content to be dynamically rendered.\n */\n@Directive({\n selector: 'ng-template[odxDynamicView]',\n standalone: true,\n})\nexport class DynamicViewDirective<T extends DynamicContent<unknown> = DynamicContent<unknown>> implements OnDestroy, OnInit, OnChanges {\n private readonly dynamicViewService = inject(DynamicViewService);\n private readonly viewContainer = inject(ViewContainerRef);\n private readonly template = inject(TemplateRef);\n private viewRef: DynamicViewRef<T> | null = null;\n private contentViewRef: DynamicViewRef<TemplateRef<unknown>> | null = null;\n\n /**\n * The content to be dynamically rendered. This can be a component, template reference, or text content.\n * The content is wrapped in a `DynamicViewRef`, providing additional control over the dynamically rendered view.\n *\n * @type {T | DynamicViewRef<T> | null}\n * @default null\n */\n @Input('odxDynamicView')\n public content?: T | DynamicViewRef<T> | null = null;\n\n /**\n * An optional injector to be used for dynamically created components.\n * This allows for custom dependency injection\n * into dynamically rendered components.\n *\n * @type {Injector | undefined}\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxDynamicViewInjector')\n public injector?: Injector;\n\n /**\n * An optional context providing function for dynamically created views. This function returns the context\n * object to be passed to the dynamically rendered content, allowing for dynamic interaction with the content.\n *\n * @type {GetDynamicViewContext<T> | undefined}\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxDynamicViewContext')\n public context?: GetDynamicViewContext<T>;\n\n public ngOnInit(): void {\n this.render();\n }\n\n public ngOnChanges(changes: NgChanges<DynamicViewDirective<DynamicContent>>): void {\n if (hasChanged(changes, 'injector')) {\n this.render();\n }\n if (hasChanged(changes, 'content')) {\n const hasChangedTextContent = isDynamicTextContent(changes.content?.previousValue) && isDynamicTextContent(changes.content?.currentValue);\n this.render(!hasChangedTextContent);\n }\n if (hasChanged(changes, 'context')) {\n this.viewRef?.update(changes.context?.currentValue ?? {});\n }\n }\n\n public ngOnDestroy(): void {\n this.destroy();\n }\n\n /**\n * Retrieves the current `DynamicViewRef` associated with the rendered content, providing access\n * to the view reference for additional operations like updating context or manual destruction.\n *\n * @returns {DynamicViewRef<T> | null} The current view reference for the dynamically rendered content, if available.\n */\n public getView(): DynamicViewRef<T> | null {\n return this.viewRef;\n }\n\n private render(reRender = true) {\n if (!this.content) {\n this.destroy();\n return;\n }\n if (!reRender && this.viewRef) {\n this.viewRef?.update({ content: this.content } as object);\n return;\n }\n this.viewRef?.destroy();\n if (isDynamicView(this.content)) {\n this.viewRef = this.content;\n const hostView = this.viewRef.getView();\n if (hostView) {\n this.viewContainer.insert(hostView);\n }\n } else {\n let projectableNodes: Node[][] = [];\n if (isComponent(this.content)) {\n this.contentViewRef = this.dynamicViewService.createView(this.template, { injector: this.injector });\n const rootNodes = (this.contentViewRef.getView() as EmbeddedViewRef<unknown>).rootNodes;\n projectableNodes = createProjectableNodes(this.content, rootNodes);\n }\n this.viewRef = this.dynamicViewService.createView(this.content, {\n context: this.context ?? undefined,\n injector: this.injector ?? this.viewContainer.injector,\n projectableNodes,\n host: this.viewContainer,\n });\n }\n }\n\n private destroy() {\n this.contentViewRef?.destroy();\n this.viewRef?.destroy();\n this.contentViewRef = null;\n this.viewRef = null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAYa,oBAAoB,CAAA;AAPjC,IAAA,WAAA,GAAA;QAQmB,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;QACnC,IAAmB,CAAA,mBAAA,GAAwB,IAAI,CAAC;AAsBzD,KAAA;IApBC,IACW,OAAO,CAAC,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AACjB,iBAAA,CAAA;8BAgBQ,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,gBAAgB,CAAA;gBAYhB,QAAQ,EAAA,CAAA;sBADd,KAAK;uBAAC,wBAAwB,CAAA;gBAWxB,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,uBAAuB,CAAA;;;ACpDhC;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-components-modal.mjs","sources":["../../../../libs/angular/components/modal/src/lib/models/modal-hero-variant.ts","../../../../libs/angular/components/modal/src/lib/models/modal-ref.ts","../../../../libs/angular/components/modal/src/lib/models/modal-size.ts","../../../../libs/angular/components/modal/src/lib/models/modal-variant.ts","../../../../libs/angular/components/modal/src/lib/helpers/inject-modal-ref.ts","../../../../libs/angular/components/modal/src/lib/helpers/provide-modal-ref.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-close.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-content.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-dismiss.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/prevent-form-method-dialog.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/prevent-method-dialog.directive.ts","../../../../libs/angular/components/modal/src/lib/components/modal-footer/modal-footer.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-footer/modal-footer.component.html","../../../../libs/angular/components/modal/src/lib/components/modal-header/modal-header.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-header/modal-header.component.html","../../../../libs/angular/components/modal/src/lib/components/modal-hero/modal-hero.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-hero/modal-hero.component.html","../../../../libs/angular/components/modal/src/lib/components/basic-modal/basic-modal.component.ts","../../../../libs/angular/components/modal/src/lib/components/basic-modal/basic-modal.component.html","../../../../libs/angular/components/modal/src/lib/modal.component.ts","../../../../libs/angular/components/modal/src/lib/modal.component.html","../../../../libs/angular/components/modal/src/lib/modal.config.ts","../../../../libs/angular/components/modal/src/lib/modal.service.ts","../../../../libs/angular/components/modal/src/lib/modal.directive.ts","../../../../libs/angular/components/modal/src/lib/modal.module.ts","../../../../libs/angular/components/modal/src/odx-angular-components-modal.ts"],"sourcesContent":["export type ModalHeroVariant = (typeof ModalHeroVariant)[keyof typeof ModalHeroVariant];\n\nexport const ModalHeroVariant = {\n PRIMARY: 'primary',\n SUCCESS: 'success',\n CONFIRMATION: 'confirmation',\n DANGER: 'danger',\n} as const;\n","import { Controller } from '@odx/angular';\nimport { deepmerge } from '@odx/angular/internal';\nimport { share, Subject } from 'rxjs';\nimport { ModalOptions } from './modal-options';\n\n/**\n * A reference to a dynamically created modal, providing methods to manipulate, close, or update the modal's state\n * and options.\n * This class extends the `Controller` base class from `@odx/angular`, adding modal-specific functionalities like\n * handling closures and dismissals.\n *\n * @template Data - The type of data passed to the modal.\n * @template Result - The type of the result emitted when the modal is closed.\n *\n * @see {Controller}\n */\nexport class ModalRef<Data = unknown, Result = unknown> extends Controller {\n private readonly onClose$$ = new Subject<Result>();\n private readonly onDismiss$$ = new Subject<void>();\n\n /** An observable that emits when the modal is closed with a result. */\n public readonly onClose$ = this.onClose$$.pipe(share({ resetOnRefCountZero: true }));\n\n /** An observable that emits when the modal is dismissed without a result. */\n public readonly onDismiss$ = this.onDismiss$$.pipe(share({ resetOnRefCountZero: true }));\n\n /** An observable that merges the onClose$ and onDismiss$ streams for cases when any kind of teardown is needed. */\n public readonly onDestroy$ = deepmerge(this.onClose$, this.onDismiss$);\n\n /** A method that returns whether the modal is currently active. */\n public readonly isActive: () => boolean;\n\n /** Gets the unique identifier for the modal instance.\n *\n * @returns {string} The unique identifier for the modal instance.\n */\n public get id(): string {\n return this.options.id;\n }\n\n /** Gets the ARIA label ID for the modal title, based on the modal's ID.\n *\n * @returns {string} The ARIA label ID for the modal title.\n */\n public get modalTitleId(): string {\n return `${this.options.id}-title`;\n }\n\n /** Gets the data passed to the modal. This is useful for modal initialization.\n *\n * @returns {Data} The data passed to the modal.\n */\n public get data(): Data {\n return this.internalOptions.data;\n }\n\n /** Gets the current options for the modal. These options include configurations.\n *\n * @template Data - The type of data passed to the modal.\n * @returns {ModalOptions<Data>} The current options for the modal.\n */\n public get options(): ModalOptions<Data> {\n return this.internalOptions;\n }\n\n constructor(\n private internalOptions: ModalOptions<Data>,\n isActive: (modalRef: ModalRef<Data, Result>) => boolean,\n ) {\n super();\n this.isActive = () => isActive(this);\n }\n\n /**\n * Updates the modal's options.\n *\n * @param {Partial<ModalOptions<Data>>} options A partial set of options to update.\n */\n public update(options: Partial<ModalOptions<Data>>): void {\n this.internalOptions = deepmerge(this.internalOptions, options) as ModalOptions<Data>;\n this.triggerControllerChange();\n }\n\n /**\n * Dismisses the modal. This does not result in an output value.\n *\n * @param {boolean} [force=false] Whether to force dismissal regardless of the `canDismiss` condition.\n */\n public dismiss(force = false): void {\n if (!force && !this.isActive()) return;\n if (this.options.canDismiss?.(this.data) === false) return;\n this.onDismiss$$.next();\n this.destroy();\n }\n\n /**\n * Closes the modal with a result.\n *\n * @param {Result} result The result to emit when the modal closes.\n */\n public close(result: Result): void {\n if (!this.isActive()) return;\n if (this.options.canClose?.(this.data) === false) return;\n this.onClose$$.next(result);\n this.destroy();\n }\n\n /** Completes the onClose and onDismiss streams and cleans up resources. */\n public destroy(): void {\n this.onClose$$.complete();\n this.onDismiss$$.complete();\n }\n}\n","export type ModalSize = (typeof ModalSize)[keyof typeof ModalSize];\n\nexport const ModalSize = {\n XSMALL: 'xsmall',\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n","export type ModalVariant = typeof ModalVariant[keyof typeof ModalVariant];\n\nexport const ModalVariant = {\n DEFAULT: 'default',\n SIDESHEET: 'sidesheet',\n} as const;\n","import { inject } from '@angular/core';\nimport { ModalRef } from '../models';\n\n/**\n * Utility function to inject a reference to a modal. This function simplifies the injection process by typing the `ModalRef` to the specific data and result expected by the consumer.\n *\n * This approach abstracts away Angular's inject function, providing direct access to the modal reference with the correct type. It is commonly used in components or services that interact with a modal dialog to manipulate its data, close it, or perform other related actions.\n *\n * @template Data The type of data passed to the modal.\n * @template Result The type of result expected when the modal closes.\n * @returns {ModalRef<Data, Result>} A strongly typed reference to the modal.\n *\n * @example\n * ```ts\n * // Injecting a modal reference in a component or service:\n * const modalRef = injectModalRef<SomeDataType, SomeResultType>();\n *\n * // Using the modal reference to close the modal and return a result:\n * modalRef.close(someResult);\n *\n * // Accessing the data provided to the modal:\n * const modalData = modalRef.data;\n * ```\n */\nexport function injectModalRef<Data, Result = unknown>(): ModalRef<Data, Result> {\n return inject(ModalRef<Data, Result>);\n}\n","import { ValueProvider } from '@angular/core';\nimport { ModalRef } from '../models';\n\n/**\n * Provides a configuration for the Angular dependency injection system to inject a specific instance of `ModalRef`.\n * This function is particularly useful when you want to configure a provider for a `ModalRef` within an Angular module or component.\n *\n * @template D The data type expected by the modal.\n * @template R The result type that the modal will produce.\n * @param {ModalRef<D, R>} modalRef An instance of `ModalRef` to be provided.\n * @returns {ValueProvider} An Angular value provider that can be used in module or component providers arrays.\n */\nexport function provideModalRef<D = unknown, R = unknown>(modalRef: ModalRef<D, R>): ValueProvider {\n return { provide: ModalRef, useValue: modalRef };\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { injectModalRef } from '../helpers';\n\n/**\n * A directive that enables an element to close or dismiss a modal when clicked.\n * It can be used on any element within a modal to trigger the close or dismiss action, optionally passing a result back to the modal opener.\n *\n * The directive accepts an input value that determines the result to be passed back on modal close. If no value is provided, or it's explicitly set to `null`,\n * the modal is dismissed without sending a result. If the input value is `undefined`, the modal is dismissed via the `dismiss` method without passing any result.\n *\n * @template T - The type of the result to be emitted when the modal closes. Defaults to `unknown`.\n *\n * @example\n * Closing a modal and passing a result:\n * ```html\n * <button [odxModalClose]=\"myResult\">Close and send result</button>\n * ```\n *\n * Simply dismissing a modal without passing a result:\n * ```html\n * <button odxModalClose>Dismiss</button>\n * ```\n */\n@Directive({\n standalone: true,\n selector: '[odxModalClose]',\n})\nexport class ModalCloseDirective<T = unknown> {\n private readonly modalRef = injectModalRef();\n\n /**\n * Represents the result to be passed back to the modal opener when the modal is closed.\n * @template T - The type of the result returned.\n */\n @Input('odxModalClose')\n public result?: T | null = null;\n\n @HostListener('click')\n protected onClick(): void {\n const result = this.result === '' ? null : this.result;\n\n if (result === undefined) {\n this.modalRef.dismiss();\n } else {\n this.modalRef.close(result ?? null);\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents a directive for the content of a modal.\n */\n@CSSComponent('modal__content')\n@Directive({\n standalone: true,\n selector: 'odx-modal-content',\n})\nexport class ModalContentDirective {\n public readonly element = injectElement();\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectModalRef } from '../helpers';\n\n/**\n * A directive that enables an element to dismiss a modal when clicked. This can be applied\n * to any clickable element within a modal, such as buttons or links, to provide a declarative\n * approach to dismissing the modal.\n *\n * Utilizes `injectModalRef` to access the modal reference associated with the containing modal,\n * enabling the directive to call the `dismiss` method on the modal reference upon the click event.\n *\n * @example\n * Dismissing a modal using the odxModalDismiss directive on a button:\n * ```html\n * <button odxModalDismiss>Cancel</button>\n * ```\n *\n * This directive simplifies modal dismissal by removing the need for manually wiring click events\n * to dismiss methods in the component class, thereby enhancing template readability and maintainability.\n */\n@Directive({\n standalone: true,\n selector: '[odxModalDismiss]',\n})\nexport class ModalDismissDirective {\n private readonly modalRef = injectModalRef();\n\n @HostListener('click')\n protected onClick(): void {\n this.modalRef.dismiss();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\n\n/**\n * Directive that prevents the default form method behavior on submit buttons inside an HTML Dialog form.\n */\n@Directive({\n standalone: true,\n selector: '[formmethod=dialog]',\n})\nexport class PreventFormMethodDialogDirective {\n @HostListener('click', ['$event'])\n protected onClick(event: Event): void {\n event.preventDefault();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\n\n/**\n * Directive that prevents the default form submission behavior inside an HTML Dialog form.\n */\n@Directive({\n standalone: true,\n selector: 'form[method=dialog]',\n})\nexport class PreventMethodDialogDirective {\n @HostListener('submit', ['$event'])\n protected onFormSubmit(event: Event): void {\n event.preventDefault();\n }\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents the footer component of a modal.\n */\n@CSSComponent('modal__footer')\n@Component({\n standalone: true,\n selector: 'odx-modal-footer',\n templateUrl: './modal-footer.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalFooterComponent {\n public readonly element = injectElement();\n}\n","<ng-content />\n","import { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { AreaHeaderComponent, AreaHeaderSize } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { ModalDismissDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\n\n/**\n * Represents the header component of a modal.\n */\n@CSSComponent('modal__header')\n@Component({\n standalone: true,\n selector: 'odx-modal-header',\n templateUrl: './modal-header.component.html',\n imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalHeaderComponent implements AfterContentInit {\n protected readonly modalRef = injectModalRef();\n\n public readonly element = injectElement();\n\n /**\n * The area header component associated with the modal header.\n *\n * @type {AreaHeaderComponent | undefined}\n */\n @ContentChild(AreaHeaderComponent)\n public areaHeaderComponent?: AreaHeaderComponent;\n\n constructor() {\n detectControllerChanges(this.modalRef).subscribe();\n }\n\n public ngAfterContentInit(): void {\n if (this.areaHeaderComponent) {\n this.areaHeaderComponent.size = AreaHeaderSize.MEDIUM;\n }\n }\n}\n","<ng-content select=\"odx-area-header\" />\n@if (modalRef.options.dismissable) {\n <odx-action-group class=\"odx-modal__dismiss\">\n <button odxButton odxModalDismiss><odx-icon name=\"close\" iconSet=\"core\" /></button>\n </odx-action-group>\n}\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent, IconSet } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { ModalDismissDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\nimport { ModalHeroVariant } from '../../models';\n\n/**\n * Represents a modal hero component.\n */\n@CSSComponent('modal-hero')\n@Component({\n selector: 'odx-modal-hero',\n standalone: true,\n imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective],\n templateUrl: './modal-hero.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalHeroComponent {\n public readonly element = injectElement();\n\n /**\n * The modal reference of the modal hero component.\n *\n * @type {ModalRef}\n */\n public readonly modalRef = injectModalRef();\n\n /**\n * The icon of the modal hero component.\n *\n * @type {string}\n */\n @Input()\n public icon?: string | null;\n\n /**\n * The icon set of the modal hero component.\n *\n * @type {IconSet}\n * @default IconSet.CORE\n */\n @Input()\n public iconSet: IconSet = IconSet.CORE;\n\n /**\n * The variant of the modal hero component.\n *\n * @type {ModalHeroVariant | null}\n */\n @CSSModifier()\n @Input()\n public variant?: ModalHeroVariant | null;\n\n constructor() {\n detectControllerChanges(this.modalRef).subscribe();\n }\n}\n","@if (icon) {\n <odx-icon class=\"odx-modal-hero__icon\" [name]=\"icon\" [iconSet]=\"iconSet\" size=\"xlarge\" />\n}\n\n<div class=\"odx-modal-hero__title odx-heading-4\">\n <ng-content />\n</div>\n@if (modalRef.options.dismissable) {\n <odx-action-group class=\"odx-modal-hero__dismiss\">\n <button odxButton odxModalDismiss>\n <odx-icon name=\"close\" iconSet=\"core\" />\n </button>\n </odx-action-group>\n}\n","import { ChangeDetectionStrategy, Component, inject, Injector, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { AreaHeaderComponent } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { ModalCloseDirective, ModalContentDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\nimport { BasicModalOptions, GetModalActionData, Modal } from '../../models';\nimport { ModalFooterComponent } from '../modal-footer/modal-footer.component';\nimport { ModalHeaderComponent } from '../modal-header/modal-header.component';\nimport { ModalHeroComponent } from '../modal-hero/modal-hero.component';\n\n/**\n * Represents a basic modal component that can be used to display dynamic content, handle modal actions, and interact\n * with other components through dependency injection. It includes common modal features such as headers, footers, and dynamic content areas.\n * This component uses the `ModalRef` to manage its state and interactions.\n *\n * The `BasicModalComponent` is designed to be flexible and reusable for various modal dialog needs within an application.\n *\n * @template Result The expected result type that the modal might produce, typically used when the modal closes.\n */\n@Component({\n selector: 'odx-basic-modal',\n standalone: true,\n imports: [\n CoreModule,\n DynamicViewDirective,\n ButtonComponent,\n AreaHeaderComponent,\n ModalHeaderComponent,\n ModalHeroComponent,\n ModalFooterComponent,\n ModalContentDirective,\n ModalCloseDirective,\n ],\n templateUrl: './basic-modal.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BasicModalComponent<Result = unknown> implements Modal<BasicModalOptions<Result>, GetModalActionData<BasicModalOptions<Result>>> {\n protected readonly injector = inject(Injector);\n\n /**\n * The reference to the modal.\n *\n * @type {ModalRef<BasicModalOptions<Result>>}\n */\n public readonly modalRef = injectModalRef<BasicModalOptions<Result>, GetModalActionData<BasicModalOptions<Result>>>();\n\n protected get data(): BasicModalOptions<Result> {\n return this.modalRef.data;\n }\n}\n","@if (data.heroIcon; as icon) {\n <odx-modal-hero [icon]=\"icon\" [variant]=\"data.heroVariant\">\n <ng-template [odxDynamicView]=\"data.title\" />\n </odx-modal-hero>\n} @else {\n <odx-modal-header>\n <odx-area-header>\n <ng-template [odxDynamicView]=\"data.title\" />\n </odx-area-header>\n </odx-modal-header>\n}\n\n<odx-modal-content>\n <ng-template [odxDynamicView]=\"data.content\" [odxDynamicViewInjector]=\"injector\" />\n</odx-modal-content>\n\n<odx-modal-footer>\n @for (action of data.actions; track $index) {\n <button odxButton [variant]=\"action.variant\" [odxModalClose]=\"action.data\">\n {{ action.label }}\n </button>\n }\n</odx-modal-footer>\n","import { ChangeDetectionStrategy, Component, HostListener, Injector, Input, OnChanges, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { DynamicContent, DynamicTextContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { NgChanges, hasChanged, injectElement, isTemplateRef } from '@odx/angular/utils';\nimport { injectModalRef } from './helpers';\n\n/**\n * A component that represents a modal dialog with dynamic content and customizable animations.\n * It supports both modal and sidesheet variants with configurable animations for each type.\n */\n@CSSComponent('modal')\n@Component({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'dialog[odx-dialog-modal]',\n templateUrl: './modal.component.html',\n imports: [A11yModule, CoreModule, DynamicViewDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.id]': 'modalRef.options.id',\n '[attr.aria-labelledby]': 'modalRef.modalTitleId',\n '[attr.role]': '\"dialog\"',\n },\n})\nexport class ModalComponent implements OnChanges {\n protected readonly modalRef = injectModalRef();\n protected readonly injector = inject(Injector);\n protected readonly context = { $implicit: this.modalRef };\n\n public readonly element = injectElement<HTMLDialogElement>();\n\n /**\n * Size of the modal as a CSS modifier based on modal options.\n *\n * @type {ModalSize}\n */\n @CSSModifier()\n public size = this.modalRef.options.size;\n\n /**\n * Variant of the modal as a CSS modifier that influences animation choices.\n *\n * @type {ModalVariant}\n */\n @CSSModifier()\n public variant = this.modalRef.options.variant;\n\n /**\n * Boolean that indicates if the content is a component type rather than a template.\n *\n * @type {boolean}\n * @default false\n */\n @CSSModifier()\n public withComponent = false;\n\n /**\n * Dynamic content to be loaded into the modal. Excludes simple textual content\n * to enable complex Angular components or templates.\n *\n * @type {Exclude<DynamicContent, DynamicTextContent>}\n */\n @Input()\n public content!: Exclude<DynamicContent, DynamicTextContent>;\n\n constructor() {\n detectControllerChanges(this.modalRef).subscribe(() => {\n this.size = this.modalRef.options.size;\n });\n }\n\n public ngOnChanges(changes: NgChanges<ModalComponent>): void {\n if (hasChanged(changes, 'content', false)) {\n this.withComponent = !isTemplateRef(this.content);\n }\n }\n\n @HostListener('keydown', ['$event'])\n protected preventNativeDismiss(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.modalRef.options.dismissable && this.modalRef.destroy();\n }\n }\n\n @HostListener('cancel', ['$event'])\n @HostListener('close', ['$event'])\n protected handleDialogClose({ target }: KeyboardEvent): void {\n if (target === this.element.nativeElement) this.modalRef.dismiss();\n }\n}\n","<div\n [odxClickOutsideActive]=\"modalRef.isActive() && modalRef.options.dismissable && modalRef.options.interactiveBackdrop\"\n (odxClickOutside)=\"modalRef.dismiss()\"\n class=\"odx-modal__container\"\n>\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewContext]=\"withComponent ? {} : context\" [odxDynamicViewInjector]=\"injector\" />\n</div>\n","import { createConfigTokens } from '@odx/angular/utils';\nimport { ModalInstanceOptions, ModalSize } from './models';\nimport { ModalVariant } from './models/modal-variant';\n\nexport type ModalConfig = Omit<ModalInstanceOptions, 'id' | 'host' | 'data'>;\n\n/**\n * Utilizes `createConfigTokens` to create configuration tokens and utility functions for managing modal configurations.\n * This setup enables easy injection and provision of default global settings for modals throughout the application,\n * fostering consistency and ease of customization.\n *\n * The generated tokens and functions include:\n * - `ModalDefaultConfig`: The default configuration values for modals.\n * - `ModalConfig`: An Angular `InjectionToken` for injecting modal configuration into components or services.\n * - `injectModalConfig`: A utility function for retrieving the current modal configuration, considering any overrides.\n * - `provideModalConfig`: A function that allows specifying overrides to the default modal configuration.\n *\n * @example\n * ```ts\n * // Example of providing a custom modal configuration in an Angular module\n * @NgModule({\n * providers: [\n * provideModalConfig({\n * size: ModalSize.LARGE,\n * dismissable: false\n * })\n * ]\n * })\n * class AppModule {}\n *\n * // Example of injecting modal configuration in a component\n * @Component({...})\n * export class MyComponent {\n * constructor(@Inject(ModalConfig) private modalConfig: ModalConfig) {\n * console.log(this.modalConfig.size); // Outputs the size from the provided or default configuration\n * }\n * }\n * ```\n */\nexport const { ModalDefaultConfig, ModalConfig, injectModalConfig, provideModalConfig } = createConfigTokens('Modal', '@odx/angular/components/modal', {\n dismissable: true,\n size: ModalSize.MEDIUM,\n dismissOnNavigation: true,\n interactiveBackdrop: true,\n variant: ModalVariant.DEFAULT,\n} as ModalConfig);\n","import { Location } from '@angular/common';\nimport { inject, Injectable, Injector, TemplateRef } from '@angular/core';\nimport { DynamicContent, DynamicTextContent, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { deepmerge } from '@odx/angular/internal';\nimport { deferFn, getUniqueId, Queue, waitForAnimations } from '@odx/angular/utils';\nimport { finalize } from 'rxjs';\nimport { BasicModalComponent } from './components';\nimport { provideModalRef } from './helpers';\nimport { ModalComponent } from './modal.component';\nimport { injectModalConfig } from './modal.config';\nimport { BasicModalOptions, GetModalActionData, ModalOptions, ModalRef, ModalSize, ModalType } from './models';\n/**\n * Service for managing modal dialogs within the application. It supports creating, opening,\n * and dismissing modals dynamically, with comprehensive options for customization and lifecycle management.\n * Utilizes Angular's dynamic view management to instantiate and render modals as needed.\n *\n * @example\n * ```ts\n * // Example of using ModalService to open a modal\n * constructor(private modalService: ModalService) {}\n *\n * openModal() {\n * const modalRef = this.modalService.open(MyModalContentComponent, {\n * data: { someData: 'test' },\n * size: ModalSize.SMALL,\n * });\n *\n * modalRef.onClose$.subscribe(result => {\n * console.log('Modal closed with result:', result);\n * });\n * }\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n private readonly config = injectModalConfig();\n private readonly openModals = new Queue<ModalRef>();\n private readonly injector = inject(Injector);\n private readonly dynamicViewService = inject(DynamicViewService);\n\n /**\n * An observable that emits the current value of the openModals subject.\n *\n * @emits {ModalRef[]} openModals$ - The current array of open modals.\n */\n public readonly openModals$ = this.openModals.value$;\n\n constructor(location: Location) {\n location.onUrlChange(() => {\n for (const modalRef of this.openModals.toArray()) {\n if (modalRef.options.dismissOnNavigation) {\n modalRef.destroy();\n }\n }\n });\n }\n\n /**\n * Dismisses all open modals.\n */\n public dismissAll(): void {\n for (const modalRef of this.openModals.toArray()) {\n modalRef.dismiss();\n }\n }\n\n /**\n * Retrieves the modal reference by its ID.\n *\n * @template Data The type of data passed to the modal.\n * @template Result The type of result returned by the modal.\n * @param {ModalOptions['id']} id The ID of the modal.\n * @returns {ModalRef<Data, Result> | null} - The modal reference if found, otherwise null.\n */\n public getModalById<Data = unknown, Result = unknown>(id: ModalOptions['id']): ModalRef<Data, Result> | null {\n return this.openModals.get(id) as ModalRef<Data, Result>;\n }\n\n /**\n * Creates a modal with the specified options.\n * @template Data - The type of data passed to the modal for use in its content.\n * @template Result - The type of result expected when the modal is closed.\n * @param {Data} modal - The basic modal options.\n * @param {Partial<ModalOptions<Data>> | undefined} options - Additional modal options.\n * @returns {ModalRef<Data, Result>} The reference to the created modal.\n */\n public create<Data extends BasicModalOptions, Result = GetModalActionData<Data>>(modal: Data, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n public create(modal: BasicModalOptions, options?: ModalOptions): ModalRef {\n return this.open(BasicModalComponent, {\n data: modal,\n size: ModalSize.SMALL,\n ...options,\n });\n }\n\n /**\n * Creates and opens a new modal with the specified content and options.\n *\n * @template Data - The type of data passed to the modal for use in its content.\n * @template Result - The type of result expected when the modal is closed.\n * @template T - The content type of the modal, either a `TemplateRef` or a component.\n * @param {ModalType<T, Data, Result> | TemplateRef<T>} content - The content of the modal, either as a `TemplateRef` or a component type.\n * @param {Partial<ModalOptions<Data>>} [options] - Optional configuration options for the modal.\n * @returns {ModalRef<Data, Result>} A reference to the newly opened modal, allowing interaction with and control over the modal instance.\n */\n public open<Data, Result, T>(content: TemplateRef<T>, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n public open<Data, Result, T = unknown>(content: ModalType<T, Data, Result>, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n public open(content: ModalType<unknown> | TemplateRef<unknown>, options?: Partial<ModalOptions>): ModalRef {\n const mergedOptions = deepmerge(this.config, { id: getUniqueId('odx-modal') }, options ?? {}) as ModalOptions;\n if (this.getModalById(mergedOptions.id)) {\n throw Error(`Modal with ID ${mergedOptions.id} already open`);\n }\n const modalRef = new ModalRef(mergedOptions, (ref) => this.openModals.isFirst(ref));\n this.attachModal(modalRef, content);\n this.openModals.add(modalRef);\n return modalRef;\n }\n\n private attachModal(modalRef: ModalRef, content: Exclude<DynamicContent, DynamicTextContent>): void {\n const viewRef = this.dynamicViewService.createView(ModalComponent, {\n context: { content },\n injector: Injector.create({\n providers: [provideModalRef(modalRef)],\n parent: this.injector,\n }),\n host: modalRef.options.host,\n });\n const dialog = viewRef.getElement() as HTMLDialogElement;\n const onDestroy = async () => {\n dialog?.classList.add('is-hidden');\n await waitForAnimations(dialog);\n dialog?.close();\n this.openModals.remove(modalRef);\n viewRef.destroy();\n };\n\n modalRef.onDestroy$.pipe(finalize(onDestroy)).subscribe();\n deferFn(() => {\n dialog?.isConnected && dialog?.showModal();\n });\n }\n}\n","import { Directive, EventEmitter, inject, Input, OnChanges, OnDestroy, Output, TemplateRef } from '@angular/core';\nimport { hasChanged, NgChanges } from '@odx/angular/utils';\nimport { ModalService } from './modal.service';\nimport { ModalOptions, ModalRef } from './models';\n\n/**\n * A directive that simplifies the creation and management of modals directly from Angular templates.\n * It allows for declarative modal instantiation with full control over modal options, and supports\n * capturing modal close and dismiss events.\n *\n * Usage:\n * Apply `odxModal` to an `<ng-template>` element and bind it to modal options.\n */\n@Directive({\n standalone: true,\n selector: 'ng-template[odxModal]',\n exportAs: 'odxModal',\n})\nexport class ModalDirective implements OnChanges, OnDestroy {\n private readonly modalService = inject(ModalService);\n private modalRef: ModalRef | null = null;\n\n protected readonly template = inject(TemplateRef);\n\n /**\n * Options for the modal directive.\n *\n * @type {Partial<ModalOptions> | '' | null}\n */\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('odxModal')\n public modalOptions?: Partial<ModalOptions> | '' | null;\n\n /**\n * Event emitter for closing the modal.\n *\n * @emits {any} The result of the modal close event.\n */\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('odxModalClose')\n public modalClose = new EventEmitter();\n\n /**\n * Event emitter for dismissing the modal.\n *\n * @emits {any} The result of the modal dismiss event.\n */\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('odxModalDismiss')\n public modalDismiss = new EventEmitter();\n\n public ngOnChanges(changes: NgChanges<ModalDirective>): void {\n if (hasChanged(changes, 'modalOptions') && this.modalOptions) {\n this.modalRef?.update(this.modalOptions);\n }\n }\n\n public ngOnDestroy() {\n this.dismiss();\n }\n\n /**\n * Opens the modal based on the provided template and options. Binds modal result and dismissal outputs to EventEmitter properties.\n */\n public open(): void {\n this.modalRef = this.modalService.open(this.template, this.modalOptions || {});\n this.modalRef.onClose$.subscribe((result) => this.modalClose.next(result));\n this.modalRef.onDismiss$.subscribe((result) => this.modalDismiss.next(result));\n }\n\n /**\n * Dismisses the currently opened modal.\n */\n public dismiss(): void {\n this.modalRef?.dismiss();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AreaHeaderModule } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { ButtonGroupComponent } from '@odx/angular/components/button-group';\nimport { ModalFooterComponent, ModalHeaderComponent, ModalHeroComponent } from './components';\nimport {\n ModalCloseDirective,\n ModalContentDirective,\n ModalDismissDirective,\n PreventFormMethodDialogDirective,\n PreventMethodDialogDirective,\n} from './directives';\nimport { ModalComponent } from './modal.component';\nimport { ModalDirective } from './modal.directive';\n\nconst modules = [\n ModalComponent,\n ModalHeaderComponent,\n ModalHeroComponent,\n ModalFooterComponent,\n ModalDirective,\n ModalCloseDirective,\n ModalContentDirective,\n ModalDismissDirective,\n PreventMethodDialogDirective,\n PreventFormMethodDialogDirective,\n];\n\n@NgModule({\n imports: [ButtonComponent, ButtonGroupComponent, ...modules],\n exports: [CoreModule, AreaHeaderModule, ButtonComponent, ButtonGroupComponent, ...modules],\n})\nexport class ModalModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;AAEa,MAAA,gBAAgB,GAAG;AAC9B,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,MAAM,EAAE,QAAQ;;;ACDlB;;;;;;;;;;AAUG;AACG,MAAO,QAA2C,SAAQ,UAAU,CAAA;AAgBxE;;;AAGG;AACH,IAAA,IAAW,EAAE,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;KACxB;AAED;;;AAGG;AACH,IAAA,IAAW,YAAY,GAAA;AACrB,QAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;KACnC;AAED;;;AAGG;AACH,IAAA,IAAW,IAAI,GAA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oBAAoB,EAAE,GAAG,OAAO,CAAC;AAC5D,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC;AAC3F,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-components-modal.mjs","sources":["../../../../libs/angular/components/modal/src/lib/models/modal-hero-variant.ts","../../../../libs/angular/components/modal/src/lib/models/modal-ref.ts","../../../../libs/angular/components/modal/src/lib/models/modal-size.ts","../../../../libs/angular/components/modal/src/lib/models/modal-variant.ts","../../../../libs/angular/components/modal/src/lib/helpers/inject-modal-ref.ts","../../../../libs/angular/components/modal/src/lib/helpers/provide-modal-ref.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-close.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-content.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-dismiss.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/prevent-form-method-dialog.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/prevent-method-dialog.directive.ts","../../../../libs/angular/components/modal/src/lib/components/modal-footer/modal-footer.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-footer/modal-footer.component.html","../../../../libs/angular/components/modal/src/lib/components/modal-header/modal-header.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-header/modal-header.component.html","../../../../libs/angular/components/modal/src/lib/components/modal-hero/modal-hero.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-hero/modal-hero.component.html","../../../../libs/angular/components/modal/src/lib/components/basic-modal/basic-modal.component.ts","../../../../libs/angular/components/modal/src/lib/components/basic-modal/basic-modal.component.html","../../../../libs/angular/components/modal/src/lib/modal.component.ts","../../../../libs/angular/components/modal/src/lib/modal.component.html","../../../../libs/angular/components/modal/src/lib/modal.config.ts","../../../../libs/angular/components/modal/src/lib/modal.service.ts","../../../../libs/angular/components/modal/src/lib/modal.directive.ts","../../../../libs/angular/components/modal/src/lib/modal.module.ts","../../../../libs/angular/components/modal/src/odx-angular-components-modal.ts"],"sourcesContent":["export type ModalHeroVariant = (typeof ModalHeroVariant)[keyof typeof ModalHeroVariant];\n\nexport const ModalHeroVariant = {\n PRIMARY: 'primary',\n SUCCESS: 'success',\n CONFIRMATION: 'confirmation',\n DANGER: 'danger',\n} as const;\n","import { Controller } from '@odx/angular';\nimport { deepmerge } from '@odx/angular/internal';\nimport { share, Subject } from 'rxjs';\nimport { ModalOptions } from './modal-options';\n\n/**\n * A reference to a dynamically created modal, providing methods to manipulate, close, or update the modal's state\n * and options.\n * This class extends the `Controller` base class from `@odx/angular`, adding modal-specific functionalities like\n * handling closures and dismissals.\n *\n * @template Data - The type of data passed to the modal.\n * @template Result - The type of the result emitted when the modal is closed.\n *\n * @see {Controller}\n */\nexport class ModalRef<Data = unknown, Result = unknown> extends Controller {\n private readonly onClose$$ = new Subject<Result>();\n private readonly onDismiss$$ = new Subject<void>();\n\n /** An observable that emits when the modal is closed with a result. */\n public readonly onClose$ = this.onClose$$.pipe(share({ resetOnRefCountZero: true }));\n\n /** An observable that emits when the modal is dismissed without a result. */\n public readonly onDismiss$ = this.onDismiss$$.pipe(share({ resetOnRefCountZero: true }));\n\n /** An observable that merges the onClose$ and onDismiss$ streams for cases when any kind of teardown is needed. */\n public readonly onDestroy$ = deepmerge(this.onClose$, this.onDismiss$);\n\n /** A method that returns whether the modal is currently active. */\n public readonly isActive: () => boolean;\n\n /** Gets the unique identifier for the modal instance.\n *\n * @returns {string} The unique identifier for the modal instance.\n */\n public get id(): string {\n return this.options.id;\n }\n\n /** Gets the ARIA label ID for the modal title, based on the modal's ID.\n *\n * @returns {string} The ARIA label ID for the modal title.\n */\n public get modalTitleId(): string {\n return `${this.options.id}-title`;\n }\n\n /** Gets the data passed to the modal. This is useful for modal initialization.\n *\n * @returns {Data} The data passed to the modal.\n */\n public get data(): Data {\n return this.internalOptions.data;\n }\n\n /** Gets the current options for the modal. These options include configurations.\n *\n * @template Data - The type of data passed to the modal.\n * @returns {ModalOptions<Data>} The current options for the modal.\n */\n public get options(): ModalOptions<Data> {\n return this.internalOptions;\n }\n\n constructor(\n private internalOptions: ModalOptions<Data>,\n isActive: (modalRef: ModalRef<Data, Result>) => boolean,\n ) {\n super();\n this.isActive = () => isActive(this);\n }\n\n /**\n * Updates the modal's options.\n *\n * @param {Partial<ModalOptions<Data>>} options A partial set of options to update.\n */\n public update(options: Partial<ModalOptions<Data>>): void {\n this.internalOptions = deepmerge(this.internalOptions, options) as ModalOptions<Data>;\n this.triggerControllerChange();\n }\n\n /**\n * Dismisses the modal. This does not result in an output value.\n *\n * @param {boolean} [force=false] Whether to force dismissal regardless of the `canDismiss` condition.\n */\n public dismiss(force = false): void {\n if (!force && !this.isActive()) return;\n if (this.options.canDismiss?.(this.data) === false) return;\n this.onDismiss$$.next();\n this.destroy();\n }\n\n /**\n * Closes the modal with a result.\n *\n * @param {Result} result The result to emit when the modal closes.\n */\n public close(result: Result): void {\n if (!this.isActive()) return;\n if (this.options.canClose?.(this.data) === false) return;\n this.onClose$$.next(result);\n this.destroy();\n }\n\n /** Completes the onClose and onDismiss streams and cleans up resources. */\n public destroy(): void {\n this.onClose$$.complete();\n this.onDismiss$$.complete();\n }\n}\n","export type ModalSize = (typeof ModalSize)[keyof typeof ModalSize];\n\nexport const ModalSize = {\n XSMALL: 'xsmall',\n SMALL: 'small',\n MEDIUM: 'medium',\n LARGE: 'large',\n} as const;\n","export type ModalVariant = typeof ModalVariant[keyof typeof ModalVariant];\n\nexport const ModalVariant = {\n DEFAULT: 'default',\n SIDESHEET: 'sidesheet',\n} as const;\n","import { inject } from '@angular/core';\nimport { ModalRef } from '../models';\n\n/**\n * Utility function to inject a reference to a modal. This function simplifies the injection process by typing the `ModalRef` to the specific data and result expected by the consumer.\n *\n * This approach abstracts away Angular's inject function, providing direct access to the modal reference with the correct type. It is commonly used in components or services that interact with a modal dialog to manipulate its data, close it, or perform other related actions.\n *\n * @template Data The type of data passed to the modal.\n * @template Result The type of result expected when the modal closes.\n * @returns {ModalRef<Data, Result>} A strongly typed reference to the modal.\n *\n * @example\n * ```ts\n * // Injecting a modal reference in a component or service:\n * const modalRef = injectModalRef<SomeDataType, SomeResultType>();\n *\n * // Using the modal reference to close the modal and return a result:\n * modalRef.close(someResult);\n *\n * // Accessing the data provided to the modal:\n * const modalData = modalRef.data;\n * ```\n */\nexport function injectModalRef<Data, Result = unknown>(): ModalRef<Data, Result> {\n return inject(ModalRef<Data, Result>);\n}\n","import { ValueProvider } from '@angular/core';\nimport { ModalRef } from '../models';\n\n/**\n * Provides a configuration for the Angular dependency injection system to inject a specific instance of `ModalRef`.\n * This function is particularly useful when you want to configure a provider for a `ModalRef` within an Angular module or component.\n *\n * @template D The data type expected by the modal.\n * @template R The result type that the modal will produce.\n * @param {ModalRef<D, R>} modalRef An instance of `ModalRef` to be provided.\n * @returns {ValueProvider} An Angular value provider that can be used in module or component providers arrays.\n */\nexport function provideModalRef<D = unknown, R = unknown>(modalRef: ModalRef<D, R>): ValueProvider {\n return { provide: ModalRef, useValue: modalRef };\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { injectModalRef } from '../helpers';\n\n/**\n * A directive that enables an element to close or dismiss a modal when clicked.\n * It can be used on any element within a modal to trigger the close or dismiss action, optionally passing a result back to the modal opener.\n *\n * The directive accepts an input value that determines the result to be passed back on modal close. If no value is provided, or it's explicitly set to `null`,\n * the modal is dismissed without sending a result. If the input value is `undefined`, the modal is dismissed via the `dismiss` method without passing any result.\n *\n * @template T - The type of the result to be emitted when the modal closes. Defaults to `unknown`.\n *\n * @example\n * Closing a modal and passing a result:\n * ```html\n * <button [odxModalClose]=\"myResult\">Close and send result</button>\n * ```\n *\n * Simply dismissing a modal without passing a result:\n * ```html\n * <button odxModalClose>Dismiss</button>\n * ```\n */\n@Directive({\n standalone: true,\n selector: '[odxModalClose]',\n})\nexport class ModalCloseDirective<T = unknown> {\n private readonly modalRef = injectModalRef();\n\n /**\n * Represents the result to be passed back to the modal opener when the modal is closed.\n * @template T - The type of the result returned.\n */\n @Input('odxModalClose')\n public result?: T | null = null;\n\n @HostListener('click')\n protected onClick(): void {\n const result = this.result === '' ? null : this.result;\n\n if (result === undefined) {\n this.modalRef.dismiss();\n } else {\n this.modalRef.close(result ?? null);\n }\n }\n}\n","import { Directive } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents a directive for the content of a modal.\n */\n@CSSComponent('modal__content')\n@Directive({\n standalone: true,\n selector: 'odx-modal-content',\n})\nexport class ModalContentDirective {\n public readonly element = injectElement();\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectModalRef } from '../helpers';\n\n/**\n * A directive that enables an element to dismiss a modal when clicked. This can be applied\n * to any clickable element within a modal, such as buttons or links, to provide a declarative\n * approach to dismissing the modal.\n *\n * Utilizes `injectModalRef` to access the modal reference associated with the containing modal,\n * enabling the directive to call the `dismiss` method on the modal reference upon the click event.\n *\n * @example\n * Dismissing a modal using the odxModalDismiss directive on a button:\n * ```html\n * <button odxModalDismiss>Cancel</button>\n * ```\n *\n * This directive simplifies modal dismissal by removing the need for manually wiring click events\n * to dismiss methods in the component class, thereby enhancing template readability and maintainability.\n */\n@Directive({\n standalone: true,\n selector: '[odxModalDismiss]',\n})\nexport class ModalDismissDirective {\n private readonly modalRef = injectModalRef();\n\n @HostListener('click')\n protected onClick(): void {\n this.modalRef.dismiss();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\n\n/**\n * Directive that prevents the default form method behavior on submit buttons inside an HTML Dialog form.\n */\n@Directive({\n standalone: true,\n selector: '[formmethod=dialog]',\n})\nexport class PreventFormMethodDialogDirective {\n @HostListener('click', ['$event'])\n protected onClick(event: Event): void {\n event.preventDefault();\n }\n}\n","import { Directive, HostListener } from '@angular/core';\n\n/**\n * Directive that prevents the default form submission behavior inside an HTML Dialog form.\n */\n@Directive({\n standalone: true,\n selector: 'form[method=dialog]',\n})\nexport class PreventMethodDialogDirective {\n @HostListener('submit', ['$event'])\n protected onFormSubmit(event: Event): void {\n event.preventDefault();\n }\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents the footer component of a modal.\n */\n@CSSComponent('modal__footer')\n@Component({\n standalone: true,\n selector: 'odx-modal-footer',\n templateUrl: './modal-footer.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalFooterComponent {\n public readonly element = injectElement();\n}\n","<ng-content />\n","import { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { AreaHeaderComponent, AreaHeaderSize } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { ModalDismissDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\n\n/**\n * Represents the header component of a modal.\n */\n@CSSComponent('modal__header')\n@Component({\n standalone: true,\n selector: 'odx-modal-header',\n templateUrl: './modal-header.component.html',\n imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalHeaderComponent implements AfterContentInit {\n protected readonly modalRef = injectModalRef();\n\n public readonly element = injectElement();\n\n /**\n * The area header component associated with the modal header.\n *\n * @type {AreaHeaderComponent | undefined}\n */\n @ContentChild(AreaHeaderComponent)\n public areaHeaderComponent?: AreaHeaderComponent;\n\n constructor() {\n detectControllerChanges(this.modalRef).subscribe();\n }\n\n public ngAfterContentInit(): void {\n if (this.areaHeaderComponent) {\n this.areaHeaderComponent.size = AreaHeaderSize.MEDIUM;\n }\n }\n}\n","<ng-content select=\"odx-area-header\" />\n@if (modalRef.options.dismissable) {\n <odx-action-group class=\"odx-modal__dismiss\">\n <button odxButton odxModalDismiss><odx-icon name=\"close\" iconSet=\"core\" /></button>\n </odx-action-group>\n}\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent, IconSet } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { ModalDismissDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\nimport { ModalHeroVariant } from '../../models';\n\n/**\n * Represents a modal hero component.\n */\n@CSSComponent('modal-hero')\n@Component({\n selector: 'odx-modal-hero',\n standalone: true,\n imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective],\n templateUrl: './modal-hero.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalHeroComponent {\n public readonly element = injectElement();\n\n /**\n * The modal reference of the modal hero component.\n *\n * @type {ModalRef}\n */\n public readonly modalRef = injectModalRef();\n\n /**\n * The icon of the modal hero component.\n *\n * @type {string}\n */\n @Input()\n public icon?: string | null;\n\n /**\n * The icon set of the modal hero component.\n *\n * @type {IconSet}\n * @default IconSet.CORE\n */\n @Input()\n public iconSet: IconSet = IconSet.CORE;\n\n /**\n * The variant of the modal hero component.\n *\n * @type {ModalHeroVariant | null}\n */\n @CSSModifier()\n @Input()\n public variant?: ModalHeroVariant | null;\n\n constructor() {\n detectControllerChanges(this.modalRef).subscribe();\n }\n}\n","@if (icon) {\n <odx-icon class=\"odx-modal-hero__icon\" [name]=\"icon\" [iconSet]=\"iconSet\" size=\"xlarge\" />\n}\n\n<div class=\"odx-modal-hero__title odx-heading-4\">\n <ng-content />\n</div>\n@if (modalRef.options.dismissable) {\n <odx-action-group class=\"odx-modal-hero__dismiss\">\n <button odxButton odxModalDismiss>\n <odx-icon name=\"close\" iconSet=\"core\" />\n </button>\n </odx-action-group>\n}\n","import { ChangeDetectionStrategy, Component, inject, Injector, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { AreaHeaderComponent } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { ModalCloseDirective, ModalContentDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\nimport { BasicModalOptions, GetModalActionData, Modal } from '../../models';\nimport { ModalFooterComponent } from '../modal-footer/modal-footer.component';\nimport { ModalHeaderComponent } from '../modal-header/modal-header.component';\nimport { ModalHeroComponent } from '../modal-hero/modal-hero.component';\n\n/**\n * Represents a basic modal component that can be used to display dynamic content, handle modal actions, and interact\n * with other components through dependency injection. It includes common modal features such as headers, footers, and dynamic content areas.\n * This component uses the `ModalRef` to manage its state and interactions.\n *\n * The `BasicModalComponent` is designed to be flexible and reusable for various modal dialog needs within an application.\n *\n * @template Result The expected result type that the modal might produce, typically used when the modal closes.\n */\n@Component({\n selector: 'odx-basic-modal',\n standalone: true,\n imports: [\n CoreModule,\n DynamicViewDirective,\n ButtonComponent,\n AreaHeaderComponent,\n ModalHeaderComponent,\n ModalHeroComponent,\n ModalFooterComponent,\n ModalContentDirective,\n ModalCloseDirective,\n ],\n templateUrl: './basic-modal.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BasicModalComponent<Result = unknown> implements Modal<BasicModalOptions<Result>, GetModalActionData<BasicModalOptions<Result>>> {\n protected readonly injector = inject(Injector);\n\n /**\n * The reference to the modal.\n *\n * @type {ModalRef<BasicModalOptions<Result>>}\n */\n public readonly modalRef = injectModalRef<BasicModalOptions<Result>, GetModalActionData<BasicModalOptions<Result>>>();\n\n protected get data(): BasicModalOptions<Result> {\n return this.modalRef.data;\n }\n}\n","@if (data.heroIcon; as icon) {\n <odx-modal-hero [icon]=\"icon\" [variant]=\"data.heroVariant\">\n <ng-template [odxDynamicView]=\"data.title\" />\n </odx-modal-hero>\n} @else {\n <odx-modal-header>\n <odx-area-header>\n <ng-template [odxDynamicView]=\"data.title\" />\n </odx-area-header>\n </odx-modal-header>\n}\n\n<odx-modal-content>\n <ng-template [odxDynamicView]=\"data.content\" [odxDynamicViewInjector]=\"injector\" />\n</odx-modal-content>\n\n<odx-modal-footer>\n @for (action of data.actions; track $index) {\n <button odxButton [variant]=\"action.variant\" [odxModalClose]=\"action.data\">\n {{ action.label }}\n </button>\n }\n</odx-modal-footer>\n","import { ChangeDetectionStrategy, Component, HostListener, Injector, Input, OnChanges, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { DynamicContent, DynamicTextContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { NgChanges, hasChanged, injectElement, isTemplateRef } from '@odx/angular/utils';\nimport { injectModalRef } from './helpers';\n\n/**\n * A component that represents a modal dialog with dynamic content and customizable animations.\n * It supports both modal and sidesheet variants with configurable animations for each type.\n */\n@CSSComponent('modal')\n@Component({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'dialog[odx-dialog-modal]',\n templateUrl: './modal.component.html',\n imports: [A11yModule, CoreModule, DynamicViewDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.id]': 'modalRef.options.id',\n '[attr.aria-labelledby]': 'modalRef.modalTitleId',\n '[attr.role]': '\"dialog\"',\n },\n})\nexport class ModalComponent implements OnChanges {\n protected readonly modalRef = injectModalRef();\n protected readonly injector = inject(Injector);\n protected readonly context = { $implicit: this.modalRef };\n\n public readonly element = injectElement<HTMLDialogElement>();\n\n /**\n * Size of the modal as a CSS modifier based on modal options.\n *\n * @type {ModalSize}\n */\n @CSSModifier()\n public size = this.modalRef.options.size;\n\n /**\n * Variant of the modal as a CSS modifier that influences animation choices.\n *\n * @type {ModalVariant}\n */\n @CSSModifier()\n public variant = this.modalRef.options.variant;\n\n /**\n * Boolean that indicates if the content is a component type rather than a template.\n *\n * @type {boolean}\n * @default false\n */\n @CSSModifier()\n public withComponent = false;\n\n /**\n * Dynamic content to be loaded into the modal. Excludes simple textual content\n * to enable complex Angular components or templates.\n *\n * @type {Exclude<DynamicContent, DynamicTextContent>}\n */\n @Input()\n public content!: Exclude<DynamicContent, DynamicTextContent>;\n\n constructor() {\n detectControllerChanges(this.modalRef).subscribe(() => {\n this.size = this.modalRef.options.size;\n });\n }\n\n public ngOnChanges(changes: NgChanges<ModalComponent>): void {\n if (hasChanged(changes, 'content', false)) {\n this.withComponent = !isTemplateRef(this.content);\n }\n }\n\n @HostListener('keydown', ['$event'])\n protected preventNativeDismiss(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.preventDefault();\n this.modalRef.options.dismissable && this.modalRef.destroy();\n }\n }\n\n @HostListener('cancel', ['$event'])\n @HostListener('close', ['$event'])\n protected handleDialogClose({ target }: KeyboardEvent): void {\n if (target === this.element.nativeElement) this.modalRef.dismiss();\n }\n}\n","<div\n [odxClickOutsideActive]=\"modalRef.isActive() && modalRef.options.dismissable && modalRef.options.interactiveBackdrop\"\n (odxClickOutside)=\"modalRef.dismiss()\"\n class=\"odx-modal__container\"\n>\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewContext]=\"withComponent ? {} : context\" [odxDynamicViewInjector]=\"injector\" />\n</div>\n","import { createConfigTokens } from '@odx/angular/utils';\nimport { ModalInstanceOptions, ModalSize } from './models';\nimport { ModalVariant } from './models/modal-variant';\n\nexport type ModalConfig = Omit<ModalInstanceOptions, 'id' | 'host' | 'data'>;\n\n/**\n * Utilizes `createConfigTokens` to create configuration tokens and utility functions for managing modal configurations.\n * This setup enables easy injection and provision of default global settings for modals throughout the application,\n * fostering consistency and ease of customization.\n *\n * The generated tokens and functions include:\n * - `ModalDefaultConfig`: The default configuration values for modals.\n * - `ModalConfig`: An Angular `InjectionToken` for injecting modal configuration into components or services.\n * - `injectModalConfig`: A utility function for retrieving the current modal configuration, considering any overrides.\n * - `provideModalConfig`: A function that allows specifying overrides to the default modal configuration.\n *\n * @example\n * ```ts\n * // Example of providing a custom modal configuration in an Angular module\n * @NgModule({\n * providers: [\n * provideModalConfig({\n * size: ModalSize.LARGE,\n * dismissable: false\n * })\n * ]\n * })\n * class AppModule {}\n *\n * // Example of injecting modal configuration in a component\n * @Component({...})\n * export class MyComponent {\n * constructor(@Inject(ModalConfig) private modalConfig: ModalConfig) {\n * console.log(this.modalConfig.size); // Outputs the size from the provided or default configuration\n * }\n * }\n * ```\n */\nexport const { ModalDefaultConfig, ModalConfig, injectModalConfig, provideModalConfig } = createConfigTokens('Modal', '@odx/angular/components/modal', {\n dismissable: true,\n size: ModalSize.MEDIUM,\n dismissOnNavigation: true,\n interactiveBackdrop: true,\n variant: ModalVariant.DEFAULT,\n} as ModalConfig);\n","import { Location } from '@angular/common';\nimport { inject, Injectable, Injector, TemplateRef } from '@angular/core';\nimport { DynamicContent, DynamicTextContent, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { deepmerge } from '@odx/angular/internal';\nimport { deferFn, getUniqueId, Queue, waitForAnimations } from '@odx/angular/utils';\nimport { finalize } from 'rxjs';\nimport { BasicModalComponent } from './components';\nimport { provideModalRef } from './helpers';\nimport { ModalComponent } from './modal.component';\nimport { injectModalConfig } from './modal.config';\nimport { BasicModalOptions, GetModalActionData, ModalOptions, ModalRef, ModalSize, ModalType } from './models';\n/**\n * Service for managing modal dialogs within the application. It supports creating, opening,\n * and dismissing modals dynamically, with comprehensive options for customization and lifecycle management.\n * Utilizes Angular's dynamic view management to instantiate and render modals as needed.\n *\n * @example\n * ```ts\n * // Example of using ModalService to open a modal\n * constructor(private modalService: ModalService) {}\n *\n * openModal() {\n * const modalRef = this.modalService.open(MyModalContentComponent, {\n * data: { someData: 'test' },\n * size: ModalSize.SMALL,\n * });\n *\n * modalRef.onClose$.subscribe(result => {\n * console.log('Modal closed with result:', result);\n * });\n * }\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n private readonly config = injectModalConfig();\n private readonly openModals = new Queue<ModalRef>();\n private readonly injector = inject(Injector);\n private readonly dynamicViewService = inject(DynamicViewService);\n\n /**\n * An observable that emits the current value of the openModals subject.\n *\n * @emits {ModalRef[]} openModals$ - The current array of open modals.\n */\n public readonly openModals$ = this.openModals.value$;\n\n constructor(location: Location) {\n location.onUrlChange(() => {\n for (const modalRef of this.openModals.toArray()) {\n if (modalRef.options.dismissOnNavigation) {\n modalRef.destroy();\n }\n }\n });\n }\n\n /**\n * Dismisses all open modals.\n */\n public dismissAll(): void {\n for (const modalRef of this.openModals.toArray()) {\n modalRef.dismiss();\n }\n }\n\n /**\n * Retrieves the modal reference by its ID.\n *\n * @template Data The type of data passed to the modal.\n * @template Result The type of result returned by the modal.\n * @param {ModalOptions['id']} id The ID of the modal.\n * @returns {ModalRef<Data, Result> | null} - The modal reference if found, otherwise null.\n */\n public getModalById<Data = unknown, Result = unknown>(id: ModalOptions['id']): ModalRef<Data, Result> | null {\n return this.openModals.get(id) as ModalRef<Data, Result>;\n }\n\n /**\n * Creates a modal with the specified options.\n * @template Data - The type of data passed to the modal for use in its content.\n * @template Result - The type of result expected when the modal is closed.\n * @param {Data} modal - The basic modal options.\n * @param {Partial<ModalOptions<Data>> | undefined} options - Additional modal options.\n * @returns {ModalRef<Data, Result>} The reference to the created modal.\n */\n public create<Data extends BasicModalOptions, Result = GetModalActionData<Data>>(modal: Data, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n public create(modal: BasicModalOptions, options?: ModalOptions): ModalRef {\n return this.open(BasicModalComponent, {\n data: modal,\n size: ModalSize.SMALL,\n ...options,\n });\n }\n\n /**\n * Creates and opens a new modal with the specified content and options.\n *\n * @template Data - The type of data passed to the modal for use in its content.\n * @template Result - The type of result expected when the modal is closed.\n * @template T - The content type of the modal, either a `TemplateRef` or a component.\n * @param {ModalType<T, Data, Result> | TemplateRef<T>} content - The content of the modal, either as a `TemplateRef` or a component type.\n * @param {Partial<ModalOptions<Data>>} [options] - Optional configuration options for the modal.\n * @returns {ModalRef<Data, Result>} A reference to the newly opened modal, allowing interaction with and control over the modal instance.\n */\n public open<Data, Result, T>(content: TemplateRef<T>, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n public open<Data, Result, T = unknown>(content: ModalType<T, Data, Result>, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n public open(content: ModalType<unknown> | TemplateRef<unknown>, options?: Partial<ModalOptions>): ModalRef {\n const mergedOptions = deepmerge(this.config, { id: getUniqueId('odx-modal') }, options ?? {}) as ModalOptions;\n if (this.getModalById(mergedOptions.id)) {\n throw Error(`Modal with ID ${mergedOptions.id} already open`);\n }\n const modalRef = new ModalRef(mergedOptions, (ref) => this.openModals.isFirst(ref));\n this.attachModal(modalRef, content);\n this.openModals.add(modalRef);\n return modalRef;\n }\n\n private attachModal(modalRef: ModalRef, content: Exclude<DynamicContent, DynamicTextContent>): void {\n const viewRef = this.dynamicViewService.createView(ModalComponent, {\n context: { content },\n injector: Injector.create({\n providers: [provideModalRef(modalRef)],\n parent: this.injector,\n }),\n host: modalRef.options.host,\n });\n const dialog = viewRef.getElement() as HTMLDialogElement;\n const onDestroy = async () => {\n dialog?.classList.add('is-hidden');\n await waitForAnimations(dialog);\n dialog?.close();\n this.openModals.remove(modalRef);\n viewRef.destroy();\n };\n\n modalRef.onDestroy$.pipe(finalize(onDestroy)).subscribe();\n deferFn(() => {\n dialog?.isConnected && dialog?.showModal();\n });\n }\n}\n","import { Directive, EventEmitter, inject, Input, OnChanges, OnDestroy, Output, TemplateRef } from '@angular/core';\nimport { hasChanged, NgChanges } from '@odx/angular/utils';\nimport { ModalService } from './modal.service';\nimport { ModalOptions, ModalRef } from './models';\n\n/**\n * A directive that simplifies the creation and management of modals directly from Angular templates.\n * It allows for declarative modal instantiation with full control over modal options, and supports\n * capturing modal close and dismiss events.\n *\n * Usage:\n * Apply `odxModal` to an `<ng-template>` element and bind it to modal options.\n */\n@Directive({\n standalone: true,\n selector: 'ng-template[odxModal]',\n exportAs: 'odxModal',\n})\nexport class ModalDirective implements OnChanges, OnDestroy {\n private readonly modalService = inject(ModalService);\n private modalRef: ModalRef | null = null;\n\n protected readonly template = inject(TemplateRef);\n\n /**\n * Options for the modal directive.\n *\n * @type {Partial<ModalOptions> | '' | null}\n */\n @Input('odxModal')\n public modalOptions?: Partial<ModalOptions> | '' | null;\n\n /**\n * Event emitter for closing the modal.\n *\n * @emits {any} The result of the modal close event.\n */\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('odxModalClose')\n public modalClose = new EventEmitter();\n\n /**\n * Event emitter for dismissing the modal.\n *\n * @emits {any} The result of the modal dismiss event.\n */\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('odxModalDismiss')\n public modalDismiss = new EventEmitter();\n\n public ngOnChanges(changes: NgChanges<ModalDirective>): void {\n if (hasChanged(changes, 'modalOptions') && this.modalOptions) {\n this.modalRef?.update(this.modalOptions);\n }\n }\n\n public ngOnDestroy() {\n this.dismiss();\n }\n\n /**\n * Opens the modal based on the provided template and options. Binds modal result and dismissal outputs to EventEmitter properties.\n */\n public open(): void {\n this.modalRef = this.modalService.open(this.template, this.modalOptions || {});\n this.modalRef.onClose$.subscribe((result) => this.modalClose.next(result));\n this.modalRef.onDismiss$.subscribe((result) => this.modalDismiss.next(result));\n }\n\n /**\n * Dismisses the currently opened modal.\n */\n public dismiss(): void {\n this.modalRef?.dismiss();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AreaHeaderModule } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { ButtonGroupComponent } from '@odx/angular/components/button-group';\nimport { ModalFooterComponent, ModalHeaderComponent, ModalHeroComponent } from './components';\nimport {\n ModalCloseDirective,\n ModalContentDirective,\n ModalDismissDirective,\n PreventFormMethodDialogDirective,\n PreventMethodDialogDirective,\n} from './directives';\nimport { ModalComponent } from './modal.component';\nimport { ModalDirective } from './modal.directive';\n\nconst modules = [\n ModalComponent,\n ModalHeaderComponent,\n ModalHeroComponent,\n ModalFooterComponent,\n ModalDirective,\n ModalCloseDirective,\n ModalContentDirective,\n ModalDismissDirective,\n PreventMethodDialogDirective,\n PreventFormMethodDialogDirective,\n];\n\n@NgModule({\n imports: [ButtonComponent, ButtonGroupComponent, ...modules],\n exports: [CoreModule, AreaHeaderModule, ButtonComponent, ButtonGroupComponent, ...modules],\n})\nexport class ModalModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;AAEa,MAAA,gBAAgB,GAAG;AAC9B,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,MAAM,EAAE,QAAQ;;;ACDlB;;;;;;;;;;AAUG;AACG,MAAO,QAA2C,SAAQ,UAAU,CAAA;AAgBxE;;;AAGG;AACH,IAAA,IAAW,EAAE,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;KACxB;AAED;;;AAGG;AACH,IAAA,IAAW,YAAY,GAAA;AACrB,QAAA,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;KACnC;AAED;;;AAGG;AACH,IAAA,IAAW,IAAI,GAAA;AACb,QAAA,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;KAClC;AAED;;;;AAIG;AACH,IAAA,IAAW,O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AAe,EAAE,oBAAoB,EAAE,GAAG,OAAO,CAAC;AAC3F,iBAAA,CAAA;;;AChCD;;AAEG;;;;"}
@@ -5,6 +5,7 @@ import * as i1 from '@odx/angular';
5
5
  import { ReadonlyController, WithDisabledState, CoreModule } from '@odx/angular';
6
6
  import { CheckBoxControl } from '@odx/angular/cdk/checkbox-control';
7
7
  import { ControlDirective } from '@odx/angular/cdk/custom-form-control';
8
+ import { IconComponent } from '@odx/angular/components/icon';
8
9
  import { CSSComponent } from '@odx/angular/internal';
9
10
  import { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';
10
11
 
@@ -20,16 +21,16 @@ import { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';
20
21
  */
21
22
  let SwitchComponent = class SwitchComponent extends CheckBoxControl {
22
23
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
23
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SwitchComponent, isStandalone: true, selector: "odx-switch", host: { properties: { "class.is-active": "checked" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithDisabledState }], ngImport: i0, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__indicator\"></div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n", dependencies: [{ kind: "directive", type: ControlDirective, selector: "[odxControl]", exportAs: ["odxControl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
24
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SwitchComponent, isStandalone: true, selector: "odx-switch", host: { properties: { "class.is-active": "checked" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithDisabledState }], ngImport: i0, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <odx-icon class=\"odx-switch__indicator\" iconSet=\"core\" [name]=\"checked ? 'check' : 'close'\" />\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n", dependencies: [{ kind: "directive", type: ControlDirective, selector: "[odxControl]", exportAs: ["odxControl"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet", "identifier"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
24
25
  };
25
26
  SwitchComponent = __decorate([
26
27
  CSSComponent('switch')
27
28
  ], SwitchComponent);
28
29
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchComponent, decorators: [{
29
30
  type: Component,
30
- args: [{ standalone: true, selector: 'odx-switch', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ControlDirective], providers: [ReadonlyController.connect()], hostDirectives: [WithDisabledState], host: {
31
+ args: [{ standalone: true, selector: 'odx-switch', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ControlDirective, IconComponent], providers: [ReadonlyController.connect()], hostDirectives: [WithDisabledState], host: {
31
32
  '[class.is-active]': 'checked',
32
- }, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__indicator\"></div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n" }]
33
+ }, template: "<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <odx-icon class=\"odx-switch__indicator\" iconSet=\"core\" [name]=\"checked ? 'check' : 'close'\" />\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n" }]
33
34
  }] });
34
35
 
35
36
  /**
@@ -73,7 +74,7 @@ const modules = [SwitchComponent, SwitchValidator];
73
74
  class SwitchModule {
74
75
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
75
76
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SwitchModule, imports: [SwitchComponent, SwitchValidator], exports: [CoreModule, SwitchComponent, SwitchValidator] }); }
76
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchModule, imports: [CoreModule] }); }
77
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchModule, imports: [SwitchComponent, CoreModule] }); }
77
78
  }
78
79
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SwitchModule, decorators: [{
79
80
  type: NgModule,
@@ -1 +1 @@
1
- {"version":3,"file":"odx-angular-components-switch.mjs","sources":["../../../../libs/angular/components/switch/src/lib/switch.component.ts","../../../../libs/angular/components/switch/src/lib/switch.component.html","../../../../libs/angular/components/switch/src/lib/switch.validator.ts","../../../../libs/angular/components/switch/src/lib/switch.module.ts","../../../../libs/angular/components/switch/src/odx-angular-components-switch.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ReadonlyController, WithDisabledState } from '@odx/angular';\nimport { CheckBoxControl } from '@odx/angular/cdk/checkbox-control';\nimport { ControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { CSSComponent } from '@odx/angular/internal';\n\n/**\n * SwitchComponent provides a custom switch (toggle) control that can be used within forms\n * or standalone for toggling a specific binary state. It supports readonly and disabled states,\n * and integrates seamlessly with Angular's form controls for data binding and state management.\n * Has host directives for disabled state handling.\n * Extends CheckBoxControl to provide additional behavior.\n *\n * @see {WithDisabledState}\n * @see {CheckBoxControl}\n */\n@CSSComponent('switch')\n@Component({\n standalone: true,\n selector: 'odx-switch',\n templateUrl: 'switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [ControlDirective],\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithDisabledState],\n host: {\n '[class.is-active]': 'checked',\n },\n})\nexport class SwitchComponent extends CheckBoxControl {}\n","<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <div class=\"odx-switch__indicator\"></div>\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\n/**\n * SwitchValidator extends CheckboxRequiredValidator to provide required field validation\n * for switch components used within Angular forms. It ensures that the switch is marked as required\n * and must be toggled (checked) to meet form validation criteria.\n *\n * This directive automatically attaches itself to any switch component with a 'required' attribute\n * and a form control binding (formControlName, formControl, or ngModel).\n *\n * Extends CheckboxRequiredValidator.\n *\n * @see {CheckboxRequiredValidator}\n */\n@Directive({\n standalone: true,\n selector: 'odx-switch[required][formControlName], odx-switch[required][formControl], odx-switch[required][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SwitchValidator),\n multi: true,\n },\n ],\n})\nexport class SwitchValidator extends CheckboxRequiredValidator {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { SwitchComponent } from './switch.component';\nimport { SwitchValidator } from './switch.validator';\n\nconst modules = [SwitchComponent, SwitchValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class SwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAMA;;;;;;;;;AASG;AAeI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,eAAe,CAAA;+GAAvC,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,EAAA,EAAA,SAAA,EANf,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECxB3C,uwBA0BA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDHY,gBAAgB,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;AAOf,eAAe,GAAA,UAAA,CAAA;IAd3B,YAAY,CAAC,QAAQ,CAAC;AAcV,CAAA,EAAA,eAAe,CAA2B,CAAA;4FAA1C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,SAA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AC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;ACpBD,MAAM,OAAO,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;MAMtC,YAAY,CAAA;+GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAZ,YAAY,EAAA,OAAA,EAAA,CANR,eAAe,EAAE,eAAe,aAIrC,UAAU,EAJL,eAAe,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;AAMpC,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,YAAY,YAFb,UAAU,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAET,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"odx-angular-components-switch.mjs","sources":["../../../../libs/angular/components/switch/src/lib/switch.component.ts","../../../../libs/angular/components/switch/src/lib/switch.component.html","../../../../libs/angular/components/switch/src/lib/switch.validator.ts","../../../../libs/angular/components/switch/src/lib/switch.module.ts","../../../../libs/angular/components/switch/src/odx-angular-components-switch.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { ReadonlyController, WithDisabledState } from '@odx/angular';\nimport { CheckBoxControl } from '@odx/angular/cdk/checkbox-control';\nimport { ControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\n\n/**\n * SwitchComponent provides a custom switch (toggle) control that can be used within forms\n * or standalone for toggling a specific binary state. It supports readonly and disabled states,\n * and integrates seamlessly with Angular's form controls for data binding and state management.\n * Has host directives for disabled state handling.\n * Extends CheckBoxControl to provide additional behavior.\n *\n * @see {WithDisabledState}\n * @see {CheckBoxControl}\n */\n@CSSComponent('switch')\n@Component({\n standalone: true,\n selector: 'odx-switch',\n templateUrl: 'switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [ControlDirective, IconComponent],\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithDisabledState],\n host: {\n '[class.is-active]': 'checked',\n },\n})\nexport class SwitchComponent extends CheckBoxControl {}\n","<label class=\"odx-switch__label\">\n <input\n odxControl\n class=\"odx-switch__input\"\n [attr.aria-checked]=\"ariaChecked\"\n [attr.aria-invalid]=\"hasError || null\"\n [attr.aria-readonly]=\"isReadonly || null\"\n [attr.aria-required]=\"isRequired || null\"\n [attr.tabindex]=\"tabindex || null\"\n [checked]=\"checked\"\n [disabled]=\"isDisabled || isReadonly\"\n [name]=\"name\"\n [readonly]=\"isReadonly\"\n [value]=\"value\"\n type=\"checkbox\"\n (blur)=\"onTouched()\"\n (change)=\"onChanged($event)\"\n />\n <odx-icon class=\"odx-switch__indicator\" iconSet=\"core\" [name]=\"checked ? 'check' : 'close'\" />\n <div class=\"odx-switch__content\">\n <ng-content />\n @if (isRequired) {\n <span class=\"odx-switch__required\">*</span>\n }\n </div>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\n/**\n * SwitchValidator extends CheckboxRequiredValidator to provide required field validation\n * for switch components used within Angular forms. It ensures that the switch is marked as required\n * and must be toggled (checked) to meet form validation criteria.\n *\n * This directive automatically attaches itself to any switch component with a 'required' attribute\n * and a form control binding (formControlName, formControl, or ngModel).\n *\n * Extends CheckboxRequiredValidator.\n *\n * @see {CheckboxRequiredValidator}\n */\n@Directive({\n standalone: true,\n selector: 'odx-switch[required][formControlName], odx-switch[required][formControl], odx-switch[required][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => SwitchValidator),\n multi: true,\n },\n ],\n})\nexport class SwitchValidator extends CheckboxRequiredValidator {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { SwitchComponent } from './switch.component';\nimport { SwitchValidator } from './switch.validator';\n\nconst modules = [SwitchComponent, SwitchValidator];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class SwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAOA;;;;;;;;;AASG;AAeI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,eAAe,CAAA;+GAAvC,eAAe,EAAA,IAAA,EAAA,IAAA,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,EANf,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,EAAA,EAAA,SAAA,EAAA,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzB3C,g0BA0BA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDFY,gBAAgB,EAAA,QAAA,EAAA,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ant = {
163
163
  WARNING: 'warning',
164
164
  DANGER: 'danger',
165
165
  SUCCESS: 'success',
166
+ WARNING_STRONG: 'warning-strong',
167
+ DANGER_STRONG: 'danger-strong',
166
168
  };
167
169
 
168
170
  /**