@scion/components 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +40 -0
  2. package/_components.scss +1 -0
  3. package/_index.scss +23 -0
  4. package/dimension/dimension.directive.d.ts +43 -0
  5. package/dimension/dimension.module.d.ts +13 -0
  6. package/dimension/package.json +10 -0
  7. package/dimension/public_api.d.ts +2 -0
  8. package/dimension/scion-components-dimension.d.ts +5 -0
  9. package/esm2020/dimension/dimension.directive.mjs +83 -0
  10. package/esm2020/dimension/dimension.module.mjs +40 -0
  11. package/esm2020/dimension/public_api.mjs +17 -0
  12. package/esm2020/dimension/scion-components-dimension.mjs +5 -0
  13. package/esm2020/public-api.mjs +11 -0
  14. package/esm2020/sashbox/element-ref.directive.mjs +27 -0
  15. package/esm2020/sashbox/public_api.mjs +18 -0
  16. package/esm2020/sashbox/sash-initializer.directive.mjs +32 -0
  17. package/esm2020/sashbox/sash.directive.mjs +144 -0
  18. package/esm2020/sashbox/sashbox-accessor.mjs +6 -0
  19. package/esm2020/sashbox/sashbox.component.mjs +278 -0
  20. package/esm2020/sashbox/sashbox.module.mjs +71 -0
  21. package/esm2020/sashbox/scion-components-sashbox.mjs +5 -0
  22. package/esm2020/scion-components.mjs +5 -0
  23. package/esm2020/splitter/public_api.mjs +17 -0
  24. package/esm2020/splitter/scion-components-splitter.mjs +5 -0
  25. package/esm2020/splitter/splitter.component.mjs +227 -0
  26. package/esm2020/splitter/splitter.module.mjs +44 -0
  27. package/esm2020/throbber/ellipsis-throbber/ellipsis-throbber.component.mjs +25 -0
  28. package/esm2020/throbber/public_api.mjs +17 -0
  29. package/esm2020/throbber/ripple-throbber/ripple-throbber.component.mjs +25 -0
  30. package/esm2020/throbber/roller-throbber/roller-throbber.component.mjs +25 -0
  31. package/esm2020/throbber/scion-components-throbber.mjs +5 -0
  32. package/esm2020/throbber/spinner-throbber/spinner-throbber.component.mjs +26 -0
  33. package/esm2020/throbber/throbber.component.mjs +67 -0
  34. package/esm2020/throbber/throbber.module.mjs +50 -0
  35. package/esm2020/viewport/native-scrollbar-track-size-provider.service.mjs +114 -0
  36. package/esm2020/viewport/public_api.mjs +20 -0
  37. package/esm2020/viewport/scion-components-viewport.mjs +5 -0
  38. package/esm2020/viewport/scrollable.directive.mjs +93 -0
  39. package/esm2020/viewport/scrollbar/scrollbar.component.mjs +322 -0
  40. package/esm2020/viewport/viewport.component.mjs +265 -0
  41. package/esm2020/viewport/viewport.module.mjs +52 -0
  42. package/fesm2015/scion-components-dimension.mjs +137 -0
  43. package/fesm2015/scion-components-dimension.mjs.map +1 -0
  44. package/fesm2015/scion-components-sashbox.mjs +556 -0
  45. package/fesm2015/scion-components-sashbox.mjs.map +1 -0
  46. package/fesm2015/scion-components-splitter.mjs +286 -0
  47. package/fesm2015/scion-components-splitter.mjs.map +1 -0
  48. package/fesm2015/scion-components-throbber.mjs +216 -0
  49. package/fesm2015/scion-components-throbber.mjs.map +1 -0
  50. package/fesm2015/scion-components-viewport.mjs +846 -0
  51. package/fesm2015/scion-components-viewport.mjs.map +1 -0
  52. package/fesm2015/scion-components.mjs +4 -0
  53. package/fesm2015/scion-components.mjs.map +1 -0
  54. package/fesm2020/scion-components-dimension.mjs +137 -0
  55. package/fesm2020/scion-components-dimension.mjs.map +1 -0
  56. package/fesm2020/scion-components-sashbox.mjs +556 -0
  57. package/fesm2020/scion-components-sashbox.mjs.map +1 -0
  58. package/fesm2020/scion-components-splitter.mjs +284 -0
  59. package/fesm2020/scion-components-splitter.mjs.map +1 -0
  60. package/fesm2020/scion-components-throbber.mjs +216 -0
  61. package/fesm2020/scion-components-throbber.mjs.map +1 -0
  62. package/fesm2020/scion-components-viewport.mjs +842 -0
  63. package/fesm2020/scion-components-viewport.mjs.map +1 -0
  64. package/fesm2020/scion-components.mjs +14 -0
  65. package/fesm2020/scion-components.mjs.map +1 -0
  66. package/package.json +93 -0
  67. package/public-api.d.ts +4 -0
  68. package/sashbox/element-ref.directive.d.ts +12 -0
  69. package/sashbox/package.json +10 -0
  70. package/sashbox/public_api.d.ts +3 -0
  71. package/sashbox/sash-initializer.directive.d.ts +14 -0
  72. package/sashbox/sash.directive.d.ts +60 -0
  73. package/sashbox/sashbox-accessor.d.ts +10 -0
  74. package/sashbox/sashbox.component.d.ts +90 -0
  75. package/sashbox/sashbox.module.d.ts +33 -0
  76. package/sashbox/scion-components-sashbox.d.ts +5 -0
  77. package/scion-components.d.ts +5 -0
  78. package/splitter/package.json +10 -0
  79. package/splitter/public_api.d.ts +2 -0
  80. package/splitter/scion-components-splitter.d.ts +5 -0
  81. package/splitter/splitter.component.d.ts +104 -0
  82. package/splitter/splitter.module.d.ts +17 -0
  83. package/throbber/ellipsis-throbber/ellipsis-throbber.component.d.ts +10 -0
  84. package/throbber/package.json +10 -0
  85. package/throbber/public_api.d.ts +2 -0
  86. package/throbber/ripple-throbber/ripple-throbber.component.d.ts +10 -0
  87. package/throbber/roller-throbber/roller-throbber.component.d.ts +10 -0
  88. package/throbber/scion-components-throbber.d.ts +5 -0
  89. package/throbber/spinner-throbber/spinner-throbber.component.d.ts +11 -0
  90. package/throbber/throbber.component.d.ts +43 -0
  91. package/throbber/throbber.module.d.ts +15 -0
  92. package/viewport/_index.scss +1 -0
  93. package/viewport/_scrollbar.scss +44 -0
  94. package/viewport/native-scrollbar-track-size-provider.service.d.ts +42 -0
  95. package/viewport/package.json +10 -0
  96. package/viewport/public_api.d.ts +5 -0
  97. package/viewport/scion-components-viewport.d.ts +5 -0
  98. package/viewport/scrollable.directive.d.ts +39 -0
  99. package/viewport/scrollbar/scrollbar.component.d.ts +106 -0
  100. package/viewport/viewport.component.d.ts +160 -0
  101. package/viewport/viewport.module.d.ts +14 -0
@@ -0,0 +1,284 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, NgZone, Component, ChangeDetectionStrategy, Inject, HostBinding, Input, Output, ViewChild, NgModule } from '@angular/core';
3
+ import { Subject, fromEvent, merge } from 'rxjs';
4
+ import { DOCUMENT, CommonModule } from '@angular/common';
5
+ import { tapFirst } from '@scion/toolkit/operators';
6
+ import { takeUntil, first } from 'rxjs/operators';
7
+
8
+ /*
9
+ * Copyright (c) 2018-2019 Swiss Federal Railways
10
+ *
11
+ * This program and the accompanying materials are made
12
+ * available under the terms of the Eclipse Public License 2.0
13
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
14
+ *
15
+ * SPDX-License-Identifier: EPL-2.0
16
+ */
17
+ /**
18
+ * Represents a splitter, a visual element that allows the user to control the size of elements next to it.
19
+ *
20
+ * The splitter has a handle that the user can move depending on the orientation of the splitter.
21
+ *
22
+ * Note that this control neither does change the size of adjacent elements nor does it (re-)position itself, but emits the distance by
23
+ * which the user has theoretically moved the splitter. You must subscribe to these events and change your layout accordingly.
24
+ *
25
+ * In the toolkit, {@link SciSashboxComponent} uses this splitter to divide a layout into several resizable sections.
26
+ * Another use case would be a resizable sidebar panel.
27
+ *
28
+ * ### Usage:
29
+ *
30
+ * ```html
31
+ * <sci-splitter (move)="onSplitterMove($event.distance)"></sci-splitter>
32
+ * ```
33
+ *
34
+ * ### Theme override:
35
+ * The default style of the splitter is made up of shades of gray.
36
+ * You can control the appearance by overriding the following CSS variables:
37
+ *
38
+ * - --sci-splitter-bgcolor: Sets the background color of the splitter.
39
+ * - --sci-splitter-bgcolor_hover: Sets the background color of the splitter when hovering it.
40
+ * - --sci-splitter-size: Sets the size of the splitter along the main axis.
41
+ * - --sci-splitter-size_hover: Sets the size of the splitter along the main axis when hovering it.
42
+ * - --sci-splitter-touch-target-size: Sets the touch target size to move the splitter (accessibility).
43
+ * - --sci-splitter-cross-axis-size: Sets the splitter size along the cross axis.
44
+ * - --sci-splitter-border-radius: Sets the border radius of the splitter.
45
+ * - --sci-splitter-opacity_active: Sets the opacity of the splitter while the user moves the splitter.
46
+ * - --sci-splitter-opacity_hover: Sets the opacity of the splitter when hovering it.
47
+ *
48
+ * Example:
49
+ *
50
+ * ```scss
51
+ * sci-splitter {
52
+ * --sci-splitter-bgcolor: black;
53
+ * --sci-splitter-bgcolor_hover: black;
54
+ * }
55
+ * ```
56
+ *
57
+ * @dynamic ignore 'strictMetadataEmit' errors due to the usage of {@link Document} as ambient type for DI.
58
+ */
59
+ class SciSplitterComponent {
60
+ constructor(_zone, _cd, _document) {
61
+ this._zone = _zone;
62
+ this._cd = _cd;
63
+ this._document = _document;
64
+ this._destroy$ = new Subject();
65
+ /* @docs-private */
66
+ this.moving = false;
67
+ /**
68
+ * Controls whether to render a vertical or horizontal splitter.
69
+ * By default, if not specified, renders a vertical splitter.
70
+ */
71
+ this.orientation = 'vertical';
72
+ /**
73
+ * Emits when starting to move the splitter.
74
+ */
75
+ this.start = new EventEmitter(); // eslint-disable-line @angular-eslint/no-output-native
76
+ /**
77
+ * Emits the distance in pixels when the splitter is moved.
78
+ * The event is emitted outside of the Angular zone.
79
+ */
80
+ this.move = new EventEmitter();
81
+ /**
82
+ * Emits when ending to move the splitter.
83
+ */
84
+ this.end = new EventEmitter(); // eslint-disable-line @angular-eslint/no-output-native
85
+ /**
86
+ * Emits when to reset the splitter position.
87
+ */
88
+ this.reset = new EventEmitter(); // eslint-disable-line @angular-eslint/no-output-native
89
+ }
90
+ get isVertical() {
91
+ return !this.isHorizontal;
92
+ }
93
+ get isHorizontal() {
94
+ return this.orientation === 'horizontal';
95
+ }
96
+ /* @docs-private */
97
+ get splitterCursor() {
98
+ return this.isVertical ? 'ew-resize' : 'ns-resize';
99
+ }
100
+ /* @docs-private */
101
+ ngOnInit() {
102
+ fromEvent(this.touchTargetElementRef.nativeElement, 'dblclick')
103
+ .pipe(takeUntil(this._destroy$))
104
+ .subscribe(() => this.onReset());
105
+ fromEvent(this.touchTargetElementRef.nativeElement, 'touchstart')
106
+ .pipe(takeUntil(this._destroy$))
107
+ .subscribe((event) => this.onTouchStart(event));
108
+ fromEvent(this.touchTargetElementRef.nativeElement, 'mousedown')
109
+ .pipe(takeUntil(this._destroy$))
110
+ .subscribe((event) => this.onMouseDown(event));
111
+ }
112
+ onReset() {
113
+ this.reset.emit();
114
+ }
115
+ onTouchStart(startEvent) {
116
+ this.installMoveListener({
117
+ startEvent: startEvent,
118
+ moveEventNames: ['touchmove'],
119
+ endEventNames: ['touchend', 'touchcancel'],
120
+ eventPositionFn: (touchEvent) => {
121
+ const touch = touchEvent.touches[0];
122
+ if (this.isVertical) {
123
+ return { screenPos: touch.screenX, clientPos: touch.clientX, pagePos: touch.pageX };
124
+ }
125
+ else {
126
+ return { screenPos: touch.screenY, clientPos: touch.clientY, pagePos: touch.pageY };
127
+ }
128
+ },
129
+ });
130
+ }
131
+ onMouseDown(startEvent) {
132
+ if (startEvent.button !== 0) {
133
+ return;
134
+ }
135
+ this.installMoveListener({
136
+ startEvent: startEvent,
137
+ moveEventNames: ['mousemove', 'sci-mousemove'],
138
+ endEventNames: ['mouseup', 'sci-mouseup'],
139
+ eventPositionFn: (mouseEvent) => {
140
+ if (this.isVertical) {
141
+ return { screenPos: mouseEvent.screenX, clientPos: mouseEvent.clientX, pagePos: mouseEvent.pageX };
142
+ }
143
+ else {
144
+ return { screenPos: mouseEvent.screenY, clientPos: mouseEvent.clientY, pagePos: mouseEvent.pageY };
145
+ }
146
+ },
147
+ });
148
+ }
149
+ installMoveListener(config) {
150
+ const startEvent = config.startEvent;
151
+ startEvent.preventDefault();
152
+ this._zone.runOutsideAngular(() => {
153
+ // install listeners on document level to allow fast dragging the splitter.
154
+ const moveEvent$ = merge(...config.moveEventNames.map(eventName => fromEvent(this._document, eventName)));
155
+ const endEvent$ = merge(...config.endEventNames.map(eventName => fromEvent(this._document, eventName)));
156
+ let lastClientPos = config.eventPositionFn(startEvent).clientPos;
157
+ // Apply cursor on document level to prevent flickering while moving the splitter
158
+ const oldDocumentCursor = this._document.body.style.cursor;
159
+ this._document.body.style.cursor = this.splitterCursor;
160
+ // Listen for 'move' events until stop moving the splitter
161
+ moveEvent$
162
+ .pipe(tapFirst(() => this._zone.run(() => {
163
+ this.moving = true;
164
+ this.start.next();
165
+ this._cd.markForCheck();
166
+ })), takeUntil(merge(endEvent$, this._destroy$)))
167
+ .subscribe((moveEvent) => {
168
+ const eventPos = config.eventPositionFn(moveEvent);
169
+ const newClientPos = eventPos.clientPos;
170
+ const distance = newClientPos - lastClientPos;
171
+ lastClientPos = newClientPos;
172
+ NgZone.assertNotInAngularZone();
173
+ this.move.emit({ distance, position: eventPos });
174
+ });
175
+ // Listen for 'end' events; call 'stop propagation' to not close overlays
176
+ endEvent$
177
+ .pipe(first(), takeUntil(this._destroy$))
178
+ .subscribe((endEvent) => {
179
+ endEvent.stopPropagation();
180
+ this._document.body.style.cursor = oldDocumentCursor;
181
+ this.moving && this._zone.run(() => {
182
+ this.end.next();
183
+ this.moving = false;
184
+ this._cd.markForCheck();
185
+ });
186
+ });
187
+ });
188
+ }
189
+ /* @docs-private */
190
+ ngOnDestroy() {
191
+ this._destroy$.next();
192
+ }
193
+ }
194
+ SciSplitterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciSplitterComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
195
+ SciSplitterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", 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: "13.2.3", ngImport: i0, type: SciSplitterComponent, decorators: [{
197
+ type: Component,
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
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: Document, decorators: [{
200
+ type: Inject,
201
+ args: [DOCUMENT]
202
+ }] }]; }, propDecorators: { moving: [{
203
+ type: HostBinding,
204
+ args: ['class.moving']
205
+ }], isVertical: [{
206
+ type: HostBinding,
207
+ args: ['class.vertical']
208
+ }], isHorizontal: [{
209
+ type: HostBinding,
210
+ args: ['class.horizontal']
211
+ }], orientation: [{
212
+ type: Input
213
+ }], start: [{
214
+ type: Output
215
+ }], move: [{
216
+ type: Output
217
+ }], end: [{
218
+ type: Output
219
+ }], reset: [{
220
+ type: Output
221
+ }], splitterCursor: [{
222
+ type: HostBinding,
223
+ args: ['style.cursor']
224
+ }], touchTargetElementRef: [{
225
+ type: ViewChild,
226
+ args: ['touch_target', { static: true }]
227
+ }] } });
228
+
229
+ /*
230
+ * Copyright (c) 2018-2019 Swiss Federal Railways
231
+ *
232
+ * This program and the accompanying materials are made
233
+ * available under the terms of the Eclipse Public License 2.0
234
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
235
+ *
236
+ * SPDX-License-Identifier: EPL-2.0
237
+ */
238
+ /**
239
+ * Provides a splitter, a visual element that allows the user to control the size of elements next to it.
240
+ *
241
+ * ### Usage:
242
+ *
243
+ * ```html
244
+ * <sci-splitter (move)="onSplitterMove($event.distance)"></sci-splitter>
245
+ * ```
246
+ */
247
+ class SciSplitterModule {
248
+ }
249
+ SciSplitterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
250
+ SciSplitterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciSplitterModule, declarations: [SciSplitterComponent], imports: [CommonModule], exports: [SciSplitterComponent] });
251
+ SciSplitterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciSplitterModule, imports: [[
252
+ CommonModule,
253
+ ]] });
254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciSplitterModule, decorators: [{
255
+ type: NgModule,
256
+ args: [{
257
+ declarations: [
258
+ SciSplitterComponent,
259
+ ],
260
+ imports: [
261
+ CommonModule,
262
+ ],
263
+ exports: [
264
+ SciSplitterComponent,
265
+ ],
266
+ }]
267
+ }] });
268
+
269
+ /*
270
+ * Copyright (c) 2018-2019 Swiss Federal Railways
271
+ *
272
+ * This program and the accompanying materials are made
273
+ * available under the terms of the Eclipse Public License 2.0
274
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
275
+ *
276
+ * SPDX-License-Identifier: EPL-2.0
277
+ */
278
+
279
+ /**
280
+ * Generated bundle index. Do not edit.
281
+ */
282
+
283
+ export { SciSplitterComponent, SciSplitterModule };
284
+ //# sourceMappingURL=scion-components-splitter.mjs.map
@@ -0,0 +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,KAA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sBADjB,KAAK;gBAOC,KAAK;sBADX,MAAM;gBAQA,IAAI;sBADV,MAAM;gBAOA,GAAG;sBADT,MAAM;gBAOA,KAAK;sBADX,MAAM;gBAKI,cAAc;sBADxB,WAAW;uBAAC,cAAc;gBAOpB,qBAAqB;sBAD3B,SAAS;uBAAC,cAAc,EAAE,EAAC,MAAM,EAAE,IAAI,EAAC;;;AEzH3C;;;;;;;;;AAcA;;;;;;;;;MAoBa,iBAAiB;;8GAAjB,iBAAiB;+GAAjB,iBAAiB,iBAT1B,oBAAoB,aAGpB,YAAY,aAGZ,oBAAoB;+GAGX,iBAAiB,YAPnB;YACP,YAAY;SACb;2FAKU,iBAAiB;kBAX7B,QAAQ;mBAAC;oBACR,YAAY,EAAE;wBACZ,oBAAoB;qBACrB;oBACD,OAAO,EAAE;wBACP,YAAY;qBACb;oBACD,OAAO,EAAE;wBACP,oBAAoB;qBACrB;iBACF;;;ACjCD;;;;;;;;;;ACAA;;;;;;"}
@@ -0,0 +1,216 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
3
+ import * as i5 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+
6
+ /*
7
+ * Copyright (c) 2018-2019 Swiss Federal Railways
8
+ *
9
+ * This program and the accompanying materials are made
10
+ * available under the terms of the Eclipse Public License 2.0
11
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
12
+ *
13
+ * SPDX-License-Identifier: EPL-2.0
14
+ */
15
+ /**
16
+ * Represents a throbber as an ellipsis consisting of three horizontally arranged points that appear one after the other.
17
+ *
18
+ * Throbber type: `ellipsis`
19
+ */
20
+ class SciEllipsisThrobberComponent {
21
+ }
22
+ SciEllipsisThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciEllipsisThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
+ SciEllipsisThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", 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: "13.2.3", ngImport: i0, type: SciEllipsisThrobberComponent, decorators: [{
25
+ type: Component,
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
+ }] });
28
+
29
+ /*
30
+ * Copyright (c) 2018-2019 Swiss Federal Railways
31
+ *
32
+ * This program and the accompanying materials are made
33
+ * available under the terms of the Eclipse Public License 2.0
34
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
35
+ *
36
+ * SPDX-License-Identifier: EPL-2.0
37
+ */
38
+ /**
39
+ * Represents a throbber with a rippled, centric wave effect, similar to throwing a stone into water.
40
+ *
41
+ * Throbber type: `ripple`
42
+ */
43
+ class SciRippleThrobberComponent {
44
+ }
45
+ SciRippleThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciRippleThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
46
+ SciRippleThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", 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: "13.2.3", ngImport: i0, type: SciRippleThrobberComponent, decorators: [{
48
+ type: Component,
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
+ }] });
51
+
52
+ /*
53
+ * Copyright (c) 2018-2019 Swiss Federal Railways
54
+ *
55
+ * This program and the accompanying materials are made
56
+ * available under the terms of the Eclipse Public License 2.0
57
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
58
+ *
59
+ * SPDX-License-Identifier: EPL-2.0
60
+ */
61
+ /**
62
+ * Represents a circular throbber with points rotating around the center of a circle. Points have a delayed acceleration, which leads to an accordion effect.
63
+ *
64
+ * Throbber type: `roller`
65
+ */
66
+ class SciRollerThrobberComponent {
67
+ }
68
+ SciRollerThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciRollerThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
69
+ SciRollerThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", 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: "13.2.3", ngImport: i0, type: SciRollerThrobberComponent, decorators: [{
71
+ type: Component,
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
+ }] });
74
+
75
+ /*
76
+ * Copyright (c) 2018-2019 Swiss Federal Railways
77
+ *
78
+ * This program and the accompanying materials are made
79
+ * available under the terms of the Eclipse Public License 2.0
80
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
81
+ *
82
+ * SPDX-License-Identifier: EPL-2.0
83
+ */
84
+ /**
85
+ * Represents a classic spinner throbber with strokes arranged radially. The strokes light up one after the other in clockwise direction
86
+ * and then then fade out again.
87
+ *
88
+ * Throbber type: `spinner`
89
+ */
90
+ class SciSpinnerThrobberComponent {
91
+ }
92
+ SciSpinnerThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciSpinnerThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
93
+ SciSpinnerThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", 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: "13.2.3", ngImport: i0, type: SciSpinnerThrobberComponent, decorators: [{
95
+ type: Component,
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
+ }] });
98
+
99
+ /*
100
+ * Copyright (c) 2018-2019 Swiss Federal Railways
101
+ *
102
+ * This program and the accompanying materials are made
103
+ * available under the terms of the Eclipse Public License 2.0
104
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
105
+ *
106
+ * SPDX-License-Identifier: EPL-2.0
107
+ */
108
+ /**
109
+ * Animated graphical control to indicate the execution of an action.
110
+ *
111
+ * Choose between different throbber presentations by setting the `type` property: `ellipsis`, `ripple`, `roller`, `spinner`.
112
+ *
113
+ * ### CSS styling:
114
+ *
115
+ * You can override the following CSS variables:
116
+ *
117
+ * - sci-throbber-color: Sets the color of the throbber (by default, uses `lightgray`).
118
+ * - sci-throbber-size: Defines the size of the throbber. Most throbbers are quadratic having the same width and height.
119
+ * For non-quadratic throbbers, the size usually specifies the height (by default, uses `50px`).
120
+ * - sci-throbber-duration: Sets the duration of a single animation cycle (by default, uses `1.25s`).
121
+ *
122
+ * Example:
123
+ *
124
+ * ```css
125
+ *
126
+ * sci-throbber {
127
+ * --sci-throbber-color: blue;
128
+ * --sci-throbber-size: 50px;
129
+ * --sci-throbber-duration: 1s
130
+ * }
131
+ * ```
132
+ */
133
+ class SciThrobberComponent {
134
+ constructor() {
135
+ /**
136
+ * Chooses between different throbber presentation. If not set, uses `spinner` type.
137
+ *
138
+ * - **ellipsis**
139
+ * Represents a throbber as an ellipsis consisting of three horizontally arranged points that appear one after the other.
140
+ * - **ripple**
141
+ * Represents a throbber with a rippled, centric wave effect, similar to throwing a stone into water.
142
+ * - **roller**
143
+ * Represents a circular throbber with points rotating around the center of a circle. Points have a delayed acceleration, which leads to an accordion effect.
144
+ * - **spinner** (default)
145
+ * Represents a classic spinner throbber with strokes arranged radially. The strokes light up one after the other in clockwise direction and then then fade out again.
146
+ */
147
+ this.type = 'spinner';
148
+ }
149
+ }
150
+ SciThrobberComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciThrobberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
151
+ SciThrobberComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", 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"], components: [{ type: SciEllipsisThrobberComponent, selector: "sci-ellipsis-throbber" }, { type: SciRippleThrobberComponent, selector: "sci-ripple-throbber" }, { type: SciRollerThrobberComponent, selector: "sci-roller-throbber" }, { type: SciSpinnerThrobberComponent, selector: "sci-spinner-throbber" }], directives: [{ type: i5.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i5.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciThrobberComponent, decorators: [{
153
+ type: Component,
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
+ }], propDecorators: { type: [{
156
+ type: Input
157
+ }] } });
158
+
159
+ /*
160
+ * Copyright (c) 2018-2019 Swiss Federal Railways
161
+ *
162
+ * This program and the accompanying materials are made
163
+ * available under the terms of the Eclipse Public License 2.0
164
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
165
+ *
166
+ * SPDX-License-Identifier: EPL-2.0
167
+ */
168
+ /**
169
+ * Provides {@link SciThrobberComponent}, an animated graphical control to indicate the execution of an action.
170
+ */
171
+ class SciThrobberModule {
172
+ }
173
+ SciThrobberModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciThrobberModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
174
+ SciThrobberModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciThrobberModule, declarations: [SciThrobberComponent,
175
+ SciEllipsisThrobberComponent,
176
+ SciRippleThrobberComponent,
177
+ SciRollerThrobberComponent,
178
+ SciSpinnerThrobberComponent], imports: [CommonModule], exports: [SciThrobberComponent] });
179
+ SciThrobberModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciThrobberModule, imports: [[
180
+ CommonModule,
181
+ ]] });
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SciThrobberModule, decorators: [{
183
+ type: NgModule,
184
+ args: [{
185
+ declarations: [
186
+ SciThrobberComponent,
187
+ SciEllipsisThrobberComponent,
188
+ SciRippleThrobberComponent,
189
+ SciRollerThrobberComponent,
190
+ SciSpinnerThrobberComponent,
191
+ ],
192
+ imports: [
193
+ CommonModule,
194
+ ],
195
+ exports: [
196
+ SciThrobberComponent,
197
+ ],
198
+ }]
199
+ }] });
200
+
201
+ /*
202
+ * Copyright (c) 2018-2019 Swiss Federal Railways
203
+ *
204
+ * This program and the accompanying materials are made
205
+ * available under the terms of the Eclipse Public License 2.0
206
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
207
+ *
208
+ * SPDX-License-Identifier: EPL-2.0
209
+ */
210
+
211
+ /**
212
+ * Generated bundle index. Do not edit.
213
+ */
214
+
215
+ export { SciThrobberComponent, SciThrobberModule };
216
+ //# sourceMappingURL=scion-components-throbber.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scion-components-throbber.mjs","sources":["../../../../projects/scion/components/throbber/src/ellipsis-throbber/ellipsis-throbber.component.ts","../../../../projects/scion/components/throbber/src/ellipsis-throbber/ellipsis-throbber.component.html","../../../../projects/scion/components/throbber/src/ripple-throbber/ripple-throbber.component.ts","../../../../projects/scion/components/throbber/src/ripple-throbber/ripple-throbber.component.html","../../../../projects/scion/components/throbber/src/roller-throbber/roller-throbber.component.ts","../../../../projects/scion/components/throbber/src/roller-throbber/roller-throbber.component.html","../../../../projects/scion/components/throbber/src/spinner-throbber/spinner-throbber.component.ts","../../../../projects/scion/components/throbber/src/spinner-throbber/spinner-throbber.component.html","../../../../projects/scion/components/throbber/src/throbber.component.ts","../../../../projects/scion/components/throbber/src/throbber.component.html","../../../../projects/scion/components/throbber/src/throbber.module.ts","../../../../projects/scion/components/throbber/src/public_api.ts","../../../../projects/scion/components/throbber/src/scion-components-throbber.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, Component} from '@angular/core';\n\n/**\n * Represents a throbber as an ellipsis consisting of three horizontally arranged points that appear one after the other.\n *\n * Throbber type: `ellipsis`\n */\n@Component({\n selector: 'sci-ellipsis-throbber',\n templateUrl: './ellipsis-throbber.component.html',\n styleUrls: ['./ellipsis-throbber.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SciEllipsisThrobberComponent {\n}\n","<div class=\"point\"></div>\n<div class=\"point\"></div>\n<div class=\"point\"></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 {ChangeDetectionStrategy, Component} from '@angular/core';\n\n/**\n * Represents a throbber with a rippled, centric wave effect, similar to throwing a stone into water.\n *\n * Throbber type: `ripple`\n */\n@Component({\n selector: 'sci-ripple-throbber',\n templateUrl: './ripple-throbber.component.html',\n styleUrls: ['./ripple-throbber.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SciRippleThrobberComponent {\n}\n","<div class=\"circle\"></div>\n<div class=\"circle\"></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 {ChangeDetectionStrategy, Component} from '@angular/core';\n\n/**\n * Represents a circular throbber with points rotating around the center of a circle. Points have a delayed acceleration, which leads to an accordion effect.\n *\n * Throbber type: `roller`\n */\n@Component({\n selector: 'sci-roller-throbber',\n templateUrl: './roller-throbber.component.html',\n styleUrls: ['./roller-throbber.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SciRollerThrobberComponent {\n}\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>\n<div class=\"point\"></div>","/*\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, Component} from '@angular/core';\n\n/**\n * Represents a classic spinner throbber with strokes arranged radially. The strokes light up one after the other in clockwise direction\n * and then then fade out again.\n *\n * Throbber type: `spinner`\n */\n@Component({\n selector: 'sci-spinner-throbber',\n templateUrl: './spinner-throbber.component.html',\n styleUrls: ['./spinner-throbber.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SciSpinnerThrobberComponent {\n}\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>\n<div class=\"stroke\"></div>","/*\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, Component, Input} from '@angular/core';\n\n/**\n * Animated graphical control to indicate the execution of an action.\n *\n * Choose between different throbber presentations by setting the `type` property: `ellipsis`, `ripple`, `roller`, `spinner`.\n *\n * ### CSS styling:\n *\n * You can override the following CSS variables:\n *\n * - sci-throbber-color: Sets the color of the throbber (by default, uses `lightgray`).\n * - sci-throbber-size: Defines the size of the throbber. Most throbbers are quadratic having the same width and height.\n * For non-quadratic throbbers, the size usually specifies the height (by default, uses `50px`).\n * - sci-throbber-duration: Sets the duration of a single animation cycle (by default, uses `1.25s`).\n *\n * Example:\n *\n * ```css\n *\n * sci-throbber {\n * --sci-throbber-color: blue;\n * --sci-throbber-size: 50px;\n * --sci-throbber-duration: 1s\n * }\n * ```\n */\n@Component({\n selector: 'sci-throbber',\n templateUrl: './throbber.component.html',\n styleUrls: ['./throbber.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SciThrobberComponent {\n\n /**\n * Chooses between different throbber presentation. If not set, uses `spinner` type.\n *\n * - **ellipsis**\n * Represents a throbber as an ellipsis consisting of three horizontally arranged points that appear one after the other.\n * - **ripple**\n * Represents a throbber with a rippled, centric wave effect, similar to throwing a stone into water.\n * - **roller**\n * Represents a circular throbber with points rotating around the center of a circle. Points have a delayed acceleration, which leads to an accordion effect.\n * - **spinner** (default)\n * Represents a classic spinner throbber with strokes arranged radially. The strokes light up one after the other in clockwise direction and then then fade out again.\n */\n @Input()\n public type: 'ellipsis' | 'ripple' | 'roller' | 'spinner' = 'spinner';\n}\n","<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>","/*\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 {SciThrobberComponent} from './throbber.component';\nimport {SciEllipsisThrobberComponent} from './ellipsis-throbber/ellipsis-throbber.component';\nimport {SciRippleThrobberComponent} from './ripple-throbber/ripple-throbber.component';\nimport {SciRollerThrobberComponent} from './roller-throbber/roller-throbber.component';\nimport {SciSpinnerThrobberComponent} from './spinner-throbber/spinner-throbber.component';\n\n/**\n * Provides {@link SciThrobberComponent}, an animated graphical control to indicate the execution of an action.\n */\n@NgModule({\n declarations: [\n SciThrobberComponent,\n SciEllipsisThrobberComponent,\n SciRippleThrobberComponent,\n SciRollerThrobberComponent,\n SciSpinnerThrobberComponent,\n ],\n imports: [\n CommonModule,\n ],\n exports: [\n SciThrobberComponent,\n ],\n})\nexport class SciThrobberModule {\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/throbber'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciThrobberModule} from './throbber.module';\nexport {SciThrobberComponent} from './throbber.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;;AAYA;;;;;MAWa,4BAA4B;;yHAA5B,4BAA4B;6GAA5B,4BAA4B,6DCvBzC,yFAGA;2FDoBa,4BAA4B;kBANxC,SAAS;+BACE,uBAAuB,mBAGhB,uBAAuB,CAAC,MAAM;;;AErBjD;;;;;;;;;AAYA;;;;;MAWa,0BAA0B;;uHAA1B,0BAA0B;2GAA1B,0BAA0B,2DCvBvC,8DAEA;2FDqBa,0BAA0B;kBANtC,SAAS;+BACE,qBAAqB,mBAGd,uBAAuB,CAAC,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