@legalplace/wizardx-core 2.1.0 → 2.2.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/CHANGELOG.md +18 -0
- package/dist/App.js +1 -1
- package/dist/config.test.js +2 -2
- package/dist/redux/middlewares/smartscriptMiddleware.js +2 -2
- package/dist/types/config.type.d.ts +2 -3
- package/dist/wizard-params.js +2 -2
- package/package.json +6 -6
- package/src/App.tsx +1 -1
- package/src/config.test.ts +2 -2
- package/src/redux/middlewares/smartscriptMiddleware.ts +2 -2
- package/src/types/config.type.ts +2 -3
- package/src/wizard-params.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.2.0](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.1.0...@legalplace/wizardx-core@2.2.0) (2021-11-10)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fix config test api[#4377](https://git.legalplace.eu/legalplace/monorepo/issues/4377) ([8de0c2c](https://git.legalplace.eu/legalplace/monorepo/commits/8de0c2c8faadf18c082d372e0b9caf70d3b0d669))
|
|
12
|
+
* fix styled-component issues api[#4377](https://git.legalplace.eu/legalplace/monorepo/issues/4377) ([d21227c](https://git.legalplace.eu/legalplace/monorepo/commits/d21227c278d545a6aba492b5e6b33062e31a52cd))
|
|
13
|
+
* fix type errors api[#4377](https://git.legalplace.eu/legalplace/monorepo/issues/4377) ([c14a871](https://git.legalplace.eu/legalplace/monorepo/commits/c14a8717b53d023f89d09b329d2dff062b4890f0))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* upgrading wizardx-app to support wizard-params throught props and fixing notFoundUrl api[#4377](https://git.legalplace.eu/legalplace/monorepo/issues/4377) ([72709a3](https://git.legalplace.eu/legalplace/monorepo/commits/72709a374e5037ed5eb743679159459e3b7d5483))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
# [2.1.0](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.0.0...@legalplace/wizardx-core@2.1.0) (2021-11-04)
|
|
7
25
|
|
|
8
26
|
|
package/dist/App.js
CHANGED
|
@@ -73,7 +73,7 @@ class WizardXCore extends React.Component {
|
|
|
73
73
|
React.createElement(Route, { path: "/p/:path", component: PluginRoute }),
|
|
74
74
|
React.createElement(Route, { path: getConfig().router.wizardInstancePath, component: ViewComponent }),
|
|
75
75
|
React.createElement(Route, { path: getConfig().router.wizardPath, component: ViewComponent }),
|
|
76
|
-
React.createElement(Route, { path: getConfig().router.
|
|
76
|
+
React.createElement(Route, { path: getConfig().router.smartscriptPath ||
|
|
77
77
|
'/contrats/:permalink/smartscript/:uniqid?', component: SmartScriptComponent }),
|
|
78
78
|
React.createElement(Redirect, { to: {
|
|
79
79
|
pathname: getConfig().router.notFoundPath,
|
package/dist/config.test.js
CHANGED
|
@@ -16,12 +16,12 @@ describe('Config loader', () => {
|
|
|
16
16
|
router: {
|
|
17
17
|
wizardPath: '/contrats/:prefix?/:permalink/creer/:page?',
|
|
18
18
|
wizardInstancePath: '/contrats/:prefix?/:permalink/continuer/:uniqid([0-9a-zA-Z]+)/:page?',
|
|
19
|
-
|
|
19
|
+
notFoundPath: '/contrats/conditions-generales-de-vente/creer',
|
|
20
20
|
appStatesPages: {
|
|
21
21
|
termsheet: 'resume',
|
|
22
22
|
email: 'email',
|
|
23
23
|
},
|
|
24
|
-
|
|
24
|
+
smartscriptPath: '/contrats/:permalink/smartscript/:uniqid?',
|
|
25
25
|
},
|
|
26
26
|
plugins: {
|
|
27
27
|
b2c_actions: '1.0.0',
|
|
@@ -14,8 +14,8 @@ const watchEnableSmartScript = (mpi, next, action) => {
|
|
|
14
14
|
const { permalink, prefix } = mpi.getState().app.meta;
|
|
15
15
|
const { uniqid } = mpi.getState().app.instance;
|
|
16
16
|
const { modelVersion } = new PathReader(mpi.getState());
|
|
17
|
-
if (getConfig().router.
|
|
18
|
-
const path = generatePath(getConfig().router.
|
|
17
|
+
if (getConfig().router.smartscriptPath) {
|
|
18
|
+
const path = generatePath(getConfig().router.smartscriptPath, {
|
|
19
19
|
permalink,
|
|
20
20
|
prefix: prefix.trim().length > 0 ? prefix : undefined,
|
|
21
21
|
uniqid: uniqid.trim().length > 0 ? uniqid : undefined,
|
|
@@ -32,10 +32,9 @@ export interface IWizardParams {
|
|
|
32
32
|
fixedConfig?: boolean;
|
|
33
33
|
router: {
|
|
34
34
|
wizardPath: string;
|
|
35
|
-
smartscriptRoute: string;
|
|
36
35
|
wizardInstancePath: string;
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
notFoundPath: string;
|
|
37
|
+
smartscriptPath: string;
|
|
39
38
|
appStatesPages?: Record<string, string>;
|
|
40
39
|
};
|
|
41
40
|
plugins: Record<string, string>;
|
package/dist/wizard-params.js
CHANGED
|
@@ -4,12 +4,12 @@ const config = {
|
|
|
4
4
|
router: {
|
|
5
5
|
wizardPath: '/contrats/:prefix?/:permalink/creer/:page?',
|
|
6
6
|
wizardInstancePath: '/contrats/:prefix?/:permalink/continuer/:uniqid([0-9a-zA-Z]+)/:page?',
|
|
7
|
-
|
|
7
|
+
notFoundPath: '/contrats/conditions-generales-de-vente/creer',
|
|
8
8
|
appStatesPages: {
|
|
9
9
|
termsheet: 'resume',
|
|
10
10
|
email: 'email',
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
smartscriptPath: '/contrats/:permalink/smartscript/:uniqid?',
|
|
13
13
|
},
|
|
14
14
|
plugins: {
|
|
15
15
|
b2c_actions: '1.0.0',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legalplace/wizardx-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"author": "Moncef Hammou (moncef@legalplace.fr)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"precommit": "test && lint:fix"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@legalplace/lp-events": "
|
|
18
|
+
"@legalplace/lp-events": "1.9.0",
|
|
19
19
|
"@legalplace/lplogic": "^2.1.6",
|
|
20
20
|
"@legalplace/model-healthcheck": "^1.1.5",
|
|
21
21
|
"@legalplace/referencesparser": "^1.7.0",
|
|
22
|
-
"@legalplace/storybook": "1.
|
|
22
|
+
"@legalplace/storybook": "1.122.2",
|
|
23
23
|
"@loadable/component": "^5.15.0",
|
|
24
24
|
"@redux-saga/core": "^1.1.3",
|
|
25
25
|
"awesome-phonenumber": "^2.62.1",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"xss": "^1.0.9"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@legalplace/eslint-config": "^2.0.
|
|
49
|
+
"@legalplace/eslint-config": "^2.0.2",
|
|
50
50
|
"@legalplace/models-v3-types": "^3.6.0",
|
|
51
|
-
"@legalplace/prettier-config": "^2.0.
|
|
51
|
+
"@legalplace/prettier-config": "^2.0.2",
|
|
52
52
|
"@swc-node/jest": "^1.3.2",
|
|
53
53
|
"@swc/core": "^1.2.93",
|
|
54
54
|
"@swc/jest": "^0.2.4",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"*.test.ts",
|
|
85
85
|
"*.test.tsx"
|
|
86
86
|
],
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "3f07ee92ced0ed41c4a775faacec9e4c22582881"
|
|
88
88
|
}
|
package/src/App.tsx
CHANGED
|
@@ -134,7 +134,7 @@ class WizardXCore extends React.Component<AppProps, { loaded: boolean }> {
|
|
|
134
134
|
{/* SmartScript Frame */}
|
|
135
135
|
<Route
|
|
136
136
|
path={
|
|
137
|
-
getConfig().router.
|
|
137
|
+
getConfig().router.smartscriptPath ||
|
|
138
138
|
'/contrats/:permalink/smartscript/:uniqid?'
|
|
139
139
|
}
|
|
140
140
|
component={SmartScriptComponent}
|
package/src/config.test.ts
CHANGED
|
@@ -14,12 +14,12 @@ describe('Config loader', () => {
|
|
|
14
14
|
wizardPath: '/contrats/:prefix?/:permalink/creer/:page?',
|
|
15
15
|
wizardInstancePath:
|
|
16
16
|
'/contrats/:prefix?/:permalink/continuer/:uniqid([0-9a-zA-Z]+)/:page?',
|
|
17
|
-
|
|
17
|
+
notFoundPath: '/contrats/conditions-generales-de-vente/creer',
|
|
18
18
|
appStatesPages: {
|
|
19
19
|
termsheet: 'resume',
|
|
20
20
|
email: 'email',
|
|
21
21
|
},
|
|
22
|
-
|
|
22
|
+
smartscriptPath: '/contrats/:permalink/smartscript/:uniqid?',
|
|
23
23
|
},
|
|
24
24
|
|
|
25
25
|
// Enabled plugins (this should move to the apiEndpoint first response)
|
|
@@ -34,9 +34,9 @@ const watchEnableSmartScript = (
|
|
|
34
34
|
const { uniqid } = mpi.getState().app.instance;
|
|
35
35
|
const { modelVersion } = new PathReader(mpi.getState());
|
|
36
36
|
|
|
37
|
-
if (getConfig().router.
|
|
37
|
+
if (getConfig().router.smartscriptPath) {
|
|
38
38
|
// Generating path
|
|
39
|
-
const path = generatePath(getConfig().router.
|
|
39
|
+
const path = generatePath(getConfig().router.smartscriptPath, {
|
|
40
40
|
permalink,
|
|
41
41
|
prefix: prefix.trim().length > 0 ? prefix : undefined,
|
|
42
42
|
uniqid: uniqid.trim().length > 0 ? uniqid : undefined,
|
package/src/types/config.type.ts
CHANGED
|
@@ -35,10 +35,9 @@ export interface IWizardParams {
|
|
|
35
35
|
fixedConfig?: boolean;
|
|
36
36
|
router: {
|
|
37
37
|
wizardPath: string;
|
|
38
|
-
smartscriptRoute: string;
|
|
39
38
|
wizardInstancePath: string;
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
notFoundPath: string;
|
|
40
|
+
smartscriptPath: string;
|
|
42
41
|
appStatesPages?: Record<string, string>;
|
|
43
42
|
};
|
|
44
43
|
plugins: Record<string, string>;
|
package/src/wizard-params.ts
CHANGED
|
@@ -11,12 +11,12 @@ const config: IWizardParams = {
|
|
|
11
11
|
wizardPath: '/contrats/:prefix?/:permalink/creer/:page?',
|
|
12
12
|
wizardInstancePath:
|
|
13
13
|
'/contrats/:prefix?/:permalink/continuer/:uniqid([0-9a-zA-Z]+)/:page?',
|
|
14
|
-
|
|
14
|
+
notFoundPath: '/contrats/conditions-generales-de-vente/creer',
|
|
15
15
|
appStatesPages: {
|
|
16
16
|
termsheet: 'resume',
|
|
17
17
|
email: 'email',
|
|
18
18
|
},
|
|
19
|
-
|
|
19
|
+
smartscriptPath: '/contrats/:permalink/smartscript/:uniqid?',
|
|
20
20
|
},
|
|
21
21
|
|
|
22
22
|
// Enabled plugins (this should move to the apiEndpoint first response)
|