@scion/components 13.0.0 → 14.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +1 -23
- package/dimension/dimension.directive.d.ts +1 -1
- package/dimension/{scion-components-dimension.d.ts → index.d.ts} +0 -0
- package/esm2020/dimension/dimension.directive.mjs +3 -3
- package/esm2020/dimension/dimension.module.mjs +5 -7
- package/esm2020/sashbox/element-ref.directive.mjs +3 -3
- package/esm2020/sashbox/sash-initializer.directive.mjs +3 -3
- package/esm2020/sashbox/sash.directive.mjs +4 -4
- package/esm2020/sashbox/sashbox.component.mjs +6 -6
- package/esm2020/sashbox/sashbox.module.mjs +6 -8
- package/esm2020/splitter/splitter.component.mjs +3 -3
- package/esm2020/splitter/splitter.module.mjs +5 -7
- package/esm2020/throbber/ellipsis-throbber/ellipsis-throbber.component.mjs +3 -3
- package/esm2020/throbber/ripple-throbber/ripple-throbber.component.mjs +3 -3
- package/esm2020/throbber/roller-throbber/roller-throbber.component.mjs +3 -3
- package/esm2020/throbber/spinner-throbber/spinner-throbber.component.mjs +3 -3
- package/esm2020/throbber/throbber.component.mjs +8 -8
- package/esm2020/throbber/throbber.module.mjs +5 -7
- package/esm2020/viewport/native-scrollbar-track-size-provider.service.mjs +3 -3
- package/esm2020/viewport/scrollable.directive.mjs +3 -3
- package/esm2020/viewport/scrollbar/scrollbar.component.mjs +3 -3
- package/esm2020/viewport/viewport.component.mjs +54 -64
- package/esm2020/viewport/viewport.module.mjs +6 -8
- package/fesm2015/scion-components-dimension.mjs +7 -9
- package/fesm2015/scion-components-dimension.mjs.map +1 -1
- package/fesm2015/scion-components-sashbox.mjs +21 -23
- package/fesm2015/scion-components-sashbox.mjs.map +1 -1
- package/fesm2015/scion-components-splitter.mjs +7 -9
- package/fesm2015/scion-components-splitter.mjs.map +1 -1
- package/fesm2015/scion-components-throbber.mjs +20 -22
- package/fesm2015/scion-components-throbber.mjs.map +1 -1
- package/fesm2015/scion-components-viewport.mjs +67 -78
- package/fesm2015/scion-components-viewport.mjs.map +1 -1
- package/fesm2015/scion-components.mjs.map +1 -1
- package/fesm2020/scion-components-dimension.mjs +7 -9
- package/fesm2020/scion-components-dimension.mjs.map +1 -1
- package/fesm2020/scion-components-sashbox.mjs +21 -23
- package/fesm2020/scion-components-sashbox.mjs.map +1 -1
- package/fesm2020/scion-components-splitter.mjs +7 -9
- package/fesm2020/scion-components-splitter.mjs.map +1 -1
- package/fesm2020/scion-components-throbber.mjs +20 -22
- package/fesm2020/scion-components-throbber.mjs.map +1 -1
- package/fesm2020/scion-components-viewport.mjs +66 -78
- package/fesm2020/scion-components-viewport.mjs.map +1 -1
- package/fesm2020/scion-components.mjs.map +1 -1
- package/{scion-components.d.ts → index.d.ts} +0 -0
- package/package.json +13 -13
- package/sashbox/element-ref.directive.d.ts +1 -1
- package/sashbox/{scion-components-sashbox.d.ts → index.d.ts} +0 -0
- package/sashbox/sash-initializer.directive.d.ts +1 -1
- package/sashbox/sash.directive.d.ts +2 -2
- package/sashbox/sashbox.component.d.ts +1 -1
- package/splitter/{scion-components-splitter.d.ts → index.d.ts} +0 -0
- package/splitter/splitter.component.d.ts +1 -1
- package/throbber/ellipsis-throbber/ellipsis-throbber.component.d.ts +1 -1
- package/throbber/{scion-components-throbber.d.ts → index.d.ts} +0 -0
- package/throbber/ripple-throbber/ripple-throbber.component.d.ts +1 -1
- package/throbber/roller-throbber/roller-throbber.component.d.ts +1 -1
- package/throbber/spinner-throbber/spinner-throbber.component.d.ts +1 -1
- package/throbber/throbber.component.d.ts +1 -1
- package/viewport/_scrollbar.scss +3 -1
- package/viewport/{scion-components-viewport.d.ts → index.d.ts} +0 -0
- package/viewport/scrollable.directive.d.ts +1 -1
- package/viewport/scrollbar/scrollbar.component.d.ts +1 -1
- package/viewport/viewport.component.d.ts +26 -21
- package/_components.scss +0 -1
- package/dimension/package.json +0 -10
- package/sashbox/package.json +0 -10
- package/splitter/package.json +0 -10
- package/throbber/package.json +0 -10
- package/viewport/package.json +0 -10
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Directive, Input, EventEmitter, NgZone, forwardRef, 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
|
-
import * as i1 from '@
|
|
6
|
-
import { SciSplitterModule } from '@scion/components/splitter';
|
|
7
|
-
import * as i2 from '@angular/common';
|
|
5
|
+
import * as i1 from '@angular/common';
|
|
8
6
|
import { CommonModule } from '@angular/common';
|
|
7
|
+
import * as i2 from '@scion/components/splitter';
|
|
8
|
+
import { SciSplitterModule } from '@scion/components/splitter';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Allows accessing the sashbox component from sashes.
|
|
@@ -138,9 +138,9 @@ class SciSashDirective {
|
|
|
138
138
|
return flexGrow / flexGrowSum;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
SciSashDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
142
|
-
SciSashDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
141
|
+
SciSashDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashDirective, deps: [{ token: i0.TemplateRef }, { token: SciSashBoxAccessor }], target: i0.ɵɵFactoryTarget.Directive });
|
|
142
|
+
SciSashDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: SciSashDirective, selector: "ng-template[sciSash]", inputs: { size: "size", minSize: "minSize" }, exportAs: ["sciSash"], usesOnChanges: true, ngImport: i0 });
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashDirective, decorators: [{
|
|
144
144
|
type: Directive,
|
|
145
145
|
args: [{
|
|
146
146
|
selector: 'ng-template[sciSash]',
|
|
@@ -172,9 +172,9 @@ class SciSashInitializerDirective {
|
|
|
172
172
|
this.sash.element = this._host.nativeElement;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
|
-
SciSashInitializerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
176
|
-
SciSashInitializerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
175
|
+
SciSashInitializerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashInitializerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
176
|
+
SciSashInitializerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: SciSashInitializerDirective, selector: "div[sciSashInitializer].sash", inputs: { sash: ["sciSashInitializer", "sash"] }, usesOnChanges: true, ngImport: i0 });
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashInitializerDirective, decorators: [{
|
|
178
178
|
type: Directive,
|
|
179
179
|
args: [{ selector: 'div[sciSashInitializer].sash' }]
|
|
180
180
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { sash: [{
|
|
@@ -200,9 +200,9 @@ class SciElementRefDirective {
|
|
|
200
200
|
this.nativeElement = host.nativeElement;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
SciElementRefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
204
|
-
SciElementRefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
203
|
+
SciElementRefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciElementRefDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
204
|
+
SciElementRefDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: SciElementRefDirective, selector: "[sciElementRef]", exportAs: ["sciElementRef"], ngImport: i0 });
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciElementRefDirective, decorators: [{
|
|
206
206
|
type: Directive,
|
|
207
207
|
args: [{ selector: '[sciElementRef]', exportAs: 'sciElementRef' }]
|
|
208
208
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
@@ -417,13 +417,13 @@ class SciSashboxComponent {
|
|
|
417
417
|
return parseInt(value, 10);
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
SciSashboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
421
|
-
SciSashboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
420
|
+
SciSashboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashboxComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
421
|
+
SciSashboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SciSashboxComponent, 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: [{
|
|
422
422
|
provide: SciSashBoxAccessor,
|
|
423
423
|
useFactory: provideSashBoxAccessor,
|
|
424
424
|
deps: [forwardRef(() => SciSashboxComponent)],
|
|
425
|
-
}], 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: [":host{--sci-sashbox-gap: 10px;--sci-sashbox-splitter-bgcolor: #d2d2d2;--sci-sashbox-splitter-bgcolor_hover: var(--sci-sashbox-splitter-bgcolor);--sci-sashbox-splitter-size: 1px;--sci-sashbox-splitter-size_hover: 8px;--sci-sashbox-splitter-touch-target-size: 15px;--sci-sashbox-splitter-cross-axis-size: 100%;--sci-sashbox-splitter-border-radius: 0;--sci-sashbox-splitter-opacity_active: 1;--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(--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>div.sash{pointer-events:none}:host>sci-splitter{--sci-splitter-bgcolor: var(--sci-sashbox-splitter-bgcolor);--sci-splitter-bgcolor_hover: var(--sci-sashbox-splitter-bgcolor_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"],
|
|
426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
425
|
+
}], 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: [":host{--sci-sashbox-gap: 10px;--sci-sashbox-splitter-bgcolor: #d2d2d2;--sci-sashbox-splitter-bgcolor_hover: var(--sci-sashbox-splitter-bgcolor);--sci-sashbox-splitter-size: 1px;--sci-sashbox-splitter-size_hover: 8px;--sci-sashbox-splitter-touch-target-size: 15px;--sci-sashbox-splitter-cross-axis-size: 100%;--sci-sashbox-splitter-border-radius: 0;--sci-sashbox-splitter-opacity_active: 1;--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(--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>div.sash{pointer-events:none}:host>sci-splitter{--sci-splitter-bgcolor: var(--sci-sashbox-splitter-bgcolor);--sci-splitter-bgcolor_hover: var(--sci-sashbox-splitter-bgcolor_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: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.SciSplitterComponent, selector: "sci-splitter", inputs: ["orientation"], outputs: ["start", "move", "end", "reset"] }, { kind: "directive", type: SciSashInitializerDirective, selector: "div[sciSashInitializer].sash", inputs: ["sciSashInitializer"] }, { kind: "directive", type: SciElementRefDirective, selector: "[sciElementRef]", exportAs: ["sciElementRef"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashboxComponent, decorators: [{
|
|
427
427
|
type: Component,
|
|
428
428
|
args: [{ selector: 'sci-sashbox', providers: [{
|
|
429
429
|
provide: SciSashBoxAccessor,
|
|
@@ -507,18 +507,16 @@ function provideSashBoxAccessor(component) {
|
|
|
507
507
|
*/
|
|
508
508
|
class SciSashboxModule {
|
|
509
509
|
}
|
|
510
|
-
SciSashboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
511
|
-
SciSashboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
510
|
+
SciSashboxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
511
|
+
SciSashboxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SciSashboxModule, declarations: [SciSashboxComponent,
|
|
512
512
|
SciSashDirective,
|
|
513
513
|
SciSashInitializerDirective,
|
|
514
514
|
SciElementRefDirective], imports: [CommonModule,
|
|
515
515
|
SciSplitterModule], exports: [SciSashboxComponent,
|
|
516
516
|
SciSashDirective] });
|
|
517
|
-
SciSashboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
]] });
|
|
521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciSashboxModule, decorators: [{
|
|
517
|
+
SciSashboxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashboxModule, imports: [CommonModule,
|
|
518
|
+
SciSplitterModule] });
|
|
519
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSashboxModule, decorators: [{
|
|
522
520
|
type: NgModule,
|
|
523
521
|
args: [{
|
|
524
522
|
declarations: [
|
|
@@ -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})\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) {\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;\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({selector: 'div[sciSashInitializer].sash'})\nexport class SciSashInitializerDirective implements OnChanges {\n\n @Input('sciSashInitializer') // eslint-disable-line @angular-eslint/no-input-rename\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({selector: '[sciElementRef]', exportAs: 'sciElementRef'})\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, forwardRef, HostBinding, Input, NgZone, OnDestroy, Output, QueryList} from '@angular/core';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\nimport {SplitterMoveEvent} from '@scion/components/splitter';\nimport {SciSashDirective} from './sash.directive';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\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 * ### Theme override:\n * The default style of the sashbox is made up of shades of gray.\n * You can control the appearance by overriding the following CSS variables:\n *\n * - --sci-sashbox-gap: Sets the gaps (gutters) between sashes.\n * - --sci-sashbox-splitter-bgcolor: Sets the background color of the splitter.\n * - --sci-sashbox-splitter-bgcolor_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-bgcolor: black;\n * --sci-sashbox-splitter-bgcolor_hover: black;\n * }\n * ```\n */\n@Component({\n selector: 'sci-sashbox',\n templateUrl: './sashbox.component.html',\n styleUrls: ['./sashbox.component.scss'],\n providers: [{\n provide: SciSashBoxAccessor,\n useFactory: provideSashBoxAccessor,\n deps: [forwardRef(() => SciSashboxComponent)],\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\nexport function provideSashBoxAccessor(component: SciSashboxComponent): SciSashBoxAccessor {\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 {CommonModule} from '@angular/common';\nimport {SciSashboxComponent} from './sashbox.component';\nimport {SciSashDirective} from './sash.directive';\nimport {SciSashInitializerDirective} from './sash-initializer.directive';\nimport {SciSplitterModule} from '@scion/components/splitter';\nimport {SciElementRefDirective} from './element-ref.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 declarations: [\n SciSashboxComponent,\n SciSashDirective,\n SciSashInitializerDirective,\n SciElementRefDirective,\n ],\n imports: [\n CommonModule,\n SciSplitterModule,\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 * from './sashbox.component';\nexport * from './sash.directive';\nexport * from './sashbox.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;MAGsB,kBAAkB;;;ACNxC;;;;;;;;;AAeA;;;;;;;;;;;;;;;;;;;MAuBa,gBAAgB;IAkE3B,YAA4B,YAA+B,EAAU,gBAAoC;QAA7E,iBAAY,GAAZ,YAAY,CAAmB;QAAU,qBAAgB,GAAhB,gBAAgB,CAAoB;QAhEjG,UAAK,GAAoB,GAAG,CAAC;QAC7B,eAAU,GAAG,IAAI,eAAe,CAAS,CAAC,CAAC,CAAC;QAgElD,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO;aACrD,IAAI,CACH,SAAS,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAClE,GAAG,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CACjD,CAAC;KACL;;;;;;;;IA5DD,IACW,IAAI,CAAC,IAAqB;QACnC,IAAI,CAAC,KAAK,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,GAAG,CAAC;KAC1B;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;KACnB;;;;IAmBD,IAAW,QAAQ,CAAC,QAAgB;QAClC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAChC;;;;IAKD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;KAC9B;IA2BM,QAAQ;QACb,IAAI,CAAC,qBAAqB,EAAE,CAAC;KAC9B;IAEM,WAAW,CAAC,OAAsB;QACvC,IAAI,CAAC,qBAAqB,EAAE,CAA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GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACvF,MAAM,QAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAElF,OAAO,aAAa,GAAG,QAAQ,CAAC;AAClC,CAAC;SAEe,sBAAsB,CAAC,SAA8B;IACnE,OAAO,IAAI;QAET,IAAW,SAAS;YAClB,OAAO,SAAS,CAAC,SAAS,CAAC;SAC5B;QAED,IAAW,OAAO;YAChB,OAAO,SAAS,CAAC,OAAO,CAAC;SAC1B;QAED,IAAW,MAAM;YACf,OAAO,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC;SAChC;KACF,CAAC;AACJ;;AE5SA;;;;;;;;;AAkBA;;;;;;;;;;;;;;;;;;;;;MAqCa,gBAAgB;;6GAAhB,gBAAgB;8GAAhB,gBAAgB,iBAdzB,mBAAmB;QACnB,gBAAgB;QAChB,2BAA2B;QAC3B,sBAAsB,aAGtB,YAAY;QACZ,iBAAiB,aAGjB,mBAAmB;QACnB,gBAAgB;8GAGP,gBAAgB,YATlB;YACP,YAAY;YACZ,iBAAiB;SAClB;2FAMU,gBAAgB;kBAhB5B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,gBAAgB;wBAChB,2BAA2B;wBAC3B,sBAAsB;qBACvB;oBACD,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;qBAClB;oBACD,OAAO,EAAE;wBACP,mBAAmB;wBACnB,gBAAgB;qBACjB;iBACF;;;ACtDD;;;;;;;;;;ACAA;;;;;;"}
|
|
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})\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;\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({selector: 'div[sciSashInitializer].sash'})\nexport class SciSashInitializerDirective implements OnChanges {\n\n @Input('sciSashInitializer') // eslint-disable-line @angular-eslint/no-input-rename\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({selector: '[sciElementRef]', exportAs: 'sciElementRef'})\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, forwardRef, HostBinding, Input, NgZone, OnDestroy, Output, QueryList} from '@angular/core';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\nimport {SplitterMoveEvent} from '@scion/components/splitter';\nimport {SciSashDirective} from './sash.directive';\nimport {SciSashBoxAccessor} from './sashbox-accessor';\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 * ### Theme override:\n * The default style of the sashbox is made up of shades of gray.\n * You can control the appearance by overriding the following CSS variables:\n *\n * - --sci-sashbox-gap: Sets the gaps (gutters) between sashes.\n * - --sci-sashbox-splitter-bgcolor: Sets the background color of the splitter.\n * - --sci-sashbox-splitter-bgcolor_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-bgcolor: black;\n * --sci-sashbox-splitter-bgcolor_hover: black;\n * }\n * ```\n */\n@Component({\n selector: 'sci-sashbox',\n templateUrl: './sashbox.component.html',\n styleUrls: ['./sashbox.component.scss'],\n providers: [{\n provide: SciSashBoxAccessor,\n useFactory: provideSashBoxAccessor,\n deps: [forwardRef(() => SciSashboxComponent)],\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\nexport function provideSashBoxAccessor(component: SciSashboxComponent): SciSashBoxAccessor {\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 {CommonModule} from '@angular/common';\nimport {SciSashboxComponent} from './sashbox.component';\nimport {SciSashDirective} from './sash.directive';\nimport {SciSashInitializerDirective} from './sash-initializer.directive';\nimport {SciSplitterModule} from '@scion/components/splitter';\nimport {SciElementRefDirective} from './element-ref.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 declarations: [\n SciSashboxComponent,\n SciSashDirective,\n SciSashInitializerDirective,\n SciElementRefDirective,\n ],\n imports: [\n CommonModule,\n SciSplitterModule,\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 * from './sashbox.component';\nexport * from './sash.directive';\nexport * from './sashbox.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.SciSashBoxAccessor","i3.SciSashInitializerDirective","i4.SciElementRefDirective"],"mappings":";;;;;;;;;AAGA;;AAEG;MACmB,kBAAkB,CAAA;AAOvC;;ACbD;;;;;;;;AAQG;AAOH;;;;;;;;;;;;;;;;;;AAkBG;MAKU,gBAAgB,CAAA;IAkE3B,WAA4B,CAAA,YAA+B,EAAU,gBAAoC,EAAA;AAA7E,QAAA,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AAgB,CAAA,EAAA,CAAA,CAAA;AAGP,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YARzB,YAAY;QACZ,iBAAiB,CAAA,EAAA,CAAA,CAAA;2FAOR,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAhB5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,mBAAmB;wBACnB,gBAAgB;wBAChB,2BAA2B;wBAC3B,sBAAsB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,mBAAmB;wBACnB,gBAAgB;AACjB,qBAAA;iBACF,CAAA;;;ACtDD;;;;;;;;AAQG;;ACRH;;AAEG;;;;"}
|
|
@@ -191,9 +191,9 @@ class SciSplitterComponent {
|
|
|
191
191
|
this._destroy$.next();
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
SciSplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
195
|
-
SciSplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
194
|
+
SciSplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSplitterComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
195
|
+
SciSplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SciSplitterComponent, 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{--sci-splitter-bgcolor: #d2d2d2;--sci-splitter-bgcolor_hover: var(--sci-splitter-bgcolor);--sci-splitter-size: 1px;--sci-splitter-size_hover: 8px;--sci-splitter-touch-target-size: 15px;--sci-splitter-cross-axis-size: 100%;--sci-splitter-border-radius: 0;--sci-splitter-opacity_active: 1;--sci-splitter-opacity_hover: .3;display:grid;position:relative;background-color:var(--sci-splitter-bgcolor);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-bgcolor);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-bgcolor_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-bgcolor_hover);height:var(--sci-splitter-size_hover)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSplitterComponent, decorators: [{
|
|
197
197
|
type: Component,
|
|
198
198
|
args: [{ selector: 'sci-splitter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #touch_target class=\"touch-target\">\n <div class=\"handle\"></div>\n</div>\n", styles: [":host{--sci-splitter-bgcolor: #d2d2d2;--sci-splitter-bgcolor_hover: var(--sci-splitter-bgcolor);--sci-splitter-size: 1px;--sci-splitter-size_hover: 8px;--sci-splitter-touch-target-size: 15px;--sci-splitter-cross-axis-size: 100%;--sci-splitter-border-radius: 0;--sci-splitter-opacity_active: 1;--sci-splitter-opacity_hover: .3;display:grid;position:relative;background-color:var(--sci-splitter-bgcolor);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-bgcolor);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-bgcolor_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-bgcolor_hover);height:var(--sci-splitter-size_hover)}\n"] }]
|
|
199
199
|
}], ctorParameters: function () {
|
|
@@ -248,12 +248,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
248
248
|
*/
|
|
249
249
|
class SciSplitterModule {
|
|
250
250
|
}
|
|
251
|
-
SciSplitterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
252
|
-
SciSplitterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
253
|
-
SciSplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
254
|
-
|
|
255
|
-
]] });
|
|
256
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciSplitterModule, decorators: [{
|
|
251
|
+
SciSplitterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
252
|
+
SciSplitterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SciSplitterModule, declarations: [SciSplitterComponent], imports: [CommonModule], exports: [SciSplitterComponent] });
|
|
253
|
+
SciSplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSplitterModule, imports: [CommonModule] });
|
|
254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSplitterModule, decorators: [{
|
|
257
255
|
type: NgModule,
|
|
258
256
|
args: [{
|
|
259
257
|
declarations: [
|
|
@@ -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 * ### Theme override:\n * The default style of the splitter is made up of shades of gray.\n * You can control the appearance by overriding the following CSS variables:\n *\n * - --sci-splitter-bgcolor: Sets the background color of the splitter.\n * - --sci-splitter-bgcolor_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-bgcolor: black;\n * --sci-splitter-bgcolor_hover: black;\n * }\n * ```\n *\n * @dynamic ignore 'strictMetadataEmit' errors due to the usage of {@link Document} as ambient type for DI.\n */\n@Component({\n selector: 'sci-splitter',\n templateUrl: './splitter.component.html',\n styleUrls: ['./splitter.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\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 {CommonModule} from '@angular/common';\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 declarations: [\n SciSplitterComponent,\n ],\n imports: [\n CommonModule,\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 * from './splitter.component';\nexport * from './splitter.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgDa,oBAAoB;IA4D/B,YAAoB,KAAa,EACb,GAAsB,EACJ,SAAmB;QAFrC,UAAK,GAAL,KAAK,CAAQ;QACb,QAAG,GAAH,GAAG,CAAmB;QACJ,cAAS,GAAT,SAAS,CAAU;QA5DjD,cAAS,GAAG,IAAI,OAAO,EAAQ,CAAC;;QAIjC,WAAM,GAAG,KAAK,CAAC;;;;;QAiBf,gBAAW,GAA8B,UAAU,CAAC;;;;QAMpD,UAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;;;;;QAOjC,SAAI,GAAG,IAAI,YAAY,EAAqB,CAAC;;;;QAM7C,QAAG,GAAG,IAAI,YAAY,EAAQ,CAAC;;;;QAM/B,UAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;KAevC;IAvDD,IACW,UAAU;QACnB,OAAO,CAAC,IAAI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X7B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,oBAAoB;qBACrB;oBACD,OAAO,EAAE;wBACP,YAAY;qBACb;oBACD,OAAO,EAAE;wBACP,oBAAoB;qBACrB;iBACF;;;ACjCD;;;;;;;;;;ACAA;;;;;;"}
|
|
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 * ### Theme override:\n * The default style of the splitter is made up of shades of gray.\n * You can control the appearance by overriding the following CSS variables:\n *\n * - --sci-splitter-bgcolor: Sets the background color of the splitter.\n * - --sci-splitter-bgcolor_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-bgcolor: black;\n * --sci-splitter-bgcolor_hover: black;\n * }\n * ```\n *\n * @dynamic ignore 'strictMetadataEmit' errors due to the usage of {@link Document} as ambient type for DI.\n */\n@Component({\n selector: 'sci-splitter',\n templateUrl: './splitter.component.html',\n styleUrls: ['./splitter.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\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 {CommonModule} from '@angular/common';\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 declarations: [\n SciSplitterComponent,\n ],\n imports: [\n CommonModule,\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 * from './splitter.component';\nexport * from './splitter.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;AAQG;AAQH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCG;MAOU,oBAAoB,CAAA;AA4D/B,IAAA,WAAA,CAAoB,KAAa,EACb,GAAsB,EACJ,SAAmB,EAAA;AAFrC,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAQ;AACb,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AACJ,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAA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|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
|
-
import * as
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
|
|
6
6
|
/*
|
|
@@ -19,9 +19,9 @@ import { CommonModule } from '@angular/common';
|
|
|
19
19
|
*/
|
|
20
20
|
class SciEllipsisThrobberComponent {
|
|
21
21
|
}
|
|
22
|
-
SciEllipsisThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
23
|
-
SciEllipsisThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
22
|
+
SciEllipsisThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciEllipsisThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
SciEllipsisThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SciEllipsisThrobberComponent, selector: "sci-ellipsis-throbber", ngImport: i0, template: "<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n", styles: [":host{display:inline-flex;justify-content:space-between;font-size:var(--sci-throbber-size);width:1em;box-sizing:border-box}:host>div.point{flex:none;border-radius:50%;width:.3em;height:.3em;animation:sci-ellipsis-throbber var(--sci-throbber-duration) ease-in-out infinite;background-color:var(--sci-throbber-color)}:host>div.point:nth-child(1){animation-delay:calc(var(--sci-throbber-duration) / -6)}:host>div.point:nth-child(2){animation-delay:calc(var(--sci-throbber-duration) / -12)}@keyframes sci-ellipsis-throbber{0%{transform:scale(0)}40%{transform:scale(1)}80%,to{transform:scale(0)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciEllipsisThrobberComponent, decorators: [{
|
|
25
25
|
type: Component,
|
|
26
26
|
args: [{ selector: 'sci-ellipsis-throbber', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n", styles: [":host{display:inline-flex;justify-content:space-between;font-size:var(--sci-throbber-size);width:1em;box-sizing:border-box}:host>div.point{flex:none;border-radius:50%;width:.3em;height:.3em;animation:sci-ellipsis-throbber var(--sci-throbber-duration) ease-in-out infinite;background-color:var(--sci-throbber-color)}:host>div.point:nth-child(1){animation-delay:calc(var(--sci-throbber-duration) / -6)}:host>div.point:nth-child(2){animation-delay:calc(var(--sci-throbber-duration) / -12)}@keyframes sci-ellipsis-throbber{0%{transform:scale(0)}40%{transform:scale(1)}80%,to{transform:scale(0)}}\n"] }]
|
|
27
27
|
}] });
|
|
@@ -42,9 +42,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
42
42
|
*/
|
|
43
43
|
class SciRippleThrobberComponent {
|
|
44
44
|
}
|
|
45
|
-
SciRippleThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
46
|
-
SciRippleThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
SciRippleThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciRippleThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
SciRippleThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SciRippleThrobberComponent, selector: "sci-ripple-throbber", ngImport: i0, template: "<div class=\"circle\"></div>\n<div class=\"circle\"></div>\n", styles: [":host{display:inline-block;position:relative;font-size:var(--sci-throbber-size);width:1em;height:1em;box-sizing:border-box}:host>div.circle{position:absolute;width:1em;height:1em;border-radius:50%;border:0 solid var(--sci-throbber-color);animation:sci-ripple-throbber var(--sci-throbber-duration) cubic-bezier(0,.2,.8,1) infinite}:host>div.circle:nth-child(1){animation-delay:calc(var(--sci-throbber-duration) / -2)}@keyframes sci-ripple-throbber{0%{transform:scale(0);opacity:0;border-width:0}25%{opacity:1;border-width:.1em}50%{opacity:.75}to{transform:scale(1);opacity:0;border-width:.05em}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciRippleThrobberComponent, decorators: [{
|
|
48
48
|
type: Component,
|
|
49
49
|
args: [{ selector: 'sci-ripple-throbber', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"circle\"></div>\n<div class=\"circle\"></div>\n", styles: [":host{display:inline-block;position:relative;font-size:var(--sci-throbber-size);width:1em;height:1em;box-sizing:border-box}:host>div.circle{position:absolute;width:1em;height:1em;border-radius:50%;border:0 solid var(--sci-throbber-color);animation:sci-ripple-throbber var(--sci-throbber-duration) cubic-bezier(0,.2,.8,1) infinite}:host>div.circle:nth-child(1){animation-delay:calc(var(--sci-throbber-duration) / -2)}@keyframes sci-ripple-throbber{0%{transform:scale(0);opacity:0;border-width:0}25%{opacity:1;border-width:.1em}50%{opacity:.75}to{transform:scale(1);opacity:0;border-width:.05em}}\n"] }]
|
|
50
50
|
}] });
|
|
@@ -65,9 +65,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
65
65
|
*/
|
|
66
66
|
class SciRollerThrobberComponent {
|
|
67
67
|
}
|
|
68
|
-
SciRollerThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
69
|
-
SciRollerThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
68
|
+
SciRollerThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciRollerThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
+
SciRollerThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SciRollerThrobberComponent, selector: "sci-roller-throbber", ngImport: i0, template: "<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>", styles: [":host{display:inline-flex;justify-content:center;position:relative;font-size:var(--sci-throbber-size);width:1em;height:1em;box-sizing:border-box}:host>div.point{flex:none;position:absolute;transform-origin:.05em .5em;width:.1em;height:.1em;border-radius:50%;background-color:var(--sci-throbber-color)}:host>div.point:nth-child(1){animation:sci-roller-throbber-1 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.02)}@keyframes sci-roller-throbber-1{0%{transform:rotate(-105deg)}to{transform:rotate(255deg)}}:host>div.point:nth-child(2){animation:sci-roller-throbber-2 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.04)}@keyframes sci-roller-throbber-2{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}:host>div.point:nth-child(3){animation:sci-roller-throbber-3 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.06)}@keyframes sci-roller-throbber-3{0%{transform:rotate(-75deg)}to{transform:rotate(285deg)}}:host>div.point:nth-child(4){animation:sci-roller-throbber-4 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.08)}@keyframes sci-roller-throbber-4{0%{transform:rotate(-60deg)}to{transform:rotate(300deg)}}:host>div.point:nth-child(5){animation:sci-roller-throbber-5 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.1)}@keyframes sci-roller-throbber-5{0%{transform:rotate(-45deg)}to{transform:rotate(315deg)}}:host>div.point:nth-child(6){animation:sci-roller-throbber-6 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.12)}@keyframes sci-roller-throbber-6{0%{transform:rotate(-30deg)}to{transform:rotate(330deg)}}:host>div.point:nth-child(7){animation:sci-roller-throbber-7 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.14)}@keyframes sci-roller-throbber-7{0%{transform:rotate(-15deg)}to{transform:rotate(345deg)}}:host>div.point:nth-child(8){animation:sci-roller-throbber-8 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.16)}@keyframes sci-roller-throbber-8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciRollerThrobberComponent, decorators: [{
|
|
71
71
|
type: Component,
|
|
72
72
|
args: [{ selector: 'sci-roller-throbber', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></div>", styles: [":host{display:inline-flex;justify-content:center;position:relative;font-size:var(--sci-throbber-size);width:1em;height:1em;box-sizing:border-box}:host>div.point{flex:none;position:absolute;transform-origin:.05em .5em;width:.1em;height:.1em;border-radius:50%;background-color:var(--sci-throbber-color)}:host>div.point:nth-child(1){animation:sci-roller-throbber-1 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.02)}@keyframes sci-roller-throbber-1{0%{transform:rotate(-105deg)}to{transform:rotate(255deg)}}:host>div.point:nth-child(2){animation:sci-roller-throbber-2 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.04)}@keyframes sci-roller-throbber-2{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}:host>div.point:nth-child(3){animation:sci-roller-throbber-3 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.06)}@keyframes sci-roller-throbber-3{0%{transform:rotate(-75deg)}to{transform:rotate(285deg)}}:host>div.point:nth-child(4){animation:sci-roller-throbber-4 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.08)}@keyframes sci-roller-throbber-4{0%{transform:rotate(-60deg)}to{transform:rotate(300deg)}}:host>div.point:nth-child(5){animation:sci-roller-throbber-5 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.1)}@keyframes sci-roller-throbber-5{0%{transform:rotate(-45deg)}to{transform:rotate(315deg)}}:host>div.point:nth-child(6){animation:sci-roller-throbber-6 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.12)}@keyframes sci-roller-throbber-6{0%{transform:rotate(-30deg)}to{transform:rotate(330deg)}}:host>div.point:nth-child(7){animation:sci-roller-throbber-7 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.14)}@keyframes sci-roller-throbber-7{0%{transform:rotate(-15deg)}to{transform:rotate(345deg)}}:host>div.point:nth-child(8){animation:sci-roller-throbber-8 var(--sci-throbber-duration) cubic-bezier(.5,0,.5,1) infinite;animation-delay:calc(var(--sci-throbber-duration) * -.16)}@keyframes sci-roller-throbber-8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
73
73
|
}] });
|
|
@@ -89,9 +89,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
89
89
|
*/
|
|
90
90
|
class SciSpinnerThrobberComponent {
|
|
91
91
|
}
|
|
92
|
-
SciSpinnerThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
93
|
-
SciSpinnerThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
92
|
+
SciSpinnerThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSpinnerThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
93
|
+
SciSpinnerThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SciSpinnerThrobberComponent, selector: "sci-spinner-throbber", ngImport: i0, template: "<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>", styles: [":host{display:inline-flex;justify-content:center;position:relative;font-size:var(--sci-throbber-size);width:1em;height:1em;box-sizing:border-box}:host>div.stroke{flex:none;position:absolute;transform-origin:.0375em .5em;width:.075em;height:.25em;opacity:0;border-radius:20%;background-color:var(--sci-throbber-color);animation:sci-spinner-throbber var(--sci-throbber-duration) linear infinite}:host>div.stroke:nth-child(1){transform:rotate(0);animation-delay:calc(var(--sci-throbber-duration) * .0833333333)}:host>div.stroke:nth-child(2){transform:rotate(30deg);animation-delay:calc(var(--sci-throbber-duration) * .1666666667)}:host>div.stroke:nth-child(3){transform:rotate(60deg);animation-delay:calc(var(--sci-throbber-duration) * .25)}:host>div.stroke:nth-child(4){transform:rotate(90deg);animation-delay:calc(var(--sci-throbber-duration) * .3333333333)}:host>div.stroke:nth-child(5){transform:rotate(120deg);animation-delay:calc(var(--sci-throbber-duration) * .4166666667)}:host>div.stroke:nth-child(6){transform:rotate(150deg);animation-delay:calc(var(--sci-throbber-duration) * .5)}:host>div.stroke:nth-child(7){transform:rotate(180deg);animation-delay:calc(var(--sci-throbber-duration) * .5833333333)}:host>div.stroke:nth-child(8){transform:rotate(210deg);animation-delay:calc(var(--sci-throbber-duration) * .6666666667)}:host>div.stroke:nth-child(9){transform:rotate(240deg);animation-delay:calc(var(--sci-throbber-duration) * .75)}:host>div.stroke:nth-child(10){transform:rotate(270deg);animation-delay:calc(var(--sci-throbber-duration) * .8333333333)}:host>div.stroke:nth-child(11){transform:rotate(300deg);animation-delay:calc(var(--sci-throbber-duration) * .9166666667)}:host>div.stroke:nth-child(12){transform:rotate(330deg);animation-delay:calc(var(--sci-throbber-duration) * 1)}@keyframes sci-spinner-throbber{0%{opacity:1}to{opacity:0}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciSpinnerThrobberComponent, decorators: [{
|
|
95
95
|
type: Component,
|
|
96
96
|
args: [{ selector: 'sci-spinner-throbber', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>\n<div class=\"stroke\"></div>", styles: [":host{display:inline-flex;justify-content:center;position:relative;font-size:var(--sci-throbber-size);width:1em;height:1em;box-sizing:border-box}:host>div.stroke{flex:none;position:absolute;transform-origin:.0375em .5em;width:.075em;height:.25em;opacity:0;border-radius:20%;background-color:var(--sci-throbber-color);animation:sci-spinner-throbber var(--sci-throbber-duration) linear infinite}:host>div.stroke:nth-child(1){transform:rotate(0);animation-delay:calc(var(--sci-throbber-duration) * .0833333333)}:host>div.stroke:nth-child(2){transform:rotate(30deg);animation-delay:calc(var(--sci-throbber-duration) * .1666666667)}:host>div.stroke:nth-child(3){transform:rotate(60deg);animation-delay:calc(var(--sci-throbber-duration) * .25)}:host>div.stroke:nth-child(4){transform:rotate(90deg);animation-delay:calc(var(--sci-throbber-duration) * .3333333333)}:host>div.stroke:nth-child(5){transform:rotate(120deg);animation-delay:calc(var(--sci-throbber-duration) * .4166666667)}:host>div.stroke:nth-child(6){transform:rotate(150deg);animation-delay:calc(var(--sci-throbber-duration) * .5)}:host>div.stroke:nth-child(7){transform:rotate(180deg);animation-delay:calc(var(--sci-throbber-duration) * .5833333333)}:host>div.stroke:nth-child(8){transform:rotate(210deg);animation-delay:calc(var(--sci-throbber-duration) * .6666666667)}:host>div.stroke:nth-child(9){transform:rotate(240deg);animation-delay:calc(var(--sci-throbber-duration) * .75)}:host>div.stroke:nth-child(10){transform:rotate(270deg);animation-delay:calc(var(--sci-throbber-duration) * .8333333333)}:host>div.stroke:nth-child(11){transform:rotate(300deg);animation-delay:calc(var(--sci-throbber-duration) * .9166666667)}:host>div.stroke:nth-child(12){transform:rotate(330deg);animation-delay:calc(var(--sci-throbber-duration) * 1)}@keyframes sci-spinner-throbber{0%{opacity:1}to{opacity:0}}\n"] }]
|
|
97
97
|
}] });
|
|
@@ -147,9 +147,9 @@ class SciThrobberComponent {
|
|
|
147
147
|
this.type = 'spinner';
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
SciThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
151
|
-
SciThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
150
|
+
SciThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
+
SciThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SciThrobberComponent, selector: "sci-throbber", inputs: { type: "type" }, ngImport: i0, template: "<ng-container [ngSwitch]=\"type\">\n <sci-ellipsis-throbber *ngSwitchCase=\"'ellipsis'\"></sci-ellipsis-throbber>\n <sci-ripple-throbber *ngSwitchCase=\"'ripple'\"></sci-ripple-throbber>\n <sci-roller-throbber *ngSwitchCase=\"'roller'\"></sci-roller-throbber>\n <sci-spinner-throbber *ngSwitchCase=\"'spinner'\"></sci-spinner-throbber>\n <sci-spinner-throbber *ngSwitchDefault></sci-spinner-throbber>\n</ng-container>", styles: [":host{display:inline-grid;--sci-throbber-color: lightgray;--sci-throbber-size: 50px;--sci-throbber-duration: 1.25s}\n"], dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: SciEllipsisThrobberComponent, selector: "sci-ellipsis-throbber" }, { kind: "component", type: SciRippleThrobberComponent, selector: "sci-ripple-throbber" }, { kind: "component", type: SciRollerThrobberComponent, selector: "sci-roller-throbber" }, { kind: "component", type: SciSpinnerThrobberComponent, selector: "sci-spinner-throbber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciThrobberComponent, decorators: [{
|
|
153
153
|
type: Component,
|
|
154
154
|
args: [{ selector: 'sci-throbber', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container [ngSwitch]=\"type\">\n <sci-ellipsis-throbber *ngSwitchCase=\"'ellipsis'\"></sci-ellipsis-throbber>\n <sci-ripple-throbber *ngSwitchCase=\"'ripple'\"></sci-ripple-throbber>\n <sci-roller-throbber *ngSwitchCase=\"'roller'\"></sci-roller-throbber>\n <sci-spinner-throbber *ngSwitchCase=\"'spinner'\"></sci-spinner-throbber>\n <sci-spinner-throbber *ngSwitchDefault></sci-spinner-throbber>\n</ng-container>", styles: [":host{display:inline-grid;--sci-throbber-color: lightgray;--sci-throbber-size: 50px;--sci-throbber-duration: 1.25s}\n"] }]
|
|
155
155
|
}], propDecorators: { type: [{
|
|
@@ -170,16 +170,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImpor
|
|
|
170
170
|
*/
|
|
171
171
|
class SciThrobberModule {
|
|
172
172
|
}
|
|
173
|
-
SciThrobberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
174
|
-
SciThrobberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
173
|
+
SciThrobberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciThrobberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
174
|
+
SciThrobberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SciThrobberModule, declarations: [SciThrobberComponent,
|
|
175
175
|
SciEllipsisThrobberComponent,
|
|
176
176
|
SciRippleThrobberComponent,
|
|
177
177
|
SciRollerThrobberComponent,
|
|
178
178
|
SciSpinnerThrobberComponent], imports: [CommonModule], exports: [SciThrobberComponent] });
|
|
179
|
-
SciThrobberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
180
|
-
|
|
181
|
-
]] });
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciThrobberModule, decorators: [{
|
|
179
|
+
SciThrobberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciThrobberModule, imports: [CommonModule] });
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SciThrobberModule, decorators: [{
|
|
183
181
|
type: NgModule,
|
|
184
182
|
args: [{
|
|
185
183
|
declarations: [
|