@legalplace/wizardx-core 4.42.10-nightly.20251126115542 → 4.42.10-nightly.20251126122442
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 +7 -22
- package/dist/App.js +4 -5
- package/dist/components/RouteWatcher.d.ts +2 -0
- package/dist/components/RouteWatcher.js +23 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/libs/PathReader.js +18 -11
- package/dist/redux/middlewares/paginationWatcherMiddleware.d.ts +13 -1
- package/dist/redux/middlewares/paginationWatcherMiddleware.js +1 -1
- package/dist/redux/reducers/router.d.ts +11 -0
- package/dist/redux/reducers/router.js +15 -0
- package/dist/redux/store.js +3 -3
- package/package.json +1 -7
- package/dist/AppNextJS.d.ts +0 -21
- package/dist/AppNextJS.js +0 -81
package/README.md
CHANGED
|
@@ -43,11 +43,11 @@ root.render(
|
|
|
43
43
|
```tsx
|
|
44
44
|
// app/wizard/page.tsx
|
|
45
45
|
'use client';
|
|
46
|
-
import {
|
|
46
|
+
import { App } from "@legalplace/wizardx-core";
|
|
47
47
|
|
|
48
48
|
export default function WizardPage() {
|
|
49
49
|
return (
|
|
50
|
-
<
|
|
50
|
+
<App
|
|
51
51
|
loadPlugin={loadPlugin}
|
|
52
52
|
loadTheme={loadTheme}
|
|
53
53
|
wizardParams={wizardParams}
|
|
@@ -56,7 +56,7 @@ export default function WizardPage() {
|
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
**
|
|
59
|
+
**Note**: The same `App` component works in both CRA and Next.js!
|
|
60
60
|
|
|
61
61
|
See [NEXTJS-INTEGRATION.md](./NEXTJS-INTEGRATION.md) for complete Next.js setup including URL rewrites.
|
|
62
62
|
|
|
@@ -71,28 +71,14 @@ See [NEXTJS-INTEGRATION.md](./NEXTJS-INTEGRATION.md) for complete Next.js setup
|
|
|
71
71
|
### Components
|
|
72
72
|
|
|
73
73
|
#### `App` Component
|
|
74
|
-
The main component
|
|
74
|
+
The main component that uses React Router (BrowserRouter) for client-side routing.
|
|
75
|
+
Works in both Create React App and Next.js.
|
|
75
76
|
|
|
76
77
|
```tsx
|
|
77
78
|
import { App } from "@legalplace/wizardx-core";
|
|
78
79
|
|
|
79
80
|
<App
|
|
80
|
-
historyType="browser" //
|
|
81
|
-
loadPlugin={loadPlugin}
|
|
82
|
-
loadTheme={loadTheme}
|
|
83
|
-
wizardParams={wizardParams}
|
|
84
|
-
model={initialModel}
|
|
85
|
-
user={user}
|
|
86
|
-
/>
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
#### `AppNextJS` Component
|
|
90
|
-
Optimized component for Next.js that uses BrowserRouter instead of ConnectedRouter.
|
|
91
|
-
|
|
92
|
-
```tsx
|
|
93
|
-
import { AppNextJS } from "@legalplace/wizardx-core";
|
|
94
|
-
|
|
95
|
-
<AppNextJS
|
|
81
|
+
historyType="browser" // optional, defaults to browser
|
|
96
82
|
loadPlugin={loadPlugin}
|
|
97
83
|
loadTheme={loadTheme}
|
|
98
84
|
wizardParams={wizardParams}
|
|
@@ -168,8 +154,7 @@ const wizardParams = {
|
|
|
168
154
|
|
|
169
155
|
```typescript
|
|
170
156
|
// Components
|
|
171
|
-
export { App } from "@legalplace/wizardx-core";
|
|
172
|
-
export { AppNextJS } from "@legalplace/wizardx-core"; // For Next.js
|
|
157
|
+
export { App } from "@legalplace/wizardx-core"; // Works in both CRA and Next.js
|
|
173
158
|
|
|
174
159
|
// Configuration
|
|
175
160
|
export { getConfig, updateConfig } from "@legalplace/wizardx-core";
|
package/dist/App.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { Route, Switch, Redirect } from "react-router-dom";
|
|
3
|
+
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";
|
|
4
4
|
import { Provider } from "react-redux";
|
|
5
|
-
import { ConnectedRouter } from "connected-react-router";
|
|
6
5
|
import { getStore, createAppStore } from "./redux/store";
|
|
7
|
-
import { getHistory } from "./redux/routerHistory";
|
|
8
6
|
import Globals, { setGlobals } from "./Globals";
|
|
9
7
|
import { getConfig, updateConfig } from "./config";
|
|
10
8
|
import { fetchModelPrerequisitesAction } from "./redux/actions/sagas/model";
|
|
@@ -12,6 +10,7 @@ import { preloadTheme } from "./helpers/preloadTheme";
|
|
|
12
10
|
import ViewComponent from "./components/View";
|
|
13
11
|
import PluginRoute from "./components/PluginRoute";
|
|
14
12
|
import SmartScriptComponent from "./components/SmartScript";
|
|
13
|
+
import RouteWatcher from "./components/RouteWatcher";
|
|
15
14
|
import { clearPlugins } from "./PluginLoader";
|
|
16
15
|
import { PathReader } from "./libs/PathReader";
|
|
17
16
|
import { resetStateAction } from "./redux/actions/app";
|
|
@@ -34,7 +33,7 @@ class WizardXCore extends React.Component {
|
|
|
34
33
|
var _a;
|
|
35
34
|
super(props);
|
|
36
35
|
clearPlugins();
|
|
37
|
-
const historyType =
|
|
36
|
+
const historyType = "memory";
|
|
38
37
|
const params = Object.assign(Object.assign({}, Globals), { loadTheme: props.loadTheme, loadPlugin: props.loadPlugin });
|
|
39
38
|
if (props.model) {
|
|
40
39
|
params.model = props.model;
|
|
@@ -77,7 +76,7 @@ class WizardXCore extends React.Component {
|
|
|
77
76
|
getStore().dispatch(resetStateAction());
|
|
78
77
|
}
|
|
79
78
|
render() {
|
|
80
|
-
return (_jsx(Provider, { store: getStore(), children:
|
|
79
|
+
return (_jsx(Provider, { store: getStore(), children: _jsxs(BrowserRouter, { children: [_jsx(RouteWatcher, {}), _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
80
|
}
|
|
82
81
|
}
|
|
83
82
|
export default WizardXCore;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { useLocation } from "react-router-dom";
|
|
3
|
+
import { useDispatch } from "react-redux";
|
|
4
|
+
const RouteWatcher = () => {
|
|
5
|
+
const location = useLocation();
|
|
6
|
+
const dispatch = useDispatch();
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
dispatch({
|
|
9
|
+
type: "@@router/LOCATION_CHANGE",
|
|
10
|
+
payload: {
|
|
11
|
+
location: {
|
|
12
|
+
pathname: location.pathname,
|
|
13
|
+
search: location.search,
|
|
14
|
+
hash: location.hash,
|
|
15
|
+
},
|
|
16
|
+
action: "PUSH",
|
|
17
|
+
isFirstRendering: false,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}, [location.pathname, location.search, location.hash, dispatch]);
|
|
21
|
+
return null;
|
|
22
|
+
};
|
|
23
|
+
export default RouteWatcher;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/libs/PathReader.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createMatchSelector } from "connected-react-router";
|
|
2
1
|
import queryString from "query-string";
|
|
3
2
|
import { matchPath, generatePath } from "react-router";
|
|
4
3
|
import { getConfig } from "../config";
|
|
@@ -19,12 +18,16 @@ export class PathReader {
|
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
matchWithoutUniqId(state) {
|
|
22
|
-
var _a;
|
|
23
|
-
const
|
|
24
|
-
const matchResult =
|
|
25
|
-
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
const pathname = ((_b = (_a = state.router) === null || _a === void 0 ? void 0 : _a.location) === null || _b === void 0 ? void 0 : _b.pathname) || window.location.pathname;
|
|
23
|
+
const matchResult = matchPath(pathname, {
|
|
24
|
+
path: getConfig().router.wizardPath,
|
|
25
|
+
exact: false,
|
|
26
|
+
strict: false,
|
|
27
|
+
});
|
|
28
|
+
if (matchResult && matchResult.params) {
|
|
26
29
|
const { permalink, page, view, prefix } = matchResult.params;
|
|
27
|
-
const modelVersion = (
|
|
30
|
+
const modelVersion = (_c = getQueryStringValues()) === null || _c === void 0 ? void 0 : _c.version;
|
|
28
31
|
this.currentPrefix = prefix || "";
|
|
29
32
|
this.currentPermalink = Globals.permalink || permalink;
|
|
30
33
|
this.currentPage = this.getPageNumber(page);
|
|
@@ -36,12 +39,16 @@ export class PathReader {
|
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
matchWithUniqId(state) {
|
|
39
|
-
var _a;
|
|
40
|
-
const
|
|
41
|
-
const matchResult =
|
|
42
|
-
|
|
42
|
+
var _a, _b, _c;
|
|
43
|
+
const pathname = ((_b = (_a = state.router) === null || _a === void 0 ? void 0 : _a.location) === null || _b === void 0 ? void 0 : _b.pathname) || window.location.pathname;
|
|
44
|
+
const matchResult = matchPath(pathname, {
|
|
45
|
+
path: getConfig().router.wizardInstancePath,
|
|
46
|
+
exact: false,
|
|
47
|
+
strict: false,
|
|
48
|
+
});
|
|
49
|
+
if (matchResult && matchResult.params) {
|
|
43
50
|
const { permalink, page, uniqid, view, prefix } = matchResult.params;
|
|
44
|
-
const modelVersion = (
|
|
51
|
+
const modelVersion = (_c = getQueryStringValues()) === null || _c === void 0 ? void 0 : _c.version;
|
|
45
52
|
this.currentPermalink = Globals.permalink || permalink;
|
|
46
53
|
this.currentPrefix = prefix || "";
|
|
47
54
|
this.currentPage = this.getPageNumber(page);
|
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import type { LocationChangeAction } from "connected-react-router";
|
|
2
1
|
import type { MiddlewareAPI, Dispatch } from "redux";
|
|
2
|
+
declare const LOCATION_CHANGE = "@@router/LOCATION_CHANGE";
|
|
3
|
+
interface LocationChangeAction {
|
|
4
|
+
type: typeof LOCATION_CHANGE;
|
|
5
|
+
payload: {
|
|
6
|
+
location: {
|
|
7
|
+
pathname: string;
|
|
8
|
+
search: string;
|
|
9
|
+
hash: string;
|
|
10
|
+
};
|
|
11
|
+
action: string;
|
|
12
|
+
isFirstRendering: boolean;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
3
15
|
import type { ActionsType } from "../../types/Actions.type";
|
|
4
16
|
export type WatcherActions = ActionsType.Conditions.updateSectionCondition | LocationChangeAction;
|
|
5
17
|
declare const paginationWatcherMiddleware: (mpi: MiddlewareAPI) => (next: Dispatch) => (action: WatcherActions) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const LOCATION_CHANGE = "@@router/LOCATION_CHANGE";
|
|
2
2
|
import { goPageAction, updateAvailableSectionsAction, initMetaAction, initInstanceAction, } from "../actions/app";
|
|
3
3
|
import { UPDATE_SECTION_CONDITION } from "../constants/conditions";
|
|
4
4
|
import { selectAllSectionsReferences, selectUserEmailSectionVariableIds, } from "../selectors/references";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface RouterLocation {
|
|
2
|
+
pathname: string;
|
|
3
|
+
search: string;
|
|
4
|
+
hash: string;
|
|
5
|
+
}
|
|
6
|
+
export interface RouterState {
|
|
7
|
+
location: RouterLocation;
|
|
8
|
+
action: string;
|
|
9
|
+
}
|
|
10
|
+
declare const routerReducer: (state: RouterState | undefined, action: any) => RouterState;
|
|
11
|
+
export default routerReducer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const initialState = {
|
|
2
|
+
location: {
|
|
3
|
+
pathname: typeof window !== "undefined" ? window.location.pathname : "/",
|
|
4
|
+
search: typeof window !== "undefined" ? window.location.search : "",
|
|
5
|
+
hash: typeof window !== "undefined" ? window.location.hash : "",
|
|
6
|
+
},
|
|
7
|
+
action: "POP",
|
|
8
|
+
};
|
|
9
|
+
const routerReducer = (state = initialState, action) => {
|
|
10
|
+
if (action.type === "@@router/LOCATION_CHANGE") {
|
|
11
|
+
return Object.assign(Object.assign({}, state), { location: action.payload.location, action: action.payload.action || "PUSH" });
|
|
12
|
+
}
|
|
13
|
+
return state;
|
|
14
|
+
};
|
|
15
|
+
export default routerReducer;
|
package/dist/redux/store.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { combineReducers, legacy_createStore as createStore, applyMiddleware } from "redux";
|
|
2
|
-
import { connectRouter, routerMiddleware } from "connected-react-router";
|
|
3
2
|
import { composeWithDevTools } from "redux-devtools-extension";
|
|
4
3
|
import { appReducer } from "./reducers/app";
|
|
5
4
|
import { userReducer } from "./reducers/user";
|
|
@@ -24,6 +23,7 @@ import smartscriptMiddleware from "./middlewares/smartscriptMiddleware";
|
|
|
24
23
|
import thirdPartyScriptsMiddleware from "./middlewares/thirdpartyScriptsMiddleware";
|
|
25
24
|
import { pluginsStoreReducer } from "./reducers/pluginsStore";
|
|
26
25
|
import { getSagaMiddleware } from "./sagas/middleware";
|
|
26
|
+
import routerReducer from "./reducers/router";
|
|
27
27
|
let store;
|
|
28
28
|
export const createAppStore = (historyType = "browser") => {
|
|
29
29
|
if (store !== undefined) {
|
|
@@ -32,7 +32,7 @@ export const createAppStore = (historyType = "browser") => {
|
|
|
32
32
|
}
|
|
33
33
|
const history = createHistory(historyType);
|
|
34
34
|
const wizardxReducers = combineReducers({
|
|
35
|
-
router:
|
|
35
|
+
router: routerReducer,
|
|
36
36
|
app: appReducer,
|
|
37
37
|
user: userReducer,
|
|
38
38
|
references: referencesReducer,
|
|
@@ -43,7 +43,7 @@ export const createAppStore = (historyType = "browser") => {
|
|
|
43
43
|
pluginsStore: pluginsStoreReducer,
|
|
44
44
|
});
|
|
45
45
|
const sagaMiddleware = getSagaMiddleware();
|
|
46
|
-
const appliedMiddlewares = applyMiddleware(pluginsHookMiddleware,
|
|
46
|
+
const appliedMiddlewares = applyMiddleware(pluginsHookMiddleware, sagaMiddleware, paginationWatcherMiddleware, selectorsMiddleware, conditionsWatcherMiddleware, prefillerWatcherMiddleware, evaluationsWatcherMiddleware, multiplesActionsMiddleware, mandatoriesWatcherMiddleware, smartscriptMiddleware, thirdPartyScriptsMiddleware);
|
|
47
47
|
const middlewares = Globals.appEnv !== "production"
|
|
48
48
|
? composeWithDevTools(appliedMiddlewares)
|
|
49
49
|
: appliedMiddlewares;
|
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.20251126122442",
|
|
4
4
|
"author": "Moncef Hammou (moncef@legalplace.fr)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -23,12 +23,6 @@
|
|
|
23
23
|
"require": "./dist/App.js",
|
|
24
24
|
"default": "./dist/App.js"
|
|
25
25
|
},
|
|
26
|
-
"./AppNextJS": {
|
|
27
|
-
"types": "./dist/AppNextJS.d.ts",
|
|
28
|
-
"import": "./dist/AppNextJS.js",
|
|
29
|
-
"require": "./dist/AppNextJS.js",
|
|
30
|
-
"default": "./dist/AppNextJS.js"
|
|
31
|
-
},
|
|
32
26
|
"./package.json": "./package.json"
|
|
33
27
|
},
|
|
34
28
|
"scripts": {
|
package/dist/AppNextJS.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { ModelV3 } from "@legalplace/models-v3-types";
|
|
3
|
-
import type { StateType } from "./types/State.type";
|
|
4
|
-
import type { IWizardParams } from "./types/config.type";
|
|
5
|
-
export interface AppNextJSProps {
|
|
6
|
-
model?: ModelV3;
|
|
7
|
-
meta?: StateType.App.Meta;
|
|
8
|
-
instance?: StateType.App.Instance;
|
|
9
|
-
user?: StateType.User;
|
|
10
|
-
wizardParams?: IWizardParams;
|
|
11
|
-
preloadTheme?: boolean;
|
|
12
|
-
loadPlugin: (plugin: string) => Promise<any>;
|
|
13
|
-
loadTheme: (theme: string) => Promise<any>;
|
|
14
|
-
}
|
|
15
|
-
declare class AppNextJS extends React.Component<AppNextJSProps> {
|
|
16
|
-
constructor(props: AppNextJSProps);
|
|
17
|
-
componentDidMount(): void;
|
|
18
|
-
componentWillUnmount(): void;
|
|
19
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
}
|
|
21
|
-
export default AppNextJS;
|
package/dist/AppNextJS.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";
|
|
4
|
-
import { Provider } from "react-redux";
|
|
5
|
-
import { getStore, createAppStore } from "./redux/store";
|
|
6
|
-
import Globals, { setGlobals } from "./Globals";
|
|
7
|
-
import { getConfig, updateConfig } from "./config";
|
|
8
|
-
import { fetchModelPrerequisitesAction } from "./redux/actions/sagas/model";
|
|
9
|
-
import { preloadTheme } from "./helpers/preloadTheme";
|
|
10
|
-
import ViewComponent from "./components/View";
|
|
11
|
-
import PluginRoute from "./components/PluginRoute";
|
|
12
|
-
import SmartScriptComponent from "./components/SmartScript";
|
|
13
|
-
import { clearPlugins } from "./PluginLoader";
|
|
14
|
-
import { PathReader } from "./libs/PathReader";
|
|
15
|
-
import { resetStateAction } from "./redux/actions/app";
|
|
16
|
-
import { callInitDataSmartscriptAction } from "./redux";
|
|
17
|
-
import { externalPartnerRedirectUrl } from "./helpers/redirectionConfig";
|
|
18
|
-
import { autoSave } from "./helpers/autosave.helper";
|
|
19
|
-
import { NOT_FOUND_PAGE_LINK } from "./constants/links.constant";
|
|
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
|
-
else {
|
|
26
|
-
window.location.href = NOT_FOUND_PAGE_LINK;
|
|
27
|
-
}
|
|
28
|
-
return _jsx(Redirect, { to: getConfig().router.notFoundPath });
|
|
29
|
-
};
|
|
30
|
-
class AppNextJS extends React.Component {
|
|
31
|
-
constructor(props) {
|
|
32
|
-
var _a;
|
|
33
|
-
super(props);
|
|
34
|
-
clearPlugins();
|
|
35
|
-
const historyType = "memory";
|
|
36
|
-
const params = Object.assign(Object.assign({}, Globals), { loadTheme: props.loadTheme, loadPlugin: props.loadPlugin });
|
|
37
|
-
if (props.model) {
|
|
38
|
-
params.model = props.model;
|
|
39
|
-
}
|
|
40
|
-
if (props.meta) {
|
|
41
|
-
params.meta = props.meta;
|
|
42
|
-
}
|
|
43
|
-
if (props.instance) {
|
|
44
|
-
params.instance = props.instance;
|
|
45
|
-
}
|
|
46
|
-
if (props.user) {
|
|
47
|
-
params.user = props.user;
|
|
48
|
-
}
|
|
49
|
-
setGlobals(params);
|
|
50
|
-
if (props.wizardParams)
|
|
51
|
-
updateConfig(props.wizardParams);
|
|
52
|
-
if (props.preloadTheme && ((_a = props.wizardParams) === null || _a === void 0 ? void 0 : _a.theme.name))
|
|
53
|
-
preloadTheme(props.wizardParams.theme.name);
|
|
54
|
-
createAppStore(historyType);
|
|
55
|
-
}
|
|
56
|
-
componentDidMount() {
|
|
57
|
-
const { dispatch, getState } = getStore();
|
|
58
|
-
const state = getState();
|
|
59
|
-
let parent = null;
|
|
60
|
-
window.addEventListener("message", ({ data, source }) => {
|
|
61
|
-
if (parent === null || data.from === "BO") {
|
|
62
|
-
parent = source;
|
|
63
|
-
}
|
|
64
|
-
if (data.from && data.from === "BO") {
|
|
65
|
-
const { variables } = data;
|
|
66
|
-
autoSave(variables, getStore());
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
dispatch(callInitDataSmartscriptAction());
|
|
70
|
-
if (!PathReader.isSmartScriptPath()) {
|
|
71
|
-
dispatch(fetchModelPrerequisitesAction(getConfig().permalink || state.app.meta.permalink, getConfig().prefix || state.app.meta.prefix || ""));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
componentWillUnmount() {
|
|
75
|
-
getStore().dispatch(resetStateAction());
|
|
76
|
-
}
|
|
77
|
-
render() {
|
|
78
|
-
return (_jsx(Provider, { store: getStore(), children: _jsx(BrowserRouter, { 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 }))] }) }) }));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
export default AppNextJS;
|