@odx/angular 13.2.1 → 13.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/cdk/dynamic-view/index.d.ts +1 -0
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs +4 -2
- package/fesm2022/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2022/odx-angular-components-tab-bar.mjs +3 -2
- package/fesm2022/odx-angular-components-tab-bar.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @odx/angular
|
|
2
2
|
|
|
3
|
+
## 13.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3a84f1c: Fix: don't highlight tab bar item when its routerLink navigation is cancelled by a guard
|
|
8
|
+
|
|
9
|
+
## 13.2.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b806bbb: Fix: sanitize potentially malicious HTML in DinamicView Component
|
|
14
|
+
|
|
3
15
|
## 13.2.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -20,6 +20,7 @@ interface DynamicViewRef<T extends DynamicContent> {
|
|
|
20
20
|
|
|
21
21
|
declare class DynamicViewComponent implements OnDestroy {
|
|
22
22
|
private readonly element;
|
|
23
|
+
private readonly sanitizer;
|
|
23
24
|
private currentSubscription;
|
|
24
25
|
set content(value: DynamicTextContent);
|
|
25
26
|
ngOnDestroy(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, ViewEncapsulation, ChangeDetectionStrategy, Component, reflectComponentType, ApplicationRef, createComponent, EnvironmentInjector, InjectionToken,
|
|
2
|
+
import { inject, SecurityContext, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, reflectComponentType, ApplicationRef, createComponent, EnvironmentInjector, InjectionToken, DOCUMENT, Injector, Injectable, ViewContainerRef, TemplateRef, Directive } from '@angular/core';
|
|
3
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
4
|
import { injectElement, isString, isViewContainer, isTemplateRef, isComponent, hasChanged } from '@odx/angular/utils';
|
|
4
5
|
import { isObservable, distinctUntilChanged } from 'rxjs';
|
|
5
6
|
import { deepmerge } from '@odx/angular/internal';
|
|
@@ -7,6 +8,7 @@ import { deepmerge } from '@odx/angular/internal';
|
|
|
7
8
|
class DynamicViewComponent {
|
|
8
9
|
constructor() {
|
|
9
10
|
this.element = injectElement();
|
|
11
|
+
this.sanitizer = inject(DomSanitizer);
|
|
10
12
|
this.currentSubscription = null;
|
|
11
13
|
}
|
|
12
14
|
set content(value) {
|
|
@@ -25,7 +27,7 @@ class DynamicViewComponent {
|
|
|
25
27
|
this.currentSubscription = null;
|
|
26
28
|
}
|
|
27
29
|
setContent(value) {
|
|
28
|
-
this.element.nativeElement.innerHTML = value;
|
|
30
|
+
this.element.nativeElement.innerHTML = this.sanitizer.sanitize(SecurityContext.HTML, value) ?? '';
|
|
29
31
|
}
|
|
30
32
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DynamicViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
33
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.18", type: DynamicViewComponent, isStandalone: true, selector: "odx-dynamic-view", inputs: { content: "content" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
@@ -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","\nimport { inject, InjectionToken, DOCUMENT } 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}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B;gBAChB,IAAI,EAAE,IAAI,CAAC,aAAa;AACzB,aAAA,CAAC;QACJ;IACF;IAEQ,OAAO,GAAA;AACb,QAAA,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE;AAC9B,QAAA,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE;AACvB,QAAA,IAAI,CAAC,cAAc,GAAG,IAAI;AAC1B,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;IACrB;+GA1GW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;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;;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;;sBAeE,KAAK;uBAAC,gBAAgB;;sBAWtB,KAAK;uBAAC,wBAAwB;;sBAU9B,KAAK;uBAAC,uBAAuB;;;ACpDhC;;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, inject, Input, OnDestroy, SecurityContext, ViewEncapsulation } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\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 readonly sanitizer = inject(DomSanitizer);\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 = this.sanitizer.sanitize(SecurityContext.HTML, 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","\nimport { inject, InjectionToken, DOCUMENT } 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.view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ive?.isActiveChange.pipe(this.takeUntilDestroyed(), filter(Boolean)).subscribe(() => {
|
|
57
|
-
this.
|
|
57
|
+
if (!this.disabled)
|
|
58
|
+
this.tabBar.activateItem(this);
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
@@ -72,7 +73,7 @@ let TabBarItemComponent = class TabBarItemComponent {
|
|
|
72
73
|
deferFn(() => (this.isActive = false));
|
|
73
74
|
}
|
|
74
75
|
onClick() {
|
|
75
|
-
if (this.disabled)
|
|
76
|
+
if (this.disabled || this.routerLinkActive)
|
|
76
77
|
return;
|
|
77
78
|
this.tabBar.activateItem(this);
|
|
78
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-tab-bar.mjs","sources":["../../../../libs/angular/components/tab-bar/src/lib/tab-bar.config.ts","../../../../libs/angular/components/tab-bar/src/lib/components/tab-bar-item/tab-bar-item.component.ts","../../../../libs/angular/components/tab-bar/src/lib/components/tab-bar-item/tab-bar-item.component.html","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.component.ts","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.component.html","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.module.ts","../../../../libs/angular/components/tab-bar/src/odx-angular-components-tab-bar.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { TabBarComponent } from './tab-bar.component';\n\nexport const TAB_BAR = new InjectionToken<TabBarComponent>('tabBar');\n","import { Highlightable } from '@angular/cdk/a11y';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, ElementRef, inject, input, OnInit, output, ViewEncapsulation } from '@angular/core';\nimport { RouterLinkActive } from '@angular/router';\nimport { DisabledController } from '@odx/angular';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, untilDestroyed } from '@odx/angular/utils';\nimport { filter } from 'rxjs';\nimport { TAB_BAR } from '../../tab-bar.config';\n\n/**\n * Represents an individual tab item in a tab bar interface, providing functionalities\n * for activation, deactivation, and optional closing of the tab. This component is designed\n * to be used within a `TabBarComponent` to create a complete tabbed interface.\n *\n * It supports disabled state management through `DisabledController`, allowing the tab to be\n * disabled based on parent component states or its own `disabled` input property.\n *\n * The component integrates with Angular's `RouterLinkActive` to automatically set active\n * styles based on the current router state, enhancing SPA navigation experiences.\n */\n@CSSComponent('tab-bar-item')\n@Component({\n selector: 'odx-tab-bar-item',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './tab-bar-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DisabledController.connect()],\n host: {\n '[class.is-disabled]': 'disabled',\n '[class.is-active]': 'isActive',\n '[attr.aria-selected]': 'isActive',\n '[class.is-closable]': 'closable()',\n role: 'tab',\n '(click)': 'onClick()',\n },\n})\nexport class TabBarItemComponent implements Highlightable, OnInit {\n private readonly disabledController = DisabledController.inject();\n private readonly tabBar = inject(TAB_BAR);\n private readonly routerLinkActive = inject(RouterLinkActive, { optional: true, self: true });\n private readonly takeUntilDestroyed = untilDestroyed();\n\n protected isActive = false;\n\n public readonly element: ElementRef<HTMLElement> = inject(ElementRef);\n\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Indicates if the tab can be closed. This controls the visibility of the close button\n * and enables the emission of the `tabClose` event when the tab is closed.\n *\n * @type {boolean}\n * @default false\n */\n public closable = input(false, { transform: booleanAttribute });\n\n /**\n * Event emitter that fires when the tab is closed. It emits the instance of the tab item component.\n *\n * @emits {TabBarItemComponent}\n */\n public tabClose = output<TabBarItemComponent>();\n\n public ngOnInit(): void {\n this.routerLinkActive?.isActiveChange.pipe(this.takeUntilDestroyed(), filter(Boolean)).subscribe(() => {\n this.onClick();\n });\n }\n\n /**\n * Sets the tab as active and applies corresponding styles. This method is part of the\n * `Highlightable` interface, allowing the tab bar to manage active states.\n */\n public setActiveStyles(): void {\n deferFn(() => (this.isActive = true));\n }\n\n /**\n * Sets the tab as inactive and removes corresponding active styles. This method is part of the\n * `Highlightable` interface.\n */\n public setInactiveStyles(): void {\n deferFn(() => (this.isActive = false));\n }\n\n protected onClick(): void {\n if (this.disabled) return;\n this.tabBar.activateItem(this);\n }\n\n protected handleClose(event: Event): void {\n event.stopPropagation();\n if (this.disabled || !this.closable()) return;\n this.tabBar.removeItem(this);\n this.tabClose.emit(this);\n }\n}\n","<ng-content select=\"odx-icon\" />\n<div class=\"odx-tab-bar-item__label\"><ng-content /></div>\n@if (closable()) {\n <odx-icon name=\"core::close\" size=\"sm\" (click)=\"handleClose($event)\" />\n}\n","import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n effect,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { ActiveIndicatorDirective } from '@odx/angular/cdk/active-indicator';\nimport { ScrollableService } from '@odx/angular/cdk/scrollable';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { fromElementResize$ } from '@odx/angular/rxjs';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { distinctUntilChanged, filter, merge, skip, tap } from 'rxjs';\nimport { TabBarItemComponent } from './components';\nimport { TabChangeEvent } from './models';\nimport { TAB_BAR } from './tab-bar.config';\n\n/**\n * `TabBarComponent` creates a dynamic and accessible tab bar interface,\n * facilitating the management and interaction with a collection of tabs.\n * It supports keyboard navigation, dynamic tab management, and responsive overflow actions.\n *\n * The component integrates with Angular's ContentChildren to dynamically manage the tabs based on their content.\n * It uses ActiveDescendantKeyManager from Angular CDK for managing focus and keyboard navigation,\n * making it accessible and user-friendly. Additionally, it handles overflow with navigational arrows,\n * allowing for a smooth user experience even with a large number of tabs.\n */\n@CSSComponent('tab-bar')\n@Component({\n selector: 'odx-tab-bar',\n standalone: true,\n imports: [IconComponent, ActiveIndicatorDirective],\n templateUrl: './tab-bar.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: TAB_BAR, useExisting: forwardRef(() => TabBarComponent) }, ScrollableService],\n host: {\n role: 'tabpanel',\n tabindex: '0',\n '[class.odx-tab-bar--overflow-left]': '!!prevTab()',\n '[class.odx-tab-bar--overflow-right]': '!!nextTab()',\n '(keydown)': 'onKeydown($event)',\n '(focus)': 'onFocused()',\n },\n})\nexport class TabBarComponent {\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly scrollableService = inject(ScrollableService);\n\n protected readonly nextTab = this.scrollableService.nextItem;\n protected readonly prevTab = this.scrollableService.prevItem;\n\n protected readonly tabs = contentChildren<TabBarItemComponent>(TabBarItemComponent);\n protected readonly activeItem = computed(() => this.tabs().at(this.selectedIndex()) ?? null);\n protected readonly keyManager: ActiveDescendantKeyManager<TabBarItemComponent> = new ActiveDescendantKeyManager(this.tabs, inject(Injector))\n .withWrap()\n .withHomeAndEnd()\n .withHorizontalOrientation('ltr')\n .withVerticalOrientation(false);\n\n protected readonly scrollContainerElement = viewChild.required<ElementRef<HTMLElement>>('scrollContainer');\n public readonly element = injectElement();\n\n /**\n * Index of the currently selected tab. Use this property to programmatically\n * change the active tab. It responds to changes by updating the active state of the corresponding\n * tab item and adjusting the view if necessary.\n *\n * @type {number}\n * @example\n * Programmatically select the second tab (index starts from 0):\n * ```html\n * <odx-tab-bar [selectedIndex]=\"1\"></odx-tab-bar>\n * ```\n */\n public selectedIndex = model<number>(0);\n\n /**\n * An EventEmitter that emits whenever a new tab is selected. It provides the `TabChangeEvent`\n * which contains the index of the newly selected tab and the instance of the corresponding\n * `TabBarItemComponent`. Subscribe to this output to perform actions when the active tab changes.\n *\n * @emits {TabChangeEvent}\n * @example\n * ```html\n * <odx-tab-bar (selectedTabChanged)=\"onTabChange($event)\"></odx-tab-bar>\n * ```\n *\n * ```ts\n * onTabChange(event: TabChangeEvent): void {\n * console.log(`New active tab index: ${event.selectedIndex}`);\n * }\n * ```\n */\n public selectedTabChanged = output<TabChangeEvent>();\n\n constructor() {\n const tabState = computed(() => ({\n selectedIndex: this.selectedIndex(),\n selectedTab: this.activeItem(),\n }));\n\n merge(\n this.keyManager.change.pipe(tap((index) => this.selectedIndex.set(index ?? -1))),\n fromElementResize$(this.element.nativeElement, 600).pipe(\n tap(() => this.scrollableService.scrollActiveItemIntoHorizontalView(this.activeItem()?.element.nativeElement ?? null)),\n ),\n toObservable(tabState).pipe(\n skip(1),\n distinctUntilChanged((a, b) => a.selectedIndex === b.selectedIndex),\n filter(({ selectedTab }) => !selectedTab?.disabled),\n tap((state) => {\n this.selectedTabChanged.emit(state);\n this.scrollableService.scrollActiveItemIntoHorizontalView(state.selectedTab?.element.nativeElement ?? null);\n }),\n ),\n )\n .pipe(this.takeUntilDestroyed())\n .subscribe();\n\n effect(() => {\n this.keyManager.setActiveItem(this.selectedIndex());\n });\n\n effect(() => {\n this.scrollableService.observe(this.scrollContainerElement(), this.tabs());\n });\n }\n\n /**\n * Activates the specified tab item, making it the currently selected tab.\n * If the item is already active, no action is taken.\n *\n * @param {TabBarItemComponent | null} item - The tab item to activate.\n */\n public activateItem(item?: TabBarItemComponent | null): void {\n if (item === this.keyManager?.activeItem) return;\n const selectedIndex = item ? this.tabs().indexOf(item) : -1;\n this.selectedIndex.set(selectedIndex);\n }\n\n /**\n * Fires when the specified tab item is removed from the tab bar.\n * If the item is currently active, the previous tab is activated.\n *\n * @param {TabBarItemComponent} item - The tab item to remove.\n */\n public removeItem(item: TabBarItemComponent): void {\n if (this.keyManager?.activeItem !== item) return;\n this.keyManager?.setPreviousItemActive();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n this.keyManager?.onKeydown(event);\n }\n\n protected onFocused(): void {\n const activeItem = this.activeItem()?.element.nativeElement;\n if (!activeItem) return;\n if (this.scrollableService.visibleItems().includes(activeItem)) return;\n this.scrollableService.scrollActiveItemIntoHorizontalView(activeItem);\n }\n\n protected scrollTabs(direction: 1 | -1 = 1): void {\n this.scrollableService.scroll(direction);\n }\n}\n","<button #tabAction class=\"odx-tab-bar__action odx-tab-bar__action--prev\" [class.is-active]=\"!!prevTab()\" (click)=\"scrollTabs(-1)\" tabindex=\"-1\">\n <odx-icon class=\"tab-bar-action-icon\" name=\"core::chevron-left\" />\n</button>\n<div class=\"odx-tab-bar__inner\" #scrollContainer tabindex=\"-1\">\n <div class=\"odx-tab-bar__panel\" role=\"tablist\" #tabBarPanel>\n <ng-content />\n <div class=\"odx-tab-bar__indicator\" [odxActiveIndicator]=\"activeItem()?.element?.nativeElement\" odxActiveIndicatorPosition=\"start\"></div>\n </div>\n</div>\n<button #tabAction class=\"odx-tab-bar__action odx-tab-bar__action--next\" [class.is-active]=\"!!nextTab()\" (click)=\"scrollTabs()\" tabindex=\"-1\">\n <odx-icon class=\"tab-bar-action-icon\" name=\"core::chevron-right\" />\n</button>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { TabBarItemComponent } from './components';\nimport { TabBarComponent } from './tab-bar.component';\n\nconst modules = [TabBarComponent, TabBarItemComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class TabBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGO,MAAM,OAAO,GAAG,IAAI,cAAc,CAAkB,QAAQ,CAAC;;ACOpE;;;;;;;;;;AAUG;AAmBI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB,CAAA;AAAzB,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE;AAChD,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;AACxB,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAA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A,CAAA,CAAA;;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;;;ACVD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-tab-bar.mjs","sources":["../../../../libs/angular/components/tab-bar/src/lib/tab-bar.config.ts","../../../../libs/angular/components/tab-bar/src/lib/components/tab-bar-item/tab-bar-item.component.ts","../../../../libs/angular/components/tab-bar/src/lib/components/tab-bar-item/tab-bar-item.component.html","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.component.ts","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.component.html","../../../../libs/angular/components/tab-bar/src/lib/tab-bar.module.ts","../../../../libs/angular/components/tab-bar/src/odx-angular-components-tab-bar.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { TabBarComponent } from './tab-bar.component';\n\nexport const TAB_BAR = new InjectionToken<TabBarComponent>('tabBar');\n","import { Highlightable } from '@angular/cdk/a11y';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, ElementRef, inject, input, OnInit, output, ViewEncapsulation } from '@angular/core';\nimport { RouterLinkActive } from '@angular/router';\nimport { DisabledController } from '@odx/angular';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, untilDestroyed } from '@odx/angular/utils';\nimport { filter } from 'rxjs';\nimport { TAB_BAR } from '../../tab-bar.config';\n\n/**\n * Represents an individual tab item in a tab bar interface, providing functionalities\n * for activation, deactivation, and optional closing of the tab. This component is designed\n * to be used within a `TabBarComponent` to create a complete tabbed interface.\n *\n * It supports disabled state management through `DisabledController`, allowing the tab to be\n * disabled based on parent component states or its own `disabled` input property.\n *\n * The component integrates with Angular's `RouterLinkActive` to automatically set active\n * styles based on the current router state, enhancing SPA navigation experiences.\n */\n@CSSComponent('tab-bar-item')\n@Component({\n selector: 'odx-tab-bar-item',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './tab-bar-item.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [DisabledController.connect()],\n host: {\n '[class.is-disabled]': 'disabled',\n '[class.is-active]': 'isActive',\n '[attr.aria-selected]': 'isActive',\n '[class.is-closable]': 'closable()',\n role: 'tab',\n '(click)': 'onClick()',\n },\n})\nexport class TabBarItemComponent implements Highlightable, OnInit {\n private readonly disabledController = DisabledController.inject();\n private readonly tabBar = inject(TAB_BAR);\n private readonly routerLinkActive = inject(RouterLinkActive, { optional: true, self: true });\n private readonly takeUntilDestroyed = untilDestroyed();\n\n protected isActive = false;\n\n public readonly element: ElementRef<HTMLElement> = inject(ElementRef);\n\n public get disabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n /**\n * Indicates if the tab can be closed. This controls the visibility of the close button\n * and enables the emission of the `tabClose` event when the tab is closed.\n *\n * @type {boolean}\n * @default false\n */\n public closable = input(false, { transform: booleanAttribute });\n\n /**\n * Event emitter that fires when the tab is closed. It emits the instance of the tab item component.\n *\n * @emits {TabBarItemComponent}\n */\n public tabClose = output<TabBarItemComponent>();\n\n public ngOnInit(): void {\n this.routerLinkActive?.isActiveChange.pipe(this.takeUntilDestroyed(), filter(Boolean)).subscribe(() => {\n if (!this.disabled) this.tabBar.activateItem(this);\n });\n }\n\n /**\n * Sets the tab as active and applies corresponding styles. This method is part of the\n * `Highlightable` interface, allowing the tab bar to manage active states.\n */\n public setActiveStyles(): void {\n deferFn(() => (this.isActive = true));\n }\n\n /**\n * Sets the tab as inactive and removes corresponding active styles. This method is part of the\n * `Highlightable` interface.\n */\n public setInactiveStyles(): void {\n deferFn(() => (this.isActive = false));\n }\n\n protected onClick(): void {\n if (this.disabled || this.routerLinkActive) return;\n this.tabBar.activateItem(this);\n }\n\n protected handleClose(event: Event): void {\n event.stopPropagation();\n if (this.disabled || !this.closable()) return;\n this.tabBar.removeItem(this);\n this.tabClose.emit(this);\n }\n}\n","<ng-content select=\"odx-icon\" />\n<div class=\"odx-tab-bar-item__label\"><ng-content /></div>\n@if (closable()) {\n <odx-icon name=\"core::close\" size=\"sm\" (click)=\"handleClose($event)\" />\n}\n","import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n effect,\n ElementRef,\n forwardRef,\n inject,\n Injector,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { ActiveIndicatorDirective } from '@odx/angular/cdk/active-indicator';\nimport { ScrollableService } from '@odx/angular/cdk/scrollable';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { fromElementResize$ } from '@odx/angular/rxjs';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { distinctUntilChanged, filter, merge, skip, tap } from 'rxjs';\nimport { TabBarItemComponent } from './components';\nimport { TabChangeEvent } from './models';\nimport { TAB_BAR } from './tab-bar.config';\n\n/**\n * `TabBarComponent` creates a dynamic and accessible tab bar interface,\n * facilitating the management and interaction with a collection of tabs.\n * It supports keyboard navigation, dynamic tab management, and responsive overflow actions.\n *\n * The component integrates with Angular's ContentChildren to dynamically manage the tabs based on their content.\n * It uses ActiveDescendantKeyManager from Angular CDK for managing focus and keyboard navigation,\n * making it accessible and user-friendly. Additionally, it handles overflow with navigational arrows,\n * allowing for a smooth user experience even with a large number of tabs.\n */\n@CSSComponent('tab-bar')\n@Component({\n selector: 'odx-tab-bar',\n standalone: true,\n imports: [IconComponent, ActiveIndicatorDirective],\n templateUrl: './tab-bar.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: TAB_BAR, useExisting: forwardRef(() => TabBarComponent) }, ScrollableService],\n host: {\n role: 'tabpanel',\n tabindex: '0',\n '[class.odx-tab-bar--overflow-left]': '!!prevTab()',\n '[class.odx-tab-bar--overflow-right]': '!!nextTab()',\n '(keydown)': 'onKeydown($event)',\n '(focus)': 'onFocused()',\n },\n})\nexport class TabBarComponent {\n private readonly takeUntilDestroyed = untilDestroyed();\n private readonly scrollableService = inject(ScrollableService);\n\n protected readonly nextTab = this.scrollableService.nextItem;\n protected readonly prevTab = this.scrollableService.prevItem;\n\n protected readonly tabs = contentChildren<TabBarItemComponent>(TabBarItemComponent);\n protected readonly activeItem = computed(() => this.tabs().at(this.selectedIndex()) ?? null);\n protected readonly keyManager: ActiveDescendantKeyManager<TabBarItemComponent> = new ActiveDescendantKeyManager(this.tabs, inject(Injector))\n .withWrap()\n .withHomeAndEnd()\n .withHorizontalOrientation('ltr')\n .withVerticalOrientation(false);\n\n protected readonly scrollContainerElement = viewChild.required<ElementRef<HTMLElement>>('scrollContainer');\n public readonly element = injectElement();\n\n /**\n * Index of the currently selected tab. Use this property to programmatically\n * change the active tab. It responds to changes by updating the active state of the corresponding\n * tab item and adjusting the view if necessary.\n *\n * @type {number}\n * @example\n * Programmatically select the second tab (index starts from 0):\n * ```html\n * <odx-tab-bar [selectedIndex]=\"1\"></odx-tab-bar>\n * ```\n */\n public selectedIndex = model<number>(0);\n\n /**\n * An EventEmitter that emits whenever a new tab is selected. It provides the `TabChangeEvent`\n * which contains the index of the newly selected tab and the instance of the corresponding\n * `TabBarItemComponent`. Subscribe to this output to perform actions when the active tab changes.\n *\n * @emits {TabChangeEvent}\n * @example\n * ```html\n * <odx-tab-bar (selectedTabChanged)=\"onTabChange($event)\"></odx-tab-bar>\n * ```\n *\n * ```ts\n * onTabChange(event: TabChangeEvent): void {\n * console.log(`New active tab index: ${event.selectedIndex}`);\n * }\n * ```\n */\n public selectedTabChanged = output<TabChangeEvent>();\n\n constructor() {\n const tabState = computed(() => ({\n selectedIndex: this.selectedIndex(),\n selectedTab: this.activeItem(),\n }));\n\n merge(\n this.keyManager.change.pipe(tap((index) => this.selectedIndex.set(index ?? -1))),\n fromElementResize$(this.element.nativeElement, 600).pipe(\n tap(() => this.scrollableService.scrollActiveItemIntoHorizontalView(this.activeItem()?.element.nativeElement ?? null)),\n ),\n toObservable(tabState).pipe(\n skip(1),\n distinctUntilChanged((a, b) => a.selectedIndex === b.selectedIndex),\n filter(({ selectedTab }) => !selectedTab?.disabled),\n tap((state) => {\n this.selectedTabChanged.emit(state);\n this.scrollableService.scrollActiveItemIntoHorizontalView(state.selectedTab?.element.nativeElement ?? null);\n }),\n ),\n )\n .pipe(this.takeUntilDestroyed())\n .subscribe();\n\n effect(() => {\n this.keyManager.setActiveItem(this.selectedIndex());\n });\n\n effect(() => {\n this.scrollableService.observe(this.scrollContainerElement(), this.tabs());\n });\n }\n\n /**\n * Activates the specified tab item, making it the currently selected tab.\n * If the item is already active, no action is taken.\n *\n * @param {TabBarItemComponent | null} item - The tab item to activate.\n */\n public activateItem(item?: TabBarItemComponent | null): void {\n if (item === this.keyManager?.activeItem) return;\n const selectedIndex = item ? this.tabs().indexOf(item) : -1;\n this.selectedIndex.set(selectedIndex);\n }\n\n /**\n * Fires when the specified tab item is removed from the tab bar.\n * If the item is currently active, the previous tab is activated.\n *\n * @param {TabBarItemComponent} item - The tab item to remove.\n */\n public removeItem(item: TabBarItemComponent): void {\n if (this.keyManager?.activeItem !== item) return;\n this.keyManager?.setPreviousItemActive();\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n this.keyManager?.onKeydown(event);\n }\n\n protected onFocused(): void {\n const activeItem = this.activeItem()?.element.nativeElement;\n if (!activeItem) return;\n if (this.scrollableService.visibleItems().includes(activeItem)) return;\n this.scrollableService.scrollActiveItemIntoHorizontalView(activeItem);\n }\n\n protected scrollTabs(direction: 1 | -1 = 1): void {\n this.scrollableService.scroll(direction);\n }\n}\n","<button #tabAction class=\"odx-tab-bar__action odx-tab-bar__action--prev\" [class.is-active]=\"!!prevTab()\" (click)=\"scrollTabs(-1)\" tabindex=\"-1\">\n <odx-icon class=\"tab-bar-action-icon\" name=\"core::chevron-left\" />\n</button>\n<div class=\"odx-tab-bar__inner\" #scrollContainer tabindex=\"-1\">\n <div class=\"odx-tab-bar__panel\" role=\"tablist\" #tabBarPanel>\n <ng-content />\n <div class=\"odx-tab-bar__indicator\" [odxActiveIndicator]=\"activeItem()?.element?.nativeElement\" odxActiveIndicatorPosition=\"start\"></div>\n </div>\n</div>\n<button #tabAction class=\"odx-tab-bar__action odx-tab-bar__action--next\" [class.is-active]=\"!!nextTab()\" (click)=\"scrollTabs()\" tabindex=\"-1\">\n <odx-icon class=\"tab-bar-action-icon\" name=\"core::chevron-right\" />\n</button>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { TabBarItemComponent } from './components';\nimport { TabBarComponent } from './tab-bar.component';\n\nconst modules = [TabBarComponent, TabBarItemComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class TabBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGO,MAAM,OAAO,GAAG,IAAI,cAAc,CAAkB,QAAQ,CAAC;;ACOpE;;;;;;;;;;AAUG;AAmBI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB,CAAA;AAAzB,IAAA,WAAA,GAAA;AACY,QAAA,IAAA,CAAA,kBAAkB,GAAG,kBAAkB,CAAC,MAAM,EAAE;AAChD,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;AACxB,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QAC3E,IAAA,CAAA,kBAAkB,GAAG,cAAc,EAAE;QAE5C,IAAA,CAAA,QAAQ,GAAG,KAAK;AAEV,QAAA,IAAA,CAAA,OAAO,GAA4B,MAAM,CAAC,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