@haiilo/catalyst 4.1.2 → 5.0.1
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/README.md +0 -2
- package/dist/catalyst/assets/fonts/Lato-Black.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Black.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Hairline.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Hairline.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Heavy.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Heavy.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Light.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Light.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-LightItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-LightItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Medium.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Medium.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Semibold.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Semibold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-Thin.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-Thin.woff2 +0 -0
- package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff +0 -0
- package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff2 +0 -0
- package/dist/catalyst/catalyst.css +6 -27
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js.map +1 -1
- package/dist/catalyst/p-ccfebe33.js.map +1 -1
- package/dist/catalyst/p-d1ee6a09.entry.js +10 -0
- package/dist/catalyst/p-d1ee6a09.entry.js.map +1 -0
- package/dist/catalyst/p-d1fb9d96.js +3 -0
- package/dist/catalyst/p-d1fb9d96.js.map +1 -0
- package/dist/catalyst/scss/fonts/_fonts-mixins.scss +0 -10
- package/dist/cjs/cat-alert_24.cjs.entry.js +933 -1135
- package/dist/cjs/cat-alert_24.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +10 -3
- package/dist/cjs/catalyst.cjs.js.map +1 -1
- package/dist/cjs/{index-c4542095.js → index-01312a2e.js} +527 -245
- package/dist/cjs/index-01312a2e.js.map +1 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/assets/fonts/Lato-Black.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Black.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-BlackItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-BlackItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Bold.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Bold.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-BoldItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-BoldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Hairline.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Hairline.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-HairlineItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Heavy.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Heavy.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-HeavyItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Italic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Italic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Light.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Light.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-LightItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-LightItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Medium.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Medium.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-MediumItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-MediumItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Regular.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Semibold.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Semibold.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-Thin.woff +0 -0
- package/dist/collection/assets/fonts/Lato-Thin.woff2 +0 -0
- package/dist/collection/assets/fonts/Lato-ThinItalic.woff +0 -0
- package/dist/collection/assets/fonts/Lato-ThinItalic.woff2 +0 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/cat-alert/cat-alert.js +69 -71
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.js +172 -165
- package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
- package/dist/collection/components/cat-badge/cat-badge.js +102 -111
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.js +526 -537
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.js +12 -8
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +336 -350
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +137 -137
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.js +58 -40
- package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.js +14 -7
- package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -1
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js +1 -1
- package/dist/collection/components/cat-icon/cat-icon-registry.js +1 -1
- package/dist/collection/components/cat-icon/cat-icon.js +85 -79
- package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.css +32 -3
- package/dist/collection/components/cat-input/cat-input.js +662 -660
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-input/input-type.js +1 -1
- package/dist/collection/components/cat-label/cat-label.js +69 -78
- package/dist/collection/components/cat-label/cat-label.js.map +1 -1
- package/dist/collection/components/cat-notification/cat-notification.js +1 -1
- package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.js +192 -226
- package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.js +319 -327
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +173 -165
- package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +200 -208
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.js +556 -593
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +3 -28
- package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +85 -88
- package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js +52 -50
- package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
- package/dist/collection/components/cat-tab/cat-tab.js +169 -168
- package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +73 -66
- package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.css +32 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +479 -468
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +319 -326
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.css +7 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +187 -198
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/scss/fonts/_fonts-mixins.scss +0 -10
- package/dist/collection/utils/breakpoints.js +1 -1
- package/dist/collection/utils/breakpoints.js.map +1 -1
- package/dist/collection/utils/coerce.js +11 -0
- package/dist/collection/utils/coerce.js.map +1 -0
- package/dist/collection/utils/first-tabbable.js +1 -1
- package/dist/collection/utils/is-touch-screen.js +1 -1
- package/dist/collection/utils/load-img.js +1 -1
- package/dist/collection/utils/media-matcher.js +1 -1
- package/dist/collection/utils/platform.js +4 -4
- package/dist/collection/utils/setDefault.js +1 -1
- package/dist/components/cat-alert.js +1 -6
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-avatar2.js +6 -9
- package/dist/components/cat-avatar2.js.map +1 -1
- package/dist/components/cat-badge.js +0 -15
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button2.js +10 -36
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox2.js +9 -26
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-dropdown2.js +139 -176
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-form-group.js +4 -9
- package/dist/components/cat-form-group.js.map +1 -1
- package/dist/components/cat-form-hint.js +13 -6
- package/dist/components/cat-form-hint.js.map +1 -1
- package/dist/components/cat-icon-registry.js +71 -0
- package/dist/components/cat-icon-registry.js.map +1 -0
- package/dist/components/cat-icon.js +1 -1
- package/dist/components/cat-icon2.js +5 -71
- package/dist/components/cat-icon2.js.map +1 -1
- package/dist/components/cat-input.js +33 -41
- package/dist/components/cat-input.js.map +1 -1
- package/dist/components/cat-label.js +1 -6
- package/dist/components/cat-label.js.map +1 -1
- package/dist/components/cat-pagination.js +0 -30
- package/dist/components/cat-pagination.js.map +1 -1
- package/dist/components/cat-radio-group.js +3 -6
- package/dist/components/cat-radio-group.js.map +1 -1
- package/dist/components/cat-radio.js +9 -23
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-scrollable2.js +1 -12
- package/dist/components/cat-scrollable2.js.map +1 -1
- package/dist/components/cat-select-demo.js +2 -12
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/components/cat-select2.js +41 -50
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-skeleton2.js +1 -10
- package/dist/components/cat-skeleton2.js.map +1 -1
- package/dist/components/cat-spinner2.js +1 -3
- package/dist/components/cat-spinner2.js.map +1 -1
- package/dist/components/cat-tab.js +3 -12
- package/dist/components/cat-tab.js.map +1 -1
- package/dist/components/cat-tabs.js +1 -6
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-textarea.js +28 -33
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-toggle.js +9 -23
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/cat-tooltip.js +14 -34
- package/dist/components/cat-tooltip.js.map +1 -1
- package/dist/components/first-tabbable.js +51 -113
- package/dist/components/first-tabbable.js.map +1 -1
- package/dist/components/floating-ui.dom.esm.js +577 -441
- package/dist/components/floating-ui.dom.esm.js.map +1 -1
- package/dist/components/index.d.ts +9 -27
- package/dist/components/index.js +2 -26
- package/dist/components/index.js.map +1 -1
- package/dist/esm/cat-alert_24.entry.js +934 -1136
- package/dist/esm/cat-alert_24.entry.js.map +1 -1
- package/dist/esm/catalyst.js +7 -3
- package/dist/esm/catalyst.js.map +1 -1
- package/dist/esm/{index-524906f7.js → index-fc2f91a4.js} +527 -246
- package/dist/esm/index-fc2f91a4.js.map +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +4 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +1 -1
- package/dist/types/components/cat-form-group/cat-form-group.d.ts +4 -0
- package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +5 -0
- package/dist/types/components/cat-input/cat-input.d.ts +6 -1
- package/dist/types/components/cat-input/input-type.d.ts +1 -1
- package/dist/types/components/cat-radio/cat-radio.d.ts +1 -1
- package/dist/types/components/cat-select/cat-select.d.ts +2 -1
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +6 -1
- package/dist/types/components/cat-toggle/cat-toggle.d.ts +1 -1
- package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +353 -7
- package/dist/types/stencil-public-runtime.d.ts +91 -19
- package/dist/types/utils/breakpoints.d.ts +1 -1
- package/dist/types/utils/coerce.d.ts +3 -0
- package/dist/types/utils/first-tabbable.d.ts +2 -2
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +19 -19
- package/dist/catalyst/assets/fonts/AzeretMono-Regular.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Bold.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Italic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Medium.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/dist/catalyst/assets/fonts/DMSans-Regular.woff2 +0 -0
- package/dist/catalyst/p-919eea27.js +0 -3
- package/dist/catalyst/p-919eea27.js.map +0 -1
- package/dist/catalyst/p-cd8f8639.entry.js +0 -10
- package/dist/catalyst/p-cd8f8639.entry.js.map +0 -1
- package/dist/catalyst/scss/fonts/_fonts.mixins.azeret.scss +0 -14
- package/dist/catalyst/scss/fonts/_fonts.mixins.dm.scss +0 -53
- package/dist/cjs/index-c4542095.js.map +0 -1
- package/dist/collection/assets/fonts/AzeretMono-Regular.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Bold.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Italic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Medium.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
- package/dist/collection/assets/fonts/DMSans-Regular.woff2 +0 -0
- package/dist/collection/components/cat-form-hint/cat-form-hint-utils.js +0 -13
- package/dist/collection/components/cat-form-hint/cat-form-hint-utils.js.map +0 -1
- package/dist/collection/scss/fonts/_fonts.mixins.azeret.scss +0 -14
- package/dist/collection/scss/fonts/_fonts.mixins.dm.scss +0 -53
- package/dist/components/cat-form-hint-utils.js +0 -17
- package/dist/components/cat-form-hint-utils.js.map +0 -1
- package/dist/esm/index-524906f7.js.map +0 -1
- package/dist/types/components/cat-form-hint/cat-form-hint-utils.d.ts +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
2
|
import { fromEvent, merge, Subject } from 'rxjs';
|
|
3
3
|
import { auditTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';
|
|
4
4
|
/**
|
|
@@ -10,23 +10,12 @@ export class CatScrollable {
|
|
|
10
10
|
this.destroyed = new Subject();
|
|
11
11
|
this.resizedEntries = new Subject();
|
|
12
12
|
this.resizedObserver = new ResizeObserver(entries => this.resizedEntries.next(entries));
|
|
13
|
-
/** Flags to disable/enable scroll shadowX. */
|
|
14
13
|
this.noShadowX = false;
|
|
15
|
-
/** Flags to disable/enable scroll shadowY. */
|
|
16
14
|
this.noShadowY = false;
|
|
17
|
-
/** Flags to disable/enable overflowX. */
|
|
18
15
|
this.noOverflowX = false;
|
|
19
|
-
/** Flags to disable/enable overflowY. */
|
|
20
16
|
this.noOverflowY = false;
|
|
21
|
-
/** Flag to disable/enable overscroll behavior. */
|
|
22
17
|
this.noOverscroll = false;
|
|
23
|
-
/**
|
|
24
|
-
* Flag to not fire an initial event after content initialization.
|
|
25
|
-
*/
|
|
26
18
|
this.noScrolledInit = false;
|
|
27
|
-
/**
|
|
28
|
-
* Buffer to be used to calculate the scroll distance.
|
|
29
|
-
*/
|
|
30
19
|
this.scrolledBuffer = 0;
|
|
31
20
|
}
|
|
32
21
|
componentDidRender() {
|
|
@@ -68,18 +57,13 @@ export class CatScrollable {
|
|
|
68
57
|
}
|
|
69
58
|
render() {
|
|
70
59
|
return [
|
|
71
|
-
h("div", { class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) },
|
|
72
|
-
!this.noShadowY && h("div", { class: "shadow-top" }),
|
|
73
|
-
!this.noShadowX && h("div", { class: "shadow-left" }),
|
|
74
|
-
!this.noShadowX && h("div", { class: "shadow-right" }),
|
|
75
|
-
!this.noShadowY && h("div", { class: "shadow-bottom" })),
|
|
60
|
+
h("div", { class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, !this.noShadowY && h("div", { class: "shadow-top" }), !this.noShadowX && h("div", { class: "shadow-left" }), !this.noShadowX && h("div", { class: "shadow-right" }), !this.noShadowY && h("div", { class: "shadow-bottom" })),
|
|
76
61
|
h("div", { ref: el => (this.scrollElement = el), class: {
|
|
77
62
|
'scrollable-content': true,
|
|
78
63
|
'scroll-x': !this.noOverflowX,
|
|
79
64
|
'scroll-y': !this.noOverflowY,
|
|
80
65
|
'no-overscroll': this.noOverscroll
|
|
81
|
-
} },
|
|
82
|
-
h("slot", null))
|
|
66
|
+
} }, h("slot", null))
|
|
83
67
|
];
|
|
84
68
|
}
|
|
85
69
|
attachEmitter(from, emitter) {
|
|
@@ -115,201 +99,209 @@ export class CatScrollable {
|
|
|
115
99
|
}
|
|
116
100
|
static get is() { return "cat-scrollable"; }
|
|
117
101
|
static get encapsulation() { return "shadow"; }
|
|
118
|
-
static get originalStyleUrls() {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
"original": "boolean",
|
|
148
|
-
"resolved": "boolean",
|
|
149
|
-
"references": {}
|
|
150
|
-
},
|
|
151
|
-
"required": false,
|
|
152
|
-
"optional": false,
|
|
153
|
-
"docs": {
|
|
154
|
-
"tags": [],
|
|
155
|
-
"text": "Flags to disable/enable scroll shadowY."
|
|
156
|
-
},
|
|
157
|
-
"attribute": "no-shadow-y",
|
|
158
|
-
"reflect": false,
|
|
159
|
-
"defaultValue": "false"
|
|
160
|
-
},
|
|
161
|
-
"noOverflowX": {
|
|
162
|
-
"type": "boolean",
|
|
163
|
-
"mutable": false,
|
|
164
|
-
"complexType": {
|
|
165
|
-
"original": "boolean",
|
|
166
|
-
"resolved": "boolean",
|
|
167
|
-
"references": {}
|
|
168
|
-
},
|
|
169
|
-
"required": false,
|
|
170
|
-
"optional": false,
|
|
171
|
-
"docs": {
|
|
172
|
-
"tags": [],
|
|
173
|
-
"text": "Flags to disable/enable overflowX."
|
|
174
|
-
},
|
|
175
|
-
"attribute": "no-overflow-x",
|
|
176
|
-
"reflect": false,
|
|
177
|
-
"defaultValue": "false"
|
|
178
|
-
},
|
|
179
|
-
"noOverflowY": {
|
|
180
|
-
"type": "boolean",
|
|
181
|
-
"mutable": false,
|
|
182
|
-
"complexType": {
|
|
183
|
-
"original": "boolean",
|
|
184
|
-
"resolved": "boolean",
|
|
185
|
-
"references": {}
|
|
186
|
-
},
|
|
187
|
-
"required": false,
|
|
188
|
-
"optional": false,
|
|
189
|
-
"docs": {
|
|
190
|
-
"tags": [],
|
|
191
|
-
"text": "Flags to disable/enable overflowY."
|
|
192
|
-
},
|
|
193
|
-
"attribute": "no-overflow-y",
|
|
194
|
-
"reflect": false,
|
|
195
|
-
"defaultValue": "false"
|
|
196
|
-
},
|
|
197
|
-
"noOverscroll": {
|
|
198
|
-
"type": "boolean",
|
|
199
|
-
"mutable": false,
|
|
200
|
-
"complexType": {
|
|
201
|
-
"original": "boolean",
|
|
202
|
-
"resolved": "boolean",
|
|
203
|
-
"references": {}
|
|
204
|
-
},
|
|
205
|
-
"required": false,
|
|
206
|
-
"optional": false,
|
|
207
|
-
"docs": {
|
|
208
|
-
"tags": [],
|
|
209
|
-
"text": "Flag to disable/enable overscroll behavior."
|
|
210
|
-
},
|
|
211
|
-
"attribute": "no-overscroll",
|
|
212
|
-
"reflect": false,
|
|
213
|
-
"defaultValue": "false"
|
|
214
|
-
},
|
|
215
|
-
"noScrolledInit": {
|
|
216
|
-
"type": "boolean",
|
|
217
|
-
"mutable": false,
|
|
218
|
-
"complexType": {
|
|
219
|
-
"original": "boolean",
|
|
220
|
-
"resolved": "boolean",
|
|
221
|
-
"references": {}
|
|
222
|
-
},
|
|
223
|
-
"required": false,
|
|
224
|
-
"optional": false,
|
|
225
|
-
"docs": {
|
|
226
|
-
"tags": [],
|
|
227
|
-
"text": "Flag to not fire an initial event after content initialization."
|
|
228
|
-
},
|
|
229
|
-
"attribute": "no-scrolled-init",
|
|
230
|
-
"reflect": false,
|
|
231
|
-
"defaultValue": "false"
|
|
232
|
-
},
|
|
233
|
-
"scrolledBuffer": {
|
|
234
|
-
"type": "number",
|
|
235
|
-
"mutable": false,
|
|
236
|
-
"complexType": {
|
|
237
|
-
"original": "number",
|
|
238
|
-
"resolved": "number",
|
|
239
|
-
"references": {}
|
|
102
|
+
static get originalStyleUrls() {
|
|
103
|
+
return {
|
|
104
|
+
"$": ["cat-scrollable.scss"]
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
static get styleUrls() {
|
|
108
|
+
return {
|
|
109
|
+
"$": ["cat-scrollable.css"]
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
static get properties() {
|
|
113
|
+
return {
|
|
114
|
+
"noShadowX": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "boolean",
|
|
119
|
+
"resolved": "boolean",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": false,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": "Flags to disable/enable scroll shadowX."
|
|
127
|
+
},
|
|
128
|
+
"attribute": "no-shadow-x",
|
|
129
|
+
"reflect": false,
|
|
130
|
+
"defaultValue": "false"
|
|
240
131
|
},
|
|
241
|
-
"
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
"
|
|
245
|
-
|
|
132
|
+
"noShadowY": {
|
|
133
|
+
"type": "boolean",
|
|
134
|
+
"mutable": false,
|
|
135
|
+
"complexType": {
|
|
136
|
+
"original": "boolean",
|
|
137
|
+
"resolved": "boolean",
|
|
138
|
+
"references": {}
|
|
139
|
+
},
|
|
140
|
+
"required": false,
|
|
141
|
+
"optional": false,
|
|
142
|
+
"docs": {
|
|
143
|
+
"tags": [],
|
|
144
|
+
"text": "Flags to disable/enable scroll shadowY."
|
|
145
|
+
},
|
|
146
|
+
"attribute": "no-shadow-y",
|
|
147
|
+
"reflect": false,
|
|
148
|
+
"defaultValue": "false"
|
|
246
149
|
},
|
|
247
|
-
"
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
150
|
+
"noOverflowX": {
|
|
151
|
+
"type": "boolean",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "boolean",
|
|
155
|
+
"resolved": "boolean",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": "Flags to disable/enable overflowX."
|
|
163
|
+
},
|
|
164
|
+
"attribute": "no-overflow-x",
|
|
165
|
+
"reflect": false,
|
|
166
|
+
"defaultValue": "false"
|
|
261
167
|
},
|
|
262
|
-
"
|
|
263
|
-
"
|
|
264
|
-
"
|
|
265
|
-
"
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
168
|
+
"noOverflowY": {
|
|
169
|
+
"type": "boolean",
|
|
170
|
+
"mutable": false,
|
|
171
|
+
"complexType": {
|
|
172
|
+
"original": "boolean",
|
|
173
|
+
"resolved": "boolean",
|
|
174
|
+
"references": {}
|
|
175
|
+
},
|
|
176
|
+
"required": false,
|
|
177
|
+
"optional": false,
|
|
178
|
+
"docs": {
|
|
179
|
+
"tags": [],
|
|
180
|
+
"text": "Flags to disable/enable overflowY."
|
|
181
|
+
},
|
|
182
|
+
"attribute": "no-overflow-y",
|
|
183
|
+
"reflect": false,
|
|
184
|
+
"defaultValue": "false"
|
|
276
185
|
},
|
|
277
|
-
"
|
|
278
|
-
"
|
|
279
|
-
"
|
|
280
|
-
"
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
186
|
+
"noOverscroll": {
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"mutable": false,
|
|
189
|
+
"complexType": {
|
|
190
|
+
"original": "boolean",
|
|
191
|
+
"resolved": "boolean",
|
|
192
|
+
"references": {}
|
|
193
|
+
},
|
|
194
|
+
"required": false,
|
|
195
|
+
"optional": false,
|
|
196
|
+
"docs": {
|
|
197
|
+
"tags": [],
|
|
198
|
+
"text": "Flag to disable/enable overscroll behavior."
|
|
199
|
+
},
|
|
200
|
+
"attribute": "no-overscroll",
|
|
201
|
+
"reflect": false,
|
|
202
|
+
"defaultValue": "false"
|
|
291
203
|
},
|
|
292
|
-
"
|
|
293
|
-
"
|
|
294
|
-
"
|
|
295
|
-
"
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
204
|
+
"noScrolledInit": {
|
|
205
|
+
"type": "boolean",
|
|
206
|
+
"mutable": false,
|
|
207
|
+
"complexType": {
|
|
208
|
+
"original": "boolean",
|
|
209
|
+
"resolved": "boolean",
|
|
210
|
+
"references": {}
|
|
211
|
+
},
|
|
212
|
+
"required": false,
|
|
213
|
+
"optional": false,
|
|
214
|
+
"docs": {
|
|
215
|
+
"tags": [],
|
|
216
|
+
"text": "Flag to not fire an initial event after content initialization."
|
|
217
|
+
},
|
|
218
|
+
"attribute": "no-scrolled-init",
|
|
219
|
+
"reflect": false,
|
|
220
|
+
"defaultValue": "false"
|
|
306
221
|
},
|
|
307
|
-
"
|
|
308
|
-
"
|
|
309
|
-
"
|
|
310
|
-
"
|
|
222
|
+
"scrolledBuffer": {
|
|
223
|
+
"type": "number",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "number",
|
|
227
|
+
"resolved": "number",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Buffer to be used to calculate the scroll distance."
|
|
235
|
+
},
|
|
236
|
+
"attribute": "scrolled-buffer",
|
|
237
|
+
"reflect": false,
|
|
238
|
+
"defaultValue": "0"
|
|
311
239
|
}
|
|
312
|
-
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
static get events() {
|
|
243
|
+
return [{
|
|
244
|
+
"method": "scrolledTop",
|
|
245
|
+
"name": "scrolledTop",
|
|
246
|
+
"bubbles": true,
|
|
247
|
+
"cancelable": true,
|
|
248
|
+
"composed": true,
|
|
249
|
+
"docs": {
|
|
250
|
+
"tags": [],
|
|
251
|
+
"text": "Emitted when the content is fully scrolled to the top."
|
|
252
|
+
},
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "void",
|
|
255
|
+
"resolved": "void",
|
|
256
|
+
"references": {}
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
"method": "scrolledLeft",
|
|
260
|
+
"name": "scrolledLeft",
|
|
261
|
+
"bubbles": true,
|
|
262
|
+
"cancelable": true,
|
|
263
|
+
"composed": true,
|
|
264
|
+
"docs": {
|
|
265
|
+
"tags": [],
|
|
266
|
+
"text": "Emitted when the content is fully scrolled to the left."
|
|
267
|
+
},
|
|
268
|
+
"complexType": {
|
|
269
|
+
"original": "void",
|
|
270
|
+
"resolved": "void",
|
|
271
|
+
"references": {}
|
|
272
|
+
}
|
|
273
|
+
}, {
|
|
274
|
+
"method": "scrolledRight",
|
|
275
|
+
"name": "scrolledRight",
|
|
276
|
+
"bubbles": true,
|
|
277
|
+
"cancelable": true,
|
|
278
|
+
"composed": true,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": "Emitted when the content is fully scrolled to the right."
|
|
282
|
+
},
|
|
283
|
+
"complexType": {
|
|
284
|
+
"original": "void",
|
|
285
|
+
"resolved": "void",
|
|
286
|
+
"references": {}
|
|
287
|
+
}
|
|
288
|
+
}, {
|
|
289
|
+
"method": "scrolledBottom",
|
|
290
|
+
"name": "scrolledBottom",
|
|
291
|
+
"bubbles": true,
|
|
292
|
+
"cancelable": true,
|
|
293
|
+
"composed": true,
|
|
294
|
+
"docs": {
|
|
295
|
+
"tags": [],
|
|
296
|
+
"text": "Emitted when the content is fully scrolled to the bottom."
|
|
297
|
+
},
|
|
298
|
+
"complexType": {
|
|
299
|
+
"original": "void",
|
|
300
|
+
"resolved": "void",
|
|
301
|
+
"references": {}
|
|
302
|
+
}
|
|
303
|
+
}];
|
|
304
|
+
}
|
|
313
305
|
}
|
|
314
306
|
CatScrollable.THROTTLE = 50;
|
|
315
|
-
//# sourceMappingURL=cat-scrollable.js.map
|
|
307
|
+
//# sourceMappingURL=cat-scrollable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cat-scrollable.js","sourceRoot":"","sources":["../../../src/components/cat-scrollable/cat-scrollable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;GAEG;AAMH,MAAM,OAAO,aAAa;EAL1B;IASmB,SAAI,GAAG,IAAI,OAAO,EAAQ,CAAC;IAC3B,cAAS,GAAG,IAAI,OAAO,EAAQ,CAAC;IAChC,mBAAc,GAAG,IAAI,OAAO,EAAyB,CAAC;IACtD,oBAAe,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAGpG,8CAA8C;IAE9C,cAAS,GAAG,KAAK,CAAC;IAElB,8CAA8C;IAE9C,cAAS,GAAG,KAAK,CAAC;IAElB,yCAAyC;IAEzC,gBAAW,GAAG,KAAK,CAAC;IAEpB,yCAAyC;IAEzC,gBAAW,GAAG,KAAK,CAAC;IAEpB,kDAAkD;IAElD,iBAAY,GAAG,KAAK,CAAC;IAErB;;OAEG;IACK,mBAAc,GAAG,KAAK,CAAC;IAE/B;;OAEG;IACK,mBAAc,GAAG,CAAC,CAAC;GA+H5B;EAzGC,kBAAkB;IAChB,IAAI,IAAI,CAAC,aAAa,EAAE;MACtB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CA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AC,GAAG,CAAC,IAAI,CAAC,CAAC;KAChD;SAAM;MACL,MAAA,IAAI,CAAC,oBAAoB,0CAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACnD;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnKuB,sBAAQ,GAAG,EAAG,CAAA","sourcesContent":["import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { fromEvent, merge, Observable, Subject } from 'rxjs';\nimport { auditTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';\n\n/**\n * An element to display scrollable content.\n */\n@Component({\n tag: 'cat-scrollable',\n styleUrl: 'cat-scrollable.scss',\n shadow: true\n})\nexport class CatScrollable {\n private static readonly THROTTLE = 50;\n scrollElement?: HTMLElement;\n scrollWrapperElement?: HTMLElement;\n private readonly init = new Subject<void>();\n private readonly destroyed = new Subject<void>();\n private readonly resizedEntries = new Subject<ResizeObserverEntry[]>();\n private readonly resizedObserver = new ResizeObserver(entries => this.resizedEntries.next(entries));\n private scrolled!: Observable<Event>;\n\n /** Flags to disable/enable scroll shadowX. */\n @Prop()\n noShadowX = false;\n\n /** Flags to disable/enable scroll shadowY. */\n @Prop()\n noShadowY = false;\n\n /** Flags to disable/enable overflowX. */\n @Prop()\n noOverflowX = false;\n\n /** Flags to disable/enable overflowY. */\n @Prop()\n noOverflowY = false;\n\n /** Flag to disable/enable overscroll behavior. */\n @Prop()\n noOverscroll = false;\n\n /**\n * Flag to not fire an initial event after content initialization.\n */\n @Prop() noScrolledInit = false;\n\n /**\n * Buffer to be used to calculate the scroll distance.\n */\n @Prop() scrolledBuffer = 0;\n\n /**\n * Emitted when the content is fully scrolled to the top.\n */\n @Event() scrolledTop!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the left.\n */\n @Event() scrolledLeft!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the right.\n */\n @Event() scrolledRight!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the bottom.\n */\n @Event() scrolledBottom!: EventEmitter<void>;\n\n componentDidRender() {\n if (this.scrollElement) {\n this.scrolled = fromEvent(this.scrollElement, 'scroll').pipe(takeUntil(this.destroyed));\n this.resizedObserver.observe(this.scrollElement);\n }\n if (this.scrollWrapperElement) {\n this.resizedObserver.observe(this.scrollWrapperElement);\n }\n this.attachEmitter('left', this.scrolledLeft);\n this.attachEmitter('right', this.scrolledRight);\n this.attachEmitter('bottom', this.scrolledBottom);\n this.attachEmitter('top', this.scrolledTop);\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => ({\n top: this.getScrollOffset('top') > 0,\n left: this.getScrollOffset('left') > 0,\n right: this.getScrollOffset('right') > 0,\n bottom: this.getScrollOffset('bottom') > 0\n })),\n distinctUntilChanged(),\n takeUntil(this.destroyed)\n )\n .subscribe(({ top, left, right, bottom }) => {\n this.toggleClass('cat-scrollable-top', top);\n this.toggleClass('cat-scrollable-left', left);\n this.toggleClass('cat-scrollable-right', right);\n this.toggleClass('cat-scrollable-bottom', bottom);\n });\n }\n\n componentDidLoad() {\n if (!this.noScrolledInit) {\n this.init.next();\n }\n }\n\n disconnectedCallback() {\n this.init.complete();\n this.destroyed.next();\n this.destroyed.complete();\n this.resizedObserver.disconnect();\n }\n\n render() {\n return [\n <div class=\"scrollable-wrapper\" ref={el => (this.scrollWrapperElement = el)}>\n {!this.noShadowY && <div class=\"shadow-top\"></div>}\n {!this.noShadowX && <div class=\"shadow-left\"></div>}\n {!this.noShadowX && <div class=\"shadow-right\"></div>}\n {!this.noShadowY && <div class=\"shadow-bottom\"></div>}\n </div>,\n <div\n ref={el => (this.scrollElement = el)}\n class={{\n 'scrollable-content': true,\n 'scroll-x': !this.noOverflowX,\n 'scroll-y': !this.noOverflowY,\n 'no-overscroll': this.noOverscroll\n }}\n >\n <slot></slot>\n </div>\n ];\n }\n\n private attachEmitter(from: 'top' | 'left' | 'right' | 'bottom', emitter: EventEmitter<void>) {\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => this.getScrollOffset(from)),\n map(offset => offset <= this.scrolledBuffer),\n distinctUntilChanged(),\n filter(isLower => isLower),\n takeUntil(this.destroyed)\n )\n .subscribe(() => emitter.emit());\n }\n\n private getScrollOffset(from: 'top' | 'left' | 'right' | 'bottom') {\n if (this.scrollElement) {\n switch (from) {\n case 'top':\n return this.scrollElement.scrollTop;\n case 'left':\n return this.scrollElement.scrollLeft;\n case 'right':\n return this.scrollElement.scrollWidth - this.scrollElement.clientWidth - this.scrollElement.scrollLeft;\n case 'bottom':\n return this.scrollElement.scrollHeight - this.scrollElement.clientHeight - this.scrollElement.scrollTop;\n default:\n return 0;\n }\n }\n return 0;\n }\n\n private toggleClass(name: string, value: boolean) {\n if (value) {\n this.scrollWrapperElement?.classList.add(name);\n } else {\n this.scrollWrapperElement?.classList.remove(name);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cat-scrollable.js","sourceRoot":"","sources":["../../../src/components/cat-scrollable/cat-scrollable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAc,OAAO,EAAE,MAAM,MAAM,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;GAEG;AAMH,MAAM,OAAO,aAAa;;IAIP,SAAI,GAAG,IA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,KAAK,MAAM;UACT,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC;QACvC,KAAK,OAAO;UACV,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC;QACzG,KAAK,QAAQ;UACX,OAAO,IAAI,CAAC,aAAa,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;QAC1G;UACE,OAAO,CAAC,CAAC;OACZ;KACF;IACD,OAAO,CAAC,CAAC;EACX,CAAC;EAEO,WAAW,CAAC,IAAY,EAAE,KAAc;;IAC9C,IAAI,KAAK,EAAE;MACT,MAAA,IAAI,CAAC,oBAAoB,0CAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;KAChD;SAAM;MACL,MAAA,IAAI,CAAC,oBAAoB,0CAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACnD;EACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnKuB,sBAAQ,GAAG,EAAE,CAAC","sourcesContent":["import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { fromEvent, merge, Observable, Subject } from 'rxjs';\nimport { auditTime, distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators';\n\n/**\n * An element to display scrollable content.\n */\n@Component({\n tag: 'cat-scrollable',\n styleUrl: 'cat-scrollable.scss',\n shadow: true\n})\nexport class CatScrollable {\n private static readonly THROTTLE = 50;\n scrollElement?: HTMLElement;\n scrollWrapperElement?: HTMLElement;\n private readonly init = new Subject<void>();\n private readonly destroyed = new Subject<void>();\n private readonly resizedEntries = new Subject<ResizeObserverEntry[]>();\n private readonly resizedObserver = new ResizeObserver(entries => this.resizedEntries.next(entries));\n private scrolled!: Observable<Event>;\n\n /** Flags to disable/enable scroll shadowX. */\n @Prop()\n noShadowX = false;\n\n /** Flags to disable/enable scroll shadowY. */\n @Prop()\n noShadowY = false;\n\n /** Flags to disable/enable overflowX. */\n @Prop()\n noOverflowX = false;\n\n /** Flags to disable/enable overflowY. */\n @Prop()\n noOverflowY = false;\n\n /** Flag to disable/enable overscroll behavior. */\n @Prop()\n noOverscroll = false;\n\n /**\n * Flag to not fire an initial event after content initialization.\n */\n @Prop() noScrolledInit = false;\n\n /**\n * Buffer to be used to calculate the scroll distance.\n */\n @Prop() scrolledBuffer = 0;\n\n /**\n * Emitted when the content is fully scrolled to the top.\n */\n @Event() scrolledTop!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the left.\n */\n @Event() scrolledLeft!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the right.\n */\n @Event() scrolledRight!: EventEmitter<void>;\n\n /**\n * Emitted when the content is fully scrolled to the bottom.\n */\n @Event() scrolledBottom!: EventEmitter<void>;\n\n componentDidRender() {\n if (this.scrollElement) {\n this.scrolled = fromEvent(this.scrollElement, 'scroll').pipe(takeUntil(this.destroyed));\n this.resizedObserver.observe(this.scrollElement);\n }\n if (this.scrollWrapperElement) {\n this.resizedObserver.observe(this.scrollWrapperElement);\n }\n this.attachEmitter('left', this.scrolledLeft);\n this.attachEmitter('right', this.scrolledRight);\n this.attachEmitter('bottom', this.scrolledBottom);\n this.attachEmitter('top', this.scrolledTop);\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => ({\n top: this.getScrollOffset('top') > 0,\n left: this.getScrollOffset('left') > 0,\n right: this.getScrollOffset('right') > 0,\n bottom: this.getScrollOffset('bottom') > 0\n })),\n distinctUntilChanged(),\n takeUntil(this.destroyed)\n )\n .subscribe(({ top, left, right, bottom }) => {\n this.toggleClass('cat-scrollable-top', top);\n this.toggleClass('cat-scrollable-left', left);\n this.toggleClass('cat-scrollable-right', right);\n this.toggleClass('cat-scrollable-bottom', bottom);\n });\n }\n\n componentDidLoad() {\n if (!this.noScrolledInit) {\n this.init.next();\n }\n }\n\n disconnectedCallback() {\n this.init.complete();\n this.destroyed.next();\n this.destroyed.complete();\n this.resizedObserver.disconnect();\n }\n\n render() {\n return [\n <div class=\"scrollable-wrapper\" ref={el => (this.scrollWrapperElement = el)}>\n {!this.noShadowY && <div class=\"shadow-top\"></div>}\n {!this.noShadowX && <div class=\"shadow-left\"></div>}\n {!this.noShadowX && <div class=\"shadow-right\"></div>}\n {!this.noShadowY && <div class=\"shadow-bottom\"></div>}\n </div>,\n <div\n ref={el => (this.scrollElement = el)}\n class={{\n 'scrollable-content': true,\n 'scroll-x': !this.noOverflowX,\n 'scroll-y': !this.noOverflowY,\n 'no-overscroll': this.noOverscroll\n }}\n >\n <slot></slot>\n </div>\n ];\n }\n\n private attachEmitter(from: 'top' | 'left' | 'right' | 'bottom', emitter: EventEmitter<void>) {\n merge(this.init, this.scrolled, this.resizedEntries)\n .pipe(\n auditTime(CatScrollable.THROTTLE),\n map(() => this.getScrollOffset(from)),\n map(offset => offset <= this.scrolledBuffer),\n distinctUntilChanged(),\n filter(isLower => isLower),\n takeUntil(this.destroyed)\n )\n .subscribe(() => emitter.emit());\n }\n\n private getScrollOffset(from: 'top' | 'left' | 'right' | 'bottom') {\n if (this.scrollElement) {\n switch (from) {\n case 'top':\n return this.scrollElement.scrollTop;\n case 'left':\n return this.scrollElement.scrollLeft;\n case 'right':\n return this.scrollElement.scrollWidth - this.scrollElement.clientWidth - this.scrollElement.scrollLeft;\n case 'bottom':\n return this.scrollElement.scrollHeight - this.scrollElement.clientHeight - this.scrollElement.scrollTop;\n default:\n return 0;\n }\n }\n return 0;\n }\n\n private toggleClass(name: string, value: boolean) {\n if (value) {\n this.scrollWrapperElement?.classList.add(name);\n } else {\n this.scrollWrapperElement?.classList.remove(name);\n }\n }\n}\n"]}
|