@legalplace/wizardx-core 4.31.8 → 4.32.0

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 CHANGED
@@ -16,6 +16,14 @@ import { clearPlugins } from "./PluginLoader";
16
16
  import { PathReader } from "./libs/PathReader";
17
17
  import { resetStateAction } from "./redux/actions/app";
18
18
  import { callInitDataSmartscriptAction } from "./redux";
19
+ import { externalPartnerRedirectUrl } from "./helpers/redirectionConfig";
20
+ const RedirectHandler = () => {
21
+ const matchedPartner = Object.keys(externalPartnerRedirectUrl).find((partner) => window.location.origin.toLowerCase().includes(partner));
22
+ if (matchedPartner) {
23
+ window.location.href = externalPartnerRedirectUrl[matchedPartner];
24
+ }
25
+ return _jsx(Redirect, { to: getConfig().router.notFoundPath }, void 0);
26
+ };
19
27
  class WizardXCore extends React.Component {
20
28
  constructor(props) {
21
29
  var _a;
@@ -54,9 +62,7 @@ class WizardXCore extends React.Component {
54
62
  getStore().dispatch(resetStateAction());
55
63
  }
56
64
  render() {
57
- return (_jsx(Provider, Object.assign({ store: getStore() }, { children: _jsx(ConnectedRouter, Object.assign({ history: getHistory() }, { children: _jsxs(Switch, { children: [_jsx(Route, { path: "/p/:path", component: PluginRoute }, void 0), _jsx(Route, { path: getConfig().router.smartscriptPath, exact: true, strict: true, component: SmartScriptComponent }, void 0), _jsx(Route, { path: getConfig().router.wizardInstancePath, component: ViewComponent }, void 0), _jsx(Route, { path: getConfig().router.wizardPath, component: ViewComponent }, void 0), !window.location.href.includes("smartscript") && (_jsx(Redirect, { to: {
58
- pathname: getConfig().router.notFoundPath,
59
- } }, void 0))] }, void 0) }), void 0) }), void 0));
65
+ return (_jsx(Provider, Object.assign({ store: getStore() }, { children: _jsx(ConnectedRouter, Object.assign({ history: getHistory() }, { children: _jsxs(Switch, { children: [_jsx(Route, { path: "/p/:path", component: PluginRoute }, void 0), _jsx(Route, { path: getConfig().router.smartscriptPath, exact: true, strict: true, component: SmartScriptComponent }, void 0), _jsx(Route, { path: getConfig().router.wizardInstancePath, component: ViewComponent }, void 0), _jsx(Route, { path: getConfig().router.wizardPath, component: ViewComponent }, void 0), !window.location.href.includes("smartscript") && (_jsx(Route, { component: RedirectHandler }, void 0))] }, void 0) }), void 0) }), void 0));
60
66
  }
61
67
  }
62
68
  export default WizardXCore;
@@ -0,0 +1 @@
1
+ export declare const externalPartnerRedirectUrl: Record<string, string>;
@@ -0,0 +1,3 @@
1
+ export const externalPartnerRedirectUrl = {
2
+ qonto: "https://qonto.com",
3
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@legalplace/wizardx-core",
3
- "version": "4.31.8",
3
+ "version": "4.32.0",
4
4
  "author": "Moncef Hammou (moncef@legalplace.fr)",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -24,9 +24,9 @@
24
24
  "@legalplace/lp-events": "1.14.0",
25
25
  "@legalplace/lplogic": "2.3.1",
26
26
  "@legalplace/model-healthcheck": "^1.1.5",
27
- "@legalplace/referencesparser": "^3.1.32",
27
+ "@legalplace/referencesparser": "^3.1.33",
28
28
  "@legalplace/storybook": "2.352.2",
29
- "@legalplace/typeorm-constants": "^3.55.0",
29
+ "@legalplace/typeorm-constants": "^3.56.0",
30
30
  "@loadable/component": "^5.15.0",
31
31
  "@redux-saga/core": "^1.1.3",
32
32
  "connected-react-router": "^6.8.0",
@@ -54,11 +54,11 @@
54
54
  "xss": "^1.0.9"
55
55
  },
56
56
  "devDependencies": {
57
- "@legalplace/data-gouv": "^1.6.21",
57
+ "@legalplace/data-gouv": "^1.6.22",
58
58
  "@legalplace/eslint-config": "^2.3.0",
59
- "@legalplace/models-v3-types": "^5.13.17",
59
+ "@legalplace/models-v3-types": "^5.13.18",
60
60
  "@legalplace/prettier-config": "^2.1.3",
61
- "@legalplace/typeorm-entities": "^5.51.0",
61
+ "@legalplace/typeorm-entities": "^5.51.1",
62
62
  "@swc-node/jest": "^1.3.2",
63
63
  "@swc/core": "^1.2.93",
64
64
  "@swc/jest": "^0.2.4",
@@ -96,5 +96,5 @@
96
96
  "*.test.ts",
97
97
  "*.test.tsx"
98
98
  ],
99
- "gitHead": "fcb5777781b5366c7a589851ddee50e66764b287"
99
+ "gitHead": "335b0fea0af5f90d1bc4ee4fbb357e0aeb4a9e59"
100
100
  }