@legalplace/wizardx-core 4.42.10-nightly.20251126142157 → 4.42.10-nightly.20251126143216

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/README.md CHANGED
@@ -288,4 +288,4 @@ For issues and questions:
288
288
 
289
289
  **Version**: 4.43.0+
290
290
  **Last Updated**: Nov 26, 2025
291
- **Status**: ✅ Production Ready
291
+ **Status**: ✅ Production Ready
@@ -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?: Record<string, (() => Promise<IPlugin>) | Promise<IPlugin> | IPlugin>): Promise<any>;
21
+ export declare function loadPlugins(plugins?: Record<string, string | (() => Promise<IPlugin>) | Promise<IPlugin> | 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[];
@@ -1,6 +1,7 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { getStore } from "./redux/store";
4
+ import Globals from "./Globals";
4
5
  let pluginsStoreReducers = {};
5
6
  let pluginsSagas = [];
6
7
  const replacers = {};
@@ -88,7 +89,16 @@ export function loadPlugins(plugins) {
88
89
  Object.keys(plugins).forEach((key) => {
89
90
  const pluginValue = plugins[key];
90
91
  let pluginPromise;
91
- if (typeof pluginValue === "function") {
92
+ if (typeof pluginValue === "string") {
93
+ try {
94
+ pluginPromise = Promise.resolve(Globals.loadPlugin(key));
95
+ }
96
+ catch (error) {
97
+ console.error(`Failed to load plugin "${key}" using Globals.loadPlugin:`, error);
98
+ return;
99
+ }
100
+ }
101
+ else if (typeof pluginValue === "function") {
92
102
  try {
93
103
  pluginPromise = Promise.resolve(pluginValue());
94
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/wizardx-core",
3
- "version": "4.42.10-nightly.20251126142157",
3
+ "version": "4.42.10-nightly.20251126143216",
4
4
  "author": "Moncef Hammou (moncef@legalplace.fr)",
5
5
  "license": "MIT",
6
6
  "files": [