@scion/components 20.0.0 → 21.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.
@@ -1,3 +1,4 @@
1
1
  {
2
- "module": "../fesm2022/scion-components-dimension.mjs"
2
+ "module": "../fesm2022/scion-components-dimension.mjs",
3
+ "typings": "../types/scion-components-dimension.d.ts"
3
4
  }
@@ -29,7 +29,7 @@ class SciDimensionDirective {
29
29
  /**
30
30
  * Controls if to output outside the Angular zone. Defaults to `false`.
31
31
  */
32
- emitOutsideAngular = input(false);
32
+ emitOutsideAngular = input(false, ...(ngDevMode ? [{ debugName: "emitOutsideAngular" }] : []));
33
33
  /**
34
34
  * Outputs the size of the element.
35
35
  */
@@ -57,15 +57,15 @@ class SciDimensionDirective {
57
57
  });
58
58
  });
59
59
  }
60
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciDimensionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
61
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.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 });
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciDimensionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
61
+ 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 });
62
62
  }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciDimensionDirective, decorators: [{
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciDimensionDirective, decorators: [{
64
64
  type: Directive,
65
65
  args: [{
66
66
  selector: '[sciDimension]',
67
67
  }]
68
- }], ctorParameters: () => [] });
68
+ }], ctorParameters: () => [], propDecorators: { emitOutsideAngular: [{ type: i0.Input, args: [{ isSignal: true, alias: "emitOutsideAngular", required: false }] }], dimensionChange: [{ type: i0.Output, args: ["sciDimensionChange"] }] } });
69
69
 
70
70
  /*
71
71
  * Copyright (c) 2018-2024 Swiss Federal Railways
@@ -83,8 +83,8 @@ function dimension(elementLike, options) {
83
83
  }
84
84
  const injector = options?.injector ?? inject(Injector);
85
85
  const zone = injector.get(NgZone);
86
- const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike));
87
- const onResize = signal(undefined, { equal: () => false });
86
+ const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike), ...(ngDevMode ? [{ debugName: "element" }] : []));
87
+ const onResize = signal(undefined, ...(ngDevMode ? [{ debugName: "onResize", equal: () => false }] : [{ equal: () => false }]));
88
88
  // Subscribe to element size changes.
89
89
  effect(onCleanup => {
90
90
  const el = element();
@@ -141,8 +141,8 @@ function boundingClientRect(elementLike, options) {
141
141
  }
142
142
  const injector = options?.injector ?? inject(Injector);
143
143
  const zone = injector.get(NgZone);
144
- const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike));
145
- const onBoundingBoxChange = signal(undefined, { equal: () => false });
144
+ const element = computed(() => coerceElement(isSignal(elementLike) ? elementLike() : elementLike), ...(ngDevMode ? [{ debugName: "element" }] : []));
145
+ const onBoundingBoxChange = signal(undefined, ...(ngDevMode ? [{ debugName: "onBoundingBoxChange", equal: () => false }] : [{ equal: () => false }]));
146
146
  // Subscribe to element bounding box changes.
147
147
  effect(onCleanup => {
148
148
  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} 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\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 // Assert Angular zone.\n this.emitOutsideAngular() ? NgZone.assertNotInAngularZone() : NgZone.assertInAngularZone();\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":[],"mappings":";;;;;;;;AAAA;;;;;;;;AAQG;AAQH;;;;;;;;;AASG;MAIU,qBAAqB,CAAA;AAEhC;;AAEG;AACa,IAAA,kBAAkB,GAAG,KAAK,CAAC,KAAK,CAAC;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;QAE3B,WAAW,CAAC,IAAI;aACb,IAAI;;QAEH,WAAW,CAAC,EAAE,IAAI,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;;;;AAI7C,QAAA,SAAS,CAAC,EAAE,IAAI,qBAAqB,CAAC,EAAE,CAAC,CAAC,EAC1C,SAAS,CAAC,EAAE,IAAI,IAAI,CAAC,kBAAkB,E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AGd,OAAO,QAAQ,CAAC,MAAK;AACnB,QAAA,MAAM,EAAE,GAAG,OAAO,EAAE;QACpB,IAAI,CAAC,EAAE,EAAE;AACP,YAAA,OAAO,SAAS;;;AAIlB,QAAA,mBAAmB,EAAE;AAErB,QAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE;AACnC,KAAC,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
+ {"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} 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\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 // Assert Angular zone.\n this.emitOutsideAngular() ? NgZone.assertNotInAngularZone() : NgZone.assertInAngularZone();\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":[],"mappings":";;;;;;;;AAAA;;;;;;;;AA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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;;;;"}
@@ -55,20 +55,20 @@ class SciSashDirective {
55
55
  *
56
56
  * If not set, remaining space is distributed equally.
57
57
  */
58
- size = input('1', { transform: (size) => size ?? '1' });
58
+ size = input('1', ...(ngDevMode ? [{ debugName: "size", transform: (size) => size ?? '1' }] : [{ 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();
65
+ minSize = input(...(ngDevMode ? [undefined, { debugName: "minSize" }] : []));
66
66
  /**
67
67
  * Specifies an optional key to identify this sash.
68
68
  *
69
69
  * The key is used as the property key in the object emitted by {@link SciSashboxComponent.sashEnd} to associate the size of this sash.
70
70
  */
71
- key = input();
71
+ key = input(...(ngDevMode ? [undefined, { debugName: "key" }] : []));
72
72
  /**
73
73
  * Controls whether to animate the entering and leaving of this sash, only if fixed-sized. Defaults to `false`.
74
74
  *
@@ -76,9 +76,9 @@ class SciSashDirective {
76
76
  *
77
77
  * Note: Animates only sashes added or removed after the initial rendering.
78
78
  */
79
- animate = input(false, { transform: booleanAttribute });
79
+ animate = input(false, ...(ngDevMode ? [{ debugName: "animate", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
80
80
  _sashBoxAccessor = inject(SciSashBoxAccessor);
81
- _component = signal(undefined);
81
+ _component = signal(undefined, ...(ngDevMode ? [{ debugName: "_component" }] : []));
82
82
  /**
83
83
  * Flex properties computed based on the configured {@link size}. Properties are updated when moving this sash.
84
84
  */
@@ -102,13 +102,13 @@ class SciSashDirective {
102
102
  *
103
103
  * @internal
104
104
  */
105
- isFixedSize = computed(() => Number.isNaN(+this.size()));
105
+ isFixedSize = computed(() => Number.isNaN(+this.size()), ...(ngDevMode ? [{ debugName: "isFixedSize" }] : []));
106
106
  /**
107
107
  * Gets the component that renders this sash.
108
108
  *
109
109
  * @internal
110
110
  */
111
- component = computed(() => this._component() ?? throwError('[SciSashbox] SashComponent not available yet.'));
111
+ component = computed(() => this._component() ?? throwError('[SciSashbox] SashComponent not available yet.'), ...(ngDevMode ? [{ debugName: "component" }] : []));
112
112
  /**
113
113
  * Sets the component that renders this sash.
114
114
  *
@@ -179,16 +179,16 @@ class SciSashDirective {
179
179
  };
180
180
  });
181
181
  }
182
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciSashDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
183
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.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 });
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 });
184
184
  }
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciSashDirective, decorators: [{
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciSashDirective, decorators: [{
186
186
  type: Directive,
187
187
  args: [{
188
188
  selector: 'ng-template[sciSash]',
189
189
  exportAs: 'sciSash',
190
190
  }]
191
- }] });
191
+ }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }], key: [{ type: i0.Input, args: [{ isSignal: true, alias: "key", required: false }] }], animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }] } });
192
192
  function throwError(error) {
193
193
  throw Error(error);
194
194
  }
@@ -207,10 +207,10 @@ function throwError(error) {
207
207
  */
208
208
  class SciElementRefDirective {
209
209
  host = inject(ElementRef).nativeElement;
210
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciElementRefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
211
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.1", type: SciElementRefDirective, isStandalone: true, selector: "[sciElementRef]", exportAs: ["sciElementRef"], ngImport: i0 });
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 });
212
212
  }
213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciElementRefDirective, decorators: [{
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciElementRefDirective, decorators: [{
214
214
  type: Directive,
215
215
  args: [{
216
216
  selector: '[sciElementRef]',
@@ -234,11 +234,11 @@ class SashComponent {
234
234
  /**
235
235
  * Specifies the sash representing this component.
236
236
  */
237
- sash = input.required();
237
+ sash = input.required(...(ngDevMode ? [{ debugName: "sash" }] : []));
238
238
  _host = inject(ElementRef).nativeElement;
239
239
  _cd = inject(ChangeDetectorRef);
240
240
  _sashBoxAccessor = inject(SciSashBoxAccessor);
241
- animationState = linkedSignal(() => this.sash().animate() && this._sashBoxAccessor.afterFirstRender() ? 'enter' : null);
241
+ animationState = linkedSignal(() => this.sash().animate() && this._sashBoxAccessor.afterFirstRender() ? 'enter' : null, ...(ngDevMode ? [{ debugName: "animationState" }] : []));
242
242
  constructor() {
243
243
  // Associate sash with this component.
244
244
  effect(() => this.sash().setComponent(this));
@@ -267,12 +267,12 @@ class SashComponent {
267
267
  const { width, height } = this._host.getBoundingClientRect();
268
268
  return this._sashBoxAccessor.direction() === 'row' ? width : height;
269
269
  }
270
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SashComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
271
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.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: [
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: [
272
272
  trigger('sash-animation', provideAnimation()),
273
273
  ] });
274
274
  }
275
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SashComponent, decorators: [{
275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SashComponent, decorators: [{
276
276
  type: Component,
277
277
  args: [{ selector: 'sci-sash', imports: [
278
278
  NgTemplateOutlet,
@@ -282,7 +282,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImpor
282
282
  '[@sash-animation]': 'animationState()',
283
283
  '(@sash-animation.done)': 'onAnimationEnd();',
284
284
  }, template: "<ng-container *ngTemplateOutlet=\"sash().sashTemplate\"/>\n", styles: [":host{display:grid;grid-auto-rows:100%;grid-auto-columns:100%;overflow:hidden}\n"] }]
285
- }], ctorParameters: () => [] });
285
+ }], ctorParameters: () => [], propDecorators: { sash: [{ type: i0.Input, args: [{ isSignal: true, alias: "sash", required: true }] }] } });
286
286
  /**
287
287
  * Returns animation metadata to slide-in and slide-out a sash.
288
288
  */
@@ -366,7 +366,7 @@ class SciSashboxComponent {
366
366
  /**
367
367
  * Specifies if to lay out sashes in a row (which is by default) or column arrangement.
368
368
  */
369
- direction = input('row');
369
+ direction = input('row', ...(ngDevMode ? [{ debugName: "direction" }] : []));
370
370
  /**
371
371
  * Notifies when start sashing.
372
372
  */
@@ -378,11 +378,11 @@ class SciSashboxComponent {
378
378
  */
379
379
  sashEnd = output();
380
380
  _host = inject(ElementRef).nativeElement;
381
- _contentChildren = contentChildren(SciSashDirective);
381
+ _contentChildren = contentChildren(SciSashDirective, ...(ngDevMode ? [{ debugName: "_contentChildren" }] : []));
382
382
  /** @internal */
383
383
  sashes = this.computeSashes(this._contentChildren);
384
384
  /** @internal */
385
- afterFirstRender = signal(false);
385
+ afterFirstRender = signal(false, ...(ngDevMode ? [{ debugName: "afterFirstRender" }] : []));
386
386
  sashing = false;
387
387
  maxHeight;
388
388
  maxWidth;
@@ -505,7 +505,7 @@ class SciSashboxComponent {
505
505
  */
506
506
  computeSashes(contentChildren) {
507
507
  const differ = inject(IterableDiffers).find([]).create();
508
- const sashes = signal([]);
508
+ const sashes = signal([], ...(ngDevMode ? [{ debugName: "sashes" }] : []));
509
509
  effect(() => {
510
510
  // Compute removed sashes to be removed with an animation.
511
511
  const removedAnimatedSashes = new Array();
@@ -529,13 +529,13 @@ class SciSashboxComponent {
529
529
  });
530
530
  return sashes;
531
531
  }
532
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciSashboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
533
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.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": "this.sashing", "style.--\u0275sci-sashbox-max-height": "this.maxHeight", "style.--\u0275sci-sashbox-max-width": "this.maxWidth" } }, providers: [{
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": "this.sashing", "style.--\u0275sci-sashbox-max-height": "this.maxHeight", "style.--\u0275sci-sashbox-max-width": "this.maxWidth" } }, providers: [{
534
534
  provide: SciSashBoxAccessor,
535
535
  useFactory: provideSashBoxAccessor,
536
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"] }] });
537
537
  }
538
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciSashboxComponent, decorators: [{
538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciSashboxComponent, decorators: [{
539
539
  type: Component,
540
540
  args: [{ selector: 'sci-sashbox', imports: [
541
541
  SciSplitterComponent,
@@ -547,7 +547,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImpor
547
547
  }], host: {
548
548
  '[attr.data-direction]': 'direction()',
549
549
  }, 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"] }]
550
- }], ctorParameters: () => [], propDecorators: { sashing: [{
550
+ }], ctorParameters: () => [], propDecorators: { direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], sashStart: [{ type: i0.Output, args: ["sashStart"] }], sashEnd: [{ type: i0.Output, args: ["sashEnd"] }], _contentChildren: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SciSashDirective), { isSignal: true }] }], sashing: [{
551
551
  type: HostBinding,
552
552
  args: ['class.sashing']
553
553
  }], 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, HostBinding, 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 },\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 afterFirstRender = signal(false);\n\n @HostBinding('class.sashing')\n protected sashing = false;\n\n @HostBinding('style.--ɵsci-sashbox-max-height')\n protected maxHeight: number | undefined;\n\n @HostBinding('style.--ɵsci-sashbox-max-width')\n protected maxWidth: number | undefined;\n\n constructor() {\n this.detectFirstRendering();\n }\n\n protected onSashStart(): void {\n this.sashing = true;\n\n // Avoid overflow when sashing.\n const hostBounds = this._host.getBoundingClientRect();\n this.maxHeight = hostBounds.height;\n this.maxWidth = 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 = false;\n this.maxHeight = undefined;\n this.maxWidth = 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,EAAE,EAAC,SAAS,EAAE,CAAC,IAAwC,KAAsB,IAAI,IAAI,GAAG,EAAC,CAAC;AAE1H;;;;;AAKG;IACa,OAAO,GAAG,KAAK,EAA+B;AAE9D;;;;AAIG;IACa,GAAG,GAAG,KAAK,EAAsB;AAEjD;;;;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AAE;AACL;;AEjUA;;;;;;;;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} 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, HostBinding, 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 },\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 afterFirstRender = signal(false);\n\n @HostBinding('class.sashing')\n protected sashing = false;\n\n @HostBinding('style.--ɵsci-sashbox-max-height')\n protected maxHeight: number | undefined;\n\n @HostBinding('style.--ɵsci-sashbox-max-width')\n protected maxWidth: number | undefined;\n\n constructor() {\n this.detectFirstRendering();\n }\n\n protected onSashStart(): void {\n this.sashing = true;\n\n // Avoid overflow when sashing.\n const hostBounds = this._host.getBoundingClientRect();\n this.maxHeight = hostBounds.height;\n this.maxWidth = 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 = false;\n this.maxHeight = undefined;\n this.maxWidth = 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,IAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAC7C,IAAA,UAAU,GAAG,MAAM,CAA4B,SAAS,sDAAC;AAE1E;;AAEG;AACc,IAAA,eAAe,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jUA;;;;;;;;AAQG;AAEH;;;;AAIG;;ACdH;;AAEG;;;;"}
@@ -59,7 +59,7 @@ class SciSplitterComponent {
59
59
  /**
60
60
  * Controls whether to render a vertical or horizontal splitter. By default, if not specified, renders a vertical splitter.
61
61
  */
62
- orientation = input('vertical');
62
+ orientation = input('vertical', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
63
63
  /**
64
64
  * Notifies when start moving the splitter.
65
65
  */
@@ -183,13 +183,13 @@ class SciSplitterComponent {
183
183
  });
184
184
  });
185
185
  }
186
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciSplitterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
187
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.1", type: SciSplitterComponent, isStandalone: true, selector: "sci-splitter", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { start: "start", move: "move", end: "end", reset: "reset" }, host: { properties: { "class.moving": "this.moving", "class.vertical": "this.isVertical", "class.horizontal": "this.isHorizontal", "style.cursor": "this.splitterCursor" } }, viewQueries: [{ propertyName: "_touchTarget", first: true, predicate: ["touch_target"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #touch_target class=\"touch-target\">\n <div class=\"handle\"></div>\n</div>\n", styles: [":host{display:grid;position:relative;background-color:var(--sci-splitter-background-color);border-radius:var(--sci-splitter-border-radius);place-items:center;align-self:center}:host>div.touch-target{position:absolute;display:grid;place-items:center;pointer-events:auto}:host>div.touch-target>div.handle{position:absolute;background-color:var(--sci-splitter-background-color);border-radius:var(--sci-splitter-border-radius);opacity:var(--sci-splitter-opacity-hover);transition-property:width,height;transition-timing-function:ease-in;transition-duration:75ms}:host.vertical{width:var(--sci-splitter-size);height:var(--sci-splitter-cross-axis-size)}:host.vertical>div.touch-target{width:var(--sci-splitter-touch-target-size);height:100%}:host.vertical>div.touch-target>div.handle{width:var(--sci-splitter-size);height:100%}:host.horizontal{height:var(--sci-splitter-size);width:var(--sci-splitter-cross-axis-size)}:host.horizontal>div.touch-target{width:100%;height:var(--sci-splitter-touch-target-size)}:host.horizontal>div.touch-target>div.handle{width:100%;height:var(--sci-splitter-size)}:host>div.touch-target:active>div.handle{opacity:var(--sci-splitter-opacity-active)}:host.vertical.moving>div.touch-target>div.handle,:host.vertical>div.touch-target:hover>div.handle{background-color:var(--sci-splitter-background-color-hover);width:var(--sci-splitter-size-hover)}:host.horizontal.moving>div.touch-target>div.handle,:host.horizontal>div.touch-target:hover>div.handle{background-color:var(--sci-splitter-background-color-hover);height:var(--sci-splitter-size-hover)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
186
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciSplitterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
187
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.0.0", type: SciSplitterComponent, isStandalone: true, selector: "sci-splitter", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { start: "start", move: "move", end: "end", reset: "reset" }, host: { properties: { "class.moving": "this.moving", "class.vertical": "this.isVertical", "class.horizontal": "this.isHorizontal", "style.cursor": "this.splitterCursor" } }, viewQueries: [{ propertyName: "_touchTarget", first: true, predicate: ["touch_target"], descendants: true, isSignal: true }], ngImport: i0, template: "<div #touch_target class=\"touch-target\">\n <div class=\"handle\"></div>\n</div>\n", styles: [":host{display:grid;position:relative;background-color:var(--sci-splitter-background-color);border-radius:var(--sci-splitter-border-radius);place-items:center;align-self:center}:host>div.touch-target{position:absolute;display:grid;place-items:center;pointer-events:auto}:host>div.touch-target>div.handle{position:absolute;background-color:var(--sci-splitter-background-color);border-radius:var(--sci-splitter-border-radius);opacity:var(--sci-splitter-opacity-hover);transition-property:width,height;transition-timing-function:ease-in;transition-duration:75ms}:host.vertical{width:var(--sci-splitter-size);height:var(--sci-splitter-cross-axis-size)}:host.vertical>div.touch-target{width:var(--sci-splitter-touch-target-size);height:100%}:host.vertical>div.touch-target>div.handle{width:var(--sci-splitter-size);height:100%}:host.horizontal{height:var(--sci-splitter-size);width:var(--sci-splitter-cross-axis-size)}:host.horizontal>div.touch-target{width:100%;height:var(--sci-splitter-touch-target-size)}:host.horizontal>div.touch-target>div.handle{width:100%;height:var(--sci-splitter-size)}:host>div.touch-target:active>div.handle{opacity:var(--sci-splitter-opacity-active)}:host.vertical.moving>div.touch-target>div.handle,:host.vertical>div.touch-target:hover>div.handle{background-color:var(--sci-splitter-background-color-hover);width:var(--sci-splitter-size-hover)}:host.horizontal.moving>div.touch-target>div.handle,:host.horizontal>div.touch-target:hover>div.handle{background-color:var(--sci-splitter-background-color-hover);height:var(--sci-splitter-size-hover)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
188
188
  }
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SciSplitterComponent, decorators: [{
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImport: i0, type: SciSplitterComponent, decorators: [{
190
190
  type: Component,
191
191
  args: [{ selector: 'sci-splitter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #touch_target class=\"touch-target\">\n <div class=\"handle\"></div>\n</div>\n", styles: [":host{display:grid;position:relative;background-color:var(--sci-splitter-background-color);border-radius:var(--sci-splitter-border-radius);place-items:center;align-self:center}:host>div.touch-target{position:absolute;display:grid;place-items:center;pointer-events:auto}:host>div.touch-target>div.handle{position:absolute;background-color:var(--sci-splitter-background-color);border-radius:var(--sci-splitter-border-radius);opacity:var(--sci-splitter-opacity-hover);transition-property:width,height;transition-timing-function:ease-in;transition-duration:75ms}:host.vertical{width:var(--sci-splitter-size);height:var(--sci-splitter-cross-axis-size)}:host.vertical>div.touch-target{width:var(--sci-splitter-touch-target-size);height:100%}:host.vertical>div.touch-target>div.handle{width:var(--sci-splitter-size);height:100%}:host.horizontal{height:var(--sci-splitter-size);width:var(--sci-splitter-cross-axis-size)}:host.horizontal>div.touch-target{width:100%;height:var(--sci-splitter-touch-target-size)}:host.horizontal>div.touch-target>div.handle{width:100%;height:var(--sci-splitter-size)}:host>div.touch-target:active>div.handle{opacity:var(--sci-splitter-opacity-active)}:host.vertical.moving>div.touch-target>div.handle,:host.vertical>div.touch-target:hover>div.handle{background-color:var(--sci-splitter-background-color-hover);width:var(--sci-splitter-size-hover)}:host.horizontal.moving>div.touch-target>div.handle,:host.horizontal>div.touch-target:hover>div.handle{background-color:var(--sci-splitter-background-color-hover);height:var(--sci-splitter-size-hover)}\n"] }]
192
- }], propDecorators: { moving: [{
192
+ }], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], start: [{ type: i0.Output, args: ["start"] }], move: [{ type: i0.Output, args: ["move"] }], end: [{ type: i0.Output, args: ["end"] }], reset: [{ type: i0.Output, args: ["reset"] }], _touchTarget: [{ type: i0.ViewChild, args: ['touch_target', { isSignal: true }] }], moving: [{
193
193
  type: HostBinding,
194
194
  args: ['class.moving']
195
195
  }], isVertical: [{