@studiometa/js-toolkit 2.0.0-beta.9 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Base/index.cjs +284 -0
- package/Base/index.d.ts +36 -28
- package/Base/index.js +113 -197
- package/Base/managers/ChildrenManager.cjs +146 -0
- package/Base/managers/ChildrenManager.d.ts +11 -3
- package/Base/managers/ChildrenManager.js +60 -59
- package/Base/managers/EventsManager.cjs +183 -0
- package/Base/managers/EventsManager.d.ts +13 -20
- package/Base/managers/EventsManager.js +72 -112
- package/Base/managers/OptionsManager.cjs +173 -0
- package/Base/managers/OptionsManager.d.ts +20 -13
- package/Base/managers/OptionsManager.js +60 -91
- package/Base/managers/RefsManager.cjs +99 -0
- package/Base/managers/RefsManager.d.ts +4 -4
- package/Base/managers/RefsManager.js +28 -38
- package/Base/managers/ServicesManager.cjs +134 -0
- package/Base/managers/ServicesManager.d.ts +14 -8
- package/Base/managers/ServicesManager.js +42 -67
- package/Base/utils.cjs +41 -0
- package/Base/utils.d.ts +4 -4
- package/Base/utils.js +12 -11
- package/decorators/index.cjs +45 -0
- package/decorators/index.d.ts +1 -0
- package/decorators/index.js +20 -8
- package/decorators/withBreakpointManager.cjs +84 -0
- package/decorators/withBreakpointManager.d.ts +2 -2
- package/decorators/withBreakpointManager.js +18 -40
- package/decorators/withBreakpointObserver.cjs +114 -0
- package/decorators/withBreakpointObserver.d.ts +1 -1
- package/decorators/withBreakpointObserver.js +45 -88
- package/decorators/withDrag.cjs +53 -0
- package/decorators/withDrag.d.ts +1 -1
- package/decorators/withDrag.js +24 -26
- package/decorators/withExtraConfig.cjs +43 -0
- package/decorators/withExtraConfig.d.ts +1 -1
- package/decorators/withExtraConfig.js +17 -12
- package/decorators/withFreezedOptions.cjs +37 -0
- package/decorators/withFreezedOptions.d.ts +14 -0
- package/decorators/withFreezedOptions.js +15 -0
- package/decorators/withIntersectionObserver.cjs +61 -0
- package/decorators/withIntersectionObserver.d.ts +1 -1
- package/decorators/withIntersectionObserver.js +29 -33
- package/decorators/withMountWhenInView.cjs +68 -0
- package/decorators/withMountWhenInView.d.ts +1 -1
- package/decorators/withMountWhenInView.js +31 -53
- package/decorators/withScrolledInView.cjs +114 -0
- package/decorators/withScrolledInView.d.ts +1 -1
- package/decorators/withScrolledInView.js +35 -39
- package/decorators/withVue2.cjs +61 -0
- package/decorators/withVue2.js +27 -32
- package/helpers/createApp.cjs +52 -0
- package/helpers/createApp.d.ts +3 -26
- package/helpers/createApp.js +12 -12
- package/helpers/getInstanceFromElement.cjs +32 -0
- package/helpers/getInstanceFromElement.d.ts +14 -0
- package/helpers/getInstanceFromElement.js +10 -0
- package/helpers/importOnInteraction.cjs +52 -0
- package/helpers/importOnInteraction.d.ts +3 -5
- package/helpers/importOnInteraction.js +17 -18
- package/helpers/importWhenIdle.cjs +49 -0
- package/helpers/importWhenIdle.d.ts +3 -5
- package/helpers/importWhenIdle.js +14 -17
- package/helpers/importWhenVisible.cjs +50 -0
- package/helpers/importWhenVisible.d.ts +4 -6
- package/helpers/importWhenVisible.js +16 -18
- package/helpers/index.cjs +37 -0
- package/helpers/index.d.ts +1 -0
- package/helpers/index.js +12 -4
- package/helpers/utils.cjs +35 -0
- package/helpers/utils.d.ts +3 -4
- package/helpers/utils.js +7 -6
- package/index.cjs +33 -0
- package/index.js +7 -4
- package/package.json +14 -4
- package/services/Service.cjs +76 -0
- package/services/Service.d.ts +9 -9
- package/services/Service.js +19 -32
- package/services/drag.cjs +212 -0
- package/services/drag.d.ts +3 -2
- package/services/drag.js +64 -69
- package/services/index.cjs +41 -0
- package/services/index.js +16 -7
- package/services/key.cjs +104 -0
- package/services/key.d.ts +1 -1
- package/services/key.js +28 -36
- package/services/load.cjs +72 -0
- package/services/load.d.ts +1 -1
- package/services/load.js +17 -19
- package/services/pointer.cjs +162 -0
- package/services/pointer.d.ts +1 -1
- package/services/pointer.js +43 -60
- package/services/raf.cjs +83 -0
- package/services/raf.d.ts +1 -1
- package/services/raf.js +20 -28
- package/services/resize.cjs +108 -0
- package/services/resize.d.ts +1 -1
- package/services/resize.js +33 -42
- package/services/scroll.cjs +131 -0
- package/services/scroll.d.ts +1 -1
- package/services/scroll.js +26 -35
- package/utils/collide/boundingRectToCircle.cjs +34 -0
- package/utils/collide/boundingRectToCircle.d.ts +6 -6
- package/utils/collide/boundingRectToCircle.js +7 -10
- package/utils/collide/collideCircleCircle.cjs +34 -0
- package/utils/collide/collideCircleCircle.d.ts +4 -4
- package/utils/collide/collideCircleCircle.js +8 -7
- package/utils/collide/collideCircleRect.cjs +46 -0
- package/utils/collide/collideCircleRect.d.ts +8 -8
- package/utils/collide/collideCircleRect.js +10 -12
- package/utils/collide/collidePointCircle.cjs +31 -0
- package/utils/collide/collidePointCircle.d.ts +6 -6
- package/utils/collide/collidePointCircle.js +8 -5
- package/utils/collide/collidePointRect.cjs +28 -0
- package/utils/collide/collidePointRect.d.ts +7 -7
- package/utils/collide/collidePointRect.js +5 -2
- package/utils/collide/collideRectRect.cjs +28 -0
- package/utils/collide/collideRectRect.d.ts +5 -5
- package/utils/collide/collideRectRect.js +5 -2
- package/utils/collide/index.cjs +39 -0
- package/utils/collide/index.js +14 -6
- package/utils/css/classes.cjs +47 -0
- package/utils/css/classes.d.ts +13 -12
- package/utils/css/classes.js +19 -15
- package/utils/css/index.cjs +38 -0
- package/utils/css/index.d.ts +2 -2
- package/utils/css/index.js +13 -6
- package/utils/css/matrix.cjs +30 -0
- package/utils/css/matrix.d.ts +14 -15
- package/utils/css/matrix.js +7 -5
- package/utils/css/styles.cjs +44 -0
- package/utils/css/styles.d.ts +8 -20
- package/utils/css/styles.js +12 -12
- package/utils/css/transition.cjs +120 -0
- package/utils/css/transition.d.ts +15 -9
- package/utils/css/transition.js +70 -119
- package/utils/debounce.cjs +34 -0
- package/utils/debounce.d.ts +4 -4
- package/utils/debounce.js +7 -9
- package/utils/focusTrap.cjs +82 -0
- package/utils/focusTrap.d.ts +1 -0
- package/utils/focusTrap.js +31 -22
- package/utils/history.cjs +89 -0
- package/utils/history.d.ts +13 -11
- package/utils/history.js +28 -57
- package/utils/index.cjs +54 -0
- package/utils/index.d.ts +4 -1
- package/utils/index.js +32 -11
- package/utils/keyCodes.cjs +35 -0
- package/utils/keyCodes.js +5 -2
- package/utils/math/clamp.cjs +28 -0
- package/utils/math/clamp.d.ts +1 -1
- package/utils/math/clamp.js +5 -2
- package/utils/math/clamp01.cjs +32 -0
- package/utils/math/clamp01.d.ts +1 -1
- package/utils/math/clamp01.js +6 -3
- package/utils/math/damp.cjs +28 -0
- package/utils/math/damp.d.ts +6 -6
- package/utils/math/damp.js +5 -4
- package/utils/math/ease.cjs +88 -0
- package/utils/math/ease.d.ts +7 -7
- package/utils/math/ease.js +50 -25
- package/utils/math/index.cjs +43 -0
- package/utils/math/index.js +17 -8
- package/utils/math/inertiaFinalValue.cjs +37 -0
- package/utils/math/inertiaFinalValue.d.ts +5 -5
- package/utils/math/inertiaFinalValue.js +8 -10
- package/utils/math/lerp.cjs +28 -0
- package/utils/math/lerp.d.ts +4 -4
- package/utils/math/lerp.js +5 -2
- package/utils/math/map.cjs +28 -0
- package/utils/math/map.d.ts +6 -6
- package/utils/math/map.js +5 -2
- package/utils/math/round.cjs +28 -0
- package/utils/math/round.d.ts +4 -4
- package/utils/math/round.js +5 -3
- package/utils/memoize.cjs +43 -0
- package/utils/memoize.d.ts +1 -1
- package/utils/memoize.js +10 -19
- package/utils/nextFrame.cjs +38 -0
- package/utils/nextFrame.d.ts +6 -6
- package/utils/nextFrame.js +13 -10
- package/utils/nextMicrotask.cjs +28 -0
- package/utils/nextMicrotask.d.ts +8 -0
- package/utils/nextMicrotask.js +6 -0
- package/utils/nextTick.cjs +30 -0
- package/utils/nextTick.d.ts +8 -0
- package/utils/nextTick.js +8 -0
- package/utils/object/autoBind.cjs +49 -0
- package/utils/object/autoBind.d.ts +3 -3
- package/utils/object/autoBind.js +12 -22
- package/utils/object/getAllProperties.cjs +37 -0
- package/utils/object/getAllProperties.d.ts +3 -3
- package/utils/object/getAllProperties.js +10 -13
- package/utils/object/index.cjs +33 -0
- package/utils/object/index.js +8 -3
- package/utils/object/isObject.cjs +28 -0
- package/utils/object/isObject.d.ts +1 -1
- package/utils/object/isObject.js +6 -3
- package/utils/scrollTo.cjs +80 -0
- package/utils/scrollTo.d.ts +1 -1
- package/utils/scrollTo.js +20 -40
- package/utils/string/index.cjs +47 -0
- package/utils/string/index.js +22 -10
- package/utils/string/withLeadingCharacters.cjs +32 -0
- package/utils/string/withLeadingCharacters.d.ts +3 -2
- package/utils/string/withLeadingCharacters.js +7 -4
- package/utils/string/withLeadingSlash.cjs +32 -0
- package/utils/string/withLeadingSlash.d.ts +1 -1
- package/utils/string/withLeadingSlash.js +7 -4
- package/utils/string/withTrailingCharacters.cjs +32 -0
- package/utils/string/withTrailingCharacters.d.ts +3 -2
- package/utils/string/withTrailingCharacters.js +7 -4
- package/utils/string/withTrailingSlash.cjs +32 -0
- package/utils/string/withTrailingSlash.d.ts +1 -1
- package/utils/string/withTrailingSlash.js +7 -4
- package/utils/string/withoutLeadingCharacters.cjs +28 -0
- package/utils/string/withoutLeadingCharacters.d.ts +3 -2
- package/utils/string/withoutLeadingCharacters.js +6 -3
- package/utils/string/withoutLeadingCharactersRecursive.cjs +37 -0
- package/utils/string/withoutLeadingCharactersRecursive.d.ts +3 -2
- package/utils/string/withoutLeadingCharactersRecursive.js +8 -7
- package/utils/string/withoutLeadingSlash.cjs +32 -0
- package/utils/string/withoutLeadingSlash.d.ts +1 -1
- package/utils/string/withoutLeadingSlash.js +7 -4
- package/utils/string/withoutTrailingCharacters.cjs +28 -0
- package/utils/string/withoutTrailingCharacters.d.ts +3 -2
- package/utils/string/withoutTrailingCharacters.js +6 -3
- package/utils/string/withoutTrailingCharactersRecursive.cjs +37 -0
- package/utils/string/withoutTrailingCharactersRecursive.d.ts +3 -2
- package/utils/string/withoutTrailingCharactersRecursive.js +8 -7
- package/utils/string/withoutTrailingSlash.cjs +32 -0
- package/utils/string/withoutTrailingSlash.d.ts +1 -1
- package/utils/string/withoutTrailingSlash.js +7 -4
- package/utils/throttle.cjs +36 -0
- package/utils/throttle.d.ts +3 -3
- package/utils/throttle.js +9 -9
- package/index.modern.js +0 -1
- package/index.umd.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import usePointer from
|
|
8
|
-
import useRaf from
|
|
9
|
-
import useResize from
|
|
10
|
-
import useScroll from
|
|
11
|
-
import useKey from
|
|
12
|
-
import useLoad from
|
|
13
|
-
import { hasMethod } from
|
|
14
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
import usePointer from "../../services/pointer.js";
|
|
8
|
+
import useRaf from "../../services/raf.js";
|
|
9
|
+
import useResize from "../../services/resize.js";
|
|
10
|
+
import useScroll from "../../services/scroll.js";
|
|
11
|
+
import useKey from "../../services/key.js";
|
|
12
|
+
import useLoad from "../../services/load.js";
|
|
13
|
+
import { hasMethod } from "../utils.js";
|
|
14
|
+
const SERVICES_MAP = {
|
|
15
15
|
scrolled: useScroll,
|
|
16
16
|
resized: useResize,
|
|
17
17
|
ticked: useRaf,
|
|
@@ -19,17 +19,11 @@ var SERVICES_MAP = {
|
|
|
19
19
|
keyed: useKey,
|
|
20
20
|
loaded: useLoad
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
get __services() {
|
|
25
|
-
return _objectSpread(_objectSpread({}, this.__customServices), SERVICES_MAP);
|
|
26
|
-
}
|
|
27
|
-
|
|
22
|
+
const SERVICE_NAMES = Object.keys(SERVICES_MAP);
|
|
23
|
+
class ServicesManager {
|
|
28
24
|
constructor(instance) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
_defineProperty(this, "__customServices", {});
|
|
32
|
-
|
|
25
|
+
__publicField(this, "__base");
|
|
26
|
+
__publicField(this, "__customServices", {});
|
|
33
27
|
Object.defineProperties(this, {
|
|
34
28
|
__base: {
|
|
35
29
|
enumerable: false,
|
|
@@ -38,74 +32,58 @@ export default class ServicesManager {
|
|
|
38
32
|
}
|
|
39
33
|
});
|
|
40
34
|
}
|
|
41
|
-
|
|
35
|
+
get __services() {
|
|
36
|
+
return {
|
|
37
|
+
...this.__customServices,
|
|
38
|
+
...SERVICES_MAP
|
|
39
|
+
};
|
|
40
|
+
}
|
|
42
41
|
has(service) {
|
|
43
42
|
if (!((hasMethod(this.__base, service) || this.__base.__hasEvent(service)) && this.__services[service])) {
|
|
44
43
|
return false;
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
var {
|
|
48
|
-
has
|
|
49
|
-
} = this.__services[service]();
|
|
50
|
-
|
|
45
|
+
const { has } = this.__services[service]();
|
|
51
46
|
return has(this.__base.$id);
|
|
52
47
|
}
|
|
53
|
-
|
|
48
|
+
get(service) {
|
|
49
|
+
return this.__services[service]().props();
|
|
50
|
+
}
|
|
54
51
|
enable(service) {
|
|
55
52
|
if (this.has(service)) {
|
|
56
53
|
return this.disable.bind(this, service);
|
|
57
54
|
}
|
|
58
|
-
|
|
59
55
|
if (!(hasMethod(this.__base, service) || this.__base.__hasEvent(service)) || !this.__services[service]) {
|
|
60
|
-
return function noop() {
|
|
56
|
+
return function noop() {
|
|
57
|
+
};
|
|
61
58
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} = this.__services[service]();
|
|
66
|
-
|
|
67
|
-
var self = this;
|
|
68
|
-
|
|
69
|
-
function serviceHandler() {
|
|
70
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
71
|
-
args[_key] = arguments[_key];
|
|
72
|
-
}
|
|
73
|
-
|
|
59
|
+
const { add } = this.__services[service]();
|
|
60
|
+
const self = this;
|
|
61
|
+
function serviceHandler(...args) {
|
|
74
62
|
self.__base.__callMethod(service, ...args);
|
|
75
63
|
}
|
|
76
|
-
|
|
77
64
|
add(this.__base.$id, serviceHandler);
|
|
78
65
|
return this.disable.bind(this, service);
|
|
79
66
|
}
|
|
80
|
-
|
|
81
67
|
enableAll() {
|
|
82
|
-
return Object.keys(this.__services).map(serviceName => this.enable(serviceName));
|
|
68
|
+
return Object.keys(this.__services).map((serviceName) => this.enable(serviceName));
|
|
83
69
|
}
|
|
84
|
-
|
|
85
70
|
disableAll() {
|
|
86
|
-
Object.keys(this.__services).forEach(serviceName => {
|
|
71
|
+
Object.keys(this.__services).forEach((serviceName) => {
|
|
87
72
|
this.disable(serviceName);
|
|
88
73
|
});
|
|
89
74
|
}
|
|
90
|
-
|
|
91
75
|
disable(service) {
|
|
92
76
|
if (!this.__services[service]) {
|
|
93
77
|
return;
|
|
94
78
|
}
|
|
95
|
-
|
|
96
|
-
var {
|
|
97
|
-
remove
|
|
98
|
-
} = this.__services[service]();
|
|
99
|
-
|
|
79
|
+
const { remove } = this.__services[service]();
|
|
100
80
|
remove(this.__base.$id);
|
|
101
81
|
}
|
|
102
|
-
|
|
103
82
|
toggle(service, force) {
|
|
104
|
-
if (typeof force !==
|
|
83
|
+
if (typeof force !== "undefined") {
|
|
105
84
|
if (force && !this.has(service)) {
|
|
106
85
|
this.enable(service);
|
|
107
86
|
}
|
|
108
|
-
|
|
109
87
|
if (!force && this.has(service)) {
|
|
110
88
|
this.disable(service);
|
|
111
89
|
}
|
|
@@ -115,21 +93,18 @@ export default class ServicesManager {
|
|
|
115
93
|
this.enable(service);
|
|
116
94
|
}
|
|
117
95
|
}
|
|
118
|
-
|
|
119
96
|
register(name, useFunction) {
|
|
120
97
|
this.__customServices[name] = useFunction;
|
|
121
|
-
|
|
122
98
|
this.__base.__addEmits(name);
|
|
123
99
|
}
|
|
124
|
-
|
|
125
100
|
unregister(name) {
|
|
126
101
|
if (SERVICE_NAMES.includes(name)) {
|
|
127
|
-
throw new Error(
|
|
102
|
+
throw new Error(`[ServicesManager] The \`${name}\` core service can not be unregistered.`);
|
|
128
103
|
}
|
|
129
|
-
|
|
130
104
|
this.__base.__removeEmits(name);
|
|
131
|
-
|
|
132
105
|
delete this.__customServices[name];
|
|
133
106
|
}
|
|
134
|
-
|
|
135
|
-
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
ServicesManager as default
|
|
110
|
+
};
|
package/Base/utils.cjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// packages/js-toolkit/Base/utils.js
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
getComponentElements: () => getComponentElements,
|
|
23
|
+
hasMethod: () => hasMethod
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(utils_exports);
|
|
26
|
+
function hasMethod(obj, name) {
|
|
27
|
+
return typeof obj[name] === "function";
|
|
28
|
+
}
|
|
29
|
+
function getComponentElements(nameOrSelector, element = document) {
|
|
30
|
+
const selector = `[data-component="${nameOrSelector}"]`;
|
|
31
|
+
let elements = [];
|
|
32
|
+
try {
|
|
33
|
+
elements = Array.from(element.querySelectorAll(selector));
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
if (elements.length === 0) {
|
|
37
|
+
elements = Array.from(element.querySelectorAll(nameOrSelector));
|
|
38
|
+
}
|
|
39
|
+
return elements;
|
|
40
|
+
}
|
|
41
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/Base/utils.d.ts
CHANGED
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
* Test if an object has a method.
|
|
6
6
|
*
|
|
7
7
|
* @param {Object} obj The object to test
|
|
8
|
-
* @param {
|
|
9
|
-
* @
|
|
8
|
+
* @param {string} name The method's name
|
|
9
|
+
* @returns {boolean}
|
|
10
10
|
*/
|
|
11
11
|
export function hasMethod(obj: any, name: string): boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Get a list of elements based on the name of a component.
|
|
14
14
|
*
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {string} nameOrSelector
|
|
16
16
|
* The name or selector to used for this component.
|
|
17
17
|
* @param {HTMLElement|Document} element
|
|
18
18
|
* The root element on which to query the selector, defaults to `document`.
|
|
19
|
-
* @
|
|
19
|
+
* @returns {Array<HTMLElement>}
|
|
20
20
|
* A list of elements on which the component should be mounted.
|
|
21
21
|
*/
|
|
22
22
|
export function getComponentElements(nameOrSelector: string, element?: HTMLElement | Document): Array<HTMLElement>;
|
package/Base/utils.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
return typeof obj[name] ===
|
|
1
|
+
function hasMethod(obj, name) {
|
|
2
|
+
return typeof obj[name] === "function";
|
|
3
3
|
}
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var elements = [];
|
|
8
|
-
|
|
4
|
+
function getComponentElements(nameOrSelector, element = document) {
|
|
5
|
+
const selector = `[data-component="${nameOrSelector}"]`;
|
|
6
|
+
let elements = [];
|
|
9
7
|
try {
|
|
10
8
|
elements = Array.from(element.querySelectorAll(selector));
|
|
11
|
-
} catch
|
|
12
|
-
|
|
9
|
+
} catch {
|
|
10
|
+
}
|
|
13
11
|
if (elements.length === 0) {
|
|
14
12
|
elements = Array.from(element.querySelectorAll(nameOrSelector));
|
|
15
13
|
}
|
|
16
|
-
|
|
17
14
|
return elements;
|
|
18
|
-
}
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
getComponentElements,
|
|
18
|
+
hasMethod
|
|
19
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// packages/js-toolkit/decorators/index.js
|
|
23
|
+
var decorators_exports = {};
|
|
24
|
+
__export(decorators_exports, {
|
|
25
|
+
withBreakpointManager: () => import_withBreakpointManager.default,
|
|
26
|
+
withBreakpointObserver: () => import_withBreakpointObserver.default,
|
|
27
|
+
withDrag: () => import_withDrag.default,
|
|
28
|
+
withExtraConfig: () => import_withExtraConfig.default,
|
|
29
|
+
withFreezedOptions: () => import_withFreezedOptions.default,
|
|
30
|
+
withIntersectionObserver: () => import_withIntersectionObserver.default,
|
|
31
|
+
withMountWhenInView: () => import_withMountWhenInView.default,
|
|
32
|
+
withScrolledInView: () => import_withScrolledInView.default,
|
|
33
|
+
withVue2: () => import_withVue2.default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(decorators_exports);
|
|
36
|
+
var import_withBreakpointManager = __toESM(require("./withBreakpointManager.cjs"), 1);
|
|
37
|
+
var import_withBreakpointObserver = __toESM(require("./withBreakpointObserver.cjs"), 1);
|
|
38
|
+
var import_withDrag = __toESM(require("./withDrag.cjs"), 1);
|
|
39
|
+
var import_withExtraConfig = __toESM(require("./withExtraConfig.cjs"), 1);
|
|
40
|
+
var import_withFreezedOptions = __toESM(require("./withFreezedOptions.cjs"), 1);
|
|
41
|
+
var import_withIntersectionObserver = __toESM(require("./withIntersectionObserver.cjs"), 1);
|
|
42
|
+
var import_withMountWhenInView = __toESM(require("./withMountWhenInView.cjs"), 1);
|
|
43
|
+
var import_withScrolledInView = __toESM(require("./withScrolledInView.cjs"), 1);
|
|
44
|
+
var import_withVue2 = __toESM(require("./withVue2.cjs"), 1);
|
|
45
|
+
if (module.exports.default) module.exports = module.exports.default;
|
package/decorators/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as withBreakpointManager } from "./withBreakpointManager.js";
|
|
|
2
2
|
export { default as withBreakpointObserver } from "./withBreakpointObserver.js";
|
|
3
3
|
export { default as withDrag } from "./withDrag.js";
|
|
4
4
|
export { default as withExtraConfig } from "./withExtraConfig.js";
|
|
5
|
+
export { default as withFreezedOptions } from "./withFreezedOptions.js";
|
|
5
6
|
export { default as withIntersectionObserver } from "./withIntersectionObserver.js";
|
|
6
7
|
export { default as withMountWhenInView } from "./withMountWhenInView.js";
|
|
7
8
|
export { default as withScrolledInView } from "./withScrolledInView.js";
|
package/decorators/index.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { default as default2 } from "./withBreakpointManager.js";
|
|
2
|
+
import { default as default3 } from "./withBreakpointObserver.js";
|
|
3
|
+
import { default as default4 } from "./withDrag.js";
|
|
4
|
+
import { default as default5 } from "./withExtraConfig.js";
|
|
5
|
+
import { default as default6 } from "./withFreezedOptions.js";
|
|
6
|
+
import { default as default7 } from "./withIntersectionObserver.js";
|
|
7
|
+
import { default as default8 } from "./withMountWhenInView.js";
|
|
8
|
+
import { default as default9 } from "./withScrolledInView.js";
|
|
9
|
+
import { default as default10 } from "./withVue2.js";
|
|
10
|
+
export {
|
|
11
|
+
default2 as withBreakpointManager,
|
|
12
|
+
default3 as withBreakpointObserver,
|
|
13
|
+
default4 as withDrag,
|
|
14
|
+
default5 as withExtraConfig,
|
|
15
|
+
default6 as withFreezedOptions,
|
|
16
|
+
default7 as withIntersectionObserver,
|
|
17
|
+
default8 as withMountWhenInView,
|
|
18
|
+
default9 as withScrolledInView,
|
|
19
|
+
default10 as withVue2
|
|
20
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// packages/js-toolkit/decorators/withBreakpointManager.js
|
|
23
|
+
var withBreakpointManager_exports = {};
|
|
24
|
+
__export(withBreakpointManager_exports, {
|
|
25
|
+
default: () => withBreakpointManager
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(withBreakpointManager_exports);
|
|
28
|
+
var import_resize = __toESM(require("../services/resize.cjs"), 1);
|
|
29
|
+
function testBreakpoints(breakpoints) {
|
|
30
|
+
const { breakpoint } = (0, import_resize.default)().props();
|
|
31
|
+
breakpoints.forEach(([breakpointKeys, instance]) => {
|
|
32
|
+
if (breakpointKeys.includes(breakpoint) && !instance.$isMounted) {
|
|
33
|
+
setTimeout(() => instance.$mount(), 0);
|
|
34
|
+
} else if (!breakpointKeys.includes(breakpoint) && instance.$isMounted) {
|
|
35
|
+
instance.$destroy();
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function mountComponents(instance, breakpoints) {
|
|
40
|
+
return breakpoints.map(([bk, ComponentClass]) => {
|
|
41
|
+
const child = new ComponentClass(instance.$el);
|
|
42
|
+
Object.defineProperty(child, "$parent", { get: () => instance.$parent });
|
|
43
|
+
return [bk, child];
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
var instances = /* @__PURE__ */ new WeakMap();
|
|
47
|
+
function withBreakpointManager(BaseClass, breakpoints) {
|
|
48
|
+
if (!Array.isArray(breakpoints)) {
|
|
49
|
+
throw new Error("[withBreakpointManager] The `breakpoints` parameter must be an array.");
|
|
50
|
+
}
|
|
51
|
+
if (breakpoints.length < 2) {
|
|
52
|
+
throw new Error("[withBreakpointManager] You must define at least 2 breakpoints.");
|
|
53
|
+
}
|
|
54
|
+
const { add, props } = (0, import_resize.default)();
|
|
55
|
+
if (!props().breakpoint) {
|
|
56
|
+
throw new Error(`The \`BreakpointManager\` class requires breakpoints to be defined.`);
|
|
57
|
+
}
|
|
58
|
+
return class extends BaseClass {
|
|
59
|
+
constructor(element) {
|
|
60
|
+
super(element);
|
|
61
|
+
if (!instances.has(this)) {
|
|
62
|
+
instances.set(this, mountComponents(this, breakpoints));
|
|
63
|
+
}
|
|
64
|
+
add(`BreakpointManager-${this.$id}`, () => {
|
|
65
|
+
testBreakpoints(instances.get(this));
|
|
66
|
+
});
|
|
67
|
+
this.instances = instances.get(this);
|
|
68
|
+
}
|
|
69
|
+
$mount() {
|
|
70
|
+
super.$mount();
|
|
71
|
+
testBreakpoints(instances.get(this));
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
$destroy() {
|
|
75
|
+
if (Array.isArray(instances.get(this))) {
|
|
76
|
+
instances.get(this).forEach(([, instance]) => {
|
|
77
|
+
instance.$destroy();
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return super.$destroy();
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (module.exports.default) module.exports = module.exports.default;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* BreakpointManager class.
|
|
3
3
|
* @template {BaseConstructor} T
|
|
4
4
|
* @param {T} BaseClass
|
|
5
|
-
* @param {Array<[
|
|
6
|
-
* @
|
|
5
|
+
* @param {Array<[string, BaseConstructor]>} breakpoints
|
|
6
|
+
* @returns {T}
|
|
7
7
|
*/
|
|
8
8
|
export default function withBreakpointManager<T extends typeof import("../Base").default>(BaseClass: T, breakpoints: Array<[string, BaseConstructor]>): T;
|
|
9
9
|
export type Base = import('../Base').default;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import useResize from
|
|
2
|
-
|
|
1
|
+
import useResize from "../services/resize.js";
|
|
3
2
|
function testBreakpoints(breakpoints) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} = useResize().props();
|
|
7
|
-
breakpoints.forEach(_ref => {
|
|
8
|
-
var [breakpointKeys, instance] = _ref;
|
|
9
|
-
|
|
3
|
+
const { breakpoint } = useResize().props();
|
|
4
|
+
breakpoints.forEach(([breakpointKeys, instance]) => {
|
|
10
5
|
if (breakpointKeys.includes(breakpoint) && !instance.$isMounted) {
|
|
11
6
|
setTimeout(() => instance.$mount(), 0);
|
|
12
7
|
} else if (!breakpointKeys.includes(breakpoint) && instance.$isMounted) {
|
|
@@ -14,68 +9,51 @@ function testBreakpoints(breakpoints) {
|
|
|
14
9
|
}
|
|
15
10
|
});
|
|
16
11
|
}
|
|
17
|
-
|
|
18
12
|
function mountComponents(instance, breakpoints) {
|
|
19
|
-
return breakpoints.map(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Object.defineProperty(child, '$parent', {
|
|
23
|
-
get: () => instance.$parent
|
|
24
|
-
});
|
|
13
|
+
return breakpoints.map(([bk, ComponentClass]) => {
|
|
14
|
+
const child = new ComponentClass(instance.$el);
|
|
15
|
+
Object.defineProperty(child, "$parent", { get: () => instance.$parent });
|
|
25
16
|
return [bk, child];
|
|
26
17
|
});
|
|
27
18
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export default function withBreakpointManager(BaseClass, breakpoints) {
|
|
19
|
+
const instances = /* @__PURE__ */ new WeakMap();
|
|
20
|
+
function withBreakpointManager(BaseClass, breakpoints) {
|
|
31
21
|
if (!Array.isArray(breakpoints)) {
|
|
32
|
-
throw new Error(
|
|
22
|
+
throw new Error("[withBreakpointManager] The `breakpoints` parameter must be an array.");
|
|
33
23
|
}
|
|
34
|
-
|
|
35
24
|
if (breakpoints.length < 2) {
|
|
36
|
-
throw new Error(
|
|
25
|
+
throw new Error("[withBreakpointManager] You must define at least 2 breakpoints.");
|
|
37
26
|
}
|
|
38
|
-
|
|
39
|
-
var {
|
|
40
|
-
add,
|
|
41
|
-
props
|
|
42
|
-
} = useResize();
|
|
43
|
-
|
|
27
|
+
const { add, props } = useResize();
|
|
44
28
|
if (!props().breakpoint) {
|
|
45
|
-
throw new Error(
|
|
29
|
+
throw new Error(`The \`BreakpointManager\` class requires breakpoints to be defined.`);
|
|
46
30
|
}
|
|
47
|
-
|
|
48
31
|
return class extends BaseClass {
|
|
49
32
|
constructor(element) {
|
|
50
33
|
super(element);
|
|
51
|
-
|
|
52
34
|
if (!instances.has(this)) {
|
|
53
35
|
instances.set(this, mountComponents(this, breakpoints));
|
|
54
36
|
}
|
|
55
|
-
|
|
56
|
-
add("BreakpointManager-".concat(this.$id), () => {
|
|
37
|
+
add(`BreakpointManager-${this.$id}`, () => {
|
|
57
38
|
testBreakpoints(instances.get(this));
|
|
58
39
|
});
|
|
59
40
|
this.instances = instances.get(this);
|
|
60
|
-
return this;
|
|
61
41
|
}
|
|
62
|
-
|
|
63
42
|
$mount() {
|
|
64
43
|
super.$mount();
|
|
65
44
|
testBreakpoints(instances.get(this));
|
|
66
45
|
return this;
|
|
67
46
|
}
|
|
68
|
-
|
|
69
47
|
$destroy() {
|
|
70
48
|
if (Array.isArray(instances.get(this))) {
|
|
71
|
-
instances.get(this).forEach(
|
|
72
|
-
var [, instance] = _ref3;
|
|
49
|
+
instances.get(this).forEach(([, instance]) => {
|
|
73
50
|
instance.$destroy();
|
|
74
51
|
});
|
|
75
52
|
}
|
|
76
|
-
|
|
77
53
|
return super.$destroy();
|
|
78
54
|
}
|
|
79
|
-
|
|
80
55
|
};
|
|
81
|
-
}
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
withBreakpointManager as default
|
|
59
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var __publicField = (obj, key, value) => {
|
|
23
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
24
|
+
return value;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// packages/js-toolkit/decorators/withBreakpointObserver.js
|
|
28
|
+
var withBreakpointObserver_exports = {};
|
|
29
|
+
__export(withBreakpointObserver_exports, {
|
|
30
|
+
default: () => withBreakpointObserver
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(withBreakpointObserver_exports);
|
|
33
|
+
var import_resize = __toESM(require("../services/resize.cjs"), 1);
|
|
34
|
+
function testBreakpoints(instance, breakpoint = (0, import_resize.default)().props().breakpoint) {
|
|
35
|
+
const { activeBreakpoints, inactiveBreakpoints } = instance.$options;
|
|
36
|
+
const isInActiveBreakpoint = activeBreakpoints && activeBreakpoints.split(" ").includes(breakpoint);
|
|
37
|
+
const isInInactiveBreakpoint = inactiveBreakpoints && inactiveBreakpoints.split(" ").includes(breakpoint);
|
|
38
|
+
if (activeBreakpoints && isInActiveBreakpoint || inactiveBreakpoints && !isInInactiveBreakpoint) {
|
|
39
|
+
return "$mount";
|
|
40
|
+
}
|
|
41
|
+
return "$destroy";
|
|
42
|
+
}
|
|
43
|
+
function hasBreakpointConfiguration(instance) {
|
|
44
|
+
const { activeBreakpoints, inactiveBreakpoints } = instance.$options;
|
|
45
|
+
return Boolean(activeBreakpoints || inactiveBreakpoints);
|
|
46
|
+
}
|
|
47
|
+
function testConflictingBreakpointConfiguration(instance) {
|
|
48
|
+
const { activeBreakpoints, inactiveBreakpoints, name } = instance.$options;
|
|
49
|
+
if (activeBreakpoints && inactiveBreakpoints) {
|
|
50
|
+
throw new Error(`[${name}] Incorrect configuration: the \`activeBreakpoints\` and \`inactiveBreakpoints\` are not compatible.`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function addToResize(key, instance) {
|
|
54
|
+
testConflictingBreakpointConfiguration(instance);
|
|
55
|
+
const { add, has } = (0, import_resize.default)();
|
|
56
|
+
if (!has(key)) {
|
|
57
|
+
add(key, function onResize({ breakpoint }) {
|
|
58
|
+
const action = testBreakpoints(instance, breakpoint);
|
|
59
|
+
if (action === "$destroy" && instance.$isMounted) {
|
|
60
|
+
instance[action]();
|
|
61
|
+
} else if (action === "$mount" && !instance.$isMounted) {
|
|
62
|
+
setTimeout(() => instance[action](), 0);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function withBreakpointObserver(BaseClass) {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
return _b = class extends BaseClass {
|
|
70
|
+
constructor(element) {
|
|
71
|
+
super(element);
|
|
72
|
+
const { remove, props } = (0, import_resize.default)();
|
|
73
|
+
const { name } = this.$options;
|
|
74
|
+
if (!props().breakpoint) {
|
|
75
|
+
throw new Error(`[${name}] The \`BreakpointObserver\` class requires breakpoints to be defined.`);
|
|
76
|
+
}
|
|
77
|
+
const key = `BreakpointObserver-${this.$id}`;
|
|
78
|
+
const mutationObserver = new MutationObserver(([mutation]) => {
|
|
79
|
+
if (mutation.type === "attributes" && (mutation.attributeName === "data-options" || mutation.attributeName.startsWith("data-option-"))) {
|
|
80
|
+
if (!hasBreakpointConfiguration(this)) {
|
|
81
|
+
this.$mount();
|
|
82
|
+
remove(key);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
addToResize(key, this);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
mutationObserver.observe(this.$el, { attributes: true });
|
|
89
|
+
if (!hasBreakpointConfiguration(this)) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
addToResize(key, this);
|
|
93
|
+
}
|
|
94
|
+
$mount() {
|
|
95
|
+
if (!hasBreakpointConfiguration(this)) {
|
|
96
|
+
return super.$mount();
|
|
97
|
+
}
|
|
98
|
+
const action = testBreakpoints(this);
|
|
99
|
+
if (action === "$mount") {
|
|
100
|
+
return super.$mount();
|
|
101
|
+
}
|
|
102
|
+
return this;
|
|
103
|
+
}
|
|
104
|
+
}, __publicField(_b, "config", {
|
|
105
|
+
...BaseClass.config,
|
|
106
|
+
name: `${BaseClass.config.name}WithBreakpointObserver`,
|
|
107
|
+
options: {
|
|
108
|
+
...((_a = BaseClass.config) == null ? void 0 : _a.options) || {},
|
|
109
|
+
activeBreakpoints: String,
|
|
110
|
+
inactiveBreakpoints: String
|
|
111
|
+
}
|
|
112
|
+
}), _b;
|
|
113
|
+
}
|
|
114
|
+
if (module.exports.default) module.exports = module.exports.default;
|