@legalplace/wizardx-core 2.6.3 → 2.7.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 +43 -0
- package/dist/App.js +13 -4
- package/dist/PluginLoader.d.ts +3 -1
- package/dist/PluginLoader.js +12 -0
- package/dist/ThemeLoader.d.ts +2 -2
- package/dist/componentsConnectors/connectBox.d.ts +3 -1
- package/dist/componentsConnectors/connectDocument.d.ts +3 -1
- package/dist/componentsConnectors/connectHeader.d.ts +3 -1
- package/dist/componentsConnectors/connectMetaTitle.d.ts +3 -1
- package/dist/componentsConnectors/connectOption.d.ts +6 -2
- package/dist/componentsConnectors/connectOption.js +1 -1
- package/dist/componentsConnectors/connectPagination.d.ts +3 -1
- package/dist/componentsConnectors/connectPreview.d.ts +3 -1
- package/dist/componentsConnectors/connectProgress.d.ts +3 -1
- package/dist/componentsConnectors/connectRootOption.d.ts +3 -1
- package/dist/componentsConnectors/connectSection.d.ts +3 -1
- package/dist/componentsConnectors/connectSection.js +7 -10
- package/dist/componentsConnectors/connectSummary.d.ts +3 -1
- package/dist/componentsConnectors/connectSummaryItem.d.ts +3 -1
- package/dist/componentsConnectors/connectVariable.d.ts +6 -2
- package/dist/componentsConnectors/connectVariable.js +1 -1
- package/dist/componentsConnectors/connectWizardWrapper.d.ts +3 -1
- package/dist/componentsConnectors/connector/componentConnector.d.ts +5 -1
- package/dist/componentsConnectors/connector/componentConnector.js +44 -4
- package/dist/componentsConnectors/connector/index.d.ts +1 -0
- package/dist/componentsConnectors/connector/index.js +1 -0
- package/dist/componentsConnectors/index.d.ts +17 -0
- package/dist/componentsConnectors/index.js +17 -0
- package/dist/componentsConnectors/library.d.ts +43 -15
- package/dist/constants/phoneValidation.d.ts +0 -1
- package/dist/constants/phoneValidation.js +0 -1
- package/dist/helpers/apiEndpoint.d.ts +1 -0
- package/dist/helpers/apiEndpoint.js +4 -0
- package/dist/helpers/index.d.ts +4 -0
- package/dist/helpers/index.js +4 -0
- package/dist/helpers/propsEqualityCheck.d.ts +1 -0
- package/dist/helpers/propsEqualityCheck.js +9 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/useActions.d.ts +2 -0
- package/dist/hooks/useActions.js +4 -0
- package/dist/hooks/useDispatch.d.ts +1 -0
- package/dist/hooks/useDispatch.js +4 -0
- package/dist/hooks/useSelectors.d.ts +2 -0
- package/dist/hooks/useSelectors.js +4 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/libs/EventsTracking.d.ts +0 -1
- package/dist/libs/EventsTracking.js +0 -18
- package/dist/libs/PathReader.d.ts +10 -6
- package/dist/libs/PathReader.js +47 -28
- package/dist/libs/index.d.ts +5 -0
- package/dist/libs/index.js +5 -0
- package/dist/redux/actions/index.d.ts +9 -0
- package/dist/redux/actions/index.js +9 -0
- package/dist/redux/actions/library.d.ts +59 -63
- package/dist/redux/actions/sagas/index.d.ts +3 -0
- package/dist/redux/actions/sagas/index.js +3 -0
- package/dist/redux/actions/sagas/model.d.ts +1 -5
- package/dist/redux/constants/app.d.ts +2 -0
- package/dist/redux/constants/app.js +2 -0
- package/dist/redux/constants/index.d.ts +8 -0
- package/dist/redux/constants/index.js +8 -0
- package/dist/redux/constants/sagas/index.d.ts +3 -0
- package/dist/redux/constants/sagas/index.js +3 -0
- package/dist/redux/index.d.ts +5 -0
- package/dist/redux/index.js +5 -0
- package/dist/redux/middlewares/conditionsWatcherMiddleware.js +11 -5
- package/dist/redux/middlewares/conditionsWatcherMiddleware.test.js +120 -113
- package/dist/redux/middlewares/paginationWatcherMiddleware.js +2 -2
- package/dist/redux/middlewares/smartscriptMiddleware.js +8 -0
- package/dist/redux/reducers/pluginsStore.d.ts +3 -0
- package/dist/redux/reducers/pluginsStore.js +12 -0
- package/dist/redux/routerHistory.js +2 -2
- package/dist/redux/sagas/fetchModel.js +22 -6
- package/dist/redux/sagas/initInputs.js +6 -7
- package/dist/redux/sagas/saveData.js +3 -46
- package/dist/redux/sagas/setUserEmail.js +1 -28
- package/dist/redux/selectors/app.js +13 -18
- package/dist/redux/selectors/cache.d.ts +17 -0
- package/dist/redux/selectors/cache.js +35 -0
- package/dist/redux/selectors/conditions.js +7 -7
- package/dist/redux/selectors/index.d.ts +8 -0
- package/dist/redux/selectors/index.js +8 -0
- package/dist/redux/selectors/inputs.js +3 -3
- package/dist/redux/selectors/library.d.ts +2 -2
- package/dist/redux/selectors/references.js +26 -26
- package/dist/redux/selectors/selectors.d.ts +2 -2
- package/dist/redux/selectors/selectors.js +19 -8
- package/dist/redux/selectors/selectors.test.js +6 -6
- package/dist/redux/selectors/user.js +5 -5
- package/dist/redux/store.d.ts +1 -1
- package/dist/redux/store.js +12 -4
- package/dist/service/api.manager.d.ts +1 -6
- package/dist/service/index.d.ts +3 -0
- package/dist/service/index.js +3 -0
- package/dist/types/PluginConfig.type.d.ts +57 -0
- package/dist/types/PluginConfig.type.js +1 -0
- package/dist/types/State.type.d.ts +6 -0
- package/dist/types/config.type.d.ts +3 -1
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +11 -0
- package/package.json +11 -12
- package/.depcheckrc +0 -1
- package/.eslintignore +0 -2
- package/.eslintrc +0 -5
- package/__mocks__/fileMock.js +0 -1
- package/babel.config.json +0 -3
- package/dist/helpers/sendinblueHelper.d.ts +0 -4
- package/dist/helpers/sendinblueHelper.js +0 -46
- package/dist/libs/Extracts.d.ts +0 -20
- package/dist/libs/Extracts.js +0 -110
- package/jest.config.ts +0 -193
- package/setupJest.ts +0 -8
- package/src/App.test.tsx +0 -41
- package/src/App.tsx +0 -152
- package/src/Globals.ts +0 -69
- package/src/Loader.tsx +0 -8
- package/src/PluginLoader.test.tsx +0 -70
- package/src/PluginLoader.tsx +0 -407
- package/src/Shimmer.tsx +0 -108
- package/src/ThemeLoader.test.tsx +0 -82
- package/src/ThemeLoader.tsx +0 -95
- package/src/components/PluginRoute.tsx +0 -48
- package/src/components/SmartScript.tsx +0 -166
- package/src/components/UserLocked/UserLockedComponent.tsx +0 -33
- package/src/components/View.test.tsx +0 -110
- package/src/components/View.tsx +0 -114
- package/src/componentsConnectors/connectBox.test.tsx +0 -226
- package/src/componentsConnectors/connectBox.tsx +0 -70
- package/src/componentsConnectors/connectDocument.test.tsx +0 -108
- package/src/componentsConnectors/connectDocument.tsx +0 -64
- package/src/componentsConnectors/connectHeader.tsx +0 -21
- package/src/componentsConnectors/connectMetaTitle.test.tsx +0 -40
- package/src/componentsConnectors/connectMetaTitle.tsx +0 -8
- package/src/componentsConnectors/connectOption.tsx +0 -222
- package/src/componentsConnectors/connectPagination.tsx +0 -102
- package/src/componentsConnectors/connectPreview.tsx +0 -5
- package/src/componentsConnectors/connectProgress.tsx +0 -59
- package/src/componentsConnectors/connectRootOption.tsx +0 -95
- package/src/componentsConnectors/connectSection.tsx +0 -79
- package/src/componentsConnectors/connectSummary.tsx +0 -21
- package/src/componentsConnectors/connectSummaryItem.tsx +0 -102
- package/src/componentsConnectors/connectTermsheet.tsx +0 -359
- package/src/componentsConnectors/connectVariable.tsx +0 -191
- package/src/componentsConnectors/connectWizardWrapper.tsx +0 -30
- package/src/componentsConnectors/connector/componentConnector.tsx +0 -219
- package/src/componentsConnectors/library.ts +0 -35
- package/src/config.test.ts +0 -63
- package/src/config.ts +0 -11
- package/src/constants/emailValidation.ts +0 -2
- package/src/constants/phoneValidation.ts +0 -6
- package/src/definitions/path.join.d.ts +0 -4
- package/src/helpers/outputsParsing.ts +0 -412
- package/src/helpers/preloadTheme.ts +0 -17
- package/src/helpers/scriptsLoader.ts +0 -20
- package/src/helpers/sendinblueHelper.ts +0 -65
- package/src/hooks/usePrevious.ts +0 -9
- package/src/libs/ConditionsInitiator.ts +0 -164
- package/src/libs/ConditionsRunner/DataPopulator.ts +0 -266
- package/src/libs/ConditionsRunner.ts +0 -454
- package/src/libs/DocumentsOutputs.ts +0 -171
- package/src/libs/Eval/EvalBase.ts +0 -116
- package/src/libs/Eval/EvalFunctions.ts +0 -724
- package/src/libs/Eval/NumbersToLetters.ts +0 -185
- package/src/libs/EvalVariable.ts +0 -265
- package/src/libs/EventsTracking.ts +0 -276
- package/src/libs/Extracts.ts +0 -159
- package/src/libs/InputsInitiator.ts +0 -136
- package/src/libs/NumAuto.test.ts +0 -55
- package/src/libs/NumAuto.ts +0 -56
- package/src/libs/OvcConverter.ts +0 -285
- package/src/libs/PathReader.ts +0 -272
- package/src/libs/SectionValidity.test.ts +0 -146
- package/src/libs/SectionValidity.ts +0 -110
- package/src/libs/SmartScriptStore.ts +0 -492
- package/src/misc/test_model.ts +0 -14603
- package/src/misc/test_models/connectDocumen.testmodel.json +0 -178
- package/src/misc/test_models/setDefaults.testmodel.json +0 -279
- package/src/misc/test_models/testmodel.json +0 -1
- package/src/polyfills/index.ts +0 -5
- package/src/polyfills/objectValues.ts +0 -4
- package/src/polyfills/prepend.ts +0 -31
- package/src/polyfills/stringRepeat.ts +0 -44
- package/src/redux/actions/app.test.ts +0 -123
- package/src/redux/actions/app.ts +0 -249
- package/src/redux/actions/conditions.test.ts +0 -84
- package/src/redux/actions/conditions.ts +0 -135
- package/src/redux/actions/inputs.test.ts +0 -85
- package/src/redux/actions/inputs.ts +0 -111
- package/src/redux/actions/library.ts +0 -23
- package/src/redux/actions/mandatories.ts +0 -98
- package/src/redux/actions/references.test.ts +0 -48
- package/src/redux/actions/references.ts +0 -37
- package/src/redux/actions/sagas/data.test.ts +0 -11
- package/src/redux/actions/sagas/data.ts +0 -18
- package/src/redux/actions/sagas/model.test.ts +0 -14
- package/src/redux/actions/sagas/model.ts +0 -48
- package/src/redux/actions/sagas/user.ts +0 -25
- package/src/redux/actions/smartscript.ts +0 -55
- package/src/redux/actions/user.test.ts +0 -18
- package/src/redux/actions/user.ts +0 -41
- package/src/redux/constants/app.ts +0 -36
- package/src/redux/constants/conditions.ts +0 -25
- package/src/redux/constants/inputs.ts +0 -15
- package/src/redux/constants/mandatories.ts +0 -11
- package/src/redux/constants/references.ts +0 -7
- package/src/redux/constants/sagas/data.ts +0 -1
- package/src/redux/constants/sagas/model.ts +0 -2
- package/src/redux/constants/sagas/user.ts +0 -2
- package/src/redux/constants/smartscript.ts +0 -9
- package/src/redux/constants/user.ts +0 -6
- package/src/redux/listeners/subscriber.test.ts +0 -45
- package/src/redux/listeners/subscriber.ts +0 -29
- package/src/redux/middlewares/conditionsWatcherMiddleware.test.ts +0 -370
- package/src/redux/middlewares/conditionsWatcherMiddleware.ts +0 -321
- package/src/redux/middlewares/evaluationsWatcherMiddleware.test.ts +0 -323
- package/src/redux/middlewares/evaluationsWatcherMiddleware.ts +0 -250
- package/src/redux/middlewares/mandatoriesWatcherMiddleware.ts +0 -473
- package/src/redux/middlewares/multiplesActionsMiddleware.test.ts +0 -230
- package/src/redux/middlewares/multiplesActionsMiddleware.ts +0 -121
- package/src/redux/middlewares/paginationWatcherMiddleware.ts +0 -251
- package/src/redux/middlewares/pluginsHookMiddleware.ts +0 -24
- package/src/redux/middlewares/prefillerWatcherMiddleware.test.ts +0 -118
- package/src/redux/middlewares/prefillerWatcherMiddleware.ts +0 -462
- package/src/redux/middlewares/smartscriptMiddleware.ts +0 -228
- package/src/redux/middlewares/thirdpartyScriptsMiddleware.ts +0 -41
- package/src/redux/reducers/app/customizations/initCustomizationAutoDefault.ts +0 -16
- package/src/redux/reducers/app/customizations/initCustomizationMeta.ts +0 -16
- package/src/redux/reducers/app/instance/initInstance.ts +0 -29
- package/src/redux/reducers/app/instance/setDataStatus.ts +0 -16
- package/src/redux/reducers/app/instance/updateInstance.ts +0 -30
- package/src/redux/reducers/app/instance/updateInstancePaid.ts +0 -20
- package/src/redux/reducers/app/instance.test.ts +0 -106
- package/src/redux/reducers/app/meta/fetchModelFailed.ts +0 -11
- package/src/redux/reducers/app/meta/fetchModelNonBlocking.ts +0 -11
- package/src/redux/reducers/app/meta/fetchModelSucceeded.ts +0 -11
- package/src/redux/reducers/app/meta/fetchModelUnhealthy.ts +0 -18
- package/src/redux/reducers/app/meta/fetchModelUserLocked.ts +0 -11
- package/src/redux/reducers/app/meta/initMeta.ts +0 -22
- package/src/redux/reducers/app/meta/setModelUuid.ts +0 -17
- package/src/redux/reducers/app/meta.test.ts +0 -90
- package/src/redux/reducers/app/pagination/goNextPage.ts +0 -69
- package/src/redux/reducers/app/pagination/goPage.ts +0 -81
- package/src/redux/reducers/app/pagination/goPreviousPage.ts +0 -60
- package/src/redux/reducers/app/pagination/initPagination.ts +0 -46
- package/src/redux/reducers/app/pagination/updateAvailableAppStates.ts +0 -77
- package/src/redux/reducers/app/pagination.test.ts +0 -363
- package/src/redux/reducers/app/wizard/updateAvailableSections.ts +0 -40
- package/src/redux/reducers/app/wizard.test.ts +0 -84
- package/src/redux/reducers/app.test.ts +0 -336
- package/src/redux/reducers/app.ts +0 -150
- package/src/redux/reducers/conditions/addMultipleOccurency.test.ts +0 -131
- package/src/redux/reducers/conditions/addMultipleOccurency.ts +0 -155
- package/src/redux/reducers/conditions/deleteMultipleOccurency.test.ts +0 -95
- package/src/redux/reducers/conditions/deleteMultipleOccurency.ts +0 -141
- package/src/redux/reducers/conditions/initConditions.ts +0 -18
- package/src/redux/reducers/conditions/updateDocumentConditions.test.ts +0 -47
- package/src/redux/reducers/conditions/updateDocumentConditions.ts +0 -21
- package/src/redux/reducers/conditions/updateOptionConditions.ts +0 -24
- package/src/redux/reducers/conditions/updateOptionValidatorCondition.test.ts +0 -50
- package/src/redux/reducers/conditions/updateOptionValidatorCondition.ts +0 -28
- package/src/redux/reducers/conditions/updatePrefillerConditions.ts +0 -29
- package/src/redux/reducers/conditions/updateSectionConditions.ts +0 -28
- package/src/redux/reducers/conditions/updateVariableConditions.ts +0 -25
- package/src/redux/reducers/conditions/updateVariableValidatorCondition.test.ts +0 -50
- package/src/redux/reducers/conditions/updateVariableValidatorCondition.ts +0 -28
- package/src/redux/reducers/conditions.test.ts +0 -241
- package/src/redux/reducers/conditions.ts +0 -68
- package/src/redux/reducers/inputs/addMultipleOccurency.test.ts +0 -117
- package/src/redux/reducers/inputs/addMultipleOccurency.ts +0 -50
- package/src/redux/reducers/inputs/deleteMultipleOccurency.test.ts +0 -70
- package/src/redux/reducers/inputs/deleteMultipleOccurency.ts +0 -50
- package/src/redux/reducers/inputs/initOption.ts +0 -16
- package/src/redux/reducers/inputs/initVariable.ts +0 -16
- package/src/redux/reducers/inputs/updateOptionInput.ts +0 -24
- package/src/redux/reducers/inputs/updateVariableInput.ts +0 -24
- package/src/redux/reducers/inputs.test.ts +0 -221
- package/src/redux/reducers/inputs.ts +0 -51
- package/src/redux/reducers/mandatories/addMultipleOccurency.ts +0 -52
- package/src/redux/reducers/mandatories/deleteMultipleOccurency.ts +0 -55
- package/src/redux/reducers/mandatories/initMandatoryOption.ts +0 -17
- package/src/redux/reducers/mandatories/initMandatoryVariable.ts +0 -17
- package/src/redux/reducers/mandatories/setMandatoryIgnore.ts +0 -17
- package/src/redux/reducers/mandatories/setMandatoryOption.ts +0 -25
- package/src/redux/reducers/mandatories/setMandatorySection.ts +0 -20
- package/src/redux/reducers/mandatories/setMandatoryVariable.ts +0 -24
- package/src/redux/reducers/mandatories.ts +0 -56
- package/src/redux/reducers/references/initReferences.ts +0 -37
- package/src/redux/reducers/references/updateOptionMeta.ts +0 -73
- package/src/redux/reducers/references/updateVariableMeta.ts +0 -72
- package/src/redux/reducers/references.ts +0 -59
- package/src/redux/reducers/smartscript/enableSmartScript.ts +0 -13
- package/src/redux/reducers/smartscript/initSmartScriptTriggers.ts +0 -14
- package/src/redux/reducers/smartscript/updateSmartscriptOptionHidden.ts +0 -30
- package/src/redux/reducers/smartscript/updateSmartscriptVariableHidden.ts +0 -30
- package/src/redux/reducers/smartscript.ts +0 -47
- package/src/redux/reducers/user/initUser.ts +0 -15
- package/src/redux/reducers/user/setUserStatus.ts +0 -13
- package/src/redux/reducers/user/setUserValidToken.ts +0 -13
- package/src/redux/reducers/user.test.ts +0 -51
- package/src/redux/reducers/user.ts +0 -40
- package/src/redux/routerHistore.test.ts +0 -19
- package/src/redux/routerHistory.ts +0 -26
- package/src/redux/sagas/fetchModel.test.ts +0 -76
- package/src/redux/sagas/fetchModel.ts +0 -683
- package/src/redux/sagas/homogeneousRadioInputsSaga.ts +0 -42
- package/src/redux/sagas/initInputs.ts +0 -110
- package/src/redux/sagas/runner.test.ts +0 -12
- package/src/redux/sagas/runner.ts +0 -26
- package/src/redux/sagas/saveData.test.ts +0 -125
- package/src/redux/sagas/saveData.ts +0 -116
- package/src/redux/sagas/setDefaults.test.ts +0 -100
- package/src/redux/sagas/setDefaults.ts +0 -167
- package/src/redux/sagas/setUserEmail.ts +0 -221
- package/src/redux/selectors/app.test.ts +0 -162
- package/src/redux/selectors/app.ts +0 -331
- package/src/redux/selectors/conditions.test.ts +0 -92
- package/src/redux/selectors/conditions.ts +0 -293
- package/src/redux/selectors/inputs.test.ts +0 -72
- package/src/redux/selectors/inputs.ts +0 -76
- package/src/redux/selectors/library.ts +0 -17
- package/src/redux/selectors/mandatories.ts +0 -83
- package/src/redux/selectors/references.test.ts +0 -660
- package/src/redux/selectors/references.ts +0 -413
- package/src/redux/selectors/selectors.test.ts +0 -21
- package/src/redux/selectors/selectors.ts +0 -87
- package/src/redux/selectors/smartscript.ts +0 -30
- package/src/redux/selectors/user.test.ts +0 -39
- package/src/redux/selectors/user.ts +0 -45
- package/src/redux/store.test.ts +0 -22
- package/src/redux/store.ts +0 -100
- package/src/service/api.manager.ts +0 -261
- package/src/service/auth.service.ts +0 -5
- package/src/service/pardot.service.ts +0 -10
- package/src/tests-misc/plugins/jestTestPlugin/after.tsx +0 -5
- package/src/tests-misc/plugins/jestTestPlugin/before.tsx +0 -11
- package/src/tests-misc/plugins/jestTestPlugin/index.ts +0 -11
- package/src/tests-misc/plugins/jestTestPlugin/title.tsx +0 -8
- package/src/tests-misc/themes/jestTestTheme/components/EmailComponent.tsx +0 -5
- package/src/tests-misc/themes/jestTestTheme/components/TermsheetComponent.tsx +0 -5
- package/src/tests-misc/themes/jestTestTheme/components/WizardComponent.tsx +0 -5
- package/src/tests-misc/themes/jestTestTheme/faltyIndex.ts +0 -3
- package/src/tests-misc/themes/jestTestTheme/faltyIndexLoader.ts +0 -1
- package/src/tests-misc/themes/jestTestTheme/index.ts +0 -13
- package/src/types/Actions.type.ts +0 -612
- package/src/types/Components.type.ts +0 -181
- package/src/types/State.type.ts +0 -323
- package/src/types/Termsheet.type.ts +0 -28
- package/src/types/api.type.ts +0 -37
- package/src/types/config.type.ts +0 -55
- package/src/types/env.type.ts +0 -5
- package/src/types/getActions.type.ts +0 -3
- package/src/types/getConnectors.type.ts +0 -5
- package/src/types/getSelectors.type.ts +0 -3
- package/src/wizard-params.ts +0 -56
- package/tsconfig.json +0 -43
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import type { OptionV3, VariableV3 } from "@legalplace/models-v3-types";
|
|
2
|
-
import { TermsheetRow } from "./Termsheet.type";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Progress component Props
|
|
6
|
-
*/
|
|
7
|
-
export interface ProgressPropsType {
|
|
8
|
-
currentSectionTitle: string;
|
|
9
|
-
currentSectionId: number;
|
|
10
|
-
currentSection: number;
|
|
11
|
-
currentPage: number;
|
|
12
|
-
greatestPage: number;
|
|
13
|
-
totalPages: number;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Pagination component Props
|
|
18
|
-
*/
|
|
19
|
-
export interface PaginationPropsFromState {
|
|
20
|
-
totalPages: number;
|
|
21
|
-
isFirstPage: boolean;
|
|
22
|
-
isLastPage: boolean;
|
|
23
|
-
currentPage: number;
|
|
24
|
-
nextKpmgView: string;
|
|
25
|
-
}
|
|
26
|
-
export interface PaginationPropsFromDispatch {
|
|
27
|
-
goNextPage: () => void;
|
|
28
|
-
goPreviousPage: () => void;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type PaginationPropsType = PaginationPropsFromState &
|
|
32
|
-
PaginationPropsFromDispatch;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* DocumentTitle component Props
|
|
36
|
-
*/
|
|
37
|
-
export interface DocumentTitlePropsType {
|
|
38
|
-
title: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Section component Props
|
|
43
|
-
*/
|
|
44
|
-
export interface SectionPropsType {
|
|
45
|
-
id: number;
|
|
46
|
-
title: string;
|
|
47
|
-
childOptions: number[];
|
|
48
|
-
tags?: string[];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Root option component Props
|
|
53
|
-
*/
|
|
54
|
-
export interface RootOptionPropsFromState {
|
|
55
|
-
id: number;
|
|
56
|
-
multiple: boolean;
|
|
57
|
-
values: boolean[];
|
|
58
|
-
meta: OptionV3["meta"];
|
|
59
|
-
}
|
|
60
|
-
export interface RootOptionPropsFromDispatch {
|
|
61
|
-
addMultipleOccurency: () => void;
|
|
62
|
-
deleteMultipleOccurency: (index: number) => void;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface RootOptionPropsType
|
|
66
|
-
extends RootOptionPropsFromDispatch,
|
|
67
|
-
RootOptionPropsFromState {}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Option component Props
|
|
71
|
-
*/
|
|
72
|
-
export interface OptionPropsFromState {
|
|
73
|
-
id: number;
|
|
74
|
-
index: number;
|
|
75
|
-
label: string;
|
|
76
|
-
type: string;
|
|
77
|
-
value: boolean;
|
|
78
|
-
condition?: boolean;
|
|
79
|
-
validator?: boolean;
|
|
80
|
-
display: boolean;
|
|
81
|
-
meta: OptionV3["meta"];
|
|
82
|
-
selectedRadioChild: number;
|
|
83
|
-
childOptions: number[];
|
|
84
|
-
childVariables: number[];
|
|
85
|
-
}
|
|
86
|
-
export interface OptionPropsFromDispatch {
|
|
87
|
-
updateOption: (value: boolean, id?: number, index?: number) => void;
|
|
88
|
-
}
|
|
89
|
-
export interface OptionPropsType
|
|
90
|
-
extends OptionPropsFromState,
|
|
91
|
-
OptionPropsFromDispatch {
|
|
92
|
-
deleteOccurency?: (() => void) | false;
|
|
93
|
-
addOccurency?: JSX.Element;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Variable component Props
|
|
98
|
-
*/
|
|
99
|
-
export interface VariablePropsFromState {
|
|
100
|
-
id: number;
|
|
101
|
-
index: number;
|
|
102
|
-
label: string;
|
|
103
|
-
type: string;
|
|
104
|
-
value: string | number;
|
|
105
|
-
condition: boolean | undefined;
|
|
106
|
-
validator: boolean | undefined;
|
|
107
|
-
display: boolean;
|
|
108
|
-
evalVariables?: Record<string, string | number>;
|
|
109
|
-
meta: VariableV3;
|
|
110
|
-
}
|
|
111
|
-
export interface VariablePropsFromDispatch {
|
|
112
|
-
updateVariable: (value: string | number) => void;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface VariablePropsType
|
|
116
|
-
extends VariablePropsFromState,
|
|
117
|
-
VariablePropsFromDispatch {
|
|
118
|
-
hideLabel?: boolean;
|
|
119
|
-
hideInput?: boolean;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Outputs props type
|
|
124
|
-
*/
|
|
125
|
-
export interface OutputsPropsType {
|
|
126
|
-
document: string;
|
|
127
|
-
outputs: (number | string)[][];
|
|
128
|
-
multipleOptionsOccurencies: Record<string, number>;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export interface SingleOutputPropsTypes {
|
|
132
|
-
id: number;
|
|
133
|
-
index: number;
|
|
134
|
-
type: string;
|
|
135
|
-
output: string;
|
|
136
|
-
condition: boolean | undefined;
|
|
137
|
-
children: number[];
|
|
138
|
-
tags?: string[];
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Box props type
|
|
143
|
-
*/
|
|
144
|
-
export interface BoxPropsTypes {
|
|
145
|
-
id: number;
|
|
146
|
-
index: number;
|
|
147
|
-
type: string;
|
|
148
|
-
content: string;
|
|
149
|
-
boxType: string;
|
|
150
|
-
boxTitle: string;
|
|
151
|
-
boxCollapsable: boolean;
|
|
152
|
-
boxAggregatable: boolean;
|
|
153
|
-
condition?: boolean;
|
|
154
|
-
children: number[];
|
|
155
|
-
tags?: string[];
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Termsheet component Props
|
|
160
|
-
*/
|
|
161
|
-
export interface TermsheetPropsType {
|
|
162
|
-
termsheet: TermsheetRow[];
|
|
163
|
-
parseLink: (page: number) => string;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Section component Props
|
|
168
|
-
*/
|
|
169
|
-
export interface SectionsSummaryPropsType {
|
|
170
|
-
sections: number[];
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface SingleSectionsSummaryPropsType {
|
|
174
|
-
id: number;
|
|
175
|
-
link: string;
|
|
176
|
-
label: string;
|
|
177
|
-
validity: boolean;
|
|
178
|
-
preLabel: string;
|
|
179
|
-
active: boolean;
|
|
180
|
-
pageNumber: number;
|
|
181
|
-
}
|
package/src/types/State.type.ts
DELETED
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
3
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
4
|
-
import type {
|
|
5
|
-
OptionV3,
|
|
6
|
-
VariableV3,
|
|
7
|
-
SectionV3,
|
|
8
|
-
ConditionV3,
|
|
9
|
-
ModelV3,
|
|
10
|
-
} from "@legalplace/models-v3-types";
|
|
11
|
-
import type { Types } from "@legalplace/referencesparser";
|
|
12
|
-
|
|
13
|
-
import type { HealthCheckReport } from "@legalplace/model-healthcheck/dist/libs/HealthCheck.type";
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Wizard State's Types
|
|
17
|
-
* --------------------
|
|
18
|
-
* Note:
|
|
19
|
-
* - If you don't know what you're doing DO NOT TOUCH THIS FILE
|
|
20
|
-
* - If you do know what you're doing BE VERY CAREFUL WITH THE NAMINGS
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
export type MAPPED_CONDITIONS = {
|
|
24
|
-
dataMap: {
|
|
25
|
-
o: number[];
|
|
26
|
-
v: number[];
|
|
27
|
-
c: { o: number[]; v: number[]; s: number[] };
|
|
28
|
-
};
|
|
29
|
-
conditions: ConditionV3;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// State type
|
|
33
|
-
export interface StateType {
|
|
34
|
-
router: any;
|
|
35
|
-
app: AppType;
|
|
36
|
-
user?: UserType;
|
|
37
|
-
inputs: InputsType;
|
|
38
|
-
mandatories: MandatoriesType;
|
|
39
|
-
conditions: ConditionsType;
|
|
40
|
-
references: Types.ReferencesType;
|
|
41
|
-
smartscript: SmartScriptType;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export namespace StateType {
|
|
45
|
-
// State.app
|
|
46
|
-
export interface App extends AppType {}
|
|
47
|
-
export namespace App {
|
|
48
|
-
export interface Meta extends AppMetaType {}
|
|
49
|
-
export interface Instance extends AppInstanceType {}
|
|
50
|
-
export interface Pagination extends AppPaginationType {}
|
|
51
|
-
export interface Wizard extends AppWizardType {}
|
|
52
|
-
export interface Customization extends AppCustomizationType {}
|
|
53
|
-
export namespace Customization {
|
|
54
|
-
export interface meta extends AppCustomizationMetaType {}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// State.user
|
|
59
|
-
export interface User extends UserType {}
|
|
60
|
-
|
|
61
|
-
// State.inputs
|
|
62
|
-
export interface Inputs extends InputsType {}
|
|
63
|
-
export namespace Inputs {
|
|
64
|
-
export interface Options extends InputsOptionsType {}
|
|
65
|
-
export interface Variables extends InputsVariablesType {}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// State.mandatories
|
|
69
|
-
export interface Mandatories extends MandatoriesType {}
|
|
70
|
-
export namespace Mandatories {
|
|
71
|
-
export type Ignore = boolean;
|
|
72
|
-
export interface Sections extends MandatoriesSectionsType {}
|
|
73
|
-
export interface Options extends MandatoriesOptionsType {}
|
|
74
|
-
export interface Variables extends MandatoriesVariablesType {}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// State.conditions
|
|
78
|
-
export interface Conditions extends ConditionsType {}
|
|
79
|
-
export namespace Conditions {
|
|
80
|
-
export interface Options extends ConditionsOptionsType {}
|
|
81
|
-
export interface Variables extends ConditionsVariablesType {}
|
|
82
|
-
export interface Sections extends ConditionsSectionsDocumentType {}
|
|
83
|
-
export interface Prefillers extends ConditionsPrefillersType {}
|
|
84
|
-
|
|
85
|
-
export interface Validators extends ConditionsValidatorsType {}
|
|
86
|
-
|
|
87
|
-
export namespace Validators {
|
|
88
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
89
|
-
export interface Options extends ConditionsValidatorsOptionsType {}
|
|
90
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
91
|
-
export interface Variables extends ConditionsValidatorsVariablesType {}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// State.references
|
|
96
|
-
export interface References extends Types.ReferencesType {}
|
|
97
|
-
export namespace References {
|
|
98
|
-
export interface Options extends Types.ReferencesOptionsType {}
|
|
99
|
-
export namespace Options {
|
|
100
|
-
export interface Option extends OptionV3 {}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface Variables extends Types.ReferencesVariablesType {}
|
|
104
|
-
export namespace Variables {
|
|
105
|
-
export interface Variable extends VariableV3 {}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface Outputs extends Types.ReferencesOutputsType {}
|
|
109
|
-
export namespace Outputs {
|
|
110
|
-
export interface Output extends Types.ReferencesSingleOutputType {}
|
|
111
|
-
}
|
|
112
|
-
export namespace Boxes {
|
|
113
|
-
export interface Box extends Types.ReferencesSingleBoxType {}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export interface Sections extends Types.ReferencesSectionsType {}
|
|
117
|
-
export namespace Sections {
|
|
118
|
-
export interface Document extends Types.ReferencesSectionsDocumentType {}
|
|
119
|
-
export interface Section extends SectionV3 {}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface Relations extends Types.ReferencesRelationsType {}
|
|
123
|
-
export namespace Relations {
|
|
124
|
-
export interface Options extends Types.ReferencesRelationsOptionsType {}
|
|
125
|
-
export interface Variables
|
|
126
|
-
extends Types.ReferencesRelationsVariablesType {}
|
|
127
|
-
export interface Sections extends Types.ReferencesRelationsSectionsType {}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export interface Defaults extends Types.ReferencesDefaultsSectionType {}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// State.smartscript
|
|
134
|
-
export interface SmartScript extends SmartScriptType {}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* DEFINING TYPES USED ABOVE
|
|
139
|
-
*/
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* State.app Types
|
|
143
|
-
*/
|
|
144
|
-
export interface AppType {
|
|
145
|
-
meta: AppMetaType;
|
|
146
|
-
instance: AppInstanceType;
|
|
147
|
-
pagination: AppPaginationType;
|
|
148
|
-
wizard: AppWizardType;
|
|
149
|
-
customization: AppCustomizationType;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export interface AppPaginationType {
|
|
153
|
-
currentAppState: string;
|
|
154
|
-
availableAppStates: string[];
|
|
155
|
-
currentPage: number;
|
|
156
|
-
greatestPage: number;
|
|
157
|
-
isFirstPage: boolean;
|
|
158
|
-
isLastPage: boolean;
|
|
159
|
-
totalPages: number;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export interface AppWizardType {
|
|
163
|
-
currentSectionId: number;
|
|
164
|
-
availableSections: number[];
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface AppCustomizationType {
|
|
168
|
-
disableAutoDefault?: boolean;
|
|
169
|
-
meta?: AppCustomizationMetaType;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export type ModelV3CustomizationMeta = Exclude<
|
|
173
|
-
ModelV3["customization"]["meta"],
|
|
174
|
-
undefined
|
|
175
|
-
>;
|
|
176
|
-
|
|
177
|
-
export interface AppCustomizationMetaType extends ModelV3CustomizationMeta {}
|
|
178
|
-
|
|
179
|
-
export interface AppInstanceType {
|
|
180
|
-
dataStatus: "saved" | "unsaved" | "saving" | "failed";
|
|
181
|
-
uniqid: string;
|
|
182
|
-
companyId?: number;
|
|
183
|
-
employeeId?: number;
|
|
184
|
-
isPaid?: boolean;
|
|
185
|
-
isOrderHandled?: boolean;
|
|
186
|
-
draft?: boolean;
|
|
187
|
-
steps: "*" | number[];
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export interface AppMetaType {
|
|
191
|
-
fetchStatus:
|
|
192
|
-
| "waiting"
|
|
193
|
-
| "succeeded"
|
|
194
|
-
| "failed"
|
|
195
|
-
| "unhealthy"
|
|
196
|
-
| "userLocked"
|
|
197
|
-
| "nonBlocking";
|
|
198
|
-
id: number;
|
|
199
|
-
permalink: string;
|
|
200
|
-
prefix: string;
|
|
201
|
-
title: string;
|
|
202
|
-
modelVersion: number;
|
|
203
|
-
productType: string;
|
|
204
|
-
modelUuid?: string;
|
|
205
|
-
smartScript?: string;
|
|
206
|
-
report?: {
|
|
207
|
-
object: HealthCheckReport;
|
|
208
|
-
raw: string;
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* State.user
|
|
214
|
-
*/
|
|
215
|
-
export interface UserType {
|
|
216
|
-
status: "authenticated" | "unauthenticated" | "inprogress" | "failed";
|
|
217
|
-
email: string;
|
|
218
|
-
displayName: string;
|
|
219
|
-
level: "ADMIN" | "MANAGER" | "USER" | "GUEST" | "SUPER";
|
|
220
|
-
validToken?: boolean;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* State.inputs
|
|
225
|
-
*/
|
|
226
|
-
export interface InputsType {
|
|
227
|
-
options: InputsOptionsType;
|
|
228
|
-
variables: InputsVariablesType;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export interface InputsOptionsType {
|
|
232
|
-
[key: string]: boolean[];
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export interface InputsVariablesType {
|
|
236
|
-
[key: string]: (string | number)[];
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* State.mandatories
|
|
241
|
-
*/
|
|
242
|
-
export interface MandatoriesType {
|
|
243
|
-
ignore: boolean;
|
|
244
|
-
sections: MandatoriesSectionsType;
|
|
245
|
-
options: MandatoriesOptionsType;
|
|
246
|
-
variables: MandatoriesVariablesType;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export interface MandatoriesSectionsType {
|
|
250
|
-
[k: string]: boolean;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export interface MandatoriesOptionsType {
|
|
254
|
-
[k: string]: boolean[];
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export interface MandatoriesVariablesType {
|
|
258
|
-
[k: string]: boolean[];
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* State.conditions
|
|
263
|
-
*/
|
|
264
|
-
export interface ConditionsType {
|
|
265
|
-
options: ConditionsOptionsType;
|
|
266
|
-
variables: ConditionsVariablesType;
|
|
267
|
-
documents: ConditionsDocumentsType;
|
|
268
|
-
sections: ConditionsSectionsType;
|
|
269
|
-
prefillers: ConditionsPrefillersType;
|
|
270
|
-
validators: ConditionsValidatorsType;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export interface ConditionsOptionsType {
|
|
274
|
-
[key: string]: boolean[];
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
export interface ConditionsVariablesType {
|
|
278
|
-
[key: string]: boolean[];
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export interface ConditionsSectionsType {
|
|
282
|
-
[key: string]: ConditionsSectionsDocumentType;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export interface ConditionsDocumentsType {
|
|
286
|
-
[key: string]: boolean;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export interface ConditionsSectionsDocumentType {
|
|
290
|
-
[key: string]: boolean;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
export interface ConditionsPrefillersType {
|
|
294
|
-
[key: string]: boolean[][];
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export interface ConditionsValidatorsType {
|
|
298
|
-
options: ConditionsValidatorsOptionsType;
|
|
299
|
-
variables: ConditionsValidatorsVariablesType;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export interface ConditionsValidatorsOptionsType {
|
|
303
|
-
[key: string]: boolean[];
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export interface ConditionsValidatorsVariablesType {
|
|
307
|
-
[key: string]: boolean[];
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* State.smartscript
|
|
312
|
-
*/
|
|
313
|
-
export interface SmartScriptType {
|
|
314
|
-
enabled: boolean;
|
|
315
|
-
triggers: {
|
|
316
|
-
options: number[];
|
|
317
|
-
variables: number[];
|
|
318
|
-
};
|
|
319
|
-
hidden: {
|
|
320
|
-
options: Record<string, number[]>;
|
|
321
|
-
variables: Record<string, number[]>;
|
|
322
|
-
};
|
|
323
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export interface TermsheetSection {
|
|
2
|
-
number: string;
|
|
3
|
-
label: string;
|
|
4
|
-
type: "section";
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface TermsheetOption {
|
|
8
|
-
label: string;
|
|
9
|
-
value: string;
|
|
10
|
-
type: "option";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface TermsheetVariable {
|
|
14
|
-
label: string;
|
|
15
|
-
value: string | number;
|
|
16
|
-
type: "variable";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface TermsheetRow {
|
|
20
|
-
pageNumber: number;
|
|
21
|
-
hash: string;
|
|
22
|
-
preLabel?: string;
|
|
23
|
-
valid?: boolean;
|
|
24
|
-
label: string;
|
|
25
|
-
value: string;
|
|
26
|
-
type: "variable" | "section" | "option" | "multiplelabel";
|
|
27
|
-
allowUpdate: boolean;
|
|
28
|
-
}
|
package/src/types/api.type.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/* eslint-disable camelcase */
|
|
2
|
-
export interface IInstanceCreationResponse {
|
|
3
|
-
uniqid: string;
|
|
4
|
-
status: "SUCCESS" | "FAIL" | "ERR";
|
|
5
|
-
redirect_to?: string;
|
|
6
|
-
isPaid?: boolean;
|
|
7
|
-
user?: {
|
|
8
|
-
email: string;
|
|
9
|
-
displayName: string;
|
|
10
|
-
level: "MANAGER" | "USER" | "ADMIN" | "SUPER" | "GUEST";
|
|
11
|
-
role?: "MANAGER" | "USER" | "ADMIN" | "SUPER" | "GUEST";
|
|
12
|
-
};
|
|
13
|
-
instanceToken?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface ClientConfigResponse {
|
|
17
|
-
clientConfig: {
|
|
18
|
-
domain?: string;
|
|
19
|
-
prefix?: string;
|
|
20
|
-
shortUrl?: boolean;
|
|
21
|
-
metadata?: any;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface WizardConfigResponse {
|
|
26
|
-
modelUuid?: string;
|
|
27
|
-
redirect?: string;
|
|
28
|
-
redirectParams?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface CreateInstanceResponse {
|
|
32
|
-
status?: string;
|
|
33
|
-
uniqid: string;
|
|
34
|
-
isPaid: boolean;
|
|
35
|
-
isOrderHandled: boolean;
|
|
36
|
-
steps: "*" | number[];
|
|
37
|
-
}
|
package/src/types/config.type.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// import type { IFonts } from '@legalplace/sb-experiment';
|
|
2
|
-
|
|
3
|
-
export type SideBarType = "preview" | "summary" | undefined;
|
|
4
|
-
|
|
5
|
-
export interface IWizardParamsTheme {
|
|
6
|
-
name: string;
|
|
7
|
-
shimmer?: boolean;
|
|
8
|
-
params: {
|
|
9
|
-
ui?: {
|
|
10
|
-
topbar: {
|
|
11
|
-
previewBtn: boolean;
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
sidebar: {
|
|
17
|
-
default: SideBarType;
|
|
18
|
-
states: {
|
|
19
|
-
wizard?: SideBarType;
|
|
20
|
-
email?: SideBarType;
|
|
21
|
-
[key: string]: SideBarType;
|
|
22
|
-
};
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
};
|
|
25
|
-
fonts?: any;
|
|
26
|
-
style?: Record<string, any>;
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface IWizardParams {
|
|
32
|
-
apiEndpoint: string;
|
|
33
|
-
authCookieDomain?: string;
|
|
34
|
-
enableShadowInstance: boolean;
|
|
35
|
-
fixedConfig?: boolean;
|
|
36
|
-
router: {
|
|
37
|
-
wizardPath: string;
|
|
38
|
-
wizardInstancePath: string;
|
|
39
|
-
notFoundPath: string;
|
|
40
|
-
smartscriptPath: string;
|
|
41
|
-
appStatesPages?: Record<string, string>;
|
|
42
|
-
};
|
|
43
|
-
plugins: Record<string, string>;
|
|
44
|
-
theme: IWizardParamsTheme;
|
|
45
|
-
brand?: {
|
|
46
|
-
name: string;
|
|
47
|
-
};
|
|
48
|
-
appStates: string[];
|
|
49
|
-
ovcBucket?: string;
|
|
50
|
-
documentBucket?: string;
|
|
51
|
-
permalink?: string;
|
|
52
|
-
prefix?: string;
|
|
53
|
-
uniqid?: string;
|
|
54
|
-
metadata?: Record<string, any>;
|
|
55
|
-
}
|
package/src/types/env.type.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { connectorsLibrary } from "../componentsConnectors/library";
|
|
2
|
-
|
|
3
|
-
export type ConnectorProps<T extends (c: React.ComponentType<any>) => any> =
|
|
4
|
-
T extends (c: React.ComponentType<infer P>) => any ? P : {};
|
|
5
|
-
export type ComponentsConnectors = typeof connectorsLibrary;
|
package/src/wizard-params.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { IWizardParams } from "./types/config.type";
|
|
2
|
-
|
|
3
|
-
const config: IWizardParams = {
|
|
4
|
-
apiEndpoint: process.env.REACT_APP_API_ENDPOINT || "",
|
|
5
|
-
|
|
6
|
-
// Shadow instance
|
|
7
|
-
enableShadowInstance: false,
|
|
8
|
-
|
|
9
|
-
// Routes
|
|
10
|
-
router: {
|
|
11
|
-
wizardPath: "/contrats/:prefix?/:permalink/creer/:page?",
|
|
12
|
-
wizardInstancePath:
|
|
13
|
-
"/contrats/:prefix?/:permalink/continuer/:uniqid([0-9a-zA-Z]+)/:page?",
|
|
14
|
-
notFoundPath: "/contrats/conditions-generales-de-vente/creer",
|
|
15
|
-
appStatesPages: {
|
|
16
|
-
termsheet: "resume",
|
|
17
|
-
email: "email",
|
|
18
|
-
},
|
|
19
|
-
smartscriptPath: "/contrats/:permalink/smartscript/:uniqid?",
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
// Enabled plugins (this should move to the apiEndpoint first response)
|
|
23
|
-
plugins: {
|
|
24
|
-
// pluginName: '1.0.0'
|
|
25
|
-
// autosaveOnTermsheet: '1.0.0',
|
|
26
|
-
// filesDownload: '1.0.0',
|
|
27
|
-
b2c_actions: "1.0.0",
|
|
28
|
-
datalayer: "1.0.0",
|
|
29
|
-
checkoutX: "1.0.0",
|
|
30
|
-
authentication: "1.0.0",
|
|
31
|
-
// smartdocs: '1.0.0'
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
// Theme (this should move to the apiEndpoint first response)
|
|
35
|
-
theme: {
|
|
36
|
-
name: "legacy",
|
|
37
|
-
params: {
|
|
38
|
-
ui: {
|
|
39
|
-
topbar: {
|
|
40
|
-
previewBtn: false,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
sidebar: {
|
|
44
|
-
default: "preview",
|
|
45
|
-
states: {
|
|
46
|
-
wizard: "summary",
|
|
47
|
-
email: "summary",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
// App states (this should move to the apiEndpoint first response)
|
|
53
|
-
appStates: ["wizard", "email"],
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export default config;
|