@scion/components 21.1.1 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,7 +29,8 @@ class SciDimensionDirective {
29
29
  /**
30
30
  * Controls if to output outside the Angular zone. Defaults to `false`.
31
31
  */
32
- emitOutsideAngular = input(false, ...(ngDevMode ? [{ debugName: "emitOutsideAngular" }] : []));
32
+ emitOutsideAngular = input(false, /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "emitOutsideAngular" }] : /* istanbul ignore next */ []));
33
34
  /**
34
35
  * Outputs the size of the element.
35
36
  */
@@ -60,10 +61,10 @@ class SciDimensionDirective {
60
61
  });
61
62
  });
62
63
  }
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciDimensionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
64
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.0", type: SciDimensionDirective, isStandalone: true, selector: "[sciDimension]", inputs: { emitOutsideAngular: { classPropertyName: "emitOutsideAngular", publicName: "emitOutsideAngular", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dimensionChange: "sciDimensionChange" }, ngImport: i0 });
64
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SciDimensionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
65
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: SciDimensionDirective, isStandalone: true, selector: "[sciDimension]", inputs: { emitOutsideAngular: { classPropertyName: "emitOutsideAngular", publicName: "emitOutsideAngular", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dimensionChange: "sciDimensionChange" }, ngImport: i0 });
65
66
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciDimensionDirective, decorators: [{
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SciDimensionDirective, decorators: [{
67
68
  type: Directive,
68
69
  args: [{
69
70
  selector: '[sciDimension]',
@@ -86,8 +87,9 @@ function dimension(elementLike, options) {
86
87
  }
87
88
  const injector = options?.injector ?? inject(Injector);
88
89
  const zone = injector.get(NgZone);
89
- const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike), ...(ngDevMode ? [{ debugName: "element" }] : []));
90
- const onResize = signal(undefined, ...(ngDevMode ? [{ debugName: "onResize", equal: () => false }] : [{ equal: () => false }]));
90
+ const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike), /* @ts-ignore */
91
+ ...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
92
+ const onResize = signal(undefined, { ...(ngDevMode ? { debugName: "onResize" } : /* istanbul ignore next */ {}), equal: () => false });
91
93
  // Subscribe to element size changes.
92
94
  effect(onCleanup => {
93
95
  const el = element();
@@ -144,8 +146,9 @@ function boundingClientRect(elementLike, options) {
144
146
  }
145
147
  const injector = options?.injector ?? inject(Injector);
146
148
  const zone = injector.get(NgZone);
147
- const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike), ...(ngDevMode ? [{ debugName: "element" }] : []));
148
- const onBoundingBoxChange = signal(undefined, ...(ngDevMode ? [{ debugName: "onBoundingBoxChange", equal: () => false }] : [{ equal: () => false }]));
149
+ const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike), /* @ts-ignore */
150
+ ...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
151
+ const onBoundingBoxChange = signal(undefined, { ...(ngDevMode ? { debugName: "onBoundingBoxChange" } : /* istanbul ignore next */ {}), equal: () => false });
149
152
  // Subscribe to element bounding box changes.
150
153
  effect(onCleanup => {
151
154
  const el = element();
@@ -1 +1 @@
1
- {"version":3,"file":"scion-components-dimension.mjs","sources":["../../../../projects/scion/components/dimension/src/dimension.directive.ts","../../../../projects/scion/components/dimension/src/dimension.signal.ts","../../../../projects/scion/components/dimension/src/bounding-client-rect.signal.ts","../../../../projects/scion/components/dimension/src/public_api.ts","../../../../projects/scion/components/dimension/src/scion-components-dimension.ts"],"sourcesContent":["/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Directive, ElementRef, inject, input, NgZone, output, ɵZONELESS_ENABLED} from '@angular/core';\nimport {fromResize$} from '@scion/toolkit/observable';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {observeIn, subscribeIn} from '@scion/toolkit/operators';\nimport {SciDimension} from './dimension';\n\n/**\n * Observes the size of the host element.\n *\n * ---\n * Usage:\n *\n * ```html\n * <div sciDimension (sciDimensionChange)=\"onDimensionChange($event)\"></div>\n * ```\n */\n@Directive({\n selector: '[sciDimension]',\n})\nexport class SciDimensionDirective {\n\n /**\n * Controls if to output outside the Angular zone. Defaults to `false`.\n */\n public readonly emitOutsideAngular = input(false);\n\n /**\n * Outputs the size of the element.\n */\n public readonly dimensionChange = output<SciDimension>({alias: 'sciDimensionChange'});\n\n constructor() {\n const host = inject(ElementRef).nativeElement as HTMLElement;\n const zone = inject(NgZone);\n const zonelessEnabled = inject(ɵZONELESS_ENABLED);\n\n fromResize$(host)\n .pipe(\n // Avoid triggering change detection cycle.\n subscribeIn(fn => zone.runOutsideAngular(fn)),\n // Run in animation frame to prevent 'ResizeObserver loop completed with undelivered notifications' error.\n // Do not use `animationFrameScheduler` because the scheduler does not necessarily execute in the current execution context, such as inside or outside Angular.\n // The scheduler always executes tasks in the context (e.g. zone) where the scheduler was first used in the application.\n observeIn(fn => requestAnimationFrame(fn)),\n observeIn(fn => this.emitOutsideAngular() ? fn() : zone.run(fn)),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n if (!zonelessEnabled) {\n // Assert Angular zone.\n this.emitOutsideAngular() ? NgZone.assertNotInAngularZone() : NgZone.assertInAngularZone();\n }\n\n this.dimensionChange.emit({\n clientWidth: host.clientWidth,\n offsetWidth: host.offsetWidth,\n clientHeight: host.clientHeight,\n offsetHeight: host.offsetHeight,\n element: host,\n });\n });\n }\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {assertInInjectionContext, assertNotInReactiveContext, computed, effect, ElementRef, inject, Injector, isSignal, NgZone, signal, Signal, untracked} from '@angular/core';\nimport {SciDimension} from './dimension';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {Objects} from '@scion/toolkit/util';\nimport {fromResize$} from '@scion/toolkit/observable';\nimport {observeIn, subscribeIn} from '@scion/toolkit/operators';\n\n/**\n * Creates a signal observing the size of an element.\n *\n * The element can be passed as a signal, enabling observation of view children in the component constructor.\n *\n * The signal subscribes to the native {@link ResizeObserver} to monitor element size changes. Destroying the injection context will unsubscribe the observer.\n *\n * Usage:\n * - Must be called within an injection context or an injector provided. Destroying the injector will unsubscribe the signal.\n * - Must not be called within a reactive context to avoid repeated subscriptions.\n */\nexport function dimension(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement>>, options?: {injector?: Injector}): Signal<SciDimension>;\nexport function dimension(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement> | undefined>, options?: {injector?: Injector}): Signal<SciDimension | undefined>;\nexport function dimension(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement> | undefined>, options?: {injector?: Injector}): Signal<SciDimension | undefined> {\n assertNotInReactiveContext(dimension, 'Invoking `dimension` causes new subscriptions every time. Move `dimension` outside of the reactive context and read the signal value where needed.');\n if (!options?.injector) {\n assertInInjectionContext(dimension);\n }\n\n const injector = options?.injector ?? inject(Injector);\n const zone = injector.get(NgZone);\n const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike));\n const onResize = signal<void>(undefined, {equal: () => false});\n\n // Subscribe to element size changes.\n effect(onCleanup => {\n const el = element();\n if (!el) {\n return;\n }\n\n untracked(() => {\n const subscription = fromResize$(el)\n .pipe(\n // Avoid triggering change detection cycle.\n subscribeIn(fn => zone.runOutsideAngular(fn)),\n // Run in animation frame to prevent 'ResizeObserver loop completed with undelivered notifications' error.\n // Do not use `animationFrameScheduler` because the scheduler does not necessarily execute in the current execution context, such as inside or outside Angular.\n // The scheduler always executes tasks in the context (e.g. zone) where the scheduler was first used in the application.\n observeIn(fn => requestAnimationFrame(fn)),\n )\n .subscribe(() => {\n NgZone.assertNotInAngularZone();\n onResize.set();\n });\n onCleanup(() => subscription.unsubscribe());\n });\n }, {injector});\n\n // Create signal that recomputes each time the size changes.\n return computed(() => {\n const el = element();\n if (!el) {\n return undefined;\n }\n\n // Track element size.\n onResize();\n\n return {\n clientWidth: el.clientWidth,\n offsetWidth: el.offsetWidth,\n clientHeight: el.clientHeight,\n offsetHeight: el.offsetHeight,\n element: el,\n };\n }, {equal: Objects.isEqual});\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {assertInInjectionContext, assertNotInReactiveContext, computed, effect, ElementRef, inject, Injector, isSignal, NgZone, signal, Signal, untracked} from '@angular/core';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {fromBoundingClientRect$} from '@scion/toolkit/observable';\nimport {subscribeIn} from '@scion/toolkit/operators';\n\n/**\n * Creates a signal observing the bounding box of an element.\n *\n * The bounding box includes the element's position relative to the top-left of the viewport and its size.\n * Refer to https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect for more details.\n *\n * The element can be passed as a signal, enabling observation of view children in the component constructor.\n *\n * There is no native browser API to observe the position of an element. The signal uses {@link IntersectionObserver} and\n * {@link ResizeObserver} to detect position changes. For tracking only size changes, use the {@link dimension} signal instead.\n *\n * Usage:\n * - Must be called within an injection context or an injector provided. Destroying the injector will unsubscribe the signal.\n * - Must not be called within a reactive context to avoid repeated subscriptions.\n * - The element and the document root (`<html>`) must be positioned `relative` or `absolute`. If not, positioning is changed to `relative`.\n */\nexport function boundingClientRect(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement>>, options?: {injector?: Injector}): Signal<DOMRect>;\nexport function boundingClientRect(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement> | undefined>, options?: {injector?: Injector}): Signal<DOMRect | undefined>;\nexport function boundingClientRect(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement> | undefined>, options?: {injector?: Injector}): Signal<DOMRect | undefined> {\n assertNotInReactiveContext(boundingClientRect, 'Invoking `boundingClientRect` causes new subscriptions every time. Move `boundingClientRect` outside of the reactive context and read the signal value where needed.');\n if (!options?.injector) {\n assertInInjectionContext(boundingClientRect);\n }\n\n const injector = options?.injector ?? inject(Injector);\n const zone = injector.get(NgZone);\n const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike));\n const onBoundingBoxChange = signal<void>(undefined, {equal: () => false});\n\n // Subscribe to element bounding box changes.\n effect(onCleanup => {\n const el = element();\n if (!el) {\n return;\n }\n\n untracked(() => {\n const subscription = fromBoundingClientRect$(el)\n // Avoid triggering change detection cycle.\n .pipe(subscribeIn(fn => zone.runOutsideAngular(fn)))\n .subscribe(() => {\n NgZone.assertNotInAngularZone();\n onBoundingBoxChange.set();\n });\n onCleanup(() => subscription.unsubscribe());\n });\n }, {injector});\n\n // Create signal that recomputes each time the bounding box changes.\n return computed(() => {\n const el = element();\n if (!el) {\n return undefined;\n }\n\n // Track bounding box.\n onBoundingBoxChange();\n\n return el.getBoundingClientRect();\n }, {equal: isEqualDomRect});\n}\n\nfunction isEqualDomRect(a: DOMRect | undefined, b: DOMRect | undefined): boolean {\n return a?.top === b?.top && a?.right === b?.right && a?.bottom === b?.bottom && a?.left === b?.left;\n}\n","/*\n * Copyright (c) 2018-2019 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\n/*\n * Secondary entrypoint: '@scion/components/dimension'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciDimensionDirective} from './dimension.directive';\nexport {dimension} from './dimension.signal';\nexport {boundingClientRect} from './bounding-client-rect.signal';\nexport {type SciDimension} from './dimension';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵZONELESS_ENABLED"],"mappings":";;;;;;;;AAAA;;;;;;;;AAQG;AAQH;;;;;;;;;AASG;MAIU,qBAAqB,CAAA;AAEhC;;AAEG;AACa,IAAA,kBAAkB,GAAG,KAAK,CAAC,KAAK,8DAAC;AAEjD;;AAEG;IACa,eAAe,GAAG,MAAM,CAAe,EAAC,KAAK,EAAE,oBAAoB,EAAC,CAAC;AAErF,IAAA,WAAA,GAAA;QACE,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAA4B;AAC5D,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AAC3B,QAAA,MAAM,eAAe,GAAG,MAAM,CAACA,iBAAiB,CAAC;QAEjD,WAAW,CAAC,IAAI;aACb,IAAI;;QAEH,WAAW,CAAC,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;;;;AAI7C,QAAA,SAAS,CAAC,EAAE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/dimension/src/dimension.directive.ts","../../../../projects/scion/components/dimension/src/dimension.signal.ts","../../../../projects/scion/components/dimension/src/bounding-client-rect.signal.ts","../../../../projects/scion/components/dimension/src/public_api.ts","../../../../projects/scion/components/dimension/src/scion-components-dimension.ts"],"sourcesContent":["/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Directive, ElementRef, inject, input, NgZone, output, ɵZONELESS_ENABLED} from '@angular/core';\nimport {fromResize$} from '@scion/toolkit/observable';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {observeIn, subscribeIn} from '@scion/toolkit/operators';\nimport {SciDimension} from './dimension';\n\n/**\n * Observes the size of the host element.\n *\n * ---\n * Usage:\n *\n * ```html\n * <div sciDimension (sciDimensionChange)=\"onDimensionChange($event)\"></div>\n * ```\n */\n@Directive({\n selector: '[sciDimension]',\n})\nexport class SciDimensionDirective {\n\n /**\n * Controls if to output outside the Angular zone. Defaults to `false`.\n */\n public readonly emitOutsideAngular = input(false);\n\n /**\n * Outputs the size of the element.\n */\n public readonly dimensionChange = output<SciDimension>({alias: 'sciDimensionChange'});\n\n constructor() {\n const host = inject(ElementRef).nativeElement as HTMLElement;\n const zone = inject(NgZone);\n const zonelessEnabled = inject(ɵZONELESS_ENABLED);\n\n fromResize$(host)\n .pipe(\n // Avoid triggering change detection cycle.\n subscribeIn(fn => zone.runOutsideAngular(fn)),\n // Run in animation frame to prevent 'ResizeObserver loop completed with undelivered notifications' error.\n // Do not use `animationFrameScheduler` because the scheduler does not necessarily execute in the current execution context, such as inside or outside Angular.\n // The scheduler always executes tasks in the context (e.g. zone) where the scheduler was first used in the application.\n observeIn(fn => requestAnimationFrame(fn)),\n observeIn(fn => this.emitOutsideAngular() ? fn() : zone.run(fn)),\n takeUntilDestroyed(),\n )\n .subscribe(() => {\n if (!zonelessEnabled) {\n // Assert Angular zone.\n this.emitOutsideAngular() ? NgZone.assertNotInAngularZone() : NgZone.assertInAngularZone();\n }\n\n this.dimensionChange.emit({\n clientWidth: host.clientWidth,\n offsetWidth: host.offsetWidth,\n clientHeight: host.clientHeight,\n offsetHeight: host.offsetHeight,\n element: host,\n });\n });\n }\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {assertInInjectionContext, assertNotInReactiveContext, computed, effect, ElementRef, inject, Injector, isSignal, NgZone, signal, Signal, untracked} from '@angular/core';\nimport {SciDimension} from './dimension';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {Objects} from '@scion/toolkit/util';\nimport {fromResize$} from '@scion/toolkit/observable';\nimport {observeIn, subscribeIn} from '@scion/toolkit/operators';\n\n/**\n * Creates a signal observing the size of an element.\n *\n * The element can be passed as a signal, enabling observation of view children in the component constructor.\n *\n * The signal subscribes to the native {@link ResizeObserver} to monitor element size changes. Destroying the injection context will unsubscribe the observer.\n *\n * Usage:\n * - Must be called within an injection context or an injector provided. Destroying the injector will unsubscribe the signal.\n * - Must not be called within a reactive context to avoid repeated subscriptions.\n */\nexport function dimension(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement>>, options?: {injector?: Injector}): Signal<SciDimension>;\nexport function dimension(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement> | undefined>, options?: {injector?: Injector}): Signal<SciDimension | undefined>;\nexport function dimension(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement> | undefined>, options?: {injector?: Injector}): Signal<SciDimension | undefined> {\n assertNotInReactiveContext(dimension, 'Invoking `dimension` causes new subscriptions every time. Move `dimension` outside of the reactive context and read the signal value where needed.');\n if (!options?.injector) {\n assertInInjectionContext(dimension);\n }\n\n const injector = options?.injector ?? inject(Injector);\n const zone = injector.get(NgZone);\n const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike));\n const onResize = signal<void>(undefined, {equal: () => false});\n\n // Subscribe to element size changes.\n effect(onCleanup => {\n const el = element();\n if (!el) {\n return;\n }\n\n untracked(() => {\n const subscription = fromResize$(el)\n .pipe(\n // Avoid triggering change detection cycle.\n subscribeIn(fn => zone.runOutsideAngular(fn)),\n // Run in animation frame to prevent 'ResizeObserver loop completed with undelivered notifications' error.\n // Do not use `animationFrameScheduler` because the scheduler does not necessarily execute in the current execution context, such as inside or outside Angular.\n // The scheduler always executes tasks in the context (e.g. zone) where the scheduler was first used in the application.\n observeIn(fn => requestAnimationFrame(fn)),\n )\n .subscribe(() => {\n NgZone.assertNotInAngularZone();\n onResize.set();\n });\n onCleanup(() => subscription.unsubscribe());\n });\n }, {injector});\n\n // Create signal that recomputes each time the size changes.\n return computed(() => {\n const el = element();\n if (!el) {\n return undefined;\n }\n\n // Track element size.\n onResize();\n\n return {\n clientWidth: el.clientWidth,\n offsetWidth: el.offsetWidth,\n clientHeight: el.clientHeight,\n offsetHeight: el.offsetHeight,\n element: el,\n };\n }, {equal: Objects.isEqual});\n}\n","/*\n * Copyright (c) 2018-2024 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {assertInInjectionContext, assertNotInReactiveContext, computed, effect, ElementRef, inject, Injector, isSignal, NgZone, signal, Signal, untracked} from '@angular/core';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {fromBoundingClientRect$} from '@scion/toolkit/observable';\nimport {subscribeIn} from '@scion/toolkit/operators';\n\n/**\n * Creates a signal observing the bounding box of an element.\n *\n * The bounding box includes the element's position relative to the top-left of the viewport and its size.\n * Refer to https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect for more details.\n *\n * The element can be passed as a signal, enabling observation of view children in the component constructor.\n *\n * There is no native browser API to observe the position of an element. The signal uses {@link IntersectionObserver} and\n * {@link ResizeObserver} to detect position changes. For tracking only size changes, use the {@link dimension} signal instead.\n *\n * Usage:\n * - Must be called within an injection context or an injector provided. Destroying the injector will unsubscribe the signal.\n * - Must not be called within a reactive context to avoid repeated subscriptions.\n * - The element and the document root (`<html>`) must be positioned `relative` or `absolute`. If not, positioning is changed to `relative`.\n */\nexport function boundingClientRect(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement>>, options?: {injector?: Injector}): Signal<DOMRect>;\nexport function boundingClientRect(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement> | undefined>, options?: {injector?: Injector}): Signal<DOMRect | undefined>;\nexport function boundingClientRect(elementLike: HTMLElement | ElementRef<HTMLElement> | Signal<HTMLElement | ElementRef<HTMLElement> | undefined>, options?: {injector?: Injector}): Signal<DOMRect | undefined> {\n assertNotInReactiveContext(boundingClientRect, 'Invoking `boundingClientRect` causes new subscriptions every time. Move `boundingClientRect` outside of the reactive context and read the signal value where needed.');\n if (!options?.injector) {\n assertInInjectionContext(boundingClientRect);\n }\n\n const injector = options?.injector ?? inject(Injector);\n const zone = injector.get(NgZone);\n const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike));\n const onBoundingBoxChange = signal<void>(undefined, {equal: () => false});\n\n // Subscribe to element bounding box changes.\n effect(onCleanup => {\n const el = element();\n if (!el) {\n return;\n }\n\n untracked(() => {\n const subscription = fromBoundingClientRect$(el)\n // Avoid triggering change detection cycle.\n .pipe(subscribeIn(fn => zone.runOutsideAngular(fn)))\n .subscribe(() => {\n NgZone.assertNotInAngularZone();\n onBoundingBoxChange.set();\n });\n onCleanup(() => subscription.unsubscribe());\n });\n }, {injector});\n\n // Create signal that recomputes each time the bounding box changes.\n return computed(() => {\n const el = element();\n if (!el) {\n return undefined;\n }\n\n // Track bounding box.\n onBoundingBoxChange();\n\n return el.getBoundingClientRect();\n }, {equal: isEqualDomRect});\n}\n\nfunction isEqualDomRect(a: DOMRect | undefined, b: DOMRect | undefined): boolean {\n return a?.top === b?.top && a?.right === b?.right && a?.bottom === b?.bottom && a?.left === b?.left;\n}\n","/*\n * Copyright (c) 2018-2019 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\n/*\n * Secondary entrypoint: '@scion/components/dimension'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciDimensionDirective} from './dimension.directive';\nexport {dimension} from './dimension.signal';\nexport {boundingClientRect} from './bounding-client-rect.signal';\nexport {type SciDimension} from './dimension';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["ɵZONELESS_ENABLED"],"mappings":";;;;;;;;AAAA;;;;;;;;AAQG;AAQH;;;;;;;;;AASG;MAIU,qBAAqB,CAAA;AAEhC;;AAEG;IACa,kBAAkB,GAAG,KAAK,CAAC,KAAK;2FAAC;AAEjD;;AAEG;IACa,eAAe,GAAG,MAAM,CAAe,EAAC,KAAK,EAAE,oBAAoB,EAAC,CAAC;AAErF,IAAA,WAAA,GAAA;QACE,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAA4B;AAC5D,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AAC3B,QAAA,MAAM,eAAe,GAAG,MAAM,CAACA,iBAAiB,CAAC;QAEjD,WAAW,CAAC,IAAI;aACb,IAAI;;QAEH,WAAW,CAAC,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;;;;AAI7C,QAAA,SAAS,CAAC,EAAE,IAAI,qBA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AAI,CAAC,WAAW,CAAC,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;iBAClD,SAAS,CAAC,MAAK;gBACd,MAAM,CAAC,sBAAsB,EAAE;gBAC/B,mBAAmB,CAAC,GAAG,EAAE;AAC3B,YAAA,CAAC,CAAC;YACJ,SAAS,CAAC,MAAM,YAAY,CAAC,WAAW,EAAE,CAAC;AAC7C,QAAA,CAAC,CAAC;AACJ,IAAA,CAAC,EAAE,EAAC,QAAQ,EAAC,CAAC;;IAGd,OAAO,QAAQ,CAAC,MAAK;AACnB,QAAA,MAAM,EAAE,GAAG,OAAO,EAAE;QACpB,IAAI,CAAC,EAAE,EAAE;AACP,YAAA,OAAO,SAAS;QAClB;;AAGA,QAAA,mBAAmB,EAAE;AAErB,QAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE;AACnC,IAAA,CAAC,EAAE,EAAC,KAAK,EAAE,cAAc,EAAC,CAAC;AAC7B;AAEA,SAAS,cAAc,CAAC,CAAsB,EAAE,CAAsB,EAAA;AACpE,IAAA,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,MAAM,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,IAAI;AACrG;;AC/EA;;;;;;;;AAQG;AAEH;;;;AAIG;;ACdH;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, inject, signal, TemplateRef, computed, linkedSignal, Directive, ElementRef, ChangeDetectorRef, effect, Component, output, contentChildren, NgZone, afterNextRender, IterableDiffers, untracked } from '@angular/core';
2
+ import { input, booleanAttribute, inject, signal, TemplateRef, computed, linkedSignal, Directive, ElementRef, ChangeDetectorRef, effect, ChangeDetectionStrategy, Component, output, contentChildren, NgZone, afterNextRender, IterableDiffers, untracked } from '@angular/core';
3
3
  import { SciSplitterComponent } from '@scion/components/splitter';
4
4
  import { NgTemplateOutlet } from '@angular/common';
5
5
  import { trigger, transition, style, animate } from '@angular/animations';
@@ -55,20 +55,22 @@ class SciSashDirective {
55
55
  *
56
56
  * If not set, remaining space is distributed equally.
57
57
  */
58
- size = input('1', ...(ngDevMode ? [{ debugName: "size", transform: (size) => size ?? '1' }] : [{ transform: (size) => size ?? '1' }]));
58
+ size = input('1', { ...(ngDevMode ? { debugName: "size" } : /* istanbul ignore next */ {}), transform: (size) => size ?? '1' });
59
59
  /**
60
60
  * Specifies the minimal sash size in pixel or percent.
61
61
  * The min-size prevents the user from shrinking the sash below this minimal size.
62
62
  *
63
63
  * If the unit is omitted, the value is interpreted as a pixel value.
64
64
  */
65
- minSize = input(...(ngDevMode ? [undefined, { debugName: "minSize" }] : []));
65
+ minSize = input(/* @ts-ignore */
66
+ ...(ngDevMode ? [undefined, { debugName: "minSize" }] : /* istanbul ignore next */ []));
66
67
  /**
67
68
  * Specifies an optional key to identify this sash.
68
69
  *
69
70
  * The key is used as the property key in the object emitted by {@link SciSashboxComponent.sashEnd} to associate the size of this sash.
70
71
  */
71
- key = input(...(ngDevMode ? [undefined, { debugName: "key" }] : []));
72
+ key = input(/* @ts-ignore */
73
+ ...(ngDevMode ? [undefined, { debugName: "key" }] : /* istanbul ignore next */ []));
72
74
  /**
73
75
  * Controls whether to animate the entering and leaving of this sash, only if fixed-sized. Defaults to `false`.
74
76
  *
@@ -76,9 +78,10 @@ class SciSashDirective {
76
78
  *
77
79
  * Note: Animates only sashes added or removed after the initial rendering.
78
80
  */
79
- animate = input(false, ...(ngDevMode ? [{ debugName: "animate", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
81
+ animate = input(false, { ...(ngDevMode ? { debugName: "animate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
80
82
  _sashBoxAccessor = inject(SciSashBoxAccessor);
81
- _component = signal(undefined, ...(ngDevMode ? [{ debugName: "_component" }] : []));
83
+ _component = signal(undefined, /* @ts-ignore */
84
+ ...(ngDevMode ? [{ debugName: "_component" }] : /* istanbul ignore next */ []));
82
85
  /**
83
86
  * Flex properties computed based on the configured {@link size}. Properties are updated when moving this sash.
84
87
  */
@@ -102,13 +105,15 @@ class SciSashDirective {
102
105
  *
103
106
  * @internal
104
107
  */
105
- isFixedSize = computed(() => Number.isNaN(+this.size()), ...(ngDevMode ? [{ debugName: "isFixedSize" }] : []));
108
+ isFixedSize = computed(() => Number.isNaN(+this.size()), /* @ts-ignore */
109
+ ...(ngDevMode ? [{ debugName: "isFixedSize" }] : /* istanbul ignore next */ []));
106
110
  /**
107
111
  * Gets the component that renders this sash.
108
112
  *
109
113
  * @internal
110
114
  */
111
- component = computed(() => this._component() ?? throwError('[SciSashbox] SashComponent not available yet.'), ...(ngDevMode ? [{ debugName: "component" }] : []));
115
+ component = computed(() => this._component() ?? throwError('[SciSashbox] SashComponent not available yet.'), /* @ts-ignore */
116
+ ...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
112
117
  /**
113
118
  * Sets the component that renders this sash.
114
119
  *
@@ -179,10 +184,10 @@ class SciSashDirective {
179
184
  };
180
185
  });
181
186
  }
182
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciSashDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
183
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.0", type: SciSashDirective, isStandalone: true, selector: "ng-template[sciSash]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["sciSash"], ngImport: i0 });
187
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SciSashDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
188
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.1", type: SciSashDirective, isStandalone: true, selector: "ng-template[sciSash]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null }, key: { classPropertyName: "key", publicName: "key", isSignal: true, isRequired: false, transformFunction: null }, animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null } }, exportAs: ["sciSash"], ngImport: i0 });
184
189
  }
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciSashDirective, decorators: [{
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SciSashDirective, decorators: [{
186
191
  type: Directive,
187
192
  args: [{
188
193
  selector: 'ng-template[sciSash]',
@@ -207,10 +212,10 @@ function throwError(error) {
207
212
  */
208
213
  class SciElementRefDirective {
209
214
  host = inject(ElementRef).nativeElement;
210
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciElementRefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
211
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.0", type: SciElementRefDirective, isStandalone: true, selector: "[sciElementRef]", exportAs: ["sciElementRef"], ngImport: i0 });
215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SciElementRefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
216
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.1", type: SciElementRefDirective, isStandalone: true, selector: "[sciElementRef]", exportAs: ["sciElementRef"], ngImport: i0 });
212
217
  }
213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciElementRefDirective, decorators: [{
218
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SciElementRefDirective, decorators: [{
214
219
  type: Directive,
215
220
  args: [{
216
221
  selector: '[sciElementRef]',
@@ -234,11 +239,13 @@ class SashComponent {
234
239
  /**
235
240
  * Specifies the sash representing this component.
236
241
  */
237
- sash = input.required(...(ngDevMode ? [{ debugName: "sash" }] : []));
242
+ sash = input.required(/* @ts-ignore */
243
+ ...(ngDevMode ? [{ debugName: "sash" }] : /* istanbul ignore next */ []));
238
244
  _host = inject(ElementRef).nativeElement;
239
245
  _cd = inject(ChangeDetectorRef);
240
246
  _sashBoxAccessor = inject(SciSashBoxAccessor);
241
- animationState = linkedSignal(() => this.sash().animate() && this._sashBoxAccessor.afterFirstRender() ? 'enter' : null, ...(ngDevMode ? [{ debugName: "animationState" }] : []));
247
+ animationState = linkedSignal(() => this.sash().animate() && this._sashBoxAccessor.afterFirstRender() ? 'enter' : null, /* @ts-ignore */
248
+ ...(ngDevMode ? [{ debugName: "animationState" }] : /* istanbul ignore next */ []));
242
249
  constructor() {
243
250
  // Associate sash with this component.
244
251
  effect(() => this.sash().setComponent(this));
@@ -267,18 +274,18 @@ class SashComponent {
267
274
  const { width, height } = this._host.getBoundingClientRect();
268
275
  return this._sashBoxAccessor.direction() === 'row' ? width : height;
269
276
  }
270
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SashComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
271
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.0", type: SashComponent, isStandalone: true, selector: "sci-sash", inputs: { sash: { classPropertyName: "sash", publicName: "sash", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "@sash-animation.done": "onAnimationEnd();" }, properties: { "@sash-animation": "animationState()" } }, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"sash().sashTemplate\"/>\n", styles: [":host{display:grid;grid-auto-rows:100%;grid-auto-columns:100%;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
277
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SashComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
278
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: SashComponent, isStandalone: true, selector: "sci-sash", inputs: { sash: { classPropertyName: "sash", publicName: "sash", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "@sash-animation.done": "onAnimationEnd();" }, properties: { "@sash-animation": "animationState()" } }, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"sash().sashTemplate\"/>\n", styles: [":host{display:grid;grid-auto-rows:100%;grid-auto-columns:100%;overflow:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
272
279
  trigger('sash-animation', provideAnimation()),
273
- ] });
280
+ ], changeDetection: i0.ChangeDetectionStrategy.Eager });
274
281
  }
275
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SashComponent, decorators: [{
282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SashComponent, decorators: [{
276
283
  type: Component,
277
284
  args: [{ selector: 'sci-sash', imports: [
278
285
  NgTemplateOutlet,
279
286
  ], animations: [
280
287
  trigger('sash-animation', provideAnimation()),
281
- ], host: {
288
+ ], changeDetection: ChangeDetectionStrategy.Eager, host: {
282
289
  '[@sash-animation]': 'animationState()',
283
290
  '(@sash-animation.done)': 'onAnimationEnd();',
284
291
  }, template: "<ng-container *ngTemplateOutlet=\"sash().sashTemplate\"/>\n", styles: [":host{display:grid;grid-auto-rows:100%;grid-auto-columns:100%;overflow:hidden}\n"] }]
@@ -366,7 +373,8 @@ class SciSashboxComponent {
366
373
  /**
367
374
  * Specifies if to lay out sashes in a row (which is by default) or column arrangement.
368
375
  */
369
- direction = input('row', ...(ngDevMode ? [{ debugName: "direction" }] : []));
376
+ direction = input('row', /* @ts-ignore */
377
+ ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
370
378
  /**
371
379
  * Notifies when start sashing.
372
380
  */
@@ -378,14 +386,19 @@ class SciSashboxComponent {
378
386
  */
379
387
  sashEnd = output();
380
388
  _host = inject(ElementRef).nativeElement;
381
- _contentChildren = contentChildren(SciSashDirective, ...(ngDevMode ? [{ debugName: "_contentChildren" }] : []));
389
+ _contentChildren = contentChildren(SciSashDirective, /* @ts-ignore */
390
+ ...(ngDevMode ? [{ debugName: "_contentChildren" }] : /* istanbul ignore next */ []));
382
391
  /** @internal */
383
392
  sashes = this.computeSashes(this._contentChildren);
384
393
  /** @internal */
385
- afterFirstRender = signal(false, ...(ngDevMode ? [{ debugName: "afterFirstRender" }] : []));
386
- sashing = signal(false, ...(ngDevMode ? [{ debugName: "sashing" }] : []));
387
- maxHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "maxHeight" }] : []));
388
- maxWidth = signal(undefined, ...(ngDevMode ? [{ debugName: "maxWidth" }] : []));
394
+ afterFirstRender = signal(false, /* @ts-ignore */
395
+ ...(ngDevMode ? [{ debugName: "afterFirstRender" }] : /* istanbul ignore next */ []));
396
+ sashing = signal(false, /* @ts-ignore */
397
+ ...(ngDevMode ? [{ debugName: "sashing" }] : /* istanbul ignore next */ []));
398
+ maxHeight = signal(undefined, /* @ts-ignore */
399
+ ...(ngDevMode ? [{ debugName: "maxHeight" }] : /* istanbul ignore next */ []));
400
+ maxWidth = signal(undefined, /* @ts-ignore */
401
+ ...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
389
402
  constructor() {
390
403
  this.detectFirstRendering();
391
404
  }
@@ -505,7 +518,8 @@ class SciSashboxComponent {
505
518
  */
506
519
  computeSashes(contentChildren) {
507
520
  const differ = inject(IterableDiffers).find([]).create();
508
- const sashes = signal([], ...(ngDevMode ? [{ debugName: "sashes" }] : []));
521
+ const sashes = signal([], /* @ts-ignore */
522
+ ...(ngDevMode ? [{ debugName: "sashes" }] : /* istanbul ignore next */ []));
509
523
  effect(() => {
510
524
  // Compute removed sashes to be removed with an animation.
511
525
  const removedAnimatedSashes = new Array();
@@ -529,13 +543,13 @@ class SciSashboxComponent {
529
543
  });
530
544
  return sashes;
531
545
  }
532
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciSashboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
533
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.0", type: SciSashboxComponent, isStandalone: true, selector: "sci-sashbox", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sashStart: "sashStart", sashEnd: "sashEnd" }, host: { properties: { "attr.data-direction": "direction()", "class.sashing": "sashing()", "style.--\u0275sci-sashbox-max-height": "maxHeight()", "style.--\u0275sci-sashbox-max-width": "maxWidth()" } }, providers: [{
546
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SciSashboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
547
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: SciSashboxComponent, isStandalone: true, selector: "sci-sashbox", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sashStart: "sashStart", sashEnd: "sashEnd" }, host: { properties: { "attr.data-direction": "direction()", "class.sashing": "sashing()", "style.--\u0275sci-sashbox-max-height": "maxHeight()", "style.--\u0275sci-sashbox-max-width": "maxWidth()" } }, providers: [{
534
548
  provide: SciSashBoxAccessor,
535
549
  useFactory: provideSashBoxAccessor,
536
- }], queries: [{ propertyName: "_contentChildren", predicate: SciSashDirective, isSignal: true }], ngImport: i0, template: "@for (sash of sashes(); track sash; let i = $index; let first = $first; let last = $last) {\n <sci-sash [sash]=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [style.flex-grow]=\"sash.flexProperties().flexGrow\"\n [style.flex-shrink]=\"sash.flexProperties().flexShrink\"\n [style.flex-basis]=\"sash.flexProperties().flexBasis\"/>\n @if (!last) {\n <sci-splitter sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"direction() === 'row' ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.host, i, $event)\"\n (end)=\"onSashEnd()\"\n (reset)=\"onSashReset(i)\"/>\n }\n}\n", styles: ["@charset \"UTF-8\";:host{display:flex;align-items:stretch;box-sizing:border-box;overflow:hidden;z-index:0}:host *{box-sizing:border-box}:host[data-direction=column]{flex-direction:column}:host[data-direction=row]{flex-direction:row}:host[data-direction=row]>sci-sash{margin:0 var(--sci-sashbox-gap)}:host[data-direction=row]>sci-sash.first{margin-left:0}:host[data-direction=row]>sci-sash.last{margin-right:0}:host[data-direction=column]>sci-sash{margin:var(--sci-sashbox-gap) 0}:host[data-direction=column]>sci-sash.first{margin-top:0}:host[data-direction=column]>sci-sash.last{margin-bottom:0}:host.sashing{max-height:calc(var(--\\275sci-sashbox-max-height) * 1px);max-width:calc(var(--\\275sci-sashbox-max-width) * 1px)}:host.sashing>sci-sash{pointer-events:none}:host>sci-splitter{--sci-splitter-background-color: var(--sci-sashbox-splitter-background-color);--sci-splitter-background-color-hover: var(--sci-sashbox-splitter-background-color-hover);--sci-splitter-size: var(--sci-sashbox-splitter-size);--sci-splitter-size-hover: var(--sci-sashbox-splitter-size-hover);--sci-splitter-touch-target-size: var(--sci-sashbox-splitter-touch-target-size);--sci-splitter-cross-axis-size: var(--sci-sashbox-splitter-cross-axis-size);--sci-splitter-border-radius: var(--sci-sashbox-splitter-border-radius);--sci-splitter-opacity-active: var(--sci-sashbox-splitter-opacity-active);--sci-splitter-opacity-hover: var(--sci-sashbox-splitter-opacity-hover);flex:none;z-index:1}\n"], dependencies: [{ kind: "component", type: SciSplitterComponent, selector: "sci-splitter", inputs: ["orientation"], outputs: ["start", "move", "end", "reset"] }, { kind: "directive", type: SciElementRefDirective, selector: "[sciElementRef]", exportAs: ["sciElementRef"] }, { kind: "component", type: SashComponent, selector: "sci-sash", inputs: ["sash"] }] });
550
+ }], queries: [{ propertyName: "_contentChildren", predicate: SciSashDirective, isSignal: true }], ngImport: i0, template: "@for (sash of sashes(); track sash; let i = $index; let first = $first; let last = $last) {\n <sci-sash [sash]=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [style.flex-grow]=\"sash.flexProperties().flexGrow\"\n [style.flex-shrink]=\"sash.flexProperties().flexShrink\"\n [style.flex-basis]=\"sash.flexProperties().flexBasis\"/>\n @if (!last) {\n <sci-splitter sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"direction() === 'row' ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.host, i, $event)\"\n (end)=\"onSashEnd()\"\n (reset)=\"onSashReset(i)\"/>\n }\n}\n", styles: ["@charset \"UTF-8\";:host{display:flex;align-items:stretch;box-sizing:border-box;overflow:hidden;z-index:0}:host *{box-sizing:border-box}:host[data-direction=column]{flex-direction:column}:host[data-direction=row]{flex-direction:row}:host[data-direction=row]>sci-sash{margin:0 var(--sci-sashbox-gap)}:host[data-direction=row]>sci-sash.first{margin-left:0}:host[data-direction=row]>sci-sash.last{margin-right:0}:host[data-direction=column]>sci-sash{margin:var(--sci-sashbox-gap) 0}:host[data-direction=column]>sci-sash.first{margin-top:0}:host[data-direction=column]>sci-sash.last{margin-bottom:0}:host.sashing{max-height:calc(var(--\\275sci-sashbox-max-height) * 1px);max-width:calc(var(--\\275sci-sashbox-max-width) * 1px)}:host.sashing>sci-sash{pointer-events:none}:host>sci-splitter{--sci-splitter-background-color: var(--sci-sashbox-splitter-background-color);--sci-splitter-background-color-hover: var(--sci-sashbox-splitter-background-color-hover);--sci-splitter-size: var(--sci-sashbox-splitter-size);--sci-splitter-size-hover: var(--sci-sashbox-splitter-size-hover);--sci-splitter-touch-target-size: var(--sci-sashbox-splitter-touch-target-size);--sci-splitter-cross-axis-size: var(--sci-sashbox-splitter-cross-axis-size);--sci-splitter-border-radius: var(--sci-sashbox-splitter-border-radius);--sci-splitter-opacity-active: var(--sci-sashbox-splitter-opacity-active);--sci-splitter-opacity-hover: var(--sci-sashbox-splitter-opacity-hover);flex:none;z-index:1}\n"], dependencies: [{ kind: "component", type: SciSplitterComponent, selector: "sci-splitter", inputs: ["orientation"], outputs: ["start", "move", "end", "reset"] }, { kind: "directive", type: SciElementRefDirective, selector: "[sciElementRef]", exportAs: ["sciElementRef"] }, { kind: "component", type: SashComponent, selector: "sci-sash", inputs: ["sash"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
537
551
  }
538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciSashboxComponent, decorators: [{
552
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: SciSashboxComponent, decorators: [{
539
553
  type: Component,
540
554
  args: [{ selector: 'sci-sashbox', imports: [
541
555
  SciSplitterComponent,
@@ -544,7 +558,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
544
558
  ], providers: [{
545
559
  provide: SciSashBoxAccessor,
546
560
  useFactory: provideSashBoxAccessor,
547
- }], host: {
561
+ }], changeDetection: ChangeDetectionStrategy.Eager, host: {
548
562
  '[attr.data-direction]': 'direction()',
549
563
  '[class.sashing]': 'sashing()',
550
564
  '[style.--ɵsci-sashbox-max-height]': 'maxHeight()',
@@ -1 +1 @@
1
- {"version":3,"file":"scion-components-sashbox.mjs","sources":["../../../../projects/scion/components/sashbox/src/sashbox-accessor.ts","../../../../projects/scion/components/sashbox/src/sash.directive.ts","../../../../projects/scion/components/sashbox/src/element-ref.directive.ts","../../../../projects/scion/components/sashbox/src/sash/sash.component.ts","../../../../projects/scion/components/sashbox/src/sash/sash.component.html","../../../../projects/scion/components/sashbox/src/sashbox.component.ts","../../../../projects/scion/components/sashbox/src/sashbox.component.html","../../../../projects/scion/components/sashbox/src/public_api.ts","../../../../projects/scion/components/sashbox/src/scion-components-sashbox.ts"],"sourcesContent":["/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {SciSashDirective} from './sash.directive';\nimport {Signal} from '@angular/core';\n\n/**\n * Allows accessing the sashbox component from sashes.\n */\nexport abstract class SciSashBoxAccessor {\n\n public abstract readonly sashes: Signal<readonly SciSashDirective[]>;\n public abstract readonly direction: Signal<'column' | 'row'>;\n public abstract readonly afterFirstRender: Signal<boolean>;\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {booleanAttribute, computed, Directive, inject, input, linkedSignal, signal, Signal, TemplateRef, WritableSignal} from '@angular/core';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\nimport {SashComponent} from './sash/sash.component';\n\n/**\n * Use this directive to model a sash for {@link SciSashboxComponent}.\n * The host element of this modelling directive must be a <ng-template> which is used as sash template.\n *\n *\n * ### Usage:\n *\n * <sci-sashbox direction=\"row\">\n * <!-- fixed size sash -->\n * <ng-template sciSash size=\"200px\">\n * ...\n * </ng-template>\n *\n * <!-- sash which takes the remaining space -->\n * <ng-template sciSash>\n * ...\n * </ng-template>\n * </sci-sashbox>\n */\n@Directive({\n selector: 'ng-template[sciSash]',\n exportAs: 'sciSash',\n})\nexport class SciSashDirective {\n\n /**\n * Specifies the sash size, either as fixed size with an explicit unit,\n * or as a unitless proportion to distribute remaining space. A proportional\n * sash has the ability to grow or shrink if necessary, and must be >= 1.\n *\n * If not set, remaining space is distributed equally.\n */\n public readonly size = input('1', {transform: (size: string | number | null | undefined): string | number => size ?? '1'});\n\n /**\n * Specifies the minimal sash size in pixel or percent.\n * The min-size prevents the user from shrinking the sash below this minimal size.\n *\n * If the unit is omitted, the value is interpreted as a pixel value.\n */\n public readonly minSize = input<string | number | undefined>();\n\n /**\n * Specifies an optional key to identify this sash.\n *\n * The key is used as the property key in the object emitted by {@link SciSashboxComponent.sashEnd} to associate the size of this sash.\n */\n public readonly key = input<string | undefined>();\n\n /**\n * Controls whether to animate the entering and leaving of this sash, only if fixed-sized. Defaults to `false`.\n *\n * Enabling animation will mimic the behavior of a side panel that slides in or out.\n *\n * Note: Animates only sashes added or removed after the initial rendering.\n */\n public readonly animate = input(false, {transform: booleanAttribute});\n\n private readonly _sashBoxAccessor = inject(SciSashBoxAccessor);\n private readonly _component = signal<SashComponent | undefined>(undefined);\n\n /**\n * Flex properties computed based on the configured {@link size}. Properties are updated when moving this sash.\n */\n private readonly _flexProperties = this.computeFlexProperties();\n\n /**\n * Represents the template used as sash content.\n *\n * @internal\n */\n public readonly sashTemplate = inject<TemplateRef<void>>(TemplateRef);\n\n /**\n * Flex properties with normalized 'flex-grow' to ensure the sashes fill the entire sash-box space.\n *\n * Use these properties to lay out this sash in the sashbox's flex layout.\n *\n * @internal\n */\n public readonly flexProperties = this.normalizeFlexGrow(this._flexProperties);\n\n /**\n * Returns if this sash has a fixed size, meaning that it has not the ability to grow or shrink.\n *\n * @internal\n */\n public readonly isFixedSize = computed(() => Number.isNaN(+this.size()));\n\n /**\n * Gets the component that renders this sash.\n *\n * @internal\n */\n public readonly component = computed(() => this._component() ?? throwError('[SciSashbox] SashComponent not available yet.'));\n\n /**\n * Sets the component that renders this sash.\n *\n * @internal\n */\n public setComponent(component: SashComponent): void {\n this._component.set(component);\n }\n\n /**\n * Returns the identity of this sash, or the passed index if not configured.\n *\n * @internal\n */\n public computeKey(index: number): string {\n return this.key() ?? `${index}`;\n }\n\n /**\n * Updates the flex properties of this sash for layout in the sashbox's flex layout.\n *\n * @internal\n */\n public updateFlexProperties(flexProperties: Partial<FlexProperties>): void {\n this._flexProperties.update(previousFlexProperties => ({...previousFlexProperties, ...flexProperties}));\n }\n\n /**\n * Computes the flex properties to lay out this sash in the sashbox's flex layout based on the configured {@link size}.\n */\n private computeFlexProperties(): WritableSignal<FlexProperties> {\n return linkedSignal(() => {\n const size = this.size();\n if (this.isFixedSize()) {\n // fixed-sized sash\n return {\n flexGrow: 0,\n flexShrink: 0,\n flexBasis: `${size}`,\n };\n }\n else {\n // remaining space is distributed according to given proportion\n const proportion = +size;\n if (proportion < 1) {\n throw Error(`[IllegalSashSizeError] The proportion for flexible sized sashes must be >=1 [size=${this.size()}]`);\n }\n return {\n flexGrow: proportion,\n flexShrink: 1,\n flexBasis: '0',\n };\n }\n });\n }\n\n /**\n * Normalizes the 'flex-grow' of the passed {@link FlexProperties} to ensure that the sum of the 'flex-grow' proportions of all sashes is 1.\n *\n * If the sum of all flex-grow proportions were less than 1, the sashes would not fill the entire sash-box space.\n * Without normalization, this could occur when a sash is removed.\n */\n private normalizeFlexGrow(flexProperties: Signal<FlexProperties>): Signal<FlexProperties> {\n return computed(() => {\n const sashes = this._sashBoxAccessor.sashes();\n const {flexGrow, flexShrink, flexBasis} = flexProperties();\n const flexGrowSum = sashes.reduce((sum, sash) => sum + sash._flexProperties().flexGrow, 0);\n\n return {\n flexGrow: flexGrow === 0 || flexGrowSum === 0 ? 0 : flexGrow / flexGrowSum, // Sum of normalized flex-grow proportions must be 1;\n flexShrink,\n flexBasis,\n };\n });\n }\n}\n\n/**\n * Flex properties to lay out the sash in the sashbox's flex layout.\n */\ninterface FlexProperties {\n flexGrow: number;\n flexShrink: number;\n flexBasis: string;\n}\n\nfunction throwError(error: string): never {\n throw Error(error);\n}\n","/*\n * Copyright (c) 2018-2019 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Directive, ElementRef, inject} from '@angular/core';\n\n/**\n * Provides access to the native {@link HTMLElement} of the host.\n */\n@Directive({\n selector: '[sciElementRef]',\n exportAs: 'sciElementRef',\n})\nexport class SciElementRefDirective {\n\n public readonly host = inject(ElementRef).nativeElement as HTMLElement;\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {ChangeDetectorRef, Component, computed, effect, ElementRef, inject, input, linkedSignal, Signal} from '@angular/core';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {animate, AnimationMetadata, style, transition, trigger} from '@angular/animations';\nimport {SciSashBoxAccessor} from '../sashbox-accessor';\nimport {SciSashDirective} from '../sash.directive';\n\n/**\n * Represents a {@link SciSashDirective} in the DOM, displaying the specified sash template.\n */\n@Component({\n selector: 'sci-sash',\n templateUrl: './sash.component.html',\n styleUrls: ['./sash.component.scss'],\n imports: [\n NgTemplateOutlet,\n ],\n animations: [\n trigger('sash-animation', provideAnimation()),\n ],\n host: {\n '[@sash-animation]': 'animationState()',\n '(@sash-animation.done)': 'onAnimationEnd();',\n },\n})\nexport class SashComponent {\n\n /**\n * Specifies the sash representing this component.\n */\n public readonly sash = input.required<SciSashDirective>();\n\n private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly _cd = inject(ChangeDetectorRef);\n private readonly _sashBoxAccessor = inject(SciSashBoxAccessor);\n\n protected readonly animationState = linkedSignal<'enter' | 'leave' | null>(() => this.sash().animate() && this._sashBoxAccessor.afterFirstRender() ? 'enter' : null);\n\n constructor() {\n // Associate sash with this component.\n effect(() => this.sash().setComponent(this));\n }\n\n /**\n * Starts the leave animation, returning a signal to track animation completion.\n */\n public startLeaveAnimation(): Signal<void> {\n // Detach change detector to prevent updates to the component during the animation.\n this._cd.detach();\n // Trigger 'leave' animation.\n this.animationState.set('leave');\n // Return signal to track animation completion.\n return computed(() => void this.animationState(), {equal: () => false});\n }\n\n /**\n * Notifies when ending the animation.\n */\n protected onAnimationEnd(): void {\n this.animationState.set(null);\n }\n\n /**\n * Gets the size of this sash in pixel.\n */\n public get size(): number {\n const {width, height} = this._host.getBoundingClientRect();\n return this._sashBoxAccessor.direction() === 'row' ? width : height;\n }\n}\n\n/**\n * Returns animation metadata to slide-in and slide-out a sash.\n */\nfunction provideAnimation(): AnimationMetadata[] {\n return [\n transition('void => enter', [\n style({'flex-basis': 0}),\n animate(`125ms ease-out`, style({'flex-basis': '*'})),\n ]),\n transition('* => leave', [\n style({'flex-basis': '*'}),\n animate(`125ms ease-out`, style({'flex-basis': 0})),\n ]),\n ];\n}\n","<ng-container *ngTemplateOutlet=\"sash().sashTemplate\"/>\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {afterNextRender, Component, contentChildren, effect, ElementRef, inject, input, IterableDiffers, NgZone, output, Signal, signal, untracked} from '@angular/core';\nimport {SciSplitterComponent, SplitterMoveEvent} from '@scion/components/splitter';\nimport {SciSashDirective} from './sash.directive';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\nimport {SciElementRefDirective} from './element-ref.directive';\nimport {SashComponent} from './sash/sash.component';\n\n/**\n * The <sci-sashbox> is like a CSS flexbox container that lays out its content children (sashes) in a row (which is by default)\n * or column arrangement (as specified by the direction property). A splitter is added between each child to allow the user to\n * shrink or stretch the individual sashes.\n *\n * Sashes are modelled as <ng-template> decorated with the 'sciSash' directive.\n * A sash can have a fixed size with an explicit unit, or a unitless proportion to distribute remaining space.\n * A proportional sash has the ability to grow or shrink if necessary.\n *\n * Sash content is added to a CSS grid container with a single column, stretching the content vertically and horizontally.\n *\n * ### Usage\n *\n * ```html\n * <sci-sashbox direction=\"row\">\n * <ng-template sciSash size=\"1\">\n * ...\n * </ng-template>\n *\n * <ng-template sciSash size=\"2\">\n * ...\n * </ng-template>\n *\n * <ng-template sciSash size=\"1\">\n * ...\n * </ng-template>\n * </sci-sashbox>\n * ```\n *\n * ### Styling\n *\n * To customize the default look of SCION components or support different themes, configure the `@scion/components` SCSS module in `styles.scss`.\n * To style a specific `sci-sashbox` component, the following CSS variables can be set directly on the component.\n *\n * - --sci-sashbox-gap: Sets the gaps (gutters) between sashes.\n * - --sci-sashbox-splitter-background-color: Sets the background color of the splitter.\n * - --sci-sashbox-splitter-background-color-hover: Sets the background color of the splitter when hovering it.\n * - --sci-sashbox-splitter-size: Sets the size of the splitter along the main axis.\n * - --sci-sashbox-splitter-size-hover: Sets the size of the splitter along the main axis when hovering it.\n * - --sci-sashbox-splitter-touch-target-size: Sets the touch target size to move the splitter (accessibility).\n * - --sci-sashbox-splitter-cross-axis-size: Sets the splitter size along the cross axis.\n * - --sci-sashbox-splitter-border-radius: Sets the border radius of the splitter.\n * - --sci-sashbox-splitter-opacity-active: Sets the opacity of the splitter while the user moves the splitter.\n * - --sci-sashbox-splitter-opacity-hover: Sets the opacity of the splitter when hovering it.\n *\n * Example:\n *\n * ```scss\n * sci-sashbox {\n * --sci-sashbox-splitter-background-color: black;\n * --sci-sashbox-splitter-background-color-hover: black;\n * }\n * ```\n */\n@Component({\n selector: 'sci-sashbox',\n templateUrl: './sashbox.component.html',\n styleUrls: ['./sashbox.component.scss'],\n imports: [\n SciSplitterComponent,\n SciElementRefDirective,\n SashComponent,\n ],\n providers: [{\n provide: SciSashBoxAccessor,\n useFactory: provideSashBoxAccessor,\n }],\n host: {\n '[attr.data-direction]': 'direction()',\n '[class.sashing]': 'sashing()',\n '[style.--ɵsci-sashbox-max-height]': 'maxHeight()',\n '[style.--ɵsci-sashbox-max-width]': 'maxWidth()',\n },\n})\nexport class SciSashboxComponent {\n\n /**\n * Specifies if to lay out sashes in a row (which is by default) or column arrangement.\n */\n public readonly direction = input<'column' | 'row'>('row');\n\n /**\n * Notifies when start sashing.\n */\n public readonly sashStart = output<void>();\n\n /**\n * Emits an object with new sash sizes when sashing ends.\n *\n * Each sash size is associated with its {@link SciSashDirective.key} or its display position (zero-based) if not set.\n */\n public readonly sashEnd = output<{[key: string]: number}>();\n\n private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly _contentChildren = contentChildren(SciSashDirective);\n\n /** @internal */\n public readonly sashes = this.computeSashes(this._contentChildren);\n /** @internal */\n public readonly afterFirstRender = signal(false);\n\n protected readonly sashing = signal(false);\n protected readonly maxHeight = signal<number | undefined>(undefined);\n protected readonly maxWidth = signal<number | undefined>(undefined);\n\n constructor() {\n this.detectFirstRendering();\n }\n\n protected onSashStart(): void {\n this.sashing.set(true);\n\n // Avoid overflow when sashing.\n const hostBounds = this._host.getBoundingClientRect();\n this.maxHeight.set(hostBounds.height);\n this.maxWidth.set(hostBounds.width);\n this.sashStart.emit();\n\n // Set the effective sash size as the flex-basis for non-fixed sashes (as sashing operates on pixel deltas).\n this.sashes().forEach(sash => {\n if (!sash.isFixedSize()) {\n sash.updateFlexProperties({\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: `${sash.component().size}px`,\n });\n }\n });\n }\n\n protected onSashEnd(): void {\n this.sashing.set(false);\n this.maxHeight.set(undefined);\n this.maxWidth.set(undefined);\n\n // Unset the flex-basis for non-fixed sashes and set the flex-grow accordingly.\n const pixelToFlexGrowFactor = computePixelToFlexGrowFactor(this.sashes());\n const sashSizes = this.sashes().reduce((acc, sash, i) => acc.set(sash.computeKey(i), sash.component().size), new Map<string, number>());\n\n this.sashes().forEach((sash, i) => {\n if (!sash.isFixedSize()) {\n sash.updateFlexProperties({\n flexGrow: pixelToFlexGrowFactor * sashSizes.get(sash.computeKey(i))!,\n flexShrink: 1,\n flexBasis: '0',\n });\n }\n });\n\n this.sashEnd.emit(Object.fromEntries(sashSizes));\n }\n\n protected onSash(splitter: HTMLElement, sashIndex: number, moveEvent: SplitterMoveEvent): void {\n NgZone.assertNotInAngularZone();\n\n const distance = moveEvent.distance;\n if (distance === 0) {\n return;\n }\n\n // Compute the splitter position.\n const splitterRect = splitter.getBoundingClientRect();\n const splitterStart = (this.direction() === 'row' ? splitterRect.left : splitterRect.top);\n const splitterEnd = (this.direction() === 'row' ? splitterRect.left + splitterRect.width : splitterRect.top + splitterRect.height);\n\n // Ignore the event if outside the splitter's action scope.\n const eventPos = moveEvent.position.clientPos;\n // The sash should not grow after moved the mouse pointer beyond the left bounds of the sash and now moving the mouse pointer back toward the current sash.\n if (distance > 0 && eventPos < splitterStart) {\n return;\n }\n\n // The sash should not shrink after moved the mouse pointer beyond the right bounds of the sash and now moving the mouse pointer back toward the current sash.\n if (distance < 0 && eventPos > splitterEnd) {\n return;\n }\n\n // Compute the new sash sizes.\n const sash1 = this.sashes()[sashIndex]!;\n const sash2 = this.sashes()[sashIndex + 1]!;\n\n const sashSize1 = sash1.component().size;\n const sashSize2 = sash2.component().size;\n\n const sashMinSize1 = sash1.minSize() ? this.toPixel(sash1.minSize()!) : 0;\n const sashMinSize2 = sash2.minSize() ? this.toPixel(sash2.minSize()!) : 0;\n\n const newSashSize1 = between(Math.round(sashSize1 + distance), {min: sashMinSize1, max: sashSize1 + sashSize2 - sashMinSize2});\n const newSashSize2 = between(Math.round(sashSize2 - distance), {min: sashMinSize2, max: sashSize1 + sashSize2 - sashMinSize1});\n\n // Set the new computed sash sizes.\n sash1.updateFlexProperties({flexBasis: `${newSashSize1}px`});\n sash2.updateFlexProperties({flexBasis: `${newSashSize2}px`});\n }\n\n protected onSashReset(sashIndex: number): void {\n const sash1 = this.sashes()[sashIndex]!;\n const sash2 = this.sashes()[sashIndex + 1]!;\n const equalSashSize = (sash1.component().size + sash2.component().size) / 2;\n const pixelToFlexGrowFactor = computePixelToFlexGrowFactor(this.sashes());\n\n const sashSizesAfterReset = this.sashes().reduce((acc, sash, index) => {\n const size = index === sashIndex || index === sashIndex + 1 ? equalSashSize : sash.component().size;\n return acc.set(sash.computeKey(index), size);\n }, new Map<string, number>());\n\n [sash1, sash2].forEach(sash => {\n if (sash.isFixedSize()) {\n sash.updateFlexProperties({flexBasis: `${equalSashSize}px`});\n }\n else {\n sash.updateFlexProperties({flexGrow: pixelToFlexGrowFactor * equalSashSize});\n }\n });\n\n this.sashStart.emit();\n this.sashEnd.emit(Object.fromEntries(sashSizesAfterReset));\n }\n\n private toPixel(value: string | number): number {\n if (typeof value === 'number') {\n return value;\n }\n if (value.endsWith('%')) {\n const hostBounds = this._host.getBoundingClientRect();\n const hostSize = (this.direction() === 'row' ? hostBounds.width : hostBounds.height);\n return parseInt(value, 10) * hostSize / 100;\n }\n return parseInt(value, 10);\n }\n\n /**\n * Detects when rendered this component for the first time.\n */\n private detectFirstRendering(): void {\n afterNextRender({\n read: () => this.afterFirstRender.set(true),\n });\n }\n\n /**\n * Mirrors the provided signal. If animated sashes are being removed, delays emission until the animation completes,\n * effectively removing the element after the animation.\n *\n * Delayed removal is required for CDK Portals to not remove displayed content immediately.\n */\n private computeSashes(contentChildren: Signal<readonly SciSashDirective[]>): Signal<readonly SciSashDirective[]> {\n const differ = inject(IterableDiffers).find([]).create<SciSashDirective>();\n const sashes = signal<readonly SciSashDirective[]>([]);\n\n effect(() => {\n // Compute removed sashes to be removed with an animation.\n const removedAnimatedSashes = new Array<SciSashDirective>();\n differ.diff(contentChildren())?.forEachRemovedItem(({item: sash}) => untracked(() => {\n if (sash.animate()) {\n removedAnimatedSashes.push(sash);\n }\n }));\n\n // Emit if no sashes are removed with an animation.\n if (!removedAnimatedSashes.length) {\n sashes.set(contentChildren());\n return;\n }\n\n // Delay emission until a leave animation completes.\n removedAnimatedSashes.forEach(sash => {\n // Start the leave animation.\n const done = sash.component().startLeaveAnimation();\n // Track animation completion, re-running this effect to finally emit the sashes.\n done();\n });\n });\n\n return sashes;\n }\n}\n\nfunction between(value: number, minmax: {min: number; max: number}): number {\n return Math.min(minmax.max, Math.max(minmax.min, value));\n}\n\n/**\n * Returns the factor to compute the flex-grow proportion from the pixel size of a sash.\n */\nfunction computePixelToFlexGrowFactor(sashes: readonly SciSashDirective[]): number {\n const flexibleSashes = sashes.filter(sash => !sash.isFixedSize());\n\n const proportionSum = flexibleSashes.reduce((sum, sash) => sum + Number(sash.size()), 0);\n const pixelSum = flexibleSashes.reduce((sum, sash) => sum + sash.component().size, 0);\n\n return proportionSum / pixelSum;\n}\n\nfunction provideSashBoxAccessor(): SciSashBoxAccessor {\n const component = inject(SciSashboxComponent);\n\n return new class implements SciSashBoxAccessor {\n public readonly sashes = component.sashes;\n public readonly direction = component.direction;\n public readonly afterFirstRender = component.afterFirstRender;\n }();\n}\n","@for (sash of sashes(); track sash; let i = $index; let first = $first; let last = $last) {\n <sci-sash [sash]=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [style.flex-grow]=\"sash.flexProperties().flexGrow\"\n [style.flex-shrink]=\"sash.flexProperties().flexShrink\"\n [style.flex-basis]=\"sash.flexProperties().flexBasis\"/>\n @if (!last) {\n <sci-splitter sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"direction() === 'row' ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.host, i, $event)\"\n (end)=\"onSashEnd()\"\n (reset)=\"onSashReset(i)\"/>\n }\n}\n","/*\n * Copyright (c) 2018-2019 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\n/*\n * Secondary entrypoint: '@scion/components/sashbox'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciSashboxComponent} from './sashbox.component';\nexport {SciSashDirective} from './sash.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;AAQG;AAKH;;AAEG;MACmB,kBAAkB,CAAA;AAKvC;;ACrBD;;;;;;;;AAQG;AAMH;;;;;;;;;;;;;;;;;;AAkBG;MAKU,gBAAgB,CAAA;AAE3B;;;;;;AAMG;AACa,IAAA,IAAI,GAAG,KAAK,CAAC,GAAG,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,MAAA,EAAG,SAAS,EAAE,CAAC,IAAwC,KAAsB,IAAI,IAAI,GAAG,EAAA,CAAA,GAAA,CAAtF,EAAC,SAAS,EAAE,CAAC,IAAwC,KAAsB,IAAI,IAAI,GAAG,EAAC,GAAC;AAE1H;;;;;AAKG;IACa,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAA+B;AAE9D;;;;AAIG;IACa,GAAG,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,KAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAsB;AAEjD;;;;;;AAMG;AACa,IAAA,OAAO,GAAG,KAAK,CAAC,KAAK,2CAAG,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA5B,EAAC,SAAS,EAAE,gBAAgB,EAAC,GAAC;AAEpD,IAA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CAAC;IAErF,OAAO,aAAa,GAAG,QAAQ;AACjC;AAEA,SAAS,sBAAsB,GAAA;AAC7B,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAE7C,IAAA,OAAO,IAAI,MAAA;AACO,QAAA,MAAM,GAAG,SAAS,CAAC,MAAM;AACzB,QAAA,SAAS,GAAG,SAAS,CAAC,SAAS;AAC/B,QAAA,gBAAgB,GAAG,SAAS,CAAC,gBAAgB;AAC9D,KAAA,EAAE;AACL;;AE/TA;;;;;;;;AAQG;AAEH;;;;AAIG;;ACdH;;AAEG;;;;"}
1
+ {"version":3,"file":"scion-components-sashbox.mjs","sources":["../../../../projects/scion/components/sashbox/src/sashbox-accessor.ts","../../../../projects/scion/components/sashbox/src/sash.directive.ts","../../../../projects/scion/components/sashbox/src/element-ref.directive.ts","../../../../projects/scion/components/sashbox/src/sash/sash.component.ts","../../../../projects/scion/components/sashbox/src/sash/sash.component.html","../../../../projects/scion/components/sashbox/src/sashbox.component.ts","../../../../projects/scion/components/sashbox/src/sashbox.component.html","../../../../projects/scion/components/sashbox/src/public_api.ts","../../../../projects/scion/components/sashbox/src/scion-components-sashbox.ts"],"sourcesContent":["/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {SciSashDirective} from './sash.directive';\nimport {Signal} from '@angular/core';\n\n/**\n * Allows accessing the sashbox component from sashes.\n */\nexport abstract class SciSashBoxAccessor {\n\n public abstract readonly sashes: Signal<readonly SciSashDirective[]>;\n public abstract readonly direction: Signal<'column' | 'row'>;\n public abstract readonly afterFirstRender: Signal<boolean>;\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {booleanAttribute, computed, Directive, inject, input, linkedSignal, signal, Signal, TemplateRef, WritableSignal} from '@angular/core';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\nimport {SashComponent} from './sash/sash.component';\n\n/**\n * Use this directive to model a sash for {@link SciSashboxComponent}.\n * The host element of this modelling directive must be a <ng-template> which is used as sash template.\n *\n *\n * ### Usage:\n *\n * <sci-sashbox direction=\"row\">\n * <!-- fixed size sash -->\n * <ng-template sciSash size=\"200px\">\n * ...\n * </ng-template>\n *\n * <!-- sash which takes the remaining space -->\n * <ng-template sciSash>\n * ...\n * </ng-template>\n * </sci-sashbox>\n */\n@Directive({\n selector: 'ng-template[sciSash]',\n exportAs: 'sciSash',\n})\nexport class SciSashDirective {\n\n /**\n * Specifies the sash size, either as fixed size with an explicit unit,\n * or as a unitless proportion to distribute remaining space. A proportional\n * sash has the ability to grow or shrink if necessary, and must be >= 1.\n *\n * If not set, remaining space is distributed equally.\n */\n public readonly size = input('1', {transform: (size: string | number | null | undefined): string | number => size ?? '1'});\n\n /**\n * Specifies the minimal sash size in pixel or percent.\n * The min-size prevents the user from shrinking the sash below this minimal size.\n *\n * If the unit is omitted, the value is interpreted as a pixel value.\n */\n public readonly minSize = input<string | number | undefined>();\n\n /**\n * Specifies an optional key to identify this sash.\n *\n * The key is used as the property key in the object emitted by {@link SciSashboxComponent.sashEnd} to associate the size of this sash.\n */\n public readonly key = input<string | undefined>();\n\n /**\n * Controls whether to animate the entering and leaving of this sash, only if fixed-sized. Defaults to `false`.\n *\n * Enabling animation will mimic the behavior of a side panel that slides in or out.\n *\n * Note: Animates only sashes added or removed after the initial rendering.\n */\n public readonly animate = input(false, {transform: booleanAttribute});\n\n private readonly _sashBoxAccessor = inject(SciSashBoxAccessor);\n private readonly _component = signal<SashComponent | undefined>(undefined);\n\n /**\n * Flex properties computed based on the configured {@link size}. Properties are updated when moving this sash.\n */\n private readonly _flexProperties = this.computeFlexProperties();\n\n /**\n * Represents the template used as sash content.\n *\n * @internal\n */\n public readonly sashTemplate = inject<TemplateRef<void>>(TemplateRef);\n\n /**\n * Flex properties with normalized 'flex-grow' to ensure the sashes fill the entire sash-box space.\n *\n * Use these properties to lay out this sash in the sashbox's flex layout.\n *\n * @internal\n */\n public readonly flexProperties = this.normalizeFlexGrow(this._flexProperties);\n\n /**\n * Returns if this sash has a fixed size, meaning that it has not the ability to grow or shrink.\n *\n * @internal\n */\n public readonly isFixedSize = computed(() => Number.isNaN(+this.size()));\n\n /**\n * Gets the component that renders this sash.\n *\n * @internal\n */\n public readonly component = computed(() => this._component() ?? throwError('[SciSashbox] SashComponent not available yet.'));\n\n /**\n * Sets the component that renders this sash.\n *\n * @internal\n */\n public setComponent(component: SashComponent): void {\n this._component.set(component);\n }\n\n /**\n * Returns the identity of this sash, or the passed index if not configured.\n *\n * @internal\n */\n public computeKey(index: number): string {\n return this.key() ?? `${index}`;\n }\n\n /**\n * Updates the flex properties of this sash for layout in the sashbox's flex layout.\n *\n * @internal\n */\n public updateFlexProperties(flexProperties: Partial<FlexProperties>): void {\n this._flexProperties.update(previousFlexProperties => ({...previousFlexProperties, ...flexProperties}));\n }\n\n /**\n * Computes the flex properties to lay out this sash in the sashbox's flex layout based on the configured {@link size}.\n */\n private computeFlexProperties(): WritableSignal<FlexProperties> {\n return linkedSignal(() => {\n const size = this.size();\n if (this.isFixedSize()) {\n // fixed-sized sash\n return {\n flexGrow: 0,\n flexShrink: 0,\n flexBasis: `${size}`,\n };\n }\n else {\n // remaining space is distributed according to given proportion\n const proportion = +size;\n if (proportion < 1) {\n throw Error(`[IllegalSashSizeError] The proportion for flexible sized sashes must be >=1 [size=${this.size()}]`);\n }\n return {\n flexGrow: proportion,\n flexShrink: 1,\n flexBasis: '0',\n };\n }\n });\n }\n\n /**\n * Normalizes the 'flex-grow' of the passed {@link FlexProperties} to ensure that the sum of the 'flex-grow' proportions of all sashes is 1.\n *\n * If the sum of all flex-grow proportions were less than 1, the sashes would not fill the entire sash-box space.\n * Without normalization, this could occur when a sash is removed.\n */\n private normalizeFlexGrow(flexProperties: Signal<FlexProperties>): Signal<FlexProperties> {\n return computed(() => {\n const sashes = this._sashBoxAccessor.sashes();\n const {flexGrow, flexShrink, flexBasis} = flexProperties();\n const flexGrowSum = sashes.reduce((sum, sash) => sum + sash._flexProperties().flexGrow, 0);\n\n return {\n flexGrow: flexGrow === 0 || flexGrowSum === 0 ? 0 : flexGrow / flexGrowSum, // Sum of normalized flex-grow proportions must be 1;\n flexShrink,\n flexBasis,\n };\n });\n }\n}\n\n/**\n * Flex properties to lay out the sash in the sashbox's flex layout.\n */\ninterface FlexProperties {\n flexGrow: number;\n flexShrink: number;\n flexBasis: string;\n}\n\nfunction throwError(error: string): never {\n throw Error(error);\n}\n","/*\n * Copyright (c) 2018-2019 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {Directive, ElementRef, inject} from '@angular/core';\n\n/**\n * Provides access to the native {@link HTMLElement} of the host.\n */\n@Directive({\n selector: '[sciElementRef]',\n exportAs: 'sciElementRef',\n})\nexport class SciElementRefDirective {\n\n public readonly host = inject(ElementRef).nativeElement as HTMLElement;\n}\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {ChangeDetectorRef, Component, computed, effect, ElementRef, inject, input, linkedSignal, Signal, ChangeDetectionStrategy} from '@angular/core';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {animate, AnimationMetadata, style, transition, trigger} from '@angular/animations';\nimport {SciSashBoxAccessor} from '../sashbox-accessor';\nimport {SciSashDirective} from '../sash.directive';\n\n/**\n * Represents a {@link SciSashDirective} in the DOM, displaying the specified sash template.\n */\n@Component({\n selector: 'sci-sash',\n templateUrl: './sash.component.html',\n styleUrls: ['./sash.component.scss'],\n imports: [\n NgTemplateOutlet,\n ],\n animations: [\n trigger('sash-animation', provideAnimation()),\n ],\n // Required for backward compatibility for zone-based applications to support child components with eager change detection.\n changeDetection: ChangeDetectionStrategy.Eager, // eslint-disable-line @angular-eslint/prefer-on-push-component-change-detection\n host: {\n '[@sash-animation]': 'animationState()',\n '(@sash-animation.done)': 'onAnimationEnd();',\n },\n})\nexport class SashComponent {\n\n /**\n * Specifies the sash representing this component.\n */\n public readonly sash = input.required<SciSashDirective>();\n\n private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly _cd = inject(ChangeDetectorRef);\n private readonly _sashBoxAccessor = inject(SciSashBoxAccessor);\n\n protected readonly animationState = linkedSignal<'enter' | 'leave' | null>(() => this.sash().animate() && this._sashBoxAccessor.afterFirstRender() ? 'enter' : null);\n\n constructor() {\n // Associate sash with this component.\n effect(() => this.sash().setComponent(this));\n }\n\n /**\n * Starts the leave animation, returning a signal to track animation completion.\n */\n public startLeaveAnimation(): Signal<void> {\n // Detach change detector to prevent updates to the component during the animation.\n this._cd.detach();\n // Trigger 'leave' animation.\n this.animationState.set('leave');\n // Return signal to track animation completion.\n return computed(() => void this.animationState(), {equal: () => false});\n }\n\n /**\n * Notifies when ending the animation.\n */\n protected onAnimationEnd(): void {\n this.animationState.set(null);\n }\n\n /**\n * Gets the size of this sash in pixel.\n */\n public get size(): number {\n const {width, height} = this._host.getBoundingClientRect();\n return this._sashBoxAccessor.direction() === 'row' ? width : height;\n }\n}\n\n/**\n * Returns animation metadata to slide-in and slide-out a sash.\n */\nfunction provideAnimation(): AnimationMetadata[] {\n return [\n transition('void => enter', [\n style({'flex-basis': 0}),\n animate(`125ms ease-out`, style({'flex-basis': '*'})),\n ]),\n transition('* => leave', [\n style({'flex-basis': '*'}),\n animate(`125ms ease-out`, style({'flex-basis': 0})),\n ]),\n ];\n}\n","<ng-container *ngTemplateOutlet=\"sash().sashTemplate\"/>\n","/*\n * Copyright (c) 2018-2025 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\nimport {afterNextRender, Component, contentChildren, effect, ElementRef, inject, input, IterableDiffers, NgZone, output, Signal, signal, untracked, ChangeDetectionStrategy} from '@angular/core';\nimport {SciSplitterComponent, SplitterMoveEvent} from '@scion/components/splitter';\nimport {SciSashDirective} from './sash.directive';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\nimport {SciElementRefDirective} from './element-ref.directive';\nimport {SashComponent} from './sash/sash.component';\n\n/**\n * The <sci-sashbox> is like a CSS flexbox container that lays out its content children (sashes) in a row (which is by default)\n * or column arrangement (as specified by the direction property). A splitter is added between each child to allow the user to\n * shrink or stretch the individual sashes.\n *\n * Sashes are modelled as <ng-template> decorated with the 'sciSash' directive.\n * A sash can have a fixed size with an explicit unit, or a unitless proportion to distribute remaining space.\n * A proportional sash has the ability to grow or shrink if necessary.\n *\n * Sash content is added to a CSS grid container with a single column, stretching the content vertically and horizontally.\n *\n * ### Usage\n *\n * ```html\n * <sci-sashbox direction=\"row\">\n * <ng-template sciSash size=\"1\">\n * ...\n * </ng-template>\n *\n * <ng-template sciSash size=\"2\">\n * ...\n * </ng-template>\n *\n * <ng-template sciSash size=\"1\">\n * ...\n * </ng-template>\n * </sci-sashbox>\n * ```\n *\n * ### Styling\n *\n * To customize the default look of SCION components or support different themes, configure the `@scion/components` SCSS module in `styles.scss`.\n * To style a specific `sci-sashbox` component, the following CSS variables can be set directly on the component.\n *\n * - --sci-sashbox-gap: Sets the gaps (gutters) between sashes.\n * - --sci-sashbox-splitter-background-color: Sets the background color of the splitter.\n * - --sci-sashbox-splitter-background-color-hover: Sets the background color of the splitter when hovering it.\n * - --sci-sashbox-splitter-size: Sets the size of the splitter along the main axis.\n * - --sci-sashbox-splitter-size-hover: Sets the size of the splitter along the main axis when hovering it.\n * - --sci-sashbox-splitter-touch-target-size: Sets the touch target size to move the splitter (accessibility).\n * - --sci-sashbox-splitter-cross-axis-size: Sets the splitter size along the cross axis.\n * - --sci-sashbox-splitter-border-radius: Sets the border radius of the splitter.\n * - --sci-sashbox-splitter-opacity-active: Sets the opacity of the splitter while the user moves the splitter.\n * - --sci-sashbox-splitter-opacity-hover: Sets the opacity of the splitter when hovering it.\n *\n * Example:\n *\n * ```scss\n * sci-sashbox {\n * --sci-sashbox-splitter-background-color: black;\n * --sci-sashbox-splitter-background-color-hover: black;\n * }\n * ```\n */\n@Component({\n selector: 'sci-sashbox',\n templateUrl: './sashbox.component.html',\n styleUrls: ['./sashbox.component.scss'],\n imports: [\n SciSplitterComponent,\n SciElementRefDirective,\n SashComponent,\n ],\n providers: [{\n provide: SciSashBoxAccessor,\n useFactory: provideSashBoxAccessor,\n }],\n // Required for backward compatibility for zone-based applications to support child components with eager change detection.\n changeDetection: ChangeDetectionStrategy.Eager, // eslint-disable-line @angular-eslint/prefer-on-push-component-change-detection\n host: {\n '[attr.data-direction]': 'direction()',\n '[class.sashing]': 'sashing()',\n '[style.--ɵsci-sashbox-max-height]': 'maxHeight()',\n '[style.--ɵsci-sashbox-max-width]': 'maxWidth()',\n },\n})\nexport class SciSashboxComponent {\n\n /**\n * Specifies if to lay out sashes in a row (which is by default) or column arrangement.\n */\n public readonly direction = input<'column' | 'row'>('row');\n\n /**\n * Notifies when start sashing.\n */\n public readonly sashStart = output<void>();\n\n /**\n * Emits an object with new sash sizes when sashing ends.\n *\n * Each sash size is associated with its {@link SciSashDirective.key} or its display position (zero-based) if not set.\n */\n public readonly sashEnd = output<{[key: string]: number}>();\n\n private readonly _host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly _contentChildren = contentChildren(SciSashDirective);\n\n /** @internal */\n public readonly sashes = this.computeSashes(this._contentChildren);\n /** @internal */\n public readonly afterFirstRender = signal(false);\n\n protected readonly sashing = signal(false);\n protected readonly maxHeight = signal<number | undefined>(undefined);\n protected readonly maxWidth = signal<number | undefined>(undefined);\n\n constructor() {\n this.detectFirstRendering();\n }\n\n protected onSashStart(): void {\n this.sashing.set(true);\n\n // Avoid overflow when sashing.\n const hostBounds = this._host.getBoundingClientRect();\n this.maxHeight.set(hostBounds.height);\n this.maxWidth.set(hostBounds.width);\n this.sashStart.emit();\n\n // Set the effective sash size as the flex-basis for non-fixed sashes (as sashing operates on pixel deltas).\n this.sashes().forEach(sash => {\n if (!sash.isFixedSize()) {\n sash.updateFlexProperties({\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: `${sash.component().size}px`,\n });\n }\n });\n }\n\n protected onSashEnd(): void {\n this.sashing.set(false);\n this.maxHeight.set(undefined);\n this.maxWidth.set(undefined);\n\n // Unset the flex-basis for non-fixed sashes and set the flex-grow accordingly.\n const pixelToFlexGrowFactor = computePixelToFlexGrowFactor(this.sashes());\n const sashSizes = this.sashes().reduce((acc, sash, i) => acc.set(sash.computeKey(i), sash.component().size), new Map<string, number>());\n\n this.sashes().forEach((sash, i) => {\n if (!sash.isFixedSize()) {\n sash.updateFlexProperties({\n flexGrow: pixelToFlexGrowFactor * sashSizes.get(sash.computeKey(i))!,\n flexShrink: 1,\n flexBasis: '0',\n });\n }\n });\n\n this.sashEnd.emit(Object.fromEntries(sashSizes));\n }\n\n protected onSash(splitter: HTMLElement, sashIndex: number, moveEvent: SplitterMoveEvent): void {\n NgZone.assertNotInAngularZone();\n\n const distance = moveEvent.distance;\n if (distance === 0) {\n return;\n }\n\n // Compute the splitter position.\n const splitterRect = splitter.getBoundingClientRect();\n const splitterStart = (this.direction() === 'row' ? splitterRect.left : splitterRect.top);\n const splitterEnd = (this.direction() === 'row' ? splitterRect.left + splitterRect.width : splitterRect.top + splitterRect.height);\n\n // Ignore the event if outside the splitter's action scope.\n const eventPos = moveEvent.position.clientPos;\n // The sash should not grow after moved the mouse pointer beyond the left bounds of the sash and now moving the mouse pointer back toward the current sash.\n if (distance > 0 && eventPos < splitterStart) {\n return;\n }\n\n // The sash should not shrink after moved the mouse pointer beyond the right bounds of the sash and now moving the mouse pointer back toward the current sash.\n if (distance < 0 && eventPos > splitterEnd) {\n return;\n }\n\n // Compute the new sash sizes.\n const sash1 = this.sashes()[sashIndex]!;\n const sash2 = this.sashes()[sashIndex + 1]!;\n\n const sashSize1 = sash1.component().size;\n const sashSize2 = sash2.component().size;\n\n const sashMinSize1 = sash1.minSize() ? this.toPixel(sash1.minSize()!) : 0;\n const sashMinSize2 = sash2.minSize() ? this.toPixel(sash2.minSize()!) : 0;\n\n const newSashSize1 = between(Math.round(sashSize1 + distance), {min: sashMinSize1, max: sashSize1 + sashSize2 - sashMinSize2});\n const newSashSize2 = between(Math.round(sashSize2 - distance), {min: sashMinSize2, max: sashSize1 + sashSize2 - sashMinSize1});\n\n // Set the new computed sash sizes.\n sash1.updateFlexProperties({flexBasis: `${newSashSize1}px`});\n sash2.updateFlexProperties({flexBasis: `${newSashSize2}px`});\n }\n\n protected onSashReset(sashIndex: number): void {\n const sash1 = this.sashes()[sashIndex]!;\n const sash2 = this.sashes()[sashIndex + 1]!;\n const equalSashSize = (sash1.component().size + sash2.component().size) / 2;\n const pixelToFlexGrowFactor = computePixelToFlexGrowFactor(this.sashes());\n\n const sashSizesAfterReset = this.sashes().reduce((acc, sash, index) => {\n const size = index === sashIndex || index === sashIndex + 1 ? equalSashSize : sash.component().size;\n return acc.set(sash.computeKey(index), size);\n }, new Map<string, number>());\n\n [sash1, sash2].forEach(sash => {\n if (sash.isFixedSize()) {\n sash.updateFlexProperties({flexBasis: `${equalSashSize}px`});\n }\n else {\n sash.updateFlexProperties({flexGrow: pixelToFlexGrowFactor * equalSashSize});\n }\n });\n\n this.sashStart.emit();\n this.sashEnd.emit(Object.fromEntries(sashSizesAfterReset));\n }\n\n private toPixel(value: string | number): number {\n if (typeof value === 'number') {\n return value;\n }\n if (value.endsWith('%')) {\n const hostBounds = this._host.getBoundingClientRect();\n const hostSize = (this.direction() === 'row' ? hostBounds.width : hostBounds.height);\n return parseInt(value, 10) * hostSize / 100;\n }\n return parseInt(value, 10);\n }\n\n /**\n * Detects when rendered this component for the first time.\n */\n private detectFirstRendering(): void {\n afterNextRender({\n read: () => this.afterFirstRender.set(true),\n });\n }\n\n /**\n * Mirrors the provided signal. If animated sashes are being removed, delays emission until the animation completes,\n * effectively removing the element after the animation.\n *\n * Delayed removal is required for CDK Portals to not remove displayed content immediately.\n */\n private computeSashes(contentChildren: Signal<readonly SciSashDirective[]>): Signal<readonly SciSashDirective[]> {\n const differ = inject(IterableDiffers).find([]).create<SciSashDirective>();\n const sashes = signal<readonly SciSashDirective[]>([]);\n\n effect(() => {\n // Compute removed sashes to be removed with an animation.\n const removedAnimatedSashes = new Array<SciSashDirective>();\n differ.diff(contentChildren())?.forEachRemovedItem(({item: sash}) => untracked(() => {\n if (sash.animate()) {\n removedAnimatedSashes.push(sash);\n }\n }));\n\n // Emit if no sashes are removed with an animation.\n if (!removedAnimatedSashes.length) {\n sashes.set(contentChildren());\n return;\n }\n\n // Delay emission until a leave animation completes.\n removedAnimatedSashes.forEach(sash => {\n // Start the leave animation.\n const done = sash.component().startLeaveAnimation();\n // Track animation completion, re-running this effect to finally emit the sashes.\n done();\n });\n });\n\n return sashes;\n }\n}\n\nfunction between(value: number, minmax: {min: number; max: number}): number {\n return Math.min(minmax.max, Math.max(minmax.min, value));\n}\n\n/**\n * Returns the factor to compute the flex-grow proportion from the pixel size of a sash.\n */\nfunction computePixelToFlexGrowFactor(sashes: readonly SciSashDirective[]): number {\n const flexibleSashes = sashes.filter(sash => !sash.isFixedSize());\n\n const proportionSum = flexibleSashes.reduce((sum, sash) => sum + Number(sash.size()), 0);\n const pixelSum = flexibleSashes.reduce((sum, sash) => sum + sash.component().size, 0);\n\n return proportionSum / pixelSum;\n}\n\nfunction provideSashBoxAccessor(): SciSashBoxAccessor {\n const component = inject(SciSashboxComponent);\n\n return new class implements SciSashBoxAccessor {\n public readonly sashes = component.sashes;\n public readonly direction = component.direction;\n public readonly afterFirstRender = component.afterFirstRender;\n }();\n}\n","@for (sash of sashes(); track sash; let i = $index; let first = $first; let last = $last) {\n <sci-sash [sash]=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [style.flex-grow]=\"sash.flexProperties().flexGrow\"\n [style.flex-shrink]=\"sash.flexProperties().flexShrink\"\n [style.flex-basis]=\"sash.flexProperties().flexBasis\"/>\n @if (!last) {\n <sci-splitter sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"direction() === 'row' ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.host, i, $event)\"\n (end)=\"onSashEnd()\"\n (reset)=\"onSashReset(i)\"/>\n }\n}\n","/*\n * Copyright (c) 2018-2019 Swiss Federal Railways\n *\n * This program and the accompanying materials are made\n * available under the terms of the Eclipse Public License 2.0\n * which is available at https://www.eclipse.org/legal/epl-2.0/\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\n/*\n * Secondary entrypoint: '@scion/components/sashbox'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciSashboxComponent} from './sashbox.component';\nexport {SciSashDirective} from './sash.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;AAQG;AAKH;;AAEG;MACmB,kBAAkB,CAAA;AAKvC;;ACrBD;;;;;;;;AAQG;AAMH;;;;;;;;;;;;;;;;;;AAkBG;MAKU,gBAAgB,CAAA;AAE3B;;;;;;AAMG;AACa,IAAA,IAAI,GAAG,KAAK,CAAC,GAAG,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,MAAA,EAAA,8BAAA,EAAA,CAAA,EAAG,SAAS,EAAE,CAAC,IAAwC,KAAsB,IAAI,IAAI,GAAG,GAAE;AAE1H;;;;;AAKG;AACa,IAAA,OAAO,GAAG,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