@scion/components 15.0.2 → 16.1.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 (110) hide show
  1. package/dimension/dimension.directive.d.ts +2 -2
  2. package/dimension/dimension.module.d.ts +1 -2
  3. package/esm2022/dimension/dimension.directive.mjs +85 -0
  4. package/esm2022/dimension/dimension.module.mjs +35 -0
  5. package/esm2022/sashbox/element-ref.directive.mjs +32 -0
  6. package/esm2022/sashbox/public_api.mjs +18 -0
  7. package/esm2022/sashbox/sash-initializer.directive.mjs +36 -0
  8. package/esm2022/sashbox/sash.directive.mjs +146 -0
  9. package/esm2022/sashbox/sashbox.component.mjs +286 -0
  10. package/esm2022/sashbox/sashbox.module.mjs +56 -0
  11. package/esm2022/splitter/public_api.mjs +17 -0
  12. package/esm2022/splitter/splitter.component.mjs +226 -0
  13. package/esm2022/splitter/splitter.module.mjs +39 -0
  14. package/esm2022/throbber/ellipsis-throbber/ellipsis-throbber.component.mjs +26 -0
  15. package/esm2022/throbber/ripple-throbber/ripple-throbber.component.mjs +26 -0
  16. package/esm2022/throbber/roller-throbber/roller-throbber.component.mjs +26 -0
  17. package/esm2022/throbber/spinner-throbber/spinner-throbber.component.mjs +27 -0
  18. package/esm2022/throbber/throbber.component.mjs +76 -0
  19. package/esm2022/throbber/throbber.module.mjs +33 -0
  20. package/esm2022/viewport/native-scrollbar-track-size-provider.service.mjs +113 -0
  21. package/esm2022/viewport/public_api.mjs +19 -0
  22. package/esm2022/viewport/scrollable.directive.mjs +95 -0
  23. package/esm2022/viewport/scrollbar/scrollbar.component.mjs +323 -0
  24. package/esm2022/viewport/viewport.component.mjs +289 -0
  25. package/esm2022/viewport/viewport.module.mjs +43 -0
  26. package/{fesm2015 → fesm2022}/scion-components-dimension.mjs +13 -11
  27. package/fesm2022/scion-components-dimension.mjs.map +1 -0
  28. package/{fesm2020 → fesm2022}/scion-components-sashbox.mjs +69 -61
  29. package/fesm2022/scion-components-sashbox.mjs.map +1 -0
  30. package/{fesm2020 → fesm2022}/scion-components-splitter.mjs +25 -25
  31. package/fesm2022/scion-components-splitter.mjs.map +1 -0
  32. package/fesm2022/scion-components-throbber.mjs +215 -0
  33. package/fesm2022/scion-components-throbber.mjs.map +1 -0
  34. package/{fesm2020 → fesm2022}/scion-components-viewport.mjs +164 -161
  35. package/fesm2022/scion-components-viewport.mjs.map +1 -0
  36. package/package.json +27 -43
  37. package/sashbox/element-ref.directive.d.ts +1 -1
  38. package/sashbox/public_api.d.ts +3 -3
  39. package/sashbox/sash-initializer.directive.d.ts +1 -1
  40. package/sashbox/sash.directive.d.ts +2 -2
  41. package/sashbox/sashbox.component.d.ts +1 -3
  42. package/sashbox/sashbox.module.d.ts +1 -5
  43. package/splitter/public_api.d.ts +2 -2
  44. package/splitter/splitter.component.d.ts +1 -3
  45. package/splitter/splitter.module.d.ts +1 -2
  46. package/throbber/ellipsis-throbber/ellipsis-throbber.component.d.ts +1 -1
  47. package/throbber/ripple-throbber/ripple-throbber.component.d.ts +1 -1
  48. package/throbber/roller-throbber/roller-throbber.component.d.ts +1 -1
  49. package/throbber/spinner-throbber/spinner-throbber.component.d.ts +1 -1
  50. package/throbber/throbber.component.d.ts +1 -1
  51. package/throbber/throbber.module.d.ts +1 -6
  52. package/viewport/native-scrollbar-track-size-provider.service.d.ts +0 -2
  53. package/viewport/public_api.d.ts +3 -4
  54. package/viewport/scrollable.directive.d.ts +1 -1
  55. package/viewport/scrollbar/scrollbar.component.d.ts +2 -2
  56. package/viewport/viewport.component.d.ts +2 -2
  57. package/viewport/viewport.module.d.ts +1 -3
  58. package/esm2020/dimension/dimension.directive.mjs +0 -83
  59. package/esm2020/dimension/dimension.module.mjs +0 -38
  60. package/esm2020/sashbox/element-ref.directive.mjs +0 -27
  61. package/esm2020/sashbox/public_api.mjs +0 -18
  62. package/esm2020/sashbox/sash-initializer.directive.mjs +0 -32
  63. package/esm2020/sashbox/sash.directive.mjs +0 -144
  64. package/esm2020/sashbox/sashbox.component.mjs +0 -278
  65. package/esm2020/sashbox/sashbox.module.mjs +0 -69
  66. package/esm2020/splitter/public_api.mjs +0 -17
  67. package/esm2020/splitter/splitter.component.mjs +0 -227
  68. package/esm2020/splitter/splitter.module.mjs +0 -42
  69. package/esm2020/throbber/ellipsis-throbber/ellipsis-throbber.component.mjs +0 -25
  70. package/esm2020/throbber/ripple-throbber/ripple-throbber.component.mjs +0 -25
  71. package/esm2020/throbber/roller-throbber/roller-throbber.component.mjs +0 -25
  72. package/esm2020/throbber/spinner-throbber/spinner-throbber.component.mjs +0 -26
  73. package/esm2020/throbber/throbber.component.mjs +0 -67
  74. package/esm2020/throbber/throbber.module.mjs +0 -48
  75. package/esm2020/viewport/native-scrollbar-track-size-provider.service.mjs +0 -114
  76. package/esm2020/viewport/public_api.mjs +0 -20
  77. package/esm2020/viewport/scrollable.directive.mjs +0 -93
  78. package/esm2020/viewport/scrollbar/scrollbar.component.mjs +0 -322
  79. package/esm2020/viewport/viewport.component.mjs +0 -281
  80. package/esm2020/viewport/viewport.module.mjs +0 -50
  81. package/fesm2015/scion-components-dimension.mjs.map +0 -1
  82. package/fesm2015/scion-components-sashbox.mjs +0 -554
  83. package/fesm2015/scion-components-sashbox.mjs.map +0 -1
  84. package/fesm2015/scion-components-splitter.mjs +0 -284
  85. package/fesm2015/scion-components-splitter.mjs.map +0 -1
  86. package/fesm2015/scion-components-throbber.mjs +0 -214
  87. package/fesm2015/scion-components-throbber.mjs.map +0 -1
  88. package/fesm2015/scion-components-viewport.mjs +0 -861
  89. package/fesm2015/scion-components-viewport.mjs.map +0 -1
  90. package/fesm2015/scion-components.mjs +0 -4
  91. package/fesm2015/scion-components.mjs.map +0 -1
  92. package/fesm2020/scion-components-dimension.mjs +0 -135
  93. package/fesm2020/scion-components-dimension.mjs.map +0 -1
  94. package/fesm2020/scion-components-sashbox.mjs.map +0 -1
  95. package/fesm2020/scion-components-splitter.mjs.map +0 -1
  96. package/fesm2020/scion-components-throbber.mjs +0 -214
  97. package/fesm2020/scion-components-throbber.mjs.map +0 -1
  98. package/fesm2020/scion-components-viewport.mjs.map +0 -1
  99. /package/{esm2020 → esm2022}/dimension/public_api.mjs +0 -0
  100. /package/{esm2020 → esm2022}/dimension/scion-components-dimension.mjs +0 -0
  101. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  102. /package/{esm2020 → esm2022}/sashbox/sashbox-accessor.mjs +0 -0
  103. /package/{esm2020 → esm2022}/sashbox/scion-components-sashbox.mjs +0 -0
  104. /package/{esm2020 → esm2022}/scion-components.mjs +0 -0
  105. /package/{esm2020 → esm2022}/splitter/scion-components-splitter.mjs +0 -0
  106. /package/{esm2020 → esm2022}/throbber/public_api.mjs +0 -0
  107. /package/{esm2020 → esm2022}/throbber/scion-components-throbber.mjs +0 -0
  108. /package/{esm2020 → esm2022}/viewport/scion-components-viewport.mjs +0 -0
  109. /package/{fesm2020 → fesm2022}/scion-components.mjs +0 -0
  110. /package/{fesm2020 → fesm2022}/scion-components.mjs.map +0 -0
@@ -1,14 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Inject, NgZone, Component, ChangeDetectionStrategy, ViewChild, HostBinding, Input, Directive, EventEmitter, ViewEncapsulation, Output, HostListener, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/common';
4
- import { DOCUMENT, CommonModule } from '@angular/common';
2
+ import { Injectable, Inject, Directive, Input, NgZone, Component, ChangeDetectionStrategy, ViewChild, HostBinding, EventEmitter, ViewEncapsulation, Output, HostListener, NgModule } from '@angular/core';
5
3
  import { coerceElement } from '@angular/cdk/coercion';
6
- import { BehaviorSubject, Subject, fromEvent, of, merge, timer } from 'rxjs';
7
4
  import { debounceTime, startWith, map, distinctUntilChanged, takeUntil, switchMap, first, withLatestFrom, takeWhile } from 'rxjs/operators';
8
- import * as i3 from '@angular/cdk/scrolling';
9
- import { ScrollingModule } from '@angular/cdk/scrolling';
5
+ import { BehaviorSubject, Subject, fromEvent, merge, of, timer } from 'rxjs';
6
+ import { DOCUMENT, NgIf, AsyncPipe } from '@angular/common';
10
7
  import { fromDimension$, fromMutation$ } from '@scion/toolkit/observable';
11
8
  import { subscribeInside, filterArray } from '@scion/toolkit/operators';
9
+ import * as i2 from '@angular/cdk/scrolling';
10
+ import { ScrollingModule } from '@angular/cdk/scrolling';
12
11
 
13
12
  /*
14
13
  * Copyright (c) 2018-2019 Swiss Federal Railways
@@ -21,8 +20,6 @@ import { subscribeInside, filterArray } from '@scion/toolkit/operators';
21
20
  */
22
21
  /**
23
22
  * Provides the native scrollbar tracksize.
24
- *
25
- * @dynamic ignore 'strictMetadataEmit' errors due to the usage of {@link Document} as ambient type for DI.
26
23
  */
27
24
  class SciNativeScrollbarTrackSizeProvider {
28
25
  constructor(_document, _zone) {
@@ -97,10 +94,10 @@ class SciNativeScrollbarTrackSizeProvider {
97
94
  ngOnDestroy() {
98
95
  this._destroy$.next();
99
96
  }
97
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciNativeScrollbarTrackSizeProvider, deps: [{ token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
98
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciNativeScrollbarTrackSizeProvider, providedIn: 'root' }); }
100
99
  }
101
- SciNativeScrollbarTrackSizeProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciNativeScrollbarTrackSizeProvider, deps: [{ token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
102
- SciNativeScrollbarTrackSizeProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciNativeScrollbarTrackSizeProvider, providedIn: 'root' });
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciNativeScrollbarTrackSizeProvider, decorators: [{
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciNativeScrollbarTrackSizeProvider, decorators: [{
104
101
  type: Injectable,
105
102
  args: [{ providedIn: 'root' }]
106
103
  }], ctorParameters: function () { return [{ type: Document, decorators: [{
@@ -119,6 +116,95 @@ function setStyle(element, style) {
119
116
  Object.keys(style).forEach(key => element.style.setProperty(key, style[key]));
120
117
  }
121
118
 
119
+ /*
120
+ * Copyright (c) 2018-2019 Swiss Federal Railways
121
+ *
122
+ * This program and the accompanying materials are made
123
+ * available under the terms of the Eclipse Public License 2.0
124
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
125
+ *
126
+ * SPDX-License-Identifier: EPL-2.0
127
+ */
128
+ /**
129
+ * Makes the host element natively scrollable and hides native scrollbars by default, unless native scrollbars
130
+ * already sit on top of the viewport (e.g. in OS X).
131
+ *
132
+ * Because there is no cross-browser API to hide scrollbars without losing native scroll support, we set 'overflow'
133
+ * to 'scroll' but shift the native scrollbars out of the visible viewport area. The shift offset is computed upfront.
134
+ *
135
+ * This directive expects its host element to be the only child in document flow in its parent DOM element. It makes the host element
136
+ * fill up the entire space (width and height set to 100%). The parent element must have its CSS `overflow` property set to `hidden`
137
+ * to hide the pushed out native scrollbars.
138
+ */
139
+ class SciScrollableDirective {
140
+ constructor(_host, _renderer, nativeScrollbarTrackSizeProvider) {
141
+ this._host = _host;
142
+ this._renderer = _renderer;
143
+ this._destroy$ = new Subject();
144
+ this._inputChange$ = new Subject();
145
+ /**
146
+ * Controls whether to display native scrollbars.
147
+ * Has no effect if the native scrollbar sits on top of the content, e.g. in OS X.
148
+ */
149
+ this.isDisplayNativeScrollbar = false;
150
+ merge(nativeScrollbarTrackSizeProvider.trackSize$, this._inputChange$.pipe(map(() => nativeScrollbarTrackSizeProvider.trackSize)))
151
+ .pipe(takeUntil(this._destroy$))
152
+ .subscribe(nativeScrollbarTrackSize => {
153
+ if (nativeScrollbarTrackSize === null) { // the native scrollbar sits on top of the content
154
+ this.useNativeScrollbars();
155
+ }
156
+ else {
157
+ this.isDisplayNativeScrollbar ? this.useNativeScrollbars() : this.shiftNativeScrollbars(nativeScrollbarTrackSize);
158
+ }
159
+ });
160
+ }
161
+ /**
162
+ * Uses the native scrollbars when content overflows.
163
+ */
164
+ useNativeScrollbars() {
165
+ this.setStyle(this._host.nativeElement, {
166
+ overflow: 'auto',
167
+ width: '100%',
168
+ height: '100%',
169
+ marginRight: 0,
170
+ marginBottom: 0,
171
+ });
172
+ }
173
+ /**
174
+ * Shifts the native scrollbars out of the visible viewport area.
175
+ */
176
+ shiftNativeScrollbars(nativeScrollbarTrackSize) {
177
+ this.setStyle(this._host.nativeElement, {
178
+ overflow: 'scroll',
179
+ width: `calc(100% + ${nativeScrollbarTrackSize.vScrollbarTrackWidth}px`,
180
+ height: `calc(100% + ${nativeScrollbarTrackSize.hScrollbarTrackHeight}px`,
181
+ marginRight: `-${nativeScrollbarTrackSize.vScrollbarTrackWidth}px`,
182
+ marginBottom: `-${nativeScrollbarTrackSize.hScrollbarTrackHeight}px`,
183
+ });
184
+ }
185
+ setStyle(element, style) {
186
+ Object.keys(style).forEach(key => this._renderer.setStyle(element, key, style[key]));
187
+ }
188
+ ngOnChanges(changes) {
189
+ this._inputChange$.next();
190
+ }
191
+ ngOnDestroy() {
192
+ this._destroy$.next();
193
+ }
194
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciScrollableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SciNativeScrollbarTrackSizeProvider }], target: i0.ɵɵFactoryTarget.Directive }); }
195
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.1", type: SciScrollableDirective, isStandalone: true, selector: "[sciScrollable]", inputs: { isDisplayNativeScrollbar: ["sciScrollableDisplayNativeScrollbar", "isDisplayNativeScrollbar"] }, usesOnChanges: true, ngImport: i0 }); }
196
+ }
197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciScrollableDirective, decorators: [{
198
+ type: Directive,
199
+ args: [{
200
+ selector: '[sciScrollable]',
201
+ standalone: true,
202
+ }]
203
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SciNativeScrollbarTrackSizeProvider }]; }, propDecorators: { isDisplayNativeScrollbar: [{
204
+ type: Input,
205
+ args: ['sciScrollableDisplayNativeScrollbar']
206
+ }] } });
207
+
122
208
  /*
123
209
  * Copyright (c) 2018-2019 Swiss Federal Railways
124
210
  *
@@ -152,6 +238,32 @@ function setStyle(element, style) {
152
238
  * ```
153
239
  */
154
240
  class SciScrollbarComponent {
241
+ /**
242
+ * Timeout for debouncing viewport resize events that trigger the scroll position computation.
243
+ *
244
+ * Debouncing is particularly important in the context of Angular animations, since they continuously
245
+ * trigger resize events. Debouncing prevents the scrollbar from flickering, for example, when the user
246
+ * expands a panel that contains a viewport.
247
+ *
248
+ * @internal
249
+ */
250
+ static { this.VIEWPORT_RESIZE_DEBOUNCE_TIME = 50; }
251
+ get vertical() {
252
+ return this.direction === 'vscroll';
253
+ }
254
+ get horizontal() {
255
+ return this.direction === 'hscroll';
256
+ }
257
+ get scrolling() {
258
+ return this._lastDragPosition !== null;
259
+ }
260
+ /**
261
+ * The viewport to provide scrollbars for.
262
+ */
263
+ set setViewport(viewport) {
264
+ this._viewport = viewport;
265
+ this._viewportChange$.next();
266
+ }
155
267
  constructor(_host, _document, _zone) {
156
268
  this._host = _host;
157
269
  this._document = _document;
@@ -184,22 +296,6 @@ class SciScrollbarComponent {
184
296
  }
185
297
  });
186
298
  }
187
- get vertical() {
188
- return this.direction === 'vscroll';
189
- }
190
- get horizontal() {
191
- return this.direction === 'hscroll';
192
- }
193
- get scrolling() {
194
- return this._lastDragPosition !== null;
195
- }
196
- /**
197
- * The viewport to provide scrollbars for.
198
- */
199
- set setViewport(viewport) {
200
- this._viewport = viewport;
201
- this._viewportChange$.next();
202
- }
203
299
  /**
204
300
  * Computes the scroll position and updates CSS variables to render the scroll position in the UI.
205
301
  */
@@ -396,23 +492,13 @@ class SciScrollbarComponent {
396
492
  ngOnDestroy() {
397
493
  this._destroy$.next();
398
494
  }
495
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciScrollbarComponent, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
496
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: SciScrollbarComponent, isStandalone: true, selector: "sci-scrollbar", inputs: { direction: "direction", setViewport: ["viewport", "setViewport"] }, host: { properties: { "class.vertical": "this.vertical", "class.horizontal": "this.horizontal", "class.scrolling": "this.scrolling" } }, viewQueries: [{ propertyName: "thumbElement", first: true, predicate: ["thumb_handle"], descendants: true, static: true }], ngImport: i0, template: "<!-- scrolltrack to move the viewport client upwards (paging) -->\n<div class=\"scrolltrack-start\" (mousedown)=\"onScrollTrackMouseDown($event, 'up')\"></div>\n\n<!-- scrollthumb -->\n<div #thumb_handle\n class=\"thumb-handle\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd($event)\"\n (touchcancel)=\"onTouchEnd($event)\">\n <div class=\"thumb\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\">\n </div>\n</div>\n\n<!-- scrolltrack to move the viewport client downwards (paging) -->\n<div class=\"scrolltrack-end\" (mousedown)=\"onScrollTrackMouseDown($event, 'down')\"></div>\n", styles: ["@charset \"UTF-8\";:host{display:flex;border:2px solid transparent;box-sizing:border-box;--sci-scrollbar-color: rgb(78, 78, 78);--\\275sci-scrollbar-thumb-position-fr: 0;--\\275sci-scrollbar-thumb-size-fr: 0}:host.vertical{flex-direction:column}:host.horizontal{flex-direction:row}:host>div.scrolltrack-start{flex-grow:var(--\\275sci-scrollbar-thumb-position-fr)}:host>div.thumb-handle{flex-basis:20px;display:flex;flex-grow:var(--\\275sci-scrollbar-thumb-size-fr);align-items:center}:host>div.thumb-handle.vertical{flex-direction:column}:host>div.thumb-handle.horizontal{flex-direction:row}:host>div.thumb-handle>div.thumb{flex:auto;border-radius:4px;background-color:var(--sci-scrollbar-color);opacity:.4;transition-duration:125ms;transition-property:width,height;transition-timing-function:ease-out}:host>div.thumb-handle>div.thumb.vertical{width:60%}:host>div.thumb-handle>div.thumb.horizontal{height:60%}:host>div.scrolltrack-end{flex-grow:calc(1 - (var(--\\275sci-scrollbar-thumb-position-fr) + var(--\\275sci-scrollbar-thumb-size-fr)))}:host-context:not(.overflow){display:none}:host-context:hover>div.thumb-handle>div.thumb,:host-context(.scrolling)>div.thumb-handle>div.thumb{background-color:var(--sci-scrollbar-color);opacity:.75}:host-context:hover>div.thumb-handle>div.thumb.vertical,:host-context(.scrolling)>div.thumb-handle>div.thumb.vertical{width:100%}:host-context:hover>div.thumb-handle>div.thumb.horizontal,:host-context(.scrolling)>div.thumb-handle>div.thumb.horizontal{height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
399
497
  }
400
- /**
401
- * Timeout for debouncing viewport resize events that trigger the scroll position computation.
402
- *
403
- * Debouncing is particularly important in the context of Angular animations, since they continuously
404
- * trigger resize events. Debouncing prevents the scrollbar from flickering, for example, when the user
405
- * expands a panel that contains a viewport.
406
- *
407
- * @internal
408
- */
409
- SciScrollbarComponent.VIEWPORT_RESIZE_DEBOUNCE_TIME = 50;
410
- SciScrollbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciScrollbarComponent, deps: [{ token: i0.ElementRef }, { token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
411
- SciScrollbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: SciScrollbarComponent, selector: "sci-scrollbar", inputs: { direction: "direction", setViewport: ["viewport", "setViewport"] }, host: { properties: { "class.vertical": "this.vertical", "class.horizontal": "this.horizontal", "class.scrolling": "this.scrolling" } }, viewQueries: [{ propertyName: "thumbElement", first: true, predicate: ["thumb_handle"], descendants: true, static: true }], ngImport: i0, template: "<!-- scrolltrack to move the viewport client upwards (paging) -->\n<div class=\"scrolltrack-start\" (mousedown)=\"onScrollTrackMouseDown($event, 'up')\"></div>\n\n<!-- scrollthumb -->\n<div #thumb_handle\n class=\"thumb-handle\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd($event)\"\n (touchcancel)=\"onTouchEnd($event)\">\n <div class=\"thumb\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\">\n </div>\n</div>\n\n<!-- scrolltrack to move the viewport client downwards (paging) -->\n<div class=\"scrolltrack-end\" (mousedown)=\"onScrollTrackMouseDown($event, 'down')\"></div>\n", styles: ["@charset \"UTF-8\";:host{display:flex;border:2px solid transparent;box-sizing:border-box;--sci-scrollbar-color: rgb(78, 78, 78);--\\275sci-scrollbar-thumb-position-fr: 0;--\\275sci-scrollbar-thumb-size-fr: 0}:host.vertical{flex-direction:column}:host.horizontal{flex-direction:row}:host>div.scrolltrack-start{flex-grow:var(--\\275sci-scrollbar-thumb-position-fr)}:host>div.thumb-handle{flex-basis:20px;display:flex;flex-grow:var(--\\275sci-scrollbar-thumb-size-fr);align-items:center}:host>div.thumb-handle.vertical{flex-direction:column}:host>div.thumb-handle.horizontal{flex-direction:row}:host>div.thumb-handle>div.thumb{flex:auto;border-radius:4px;background-color:var(--sci-scrollbar-color);opacity:.4;transition-duration:125ms;transition-property:width,height;transition-timing-function:ease-out}:host>div.thumb-handle>div.thumb.vertical{width:60%}:host>div.thumb-handle>div.thumb.horizontal{height:60%}:host>div.scrolltrack-end{flex-grow:calc(1 - (var(--\\275sci-scrollbar-thumb-position-fr) + var(--\\275sci-scrollbar-thumb-size-fr)))}:host-context:not(.overflow){display:none}:host-context:hover>div.thumb-handle>div.thumb,:host-context(.scrolling)>div.thumb-handle>div.thumb{background-color:var(--sci-scrollbar-color);opacity:.75}:host-context:hover>div.thumb-handle>div.thumb.vertical,:host-context(.scrolling)>div.thumb-handle>div.thumb.vertical{width:100%}:host-context:hover>div.thumb-handle>div.thumb.horizontal,:host-context(.scrolling)>div.thumb-handle>div.thumb.horizontal{height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
412
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciScrollbarComponent, decorators: [{
498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciScrollbarComponent, decorators: [{
413
499
  type: Component,
414
- args: [{ selector: 'sci-scrollbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- scrolltrack to move the viewport client upwards (paging) -->\n<div class=\"scrolltrack-start\" (mousedown)=\"onScrollTrackMouseDown($event, 'up')\"></div>\n\n<!-- scrollthumb -->\n<div #thumb_handle\n class=\"thumb-handle\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd($event)\"\n (touchcancel)=\"onTouchEnd($event)\">\n <div class=\"thumb\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\">\n </div>\n</div>\n\n<!-- scrolltrack to move the viewport client downwards (paging) -->\n<div class=\"scrolltrack-end\" (mousedown)=\"onScrollTrackMouseDown($event, 'down')\"></div>\n", styles: ["@charset \"UTF-8\";:host{display:flex;border:2px solid transparent;box-sizing:border-box;--sci-scrollbar-color: rgb(78, 78, 78);--\\275sci-scrollbar-thumb-position-fr: 0;--\\275sci-scrollbar-thumb-size-fr: 0}:host.vertical{flex-direction:column}:host.horizontal{flex-direction:row}:host>div.scrolltrack-start{flex-grow:var(--\\275sci-scrollbar-thumb-position-fr)}:host>div.thumb-handle{flex-basis:20px;display:flex;flex-grow:var(--\\275sci-scrollbar-thumb-size-fr);align-items:center}:host>div.thumb-handle.vertical{flex-direction:column}:host>div.thumb-handle.horizontal{flex-direction:row}:host>div.thumb-handle>div.thumb{flex:auto;border-radius:4px;background-color:var(--sci-scrollbar-color);opacity:.4;transition-duration:125ms;transition-property:width,height;transition-timing-function:ease-out}:host>div.thumb-handle>div.thumb.vertical{width:60%}:host>div.thumb-handle>div.thumb.horizontal{height:60%}:host>div.scrolltrack-end{flex-grow:calc(1 - (var(--\\275sci-scrollbar-thumb-position-fr) + var(--\\275sci-scrollbar-thumb-size-fr)))}:host-context:not(.overflow){display:none}:host-context:hover>div.thumb-handle>div.thumb,:host-context(.scrolling)>div.thumb-handle>div.thumb{background-color:var(--sci-scrollbar-color);opacity:.75}:host-context:hover>div.thumb-handle>div.thumb.vertical,:host-context(.scrolling)>div.thumb-handle>div.thumb.vertical{width:100%}:host-context:hover>div.thumb-handle>div.thumb.horizontal,:host-context(.scrolling)>div.thumb-handle>div.thumb.horizontal{height:100%}\n"] }]
415
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
500
+ args: [{ selector: 'sci-scrollbar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<!-- scrolltrack to move the viewport client upwards (paging) -->\n<div class=\"scrolltrack-start\" (mousedown)=\"onScrollTrackMouseDown($event, 'up')\"></div>\n\n<!-- scrollthumb -->\n<div #thumb_handle\n class=\"thumb-handle\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd($event)\"\n (touchcancel)=\"onTouchEnd($event)\">\n <div class=\"thumb\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\">\n </div>\n</div>\n\n<!-- scrolltrack to move the viewport client downwards (paging) -->\n<div class=\"scrolltrack-end\" (mousedown)=\"onScrollTrackMouseDown($event, 'down')\"></div>\n", styles: ["@charset \"UTF-8\";:host{display:flex;border:2px solid transparent;box-sizing:border-box;--sci-scrollbar-color: rgb(78, 78, 78);--\\275sci-scrollbar-thumb-position-fr: 0;--\\275sci-scrollbar-thumb-size-fr: 0}:host.vertical{flex-direction:column}:host.horizontal{flex-direction:row}:host>div.scrolltrack-start{flex-grow:var(--\\275sci-scrollbar-thumb-position-fr)}:host>div.thumb-handle{flex-basis:20px;display:flex;flex-grow:var(--\\275sci-scrollbar-thumb-size-fr);align-items:center}:host>div.thumb-handle.vertical{flex-direction:column}:host>div.thumb-handle.horizontal{flex-direction:row}:host>div.thumb-handle>div.thumb{flex:auto;border-radius:4px;background-color:var(--sci-scrollbar-color);opacity:.4;transition-duration:125ms;transition-property:width,height;transition-timing-function:ease-out}:host>div.thumb-handle>div.thumb.vertical{width:60%}:host>div.thumb-handle>div.thumb.horizontal{height:60%}:host>div.scrolltrack-end{flex-grow:calc(1 - (var(--\\275sci-scrollbar-thumb-position-fr) + var(--\\275sci-scrollbar-thumb-size-fr)))}:host-context:not(.overflow){display:none}:host-context:hover>div.thumb-handle>div.thumb,:host-context(.scrolling)>div.thumb-handle>div.thumb{background-color:var(--sci-scrollbar-color);opacity:.75}:host-context:hover>div.thumb-handle>div.thumb.vertical,:host-context(.scrolling)>div.thumb-handle>div.thumb.vertical{width:100%}:host-context:hover>div.thumb-handle>div.thumb.horizontal,:host-context(.scrolling)>div.thumb-handle>div.thumb.horizontal{height:100%}\n"] }]
501
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: Document, decorators: [{
416
502
  type: Inject,
417
503
  args: [DOCUMENT]
418
504
  }] }, { type: i0.NgZone }]; }, propDecorators: { thumbElement: [{
@@ -431,95 +517,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
431
517
  type: Input
432
518
  }], setViewport: [{
433
519
  type: Input,
434
- args: ['viewport']
435
- }] } });
436
-
437
- /*
438
- * Copyright (c) 2018-2019 Swiss Federal Railways
439
- *
440
- * This program and the accompanying materials are made
441
- * available under the terms of the Eclipse Public License 2.0
442
- * which is available at https://www.eclipse.org/legal/epl-2.0/
443
- *
444
- * SPDX-License-Identifier: EPL-2.0
445
- */
446
- /**
447
- * Makes the host element natively scrollable and hides native scrollbars by default, unless native scrollbars
448
- * already sit on top of the viewport (e.g. in OS X).
449
- *
450
- * Because there is no cross-browser API to hide scrollbars without losing native scroll support, we set 'overflow'
451
- * to 'scroll' but shift the native scrollbars out of the visible viewport area. The shift offset is computed upfront.
452
- *
453
- * This directive expects its host element to be the only child in document flow in its parent DOM element. It makes the host element
454
- * fill up the entire space (width and height set to 100%). The parent element must have its CSS `overflow` property set to `hidden`
455
- * to hide the pushed out native scrollbars.
456
- */
457
- class SciScrollableDirective {
458
- constructor(_host, _renderer, nativeScrollbarTrackSizeProvider) {
459
- this._host = _host;
460
- this._renderer = _renderer;
461
- this._destroy$ = new Subject();
462
- this._inputChange$ = new Subject();
463
- /**
464
- * Controls whether to display native scrollbars.
465
- * Has no effect if the native scrollbar sits on top of the content, e.g. in OS X.
466
- */
467
- this.isDisplayNativeScrollbar = false;
468
- merge(nativeScrollbarTrackSizeProvider.trackSize$, this._inputChange$.pipe(map(() => nativeScrollbarTrackSizeProvider.trackSize)))
469
- .pipe(takeUntil(this._destroy$))
470
- .subscribe(nativeScrollbarTrackSize => {
471
- if (nativeScrollbarTrackSize === null) { // the native scrollbar sits on top of the content
472
- this.useNativeScrollbars();
473
- }
474
- else {
475
- this.isDisplayNativeScrollbar ? this.useNativeScrollbars() : this.shiftNativeScrollbars(nativeScrollbarTrackSize);
476
- }
477
- });
478
- }
479
- /**
480
- * Uses the native scrollbars when content overflows.
481
- */
482
- useNativeScrollbars() {
483
- this.setStyle(this._host.nativeElement, {
484
- overflow: 'auto',
485
- width: '100%',
486
- height: '100%',
487
- marginRight: 0,
488
- marginBottom: 0,
489
- });
490
- }
491
- /**
492
- * Shifts the native scrollbars out of the visible viewport area.
493
- */
494
- shiftNativeScrollbars(nativeScrollbarTrackSize) {
495
- this.setStyle(this._host.nativeElement, {
496
- overflow: 'scroll',
497
- width: `calc(100% + ${nativeScrollbarTrackSize.vScrollbarTrackWidth}px`,
498
- height: `calc(100% + ${nativeScrollbarTrackSize.hScrollbarTrackHeight}px`,
499
- marginRight: `-${nativeScrollbarTrackSize.vScrollbarTrackWidth}px`,
500
- marginBottom: `-${nativeScrollbarTrackSize.hScrollbarTrackHeight}px`,
501
- });
502
- }
503
- setStyle(element, style) {
504
- Object.keys(style).forEach(key => this._renderer.setStyle(element, key, style[key]));
505
- }
506
- ngOnChanges(changes) {
507
- this._inputChange$.next();
508
- }
509
- ngOnDestroy() {
510
- this._destroy$.next();
511
- }
512
- }
513
- SciScrollableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciScrollableDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: SciNativeScrollbarTrackSizeProvider }], target: i0.ɵɵFactoryTarget.Directive });
514
- SciScrollableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: SciScrollableDirective, selector: "[sciScrollable]", inputs: { isDisplayNativeScrollbar: ["sciScrollableDisplayNativeScrollbar", "isDisplayNativeScrollbar"] }, usesOnChanges: true, ngImport: i0 });
515
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciScrollableDirective, decorators: [{
516
- type: Directive,
517
- args: [{
518
- selector: '[sciScrollable]',
519
- }]
520
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: SciNativeScrollbarTrackSizeProvider }]; }, propDecorators: { isDisplayNativeScrollbar: [{
521
- type: Input,
522
- args: ['sciScrollableDisplayNativeScrollbar']
520
+ args: [{ alias: 'viewport', required: true }]
523
521
  }] } });
524
522
 
525
523
  /*
@@ -598,17 +596,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
598
596
  * ```
599
597
  */
600
598
  class SciViewportComponent {
601
- constructor(host, nativeScrollbarTrackSizeProvider) {
602
- this.host = host;
603
- this.nativeScrollbarTrackSizeProvider = nativeScrollbarTrackSizeProvider;
604
- this._scrollbarStyle = 'on-top';
605
- /**
606
- * Emits upon a scroll event.
607
- *
608
- * You can add [sciDimension] directive to the viewport or viewport client to be notified about layout changes.
609
- */
610
- this.scroll = new EventEmitter(); // eslint-disable-line @angular-eslint/no-output-native
611
- }
612
599
  /** @internal */
613
600
  set setViewport(viewport) {
614
601
  this._viewportElement = coerceElement(viewport);
@@ -627,6 +614,17 @@ class SciViewportComponent {
627
614
  get scrollbarStyle() {
628
615
  return this._scrollbarStyle;
629
616
  }
617
+ constructor(host, nativeScrollbarTrackSizeProvider) {
618
+ this.host = host;
619
+ this.nativeScrollbarTrackSizeProvider = nativeScrollbarTrackSizeProvider;
620
+ this._scrollbarStyle = 'on-top';
621
+ /**
622
+ * Emits upon a scroll event.
623
+ *
624
+ * You can add [sciDimension] directive to the viewport or viewport client to be notified about layout changes.
625
+ */
626
+ this.scroll = new EventEmitter(); // eslint-disable-line @angular-eslint/no-output-native
627
+ }
630
628
  focus() {
631
629
  this._viewportElement?.focus();
632
630
  }
@@ -774,12 +772,18 @@ class SciViewportComponent {
774
772
  } while (el !== this.host.nativeElement);
775
773
  return offset;
776
774
  }
775
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciViewportComponent, deps: [{ token: i0.ElementRef }, { token: SciNativeScrollbarTrackSizeProvider }], target: i0.ɵɵFactoryTarget.Component }); }
776
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: SciViewportComponent, isStandalone: true, selector: "sci-viewport", inputs: { scrollbarStyle: "scrollbarStyle" }, outputs: { scroll: "scroll" }, host: { listeners: { "focus": "focus()" } }, viewQueries: [{ propertyName: "setViewport", first: true, predicate: ["viewport"], descendants: true, static: true }, { propertyName: "setViewportClient", first: true, predicate: ["viewport_client"], descendants: true, static: true }], ngImport: i0, template: "<!-- viewport and viewport client -->\n<div #viewport\n class=\"viewport\"\n tabindex=\"-1\"\n sciScrollable [sciScrollableDisplayNativeScrollbar]=\"scrollbarStyle === 'native'\"\n cdkScrollable\n (scroll)=\"onScroll($event)\">\n <div #viewport_client class=\"viewport-client\" part=\"content\">\n <slot></slot>\n </div>\n</div>\n\n<!-- render emulated scrollbars which sit on-top -->\n<ng-container *ngIf=\"scrollbarStyle === 'on-top' && (nativeScrollbarTrackSizeProvider.trackSize$ | async) !== null\">\n <sci-scrollbar [direction]=\"'vscroll'\" [viewport]=\"viewport\" class=\"e2e-vertical\"></sci-scrollbar>\n <sci-scrollbar [direction]=\"'hscroll'\" [viewport]=\"viewport\" class=\"e2e-horizontal\"></sci-scrollbar>\n</ng-container>\n", styles: [":host{--sci-viewport-scrollbar-color: rgb(78, 78, 78);display:grid;grid-template-columns:100%;grid-template-rows:100%;position:relative;overflow:hidden;outline:none}:host:host-context(:not(:hover):not(:active)) sci-scrollbar:not(.scrolling){opacity:0}:host>div.viewport{display:grid;position:relative;outline:none;-webkit-overflow-scrolling:touch}:host>div.viewport>div.viewport-client{display:grid}:host>sci-scrollbar{--sci-scrollbar-color: var(--sci-viewport-scrollbar-color);position:absolute;transition-duration:1s;transition-property:opacity;transition-timing-function:ease-out}:host>sci-scrollbar.vertical{top:0;right:0;bottom:0;left:unset;width:12px}:host>sci-scrollbar.horizontal{top:unset;right:0;bottom:0;left:0;height:12px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i2.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "directive", type: SciScrollableDirective, selector: "[sciScrollable]", inputs: ["sciScrollableDisplayNativeScrollbar"] }, { kind: "component", type: SciScrollbarComponent, selector: "sci-scrollbar", inputs: ["direction", "viewport"] }], encapsulation: i0.ViewEncapsulation.ShadowDom }); }
777
777
  }
778
- SciViewportComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciViewportComponent, deps: [{ token: i0.ElementRef }, { token: SciNativeScrollbarTrackSizeProvider }], target: i0.ɵɵFactoryTarget.Component });
779
- SciViewportComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: SciViewportComponent, selector: "sci-viewport", inputs: { scrollbarStyle: "scrollbarStyle" }, outputs: { scroll: "scroll" }, host: { listeners: { "focus": "focus()" } }, viewQueries: [{ propertyName: "setViewport", first: true, predicate: ["viewport"], descendants: true, static: true }, { propertyName: "setViewportClient", first: true, predicate: ["viewport_client"], descendants: true, static: true }], ngImport: i0, template: "<!-- viewport and viewport client -->\n<div #viewport\n class=\"viewport\"\n tabindex=\"-1\"\n sciScrollable [sciScrollableDisplayNativeScrollbar]=\"scrollbarStyle === 'native'\"\n cdkScrollable\n (scroll)=\"onScroll($event)\">\n <div #viewport_client class=\"viewport-client\" part=\"content\">\n <slot></slot>\n </div>\n</div>\n\n<!-- render emulated scrollbars which sit on-top -->\n<ng-container *ngIf=\"scrollbarStyle === 'on-top' && (nativeScrollbarTrackSizeProvider.trackSize$ | async) !== null\">\n <sci-scrollbar [direction]=\"'vscroll'\" [viewport]=\"viewport\" class=\"e2e-vertical\"></sci-scrollbar>\n <sci-scrollbar [direction]=\"'hscroll'\" [viewport]=\"viewport\" class=\"e2e-horizontal\"></sci-scrollbar>\n</ng-container>\n", styles: [":host{--sci-viewport-content-grid-template-columns: auto;--sci-viewport-content-grid-template-rows: unset;--sci-viewport-content-grid-auto-columns: unset;--sci-viewport-content-grid-auto-rows: auto;--sci-viewport-content-grid-gap: 0 0;--sci-viewport-scrollbar-color: rgb(78, 78, 78);display:grid;grid-template-columns:100%;grid-template-rows:100%;position:relative;overflow:hidden;outline:none}:host:host-context(:not(:hover):not(:active)) sci-scrollbar:not(.scrolling){opacity:0}:host>div.viewport{display:grid;position:relative;outline:none;-webkit-overflow-scrolling:touch}:host>div.viewport>div.viewport-client{display:grid;grid-template-columns:var(--sci-viewport-content-grid-template-columns);grid-template-rows:var(--sci-viewport-content-grid-template-rows);grid-auto-rows:var(--sci-viewport-content-grid-auto-rows);grid-auto-columns:var(--sci-viewport-content-grid-auto-columns);gap:var(--sci-viewport-content-grid-gap)}:host>sci-scrollbar{--sci-scrollbar-color: var(--sci-viewport-scrollbar-color);position:absolute;transition-duration:1s;transition-property:opacity;transition-timing-function:ease-out}:host>sci-scrollbar.vertical{top:0;right:0;bottom:0;left:unset;width:12px}:host>sci-scrollbar.horizontal{top:unset;right:0;bottom:0;left:0;height:12px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "component", type: SciScrollbarComponent, selector: "sci-scrollbar", inputs: ["direction", "viewport"] }, { kind: "directive", type: SciScrollableDirective, selector: "[sciScrollable]", inputs: ["sciScrollableDisplayNativeScrollbar"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.ShadowDom });
780
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciViewportComponent, decorators: [{
778
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciViewportComponent, decorators: [{
781
779
  type: Component,
782
- args: [{ selector: 'sci-viewport', encapsulation: ViewEncapsulation.ShadowDom, template: "<!-- viewport and viewport client -->\n<div #viewport\n class=\"viewport\"\n tabindex=\"-1\"\n sciScrollable [sciScrollableDisplayNativeScrollbar]=\"scrollbarStyle === 'native'\"\n cdkScrollable\n (scroll)=\"onScroll($event)\">\n <div #viewport_client class=\"viewport-client\" part=\"content\">\n <slot></slot>\n </div>\n</div>\n\n<!-- render emulated scrollbars which sit on-top -->\n<ng-container *ngIf=\"scrollbarStyle === 'on-top' && (nativeScrollbarTrackSizeProvider.trackSize$ | async) !== null\">\n <sci-scrollbar [direction]=\"'vscroll'\" [viewport]=\"viewport\" class=\"e2e-vertical\"></sci-scrollbar>\n <sci-scrollbar [direction]=\"'hscroll'\" [viewport]=\"viewport\" class=\"e2e-horizontal\"></sci-scrollbar>\n</ng-container>\n", styles: [":host{--sci-viewport-content-grid-template-columns: auto;--sci-viewport-content-grid-template-rows: unset;--sci-viewport-content-grid-auto-columns: unset;--sci-viewport-content-grid-auto-rows: auto;--sci-viewport-content-grid-gap: 0 0;--sci-viewport-scrollbar-color: rgb(78, 78, 78);display:grid;grid-template-columns:100%;grid-template-rows:100%;position:relative;overflow:hidden;outline:none}:host:host-context(:not(:hover):not(:active)) sci-scrollbar:not(.scrolling){opacity:0}:host>div.viewport{display:grid;position:relative;outline:none;-webkit-overflow-scrolling:touch}:host>div.viewport>div.viewport-client{display:grid;grid-template-columns:var(--sci-viewport-content-grid-template-columns);grid-template-rows:var(--sci-viewport-content-grid-template-rows);grid-auto-rows:var(--sci-viewport-content-grid-auto-rows);grid-auto-columns:var(--sci-viewport-content-grid-auto-columns);gap:var(--sci-viewport-content-grid-gap)}:host>sci-scrollbar{--sci-scrollbar-color: var(--sci-viewport-scrollbar-color);position:absolute;transition-duration:1s;transition-property:opacity;transition-timing-function:ease-out}:host>sci-scrollbar.vertical{top:0;right:0;bottom:0;left:unset;width:12px}:host>sci-scrollbar.horizontal{top:unset;right:0;bottom:0;left:0;height:12px}\n"] }]
780
+ args: [{ selector: 'sci-viewport', encapsulation: ViewEncapsulation.ShadowDom, standalone: true, imports: [
781
+ NgIf,
782
+ AsyncPipe,
783
+ ScrollingModule,
784
+ SciScrollableDirective,
785
+ SciScrollbarComponent,
786
+ ], template: "<!-- viewport and viewport client -->\n<div #viewport\n class=\"viewport\"\n tabindex=\"-1\"\n sciScrollable [sciScrollableDisplayNativeScrollbar]=\"scrollbarStyle === 'native'\"\n cdkScrollable\n (scroll)=\"onScroll($event)\">\n <div #viewport_client class=\"viewport-client\" part=\"content\">\n <slot></slot>\n </div>\n</div>\n\n<!-- render emulated scrollbars which sit on-top -->\n<ng-container *ngIf=\"scrollbarStyle === 'on-top' && (nativeScrollbarTrackSizeProvider.trackSize$ | async) !== null\">\n <sci-scrollbar [direction]=\"'vscroll'\" [viewport]=\"viewport\" class=\"e2e-vertical\"></sci-scrollbar>\n <sci-scrollbar [direction]=\"'hscroll'\" [viewport]=\"viewport\" class=\"e2e-horizontal\"></sci-scrollbar>\n</ng-container>\n", styles: [":host{--sci-viewport-scrollbar-color: rgb(78, 78, 78);display:grid;grid-template-columns:100%;grid-template-rows:100%;position:relative;overflow:hidden;outline:none}:host:host-context(:not(:hover):not(:active)) sci-scrollbar:not(.scrolling){opacity:0}:host>div.viewport{display:grid;position:relative;outline:none;-webkit-overflow-scrolling:touch}:host>div.viewport>div.viewport-client{display:grid}:host>sci-scrollbar{--sci-scrollbar-color: var(--sci-viewport-scrollbar-color);position:absolute;transition-duration:1s;transition-property:opacity;transition-timing-function:ease-out}:host>sci-scrollbar.vertical{top:0;right:0;bottom:0;left:unset;width:12px}:host>sci-scrollbar.horizontal{top:unset;right:0;bottom:0;left:0;height:12px}\n"] }]
783
787
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SciNativeScrollbarTrackSizeProvider }]; }, propDecorators: { setViewport: [{
784
788
  type: ViewChild,
785
789
  args: ['viewport', { static: true }]
@@ -808,24 +812,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
808
812
  * Provides a viewport component with scrollbars that sit on top of the viewport client.
809
813
  */
810
814
  class SciViewportModule {
815
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciViewportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
816
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.1", ngImport: i0, type: SciViewportModule, imports: [SciViewportComponent,
817
+ SciScrollbarComponent,
818
+ SciScrollableDirective], exports: [SciViewportComponent,
819
+ SciScrollbarComponent,
820
+ SciScrollableDirective] }); }
821
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciViewportModule, imports: [SciViewportComponent] }); }
811
822
  }
812
- SciViewportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciViewportModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
813
- SciViewportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: SciViewportModule, declarations: [SciViewportComponent,
814
- SciScrollbarComponent,
815
- SciScrollableDirective], imports: [CommonModule,
816
- ScrollingModule], exports: [SciViewportComponent,
817
- SciScrollbarComponent,
818
- SciScrollableDirective] });
819
- SciViewportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciViewportModule, imports: [CommonModule,
820
- ScrollingModule] });
821
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: SciViewportModule, decorators: [{
823
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: SciViewportModule, decorators: [{
822
824
  type: NgModule,
823
825
  args: [{
824
826
  imports: [
825
- CommonModule,
826
- ScrollingModule,
827
- ],
828
- declarations: [
829
827
  SciViewportComponent,
830
828
  SciScrollbarComponent,
831
829
  SciScrollableDirective,
@@ -847,10 +845,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
847
845
  *
848
846
  * SPDX-License-Identifier: EPL-2.0
849
847
  */
848
+ /*
849
+ * Secondary entrypoint: '@scion/components/viewport'
850
+ *
851
+ * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md
852
+ */
850
853
 
851
854
  /**
852
855
  * Generated bundle index. Do not edit.
853
856
  */
854
857
 
855
- export { SciNativeScrollbarTrackSizeProvider, SciScrollableDirective, SciScrollbarComponent, SciViewportComponent, SciViewportModule };
858
+ export { SciScrollableDirective, SciScrollbarComponent, SciViewportComponent, SciViewportModule };
856
859
  //# sourceMappingURL=scion-components-viewport.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scion-components-viewport.mjs","sources":["../../../../projects/scion/components/viewport/src/native-scrollbar-track-size-provider.service.ts","../../../../projects/scion/components/viewport/src/scrollable.directive.ts","../../../../projects/scion/components/viewport/src/scrollbar/scrollbar.component.ts","../../../../projects/scion/components/viewport/src/scrollbar/scrollbar.component.html","../../../../projects/scion/components/viewport/src/viewport.component.ts","../../../../projects/scion/components/viewport/src/viewport.component.html","../../../../projects/scion/components/viewport/src/viewport.module.ts","../../../../projects/scion/components/viewport/src/public_api.ts","../../../../projects/scion/components/viewport/src/scion-components-viewport.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 {Inject, Injectable, NgZone, OnDestroy} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {BehaviorSubject, fromEvent, Observable, Subject} from 'rxjs';\nimport {debounceTime, distinctUntilChanged, map, startWith, takeUntil} from 'rxjs/operators';\n\n/**\n * Provides the native scrollbar tracksize.\n */\n@Injectable({providedIn: 'root'})\nexport class SciNativeScrollbarTrackSizeProvider implements OnDestroy {\n\n private readonly _trackSize$ = new BehaviorSubject<NativeScrollbarTrackSize | null>(null);\n private readonly _destroy$ = new Subject<void>();\n\n constructor(@Inject(DOCUMENT) private _document: Document, private _zone: NgZone) {\n this.installNativeScrollbarTrackSizeListener();\n }\n\n /**\n * Returns an {Observable} which emits the native scrollbar track size, if any, or else `null`.\n *\n * Upon subscription, it emits the track size immediately, and then continuously emits when the track size changes.\n */\n public get trackSize$(): Observable<NativeScrollbarTrackSize | null> {\n return this._trackSize$;\n }\n\n /**\n * Returns the native scrollbar track size, if any, or else `null`.\n */\n public get trackSize(): NativeScrollbarTrackSize | null {\n return this._trackSize$.getValue();\n }\n\n /**\n * Computes the native scrollbar track size.\n *\n * @returns native track size, or `null` if the native scrollbars sit on top of the content.\n */\n private computeTrackSize(): NativeScrollbarTrackSize | null {\n // create temporary viewport and viewport client with native scrollbars to compute scrolltrack width\n const viewportDiv = this._document.createElement('div');\n setStyle(viewportDiv, {\n position: 'absolute',\n overflow: 'scroll',\n height: '100px',\n width: '100px',\n border: 0,\n visibility: 'hidden',\n });\n\n const viewportClientDiv = this._document.createElement('div');\n setStyle(viewportClientDiv, {\n height: '100%',\n width: '100%',\n border: 0,\n });\n\n viewportDiv.appendChild(viewportClientDiv);\n this._document.body.appendChild(viewportDiv);\n\n const trackSize: NativeScrollbarTrackSize = {\n hScrollbarTrackHeight: viewportDiv.offsetHeight - viewportClientDiv.offsetHeight,\n vScrollbarTrackWidth: viewportDiv.offsetWidth - viewportClientDiv.offsetWidth,\n };\n\n // destroy temporary viewport\n this._document.body.removeChild(viewportDiv);\n if (trackSize.hScrollbarTrackHeight === 0 && trackSize.vScrollbarTrackWidth === 0) {\n return null;\n }\n\n return trackSize;\n }\n\n private installNativeScrollbarTrackSizeListener(): void {\n // We compute the size of the native scrollbar track when the browser fires the onresize window event.\n // This event is also fired on page zoom or when displaying a hidden document. Hidden documents do not have\n // a scrollbar track size until being displayed, e.g., after showing hidden iframes.\n this._zone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(\n debounceTime(5),\n startWith(null), // trigger the initial computation\n map(() => this.computeTrackSize()),\n distinctUntilChanged((t1, t2) => JSON.stringify(t1) === JSON.stringify(t2)),\n takeUntil(this._destroy$),\n )\n .subscribe(trackSize => {\n this._zone.run(() => this._trackSize$.next(trackSize));\n });\n });\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n }\n}\n\n/**\n * Applies the given style(s) to the given element.\n *\n * Specify styles to be modified by passing a dictionary containing CSS property names (hyphen case).\n * To remove a style, set its value to `null`.\n *\n * @ignore\n */\nfunction setStyle(element: HTMLElement, style: {[style: string]: any | null}): void {\n Object.keys(style).forEach(key => element.style.setProperty(key, style[key]));\n}\n\n/**\n * Represents the native scrollbar track size.\n */\nexport interface NativeScrollbarTrackSize {\n hScrollbarTrackHeight: number;\n vScrollbarTrackWidth: number;\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, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {NativeScrollbarTrackSize, SciNativeScrollbarTrackSizeProvider} from './native-scrollbar-track-size-provider.service';\nimport {map, takeUntil} from 'rxjs/operators';\nimport {merge, Subject} from 'rxjs';\nimport {Dictionary} from '@scion/toolkit/util';\n\n/**\n * Makes the host element natively scrollable and hides native scrollbars by default, unless native scrollbars\n * already sit on top of the viewport (e.g. in OS X).\n *\n * Because there is no cross-browser API to hide scrollbars without losing native scroll support, we set 'overflow'\n * to 'scroll' but shift the native scrollbars out of the visible viewport area. The shift offset is computed upfront.\n *\n * This directive expects its host element to be the only child in document flow in its parent DOM element. It makes the host element\n * fill up the entire space (width and height set to 100%). The parent element must have its CSS `overflow` property set to `hidden`\n * to hide the pushed out native scrollbars.\n */\n@Directive({\n selector: '[sciScrollable]',\n standalone: true,\n})\nexport class SciScrollableDirective implements OnChanges, OnDestroy {\n\n private _destroy$ = new Subject<void>();\n private _inputChange$ = new Subject<void>();\n\n /**\n * Controls whether to display native scrollbars.\n * Has no effect if the native scrollbar sits on top of the content, e.g. in OS X.\n */\n @Input('sciScrollableDisplayNativeScrollbar')// eslint-disable-line @angular-eslint/no-input-rename\n public isDisplayNativeScrollbar = false;\n\n constructor(private _host: ElementRef<HTMLDivElement>,\n private _renderer: Renderer2,\n nativeScrollbarTrackSizeProvider: SciNativeScrollbarTrackSizeProvider) {\n merge(\n nativeScrollbarTrackSizeProvider.trackSize$,\n this._inputChange$.pipe(map(() => nativeScrollbarTrackSizeProvider.trackSize)),\n )\n .pipe(takeUntil(this._destroy$))\n .subscribe(nativeScrollbarTrackSize => {\n if (nativeScrollbarTrackSize === null) { // the native scrollbar sits on top of the content\n this.useNativeScrollbars();\n }\n else {\n this.isDisplayNativeScrollbar ? this.useNativeScrollbars() : this.shiftNativeScrollbars(nativeScrollbarTrackSize);\n }\n });\n }\n\n /**\n * Uses the native scrollbars when content overflows.\n */\n private useNativeScrollbars(): void {\n this.setStyle(this._host.nativeElement, {\n overflow: 'auto',\n width: '100%',\n height: '100%',\n marginRight: 0,\n marginBottom: 0,\n });\n }\n\n /**\n * Shifts the native scrollbars out of the visible viewport area.\n */\n private shiftNativeScrollbars(nativeScrollbarTrackSize: NativeScrollbarTrackSize): void {\n this.setStyle(this._host.nativeElement, {\n overflow: 'scroll',\n width: `calc(100% + ${nativeScrollbarTrackSize.vScrollbarTrackWidth}px`,\n height: `calc(100% + ${nativeScrollbarTrackSize.hScrollbarTrackHeight}px`,\n marginRight: `-${nativeScrollbarTrackSize.vScrollbarTrackWidth}px`,\n marginBottom: `-${nativeScrollbarTrackSize.hScrollbarTrackHeight}px`,\n });\n }\n\n private setStyle(element: Element, style: Dictionary): void {\n Object.keys(style).forEach(key => this._renderer.setStyle(element, key, style[key]));\n }\n\n public ngOnChanges(changes: SimpleChanges): void {\n this._inputChange$.next();\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\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 {DOCUMENT} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, ElementRef, HostBinding, Inject, Input, NgZone, OnDestroy, ViewChild} from '@angular/core';\nimport {fromEvent, merge, Observable, of, Subject, timer} from 'rxjs';\nimport {debounceTime, first, map, startWith, switchMap, takeUntil, takeWhile, withLatestFrom} from 'rxjs/operators';\nimport {fromDimension$, fromMutation$} from '@scion/toolkit/observable';\nimport {filterArray, subscribeInside} from '@scion/toolkit/operators';\n\n/**\n * Renders a vertical or horizontal scrollbar.\n *\n * The scrollbar features the following functionality:\n * - allows to move the thumb by mouse or touch\n * - enlarges the thumb if the mouse pointer is near the thumb\n * - allows paging on mousedown on the scroll track\n *\n * ### CSS styling:\n *\n * You can override the following CSS variables:\n *\n * - sci-scrollbar-color: Sets the color of the scrollbar (by default, uses `rgb(78, 78, 78)`).\n *\n * Example:\n *\n * ```css\n *\n * sci-scrollbar {\n * --sci-scrollbar-color: blue;\n * }\n * ```\n */\n@Component({\n selector: 'sci-scrollbar',\n templateUrl: './scrollbar.component.html',\n styleUrls: ['./scrollbar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SciScrollbarComponent implements OnDestroy {\n\n /**\n * Timeout for debouncing viewport resize events that trigger the scroll position computation.\n *\n * Debouncing is particularly important in the context of Angular animations, since they continuously\n * trigger resize events. Debouncing prevents the scrollbar from flickering, for example, when the user\n * expands a panel that contains a viewport.\n *\n * @internal\n */\n public static readonly VIEWPORT_RESIZE_DEBOUNCE_TIME = 50;\n\n private _destroy$ = new Subject<void>();\n private _viewport!: HTMLElement;\n private _viewportChange$ = new Subject<void>();\n private _lastDragPosition: number | null = null;\n\n private _overflow = false;\n private _thumbSizeFr = 0;\n private _thumbPositionFr = 0;\n\n /* @docs-private */\n @ViewChild('thumb_handle', {static: true})\n public thumbElement!: ElementRef<HTMLDivElement>;\n\n @HostBinding('class.vertical')\n public get vertical(): boolean {\n return this.direction === 'vscroll';\n }\n\n @HostBinding('class.horizontal')\n public get horizontal(): boolean {\n return this.direction === 'hscroll';\n }\n\n @HostBinding('class.scrolling')\n public get scrolling(): boolean {\n return this._lastDragPosition !== null;\n }\n\n /**\n * Specifies the direction of the scrollbar.\n *\n * By default, if not specified, renders a vertical scrollbar.\n */\n @Input()\n public direction: 'vscroll' | 'hscroll' = 'vscroll';\n\n /**\n * The viewport to provide scrollbars for.\n */\n @Input({alias: 'viewport', required: true}) // eslint-disable-line @angular-eslint/no-input-rename\n public set setViewport(viewport: HTMLElement) {\n this._viewport = viewport;\n this._viewportChange$.next();\n }\n\n constructor(private _host: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) private _document: Document,\n private _zone: NgZone) {\n this._viewportChange$\n .pipe(\n switchMap(() => {\n if (!this._viewport) {\n return of(undefined);\n }\n return merge(\n this.viewportScrollChange$(),\n this.viewportDimensionChange$({debounceTime: SciScrollbarComponent.VIEWPORT_RESIZE_DEBOUNCE_TIME}),\n this.viewportClientDimensionChange$({debounceTime: SciScrollbarComponent.VIEWPORT_RESIZE_DEBOUNCE_TIME}),\n );\n }),\n subscribeInside(continueFn => this._zone.runOutsideAngular(continueFn)),\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n if (this._viewport) {\n this.renderScrollPosition();\n }\n else {\n this.unsetScrollPosition();\n }\n });\n }\n\n /**\n * Computes the scroll position and updates CSS variables to render the scroll position in the UI.\n */\n private renderScrollPosition(): void {\n NgZone.assertNotInAngularZone();\n const viewportSize = this.viewportSize;\n const viewportClientSize = this.viewportClientSize;\n const thumbPositionFr = this.scrollPosition / viewportClientSize;\n const thumbSizeFr = viewportSize / viewportClientSize;\n const overflow = viewportClientSize > viewportSize;\n\n if (thumbPositionFr !== this._thumbPositionFr || thumbSizeFr !== this._thumbSizeFr) {\n this._thumbPositionFr = thumbPositionFr;\n this._thumbSizeFr = thumbSizeFr;\n this.setCssVariable('--ɵsci-scrollbar-thumb-position-fr', thumbPositionFr);\n this.setCssVariable('--ɵsci-scrollbar-thumb-size-fr', thumbSizeFr);\n }\n\n if (overflow !== this._overflow) {\n this._overflow = overflow;\n overflow ? this._host.nativeElement.classList.add('overflow') : this._host.nativeElement.classList.remove('overflow');\n }\n }\n\n /**\n * Clears CSS variables used for rendering the scroll position in the UI.\n */\n private unsetScrollPosition(): void {\n NgZone.assertNotInAngularZone();\n this._thumbPositionFr = 0;\n this._thumbSizeFr = 0;\n this._overflow = false;\n this.setCssVariable('--ɵsci-scrollbar-thumb-position-fr', 0);\n this.setCssVariable('--ɵsci-scrollbar-thumb-size-fr', 0);\n this._host.nativeElement.classList.remove('overflow');\n }\n\n /* @docs-private */\n public onTouchStart(event: TouchEvent): void {\n event.preventDefault();\n this._lastDragPosition = this.vertical ? event.touches[0].screenY : event.touches[0].screenX;\n }\n\n /* @docs-private */\n public onTouchMove(event: TouchEvent): void {\n event.preventDefault();\n\n const newDragPositionPx = this.vertical ? event.touches[0].screenY : event.touches[0].screenX;\n const scrollbarPanPx = newDragPositionPx - this._lastDragPosition!;\n const viewportPanPx = this.toViewportPanPx(scrollbarPanPx);\n this._lastDragPosition = newDragPositionPx;\n this.moveViewportClient(viewportPanPx);\n }\n\n /* @docs-private */\n public onTouchEnd(event: TouchEvent): void {\n event.preventDefault();\n this._lastDragPosition = null;\n }\n\n /* @docs-private */\n public onMouseDown(mousedownEvent: MouseEvent): void {\n if (mousedownEvent.button !== 0) {\n return;\n }\n\n mousedownEvent.preventDefault();\n this._lastDragPosition = this.vertical ? mousedownEvent.screenY : mousedownEvent.screenX;\n\n // Listen for 'mousemove' events\n this._zone.runOutsideAngular(() => {\n const mousemoveListener = merge(fromEvent<MouseEvent>(this._document, 'mousemove'), fromEvent<MouseEvent>(this._document, 'sci-mousemove'))\n .pipe(takeUntil(this._destroy$))\n .subscribe(mousemoveEvent => {\n mousemoveEvent.preventDefault();\n\n const newDragPositionPx = this.vertical ? mousemoveEvent.screenY : mousemoveEvent.screenX;\n const scrollbarPanPx = newDragPositionPx - this._lastDragPosition!;\n const viewportPanPx = this.toViewportPanPx(scrollbarPanPx);\n this._lastDragPosition = newDragPositionPx;\n this.moveViewportClient(viewportPanPx);\n });\n\n // Listen for 'mouseup' events; use 'capture phase' and 'stop propagation' to not close overlays\n merge(fromEvent<MouseEvent>(this._document, 'mouseup', {capture: true}), fromEvent<MouseEvent>(this._document, 'sci-mouseup'))\n .pipe(first(), takeUntil(this._destroy$))\n .subscribe(mouseupEvent => {\n mouseupEvent.stopPropagation();\n mousemoveListener.unsubscribe();\n this._lastDragPosition = null;\n });\n });\n }\n\n /* @docs-private */\n public onScrollTrackMouseDown(event: MouseEvent, direction: 'up' | 'down'): void {\n const signum = (direction === 'up' ? -1 : +1);\n this.scrollWhileMouseDown(this.toViewportPanPx(signum * this.thumbSize), event);\n }\n\n /**\n * Projects the given scrollbar scroll pixels into viewport scroll pixels.\n */\n private toViewportPanPx(scrollbarPanPx: number): number {\n const scrollRangePx = this.trackSize - this.thumbSize;\n const scrollRatio = scrollbarPanPx / scrollRangePx;\n return scrollRatio * (this.viewportClientSize - this.viewportSize);\n }\n\n /**\n * Moves the viewport client by the specified numbers of pixels.\n */\n private moveViewportClient(viewportPanPx: number): void {\n if (this.vertical) {\n this._viewport.scrollTop += viewportPanPx;\n }\n else {\n this._viewport.scrollLeft += viewportPanPx;\n }\n }\n\n /**\n * Indicates if the content overflows.\n */\n public get overflow(): boolean {\n return this._overflow;\n }\n\n /**\n * Scrolls continuously while holding the mouse pressed, or until the mouse leaves the scrolltrack.\n */\n private scrollWhileMouseDown(viewportScrollPx: number, mousedownEvent: MouseEvent): void {\n // The `EventTarget` type of `Event.target` is not yet compatible with `FromEventTarget` used in `fromEvent`.\n // This will be fixed in rxjs version 7.0.0. Refer to https://github.com/ReactiveX/rxjs/commit/5f022d784570684632e6fd5ae247fc259ee34c4b\n // for more details.\n const scrollTrackElement = mousedownEvent.target as Element;\n\n // scroll continuously every 50ms after an initial delay of 250ms\n timer(250, 50)\n .pipe(\n // continue chain with latest mouse event\n withLatestFrom(merge(of(mousedownEvent), fromEvent<MouseEvent>(scrollTrackElement, 'mousemove')), (tick, event) => event),\n // start immediately\n startWith(mousedownEvent),\n // stop scrolling if the thumb hits the mouse pointer position\n takeWhile((event: MouseEvent) => scrollTrackElement === this._document.elementFromPoint(event.clientX, event.clientY)),\n debounceTime(10),\n // stop scrolling on mouseout or mouseup\n takeUntil(merge(fromEvent(scrollTrackElement, 'mouseout'), fromEvent(scrollTrackElement, 'mouseup'))),\n )\n .subscribe(() => {\n this.moveViewportClient(viewportScrollPx);\n });\n }\n\n /**\n * Emits whenever the viewport scrolls.\n */\n private viewportScrollChange$(): Observable<void> {\n return fromEvent(this._viewport, 'scroll', {passive: true}).pipe(map(() => undefined));\n }\n\n /**\n * Emits on subscription, and then each time the size of the viewport changes.\n */\n private viewportDimensionChange$(options: {debounceTime: number}): Observable<void> {\n return fromDimension$(this._viewport)\n .pipe(\n // Debouncing is particularly important in the context of Angular animations, since they continuously\n // trigger resize events. Debouncing prevents the scrollbar from flickering, for example, when the user\n // expands a panel that contains a viewport.\n debounceTime(options.debounceTime),\n map(() => undefined),\n );\n }\n\n /**\n * Emits on subscription, and then each time the size or style property of the viewport client changes.\n */\n private viewportClientDimensionChange$(options: {debounceTime: number}): Observable<void> {\n return this.children$(this._viewport)\n .pipe(\n switchMap(children => merge(...children.map(child => merge(\n fromDimension$(child),\n // Observe style mutations since some transformations change the scroll position without necessarily triggering a dimension change,\n // e.g., `scale` or `translate` used by some virtual scroll implementations\n fromMutation$(child, {subtree: false, childList: false, attributeFilter: ['style']})),\n ))),\n // Debouncing is particularly important in the context of Angular animations, since they continuously\n // trigger resize events. Debouncing prevents the scrollbar from flickering, for example, when the user\n // expands a panel that contains a viewport.\n debounceTime(options.debounceTime),\n map(() => undefined),\n );\n }\n\n /**\n * Emits the children of the passed element, and then each time child elements are added or removed.\n */\n private children$(element: HTMLElement): Observable<HTMLElement[]> {\n return fromMutation$(element, {subtree: false, childList: true})\n .pipe(\n startWith(undefined as void),\n map(() => Array.from(element.children)),\n filterArray((child: Element): child is HTMLElement => child instanceof HTMLElement),\n );\n }\n\n private setCssVariable(key: string, value: any): void {\n this._host.nativeElement.style.setProperty(key, value);\n }\n\n private get viewportSize(): number {\n return this._viewport ? (this.vertical ? this._viewport.clientHeight : this._viewport.clientWidth) : 0;\n }\n\n private get viewportClientSize(): number {\n return this._viewport ? (this.vertical ? this._viewport.scrollHeight : this._viewport.scrollWidth) : 0;\n }\n\n private get scrollPosition(): number {\n return this._viewport ? (this.vertical ? this._viewport.scrollTop : this._viewport.scrollLeft) : 0;\n }\n\n private get thumbSize(): number {\n const thumbElement = this.thumbElement.nativeElement;\n return this.vertical ? thumbElement.clientHeight : thumbElement.clientWidth;\n }\n\n private get trackSize(): number {\n const trackElement = this._host.nativeElement;\n return this.vertical ? trackElement.clientHeight : trackElement.clientWidth;\n }\n\n /* @docs-private */\n public ngOnDestroy(): void {\n this._destroy$.next();\n }\n}\n","<!-- scrolltrack to move the viewport client upwards (paging) -->\n<div class=\"scrolltrack-start\" (mousedown)=\"onScrollTrackMouseDown($event, 'up')\"></div>\n\n<!-- scrollthumb -->\n<div #thumb_handle\n class=\"thumb-handle\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\"\n (mousedown)=\"onMouseDown($event)\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd($event)\"\n (touchcancel)=\"onTouchEnd($event)\">\n <div class=\"thumb\"\n [class.vertical]=\"vertical\"\n [class.horizontal]=\"horizontal\">\n </div>\n</div>\n\n<!-- scrolltrack to move the viewport client downwards (paging) -->\n<div class=\"scrolltrack-end\" (mousedown)=\"onScrollTrackMouseDown($event, 'down')\"></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 {Component, ElementRef, EventEmitter, HostListener, Input, Output, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {SciNativeScrollbarTrackSizeProvider} from './native-scrollbar-track-size-provider.service';\nimport {coerceElement} from '@angular/cdk/coercion';\nimport {SciScrollableDirective} from './scrollable.directive';\nimport {SciScrollbarComponent} from './scrollbar/scrollbar.component';\nimport {ScrollingModule} from '@angular/cdk/scrolling';\nimport {AsyncPipe, NgIf} from '@angular/common';\n\n/**\n * Represents a viewport with slotted content (`<ng-content>`) used as scrollable content. By default, content is added to a CSS grid layout.\n *\n * The viewport component displays scrollbars when its content overflows. Scrollbars are displayed on top of the content, not next to it.\n * The component uses the native scrollbars of the operating system if they are already sitting on top, or falls back and renders scrollbars on top otherwise.\n * The viewport remains natively scrollable with the native scrollbars shifted out of the viewport's visible area. Consequently, the viewport keeps supporting\n * native scrolling features such as touch gestures, scroll speed acceleration, or scrolling near the viewport edges during drag-and-drop operations.\n *\n * ```html\n * <sci-viewport>\n * your content\n * </sci-viewport>\n * ```\n *\n * ## Adding the viewport to a layout\n *\n * Typically you would add the viewport component to a flexible layout, filling the remaining space vertically and horizontally, such as a flexbox container\n * with the viewport's `flex` CSS property set to either `flex: auto` or `flex: 1 1 0`.\n *\n * The viewport is sized according to its content width and height. It grows to absorb any free space, thus overflowing its content only when encountering\n * a layout constraint. Depending on the layout, different steps may be necessary to prevent the viewport from growing to infinity.\n *\n * - If practical, give the viewport a fixed size or a maximum size.\n * - If you add the viewport to a flexbox layout, make sure that it cannot exceed the available space. Instead, the viewport should fill the remaining space,\n * vertically and horizontally. Be aware that, by default, a flex item does not shrink below its minimum content size. To change this, set the viewport's\n * `flex-basis` to `0` (instead of `auto`), or use the CSS shorthand property `flex: 1 1 0`. The `flex-basis` defines the default size of a flex item before\n * the remaining extra space is distributed. If the viewport does not appear after setting this property, check its parent elements' content sizes.\n * As an alternative to setting `flex: 1 1 0`, change the setting to `flex: auto` and hide the overflow in the parent element, as follows: `overflow: hidden`.\n * Another approach would be to set the minimum height of all parents to `0`, as follows: `min-height: 0`.\n *\n * For the complete documentation on the flex layout and its features, refer to https://developer.mozilla.org/en-US/docs/Web/CSS/flex.\n *\n *\n * ## Layouting the viewport's slotted content\n *\n * By default, the viewport's content is added to a CSS grid container with a single column, filling remaining space vertically and horizontally.\n * Using the `::part(content)` pseudo element selector, you can configure the grid container or apply a different layout, such as a flex or flow layout.\n *\n * #### Example of adding slotted content to a CSS flex container.\n * ```css\n * sci-viewport::part(content) {\n * display: flex;\n * flex-direction: column;\n * }\n * ```\n *\n * #### Example of configuring CSS grid container with two columns\n * ```css\n * sci-viewport::part(content) {\n * grid-template-columns: 1fr 1fr;\n * gap: 1em;\n * }\n * ```\n *\n * ## Styling of scrollbars\n *\n * You can override the following CSS variables to control the appearance of the scrollbar:\n *\n * - sci-viewport-scrollbar-color: Sets the color of the scrollbar (by default, uses `rgb(78, 78, 78)`).\n *\n * ```css\n * sci-viewport {\n * --sci-viewport-scrollbar-color: blue;\n * }\n * ```\n */\n@Component({\n selector: 'sci-viewport',\n templateUrl: './viewport.component.html',\n styleUrls: ['./viewport.component.scss'],\n encapsulation: ViewEncapsulation.ShadowDom,\n standalone: true,\n imports: [\n NgIf,\n AsyncPipe,\n ScrollingModule,\n SciScrollableDirective,\n SciScrollbarComponent,\n ],\n})\nexport class SciViewportComponent {\n\n private _viewportElement!: HTMLDivElement;\n private _viewportClient!: HTMLDivElement;\n private _scrollbarStyle: ScrollbarStyle = 'on-top';\n\n /** @internal */\n @ViewChild('viewport', {static: true})\n public set setViewport(viewport: ElementRef<HTMLDivElement>) {\n this._viewportElement = coerceElement(viewport);\n }\n\n /** @internal */\n @ViewChild('viewport_client', {static: true})\n public set setViewportClient(viewportClient: ElementRef<HTMLDivElement>) {\n this._viewportClient = coerceElement(viewportClient);\n }\n\n /**\n * Controls whether to use native scrollbars or, which is by default, emulated scrollbars that sit on top of the viewport client.\n * In the latter, the viewport client remains natively scrollable.\n */\n @Input()\n public set scrollbarStyle(scrollbarStyle: ScrollbarStyle) {\n this._scrollbarStyle = scrollbarStyle || 'on-top';\n }\n\n public get scrollbarStyle(): ScrollbarStyle {\n return this._scrollbarStyle;\n }\n\n /**\n * Emits upon a scroll event.\n *\n * You can add [sciDimension] directive to the viewport or viewport client to be notified about layout changes.\n */\n @Output()\n public scroll = new EventEmitter<Event>(); // eslint-disable-line @angular-eslint/no-output-native\n\n constructor(public host: ElementRef<HTMLElement>, public nativeScrollbarTrackSizeProvider: SciNativeScrollbarTrackSizeProvider) {\n }\n\n @HostListener('focus')\n public focus(): void { // do not rename to expose the same focus method like `HTMLElement.focus()`.\n this._viewportElement?.focus();\n }\n\n public onScroll(event: Event): void {\n this.scroll.emit(event);\n }\n\n /**\n * Returns the number of pixels that the viewport client is scrolled vertically.\n *\n * @see Element.scrollTop\n */\n public get scrollTop(): number {\n return this._viewportElement.scrollTop;\n }\n\n /**\n * Sets the number of pixels that the viewport client is scrolled vertically.\n *\n * @see Element.scrollTop\n */\n public set scrollTop(scrollTop: number) {\n this._viewportElement.scrollTop = scrollTop;\n }\n\n /**\n * Returns the number of pixels that the viewport client is scrolled horizontally.\n *\n * @see Element.scrollLeft\n */\n public get scrollLeft(): number {\n return this._viewportElement.scrollLeft;\n }\n\n /**\n * Sets the number of pixels that the viewport client is scrolled horizontally.\n *\n * @see Element.scrollLeft\n */\n public set scrollLeft(scrollLeft: number) {\n this._viewportElement.scrollLeft = scrollLeft;\n }\n\n /**\n * Returns the height of the viewport client.\n *\n * @see Element.scrollHeight\n */\n public get scrollHeight(): number {\n return this._viewportElement.scrollHeight;\n }\n\n /**\n * Returns the width of the viewport client.\n *\n * @see Element.scrollWidth\n */\n public get scrollWidth(): number {\n return this._viewportElement.scrollWidth;\n }\n\n /**\n * Returns the viewport {HTMLElement}.\n */\n public get viewportElement(): HTMLElement {\n return this._viewportElement;\n }\n\n /**\n * Returns the viewport client {HTMLElement}.\n */\n public get viewportClientElement(): HTMLElement {\n return this._viewportClient;\n }\n\n /**\n * Checks if the specified element is scrolled into the viewport.\n *\n * @param element - the element to be checked\n * @param fit - control if the element must fully or partially fit into the viewport\n * @return `true` if the element is scrolled into the viewport, or `false` otherwise.\n */\n public isElementInView(element: ElementRef<HTMLElement> | HTMLElement, fit: 'full' | 'partial'): boolean {\n const elTop = this.computeOffset(element, 'top');\n if (elTop === null) {\n return false;\n }\n const elLeft = this.computeOffset(element, 'left');\n if (elLeft === null) {\n return false;\n }\n\n // Consider elements as scrolled into view when there is no viewport overflow.\n // The calculation of whether an element is scrolled into view may be wrong by a few pixels if the viewport contains elements with decimal sizes.\n // This can happen because `offsetLeft` and `offsetTop` operate on an integer (not a decimal), losing precision that can accumulate.\n // To avoid incorrect calculation when there is no viewport overflow, we consider all contained elements as scrolled into the view.\n if (this._viewportElement.scrollWidth <= this._viewportElement.clientWidth && this._viewportElement.scrollHeight <= this._viewportElement.clientHeight) {\n return true;\n }\n\n const elBottom = elTop + coerceElement(element).offsetHeight;\n const elRight = elLeft + coerceElement(element).offsetWidth;\n\n const vpTop = this._viewportElement.scrollTop;\n const vpLeft = this._viewportElement.scrollLeft;\n const vpBottom = vpTop + this._viewportElement.clientHeight;\n const vpRight = vpLeft + this._viewportElement.clientWidth;\n\n if (fit === 'full') {\n return (elTop >= vpTop && elBottom <= vpBottom) && (elLeft >= vpLeft && elRight <= vpRight);\n }\n else {\n return (elBottom >= vpTop && elTop <= vpBottom) && (elRight >= vpLeft && elLeft <= vpRight);\n }\n }\n\n /**\n * Scrolls the specified element into the viewport.\n *\n * @param element - the element to scroll into the viewport\n * @param offset - the gap between the element and the viewport\n */\n public scrollIntoView(element: ElementRef<HTMLElement> | HTMLElement, offset: number = 50): void {\n const top = this.computeOffset(element, 'top');\n if (top === null) {\n return;\n }\n const left = this.computeOffset(element, 'left');\n if (left === null) {\n return;\n }\n\n this._viewportElement.scrollTop = top - offset;\n this._viewportElement.scrollLeft = left - offset;\n }\n\n /**\n * Computes the distance of the element to the viewport's left or top border.\n *\n * @return distance of the element to the viewport's left or top border, or `null` if not contained\n * in the viewport or the element or any ancestor has the `display` property set to `none`.\n */\n public computeOffset(element: ElementRef<HTMLElement> | HTMLElement, border: 'left' | 'top'): number | null {\n let offset = 0;\n let el = coerceElement(element);\n do {\n offset += (border === 'left' ? el.offsetLeft : el.offsetTop);\n const offsetParent = el.offsetParent;\n if (offsetParent === null) {\n // `offsetParent` is `null` in the following situations:\n // - The element or any ancestor has the `display` property set to `none`\n // - The element has the position property set to fixed (Firefox returns <body>).\n // - The element is <body> or <html>.\n // See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent.\n return null;\n }\n if (!(offsetParent instanceof HTMLElement)) {\n return null;\n }\n el = offsetParent;\n } while (el !== this.host.nativeElement);\n\n return offset;\n }\n}\n\n/**\n * Represents a scrollbar style.\n */\nexport type ScrollbarStyle = 'native' | 'on-top' | 'hidden';\n","<!-- viewport and viewport client -->\n<div #viewport\n class=\"viewport\"\n tabindex=\"-1\"\n sciScrollable [sciScrollableDisplayNativeScrollbar]=\"scrollbarStyle === 'native'\"\n cdkScrollable\n (scroll)=\"onScroll($event)\">\n <div #viewport_client class=\"viewport-client\" part=\"content\">\n <slot></slot>\n </div>\n</div>\n\n<!-- render emulated scrollbars which sit on-top -->\n<ng-container *ngIf=\"scrollbarStyle === 'on-top' && (nativeScrollbarTrackSizeProvider.trackSize$ | async) !== null\">\n <sci-scrollbar [direction]=\"'vscroll'\" [viewport]=\"viewport\" class=\"e2e-vertical\"></sci-scrollbar>\n <sci-scrollbar [direction]=\"'hscroll'\" [viewport]=\"viewport\" class=\"e2e-horizontal\"></sci-scrollbar>\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 {SciViewportComponent} from './viewport.component';\nimport {SciScrollbarComponent} from './scrollbar/scrollbar.component';\nimport {SciScrollableDirective} from './scrollable.directive';\n\n/**\n * Provides a viewport component with scrollbars that sit on top of the viewport client.\n */\n@NgModule({\n imports: [\n SciViewportComponent,\n SciScrollbarComponent,\n SciScrollableDirective,\n ],\n exports: [\n SciViewportComponent,\n SciScrollbarComponent,\n SciScrollableDirective,\n ],\n})\nexport class SciViewportModule {\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/viewport'\n *\n * @see https://github.com/ng-packagr/ng-packagr/blob/master/docs/secondary-entrypoints.md\n */\nexport {SciViewportModule} from './viewport.module';\nexport {SciViewportComponent, ScrollbarStyle} from './viewport.component';\nexport {SciScrollbarComponent} from './scrollbar/scrollbar.component';\nexport {SciScrollableDirective} from './scrollable.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.SciNativeScrollbarTrackSizeProvider"],"mappings":";;;;;;;;;;;AAAA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