@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 @@
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/scrollbar/scrollbar.component.ts","../../../../projects/scion/components/viewport/src/scrollbar/scrollbar.component.html","../../../../projects/scion/components/viewport/src/scrollable.directive.ts","../../../../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 * @dynamic ignore 'strictMetadataEmit' errors due to the usage of {@link Document} as ambient type for DI.\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 {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})\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('viewport') // 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: any,\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 {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})\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: boolean = 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 {Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, ViewChild} from '@angular/core';\nimport {SciNativeScrollbarTrackSizeProvider} from './native-scrollbar-track-size-provider.service';\nimport {coerceElement} from '@angular/cdk/coercion';\n\n/**\n * Represents a viewport with the `<ng-content>` used as scrollable content. 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 content\n *\n * `NgContent` is added to a CSS grid container with, by default, a single column, filling remaining space vertically and horizontally.\n *\n * You can override the following CSS variables to control the grid:\n *\n * - sci-viewport-content-grid-template-columns: Defines the columns and their track sizes (by default, single column with track size auto)\n * - sci-viewport-content-grid-template-rows: Defines the rows and their track sizes (by default, single row with track size auto)\n * - sci-viewport-content-grid-auto-columns: Defines the track size of not explicitly declared columns.\n * - sci-viewport-content-grid-auto-rows: Defines the track size of not explicitly declared rows.\n * - sci-viewport-content-grid-gap: Sets the gaps (gutters) between rows and columns.\n *\n * Example of how to control the CSS grid:\n *\n * ```css\n * sci-viewport {\n * --sci-viewport-content-grid-auto-rows: min-content;\n * --sci-viewport-content-grid-gap: .5em; // specifies the row and column gap\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})\nexport class SciViewportComponent {\n\n private _viewport!: HTMLDivElement;\n private _viewportClient!: HTMLDivElement;\n private _scrollbarStyle: ScrollbarStyle = 'on-top';\n\n @HostBinding('attr.tabindex')\n public tabindex = -1; // make the viewport programmatically focusable but do not include it in the tab order\n\n /** @internal */\n @ViewChild('viewport', {static: true})\n public set setViewport(viewport: ElementRef<HTMLDivElement>) {\n this._viewport = 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._viewport && this._viewport.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._viewport.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._viewport.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._viewport.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._viewport.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._viewport.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._viewport.scrollWidth;\n }\n\n /**\n * Returns the viewport {HTMLElement}.\n */\n public get viewportElement(): HTMLElement {\n return this._viewport;\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 */\n public isElementInView(element: HTMLElement, fit: 'full' | 'partial'): boolean {\n const elLeft = this.computeOffset(element, 'left');\n const elRight = elLeft + element.offsetWidth;\n const elTop = this.computeOffset(element, 'top');\n const elBottom = elTop + element.offsetHeight;\n\n const vpLeft = this._viewport.scrollLeft;\n const vpRight = vpLeft + this._viewport.clientWidth;\n const vpTop = this._viewport.scrollTop;\n const vpBottom = vpTop + this._viewport.clientHeight;\n\n switch (fit) {\n case 'full':\n return (elLeft >= vpLeft && elRight <= vpRight) && (elTop >= vpTop && elBottom <= vpBottom);\n case 'partial':\n return (elRight >= vpLeft && elLeft <= vpRight) && (elBottom >= vpTop && elTop <= vpBottom);\n default:\n throw Error('Unsupported fit strategy');\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: HTMLElement, offset: number = 50): void {\n this._viewport.scrollTop = this.computeOffset(element, 'top') - offset;\n this._viewport.scrollLeft = this.computeOffset(element, 'left') - offset;\n }\n\n /**\n * Computes the distance of the element to the viewport's left or top border.\n */\n public computeOffset(element: HTMLElement, border: 'left' | 'top'): number {\n if (!isChildOf(element, this._viewport)) {\n throw Error('element not a child of the viewport');\n }\n\n let offset = 0;\n let el = element;\n do {\n offset += (border === 'left' ? el.offsetLeft : el.offsetTop);\n el = el.offsetParent as HTMLElement;\n } while (el !== null && el !== this._viewport);\n\n return offset;\n }\n}\n\n/**\n * Returns 'true' if the given element is a child element of the parent element.\n */\nfunction isChildOf(element: Element, parent: Element): boolean {\n while (element.parentElement !== null) {\n element = element.parentElement;\n if (element === parent) {\n return true;\n }\n }\n return false;\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\">\n <ng-content></ng-content>\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\"></sci-scrollbar>\n <sci-scrollbar [direction]=\"'hscroll'\" [viewport]=\"viewport\"></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 {CommonModule} from '@angular/common';\nimport {SciViewportComponent} from './viewport.component';\nimport {SciScrollbarComponent} from './scrollbar/scrollbar.component';\nimport {SciScrollableDirective} from './scrollable.directive';\nimport {ScrollingModule} from '@angular/cdk/scrolling';\n\n/**\n * Provides a viewport component with scrollbars that sit on top of the viewport client.\n */\n@NgModule({\n imports: [\n CommonModule,\n ScrollingModule,\n ],\n declarations: [\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 * from './viewport.component';\nexport * from './scrollable.directive';\nexport * from './scrollbar/scrollbar.component';\nexport * from './native-scrollbar-track-size-provider.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;AAeA;;;;;MAMa,mCAAmC;IAK9C,YAAsC,SAAmB,EAAU,KAAa;QAA1C,cAAS,GAAT,SAAS,CAAU;QAAU,UAAK,GAAL,KAAK,CAAQ;QAH/D,gBAAW,GAAG,IAAI,eAAe,CAAkC,IAAI,CAAC,CAAC;QACzE,cAAS,GAAG,IAAI,OAAO,EAAQ,CAAC;QAG/C,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AK,CAAC;AACf;;AEnRA;;;;;;;;;AAiBA;;;MAmBa,iBAAiB;;8GAAjB,iBAAiB;+GAAjB,iBAAiB,iBAV1B,oBAAoB;QACpB,qBAAqB;QACrB,sBAAsB,aANtB,YAAY;QACZ,eAAe,aAQf,oBAAoB;QACpB,qBAAqB;QACrB,sBAAsB;+GAGb,iBAAiB,YAfnB;YACP,YAAY;YACZ,eAAe;SAChB;2FAYU,iBAAiB;kBAhB7B,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;qBAChB;oBACD,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,qBAAqB;wBACrB,sBAAsB;qBACvB;oBACD,OAAO,EAAE;wBACP,oBAAoB;wBACpB,qBAAqB;wBACrB,sBAAsB;qBACvB;iBACF;;;ACnCD;;;;;;;;;;ACAA;;;;;;"}
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Copyright (c) 2018-2019 Swiss Federal Railways
3
+ *
4
+ * This program and the accompanying materials are made
5
+ * available under the terms of the Eclipse Public License 2.0
6
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
7
+ *
8
+ * SPDX-License-Identifier: EPL-2.0
9
+ */
10
+
11
+ /**
12
+ * Generated bundle index. Do not edit.
13
+ */
14
+ //# sourceMappingURL=scion-components.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scion-components.mjs","sources":["../../../../projects/scion/components/src/public-api.ts","../../../../projects/scion/components/src/scion-components.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\n/**\n * Primary entry point for all public APIs of this package.\n */\nexport {} from '';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;ACAA;;"}
package/package.json ADDED
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "@scion/components",
3
+ "version": "13.0.0",
4
+ "description": "Provides a collection of Angular components and directives primarily for use in SCION libraries such as `@scion/workbench` and `@scion/microfrontend-platform`. This library is not a comprehensive component library as its focus is on SCION requirements.",
5
+ "license": "EPL-2.0",
6
+ "private": false,
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "homepage": "https://github.com/SchweizerischeBundesbahnen/scion-toolkit",
11
+ "bugs": {
12
+ "url": "https://github.com/SchweizerischeBundesbahnen/scion-toolkit/issues"
13
+ },
14
+ "author": {
15
+ "name": "SCION contributors"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "sass": "./_components.scss",
20
+ "types": "./scion-components.d.ts",
21
+ "esm2020": "./esm2020/scion-components.mjs",
22
+ "es2020": "./fesm2020/scion-components.mjs",
23
+ "es2015": "./fesm2015/scion-components.mjs",
24
+ "node": "./fesm2015/scion-components.mjs",
25
+ "default": "./fesm2020/scion-components.mjs"
26
+ },
27
+ "./package.json": {
28
+ "default": "./package.json"
29
+ },
30
+ "./dimension": {
31
+ "types": "./dimension/scion-components-dimension.d.ts",
32
+ "esm2020": "./esm2020/dimension/scion-components-dimension.mjs",
33
+ "es2020": "./fesm2020/scion-components-dimension.mjs",
34
+ "es2015": "./fesm2015/scion-components-dimension.mjs",
35
+ "node": "./fesm2015/scion-components-dimension.mjs",
36
+ "default": "./fesm2020/scion-components-dimension.mjs"
37
+ },
38
+ "./sashbox": {
39
+ "types": "./sashbox/scion-components-sashbox.d.ts",
40
+ "esm2020": "./esm2020/sashbox/scion-components-sashbox.mjs",
41
+ "es2020": "./fesm2020/scion-components-sashbox.mjs",
42
+ "es2015": "./fesm2015/scion-components-sashbox.mjs",
43
+ "node": "./fesm2015/scion-components-sashbox.mjs",
44
+ "default": "./fesm2020/scion-components-sashbox.mjs"
45
+ },
46
+ "./splitter": {
47
+ "types": "./splitter/scion-components-splitter.d.ts",
48
+ "esm2020": "./esm2020/splitter/scion-components-splitter.mjs",
49
+ "es2020": "./fesm2020/scion-components-splitter.mjs",
50
+ "es2015": "./fesm2015/scion-components-splitter.mjs",
51
+ "node": "./fesm2015/scion-components-splitter.mjs",
52
+ "default": "./fesm2020/scion-components-splitter.mjs"
53
+ },
54
+ "./throbber": {
55
+ "types": "./throbber/scion-components-throbber.d.ts",
56
+ "esm2020": "./esm2020/throbber/scion-components-throbber.mjs",
57
+ "es2020": "./fesm2020/scion-components-throbber.mjs",
58
+ "es2015": "./fesm2015/scion-components-throbber.mjs",
59
+ "node": "./fesm2015/scion-components-throbber.mjs",
60
+ "default": "./fesm2020/scion-components-throbber.mjs"
61
+ },
62
+ "./viewport": {
63
+ "types": "./viewport/scion-components-viewport.d.ts",
64
+ "esm2020": "./esm2020/viewport/scion-components-viewport.mjs",
65
+ "es2020": "./fesm2020/scion-components-viewport.mjs",
66
+ "es2015": "./fesm2015/scion-components-viewport.mjs",
67
+ "node": "./fesm2015/scion-components-viewport.mjs",
68
+ "default": "./fesm2020/scion-components-viewport.mjs"
69
+ }
70
+ },
71
+ "dependencies": {
72
+ "tslib": "^2.0.0"
73
+ },
74
+ "peerDependencies": {
75
+ "@angular/common": "^13.0.0",
76
+ "@angular/core": "^13.0.0",
77
+ "@angular/cdk": "^13.0.0",
78
+ "@scion/toolkit": "^1.0.0",
79
+ "rxjs": "^7.5.0"
80
+ },
81
+ "keywords": [],
82
+ "repository": {
83
+ "type": "git",
84
+ "url": "https://github.com/SchweizerischeBundesbahnen/scion-toolkit.git"
85
+ },
86
+ "module": "fesm2015/scion-components.mjs",
87
+ "es2020": "fesm2020/scion-components.mjs",
88
+ "esm2020": "esm2020/scion-components.mjs",
89
+ "fesm2020": "fesm2020/scion-components.mjs",
90
+ "fesm2015": "fesm2015/scion-components.mjs",
91
+ "typings": "scion-components.d.ts",
92
+ "sideEffects": false
93
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Primary entry point for all public APIs of this package.
3
+ */
4
+ export {} from '';
@@ -0,0 +1,12 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Provides access to the native {@link HTMLElement} of the host.
5
+ */
6
+ export declare class SciElementRefDirective {
7
+ host: ElementRef<HTMLElement>;
8
+ readonly nativeElement: HTMLElement;
9
+ constructor(host: ElementRef<HTMLElement>);
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<SciElementRefDirective, never>;
11
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SciElementRefDirective, "[sciElementRef]", ["sciElementRef"], {}, {}, never>;
12
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "module": "../fesm2015/scion-components-sashbox.mjs",
3
+ "es2020": "../fesm2020/scion-components-sashbox.mjs",
4
+ "esm2020": "../esm2020/sashbox/scion-components-sashbox.mjs",
5
+ "fesm2020": "../fesm2020/scion-components-sashbox.mjs",
6
+ "fesm2015": "../fesm2015/scion-components-sashbox.mjs",
7
+ "typings": "scion-components-sashbox.d.ts",
8
+ "sideEffects": false,
9
+ "name": "@scion/components/sashbox"
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from './sashbox.component';
2
+ export * from './sash.directive';
3
+ export * from './sashbox.module';
@@ -0,0 +1,14 @@
1
+ import { ElementRef, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { SciSashDirective } from './sash.directive';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Initializes {SashDirective} with the target {HTMLDivElement}.
6
+ */
7
+ export declare class SciSashInitializerDirective implements OnChanges {
8
+ private _host;
9
+ sash: SciSashDirective;
10
+ constructor(_host: ElementRef<HTMLDivElement>);
11
+ ngOnChanges(changes: SimpleChanges): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<SciSashInitializerDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SciSashInitializerDirective, "div[sciSashInitializer].sash", never, { "sash": "sciSashInitializer"; }, {}, never>;
14
+ }
@@ -0,0 +1,60 @@
1
+ import { OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
+ import { SciSashBoxAccessor } from './sashbox-accessor';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Use this directive to model a sash for {@link SciSashboxComponent}.
6
+ * The host element of this modelling directive must be a <ng-template> which is used as sash template.
7
+ *
8
+ *
9
+ * ### Usage:
10
+ *
11
+ * <sci-sashbox direction="row">
12
+ * <!-- fixed size sash -->
13
+ * <ng-template sciSash size="200px">
14
+ * ...
15
+ * </ng-template>
16
+ *
17
+ * <!-- sash which takes the remaining space -->
18
+ * <ng-template sciSash>
19
+ * ...
20
+ * </ng-template>
21
+ * </sci-sashbox>
22
+ */
23
+ export declare class SciSashDirective implements OnInit, OnChanges {
24
+ readonly sashTemplate: TemplateRef<void>;
25
+ private _sashBoxAccessor;
26
+ private _size;
27
+ private _flexGrow$;
28
+ /**
29
+ * Specifies the sash size, either as fixed size with an explicit unit,
30
+ * or as a unitless proportion to distibute remaining space. A proportional
31
+ * sash has the ability to grow or shrink if necessary, and must be >= 1.
32
+ *
33
+ * If not set, remaining space is distributed equally.
34
+ */
35
+ set size(size: string | number);
36
+ get size(): string | number;
37
+ /**
38
+ * Specifies the minimal sash size in pixel or percent.
39
+ * The min-size prevents the user from shrinking the sash below this minimal size.
40
+ *
41
+ * If the unit is omitted, the value is interpreted as a pixel value.
42
+ */
43
+ minSize?: string | number;
44
+ constructor(sashTemplate: TemplateRef<void>, _sashBoxAccessor: SciSashBoxAccessor);
45
+ ngOnInit(): void;
46
+ ngOnChanges(changes: SimpleChanges): void;
47
+ /**
48
+ * Computes and sets the flex item properties based on the modelled size.
49
+ */
50
+ private setFlexItemProperties;
51
+ /**
52
+ * Computes the normalized flex-grow proportion of the given sash, which is a value >= 1.
53
+ *
54
+ * If the sum of all flex-grow proportions would be less than 1, then, the sashes would not fill the entire sash-box space.
55
+ * Without normalization in place, e.g., this could happen when removing a sash.
56
+ */
57
+ private normalizeFlexGrow;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<SciSashDirective, never>;
59
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SciSashDirective, "ng-template[sciSash]", ["sciSash"], { "size": "size"; "minSize": "minSize"; }, {}, never>;
60
+ }
@@ -0,0 +1,10 @@
1
+ import { SciSashDirective } from './sash.directive';
2
+ import { Observable } from 'rxjs';
3
+ /**
4
+ * Allows accessing the sashbox component from sashes.
5
+ */
6
+ export declare abstract class SciSashBoxAccessor {
7
+ abstract get sashes(): SciSashDirective[];
8
+ abstract get sashes$(): Observable<SciSashDirective[]>;
9
+ abstract get direction(): 'column' | 'row';
10
+ }
@@ -0,0 +1,90 @@
1
+ import { ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
2
+ import { BehaviorSubject } from 'rxjs';
3
+ import { SplitterMoveEvent } from '@scion/components/splitter';
4
+ import { SciSashDirective } from './sash.directive';
5
+ import { SciSashBoxAccessor } from './sashbox-accessor';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * The <sci-sashbox> is like a CSS flexbox container that lays out its content children (sashes) in a row (which is by default)
9
+ * or column arrangement (as specified by the direction property). A splitter is added between each child to allow the user to
10
+ * shrink or stretch the individual sashes.
11
+ *
12
+ * Sashes are modelled as content children inside a <ng-template> decorated with the 'sciSash' directive.
13
+ * A sash can have a fixed size with an explicit unit, or a unitless proportion to distibute remaining space.
14
+ * A proportional sash has the ability to grow or shrink if necessary.
15
+ *
16
+ *
17
+ * ### Usage:
18
+ *
19
+ * ```html
20
+ * <sci-sashbox direction="row">
21
+ * <ng-template sciSash size="1">
22
+ * ...
23
+ * </ng-template>
24
+ *
25
+ * <ng-template sciSash size="2">
26
+ * ...
27
+ * </ng-template>
28
+ *
29
+ * <ng-template sciSash size="1">
30
+ * ...
31
+ * </ng-template>
32
+ * </sci-sashbox>
33
+ * ```
34
+ *
35
+ * ### Theme override:
36
+ * The default style of the sashbox is made up of shades of gray.
37
+ * You can control the appearance by overriding the following CSS variables:
38
+ *
39
+ * - --sci-sashbox-gap: Sets the gaps (gutters) between sashes.
40
+ * - --sci-sashbox-splitter-bgcolor: Sets the background color of the splitter.
41
+ * - --sci-sashbox-splitter-bgcolor_hover: Sets the background color of the splitter when hovering it.
42
+ * - --sci-sashbox-splitter-size: Sets the size of the splitter along the main axis.
43
+ * - --sci-sashbox-splitter-size_hover: Sets the size of the splitter along the main axis when hovering it.
44
+ * - --sci-sashbox-splitter-touch-target-size: Sets the touch target size to move the splitter (accessibility).
45
+ * - --sci-sashbox-splitter-cross-axis-size: Sets the splitter size along the cross axis.
46
+ * - --sci-sashbox-splitter-border-radius: Sets the border radius of the splitter.
47
+ * - --sci-sashbox-splitter-opacity_active: Sets the opacity of the splitter while the user moves the splitter.
48
+ * - --sci-sashbox-splitter-opacity_hover: Sets the opacity of the splitter when hovering it.
49
+ *
50
+ * Example:
51
+ *
52
+ * ```scss
53
+ * sci-sashbox {
54
+ * --sci-sashbox-splitter-bgcolor: black;
55
+ * --sci-sashbox-splitter-bgcolor_hover: black;
56
+ * }
57
+ * ```
58
+ */
59
+ export declare class SciSashboxComponent implements OnDestroy {
60
+ private _host;
61
+ private _zone;
62
+ private _destroy$;
63
+ sashes$: BehaviorSubject<SciSashDirective[]>;
64
+ sashing: boolean;
65
+ /**
66
+ * Specifies if to lay out sashes in a row (which is by default) or column arrangement.
67
+ */
68
+ direction: 'column' | 'row';
69
+ /**
70
+ * Emits when start sashing.
71
+ */
72
+ sashStart: EventEmitter<void>;
73
+ /**
74
+ * Emits the absolute sash sizes (px) when finished sashing.
75
+ */
76
+ sashEnd: EventEmitter<number[]>;
77
+ constructor(_host: ElementRef<HTMLElement>, _zone: NgZone);
78
+ onSashStart(): void;
79
+ onSashEnd(): void;
80
+ onSash(splitter: HTMLElement, sashIndex: number, moveEvent: SplitterMoveEvent): void;
81
+ onSashReset(sashIndex: number): void;
82
+ get isColumnDirection(): boolean;
83
+ get isRowDirection(): boolean;
84
+ private get sashes();
85
+ ngOnDestroy(): void;
86
+ private toPixel;
87
+ static ɵfac: i0.ɵɵFactoryDeclaration<SciSashboxComponent, never>;
88
+ static ɵcmp: i0.ɵɵComponentDeclaration<SciSashboxComponent, "sci-sashbox", never, { "direction": "direction"; }, { "sashStart": "sashStart"; "sashEnd": "sashEnd"; }, ["setSashes"], never>;
89
+ }
90
+ export declare function provideSashBoxAccessor(component: SciSashboxComponent): SciSashBoxAccessor;
@@ -0,0 +1,33 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./sashbox.component";
3
+ import * as i2 from "./sash.directive";
4
+ import * as i3 from "./sash-initializer.directive";
5
+ import * as i4 from "./element-ref.directive";
6
+ import * as i5 from "@angular/common";
7
+ import * as i6 from "@scion/components/splitter";
8
+ /**
9
+ * Provides a sashbox component that lays out its children in a row or column arrangement and places a splitter between each child.
10
+ *
11
+ * ### Usage:
12
+ *
13
+ * ```html
14
+ * <sci-sashbox direction="row">
15
+ * <ng-template sciSash size="1">
16
+ * ...
17
+ * </ng-template>
18
+ *
19
+ * <ng-template sciSash size="2">
20
+ * ...
21
+ * </ng-template>
22
+ *
23
+ * <ng-template sciSash size="1">
24
+ * ...
25
+ * </ng-template>
26
+ * </sci-sashbox>
27
+ * ```
28
+ */
29
+ export declare class SciSashboxModule {
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<SciSashboxModule, never>;
31
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SciSashboxModule, [typeof i1.SciSashboxComponent, typeof i2.SciSashDirective, typeof i3.SciSashInitializerDirective, typeof i4.SciElementRefDirective], [typeof i5.CommonModule, typeof i6.SciSplitterModule], [typeof i1.SciSashboxComponent, typeof i2.SciSashDirective]>;
32
+ static ɵinj: i0.ɵɵInjectorDeclaration<SciSashboxModule>;
33
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@scion/components/sashbox" />
5
+ export * from './public_api';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@scion/components" />
5
+ export * from './public-api';
@@ -0,0 +1,10 @@
1
+ {
2
+ "module": "../fesm2015/scion-components-splitter.mjs",
3
+ "es2020": "../fesm2020/scion-components-splitter.mjs",
4
+ "esm2020": "../esm2020/splitter/scion-components-splitter.mjs",
5
+ "fesm2020": "../fesm2020/scion-components-splitter.mjs",
6
+ "fesm2015": "../fesm2015/scion-components-splitter.mjs",
7
+ "typings": "scion-components-splitter.d.ts",
8
+ "sideEffects": false,
9
+ "name": "@scion/components/splitter"
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './splitter.component';
2
+ export * from './splitter.module';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@scion/components/splitter" />
5
+ export * from './public_api';
@@ -0,0 +1,104 @@
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Represents a splitter, a visual element that allows the user to control the size of elements next to it.
5
+ *
6
+ * The splitter has a handle that the user can move depending on the orientation of the splitter.
7
+ *
8
+ * Note that this control neither does change the size of adjacent elements nor does it (re-)position itself, but emits the distance by
9
+ * which the user has theoretically moved the splitter. You must subscribe to these events and change your layout accordingly.
10
+ *
11
+ * In the toolkit, {@link SciSashboxComponent} uses this splitter to divide a layout into several resizable sections.
12
+ * Another use case would be a resizable sidebar panel.
13
+ *
14
+ * ### Usage:
15
+ *
16
+ * ```html
17
+ * <sci-splitter (move)="onSplitterMove($event.distance)"></sci-splitter>
18
+ * ```
19
+ *
20
+ * ### Theme override:
21
+ * The default style of the splitter is made up of shades of gray.
22
+ * You can control the appearance by overriding the following CSS variables:
23
+ *
24
+ * - --sci-splitter-bgcolor: Sets the background color of the splitter.
25
+ * - --sci-splitter-bgcolor_hover: Sets the background color of the splitter when hovering it.
26
+ * - --sci-splitter-size: Sets the size of the splitter along the main axis.
27
+ * - --sci-splitter-size_hover: Sets the size of the splitter along the main axis when hovering it.
28
+ * - --sci-splitter-touch-target-size: Sets the touch target size to move the splitter (accessibility).
29
+ * - --sci-splitter-cross-axis-size: Sets the splitter size along the cross axis.
30
+ * - --sci-splitter-border-radius: Sets the border radius of the splitter.
31
+ * - --sci-splitter-opacity_active: Sets the opacity of the splitter while the user moves the splitter.
32
+ * - --sci-splitter-opacity_hover: Sets the opacity of the splitter when hovering it.
33
+ *
34
+ * Example:
35
+ *
36
+ * ```scss
37
+ * sci-splitter {
38
+ * --sci-splitter-bgcolor: black;
39
+ * --sci-splitter-bgcolor_hover: black;
40
+ * }
41
+ * ```
42
+ *
43
+ * @dynamic ignore 'strictMetadataEmit' errors due to the usage of {@link Document} as ambient type for DI.
44
+ */
45
+ export declare class SciSplitterComponent implements OnInit, OnDestroy {
46
+ private _zone;
47
+ private _cd;
48
+ private _document;
49
+ private _destroy$;
50
+ moving: boolean;
51
+ get isVertical(): boolean;
52
+ get isHorizontal(): boolean;
53
+ /**
54
+ * Controls whether to render a vertical or horizontal splitter.
55
+ * By default, if not specified, renders a vertical splitter.
56
+ */
57
+ orientation: 'vertical' | 'horizontal';
58
+ /**
59
+ * Emits when starting to move the splitter.
60
+ */
61
+ start: EventEmitter<void>;
62
+ /**
63
+ * Emits the distance in pixels when the splitter is moved.
64
+ * The event is emitted outside of the Angular zone.
65
+ */
66
+ move: EventEmitter<SplitterMoveEvent>;
67
+ /**
68
+ * Emits when ending to move the splitter.
69
+ */
70
+ end: EventEmitter<void>;
71
+ /**
72
+ * Emits when to reset the splitter position.
73
+ */
74
+ reset: EventEmitter<void>;
75
+ get splitterCursor(): string;
76
+ touchTargetElementRef: ElementRef<HTMLElement>;
77
+ constructor(_zone: NgZone, _cd: ChangeDetectorRef, _document: Document);
78
+ ngOnInit(): void;
79
+ private onReset;
80
+ private onTouchStart;
81
+ private onMouseDown;
82
+ private installMoveListener;
83
+ ngOnDestroy(): void;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<SciSplitterComponent, never>;
85
+ static ɵcmp: i0.ɵɵComponentDeclaration<SciSplitterComponent, "sci-splitter", never, { "orientation": "orientation"; }, { "start": "start"; "move": "move"; "end": "end"; "reset": "reset"; }, never, never>;
86
+ }
87
+ export interface EventPosition {
88
+ clientPos: number;
89
+ pagePos: number;
90
+ screenPos: number;
91
+ }
92
+ /**
93
+ * Event that is emitted when moving the splitter.
94
+ */
95
+ export interface SplitterMoveEvent {
96
+ /**
97
+ * The distance in pixels by which the user has moved the splitter since the last emission.
98
+ */
99
+ distance: number;
100
+ /**
101
+ * The position where the mouse or touch event has occurred.
102
+ */
103
+ position: EventPosition;
104
+ }