Changing front

This commit is contained in:
ewandor committed 2023-01-16 17:49:38 +01:00
1 parent 0b8a93b256
commit 4fe4be7730
48586 files changed
+4725790 -17464

No files matched your search

+163
View File
@@ -0,0 +1,163 @@
# Angular Perfect Scrollbar
<a href="https://badge.fury.io/js/ngx-perfect-scrollbar"><img src="https://badge.fury.io/js/ngx-perfect-scrollbar.svg" align="right" alt="npm version" height="18"></a>
This is an Angular wrapper library for the [Perfect Scrollbar](https://utatti.github.io/perfect-scrollbar/). To use this library you should get familiar with the Perfect Scrollbar documentation as well since this documentation only explains details specific to this wrapper.
This documentation is for the latest 5/6.x.x version which requires Angular 5 or newer. For Angular 4 you need to use the latest 4.x.x version. Documentation for the 4.x.x can be found from <a href="https://github.com/zefoy/ngx-perfect-scrollbar/tree/4.x.x/">here</a>.
### Quick links
[Example application](https://zefoy.github.io/ngx-perfect-scrollbar/)
|
[StackBlitz example](https://stackblitz.com/github/zefoy/ngx-perfect-scrollbar/tree/master)
|
[Perfect Scrollbar documentation](https://github.com/utatti/perfect-scrollbar/)
### Building the library
```bash
npm install
npm run build
```
### Running the example
```bash
npm install
npm run start
```
### Installing and usage
```bash
npm install ngx-perfect-scrollbar --save
```
##### Load the module for your app (with global configuration):
Providing the global configuration is optional and when used you should only provide the configuration in your root module.
```javascript
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import { PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar';
import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar';
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
suppressScrollX: true
};
@NgModule({
...
imports: [
...
PerfectScrollbarModule
],
providers: [
{
provide: PERFECT_SCROLLBAR_CONFIG,
useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG
}
]
})
```
##### Use it in your HTML template (with custom configuration):
This library provides two ways to create a Perfect Scrollbar element, a component and a directive. Component tries to make the usage as simple as possible and the directive is meant for more custom / advanced use cases.
The scroll area always needs some fixed height to work. The default styles uses 100% as the height value so the parent needs to have fixed height or you need to set it via CSS styles. Otherwise the height keeps growing and you won't get the scrollbars.
**COMPONENT USAGE**
Simply replace the element that would ordinarily be passed to `PerfectScrollbar` with the perfect-scollbar component.
```html
<perfect-scrollbar style="max-width: 600px; max-height: 400px;" [config]="config">
<div>Scrollable content</div>
</perfect-scrollbar>
```
```javascript
[config] // Custom config to override the global defaults.
[disabled] // Disables the Perfect Scrollbar initialization.
[usePSClass] // Use 'ps' class (needed by the ps theme styles).
[autoPropagation] // Automatic swipe and wheel propagation control.
[scrollIndicators] // Enable fading edges scroll indicators showing.
(<psEventName>) // All Perfect Scrollbar events work as bindings.
// Event names are in camel case (not kebab case).
// Example: ps-y-reach-start -> psYReachStart
```
**DIRECTIVE USAGE**
When using only the directive you need to provide your own theming or import the default theme:
```css
@import '~perfect-scrollbar/css/perfect-scrollbar.css';
```
Perfect Scrollbar directive should be used with div elements and can take optional custom configuration:
```html
<div class="ps" style="position: relative; max-width: 600px; max-height: 400px;" [perfectScrollbar]="config">
<div>Scrollable content</div>
</div>
```
```javascript
[perfectScrollbar] // Can be used to provide optional custom config.
[disabled] // Disables the Perfect Scrollbar initialization.
(<psEventName>) // All Perfect Scrollbar events work as bindings.
// Event namea are in camel case (not kebab case).
// Example: ps-y-reach-start -> psYReachStart
```
##### Available configuration options (custom / global configuration):
```javascript
handlers // List of event handlers to scroll the element.
wheelSpeed // Scroll speed for the mousewheel event (Default: 1).
swipeEasing // Use easing for the swipe scrolling (Default: true).
suppressScrollX // Disable X axis in all situations (Default: false).
suppressScrollY // Disable Y axis in all situations (Default: false).
wheelPropagation // Propagate wheel events at the end (Default: false).
useBothWheelAxes // Always use both of the wheel axes (Default: false).
minScrollbarLength // Minimum size (px) for the scrollbar (Default: null).
maxScrollbarLength // Maximum size (px) for the scrollbar (Default: null).
scrollXMarginOffset // Offset before enabling the X scroller (Default: 0).
scrollYMarginOffset // Offset before enabling the Y scroller (Default: 0).
```
For more detailed documentation with all the supported events / options see the the Perfect Scrollbar documentation.
##### Available control / helper functions (provided by the directive):
```javascript
ps() // Returns reference to the PS instance.
update() // Updates the scrollbar size and position.
geometry(prefix) // Returns the geometry with specified prefix.
position(absolute) // Returns the reach or absolute scroll position.
scrollable(direction) // Checks if the given direction is scrollable.
// Direction can be: 'any', 'both', 'x', 'y'
scrollTo(x, y, speed?) // Animate scroll to given x,y coordinates.
scrollToY(position, speed?) // Animate scroll to given vertical position.
scrollToX(position, speed?) // Animate scroll to given horizontal position.
scrollToTop(offset?, speed?) // Animate scroll to given offset from the top.
scrollToLeft(offset?, speed?) // Animate scroll to given offset from the left.
scrollToRight(offset?, speed?) // Animate scroll to given offset from the right.
scrollToBottom(offset?, speed?) // Animate scroll to given offset from the bottom.
scrollToElement(element, offset?, speed?) // Animate scroll to given or matching HTML element.
// Input can be HTMLElement or a query selector string.
```
Above functions can be accessed through the directive reference (available as directiveRef in the component). Position and offset needs to be given in pixels and speed in milliseconds.
@@ -0,0 +1,596 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('rxjs/operators'), require('@angular/core'), require('@angular/common'), require('perfect-scrollbar'), require('resize-observer-polyfill')) :
typeof define === 'function' && define.amd ? define('ngx-perfect-scrollbar', ['exports', 'rxjs', 'rxjs/operators', '@angular/core', '@angular/common', 'perfect-scrollbar', 'resize-observer-polyfill'], factory) :
(global = global || self, factory(global['ngx-perfect-scrollbar'] = {}, global.rxjs, global.rxjs.operators, global.ng.core, global.ng.common, global.PerfectScrollbar, global.ResizeObserver));
}(this, (function (exports, rxjs, operators, core, common, PerfectScrollbar, ResizeObserver) { 'use strict';
PerfectScrollbar = PerfectScrollbar && Object.prototype.hasOwnProperty.call(PerfectScrollbar, 'default') ? PerfectScrollbar['default'] : PerfectScrollbar;
ResizeObserver = ResizeObserver && Object.prototype.hasOwnProperty.call(ResizeObserver, 'default') ? ResizeObserver['default'] : ResizeObserver;
var PERFECT_SCROLLBAR_CONFIG = new core.InjectionToken('PERFECT_SCROLLBAR_CONFIG');
var Geometry = /** @class */ (function () {
function Geometry(x, y, w, h) {
this.x = x;
this.y = y;
this.w = w;
this.h = h;
}
return Geometry;
}());
var Position = /** @class */ (function () {
function Position(x, y) {
this.x = x;
this.y = y;
}
return Position;
}());
var PerfectScrollbarEvents = [
'psScrollY',
'psScrollX',
'psScrollUp',
'psScrollDown',
'psScrollLeft',
'psScrollRight',
'psYReachEnd',
'psYReachStart',
'psXReachEnd',
'psXReachStart'
];
var PerfectScrollbarConfig = /** @class */ (function () {
function PerfectScrollbarConfig(config) {
if (config === void 0) { config = {}; }
this.assign(config);
}
PerfectScrollbarConfig.prototype.assign = function (config) {
if (config === void 0) { config = {}; }
for (var key in config) {
this[key] = config[key];
}
};
return PerfectScrollbarConfig;
}());
var PerfectScrollbarDirective = /** @class */ (function () {
function PerfectScrollbarDirective(zone, differs, elementRef, platformId, defaults) {
this.zone = zone;
this.differs = differs;
this.elementRef = elementRef;
this.platformId = platformId;
this.defaults = defaults;
this.instance = null;
this.ro = null;
this.timeout = null;
this.animation = null;
this.configDiff = null;
this.ngDestroy = new rxjs.Subject();
this.disabled = false;
this.psScrollY = new core.EventEmitter();
this.psScrollX = new core.EventEmitter();
this.psScrollUp = new core.EventEmitter();
this.psScrollDown = new core.EventEmitter();
this.psScrollLeft = new core.EventEmitter();
this.psScrollRight = new core.EventEmitter();
this.psYReachEnd = new core.EventEmitter();
this.psYReachStart = new core.EventEmitter();
this.psXReachEnd = new core.EventEmitter();
this.psXReachStart = new core.EventEmitter();
}
PerfectScrollbarDirective.prototype.ngOnInit = function () {
var _this = this;
if (!this.disabled && common.isPlatformBrowser(this.platformId)) {
var config_1 = new PerfectScrollbarConfig(this.defaults);
config_1.assign(this.config); // Custom configuration
this.zone.runOutsideAngular(function () {
_this.instance = new PerfectScrollbar(_this.elementRef.nativeElement, config_1);
});
if (!this.configDiff) {
this.configDiff = this.differs.find(this.config || {}).create();
this.configDiff.diff(this.config || {});
}
this.zone.runOutsideAngular(function () {
_this.ro = new ResizeObserver(function () {
_this.update();
});
if (_this.elementRef.nativeElement.children[0]) {
_this.ro.observe(_this.elementRef.nativeElement.children[0]);
}
_this.ro.observe(_this.elementRef.nativeElement);
});
this.zone.runOutsideAngular(function () {
PerfectScrollbarEvents.forEach(function (eventName) {
var eventType = eventName.replace(/([A-Z])/g, function (c) { return "-" + c.toLowerCase(); });
rxjs.fromEvent(_this.elementRef.nativeElement, eventType)
.pipe(operators.auditTime(20), operators.takeUntil(_this.ngDestroy))
.subscribe(function (event) {
_this[eventName].emit(event);
});
});
});
}
};
PerfectScrollbarDirective.prototype.ngOnDestroy = function () {
var _this = this;
if (common.isPlatformBrowser(this.platformId)) {
this.ngDestroy.next();
this.ngDestroy.complete();
if (this.ro) {
this.ro.disconnect();
}
if (this.timeout && typeof window !== 'undefined') {
window.clearTimeout(this.timeout);
}
this.zone.runOutsideAngular(function () {
if (_this.instance) {
_this.instance.destroy();
}
});
this.instance = null;
}
};
PerfectScrollbarDirective.prototype.ngDoCheck = function () {
if (!this.disabled && this.configDiff && common.isPlatformBrowser(this.platformId)) {
var changes = this.configDiff.diff(this.config || {});
if (changes) {
this.ngOnDestroy();
this.ngOnInit();
}
}
};
PerfectScrollbarDirective.prototype.ngOnChanges = function (changes) {
if (changes['disabled'] && !changes['disabled'].isFirstChange() && common.isPlatformBrowser(this.platformId)) {
if (changes['disabled'].currentValue !== changes['disabled'].previousValue) {
if (changes['disabled'].currentValue === true) {
this.ngOnDestroy();
}
else if (changes['disabled'].currentValue === false) {
this.ngOnInit();
}
}
}
};
PerfectScrollbarDirective.prototype.ps = function () {
return this.instance;
};
PerfectScrollbarDirective.prototype.update = function () {
var _this = this;
if (typeof window !== 'undefined') {
if (this.timeout) {
window.clearTimeout(this.timeout);
}
this.timeout = window.setTimeout(function () {
if (!_this.disabled && _this.configDiff) {
try {
_this.zone.runOutsideAngular(function () {
if (_this.instance) {
_this.instance.update();
}
});
}
catch (error) {
// Update can be finished after destroy so catch errors
}
}
}, 0);
}
};
PerfectScrollbarDirective.prototype.geometry = function (prefix) {
if (prefix === void 0) { prefix = 'scroll'; }
return new Geometry(this.elementRef.nativeElement[prefix + 'Left'], this.elementRef.nativeElement[prefix + 'Top'], this.elementRef.nativeElement[prefix + 'Width'], this.elementRef.nativeElement[prefix + 'Height']);
};
PerfectScrollbarDirective.prototype.position = function (absolute) {
if (absolute === void 0) { absolute = false; }
if (!absolute && this.instance) {
return new Position(this.instance.reach.x || 0, this.instance.reach.y || 0);
}
else {
return new Position(this.elementRef.nativeElement.scrollLeft, this.elementRef.nativeElement.scrollTop);
}
};
PerfectScrollbarDirective.prototype.scrollable = function (direction) {
if (direction === void 0) { direction = 'any'; }
var element = this.elementRef.nativeElement;
if (direction === 'any') {
return element.classList.contains('ps--active-x') ||
element.classList.contains('ps--active-y');
}
else if (direction === 'both') {
return element.classList.contains('ps--active-x') &&
element.classList.contains('ps--active-y');
}
else {
return element.classList.contains('ps--active-' + direction);
}
};
PerfectScrollbarDirective.prototype.scrollTo = function (x, y, speed) {
if (!this.disabled) {
if (y == null && speed == null) {
this.animateScrolling('scrollTop', x, speed);
}
else {
if (x != null) {
this.animateScrolling('scrollLeft', x, speed);
}
if (y != null) {
this.animateScrolling('scrollTop', y, speed);
}
}
}
};
PerfectScrollbarDirective.prototype.scrollToX = function (x, speed) {
this.animateScrolling('scrollLeft', x, speed);
};
PerfectScrollbarDirective.prototype.scrollToY = function (y, speed) {
this.animateScrolling('scrollTop', y, speed);
};
PerfectScrollbarDirective.prototype.scrollToTop = function (offset, speed) {
this.animateScrolling('scrollTop', (offset || 0), speed);
};
PerfectScrollbarDirective.prototype.scrollToLeft = function (offset, speed) {
this.animateScrolling('scrollLeft', (offset || 0), speed);
};
PerfectScrollbarDirective.prototype.scrollToRight = function (offset, speed) {
var left = this.elementRef.nativeElement.scrollWidth -
this.elementRef.nativeElement.clientWidth;
this.animateScrolling('scrollLeft', left - (offset || 0), speed);
};
PerfectScrollbarDirective.prototype.scrollToBottom = function (offset, speed) {
var top = this.elementRef.nativeElement.scrollHeight -
this.elementRef.nativeElement.clientHeight;
this.animateScrolling('scrollTop', top - (offset || 0), speed);
};
PerfectScrollbarDirective.prototype.scrollToElement = function (element, offset, speed) {
if (typeof element === 'string') {
element = this.elementRef.nativeElement.querySelector(element);
}
if (element) {
var elementPos = element.getBoundingClientRect();
var scrollerPos = this.elementRef.nativeElement.getBoundingClientRect();
if (this.elementRef.nativeElement.classList.contains('ps--active-x')) {
var currentPos = this.elementRef.nativeElement['scrollLeft'];
var position = elementPos.left - scrollerPos.left + currentPos;
this.animateScrolling('scrollLeft', position + (offset || 0), speed);
}
if (this.elementRef.nativeElement.classList.contains('ps--active-y')) {
var currentPos = this.elementRef.nativeElement['scrollTop'];
var position = elementPos.top - scrollerPos.top + currentPos;
this.animateScrolling('scrollTop', position + (offset || 0), speed);
}
}
};
PerfectScrollbarDirective.prototype.animateScrolling = function (target, value, speed) {
var _this = this;
if (this.animation) {
window.cancelAnimationFrame(this.animation);
this.animation = null;
}
if (!speed || typeof window === 'undefined') {
this.elementRef.nativeElement[target] = value;
}
else if (value !== this.elementRef.nativeElement[target]) {
var newValue_1 = 0;
var scrollCount_1 = 0;
var oldTimestamp_1 = performance.now();
var oldValue_1 = this.elementRef.nativeElement[target];
var cosParameter_1 = (oldValue_1 - value) / 2;
var step_1 = function (newTimestamp) {
scrollCount_1 += Math.PI / (speed / (newTimestamp - oldTimestamp_1));
newValue_1 = Math.round(value + cosParameter_1 + cosParameter_1 * Math.cos(scrollCount_1));
// Only continue animation if scroll position has not changed
if (_this.elementRef.nativeElement[target] === oldValue_1) {
if (scrollCount_1 >= Math.PI) {
_this.animateScrolling(target, value, 0);
}
else {
_this.elementRef.nativeElement[target] = newValue_1;
// On a zoomed out page the resulting offset may differ
oldValue_1 = _this.elementRef.nativeElement[target];
oldTimestamp_1 = newTimestamp;
_this.animation = window.requestAnimationFrame(step_1);
}
}
};
window.requestAnimationFrame(step_1);
}
};
return PerfectScrollbarDirective;
}());
PerfectScrollbarDirective.decorators = [
{ type: core.Directive, args: [{
selector: '[perfectScrollbar]',
exportAs: 'ngxPerfectScrollbar'
},] }
];
PerfectScrollbarDirective.ctorParameters = function () { return [
{ type: core.NgZone },
{ type: core.KeyValueDiffers },
{ type: core.ElementRef },
{ type: Object, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] }] },
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [PERFECT_SCROLLBAR_CONFIG,] }] }
]; };
PerfectScrollbarDirective.propDecorators = {
disabled: [{ type: core.Input }],
config: [{ type: core.Input, args: ['perfectScrollbar',] }],
psScrollY: [{ type: core.Output }],
psScrollX: [{ type: core.Output }],
psScrollUp: [{ type: core.Output }],
psScrollDown: [{ type: core.Output }],
psScrollLeft: [{ type: core.Output }],
psScrollRight: [{ type: core.Output }],
psYReachEnd: [{ type: core.Output }],
psYReachStart: [{ type: core.Output }],
psXReachEnd: [{ type: core.Output }],
psXReachStart: [{ type: core.Output }]
};
var PerfectScrollbarComponent = /** @class */ (function () {
function PerfectScrollbarComponent(zone, cdRef, platformId) {
this.zone = zone;
this.cdRef = cdRef;
this.platformId = platformId;
this.states = {};
this.indicatorX = false;
this.indicatorY = false;
this.interaction = false;
this.scrollPositionX = 0;
this.scrollPositionY = 0;
this.scrollDirectionX = 0;
this.scrollDirectionY = 0;
this.usePropagationX = false;
this.usePropagationY = false;
this.allowPropagationX = false;
this.allowPropagationY = false;
this.stateTimeout = null;
this.ngDestroy = new rxjs.Subject();
this.stateUpdate = new rxjs.Subject();
this.disabled = false;
this.usePSClass = true;
this.autoPropagation = false;
this.scrollIndicators = false;
this.psScrollY = new core.EventEmitter();
this.psScrollX = new core.EventEmitter();
this.psScrollUp = new core.EventEmitter();
this.psScrollDown = new core.EventEmitter();
this.psScrollLeft = new core.EventEmitter();
this.psScrollRight = new core.EventEmitter();
this.psYReachEnd = new core.EventEmitter();
this.psYReachStart = new core.EventEmitter();
this.psXReachEnd = new core.EventEmitter();
this.psXReachStart = new core.EventEmitter();
}
PerfectScrollbarComponent.prototype.ngOnInit = function () {
var _this = this;
if (common.isPlatformBrowser(this.platformId)) {
this.stateUpdate
.pipe(operators.takeUntil(this.ngDestroy), operators.distinctUntilChanged(function (a, b) { return (a === b && !_this.stateTimeout); }))
.subscribe(function (state) {
if (_this.stateTimeout && typeof window !== 'undefined') {
window.clearTimeout(_this.stateTimeout);
_this.stateTimeout = null;
}
if (state === 'x' || state === 'y') {
_this.interaction = false;
if (state === 'x') {
_this.indicatorX = false;
_this.states.left = false;
_this.states.right = false;
if (_this.autoPropagation && _this.usePropagationX) {
_this.allowPropagationX = false;
}
}
else if (state === 'y') {
_this.indicatorY = false;
_this.states.top = false;
_this.states.bottom = false;
if (_this.autoPropagation && _this.usePropagationY) {
_this.allowPropagationY = false;
}
}
}
else {
if (state === 'left' || state === 'right') {
_this.states.left = false;
_this.states.right = false;
_this.states[state] = true;
if (_this.autoPropagation && _this.usePropagationX) {
_this.indicatorX = true;
}
}
else if (state === 'top' || state === 'bottom') {
_this.states.top = false;
_this.states.bottom = false;
_this.states[state] = true;
if (_this.autoPropagation && _this.usePropagationY) {
_this.indicatorY = true;
}
}
if (_this.autoPropagation && typeof window !== 'undefined') {
_this.stateTimeout = window.setTimeout(function () {
_this.indicatorX = false;
_this.indicatorY = false;
_this.stateTimeout = null;
if (_this.interaction && (_this.states.left || _this.states.right)) {
_this.allowPropagationX = true;
}
if (_this.interaction && (_this.states.top || _this.states.bottom)) {
_this.allowPropagationY = true;
}
_this.cdRef.markForCheck();
}, 500);
}
}
_this.cdRef.markForCheck();
_this.cdRef.detectChanges();
});
this.zone.runOutsideAngular(function () {
if (_this.directiveRef) {
var element = _this.directiveRef.elementRef.nativeElement;
rxjs.fromEvent(element, 'wheel')
.pipe(operators.takeUntil(_this.ngDestroy))
.subscribe(function (event) {
if (!_this.disabled && _this.autoPropagation) {
var scrollDeltaX = event.deltaX;
var scrollDeltaY = event.deltaY;
_this.checkPropagation(event, scrollDeltaX, scrollDeltaY);
}
});
rxjs.fromEvent(element, 'touchmove')
.pipe(operators.takeUntil(_this.ngDestroy))
.subscribe(function (event) {
if (!_this.disabled && _this.autoPropagation) {
var scrollPositionX = event.touches[0].clientX;
var scrollPositionY = event.touches[0].clientY;
var scrollDeltaX = scrollPositionX - _this.scrollPositionX;
var scrollDeltaY = scrollPositionY - _this.scrollPositionY;
_this.checkPropagation(event, scrollDeltaX, scrollDeltaY);
_this.scrollPositionX = scrollPositionX;
_this.scrollPositionY = scrollPositionY;
}
});
rxjs.merge(rxjs.fromEvent(element, 'ps-scroll-x')
.pipe(operators.mapTo('x')), rxjs.fromEvent(element, 'ps-scroll-y')
.pipe(operators.mapTo('y')), rxjs.fromEvent(element, 'ps-x-reach-end')
.pipe(operators.mapTo('right')), rxjs.fromEvent(element, 'ps-y-reach-end')
.pipe(operators.mapTo('bottom')), rxjs.fromEvent(element, 'ps-x-reach-start')
.pipe(operators.mapTo('left')), rxjs.fromEvent(element, 'ps-y-reach-start')
.pipe(operators.mapTo('top')))
.pipe(operators.takeUntil(_this.ngDestroy))
.subscribe(function (state) {
if (!_this.disabled && (_this.autoPropagation || _this.scrollIndicators)) {
_this.stateUpdate.next(state);
}
});
}
});
window.setTimeout(function () {
PerfectScrollbarEvents.forEach(function (eventName) {
if (_this.directiveRef) {
_this.directiveRef[eventName] = _this[eventName];
}
});
}, 0);
}
};
PerfectScrollbarComponent.prototype.ngOnDestroy = function () {
if (common.isPlatformBrowser(this.platformId)) {
this.ngDestroy.next();
this.ngDestroy.unsubscribe();
if (this.stateTimeout && typeof window !== 'undefined') {
window.clearTimeout(this.stateTimeout);
}
}
};
PerfectScrollbarComponent.prototype.ngDoCheck = function () {
if (common.isPlatformBrowser(this.platformId)) {
if (!this.disabled && this.autoPropagation && this.directiveRef) {
var element = this.directiveRef.elementRef.nativeElement;
this.usePropagationX = element.classList.contains('ps--active-x');
this.usePropagationY = element.classList.contains('ps--active-y');
}
}
};
PerfectScrollbarComponent.prototype.checkPropagation = function (event, deltaX, deltaY) {
this.interaction = true;
var scrollDirectionX = (deltaX < 0) ? -1 : 1;
var scrollDirectionY = (deltaY < 0) ? -1 : 1;
if ((this.usePropagationX && this.usePropagationY) ||
(this.usePropagationX && (!this.allowPropagationX ||
(this.scrollDirectionX !== scrollDirectionX))) ||
(this.usePropagationY && (!this.allowPropagationY ||
(this.scrollDirectionY !== scrollDirectionY)))) {
event.preventDefault();
event.stopPropagation();
}
if (!!deltaX) {
this.scrollDirectionX = scrollDirectionX;
}
if (!!deltaY) {
this.scrollDirectionY = scrollDirectionY;
}
this.stateUpdate.next('interaction');
this.cdRef.detectChanges();
};
return PerfectScrollbarComponent;
}());
PerfectScrollbarComponent.decorators = [
{ type: core.Component, args: [{
selector: 'perfect-scrollbar',
exportAs: 'ngxPerfectScrollbar',
template: "<div style=\"position: static;\" [class.ps]=\"usePSClass\" [perfectScrollbar]=\"config\" [disabled]=\"disabled\">\n <div class=\"ps-content\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"scrollIndicators\" class=\"ps-overlay\" [class.ps-at-top]=\"states.top\" [class.ps-at-left]=\"states.left\" [class.ps-at-right]=\"states.right\" [class.ps-at-bottom]=\"states.bottom\">\n <div class=\"ps-indicator-top\" [class.ps-indicator-show]=\"indicatorY && interaction\"></div>\n <div class=\"ps-indicator-left\" [class.ps-indicator-show]=\"indicatorX && interaction\"></div>\n <div class=\"ps-indicator-right\" [class.ps-indicator-show]=\"indicatorX && interaction\"></div>\n <div class=\"ps-indicator-bottom\" [class.ps-indicator-show]=\"indicatorY && interaction\"></div>\n </div>\n</div>\n",
encapsulation: core.ViewEncapsulation.None,
styles: ["perfect-scrollbar{display:block;height:100%;max-height:100%;max-width:100%;overflow:hidden;position:relative;width:100%}perfect-scrollbar[hidden]{display:none}perfect-scrollbar[fxflex]{display:flex;flex-direction:column;height:auto;min-height:0;min-width:0}perfect-scrollbar[fxflex]>.ps{-webkit-box-flex:1;flex:1 1 auto;height:auto;min-height:0;min-width:0;width:auto}perfect-scrollbar[fxlayout]>.ps,perfect-scrollbar[fxlayout]>.ps>.ps-content{-webkit-box-align:inherit;-webkit-box-flex:1;-webkit-box-pack:inherit;align-content:inherit;align-items:inherit;display:flex;flex:1 1 auto;flex-direction:inherit;height:100%;justify-content:inherit;width:100%},perfect-scrollbar[fxlayout=row]>.ps,perfect-scrollbar[fxlayout=row]>.ps>.ps-content{flex-direction:row!important}perfect-scrollbar[fxlayout=column]>.ps,perfect-scrollbar[fxlayout=column]>.ps>.ps-content{flex-direction:column!important}perfect-scrollbar>.ps{display:block;height:100%;max-height:100%;max-width:100%;position:static;width:100%}perfect-scrollbar>.ps textarea{-ms-overflow-style:scrollbar}perfect-scrollbar>.ps>.ps-overlay{bottom:0;display:block;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{opacity:0;position:absolute;transition:opacity .3s ease-in-out}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{left:0;min-height:24px;min-width:100%}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right{min-height:100%;min-width:24px;top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left{left:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right{right:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom{bottom:0}perfect-scrollbar>.ps.ps--active-y>.ps__rail-y{cursor:default;left:auto!important;right:0!important;top:0!important;transition:width .2s linear,opacity .2s linear,background-color .2s linear;width:10px}perfect-scrollbar>.ps.ps--active-y>.ps__rail-y.ps--clicking,perfect-scrollbar>.ps.ps--active-y>.ps__rail-y:hover{width:15px}perfect-scrollbar>.ps.ps--active-x>.ps__rail-x{bottom:0!important;cursor:default;height:10px;left:0!important;top:auto!important;transition:height .2s linear,opacity .2s linear,background-color .2s linear}perfect-scrollbar>.ps.ps--active-x>.ps__rail-x.ps--clicking,perfect-scrollbar>.ps.ps--active-x>.ps__rail-x:hover{height:15px}perfect-scrollbar>.ps.ps--active-x.ps--active-y>.ps__rail-y{margin:0 0 10px}perfect-scrollbar>.ps.ps--active-x.ps--active-y>.ps__rail-x{margin:0 10px 0 0}perfect-scrollbar>.ps.ps--scrolling-x>.ps__rail-x,perfect-scrollbar>.ps.ps--scrolling-y>.ps__rail-y{background-color:#eee;opacity:.9}perfect-scrollbar.ps-show-always>.ps.ps--active-x>.ps__rail-x,perfect-scrollbar.ps-show-always>.ps.ps--active-y>.ps__rail-y{opacity:.6}perfect-scrollbar.ps-show-active>.ps.ps--active-y>.ps-overlay:not(.ps-at-top) .ps-indicator-top{background:linear-gradient(180deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-y>.ps-overlay:not(.ps-at-bottom) .ps-indicator-bottom{background:linear-gradient(0deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-x>.ps-overlay:not(.ps-at-left) .ps-indicator-left{background:linear-gradient(90deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-x>.ps-overlay:not(.ps-at-right) .ps-indicator-right{background:linear-gradient(270deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-top .ps-indicator-top{background:linear-gradient(180deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-bottom .ps-indicator-bottom{background:linear-gradient(0deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-left .ps-indicator-left{background:linear-gradient(90deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-right .ps-indicator-right{background:linear-gradient(270deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-left .ps-indicator-left.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-right .ps-indicator-right.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-bottom .ps-indicator-bottom.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.psLine truncated
},] }
];
PerfectScrollbarComponent.ctorParameters = function () { return [
{ type: core.NgZone },
{ type: core.ChangeDetectorRef },
{ type: Object, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] }] }
]; };
PerfectScrollbarComponent.propDecorators = {
disabled: [{ type: core.Input }],
usePSClass: [{ type: core.Input }],
autoPropagation: [{ type: core.HostBinding, args: ['class.ps-show-limits',] }, { type: core.Input }],
scrollIndicators: [{ type: core.HostBinding, args: ['class.ps-show-active',] }, { type: core.Input }],
config: [{ type: core.Input }],
psScrollY: [{ type: core.Output }],
psScrollX: [{ type: core.Output }],
psScrollUp: [{ type: core.Output }],
psScrollDown: [{ type: core.Output }],
psScrollLeft: [{ type: core.Output }],
psScrollRight: [{ type: core.Output }],
psYReachEnd: [{ type: core.Output }],
psYReachStart: [{ type: core.Output }],
psXReachEnd: [{ type: core.Output }],
psXReachStart: [{ type: core.Output }],
directiveRef: [{ type: core.ViewChild, args: [PerfectScrollbarDirective, { static: true },] }]
};
var ForceNativeScrollDirective = /** @class */ (function () {
function ForceNativeScrollDirective(renderer, el) {
var _this = this;
this.renderer = renderer;
['ps__child', 'ps__child--consume'].forEach(function (className) {
_this.renderer.addClass(el === null || el === void 0 ? void 0 : el.nativeElement, className);
});
}
return ForceNativeScrollDirective;
}());
ForceNativeScrollDirective.decorators = [
{ type: core.Directive, args: [{
selector: '[forceNativeScrolling]'
},] }
];
ForceNativeScrollDirective.ctorParameters = function () { return [
{ type: core.Renderer2 },
{ type: core.ElementRef }
]; };
var PerfectScrollbarModule = /** @class */ (function () {
function PerfectScrollbarModule() {
}
return PerfectScrollbarModule;
}());
PerfectScrollbarModule.decorators = [
{ type: core.NgModule, args: [{
imports: [common.CommonModule],
declarations: [PerfectScrollbarComponent, PerfectScrollbarDirective, ForceNativeScrollDirective],
exports: [common.CommonModule, PerfectScrollbarComponent, PerfectScrollbarDirective, ForceNativeScrollDirective]
},] }
];
/**
* Generated bundle index. Do not edit.
*/
exports.Geometry = Geometry;
exports.PERFECT_SCROLLBAR_CONFIG = PERFECT_SCROLLBAR_CONFIG;
exports.PerfectScrollbarComponent = PerfectScrollbarComponent;
exports.PerfectScrollbarConfig = PerfectScrollbarConfig;
exports.PerfectScrollbarDirective = PerfectScrollbarDirective;
exports.PerfectScrollbarModule = PerfectScrollbarModule;
exports.Position = Position;
exports.ɵa = ForceNativeScrollDirective;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=ngx-perfect-scrollbar.umd.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ngx-perfect-scrollbar.umd.js","sources":["../../../projects/lib/src/lib/perfect-scrollbar.interfaces.ts","../../../projects/lib/src/lib/perfect-scrollbar.directive.ts","../../../projects/lib/src/lib/perfect-scrollbar.component.ts","../../../projects/lib/src/lib/perfect-scrollbar-force-native-scroll.directive.ts","../../../projects/lib/src/lib/perfect-scrollbar.module.ts","../../../projects/lib/src/ngx-perfect-scrollbar.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const PERFECT_SCROLLBAR_CONFIG = new InjectionToken('PERFECT_SCROLLBAR_CONFIG');\n\nexport class Geometry {\n public x: number;\n public y: number;\n\n public w: number;\n public h: number;\n\n constructor(x: number, y: number, w: number, h: number) {\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n }\n}\n\nexport class Position {\n public x: number | 'start' | 'end';\n public y: number | 'start' | 'end';\n\n constructor(x: number | 'start' | 'end', y: number | 'start' | 'end') {\n this.x = x;\n this.y = y;\n }\n}\n\nexport type PerfectScrollbarEvent = 'psScrollY' | 'psScrollX' | 'psScrollUp'| 'psScrollDown' |\n 'psScrollLeft' | 'psScrollRight' | 'psYReachEnd' | 'psYReachStart' | 'psXReachEnd' | 'psXReachStart';\n\nexport const PerfectScrollbarEvents: PerfectScrollbarEvent[] = [\n 'psScrollY',\n 'psScrollX',\n\n 'psScrollUp',\n 'psScrollDown',\n 'psScrollLeft',\n 'psScrollRight',\n\n 'psYReachEnd',\n 'psYReachStart',\n 'psXReachEnd',\n 'psXReachStart'\n];\n\nexport interface PerfectScrollbarConfigInterface {\n handlers?: string[];\n\n wheelSpeed?: number;\n swipeEasing?: boolean;\n\n suppressScrollX?: boolean;\n suppressScrollY?: boolean;\n\n wheelPropagation?: boolean;\n useBothWheelAxes?: boolean;\n\n scrollingThreshold?: number;\n\n minScrollbarLength?: number;\n maxScrollbarLength?: number;\n\n scrollXMarginOffset?: number;\n scrollYMarginOffset?: number;\n}\n\nexport class PerfectScrollbarConfig implements PerfectScrollbarConfigInterface {\n public handlers?: string[];\n\n public wheelSpeed?: number;\n public swipeEasing?: boolean;\n\n public suppressScrollX?: boolean;\n public suppressScrollY?: boolean;\n\n public wheelPropagation?: boolean;\n public useBothWheelAxes?: boolean;\n\n public scrollingThreshold?: number;\n\n public minScrollbarLength?: number;\n public maxScrollbarLength?: number;\n\n public scrollXMarginOffset?: number;\n public scrollYMarginOffset?: number;\n\n constructor(config: PerfectScrollbarConfigInterface = {}) {\n this.assign(config);\n }\n\n public assign(config: PerfectScrollbarConfigInterface = {}) {\n for (const key in config) {\n this[key as keyof PerfectScrollbarConfig] = config[key as keyof PerfectScrollbarConfigInterface] as never;\n }\n }\n}\n","import PerfectScrollbar from 'perfect-scrollbar';\n\nimport ResizeObserver from 'resize-observer-polyfill';\n\nimport { Subject, fromEvent } from 'rxjs';\nimport { auditTime, takeUntil } from 'rxjs/operators';\n\nimport { PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { NgZone, Inject, Optional, ElementRef, Directive,\n OnInit, DoCheck, OnChanges, OnDestroy, Input, Output, EventEmitter,\n SimpleChanges, KeyValueDiffer, KeyValueDiffers } from '@angular/core';\n\nimport { Geometry, Position } from './perfect-scrollbar.interfaces';\n\nimport { PERFECT_SCROLLBAR_CONFIG, PerfectScrollbarConfig, PerfectScrollbarConfigInterface,\n PerfectScrollbarEvent, PerfectScrollbarEvents } from './perfect-scrollbar.interfaces';\n\n@Directive({\n selector: '[perfectScrollbar]',\n exportAs: 'ngxPerfectScrollbar'\n})\nexport class PerfectScrollbarDirective implements OnInit, OnDestroy, DoCheck, OnChanges {\n private instance: PerfectScrollbar | null = null;\n\n private ro: ResizeObserver | null = null;\n\n private timeout: number | null = null;\n private animation: number | null = null;\n\n private configDiff: KeyValueDiffer<string, any> | null = null;\n\n private readonly ngDestroy: Subject<void> = new Subject();\n\n @Input() disabled: boolean = false;\n\n @Input('perfectScrollbar') config?: PerfectScrollbarConfigInterface;\n\n @Output() psScrollY: EventEmitter<any> = new EventEmitter<any>();\n @Output() psScrollX: EventEmitter<any> = new EventEmitter<any>();\n\n @Output() psScrollUp: EventEmitter<any> = new EventEmitter<any>();\n @Output() psScrollDown: EventEmitter<any> = new EventEmitter<any>();\n @Output() psScrollLeft: EventEmitter<any> = new EventEmitter<any>();\n @Output() psScrollRight: EventEmitter<any> = new EventEmitter<any>();\n\n @Output() psYReachEnd: EventEmitter<any> = new EventEmitter<any>();\n @Output() psYReachStart: EventEmitter<any> = new EventEmitter<any>();\n @Output() psXReachEnd: EventEmitter<any> = new EventEmitter<any>();\n @Output() psXReachStart: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(private zone: NgZone, private differLine truncated
@@ -0,0 +1,2 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs"),require("rxjs/operators"),require("@angular/core"),require("@angular/common"),require("perfect-scrollbar"),require("resize-observer-polyfill")):"function"==typeof define&&define.amd?define("ngx-perfect-scrollbar",["exports","rxjs","rxjs/operators","@angular/core","@angular/common","perfect-scrollbar","resize-observer-polyfill"],e):e((t=t||self)["ngx-perfect-scrollbar"]={},t.rxjs,t.rxjs.operators,t.ng.core,t.ng.common,t.PerfectScrollbar,t.ResizeObserver)}(this,(function(t,e,i,o,s,r,n){"use strict";r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;var a=new o.InjectionToken("PERFECT_SCROLLBAR_CONFIG"),l=function(t,e,i,o){this.x=t,this.y=e,this.w=i,this.h=o},p=function(t,e){this.x=t,this.y=e},c=["psScrollY","psScrollX","psScrollUp","psScrollDown","psScrollLeft","psScrollRight","psYReachEnd","psYReachStart","psXReachEnd","psXReachStart"],h=function(){function t(t){void 0===t&&(t={}),this.assign(t)}return t.prototype.assign=function(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e]},t}(),f=function(){function t(t,i,s,r,n){this.zone=t,this.differs=i,this.elementRef=s,this.platformId=r,this.defaults=n,this.instance=null,this.ro=null,this.timeout=null,this.animation=null,this.configDiff=null,this.ngDestroy=new e.Subject,this.disabled=!1,this.psScrollY=new o.EventEmitter,this.psScrollX=new o.EventEmitter,this.psScrollUp=new o.EventEmitter,this.psScrollDown=new o.EventEmitter,this.psScrollLeft=new o.EventEmitter,this.psScrollRight=new o.EventEmitter,this.psYReachEnd=new o.EventEmitter,this.psYReachStart=new o.EventEmitter,this.psXReachEnd=new o.EventEmitter,this.psXReachStart=new o.EventEmitter}return t.prototype.ngOnInit=function(){var t=this;if(!this.disabled&&s.isPlatformBrowser(this.platformId)){var o=new h(this.defaults);o.assign(this.config),this.zone.runOutsideAngular((function(){t.instance=new r(t.elementRef.nativeElement,o)})),this.configDiff||(this.configDiff=this.differs.find(this.config||{}).create(),this.configDiff.diff(this.config||{})),this.zone.runOutsideAngular((function(){t.ro=new n((function(){t.update()})),t.elementRef.nativeElement.children[0]&&t.ro.observe(t.elementRef.nativeElement.children[0]),t.ro.observe(t.elementRef.nativeElement)})),this.zone.runOutsideAngular((function(){c.forEach((function(o){var s=o.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}));e.fromEvent(t.elementRef.nativeElement,s).pipe(i.auditTime(20),i.takeUntil(t.ngDestroy)).subscribe((function(e){t[o].emit(e)}))}))}))}},t.prototype.ngOnDestroy=function(){var t=this;s.isPlatformBrowser(this.platformId)&&(this.ngDestroy.next(),this.ngDestroy.complete(),this.ro&&this.ro.disconnect(),this.timeout&&"undefined"!=typeof window&&window.clearTimeout(this.timeout),this.zone.runOutsideAngular((function(){t.instance&&t.instance.destroy()})),this.instance=null)},t.prototype.ngDoCheck=function(){!this.disabled&&this.configDiff&&s.isPlatformBrowser(this.platformId)&&(this.configDiff.diff(this.config||{})&&(this.ngOnDestroy(),this.ngOnInit()))},t.prototype.ngOnChanges=function(t){t.disabled&&!t.disabled.isFirstChange()&&s.isPlatformBrowser(this.platformId)&&t.disabled.currentValue!==t.disabled.previousValue&&(!0===t.disabled.currentValue?this.ngOnDestroy():!1===t.disabled.currentValue&&this.ngOnInit())},t.prototype.ps=function(){return this.instance},t.prototype.update=function(){var t=this;"undefined"!=typeof window&&(this.timeout&&window.clearTimeout(this.timeout),this.timeout=window.setTimeout((function(){if(!t.disabled&&t.configDiff)try{t.zone.runOutsideAngular((function(){t.instance&&t.instance.update()}))}catch(t){}}),0))},t.prototype.geometry=function(t){return void 0===t&&(t="scroll"),new l(this.elementRef.nativeElement[t+"Left"],this.elementRef.nativeElement[t+"Top"],this.elementRef.nativeElement[t+"Width"],this.elementRef.nativeElement[t+"Height"])},t.prototype.position=function(t){return void 0===t&&(t=!1),!t&&this.instance?new p(this.instance.reach.x||0,this.instance.reach.y||0):new p(this.elementRef.nativeElement.scrollLeft,this.elementRef.nativeElement.scrollTop)},t.prototype.scrollable=function(t){void 0===t&&(t="any");var e=this.elementRef.nativeElement;return"any"===t?e.classList.contains("ps--active-x")||e.classList.contains("ps--active-y"):"both"===t?e.classList.contains("ps--active-x")&&e.classList.contains("ps--active-y"):e.classList.contains("ps--active-"+t)},t.prototype.scrollTo=function(t,e,i){this.disabled||(null==e&&null==i?this.animateScrolling("scrollTop",t,i):(null!=t&&this.animateScrolling("scrollLeft",t,i),null!=e&&this.animateScrolling("scrollTop",e,i)))},t.prototype.scrollToX=function(t,e){this.animateScrolling("scrollLeft",t,e)},t.prototype.scrollToY=function(t,e){this.animateScrolling("scrollTop",t,e)},t.prototype.scrollToTop=function(t,e){this.animateScrolling("scrollTop",t||0,e)},t.prototype.scrollToLeft=function(t,e)Line truncated
//# sourceMappingURL=ngx-perfect-scrollbar.umd.min.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../projects/lib/src/lib/perfect-scrollbar.interfaces.ts","../../../projects/lib/src/lib/perfect-scrollbar.directive.ts","../../../projects/lib/src/lib/perfect-scrollbar.component.ts","../../../projects/lib/src/lib/perfect-scrollbar-force-native-scroll.directive.ts","../../../projects/lib/src/lib/perfect-scrollbar.module.ts"],"names":["PERFECT_SCROLLBAR_CONFIG","InjectionToken","x","y","w","h","this","PerfectScrollbarEvents","PerfectScrollbarConfig","config","assign","prototype","key","PerfectScrollbarDirective","zone","differs","elementRef","platformId","defaults","instance","ro","timeout","animation","configDiff","ngDestroy","Subject","disabled","psScrollY","EventEmitter","psScrollX","psScrollUp","psScrollDown","psScrollLeft","psScrollRight","psYReachEnd","psYReachStart","psXReachEnd","psXReachStart","ngOnInit","_this","isPlatformBrowser","config_1","runOutsideAngular","PerfectScrollbar","nativeElement","find","create","diff","ResizeObserver","update","children","observe","forEach","eventName","eventType","replace","c","toLowerCase","fromEvent","pipe","auditTime","takeUntil","subscribe","event","emit","ngOnDestroy","next","complete","disconnect","window","clearTimeout","destroy","ngDoCheck","ngOnChanges","changes","isFirstChange","currentValue","previousValue","ps","setTimeout","error","geometry","prefix","Geometry","position","absolute","Position","reach","scrollLeft","scrollTop","scrollable","direction","element","classList","contains","scrollTo","speed","animateScrolling","scrollToX","scrollToY","scrollToTop","offset","scrollToLeft","scrollToRight","left","scrollWidth","clientWidth","scrollToBottom","top","scrollHeight","clientHeight","scrollToElement","querySelector","elementPos","getBoundingClientRect","scrollerPos","currentPos","target","value","cancelAnimationFrame","newValue_1","scrollCount_1","oldTimestamp_1","performance","now","oldValue_1","cosParameter_1","step_1","newTimestamp","Math","PI","round","cos","requestAnimationFrame","Directive","args","selector","exportAs","NgZone","KeyValueDiffers","ElementRef","Object","decorators","type","Inject","PLATFORM_ID","Optional","Input","Output","PerfectScrollbarComponent","cdRef","states","indicatorX","indicatorY","interaction","scrollPositionX","scrollPositionY","scrollDirectionX","scrollDirectionY","usePropagationX","usePropagationY","allowPropagationX","allowPropagationY","stateTimeout","stateUpdate","usePSClass","autoPropagation","scrollIndicators","distinctUntilChanged","a","b","state","right","bottom","markForCheck","detectChanges","directiveRef","scrollDeltaX","deltaX","scrollDeltaY","deltaY","checkPropagation","touches","clientX","clientY","merge","mapTo","unsubscribe","preventDefault","stopPropagation","Component","template","encapsulation","ViewEncapsulation","None","ChangeDetectorRef","HostBinding","ViewChild","static","renderer","el","className","addClass","Renderer2","NgModule","imports","CommonModule","declarations","ForceNativeScrollDirective","exports"],"mappings":"8tBAEaA,EAA2B,IAAIC,EAAAA,eAAe,8BASzD,SAAYC,EAAWC,EAAWC,EAAWC,GAC3CC,KAAKJ,EAAIA,EACTI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D,IAAMwB,EAAS,IAAIjC,EAAuBF,KAAKY,UAE/CuB,EAAO/B,OAAOJ,KAAKG,QAEnBH,KAAKQ,KAAK4B,mBAAkB,WAC1BH,EAAKpB,SAAW,IAAIwB,EAAiBJ,EAAKvB,WAAW4B,cAAeH,MAGjEnC,KAAKiB,aACRjB,KAAKiB,WAAajB,KAAKS,QAAQ8B,KAAKvC,KAAKG,QAAU,IAAIqC,SAEvDxC,KAAKiB,WAAWwB,KAAKzC,KAAKG,QAAU,KAGtCH,KAAKQ,KAAK4B,mBAAkB,WAC1BH,EAAKnB,GAAK,IAAI4B,GAAe,WAC3BT,EAAKU,YAGHV,EAAKvB,WAAW4B,cAAcM,SAAS,IACzCX,EAAKnB,GAAG+B,QAAQZ,EAAKvB,WAAW4B,cAAcM,SAAS,IAGzDX,EAAKnB,GAAG+B,QAAQZ,EAAKvB,WAAW4B,kBAGlCtC,KAAKQ,KAAK4B,mBAAkB,WAC1BnC,EAAuB6C,SAAQ,SAACC,GAC9B,IAAMC,EAAYD,EAAUE,QAAQ,YAAY,SAACC,GAAM,MAAA,IAAIA,EAAEC,iBAE7DC,EAAAA,UAAiBnB,EAAKvB,WAAW4B,cAAeU,GAC7CK,KACCC,EAAAA,UAAU,IACVC,EAAAA,UAAUtB,EAAKf,YAEhBsC,WAAU,SAACC,GACVxB,EAAKc,GAAWW,KAAKD,cAOjClD,EAAAF,UAAAsD,YAAA,WAAA,IAAA1B,EAAAjC,KACMkC,EAAAA,kBAAkBlC,KAAKW,cACzBX,KAAKkB,UAAU0C,OACf5D,KAAKkB,UAAU2C,WAEX7D,KAAKc,IACPd,KAAKc,Line truncated
@@ -0,0 +1,19 @@
import { Directive, ElementRef, Renderer2 } from '@angular/core';
export class ForceNativeScrollDirective {
constructor(renderer, el) {
this.renderer = renderer;
['ps__child', 'ps__child--consume'].forEach((className) => {
this.renderer.addClass(el === null || el === void 0 ? void 0 : el.nativeElement, className);
});
}
}
ForceNativeScrollDirective.decorators = [
{ type: Directive, args: [{
selector: '[forceNativeScrolling]'
},] }
];
ForceNativeScrollDirective.ctorParameters = () => [
{ type: Renderer2 },
{ type: ElementRef }
];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyZmVjdC1zY3JvbGxiYXItZm9yY2UtbmF0aXZlLXNjcm9sbC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9saWIvc3JjL2xpYi9wZXJmZWN0LXNjcm9sbGJhci1mb3JjZS1uYXRpdmUtc2Nyb2xsLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFLakUsTUFBTSxPQUFPLDBCQUEwQjtJQUVyQyxZQUFvQixRQUFtQixFQUFFLEVBQWM7UUFBbkMsYUFBUSxHQUFSLFFBQVEsQ0FBVztRQUNyQyxDQUFDLFdBQVcsRUFBRSxvQkFBb0IsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFDLFNBQVMsRUFBRSxFQUFFO1lBQ3hELElBQUksQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLEVBQUUsYUFBRixFQUFFLHVCQUFGLEVBQUUsQ0FBRSxhQUFhLEVBQUUsU0FBUyxDQUFDLENBQUM7UUFDdkQsQ0FBQyxDQUFDLENBQUM7SUFDTCxDQUFDOzs7WUFURixTQUFTLFNBQUM7Z0JBQ1QsUUFBUSxFQUFFLHdCQUF3QjthQUNuQzs7O1lBSitCLFNBQVM7WUFBckIsVUFBVSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpcmVjdGl2ZSwgRWxlbWVudFJlZiwgUmVuZGVyZXIyIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBEaXJlY3RpdmUoe1xuICBzZWxlY3RvcjogJ1tmb3JjZU5hdGl2ZVNjcm9sbGluZ10nXG59KVxuZXhwb3J0IGNsYXNzIEZvcmNlTmF0aXZlU2Nyb2xsRGlyZWN0aXZlIHtcblxuICBjb25zdHJ1Y3Rvcihwcml2YXRlIHJlbmRlcmVyOiBSZW5kZXJlcjIsIGVsOiBFbGVtZW50UmVmKSB7XG4gICAgWydwc19fY2hpbGQnLCAncHNfX2NoaWxkLS1jb25zdW1lJ10uZm9yRWFjaCgoY2xhc3NOYW1lKSA9PiB7XG4gICAgICB0aGlzLnJlbmRlcmVyLmFkZENsYXNzKGVsPy5uYXRpdmVFbGVtZW50LCBjbGFzc05hbWUpO1xuICAgIH0pO1xuICB9XG59XG4iXX0=
@@ -0,0 +1,227 @@
import { Subject, merge, fromEvent } from 'rxjs';
import { mapTo, takeUntil, distinctUntilChanged } from 'rxjs/operators';
import { PLATFORM_ID } from '@angular/core';
import { isPlatformBrowser } from '@angular/common';
import { NgZone, Inject, Component, Input, Output, EventEmitter, HostBinding, ViewChild, ViewEncapsulation, ChangeDetectorRef } from '@angular/core';
import { PerfectScrollbarDirective } from './perfect-scrollbar.directive';
import { PerfectScrollbarEvents } from './perfect-scrollbar.interfaces';
export class PerfectScrollbarComponent {
constructor(zone, cdRef, platformId) {
this.zone = zone;
this.cdRef = cdRef;
this.platformId = platformId;
this.states = {};
this.indicatorX = false;
this.indicatorY = false;
this.interaction = false;
this.scrollPositionX = 0;
this.scrollPositionY = 0;
this.scrollDirectionX = 0;
this.scrollDirectionY = 0;
this.usePropagationX = false;
this.usePropagationY = false;
this.allowPropagationX = false;
this.allowPropagationY = false;
this.stateTimeout = null;
this.ngDestroy = new Subject();
this.stateUpdate = new Subject();
this.disabled = false;
this.usePSClass = true;
this.autoPropagation = false;
this.scrollIndicators = false;
this.psScrollY = new EventEmitter();
this.psScrollX = new EventEmitter();
this.psScrollUp = new EventEmitter();
this.psScrollDown = new EventEmitter();
this.psScrollLeft = new EventEmitter();
this.psScrollRight = new EventEmitter();
this.psYReachEnd = new EventEmitter();
this.psYReachStart = new EventEmitter();
this.psXReachEnd = new EventEmitter();
this.psXReachStart = new EventEmitter();
}
ngOnInit() {
if (isPlatformBrowser(this.platformId)) {
this.stateUpdate
.pipe(takeUntil(this.ngDestroy), distinctUntilChanged((a, b) => (a === b && !this.stateTimeout)))
.subscribe((state) => {
if (this.stateTimeout && typeof window !== 'undefined') {
window.clearTimeout(this.stateTimeout);
this.stateTimeout = null;
}
if (state === 'x' || state === 'y') {
this.interaction = false;
if (state === 'x') {
this.indicatorX = false;
this.states.left = false;
this.states.right = false;
if (this.autoPropagation && this.usePropagationX) {
this.allowPropagationX = false;
}
}
else if (state === 'y') {
this.indicatorY = false;
this.states.top = false;
this.states.bottom = false;
if (this.autoPropagation && this.usePropagationY) {
this.allowPropagationY = false;
}
}
}
else {
if (state === 'left' || state === 'right') {
this.states.left = false;
this.states.right = false;
this.states[state] = true;
if (this.autoPropagation && this.usePropagationX) {
this.indicatorX = true;
}
}
else if (state === 'top' || state === 'bottom') {
this.states.top = false;
this.states.bottom = false;
this.states[state] = true;
if (this.autoPropagation && this.usePropagationY) {
this.indicatorY = true;
}
}
if (this.autoPropagation && typeof window !== 'undefined') {
this.stateTimeout = window.setTimeout(() => {
this.indicatorX = false;
this.indicatorY = false;
this.stateTimeout = null;
if (this.interaction && (this.states.left || this.states.right)) {
this.allowPropagationX = true;
}
if (this.interaction && (this.states.top || this.states.bottom)) {
this.allowPropagationY = true;
}
this.cdRef.markForCheck();
}, 500);
}
}
this.cdRef.markForCheck();
this.cdRef.detectChanges();
});
this.zone.runOutsideAngular(() => {
if (this.directiveRef) {
const element = this.directiveRef.elementRef.nativeElement;
fromEvent(element, 'wheel')
.pipe(takeUntil(this.ngDestroy))
.subscribe((event) => {
if (!this.disabled && this.autoPropagation) {
const scrollDeltaX = event.deltaX;
const scrollDeltaY = event.deltaY;
this.checkPropagation(event, scrollDeltaX, scrollDeltaY);
}
});
fromEvent(element, 'touchmove')
.pipe(takeUntil(this.ngDestroy))
.subscribe((event) => {
if (!this.disabled && this.autoPropagation) {
const scrollPositionX = event.touches[0].clientX;
const scrollPositionY = event.touches[0].clientY;
const scrollDeltaX = scrollPositionX - this.scrollPositionX;
const scrollDeltaY = scrollPositionY - this.scrollPositionY;
this.checkPropagation(event, scrollDeltaX, scrollDeltaY);
this.scrollPositionX = scrollPositionX;
this.scrollPositionY = scrollPositionY;
}
});
merge(fromEvent(element, 'ps-scroll-x')
.pipe(mapTo('x')), fromEvent(element, 'ps-scroll-y')
.pipe(mapTo('y')), fromEvent(element, 'ps-x-reach-end')
.pipe(mapTo('right')), fromEvent(element, 'ps-y-reach-end')
.pipe(mapTo('bottom')), fromEvent(element, 'ps-x-reach-start')
.pipe(mapTo('left')), fromEvent(element, 'ps-y-reach-start')
.pipe(mapTo('top')))
.pipe(takeUntil(this.ngDestroy))
.subscribe((state) => {
if (!this.disabled && (this.autoPropagation || this.scrollIndicators)) {
this.stateUpdate.next(state);
}
});
}
});
window.setTimeout(() => {
PerfectScrollbarEvents.forEach((eventName) => {
if (this.directiveRef) {
this.directiveRef[eventName] = this[eventName];
}
});
}, 0);
}
}
ngOnDestroy() {
if (isPlatformBrowser(this.platformId)) {
this.ngDestroy.next();
this.ngDestroy.unsubscribe();
if (this.stateTimeout && typeof window !== 'undefined') {
window.clearTimeout(this.stateTimeout);
}
}
}
ngDoCheck() {
if (isPlatformBrowser(this.platformId)) {
if (!this.disabled && this.autoPropagation && this.directiveRef) {
const element = this.directiveRef.elementRef.nativeElement;
this.usePropagationX = element.classList.contains('ps--active-x');
this.usePropagationY = element.classList.contains('ps--active-y');
}
}
}
checkPropagation(event, deltaX, deltaY) {
this.interaction = true;
const scrollDirectionX = (deltaX < 0) ? -1 : 1;
const scrollDirectionY = (deltaY < 0) ? -1 : 1;
if ((this.usePropagationX && this.usePropagationY) ||
(this.usePropagationX && (!this.allowPropagationX ||
(this.scrollDirectionX !== scrollDirectionX))) ||
(this.usePropagationY && (!this.allowPropagationY ||
(this.scrollDirectionY !== scrollDirectionY)))) {
event.preventDefault();
event.stopPropagation();
}
if (!!deltaX) {
this.scrollDirectionX = scrollDirectionX;
}
if (!!deltaY) {
this.scrollDirectionY = scrollDirectionY;
}
this.stateUpdate.next('interaction');
this.cdRef.detectChanges();
}
}
PerfectScrollbarComponent.decorators = [
{ type: Component, args: [{
selector: 'perfect-scrollbar',
exportAs: 'ngxPerfectScrollbar',
template: "<div style=\"position: static;\" [class.ps]=\"usePSClass\" [perfectScrollbar]=\"config\" [disabled]=\"disabled\">\n <div class=\"ps-content\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"scrollIndicators\" class=\"ps-overlay\" [class.ps-at-top]=\"states.top\" [class.ps-at-left]=\"states.left\" [class.ps-at-right]=\"states.right\" [class.ps-at-bottom]=\"states.bottom\">\n <div class=\"ps-indicator-top\" [class.ps-indicator-show]=\"indicatorY && interaction\"></div>\n <div class=\"ps-indicator-left\" [class.ps-indicator-show]=\"indicatorX && interaction\"></div>\n <div class=\"ps-indicator-right\" [class.ps-indicator-show]=\"indicatorX && interaction\"></div>\n <div class=\"ps-indicator-bottom\" [class.ps-indicator-show]=\"indicatorY && interaction\"></div>\n </div>\n</div>\n",
encapsulation: ViewEncapsulation.None,
styles: ["perfect-scrollbar{display:block;height:100%;max-height:100%;max-width:100%;overflow:hidden;position:relative;width:100%}perfect-scrollbar[hidden]{display:none}perfect-scrollbar[fxflex]{display:flex;flex-direction:column;height:auto;min-height:0;min-width:0}perfect-scrollbar[fxflex]>.ps{-webkit-box-flex:1;flex:1 1 auto;height:auto;min-height:0;min-width:0;width:auto}perfect-scrollbar[fxlayout]>.ps,perfect-scrollbar[fxlayout]>.ps>.ps-content{-webkit-box-align:inherit;-webkit-box-flex:1;-webkit-box-pack:inherit;align-content:inherit;align-items:inherit;display:flex;flex:1 1 auto;flex-direction:inherit;height:100%;justify-content:inherit;width:100%},perfect-scrollbar[fxlayout=row]>.ps,perfect-scrollbar[fxlayout=row]>.ps>.ps-content{flex-direction:row!important}perfect-scrollbar[fxlayout=column]>.ps,perfect-scrollbar[fxlayout=column]>.ps>.ps-content{flex-direction:column!important}perfect-scrollbar>.ps{display:block;height:100%;max-height:100%;max-width:100%;position:static;width:100%}perfect-scrollbar>.ps textarea{-ms-overflow-style:scrollbar}perfect-scrollbar>.ps>.ps-overlay{bottom:0;display:block;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{opacity:0;position:absolute;transition:opacity .3s ease-in-out}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{left:0;min-height:24px;min-width:100%}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right{min-height:100%;min-width:24px;top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left{left:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right{right:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom{bottom:0}perfect-scrollbar>.ps.ps--active-y>.ps__rail-y{cursor:default;left:auto!important;right:0!important;top:0!important;transition:width .2s linear,opacity .2s linear,background-color .2s linear;width:10px}perfect-scrollbar>.ps.ps--active-y>.ps__rail-y.ps--clicking,perfect-scrollbar>.ps.ps--active-y>.ps__rail-y:hover{width:15px}perfect-scrollbar>.ps.ps--active-x>.ps__rail-x{bottom:0!important;cursor:default;height:10px;left:0!important;top:auto!important;transition:height .2s linear,opacity .2s linear,background-color .2s linear}perfect-scrollbar>.ps.ps--active-x>.ps__rail-x.ps--clicking,perfect-scrollbar>.ps.ps--active-x>.ps__rail-x:hover{height:15px}perfect-scrollbar>.ps.ps--active-x.ps--active-y>.ps__rail-y{margin:0 0 10px}perfect-scrollbar>.ps.ps--active-x.ps--active-y>.ps__rail-x{margin:0 10px 0 0}perfect-scrollbar>.ps.ps--scrolling-x>.ps__rail-x,perfect-scrollbar>.ps.ps--scrolling-y>.ps__rail-y{background-color:#eee;opacity:.9}perfect-scrollbar.ps-show-always>.ps.ps--active-x>.ps__rail-x,perfect-scrollbar.ps-show-always>.ps.ps--active-y>.ps__rail-y{opacity:.6}perfect-scrollbar.ps-show-active>.ps.ps--active-y>.ps-overlay:not(.ps-at-top) .ps-indicator-top{background:linear-gradient(180deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-y>.ps-overlay:not(.ps-at-bottom) .ps-indicator-bottom{background:linear-gradient(0deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-x>.ps-overlay:not(.ps-at-left) .ps-indicator-left{background:linear-gradient(90deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-x>.ps-overlay:not(.ps-at-right) .ps-indicator-right{background:linear-gradient(270deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-top .ps-indicator-top{background:linear-gradient(180deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-bottom .ps-indicator-bottom{background:linear-gradient(0deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-left .ps-indicator-left{background:linear-gradient(90deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-right .ps-indicator-right{background:linear-gradient(270deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-left .ps-indicator-left.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-right .ps-indicator-right.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-bottom .ps-indicator-bottom.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps-Line truncated
},] }
];
PerfectScrollbarComponent.ctorParameters = () => [
{ type: NgZone },
{ type: ChangeDetectorRef },
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
];
PerfectScrollbarComponent.propDecorators = {
disabled: [{ type: Input }],
usePSClass: [{ type: Input }],
autoPropagation: [{ type: HostBinding, args: ['class.ps-show-limits',] }, { type: Input }],
scrollIndicators: [{ type: HostBinding, args: ['class.ps-show-active',] }, { type: Input }],
config: [{ type: Input }],
psScrollY: [{ type: Output }],
psScrollX: [{ type: Output }],
psScrollUp: [{ type: Output }],
psScrollDown: [{ type: Output }],
psScrollLeft: [{ type: Output }],
psScrollRight: [{ type: Output }],
psYReachEnd: [{ type: Output }],
psYReachStart: [{ type: Output }],
psXReachEnd: [{ type: Output }],
psXReachStart: [{ type: Output }],
directiveRef: [{ type: ViewChild, args: [PerfectScrollbarDirective, { static: true },] }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyZmVjdC1zY3JvbGxiYXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbGliL3NyYy9saWIvcGVyZmVjdC1zY3JvbGxiYXIuY29tcG9uZW50LnRzIl0sIm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UsR0FBRyxJQUFJLENBQUM7eUJBQ3hCO3FCQUNGO29CQUVELElBQUksSUFBSSxDQUFDLGVBQWUsSUFBSSxPQUFPLE1BQU0sS0FBSyxXQUFXLEVBQUU7d0JBQ3pELElBQUksQ0FBQyxZQUFZLEdBQUcsTUFBTSxDQUFDLFVBQVUsQ0FBQyxHQUFHLEVBQUU7NEJBQ3pDLElBQUksQ0FBQyxVQUFVLEdBQUcsS0FBSyxDQUFDOzRCQUN4QixJQUFJLENBQUMsVUFBVSxHQUFHLEtBQUssQ0FBQzs0QkFFeEIsSUFBSSxDQUFDLFlBQVksR0FBRyxJQUFJLENBQUM7NEJBRXpCLElBQUksSUFBSSxDQUFDLFdBQVcsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLEVBQUU7Z0NBQy9ELElBQUksQ0FBQyxpQkFBaUIsR0FBRyxJQUFJLENBQUM7NkJBQy9COzRCQUVEL Line truncated
@@ -0,0 +1,273 @@
import PerfectScrollbar from 'perfect-scrollbar';
import ResizeObserver from 'resize-observer-polyfill';
import { Subject, fromEvent } from 'rxjs';
import { auditTime, takeUntil } from 'rxjs/operators';
import { PLATFORM_ID } from '@angular/core';
import { isPlatformBrowser } from '@angular/common';
import { NgZone, Inject, Optional, ElementRef, Directive, Input, Output, EventEmitter, KeyValueDiffers } from '@angular/core';
import { Geometry, Position } from './perfect-scrollbar.interfaces';
import { PERFECT_SCROLLBAR_CONFIG, PerfectScrollbarConfig, PerfectScrollbarEvents } from './perfect-scrollbar.interfaces';
export class PerfectScrollbarDirective {
constructor(zone, differs, elementRef, platformId, defaults) {
this.zone = zone;
this.differs = differs;
this.elementRef = elementRef;
this.platformId = platformId;
this.defaults = defaults;
this.instance = null;
this.ro = null;
this.timeout = null;
this.animation = null;
this.configDiff = null;
this.ngDestroy = new Subject();
this.disabled = false;
this.psScrollY = new EventEmitter();
this.psScrollX = new EventEmitter();
this.psScrollUp = new EventEmitter();
this.psScrollDown = new EventEmitter();
this.psScrollLeft = new EventEmitter();
this.psScrollRight = new EventEmitter();
this.psYReachEnd = new EventEmitter();
this.psYReachStart = new EventEmitter();
this.psXReachEnd = new EventEmitter();
this.psXReachStart = new EventEmitter();
}
ngOnInit() {
if (!this.disabled && isPlatformBrowser(this.platformId)) {
const config = new PerfectScrollbarConfig(this.defaults);
config.assign(this.config); // Custom configuration
this.zone.runOutsideAngular(() => {
this.instance = new PerfectScrollbar(this.elementRef.nativeElement, config);
});
if (!this.configDiff) {
this.configDiff = this.differs.find(this.config || {}).create();
this.configDiff.diff(this.config || {});
}
this.zone.runOutsideAngular(() => {
this.ro = new ResizeObserver(() => {
this.update();
});
if (this.elementRef.nativeElement.children[0]) {
this.ro.observe(this.elementRef.nativeElement.children[0]);
}
this.ro.observe(this.elementRef.nativeElement);
});
this.zone.runOutsideAngular(() => {
PerfectScrollbarEvents.forEach((eventName) => {
const eventType = eventName.replace(/([A-Z])/g, (c) => `-${c.toLowerCase()}`);
fromEvent(this.elementRef.nativeElement, eventType)
.pipe(auditTime(20), takeUntil(this.ngDestroy))
.subscribe((event) => {
this[eventName].emit(event);
});
});
});
}
}
ngOnDestroy() {
if (isPlatformBrowser(this.platformId)) {
this.ngDestroy.next();
this.ngDestroy.complete();
if (this.ro) {
this.ro.disconnect();
}
if (this.timeout && typeof window !== 'undefined') {
window.clearTimeout(this.timeout);
}
this.zone.runOutsideAngular(() => {
if (this.instance) {
this.instance.destroy();
}
});
this.instance = null;
}
}
ngDoCheck() {
if (!this.disabled && this.configDiff && isPlatformBrowser(this.platformId)) {
const changes = this.configDiff.diff(this.config || {});
if (changes) {
this.ngOnDestroy();
this.ngOnInit();
}
}
}
ngOnChanges(changes) {
if (changes['disabled'] && !changes['disabled'].isFirstChange() && isPlatformBrowser(this.platformId)) {
if (changes['disabled'].currentValue !== changes['disabled'].previousValue) {
if (changes['disabled'].currentValue === true) {
this.ngOnDestroy();
}
else if (changes['disabled'].currentValue === false) {
this.ngOnInit();
}
}
}
}
ps() {
return this.instance;
}
update() {
if (typeof window !== 'undefined') {
if (this.timeout) {
window.clearTimeout(this.timeout);
}
this.timeout = window.setTimeout(() => {
if (!this.disabled && this.configDiff) {
try {
this.zone.runOutsideAngular(() => {
if (this.instance) {
this.instance.update();
}
});
}
catch (error) {
// Update can be finished after destroy so catch errors
}
}
}, 0);
}
}
geometry(prefix = 'scroll') {
return new Geometry(this.elementRef.nativeElement[prefix + 'Left'], this.elementRef.nativeElement[prefix + 'Top'], this.elementRef.nativeElement[prefix + 'Width'], this.elementRef.nativeElement[prefix + 'Height']);
}
position(absolute = false) {
if (!absolute && this.instance) {
return new Position(this.instance.reach.x || 0, this.instance.reach.y || 0);
}
else {
return new Position(this.elementRef.nativeElement.scrollLeft, this.elementRef.nativeElement.scrollTop);
}
}
scrollable(direction = 'any') {
const element = this.elementRef.nativeElement;
if (direction === 'any') {
return element.classList.contains('ps--active-x') ||
element.classList.contains('ps--active-y');
}
else if (direction === 'both') {
return element.classList.contains('ps--active-x') &&
element.classList.contains('ps--active-y');
}
else {
return element.classList.contains('ps--active-' + direction);
}
}
scrollTo(x, y, speed) {
if (!this.disabled) {
if (y == null && speed == null) {
this.animateScrolling('scrollTop', x, speed);
}
else {
if (x != null) {
this.animateScrolling('scrollLeft', x, speed);
}
if (y != null) {
this.animateScrolling('scrollTop', y, speed);
}
}
}
}
scrollToX(x, speed) {
this.animateScrolling('scrollLeft', x, speed);
}
scrollToY(y, speed) {
this.animateScrolling('scrollTop', y, speed);
}
scrollToTop(offset, speed) {
this.animateScrolling('scrollTop', (offset || 0), speed);
}
scrollToLeft(offset, speed) {
this.animateScrolling('scrollLeft', (offset || 0), speed);
}
scrollToRight(offset, speed) {
const left = this.elementRef.nativeElement.scrollWidth -
this.elementRef.nativeElement.clientWidth;
this.animateScrolling('scrollLeft', left - (offset || 0), speed);
}
scrollToBottom(offset, speed) {
const top = this.elementRef.nativeElement.scrollHeight -
this.elementRef.nativeElement.clientHeight;
this.animateScrolling('scrollTop', top - (offset || 0), speed);
}
scrollToElement(element, offset, speed) {
if (typeof element === 'string') {
element = this.elementRef.nativeElement.querySelector(element);
}
if (element) {
const elementPos = element.getBoundingClientRect();
const scrollerPos = this.elementRef.nativeElement.getBoundingClientRect();
if (this.elementRef.nativeElement.classList.contains('ps--active-x')) {
const currentPos = this.elementRef.nativeElement['scrollLeft'];
const position = elementPos.left - scrollerPos.left + currentPos;
this.animateScrolling('scrollLeft', position + (offset || 0), speed);
}
if (this.elementRef.nativeElement.classList.contains('ps--active-y')) {
const currentPos = this.elementRef.nativeElement['scrollTop'];
const position = elementPos.top - scrollerPos.top + currentPos;
this.animateScrolling('scrollTop', position + (offset || 0), speed);
}
}
}
animateScrolling(target, value, speed) {
if (this.animation) {
window.cancelAnimationFrame(this.animation);
this.animation = null;
}
if (!speed || typeof window === 'undefined') {
this.elementRef.nativeElement[target] = value;
}
else if (value !== this.elementRef.nativeElement[target]) {
let newValue = 0;
let scrollCount = 0;
let oldTimestamp = performance.now();
let oldValue = this.elementRef.nativeElement[target];
const cosParameter = (oldValue - value) / 2;
const step = (newTimestamp) => {
scrollCount += Math.PI / (speed / (newTimestamp - oldTimestamp));
newValue = Math.round(value + cosParameter + cosParameter * Math.cos(scrollCount));
// Only continue animation if scroll position has not changed
if (this.elementRef.nativeElement[target] === oldValue) {
if (scrollCount >= Math.PI) {
this.animateScrolling(target, value, 0);
}
else {
this.elementRef.nativeElement[target] = newValue;
// On a zoomed out page the resulting offset may differ
oldValue = this.elementRef.nativeElement[target];
oldTimestamp = newTimestamp;
this.animation = window.requestAnimationFrame(step);
}
}
};
window.requestAnimationFrame(step);
}
}
}
PerfectScrollbarDirective.decorators = [
{ type: Directive, args: [{
selector: '[perfectScrollbar]',
exportAs: 'ngxPerfectScrollbar'
},] }
];
PerfectScrollbarDirective.ctorParameters = () => [
{ type: NgZone },
{ type: KeyValueDiffers },
{ type: ElementRef },
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [PERFECT_SCROLLBAR_CONFIG,] }] }
];
PerfectScrollbarDirective.propDecorators = {
disabled: [{ type: Input }],
config: [{ type: Input, args: ['perfectScrollbar',] }],
psScrollY: [{ type: Output }],
psScrollX: [{ type: Output }],
psScrollUp: [{ type: Output }],
psScrollDown: [{ type: Output }],
psScrollLeft: [{ type: Output }],
psScrollRight: [{ type: Output }],
psYReachEnd: [{ type: Output }],
psYReachStart: [{ type: Output }],
psXReachEnd: [{ type: Output }],
psXReachStart: [{ type: Output }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyZmVjdC1zY3JvbGxiYXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbGliL3NyYy9saWIvcGVyZmVjdC1zY3JvbGxiYXIuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sZ0JBQWdCLE1BQU0sbUJBQW1CLENBQUM7QUFFakQsT0FBTyxjQUFjLE1BQU0sMEJBQTBCLENBQUM7QUFFdEQsT0FBTyxFQUFFLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFDMUMsT0FBTyxFQUFFLFNBQVMsRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUV0RCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzVDLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ3BELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLFFBQVEsRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUNmLEtBQUssRUFBRSxNQUFNLEVBQUUsWUFBWSxF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FHLElBQUksQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxNQUFNLElBQUksRUFBRSxDQUFDL Line truncated
@@ -0,0 +1,39 @@
import { InjectionToken } from '@angular/core';
export const PERFECT_SCROLLBAR_CONFIG = new InjectionToken('PERFECT_SCROLLBAR_CONFIG');
export class Geometry {
constructor(x, y, w, h) {
this.x = x;
this.y = y;
this.w = w;
this.h = h;
}
}
export class Position {
constructor(x, y) {
this.x = x;
this.y = y;
}
}
export const PerfectScrollbarEvents = [
'psScrollY',
'psScrollX',
'psScrollUp',
'psScrollDown',
'psScrollLeft',
'psScrollRight',
'psYReachEnd',
'psYReachStart',
'psXReachEnd',
'psXReachStart'
];
export class PerfectScrollbarConfig {
constructor(config = {}) {
this.assign(config);
}
assign(config = {}) {
for (const key in config) {
this[key] = config[key];
}
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyZmVjdC1zY3JvbGxiYXIuaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2xpYi9zcmMvbGliL3BlcmZlY3Qtc2Nyb2xsYmFyLmludGVyZmFjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUvQyxNQUFNLENBQUMsTUFBTSx3QkFBd0IsR0FBRyxJQUFJLGNBQWMsQ0FBQywwQkFBMEIsQ0FBQyxDQUFDO0FBRXZGLE1BQU0sT0FBTyxRQUFRO0lBT25CLFlBQVksQ0FBUyxFQUFFLENBQVMsRUFBRSxDQUFTLEVBQUUsQ0FBUztRQUNwRCxJQUFJLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUNYLElBQUksQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBQ1gsSUFBSSxDQUF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bFByb3BhZ2F0aW9uPzogYm9vbGVhbjtcbiAgcHVibGljIHVzZUJvdGhXaGVlbEF4ZXM/OiBib29sZWFuO1xuXG4gIHB1YmxpYyBzY3JvbGxpbmdUaHJlc2hvbGQ/OiBudW1iZXI7XG5cbiAgcHVibGljIG1pblNjcm9sbGJhckxlbmd0aD86IG51bWJlcjtcbiAgcHVibGljIG1heFNjcm9sbGJhckxlbmd0aD86IG51bWJlcjtcblxuICBwdWJsaWMgc2Nyb2xsWE1hcmdpbk9mZnNldD86IG51bWJlcjtcbiAgcHVibGljIHNjcm9sbFlNYXJnaW5PZmZzZXQ/OiBudW1iZXI7XG5cbiAgY29uc3RydWN0b3IoY29uZmlnOiBQZXJmZWN0U2Nyb2xsYmFyQ29uZmlnSW50ZXJmYWNlID0ge30pIHtcbiAgICB0aGlzLmFzc2lnbihjb25maWcpO1xuICB9XG5cbiAgcHVibGljIGFzc2lnbihjb25maWc6IFBlcmZlY3RTY3JvbGxiYXJDb25maWdJbnRlcmZhY2UgPSB7fSkge1xuICAgIGZvciAoY29uc3Qga2V5IGluIGNvbmZpZykge1xuICAgICAgdGhpc1trZXkgYXMga2V5b2YgUGVyZmVjdFNjcm9sbGJhckNvbmZpZ10gPSBjb25maWdba2V5IGFzIGtleW9mIFBlcmZlY3RTY3JvbGxiYXJDb25maWdJbnRlcmZhY2VdIGFzIG5ldmVyO1xuICAgIH1cbiAgfVxufVxuIl19
@@ -0,0 +1,15 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PerfectScrollbarComponent } from './perfect-scrollbar.component';
import { PerfectScrollbarDirective } from './perfect-scrollbar.directive';
import { ForceNativeScrollDirective } from './perfect-scrollbar-force-native-scroll.directive';
export class PerfectScrollbarModule {
}
PerfectScrollbarModule.decorators = [
{ type: NgModule, args: [{
imports: [CommonModule],
declarations: [PerfectScrollbarComponent, PerfectScrollbarDirective, ForceNativeScrollDirective],
exports: [CommonModule, PerfectScrollbarComponent, PerfectScrollbarDirective,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mNvbXBvbmVudCc7XG5pbXBvcnQgeyBQZXJmZWN0U2Nyb2xsYmFyRGlyZWN0aXZlIH0gZnJvbSAnLi9wZXJmZWN0LXNjcm9sbGJhci5kaXJlY3RpdmUnO1xuaW1wb3J0IHsgRm9yY2VOYXRpdmVTY3JvbGxEaXJlY3RpdmUgfSBmcm9tICcuL3BlcmZlY3Qtc2Nyb2xsYmFyLWZvcmNlLW5hdGl2ZS1zY3JvbGwuZGlyZWN0aXZlJztcblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbQ29tbW9uTW9kdWxlXSxcbiAgICBkZWNsYXJhdGlvbnM6IFtQZXJmZWN0U2Nyb2xsYmFyQ29tcG9uZW50LCBQZXJmZWN0U2Nyb2xsYmFyRGlyZWN0aXZlLCBGb3JjZU5hdGl2ZVNjcm9sbERpcmVjdGl2ZV0sXG4gICAgZXhwb3J0czogW0NvbW1vbk1vZHVsZSwgUGVyZmVjdFNjcm9sbGJhckNvbXBvbmVudCwgUGVyZmVjdFNjcm9sbGJhckRpcmVjdGl2ZSwgRm9yY2VOYXRpdmVTY3JvbGxEaXJlY3RpdmVdXG59KVxuZXhwb3J0IGNsYXNzIFBlcmZlY3RTY3JvbGxiYXJNb2R1bGUge1xufVxuIl19
@@ -0,0 +1,6 @@
/**
* Generated bundle index. Do not edit.
*/
export * from './public-api';
export { ForceNativeScrollDirective as ɵa } from './lib/perfect-scrollbar-force-native-scroll.directive';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXBlcmZlY3Qtc2Nyb2xsYmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvbGliL3NyYy9uZ3gtcGVyZmVjdC1zY3JvbGxiYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQztBQUU3QixPQUFPLEVBQUMsMEJBQTBCLElBQUksRUFBRSxFQUFDLE1BQU0sdURBQXVELENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG5cbmV4cG9ydCB7Rm9yY2VOYXRpdmVTY3JvbGxEaXJlY3RpdmUgYXMgybVhfSBmcm9tICcuL2xpYi9wZXJmZWN0LXNjcm9sbGJhci1mb3JjZS1uYXRpdmUtc2Nyb2xsLmRpcmVjdGl2ZSc7Il19
+5
View File
@@ -0,0 +1,5 @@
export { PerfectScrollbarComponent } from './lib/perfect-scrollbar.component';
export { PerfectScrollbarDirective } from './lib/perfect-scrollbar.directive';
export { Geometry, Position, PERFECT_SCROLLBAR_CONFIG, PerfectScrollbarConfig } from './lib/perfect-scrollbar.interfaces';
export { PerfectScrollbarModule } from './lib/perfect-scrollbar.module';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2xpYi9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUM5RSxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxtQ0FBbUMsQ0FBQztBQUU5RSxPQUFPLEVBQ0wsUUFBUSxFQUNSLFFBQVEsRUFFUix3QkFBd0IsRUFFeEIsc0JBQXNCLEVBRXZCLE1BQU0sb0NBQW9DLENBQUM7QUFFNUMsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sZ0NBQWdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBQZXJmZWN0U2Nyb2xsYmFyQ29tcG9uZW50IH0gZnJvbSAnLi9saWIvcGVyZmVjdC1zY3JvbGxiYXIuY29tcG9uZW50JztcbmV4cG9ydCB7IFBlcmZlY3RTY3JvbGxiYXJEaXJlY3RpdmUgfSBmcm9tICcuL2xpYi9wZXJmZWN0LXNjcm9sbGJhci5kaXJlY3RpdmUnO1xuXG5leHBvcnQge1xuICBHZW9tZXRyeSxcbiAgUG9zaXRpb24sXG5cbiAgUEVSRkVDVF9TQ1JPTExCQVJfQ09ORklHLFxuXG4gIFBlcmZlY3RTY3JvbGxiYXJDb25maWcsXG4gIFBlcmZlY3RTY3JvbGxiYXJDb25maWdJbnRlcmZhY2Vcbn0gZnJvbSAnLi9saWIvcGVyZmVjdC1zY3JvbGxiYXIuaW50ZXJmYWNlcyc7XG5cbmV4cG9ydCB7IFBlcmZlY3RTY3JvbGxiYXJNb2R1bGUgfSBmcm9tICcuL2xpYi9wZXJmZWN0LXNjcm9sbGJhci5tb2R1bGUnO1xuIl19
@@ -0,0 +1,563 @@
import { Subject, fromEvent, merge } from 'rxjs';
import { auditTime, takeUntil, distinctUntilChanged, mapTo } from 'rxjs/operators';
import { InjectionToken, EventEmitter, Directive, NgZone, KeyValueDiffers, ElementRef, Inject, PLATFORM_ID, Optional, Input, Output, Component, ViewEncapsulation, ChangeDetectorRef, HostBinding, ViewChild, Renderer2, NgModule } from '@angular/core';
import { isPlatformBrowser, CommonModule } from '@angular/common';
import PerfectScrollbar from 'perfect-scrollbar';
import ResizeObserver from 'resize-observer-polyfill';
const PERFECT_SCROLLBAR_CONFIG = new InjectionToken('PERFECT_SCROLLBAR_CONFIG');
class Geometry {
constructor(x, y, w, h) {
this.x = x;
this.y = y;
this.w = w;
this.h = h;
}
}
class Position {
constructor(x, y) {
this.x = x;
this.y = y;
}
}
const PerfectScrollbarEvents = [
'psScrollY',
'psScrollX',
'psScrollUp',
'psScrollDown',
'psScrollLeft',
'psScrollRight',
'psYReachEnd',
'psYReachStart',
'psXReachEnd',
'psXReachStart'
];
class PerfectScrollbarConfig {
constructor(config = {}) {
this.assign(config);
}
assign(config = {}) {
for (const key in config) {
this[key] = config[key];
}
}
}
class PerfectScrollbarDirective {
constructor(zone, differs, elementRef, platformId, defaults) {
this.zone = zone;
this.differs = differs;
this.elementRef = elementRef;
this.platformId = platformId;
this.defaults = defaults;
this.instance = null;
this.ro = null;
this.timeout = null;
this.animation = null;
this.configDiff = null;
this.ngDestroy = new Subject();
this.disabled = false;
this.psScrollY = new EventEmitter();
this.psScrollX = new EventEmitter();
this.psScrollUp = new EventEmitter();
this.psScrollDown = new EventEmitter();
this.psScrollLeft = new EventEmitter();
this.psScrollRight = new EventEmitter();
this.psYReachEnd = new EventEmitter();
this.psYReachStart = new EventEmitter();
this.psXReachEnd = new EventEmitter();
this.psXReachStart = new EventEmitter();
}
ngOnInit() {
if (!this.disabled && isPlatformBrowser(this.platformId)) {
const config = new PerfectScrollbarConfig(this.defaults);
config.assign(this.config); // Custom configuration
this.zone.runOutsideAngular(() => {
this.instance = new PerfectScrollbar(this.elementRef.nativeElement, config);
});
if (!this.configDiff) {
this.configDiff = this.differs.find(this.config || {}).create();
this.configDiff.diff(this.config || {});
}
this.zone.runOutsideAngular(() => {
this.ro = new ResizeObserver(() => {
this.update();
});
if (this.elementRef.nativeElement.children[0]) {
this.ro.observe(this.elementRef.nativeElement.children[0]);
}
this.ro.observe(this.elementRef.nativeElement);
});
this.zone.runOutsideAngular(() => {
PerfectScrollbarEvents.forEach((eventName) => {
const eventType = eventName.replace(/([A-Z])/g, (c) => `-${c.toLowerCase()}`);
fromEvent(this.elementRef.nativeElement, eventType)
.pipe(auditTime(20), takeUntil(this.ngDestroy))
.subscribe((event) => {
this[eventName].emit(event);
});
});
});
}
}
ngOnDestroy() {
if (isPlatformBrowser(this.platformId)) {
this.ngDestroy.next();
this.ngDestroy.complete();
if (this.ro) {
this.ro.disconnect();
}
if (this.timeout && typeof window !== 'undefined') {
window.clearTimeout(this.timeout);
}
this.zone.runOutsideAngular(() => {
if (this.instance) {
this.instance.destroy();
}
});
this.instance = null;
}
}
ngDoCheck() {
if (!this.disabled && this.configDiff && isPlatformBrowser(this.platformId)) {
const changes = this.configDiff.diff(this.config || {});
if (changes) {
this.ngOnDestroy();
this.ngOnInit();
}
}
}
ngOnChanges(changes) {
if (changes['disabled'] && !changes['disabled'].isFirstChange() && isPlatformBrowser(this.platformId)) {
if (changes['disabled'].currentValue !== changes['disabled'].previousValue) {
if (changes['disabled'].currentValue === true) {
this.ngOnDestroy();
}
else if (changes['disabled'].currentValue === false) {
this.ngOnInit();
}
}
}
}
ps() {
return this.instance;
}
update() {
if (typeof window !== 'undefined') {
if (this.timeout) {
window.clearTimeout(this.timeout);
}
this.timeout = window.setTimeout(() => {
if (!this.disabled && this.configDiff) {
try {
this.zone.runOutsideAngular(() => {
if (this.instance) {
this.instance.update();
}
});
}
catch (error) {
// Update can be finished after destroy so catch errors
}
}
}, 0);
}
}
geometry(prefix = 'scroll') {
return new Geometry(this.elementRef.nativeElement[prefix + 'Left'], this.elementRef.nativeElement[prefix + 'Top'], this.elementRef.nativeElement[prefix + 'Width'], this.elementRef.nativeElement[prefix + 'Height']);
}
position(absolute = false) {
if (!absolute && this.instance) {
return new Position(this.instance.reach.x || 0, this.instance.reach.y || 0);
}
else {
return new Position(this.elementRef.nativeElement.scrollLeft, this.elementRef.nativeElement.scrollTop);
}
}
scrollable(direction = 'any') {
const element = this.elementRef.nativeElement;
if (direction === 'any') {
return element.classList.contains('ps--active-x') ||
element.classList.contains('ps--active-y');
}
else if (direction === 'both') {
return element.classList.contains('ps--active-x') &&
element.classList.contains('ps--active-y');
}
else {
return element.classList.contains('ps--active-' + direction);
}
}
scrollTo(x, y, speed) {
if (!this.disabled) {
if (y == null && speed == null) {
this.animateScrolling('scrollTop', x, speed);
}
else {
if (x != null) {
this.animateScrolling('scrollLeft', x, speed);
}
if (y != null) {
this.animateScrolling('scrollTop', y, speed);
}
}
}
}
scrollToX(x, speed) {
this.animateScrolling('scrollLeft', x, speed);
}
scrollToY(y, speed) {
this.animateScrolling('scrollTop', y, speed);
}
scrollToTop(offset, speed) {
this.animateScrolling('scrollTop', (offset || 0), speed);
}
scrollToLeft(offset, speed) {
this.animateScrolling('scrollLeft', (offset || 0), speed);
}
scrollToRight(offset, speed) {
const left = this.elementRef.nativeElement.scrollWidth -
this.elementRef.nativeElement.clientWidth;
this.animateScrolling('scrollLeft', left - (offset || 0), speed);
}
scrollToBottom(offset, speed) {
const top = this.elementRef.nativeElement.scrollHeight -
this.elementRef.nativeElement.clientHeight;
this.animateScrolling('scrollTop', top - (offset || 0), speed);
}
scrollToElement(element, offset, speed) {
if (typeof element === 'string') {
element = this.elementRef.nativeElement.querySelector(element);
}
if (element) {
const elementPos = element.getBoundingClientRect();
const scrollerPos = this.elementRef.nativeElement.getBoundingClientRect();
if (this.elementRef.nativeElement.classList.contains('ps--active-x')) {
const currentPos = this.elementRef.nativeElement['scrollLeft'];
const position = elementPos.left - scrollerPos.left + currentPos;
this.animateScrolling('scrollLeft', position + (offset || 0), speed);
}
if (this.elementRef.nativeElement.classList.contains('ps--active-y')) {
const currentPos = this.elementRef.nativeElement['scrollTop'];
const position = elementPos.top - scrollerPos.top + currentPos;
this.animateScrolling('scrollTop', position + (offset || 0), speed);
}
}
}
animateScrolling(target, value, speed) {
if (this.animation) {
window.cancelAnimationFrame(this.animation);
this.animation = null;
}
if (!speed || typeof window === 'undefined') {
this.elementRef.nativeElement[target] = value;
}
else if (value !== this.elementRef.nativeElement[target]) {
let newValue = 0;
let scrollCount = 0;
let oldTimestamp = performance.now();
let oldValue = this.elementRef.nativeElement[target];
const cosParameter = (oldValue - value) / 2;
const step = (newTimestamp) => {
scrollCount += Math.PI / (speed / (newTimestamp - oldTimestamp));
newValue = Math.round(value + cosParameter + cosParameter * Math.cos(scrollCount));
// Only continue animation if scroll position has not changed
if (this.elementRef.nativeElement[target] === oldValue) {
if (scrollCount >= Math.PI) {
this.animateScrolling(target, value, 0);
}
else {
this.elementRef.nativeElement[target] = newValue;
// On a zoomed out page the resulting offset may differ
oldValue = this.elementRef.nativeElement[target];
oldTimestamp = newTimestamp;
this.animation = window.requestAnimationFrame(step);
}
}
};
window.requestAnimationFrame(step);
}
}
}
PerfectScrollbarDirective.decorators = [
{ type: Directive, args: [{
selector: '[perfectScrollbar]',
exportAs: 'ngxPerfectScrollbar'
},] }
];
PerfectScrollbarDirective.ctorParameters = () => [
{ type: NgZone },
{ type: KeyValueDiffers },
{ type: ElementRef },
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [PERFECT_SCROLLBAR_CONFIG,] }] }
];
PerfectScrollbarDirective.propDecorators = {
disabled: [{ type: Input }],
config: [{ type: Input, args: ['perfectScrollbar',] }],
psScrollY: [{ type: Output }],
psScrollX: [{ type: Output }],
psScrollUp: [{ type: Output }],
psScrollDown: [{ type: Output }],
psScrollLeft: [{ type: Output }],
psScrollRight: [{ type: Output }],
psYReachEnd: [{ type: Output }],
psYReachStart: [{ type: Output }],
psXReachEnd: [{ type: Output }],
psXReachStart: [{ type: Output }]
};
class PerfectScrollbarComponent {
constructor(zone, cdRef, platformId) {
this.zone = zone;
this.cdRef = cdRef;
this.platformId = platformId;
this.states = {};
this.indicatorX = false;
this.indicatorY = false;
this.interaction = false;
this.scrollPositionX = 0;
this.scrollPositionY = 0;
this.scrollDirectionX = 0;
this.scrollDirectionY = 0;
this.usePropagationX = false;
this.usePropagationY = false;
this.allowPropagationX = false;
this.allowPropagationY = false;
this.stateTimeout = null;
this.ngDestroy = new Subject();
this.stateUpdate = new Subject();
this.disabled = false;
this.usePSClass = true;
this.autoPropagation = false;
this.scrollIndicators = false;
this.psScrollY = new EventEmitter();
this.psScrollX = new EventEmitter();
this.psScrollUp = new EventEmitter();
this.psScrollDown = new EventEmitter();
this.psScrollLeft = new EventEmitter();
this.psScrollRight = new EventEmitter();
this.psYReachEnd = new EventEmitter();
this.psYReachStart = new EventEmitter();
this.psXReachEnd = new EventEmitter();
this.psXReachStart = new EventEmitter();
}
ngOnInit() {
if (isPlatformBrowser(this.platformId)) {
this.stateUpdate
.pipe(takeUntil(this.ngDestroy), distinctUntilChanged((a, b) => (a === b && !this.stateTimeout)))
.subscribe((state) => {
if (this.stateTimeout && typeof window !== 'undefined') {
window.clearTimeout(this.stateTimeout);
this.stateTimeout = null;
}
if (state === 'x' || state === 'y') {
this.interaction = false;
if (state === 'x') {
this.indicatorX = false;
this.states.left = false;
this.states.right = false;
if (this.autoPropagation && this.usePropagationX) {
this.allowPropagationX = false;
}
}
else if (state === 'y') {
this.indicatorY = false;
this.states.top = false;
this.states.bottom = false;
if (this.autoPropagation && this.usePropagationY) {
this.allowPropagationY = false;
}
}
}
else {
if (state === 'left' || state === 'right') {
this.states.left = false;
this.states.right = false;
this.states[state] = true;
if (this.autoPropagation && this.usePropagationX) {
this.indicatorX = true;
}
}
else if (state === 'top' || state === 'bottom') {
this.states.top = false;
this.states.bottom = false;
this.states[state] = true;
if (this.autoPropagation && this.usePropagationY) {
this.indicatorY = true;
}
}
if (this.autoPropagation && typeof window !== 'undefined') {
this.stateTimeout = window.setTimeout(() => {
this.indicatorX = false;
this.indicatorY = false;
this.stateTimeout = null;
if (this.interaction && (this.states.left || this.states.right)) {
this.allowPropagationX = true;
}
if (this.interaction && (this.states.top || this.states.bottom)) {
this.allowPropagationY = true;
}
this.cdRef.markForCheck();
}, 500);
}
}
this.cdRef.markForCheck();
this.cdRef.detectChanges();
});
this.zone.runOutsideAngular(() => {
if (this.directiveRef) {
const element = this.directiveRef.elementRef.nativeElement;
fromEvent(element, 'wheel')
.pipe(takeUntil(this.ngDestroy))
.subscribe((event) => {
if (!this.disabled && this.autoPropagation) {
const scrollDeltaX = event.deltaX;
const scrollDeltaY = event.deltaY;
this.checkPropagation(event, scrollDeltaX, scrollDeltaY);
}
});
fromEvent(element, 'touchmove')
.pipe(takeUntil(this.ngDestroy))
.subscribe((event) => {
if (!this.disabled && this.autoPropagation) {
const scrollPositionX = event.touches[0].clientX;
const scrollPositionY = event.touches[0].clientY;
const scrollDeltaX = scrollPositionX - this.scrollPositionX;
const scrollDeltaY = scrollPositionY - this.scrollPositionY;
this.checkPropagation(event, scrollDeltaX, scrollDeltaY);
this.scrollPositionX = scrollPositionX;
this.scrollPositionY = scrollPositionY;
}
});
merge(fromEvent(element, 'ps-scroll-x')
.pipe(mapTo('x')), fromEvent(element, 'ps-scroll-y')
.pipe(mapTo('y')), fromEvent(element, 'ps-x-reach-end')
.pipe(mapTo('right')), fromEvent(element, 'ps-y-reach-end')
.pipe(mapTo('bottom')), fromEvent(element, 'ps-x-reach-start')
.pipe(mapTo('left')), fromEvent(element, 'ps-y-reach-start')
.pipe(mapTo('top')))
.pipe(takeUntil(this.ngDestroy))
.subscribe((state) => {
if (!this.disabled && (this.autoPropagation || this.scrollIndicators)) {
this.stateUpdate.next(state);
}
});
}
});
window.setTimeout(() => {
PerfectScrollbarEvents.forEach((eventName) => {
if (this.directiveRef) {
this.directiveRef[eventName] = this[eventName];
}
});
}, 0);
}
}
ngOnDestroy() {
if (isPlatformBrowser(this.platformId)) {
this.ngDestroy.next();
this.ngDestroy.unsubscribe();
if (this.stateTimeout && typeof window !== 'undefined') {
window.clearTimeout(this.stateTimeout);
}
}
}
ngDoCheck() {
if (isPlatformBrowser(this.platformId)) {
if (!this.disabled && this.autoPropagation && this.directiveRef) {
const element = this.directiveRef.elementRef.nativeElement;
this.usePropagationX = element.classList.contains('ps--active-x');
this.usePropagationY = element.classList.contains('ps--active-y');
}
}
}
checkPropagation(event, deltaX, deltaY) {
this.interaction = true;
const scrollDirectionX = (deltaX < 0) ? -1 : 1;
const scrollDirectionY = (deltaY < 0) ? -1 : 1;
if ((this.usePropagationX && this.usePropagationY) ||
(this.usePropagationX && (!this.allowPropagationX ||
(this.scrollDirectionX !== scrollDirectionX))) ||
(this.usePropagationY && (!this.allowPropagationY ||
(this.scrollDirectionY !== scrollDirectionY)))) {
event.preventDefault();
event.stopPropagation();
}
if (!!deltaX) {
this.scrollDirectionX = scrollDirectionX;
}
if (!!deltaY) {
this.scrollDirectionY = scrollDirectionY;
}
this.stateUpdate.next('interaction');
this.cdRef.detectChanges();
}
}
PerfectScrollbarComponent.decorators = [
{ type: Component, args: [{
selector: 'perfect-scrollbar',
exportAs: 'ngxPerfectScrollbar',
template: "<div style=\"position: static;\" [class.ps]=\"usePSClass\" [perfectScrollbar]=\"config\" [disabled]=\"disabled\">\n <div class=\"ps-content\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"scrollIndicators\" class=\"ps-overlay\" [class.ps-at-top]=\"states.top\" [class.ps-at-left]=\"states.left\" [class.ps-at-right]=\"states.right\" [class.ps-at-bottom]=\"states.bottom\">\n <div class=\"ps-indicator-top\" [class.ps-indicator-show]=\"indicatorY && interaction\"></div>\n <div class=\"ps-indicator-left\" [class.ps-indicator-show]=\"indicatorX && interaction\"></div>\n <div class=\"ps-indicator-right\" [class.ps-indicator-show]=\"indicatorX && interaction\"></div>\n <div class=\"ps-indicator-bottom\" [class.ps-indicator-show]=\"indicatorY && interaction\"></div>\n </div>\n</div>\n",
encapsulation: ViewEncapsulation.None,
styles: ["perfect-scrollbar{display:block;height:100%;max-height:100%;max-width:100%;overflow:hidden;position:relative;width:100%}perfect-scrollbar[hidden]{display:none}perfect-scrollbar[fxflex]{display:flex;flex-direction:column;height:auto;min-height:0;min-width:0}perfect-scrollbar[fxflex]>.ps{-webkit-box-flex:1;flex:1 1 auto;height:auto;min-height:0;min-width:0;width:auto}perfect-scrollbar[fxlayout]>.ps,perfect-scrollbar[fxlayout]>.ps>.ps-content{-webkit-box-align:inherit;-webkit-box-flex:1;-webkit-box-pack:inherit;align-content:inherit;align-items:inherit;display:flex;flex:1 1 auto;flex-direction:inherit;height:100%;justify-content:inherit;width:100%},perfect-scrollbar[fxlayout=row]>.ps,perfect-scrollbar[fxlayout=row]>.ps>.ps-content{flex-direction:row!important}perfect-scrollbar[fxlayout=column]>.ps,perfect-scrollbar[fxlayout=column]>.ps>.ps-content{flex-direction:column!important}perfect-scrollbar>.ps{display:block;height:100%;max-height:100%;max-width:100%;position:static;width:100%}perfect-scrollbar>.ps textarea{-ms-overflow-style:scrollbar}perfect-scrollbar>.ps>.ps-overlay{bottom:0;display:block;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{opacity:0;position:absolute;transition:opacity .3s ease-in-out}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{left:0;min-height:24px;min-width:100%}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right{min-height:100%;min-width:24px;top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left{left:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right{right:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom{bottom:0}perfect-scrollbar>.ps.ps--active-y>.ps__rail-y{cursor:default;left:auto!important;right:0!important;top:0!important;transition:width .2s linear,opacity .2s linear,background-color .2s linear;width:10px}perfect-scrollbar>.ps.ps--active-y>.ps__rail-y.ps--clicking,perfect-scrollbar>.ps.ps--active-y>.ps__rail-y:hover{width:15px}perfect-scrollbar>.ps.ps--active-x>.ps__rail-x{bottom:0!important;cursor:default;height:10px;left:0!important;top:auto!important;transition:height .2s linear,opacity .2s linear,background-color .2s linear}perfect-scrollbar>.ps.ps--active-x>.ps__rail-x.ps--clicking,perfect-scrollbar>.ps.ps--active-x>.ps__rail-x:hover{height:15px}perfect-scrollbar>.ps.ps--active-x.ps--active-y>.ps__rail-y{margin:0 0 10px}perfect-scrollbar>.ps.ps--active-x.ps--active-y>.ps__rail-x{margin:0 10px 0 0}perfect-scrollbar>.ps.ps--scrolling-x>.ps__rail-x,perfect-scrollbar>.ps.ps--scrolling-y>.ps__rail-y{background-color:#eee;opacity:.9}perfect-scrollbar.ps-show-always>.ps.ps--active-x>.ps__rail-x,perfect-scrollbar.ps-show-always>.ps.ps--active-y>.ps__rail-y{opacity:.6}perfect-scrollbar.ps-show-active>.ps.ps--active-y>.ps-overlay:not(.ps-at-top) .ps-indicator-top{background:linear-gradient(180deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-y>.ps-overlay:not(.ps-at-bottom) .ps-indicator-bottom{background:linear-gradient(0deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-x>.ps-overlay:not(.ps-at-left) .ps-indicator-left{background:linear-gradient(90deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-x>.ps-overlay:not(.ps-at-right) .ps-indicator-right{background:linear-gradient(270deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-top .ps-indicator-top{background:linear-gradient(180deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-bottom .ps-indicator-bottom{background:linear-gradient(0deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-left .ps-indicator-left{background:linear-gradient(90deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-right .ps-indicator-right{background:linear-gradient(270deg,hsla(0,0%,66.7%,.5) 0,hsla(0,0%,66.7%,0))}perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-left .ps-indicator-left.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-x>.ps-overlay.ps-at-right .ps-indicator-right.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps--active-y>.ps-overlay.ps-at-bottom .ps-indicator-bottom.ps-indicator-show,perfect-scrollbar.ps-show-active.ps-show-limits>.ps.ps-Line truncated
},] }
];
PerfectScrollbarComponent.ctorParameters = () => [
{ type: NgZone },
{ type: ChangeDetectorRef },
{ type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
];
PerfectScrollbarComponent.propDecorators = {
disabled: [{ type: Input }],
usePSClass: [{ type: Input }],
autoPropagation: [{ type: HostBinding, args: ['class.ps-show-limits',] }, { type: Input }],
scrollIndicators: [{ type: HostBinding, args: ['class.ps-show-active',] }, { type: Input }],
config: [{ type: Input }],
psScrollY: [{ type: Output }],
psScrollX: [{ type: Output }],
psScrollUp: [{ type: Output }],
psScrollDown: [{ type: Output }],
psScrollLeft: [{ type: Output }],
psScrollRight: [{ type: Output }],
psYReachEnd: [{ type: Output }],
psYReachStart: [{ type: Output }],
psXReachEnd: [{ type: Output }],
psXReachStart: [{ type: Output }],
directiveRef: [{ type: ViewChild, args: [PerfectScrollbarDirective, { static: true },] }]
};
class ForceNativeScrollDirective {
constructor(renderer, el) {
this.renderer = renderer;
['ps__child', 'ps__child--consume'].forEach((className) => {
this.renderer.addClass(el === null || el === void 0 ? void 0 : el.nativeElement, className);
});
}
}
ForceNativeScrollDirective.decorators = [
{ type: Directive, args: [{
selector: '[forceNativeScrolling]'
},] }
];
ForceNativeScrollDirective.ctorParameters = () => [
{ type: Renderer2 },
{ type: ElementRef }
];
class PerfectScrollbarModule {
}
PerfectScrollbarModule.decorators = [
{ type: NgModule, args: [{
imports: [CommonModule],
declarations: [PerfectScrollbarComponent, PerfectScrollbarDirective, ForceNativeScrollDirective],
exports: [CommonModule, PerfectScrollbarComponent, PerfectScrollbarDirective, ForceNativeScrollDirective]
},] }
];
/**
* Generated bundle index. Do not edit.
*/
export { Geometry, PERFECT_SCROLLBAR_CONFIG, PerfectScrollbarComponent, PerfectScrollbarConfig, PerfectScrollbarDirective, PerfectScrollbarModule, Position, ForceNativeScrollDirective as ɵa };
//# sourceMappingURL=ngx-perfect-scrollbar.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ngx-perfect-scrollbar.js","sources":["../../../projects/lib/src/lib/perfect-scrollbar.interfaces.ts","../../../projects/lib/src/lib/perfect-scrollbar.directive.ts","../../../projects/lib/src/lib/perfect-scrollbar.component.ts","../../../projects/lib/src/lib/perfect-scrollbar-force-native-scroll.directive.ts","../../../projects/lib/src/lib/perfect-scrollbar.module.ts","../../../projects/lib/src/ngx-perfect-scrollbar.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const PERFECT_SCROLLBAR_CONFIG = new InjectionToken('PERFECT_SCROLLBAR_CONFIG');\n\nexport class Geometry {\n public x: number;\n public y: number;\n\n public w: number;\n public h: number;\n\n constructor(x: number, y: number, w: number, h: number) {\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n }\n}\n\nexport class Position {\n public x: number | 'start' | 'end';\n public y: number | 'start' | 'end';\n\n constructor(x: number | 'start' | 'end', y: number | 'start' | 'end') {\n this.x = x;\n this.y = y;\n }\n}\n\nexport type PerfectScrollbarEvent = 'psScrollY' | 'psScrollX' | 'psScrollUp'| 'psScrollDown' |\n 'psScrollLeft' | 'psScrollRight' | 'psYReachEnd' | 'psYReachStart' | 'psXReachEnd' | 'psXReachStart';\n\nexport const PerfectScrollbarEvents: PerfectScrollbarEvent[] = [\n 'psScrollY',\n 'psScrollX',\n\n 'psScrollUp',\n 'psScrollDown',\n 'psScrollLeft',\n 'psScrollRight',\n\n 'psYReachEnd',\n 'psYReachStart',\n 'psXReachEnd',\n 'psXReachStart'\n];\n\nexport interface PerfectScrollbarConfigInterface {\n handlers?: string[];\n\n wheelSpeed?: number;\n swipeEasing?: boolean;\n\n suppressScrollX?: boolean;\n suppressScrollY?: boolean;\n\n wheelPropagation?: boolean;\n useBothWheelAxes?: boolean;\n\n scrollingThreshold?: number;\n\n minScrollbarLength?: number;\n maxScrollbarLength?: number;\n\n scrollXMarginOffset?: number;\n scrollYMarginOffset?: number;\n}\n\nexport class PerfectScrollbarConfig implements PerfectScrollbarConfigInterface {\n public handlers?: string[];\n\n public wheelSpeed?: number;\n public swipeEasing?: boolean;\n\n public suppressScrollX?: boolean;\n public suppressScrollY?: boolean;\n\n public wheelPropagation?: boolean;\n public useBothWheelAxes?: boolean;\n\n public scrollingThreshold?: number;\n\n public minScrollbarLength?: number;\n public maxScrollbarLength?: number;\n\n public scrollXMarginOffset?: number;\n public scrollYMarginOffset?: number;\n\n constructor(config: PerfectScrollbarConfigInterface = {}) {\n this.assign(config);\n }\n\n public assign(config: PerfectScrollbarConfigInterface = {}) {\n for (const key in config) {\n this[key as keyof PerfectScrollbarConfig] = config[key as keyof PerfectScrollbarConfigInterface] as never;\n }\n }\n}\n","import PerfectScrollbar from 'perfect-scrollbar';\n\nimport ResizeObserver from 'resize-observer-polyfill';\n\nimport { Subject, fromEvent } from 'rxjs';\nimport { auditTime, takeUntil } from 'rxjs/operators';\n\nimport { PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { NgZone, Inject, Optional, ElementRef, Directive,\n OnInit, DoCheck, OnChanges, OnDestroy, Input, Output, EventEmitter,\n SimpleChanges, KeyValueDiffer, KeyValueDiffers } from '@angular/core';\n\nimport { Geometry, Position } from './perfect-scrollbar.interfaces';\n\nimport { PERFECT_SCROLLBAR_CONFIG, PerfectScrollbarConfig, PerfectScrollbarConfigInterface,\n PerfectScrollbarEvent, PerfectScrollbarEvents } from './perfect-scrollbar.interfaces';\n\n@Directive({\n selector: '[perfectScrollbar]',\n exportAs: 'ngxPerfectScrollbar'\n})\nexport class PerfectScrollbarDirective implements OnInit, OnDestroy, DoCheck, OnChanges {\n private instance: PerfectScrollbar | null = null;\n\n private ro: ResizeObserver | null = null;\n\n private timeout: number | null = null;\n private animation: number | null = null;\n\n private configDiff: KeyValueDiffer<string, any> | null = null;\n\n private readonly ngDestroy: Subject<void> = new Subject();\n\n @Input() disabled: boolean = false;\n\n @Input('perfectScrollbar') config?: PerfectScrollbarConfigInterface;\n\n @Output() psScrollY: EventEmitter<any> = new EventEmitter<any>();\n @Output() psScrollX: EventEmitter<any> = new EventEmitter<any>();\n\n @Output() psScrollUp: EventEmitter<any> = new EventEmitter<any>();\n @Output() psScrollDown: EventEmitter<any> = new EventEmitter<any>();\n @Output() psScrollLeft: EventEmitter<any> = new EventEmitter<any>();\n @Output() psScrollRight: EventEmitter<any> = new EventEmitter<any>();\n\n @Output() psYReachEnd: EventEmitter<any> = new EventEmitter<any>();\n @Output() psYReachStart: EventEmitter<any> = new EventEmitter<any>();\n @Output() psXReachEnd: EventEmitter<any> = new EventEmitter<any>();\n @Output() psXReachStart: EventEmitter<any> = new EventEmitter<any>();\n\n constructor(private zone: NgZone, private differs: KLine truncated
@@ -0,0 +1,5 @@
import { ElementRef, Renderer2 } from '@angular/core';
export declare class ForceNativeScrollDirective {
private renderer;
constructor(renderer: Renderer2, el: ElementRef);
}
@@ -0,0 +1,44 @@
import { NgZone, OnInit, OnDestroy, DoCheck, EventEmitter, ChangeDetectorRef } from '@angular/core';
import { PerfectScrollbarDirective } from './perfect-scrollbar.directive';
import { PerfectScrollbarConfigInterface } from './perfect-scrollbar.interfaces';
export declare class PerfectScrollbarComponent implements OnInit, OnDestroy, DoCheck {
private zone;
private cdRef;
private platformId;
states: any;
indicatorX: boolean;
indicatorY: boolean;
interaction: boolean;
private scrollPositionX;
private scrollPositionY;
private scrollDirectionX;
private scrollDirectionY;
private usePropagationX;
private usePropagationY;
private allowPropagationX;
private allowPropagationY;
private stateTimeout;
private readonly ngDestroy;
private readonly stateUpdate;
disabled: boolean;
usePSClass: boolean;
autoPropagation: boolean;
scrollIndicators: boolean;
config?: PerfectScrollbarConfigInterface;
psScrollY: EventEmitter<any>;
psScrollX: EventEmitter<any>;
psScrollUp: EventEmitter<any>;
psScrollDown: EventEmitter<any>;
psScrollLeft: EventEmitter<any>;
psScrollRight: EventEmitter<any>;
psYReachEnd: EventEmitter<any>;
psYReachStart: EventEmitter<any>;
psXReachEnd: EventEmitter<any>;
psXReachStart: EventEmitter<any>;
directiveRef?: PerfectScrollbarDirective;
constructor(zone: NgZone, cdRef: ChangeDetectorRef, platformId: Object);
ngOnInit(): void;
ngOnDestroy(): void;
ngDoCheck(): void;
private checkPropagation;
}
@@ -0,0 +1,48 @@
import PerfectScrollbar from 'perfect-scrollbar';
import { NgZone, ElementRef, OnInit, DoCheck, OnChanges, OnDestroy, EventEmitter, SimpleChanges, KeyValueDiffers } from '@angular/core';
import { Geometry, Position } from './perfect-scrollbar.interfaces';
import { PerfectScrollbarConfigInterface } from './perfect-scrollbar.interfaces';
export declare class PerfectScrollbarDirective implements OnInit, OnDestroy, DoCheck, OnChanges {
private zone;
private differs;
elementRef: ElementRef;
private platformId;
private defaults;
private instance;
private ro;
private timeout;
private animation;
private configDiff;
private readonly ngDestroy;
disabled: boolean;
config?: PerfectScrollbarConfigInterface;
psScrollY: EventEmitter<any>;
psScrollX: EventEmitter<any>;
psScrollUp: EventEmitter<any>;
psScrollDown: EventEmitter<any>;
psScrollLeft: EventEmitter<any>;
psScrollRight: EventEmitter<any>;
psYReachEnd: EventEmitter<any>;
psYReachStart: EventEmitter<any>;
psXReachEnd: EventEmitter<any>;
psXReachStart: EventEmitter<any>;
constructor(zone: NgZone, differs: KeyValueDiffers, elementRef: ElementRef, platformId: Object, defaults: PerfectScrollbarConfigInterface);
ngOnInit(): void;
ngOnDestroy(): void;
ngDoCheck(): void;
ngOnChanges(changes: SimpleChanges): void;
ps(): PerfectScrollbar | null;
update(): void;
geometry(prefix?: string): Geometry;
position(absolute?: boolean): Position;
scrollable(direction?: string): boolean;
scrollTo(x: number, y?: number, speed?: number): void;
scrollToX(x: number, speed?: number): void;
scrollToY(y: number, speed?: number): void;
scrollToTop(offset?: number, speed?: number): void;
scrollToLeft(offset?: number, speed?: number): void;
scrollToRight(offset?: number, speed?: number): void;
scrollToBottom(offset?: number, speed?: number): void;
scrollToElement(element: HTMLElement | string, offset?: number, speed?: number): void;
private animateScrolling;
}
@@ -0,0 +1,46 @@
import { InjectionToken } from '@angular/core';
export declare const PERFECT_SCROLLBAR_CONFIG: InjectionToken<unknown>;
export declare class Geometry {
x: number;
y: number;
w: number;
h: number;
constructor(x: number, y: number, w: number, h: number);
}
export declare class Position {
x: number | 'start' | 'end';
y: number | 'start' | 'end';
constructor(x: number | 'start' | 'end', y: number | 'start' | 'end');
}
export declare type PerfectScrollbarEvent = 'psScrollY' | 'psScrollX' | 'psScrollUp' | 'psScrollDown' | 'psScrollLeft' | 'psScrollRight' | 'psYReachEnd' | 'psYReachStart' | 'psXReachEnd' | 'psXReachStart';
export declare const PerfectScrollbarEvents: PerfectScrollbarEvent[];
export interface PerfectScrollbarConfigInterface {
handlers?: string[];
wheelSpeed?: number;
swipeEasing?: boolean;
suppressScrollX?: boolean;
suppressScrollY?: boolean;
wheelPropagation?: boolean;
useBothWheelAxes?: boolean;
scrollingThreshold?: number;
minScrollbarLength?: number;
maxScrollbarLength?: number;
scrollXMarginOffset?: number;
scrollYMarginOffset?: number;
}
export declare class PerfectScrollbarConfig implements PerfectScrollbarConfigInterface {
handlers?: string[];
wheelSpeed?: number;
swipeEasing?: boolean;
suppressScrollX?: boolean;
suppressScrollY?: boolean;
wheelPropagation?: boolean;
useBothWheelAxes?: boolean;
scrollingThreshold?: number;
minScrollbarLength?: number;
maxScrollbarLength?: number;
scrollXMarginOffset?: number;
scrollYMarginOffset?: number;
constructor(config?: PerfectScrollbarConfigInterface);
assign(config?: PerfectScrollbarConfigInterface): void;
}
@@ -0,0 +1,2 @@
export declare class PerfectScrollbarModule {
}
@@ -0,0 +1,5 @@
/**
* Generated bundle index. Do not edit.
*/
export * from './public-api';
export { ForceNativeScrollDirective as ɵa } from './lib/perfect-scrollbar-force-native-scroll.directive';
@@ -0,0 +1 @@
{"__symbolic":"module","version":4,"metadata":{"PerfectScrollbarComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":14,"character":1},"arguments":[{"selector":"perfect-scrollbar","exportAs":"ngxPerfectScrollbar","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":22,"character":17},"member":"None"},"template":"<div style=\"position: static;\" [class.ps]=\"usePSClass\" [perfectScrollbar]=\"config\" [disabled]=\"disabled\">\n <div class=\"ps-content\">\n <ng-content></ng-content>\n </div>\n\n <div *ngIf=\"scrollIndicators\" class=\"ps-overlay\" [class.ps-at-top]=\"states.top\" [class.ps-at-left]=\"states.left\" [class.ps-at-right]=\"states.right\" [class.ps-at-bottom]=\"states.bottom\">\n <div class=\"ps-indicator-top\" [class.ps-indicator-show]=\"indicatorY && interaction\"></div>\n <div class=\"ps-indicator-left\" [class.ps-indicator-show]=\"indicatorX && interaction\"></div>\n <div class=\"ps-indicator-right\" [class.ps-indicator-show]=\"indicatorX && interaction\"></div>\n <div class=\"ps-indicator-bottom\" [class.ps-indicator-show]=\"indicatorY && interaction\"></div>\n </div>\n</div>\n","styles":["perfect-scrollbar{display:block;height:100%;max-height:100%;max-width:100%;overflow:hidden;position:relative;width:100%}perfect-scrollbar[hidden]{display:none}perfect-scrollbar[fxflex]{display:flex;flex-direction:column;height:auto;min-height:0;min-width:0}perfect-scrollbar[fxflex]>.ps{-webkit-box-flex:1;flex:1 1 auto;height:auto;min-height:0;min-width:0;width:auto}perfect-scrollbar[fxlayout]>.ps,perfect-scrollbar[fxlayout]>.ps>.ps-content{-webkit-box-align:inherit;-webkit-box-flex:1;-webkit-box-pack:inherit;align-content:inherit;align-items:inherit;display:flex;flex:1 1 auto;flex-direction:inherit;height:100%;justify-content:inherit;width:100%},perfect-scrollbar[fxlayout=row]>.ps,perfect-scrollbar[fxlayout=row]>.ps>.ps-content{flex-direction:row!important}perfect-scrollbar[fxlayout=column]>.ps,perfect-scrollbar[fxlayout=column]>.ps>.ps-content{flex-direction:column!important}perfect-scrollbar>.ps{display:block;height:100%;max-height:100%;max-width:100%;position:static;width:100%}perfect-scrollbar>.ps textarea{-ms-overflow-style:scrollbar}perfect-scrollbar>.ps>.ps-overlay{bottom:0;display:block;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{opacity:0;position:absolute;transition:opacity .3s ease-in-out}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{left:0;min-height:24px;min-width:100%}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left,perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right{min-height:100%;min-width:24px;top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-top{top:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-left{left:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-right{right:0}perfect-scrollbar>.ps>.ps-overlay .ps-indicator-bottom{bottom:0}perfect-scrollbar>.ps.ps--active-y>.ps__rail-y{cursor:default;left:auto!important;right:0!important;top:0!important;transition:width .2s linear,opacity .2s linear,background-color .2s linear;width:10px}perfect-scrollbar>.ps.ps--active-y>.ps__rail-y.ps--clicking,perfect-scrollbar>.ps.ps--active-y>.ps__rail-y:hover{width:15px}perfect-scrollbar>.ps.ps--active-x>.ps__rail-x{bottom:0!important;cursor:default;height:10px;left:0!important;top:auto!important;transition:height .2s linear,opacity .2s linear,background-color .2s linear}perfect-scrollbar>.ps.ps--active-x>.ps__rail-x.ps--clicking,perfect-scrollbar>.ps.ps--active-x>.ps__rail-x:hover{height:15px}perfect-scrollbar>.ps.ps--active-x.ps--active-y>.ps__rail-y{margin:0 0 10px}perfect-scrollbar>.ps.ps--active-x.ps--active-y>.ps__rail-x{margin:0 10px 0 0}perfect-scrollbar>.ps.ps--scrolling-x>.ps__rail-x,perfect-scrollbar>.ps.ps--scrolling-y>.ps__rail-y{background-color:#eee;opacity:.9}perfect-scrollbar.ps-show-always>.ps.ps--active-x>.ps__rail-x,perfect-scrollbar.ps-show-always>.ps.ps--active-y>.ps__rail-y{opacity:.6}perfect-scrollbar.ps-show-active>.ps.ps--active-y>.ps-overlay:not(.ps-at-top) .ps-indicator-top{background:linear-gradient(180deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-y>.ps-overlay:not(.ps-at-bottom) .ps-indicator-bottom{background:linear-gradient(0deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-x>.ps-overlay:not(.ps-at-left) .ps-indicator-left{background:linear-gradient(90deg,hsla(0,0%,100%,.5) 0,hsla(0,0%,100%,0));opacity:1}perfect-scrollbar.ps-show-active>.ps.ps--active-x>Line truncated
+28
View File
@@ -0,0 +1,28 @@
{
"name": "ngx-perfect-scrollbar",
"description": "Angular wrapper library for Perfect Scrollbar",
"bugs": "https://github.com/zefoy/ngx-perfect-scrollbar/issues",
"version": "10.1.1",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/zefoy/ngx-perfect-scrollbar.git"
},
"dependencies": {
"perfect-scrollbar": "1.5.0",
"resize-observer-polyfill": "^1.5.0",
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/common": ">=9.0.0",
"@angular/core": ">=9.0.0"
},
"main": "bundles/ngx-perfect-scrollbar.umd.js",
"module": "fesm2015/ngx-perfect-scrollbar.js",
"es2015": "fesm2015/ngx-perfect-scrollbar.js",
"esm2015": "esm2015/ngx-perfect-scrollbar.js",
"fesm2015": "fesm2015/ngx-perfect-scrollbar.js",
"typings": "ngx-perfect-scrollbar.d.ts",
"metadata": "ngx-perfect-scrollbar.metadata.json",
"sideEffects": false
}
+4
View File
@@ -0,0 +1,4 @@
export { PerfectScrollbarComponent } from './lib/perfect-scrollbar.component';
export { PerfectScrollbarDirective } from './lib/perfect-scrollbar.directive';
export { Geometry, Position, PERFECT_SCROLLBAR_CONFIG, PerfectScrollbarConfig, PerfectScrollbarConfigInterface } from './lib/perfect-scrollbar.interfaces';
export { PerfectScrollbarModule } from './lib/perfect-scrollbar.module';