@haiilo/catalyst 10.32.2 → 10.33.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/{p-0c0af582.entry.js → p-8b1936d8.entry.js} +2 -2
- package/dist/catalyst/{p-0c0af582.entry.js.map → p-8b1936d8.entry.js.map} +1 -1
- package/dist/cjs/cat-alert_30.cjs.entry.js +21 -9
- package/dist/cjs/cat-alert_30.cjs.entry.js.map +1 -1
- package/dist/cjs/index-0c9af7fb.js +14 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +21 -9
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
- package/dist/components/cat-scrollable2.js +21 -9
- package/dist/components/cat-scrollable2.js.map +1 -1
- package/dist/esm/cat-alert_30.entry.js +21 -9
- package/dist/esm/cat-alert_30.entry.js.map +1 -1
- package/dist/esm/index-30afba72.js +14 -1
- package/package.json +2 -2
|
@@ -10976,11 +10976,12 @@ const CatScrollable = class {
|
|
|
10976
10976
|
this.attachEmitter('top', this.scrolledTop);
|
|
10977
10977
|
merge(this.init, this.scrolled, this.resizedEntries)
|
|
10978
10978
|
.pipe(auditTime(CatScrollable.THROTTLE), map(() => ({
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10979
|
+
// 5px used to avoid shadow bug on Windows
|
|
10980
|
+
top: this.getScrollOffset('top') > 5,
|
|
10981
|
+
left: this.getScrollOffset('left') > 5,
|
|
10982
|
+
right: this.getScrollOffset('right') > 5,
|
|
10983
|
+
bottom: this.getScrollOffset('bottom') > 5
|
|
10984
|
+
})), takeUntil(this.destroyed))
|
|
10984
10985
|
.subscribe(({ top, left, right, bottom }) => {
|
|
10985
10986
|
this.toggleClass('cat-scrollable-top', top);
|
|
10986
10987
|
this.toggleClass('cat-scrollable-left', left);
|
|
@@ -11001,18 +11002,29 @@ const CatScrollable = class {
|
|
|
11001
11002
|
}
|
|
11002
11003
|
render() {
|
|
11003
11004
|
return [
|
|
11004
|
-
index.h("div", { key: '
|
|
11005
|
-
index.h("div", { key: '
|
|
11005
|
+
index.h("div", { key: '8153419d11ba30f6360acb82b87ac62727248599', class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, !this.noShadowY && index.h("div", { key: '3374f51499e735a692ccd8e0f9bea23c0132b47d', class: "shadow-top" }), !this.noShadowX && index.h("div", { key: 'd208685280ae658baf5672003141ab9349d0feef', class: "shadow-left" }), !this.noShadowX && index.h("div", { key: '0404d0cd8afbaac6ac9d89947ce9fbd91c7929f6', class: "shadow-right" }), !this.noShadowY && index.h("div", { key: '539c15c633403f03e4fc36c1fb1d86e498c8d9cc', class: "shadow-bottom" })),
|
|
11006
|
+
index.h("div", { key: '0ea3a47900df0689a73a5c440a8774ca04edf4ad', ref: el => (this.scrollElement = el), class: {
|
|
11006
11007
|
'scrollable-content': true,
|
|
11007
11008
|
'scroll-x': !this.noOverflowX,
|
|
11008
11009
|
'scroll-y': !this.noOverflowY,
|
|
11009
11010
|
'no-overscroll': this.noOverscroll
|
|
11010
|
-
} }, index.h("slot", { key: '
|
|
11011
|
+
} }, index.h("slot", { key: '9c10382fc5f4773242738be4070af6bd5ce2e2d3' }))
|
|
11011
11012
|
];
|
|
11012
11013
|
}
|
|
11013
11014
|
attachEmitter(from, emitter) {
|
|
11014
11015
|
merge(this.init, this.scrolled, this.resizedEntries)
|
|
11015
|
-
.pipe(auditTime(CatScrollable.THROTTLE), map(() => this.getScrollOffset(from)), map(offset => offset <= this.scrolledBuffer),
|
|
11016
|
+
.pipe(auditTime(CatScrollable.THROTTLE), map(() => this.getScrollOffset(from)), map(offset => offset <= this.scrolledBuffer), filter(isLower => isLower), map(() => {
|
|
11017
|
+
switch (from) {
|
|
11018
|
+
case 'top':
|
|
11019
|
+
return this.getScrollOffset('bottom');
|
|
11020
|
+
case 'left':
|
|
11021
|
+
return this.getScrollOffset('right');
|
|
11022
|
+
case 'right':
|
|
11023
|
+
return this.getScrollOffset('left');
|
|
11024
|
+
case 'bottom':
|
|
11025
|
+
return this.getScrollOffset('top');
|
|
11026
|
+
}
|
|
11027
|
+
}), distinctUntilChanged(), takeUntil(this.destroyed))
|
|
11016
11028
|
.subscribe(() => emitter.emit());
|
|
11017
11029
|
}
|
|
11018
11030
|
getScrollOffset(from) {
|