This commit is contained in:
Rene
2019-10-11 11:27:52 +02:00
parent d1fc8fe638
commit 4b1d3201e6
35 changed files with 2566 additions and 1894 deletions
+3 -3
View File
@@ -147,9 +147,9 @@ Initialize the plugin after your document has been fully loaded.
Default initialization:
```js
document.addEventListener("DOMContentLoaded", function() {
//The first argument are the elements to which the plugin shall be initialized
//The second argument has to be at least a empty object or a object with your desired options
OverlayScrollbars(document.querySelectorAll('body'), { });
//The first argument are the elements to which the plugin shall be initialized
//The second argument has to be at least a empty object or a object with your desired options
OverlayScrollbars(document.querySelectorAll('body'), { });
});
```
+2 -2
View File
@@ -2,13 +2,13 @@
* OverlayScrollbars
* https://github.com/KingSora/OverlayScrollbars
*
* Version: 1.9.1
* Version: 1.10.0
*
* Copyright KingSora | Rene Haas.
* https://github.com/KingSora
*
* Released under the MIT license.
* Date: 03.08.2019
* Date: 11.10.2019
*/
/*
+2 -2
View File
File diff suppressed because one or more lines are too long
+983 -823
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
+3 -3
View File
File diff suppressed because one or more lines are too long
+10 -5
View File
@@ -1,6 +1,6 @@
{
"name": "overlayscrollbars",
"version": "1.9.0",
"version": "1.9.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1085,7 +1085,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -1500,7 +1501,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -1556,6 +1558,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -1599,12 +1602,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
+2 -2
View File
@@ -94,8 +94,8 @@ gulp.task('ngc', function (done) {
exclude: [filesInfo.distFolder, filesInfo.exampleFolder, 'node_modules']
};
sh.ShellString(JSON.stringify(newTsconfigJson, null, 4)).to(filesInfo.tsconfigJsonPath);
sh.exec('ngc -p tsconfig.json');
sh.exec('npx ngc -p tsconfig.json');
// delete the aotEntry dummy file
sh.rm('-f', aotEntryFile);
@@ -30,7 +30,8 @@ var OverlayScrollbarsComponent = (function () {
OverlayScrollbarsComponent.decorators = [
{ type: Component, args: [{
selector: 'overlay-scrollbars',
template: '<ng-content></ng-content>',
host: { 'class': 'os-host' },
template: "\n <div class=\"os-resize-observer-host\"></div>\n <div class=\"os-padding\">\n <div class=\"os-viewport\">\n <div class=\"os-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n <div class=\"os-scrollbar os-scrollbar-horizontal \">\n <div class=\"os-scrollbar-track\">\n <div class=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div class=\"os-scrollbar os-scrollbar-vertical\">\n <div class=\"os-scrollbar-track\">\n <div class=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div class=\"os-scrollbar-corner\"></div>\n ",
styles: [':host { display: block; }']
},] },
];
File diff suppressed because one or more lines are too long
@@ -35,7 +35,8 @@
OverlayScrollbarsComponent.decorators = [
{ type: core.Component, args: [{
selector: 'overlay-scrollbars',
template: '<ng-content></ng-content>',
host: { 'class': 'os-host' },
template: "\n <div class=\"os-resize-observer-host\"></div>\n <div class=\"os-padding\">\n <div class=\"os-viewport\">\n <div class=\"os-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n <div class=\"os-scrollbar os-scrollbar-horizontal \">\n <div class=\"os-scrollbar-track\">\n <div class=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div class=\"os-scrollbar os-scrollbar-vertical\">\n <div class=\"os-scrollbar-track\">\n <div class=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div class=\"os-scrollbar-corner\"></div>\n ",
styles: [':host { display: block; }']
},] },
];
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"__symbolic":"module","version":4,"metadata":{"OverlayScrollbarsComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"overlay-scrollbars","template":"<ng-content></ng-content>","styles":[":host { display: block; }"]}]}],"members":{"_options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":9,"character":5},"arguments":["options"]}]}],"_extensions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":10,"character":5},"arguments":["extensions"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":14,"character":30}]}],"osInstance":[{"__symbolic":"method"}],"osTarget":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}]}},"OverlayscrollbarsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"imports":[],"declarations":[{"__symbolic":"reference","name":"OverlayScrollbarsComponent"}],"exports":[{"__symbolic":"reference","name":"OverlayScrollbarsComponent"}]}]}],"members":{}}},"origins":{"OverlayScrollbarsComponent":"../../src/overlayscrollbars.component","OverlayscrollbarsModule":"../../src/overlayscrollbars.module"},"importAs":"overlayscrollbars-ngx"}
{"__symbolic":"module","version":4,"metadata":{"OverlayScrollbarsComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":3,"character":1},"arguments":[{"selector":"overlay-scrollbars","host":{"class":"os-host","$quoted$":["class"]},"template":"\n <div class=\"os-resize-observer-host\"></div>\n <div class=\"os-padding\">\n <div class=\"os-viewport\">\n <div class=\"os-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n <div class=\"os-scrollbar os-scrollbar-horizontal \">\n <div class=\"os-scrollbar-track\">\n <div class=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div class=\"os-scrollbar os-scrollbar-vertical\">\n <div class=\"os-scrollbar-track\">\n <div class=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div class=\"os-scrollbar-corner\"></div>\n ","styles":[":host { display: block; }"]}]}],"members":{"_options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":5},"arguments":["options"]}]}],"_extensions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":5},"arguments":["extensions"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":35,"character":30}]}],"osInstance":[{"__symbolic":"method"}],"osTarget":[{"__symbolic":"method"}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"ngOnChanges":[{"__symbolic":"method"}]}},"OverlayscrollbarsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"imports":[],"declarations":[{"__symbolic":"reference","name":"OverlayScrollbarsComponent"}],"exports":[{"__symbolic":"reference","name":"OverlayScrollbarsComponent"}]}]}],"members":{}}},"origins":{"OverlayScrollbarsComponent":"../../src/overlayscrollbars.component","OverlayscrollbarsModule":"../../src/overlayscrollbars.module"},"importAs":"overlayscrollbars-ngx"}
+58 -19
View File
@@ -1187,6 +1187,7 @@
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
"dev": true,
"optional": true,
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
@@ -2413,7 +2414,8 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true
"dev": true,
"optional": true
},
"constants-browserify": {
"version": "1.0.0",
@@ -2818,7 +2820,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
"dev": true
"dev": true,
"optional": true
},
"depd": {
"version": "1.1.2",
@@ -3906,7 +3909,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -3927,12 +3931,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -3947,17 +3953,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -4074,7 +4083,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -4086,6 +4096,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -4100,6 +4111,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -4107,12 +4119,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -4131,6 +4145,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -4211,7 +4226,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -4223,6 +4239,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -4308,7 +4325,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -4344,6 +4362,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -4363,6 +4382,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -4406,12 +4426,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -4420,6 +4442,7 @@
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.2",
"inherits": "~2.0.0",
@@ -4432,6 +4455,7 @@
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
"dev": true,
"optional": true,
"requires": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
@@ -4469,7 +4493,8 @@
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
"dev": true
"dev": true,
"optional": true
},
"get-stream": {
"version": "3.0.0",
@@ -4699,7 +4724,8 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
"dev": true
"dev": true,
"optional": true
},
"has-value": {
"version": "1.0.0",
@@ -5446,7 +5472,8 @@
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true
"dev": true,
"optional": true
},
"is-windows": {
"version": "1.0.2",
@@ -6162,6 +6189,7 @@
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
@@ -6174,7 +6202,8 @@
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -6461,7 +6490,8 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
"dev": true
"dev": true,
"optional": true
},
"map-visit": {
"version": "1.0.0",
@@ -7115,6 +7145,7 @@
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"dev": true,
"optional": true,
"requires": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
@@ -8246,6 +8277,7 @@
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"dev": true,
"optional": true,
"requires": {
"load-json-file": "^1.0.0",
"normalize-package-data": "^2.3.2",
@@ -8257,6 +8289,7 @@
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"dev": true,
"optional": true,
"requires": {
"graceful-fs": "^4.1.2",
"pify": "^2.0.0",
@@ -8267,7 +8300,8 @@
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -8276,6 +8310,7 @@
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"dev": true,
"optional": true,
"requires": {
"find-up": "^1.0.0",
"read-pkg": "^1.0.0"
@@ -8286,6 +8321,7 @@
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"dev": true,
"optional": true,
"requires": {
"path-exists": "^2.0.0",
"pinkie-promise": "^2.0.0"
@@ -8296,6 +8332,7 @@
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"dev": true,
"optional": true,
"requires": {
"pinkie-promise": "^2.0.0"
}
@@ -9592,6 +9629,7 @@
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"dev": true,
"optional": true,
"requires": {
"is-utf8": "^0.2.0"
}
@@ -10990,6 +11028,7 @@
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
"dev": true,
"optional": true,
"requires": {
"string-width": "^1.0.2 || 2"
}
@@ -57,6 +57,10 @@
<br /> {{ loremIpsumShort }}
<br />
<br /> {{ loremIpsumLong }}
<div *ngFor="let item of loremList; let i = index" [attr.data-key]="i">
<br />
{{item}}
</div>
</overlay-scrollbars>
<div class="buttons">
@@ -13,6 +13,7 @@ export class AppComponent {
loremIpsumLong: string = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.';
loremIpsumMedium: string = 'At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.';
loremIpsumShort: string = 'Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio.';
loremList: Array<string> = [];
componentContent: string = 'Lorem Ipsum';
osComponentOptions: OverlayScrollbars.Options = {
resize: 'both',
@@ -58,9 +59,8 @@ export class AppComponent {
}
onBtnChangeContent(event) {
let loremIpsums = [this.loremIpsumLong, this.loremIpsumMedium, this.loremIpsumShort];
let random = Math.floor(Math.random() * loremIpsums.length);
this.componentContent = this.componentContent + '\r\n' + loremIpsums[random]
this.componentContent = this.componentContent + '\r\n' + this.randomIpsum();
this.loremList.push(this.randomIpsum());
}
onBtnLog(event) {
@@ -80,4 +80,10 @@ export class AppComponent {
console.log('Target:');
console.log(this.osComponentRef2.osTarget());
}
randomIpsum(): string {
let loremIpsums = [this.loremIpsumLong, this.loremIpsumMedium, this.loremIpsumShort];
let random = Math.floor(Math.random() * loremIpsums.length);
return loremIpsums[random];
}
}
+31 -12
View File
@@ -1,6 +1,6 @@
{
"name": "overlayscrollbars-ngx",
"version": "0.1.0",
"version": "0.1.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1265,7 +1265,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -1286,12 +1287,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -1306,17 +1309,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -1433,7 +1439,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -1445,6 +1452,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -1459,6 +1467,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -1466,12 +1475,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -1490,6 +1501,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -1570,7 +1582,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -1582,6 +1595,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -1667,7 +1681,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -1703,6 +1718,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -1722,6 +1738,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -1765,12 +1782,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -3,7 +3,28 @@ import OverlayScrollbars from 'overlayscrollbars';
@Component({
selector: 'overlay-scrollbars', //https://angular.io/guide/styleguide#component-selectors
template: '<ng-content></ng-content>',
host: { 'class': 'os-host' },
template: `
<div class="os-resize-observer-host"></div>
<div class="os-padding">
<div class="os-viewport">
<div class="os-content">
<ng-content></ng-content>
</div>
</div>
</div>
<div class="os-scrollbar os-scrollbar-horizontal ">
<div class="os-scrollbar-track">
<div class="os-scrollbar-handle"></div>
</div>
</div>
<div class="os-scrollbar os-scrollbar-vertical">
<div class="os-scrollbar-track">
<div class="os-scrollbar-handle"></div>
</div>
</div>
<div class="os-scrollbar-corner"></div>
`,
styles: [':host { display: block; }']
})
export class OverlayScrollbarsComponent implements OnDestroy, OnChanges, AfterViewInit {
@@ -55,8 +55,19 @@ class OverlayScrollbarsComponent extends Component {
}
}
render() {
let _a = this.props, divProps = __rest(_a, ["options", "extensions", "children"]);
return (React.createElement("div", Object.assign({}, divProps, { ref: this._osTargetRef }), this.props.children));
let _a = this.props, { options, extensions, children, className } = _a, divProps = __rest(_a, ["options", "extensions", "children", "className"]);
return (React.createElement("div", Object.assign({ className: `${className} os-host` }, divProps, { ref: this._osTargetRef }),
React.createElement("div", { className: "os-resize-observer-host" }),
React.createElement("div", { className: "os-padding" },
React.createElement("div", { className: "os-viewport" },
React.createElement("div", { className: "os-content" }, this.props.children))),
React.createElement("div", { className: "os-scrollbar os-scrollbar-horizontal " },
React.createElement("div", { className: "os-scrollbar-track" },
React.createElement("div", { className: "os-scrollbar-handle" }))),
React.createElement("div", { className: "os-scrollbar os-scrollbar-vertical" },
React.createElement("div", { className: "os-scrollbar-track" },
React.createElement("div", { className: "os-scrollbar-handle" }))),
React.createElement("div", { className: "os-scrollbar-corner" })));
}
}
@@ -1 +1 @@
{"version":3,"file":"overlayscrollbars-react.esm.js","sources":["../src/OverlayScrollbarsComponent.tsx"],"sourcesContent":["import React, { Component, RefObject } from 'react';\nimport OverlayScrollbars from \"overlayscrollbars\";\n\nexport interface OverlayScrollbarsComponentProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: any;\n options?: OverlayScrollbars.Options;\n extensions?: OverlayScrollbars.Extensions;\n}\nexport interface OverlayScrollbarsComponentState { }\n\nexport class OverlayScrollbarsComponent extends Component<OverlayScrollbarsComponentProps, OverlayScrollbarsComponentState> {\n private _osInstance: OverlayScrollbars | null = null;\n private _osTargetRef: RefObject<HTMLDivElement>;\n\n constructor(props: OverlayScrollbarsComponentProps) {\n super(props);\n this._osTargetRef = React.createRef();\n }\n\n osInstance(): OverlayScrollbars | null {\n return this._osInstance;\n }\n\n osTarget(): HTMLDivElement | null {\n return this._osTargetRef.current || null;\n }\n\n componentDidMount() {\n this._osInstance = OverlayScrollbars(this.osTarget(), this.props.options || {}, this.props.extensions);\n }\n\n componentWillUnmount() {\n if (OverlayScrollbars.valid(this._osInstance)) {\n this._osInstance.destroy();\n this._osInstance = null;\n }\n }\n\n componentDidUpdate(prevProps: OverlayScrollbarsComponentProps) {\n if (OverlayScrollbars.valid(this._osInstance)) {\n this._osInstance.options(this.props.options);\n }\n }\n\n render() {\n let {\n options,\n extensions,\n children,\n ...divProps\n } = this.props;\n\n return (\n <div {...divProps} ref={this._osTargetRef}>\n {...this.props.children}\n </div>\n );\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUa,0BAA2B,SAAQ,SAA2E;IAIvH,YAAY,KAAsC;QAC9C,KAAK,CAAC,KAAK,CAAC,CAAC;QAJT,gBAAW,GAA6B,IAAI,CAAC;QAKjD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;KACzC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,WAAW,CAAC;KAC3B;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC;KAC5C;IAED,iBAAiB;QACb,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;KAC1G;IAED,oBAAoB;QAChB,IAAI,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC3C,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;SAC3B;KACJ;IAED,kBAAkB,CAAC,SAA0C;QACzD,IAAI,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC3C,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAChD;KACJ;IAED,MAAM;QACF,IAAI,eAKU,EALV,AAIA,4DACU,CAAC;QAEf,QACI,6CAAS,QAAQ,IAAE,GAAG,EAAE,IAAI,CAAC,YAAY,KACjC,IAAI,CAAC,KAAK,CAAC,QAAQ,CACrB,EACR;KACL;CACJ;;;;"}
{"version":3,"file":"overlayscrollbars-react.esm.js","sources":["../src/OverlayScrollbarsComponent.tsx"],"sourcesContent":["import React, { Component, RefObject } from 'react';\nimport OverlayScrollbars from \"overlayscrollbars\";\n\nexport interface OverlayScrollbarsComponentProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: any;\n options?: OverlayScrollbars.Options;\n extensions?: OverlayScrollbars.Extensions;\n}\nexport interface OverlayScrollbarsComponentState { }\n\nexport class OverlayScrollbarsComponent extends Component<OverlayScrollbarsComponentProps, OverlayScrollbarsComponentState> {\n private _osInstance: OverlayScrollbars | null = null;\n private _osTargetRef: RefObject<HTMLDivElement>;\n\n constructor(props: OverlayScrollbarsComponentProps) {\n super(props);\n this._osTargetRef = React.createRef();\n }\n\n osInstance(): OverlayScrollbars | null {\n return this._osInstance;\n }\n\n osTarget(): HTMLDivElement | null {\n return this._osTargetRef.current || null;\n }\n\n componentDidMount() {\n this._osInstance = OverlayScrollbars(this.osTarget(), this.props.options || {}, this.props.extensions);\n }\n\n componentWillUnmount() {\n if (OverlayScrollbars.valid(this._osInstance)) {\n this._osInstance.destroy();\n this._osInstance = null;\n }\n }\n\n componentDidUpdate(prevProps: OverlayScrollbarsComponentProps) {\n if (OverlayScrollbars.valid(this._osInstance)) {\n this._osInstance.options(this.props.options);\n }\n }\n\n render() {\n let {\n options,\n extensions,\n children,\n className,\n ...divProps\n } = this.props;\n\n return (\n <div className={`${className} os-host`} {...divProps} ref={this._osTargetRef}>\n <div className=\"os-resize-observer-host\"></div>\n <div className=\"os-padding\">\n <div className=\"os-viewport\">\n <div className=\"os-content\">\n {...this.props.children}\n </div>\n </div>\n </div>\n <div className=\"os-scrollbar os-scrollbar-horizontal \">\n <div className=\"os-scrollbar-track\">\n <div className=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div className=\"os-scrollbar os-scrollbar-vertical\">\n <div className=\"os-scrollbar-track\">\n <div className=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div className=\"os-scrollbar-corner\"></div>\n </div>\n );\n }\n}"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUa,0BAA2B,SAAQ,SAA2E;IAIvH,YAAY,KAAsC;QAC9C,KAAK,CAAC,KAAK,CAAC,CAAC;QAJT,gBAAW,GAA6B,IAAI,CAAC;QAKjD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;KACzC;IAED,UAAU;QACN,OAAO,IAAI,CAAC,WAAW,CAAC;KAC3B;IAED,QAAQ;QACJ,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC;KAC5C;IAED,iBAAiB;QACb,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;KAC1G;IAED,oBAAoB;QAChB,IAAI,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC3C,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;SAC3B;KACJ;IAED,kBAAkB,CAAC,SAA0C;QACzD,IAAI,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YAC3C,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAChD;KACJ;IAED,MAAM;QACF,IAAI,eAMU,EANV,EACA,OAAO,EACP,UAAU,EACV,QAAQ,EACR,SAAS,OAEC,EADV,yEACU,CAAC;QAEf,QACI,2CAAK,SAAS,EAAE,GAAG,SAAS,UAAU,IAAM,QAAQ,IAAE,GAAG,EAAE,IAAI,CAAC,YAAY;YACxE,6BAAK,SAAS,EAAC,yBAAyB,GAAO;YAC/C,6BAAK,SAAS,EAAC,YAAY;gBACvB,6BAAK,SAAS,EAAC,aAAa;oBACxB,6BAAK,SAAS,EAAC,YAAY,IACnB,IAAI,CAAC,KAAK,CAAC,QAAQ,CACrB,CACJ,CACJ;YACN,6BAAK,SAAS,EAAC,uCAAuC;gBAClD,6BAAK,SAAS,EAAC,oBAAoB;oBAC/B,6BAAK,SAAS,EAAC,qBAAqB,GAAO,CACzC,CACJ;YACN,6BAAK,SAAS,EAAC,oCAAoC;gBAC/C,6BAAK,SAAS,EAAC,oBAAoB;oBAC/B,6BAAK,SAAS,EAAC,qBAAqB,GAAO,CACzC,CACJ;YACN,6BAAK,SAAS,EAAC,qBAAqB,GAAO,CACzC,EACR;KACL;CACJ;;;;"}
@@ -88,8 +88,19 @@
}
};
OverlayScrollbarsComponent.prototype.render = function () {
var _a = this.props, options = _a.options, extensions = _a.extensions, children = _a.children, divProps = __rest(_a, ["options", "extensions", "children"]);
return (React__default.createElement("div", __assign({}, divProps, { ref: this._osTargetRef }), this.props.children));
var _a = this.props, options = _a.options, extensions = _a.extensions, children = _a.children, className = _a.className, divProps = __rest(_a, ["options", "extensions", "children", "className"]);
return (React__default.createElement("div", __assign({ className: className + " os-host" }, divProps, { ref: this._osTargetRef }),
React__default.createElement("div", { className: "os-resize-observer-host" }),
React__default.createElement("div", { className: "os-padding" },
React__default.createElement("div", { className: "os-viewport" },
React__default.createElement("div", { className: "os-content" }, this.props.children))),
React__default.createElement("div", { className: "os-scrollbar os-scrollbar-horizontal " },
React__default.createElement("div", { className: "os-scrollbar-track" },
React__default.createElement("div", { className: "os-scrollbar-handle" }))),
React__default.createElement("div", { className: "os-scrollbar os-scrollbar-vertical" },
React__default.createElement("div", { className: "os-scrollbar-track" },
React__default.createElement("div", { className: "os-scrollbar-handle" }))),
React__default.createElement("div", { className: "os-scrollbar-corner" })));
};
return OverlayScrollbarsComponent;
}(React.Component));
@@ -1 +1 @@
{"version":3,"file":"overlayscrollbars-react.js","sources":["../src/OverlayScrollbarsComponent.tsx"],"sourcesContent":["import React, { Component, RefObject } from 'react';\nimport OverlayScrollbars from \"overlayscrollbars\";\n\nexport interface OverlayScrollbarsComponentProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: any;\n options?: OverlayScrollbars.Options;\n extensions?: OverlayScrollbars.Extensions;\n}\nexport interface OverlayScrollbarsComponentState { }\n\nexport class OverlayScrollbarsComponent extends Component<OverlayScrollbarsComponentProps, OverlayScrollbarsComponentState> {\n private _osInstance: OverlayScrollbars | null = null;\n private _osTargetRef: RefObject<HTMLDivElement>;\n\n constructor(props: OverlayScrollbarsComponentProps) {\n super(props);\n this._osTargetRef = React.createRef();\n }\n\n osInstance(): OverlayScrollbars | null {\n return this._osInstance;\n }\n\n osTarget(): HTMLDivElement | null {\n return this._osTargetRef.current || null;\n }\n\n componentDidMount() {\n this._osInstance = OverlayScrollbars(this.osTarget(), this.props.options || {}, this.props.extensions);\n }\n\n componentWillUnmount() {\n if (OverlayScrollbars.valid(this._osInstance)) {\n this._osInstance.destroy();\n this._osInstance = null;\n }\n }\n\n componentDidUpdate(prevProps: OverlayScrollbarsComponentProps) {\n if (OverlayScrollbars.valid(this._osInstance)) {\n this._osInstance.options(this.props.options);\n }\n }\n\n render() {\n let {\n options,\n extensions,\n children,\n ...divProps\n } = this.props;\n\n return (\n <div {...divProps} ref={this._osTargetRef}>\n {...this.props.children}\n </div>\n );\n }\n}"],"names":["tslib_1.__extends","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAUgDA,8CAA2E;QAIvH,oCAAY,KAAsC;YAAlD,YACI,kBAAM,KAAK,CAAC,SAEf;YANO,iBAAW,GAA6B,IAAI,CAAC;YAKjD,KAAI,CAAC,YAAY,GAAGC,cAAK,CAAC,SAAS,EAAE,CAAC;;SACzC;QAED,+CAAU,GAAV;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;SAC3B;QAED,6CAAQ,GAAR;YACI,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC;SAC5C;QAED,sDAAiB,GAAjB;YACI,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;SAC1G;QAED,yDAAoB,GAApB;YACI,IAAI,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;gBAC3C,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;aAC3B;SACJ;QAED,uDAAkB,GAAlB,UAAmB,SAA0C;YACzD,IAAI,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;gBAC3C,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aAChD;SACJ;QAED,2CAAM,GAAN;YACI,IAAI,eAKU,EAJV,oBAAO,EACP,0BAAU,EACV,sBAAQ,EACR,4DACU,CAAC;YAEf,QACIA,iDAAS,QAAQ,IAAE,GAAG,EAAE,IAAI,CAAC,YAAY,KACjC,IAAI,CAAC,KAAK,CAAC,QAAQ,CACrB,EACR;SACL;QACL,iCAAC;IAAD,CAhDA,CAAgDC,eAAS;;;;;;;;;;;;"}
{"version":3,"file":"overlayscrollbars-react.js","sources":["../src/OverlayScrollbarsComponent.tsx"],"sourcesContent":["import React, { Component, RefObject } from 'react';\nimport OverlayScrollbars from \"overlayscrollbars\";\n\nexport interface OverlayScrollbarsComponentProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: any;\n options?: OverlayScrollbars.Options;\n extensions?: OverlayScrollbars.Extensions;\n}\nexport interface OverlayScrollbarsComponentState { }\n\nexport class OverlayScrollbarsComponent extends Component<OverlayScrollbarsComponentProps, OverlayScrollbarsComponentState> {\n private _osInstance: OverlayScrollbars | null = null;\n private _osTargetRef: RefObject<HTMLDivElement>;\n\n constructor(props: OverlayScrollbarsComponentProps) {\n super(props);\n this._osTargetRef = React.createRef();\n }\n\n osInstance(): OverlayScrollbars | null {\n return this._osInstance;\n }\n\n osTarget(): HTMLDivElement | null {\n return this._osTargetRef.current || null;\n }\n\n componentDidMount() {\n this._osInstance = OverlayScrollbars(this.osTarget(), this.props.options || {}, this.props.extensions);\n }\n\n componentWillUnmount() {\n if (OverlayScrollbars.valid(this._osInstance)) {\n this._osInstance.destroy();\n this._osInstance = null;\n }\n }\n\n componentDidUpdate(prevProps: OverlayScrollbarsComponentProps) {\n if (OverlayScrollbars.valid(this._osInstance)) {\n this._osInstance.options(this.props.options);\n }\n }\n\n render() {\n let {\n options,\n extensions,\n children,\n className,\n ...divProps\n } = this.props;\n\n return (\n <div className={`${className} os-host`} {...divProps} ref={this._osTargetRef}>\n <div className=\"os-resize-observer-host\"></div>\n <div className=\"os-padding\">\n <div className=\"os-viewport\">\n <div className=\"os-content\">\n {...this.props.children}\n </div>\n </div>\n </div>\n <div className=\"os-scrollbar os-scrollbar-horizontal \">\n <div className=\"os-scrollbar-track\">\n <div className=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div className=\"os-scrollbar os-scrollbar-vertical\">\n <div className=\"os-scrollbar-track\">\n <div className=\"os-scrollbar-handle\"></div>\n </div>\n </div>\n <div className=\"os-scrollbar-corner\"></div>\n </div>\n );\n }\n}"],"names":["tslib_1.__extends","React","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAUgDA,8CAA2E;QAIvH,oCAAY,KAAsC;YAAlD,YACI,kBAAM,KAAK,CAAC,SAEf;YANO,iBAAW,GAA6B,IAAI,CAAC;YAKjD,KAAI,CAAC,YAAY,GAAGC,cAAK,CAAC,SAAS,EAAE,CAAC;;SACzC;QAED,+CAAU,GAAV;YACI,OAAO,IAAI,CAAC,WAAW,CAAC;SAC3B;QAED,6CAAQ,GAAR;YACI,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC;SAC5C;QAED,sDAAiB,GAAjB;YACI,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;SAC1G;QAED,yDAAoB,GAApB;YACI,IAAI,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;gBAC3C,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;aAC3B;SACJ;QAED,uDAAkB,GAAlB,UAAmB,SAA0C;YACzD,IAAI,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;gBAC3C,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aAChD;SACJ;QAED,2CAAM,GAAN;YACI,IAAI,eAMU,EALV,oBAAO,EACP,0BAAU,EACV,sBAAQ,EACR,wBAAS,EACT,yEACU,CAAC;YAEf,QACIA,+CAAK,SAAS,EAAK,SAAS,aAAU,IAAM,QAAQ,IAAE,GAAG,EAAE,IAAI,CAAC,YAAY;gBACxEA,sCAAK,SAAS,EAAC,yBAAyB,GAAO;gBAC/CA,sCAAK,SAAS,EAAC,YAAY;oBACvBA,sCAAK,SAAS,EAAC,aAAa;wBACxBA,sCAAK,SAAS,EAAC,YAAY,IACnB,IAAI,CAAC,KAAK,CAAC,QAAQ,CACrB,CACJ,CACJ;gBACNA,sCAAK,SAAS,EAAC,uCAAuC;oBAClDA,sCAAK,SAAS,EAAC,oBAAoB;wBAC/BA,sCAAK,SAAS,EAAC,qBAAqB,GAAO,CACzC,CACJ;gBACNA,sCAAK,SAAS,EAAC,oCAAoC;oBAC/CA,sCAAK,SAAS,EAAC,oBAAoB;wBAC/BA,sCAAK,SAAS,EAAC,qBAAqB,GAAO,CACzC,CACJ;gBACNA,sCAAK,SAAS,EAAC,qBAAqB,GAAO,CACzC,EACR;SACL;QACL,iCAAC;IAAD,CAnEA,CAAgDC,eAAS;;;;;;;;;;;;"}
+39 -15
View File
@@ -2827,7 +2827,8 @@
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true
"bundled": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -3192,7 +3193,8 @@
},
"safe-buffer": {
"version": "5.1.2",
"bundled": true
"bundled": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -3240,6 +3242,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -3278,11 +3281,13 @@
},
"wrappy": {
"version": "1.0.2",
"bundled": true
"bundled": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true
"bundled": true,
"optional": true
}
}
},
@@ -6691,7 +6696,8 @@
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true
"bundled": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -6709,11 +6715,13 @@
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
"bundled": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -6726,15 +6734,18 @@
},
"code-point-at": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -6837,7 +6848,8 @@
},
"inherits": {
"version": "2.0.3",
"bundled": true
"bundled": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -6847,6 +6859,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -6859,17 +6872,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true
"bundled": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -6886,6 +6902,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -6958,7 +6975,8 @@
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -6968,6 +6986,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -7043,7 +7062,8 @@
},
"safe-buffer": {
"version": "5.1.2",
"bundled": true
"bundled": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -7073,6 +7093,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -7090,6 +7111,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -7128,11 +7150,13 @@
},
"wrappy": {
"version": "1.0.2",
"bundled": true
"bundled": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true
"bundled": true,
"optional": true
}
}
}
@@ -4,6 +4,7 @@ import OverlayScrollbars from 'overlayscrollbars';
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
export interface AppState {
loremList: Array<string>;
componentContent: string;
osComponentOptions: OverlayScrollbars.Options;
}
@@ -23,6 +24,7 @@ export default class App extends React.Component<any, AppState> {
this.osComponentRef2 = React.createRef<OverlayScrollbarsComponent>();
this.state = {
componentContent: 'Lorem Ipsum',
loremList: [],
osComponentOptions: {
resize: 'both',
paddingAbsolute: true,
@@ -69,10 +71,9 @@ export default class App extends React.Component<any, AppState> {
}
onBtnChangeContent() {
let loremIpsums = [this.loremIpsumLong, this.loremIpsumMedium, this.loremIpsumShort];
let random = Math.floor(Math.random() * loremIpsums.length);
this.setState({
componentContent: this.state.componentContent + '\r\n' + loremIpsums[random]
componentContent: this.state.componentContent + '\r\n' + this.randomIpsum(),
loremList: [...this.state.loremList, this.randomIpsum()]
});
}
@@ -90,6 +91,11 @@ export default class App extends React.Component<any, AppState> {
console.log(this.osComponentRef2.current!.osTarget());
}
randomIpsum(): string {
let loremIpsums = [this.loremIpsumLong, this.loremIpsumMedium, this.loremIpsumShort];
return loremIpsums[Math.floor(Math.random() * loremIpsums.length)];
}
render() {
return (
<div className="App">
@@ -133,7 +139,7 @@ export default class App extends React.Component<any, AppState> {
<OverlayScrollbarsComponent ref={this.osComponentRef1}
options={this.state.osComponentOptions}
style={{ maxHeight: '350px' }}
className={`custom-class-name-test ${this.framework}`}
className={`${this.framework} custom-class-name-test`}
>
<div className="bonus-content">
{this.state.componentContent}
@@ -159,6 +165,11 @@ export default class App extends React.Component<any, AppState> {
<br />
<br />
{this.loremIpsumLong}
{
this.state.loremList.map((item, index) => {
return <div key={index} data-key={index}><br />{item}</div>;
})
}
</OverlayScrollbarsComponent>
<div className="buttons">
+30 -11
View File
@@ -1184,7 +1184,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -1205,12 +1206,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -1225,17 +1228,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -1352,7 +1358,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -1364,6 +1371,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -1378,6 +1386,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -1385,12 +1394,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -1409,6 +1420,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -1489,7 +1501,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -1501,6 +1514,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -1586,7 +1600,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -1622,6 +1637,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -1641,6 +1657,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -1684,12 +1701,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -47,12 +47,31 @@ export class OverlayScrollbarsComponent extends Component<OverlayScrollbarsCompo
options,
extensions,
children,
className,
...divProps
} = this.props;
return (
<div {...divProps} ref={this._osTargetRef}>
{...this.props.children}
<div className={`${className} os-host`} {...divProps} ref={this._osTargetRef}>
<div className="os-resize-observer-host"></div>
<div className="os-padding">
<div className="os-viewport">
<div className="os-content">
{...this.props.children}
</div>
</div>
</div>
<div className="os-scrollbar os-scrollbar-horizontal ">
<div className="os-scrollbar-track">
<div className="os-scrollbar-handle"></div>
</div>
</div>
<div className="os-scrollbar os-scrollbar-vertical">
<div className="os-scrollbar-track">
<div className="os-scrollbar-handle"></div>
</div>
</div>
<div className="os-scrollbar-corner"></div>
</div>
);
}
@@ -140,9 +140,44 @@ var __vue_render__ = function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", [_vm._t("default")], 2)
return _c("div", { staticClass: "os-host" }, [
_c("div", { staticClass: "os-resize-observer-host" }),
_vm._v(" "),
_c("div", { staticClass: "os-padding" }, [
_c("div", { staticClass: "os-viewport" }, [
_c("div", { staticClass: "os-content" }, [_vm._t("default")], 2)
])
]),
_vm._v(" "),
_vm._m(0),
_vm._v(" "),
_vm._m(1),
_vm._v(" "),
_c("div", { staticClass: "os-scrollbar-corner" })
])
};
var __vue_staticRenderFns__ = [];
var __vue_staticRenderFns__ = [
function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", { staticClass: "os-scrollbar os-scrollbar-horizontal " }, [
_c("div", { staticClass: "os-scrollbar-track" }, [
_c("div", { staticClass: "os-scrollbar-handle" })
])
])
},
function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", { staticClass: "os-scrollbar os-scrollbar-vertical" }, [
_c("div", { staticClass: "os-scrollbar-track" }, [
_c("div", { staticClass: "os-scrollbar-handle" })
])
])
}
];
__vue_render__._withStripped = true;
/* style */
File diff suppressed because one or more lines are too long
@@ -178,9 +178,44 @@
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", [_vm._t("default")], 2)
return _c("div", { staticClass: "os-host" }, [
_c("div", { staticClass: "os-resize-observer-host" }),
_vm._v(" "),
_c("div", { staticClass: "os-padding" }, [
_c("div", { staticClass: "os-viewport" }, [
_c("div", { staticClass: "os-content" }, [_vm._t("default")], 2)
])
]),
_vm._v(" "),
_vm._m(0),
_vm._v(" "),
_vm._m(1),
_vm._v(" "),
_c("div", { staticClass: "os-scrollbar-corner" })
])
};
var __vue_staticRenderFns__ = [];
var __vue_staticRenderFns__ = [
function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", { staticClass: "os-scrollbar os-scrollbar-horizontal " }, [
_c("div", { staticClass: "os-scrollbar-track" }, [
_c("div", { staticClass: "os-scrollbar-handle" })
])
])
},
function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c("div", { staticClass: "os-scrollbar os-scrollbar-vertical" }, [
_c("div", { staticClass: "os-scrollbar-track" }, [
_c("div", { staticClass: "os-scrollbar-handle" })
])
])
}
];
__vue_render__._withStripped = true;
/* style */
File diff suppressed because one or more lines are too long
+30 -11
View File
@@ -4449,7 +4449,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -4470,12 +4471,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -4490,17 +4493,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -4617,7 +4623,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -4629,6 +4636,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -4643,6 +4651,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -4650,12 +4659,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -4674,6 +4685,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -4754,7 +4766,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -4766,6 +4779,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -4851,7 +4865,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -4887,6 +4902,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -4906,6 +4922,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -4949,12 +4966,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
+176 -164
View File
@@ -1,86 +1,92 @@
<template>
<div id="app">
<div class="header">
<code>
<span class="code-keyword">import</span>
<span class="code-char">{{ ' { ' }}</span>
<span class="code-variable">OverlayScrollbarsComponent</span>
<span class="code-char">{{ ' } ' }}</span>
<span class="code-keyword">from</span>
<span class="code-string">{{ " 'overlayscrollbars-vue'" }}</span>
<span class="code-char">;</span>
</code>
</div>
<div class="content">
<div class="content-section skew">
<div class="content-section-content content-section-content-framework">
<span class="framework-logo"></span>
<span>+</span>
<span class="os-logo"></span>
</div>
</div>
<div class="content-section">
<div class="content-section-title">
<h2>Component</h2>
<table>
<tbody>
<tr>
<td>
<span>Class:</span>
</td>
<td>
<span>{{ componentClass }}</span>
</td>
</tr>
<tr>
<td>
<span>Description:</span>
</td>
<td>OverlayScrollbars as a {{ framework }}-Component.</td>
</tr>
</tbody>
</table>
</div>
<div class="content-section-content">
<overlay-scrollbars
ref="osComponentRef1"
:options="osComponentOptions"
style="max-height: 350px"
:class="['custom-class-name-test', framework]"
>
<div class="bonus-content">{{ componentContent }}</div>
{{ loremIpsumShort }}
<overlay-scrollbars
ref="osComponentRef2"
:options="osComponentOptions"
style="max-height: 150px"
:class="'custom-class-name-test'"
>
<div class="bonus-content">{{ componentContent }}</div>
{{ loremIpsumLong }}
<br />
<br />
{{ loremIpsumShort }}
</overlay-scrollbars>
{{ loremIpsumMedium }}
<br />
<br />
{{ loremIpsumShort }}
<br />
<br />
{{ loremIpsumLong }}
</overlay-scrollbars>
<div class="buttons">
<button @click="(event) => { this.onBtnScrollRandom.call(this, event, [this.$refs.osComponentRef1, this.$refs.osComponentRef2]) }">Scroll</button>
<button @click="() => { this.onBtnChangeOptions.call(this) }">Change Options</button>
<button @click="() => { this.onBtnChangeContent.call(this) }">Change Content</button>
<button @click="() => { this.onBtnLog.call(this) }">Log</button>
</div>
</div>
</div>
</div>
<div id="app">
<div class="header">
<code>
<span class="code-keyword">import</span>
<span class="code-char">{{ ' { ' }}</span>
<span class="code-variable">OverlayScrollbarsComponent</span>
<span class="code-char">{{ ' } ' }}</span>
<span class="code-keyword">from</span>
<span class="code-string">{{ " 'overlayscrollbars-vue'" }}</span>
<span class="code-char">;</span>
</code>
</div>
<div class="content">
<div class="content-section skew">
<div class="content-section-content content-section-content-framework">
<span class="framework-logo"></span>
<span>+</span>
<span class="os-logo"></span>
</div>
</div>
<div class="content-section">
<div class="content-section-title">
<h2>Component</h2>
<table>
<tbody>
<tr>
<td>
<span>Class:</span>
</td>
<td>
<span>{{ componentClass }}</span>
</td>
</tr>
<tr>
<td>
<span>Description:</span>
</td>
<td>OverlayScrollbars as a {{ framework }}-Component.</td>
</tr>
</tbody>
</table>
</div>
<div class="content-section-content">
<overlay-scrollbars
ref="osComponentRef1"
:options="osComponentOptions"
style="max-height: 350px"
:class="[framework, 'custom-class-name-test']"
>
<div class="bonus-content">{{ componentContent }}</div>
{{ loremIpsumShort }}
<overlay-scrollbars
ref="osComponentRef2"
:options="osComponentOptions"
style="max-height: 150px"
:class="'custom-class-name-test'"
>
<div class="bonus-content">{{ componentContent }}</div>
{{ loremIpsumLong }}
<br />
<br />
{{ loremIpsumShort }}
</overlay-scrollbars>
{{ loremIpsumMedium }}
<br />
<br />
{{ loremIpsumShort }}
<br />
<br />
{{ loremIpsumLong }}
<div v-for="(item, index) in loremList" :key="index" :data-key="index">
<br />
{{ item }}
</div>
</overlay-scrollbars>
<div class="buttons">
<button
@click="(event) => { this.onBtnScrollRandom.call(this, event, [this.$refs.osComponentRef1, this.$refs.osComponentRef2]) }"
>Scroll</button>
<button @click="() => { this.onBtnChangeOptions.call(this) }">Change Options</button>
<button @click="() => { this.onBtnChangeContent.call(this) }">Change Content</button>
<button @click="() => { this.onBtnLog.call(this) }">Log</button>
</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
@@ -89,99 +95,105 @@ import OverlayScrollbars from 'overlayscrollbars';
import { OverlayScrollbarsComponent } from 'overlayscrollbars-vue';
export interface AppData {
framework: string;
componentClass: string;
loremIpsumLong: string;
loremIpsumMedium: string;
loremIpsumShort: string;
componentContent: string;
osComponentOptions: OverlayScrollbars.Options;
framework: string;
componentClass: string;
loremIpsumLong: string;
loremIpsumMedium: string;
loremIpsumShort: string;
loremList: Array<string>
componentContent: string;
osComponentOptions: OverlayScrollbars.Options;
}
export interface AppMethods {
onBtnScrollRandom(
event: MouseEvent,
refArray: Array<OverlayScrollbarsComponent>
): void;
onBtnChangeOptions(): void;
onBtnChangeContent(): void;
onBtnLog(): void;
onBtnScrollRandom(
event: MouseEvent,
refArray: Array<OverlayScrollbarsComponent>
): void;
onBtnChangeOptions(): void;
onBtnChangeContent(): void;
onBtnLog(): void;
randomIpsum(): string;
}
export interface AppComputed { }
export interface AppProps { }
export default Vue.extend<AppData, AppMethods, AppComputed, AppProps>({
name: 'app',
data: function () {
return {
framework: 'Vue',
componentClass: 'OverlayScrollbarsComponent',
loremIpsumLong: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.',
loremIpsumMedium: 'At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.',
loremIpsumShort: 'Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio.',
componentContent: 'Lorem Ipsum',
osComponentOptions: {
resize: 'both',
paddingAbsolute: true,
scrollbars: {
autoHide: 'never'
}
}
};
},
methods: {
onBtnScrollRandom(event: MouseEvent, refArray: Array<OverlayScrollbarsComponent>) {
if (refArray) {
for (let i = 0; i < refArray.length; i++) {
if (refArray[i]) {
let osInstance = refArray[i].osInstance();
if (osInstance) {
osInstance.scrollStop().scroll({
x: Math.floor(Math.random() * osInstance.scroll().max.x + 0),
y: Math.floor(Math.random() * osInstance.scroll().max.y + 0)
}, 1000, 'easeOutElastic');
}
}
}
}
},
onBtnChangeOptions() {
this.osComponentOptions = {
resize: this.osComponentOptions.resize === 'both' ? 'none' : 'both',
scrollbars: {
autoHide: this.osComponentOptions.scrollbars!.autoHide === 'never' ? 'scroll' : 'never'
}
};
},
onBtnChangeContent() {
let loremIpsums = [
this.loremIpsumLong,
this.loremIpsumMedium,
this.loremIpsumShort
];
let random = Math.floor(Math.random() * loremIpsums.length);
this.componentContent = this.componentContent + '\r\n' + loremIpsums[random];
},
onBtnLog() {
console.log(`== ${this.componentClass} (1) ==`);
console.log('Instance:');
console.log((this.$refs.osComponentRef1 as OverlayScrollbarsComponent).osInstance());
console.log('Target:');
console.log((this.$refs.osComponentRef1 as OverlayScrollbarsComponent).osTarget());
console.log('');
console.log(`== ${this.componentClass} (2) ==`);
console.log('Instance:');
console.log((this.$refs.osComponentRef2 as OverlayScrollbarsComponent).osInstance());
console.log('Target:');
console.log((this.$refs.osComponentRef2 as OverlayScrollbarsComponent).osTarget());
name: 'app',
data: function () {
return {
framework: 'Vue',
componentClass: 'OverlayScrollbarsComponent',
loremIpsumLong: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.',
loremIpsumMedium: 'At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.',
loremIpsumShort: 'Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio.',
loremList: [],
componentContent: 'Lorem Ipsum',
osComponentOptions: {
resize: 'both',
paddingAbsolute: true,
scrollbars: {
autoHide: 'never'
}
}
};
},
methods: {
onBtnScrollRandom(event: MouseEvent, refArray: Array<OverlayScrollbarsComponent>) {
if (refArray) {
for (let i = 0; i < refArray.length; i++) {
if (refArray[i]) {
let osInstance = refArray[i].osInstance();
if (osInstance) {
osInstance.scrollStop().scroll({
x: Math.floor(Math.random() * osInstance.scroll().max.x + 0),
y: Math.floor(Math.random() * osInstance.scroll().max.y + 0)
}, 1000, 'easeOutElastic');
}
}
}
}
},
mounted() {
console.log(`${this.componentClass} (1)`);
console.log(this.$refs.osComponentRef1);
console.log(`${this.componentClass} (2)`);
console.log(this.$refs.osComponentRef2);
onBtnChangeOptions() {
this.osComponentOptions = {
resize: this.osComponentOptions.resize === 'both' ? 'none' : 'both',
scrollbars: {
autoHide: this.osComponentOptions.scrollbars!.autoHide === 'never' ? 'scroll' : 'never'
}
};
},
onBtnChangeContent() {
this.componentContent = this.componentContent + '\r\n' + this.randomIpsum();
this.loremList.push(this.randomIpsum());
},
onBtnLog() {
console.log(`== ${this.componentClass} (1) ==`);
console.log('Instance:');
console.log((this.$refs.osComponentRef1 as OverlayScrollbarsComponent).osInstance());
console.log('Target:');
console.log((this.$refs.osComponentRef1 as OverlayScrollbarsComponent).osTarget());
console.log('');
console.log(`== ${this.componentClass} (2) ==`);
console.log('Instance:');
console.log((this.$refs.osComponentRef2 as OverlayScrollbarsComponent).osInstance());
console.log('Target:');
console.log((this.$refs.osComponentRef2 as OverlayScrollbarsComponent).osTarget());
},
randomIpsum() {
let loremIpsums = [
this.loremIpsumLong,
this.loremIpsumMedium,
this.loremIpsumShort
];
return loremIpsums[Math.floor(Math.random() * loremIpsums.length)];
}
},
mounted() {
console.log(`${this.componentClass} (1)`);
console.log(this.$refs.osComponentRef1);
console.log(`${this.componentClass} (2)`);
console.log(this.$refs.osComponentRef2);
}
});
</script>
+76 -30
View File
@@ -8,13 +8,15 @@
"version": "7.0.7",
"resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.7.tgz",
"integrity": "sha512-dBtBbrc+qTHy1WdfHYjBwRln4+LWqASWakLHsWHR2NWHIFkv4W3O070IGoGLEBrJBvct3r0L1BUPuvURi7kYUQ==",
"dev": true
"dev": true,
"optional": true
},
"@types/babylon": {
"version": "6.16.5",
"resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz",
"integrity": "sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w==",
"dev": true,
"optional": true,
"requires": {
"@types/babel-types": "*"
}
@@ -139,6 +141,7 @@
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
"dev": true,
"optional": true,
"requires": {
"kind-of": "^3.0.2",
"longest": "^1.0.1",
@@ -150,6 +153,7 @@
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"dev": true,
"optional": true,
"requires": {
"is-buffer": "^1.1.5"
}
@@ -356,7 +360,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
"dev": true,
"optional": true
},
"assign-symbols": {
"version": "1.0.0",
@@ -423,6 +428,7 @@
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"dev": true,
"optional": true,
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
@@ -433,6 +439,7 @@
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"dev": true,
"optional": true,
"requires": {
"babel-runtime": "^6.26.0",
"esutils": "^2.0.2",
@@ -444,7 +451,8 @@
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
"dev": true
"dev": true,
"optional": true
},
"bach": {
"version": "1.2.0",
@@ -832,6 +840,7 @@
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dev": true,
"optional": true,
"requires": {
"delayed-stream": "~1.0.0"
}
@@ -874,6 +883,7 @@
"resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz",
"integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==",
"dev": true,
"optional": true,
"requires": {
"@types/babel-types": "^7.0.0",
"@types/babylon": "^6.16.2",
@@ -910,7 +920,8 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz",
"integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==",
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -1074,7 +1085,8 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true
"dev": true,
"optional": true
},
"detect-file": {
"version": "1.0.0",
@@ -1216,7 +1228,8 @@
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
"dev": true,
"optional": true
},
"expand-brackets": {
"version": "2.1.4",
@@ -1358,7 +1371,8 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
"dev": true
"dev": true,
"optional": true
},
"fancy-log": {
"version": "1.3.3",
@@ -1556,7 +1570,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
@@ -1577,12 +1592,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -1597,17 +1614,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -1724,7 +1744,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@@ -1736,6 +1757,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -1750,6 +1772,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -1757,12 +1780,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -1781,6 +1806,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -1861,7 +1887,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -1873,6 +1900,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@@ -1958,7 +1986,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -1994,6 +2023,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -2013,6 +2043,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -2056,12 +2087,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
@@ -2715,13 +2748,15 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz",
"integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds=",
"dev": true
"dev": true,
"optional": true
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"dev": true
"dev": true,
"optional": true
},
"jsesc": {
"version": "0.5.0",
@@ -2923,13 +2958,15 @@
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
"dev": true,
"optional": true
},
"longest": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
"dev": true
"dev": true,
"optional": true
},
"lru-cache": {
"version": "4.1.5",
@@ -3058,13 +3095,15 @@
"version": "1.40.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
"integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
"dev": true
"dev": true,
"optional": true
},
"mime-types": {
"version": "2.1.24",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
"integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
"dev": true,
"optional": true,
"requires": {
"mime-db": "1.40.0"
}
@@ -3731,7 +3770,8 @@
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz",
"integrity": "sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==",
"dev": true
"dev": true,
"optional": true
},
"pug-filters": {
"version": "3.1.1",
@@ -3798,7 +3838,8 @@
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz",
"integrity": "sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==",
"dev": true
"dev": true,
"optional": true
},
"pug-strip-comments": {
"version": "1.0.4",
@@ -3814,7 +3855,8 @@
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz",
"integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==",
"dev": true
"dev": true,
"optional": true
},
"pump": {
"version": "2.0.1",
@@ -3923,7 +3965,8 @@
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
"integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
"dev": true
"dev": true,
"optional": true
},
"regex-not": {
"version": "1.0.2",
@@ -4236,7 +4279,8 @@
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
"dev": true
"dev": true,
"optional": true
},
"sass": {
"version": "1.22.9",
@@ -4697,7 +4741,8 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
"dev": true
"dev": true,
"optional": true
},
"to-object-path": {
"version": "0.3.0",
@@ -4797,7 +4842,8 @@
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true
"dev": true,
"optional": true
},
"type": {
"version": "1.0.1",
@@ -1,6 +1,24 @@
<template>
<div>
<slot></slot>
<div class="os-host">
<div class="os-resize-observer-host"></div>
<div class="os-padding">
<div class="os-viewport">
<div class="os-content">
<slot></slot>
</div>
</div>
</div>
<div class="os-scrollbar os-scrollbar-horizontal ">
<div class="os-scrollbar-track">
<div class="os-scrollbar-handle"></div>
</div>
</div>
<div class="os-scrollbar os-scrollbar-vertical">
<div class="os-scrollbar-track">
<div class="os-scrollbar-handle"></div>
</div>
</div>
<div class="os-scrollbar-corner"></div>
</div>
</template>
@@ -14,6 +32,7 @@ import {
OverlayScrollbarsComponentProps
} from './OverlayScrollbarsComponent';
// https://github.com/vuejs/rfcs/blob/attr-fallthrough/active-rfcs/0000-attr-fallthrough.md
// https://github.com/vuejs/vue/issues/7060
export default class OverlayScrollbarsComponent extends Vue.extend<
OverlayScrollbarsComponentData,