@legalplace/wizardx-core 2.15.1 → 3.0.1
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 +35 -0
- package/dist/App.d.ts +2 -1
- package/dist/App.js +7 -29
- package/dist/components/SmartScript.d.ts +11 -2
- package/dist/components/SmartScript.js +13 -9
- package/dist/components/View.test.js +2 -2
- package/dist/componentsConnectors/connectBox.test.js +2 -0
- package/dist/componentsConnectors/connectOption.js +2 -1
- package/dist/libs/PathReader.d.ts +1 -1
- package/dist/libs/PathReader.js +16 -8
- package/dist/redux/actions/references.test.js +2 -0
- package/dist/redux/reducers/references.js +12 -2
- package/dist/redux/selectors/library.d.ts +2 -2
- package/dist/redux/selectors/references.test.js +2 -0
- package/dist/redux/selectors/user.d.ts +2 -2
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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
|
+
## [3.0.1](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@3.0.0...@legalplace/wizardx-core@3.0.1) (2023-02-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* fix smartscript api[#7714](https://git.legalplace.eu/legalplace/monorepo/issues/7714) ([0c8fc01](https://git.legalplace.eu/legalplace/monorepo/commits/0c8fc01e209eb4e631f72c2dfa4cdab202453dba))
|
|
12
|
+
* fix smartscript initiating api[#7714](https://git.legalplace.eu/legalplace/monorepo/issues/7714) ([365a087](https://git.legalplace.eu/legalplace/monorepo/commits/365a087a4e16bada6f133859a11d935fec8a1a5d))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# [3.0.0](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.15.1...@legalplace/wizardx-core@3.0.0) (2023-02-08)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* bunch of fixes and package alignments api[#7559](https://git.legalplace.eu/legalplace/monorepo/issues/7559) ([7e2828f](https://git.legalplace.eu/legalplace/monorepo/commits/7e2828feda10ffdf07cacd1cc661122830faaeeb))
|
|
24
|
+
* fix test api[#7559](https://git.legalplace.eu/legalplace/monorepo/issues/7559) ([9a0b90a](https://git.legalplace.eu/legalplace/monorepo/commits/9a0b90ab2662debc5bacd84702f4fc722b5ea6fc))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* adding models-v3-types package to monorepo api[#7559](https://git.legalplace.eu/legalplace/monorepo/issues/7559) ([f987580](https://git.legalplace.eu/legalplace/monorepo/commits/f987580e808e1fc04bfb8b58db8c336b1394f618))
|
|
30
|
+
* adding support for browser history pagination and slugs api[#7559](https://git.legalplace.eu/legalplace/monorepo/issues/7559) ([9e471ca](https://git.legalplace.eu/legalplace/monorepo/commits/9e471cadbc08df9507e0b5d9c816dd6d0bd05ed7))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### BREAKING CHANGES
|
|
34
|
+
|
|
35
|
+
* Pagination handling changed to support slugs, store init and destrying changed too.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [2.15.1](https://git.legalplace.eu/legalplace/monorepo/compare/@legalplace/wizardx-core@2.15.0...@legalplace/wizardx-core@2.15.1) (2023-02-07)
|
|
7
42
|
|
|
8
43
|
|
package/dist/App.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ModelV3 } from "@legalplace/models-v3-types";
|
|
|
3
3
|
import type { StateType } from "./types/State.type";
|
|
4
4
|
import type { IWizardParams } from "./types/config.type";
|
|
5
5
|
export interface AppProps {
|
|
6
|
-
historyType
|
|
6
|
+
historyType?: "browser" | "memory";
|
|
7
7
|
model?: ModelV3;
|
|
8
8
|
meta?: StateType.App.Meta;
|
|
9
9
|
instance?: StateType.App.Instance;
|
|
@@ -18,6 +18,7 @@ declare class WizardXCore extends React.Component<AppProps, {
|
|
|
18
18
|
}> {
|
|
19
19
|
constructor(props: AppProps);
|
|
20
20
|
componentDidMount(): void;
|
|
21
|
+
componentWillUnmount(): void;
|
|
21
22
|
render(): JSX.Element;
|
|
22
23
|
}
|
|
23
24
|
export default WizardXCore;
|
package/dist/App.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { Route, Switch, Redirect
|
|
3
|
+
import { Route, Switch, Redirect } from "react-router-dom";
|
|
4
4
|
import { Provider } from "react-redux";
|
|
5
5
|
import { ConnectedRouter } from "connected-react-router";
|
|
6
6
|
import { getStore, createAppStore } from "./redux/store";
|
|
@@ -13,8 +13,7 @@ import ViewComponent from "./components/View";
|
|
|
13
13
|
import PluginRoute from "./components/PluginRoute";
|
|
14
14
|
import SmartScriptComponent from "./components/SmartScript";
|
|
15
15
|
import { clearPlugins } from "./PluginLoader";
|
|
16
|
-
import {
|
|
17
|
-
import { DANGEROUS_DESTROY_STORE } from "./redux/constants/app";
|
|
16
|
+
import { DANGEROUS_DESTROY_STORE } from ".";
|
|
18
17
|
class WizardXCore extends React.Component {
|
|
19
18
|
constructor(props) {
|
|
20
19
|
var _a;
|
|
@@ -39,39 +38,18 @@ class WizardXCore extends React.Component {
|
|
|
39
38
|
updateConfig(props.wizardParams);
|
|
40
39
|
if (props.preloadTheme && ((_a = props.wizardParams) === null || _a === void 0 ? void 0 : _a.theme.name))
|
|
41
40
|
preloadTheme(props.wizardParams.theme.name);
|
|
42
|
-
|
|
43
|
-
createAppStore(historyType);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
getStore().dispatch({ type: DANGEROUS_DESTROY_STORE });
|
|
47
|
-
}
|
|
41
|
+
createAppStore(historyType);
|
|
48
42
|
}
|
|
49
43
|
componentDidMount() {
|
|
50
|
-
if (getConfig().permalink) {
|
|
51
|
-
const { permalink, prefix, uniqid } = getConfig();
|
|
52
|
-
if (uniqid === null || uniqid === void 0 ? void 0 : uniqid.trim().length) {
|
|
53
|
-
getHistory().push(generatePath(getConfig().router.wizardInstancePath, {
|
|
54
|
-
prefix: (prefix === null || prefix === void 0 ? void 0 : prefix.trim().length) ? prefix : undefined,
|
|
55
|
-
permalink,
|
|
56
|
-
uniqid,
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
getHistory().push(generatePath(getConfig().router.wizardPath, {
|
|
61
|
-
prefix: (prefix === null || prefix === void 0 ? void 0 : prefix.trim().length) ? prefix : undefined,
|
|
62
|
-
permalink,
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
else if (PathReader.isSmartScriptPath()) {
|
|
67
|
-
getHistory().push(window.location.pathname);
|
|
68
|
-
}
|
|
69
44
|
const { dispatch, getState } = getStore();
|
|
70
45
|
const state = getState();
|
|
71
46
|
dispatch(fetchModelPrerequisitesAction(getConfig().permalink || state.app.meta.permalink, getConfig().prefix || state.app.meta.prefix || ""));
|
|
72
47
|
}
|
|
48
|
+
componentWillUnmount() {
|
|
49
|
+
getStore().dispatch({ type: DANGEROUS_DESTROY_STORE });
|
|
50
|
+
}
|
|
73
51
|
render() {
|
|
74
|
-
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.
|
|
52
|
+
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: {
|
|
75
53
|
pathname: getConfig().router.notFoundPath,
|
|
76
54
|
} }, void 0))] }, void 0) }), void 0) }), void 0));
|
|
77
55
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { Action } from "redux";
|
|
2
3
|
import moment from "moment-business-days";
|
|
3
4
|
import { SmartScriptStore } from "../libs/SmartScriptStore";
|
|
@@ -26,5 +27,13 @@ declare global {
|
|
|
26
27
|
initTriggers: (callback: TInitTriggersCallback, inputs: StateType.Inputs, newInstance: boolean) => void;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
declare const
|
|
30
|
-
|
|
30
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FC<{
|
|
31
|
+
permalink: string;
|
|
32
|
+
uniqid: string;
|
|
33
|
+
metaFetchStatus: "failed" | "waiting" | "succeeded" | "unhealthy" | "userLocked" | "nonBlocking";
|
|
34
|
+
}>, import("react-redux").Omit<{
|
|
35
|
+
permalink: string;
|
|
36
|
+
uniqid: string;
|
|
37
|
+
metaFetchStatus: "failed" | "waiting" | "succeeded" | "unhealthy" | "userLocked" | "nonBlocking";
|
|
38
|
+
}, "permalink" | "uniqid" | "metaFetchStatus">>;
|
|
39
|
+
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
|
-
import { useParams } from "react-router-dom";
|
|
4
3
|
import queryString from "query-string";
|
|
5
4
|
import moment from "moment-business-days";
|
|
5
|
+
import { connect } from "react-redux";
|
|
6
6
|
import { getConfig } from "../config";
|
|
7
7
|
import { SmartScriptStore } from "../libs/SmartScriptStore";
|
|
8
|
-
|
|
8
|
+
let initTriggersCallback = null;
|
|
9
|
+
const SmartScriptComponent = ({ permalink, uniqid, metaFetchStatus, }) => {
|
|
9
10
|
const [smartScriptLoaded, setSmartScriptLoaded] = useState(false);
|
|
10
11
|
const [isNewInstance, setIsNewInstance] = useState(true);
|
|
11
|
-
const [initTriggersCallback, setInitTriggersCallback] = useState(null);
|
|
12
12
|
window.onInit = SmartScriptStore.onInit;
|
|
13
13
|
window.onLoad = SmartScriptStore.onLoad;
|
|
14
14
|
window.onOptionChange = SmartScriptStore.onOptionChange;
|
|
@@ -27,10 +27,9 @@ const SmartScriptComponent = () => {
|
|
|
27
27
|
window.displayOption = SmartScriptStore.displayOption;
|
|
28
28
|
window.moment = moment;
|
|
29
29
|
const apiEndpoint = getConfig().apiEndpoint + (/\/$/.test(getConfig().apiEndpoint) ? "" : "/");
|
|
30
|
-
const { permalink, uniqid } = useParams();
|
|
31
30
|
const modelVersion = queryString.parse(window.location.search).version;
|
|
32
31
|
useEffect(() => {
|
|
33
|
-
if (!smartScriptLoaded) {
|
|
32
|
+
if (metaFetchStatus === "succeeded" && !smartScriptLoaded) {
|
|
34
33
|
const src = `${apiEndpoint}wizard/contractv1/smartscript/${permalink}${uniqid ? `/${uniqid}` : ""}${modelVersion ? `?version=${modelVersion}` : ""}`;
|
|
35
34
|
const scriptElement = document.createElement("script");
|
|
36
35
|
scriptElement.setAttribute("src", src);
|
|
@@ -50,11 +49,11 @@ const SmartScriptComponent = () => {
|
|
|
50
49
|
}, [
|
|
51
50
|
smartScriptLoaded,
|
|
52
51
|
apiEndpoint,
|
|
53
|
-
initTriggersCallback,
|
|
54
52
|
modelVersion,
|
|
55
53
|
permalink,
|
|
56
54
|
uniqid,
|
|
57
55
|
isNewInstance,
|
|
56
|
+
metaFetchStatus,
|
|
58
57
|
]);
|
|
59
58
|
window.initTriggers = (callback, inputs, newInstance = true) => {
|
|
60
59
|
SmartScriptStore.inputs = inputs;
|
|
@@ -65,7 +64,7 @@ const SmartScriptComponent = () => {
|
|
|
65
64
|
callback(SmartScriptStore.triggers, SmartScriptStore.grabActions());
|
|
66
65
|
}
|
|
67
66
|
else {
|
|
68
|
-
|
|
67
|
+
initTriggersCallback = callback;
|
|
69
68
|
setIsNewInstance(newInstance);
|
|
70
69
|
}
|
|
71
70
|
};
|
|
@@ -83,6 +82,11 @@ const SmartScriptComponent = () => {
|
|
|
83
82
|
}
|
|
84
83
|
return SmartScriptStore.grabActions();
|
|
85
84
|
};
|
|
86
|
-
return _jsx(_Fragment, { children: "SmartScript" }, void 0);
|
|
85
|
+
return (_jsx(_Fragment, { children: smartScriptLoaded ? "SmartScript Loaded." : "Loading SmartScript..." }, void 0));
|
|
87
86
|
};
|
|
88
|
-
|
|
87
|
+
const mapStateToProps = (state) => ({
|
|
88
|
+
permalink: state.app.meta.permalink,
|
|
89
|
+
uniqid: state.app.instance.uniqid,
|
|
90
|
+
metaFetchStatus: state.app.meta.fetchStatus,
|
|
91
|
+
});
|
|
92
|
+
export default connect(mapStateToProps)(SmartScriptComponent);
|
|
@@ -55,7 +55,7 @@ describe('<View />', () => {
|
|
|
55
55
|
currentPage: 1,
|
|
56
56
|
greatestPage: 1,
|
|
57
57
|
currentSectionId: 1,
|
|
58
|
-
availableSections: [1
|
|
58
|
+
availableSections: [1],
|
|
59
59
|
currentAppState: 'wizard',
|
|
60
60
|
availableAppStates: ['wizard', 'termsheet'],
|
|
61
61
|
}));
|
|
@@ -76,7 +76,7 @@ describe('<View />', () => {
|
|
|
76
76
|
yield waitFor(() => expect(container).toContainHTML('<div><h1>Wizard test theme, WizardComponent</h1></div>'));
|
|
77
77
|
}));
|
|
78
78
|
it('Loads TermsheetComponent properly', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
79
|
-
store.dispatch(goPageAction(
|
|
79
|
+
store.dispatch(goPageAction(2));
|
|
80
80
|
yield loadTheme();
|
|
81
81
|
const { container } = render(_jsx(Provider, Object.assign({ store: store }, { children: _jsx(View, {}, void 0) }), void 0));
|
|
82
82
|
yield waitFor(() => expect(container).toContainHTML('<div><h1>Wizard test theme, TermsheetComponent</h1></div>'));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ROLE } from "@legalplace/typeorm-constants";
|
|
1
2
|
import { parseOptionLabel, parseRawWithVariables, } from "../helpers/outputsParsing";
|
|
2
3
|
import { componentConnector } from "./connector/componentConnector";
|
|
3
4
|
import { isStepAvailable } from "../redux/selectors/app";
|
|
@@ -9,7 +10,7 @@ export const canOptionDisplay = (id, index, selectors) => {
|
|
|
9
10
|
display && !selectors.selectIsSmartscriptOptionIndexHidden(id, index);
|
|
10
11
|
const grantLevel = typeof option.meta.grantLevel === "string"
|
|
11
12
|
? option.meta.grantLevel
|
|
12
|
-
:
|
|
13
|
+
: ROLE.GUEST;
|
|
13
14
|
display = display && selectors.isLevelAccessibleForUser(grantLevel);
|
|
14
15
|
return display;
|
|
15
16
|
};
|
package/dist/libs/PathReader.js
CHANGED
|
@@ -3,7 +3,8 @@ import queryString from "query-string";
|
|
|
3
3
|
import { matchPath, generatePath } from "react-router";
|
|
4
4
|
import { getConfig } from "../config";
|
|
5
5
|
import { getPluginsPageAppStates } from "../PluginLoader";
|
|
6
|
-
import { selectAvailableSections, selectAvailableAppStates, selectInstanceUniqid, } from "../redux/selectors/app";
|
|
6
|
+
import { selectAvailableSections, selectAvailableAppStates, selectInstanceUniqid, selectMetaFetchStatus, } from "../redux/selectors/app";
|
|
7
|
+
import { selectSectionReference } from "../redux/selectors/references";
|
|
7
8
|
import Globals from "../Globals";
|
|
8
9
|
export class PathReader {
|
|
9
10
|
constructor(state) {
|
|
@@ -62,15 +63,15 @@ export class PathReader {
|
|
|
62
63
|
getPageUrlName(page) {
|
|
63
64
|
const pagesArray = this.getPagination().pages;
|
|
64
65
|
if (page > pagesArray.length)
|
|
65
|
-
return `${pagesArray[pagesArray.length - 1]}`;
|
|
66
|
-
return `${pagesArray[page - 1]}`;
|
|
66
|
+
return `${pagesArray[pagesArray.length - 1][0]}`;
|
|
67
|
+
return `${pagesArray[page - 1][0]}`;
|
|
67
68
|
}
|
|
68
69
|
getPageNumber(page) {
|
|
69
70
|
const { pages } = this.getPagination();
|
|
70
71
|
const parsedPage = Number.isNaN(parseInt(page, 10))
|
|
71
72
|
? page
|
|
72
73
|
: parseInt(page, 10);
|
|
73
|
-
return pages.
|
|
74
|
+
return (pages.findIndex((currentPageNames) => currentPageNames.includes(parsedPage)) + 1 || 1);
|
|
74
75
|
}
|
|
75
76
|
getSectionId(page = this.currentPage) {
|
|
76
77
|
const availableSections = selectAvailableSections();
|
|
@@ -87,16 +88,23 @@ export class PathReader {
|
|
|
87
88
|
let appStates = [];
|
|
88
89
|
availableAppStates.forEach((currentAppState) => {
|
|
89
90
|
if (currentAppState === "wizard")
|
|
90
|
-
selectAvailableSections().forEach(() => {
|
|
91
|
-
|
|
91
|
+
selectAvailableSections().forEach((id) => {
|
|
92
|
+
let currentSectionPageNames = [pages.length + 1];
|
|
93
|
+
if (selectMetaFetchStatus() === "succeeded") {
|
|
94
|
+
const { slug } = selectSectionReference(id);
|
|
95
|
+
if (slug && slug.trim().length > 0) {
|
|
96
|
+
currentSectionPageNames = [slug, ...currentSectionPageNames];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
pages = [...pages, currentSectionPageNames];
|
|
92
100
|
appStates = [...appStates, "wizard"];
|
|
93
101
|
});
|
|
94
102
|
else if (Object.prototype.hasOwnProperty.call(this.getAppStatesPages(), currentAppState)) {
|
|
95
|
-
pages = [...pages, this.getAppStatesPages()[currentAppState]];
|
|
103
|
+
pages = [...pages, [this.getAppStatesPages()[currentAppState]]];
|
|
96
104
|
appStates = [...appStates, currentAppState];
|
|
97
105
|
}
|
|
98
106
|
else {
|
|
99
|
-
pages = [...pages, pages.length + 1];
|
|
107
|
+
pages = [...pages, [pages.length + 1]];
|
|
100
108
|
appStates = [...appStates, currentAppState];
|
|
101
109
|
}
|
|
102
110
|
});
|
|
@@ -34,6 +34,8 @@ describe('References actions test suit', () => {
|
|
|
34
34
|
outputs: {},
|
|
35
35
|
evaluations: {},
|
|
36
36
|
boxes: {},
|
|
37
|
+
optionTags: {},
|
|
38
|
+
variableTags: {}
|
|
37
39
|
};
|
|
38
40
|
const action = initReferencesAction(_obj);
|
|
39
41
|
expect(action).toEqual(Object.assign({ type: 'INIT_REFERENCES' }, _obj));
|
|
@@ -23,10 +23,20 @@ const initialState = {
|
|
|
23
23
|
sections: {},
|
|
24
24
|
documents: {},
|
|
25
25
|
},
|
|
26
|
-
documents: {
|
|
27
|
-
|
|
26
|
+
documents: {
|
|
27
|
+
main: {
|
|
28
|
+
name: "",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
sections: {
|
|
32
|
+
main: {
|
|
33
|
+
1: { id: 1, label: "", options: [] },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
28
36
|
defaults: {},
|
|
29
37
|
evaluations: {},
|
|
38
|
+
optionTags: {},
|
|
39
|
+
variableTags: {},
|
|
30
40
|
};
|
|
31
41
|
const reducersEnum = {
|
|
32
42
|
[INIT_REFERENCES]: initReferencesReducer,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as inputs from "./inputs";
|
|
2
2
|
export declare const selectorsLibrary: {
|
|
3
|
-
selectCurrentUserLevel: () => Readonly<"
|
|
3
|
+
selectCurrentUserLevel: () => Readonly<"SUPER" | "ADMIN" | "OPS" | "MANAGER" | "USER" | "GUEST" | undefined>;
|
|
4
4
|
selectUserStatus: () => Readonly<"failed" | "authenticated" | "unauthenticated" | "inprogress">;
|
|
5
5
|
selectUserValidToken: () => Readonly<boolean>;
|
|
6
6
|
selectUserEmail: () => string;
|
|
7
|
-
isLevelAccessibleForUser: (level: "
|
|
7
|
+
isLevelAccessibleForUser: (level: "SUPER" | "ADMIN" | "OPS" | "MANAGER" | "USER" | "GUEST") => Readonly<boolean>;
|
|
8
8
|
selectIsSmartscriptOptionIndexHidden: (id: number, index: number) => Readonly<boolean>;
|
|
9
9
|
selectIsSmartscriptVariableIndexHidden: (id: number, index: number) => Readonly<boolean>;
|
|
10
10
|
selectReferences: () => Readonly<import("@legalplace/referencesparser/dist/libs/References.type").ReferencesType>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const selectCurrentUserLevel: () => Readonly<"
|
|
1
|
+
export declare const selectCurrentUserLevel: () => Readonly<"SUPER" | "ADMIN" | "OPS" | "MANAGER" | "USER" | "GUEST" | undefined>;
|
|
2
2
|
export declare const selectUserStatus: () => Readonly<"failed" | "authenticated" | "unauthenticated" | "inprogress">;
|
|
3
3
|
export declare const selectUserValidToken: () => Readonly<boolean>;
|
|
4
4
|
export declare const selectUserEmail: () => string;
|
|
5
|
-
export declare const isLevelAccessibleForUser: (level: "
|
|
5
|
+
export declare const isLevelAccessibleForUser: (level: "SUPER" | "ADMIN" | "OPS" | "MANAGER" | "USER" | "GUEST") => Readonly<boolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legalplace/wizardx-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"author": "Moncef Hammou (moncef@legalplace.fr)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
"@legalplace/lp-events": "1.13.0",
|
|
25
25
|
"@legalplace/lplogic": "^2.1.6",
|
|
26
26
|
"@legalplace/model-healthcheck": "^1.1.5",
|
|
27
|
-
"@legalplace/referencesparser": "
|
|
28
|
-
"@legalplace/storybook": "2.
|
|
27
|
+
"@legalplace/referencesparser": "^2.3.12",
|
|
28
|
+
"@legalplace/storybook": "^2.171.0",
|
|
29
|
+
"@legalplace/typeorm-constants": "^2.43.0",
|
|
29
30
|
"@loadable/component": "^5.15.0",
|
|
30
31
|
"@redux-saga/core": "^1.1.3",
|
|
31
32
|
"connected-react-router": "^6.8.0",
|
|
@@ -53,9 +54,9 @@
|
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@legalplace/eslint-config": "^2.2.0",
|
|
56
|
-
"@legalplace/models-v3-types": "^
|
|
57
|
+
"@legalplace/models-v3-types": "^4.0.0",
|
|
57
58
|
"@legalplace/prettier-config": "^2.1.3",
|
|
58
|
-
"@legalplace/typeorm-entities": "
|
|
59
|
+
"@legalplace/typeorm-entities": "^4.6.0",
|
|
59
60
|
"@swc-node/jest": "^1.3.2",
|
|
60
61
|
"@swc/core": "^1.2.93",
|
|
61
62
|
"@swc/jest": "^0.2.4",
|
|
@@ -93,5 +94,5 @@
|
|
|
93
94
|
"*.test.ts",
|
|
94
95
|
"*.test.tsx"
|
|
95
96
|
],
|
|
96
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "1fb61bd835073ac75c833b826fa35e0cd04cfb42"
|
|
97
98
|
}
|