@spartan-ng/brain 1.6.0 → 1.6.2

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,4 +1,4 @@
1
- import { untracked, computed, InjectionToken, forwardRef, inject, ElementRef, PLATFORM_ID, DestroyRef, signal, afterNextRender, runInInjectionContext, Injector } from '@angular/core';
1
+ import { untracked, computed, InjectionToken, forwardRef, inject, ElementRef, PLATFORM_ID, DestroyRef, signal, afterNextRender, runInInjectionContext, Injector, SimpleChange } from '@angular/core';
2
2
  import { Observable, pipe, merge, fromEvent } from 'rxjs';
3
3
  import { map, filter, distinctUntilChanged, takeUntil, debounceTime } from 'rxjs/operators';
4
4
  import { toObservable, toSignal } from '@angular/core/rxjs-interop';
@@ -280,6 +280,20 @@ const createMenuPosition = (align, side) => {
280
280
  return createPositions('end', verticalAlign, 'start', verticalAlign);
281
281
  }
282
282
  };
283
+ /**
284
+ * Applies the given positions to a CDK menu trigger.
285
+ *
286
+ * CDK reads `menuPosition` only when it builds the overlay's `FlexibleConnectedPositionStrategy` (first
287
+ * open) and when its `ngOnChanges` runs. The trigger reuses a single overlay across opens, so a bare
288
+ * `menuPosition` assignment is silently ignored once the overlay exists - e.g. when `side`/`align`
289
+ * change at runtime, the next open keeps the position from the first open. Assigning the property and
290
+ * poking CDK's change handler refreshes an already-created overlay (whether open or reused) so the new
291
+ * positions take effect. When no overlay exists yet the assignment alone is enough.
292
+ */
293
+ const updateMenuPosition = (trigger, position) => {
294
+ trigger.menuPosition = position;
295
+ trigger.ngOnChanges({ menuPosition: new SimpleChange(undefined, position, false) });
296
+ };
283
297
 
284
298
  function stringifyAsLabel(item, itemToStringLabel) {
285
299
  if (itemToStringLabel && item !== null && item !== undefined) {
@@ -381,5 +395,5 @@ function getFallbackTimeout(animations) {
381
395
  * Generated bundle index. Do not edit.
382
396
  */
383
397
 
384
- export { EXPOSES_SIDE_TOKEN, EXPOSES_STATE_TOKEN, MENU_SIDE, SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN, SET_TABLE_CLASSES_TOKEN, brnDevMode, brnZoneFree, brnZoneFull, brnZoneOptimized, computedPrevious, createHoverObservable, createMenuPosition, cssClassesToArray, debouncedSignal, deriveMenuSideFromTransformOrigin, getActiveElementAnimations, injectContentDimensions, injectCustomClassSettable, injectElementSize, injectExposedSideProvider, injectExposesStateProvider, injectSkipDelay, injectTableClassesSettable, isElement, provideCustomClassSettable, provideCustomClassSettableExisting, provideExposedSideProvider, provideExposedSideProviderExisting, provideExposesStateProvider, provideExposesStateProviderExisting, provideTableClassesSettable, provideTableClassesSettableExisting, serializeValue, stringifyAsLabel, waitForAnimations, waitForElementAnimations };
398
+ export { EXPOSES_SIDE_TOKEN, EXPOSES_STATE_TOKEN, MENU_SIDE, SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN, SET_TABLE_CLASSES_TOKEN, brnDevMode, brnZoneFree, brnZoneFull, brnZoneOptimized, computedPrevious, createHoverObservable, createMenuPosition, cssClassesToArray, debouncedSignal, deriveMenuSideFromTransformOrigin, getActiveElementAnimations, injectContentDimensions, injectCustomClassSettable, injectElementSize, injectExposedSideProvider, injectExposesStateProvider, injectSkipDelay, injectTableClassesSettable, isElement, provideCustomClassSettable, provideCustomClassSettableExisting, provideExposedSideProvider, provideExposedSideProviderExisting, provideExposesStateProvider, provideExposesStateProviderExisting, provideTableClassesSettable, provideTableClassesSettableExisting, serializeValue, stringifyAsLabel, updateMenuPosition, waitForAnimations, waitForElementAnimations };
385
399
  //# sourceMappingURL=spartan-ng-brain-core.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-core.mjs","sources":["../../../../libs/brain/core/src/helpers/computed-previous.ts","../../../../libs/brain/core/src/helpers/zone-free.ts","../../../../libs/brain/core/src/helpers/create-hover-observable.ts","../../../../libs/brain/core/src/helpers/css-classes-to-array.ts","../../../../libs/brain/core/src/helpers/create-injection-token.ts","../../../../libs/brain/core/src/helpers/custom-element-class-settable.ts","../../../../libs/brain/core/src/helpers/debounced-signal.ts","../../../../libs/brain/core/src/helpers/dev-mode.ts","../../../../libs/brain/core/src/helpers/exposes-side.ts","../../../../libs/brain/core/src/helpers/exposes-state.ts","../../../../libs/brain/core/src/helpers/inject-content-dimensions.ts","../../../../libs/brain/core/src/helpers/inject-element-size.ts","../../../../libs/brain/core/src/helpers/menu-align.ts","../../../../libs/brain/core/src/helpers/resolve-value-label.ts","../../../../libs/brain/core/src/helpers/skip-delay.ts","../../../../libs/brain/core/src/helpers/table-classes-settable.ts","../../../../libs/brain/core/src/helpers/wait-for-element-animations.ts","../../../../libs/brain/core/src/spartan-ng-brain-core.ts"],"sourcesContent":["import { computed, type Signal, untracked } from '@angular/core';\n\n/**\n * Returns a signal that emits the previous value of the given signal.\n * The first time the signal is emitted, the previous value will be the same as the current value.\n *\n * @example\n * ```ts\n * const value = signal(0);\n * const previous = computedPrevious(value);\n *\n * effect(() => {\n * console.log('Current value:', value());\n * console.log('Previous value:', previous());\n * });\n *\n * Logs:\n * // Current value: 0\n * // Previous value: 0\n *\n * value.set(1);\n *\n * Logs:\n * // Current value: 1\n * // Previous value: 0\n *\n * value.set(2);\n *\n * Logs:\n * // Current value: 2\n * // Previous value: 1\n *```\n *\n * @param computation Signal to compute previous value for\n * @returns Signal that emits previous value of `s`\n */\nexport function computedPrevious<T>(computation: Signal<T>): Signal<T> {\n\tlet current = null as T;\n\tlet previous = untracked(() => computation()); // initial value is the current value\n\n\treturn computed(() => {\n\t\tcurrent = computation();\n\t\tconst result = previous;\n\t\tprevious = current;\n\t\treturn result;\n\t});\n}\n","/**\n * We are building on shoulders of giants here and use the implementation provided by the incredible TaigaUI\n * team: https://github.com/taiga-family/taiga-ui/blob/main/projects/cdk/observables/zone-free.ts#L22\n * Check them out! Give them a try! Leave a star! Their work is incredible!\n */\nimport type { NgZone } from '@angular/core';\nimport { type MonoTypeOperatorFunction, Observable, pipe } from 'rxjs';\n\nexport function brnZoneFull<T>(zone: NgZone): MonoTypeOperatorFunction<T> {\n\treturn (source) =>\n\t\tnew Observable((subscriber) =>\n\t\t\tsource.subscribe({\n\t\t\t\tnext: (value) => zone.run(() => subscriber.next(value)),\n\t\t\t\terror: (error: unknown) => zone.run(() => subscriber.error(error)),\n\t\t\t\tcomplete: () => zone.run(() => subscriber.complete()),\n\t\t\t}),\n\t\t);\n}\n\nexport function brnZoneFree<T>(zone: NgZone): MonoTypeOperatorFunction<T> {\n\treturn (source) => new Observable((subscriber) => zone.runOutsideAngular(() => source.subscribe(subscriber)));\n}\n\nexport function brnZoneOptimized<T>(zone: NgZone): MonoTypeOperatorFunction<T> {\n\treturn pipe(brnZoneFree(zone), brnZoneFull(zone));\n}\n","import type { NgZone } from '@angular/core';\nimport { type Observable, type Subject, fromEvent, merge } from 'rxjs';\nimport { distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';\nimport { brnZoneOptimized } from './zone-free';\n\nfunction movedOut({ currentTarget, relatedTarget }: MouseEvent): boolean {\n\treturn !isElement(relatedTarget) || !isElement(currentTarget) || !currentTarget.contains(relatedTarget);\n}\n\nexport function isElement(node?: Element | EventTarget | Node | null): node is Element {\n\treturn !!node && 'nodeType' in node && node.nodeType === Node.ELEMENT_NODE;\n}\n\nexport const createHoverObservable = (\n\tnativeElement: HTMLElement,\n\tzone: NgZone,\n\tdestroyed$: Subject<void>,\n): Observable<{ hover: boolean; relatedTarget?: EventTarget | null }> => {\n\treturn merge(\n\t\tfromEvent(nativeElement, 'mouseenter').pipe(map(() => ({ hover: true }))),\n\t\tfromEvent<MouseEvent>(nativeElement, 'mouseleave').pipe(\n\t\t\tmap((e) => ({ hover: false, relatedTarget: e.relatedTarget })),\n\t\t),\n\t\t// Hello, Safari\n\t\tfromEvent<MouseEvent>(nativeElement, 'mouseout').pipe(\n\t\t\tfilter(movedOut),\n\t\t\tmap((e) => ({ hover: false, relatedTarget: e.relatedTarget })),\n\t\t),\n\t).pipe(distinctUntilChanged(), brnZoneOptimized(zone), takeUntil(destroyed$));\n};\n","export function cssClassesToArray(classes: string | string[] | null | undefined, defaultClass = ''): string[] {\n\tconst value = classes ?? defaultClass;\n\treturn (Array.isArray(value) ? value : [value]).flatMap((className) => className.split(/\\s+/).filter(Boolean));\n}\n","import { type InjectOptions, InjectionToken, type Provider, type Type, forwardRef, inject } from '@angular/core';\n\ntype InjectFn<TTokenValue> = {\n\t(): TTokenValue;\n\t(injectOptions: InjectOptions & { optional?: false }): TTokenValue;\n\t(injectOptions: InjectOptions & { optional: true }): TTokenValue | null;\n};\n\ntype ProvideFn<TTokenValue> = (value: TTokenValue) => Provider;\n\ntype ProvideExistingFn<TTokenValue> = (valueFactory: () => Type<TTokenValue>) => Provider;\n\nexport type CreateInjectionTokenReturn<TTokenValue> = [\n\tInjectFn<TTokenValue>,\n\tProvideFn<TTokenValue>,\n\tProvideExistingFn<TTokenValue>,\n\tInjectionToken<TTokenValue>,\n];\n\nexport function createInjectionToken<TTokenValue>(description: string): CreateInjectionTokenReturn<TTokenValue> {\n\tconst token = new InjectionToken<TTokenValue>(description);\n\n\tconst provideFn = (value: TTokenValue) => {\n\t\treturn { provide: token, useValue: value };\n\t};\n\n\tconst provideExistingFn = (value: () => TTokenValue) => {\n\t\treturn { provide: token, useExisting: forwardRef(value) };\n\t};\n\n\tconst injectFn = (options: InjectOptions = {}) => {\n\t\treturn inject(token, options);\n\t};\n\n\treturn [injectFn, provideFn, provideExistingFn, token] as CreateInjectionTokenReturn<TTokenValue>;\n}\n","import { createInjectionToken } from './create-injection-token';\n\nexport interface CustomElementClassSettable {\n\tsetClassToCustomElement: (newClass: string) => void;\n}\n\nexport const [\n\tinjectCustomClassSettable,\n\tprovideCustomClassSettable,\n\tprovideCustomClassSettableExisting,\n\tSET_CLASS_TO_CUSTOM_ELEMENT_TOKEN,\n] = createInjectionToken<CustomElementClassSettable>('@spartan-ng SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN');\n","import type { Signal } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\n/**\n * Creates a debounced version of a source signal.\n *\n * @param source - The input signal to debounce.\n * @param delay - Debounce time in milliseconds.\n * @returns A new signal that updates only after the source has stopped changing for `delay` ms.\n */\nexport function debouncedSignal<T>(source: Signal<T>, delay: number): Signal<T> {\n\tconst source$ = toObservable(source);\n\n\tconst debounced$ = source$.pipe(debounceTime(delay), distinctUntilChanged());\n\n\treturn toSignal(debounced$, { initialValue: source() });\n}\n","declare const ngDevMode: boolean;\n/**\n * Set by Angular to true when in development mode.\n * Allows for tree-shaking code that is only used in development.\n */\nexport const brnDevMode = ngDevMode;\n","import type { Signal } from '@angular/core';\nimport { createInjectionToken } from './create-injection-token';\n\nexport interface ExposesSide {\n\tside: Signal<'top' | 'bottom' | 'left' | 'right'>;\n}\n\nexport const [\n\tinjectExposedSideProvider,\n\tprovideExposedSideProvider,\n\tprovideExposedSideProviderExisting,\n\tEXPOSES_SIDE_TOKEN,\n] = createInjectionToken<ExposesSide>('@spartan-ng EXPOSES_SIDE_TOKEN');\n","import type { Signal } from '@angular/core';\nimport { createInjectionToken } from './create-injection-token';\n\nexport interface ExposesState {\n\tstate: Signal<'open' | 'closed'>;\n}\n\nexport const [\n\tinjectExposesStateProvider,\n\tprovideExposesStateProvider,\n\tprovideExposesStateProviderExisting,\n\tEXPOSES_STATE_TOKEN,\n] = createInjectionToken<ExposesState>('@spartan-ng EXPOSES_STATE_TOKEN');\n","import { isPlatformServer } from '@angular/common';\nimport { afterNextRender, DestroyRef, ElementRef, inject, PLATFORM_ID, type Signal, signal } from '@angular/core';\n\n/** Reactive natural size of a collapsible host's projected content, or `null` before measurement. */\nexport interface ContentDimensions {\n\twidth: Signal<number | null>;\n\theight: Signal<number | null>;\n}\n\n/**\n * Measures the natural size of a collapsible host's content via `scrollHeight` so it can animate\n * between `height: 0` and a measured pixel height - the whole content is covered, regardless of how\n * it is projected. A `ResizeObserver` on the content keeps the value live. SSR-safe; the host must\n * be a block-level element for `scrollHeight` to reflect its content.\n *\n * @returns Signals with the content's width and height in px, or `null` before measurement.\n */\nexport function injectContentDimensions(): ContentDimensions {\n\tconst host = inject(ElementRef).nativeElement as HTMLElement;\n\tconst platformId = inject(PLATFORM_ID);\n\tconst destroyRef = inject(DestroyRef);\n\n\tconst width = signal<number | null>(null);\n\tconst height = signal<number | null>(null);\n\n\tif (isPlatformServer(platformId)) {\n\t\treturn { width: width.asReadonly(), height: height.asReadonly() };\n\t}\n\n\tconst measure = (): void => {\n\t\t// Drop the clamped height for the read: scrollHeight is never smaller than the element's own\n\t\t// height, so while clamped it would only ever grow. `height: auto` lets it reflect the real\n\t\t// content size (and shrink). The read is synchronous, so the swap never paints.\n\t\tconst previousHeight = host.style.height;\n\t\thost.style.height = 'auto';\n\t\twidth.set(host.scrollWidth);\n\t\theight.set(host.scrollHeight);\n\t\thost.style.height = previousHeight;\n\t};\n\n\tafterNextRender({\n\t\tread: () => {\n\t\t\tmeasure();\n\t\t\tif (typeof ResizeObserver === 'undefined') return;\n\n\t\t\t// Observe the content wrapper (not the clamped/animated host) so re-measures fire on content\n\t\t\t// changes, never on the open/close height animation. Re-measure on a fresh frame rather than\n\t\t\t// inside the callback: measure() mutates the host's inline height, and doing that during\n\t\t\t// delivery trips \"ResizeObserver loop completed with undelivered notifications\".\n\t\t\tlet frame = 0;\n\t\t\tconst observer = new ResizeObserver(() => {\n\t\t\t\tcancelAnimationFrame(frame);\n\t\t\t\tframe = requestAnimationFrame(measure);\n\t\t\t});\n\t\t\tconst content = host.firstElementChild;\n\t\t\tif (content) {\n\t\t\t\tobserver.observe(content);\n\t\t\t}\n\t\t\tdestroyRef.onDestroy(() => {\n\t\t\t\tcancelAnimationFrame(frame);\n\t\t\t\tobserver.disconnect();\n\t\t\t});\n\t\t},\n\t});\n\n\treturn { width: width.asReadonly(), height: height.asReadonly() };\n}\n","import { isPlatformServer } from '@angular/common';\nimport {\n\tafterNextRender,\n\tDestroyRef,\n\tElementRef,\n\tinject,\n\tInjector,\n\tPLATFORM_ID,\n\trunInInjectionContext,\n\ttype Signal,\n\tsignal,\n\ttype WritableSignal,\n} from '@angular/core';\n\n/**\n * Returns a reactive signal that tracks the size of a DOM element.\n *\n * This function uses a shared {@link ResizeObserver} internally to monitor multiple elements efficiently.\n * The returned signal updates whenever the element's width or height changes. It is fully SSR-safe.\n *\n * @param options Optional {@link ElementSizeOptions} configuration object.\n * @param options.elementRef The {@link ElementRef} of the element to observe. Defaults to the {@link ElementRef} injected in the current context.\n * @param options.injector Optional custom {@link Injector} to run the function in. Defaults to the current injection context.\n *\n * @returns A readonly {@link Signal} containing `{ width, height }` of the element, or `undefined` if the element has not yet been measured or on the server.\n *\n * Based on https://github.com/radix-ui/primitives/blob/main/packages/react/use-size/src/use-size.tsx\n */\nexport function injectElementSize(\n\toptions: ElementSizeOptions = {},\n): Signal<{ width: number; height: number } | undefined> {\n\treturn runInInjectionContext(options.injector ?? inject(Injector), () => {\n\t\tconst elementRef = options.elementRef ?? inject(ElementRef);\n\t\tconst platformId = inject(PLATFORM_ID);\n\t\tconst destroyRef = inject(DestroyRef);\n\n\t\tconst element = elementRef.nativeElement;\n\t\tconst size = signal<{ width: number; height: number } | undefined>(undefined);\n\n\t\tif (isPlatformServer(platformId)) {\n\t\t\treturn size;\n\t\t}\n\n\t\tafterNextRender({\n\t\t\tread: () => {\n\t\t\t\t// Initial read\n\t\t\t\tconst rect = element.getBoundingClientRect();\n\t\t\t\tsize.set({\n\t\t\t\t\twidth: rect.width || element.offsetWidth,\n\t\t\t\t\theight: rect.height || element.offsetHeight,\n\t\t\t\t});\n\n\t\t\t\t// Register element in shared observer\n\t\t\t\tobserverMap.set(element, { element, size });\n\t\t\t\tgetSharedObserver().observe(element, { box: 'border-box' });\n\n\t\t\t\tdestroyRef.onDestroy(() => {\n\t\t\t\t\tgetSharedObserver().unobserve(element);\n\t\t\t\t\tobserverMap.delete(element);\n\n\t\t\t\t\t// Disconnect global observer if no elements left\n\t\t\t\t\tif (observerMap.size === 0 && sharedObserver) {\n\t\t\t\t\t\tsharedObserver.disconnect();\n\t\t\t\t\t\tsharedObserver = undefined;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\n\t\treturn size.asReadonly();\n\t});\n}\n\nconst observerMap = new Map<HTMLElement, SizeEntry>();\nlet sharedObserver: ResizeObserver | undefined;\n\nfunction getSharedObserver() {\n\tif (!sharedObserver) {\n\t\tsharedObserver = new ResizeObserver((entries) => {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tconst el = entry.target as HTMLElement;\n\t\t\t\tconst entryData = observerMap.get(el);\n\t\t\t\tif (!entryData) continue;\n\n\t\t\t\tlet width: number;\n\t\t\t\tlet height: number;\n\n\t\t\t\tif ('borderBoxSize' in entry) {\n\t\t\t\t\t// Iron out differences between browsers\n\t\t\t\t\tconst borderSize = Array.isArray(entry.borderBoxSize) ? entry.borderBoxSize[0] : entry.borderBoxSize;\n\t\t\t\t\twidth = borderSize.inlineSize;\n\t\t\t\t\theight = borderSize.blockSize;\n\t\t\t\t} else {\n\t\t\t\t\twidth = el.offsetWidth;\n\t\t\t\t\theight = el.offsetHeight;\n\t\t\t\t}\n\n\t\t\t\tentryData.size.set({ width, height });\n\t\t\t}\n\t\t});\n\t}\n\n\treturn sharedObserver;\n}\n\n/**\n * Options to configure `injectElementSize`.\n */\ninterface ElementSizeOptions {\n\t/** The ElementRef of the element to observe. Defaults to injected ElementRef in the current context. */\n\telementRef?: ElementRef<HTMLElement>;\n\t/** Optional Injector to run the function in. Defaults to the current injection context. */\n\tinjector?: Injector;\n}\n\n/**\n * Internal type used to track each observed element in the shared ResizeObserver.\n */\ninterface SizeEntry {\n\t/** The HTML element being observed. */\n\telement: HTMLElement;\n\t/** Writable signal storing the element's current width and height. */\n\tsize: WritableSignal<{ width: number; height: number } | undefined>;\n}\n","import type { ConnectedPosition } from '@angular/cdk/overlay';\nimport { InjectionToken } from '@angular/core';\n\nexport type MenuAlign = 'start' | 'center' | 'end';\nexport type MenuSide = 'top' | 'bottom' | 'left' | 'right';\n\nconst OPPOSITE_SIDE: Record<string, MenuSide> = { top: 'bottom', bottom: 'top', left: 'right', right: 'left' };\n\n/**\n * Lets a menu trigger expose its configured `side` to the portaled content. CDK gives the content a\n * child injector whose parent is the trigger's injector, so the content can resolve this token to\n * learn which axis to read off the transform-origin.\n */\nexport interface MenuSideProvider {\n\treadonly side: () => MenuSide;\n}\n\nexport const MENU_SIDE = new InjectionToken<MenuSideProvider>('SpartanMenuSide');\n\n// derive data-side from the transform-origin CDK sets on the content. the anchored corner faces the\n// trigger, so the side is its opposite. the configured `side` tells us which axis carries the anchor\n// (top/bottom -> vertical token, left/right -> horizontal), so a CDK flip is read off the right axis.\n// CDK's origin is rtl-aware, so the derived side is too. falls back to the configured side when the\n// transform-origin is missing or centered (no flip information to apply).\nexport const deriveMenuSideFromTransformOrigin = (transformOrigin: string, side: MenuSide): MenuSide => {\n\tconst [x, y] = transformOrigin.trim().split(/\\s+/);\n\tconst anchor = side === 'top' || side === 'bottom' ? y : x;\n\treturn OPPOSITE_SIDE[anchor] ?? side;\n};\n\nexport const createMenuPosition = (align: MenuAlign, side: MenuSide): ConnectedPosition[] => {\n\tconst verticalAlign = align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center';\n\n\tconst createPositions = (\n\t\toriginX: 'start' | 'center' | 'end',\n\t\toriginY: 'top' | 'center' | 'bottom',\n\t\toverlayX: 'start' | 'center' | 'end',\n\t\toverlayY: 'top' | 'center' | 'bottom',\n\t): ConnectedPosition[] => [\n\t\t{ originX, originY, overlayX, overlayY },\n\t\t{ originX: overlayX, originY: overlayY, overlayX: originX, overlayY: originY },\n\t];\n\n\tswitch (side) {\n\t\tcase 'top':\n\t\t\treturn createPositions(align, 'top', align, 'bottom');\n\t\tcase 'bottom':\n\t\t\treturn createPositions(align, 'bottom', align, 'top');\n\t\tcase 'left':\n\t\t\treturn createPositions('start', verticalAlign, 'end', verticalAlign);\n\t\tcase 'right':\n\t\t\treturn createPositions('end', verticalAlign, 'start', verticalAlign);\n\t}\n};\n","export function stringifyAsLabel(item: any, itemToStringLabel?: (item: any) => string) {\n\tif (itemToStringLabel && item !== null && item !== undefined) {\n\t\treturn itemToStringLabel(item) ?? '';\n\t}\n\tif (item && typeof item === 'object') {\n\t\tif ('label' in item && item.label !== null && item.label !== undefined) {\n\t\t\treturn String(item.label);\n\t\t}\n\t\tif ('value' in item && item.value !== null && item.value !== undefined) {\n\t\t\treturn String(item.value);\n\t\t}\n\t}\n\treturn serializeValue(item);\n}\n\nexport function serializeValue(value: unknown): string {\n\tif (value === null || value === undefined) {\n\t\treturn '';\n\t}\n\tif (typeof value === 'string') {\n\t\treturn value;\n\t}\n\ttry {\n\t\treturn JSON.stringify(value);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\n","import { DestroyRef, inject, type Signal, signal } from '@angular/core';\n\n/** Skip-delay grouping: once one member opens, siblings skip their delay until the window elapses. */\nexport interface SkipDelay {\n\t/** Whether the next open should still wait for its delay (`true`) or open instantly (`false`). */\n\treadonly isOpenDelayed: Signal<boolean>;\n\t/** Report that a member opened: opens the skip window so siblings skip their delay. */\n\topen(): void;\n\t/** Report that a member closed: re-require the delay once the window elapses. */\n\tclose(): void;\n}\n\n/** Must be called in an injection context; cleans up its pending timer on destroy. */\nexport function injectSkipDelay(skipDelayDuration: () => number): SkipDelay {\n\tconst isOpenDelayed = signal(true);\n\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\n\tinject(DestroyRef).onDestroy(() => clearTimeout(timer));\n\n\treturn {\n\t\tisOpenDelayed: isOpenDelayed.asReadonly(),\n\t\topen(): void {\n\t\t\tclearTimeout(timer);\n\t\t\tif (skipDelayDuration() > 0) isOpenDelayed.set(false);\n\t\t},\n\t\tclose(): void {\n\t\t\tclearTimeout(timer);\n\t\t\tconst duration = skipDelayDuration();\n\t\t\tif (duration > 0) {\n\t\t\t\ttimer = setTimeout(() => isOpenDelayed.set(true), duration);\n\t\t\t}\n\t\t},\n\t};\n}\n","import { createInjectionToken } from './create-injection-token';\n\nexport interface TableClassesSettable {\n\tsetTableClasses: (classes: Partial<{ table: string; headerRow: string; bodyRow: string }>) => void;\n}\n\nexport const [\n\tinjectTableClassesSettable,\n\tprovideTableClassesSettable,\n\tprovideTableClassesSettableExisting,\n\tSET_TABLE_CLASSES_TOKEN,\n] = createInjectionToken<TableClassesSettable>('@spartan-ng SET_TABLE_CLASSES_TOKEN');\n","const MAX_ANIMATION_WAIT_MS = 5_000;\nconst ANIMATION_WAIT_BUFFER_MS = 50;\n\nexport function getActiveElementAnimations(elements: readonly (HTMLElement | null | undefined)[]): Animation[] {\n\treturn elements\n\t\t.filter((element): element is HTMLElement => !!element)\n\t\t.flatMap((element) =>\n\t\t\ttypeof element.getAnimations === 'function'\n\t\t\t\t? element.getAnimations({ subtree: true }).filter((animation) => animation.playState !== 'finished')\n\t\t\t\t: [],\n\t\t);\n}\n\nexport async function waitForAnimations(animations: readonly Animation[]): Promise<void> {\n\tif (!animations.length) return;\n\n\tlet timeout: ReturnType<typeof setTimeout> | undefined;\n\tconst fallbackMs = getFallbackTimeout(animations);\n\n\ttry {\n\t\tawait Promise.race([\n\t\t\tPromise.allSettled(animations.map((animation) => animation.finished)),\n\t\t\tnew Promise<void>((resolve) => {\n\t\t\t\ttimeout = setTimeout(resolve, fallbackMs);\n\t\t\t}),\n\t\t]);\n\t} finally {\n\t\tif (timeout) clearTimeout(timeout);\n\t}\n}\n\n/**\n * Waits for active animations, including subtree animations, within the given element to finish.\n */\nexport async function waitForElementAnimations(element: HTMLElement): Promise<void> {\n\tawait waitForAnimations(getActiveElementAnimations([element]));\n}\n\nfunction getFallbackTimeout(animations: readonly Animation[]): number {\n\tconst longestAnimation = animations.reduce((longest, animation) => {\n\t\tconst endTime = animation.effect?.getComputedTiming().endTime;\n\t\treturn typeof endTime === 'number' && Number.isFinite(endTime) ? Math.max(longest, endTime) : longest;\n\t}, 0);\n\n\tif (!longestAnimation) return MAX_ANIMATION_WAIT_MS;\n\treturn Math.min(longestAnimation + ANIMATION_WAIT_BUFFER_MS, MAX_ANIMATION_WAIT_MS);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCG;AACG,SAAU,gBAAgB,CAAI,WAAsB,EAAA;IACzD,IAAI,OAAO,GAAG,IAAS;AACvB,IAAA,IAAI,QAAQ,GAAG,SAAS,CAAC,MAAM,WAAW,EAAE,CAAC,CAAC;IAE9C,OAAO,QAAQ,CAAC,MAAK;QACpB,OAAO,GAAG,WAAW,EAAE;QACvB,MAAM,MAAM,GAAG,QAAQ;QACvB,QAAQ,GAAG,OAAO;AAClB,QAAA,OAAO,MAAM;AACd,IAAA,CAAC,CAAC;AACH;;ACtCM,SAAU,WAAW,CAAI,IAAY,EAAA;AAC1C,IAAA,OAAO,CAAC,MAAM,KACb,IAAI,UAAU,CAAC,CAAC,UAAU,KACzB,MAAM,CAAC,SAAS,CAAC;AAChB,QAAA,IAAI,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACvD,QAAA,KAAK,EAAE,CAAC,KAAc,KAAK,IAAI,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAClE,QAAA,QAAQ,EAAE,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC;AACrD,KAAA,CAAC,CACF;AACH;AAEM,SAAU,WAAW,CAAI,IAAY,EAAA;AAC1C,IAAA,OAAO,CAAC,MAAM,KAAK,IAAI,UAAU,CAAC,CAAC,UAAU,KAAK,IAAI,CAAC,iBAAiB,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;AAC9G;AAEM,SAAU,gBAAgB,C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CAAC,OAAO,EAAE,SAAS,KAAI;QACjE,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,OAAO;QAC7D,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,OAAO;IACtG,CAAC,EAAE,CAAC,CAAC;AAEL,IAAA,IAAI,CAAC,gBAAgB;AAAE,QAAA,OAAO,qBAAqB;IACnD,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,GAAG,wBAAwB,EAAE,qBAAqB,CAAC;AACpF;;AC9CA;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-core.mjs","sources":["../../../../libs/brain/core/src/helpers/computed-previous.ts","../../../../libs/brain/core/src/helpers/zone-free.ts","../../../../libs/brain/core/src/helpers/create-hover-observable.ts","../../../../libs/brain/core/src/helpers/css-classes-to-array.ts","../../../../libs/brain/core/src/helpers/create-injection-token.ts","../../../../libs/brain/core/src/helpers/custom-element-class-settable.ts","../../../../libs/brain/core/src/helpers/debounced-signal.ts","../../../../libs/brain/core/src/helpers/dev-mode.ts","../../../../libs/brain/core/src/helpers/exposes-side.ts","../../../../libs/brain/core/src/helpers/exposes-state.ts","../../../../libs/brain/core/src/helpers/inject-content-dimensions.ts","../../../../libs/brain/core/src/helpers/inject-element-size.ts","../../../../libs/brain/core/src/helpers/menu-align.ts","../../../../libs/brain/core/src/helpers/resolve-value-label.ts","../../../../libs/brain/core/src/helpers/skip-delay.ts","../../../../libs/brain/core/src/helpers/table-classes-settable.ts","../../../../libs/brain/core/src/helpers/wait-for-element-animations.ts","../../../../libs/brain/core/src/spartan-ng-brain-core.ts"],"sourcesContent":["import { computed, type Signal, untracked } from '@angular/core';\n\n/**\n * Returns a signal that emits the previous value of the given signal.\n * The first time the signal is emitted, the previous value will be the same as the current value.\n *\n * @example\n * ```ts\n * const value = signal(0);\n * const previous = computedPrevious(value);\n *\n * effect(() => {\n * console.log('Current value:', value());\n * console.log('Previous value:', previous());\n * });\n *\n * Logs:\n * // Current value: 0\n * // Previous value: 0\n *\n * value.set(1);\n *\n * Logs:\n * // Current value: 1\n * // Previous value: 0\n *\n * value.set(2);\n *\n * Logs:\n * // Current value: 2\n * // Previous value: 1\n *```\n *\n * @param computation Signal to compute previous value for\n * @returns Signal that emits previous value of `s`\n */\nexport function computedPrevious<T>(computation: Signal<T>): Signal<T> {\n\tlet current = null as T;\n\tlet previous = untracked(() => computation()); // initial value is the current value\n\n\treturn computed(() => {\n\t\tcurrent = computation();\n\t\tconst result = previous;\n\t\tprevious = current;\n\t\treturn result;\n\t});\n}\n","/**\n * We are building on shoulders of giants here and use the implementation provided by the incredible TaigaUI\n * team: https://github.com/taiga-family/taiga-ui/blob/main/projects/cdk/observables/zone-free.ts#L22\n * Check them out! Give them a try! Leave a star! Their work is incredible!\n */\nimport type { NgZone } from '@angular/core';\nimport { type MonoTypeOperatorFunction, Observable, pipe } from 'rxjs';\n\nexport function brnZoneFull<T>(zone: NgZone): MonoTypeOperatorFunction<T> {\n\treturn (source) =>\n\t\tnew Observable((subscriber) =>\n\t\t\tsource.subscribe({\n\t\t\t\tnext: (value) => zone.run(() => subscriber.next(value)),\n\t\t\t\terror: (error: unknown) => zone.run(() => subscriber.error(error)),\n\t\t\t\tcomplete: () => zone.run(() => subscriber.complete()),\n\t\t\t}),\n\t\t);\n}\n\nexport function brnZoneFree<T>(zone: NgZone): MonoTypeOperatorFunction<T> {\n\treturn (source) => new Observable((subscriber) => zone.runOutsideAngular(() => source.subscribe(subscriber)));\n}\n\nexport function brnZoneOptimized<T>(zone: NgZone): MonoTypeOperatorFunction<T> {\n\treturn pipe(brnZoneFree(zone), brnZoneFull(zone));\n}\n","import type { NgZone } from '@angular/core';\nimport { type Observable, type Subject, fromEvent, merge } from 'rxjs';\nimport { distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';\nimport { brnZoneOptimized } from './zone-free';\n\nfunction movedOut({ currentTarget, relatedTarget }: MouseEvent): boolean {\n\treturn !isElement(relatedTarget) || !isElement(currentTarget) || !currentTarget.contains(relatedTarget);\n}\n\nexport function isElement(node?: Element | EventTarget | Node | null): node is Element {\n\treturn !!node && 'nodeType' in node && node.nodeType === Node.ELEMENT_NODE;\n}\n\nexport const createHoverObservable = (\n\tnativeElement: HTMLElement,\n\tzone: NgZone,\n\tdestroyed$: Subject<void>,\n): Observable<{ hover: boolean; relatedTarget?: EventTarget | null }> => {\n\treturn merge(\n\t\tfromEvent(nativeElement, 'mouseenter').pipe(map(() => ({ hover: true }))),\n\t\tfromEvent<MouseEvent>(nativeElement, 'mouseleave').pipe(\n\t\t\tmap((e) => ({ hover: false, relatedTarget: e.relatedTarget })),\n\t\t),\n\t\t// Hello, Safari\n\t\tfromEvent<MouseEvent>(nativeElement, 'mouseout').pipe(\n\t\t\tfilter(movedOut),\n\t\t\tmap((e) => ({ hover: false, relatedTarget: e.relatedTarget })),\n\t\t),\n\t).pipe(distinctUntilChanged(), brnZoneOptimized(zone), takeUntil(destroyed$));\n};\n","export function cssClassesToArray(classes: string | string[] | null | undefined, defaultClass = ''): string[] {\n\tconst value = classes ?? defaultClass;\n\treturn (Array.isArray(value) ? value : [value]).flatMap((className) => className.split(/\\s+/).filter(Boolean));\n}\n","import { type InjectOptions, InjectionToken, type Provider, type Type, forwardRef, inject } from '@angular/core';\n\ntype InjectFn<TTokenValue> = {\n\t(): TTokenValue;\n\t(injectOptions: InjectOptions & { optional?: false }): TTokenValue;\n\t(injectOptions: InjectOptions & { optional: true }): TTokenValue | null;\n};\n\ntype ProvideFn<TTokenValue> = (value: TTokenValue) => Provider;\n\ntype ProvideExistingFn<TTokenValue> = (valueFactory: () => Type<TTokenValue>) => Provider;\n\nexport type CreateInjectionTokenReturn<TTokenValue> = [\n\tInjectFn<TTokenValue>,\n\tProvideFn<TTokenValue>,\n\tProvideExistingFn<TTokenValue>,\n\tInjectionToken<TTokenValue>,\n];\n\nexport function createInjectionToken<TTokenValue>(description: string): CreateInjectionTokenReturn<TTokenValue> {\n\tconst token = new InjectionToken<TTokenValue>(description);\n\n\tconst provideFn = (value: TTokenValue) => {\n\t\treturn { provide: token, useValue: value };\n\t};\n\n\tconst provideExistingFn = (value: () => TTokenValue) => {\n\t\treturn { provide: token, useExisting: forwardRef(value) };\n\t};\n\n\tconst injectFn = (options: InjectOptions = {}) => {\n\t\treturn inject(token, options);\n\t};\n\n\treturn [injectFn, provideFn, provideExistingFn, token] as CreateInjectionTokenReturn<TTokenValue>;\n}\n","import { createInjectionToken } from './create-injection-token';\n\nexport interface CustomElementClassSettable {\n\tsetClassToCustomElement: (newClass: string) => void;\n}\n\nexport const [\n\tinjectCustomClassSettable,\n\tprovideCustomClassSettable,\n\tprovideCustomClassSettableExisting,\n\tSET_CLASS_TO_CUSTOM_ELEMENT_TOKEN,\n] = createInjectionToken<CustomElementClassSettable>('@spartan-ng SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN');\n","import type { Signal } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\n/**\n * Creates a debounced version of a source signal.\n *\n * @param source - The input signal to debounce.\n * @param delay - Debounce time in milliseconds.\n * @returns A new signal that updates only after the source has stopped changing for `delay` ms.\n */\nexport function debouncedSignal<T>(source: Signal<T>, delay: number): Signal<T> {\n\tconst source$ = toObservable(source);\n\n\tconst debounced$ = source$.pipe(debounceTime(delay), distinctUntilChanged());\n\n\treturn toSignal(debounced$, { initialValue: source() });\n}\n","declare const ngDevMode: boolean;\n/**\n * Set by Angular to true when in development mode.\n * Allows for tree-shaking code that is only used in development.\n */\nexport const brnDevMode = ngDevMode;\n","import type { Signal } from '@angular/core';\nimport { createInjectionToken } from './create-injection-token';\n\nexport interface ExposesSide {\n\tside: Signal<'top' | 'bottom' | 'left' | 'right'>;\n}\n\nexport const [\n\tinjectExposedSideProvider,\n\tprovideExposedSideProvider,\n\tprovideExposedSideProviderExisting,\n\tEXPOSES_SIDE_TOKEN,\n] = createInjectionToken<ExposesSide>('@spartan-ng EXPOSES_SIDE_TOKEN');\n","import type { Signal } from '@angular/core';\nimport { createInjectionToken } from './create-injection-token';\n\nexport interface ExposesState {\n\tstate: Signal<'open' | 'closed'>;\n}\n\nexport const [\n\tinjectExposesStateProvider,\n\tprovideExposesStateProvider,\n\tprovideExposesStateProviderExisting,\n\tEXPOSES_STATE_TOKEN,\n] = createInjectionToken<ExposesState>('@spartan-ng EXPOSES_STATE_TOKEN');\n","import { isPlatformServer } from '@angular/common';\nimport { afterNextRender, DestroyRef, ElementRef, inject, PLATFORM_ID, type Signal, signal } from '@angular/core';\n\n/** Reactive natural size of a collapsible host's projected content, or `null` before measurement. */\nexport interface ContentDimensions {\n\twidth: Signal<number | null>;\n\theight: Signal<number | null>;\n}\n\n/**\n * Measures the natural size of a collapsible host's content via `scrollHeight` so it can animate\n * between `height: 0` and a measured pixel height - the whole content is covered, regardless of how\n * it is projected. A `ResizeObserver` on the content keeps the value live. SSR-safe; the host must\n * be a block-level element for `scrollHeight` to reflect its content.\n *\n * @returns Signals with the content's width and height in px, or `null` before measurement.\n */\nexport function injectContentDimensions(): ContentDimensions {\n\tconst host = inject(ElementRef).nativeElement as HTMLElement;\n\tconst platformId = inject(PLATFORM_ID);\n\tconst destroyRef = inject(DestroyRef);\n\n\tconst width = signal<number | null>(null);\n\tconst height = signal<number | null>(null);\n\n\tif (isPlatformServer(platformId)) {\n\t\treturn { width: width.asReadonly(), height: height.asReadonly() };\n\t}\n\n\tconst measure = (): void => {\n\t\t// Drop the clamped height for the read: scrollHeight is never smaller than the element's own\n\t\t// height, so while clamped it would only ever grow. `height: auto` lets it reflect the real\n\t\t// content size (and shrink). The read is synchronous, so the swap never paints.\n\t\tconst previousHeight = host.style.height;\n\t\thost.style.height = 'auto';\n\t\twidth.set(host.scrollWidth);\n\t\theight.set(host.scrollHeight);\n\t\thost.style.height = previousHeight;\n\t};\n\n\tafterNextRender({\n\t\tread: () => {\n\t\t\tmeasure();\n\t\t\tif (typeof ResizeObserver === 'undefined') return;\n\n\t\t\t// Observe the content wrapper (not the clamped/animated host) so re-measures fire on content\n\t\t\t// changes, never on the open/close height animation. Re-measure on a fresh frame rather than\n\t\t\t// inside the callback: measure() mutates the host's inline height, and doing that during\n\t\t\t// delivery trips \"ResizeObserver loop completed with undelivered notifications\".\n\t\t\tlet frame = 0;\n\t\t\tconst observer = new ResizeObserver(() => {\n\t\t\t\tcancelAnimationFrame(frame);\n\t\t\t\tframe = requestAnimationFrame(measure);\n\t\t\t});\n\t\t\tconst content = host.firstElementChild;\n\t\t\tif (content) {\n\t\t\t\tobserver.observe(content);\n\t\t\t}\n\t\t\tdestroyRef.onDestroy(() => {\n\t\t\t\tcancelAnimationFrame(frame);\n\t\t\t\tobserver.disconnect();\n\t\t\t});\n\t\t},\n\t});\n\n\treturn { width: width.asReadonly(), height: height.asReadonly() };\n}\n","import { isPlatformServer } from '@angular/common';\nimport {\n\tafterNextRender,\n\tDestroyRef,\n\tElementRef,\n\tinject,\n\tInjector,\n\tPLATFORM_ID,\n\trunInInjectionContext,\n\ttype Signal,\n\tsignal,\n\ttype WritableSignal,\n} from '@angular/core';\n\n/**\n * Returns a reactive signal that tracks the size of a DOM element.\n *\n * This function uses a shared {@link ResizeObserver} internally to monitor multiple elements efficiently.\n * The returned signal updates whenever the element's width or height changes. It is fully SSR-safe.\n *\n * @param options Optional {@link ElementSizeOptions} configuration object.\n * @param options.elementRef The {@link ElementRef} of the element to observe. Defaults to the {@link ElementRef} injected in the current context.\n * @param options.injector Optional custom {@link Injector} to run the function in. Defaults to the current injection context.\n *\n * @returns A readonly {@link Signal} containing `{ width, height }` of the element, or `undefined` if the element has not yet been measured or on the server.\n *\n * Based on https://github.com/radix-ui/primitives/blob/main/packages/react/use-size/src/use-size.tsx\n */\nexport function injectElementSize(\n\toptions: ElementSizeOptions = {},\n): Signal<{ width: number; height: number } | undefined> {\n\treturn runInInjectionContext(options.injector ?? inject(Injector), () => {\n\t\tconst elementRef = options.elementRef ?? inject(ElementRef);\n\t\tconst platformId = inject(PLATFORM_ID);\n\t\tconst destroyRef = inject(DestroyRef);\n\n\t\tconst element = elementRef.nativeElement;\n\t\tconst size = signal<{ width: number; height: number } | undefined>(undefined);\n\n\t\tif (isPlatformServer(platformId)) {\n\t\t\treturn size;\n\t\t}\n\n\t\tafterNextRender({\n\t\t\tread: () => {\n\t\t\t\t// Initial read\n\t\t\t\tconst rect = element.getBoundingClientRect();\n\t\t\t\tsize.set({\n\t\t\t\t\twidth: rect.width || element.offsetWidth,\n\t\t\t\t\theight: rect.height || element.offsetHeight,\n\t\t\t\t});\n\n\t\t\t\t// Register element in shared observer\n\t\t\t\tobserverMap.set(element, { element, size });\n\t\t\t\tgetSharedObserver().observe(element, { box: 'border-box' });\n\n\t\t\t\tdestroyRef.onDestroy(() => {\n\t\t\t\t\tgetSharedObserver().unobserve(element);\n\t\t\t\t\tobserverMap.delete(element);\n\n\t\t\t\t\t// Disconnect global observer if no elements left\n\t\t\t\t\tif (observerMap.size === 0 && sharedObserver) {\n\t\t\t\t\t\tsharedObserver.disconnect();\n\t\t\t\t\t\tsharedObserver = undefined;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\n\t\treturn size.asReadonly();\n\t});\n}\n\nconst observerMap = new Map<HTMLElement, SizeEntry>();\nlet sharedObserver: ResizeObserver | undefined;\n\nfunction getSharedObserver() {\n\tif (!sharedObserver) {\n\t\tsharedObserver = new ResizeObserver((entries) => {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tconst el = entry.target as HTMLElement;\n\t\t\t\tconst entryData = observerMap.get(el);\n\t\t\t\tif (!entryData) continue;\n\n\t\t\t\tlet width: number;\n\t\t\t\tlet height: number;\n\n\t\t\t\tif ('borderBoxSize' in entry) {\n\t\t\t\t\t// Iron out differences between browsers\n\t\t\t\t\tconst borderSize = Array.isArray(entry.borderBoxSize) ? entry.borderBoxSize[0] : entry.borderBoxSize;\n\t\t\t\t\twidth = borderSize.inlineSize;\n\t\t\t\t\theight = borderSize.blockSize;\n\t\t\t\t} else {\n\t\t\t\t\twidth = el.offsetWidth;\n\t\t\t\t\theight = el.offsetHeight;\n\t\t\t\t}\n\n\t\t\t\tentryData.size.set({ width, height });\n\t\t\t}\n\t\t});\n\t}\n\n\treturn sharedObserver;\n}\n\n/**\n * Options to configure `injectElementSize`.\n */\ninterface ElementSizeOptions {\n\t/** The ElementRef of the element to observe. Defaults to injected ElementRef in the current context. */\n\telementRef?: ElementRef<HTMLElement>;\n\t/** Optional Injector to run the function in. Defaults to the current injection context. */\n\tinjector?: Injector;\n}\n\n/**\n * Internal type used to track each observed element in the shared ResizeObserver.\n */\ninterface SizeEntry {\n\t/** The HTML element being observed. */\n\telement: HTMLElement;\n\t/** Writable signal storing the element's current width and height. */\n\tsize: WritableSignal<{ width: number; height: number } | undefined>;\n}\n","import type { CdkMenuTrigger } from '@angular/cdk/menu';\nimport type { ConnectedPosition } from '@angular/cdk/overlay';\nimport { InjectionToken, SimpleChange } from '@angular/core';\n\nexport type MenuAlign = 'start' | 'center' | 'end';\nexport type MenuSide = 'top' | 'bottom' | 'left' | 'right';\n\nconst OPPOSITE_SIDE: Record<string, MenuSide> = { top: 'bottom', bottom: 'top', left: 'right', right: 'left' };\n\n/**\n * Lets a menu trigger expose its configured `side` to the portaled content. CDK gives the content a\n * child injector whose parent is the trigger's injector, so the content can resolve this token to\n * learn which axis to read off the transform-origin.\n */\nexport interface MenuSideProvider {\n\treadonly side: () => MenuSide;\n}\n\nexport const MENU_SIDE = new InjectionToken<MenuSideProvider>('SpartanMenuSide');\n\n// derive data-side from the transform-origin CDK sets on the content. the anchored corner faces the\n// trigger, so the side is its opposite. the configured `side` tells us which axis carries the anchor\n// (top/bottom -> vertical token, left/right -> horizontal), so a CDK flip is read off the right axis.\n// CDK's origin is rtl-aware, so the derived side is too. falls back to the configured side when the\n// transform-origin is missing or centered (no flip information to apply).\nexport const deriveMenuSideFromTransformOrigin = (transformOrigin: string, side: MenuSide): MenuSide => {\n\tconst [x, y] = transformOrigin.trim().split(/\\s+/);\n\tconst anchor = side === 'top' || side === 'bottom' ? y : x;\n\treturn OPPOSITE_SIDE[anchor] ?? side;\n};\n\nexport const createMenuPosition = (align: MenuAlign, side: MenuSide): ConnectedPosition[] => {\n\tconst verticalAlign = align === 'start' ? 'top' : align === 'end' ? 'bottom' : 'center';\n\n\tconst createPositions = (\n\t\toriginX: 'start' | 'center' | 'end',\n\t\toriginY: 'top' | 'center' | 'bottom',\n\t\toverlayX: 'start' | 'center' | 'end',\n\t\toverlayY: 'top' | 'center' | 'bottom',\n\t): ConnectedPosition[] => [\n\t\t{ originX, originY, overlayX, overlayY },\n\t\t{ originX: overlayX, originY: overlayY, overlayX: originX, overlayY: originY },\n\t];\n\n\tswitch (side) {\n\t\tcase 'top':\n\t\t\treturn createPositions(align, 'top', align, 'bottom');\n\t\tcase 'bottom':\n\t\t\treturn createPositions(align, 'bottom', align, 'top');\n\t\tcase 'left':\n\t\t\treturn createPositions('start', verticalAlign, 'end', verticalAlign);\n\t\tcase 'right':\n\t\t\treturn createPositions('end', verticalAlign, 'start', verticalAlign);\n\t}\n};\n\n/**\n * Applies the given positions to a CDK menu trigger.\n *\n * CDK reads `menuPosition` only when it builds the overlay's `FlexibleConnectedPositionStrategy` (first\n * open) and when its `ngOnChanges` runs. The trigger reuses a single overlay across opens, so a bare\n * `menuPosition` assignment is silently ignored once the overlay exists - e.g. when `side`/`align`\n * change at runtime, the next open keeps the position from the first open. Assigning the property and\n * poking CDK's change handler refreshes an already-created overlay (whether open or reused) so the new\n * positions take effect. When no overlay exists yet the assignment alone is enough.\n */\nexport const updateMenuPosition = (trigger: CdkMenuTrigger, position: ConnectedPosition[]): void => {\n\ttrigger.menuPosition = position;\n\ttrigger.ngOnChanges({ menuPosition: new SimpleChange(undefined, position, false) });\n};\n","export function stringifyAsLabel(item: any, itemToStringLabel?: (item: any) => string) {\n\tif (itemToStringLabel && item !== null && item !== undefined) {\n\t\treturn itemToStringLabel(item) ?? '';\n\t}\n\tif (item && typeof item === 'object') {\n\t\tif ('label' in item && item.label !== null && item.label !== undefined) {\n\t\t\treturn String(item.label);\n\t\t}\n\t\tif ('value' in item && item.value !== null && item.value !== undefined) {\n\t\t\treturn String(item.value);\n\t\t}\n\t}\n\treturn serializeValue(item);\n}\n\nexport function serializeValue(value: unknown): string {\n\tif (value === null || value === undefined) {\n\t\treturn '';\n\t}\n\tif (typeof value === 'string') {\n\t\treturn value;\n\t}\n\ttry {\n\t\treturn JSON.stringify(value);\n\t} catch {\n\t\treturn String(value);\n\t}\n}\n","import { DestroyRef, inject, type Signal, signal } from '@angular/core';\n\n/** Skip-delay grouping: once one member opens, siblings skip their delay until the window elapses. */\nexport interface SkipDelay {\n\t/** Whether the next open should still wait for its delay (`true`) or open instantly (`false`). */\n\treadonly isOpenDelayed: Signal<boolean>;\n\t/** Report that a member opened: opens the skip window so siblings skip their delay. */\n\topen(): void;\n\t/** Report that a member closed: re-require the delay once the window elapses. */\n\tclose(): void;\n}\n\n/** Must be called in an injection context; cleans up its pending timer on destroy. */\nexport function injectSkipDelay(skipDelayDuration: () => number): SkipDelay {\n\tconst isOpenDelayed = signal(true);\n\tlet timer: ReturnType<typeof setTimeout> | undefined;\n\n\tinject(DestroyRef).onDestroy(() => clearTimeout(timer));\n\n\treturn {\n\t\tisOpenDelayed: isOpenDelayed.asReadonly(),\n\t\topen(): void {\n\t\t\tclearTimeout(timer);\n\t\t\tif (skipDelayDuration() > 0) isOpenDelayed.set(false);\n\t\t},\n\t\tclose(): void {\n\t\t\tclearTimeout(timer);\n\t\t\tconst duration = skipDelayDuration();\n\t\t\tif (duration > 0) {\n\t\t\t\ttimer = setTimeout(() => isOpenDelayed.set(true), duration);\n\t\t\t}\n\t\t},\n\t};\n}\n","import { createInjectionToken } from './create-injection-token';\n\nexport interface TableClassesSettable {\n\tsetTableClasses: (classes: Partial<{ table: string; headerRow: string; bodyRow: string }>) => void;\n}\n\nexport const [\n\tinjectTableClassesSettable,\n\tprovideTableClassesSettable,\n\tprovideTableClassesSettableExisting,\n\tSET_TABLE_CLASSES_TOKEN,\n] = createInjectionToken<TableClassesSettable>('@spartan-ng SET_TABLE_CLASSES_TOKEN');\n","const MAX_ANIMATION_WAIT_MS = 5_000;\nconst ANIMATION_WAIT_BUFFER_MS = 50;\n\nexport function getActiveElementAnimations(elements: readonly (HTMLElement | null | undefined)[]): Animation[] {\n\treturn elements\n\t\t.filter((element): element is HTMLElement => !!element)\n\t\t.flatMap((element) =>\n\t\t\ttypeof element.getAnimations === 'function'\n\t\t\t\t? element.getAnimations({ subtree: true }).filter((animation) => animation.playState !== 'finished')\n\t\t\t\t: [],\n\t\t);\n}\n\nexport async function waitForAnimations(animations: readonly Animation[]): Promise<void> {\n\tif (!animations.length) return;\n\n\tlet timeout: ReturnType<typeof setTimeout> | undefined;\n\tconst fallbackMs = getFallbackTimeout(animations);\n\n\ttry {\n\t\tawait Promise.race([\n\t\t\tPromise.allSettled(animations.map((animation) => animation.finished)),\n\t\t\tnew Promise<void>((resolve) => {\n\t\t\t\ttimeout = setTimeout(resolve, fallbackMs);\n\t\t\t}),\n\t\t]);\n\t} finally {\n\t\tif (timeout) clearTimeout(timeout);\n\t}\n}\n\n/**\n * Waits for active animations, including subtree animations, within the given element to finish.\n */\nexport async function waitForElementAnimations(element: HTMLElement): Promise<void> {\n\tawait waitForAnimations(getActiveElementAnimations([element]));\n}\n\nfunction getFallbackTimeout(animations: readonly Animation[]): number {\n\tconst longestAnimation = animations.reduce((longest, animation) => {\n\t\tconst endTime = animation.effect?.getComputedTiming().endTime;\n\t\treturn typeof endTime === 'number' && Number.isFinite(endTime) ? Math.max(longest, endTime) : longest;\n\t}, 0);\n\n\tif (!longestAnimation) return MAX_ANIMATION_WAIT_MS;\n\treturn Math.min(longestAnimation + ANIMATION_WAIT_BUFFER_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EAAA;IAClE,MAAM,iBAAiB,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/D;AAEA,SAAS,kBAAkB,CAAC,UAAgC,EAAA;IAC3D,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,SAAS,KAAI;QACjE,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,OAAO;QAC7D,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,OAAO;IACtG,CAAC,EAAE,CAAC,CAAC;AAEL,IAAA,IAAI,CAAC,gBAAgB;AAAE,QAAA,OAAO,qBAAqB;IACnD,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,GAAG,wBAAwB,EAAE,qBAAqB,CAAC;AACpF;;AC9CA;;AAEG;;;;"}
@@ -71,6 +71,9 @@ class BrnDialogRef {
71
71
  this._backdropClasses = cssClassesToArray(initialOptions.backdropClass);
72
72
  this._setDataState('open');
73
73
  this._stateChanged.next('open');
74
+ // The container's `aria-describedby` host binding writes `null` on its first pass, which can
75
+ // wipe the attribute set while the declarative content view is created. Re-assert once after.
76
+ afterNextRender(() => this._syncAriaDescribedBy(), { injector: this._injector });
74
77
  this._cdkDialogRef.closed.subscribe((result) => {
75
78
  this._phase.set('closed');
76
79
  this._closed.next(result);
@@ -148,12 +151,13 @@ class BrnDialogRef {
148
151
  if (this.initialOptions.ariaDescribedBy !== undefined)
149
152
  return;
150
153
  const id = this._descriptionIds.size ? [...this._descriptionIds].join(' ') : undefined;
151
- this._cdkDialogRef.config.ariaDescribedBy = id;
152
- const container = this._cdkDialogRef.overlayRef.overlayElement.querySelector('cdk-dialog-container');
153
- if (id)
154
+ const container = this._cdkDialogRef.overlayRef.overlayElement?.querySelector('cdk-dialog-container');
155
+ if (id) {
154
156
  container?.setAttribute('aria-describedby', id);
155
- else
157
+ }
158
+ else {
156
159
  container?.removeAttribute('aria-describedby');
160
+ }
157
161
  }
158
162
  async _finishClose(generation, animationsBeforeClose, result) {
159
163
  if (generation !== this._closeGeneration || this._phase() !== 'closing')
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-dialog.mjs","sources":["../../../../libs/brain/dialog/src/lib/brn-dialog-token.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-ref.ts","../../../../libs/brain/dialog/src/lib/brn-dialog.service.ts","../../../../libs/brain/dialog/src/lib/brn-dialog.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-close.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-content.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-description.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-overlay.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-title.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-trigger.ts","../../../../libs/brain/dialog/src/index.ts","../../../../libs/brain/dialog/src/spartan-ng-brain-dialog.ts"],"sourcesContent":["import { inject, InjectionToken, type ValueProvider } from '@angular/core';\nimport type { BrnDialogOptions } from './brn-dialog-options';\n\nexport type BrnDialogDefaultOptions = Omit<BrnDialogOptions, 'direction' | 'id' | 'providers'>;\n\nexport const defaultOptions: BrnDialogDefaultOptions = {\n\tariaDescribedBy: undefined,\n\tariaLabel: undefined,\n\tariaLabelledBy: undefined,\n\tariaModal: true,\n\tattachPositions: [],\n\tattachTo: null,\n\tautoFocus: 'first-tabbable',\n\tbackdropClass: '',\n\tcloseOnOutsidePointerEvents: true,\n\tdisableClose: false,\n\thasBackdrop: true,\n\tpanelClass: '',\n\tpositionStrategy: null,\n\trestoreFocus: true,\n\trole: 'dialog',\n\tscrollStrategy: null,\n};\n\nconst BRN_DIALOG_DEFAULT_OPTIONS = new InjectionToken<BrnDialogDefaultOptions>('brn-dialog-default-options', {\n\tprovidedIn: 'root',\n\tfactory: () => defaultOptions,\n});\n\nexport function provideBrnDialogDefaultOptions(options: Partial<BrnDialogDefaultOptions>): ValueProvider {\n\treturn { provide: BRN_DIALOG_DEFAULT_OPTIONS, useValue: { ...defaultOptions, ...options } };\n}\n\nexport function injectBrnDialogDefaultOptions(): BrnDialogDefaultOptions {\n\treturn inject(BRN_DIALOG_DEFAULT_OPTIONS, { optional: true }) ?? defaultOptions;\n}\n","import type { DialogRef } from '@angular/cdk/dialog';\nimport { afterNextRender, computed, type Injector, signal } from '@angular/core';\nimport { getActiveElementAnimations, waitForAnimations } from '@spartan-ng/brain/core';\nimport { type Observable, ReplaySubject, Subject } from 'rxjs';\nimport type { BrnDialogOptions } from './brn-dialog-options';\nimport type { BrnDialogDismissReason, BrnDialogPhase, BrnDialogState } from './brn-dialog-state';\nimport { cssClassesToArray } from './brn-dialog-utils';\n\nexport class BrnDialogRef<DialogResult = unknown> {\n\tprivate readonly _closing = new Subject<void>();\n\tpublic readonly closing$ = this._closing.asObservable();\n\n\tprivate readonly _closed = new ReplaySubject<DialogResult | undefined>(1);\n\tpublic readonly closed$: Observable<DialogResult | undefined> = this._closed.asObservable();\n\n\tprivate readonly _stateChanged = new ReplaySubject<BrnDialogState>(1);\n\tpublic readonly stateChanged$ = this._stateChanged.asObservable();\n\n\tprivate readonly _phase = signal<BrnDialogPhase>('open');\n\tpublic readonly phase = this._phase.asReadonly();\n\tpublic readonly state = computed<BrnDialogState>(() => (this._phase() === 'open' ? 'open' : 'closed'));\n\n\tprivate _closeGeneration = 0;\n\tprivate _panelClasses: string[];\n\tprivate _backdropClasses: string[];\n\tprivate readonly _descriptionIds = new Set<string>();\n\n\tpublic get open(): boolean {\n\t\treturn this._phase() === 'open';\n\t}\n\n\tpublic get id(): string {\n\t\treturn this.initialOptions.id;\n\t}\n\n\tconstructor(\n\t\tprivate readonly _cdkDialogRef: DialogRef<DialogResult>,\n\t\tprivate readonly _injector: Injector,\n\t\tpublic readonly dialogId: number,\n\t\tprivate readonly initialOptions: BrnDialogOptions,\n\t) {\n\t\tthis._panelClasses = cssClassesToArray(initialOptions.panelClass);\n\t\tthis._backdropClasses = cssClassesToArray(initialOptions.backdropClass);\n\t\tthis._setDataState('open');\n\t\tthis._stateChanged.next('open');\n\n\t\tthis._cdkDialogRef.closed.subscribe((result) => {\n\t\t\tthis._phase.set('closed');\n\t\t\tthis._closed.next(result);\n\t\t\tthis._closed.complete();\n\t\t\tthis._closing.complete();\n\t\t\tthis._stateChanged.complete();\n\t\t});\n\t}\n\n\tpublic close(result?: DialogResult): void {\n\t\tif (!this.open) return;\n\n\t\tconst generation = ++this._closeGeneration;\n\t\tconst animationsBeforeClose = new Set(this._getActiveAnimations());\n\n\t\tthis._phase.set('closing');\n\t\tthis._setDataState('closed');\n\t\tthis._closing.next();\n\t\tthis._stateChanged.next('closed');\n\n\t\tafterNextRender(\n\t\t\t() => {\n\t\t\t\tvoid this._finishClose(generation, animationsBeforeClose, result);\n\t\t\t},\n\t\t\t{ injector: this._injector },\n\t\t);\n\t}\n\n\tpublic dismiss(reason: BrnDialogDismissReason): boolean {\n\t\tconst options = this.initialOptions;\n\t\tconst isOutsideInteraction = reason === 'outside' || reason === 'backdrop';\n\t\tconst outsideCloseAllowed = options.closeOnOutsidePointerEvents;\n\t\tif (!this.open || options.disableClose) return false;\n\t\tif (isOutsideInteraction && !outsideCloseAllowed) return false;\n\n\t\tthis.close();\n\t\treturn true;\n\t}\n\n\tpublic reopen(): void {\n\t\tif (this._phase() !== 'closing') return;\n\n\t\tthis._closeGeneration++;\n\t\tthis._phase.set('open');\n\t\tthis._setDataState('open');\n\t\tthis._stateChanged.next('open');\n\t}\n\n\tpublic forceClose(result?: DialogResult): void {\n\t\tif (this._phase() === 'closed') return;\n\n\t\tthis._closeGeneration++;\n\t\tthis._phase.set('closed');\n\t\tthis._cdkDialogRef.close(result);\n\t}\n\n\tpublic setPanelClass(panelClass: string | string[] | null | undefined): void {\n\t\tif (this._panelClasses.length) this._cdkDialogRef.removePanelClass(this._panelClasses);\n\t\tthis._panelClasses = cssClassesToArray(panelClass);\n\t\tif (this._panelClasses.length) this._cdkDialogRef.addPanelClass(this._panelClasses);\n\t}\n\n\tpublic setOverlayClass(overlayClass: string | string[] | null | undefined): void {\n\t\tconst backdrop = this._cdkDialogRef.overlayRef.backdropElement;\n\t\tif (!backdrop) return;\n\n\t\tbackdrop.classList.remove(...this._backdropClasses);\n\t\tthis._backdropClasses = cssClassesToArray(overlayClass);\n\t\tbackdrop.classList.add(...this._backdropClasses);\n\t}\n\n\tpublic updatePosition(): void {\n\t\tthis._cdkDialogRef.updatePosition();\n\t}\n\n\tpublic registerDescription(id: string): void {\n\t\tthis._descriptionIds.add(id);\n\t\tthis._syncAriaDescribedBy();\n\t}\n\n\tpublic unregisterDescription(id: string): void {\n\t\tthis._descriptionIds.delete(id);\n\t\tthis._syncAriaDescribedBy();\n\t}\n\n\tprivate _syncAriaDescribedBy(): void {\n\t\tif (this.initialOptions.ariaDescribedBy !== undefined) return;\n\n\t\tconst id = this._descriptionIds.size ? [...this._descriptionIds].join(' ') : undefined;\n\t\tthis._cdkDialogRef.config.ariaDescribedBy = id;\n\t\tconst container = this._cdkDialogRef.overlayRef.overlayElement.querySelector('cdk-dialog-container');\n\t\tif (id) container?.setAttribute('aria-describedby', id);\n\t\telse container?.removeAttribute('aria-describedby');\n\t}\n\n\tprivate async _finishClose(\n\t\tgeneration: number,\n\t\tanimationsBeforeClose: ReadonlySet<Animation>,\n\t\tresult?: DialogResult,\n\t): Promise<void> {\n\t\tif (generation !== this._closeGeneration || this._phase() !== 'closing') return;\n\n\t\tconst exitAnimations = this._getActiveAnimations().filter((animation) => !animationsBeforeClose.has(animation));\n\t\t// Pin each exit animation to its final frame. tw-animate-css uses `animation-fill-mode: none`,\n\t\t// so a finished exit reverts the element to its visible state in the gap before we dispose it -\n\t\t// that one-frame snap-back is the flicker. updateTiming pins only the animations we await.\n\t\tfor (const animation of exitAnimations) {\n\t\t\tanimation.effect?.updateTiming({ fill: 'forwards' });\n\t\t}\n\t\tawait waitForAnimations(exitAnimations);\n\n\t\tif (generation === this._closeGeneration && this._phase() === 'closing') {\n\t\t\tthis._phase.set('closed');\n\t\t\tthis._cdkDialogRef.close(result);\n\t\t}\n\t}\n\n\tprivate _getActiveAnimations(): Animation[] {\n\t\treturn getActiveElementAnimations([\n\t\t\tthis._cdkDialogRef.overlayRef.overlayElement,\n\t\t\tthis._cdkDialogRef.overlayRef.backdropElement,\n\t\t]);\n\t}\n\n\tprivate _setDataState(state: BrnDialogState): void {\n\t\tthis._cdkDialogRef.overlayRef.overlayElement.setAttribute('data-state', state);\n\t\tthis._cdkDialogRef.overlayRef.backdropElement?.setAttribute('data-state', state);\n\t}\n}\n","import { Dialog, DIALOG_DATA } from '@angular/cdk/dialog';\nimport {\n\ttype ComponentType,\n\tFlexibleConnectedPositionStrategy,\n\tOverlayOutsideClickDispatcher,\n\tOverlayPositionBuilder,\n\ttype OverlayRef,\n\tScrollStrategyOptions,\n} from '@angular/cdk/overlay';\nimport type { TemplateRef, ViewContainerRef } from '@angular/core';\nimport { ElementRef, inject, Injectable, type InjectOptions, Injector, type StaticProvider } from '@angular/core';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport type { BrnDialogOptions } from './brn-dialog-options';\nimport { BrnDialogRef } from './brn-dialog-ref';\nimport { injectBrnDialogDefaultOptions } from './brn-dialog-token';\n\nlet dialogSequence = 0;\n\nexport type BrnDialogContext<T> = T & { close: (result?: unknown) => void };\n\nexport const injectBrnDialogContext = <DialogContext = unknown>(options: InjectOptions = {}) =>\n\tinject(DIALOG_DATA, options) as DialogContext;\n\n@Injectable({ providedIn: 'root' })\nexport class BrnDialogService {\n\tprivate readonly _overlayCloseDispatcher = inject(OverlayOutsideClickDispatcher);\n\tprivate readonly _cdkDialog = inject(Dialog);\n\tprivate readonly _positionBuilder = inject(OverlayPositionBuilder);\n\tprivate readonly _scrollStrategies = inject(ScrollStrategyOptions);\n\tprivate readonly _injector = inject(Injector);\n\tprivate readonly _defaultOptions = injectBrnDialogDefaultOptions();\n\n\tpublic open<DialogContext, DialogResult = unknown>(\n\t\tcontent: ComponentType<unknown> | TemplateRef<unknown>,\n\t\tvcr?: ViewContainerRef,\n\t\tcontext?: DialogContext,\n\t\toptions?: Partial<BrnDialogOptions>,\n\t): BrnDialogRef<DialogResult> {\n\t\tconst dialogId = ++dialogSequence;\n\t\tconst mergedOptions: BrnDialogOptions = {\n\t\t\t...this._defaultOptions,\n\t\t\t...options,\n\t\t\tid: options?.id ?? `brn-dialog-${dialogId}`,\n\t\t};\n\n\t\tif (this._cdkDialog.getDialogById(mergedOptions.id)) {\n\t\t\tthrow new Error(`Dialog with ID: ${mergedOptions.id} already exists`);\n\t\t}\n\n\t\tconst positionStrategy =\n\t\t\tmergedOptions.positionStrategy ??\n\t\t\t(mergedOptions.attachTo && mergedOptions.attachPositions.length\n\t\t\t\t? this._positionBuilder.flexibleConnectedTo(mergedOptions.attachTo).withPositions(mergedOptions.attachPositions)\n\t\t\t\t: this._positionBuilder.global().centerHorizontally().centerVertically());\n\n\t\tconst scrollStrategy =\n\t\t\tmergedOptions.scrollStrategy === 'close'\n\t\t\t\t? this._scrollStrategies.close()\n\t\t\t\t: mergedOptions.scrollStrategy === 'reposition'\n\t\t\t\t\t? this._scrollStrategies.reposition()\n\t\t\t\t\t: (mergedOptions.scrollStrategy ?? this._scrollStrategies.block());\n\n\t\tlet brnDialogRef!: BrnDialogRef<DialogResult>;\n\t\tconst contextOrData: BrnDialogContext<DialogContext> = {\n\t\t\t...(context as DialogContext),\n\t\t\tclose: (result: unknown = undefined) => brnDialogRef.close(result as DialogResult),\n\t\t};\n\n\t\tconst cdkDialogRef = this._cdkDialog.open<DialogResult, BrnDialogContext<DialogContext>, unknown>(content, {\n\t\t\tid: mergedOptions.id,\n\t\t\trole: mergedOptions.role,\n\t\t\tviewContainerRef: vcr,\n\t\t\ttemplateContext: () => ({ $implicit: contextOrData }),\n\t\t\tdata: contextOrData,\n\t\t\tdirection: mergedOptions.direction,\n\t\t\thasBackdrop: mergedOptions.hasBackdrop,\n\t\t\tpanelClass: mergedOptions.panelClass,\n\t\t\tbackdropClass: mergedOptions.backdropClass,\n\t\t\tpositionStrategy,\n\t\t\tscrollStrategy,\n\t\t\trestoreFocus: mergedOptions.restoreFocus,\n\t\t\tdisableClose: true,\n\t\t\tautoFocus: mergedOptions.autoFocus,\n\t\t\tariaDescribedBy: mergedOptions.ariaDescribedBy,\n\t\t\tariaLabelledBy:\n\t\t\t\tmergedOptions.ariaLabelledBy === undefined ? `brn-dialog-title-${dialogId}` : mergedOptions.ariaLabelledBy,\n\t\t\tariaLabel: mergedOptions.ariaLabel,\n\t\t\tariaModal: mergedOptions.ariaModal,\n\t\t\tproviders: (dialogRef) => {\n\t\t\t\tbrnDialogRef = new BrnDialogRef(dialogRef, this._injector, dialogId, mergedOptions);\n\t\t\t\treturn this._createProviders(brnDialogRef, mergedOptions);\n\t\t\t},\n\t\t});\n\n\t\tthis._connectDismissalEvents(brnDialogRef, cdkDialogRef.overlayRef);\n\t\treturn brnDialogRef;\n\t}\n\n\tprivate _createProviders<Result>(dialogRef: BrnDialogRef<Result>, options: BrnDialogOptions): StaticProvider[] {\n\t\tconst providers: StaticProvider[] = [{ provide: BrnDialogRef, useValue: dialogRef }];\n\t\tif (options.providers) {\n\t\t\tproviders.push(...(typeof options.providers === 'function' ? options.providers() : options.providers));\n\t\t}\n\t\treturn providers;\n\t}\n\n\tprivate _connectDismissalEvents<Result>(dialogRef: BrnDialogRef<Result>, overlayRef: OverlayRef): void {\n\t\tconst closed$ = dialogRef.closed$;\n\n\t\toverlayRef\n\t\t\t.outsidePointerEvents()\n\t\t\t.pipe(takeUntil(closed$))\n\t\t\t.subscribe(() => {\n\t\t\t\tif (this._isTopmostOutsideTarget(overlayRef)) dialogRef.dismiss('outside');\n\t\t\t});\n\n\t\toverlayRef\n\t\t\t.backdropClick()\n\t\t\t.pipe(takeUntil(closed$))\n\t\t\t.subscribe(() => dialogRef.dismiss('backdrop'));\n\n\t\toverlayRef\n\t\t\t.keydownEvents()\n\t\t\t.pipe(\n\t\t\t\tfilter((event) => event.key === 'Escape'),\n\t\t\t\ttakeUntil(closed$),\n\t\t\t)\n\t\t\t.subscribe((event) => {\n\t\t\t\tif (this._overlayCloseDispatcher._attachedOverlays.at(-1) !== overlayRef) return;\n\t\t\t\tif (dialogRef.dismiss('escape')) event.preventDefault();\n\t\t\t});\n\t}\n\n\tprivate _isTopmostOutsideTarget(overlayRef: OverlayRef): boolean {\n\t\tconst overlays = this._overlayCloseDispatcher._attachedOverlays;\n\t\tconst index = overlays.indexOf(overlayRef);\n\t\treturn index === overlays.length - 1 || (overlays.length > 1 && !this._isNested(overlayRef, overlays.at(-1)!));\n\t}\n\n\tprivate _isNested(parent: OverlayRef, child: OverlayRef): boolean {\n\t\tconst childOrigin = (child.getConfig().positionStrategy as FlexibleConnectedPositionStrategy)._origin;\n\t\tif (!childOrigin) return false;\n\n\t\tif ('x' in childOrigin && 'y' in childOrigin) {\n\t\t\tconst rect = parent.hostElement.getBoundingClientRect();\n\t\t\treturn (\n\t\t\t\tchildOrigin.x >= rect.left &&\n\t\t\t\tchildOrigin.x <= rect.right &&\n\t\t\t\tchildOrigin.y >= rect.top &&\n\t\t\t\tchildOrigin.y <= rect.bottom\n\t\t\t);\n\t\t}\n\n\t\tconst element = childOrigin instanceof ElementRef ? childOrigin.nativeElement : childOrigin;\n\t\treturn typeof Node !== 'undefined' && element instanceof Node ? parent.hostElement.contains(element) : false;\n\t}\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { OverlayPositionBuilder, type ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport {\n\tafterNextRender,\n\tbooleanAttribute,\n\tcomputed,\n\tDestroyRef,\n\tDirective,\n\teffect,\n\tinject,\n\tInjector,\n\tinput,\n\toutput,\n\ttype Signal,\n\tsignal,\n\ttype TemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { BrnDialogOptions } from './brn-dialog-options';\nimport type { BrnDialogRef } from './brn-dialog-ref';\nimport type { BrnDialogState } from './brn-dialog-state';\nimport { injectBrnDialogDefaultOptions } from './brn-dialog-token';\nimport { cssClassesToArray } from './brn-dialog-utils';\nimport { BrnDialogService } from './brn-dialog.service';\n\nlet dialogIdSequence = 0;\n\ntype DialogContentRegistration<TContext> = {\n\ttemplate: TemplateRef<unknown>;\n\tcontext: Signal<TContext | undefined>;\n\tpanelClass: Signal<string | null | undefined>;\n};\n\n@Directive({\n\tselector: '[brnDialog],brn-dialog',\n\texportAs: 'brnDialog',\n})\nexport class BrnDialog<TResult = unknown, TContext extends Record<string, unknown> = Record<string, unknown>> {\n\tprivate readonly _dialogService = inject(BrnDialogService);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _vcr = inject(ViewContainerRef);\n\tprotected readonly _positionBuilder = inject(OverlayPositionBuilder);\n\tprivate readonly _scrollStrategies = inject(ScrollStrategyOptions);\n\tprivate readonly _injector = inject(Injector);\n\tprivate readonly _directionality = inject(Directionality);\n\tprotected readonly _defaultOptions = injectBrnDialogDefaultOptions();\n\n\tprivate readonly _dialogRef = signal<BrnDialogRef<TResult> | undefined>(undefined);\n\tprivate readonly _origin = signal<BrnDialogOptions['attachTo']>(undefined);\n\tprivate readonly _panelClass = signal<string | string[] | null | undefined>(undefined);\n\tprivate readonly _backdropClass = signal<string | string[] | null | undefined>(undefined);\n\tprivate _content: DialogContentRegistration<TContext> | undefined;\n\tprivate _destroyed = false;\n\tprivate _overlayClass: Signal<string | null | undefined> | undefined;\n\tprivate readonly _resolvedBackdropClass = computed(\n\t\t() => this._backdropClass() ?? this._overlayClass?.() ?? this._defaultOptions.backdropClass,\n\t);\n\tprivate readonly _resolvedPanelClass = computed(\n\t\t() => this._panelClass() ?? this._content?.panelClass() ?? this._defaultOptions.panelClass,\n\t);\n\n\tpublic readonly closed = output<TResult>();\n\tpublic readonly stateChanged = output<BrnDialogState>();\n\tpublic readonly stateComputed = computed<BrnDialogState>(() => this._dialogRef()?.state() ?? 'closed');\n\n\tpublic readonly id = input<string>(`brn-dialog-${++dialogIdSequence}`);\n\tpublic readonly state = input<BrnDialogState | null>(null);\n\tpublic readonly role = input<BrnDialogOptions['role']>(this._defaultOptions.role);\n\tpublic readonly hasBackdrop = input<boolean, BooleanInput>(this._defaultOptions.hasBackdrop, {\n\t\ttransform: booleanAttribute,\n\t});\n\tpublic readonly positionStrategy = input<BrnDialogOptions['positionStrategy']>(this._defaultOptions.positionStrategy);\n\tpublic readonly scrollStrategy = input<BrnDialogOptions['scrollStrategy'] | 'close' | 'reposition' | null>(\n\t\tthis._defaultOptions.scrollStrategy,\n\t);\n\tpublic readonly restoreFocus = input<BrnDialogOptions['restoreFocus']>(this._defaultOptions.restoreFocus);\n\tpublic readonly closeOnOutsidePointerEvents = input<boolean, BooleanInput>(\n\t\tthis._defaultOptions.closeOnOutsidePointerEvents,\n\t\t{ transform: booleanAttribute },\n\t);\n\n\tpublic readonly attachTo = input<BrnDialogOptions['attachTo']>(this._defaultOptions.attachTo);\n\tpublic readonly attachPositions = input<BrnDialogOptions['attachPositions']>(this._defaultOptions.attachPositions);\n\tpublic readonly autoFocus = input<BrnDialogOptions['autoFocus']>(this._defaultOptions.autoFocus);\n\tpublic readonly disableClose = input<boolean, BooleanInput>(this._defaultOptions.disableClose, {\n\t\ttransform: booleanAttribute,\n\t});\n\tpublic readonly ariaDescribedBy = input<BrnDialogOptions['ariaDescribedBy']>(this._defaultOptions.ariaDescribedBy, {\n\t\talias: 'aria-describedby',\n\t});\n\tpublic readonly ariaLabelledBy = input<BrnDialogOptions['ariaLabelledBy']>(this._defaultOptions.ariaLabelledBy, {\n\t\talias: 'aria-labelledby',\n\t});\n\tpublic readonly ariaLabel = input<BrnDialogOptions['ariaLabel']>(this._defaultOptions.ariaLabel, {\n\t\talias: 'aria-label',\n\t});\n\tpublic readonly ariaModal = input<boolean, BooleanInput>(this._defaultOptions.ariaModal, {\n\t\talias: 'aria-modal',\n\t\ttransform: booleanAttribute,\n\t});\n\n\tprotected readonly _options = computed<Partial<BrnDialogOptions>>(() => ({\n\t\tid: this.id(),\n\t\trole: this.role(),\n\t\tdirection: this._directionality.valueSignal(),\n\t\thasBackdrop: this.hasBackdrop(),\n\t\tpositionStrategy: this.getPositionStrategy(),\n\t\tscrollStrategy: this.getScrollStrategy(),\n\t\trestoreFocus: this.restoreFocus(),\n\t\tcloseOnOutsidePointerEvents: this.closeOnOutsidePointerEvents(),\n\t\tattachTo: this.getAttachTo(),\n\t\tattachPositions: this.attachPositions(),\n\t\tautoFocus: this.autoFocus(),\n\t\tdisableClose: this.disableClose(),\n\t\tbackdropClass: cssClassesToArray(this._resolvedBackdropClass()),\n\t\tpanelClass: cssClassesToArray(this._resolvedPanelClass()),\n\t\tariaDescribedBy: this.ariaDescribedBy(),\n\t\tariaLabelledBy: this.ariaLabelledBy(),\n\t\tariaLabel: this.ariaLabel(),\n\t\tariaModal: this.ariaModal(),\n\t}));\n\n\tconstructor() {\n\t\t// Registered first so the flag is set before forceClose() below tears the dialog down and\n\t\t// emits on closed$/stateChanged$ - otherwise those emits hit a destroyed OutputRef (NG0953).\n\t\tthis._destroyRef.onDestroy(() => (this._destroyed = true));\n\t\tthis._destroyRef.onDestroy(() => this._dialogRef()?.forceClose());\n\t\tthis._syncPanelClass();\n\t\tthis._syncOverlayClass();\n\n\t\tafterNextRender(() => {\n\t\t\teffect(\n\t\t\t\t() => {\n\t\t\t\t\tconst state = this.state();\n\t\t\t\t\tif (state === 'open') untracked(() => this.open());\n\t\t\t\t\tif (state === 'closed') untracked(() => this.close());\n\t\t\t\t},\n\t\t\t\t{ injector: this._injector },\n\t\t\t);\n\t\t});\n\t}\n\n\tpublic open(): void {\n\t\tif (!this._content) return;\n\n\t\tconst currentRef = this._dialogRef();\n\t\tif (currentRef) {\n\t\t\tcurrentRef.reopen();\n\t\t\treturn;\n\t\t}\n\n\t\tconst dialogRef = this._dialogService.open<TContext, TResult>(\n\t\t\tthis._content.template,\n\t\t\tthis._vcr,\n\t\t\tthis._content.context() ?? ({} as TContext),\n\t\t\tthis._options(),\n\t\t);\n\t\tthis._dialogRef.set(dialogRef);\n\n\t\tdialogRef.stateChanged$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((state) => {\n\t\t\tif (!this._destroyed) this.stateChanged.emit(state);\n\t\t});\n\n\t\tdialogRef.closed$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((result) => {\n\t\t\tif (this._dialogRef() === dialogRef) this._dialogRef.set(undefined);\n\t\t\tif (!this._destroyed) this.closed.emit(result as TResult);\n\t\t});\n\t}\n\n\tpublic close(result?: TResult): void {\n\t\tthis._dialogRef()?.close(result);\n\t}\n\n\tpublic registerContent(\n\t\ttemplate: TemplateRef<unknown>,\n\t\tcontext: Signal<TContext | undefined>,\n\t\tpanelClass: Signal<string | null | undefined>,\n\t): void {\n\t\tthis._content = { template, context, panelClass };\n\t}\n\n\tpublic registerOverlayClass(overlayClass: Signal<string | null | undefined>): void {\n\t\tthis._overlayClass = overlayClass;\n\t}\n\n\tpublic setOrigin(origin: BrnDialogOptions['attachTo']): void {\n\t\tthis._origin.set(origin);\n\t}\n\n\tpublic setOverlayClass(overlayClass: string | string[] | null | undefined): void {\n\t\tthis._backdropClass.set(overlayClass);\n\t\tthis._dialogRef()?.setOverlayClass(overlayClass);\n\t}\n\n\tpublic setPanelClass(panelClass: string | string[] | null | undefined): void {\n\t\tthis._panelClass.set(panelClass);\n\t\tthis._dialogRef()?.setPanelClass(panelClass);\n\t}\n\n\tpublic updatePosition(): void {\n\t\tthis._dialogRef()?.updatePosition();\n\t}\n\n\tprotected getAttachTo(): BrnDialogOptions['attachTo'] {\n\t\treturn this.attachTo() ?? this._origin();\n\t}\n\n\tprotected getPositionStrategy(): BrnDialogOptions['positionStrategy'] {\n\t\treturn this.positionStrategy();\n\t}\n\n\tprivate getScrollStrategy(): ScrollStrategy | null | undefined {\n\t\tconst strategy = this.scrollStrategy();\n\t\tif (strategy === 'close') return this._scrollStrategies.close();\n\t\tif (strategy === 'reposition') return this._scrollStrategies.reposition();\n\t\treturn strategy;\n\t}\n\n\tprivate _syncPanelClass(): void {\n\t\teffect(\n\t\t\t() => {\n\t\t\t\tconst dialogRef = this._dialogRef();\n\t\t\t\tif (!dialogRef) return;\n\n\t\t\t\tconst panelClass = this._resolvedPanelClass();\n\t\t\t\tuntracked(() => dialogRef.setPanelClass(panelClass));\n\t\t\t},\n\t\t\t{ injector: this._injector },\n\t\t);\n\t}\n\n\tprivate _syncOverlayClass(): void {\n\t\teffect(\n\t\t\t() => {\n\t\t\t\tconst dialogRef = this._dialogRef();\n\t\t\t\tif (!dialogRef) return;\n\n\t\t\t\tconst overlayClass = this._resolvedBackdropClass();\n\t\t\t\tuntracked(() => dialogRef.setOverlayClass(overlayClass));\n\t\t\t},\n\t\t\t{ injector: this._injector },\n\t\t);\n\t}\n}\n","import { Directive, inject } from '@angular/core';\nimport { BrnDialogRef } from './brn-dialog-ref';\n\n@Directive({\n\tselector: 'button[brnDialogClose]',\n\thost: {\n\t\t'(click)': 'close()',\n\t},\n})\nexport class BrnDialogClose {\n\tprivate readonly _brnDialogRef = inject(BrnDialogRef);\n\n\tpublic close(): void {\n\t\tthis._brnDialogRef.close();\n\t}\n}\n","import { computed, Directive, inject, input, TemplateRef } from '@angular/core';\nimport { provideExposesStateProviderExisting } from '@spartan-ng/brain/core';\nimport { BrnDialog } from './brn-dialog';\nimport { BrnDialogRef } from './brn-dialog-ref';\n\n@Directive({\n\tselector: '[brnDialogContent]',\n\tproviders: [provideExposesStateProviderExisting(() => BrnDialogContent)],\n})\nexport class BrnDialogContent<T extends Record<string, unknown>> {\n\tprivate readonly _brnDialog = inject<BrnDialog<unknown, T>>(BrnDialog, { optional: true });\n\tprivate readonly _brnDialogRef = inject(BrnDialogRef, { optional: true });\n\tprivate readonly _template = inject(TemplateRef);\n\n\tpublic readonly state = computed(() => this._brnDialog?.stateComputed() ?? this._brnDialogRef?.state() ?? 'closed');\n\tpublic readonly className = input<string | null | undefined>(undefined, { alias: 'class' });\n\tpublic readonly context = input<T | undefined>(undefined);\n\n\tconstructor() {\n\t\tthis._brnDialog?.registerContent(this._template, this.context, this.className);\n\t}\n}\n","import { Directive, inject, OnDestroy } from '@angular/core';\nimport { BrnDialogRef } from './brn-dialog-ref';\n\n@Directive({\n\tselector: '[brnDialogDescription]',\n\thost: {\n\t\t'[id]': '_id',\n\t},\n})\nexport class BrnDialogDescription implements OnDestroy {\n\tprivate static _idGenerator = 0;\n\n\tprivate readonly _brnDialogRef = inject(BrnDialogRef);\n\tprotected readonly _id = `brn-dialog-description-${this._brnDialogRef.dialogId}-${++BrnDialogDescription._idGenerator}`;\n\n\tconstructor() {\n\t\tthis._brnDialogRef.registerDescription(this._id);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis._brnDialogRef.unregisterDescription(this._id);\n\t}\n}\n","import { computed, Directive, inject, input, signal } from '@angular/core';\nimport { provideCustomClassSettableExisting } from '@spartan-ng/brain/core';\nimport { BrnDialog } from './brn-dialog';\n\n@Directive({\n\tselector: '[brnDialogOverlay],brn-dialog-overlay',\n\tproviders: [provideCustomClassSettableExisting(() => BrnDialogOverlay)],\n})\nexport class BrnDialogOverlay {\n\tprivate readonly _brnDialog = inject(BrnDialog);\n\tprivate readonly _customClass = signal<string | undefined>(undefined);\n\n\tpublic readonly className = input<string | null | undefined>(undefined, { alias: 'class' });\n\tprivate readonly _resolvedClass = computed(() => this._customClass() ?? this.className());\n\n\tconstructor() {\n\t\tthis._brnDialog.registerOverlayClass(this._resolvedClass);\n\t}\n\n\tpublic setClassToCustomElement(newClass: string): void {\n\t\tthis._customClass.set(newClass);\n\t}\n}\n","import { Directive, inject } from '@angular/core';\nimport { BrnDialogRef } from './brn-dialog-ref';\n\n@Directive({\n\tselector: '[brnDialogTitle]',\n\thost: {\n\t\t'[id]': '_id',\n\t},\n})\nexport class BrnDialogTitle {\n\tprivate readonly _brnDialogRef = inject(BrnDialogRef);\n\tprotected readonly _id = `brn-dialog-title-${this._brnDialogRef.dialogId}`;\n}\n","import { computed, Directive, inject, input } from '@angular/core';\nimport { BrnDialog } from './brn-dialog';\nimport { BrnDialogRef } from './brn-dialog-ref';\nimport type { BrnDialogState } from './brn-dialog-state';\n\nlet triggerIdSequence = 0;\n\n@Directive({\n\tselector: 'button[brnDialogTrigger],button[brnDialogTriggerFor]',\n\texportAs: 'brnDialogTrigger',\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'(click)': 'open()',\n\t\t'aria-haspopup': 'dialog',\n\t\t'[attr.aria-expanded]': \"state() === 'open' ? 'true' : 'false'\",\n\t\t'[attr.data-state]': 'state()',\n\t\t'[attr.aria-controls]': 'dialogId()',\n\t\t'[type]': 'type()',\n\t},\n})\nexport class BrnDialogTrigger {\n\tprivate readonly _injectedDialog = inject(BrnDialog, { optional: true });\n\tprivate readonly _dialogRef = inject(BrnDialogRef, { optional: true });\n\n\tpublic readonly id = input<string>(`brn-dialog-trigger-${++triggerIdSequence}`);\n\tpublic readonly type = input<'button' | 'submit' | 'reset'>('button');\n\tpublic readonly brnDialogTriggerFor = input<BrnDialog | undefined>(undefined, {\n\t\talias: 'brnDialogTriggerFor',\n\t});\n\n\tpublic readonly state = computed<BrnDialogState>(\n\t\t() => this.getDialog()?.stateComputed() ?? this._dialogRef?.state() ?? 'closed',\n\t);\n\tpublic readonly dialogId = computed(() => this.getDialog()?.id() ?? this._dialogRef?.id ?? null);\n\n\tprotected getDialog(): BrnDialog | undefined {\n\t\treturn this.brnDialogTriggerFor() ?? this._injectedDialog ?? undefined;\n\t}\n\n\tpublic open(): void {\n\t\tthis.getDialog()?.open();\n\t}\n}\n","import { BrnDialog } from './lib/brn-dialog';\nimport { BrnDialogClose } from './lib/brn-dialog-close';\nimport { BrnDialogContent } from './lib/brn-dialog-content';\nimport { BrnDialogDescription } from './lib/brn-dialog-description';\nimport { BrnDialogOverlay } from './lib/brn-dialog-overlay';\nimport { BrnDialogTitle } from './lib/brn-dialog-title';\nimport { BrnDialogTrigger } from './lib/brn-dialog-trigger';\n\nexport * from './lib/brn-dialog';\nexport * from './lib/brn-dialog-close';\nexport * from './lib/brn-dialog-content';\nexport * from './lib/brn-dialog-description';\nexport * from './lib/brn-dialog-options';\nexport * from './lib/brn-dialog-overlay';\nexport * from './lib/brn-dialog-ref';\nexport * from './lib/brn-dialog-state';\nexport * from './lib/brn-dialog-title';\nexport * from './lib/brn-dialog-token';\nexport * from './lib/brn-dialog-trigger';\nexport * from './lib/brn-dialog-utils';\nexport * from './lib/brn-dialog.service';\n\nexport const BrnDialogImports = [\n\tBrnDialog,\n\tBrnDialogOverlay,\n\tBrnDialogTrigger,\n\tBrnDialogClose,\n\tBrnDialogContent,\n\tBrnDialogTitle,\n\tBrnDialogDescription,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,cAAc,GAA4B;AACtD,IAAA,eAAe,EAAE,SAAS;AAC1B,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,cAAc,EAAE,SAAS;AACzB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,eAAe,EAAE,EAAE;AACnB,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,SAAS,EAAE,gBAAgB;AAC3B,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,2BAA2B,EAAE,IAAI;AACjC,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,cAAc,EAAE,IAAI;;AAGrB,MAAM,0BAA0B,GAAG,IAAI,cAAc,CAA0B,4BAA4B,EAAE;A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AS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,oBAAoB;;;AC7BrB;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-dialog.mjs","sources":["../../../../libs/brain/dialog/src/lib/brn-dialog-token.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-ref.ts","../../../../libs/brain/dialog/src/lib/brn-dialog.service.ts","../../../../libs/brain/dialog/src/lib/brn-dialog.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-close.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-content.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-description.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-overlay.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-title.ts","../../../../libs/brain/dialog/src/lib/brn-dialog-trigger.ts","../../../../libs/brain/dialog/src/index.ts","../../../../libs/brain/dialog/src/spartan-ng-brain-dialog.ts"],"sourcesContent":["import { inject, InjectionToken, type ValueProvider } from '@angular/core';\nimport type { BrnDialogOptions } from './brn-dialog-options';\n\nexport type BrnDialogDefaultOptions = Omit<BrnDialogOptions, 'direction' | 'id' | 'providers'>;\n\nexport const defaultOptions: BrnDialogDefaultOptions = {\n\tariaDescribedBy: undefined,\n\tariaLabel: undefined,\n\tariaLabelledBy: undefined,\n\tariaModal: true,\n\tattachPositions: [],\n\tattachTo: null,\n\tautoFocus: 'first-tabbable',\n\tbackdropClass: '',\n\tcloseOnOutsidePointerEvents: true,\n\tdisableClose: false,\n\thasBackdrop: true,\n\tpanelClass: '',\n\tpositionStrategy: null,\n\trestoreFocus: true,\n\trole: 'dialog',\n\tscrollStrategy: null,\n};\n\nconst BRN_DIALOG_DEFAULT_OPTIONS = new InjectionToken<BrnDialogDefaultOptions>('brn-dialog-default-options', {\n\tprovidedIn: 'root',\n\tfactory: () => defaultOptions,\n});\n\nexport function provideBrnDialogDefaultOptions(options: Partial<BrnDialogDefaultOptions>): ValueProvider {\n\treturn { provide: BRN_DIALOG_DEFAULT_OPTIONS, useValue: { ...defaultOptions, ...options } };\n}\n\nexport function injectBrnDialogDefaultOptions(): BrnDialogDefaultOptions {\n\treturn inject(BRN_DIALOG_DEFAULT_OPTIONS, { optional: true }) ?? defaultOptions;\n}\n","import type { DialogRef } from '@angular/cdk/dialog';\nimport { afterNextRender, computed, type Injector, signal } from '@angular/core';\nimport { getActiveElementAnimations, waitForAnimations } from '@spartan-ng/brain/core';\nimport { type Observable, ReplaySubject, Subject } from 'rxjs';\nimport type { BrnDialogOptions } from './brn-dialog-options';\nimport type { BrnDialogDismissReason, BrnDialogPhase, BrnDialogState } from './brn-dialog-state';\nimport { cssClassesToArray } from './brn-dialog-utils';\n\nexport class BrnDialogRef<DialogResult = unknown> {\n\tprivate readonly _closing = new Subject<void>();\n\tpublic readonly closing$ = this._closing.asObservable();\n\n\tprivate readonly _closed = new ReplaySubject<DialogResult | undefined>(1);\n\tpublic readonly closed$: Observable<DialogResult | undefined> = this._closed.asObservable();\n\n\tprivate readonly _stateChanged = new ReplaySubject<BrnDialogState>(1);\n\tpublic readonly stateChanged$ = this._stateChanged.asObservable();\n\n\tprivate readonly _phase = signal<BrnDialogPhase>('open');\n\tpublic readonly phase = this._phase.asReadonly();\n\tpublic readonly state = computed<BrnDialogState>(() => (this._phase() === 'open' ? 'open' : 'closed'));\n\n\tprivate _closeGeneration = 0;\n\tprivate _panelClasses: string[];\n\tprivate _backdropClasses: string[];\n\tprivate readonly _descriptionIds = new Set<string>();\n\n\tpublic get open(): boolean {\n\t\treturn this._phase() === 'open';\n\t}\n\n\tpublic get id(): string {\n\t\treturn this.initialOptions.id;\n\t}\n\n\tconstructor(\n\t\tprivate readonly _cdkDialogRef: DialogRef<DialogResult>,\n\t\tprivate readonly _injector: Injector,\n\t\tpublic readonly dialogId: number,\n\t\tprivate readonly initialOptions: BrnDialogOptions,\n\t) {\n\t\tthis._panelClasses = cssClassesToArray(initialOptions.panelClass);\n\t\tthis._backdropClasses = cssClassesToArray(initialOptions.backdropClass);\n\t\tthis._setDataState('open');\n\t\tthis._stateChanged.next('open');\n\n\t\t// The container's `aria-describedby` host binding writes `null` on its first pass, which can\n\t\t// wipe the attribute set while the declarative content view is created. Re-assert once after.\n\t\tafterNextRender(() => this._syncAriaDescribedBy(), { injector: this._injector });\n\n\t\tthis._cdkDialogRef.closed.subscribe((result) => {\n\t\t\tthis._phase.set('closed');\n\t\t\tthis._closed.next(result);\n\t\t\tthis._closed.complete();\n\t\t\tthis._closing.complete();\n\t\t\tthis._stateChanged.complete();\n\t\t});\n\t}\n\n\tpublic close(result?: DialogResult): void {\n\t\tif (!this.open) return;\n\n\t\tconst generation = ++this._closeGeneration;\n\t\tconst animationsBeforeClose = new Set(this._getActiveAnimations());\n\n\t\tthis._phase.set('closing');\n\t\tthis._setDataState('closed');\n\t\tthis._closing.next();\n\t\tthis._stateChanged.next('closed');\n\n\t\tafterNextRender(\n\t\t\t() => {\n\t\t\t\tvoid this._finishClose(generation, animationsBeforeClose, result);\n\t\t\t},\n\t\t\t{ injector: this._injector },\n\t\t);\n\t}\n\n\tpublic dismiss(reason: BrnDialogDismissReason): boolean {\n\t\tconst options = this.initialOptions;\n\t\tconst isOutsideInteraction = reason === 'outside' || reason === 'backdrop';\n\t\tconst outsideCloseAllowed = options.closeOnOutsidePointerEvents;\n\t\tif (!this.open || options.disableClose) return false;\n\t\tif (isOutsideInteraction && !outsideCloseAllowed) return false;\n\n\t\tthis.close();\n\t\treturn true;\n\t}\n\n\tpublic reopen(): void {\n\t\tif (this._phase() !== 'closing') return;\n\n\t\tthis._closeGeneration++;\n\t\tthis._phase.set('open');\n\t\tthis._setDataState('open');\n\t\tthis._stateChanged.next('open');\n\t}\n\n\tpublic forceClose(result?: DialogResult): void {\n\t\tif (this._phase() === 'closed') return;\n\n\t\tthis._closeGeneration++;\n\t\tthis._phase.set('closed');\n\t\tthis._cdkDialogRef.close(result);\n\t}\n\n\tpublic setPanelClass(panelClass: string | string[] | null | undefined): void {\n\t\tif (this._panelClasses.length) this._cdkDialogRef.removePanelClass(this._panelClasses);\n\t\tthis._panelClasses = cssClassesToArray(panelClass);\n\t\tif (this._panelClasses.length) this._cdkDialogRef.addPanelClass(this._panelClasses);\n\t}\n\n\tpublic setOverlayClass(overlayClass: string | string[] | null | undefined): void {\n\t\tconst backdrop = this._cdkDialogRef.overlayRef.backdropElement;\n\t\tif (!backdrop) return;\n\n\t\tbackdrop.classList.remove(...this._backdropClasses);\n\t\tthis._backdropClasses = cssClassesToArray(overlayClass);\n\t\tbackdrop.classList.add(...this._backdropClasses);\n\t}\n\n\tpublic updatePosition(): void {\n\t\tthis._cdkDialogRef.updatePosition();\n\t}\n\n\tpublic registerDescription(id: string): void {\n\t\tthis._descriptionIds.add(id);\n\t\tthis._syncAriaDescribedBy();\n\t}\n\n\tpublic unregisterDescription(id: string): void {\n\t\tthis._descriptionIds.delete(id);\n\t\tthis._syncAriaDescribedBy();\n\t}\n\n\tprivate _syncAriaDescribedBy(): void {\n\t\tif (this.initialOptions.ariaDescribedBy !== undefined) return;\n\n\t\tconst id = this._descriptionIds.size ? [...this._descriptionIds].join(' ') : undefined;\n\t\tconst container = this._cdkDialogRef.overlayRef.overlayElement?.querySelector('cdk-dialog-container');\n\n\t\tif (id) {\n\t\t\tcontainer?.setAttribute('aria-describedby', id);\n\t\t} else {\n\t\t\tcontainer?.removeAttribute('aria-describedby');\n\t\t}\n\t}\n\n\tprivate async _finishClose(\n\t\tgeneration: number,\n\t\tanimationsBeforeClose: ReadonlySet<Animation>,\n\t\tresult?: DialogResult,\n\t): Promise<void> {\n\t\tif (generation !== this._closeGeneration || this._phase() !== 'closing') return;\n\n\t\tconst exitAnimations = this._getActiveAnimations().filter((animation) => !animationsBeforeClose.has(animation));\n\t\t// Pin each exit animation to its final frame. tw-animate-css uses `animation-fill-mode: none`,\n\t\t// so a finished exit reverts the element to its visible state in the gap before we dispose it -\n\t\t// that one-frame snap-back is the flicker. updateTiming pins only the animations we await.\n\t\tfor (const animation of exitAnimations) {\n\t\t\tanimation.effect?.updateTiming({ fill: 'forwards' });\n\t\t}\n\t\tawait waitForAnimations(exitAnimations);\n\n\t\tif (generation === this._closeGeneration && this._phase() === 'closing') {\n\t\t\tthis._phase.set('closed');\n\t\t\tthis._cdkDialogRef.close(result);\n\t\t}\n\t}\n\n\tprivate _getActiveAnimations(): Animation[] {\n\t\treturn getActiveElementAnimations([\n\t\t\tthis._cdkDialogRef.overlayRef.overlayElement,\n\t\t\tthis._cdkDialogRef.overlayRef.backdropElement,\n\t\t]);\n\t}\n\n\tprivate _setDataState(state: BrnDialogState): void {\n\t\tthis._cdkDialogRef.overlayRef.overlayElement.setAttribute('data-state', state);\n\t\tthis._cdkDialogRef.overlayRef.backdropElement?.setAttribute('data-state', state);\n\t}\n}\n","import { Dialog, DIALOG_DATA } from '@angular/cdk/dialog';\nimport {\n\ttype ComponentType,\n\tFlexibleConnectedPositionStrategy,\n\tOverlayOutsideClickDispatcher,\n\tOverlayPositionBuilder,\n\ttype OverlayRef,\n\tScrollStrategyOptions,\n} from '@angular/cdk/overlay';\nimport type { TemplateRef, ViewContainerRef } from '@angular/core';\nimport { ElementRef, inject, Injectable, type InjectOptions, Injector, type StaticProvider } from '@angular/core';\nimport { filter, takeUntil } from 'rxjs/operators';\nimport type { BrnDialogOptions } from './brn-dialog-options';\nimport { BrnDialogRef } from './brn-dialog-ref';\nimport { injectBrnDialogDefaultOptions } from './brn-dialog-token';\n\nlet dialogSequence = 0;\n\nexport type BrnDialogContext<T> = T & { close: (result?: unknown) => void };\n\nexport const injectBrnDialogContext = <DialogContext = unknown>(options: InjectOptions = {}) =>\n\tinject(DIALOG_DATA, options) as DialogContext;\n\n@Injectable({ providedIn: 'root' })\nexport class BrnDialogService {\n\tprivate readonly _overlayCloseDispatcher = inject(OverlayOutsideClickDispatcher);\n\tprivate readonly _cdkDialog = inject(Dialog);\n\tprivate readonly _positionBuilder = inject(OverlayPositionBuilder);\n\tprivate readonly _scrollStrategies = inject(ScrollStrategyOptions);\n\tprivate readonly _injector = inject(Injector);\n\tprivate readonly _defaultOptions = injectBrnDialogDefaultOptions();\n\n\tpublic open<DialogContext, DialogResult = unknown>(\n\t\tcontent: ComponentType<unknown> | TemplateRef<unknown>,\n\t\tvcr?: ViewContainerRef,\n\t\tcontext?: DialogContext,\n\t\toptions?: Partial<BrnDialogOptions>,\n\t): BrnDialogRef<DialogResult> {\n\t\tconst dialogId = ++dialogSequence;\n\t\tconst mergedOptions: BrnDialogOptions = {\n\t\t\t...this._defaultOptions,\n\t\t\t...options,\n\t\t\tid: options?.id ?? `brn-dialog-${dialogId}`,\n\t\t};\n\n\t\tif (this._cdkDialog.getDialogById(mergedOptions.id)) {\n\t\t\tthrow new Error(`Dialog with ID: ${mergedOptions.id} already exists`);\n\t\t}\n\n\t\tconst positionStrategy =\n\t\t\tmergedOptions.positionStrategy ??\n\t\t\t(mergedOptions.attachTo && mergedOptions.attachPositions.length\n\t\t\t\t? this._positionBuilder.flexibleConnectedTo(mergedOptions.attachTo).withPositions(mergedOptions.attachPositions)\n\t\t\t\t: this._positionBuilder.global().centerHorizontally().centerVertically());\n\n\t\tconst scrollStrategy =\n\t\t\tmergedOptions.scrollStrategy === 'close'\n\t\t\t\t? this._scrollStrategies.close()\n\t\t\t\t: mergedOptions.scrollStrategy === 'reposition'\n\t\t\t\t\t? this._scrollStrategies.reposition()\n\t\t\t\t\t: (mergedOptions.scrollStrategy ?? this._scrollStrategies.block());\n\n\t\tlet brnDialogRef!: BrnDialogRef<DialogResult>;\n\t\tconst contextOrData: BrnDialogContext<DialogContext> = {\n\t\t\t...(context as DialogContext),\n\t\t\tclose: (result: unknown = undefined) => brnDialogRef.close(result as DialogResult),\n\t\t};\n\n\t\tconst cdkDialogRef = this._cdkDialog.open<DialogResult, BrnDialogContext<DialogContext>, unknown>(content, {\n\t\t\tid: mergedOptions.id,\n\t\t\trole: mergedOptions.role,\n\t\t\tviewContainerRef: vcr,\n\t\t\ttemplateContext: () => ({ $implicit: contextOrData }),\n\t\t\tdata: contextOrData,\n\t\t\tdirection: mergedOptions.direction,\n\t\t\thasBackdrop: mergedOptions.hasBackdrop,\n\t\t\tpanelClass: mergedOptions.panelClass,\n\t\t\tbackdropClass: mergedOptions.backdropClass,\n\t\t\tpositionStrategy,\n\t\t\tscrollStrategy,\n\t\t\trestoreFocus: mergedOptions.restoreFocus,\n\t\t\tdisableClose: true,\n\t\t\tautoFocus: mergedOptions.autoFocus,\n\t\t\tariaDescribedBy: mergedOptions.ariaDescribedBy,\n\t\t\tariaLabelledBy:\n\t\t\t\tmergedOptions.ariaLabelledBy === undefined ? `brn-dialog-title-${dialogId}` : mergedOptions.ariaLabelledBy,\n\t\t\tariaLabel: mergedOptions.ariaLabel,\n\t\t\tariaModal: mergedOptions.ariaModal,\n\t\t\tproviders: (dialogRef) => {\n\t\t\t\tbrnDialogRef = new BrnDialogRef(dialogRef, this._injector, dialogId, mergedOptions);\n\t\t\t\treturn this._createProviders(brnDialogRef, mergedOptions);\n\t\t\t},\n\t\t});\n\n\t\tthis._connectDismissalEvents(brnDialogRef, cdkDialogRef.overlayRef);\n\t\treturn brnDialogRef;\n\t}\n\n\tprivate _createProviders<Result>(dialogRef: BrnDialogRef<Result>, options: BrnDialogOptions): StaticProvider[] {\n\t\tconst providers: StaticProvider[] = [{ provide: BrnDialogRef, useValue: dialogRef }];\n\t\tif (options.providers) {\n\t\t\tproviders.push(...(typeof options.providers === 'function' ? options.providers() : options.providers));\n\t\t}\n\t\treturn providers;\n\t}\n\n\tprivate _connectDismissalEvents<Result>(dialogRef: BrnDialogRef<Result>, overlayRef: OverlayRef): void {\n\t\tconst closed$ = dialogRef.closed$;\n\n\t\toverlayRef\n\t\t\t.outsidePointerEvents()\n\t\t\t.pipe(takeUntil(closed$))\n\t\t\t.subscribe(() => {\n\t\t\t\tif (this._isTopmostOutsideTarget(overlayRef)) dialogRef.dismiss('outside');\n\t\t\t});\n\n\t\toverlayRef\n\t\t\t.backdropClick()\n\t\t\t.pipe(takeUntil(closed$))\n\t\t\t.subscribe(() => dialogRef.dismiss('backdrop'));\n\n\t\toverlayRef\n\t\t\t.keydownEvents()\n\t\t\t.pipe(\n\t\t\t\tfilter((event) => event.key === 'Escape'),\n\t\t\t\ttakeUntil(closed$),\n\t\t\t)\n\t\t\t.subscribe((event) => {\n\t\t\t\tif (this._overlayCloseDispatcher._attachedOverlays.at(-1) !== overlayRef) return;\n\t\t\t\tif (dialogRef.dismiss('escape')) event.preventDefault();\n\t\t\t});\n\t}\n\n\tprivate _isTopmostOutsideTarget(overlayRef: OverlayRef): boolean {\n\t\tconst overlays = this._overlayCloseDispatcher._attachedOverlays;\n\t\tconst index = overlays.indexOf(overlayRef);\n\t\treturn index === overlays.length - 1 || (overlays.length > 1 && !this._isNested(overlayRef, overlays.at(-1)!));\n\t}\n\n\tprivate _isNested(parent: OverlayRef, child: OverlayRef): boolean {\n\t\tconst childOrigin = (child.getConfig().positionStrategy as FlexibleConnectedPositionStrategy)._origin;\n\t\tif (!childOrigin) return false;\n\n\t\tif ('x' in childOrigin && 'y' in childOrigin) {\n\t\t\tconst rect = parent.hostElement.getBoundingClientRect();\n\t\t\treturn (\n\t\t\t\tchildOrigin.x >= rect.left &&\n\t\t\t\tchildOrigin.x <= rect.right &&\n\t\t\t\tchildOrigin.y >= rect.top &&\n\t\t\t\tchildOrigin.y <= rect.bottom\n\t\t\t);\n\t\t}\n\n\t\tconst element = childOrigin instanceof ElementRef ? childOrigin.nativeElement : childOrigin;\n\t\treturn typeof Node !== 'undefined' && element instanceof Node ? parent.hostElement.contains(element) : false;\n\t}\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { OverlayPositionBuilder, type ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport {\n\tafterNextRender,\n\tbooleanAttribute,\n\tcomputed,\n\tDestroyRef,\n\tDirective,\n\teffect,\n\tinject,\n\tInjector,\n\tinput,\n\toutput,\n\ttype Signal,\n\tsignal,\n\ttype TemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { BrnDialogOptions } from './brn-dialog-options';\nimport type { BrnDialogRef } from './brn-dialog-ref';\nimport type { BrnDialogState } from './brn-dialog-state';\nimport { injectBrnDialogDefaultOptions } from './brn-dialog-token';\nimport { cssClassesToArray } from './brn-dialog-utils';\nimport { BrnDialogService } from './brn-dialog.service';\n\nlet dialogIdSequence = 0;\n\ntype DialogContentRegistration<TContext> = {\n\ttemplate: TemplateRef<unknown>;\n\tcontext: Signal<TContext | undefined>;\n\tpanelClass: Signal<string | null | undefined>;\n};\n\n@Directive({\n\tselector: '[brnDialog],brn-dialog',\n\texportAs: 'brnDialog',\n})\nexport class BrnDialog<TResult = unknown, TContext extends Record<string, unknown> = Record<string, unknown>> {\n\tprivate readonly _dialogService = inject(BrnDialogService);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _vcr = inject(ViewContainerRef);\n\tprotected readonly _positionBuilder = inject(OverlayPositionBuilder);\n\tprivate readonly _scrollStrategies = inject(ScrollStrategyOptions);\n\tprivate readonly _injector = inject(Injector);\n\tprivate readonly _directionality = inject(Directionality);\n\tprotected readonly _defaultOptions = injectBrnDialogDefaultOptions();\n\n\tprivate readonly _dialogRef = signal<BrnDialogRef<TResult> | undefined>(undefined);\n\tprivate readonly _origin = signal<BrnDialogOptions['attachTo']>(undefined);\n\tprivate readonly _panelClass = signal<string | string[] | null | undefined>(undefined);\n\tprivate readonly _backdropClass = signal<string | string[] | null | undefined>(undefined);\n\tprivate _content: DialogContentRegistration<TContext> | undefined;\n\tprivate _destroyed = false;\n\tprivate _overlayClass: Signal<string | null | undefined> | undefined;\n\tprivate readonly _resolvedBackdropClass = computed(\n\t\t() => this._backdropClass() ?? this._overlayClass?.() ?? this._defaultOptions.backdropClass,\n\t);\n\tprivate readonly _resolvedPanelClass = computed(\n\t\t() => this._panelClass() ?? this._content?.panelClass() ?? this._defaultOptions.panelClass,\n\t);\n\n\tpublic readonly closed = output<TResult>();\n\tpublic readonly stateChanged = output<BrnDialogState>();\n\tpublic readonly stateComputed = computed<BrnDialogState>(() => this._dialogRef()?.state() ?? 'closed');\n\n\tpublic readonly id = input<string>(`brn-dialog-${++dialogIdSequence}`);\n\tpublic readonly state = input<BrnDialogState | null>(null);\n\tpublic readonly role = input<BrnDialogOptions['role']>(this._defaultOptions.role);\n\tpublic readonly hasBackdrop = input<boolean, BooleanInput>(this._defaultOptions.hasBackdrop, {\n\t\ttransform: booleanAttribute,\n\t});\n\tpublic readonly positionStrategy = input<BrnDialogOptions['positionStrategy']>(this._defaultOptions.positionStrategy);\n\tpublic readonly scrollStrategy = input<BrnDialogOptions['scrollStrategy'] | 'close' | 'reposition' | null>(\n\t\tthis._defaultOptions.scrollStrategy,\n\t);\n\tpublic readonly restoreFocus = input<BrnDialogOptions['restoreFocus']>(this._defaultOptions.restoreFocus);\n\tpublic readonly closeOnOutsidePointerEvents = input<boolean, BooleanInput>(\n\t\tthis._defaultOptions.closeOnOutsidePointerEvents,\n\t\t{ transform: booleanAttribute },\n\t);\n\n\tpublic readonly attachTo = input<BrnDialogOptions['attachTo']>(this._defaultOptions.attachTo);\n\tpublic readonly attachPositions = input<BrnDialogOptions['attachPositions']>(this._defaultOptions.attachPositions);\n\tpublic readonly autoFocus = input<BrnDialogOptions['autoFocus']>(this._defaultOptions.autoFocus);\n\tpublic readonly disableClose = input<boolean, BooleanInput>(this._defaultOptions.disableClose, {\n\t\ttransform: booleanAttribute,\n\t});\n\tpublic readonly ariaDescribedBy = input<BrnDialogOptions['ariaDescribedBy']>(this._defaultOptions.ariaDescribedBy, {\n\t\talias: 'aria-describedby',\n\t});\n\tpublic readonly ariaLabelledBy = input<BrnDialogOptions['ariaLabelledBy']>(this._defaultOptions.ariaLabelledBy, {\n\t\talias: 'aria-labelledby',\n\t});\n\tpublic readonly ariaLabel = input<BrnDialogOptions['ariaLabel']>(this._defaultOptions.ariaLabel, {\n\t\talias: 'aria-label',\n\t});\n\tpublic readonly ariaModal = input<boolean, BooleanInput>(this._defaultOptions.ariaModal, {\n\t\talias: 'aria-modal',\n\t\ttransform: booleanAttribute,\n\t});\n\n\tprotected readonly _options = computed<Partial<BrnDialogOptions>>(() => ({\n\t\tid: this.id(),\n\t\trole: this.role(),\n\t\tdirection: this._directionality.valueSignal(),\n\t\thasBackdrop: this.hasBackdrop(),\n\t\tpositionStrategy: this.getPositionStrategy(),\n\t\tscrollStrategy: this.getScrollStrategy(),\n\t\trestoreFocus: this.restoreFocus(),\n\t\tcloseOnOutsidePointerEvents: this.closeOnOutsidePointerEvents(),\n\t\tattachTo: this.getAttachTo(),\n\t\tattachPositions: this.attachPositions(),\n\t\tautoFocus: this.autoFocus(),\n\t\tdisableClose: this.disableClose(),\n\t\tbackdropClass: cssClassesToArray(this._resolvedBackdropClass()),\n\t\tpanelClass: cssClassesToArray(this._resolvedPanelClass()),\n\t\tariaDescribedBy: this.ariaDescribedBy(),\n\t\tariaLabelledBy: this.ariaLabelledBy(),\n\t\tariaLabel: this.ariaLabel(),\n\t\tariaModal: this.ariaModal(),\n\t}));\n\n\tconstructor() {\n\t\t// Registered first so the flag is set before forceClose() below tears the dialog down and\n\t\t// emits on closed$/stateChanged$ - otherwise those emits hit a destroyed OutputRef (NG0953).\n\t\tthis._destroyRef.onDestroy(() => (this._destroyed = true));\n\t\tthis._destroyRef.onDestroy(() => this._dialogRef()?.forceClose());\n\t\tthis._syncPanelClass();\n\t\tthis._syncOverlayClass();\n\n\t\tafterNextRender(() => {\n\t\t\teffect(\n\t\t\t\t() => {\n\t\t\t\t\tconst state = this.state();\n\t\t\t\t\tif (state === 'open') untracked(() => this.open());\n\t\t\t\t\tif (state === 'closed') untracked(() => this.close());\n\t\t\t\t},\n\t\t\t\t{ injector: this._injector },\n\t\t\t);\n\t\t});\n\t}\n\n\tpublic open(): void {\n\t\tif (!this._content) return;\n\n\t\tconst currentRef = this._dialogRef();\n\t\tif (currentRef) {\n\t\t\tcurrentRef.reopen();\n\t\t\treturn;\n\t\t}\n\n\t\tconst dialogRef = this._dialogService.open<TContext, TResult>(\n\t\t\tthis._content.template,\n\t\t\tthis._vcr,\n\t\t\tthis._content.context() ?? ({} as TContext),\n\t\t\tthis._options(),\n\t\t);\n\t\tthis._dialogRef.set(dialogRef);\n\n\t\tdialogRef.stateChanged$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((state) => {\n\t\t\tif (!this._destroyed) this.stateChanged.emit(state);\n\t\t});\n\n\t\tdialogRef.closed$.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((result) => {\n\t\t\tif (this._dialogRef() === dialogRef) this._dialogRef.set(undefined);\n\t\t\tif (!this._destroyed) this.closed.emit(result as TResult);\n\t\t});\n\t}\n\n\tpublic close(result?: TResult): void {\n\t\tthis._dialogRef()?.close(result);\n\t}\n\n\tpublic registerContent(\n\t\ttemplate: TemplateRef<unknown>,\n\t\tcontext: Signal<TContext | undefined>,\n\t\tpanelClass: Signal<string | null | undefined>,\n\t): void {\n\t\tthis._content = { template, context, panelClass };\n\t}\n\n\tpublic registerOverlayClass(overlayClass: Signal<string | null | undefined>): void {\n\t\tthis._overlayClass = overlayClass;\n\t}\n\n\tpublic setOrigin(origin: BrnDialogOptions['attachTo']): void {\n\t\tthis._origin.set(origin);\n\t}\n\n\tpublic setOverlayClass(overlayClass: string | string[] | null | undefined): void {\n\t\tthis._backdropClass.set(overlayClass);\n\t\tthis._dialogRef()?.setOverlayClass(overlayClass);\n\t}\n\n\tpublic setPanelClass(panelClass: string | string[] | null | undefined): void {\n\t\tthis._panelClass.set(panelClass);\n\t\tthis._dialogRef()?.setPanelClass(panelClass);\n\t}\n\n\tpublic updatePosition(): void {\n\t\tthis._dialogRef()?.updatePosition();\n\t}\n\n\tprotected getAttachTo(): BrnDialogOptions['attachTo'] {\n\t\treturn this.attachTo() ?? this._origin();\n\t}\n\n\tprotected getPositionStrategy(): BrnDialogOptions['positionStrategy'] {\n\t\treturn this.positionStrategy();\n\t}\n\n\tprivate getScrollStrategy(): ScrollStrategy | null | undefined {\n\t\tconst strategy = this.scrollStrategy();\n\t\tif (strategy === 'close') return this._scrollStrategies.close();\n\t\tif (strategy === 'reposition') return this._scrollStrategies.reposition();\n\t\treturn strategy;\n\t}\n\n\tprivate _syncPanelClass(): void {\n\t\teffect(\n\t\t\t() => {\n\t\t\t\tconst dialogRef = this._dialogRef();\n\t\t\t\tif (!dialogRef) return;\n\n\t\t\t\tconst panelClass = this._resolvedPanelClass();\n\t\t\t\tuntracked(() => dialogRef.setPanelClass(panelClass));\n\t\t\t},\n\t\t\t{ injector: this._injector },\n\t\t);\n\t}\n\n\tprivate _syncOverlayClass(): void {\n\t\teffect(\n\t\t\t() => {\n\t\t\t\tconst dialogRef = this._dialogRef();\n\t\t\t\tif (!dialogRef) return;\n\n\t\t\t\tconst overlayClass = this._resolvedBackdropClass();\n\t\t\t\tuntracked(() => dialogRef.setOverlayClass(overlayClass));\n\t\t\t},\n\t\t\t{ injector: this._injector },\n\t\t);\n\t}\n}\n","import { Directive, inject } from '@angular/core';\nimport { BrnDialogRef } from './brn-dialog-ref';\n\n@Directive({\n\tselector: 'button[brnDialogClose]',\n\thost: {\n\t\t'(click)': 'close()',\n\t},\n})\nexport class BrnDialogClose {\n\tprivate readonly _brnDialogRef = inject(BrnDialogRef);\n\n\tpublic close(): void {\n\t\tthis._brnDialogRef.close();\n\t}\n}\n","import { computed, Directive, inject, input, TemplateRef } from '@angular/core';\nimport { provideExposesStateProviderExisting } from '@spartan-ng/brain/core';\nimport { BrnDialog } from './brn-dialog';\nimport { BrnDialogRef } from './brn-dialog-ref';\n\n@Directive({\n\tselector: '[brnDialogContent]',\n\tproviders: [provideExposesStateProviderExisting(() => BrnDialogContent)],\n})\nexport class BrnDialogContent<T extends Record<string, unknown>> {\n\tprivate readonly _brnDialog = inject<BrnDialog<unknown, T>>(BrnDialog, { optional: true });\n\tprivate readonly _brnDialogRef = inject(BrnDialogRef, { optional: true });\n\tprivate readonly _template = inject(TemplateRef);\n\n\tpublic readonly state = computed(() => this._brnDialog?.stateComputed() ?? this._brnDialogRef?.state() ?? 'closed');\n\tpublic readonly className = input<string | null | undefined>(undefined, { alias: 'class' });\n\tpublic readonly context = input<T | undefined>(undefined);\n\n\tconstructor() {\n\t\tthis._brnDialog?.registerContent(this._template, this.context, this.className);\n\t}\n}\n","import { Directive, inject, OnDestroy } from '@angular/core';\nimport { BrnDialogRef } from './brn-dialog-ref';\n\n@Directive({\n\tselector: '[brnDialogDescription]',\n\thost: {\n\t\t'[id]': '_id',\n\t},\n})\nexport class BrnDialogDescription implements OnDestroy {\n\tprivate static _idGenerator = 0;\n\n\tprivate readonly _brnDialogRef = inject(BrnDialogRef);\n\tprotected readonly _id = `brn-dialog-description-${this._brnDialogRef.dialogId}-${++BrnDialogDescription._idGenerator}`;\n\n\tconstructor() {\n\t\tthis._brnDialogRef.registerDescription(this._id);\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\tthis._brnDialogRef.unregisterDescription(this._id);\n\t}\n}\n","import { computed, Directive, inject, input, signal } from '@angular/core';\nimport { provideCustomClassSettableExisting } from '@spartan-ng/brain/core';\nimport { BrnDialog } from './brn-dialog';\n\n@Directive({\n\tselector: '[brnDialogOverlay],brn-dialog-overlay',\n\tproviders: [provideCustomClassSettableExisting(() => BrnDialogOverlay)],\n})\nexport class BrnDialogOverlay {\n\tprivate readonly _brnDialog = inject(BrnDialog);\n\tprivate readonly _customClass = signal<string | undefined>(undefined);\n\n\tpublic readonly className = input<string | null | undefined>(undefined, { alias: 'class' });\n\tprivate readonly _resolvedClass = computed(() => this._customClass() ?? this.className());\n\n\tconstructor() {\n\t\tthis._brnDialog.registerOverlayClass(this._resolvedClass);\n\t}\n\n\tpublic setClassToCustomElement(newClass: string): void {\n\t\tthis._customClass.set(newClass);\n\t}\n}\n","import { Directive, inject } from '@angular/core';\nimport { BrnDialogRef } from './brn-dialog-ref';\n\n@Directive({\n\tselector: '[brnDialogTitle]',\n\thost: {\n\t\t'[id]': '_id',\n\t},\n})\nexport class BrnDialogTitle {\n\tprivate readonly _brnDialogRef = inject(BrnDialogRef);\n\tprotected readonly _id = `brn-dialog-title-${this._brnDialogRef.dialogId}`;\n}\n","import { computed, Directive, inject, input } from '@angular/core';\nimport { BrnDialog } from './brn-dialog';\nimport { BrnDialogRef } from './brn-dialog-ref';\nimport type { BrnDialogState } from './brn-dialog-state';\n\nlet triggerIdSequence = 0;\n\n@Directive({\n\tselector: 'button[brnDialogTrigger],button[brnDialogTriggerFor]',\n\texportAs: 'brnDialogTrigger',\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'(click)': 'open()',\n\t\t'aria-haspopup': 'dialog',\n\t\t'[attr.aria-expanded]': \"state() === 'open' ? 'true' : 'false'\",\n\t\t'[attr.data-state]': 'state()',\n\t\t'[attr.aria-controls]': 'dialogId()',\n\t\t'[type]': 'type()',\n\t},\n})\nexport class BrnDialogTrigger {\n\tprivate readonly _injectedDialog = inject(BrnDialog, { optional: true });\n\tprivate readonly _dialogRef = inject(BrnDialogRef, { optional: true });\n\n\tpublic readonly id = input<string>(`brn-dialog-trigger-${++triggerIdSequence}`);\n\tpublic readonly type = input<'button' | 'submit' | 'reset'>('button');\n\tpublic readonly brnDialogTriggerFor = input<BrnDialog | undefined>(undefined, {\n\t\talias: 'brnDialogTriggerFor',\n\t});\n\n\tpublic readonly state = computed<BrnDialogState>(\n\t\t() => this.getDialog()?.stateComputed() ?? this._dialogRef?.state() ?? 'closed',\n\t);\n\tpublic readonly dialogId = computed(() => this.getDialog()?.id() ?? this._dialogRef?.id ?? null);\n\n\tprotected getDialog(): BrnDialog | undefined {\n\t\treturn this.brnDialogTriggerFor() ?? this._injectedDialog ?? undefined;\n\t}\n\n\tpublic open(): void {\n\t\tthis.getDialog()?.open();\n\t}\n}\n","import { BrnDialog } from './lib/brn-dialog';\nimport { BrnDialogClose } from './lib/brn-dialog-close';\nimport { BrnDialogContent } from './lib/brn-dialog-content';\nimport { BrnDialogDescription } from './lib/brn-dialog-description';\nimport { BrnDialogOverlay } from './lib/brn-dialog-overlay';\nimport { BrnDialogTitle } from './lib/brn-dialog-title';\nimport { BrnDialogTrigger } from './lib/brn-dialog-trigger';\n\nexport * from './lib/brn-dialog';\nexport * from './lib/brn-dialog-close';\nexport * from './lib/brn-dialog-content';\nexport * from './lib/brn-dialog-description';\nexport * from './lib/brn-dialog-options';\nexport * from './lib/brn-dialog-overlay';\nexport * from './lib/brn-dialog-ref';\nexport * from './lib/brn-dialog-state';\nexport * from './lib/brn-dialog-title';\nexport * from './lib/brn-dialog-token';\nexport * from './lib/brn-dialog-trigger';\nexport * from './lib/brn-dialog-utils';\nexport * from './lib/brn-dialog.service';\n\nexport const BrnDialogImports = [\n\tBrnDialog,\n\tBrnDialogOverlay,\n\tBrnDialogTrigger,\n\tBrnDialogClose,\n\tBrnDialogContent,\n\tBrnDialogTitle,\n\tBrnDialogDescription,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,cAAc,GAA4B;AACtD,IAAA,eAAe,EAAE,SAAS;AAC1B,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,cAAc,EAAE,SAAS;AACzB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,eAAe,EAAE,EAAE;AACnB,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,SAAS,EAAE,gBAAgB;AAC3B,IAAA,aAAa,EAAE,EAAE;AACjB,IAAA,2BAA2B,EAAE,IAAI;AACjC,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,gBAAgB,EAAE,IAAI;AACtB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,cAAc,EAAE,IAAI;;AAGrB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wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,QAAQ,EAAE,QAAQ;AAClB,qBAAA;AACD,iBAAA;;;ACGM,MAAM,gBAAgB,GAAG;IAC/B,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,oBAAoB;;;AC7BrB;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spartan-ng/brain",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/spartan-ng/spartan.git"
@@ -1,6 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Signal, NgZone, ElementRef, Injector, InjectionToken } from '@angular/core';
3
3
  import { Subject, Observable, MonoTypeOperatorFunction } from 'rxjs';
4
+ import { CdkMenuTrigger } from '@angular/cdk/menu';
4
5
  import { ConnectedPosition } from '@angular/cdk/overlay';
5
6
 
6
7
  /**
@@ -166,6 +167,17 @@ interface MenuSideProvider {
166
167
  declare const MENU_SIDE: InjectionToken<MenuSideProvider>;
167
168
  declare const deriveMenuSideFromTransformOrigin: (transformOrigin: string, side: MenuSide) => MenuSide;
168
169
  declare const createMenuPosition: (align: MenuAlign, side: MenuSide) => ConnectedPosition[];
170
+ /**
171
+ * Applies the given positions to a CDK menu trigger.
172
+ *
173
+ * CDK reads `menuPosition` only when it builds the overlay's `FlexibleConnectedPositionStrategy` (first
174
+ * open) and when its `ngOnChanges` runs. The trigger reuses a single overlay across opens, so a bare
175
+ * `menuPosition` assignment is silently ignored once the overlay exists - e.g. when `side`/`align`
176
+ * change at runtime, the next open keeps the position from the first open. Assigning the property and
177
+ * poking CDK's change handler refreshes an already-created overlay (whether open or reused) so the new
178
+ * positions take effect. When no overlay exists yet the assignment alone is enough.
179
+ */
180
+ declare const updateMenuPosition: (trigger: CdkMenuTrigger, position: ConnectedPosition[]) => void;
169
181
 
170
182
  declare function stringifyAsLabel(item: any, itemToStringLabel?: (item: any) => string): string;
171
183
  declare function serializeValue(value: unknown): string;
@@ -219,5 +231,5 @@ declare function brnZoneFull<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
219
231
  declare function brnZoneFree<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
220
232
  declare function brnZoneOptimized<T>(zone: NgZone): MonoTypeOperatorFunction<T>;
221
233
 
222
- export { EXPOSES_SIDE_TOKEN, EXPOSES_STATE_TOKEN, MENU_SIDE, SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN, SET_TABLE_CLASSES_TOKEN, brnDevMode, brnZoneFree, brnZoneFull, brnZoneOptimized, computedPrevious, createHoverObservable, createMenuPosition, cssClassesToArray, debouncedSignal, deriveMenuSideFromTransformOrigin, getActiveElementAnimations, injectContentDimensions, injectCustomClassSettable, injectElementSize, injectExposedSideProvider, injectExposesStateProvider, injectSkipDelay, injectTableClassesSettable, isElement, provideCustomClassSettable, provideCustomClassSettableExisting, provideExposedSideProvider, provideExposedSideProviderExisting, provideExposesStateProvider, provideExposesStateProviderExisting, provideTableClassesSettable, provideTableClassesSettableExisting, serializeValue, stringifyAsLabel, waitForAnimations, waitForElementAnimations };
234
+ export { EXPOSES_SIDE_TOKEN, EXPOSES_STATE_TOKEN, MENU_SIDE, SET_CLASS_TO_CUSTOM_ELEMENT_TOKEN, SET_TABLE_CLASSES_TOKEN, brnDevMode, brnZoneFree, brnZoneFull, brnZoneOptimized, computedPrevious, createHoverObservable, createMenuPosition, cssClassesToArray, debouncedSignal, deriveMenuSideFromTransformOrigin, getActiveElementAnimations, injectContentDimensions, injectCustomClassSettable, injectElementSize, injectExposedSideProvider, injectExposesStateProvider, injectSkipDelay, injectTableClassesSettable, isElement, provideCustomClassSettable, provideCustomClassSettableExisting, provideExposedSideProvider, provideExposedSideProviderExisting, provideExposesStateProvider, provideExposesStateProviderExisting, provideTableClassesSettable, provideTableClassesSettableExisting, serializeValue, stringifyAsLabel, updateMenuPosition, waitForAnimations, waitForElementAnimations };
223
235
  export type { ContentDimensions, CustomElementClassSettable, ExposesSide, ExposesState, MenuAlign, MenuSide, MenuSideProvider, SkipDelay, TableClassesSettable };