@ea-lab/reactive-json 0.0.18 → 0.0.19
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.
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Merges component collections (aka plugins).
|
|
3
3
|
* @param {[{}]} collections Array of plugin collections.
|
|
4
|
-
* @return {{hook:
|
|
4
|
+
* @return {{hook: {}, reaction: {}, action: {}, utility: {}, element: {}}}
|
|
5
5
|
*/
|
|
6
6
|
export function mergeComponentCollections(collections) {
|
|
7
7
|
const mergedCollections = {
|
|
8
|
-
"action":
|
|
9
|
-
"element":
|
|
10
|
-
"hook":
|
|
11
|
-
"reaction":
|
|
12
|
-
"utility":
|
|
8
|
+
"action": {},
|
|
9
|
+
"element": {},
|
|
10
|
+
"hook": {},
|
|
11
|
+
"reaction": {},
|
|
12
|
+
"utility": {},
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
collections.forEach((collection) => {
|
|
@@ -18,7 +18,9 @@ export function mergeComponentCollections(collections) {
|
|
|
18
18
|
mergedCollections[k] = [];
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
for (const [componentName, Component] of Object.entries(v)) {
|
|
22
|
+
mergedCollections[componentName] = Component;
|
|
23
|
+
}
|
|
22
24
|
}
|
|
23
25
|
});
|
|
24
26
|
|