@scion/components 17.0.0 → 18.0.1

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.
Files changed (39) hide show
  1. package/_scrollbar.scss +7 -0
  2. package/dimension/dimension.directive.d.ts +18 -25
  3. package/dimension/package.json +3 -0
  4. package/esm2022/dimension/dimension.directive.mjs +33 -53
  5. package/esm2022/dimension/dimension.module.mjs +4 -4
  6. package/esm2022/sashbox/element-ref.directive.mjs +3 -3
  7. package/esm2022/sashbox/sash-initializer.directive.mjs +3 -3
  8. package/esm2022/sashbox/sash.directive.mjs +4 -4
  9. package/esm2022/sashbox/sashbox.component.mjs +40 -44
  10. package/esm2022/sashbox/sashbox.module.mjs +4 -4
  11. package/esm2022/splitter/splitter.component.mjs +5 -5
  12. package/esm2022/splitter/splitter.module.mjs +4 -4
  13. package/esm2022/throbber/ellipsis-throbber/ellipsis-throbber.component.mjs +4 -4
  14. package/esm2022/throbber/ripple-throbber/ripple-throbber.component.mjs +4 -4
  15. package/esm2022/throbber/roller-throbber/roller-throbber.component.mjs +4 -4
  16. package/esm2022/throbber/spinner-throbber/spinner-throbber.component.mjs +4 -4
  17. package/esm2022/throbber/throbber.component.mjs +5 -9
  18. package/esm2022/throbber/throbber.module.mjs +4 -4
  19. package/esm2022/viewport/native-scrollbar-track-size-provider.service.mjs +4 -4
  20. package/esm2022/viewport/scrollable.directive.mjs +4 -4
  21. package/esm2022/viewport/scrollbar/scrollbar.component.mjs +8 -8
  22. package/esm2022/viewport/viewport.component.mjs +6 -7
  23. package/esm2022/viewport/viewport.module.mjs +4 -4
  24. package/fesm2022/scion-components-dimension.mjs +36 -56
  25. package/fesm2022/scion-components-dimension.mjs.map +1 -1
  26. package/fesm2022/scion-components-sashbox.mjs +52 -56
  27. package/fesm2022/scion-components-sashbox.mjs.map +1 -1
  28. package/fesm2022/scion-components-splitter.mjs +8 -8
  29. package/fesm2022/scion-components-splitter.mjs.map +1 -1
  30. package/fesm2022/scion-components-throbber.mjs +24 -28
  31. package/fesm2022/scion-components-throbber.mjs.map +1 -1
  32. package/fesm2022/scion-components-viewport.mjs +22 -23
  33. package/fesm2022/scion-components-viewport.mjs.map +1 -1
  34. package/package.json +5 -6
  35. package/sashbox/package.json +3 -0
  36. package/sashbox/sashbox.component.d.ts +4 -3
  37. package/splitter/package.json +3 -0
  38. package/throbber/package.json +3 -0
  39. package/viewport/package.json +3 -0
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, EventEmitter, NgZone, Component, HostBinding, Output, ContentChildren, inject, NgModule } from '@angular/core';
2
+ import { Directive, Input, inject, ElementRef, NgZone, EventEmitter, Component, HostBinding, Output, ContentChildren, NgModule } from '@angular/core';
3
3
  import { switchMap, map, startWith, takeUntil } from 'rxjs/operators';
4
4
  import { BehaviorSubject, merge, Subject } from 'rxjs';
5
5
  import { SciSplitterComponent } from '@scion/components/splitter';
6
- import { NgIf, NgFor, AsyncPipe, NgTemplateOutlet } from '@angular/common';
6
+ import { AsyncPipe, NgTemplateOutlet } from '@angular/common';
7
7
 
8
8
  /**
9
9
  * Allows accessing the sashbox component from sashes.
@@ -135,10 +135,10 @@ class SciSashDirective {
135
135
  }
136
136
  return flexGrow / flexGrowSum;
137
137
  }
138
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashDirective, deps: [{ token: i0.TemplateRef }, { token: SciSashBoxAccessor }], target: i0.ɵɵFactoryTarget.Directive }); }
139
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: SciSashDirective, isStandalone: true, selector: "ng-template[sciSash]", inputs: { size: "size", minSize: "minSize" }, exportAs: ["sciSash"], usesOnChanges: true, ngImport: i0 }); }
138
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashDirective, deps: [{ token: i0.TemplateRef }, { token: SciSashBoxAccessor }], target: i0.ɵɵFactoryTarget.Directive }); }
139
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: SciSashDirective, isStandalone: true, selector: "ng-template[sciSash]", inputs: { size: "size", minSize: "minSize" }, exportAs: ["sciSash"], usesOnChanges: true, ngImport: i0 }); }
140
140
  }
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashDirective, decorators: [{
141
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashDirective, decorators: [{
142
142
  type: Directive,
143
143
  args: [{
144
144
  selector: 'ng-template[sciSash]',
@@ -170,10 +170,10 @@ class SciSashInitializerDirective {
170
170
  ngOnChanges(changes) {
171
171
  this.sash.element = this._host.nativeElement;
172
172
  }
173
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashInitializerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
174
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: SciSashInitializerDirective, isStandalone: true, selector: "div[sciSashInitializer].sash", inputs: { sash: ["sciSashInitializer", "sash"] }, usesOnChanges: true, ngImport: i0 }); }
173
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashInitializerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
174
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: SciSashInitializerDirective, isStandalone: true, selector: "div[sciSashInitializer].sash", inputs: { sash: ["sciSashInitializer", "sash"] }, usesOnChanges: true, ngImport: i0 }); }
175
175
  }
176
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashInitializerDirective, decorators: [{
176
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashInitializerDirective, decorators: [{
177
177
  type: Directive,
178
178
  args: [{
179
179
  selector: 'div[sciSashInitializer].sash',
@@ -201,10 +201,10 @@ class SciElementRefDirective {
201
201
  this.host = host;
202
202
  this.nativeElement = host.nativeElement;
203
203
  }
204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciElementRefDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
205
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: SciElementRefDirective, isStandalone: true, selector: "[sciElementRef]", exportAs: ["sciElementRef"], ngImport: i0 }); }
204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciElementRefDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
205
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.1", type: SciElementRefDirective, isStandalone: true, selector: "[sciElementRef]", exportAs: ["sciElementRef"], ngImport: i0 }); }
206
206
  }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciElementRefDirective, decorators: [{
207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciElementRefDirective, decorators: [{
208
208
  type: Directive,
209
209
  args: [{
210
210
  selector: '[sciElementRef]',
@@ -276,18 +276,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
276
276
  * ```
277
277
  */
278
278
  class SciSashboxComponent {
279
- /** @internal */
280
- set setSashes(queryList) {
281
- queryList.changes
282
- .pipe(startWith(queryList), takeUntil(this._destroy$))
283
- .subscribe((sashes) => {
284
- this.sashes$.next(sashes.toArray());
285
- });
286
- }
287
- constructor(_host, _zone) {
288
- this._host = _host;
289
- this._zone = _zone;
279
+ constructor() {
290
280
  this._destroy$ = new Subject();
281
+ this._host = inject((ElementRef)).nativeElement;
282
+ this._zone = inject(NgZone);
291
283
  this.sashes$ = new BehaviorSubject([]);
292
284
  this.sashing = false;
293
285
  /**
@@ -303,20 +295,34 @@ class SciSashboxComponent {
303
295
  */
304
296
  this.sashEnd = new EventEmitter();
305
297
  }
298
+ /** @internal */
299
+ set setSashes(queryList) {
300
+ queryList.changes
301
+ .pipe(startWith(queryList), takeUntil(this._destroy$))
302
+ .subscribe((sashes) => {
303
+ this.sashes$.next(sashes.toArray());
304
+ });
305
+ }
306
306
  onSashStart() {
307
307
  this.sashing = true;
308
+ // Avoid overflow when sashing.
309
+ const hostBounds = this._host.getBoundingClientRect();
310
+ this.maxHeight = hostBounds.height;
311
+ this.maxWidth = hostBounds.width;
308
312
  this.sashStart.emit();
309
313
  // set the effective sash size as the flex-basis for non-fixed sashes (as sashing operates on pixel deltas)
310
314
  this.sashes.forEach(sash => {
311
315
  if (!sash.isFixedSize) {
312
316
  sash.flexGrow = 0;
313
- sash.flexShrink = 0;
317
+ sash.flexShrink = 1;
314
318
  sash.flexBasis = `${sash.computedSize}px`;
315
319
  }
316
320
  });
317
321
  }
318
322
  onSashEnd() {
319
323
  this.sashing = false;
324
+ this.maxHeight = undefined;
325
+ this.maxWidth = undefined;
320
326
  // unset the flex-basis for non-fixed sashes and set the flex-grow accordingly
321
327
  const pixelToFlexGrowFactor = computePixelToFlexGrowFactor(this.sashes);
322
328
  const absoluteSashSizes = this.sashes.map(sash => sash.computedSize);
@@ -354,28 +360,14 @@ class SciSashboxComponent {
354
360
  const sash2 = this.sashes[sashIndex + 1];
355
361
  const sashSize1 = sash1.computedSize;
356
362
  const sashSize2 = sash2.computedSize;
357
- const maxSashSize = sashSize1 + sashSize2;
358
- const computedNewSashSize1 = Math.round(sashSize1 + distance);
359
- const computedNewSashSize2 = Math.round(sashSize2 - distance);
360
- if (sash1.minSize !== undefined && distance < 0 && computedNewSashSize1 < this.toPixel(sash1.minSize)) {
361
- return;
362
- }
363
- if (sash2.minSize !== undefined && distance > 0 && computedNewSashSize2 < this.toPixel(sash2.minSize)) {
364
- return;
365
- }
366
- const validNewSashSize1 = between(computedNewSashSize1, { min: 0, max: maxSashSize });
367
- const validNewSashSize2 = between(computedNewSashSize2, { min: 0, max: maxSashSize });
368
- // continue only if both sashes adjacent to the splitter change their size (as the event would change other sashes otherwise)
369
- if (validNewSashSize1 !== computedNewSashSize1) {
370
- return;
371
- }
372
- if (validNewSashSize2 !== computedNewSashSize2) {
373
- return;
374
- }
363
+ const sashMinSize1 = sash1.minSize ? this.toPixel(sash1.minSize) : 0;
364
+ const sashMinSize2 = sash2.minSize ? this.toPixel(sash2.minSize) : 0;
365
+ const newSashSize1 = between(Math.round(sashSize1 + distance), { min: sashMinSize1, max: sashSize1 + sashSize2 - sashMinSize2 });
366
+ const newSashSize2 = between(Math.round(sashSize2 - distance), { min: sashMinSize2, max: sashSize1 + sashSize2 - sashMinSize1 });
375
367
  // set the new computed sash sizes
376
368
  this._zone.run(() => {
377
- sash1.flexBasis = `${computedNewSashSize1}px`;
378
- sash2.flexBasis = `${computedNewSashSize2}px`;
369
+ sash1.flexBasis = `${newSashSize1}px`;
370
+ sash2.flexBasis = `${newSashSize2}px`;
379
371
  });
380
372
  }
381
373
  onSashReset(sashIndex) {
@@ -417,23 +409,21 @@ class SciSashboxComponent {
417
409
  return value;
418
410
  }
419
411
  if (value.endsWith('%')) {
420
- const hostBounds = this._host.nativeElement.getBoundingClientRect();
412
+ const hostBounds = this._host.getBoundingClientRect();
421
413
  const hostSize = (this.isRowDirection ? hostBounds.width : hostBounds.height);
422
414
  return parseInt(value, 10) * hostSize / 100;
423
415
  }
424
416
  return parseInt(value, 10);
425
417
  }
426
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashboxComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
427
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: SciSashboxComponent, isStandalone: true, selector: "sci-sashbox", inputs: { direction: "direction" }, outputs: { sashStart: "sashStart", sashEnd: "sashEnd" }, host: { properties: { "class.sashing": "this.sashing", "class.column": "this.isColumnDirection", "class.row": "this.isRowDirection" } }, providers: [{
418
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
419
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: SciSashboxComponent, isStandalone: true, selector: "sci-sashbox", inputs: { direction: "direction" }, outputs: { sashStart: "sashStart", sashEnd: "sashEnd" }, host: { properties: { "class.sashing": "this.sashing", "style.--\u0275sci-sashbox-max-height": "this.maxHeight", "style.--\u0275sci-sashbox-max-width": "this.maxWidth", "class.column": "this.isColumnDirection", "class.row": "this.isRowDirection" } }, providers: [{
428
420
  provide: SciSashBoxAccessor,
429
421
  useFactory: provideSashBoxAccessor,
430
- }], queries: [{ propertyName: "setSashes", predicate: SciSashDirective }], ngImport: i0, template: "<ng-container *ngFor=\"let sash of sashes$ | async; index as i; first as first; last as last;\">\n <div class=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [sciSashInitializer]=\"sash\"\n [style.flex-grow]=\"sash.flexGrowNormalized$ | async\"\n [style.flex-shrink]=\"sash.flexShrink\"\n [style.flex-basis]=\"sash.flexBasis\">\n <ng-container *ngTemplateOutlet=\"sash.sashTemplate\"></ng-container>\n </div>\n\n <sci-splitter *ngIf=\"!last\"\n sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"isRowDirection ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.nativeElement, i, $event)\"\n (end)=\"onSashEnd()\"\n (reset)=\"onSashReset(i)\">\n </sci-splitter>\n</ng-container>\n", styles: ["@charset \"UTF-8\";:host{--\\275sci-sashbox-gap: var(--sci-sashbox-gap, 10px);--\\275sci-sashbox-splitter-background-color: var(--sci-sashbox-splitter-background-color, var(--sci-sashbox-splitter-bgcolor, #d2d2d2));--\\275sci-sashbox-splitter-background-color-hover: var(--sci-sashbox-splitter-background-color-hover, var(--sci-sashbox-splitter-bgcolor_hover, var(--\\275sci-sashbox-splitter-background-color)));--\\275sci-sashbox-splitter-size: var(--sci-sashbox-splitter-size, 1px);--\\275sci-sashbox-splitter-size-hover: var(--sci-sashbox-splitter-size-hover, var(--sci-sashbox-splitter-size_hover, 8px));--\\275sci-sashbox-splitter-touch-target-size: var(--sci-sashbox-splitter-touch-target-size, 15px);--\\275sci-sashbox-splitter-cross-axis-size: var(--sci-sashbox-splitter-cross-axis-size, 100%);--\\275sci-sashbox-splitter-border-radius: var(--sci-sashbox-splitter-border-radius, 0);--\\275sci-sashbox-splitter-opacity-active: var(--sci-sashbox-splitter-opacity-active, var(--sci-sashbox-splitter-opacity_active, 1));--\\275sci-sashbox-splitter-opacity-hover: var(--sci-sashbox-splitter-opacity-hover, var(--sci-sashbox-splitter-opacity_hover, .3));display:flex;align-items:stretch;box-sizing:border-box;overflow:hidden;z-index:0}:host *{box-sizing:border-box}:host.column{flex-direction:column}:host.row{flex-direction:row}:host>div.sash{overflow:hidden;display:grid;grid-auto-rows:100%;grid-auto-columns:100%}:host.row>div.sash{margin:0 var(--\\275sci-sashbox-gap)}:host.row>div.sash.first{margin-left:0}:host.row>div.sash.last{margin-right:0}:host.column>div.sash{margin:var(--\\275sci-sashbox-gap) 0}:host.column>div.sash.first{margin-top:0}:host.column>div.sash.last{margin-bottom:0}:host.sashing>div.sash{pointer-events:none}:host>sci-splitter{--sci-splitter-background-color: var(--\\275sci-sashbox-splitter-background-color);--sci-splitter-background-color-hover: var(--\\275sci-sashbox-splitter-background-color-hover);--sci-splitter-size: var(--\\275sci-sashbox-splitter-size);--sci-splitter-size-hover: var(--\\275sci-sashbox-splitter-size-hover);--sci-splitter-touch-target-size: var(--\\275sci-sashbox-splitter-touch-target-size);--sci-splitter-cross-axis-size: var(--\\275sci-sashbox-splitter-cross-axis-size);--sci-splitter-border-radius: var(--\\275sci-sashbox-splitter-border-radius);--sci-splitter-opacity-active: var(--\\275sci-sashbox-splitter-opacity-active);--sci-splitter-opacity-hover: var(--\\275sci-sashbox-splitter-opacity-hover);flex:none;z-index:1}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SciSashInitializerDirective, selector: "div[sciSashInitializer].sash", inputs: ["sciSashInitializer"] }, { kind: "component", type: SciSplitterComponent, selector: "sci-splitter", inputs: ["orientation"], outputs: ["start", "move", "end", "reset"] }, { kind: "directive", type: SciElementRefDirective, selector: "[sciElementRef]", exportAs: ["sciElementRef"] }] }); }
422
+ }], queries: [{ propertyName: "setSashes", predicate: SciSashDirective }], ngImport: i0, template: "@for (sash of sashes$ | async; track sash; let i = $index; let first = $first; let last = $last) {\n <div class=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [sciSashInitializer]=\"sash\"\n [style.flex-grow]=\"sash.flexGrowNormalized$ | async\"\n [style.flex-shrink]=\"sash.flexShrink\"\n [style.flex-basis]=\"sash.flexBasis\">\n <ng-container *ngTemplateOutlet=\"sash.sashTemplate\"/>\n </div>\n @if (!last) {\n <sci-splitter sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"isRowDirection ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.nativeElement, 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.column{flex-direction:column}:host.row{flex-direction:row}:host>div.sash{overflow:hidden;display:grid;grid-auto-rows:100%;grid-auto-columns:100%}:host.row>div.sash{margin:0 var(--sci-sashbox-gap)}:host.row>div.sash.first{margin-left:0}:host.row>div.sash.last{margin-right:0}:host.column>div.sash{margin:var(--sci-sashbox-gap) 0}:host.column>div.sash.first{margin-top:0}:host.column>div.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>div.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: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: SciSashInitializerDirective, selector: "div[sciSashInitializer].sash", inputs: ["sciSashInitializer"] }, { kind: "component", type: SciSplitterComponent, selector: "sci-splitter", inputs: ["orientation"], outputs: ["start", "move", "end", "reset"] }, { kind: "directive", type: SciElementRefDirective, selector: "[sciElementRef]", exportAs: ["sciElementRef"] }] }); }
431
423
  }
432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashboxComponent, decorators: [{
424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashboxComponent, decorators: [{
433
425
  type: Component,
434
426
  args: [{ selector: 'sci-sashbox', standalone: true, imports: [
435
- NgIf,
436
- NgFor,
437
427
  AsyncPipe,
438
428
  NgTemplateOutlet,
439
429
  SciSashInitializerDirective,
@@ -442,10 +432,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
442
432
  ], providers: [{
443
433
  provide: SciSashBoxAccessor,
444
434
  useFactory: provideSashBoxAccessor,
445
- }], template: "<ng-container *ngFor=\"let sash of sashes$ | async; index as i; first as first; last as last;\">\n <div class=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [sciSashInitializer]=\"sash\"\n [style.flex-grow]=\"sash.flexGrowNormalized$ | async\"\n [style.flex-shrink]=\"sash.flexShrink\"\n [style.flex-basis]=\"sash.flexBasis\">\n <ng-container *ngTemplateOutlet=\"sash.sashTemplate\"></ng-container>\n </div>\n\n <sci-splitter *ngIf=\"!last\"\n sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"isRowDirection ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.nativeElement, i, $event)\"\n (end)=\"onSashEnd()\"\n (reset)=\"onSashReset(i)\">\n </sci-splitter>\n</ng-container>\n", styles: ["@charset \"UTF-8\";:host{--\\275sci-sashbox-gap: var(--sci-sashbox-gap, 10px);--\\275sci-sashbox-splitter-background-color: var(--sci-sashbox-splitter-background-color, var(--sci-sashbox-splitter-bgcolor, #d2d2d2));--\\275sci-sashbox-splitter-background-color-hover: var(--sci-sashbox-splitter-background-color-hover, var(--sci-sashbox-splitter-bgcolor_hover, var(--\\275sci-sashbox-splitter-background-color)));--\\275sci-sashbox-splitter-size: var(--sci-sashbox-splitter-size, 1px);--\\275sci-sashbox-splitter-size-hover: var(--sci-sashbox-splitter-size-hover, var(--sci-sashbox-splitter-size_hover, 8px));--\\275sci-sashbox-splitter-touch-target-size: var(--sci-sashbox-splitter-touch-target-size, 15px);--\\275sci-sashbox-splitter-cross-axis-size: var(--sci-sashbox-splitter-cross-axis-size, 100%);--\\275sci-sashbox-splitter-border-radius: var(--sci-sashbox-splitter-border-radius, 0);--\\275sci-sashbox-splitter-opacity-active: var(--sci-sashbox-splitter-opacity-active, var(--sci-sashbox-splitter-opacity_active, 1));--\\275sci-sashbox-splitter-opacity-hover: var(--sci-sashbox-splitter-opacity-hover, var(--sci-sashbox-splitter-opacity_hover, .3));display:flex;align-items:stretch;box-sizing:border-box;overflow:hidden;z-index:0}:host *{box-sizing:border-box}:host.column{flex-direction:column}:host.row{flex-direction:row}:host>div.sash{overflow:hidden;display:grid;grid-auto-rows:100%;grid-auto-columns:100%}:host.row>div.sash{margin:0 var(--\\275sci-sashbox-gap)}:host.row>div.sash.first{margin-left:0}:host.row>div.sash.last{margin-right:0}:host.column>div.sash{margin:var(--\\275sci-sashbox-gap) 0}:host.column>div.sash.first{margin-top:0}:host.column>div.sash.last{margin-bottom:0}:host.sashing>div.sash{pointer-events:none}:host>sci-splitter{--sci-splitter-background-color: var(--\\275sci-sashbox-splitter-background-color);--sci-splitter-background-color-hover: var(--\\275sci-sashbox-splitter-background-color-hover);--sci-splitter-size: var(--\\275sci-sashbox-splitter-size);--sci-splitter-size-hover: var(--\\275sci-sashbox-splitter-size-hover);--sci-splitter-touch-target-size: var(--\\275sci-sashbox-splitter-touch-target-size);--sci-splitter-cross-axis-size: var(--\\275sci-sashbox-splitter-cross-axis-size);--sci-splitter-border-radius: var(--\\275sci-sashbox-splitter-border-radius);--sci-splitter-opacity-active: var(--\\275sci-sashbox-splitter-opacity-active);--sci-splitter-opacity-hover: var(--\\275sci-sashbox-splitter-opacity-hover);flex:none;z-index:1}\n"] }]
446
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { sashing: [{
435
+ }], template: "@for (sash of sashes$ | async; track sash; let i = $index; let first = $first; let last = $last) {\n <div class=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [sciSashInitializer]=\"sash\"\n [style.flex-grow]=\"sash.flexGrowNormalized$ | async\"\n [style.flex-shrink]=\"sash.flexShrink\"\n [style.flex-basis]=\"sash.flexBasis\">\n <ng-container *ngTemplateOutlet=\"sash.sashTemplate\"/>\n </div>\n @if (!last) {\n <sci-splitter sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"isRowDirection ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.nativeElement, 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.column{flex-direction:column}:host.row{flex-direction:row}:host>div.sash{overflow:hidden;display:grid;grid-auto-rows:100%;grid-auto-columns:100%}:host.row>div.sash{margin:0 var(--sci-sashbox-gap)}:host.row>div.sash.first{margin-left:0}:host.row>div.sash.last{margin-right:0}:host.column>div.sash{margin:var(--sci-sashbox-gap) 0}:host.column>div.sash.first{margin-top:0}:host.column>div.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>div.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"] }]
436
+ }], propDecorators: { sashing: [{
447
437
  type: HostBinding,
448
438
  args: ['class.sashing']
439
+ }], maxHeight: [{
440
+ type: HostBinding,
441
+ args: ['style.--ɵsci-sashbox-max-height']
442
+ }], maxWidth: [{
443
+ type: HostBinding,
444
+ args: ['style.--ɵsci-sashbox-max-width']
449
445
  }], direction: [{
450
446
  type: Input
451
447
  }], sashStart: [{
@@ -520,13 +516,13 @@ function provideSashBoxAccessor() {
520
516
  * ```
521
517
  */
522
518
  class SciSashboxModule {
523
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
524
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: SciSashboxModule, imports: [SciSashboxComponent,
519
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
520
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: SciSashboxModule, imports: [SciSashboxComponent,
525
521
  SciSashDirective], exports: [SciSashboxComponent,
526
522
  SciSashDirective] }); }
527
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashboxModule, imports: [SciSashboxComponent] }); }
523
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashboxModule, imports: [SciSashboxComponent] }); }
528
524
  }
529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSashboxModule, decorators: [{
525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSashboxModule, decorators: [{
530
526
  type: NgModule,
531
527
  args: [{
532
528
  imports: [
@@ -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/sash-initializer.directive.ts","../../../../projects/scion/components/sashbox/src/element-ref.directive.ts","../../../../projects/scion/components/sashbox/src/sashbox.component.ts","../../../../projects/scion/components/sashbox/src/sashbox.component.html","../../../../projects/scion/components/sashbox/src/sashbox.module.ts","../../../../projects/scion/components/sashbox/src/public_api.ts","../../../../projects/scion/components/sashbox/src/scion-components-sashbox.ts"],"sourcesContent":["import {SciSashDirective} from './sash.directive';\nimport {Observable} from 'rxjs';\n\n/**\n * Allows accessing the sashbox component from sashes.\n */\nexport abstract class SciSashBoxAccessor {\n\n public abstract get sashes(): SciSashDirective[];\n\n public abstract get sashes$(): Observable<SciSashDirective[]>;\n\n public abstract get direction(): 'column' | 'row';\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, Input, OnChanges, OnInit, SimpleChanges, TemplateRef} from '@angular/core';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\nimport {BehaviorSubject, merge, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\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 standalone: true,\n})\nexport class SciSashDirective implements OnInit, OnChanges {\n\n private _size: string | number = '1';\n private _flexGrow$ = new BehaviorSubject<number>(0);\n\n /**\n * Specifies the sash size, either as fixed size with an explicit unit,\n * or as a unitless proportion to distibute 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 @Input()\n public set size(size: string | number | null | undefined) {\n this._size = size ?? '1';\n }\n\n public get size(): string | number {\n return this._size;\n }\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 @Input()\n public minSize?: string | number | undefined;\n\n /**\n * @internal\n */\n public element!: HTMLElement;\n\n /**\n * @internal\n */\n public set flexGrow(flexGrow: number) {\n this._flexGrow$.next(flexGrow);\n }\n\n /**\n * @internal\n */\n public get flexGrow(): number {\n return this._flexGrow$.value;\n }\n\n /**\n * @internal\n */\n public flexShrink!: number;\n\n /**\n * @internal\n */\n public flexBasis!: string;\n\n /**\n * Normalized flex-grow proportion of this sash, which is a value >= 1.\n *\n * @internal\n */\n public flexGrowNormalized$: Observable<number>;\n\n constructor(public readonly sashTemplate: TemplateRef<void>, private _sashBoxAccessor: SciSashBoxAccessor) {\n this.flexGrowNormalized$ = this._sashBoxAccessor.sashes$\n .pipe(\n switchMap(sashes => merge(...sashes.map(sash => sash._flexGrow$))),\n map(() => this.normalizeFlexGrow(this.flexGrow)),\n );\n }\n\n public ngOnInit(): void {\n this.setFlexItemProperties();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n this.setFlexItemProperties();\n }\n\n /**\n * Returns if this sash has a fixed size, meaning that it has not the ability to grow or shrink if necessary.\n *\n * @internal\n */\n public get isFixedSize(): boolean {\n return Number.isNaN(+this.size);\n }\n\n /**\n * Returns the effective sash size as rendered in the DOM.\n *\n * @internal\n */\n public get computedSize(): number {\n // Note: Use `boundingClientRect` to get the fractional size.\n // see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth\n return this._sashBoxAccessor.direction === 'row' ? this.element.getBoundingClientRect().width : this.element.getBoundingClientRect().height;\n }\n\n /**\n * Computes and sets the flex item properties based on the modelled size.\n */\n private setFlexItemProperties(): void {\n if (this.isFixedSize) {\n // fixed-sized sash\n this.flexGrow = 0;\n this.flexShrink = 0;\n this.flexBasis = `${this.size}`;\n }\n else {\n // remaining space is distributed according to given proportion\n const proportion = +this.size;\n if (proportion < 1) {\n throw Error(`[IllegalSashSizeError] The proportion for flexible sized sashes must be >=1 [size=${this.size}]`);\n }\n\n this.flexGrow = proportion;\n this.flexShrink = 1;\n this.flexBasis = '0';\n }\n }\n\n /**\n * Computes the normalized flex-grow proportion of the given sash, which is a value >= 1.\n *\n * If the sum of all flex-grow proportions would be less than 1, then, the sashes would not fill the entire sash-box space.\n * Without normalization in place, e.g., this could happen when removing a sash.\n */\n private normalizeFlexGrow(flexGrow: number): number {\n if (flexGrow === 0) {\n return 0;\n }\n\n const sashes = this._sashBoxAccessor.sashes;\n const flexGrowSum = sashes.reduce((sum, sash) => sum + sash.flexGrow, 0);\n if (flexGrowSum === 0) {\n return 0;\n }\n return flexGrow / flexGrowSum;\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\nimport {Directive, ElementRef, Input, OnChanges, SimpleChanges} from '@angular/core';\nimport {SciSashDirective} from './sash.directive';\n\n/**\n * Initializes {SashDirective} with the target {HTMLDivElement}.\n */\n@Directive({\n selector: 'div[sciSashInitializer].sash',\n standalone: true,\n})\nexport class SciSashInitializerDirective implements OnChanges {\n\n @Input({alias: 'sciSashInitializer', required: true})\n public sash!: SciSashDirective;\n\n constructor(private _host: ElementRef<HTMLDivElement>) {\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n this.sash.element = this._host.nativeElement;\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\nimport {Directive, ElementRef} 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 standalone: true,\n})\nexport class SciElementRefDirective {\n\n public readonly nativeElement: HTMLElement;\n\n constructor(public host: ElementRef<HTMLElement>) {\n this.nativeElement = host.nativeElement;\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\nimport {Component, ContentChildren, ElementRef, EventEmitter, HostBinding, inject, Input, NgZone, OnDestroy, Output, QueryList} from '@angular/core';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\nimport {SciSplitterComponent, SplitterMoveEvent} from '@scion/components/splitter';\nimport {SciSashDirective} from './sash.directive';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\nimport {AsyncPipe, NgFor, NgIf, NgTemplateOutlet} from '@angular/common';\nimport {SciSashInitializerDirective} from './sash-initializer.directive';\nimport {SciElementRefDirective} from './element-ref.directive';\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 content children inside a <ng-template> decorated with the 'sciSash' directive.\n * A sash can have a fixed size with an explicit unit, or a unitless proportion to distibute remaining space.\n * A proportional sash has the ability to grow or shrink if necessary.\n *\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 standalone: true,\n imports: [\n NgIf,\n NgFor,\n AsyncPipe,\n NgTemplateOutlet,\n SciSashInitializerDirective,\n SciSplitterComponent,\n SciElementRefDirective,\n ],\n providers: [{\n provide: SciSashBoxAccessor,\n useFactory: provideSashBoxAccessor,\n }],\n})\nexport class SciSashboxComponent implements OnDestroy {\n\n private _destroy$ = new Subject<void>();\n\n public sashes$ = new BehaviorSubject<SciSashDirective[]>([]);\n\n @HostBinding('class.sashing')\n public sashing = false;\n\n /**\n * Specifies if to lay out sashes in a row (which is by default) or column arrangement.\n */\n @Input()\n public direction: 'column' | 'row' = 'row';\n\n /**\n * Emits when start sashing.\n */\n @Output()\n public sashStart = new EventEmitter<void>();\n\n /**\n * Emits the absolute sash sizes (px) when finished sashing.\n */\n @Output()\n public sashEnd = new EventEmitter<number[]>();\n\n /** @internal */\n @ContentChildren(SciSashDirective)\n public set setSashes(queryList: QueryList<SciSashDirective>) {\n queryList.changes\n .pipe(\n startWith(queryList),\n takeUntil(this._destroy$),\n )\n .subscribe((sashes: QueryList<SciSashDirective>) => {\n this.sashes$.next(sashes.toArray());\n });\n }\n\n constructor(private _host: ElementRef<HTMLElement>, private _zone: NgZone) {\n }\n\n public onSashStart(): void {\n this.sashing = true;\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.flexGrow = 0;\n sash.flexShrink = 0;\n sash.flexBasis = `${sash.computedSize}px`;\n }\n });\n }\n\n public onSashEnd(): void {\n this.sashing = false;\n\n // unset the flex-basis for non-fixed sashes and set the flex-grow accordingly\n const pixelToFlexGrowFactor = computePixelToFlexGrowFactor(this.sashes);\n const absoluteSashSizes = this.sashes.map(sash => sash.computedSize);\n\n this.sashes.forEach((sash, i) => {\n if (!sash.isFixedSize) {\n sash.flexGrow = pixelToFlexGrowFactor * absoluteSashSizes[i];\n sash.flexShrink = 1;\n sash.flexBasis = '0';\n }\n });\n this.sashEnd.emit(absoluteSashSizes);\n }\n\n public onSash(splitter: HTMLElement, sashIndex: number, moveEvent: SplitterMoveEvent): void {\n const distance = moveEvent.distance;\n if (distance === 0) {\n return;\n }\n\n NgZone.assertNotInAngularZone();\n\n // compute the splitter position\n const splitterRect = splitter.getBoundingClientRect();\n const splitterStart = (this.isRowDirection ? splitterRect.left : splitterRect.top);\n const splitterEnd = (this.isRowDirection ? splitterRect.left + splitterRect.width : splitterRect.top + splitterRect.height);\n\n // ignore the event if outside of the splitter's action scope\n const eventPos = moveEvent.position.clientPos;\n // i.e. the sash should not grow if moved the mouse pointer beyond the left bounds of the sash, and if now moving the mouse pointer back toward the current sash.\n if (distance > 0 && eventPos < splitterStart) {\n return;\n }\n\n // i.e. the sash should not shrink if moved the mouse pointer beyond the right bounds of the sash, and if 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.computedSize;\n const sashSize2 = sash2.computedSize;\n const maxSashSize = sashSize1 + sashSize2;\n const computedNewSashSize1 = Math.round(sashSize1 + distance);\n const computedNewSashSize2 = Math.round(sashSize2 - distance);\n\n if (sash1.minSize !== undefined && distance < 0 && computedNewSashSize1 < this.toPixel(sash1.minSize)) {\n return;\n }\n if (sash2.minSize !== undefined && distance > 0 && computedNewSashSize2 < this.toPixel(sash2.minSize)) {\n return;\n }\n\n const validNewSashSize1 = between(computedNewSashSize1, {min: 0, max: maxSashSize});\n const validNewSashSize2 = between(computedNewSashSize2, {min: 0, max: maxSashSize});\n\n // continue only if both sashes adjacent to the splitter change their size (as the event would change other sashes otherwise)\n if (validNewSashSize1 !== computedNewSashSize1) {\n return;\n }\n if (validNewSashSize2 !== computedNewSashSize2) {\n return;\n }\n\n // set the new computed sash sizes\n this._zone.run(() => {\n sash1.flexBasis = `${computedNewSashSize1}px`;\n sash2.flexBasis = `${computedNewSashSize2}px`;\n });\n }\n\n public onSashReset(sashIndex: number): void {\n const sash1 = this.sashes[sashIndex];\n const sash2 = this.sashes[sashIndex + 1];\n const equalSashSize = (sash1.computedSize + sash2.computedSize) / 2;\n const pixelToFlexGrowFactor = computePixelToFlexGrowFactor(this.sashes);\n const absoluteSashSizesAfterReset = this.sashes.map((sash, index) => {\n if (index === sashIndex || index === sashIndex + 1) {\n return equalSashSize;\n }\n return sash.computedSize;\n });\n\n [sash1, sash2].forEach(sash => {\n if (sash.isFixedSize) {\n sash.flexBasis = `${equalSashSize}px`;\n }\n else {\n sash.flexGrow = pixelToFlexGrowFactor * equalSashSize;\n }\n });\n\n this.sashStart.emit();\n this.sashEnd.emit(absoluteSashSizesAfterReset);\n }\n\n @HostBinding('class.column')\n public get isColumnDirection(): boolean {\n return this.direction === 'column';\n }\n\n @HostBinding('class.row')\n public get isRowDirection(): boolean {\n return this.direction === 'row';\n }\n\n private get sashes(): SciSashDirective[] {\n return this.sashes$.value;\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\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.nativeElement.getBoundingClientRect();\n const hostSize = (this.isRowDirection ? hostBounds.width : hostBounds.height);\n return parseInt(value, 10) * hostSize / 100;\n }\n return parseInt(value, 10);\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: 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.computedSize, 0);\n\n return proportionSum / pixelSum;\n}\n\nfunction provideSashBoxAccessor(): SciSashBoxAccessor {\n const component = inject(SciSashboxComponent);\n\n return new class implements SciSashBoxAccessor {\n\n public get direction(): 'column' | 'row' {\n return component.direction;\n }\n\n public get sashes$(): Observable<SciSashDirective[]> {\n return component.sashes$;\n }\n\n public get sashes(): SciSashDirective[] {\n return component.sashes$.value;\n }\n };\n}\n","<ng-container *ngFor=\"let sash of sashes$ | async; index as i; first as first; last as last;\">\n <div class=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [sciSashInitializer]=\"sash\"\n [style.flex-grow]=\"sash.flexGrowNormalized$ | async\"\n [style.flex-shrink]=\"sash.flexShrink\"\n [style.flex-basis]=\"sash.flexBasis\">\n <ng-container *ngTemplateOutlet=\"sash.sashTemplate\"></ng-container>\n </div>\n\n <sci-splitter *ngIf=\"!last\"\n sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"isRowDirection ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.nativeElement, i, $event)\"\n (end)=\"onSashEnd()\"\n (reset)=\"onSashReset(i)\">\n </sci-splitter>\n</ng-container>\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 {NgModule} from '@angular/core';\nimport {SciSashboxComponent} from './sashbox.component';\nimport {SciSashDirective} from './sash.directive';\n\n/**\n * Provides a sashbox component that lays out its children in a row or column arrangement and places a splitter between each child.\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@NgModule({\n imports: [\n SciSashboxComponent,\n SciSashDirective,\n ],\n exports: [\n SciSashboxComponent,\n SciSashDirective,\n ],\n})\nexport class SciSashboxModule {\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 {SciSashboxModule} from './sashbox.module';\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":["i1.SciSashBoxAccessor"],"mappings":";;;;;;;AAGA;;AAEG;MACmB,kBAAkB,CAAA;AAOvC;;ACbD;;;;;;;;AAQG;AAOH;;;;;;;;;;;;;;;;;;AAkBG;MAMU,gBAAgB,CAAA;AAK3B;;;;;;AAMG;IACH,IACW,IAAI,CAAC,IAAwC,EAAA;AACtD,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,GAAG,CAAC;KAC1B;AAED,IAAA,IAAW,IAAI,GAAA;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;AAgBD;;AAEG;IACH,IAAW,QAAQ,CAAC,QAAgB,EAAA;AAClC,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAChC;AAED;;AAEG;AACH,IAAA,IAAW,QAAQ,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;KAC9B;IAmBD,WAA4B,CAAA,YAA+B,EAAU,gBAAoC,EAAA;QAA7E,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAmB;QAAU,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAoB;QAhEjG,IAAK,CAAA,KAAA,GAAoB,GAAG,CAAC;AAC7B,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,eAAe,CAAS,CAAC,CAAC,CAAC;AAgElD,QAAA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AA,IAAW,MAAM,GAAA;AACf,YAAA,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;SAChC;KACF,CAAC;AACJ;;AE3TA;;;;;;;;AAQG;AAMH;;;;;;;;;;;;;;;;;;;;AAoBG;MAWU,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YARzB,mBAAmB;AACnB,YAAA,gBAAgB,aAGhB,mBAAmB;YACnB,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YARzB,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAQV,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAV5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA;AACF,iBAAA,CAAA;;;AC5CD;;;;;;;;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/sash-initializer.directive.ts","../../../../projects/scion/components/sashbox/src/element-ref.directive.ts","../../../../projects/scion/components/sashbox/src/sashbox.component.ts","../../../../projects/scion/components/sashbox/src/sashbox.component.html","../../../../projects/scion/components/sashbox/src/sashbox.module.ts","../../../../projects/scion/components/sashbox/src/public_api.ts","../../../../projects/scion/components/sashbox/src/scion-components-sashbox.ts"],"sourcesContent":["import {SciSashDirective} from './sash.directive';\nimport {Observable} from 'rxjs';\n\n/**\n * Allows accessing the sashbox component from sashes.\n */\nexport abstract class SciSashBoxAccessor {\n\n public abstract get sashes(): SciSashDirective[];\n\n public abstract get sashes$(): Observable<SciSashDirective[]>;\n\n public abstract get direction(): 'column' | 'row';\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, Input, OnChanges, OnInit, SimpleChanges, TemplateRef} from '@angular/core';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\nimport {BehaviorSubject, merge, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\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 standalone: true,\n})\nexport class SciSashDirective implements OnInit, OnChanges {\n\n private _size: string | number = '1';\n private _flexGrow$ = new BehaviorSubject<number>(0);\n\n /**\n * Specifies the sash size, either as fixed size with an explicit unit,\n * or as a unitless proportion to distibute 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 @Input()\n public set size(size: string | number | null | undefined) {\n this._size = size ?? '1';\n }\n\n public get size(): string | number {\n return this._size;\n }\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 @Input()\n public minSize?: string | number | undefined;\n\n /**\n * @internal\n */\n public element!: HTMLElement;\n\n /**\n * @internal\n */\n public set flexGrow(flexGrow: number) {\n this._flexGrow$.next(flexGrow);\n }\n\n /**\n * @internal\n */\n public get flexGrow(): number {\n return this._flexGrow$.value;\n }\n\n /**\n * @internal\n */\n public flexShrink!: number;\n\n /**\n * @internal\n */\n public flexBasis!: string;\n\n /**\n * Normalized flex-grow proportion of this sash, which is a value >= 1.\n *\n * @internal\n */\n public flexGrowNormalized$: Observable<number>;\n\n constructor(public readonly sashTemplate: TemplateRef<void>, private _sashBoxAccessor: SciSashBoxAccessor) {\n this.flexGrowNormalized$ = this._sashBoxAccessor.sashes$\n .pipe(\n switchMap(sashes => merge(...sashes.map(sash => sash._flexGrow$))),\n map(() => this.normalizeFlexGrow(this.flexGrow)),\n );\n }\n\n public ngOnInit(): void {\n this.setFlexItemProperties();\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n this.setFlexItemProperties();\n }\n\n /**\n * Returns if this sash has a fixed size, meaning that it has not the ability to grow or shrink if necessary.\n *\n * @internal\n */\n public get isFixedSize(): boolean {\n return Number.isNaN(+this.size);\n }\n\n /**\n * Returns the effective sash size as rendered in the DOM.\n *\n * @internal\n */\n public get computedSize(): number {\n // Note: Use `boundingClientRect` to get the fractional size.\n // see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth\n return this._sashBoxAccessor.direction === 'row' ? this.element.getBoundingClientRect().width : this.element.getBoundingClientRect().height;\n }\n\n /**\n * Computes and sets the flex item properties based on the modelled size.\n */\n private setFlexItemProperties(): void {\n if (this.isFixedSize) {\n // fixed-sized sash\n this.flexGrow = 0;\n this.flexShrink = 0;\n this.flexBasis = `${this.size}`;\n }\n else {\n // remaining space is distributed according to given proportion\n const proportion = +this.size;\n if (proportion < 1) {\n throw Error(`[IllegalSashSizeError] The proportion for flexible sized sashes must be >=1 [size=${this.size}]`);\n }\n\n this.flexGrow = proportion;\n this.flexShrink = 1;\n this.flexBasis = '0';\n }\n }\n\n /**\n * Computes the normalized flex-grow proportion of the given sash, which is a value >= 1.\n *\n * If the sum of all flex-grow proportions would be less than 1, then, the sashes would not fill the entire sash-box space.\n * Without normalization in place, e.g., this could happen when removing a sash.\n */\n private normalizeFlexGrow(flexGrow: number): number {\n if (flexGrow === 0) {\n return 0;\n }\n\n const sashes = this._sashBoxAccessor.sashes;\n const flexGrowSum = sashes.reduce((sum, sash) => sum + sash.flexGrow, 0);\n if (flexGrowSum === 0) {\n return 0;\n }\n return flexGrow / flexGrowSum;\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\nimport {Directive, ElementRef, Input, OnChanges, SimpleChanges} from '@angular/core';\nimport {SciSashDirective} from './sash.directive';\n\n/**\n * Initializes {SashDirective} with the target {HTMLDivElement}.\n */\n@Directive({\n selector: 'div[sciSashInitializer].sash',\n standalone: true,\n})\nexport class SciSashInitializerDirective implements OnChanges {\n\n @Input({alias: 'sciSashInitializer', required: true})\n public sash!: SciSashDirective;\n\n constructor(private _host: ElementRef<HTMLDivElement>) {\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n this.sash.element = this._host.nativeElement;\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\nimport {Directive, ElementRef} 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 standalone: true,\n})\nexport class SciElementRefDirective {\n\n public readonly nativeElement: HTMLElement;\n\n constructor(public host: ElementRef<HTMLElement>) {\n this.nativeElement = host.nativeElement;\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\nimport {Component, ContentChildren, ElementRef, EventEmitter, HostBinding, inject, Input, NgZone, OnDestroy, Output, QueryList} from '@angular/core';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\nimport {SciSplitterComponent, SplitterMoveEvent} from '@scion/components/splitter';\nimport {SciSashDirective} from './sash.directive';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\nimport {AsyncPipe, NgTemplateOutlet} from '@angular/common';\nimport {SciSashInitializerDirective} from './sash-initializer.directive';\nimport {SciElementRefDirective} from './element-ref.directive';\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 content children inside a <ng-template> decorated with the 'sciSash' directive.\n * A sash can have a fixed size with an explicit unit, or a unitless proportion to distibute remaining space.\n * A proportional sash has the ability to grow or shrink if necessary.\n *\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 standalone: true,\n imports: [\n AsyncPipe,\n NgTemplateOutlet,\n SciSashInitializerDirective,\n SciSplitterComponent,\n SciElementRefDirective,\n ],\n providers: [{\n provide: SciSashBoxAccessor,\n useFactory: provideSashBoxAccessor,\n }],\n})\nexport class SciSashboxComponent implements OnDestroy {\n\n private _destroy$ = new Subject<void>();\n private _host = inject(ElementRef<HTMLElement>).nativeElement;\n private _zone = inject(NgZone);\n\n public sashes$ = new BehaviorSubject<SciSashDirective[]>([]);\n\n @HostBinding('class.sashing')\n public sashing = false;\n\n @HostBinding('style.--ɵsci-sashbox-max-height')\n public maxHeight: number | undefined;\n\n @HostBinding('style.--ɵsci-sashbox-max-width')\n public maxWidth: number | undefined;\n\n /**\n * Specifies if to lay out sashes in a row (which is by default) or column arrangement.\n */\n @Input()\n public direction: 'column' | 'row' = 'row';\n\n /**\n * Emits when start sashing.\n */\n @Output()\n public sashStart = new EventEmitter<void>();\n\n /**\n * Emits the absolute sash sizes (px) when finished sashing.\n */\n @Output()\n public sashEnd = new EventEmitter<number[]>();\n\n /** @internal */\n @ContentChildren(SciSashDirective)\n public set setSashes(queryList: QueryList<SciSashDirective>) {\n queryList.changes\n .pipe(\n startWith(queryList),\n takeUntil(this._destroy$),\n )\n .subscribe((sashes: QueryList<SciSashDirective>) => {\n this.sashes$.next(sashes.toArray());\n });\n }\n\n public 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.flexGrow = 0;\n sash.flexShrink = 1;\n sash.flexBasis = `${sash.computedSize}px`;\n }\n });\n }\n\n public 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 absoluteSashSizes = this.sashes.map(sash => sash.computedSize);\n\n this.sashes.forEach((sash, i) => {\n if (!sash.isFixedSize) {\n sash.flexGrow = pixelToFlexGrowFactor * absoluteSashSizes[i];\n sash.flexShrink = 1;\n sash.flexBasis = '0';\n }\n });\n this.sashEnd.emit(absoluteSashSizes);\n }\n\n public onSash(splitter: HTMLElement, sashIndex: number, moveEvent: SplitterMoveEvent): void {\n const distance = moveEvent.distance;\n if (distance === 0) {\n return;\n }\n\n NgZone.assertNotInAngularZone();\n\n // compute the splitter position\n const splitterRect = splitter.getBoundingClientRect();\n const splitterStart = (this.isRowDirection ? splitterRect.left : splitterRect.top);\n const splitterEnd = (this.isRowDirection ? splitterRect.left + splitterRect.width : splitterRect.top + splitterRect.height);\n\n // ignore the event if outside of the splitter's action scope\n const eventPos = moveEvent.position.clientPos;\n // i.e. the sash should not grow if moved the mouse pointer beyond the left bounds of the sash, and if now moving the mouse pointer back toward the current sash.\n if (distance > 0 && eventPos < splitterStart) {\n return;\n }\n\n // i.e. the sash should not shrink if moved the mouse pointer beyond the right bounds of the sash, and if 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.computedSize;\n const sashSize2 = sash2.computedSize;\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 this._zone.run(() => {\n sash1.flexBasis = `${newSashSize1}px`;\n sash2.flexBasis = `${newSashSize2}px`;\n });\n }\n\n public onSashReset(sashIndex: number): void {\n const sash1 = this.sashes[sashIndex];\n const sash2 = this.sashes[sashIndex + 1];\n const equalSashSize = (sash1.computedSize + sash2.computedSize) / 2;\n const pixelToFlexGrowFactor = computePixelToFlexGrowFactor(this.sashes);\n const absoluteSashSizesAfterReset = this.sashes.map((sash, index) => {\n if (index === sashIndex || index === sashIndex + 1) {\n return equalSashSize;\n }\n return sash.computedSize;\n });\n\n [sash1, sash2].forEach(sash => {\n if (sash.isFixedSize) {\n sash.flexBasis = `${equalSashSize}px`;\n }\n else {\n sash.flexGrow = pixelToFlexGrowFactor * equalSashSize;\n }\n });\n\n this.sashStart.emit();\n this.sashEnd.emit(absoluteSashSizesAfterReset);\n }\n\n @HostBinding('class.column')\n public get isColumnDirection(): boolean {\n return this.direction === 'column';\n }\n\n @HostBinding('class.row')\n public get isRowDirection(): boolean {\n return this.direction === 'row';\n }\n\n private get sashes(): SciSashDirective[] {\n return this.sashes$.value;\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\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.isRowDirection ? hostBounds.width : hostBounds.height);\n return parseInt(value, 10) * hostSize / 100;\n }\n return parseInt(value, 10);\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: 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.computedSize, 0);\n\n return proportionSum / pixelSum;\n}\n\nfunction provideSashBoxAccessor(): SciSashBoxAccessor {\n const component = inject(SciSashboxComponent);\n\n return new class implements SciSashBoxAccessor {\n\n public get direction(): 'column' | 'row' {\n return component.direction;\n }\n\n public get sashes$(): Observable<SciSashDirective[]> {\n return component.sashes$;\n }\n\n public get sashes(): SciSashDirective[] {\n return component.sashes$.value;\n }\n };\n}\n","@for (sash of sashes$ | async; track sash; let i = $index; let first = $first; let last = $last) {\n <div class=\"sash\"\n [class.first]=\"first\"\n [class.last]=\"last\"\n [sciSashInitializer]=\"sash\"\n [style.flex-grow]=\"sash.flexGrowNormalized$ | async\"\n [style.flex-shrink]=\"sash.flexShrink\"\n [style.flex-basis]=\"sash.flexBasis\">\n <ng-container *ngTemplateOutlet=\"sash.sashTemplate\"/>\n </div>\n @if (!last) {\n <sci-splitter sciElementRef #sciElementRef=\"sciElementRef\"\n [orientation]=\"isRowDirection ? 'vertical' : 'horizontal'\"\n (start)=\"onSashStart()\"\n (move)=\"onSash(sciElementRef.nativeElement, 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\nimport {NgModule} from '@angular/core';\nimport {SciSashboxComponent} from './sashbox.component';\nimport {SciSashDirective} from './sash.directive';\n\n/**\n * Provides a sashbox component that lays out its children in a row or column arrangement and places a splitter between each child.\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@NgModule({\n imports: [\n SciSashboxComponent,\n SciSashDirective,\n ],\n exports: [\n SciSashboxComponent,\n SciSashDirective,\n ],\n})\nexport class SciSashboxModule {\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 {SciSashboxModule} from './sashbox.module';\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":["i1.SciSashBoxAccessor"],"mappings":";;;;;;;AAGA;;AAEG;MACmB,kBAAkB,CAAA;AAOvC;;ACbD;;;;;;;;AAQG;AAOH;;;;;;;;;;;;;;;;;;AAkBG;MAMU,gBAAgB,CAAA;AAK3B;;;;;;AAMG;IACH,IACW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,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA;AACF,iBAAA,CAAA;;;AC5CD;;;;;;;;AAQG;AAEH;;;;AAIG;;ACdH;;AAEG;;;;"}
@@ -189,12 +189,12 @@ class SciSplitterComponent {
189
189
  ngOnDestroy() {
190
190
  this._destroy$.next();
191
191
  }
192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSplitterComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
193
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", type: SciSplitterComponent, isStandalone: true, selector: "sci-splitter", inputs: { orientation: "orientation" }, 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: "touchTargetElementRef", first: true, predicate: ["touch_target"], descendants: true, static: true }], ngImport: i0, template: "<div #touch_target class=\"touch-target\">\n <div class=\"handle\"></div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--\\275sci-splitter-background-color: var(--sci-splitter-background-color, var(--sci-splitter-bgcolor, #d2d2d2));--\\275sci-splitter-background-color-hover: var(--sci-splitter-background-color-hover, var(--sci-splitter-bgcolor_hover, var(--\\275sci-splitter-background-color)));--\\275sci-splitter-size: var(--sci-splitter-size, 1px);--\\275sci-splitter-size-hover: var(--sci-splitter-size-hover, var(--sci-splitter-size_hover, 8px));--\\275sci-splitter-touch-target-size: var(--sci-splitter-touch-target-size, 15px);--\\275sci-splitter-cross-axis-size: var(--sci-splitter-cross-axis-size, 100%);--\\275sci-splitter-border-radius: var(--sci-splitter-border-radius, 0);--\\275sci-splitter-opacity-active: var(--sci-splitter-opacity-active, var(--sci-splitter-opacity_active, 1));--\\275sci-splitter-opacity-hover: var(--sci-splitter-opacity-hover, var(--sci-splitter-opacity_hover, .3));display:grid;position:relative;background-color:var(--\\275sci-splitter-background-color);border-radius:var(--\\275sci-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(--\\275sci-splitter-background-color);border-radius:var(--\\275sci-splitter-border-radius);opacity:var(--\\275sci-splitter-opacity-hover);transition-property:width,height;transition-timing-function:ease-in;transition-duration:75ms}:host.vertical{width:var(--\\275sci-splitter-size);height:var(--\\275sci-splitter-cross-axis-size)}:host.vertical>div.touch-target{width:var(--\\275sci-splitter-touch-target-size);height:100%}:host.vertical>div.touch-target>div.handle{width:var(--\\275sci-splitter-size);height:100%}:host.horizontal{height:var(--\\275sci-splitter-size);width:var(--\\275sci-splitter-cross-axis-size)}:host.horizontal>div.touch-target{width:100%;height:var(--\\275sci-splitter-touch-target-size)}:host.horizontal>div.touch-target>div.handle{width:100%;height:var(--\\275sci-splitter-size)}:host>div.touch-target:active>div.handle{opacity:var(--\\275sci-splitter-opacity-active)}:host.vertical.moving>div.touch-target>div.handle,:host.vertical>div.touch-target:hover>div.handle{background-color:var(--\\275sci-splitter-background-color-hover);width:var(--\\275sci-splitter-size-hover)}:host.horizontal.moving>div.touch-target>div.handle,:host.horizontal>div.touch-target:hover>div.handle{background-color:var(--\\275sci-splitter-background-color-hover);height:var(--\\275sci-splitter-size-hover)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
192
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSplitterComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
193
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: SciSplitterComponent, isStandalone: true, selector: "sci-splitter", inputs: { orientation: "orientation" }, 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: "touchTargetElementRef", first: true, predicate: ["touch_target"], descendants: true, static: 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 }); }
194
194
  }
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSplitterComponent, decorators: [{
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSplitterComponent, decorators: [{
196
196
  type: Component,
197
- args: [{ selector: 'sci-splitter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div #touch_target class=\"touch-target\">\n <div class=\"handle\"></div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--\\275sci-splitter-background-color: var(--sci-splitter-background-color, var(--sci-splitter-bgcolor, #d2d2d2));--\\275sci-splitter-background-color-hover: var(--sci-splitter-background-color-hover, var(--sci-splitter-bgcolor_hover, var(--\\275sci-splitter-background-color)));--\\275sci-splitter-size: var(--sci-splitter-size, 1px);--\\275sci-splitter-size-hover: var(--sci-splitter-size-hover, var(--sci-splitter-size_hover, 8px));--\\275sci-splitter-touch-target-size: var(--sci-splitter-touch-target-size, 15px);--\\275sci-splitter-cross-axis-size: var(--sci-splitter-cross-axis-size, 100%);--\\275sci-splitter-border-radius: var(--sci-splitter-border-radius, 0);--\\275sci-splitter-opacity-active: var(--sci-splitter-opacity-active, var(--sci-splitter-opacity_active, 1));--\\275sci-splitter-opacity-hover: var(--sci-splitter-opacity-hover, var(--sci-splitter-opacity_hover, .3));display:grid;position:relative;background-color:var(--\\275sci-splitter-background-color);border-radius:var(--\\275sci-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(--\\275sci-splitter-background-color);border-radius:var(--\\275sci-splitter-border-radius);opacity:var(--\\275sci-splitter-opacity-hover);transition-property:width,height;transition-timing-function:ease-in;transition-duration:75ms}:host.vertical{width:var(--\\275sci-splitter-size);height:var(--\\275sci-splitter-cross-axis-size)}:host.vertical>div.touch-target{width:var(--\\275sci-splitter-touch-target-size);height:100%}:host.vertical>div.touch-target>div.handle{width:var(--\\275sci-splitter-size);height:100%}:host.horizontal{height:var(--\\275sci-splitter-size);width:var(--\\275sci-splitter-cross-axis-size)}:host.horizontal>div.touch-target{width:100%;height:var(--\\275sci-splitter-touch-target-size)}:host.horizontal>div.touch-target>div.handle{width:100%;height:var(--\\275sci-splitter-size)}:host>div.touch-target:active>div.handle{opacity:var(--\\275sci-splitter-opacity-active)}:host.vertical.moving>div.touch-target>div.handle,:host.vertical>div.touch-target:hover>div.handle{background-color:var(--\\275sci-splitter-background-color-hover);width:var(--\\275sci-splitter-size-hover)}:host.horizontal.moving>div.touch-target>div.handle,:host.horizontal>div.touch-target:hover>div.handle{background-color:var(--\\275sci-splitter-background-color-hover);height:var(--\\275sci-splitter-size-hover)}\n"] }]
197
+ args: [{ selector: 'sci-splitter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, 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"] }]
198
198
  }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: Document, decorators: [{
199
199
  type: Inject,
200
200
  args: [DOCUMENT]
@@ -244,11 +244,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
244
244
  * ```
245
245
  */
246
246
  class SciSplitterModule {
247
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
248
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: SciSplitterModule, imports: [SciSplitterComponent], exports: [SciSplitterComponent] }); }
249
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSplitterModule }); }
247
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
248
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: SciSplitterModule, imports: [SciSplitterComponent], exports: [SciSplitterComponent] }); }
249
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSplitterModule }); }
250
250
  }
251
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SciSplitterModule, decorators: [{
251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: SciSplitterModule, decorators: [{
252
252
  type: NgModule,
253
253
  args: [{
254
254
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"scion-components-splitter.mjs","sources":["../../../../projects/scion/components/splitter/src/splitter.component.ts","../../../../projects/scion/components/splitter/src/splitter.component.html","../../../../projects/scion/components/splitter/src/splitter.module.ts","../../../../projects/scion/components/splitter/src/public_api.ts","../../../../projects/scion/components/splitter/src/scion-components-splitter.ts"],"sourcesContent":["/*\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 {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, Inject, Input, NgZone, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\nimport {fromEvent, merge, Subject} from 'rxjs';\nimport {DOCUMENT} from '@angular/common';\nimport {tapFirst} from '@scion/toolkit/operators';\nimport {first, takeUntil} from 'rxjs/operators';\n\n/**\n * Represents a splitter, a visual element that allows the user to control the size of elements next to it.\n *\n * The splitter has a handle that the user can move depending on the orientation of the splitter.\n *\n * Note that this control neither does change the size of adjacent elements nor does it (re-)position itself, but emits the distance by\n * which the user has theoretically moved the splitter. You must subscribe to these events and change your layout accordingly.\n *\n * In the toolkit, {@link SciSashboxComponent} uses this splitter to divide a layout into several resizable sections.\n * Another use case would be a resizable sidebar panel.\n *\n * ### Usage\n *\n * ```html\n * <sci-splitter (move)=\"onSplitterMove($event.distance)\"></sci-splitter>\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-splitter` component, the following CSS variables can be set directly on the component.\n *\n * - --sci-splitter-background-color: Sets the background color of the splitter.\n * - --sci-splitter-background-color-hover: Sets the background color of the splitter when hovering it.\n * - --sci-splitter-size: Sets the size of the splitter along the main axis.\n * - --sci-splitter-size-hover: Sets the size of the splitter along the main axis when hovering it.\n * - --sci-splitter-touch-target-size: Sets the touch target size to move the splitter (accessibility).\n * - --sci-splitter-cross-axis-size: Sets the splitter size along the cross axis.\n * - --sci-splitter-border-radius: Sets the border radius of the splitter.\n * - --sci-splitter-opacity-active: Sets the opacity of the splitter while the user moves the splitter.\n * - --sci-splitter-opacity-hover: Sets the opacity of the splitter when hovering it.\n *\n * Example:\n *\n * ```scss\n * sci-splitter {\n * --sci-splitter-background-color: black;\n * --sci-splitter-background-color-hover: black;\n * }\n * ```\n */\n@Component({\n selector: 'sci-splitter',\n templateUrl: './splitter.component.html',\n styleUrls: ['./splitter.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SciSplitterComponent implements OnInit, OnDestroy {\n\n private _destroy$ = new Subject<void>();\n\n /* @docs-private */\n @HostBinding('class.moving')\n public moving = false;\n\n @HostBinding('class.vertical')\n public get isVertical(): boolean {\n return !this.isHorizontal;\n }\n\n @HostBinding('class.horizontal')\n public get isHorizontal(): boolean {\n return this.orientation === 'horizontal';\n }\n\n /**\n * Controls whether to render a vertical or horizontal splitter.\n * By default, if not specified, renders a vertical splitter.\n */\n @Input()\n public orientation: 'vertical' | 'horizontal' = 'vertical';\n\n /**\n * Emits when starting to move the splitter.\n */\n @Output()\n public start = new EventEmitter<void>(); // eslint-disable-line @angular-eslint/no-output-native\n\n /**\n * Emits the distance in pixels when the splitter is moved.\n * The event is emitted outside of the Angular zone.\n */\n @Output()\n public move = new EventEmitter<SplitterMoveEvent>();\n\n /**\n * Emits when ending to move the splitter.\n */\n @Output()\n public end = new EventEmitter<void>(); // eslint-disable-line @angular-eslint/no-output-native\n\n /**\n * Emits when to reset the splitter position.\n */\n @Output()\n public reset = new EventEmitter<void>(); // eslint-disable-line @angular-eslint/no-output-native\n\n /* @docs-private */\n @HostBinding('style.cursor')\n public get splitterCursor(): string {\n return this.isVertical ? 'ew-resize' : 'ns-resize';\n }\n\n /* @docs-private */\n @ViewChild('touch_target', {static: true})\n public touchTargetElementRef!: ElementRef<HTMLElement>;\n\n constructor(private _zone: NgZone,\n private _cd: ChangeDetectorRef,\n @Inject(DOCUMENT) private _document: Document) {\n }\n\n /* @docs-private */\n public ngOnInit(): void {\n fromEvent(this.touchTargetElementRef.nativeElement, 'dblclick')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => this.onReset());\n\n fromEvent<TouchEvent>(this.touchTargetElementRef.nativeElement, 'touchstart')\n .pipe(takeUntil(this._destroy$))\n .subscribe((event: TouchEvent) => this.onTouchStart(event));\n\n fromEvent<MouseEvent>(this.touchTargetElementRef.nativeElement, 'mousedown')\n .pipe(takeUntil(this._destroy$))\n .subscribe((event: MouseEvent) => this.onMouseDown(event));\n }\n\n private onReset(): void {\n this.reset.emit();\n }\n\n private onTouchStart(startEvent: TouchEvent): void {\n this.installMoveListener({\n startEvent: startEvent,\n moveEventNames: ['touchmove'],\n endEventNames: ['touchend', 'touchcancel'],\n eventPositionFn: (touchEvent: TouchEvent): EventPosition => {\n const touch: Touch = touchEvent.touches[0];\n if (this.isVertical) {\n return {screenPos: touch.screenX, clientPos: touch.clientX, pagePos: touch.pageX};\n }\n else {\n return {screenPos: touch.screenY, clientPos: touch.clientY, pagePos: touch.pageY};\n }\n },\n },\n );\n }\n\n private onMouseDown(startEvent: MouseEvent): void {\n if (startEvent.button !== 0) {\n return;\n }\n\n this.installMoveListener({\n startEvent: startEvent,\n moveEventNames: ['mousemove', 'sci-mousemove'],\n endEventNames: ['mouseup', 'sci-mouseup'],\n eventPositionFn: (mouseEvent: MouseEvent): EventPosition => {\n if (this.isVertical) {\n return {screenPos: mouseEvent.screenX, clientPos: mouseEvent.clientX, pagePos: mouseEvent.pageX};\n }\n else {\n return {screenPos: mouseEvent.screenY, clientPos: mouseEvent.clientY, pagePos: mouseEvent.pageY};\n }\n },\n },\n );\n }\n\n private installMoveListener<EVENT extends Event>(config: {startEvent: EVENT; moveEventNames: string[]; endEventNames: string[]; eventPositionFn: (event: EVENT) => EventPosition}): void {\n const startEvent = config.startEvent;\n\n startEvent.preventDefault();\n\n this._zone.runOutsideAngular(() => {\n // install listeners on document level to allow fast dragging the splitter.\n const moveEvent$ = merge(...config.moveEventNames.map(eventName => fromEvent<EVENT>(this._document, eventName)));\n const endEvent$ = merge(...config.endEventNames.map(eventName => fromEvent<EVENT>(this._document, eventName)));\n let lastClientPos = config.eventPositionFn(startEvent).clientPos;\n\n // Apply cursor on document level to prevent flickering while moving the splitter\n const oldDocumentCursor = this._document.body.style.cursor;\n this._document.body.style.cursor = this.splitterCursor;\n\n // Listen for 'move' events until stop moving the splitter\n moveEvent$\n .pipe(\n tapFirst(() => this._zone.run(() => {\n this.moving = true;\n this.start.next();\n this._cd.markForCheck();\n })),\n takeUntil(merge(endEvent$, this._destroy$)),\n )\n .subscribe((moveEvent: EVENT) => {\n const eventPos = config.eventPositionFn(moveEvent);\n const newClientPos = eventPos.clientPos;\n const distance = newClientPos - lastClientPos;\n lastClientPos = newClientPos;\n\n NgZone.assertNotInAngularZone();\n this.move.emit({distance, position: eventPos});\n });\n\n // Listen for 'end' events; call 'stop propagation' to not close overlays\n endEvent$\n .pipe(first(), takeUntil(this._destroy$))\n .subscribe((endEvent: EVENT) => {\n endEvent.stopPropagation();\n this._document.body.style.cursor = oldDocumentCursor;\n this.moving && this._zone.run(() => {\n this.end.next();\n this.moving = false;\n this._cd.markForCheck();\n });\n });\n });\n }\n\n /* @docs-private */\n public ngOnDestroy(): void {\n this._destroy$.next();\n }\n}\n\nexport interface EventPosition {\n clientPos: number;\n pagePos: number;\n screenPos: number;\n}\n\n/**\n * Event that is emitted when moving the splitter.\n */\nexport interface SplitterMoveEvent {\n /**\n * The distance in pixels by which the user has moved the splitter since the last emission.\n */\n distance: number;\n /**\n * The position where the mouse or touch event has occurred.\n */\n position: EventPosition;\n}\n","<div #touch_target class=\"touch-target\">\n <div class=\"handle\"></div>\n</div>\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 {NgModule} from '@angular/core';\nimport {SciSplitterComponent} from './splitter.component';\n\n/**\n * Provides a splitter, a visual element that allows the user to control the size of elements next to it.\n *\n * ### Usage:\n *\n * ```html\n * <sci-splitter (move)=\"onSplitterMove($event.distance)\"></sci-splitter>\n * ```\n */\n@NgModule({\n imports: [\n SciSplitterComponent,\n ],\n exports: [\n SciSplitterComponent,\n ],\n})\nexport class SciSplitterModule {\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/splitter'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciSplitterModule} from './splitter.module';\nexport {SciSplitterComponent, SplitterMoveEvent, EventPosition} from './splitter.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;AAQG;AAQH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCG;MAQU,oBAAoB,CAAA;AAQ/B,IAAA,IACW,UAAU,GAAA;AACnB,QAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;KAC3B;AAED,IAAA,IACW,YAAY,GAAA;AACrB,QAAA,OAAO,IAAI,CAAC,WAAW,KAAK,YAAY,CAAC;KAC1C;;AAmCD,IAAA,IACW,cAAc,GAAA;QACvB,OAAO,IAAI,CAAC,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;KACpD;AAMD,IAAA,WAAA,CAAoB,KAAa,EACb,GAAsB,EACJ,SAAmB,EAAA;QAFrC,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QACb,I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AC,cAAc,CAAA;gBAOpB,qBAAqB,EAAA,CAAA;sBAD3B,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,cAAc,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC,CAAA;;;AEzH3C;;;;;;;;AAQG;AAKH;;;;;;;;AAQG;MASU,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAjB,iBAAiB,EAAA,OAAA,EAAA,CAN1B,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAGpB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAGX,iBAAiB,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;AACrB,qBAAA;AACF,iBAAA,CAAA;;;AC7BD;;;;;;;;AAQG;AAEH;;;;AAIG;;ACdH;;AAEG;;;;"}
1
+ {"version":3,"file":"scion-components-splitter.mjs","sources":["../../../../projects/scion/components/splitter/src/splitter.component.ts","../../../../projects/scion/components/splitter/src/splitter.component.html","../../../../projects/scion/components/splitter/src/splitter.module.ts","../../../../projects/scion/components/splitter/src/public_api.ts","../../../../projects/scion/components/splitter/src/scion-components-splitter.ts"],"sourcesContent":["/*\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 {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, Inject, Input, NgZone, OnDestroy, OnInit, Output, ViewChild} from '@angular/core';\nimport {fromEvent, merge, Subject} from 'rxjs';\nimport {DOCUMENT} from '@angular/common';\nimport {tapFirst} from '@scion/toolkit/operators';\nimport {first, takeUntil} from 'rxjs/operators';\n\n/**\n * Represents a splitter, a visual element that allows the user to control the size of elements next to it.\n *\n * The splitter has a handle that the user can move depending on the orientation of the splitter.\n *\n * Note that this control neither does change the size of adjacent elements nor does it (re-)position itself, but emits the distance by\n * which the user has theoretically moved the splitter. You must subscribe to these events and change your layout accordingly.\n *\n * In the toolkit, {@link SciSashboxComponent} uses this splitter to divide a layout into several resizable sections.\n * Another use case would be a resizable sidebar panel.\n *\n * ### Usage\n *\n * ```html\n * <sci-splitter (move)=\"onSplitterMove($event.distance)\"></sci-splitter>\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-splitter` component, the following CSS variables can be set directly on the component.\n *\n * - --sci-splitter-background-color: Sets the background color of the splitter.\n * - --sci-splitter-background-color-hover: Sets the background color of the splitter when hovering it.\n * - --sci-splitter-size: Sets the size of the splitter along the main axis.\n * - --sci-splitter-size-hover: Sets the size of the splitter along the main axis when hovering it.\n * - --sci-splitter-touch-target-size: Sets the touch target size to move the splitter (accessibility).\n * - --sci-splitter-cross-axis-size: Sets the splitter size along the cross axis.\n * - --sci-splitter-border-radius: Sets the border radius of the splitter.\n * - --sci-splitter-opacity-active: Sets the opacity of the splitter while the user moves the splitter.\n * - --sci-splitter-opacity-hover: Sets the opacity of the splitter when hovering it.\n *\n * Example:\n *\n * ```scss\n * sci-splitter {\n * --sci-splitter-background-color: black;\n * --sci-splitter-background-color-hover: black;\n * }\n * ```\n */\n@Component({\n selector: 'sci-splitter',\n templateUrl: './splitter.component.html',\n styleUrls: ['./splitter.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SciSplitterComponent implements OnInit, OnDestroy {\n\n private _destroy$ = new Subject<void>();\n\n /* @docs-private */\n @HostBinding('class.moving')\n public moving = false;\n\n @HostBinding('class.vertical')\n public get isVertical(): boolean {\n return !this.isHorizontal;\n }\n\n @HostBinding('class.horizontal')\n public get isHorizontal(): boolean {\n return this.orientation === 'horizontal';\n }\n\n /**\n * Controls whether to render a vertical or horizontal splitter.\n * By default, if not specified, renders a vertical splitter.\n */\n @Input()\n public orientation: 'vertical' | 'horizontal' = 'vertical';\n\n /**\n * Emits when starting to move the splitter.\n */\n @Output()\n public start = new EventEmitter<void>(); // eslint-disable-line @angular-eslint/no-output-native\n\n /**\n * Emits the distance in pixels when the splitter is moved.\n * The event is emitted outside of the Angular zone.\n */\n @Output()\n public move = new EventEmitter<SplitterMoveEvent>();\n\n /**\n * Emits when ending to move the splitter.\n */\n @Output()\n public end = new EventEmitter<void>(); // eslint-disable-line @angular-eslint/no-output-native\n\n /**\n * Emits when to reset the splitter position.\n */\n @Output()\n public reset = new EventEmitter<void>(); // eslint-disable-line @angular-eslint/no-output-native\n\n /* @docs-private */\n @HostBinding('style.cursor')\n public get splitterCursor(): string {\n return this.isVertical ? 'ew-resize' : 'ns-resize';\n }\n\n /* @docs-private */\n @ViewChild('touch_target', {static: true})\n public touchTargetElementRef!: ElementRef<HTMLElement>;\n\n constructor(private _zone: NgZone,\n private _cd: ChangeDetectorRef,\n @Inject(DOCUMENT) private _document: Document) {\n }\n\n /* @docs-private */\n public ngOnInit(): void {\n fromEvent(this.touchTargetElementRef.nativeElement, 'dblclick')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => this.onReset());\n\n fromEvent<TouchEvent>(this.touchTargetElementRef.nativeElement, 'touchstart')\n .pipe(takeUntil(this._destroy$))\n .subscribe((event: TouchEvent) => this.onTouchStart(event));\n\n fromEvent<MouseEvent>(this.touchTargetElementRef.nativeElement, 'mousedown')\n .pipe(takeUntil(this._destroy$))\n .subscribe((event: MouseEvent) => this.onMouseDown(event));\n }\n\n private onReset(): void {\n this.reset.emit();\n }\n\n private onTouchStart(startEvent: TouchEvent): void {\n this.installMoveListener({\n startEvent: startEvent,\n moveEventNames: ['touchmove'],\n endEventNames: ['touchend', 'touchcancel'],\n eventPositionFn: (touchEvent: TouchEvent): EventPosition => {\n const touch: Touch = touchEvent.touches[0];\n if (this.isVertical) {\n return {screenPos: touch.screenX, clientPos: touch.clientX, pagePos: touch.pageX};\n }\n else {\n return {screenPos: touch.screenY, clientPos: touch.clientY, pagePos: touch.pageY};\n }\n },\n },\n );\n }\n\n private onMouseDown(startEvent: MouseEvent): void {\n if (startEvent.button !== 0) {\n return;\n }\n\n this.installMoveListener({\n startEvent: startEvent,\n moveEventNames: ['mousemove', 'sci-mousemove'],\n endEventNames: ['mouseup', 'sci-mouseup'],\n eventPositionFn: (mouseEvent: MouseEvent): EventPosition => {\n if (this.isVertical) {\n return {screenPos: mouseEvent.screenX, clientPos: mouseEvent.clientX, pagePos: mouseEvent.pageX};\n }\n else {\n return {screenPos: mouseEvent.screenY, clientPos: mouseEvent.clientY, pagePos: mouseEvent.pageY};\n }\n },\n },\n );\n }\n\n private installMoveListener<EVENT extends Event>(config: {startEvent: EVENT; moveEventNames: string[]; endEventNames: string[]; eventPositionFn: (event: EVENT) => EventPosition}): void {\n const startEvent = config.startEvent;\n\n startEvent.preventDefault();\n\n this._zone.runOutsideAngular(() => {\n // install listeners on document level to allow fast dragging the splitter.\n const moveEvent$ = merge(...config.moveEventNames.map(eventName => fromEvent<EVENT>(this._document, eventName)));\n const endEvent$ = merge(...config.endEventNames.map(eventName => fromEvent<EVENT>(this._document, eventName)));\n let lastClientPos = config.eventPositionFn(startEvent).clientPos;\n\n // Apply cursor on document level to prevent flickering while moving the splitter\n const oldDocumentCursor = this._document.body.style.cursor;\n this._document.body.style.cursor = this.splitterCursor;\n\n // Listen for 'move' events until stop moving the splitter\n moveEvent$\n .pipe(\n tapFirst(() => this._zone.run(() => {\n this.moving = true;\n this.start.next();\n this._cd.markForCheck();\n })),\n takeUntil(merge(endEvent$, this._destroy$)),\n )\n .subscribe((moveEvent: EVENT) => {\n const eventPos = config.eventPositionFn(moveEvent);\n const newClientPos = eventPos.clientPos;\n const distance = newClientPos - lastClientPos;\n lastClientPos = newClientPos;\n\n NgZone.assertNotInAngularZone();\n this.move.emit({distance, position: eventPos});\n });\n\n // Listen for 'end' events; call 'stop propagation' to not close overlays\n endEvent$\n .pipe(first(), takeUntil(this._destroy$))\n .subscribe((endEvent: EVENT) => {\n endEvent.stopPropagation();\n this._document.body.style.cursor = oldDocumentCursor;\n this.moving && this._zone.run(() => {\n this.end.next();\n this.moving = false;\n this._cd.markForCheck();\n });\n });\n });\n }\n\n /* @docs-private */\n public ngOnDestroy(): void {\n this._destroy$.next();\n }\n}\n\nexport interface EventPosition {\n clientPos: number;\n pagePos: number;\n screenPos: number;\n}\n\n/**\n * Event that is emitted when moving the splitter.\n */\nexport interface SplitterMoveEvent {\n /**\n * The distance in pixels by which the user has moved the splitter since the last emission.\n */\n distance: number;\n /**\n * The position where the mouse or touch event has occurred.\n */\n position: EventPosition;\n}\n","<div #touch_target class=\"touch-target\">\n <div class=\"handle\"></div>\n</div>\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 {NgModule} from '@angular/core';\nimport {SciSplitterComponent} from './splitter.component';\n\n/**\n * Provides a splitter, a visual element that allows the user to control the size of elements next to it.\n *\n * ### Usage:\n *\n * ```html\n * <sci-splitter (move)=\"onSplitterMove($event.distance)\"></sci-splitter>\n * ```\n */\n@NgModule({\n imports: [\n SciSplitterComponent,\n ],\n exports: [\n SciSplitterComponent,\n ],\n})\nexport class SciSplitterModule {\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/splitter'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciSplitterModule} from './splitter.module';\nexport {SciSplitterComponent, SplitterMoveEvent, EventPosition} from './splitter.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;AAQG;AAQH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCG;MAQU,oBAAoB,CAAA;AAQ/B,IAAA,IACW,UAAU,GAAA;AACnB,QAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;KAC3B;AAED,IAAA,IACW,YAAY,GAAA;AACrB,QAAA,OAAO,IAAI,CAAC,WAAW,KAAK,YAAY,CAAC;KAC1C;;AAmCD,IAAA,IACW,cAAc,GAAA;QACvB,OAAO,IAAI,CAAC,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;KACpD;AAMD,IAAA,WAAA,CAAoB,KAAa,EACb,GAAsB,EACJ,SAAmB,EAAA;QAFrC,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;QACb,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QACJ,IAAS,CAAA,SAAA,GAAT,SAAS,CAAU;AA5DjD,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAQ,CAAC;;QAIjC,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;AAYtB;;;AAGG;QAEI,IAAW,CAAA,WAAA,GAA8B,UAAU,CAAC;AAE3D;;AAEG;AAEI,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;AAExC;;;AAGG;AAEI,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,YAAY,EAAqB,CAAC;AAEpD;;AAEG;AAEI,QAAA,IAAA,CAAA,GAAG,GAAG,IAAI,YAAY,EAAQ,CAAC;AAEtC;;AAEG;AAEI,QAAA,IAAA,CAAA,KA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