@legalplace/wizardx-core 4.42.10-nightly.20251126173447 → 4.42.10-nightly.20251126174025
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/PluginLoader.js
CHANGED
|
@@ -142,6 +142,7 @@ export const getPluginsStoreSagas = () => pluginsStoreSagas;
|
|
|
142
142
|
export function RunActionAnchor(anchor, ...args) {
|
|
143
143
|
if (Object.prototype.hasOwnProperty.call(reduxAnchors, anchor) &&
|
|
144
144
|
reduxAnchors[anchor].length > 0) {
|
|
145
|
+
console.log("RunActionAnchor", anchor, args);
|
|
145
146
|
reduxAnchors[anchor].forEach((currentFn) => {
|
|
146
147
|
currentFn.call(null, ...args);
|
|
147
148
|
});
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { RunActionAnchor, RunOverrideActionAnchor } from "../../PluginLoader";
|
|
2
2
|
const pluginsHookMiddleware = (mpi) => (next) => (action) => {
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const previousState = mpi.getState();
|
|
4
|
+
const overridenAction = RunOverrideActionAnchor(action);
|
|
5
|
+
const nextResult = next(overridenAction);
|
|
6
|
+
const nextState = mpi.getState();
|
|
7
|
+
RunActionAnchor(action.type, previousState, nextState);
|
|
8
|
+
return nextResult;
|
|
7
9
|
};
|
|
8
10
|
export default pluginsHookMiddleware;
|