@legalplace/wizardx-core 4.42.10-nightly.20251125154431 → 4.42.10-nightly.20251125160107
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/App.js +1 -1
- package/dist/PluginLoader.d.ts +1 -1
- package/dist/PluginLoader.js +11 -1
- package/package.json +1 -2
package/dist/App.js
CHANGED
|
@@ -77,7 +77,7 @@ class WizardXCore extends React.Component {
|
|
|
77
77
|
getStore().dispatch(resetStateAction());
|
|
78
78
|
}
|
|
79
79
|
render() {
|
|
80
|
-
return (
|
|
80
|
+
return (_jsxs(Provider, { store: getStore(), children: [_jsx("h1", { children: "IAM APP" }), _jsx(ConnectedRouter, { history: getHistory(), children: _jsxs(Switch, { children: [_jsx(Route, { path: "/p/:path", component: PluginRoute }), _jsx(Route, { path: getConfig().router.smartscriptPath, exact: true, strict: true, component: SmartScriptComponent }), _jsx(Route, { path: getConfig().router.wizardInstancePath, component: ViewComponent }), _jsx(Route, { path: getConfig().router.wizardPath, component: ViewComponent }), !window.location.href.includes("smartscript") && (_jsx(Route, { component: RedirectHandler }))] }) })] }));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
export default WizardXCore;
|
package/dist/PluginLoader.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type ReplaceFragmentPropsType = {
|
|
|
18
18
|
};
|
|
19
19
|
export declare const ReplaceFragment: ({ replacerName, fragmentName, children, }: ReplaceFragmentPropsType) => import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export declare function registerReplacer(replacerName: string, Replacer: ReactComponent<any>): void;
|
|
21
|
-
export declare function loadPlugins(plugins
|
|
21
|
+
export declare function loadPlugins(plugins?: Record<string, () => Promise<IPlugin>>): Promise<any>;
|
|
22
22
|
export declare function getPluginsReducers(): Record<string, Reducer<Record<string, any>, any>>;
|
|
23
23
|
export declare function getPluginsAdditionalRoutes(): IPluginConfig[];
|
|
24
24
|
export declare function getPluginsSagas(): Saga[];
|
package/dist/PluginLoader.js
CHANGED
|
@@ -78,13 +78,23 @@ export function registerReplacer(replacerName, Replacer) {
|
|
|
78
78
|
}
|
|
79
79
|
export function loadPlugins(plugins) {
|
|
80
80
|
const promises = [];
|
|
81
|
+
if (!plugins || typeof plugins !== "object") {
|
|
82
|
+
return Promise.resolve([]);
|
|
83
|
+
}
|
|
81
84
|
const store = getStore();
|
|
82
85
|
Object.keys(plugins).forEach((key) => {
|
|
83
|
-
|
|
86
|
+
const pluginLoader = plugins[key];
|
|
87
|
+
if (typeof pluginLoader !== "function") {
|
|
88
|
+
console.warn(`Plugin "${key}" loader is not a function, skipping...`);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
promises.push(pluginLoader().then((plugin) => {
|
|
84
92
|
if (plugin.redux) {
|
|
85
93
|
pluginsStoreReducers = Object.assign(Object.assign({}, pluginsStoreReducers), { [key]: plugin.redux.reducer });
|
|
86
94
|
pluginsSagas = [...pluginsSagas, ...plugin.redux.sagas];
|
|
87
95
|
}
|
|
96
|
+
}).catch((error) => {
|
|
97
|
+
console.error(`Failed to load plugin "${key}":`, error);
|
|
88
98
|
}));
|
|
89
99
|
});
|
|
90
100
|
return Promise.all(promises);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legalplace/wizardx-core",
|
|
3
|
-
"version": "4.42.10-nightly.
|
|
3
|
+
"version": "4.42.10-nightly.20251125160107",
|
|
4
4
|
"author": "Moncef Hammou (moncef@legalplace.fr)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
"react-router-dom": "^5.2.0",
|
|
81
81
|
"react-test-renderer": "^19.2.0",
|
|
82
82
|
"redux": "^4.2.1",
|
|
83
|
-
"redux-devtools-extension": "^2.13.9",
|
|
84
83
|
"redux-saga": "^1.1.3",
|
|
85
84
|
"universal-cookie": "^4.0.4",
|
|
86
85
|
"uuid": "^8.3.2",
|