@fluid-topics/ft-wc-utils 1.2.41 → 1.2.43
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.
|
@@ -2,7 +2,6 @@ import { configureStore, createSlice } from "@reduxjs/toolkit";
|
|
|
2
2
|
import { isFtReduxStore } from "./models";
|
|
3
3
|
import { FtCommandQueue } from "./FtCommandQueue";
|
|
4
4
|
import { WithEventBus } from "../events";
|
|
5
|
-
import { deepCopy } from "../helpers";
|
|
6
5
|
if (!window.ftReduxStores) {
|
|
7
6
|
window.ftReduxStores = {};
|
|
8
7
|
}
|
|
@@ -41,6 +40,7 @@ export class FtReduxStore extends WithEventBus {
|
|
|
41
40
|
this.reduxStore = reduxStore;
|
|
42
41
|
this.isFtReduxStore = true;
|
|
43
42
|
this.commands = new FtCommandQueue();
|
|
43
|
+
const deepCopy = (value) => value != null ? JSON.parse(JSON.stringify(value)) : value;
|
|
44
44
|
// Add proxy to automatically dispatch changes
|
|
45
45
|
this.actions = new Proxy(this.reduxSlice.actions, {
|
|
46
46
|
get: (actions, p, receiver) => {
|
|
@@ -79,7 +79,7 @@ export class FtReduxStore extends WithEventBus {
|
|
|
79
79
|
return this.reduxStore[Symbol.observable]();
|
|
80
80
|
}
|
|
81
81
|
getState() {
|
|
82
|
-
return
|
|
82
|
+
return this.reduxStore.getState();
|
|
83
83
|
}
|
|
84
84
|
replaceReducer(nextReducer) {
|
|
85
85
|
throw new Error("Not implemented yet.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-wc-utils",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.43",
|
|
4
4
|
"description": "Internal web components tools",
|
|
5
5
|
"author": "Fluid Topics <devtopics@antidot.net>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"mark.js": "8.11.1",
|
|
25
25
|
"moment": "2.29.4"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "889e013d70bd9b29542bd5ae16a574f3de6f1aac"
|
|
28
28
|
}
|