@legalplace/wizardx-core 2.3.0 → 2.5.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 +37 -0
- package/dist/App.d.ts +5 -5
- package/dist/App.js +22 -35
- package/dist/App.test.js +2 -2
- package/dist/Globals.d.ts +4 -0
- package/dist/Globals.js +9 -6
- package/dist/Loader.d.ts +1 -0
- package/dist/Loader.js +2 -0
- package/dist/PluginLoader.d.ts +3 -3
- package/dist/PluginLoader.js +22 -26
- package/dist/PluginLoader.test.js +6 -6
- package/dist/Shimmer.d.ts +1 -1
- package/dist/Shimmer.js +45 -47
- package/dist/ThemeLoader.d.ts +6 -5
- package/dist/ThemeLoader.js +21 -25
- package/dist/ThemeLoader.test.js +4 -3
- package/dist/components/PluginRoute.d.ts +3 -3
- package/dist/components/PluginRoute.js +8 -7
- package/dist/components/SmartScript.d.ts +7 -8
- package/dist/components/SmartScript.js +22 -21
- package/dist/components/UserLocked/UserLockedComponent.d.ts +1 -1
- package/dist/components/UserLocked/UserLockedComponent.js +5 -6
- package/dist/components/View.d.ts +8 -4
- package/dist/components/View.js +46 -55
- package/dist/components/View.test.js +6 -5
- package/dist/componentsConnectors/connectBox.d.ts +2 -3
- package/dist/componentsConnectors/connectBox.js +4 -4
- package/dist/componentsConnectors/connectBox.test.js +7 -7
- package/dist/componentsConnectors/connectDocument.d.ts +0 -1
- package/dist/componentsConnectors/connectDocument.js +6 -6
- package/dist/componentsConnectors/connectDocument.test.js +5 -5
- package/dist/componentsConnectors/connectHeader.d.ts +0 -1
- package/dist/componentsConnectors/connectHeader.js +2 -2
- package/dist/componentsConnectors/connectMetaTitle.d.ts +0 -1
- package/dist/componentsConnectors/connectMetaTitle.js +2 -2
- package/dist/componentsConnectors/connectMetaTitle.test.js +3 -3
- package/dist/componentsConnectors/connectOption.d.ts +2 -3
- package/dist/componentsConnectors/connectOption.js +9 -9
- package/dist/componentsConnectors/connectPagination.d.ts +0 -1
- package/dist/componentsConnectors/connectPagination.js +3 -3
- package/dist/componentsConnectors/connectPreview.d.ts +0 -1
- package/dist/componentsConnectors/connectPreview.js +2 -2
- package/dist/componentsConnectors/connectProgress.d.ts +0 -1
- package/dist/componentsConnectors/connectProgress.js +3 -3
- package/dist/componentsConnectors/connectRootOption.d.ts +2 -3
- package/dist/componentsConnectors/connectRootOption.js +2 -2
- package/dist/componentsConnectors/connectSection.d.ts +0 -1
- package/dist/componentsConnectors/connectSection.js +4 -4
- package/dist/componentsConnectors/connectSummary.d.ts +0 -1
- package/dist/componentsConnectors/connectSummary.js +2 -2
- package/dist/componentsConnectors/connectSummaryItem.d.ts +0 -1
- package/dist/componentsConnectors/connectSummaryItem.js +6 -6
- package/dist/componentsConnectors/connectTermsheet.d.ts +2 -2
- package/dist/componentsConnectors/connectTermsheet.js +43 -46
- package/dist/componentsConnectors/connectVariable.d.ts +1 -2
- package/dist/componentsConnectors/connectVariable.js +10 -10
- package/dist/componentsConnectors/connectWizardWrapper.d.ts +0 -1
- package/dist/componentsConnectors/connectWizardWrapper.js +4 -4
- package/dist/componentsConnectors/connector/componentConnector.d.ts +8 -8
- package/dist/componentsConnectors/connector/componentConnector.js +16 -19
- package/dist/componentsConnectors/library.d.ts +61 -0
- package/dist/componentsConnectors/library.js +34 -0
- package/dist/config.d.ts +1 -1
- package/dist/constants/phoneValidation.d.ts +3 -0
- package/dist/constants/phoneValidation.js +3 -0
- package/dist/helpers/outputsParsing.d.ts +1 -1
- package/dist/helpers/outputsParsing.js +25 -25
- package/dist/helpers/preloadTheme.js +1 -1
- package/dist/helpers/scriptsLoader.d.ts +1 -0
- package/dist/helpers/scriptsLoader.js +24 -0
- package/dist/helpers/sendinblueHelper.d.ts +3 -3
- package/dist/helpers/sendinblueHelper.js +29 -18
- package/dist/hooks/usePrevious.js +1 -1
- package/dist/libs/ConditionsInitiator.d.ts +1 -1
- package/dist/libs/ConditionsInitiator.js +2 -2
- package/dist/libs/ConditionsRunner/DataPopulator.js +7 -7
- package/dist/libs/ConditionsRunner.d.ts +3 -3
- package/dist/libs/ConditionsRunner.js +43 -43
- package/dist/libs/DocumentsOutputs.d.ts +2 -2
- package/dist/libs/DocumentsOutputs.js +5 -5
- package/dist/libs/Eval/EvalBase.js +17 -17
- package/dist/libs/Eval/EvalFunctions.d.ts +1 -1
- package/dist/libs/Eval/EvalFunctions.js +100 -100
- package/dist/libs/Eval/NumbersToLetters.js +46 -46
- package/dist/libs/EvalVariable.d.ts +2 -2
- package/dist/libs/EvalVariable.js +30 -29
- package/dist/libs/EventsTracking.js +32 -32
- package/dist/libs/Extracts.js +20 -20
- package/dist/libs/InputsInitiator.d.ts +1 -1
- package/dist/libs/InputsInitiator.js +15 -15
- package/dist/libs/NumAuto.js +1 -1
- package/dist/libs/OvcConverter.d.ts +1 -1
- package/dist/libs/OvcConverter.js +23 -23
- package/dist/libs/PathReader.d.ts +1 -1
- package/dist/libs/PathReader.js +22 -22
- package/dist/libs/SectionValidity.js +3 -3
- package/dist/libs/SmartScriptStore.d.ts +6 -6
- package/dist/libs/SmartScriptStore.js +33 -33
- package/dist/misc/test_model.d.ts +2 -2
- package/dist/misc/test_model.js +3807 -3807
- package/dist/polyfills/index.d.ts +5 -0
- package/dist/polyfills/index.js +5 -0
- package/dist/polyfills/prepend.js +2 -2
- package/dist/polyfills/stringRepeat.js +4 -4
- package/dist/redux/actions/app.d.ts +12 -12
- package/dist/redux/actions/app.js +1 -1
- package/dist/redux/actions/conditions.d.ts +2 -2
- package/dist/redux/actions/conditions.js +1 -1
- package/dist/redux/actions/inputs.d.ts +3 -1
- package/dist/redux/actions/inputs.js +6 -1
- package/dist/redux/actions/library.d.ts +74 -0
- package/dist/redux/actions/library.js +11 -0
- package/dist/redux/actions/mandatories.d.ts +1 -1
- package/dist/redux/actions/mandatories.js +1 -1
- package/dist/redux/actions/references.d.ts +4 -4
- package/dist/redux/actions/references.js +1 -1
- package/dist/redux/actions/sagas/data.d.ts +1 -1
- package/dist/redux/actions/sagas/data.js +1 -1
- package/dist/redux/actions/sagas/model.d.ts +3 -3
- package/dist/redux/actions/sagas/model.js +3 -3
- package/dist/redux/actions/sagas/user.d.ts +1 -1
- package/dist/redux/actions/sagas/user.js +1 -1
- package/dist/redux/actions/smartscript.d.ts +3 -3
- package/dist/redux/actions/smartscript.js +1 -1
- package/dist/redux/actions/user.d.ts +4 -4
- package/dist/redux/actions/user.js +1 -1
- package/dist/redux/constants/app.js +22 -22
- package/dist/redux/constants/conditions.js +8 -8
- package/dist/redux/constants/inputs.d.ts +1 -0
- package/dist/redux/constants/inputs.js +7 -6
- package/dist/redux/constants/mandatories.js +6 -6
- package/dist/redux/constants/references.js +3 -3
- package/dist/redux/constants/sagas/data.js +1 -1
- package/dist/redux/constants/sagas/model.js +2 -2
- package/dist/redux/constants/sagas/user.js +2 -2
- package/dist/redux/constants/smartscript.js +4 -4
- package/dist/redux/constants/user.js +3 -3
- package/dist/redux/listeners/subscriber.d.ts +2 -2
- package/dist/redux/middlewares/conditionsWatcherMiddleware.d.ts +2 -2
- package/dist/redux/middlewares/conditionsWatcherMiddleware.js +28 -28
- package/dist/redux/middlewares/evaluationsWatcherMiddleware.d.ts +4 -2
- package/dist/redux/middlewares/evaluationsWatcherMiddleware.js +10 -10
- package/dist/redux/middlewares/mandatoriesWatcherMiddleware.d.ts +2 -2
- package/dist/redux/middlewares/mandatoriesWatcherMiddleware.js +13 -13
- package/dist/redux/middlewares/multiplesActionsMiddleware.d.ts +2 -2
- package/dist/redux/middlewares/multiplesActionsMiddleware.js +2 -2
- package/dist/redux/middlewares/paginationWatcherMiddleware.d.ts +3 -3
- package/dist/redux/middlewares/paginationWatcherMiddleware.js +24 -24
- package/dist/redux/middlewares/pluginsHookMiddleware.d.ts +1 -1
- package/dist/redux/middlewares/pluginsHookMiddleware.js +1 -1
- package/dist/redux/middlewares/prefillerWatcherMiddleware.d.ts +2 -2
- package/dist/redux/middlewares/prefillerWatcherMiddleware.js +28 -28
- package/dist/redux/middlewares/smartscriptMiddleware.d.ts +2 -2
- package/dist/redux/middlewares/smartscriptMiddleware.js +33 -15
- package/dist/redux/middlewares/thirdpartyScriptsMiddleware.d.ts +5 -0
- package/dist/redux/middlewares/thirdpartyScriptsMiddleware.js +16 -0
- package/dist/redux/reducers/app/customizations/initCustomizationAutoDefault.d.ts +2 -2
- package/dist/redux/reducers/app/customizations/initCustomizationMeta.d.ts +2 -2
- package/dist/redux/reducers/app/instance/initInstance.d.ts +2 -2
- package/dist/redux/reducers/app/instance/setDataStatus.d.ts +2 -2
- package/dist/redux/reducers/app/instance/updateInstance.d.ts +2 -2
- package/dist/redux/reducers/app/instance/updateInstancePaid.d.ts +2 -2
- package/dist/redux/reducers/app/meta/fetchModelFailed.d.ts +1 -1
- package/dist/redux/reducers/app/meta/fetchModelFailed.js +1 -1
- package/dist/redux/reducers/app/meta/fetchModelNonBlocking.d.ts +1 -1
- package/dist/redux/reducers/app/meta/fetchModelNonBlocking.js +1 -1
- package/dist/redux/reducers/app/meta/fetchModelSucceeded.d.ts +1 -1
- package/dist/redux/reducers/app/meta/fetchModelSucceeded.js +1 -1
- package/dist/redux/reducers/app/meta/fetchModelUnhealthy.d.ts +2 -2
- package/dist/redux/reducers/app/meta/fetchModelUnhealthy.js +1 -1
- package/dist/redux/reducers/app/meta/fetchModelUserLocked.d.ts +1 -1
- package/dist/redux/reducers/app/meta/fetchModelUserLocked.js +1 -1
- package/dist/redux/reducers/app/meta/initMeta.d.ts +2 -2
- package/dist/redux/reducers/app/meta/setModelUuid.d.ts +2 -2
- package/dist/redux/reducers/app/pagination/goNextPage.d.ts +1 -1
- package/dist/redux/reducers/app/pagination/goNextPage.js +1 -1
- package/dist/redux/reducers/app/pagination/goPage.d.ts +2 -2
- package/dist/redux/reducers/app/pagination/goPage.js +2 -2
- package/dist/redux/reducers/app/pagination/goPreviousPage.d.ts +1 -1
- package/dist/redux/reducers/app/pagination/goPreviousPage.js +1 -1
- package/dist/redux/reducers/app/pagination/initPagination.d.ts +2 -2
- package/dist/redux/reducers/app/pagination/initPagination.js +1 -1
- package/dist/redux/reducers/app/pagination/updateAvailableAppStates.d.ts +2 -2
- package/dist/redux/reducers/app/pagination/updateAvailableAppStates.js +5 -5
- package/dist/redux/reducers/app/wizard/updateAvailableSections.d.ts +2 -2
- package/dist/redux/reducers/app/wizard/updateAvailableSections.js +2 -2
- package/dist/redux/reducers/app.d.ts +2 -2
- package/dist/redux/reducers/app.js +30 -30
- package/dist/redux/reducers/conditions/addMultipleOccurency.d.ts +2 -2
- package/dist/redux/reducers/conditions/addMultipleOccurency.js +3 -3
- package/dist/redux/reducers/conditions/deleteMultipleOccurency.d.ts +2 -2
- package/dist/redux/reducers/conditions/deleteMultipleOccurency.js +2 -2
- package/dist/redux/reducers/conditions/initConditions.d.ts +2 -2
- package/dist/redux/reducers/conditions/updateDocumentConditions.d.ts +2 -2
- package/dist/redux/reducers/conditions/updateOptionConditions.d.ts +2 -2
- package/dist/redux/reducers/conditions/updateOptionValidatorCondition.d.ts +2 -2
- package/dist/redux/reducers/conditions/updatePrefillerConditions.d.ts +2 -2
- package/dist/redux/reducers/conditions/updatePrefillerConditions.js +2 -2
- package/dist/redux/reducers/conditions/updateSectionConditions.d.ts +2 -2
- package/dist/redux/reducers/conditions/updateVariableConditions.d.ts +2 -2
- package/dist/redux/reducers/conditions/updateVariableValidatorCondition.d.ts +2 -2
- package/dist/redux/reducers/conditions.d.ts +2 -2
- package/dist/redux/reducers/conditions.js +13 -13
- package/dist/redux/reducers/inputs/addMultipleOccurency.d.ts +2 -2
- package/dist/redux/reducers/inputs/addMultipleOccurency.js +4 -4
- package/dist/redux/reducers/inputs/deleteMultipleOccurency.d.ts +2 -2
- package/dist/redux/reducers/inputs/deleteMultipleOccurency.js +2 -2
- package/dist/redux/reducers/inputs/initOption.d.ts +2 -2
- package/dist/redux/reducers/inputs/initVariable.d.ts +2 -2
- package/dist/redux/reducers/inputs/updateOptionInput.d.ts +2 -2
- package/dist/redux/reducers/inputs/updateVariableInput.d.ts +2 -2
- package/dist/redux/reducers/inputs.d.ts +2 -2
- package/dist/redux/reducers/inputs.js +8 -8
- package/dist/redux/reducers/mandatories/addMultipleOccurency.d.ts +2 -2
- package/dist/redux/reducers/mandatories/addMultipleOccurency.js +2 -2
- package/dist/redux/reducers/mandatories/deleteMultipleOccurency.d.ts +2 -2
- package/dist/redux/reducers/mandatories/deleteMultipleOccurency.js +2 -2
- package/dist/redux/reducers/mandatories/initMandatoryOption.d.ts +2 -2
- package/dist/redux/reducers/mandatories/initMandatoryVariable.d.ts +2 -2
- package/dist/redux/reducers/mandatories/setMandatoryIgnore.d.ts +2 -2
- package/dist/redux/reducers/mandatories/setMandatoryOption.d.ts +2 -2
- package/dist/redux/reducers/mandatories/setMandatorySection.d.ts +2 -2
- package/dist/redux/reducers/mandatories/setMandatoryVariable.d.ts +2 -2
- package/dist/redux/reducers/mandatories.d.ts +2 -2
- package/dist/redux/reducers/mandatories.js +11 -11
- package/dist/redux/reducers/references/initReferences.d.ts +2 -2
- package/dist/redux/reducers/references/updateOptionMeta.d.ts +2 -2
- package/dist/redux/reducers/references/updateOptionMeta.js +2 -2
- package/dist/redux/reducers/references/updateVariableMeta.d.ts +2 -2
- package/dist/redux/reducers/references/updateVariableMeta.js +2 -2
- package/dist/redux/reducers/references.d.ts +2 -2
- package/dist/redux/reducers/references.js +5 -5
- package/dist/redux/reducers/smartscript/enableSmartScript.d.ts +1 -1
- package/dist/redux/reducers/smartscript/initSmartScriptTriggers.d.ts +2 -2
- package/dist/redux/reducers/smartscript/updateSmartscriptOptionHidden.d.ts +2 -2
- package/dist/redux/reducers/smartscript/updateSmartscriptVariableHidden.d.ts +2 -2
- package/dist/redux/reducers/smartscript.d.ts +2 -2
- package/dist/redux/reducers/smartscript.js +6 -6
- package/dist/redux/reducers/user/initUser.d.ts +2 -2
- package/dist/redux/reducers/user/setUserStatus.d.ts +2 -2
- package/dist/redux/reducers/user/setUserValidToken.d.ts +2 -2
- package/dist/redux/reducers/user.d.ts +2 -2
- package/dist/redux/reducers/user.js +9 -9
- package/dist/redux/routerHistory.d.ts +2 -2
- package/dist/redux/routerHistory.js +5 -5
- package/dist/redux/sagas/fetchModel.d.ts +4 -4
- package/dist/redux/sagas/fetchModel.js +79 -131
- package/dist/redux/sagas/fetchModel.test.js +2 -3
- package/dist/redux/sagas/homogeneousRadioInputsSaga.js +5 -5
- package/dist/redux/sagas/initInputs.d.ts +5 -0
- package/dist/redux/sagas/initInputs.js +63 -0
- package/dist/redux/sagas/runner.d.ts +1 -1
- package/dist/redux/sagas/runner.js +7 -5
- package/dist/redux/sagas/saveData.js +34 -25
- package/dist/redux/sagas/setDefaults.js +8 -8
- package/dist/redux/sagas/setUserEmail.js +43 -43
- package/dist/redux/selectors/app.d.ts +1 -0
- package/dist/redux/selectors/app.js +26 -25
- package/dist/redux/selectors/conditions.js +34 -34
- package/dist/redux/selectors/inputs.d.ts +1 -1
- package/dist/redux/selectors/inputs.js +8 -8
- package/dist/{componentsConnectors/connector/connectorSelectors.d.ts → redux/selectors/library.d.ts} +17 -16
- package/dist/redux/selectors/library.js +8 -0
- package/dist/redux/selectors/mandatories.js +10 -10
- package/dist/redux/selectors/references.d.ts +1 -0
- package/dist/redux/selectors/references.js +20 -19
- package/dist/redux/selectors/selectors.d.ts +2 -2
- package/dist/redux/selectors/selectors.js +2 -2
- package/dist/redux/selectors/smartscript.js +5 -5
- package/dist/redux/selectors/user.js +5 -5
- package/dist/redux/store.d.ts +6 -2
- package/dist/redux/store.js +31 -31
- package/dist/service/api.manager.d.ts +2 -2
- package/dist/service/api.manager.js +46 -46
- package/dist/service/auth.service.js +2 -2
- package/dist/service/pardot.service.js +2 -2
- package/dist/tests-misc/plugins/jestTestPlugin/after.d.ts +1 -1
- package/dist/tests-misc/plugins/jestTestPlugin/after.js +2 -2
- package/dist/tests-misc/plugins/jestTestPlugin/before.d.ts +1 -1
- package/dist/tests-misc/plugins/jestTestPlugin/before.js +2 -5
- package/dist/tests-misc/plugins/jestTestPlugin/index.js +4 -4
- package/dist/tests-misc/plugins/jestTestPlugin/title.d.ts +1 -1
- package/dist/tests-misc/plugins/jestTestPlugin/title.js +2 -2
- package/dist/tests-misc/themes/jestTestTheme/components/EmailComponent.d.ts +0 -1
- package/dist/tests-misc/themes/jestTestTheme/components/EmailComponent.js +2 -2
- package/dist/tests-misc/themes/jestTestTheme/components/TermsheetComponent.d.ts +0 -1
- package/dist/tests-misc/themes/jestTestTheme/components/TermsheetComponent.js +2 -2
- package/dist/tests-misc/themes/jestTestTheme/components/WizardComponent.d.ts +0 -1
- package/dist/tests-misc/themes/jestTestTheme/components/WizardComponent.js +2 -2
- package/dist/tests-misc/themes/jestTestTheme/faltyIndex.js +1 -1
- package/dist/tests-misc/themes/jestTestTheme/faltyIndexLoader.js +1 -1
- package/dist/tests-misc/themes/jestTestTheme/index.js +4 -4
- package/dist/types/Actions.type.d.ts +42 -37
- package/dist/types/Components.type.d.ts +4 -5
- package/dist/types/State.type.d.ts +9 -9
- package/dist/types/Termsheet.type.d.ts +4 -4
- package/dist/types/api.type.d.ts +4 -4
- package/dist/types/config.type.d.ts +2 -3
- package/dist/types/getActions.type.d.ts +2 -2
- package/dist/types/getConnectors.type.d.ts +2 -3
- package/dist/types/getSelectors.type.d.ts +2 -2
- package/dist/wizard-params.d.ts +1 -1
- package/dist/wizard-params.js +16 -16
- package/jest.config.ts +1 -1
- package/package.json +16 -8
- package/setupJest.ts +8 -0
- package/src/App.tsx +22 -25
- package/src/Globals.ts +12 -8
- package/src/Loader.tsx +8 -0
- package/src/PluginLoader.tsx +20 -37
- package/src/Shimmer.tsx +58 -45
- package/src/ThemeLoader.test.tsx +1 -0
- package/src/ThemeLoader.tsx +27 -42
- package/src/components/PluginRoute.tsx +8 -6
- package/src/components/SmartScript.tsx +29 -28
- package/src/components/UserLocked/UserLockedComponent.tsx +3 -3
- package/src/components/View.test.tsx +3 -0
- package/src/components/View.tsx +52 -54
- package/src/componentsConnectors/connectBox.tsx +6 -6
- package/src/componentsConnectors/connectDocument.tsx +6 -6
- package/src/componentsConnectors/connectHeader.tsx +2 -2
- package/src/componentsConnectors/connectMetaTitle.tsx +2 -2
- package/src/componentsConnectors/connectOption.tsx +11 -11
- package/src/componentsConnectors/connectPagination.tsx +3 -3
- package/src/componentsConnectors/connectPreview.tsx +2 -2
- package/src/componentsConnectors/connectProgress.tsx +3 -3
- package/src/componentsConnectors/connectRootOption.tsx +4 -4
- package/src/componentsConnectors/connectSection.tsx +4 -4
- package/src/componentsConnectors/connectSummary.tsx +2 -2
- package/src/componentsConnectors/connectSummaryItem.tsx +6 -6
- package/src/componentsConnectors/connectTermsheet.tsx +46 -46
- package/src/componentsConnectors/connectVariable.tsx +11 -11
- package/src/componentsConnectors/connectWizardWrapper.tsx +4 -4
- package/src/componentsConnectors/connector/componentConnector.tsx +22 -20
- package/src/componentsConnectors/library.ts +35 -0
- package/src/config.test.ts +2 -1
- package/src/config.ts +1 -1
- package/src/constants/phoneValidation.ts +6 -0
- package/src/definitions/path.join.d.ts +1 -1
- package/src/helpers/outputsParsing.ts +26 -26
- package/src/helpers/preloadTheme.ts +2 -2
- package/src/helpers/scriptsLoader.ts +20 -0
- package/src/helpers/sendinblueHelper.ts +23 -17
- package/src/hooks/usePrevious.ts +1 -1
- package/src/libs/ConditionsInitiator.ts +3 -3
- package/src/libs/ConditionsRunner/DataPopulator.ts +7 -7
- package/src/libs/ConditionsRunner.ts +53 -53
- package/src/libs/DocumentsOutputs.ts +7 -7
- package/src/libs/Eval/EvalBase.ts +17 -17
- package/src/libs/Eval/EvalFunctions.ts +100 -100
- package/src/libs/Eval/NumbersToLetters.ts +48 -48
- package/src/libs/EvalVariable.ts +34 -31
- package/src/libs/EventsTracking.ts +38 -38
- package/src/libs/Extracts.ts +21 -21
- package/src/libs/InputsInitiator.ts +16 -16
- package/src/libs/NumAuto.ts +1 -1
- package/src/libs/OvcConverter.ts +25 -25
- package/src/libs/PathReader.ts +23 -23
- package/src/libs/SectionValidity.ts +3 -3
- package/src/libs/SmartScriptStore.ts +40 -40
- package/src/misc/test_model.ts +3809 -3809
- package/src/polyfills/index.ts +5 -0
- package/src/polyfills/prepend.ts +2 -2
- package/src/polyfills/stringRepeat.ts +4 -4
- package/src/redux/actions/app.ts +13 -13
- package/src/redux/actions/conditions.ts +3 -3
- package/src/redux/actions/inputs.ts +18 -2
- package/src/redux/actions/library.ts +23 -0
- package/src/redux/actions/mandatories.ts +2 -2
- package/src/redux/actions/references.ts +5 -5
- package/src/redux/actions/sagas/data.ts +2 -2
- package/src/redux/actions/sagas/model.ts +6 -6
- package/src/redux/actions/sagas/user.ts +2 -2
- package/src/redux/actions/smartscript.ts +4 -4
- package/src/redux/actions/user.ts +5 -5
- package/src/redux/constants/app.ts +22 -22
- package/src/redux/constants/conditions.ts +8 -8
- package/src/redux/constants/inputs.ts +8 -6
- package/src/redux/constants/mandatories.ts +6 -6
- package/src/redux/constants/references.ts +3 -3
- package/src/redux/constants/sagas/data.ts +1 -1
- package/src/redux/constants/sagas/model.ts +2 -2
- package/src/redux/constants/sagas/user.ts +2 -2
- package/src/redux/constants/smartscript.ts +4 -4
- package/src/redux/constants/user.ts +3 -3
- package/src/redux/listeners/subscriber.ts +2 -2
- package/src/redux/middlewares/conditionsWatcherMiddleware.ts +31 -31
- package/src/redux/middlewares/evaluationsWatcherMiddleware.test.ts +1 -1
- package/src/redux/middlewares/evaluationsWatcherMiddleware.ts +13 -13
- package/src/redux/middlewares/mandatoriesWatcherMiddleware.ts +16 -16
- package/src/redux/middlewares/multiplesActionsMiddleware.ts +6 -6
- package/src/redux/middlewares/paginationWatcherMiddleware.ts +27 -27
- package/src/redux/middlewares/pluginsHookMiddleware.ts +2 -2
- package/src/redux/middlewares/prefillerWatcherMiddleware.ts +31 -31
- package/src/redux/middlewares/smartscriptMiddleware.ts +61 -20
- package/src/redux/middlewares/thirdpartyScriptsMiddleware.ts +41 -0
- package/src/redux/reducers/app/customizations/initCustomizationAutoDefault.ts +2 -2
- package/src/redux/reducers/app/customizations/initCustomizationMeta.ts +2 -2
- package/src/redux/reducers/app/instance/initInstance.ts +2 -2
- package/src/redux/reducers/app/instance/setDataStatus.ts +2 -2
- package/src/redux/reducers/app/instance/updateInstance.ts +2 -2
- package/src/redux/reducers/app/instance/updateInstancePaid.ts +2 -2
- package/src/redux/reducers/app/meta/fetchModelFailed.ts +2 -2
- package/src/redux/reducers/app/meta/fetchModelNonBlocking.ts +2 -2
- package/src/redux/reducers/app/meta/fetchModelSucceeded.ts +2 -2
- package/src/redux/reducers/app/meta/fetchModelUnhealthy.ts +3 -3
- package/src/redux/reducers/app/meta/fetchModelUserLocked.ts +2 -2
- package/src/redux/reducers/app/meta/initMeta.ts +2 -2
- package/src/redux/reducers/app/meta/setModelUuid.ts +2 -2
- package/src/redux/reducers/app/pagination/goNextPage.ts +2 -2
- package/src/redux/reducers/app/pagination/goPage.ts +4 -4
- package/src/redux/reducers/app/pagination/goPreviousPage.ts +2 -2
- package/src/redux/reducers/app/pagination/initPagination.ts +3 -3
- package/src/redux/reducers/app/pagination/updateAvailableAppStates.ts +7 -7
- package/src/redux/reducers/app/wizard/updateAvailableSections.ts +4 -4
- package/src/redux/reducers/app.ts +32 -32
- package/src/redux/reducers/conditions/addMultipleOccurency.ts +5 -5
- package/src/redux/reducers/conditions/deleteMultipleOccurency.ts +4 -4
- package/src/redux/reducers/conditions/initConditions.ts +2 -2
- package/src/redux/reducers/conditions/updateDocumentConditions.ts +2 -2
- package/src/redux/reducers/conditions/updateOptionConditions.ts +2 -2
- package/src/redux/reducers/conditions/updateOptionValidatorCondition.ts +2 -2
- package/src/redux/reducers/conditions/updatePrefillerConditions.ts +4 -4
- package/src/redux/reducers/conditions/updateSectionConditions.ts +2 -2
- package/src/redux/reducers/conditions/updateVariableConditions.ts +2 -2
- package/src/redux/reducers/conditions/updateVariableValidatorCondition.ts +2 -2
- package/src/redux/reducers/conditions.ts +15 -15
- package/src/redux/reducers/inputs/addMultipleOccurency.ts +6 -6
- package/src/redux/reducers/inputs/deleteMultipleOccurency.ts +4 -4
- package/src/redux/reducers/inputs/initOption.ts +2 -2
- package/src/redux/reducers/inputs/initVariable.ts +2 -2
- package/src/redux/reducers/inputs/updateOptionInput.ts +2 -2
- package/src/redux/reducers/inputs/updateVariableInput.ts +2 -2
- package/src/redux/reducers/inputs.ts +10 -10
- package/src/redux/reducers/mandatories/addMultipleOccurency.ts +4 -4
- package/src/redux/reducers/mandatories/deleteMultipleOccurency.ts +4 -4
- package/src/redux/reducers/mandatories/initMandatoryOption.ts +2 -2
- package/src/redux/reducers/mandatories/initMandatoryVariable.ts +2 -2
- package/src/redux/reducers/mandatories/setMandatoryIgnore.ts +2 -2
- package/src/redux/reducers/mandatories/setMandatoryOption.ts +2 -2
- package/src/redux/reducers/mandatories/setMandatorySection.ts +2 -2
- package/src/redux/reducers/mandatories/setMandatoryVariable.ts +2 -2
- package/src/redux/reducers/mandatories.ts +13 -13
- package/src/redux/reducers/references/initReferences.ts +2 -2
- package/src/redux/reducers/references/updateOptionMeta.ts +4 -4
- package/src/redux/reducers/references/updateVariableMeta.ts +4 -4
- package/src/redux/reducers/references.ts +7 -7
- package/src/redux/reducers/smartscript/enableSmartScript.ts +1 -1
- package/src/redux/reducers/smartscript/initSmartScriptTriggers.ts +2 -2
- package/src/redux/reducers/smartscript/updateSmartscriptOptionHidden.ts +2 -2
- package/src/redux/reducers/smartscript/updateSmartscriptVariableHidden.ts +2 -2
- package/src/redux/reducers/smartscript.ts +8 -8
- package/src/redux/reducers/user/initUser.ts +2 -2
- package/src/redux/reducers/user/setUserStatus.ts +2 -2
- package/src/redux/reducers/user/setUserValidToken.ts +2 -2
- package/src/redux/reducers/user.ts +11 -11
- package/src/redux/routerHistory.ts +6 -6
- package/src/redux/sagas/fetchModel.test.ts +2 -5
- package/src/redux/sagas/fetchModel.ts +86 -187
- package/src/redux/sagas/homogeneousRadioInputsSaga.ts +6 -6
- package/src/redux/sagas/initInputs.ts +110 -0
- package/src/redux/sagas/runner.ts +8 -6
- package/src/redux/sagas/saveData.ts +32 -28
- package/src/redux/sagas/setDefaults.ts +8 -8
- package/src/redux/sagas/setUserEmail.ts +46 -45
- package/src/redux/selectors/app.ts +34 -28
- package/src/redux/selectors/conditions.ts +41 -41
- package/src/redux/selectors/inputs.ts +10 -10
- package/src/redux/selectors/library.ts +17 -0
- package/src/redux/selectors/mandatories.ts +10 -10
- package/src/redux/selectors/references.ts +25 -21
- package/src/redux/selectors/selectors.ts +4 -4
- package/src/redux/selectors/smartscript.ts +6 -6
- package/src/redux/selectors/user.ts +8 -8
- package/src/redux/store.ts +42 -32
- package/src/service/api.manager.ts +53 -53
- package/src/service/auth.service.ts +2 -2
- package/src/service/pardot.service.ts +2 -2
- package/src/tests-misc/plugins/jestTestPlugin/after.tsx +1 -1
- package/src/tests-misc/plugins/jestTestPlugin/before.tsx +1 -1
- package/src/tests-misc/plugins/jestTestPlugin/index.ts +4 -4
- package/src/tests-misc/plugins/jestTestPlugin/title.tsx +2 -2
- package/src/tests-misc/themes/jestTestTheme/components/EmailComponent.tsx +1 -1
- package/src/tests-misc/themes/jestTestTheme/components/TermsheetComponent.tsx +1 -1
- package/src/tests-misc/themes/jestTestTheme/components/WizardComponent.tsx +1 -1
- package/src/tests-misc/themes/jestTestTheme/faltyIndex.ts +1 -1
- package/src/tests-misc/themes/jestTestTheme/faltyIndexLoader.ts +1 -1
- package/src/tests-misc/themes/jestTestTheme/index.ts +4 -4
- package/src/types/Actions.type.ts +63 -55
- package/src/types/Components.type.ts +4 -4
- package/src/types/State.type.ts +14 -14
- package/src/types/Termsheet.type.ts +4 -4
- package/src/types/api.type.ts +4 -4
- package/src/types/config.type.ts +3 -3
- package/src/types/getActions.type.ts +2 -2
- package/src/types/getConnectors.type.ts +2 -2
- package/src/types/getSelectors.type.ts +2 -2
- package/src/wizard-params.ts +17 -17
- package/tsconfig.json +1 -1
- package/dist/componentsConnectors/connector/connectorSelectors.js +0 -9
- package/dist/componentsConnectors/index.d.ts +0 -16
- package/dist/componentsConnectors/index.js +0 -16
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +0 -1
- package/dist/helpers/index.d.ts +0 -2
- package/dist/helpers/index.js +0 -2
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/index.d.ts +0 -23
- package/dist/index.js +0 -23
- package/dist/libs/index.d.ts +0 -12
- package/dist/libs/index.js +0 -12
- package/dist/redux/actions/index.d.ts +0 -8
- package/dist/redux/actions/index.js +0 -8
- package/dist/redux/actions/sagas/index.d.ts +0 -3
- package/dist/redux/actions/sagas/index.js +0 -3
- package/dist/redux/constants/index.d.ts +0 -8
- package/dist/redux/constants/index.js +0 -8
- package/dist/redux/constants/sagas/index.d.ts +0 -3
- package/dist/redux/constants/sagas/index.js +0 -3
- package/dist/redux/index.d.ts +0 -4
- package/dist/redux/index.js +0 -4
- package/dist/redux/selectors/index.d.ts +0 -7
- package/dist/redux/selectors/index.js +0 -7
- package/dist/service/index.d.ts +0 -3
- package/dist/service/index.js +0 -3
- package/dist/types/index.d.ts +0 -10
- package/dist/types/index.js +0 -10
- package/src/componentsConnectors/connector/connectorSelectors.ts +0 -19
- package/src/componentsConnectors/index.ts +0 -16
- package/src/constants/index.ts +0 -1
- package/src/helpers/index.ts +0 -2
- package/src/hooks/index.ts +0 -1
- package/src/index.ts +0 -47
- package/src/libs/index.ts +0 -12
- package/src/redux/actions/index.ts +0 -8
- package/src/redux/actions/sagas/index.ts +0 -3
- package/src/redux/constants/index.ts +0 -8
- package/src/redux/constants/sagas/index.ts +0 -3
- package/src/redux/index.ts +0 -4
- package/src/redux/selectors/index.ts +0 -7
- package/src/service/index.ts +0 -3
- package/src/types/index.ts +0 -10
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import cloneDeep from
|
|
2
|
-
import { generatePath } from
|
|
3
|
-
import { getConfig } from
|
|
4
|
-
import { ADD_MULTIPLE_OCCURENCY, DELETE_MULTIPLE_OCCURENCY, UPDATE_OPTION_INPUT, UPDATE_VARIABLE_INPUT, } from
|
|
5
|
-
import { ENABLE_SMARTSCRIPT } from
|
|
6
|
-
import { PathReader } from
|
|
7
|
-
import { initSmartscriptTriggersAction } from
|
|
1
|
+
import cloneDeep from "lodash/cloneDeep";
|
|
2
|
+
import { generatePath } from "react-router-dom";
|
|
3
|
+
import { getConfig } from "../../config";
|
|
4
|
+
import { INIT_INPUTS, ADD_MULTIPLE_OCCURENCY, DELETE_MULTIPLE_OCCURENCY, UPDATE_OPTION_INPUT, UPDATE_VARIABLE_INPUT, } from "../constants/inputs";
|
|
5
|
+
import { ENABLE_SMARTSCRIPT } from "../constants/smartscript";
|
|
6
|
+
import { PathReader } from "../../libs/PathReader";
|
|
7
|
+
import { initSmartscriptTriggersAction } from "../actions/smartscript";
|
|
8
|
+
import { updateOptionAction, updateVariableAction } from "../actions/inputs";
|
|
8
9
|
let iframe = null;
|
|
9
10
|
const watchEnableSmartScript = (mpi, next, action) => {
|
|
10
11
|
next(action);
|
|
11
|
-
iframe = document.createElement(
|
|
12
|
-
iframe.id =
|
|
13
|
-
iframe.setAttribute(
|
|
12
|
+
iframe = document.createElement("iframe");
|
|
13
|
+
iframe.id = "lp-smartscript";
|
|
14
|
+
iframe.setAttribute("style", "position: absolute; width:0; height:0; border:0;");
|
|
14
15
|
const { permalink, prefix } = mpi.getState().app.meta;
|
|
15
16
|
const { uniqid } = mpi.getState().app.instance;
|
|
16
17
|
const { modelVersion } = new PathReader(mpi.getState());
|
|
@@ -20,12 +21,12 @@ const watchEnableSmartScript = (mpi, next, action) => {
|
|
|
20
21
|
prefix: prefix.trim().length > 0 ? prefix : undefined,
|
|
21
22
|
uniqid: uniqid.trim().length > 0 ? uniqid : undefined,
|
|
22
23
|
});
|
|
23
|
-
iframe.src = `${window.location.protocol}//${window.location.host}${path}${modelVersion ? `?version=${modelVersion}` :
|
|
24
|
+
iframe.src = `${window.location.protocol}//${window.location.host}${path}${modelVersion ? `?version=${modelVersion}` : ""}`;
|
|
24
25
|
}
|
|
25
26
|
else {
|
|
26
|
-
iframe.src = `${window.location.protocol}//${window.location.host}/contrats/${permalink}/smartscript/${uniqid ||
|
|
27
|
+
iframe.src = `${window.location.protocol}//${window.location.host}/contrats/${permalink}/smartscript/${uniqid || ""}${modelVersion ? `?version=${modelVersion}` : ""}`;
|
|
27
28
|
}
|
|
28
|
-
const isNewInstance = !(typeof uniqid ===
|
|
29
|
+
const isNewInstance = !(typeof uniqid === "string" && uniqid.trim().length > 0);
|
|
29
30
|
iframe.onload = () => {
|
|
30
31
|
var _a, _b;
|
|
31
32
|
(_b = (_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.initTriggers) === null || _b === void 0 ? void 0 : _b.call(_a, (triggers, actions) => {
|
|
@@ -46,7 +47,7 @@ const watchUpdateOptionInput = (mpi, next, action) => {
|
|
|
46
47
|
const { id } = action;
|
|
47
48
|
if (state.smartscript.triggers.options.includes(id)) {
|
|
48
49
|
try {
|
|
49
|
-
const actions = (_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.triggerListeners(
|
|
50
|
+
const actions = (_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.triggerListeners("option", id, cloneDeep(state.inputs));
|
|
50
51
|
if (Array.isArray(actions)) {
|
|
51
52
|
actions.forEach((_action) => {
|
|
52
53
|
mpi.dispatch(_action);
|
|
@@ -65,7 +66,7 @@ const watchUpdateVariableInput = (mpi, next, action) => {
|
|
|
65
66
|
const { id } = action;
|
|
66
67
|
if (state.smartscript.triggers.variables.includes(id)) {
|
|
67
68
|
try {
|
|
68
|
-
const actions = (_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.triggerListeners(
|
|
69
|
+
const actions = (_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.triggerListeners("variable", id, cloneDeep(state.inputs));
|
|
69
70
|
if (Array.isArray(actions)) {
|
|
70
71
|
actions.forEach((_action) => {
|
|
71
72
|
mpi.dispatch(_action);
|
|
@@ -77,12 +78,29 @@ const watchUpdateVariableInput = (mpi, next, action) => {
|
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
};
|
|
81
|
+
const watchInitInputs = (mpi, next, action) => {
|
|
82
|
+
next(action);
|
|
83
|
+
if (!iframe)
|
|
84
|
+
return;
|
|
85
|
+
const { inputs } = action;
|
|
86
|
+
Object.keys(inputs.options).forEach((id) => {
|
|
87
|
+
inputs.options[id].forEach((value, index) => {
|
|
88
|
+
watchUpdateOptionInput(mpi, next, updateOptionAction(parseInt(id, 10), value, index));
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
Object.keys(inputs.variables).forEach((id) => {
|
|
92
|
+
inputs.variables[id].forEach((value, index) => {
|
|
93
|
+
watchUpdateVariableInput(mpi, next, updateVariableAction(parseInt(id, 10), value, index));
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
};
|
|
80
97
|
const watchersEnum = {
|
|
81
98
|
[ENABLE_SMARTSCRIPT]: watchEnableSmartScript,
|
|
82
99
|
[UPDATE_OPTION_INPUT]: watchUpdateOptionInput,
|
|
83
100
|
[UPDATE_VARIABLE_INPUT]: watchUpdateVariableInput,
|
|
84
101
|
[ADD_MULTIPLE_OCCURENCY]: watchUpdateOptionInput,
|
|
85
102
|
[DELETE_MULTIPLE_OCCURENCY]: watchUpdateOptionInput,
|
|
103
|
+
[INIT_INPUTS]: watchInitInputs,
|
|
86
104
|
};
|
|
87
105
|
const smartscriptMiddleware = (mpi) => (next) => (action) => {
|
|
88
106
|
if (Object.prototype.hasOwnProperty.call(watchersEnum, action.type)) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MiddlewareAPI, Dispatch } from "redux";
|
|
2
|
+
import { ActionsType } from "../../types/Actions.type";
|
|
3
|
+
export declare type WatcherActions = ActionsType.App.fetchModelSucceeded;
|
|
4
|
+
declare const thirdPartyScriptsMiddleware: (mpi: MiddlewareAPI) => (next: Dispatch) => (action: WatcherActions) => void | ActionsType.App.fetchModelSucceeded;
|
|
5
|
+
export default thirdPartyScriptsMiddleware;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { loadScripts } from "../../helpers/scriptsLoader";
|
|
2
|
+
import { FETCH_MODEL_SUCCEEDED } from "../constants/app";
|
|
3
|
+
const watchFetchModelSucceeded = (mpi, next, action) => {
|
|
4
|
+
next(action);
|
|
5
|
+
loadScripts();
|
|
6
|
+
};
|
|
7
|
+
const watchersEnum = {
|
|
8
|
+
[FETCH_MODEL_SUCCEEDED]: watchFetchModelSucceeded,
|
|
9
|
+
};
|
|
10
|
+
const thirdPartyScriptsMiddleware = (mpi) => (next) => (action) => {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(watchersEnum, action.type)) {
|
|
12
|
+
return watchersEnum[action.type].apply(null, [mpi, next, action]);
|
|
13
|
+
}
|
|
14
|
+
return next(action);
|
|
15
|
+
};
|
|
16
|
+
export default thirdPartyScriptsMiddleware;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const initCustomizationAutoDefaultTypeReducer: (state: StateType.App, action: ActionsType.App.initCustomizationAutoDefault) => StateType.App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const initCustomizationMetaReducer: (state: StateType.App, action: ActionsType.App.initCustomizationMeta) => StateType.App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const initInstanceReducer: (state: StateType.App, action: ActionsType.App.initInstance) => StateType.App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const setDataStatusReducer: (state: StateType.App, action: ActionsType.App.setDataStatus) => StateType.App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const updateInstanceReducer: (state: StateType.App, action: ActionsType.App.updateInstance) => StateType.App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const updateInstancePaidReducer: (state: StateType.App, action: ActionsType.App.updateInstancePaid) => StateType.App;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StateType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
2
|
export declare const fetchModelFailedReducer: (state: StateType.App) => StateType.App;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const fetchModelFailedReducer = (state) => (Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus:
|
|
1
|
+
export const fetchModelFailedReducer = (state) => (Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus: "failed" }) }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StateType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
2
|
export declare const fetchModelNonBlockingReducer: (state: StateType.App) => StateType.App;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const fetchModelNonBlockingReducer = (state) => (Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus:
|
|
1
|
+
export const fetchModelNonBlockingReducer = (state) => (Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus: "nonBlocking" }) }));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StateType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
2
|
export declare const fetchModelSucceededReducer: (state: StateType.App) => StateType.App;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const fetchModelSucceededReducer = (state) => (Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus:
|
|
1
|
+
export const fetchModelSucceededReducer = (state) => (Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus: "succeeded" }) }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StateType } from
|
|
2
|
-
import { ActionsType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
3
3
|
export declare const fetchModelUnhealthyReducer: (state: StateType.App, action: ActionsType.App.fetchModelUnhealthy) => StateType.App;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export const fetchModelUnhealthyReducer = (state, action) => {
|
|
2
2
|
const { report } = action;
|
|
3
|
-
return Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus:
|
|
3
|
+
return Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus: "unhealthy", report }) });
|
|
4
4
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StateType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
2
|
export declare const fetchModelUserLockedReducer: (state: StateType.App) => StateType.App;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const fetchModelUserLockedReducer = (state) => (Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus:
|
|
1
|
+
export const fetchModelUserLockedReducer = (state) => (Object.assign(Object.assign({}, state), { meta: Object.assign(Object.assign({}, state.meta), { fetchStatus: "userLocked" }) }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const initMetaReducer: (state: StateType.App, action: ActionsType.App.initMeta) => StateType.App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const setModelUuidReducer: (state: StateType.App, action: ActionsType.App.setModelUuid) => StateType.App;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StateType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
2
|
export declare const goNextPageReducer: (state: StateType.App) => StateType.App;
|
|
@@ -9,7 +9,7 @@ export const goNextPageReducer = (state) => {
|
|
|
9
9
|
const isLastPage = currentPage === state.pagination.totalPages;
|
|
10
10
|
const isFirstPage = false;
|
|
11
11
|
const { availableSections } = state.wizard;
|
|
12
|
-
const wizardIndexBegin = state.pagination.availableAppStates.indexOf(
|
|
12
|
+
const wizardIndexBegin = state.pagination.availableAppStates.indexOf("wizard");
|
|
13
13
|
const wizardIndexEnd = wizardIndexBegin + state.wizard.availableSections.length;
|
|
14
14
|
let currentAppStateIndex;
|
|
15
15
|
let currentSectionId;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const goPageReducer: (state: StateType.App, action: ActionsType.App.goPage) => StateType.App;
|
|
@@ -2,7 +2,7 @@ export const goPageReducer = (state, action) => {
|
|
|
2
2
|
const { currentPage } = action;
|
|
3
3
|
let appStatesPagesArray = [];
|
|
4
4
|
state.pagination.availableAppStates.forEach((_appState) => {
|
|
5
|
-
if (_appState ===
|
|
5
|
+
if (_appState === "wizard")
|
|
6
6
|
appStatesPagesArray = [
|
|
7
7
|
...appStatesPagesArray,
|
|
8
8
|
...new Array(state.wizard.availableSections.length).fill(_appState),
|
|
@@ -19,7 +19,7 @@ export const goPageReducer = (state, action) => {
|
|
|
19
19
|
? state.pagination.greatestPage
|
|
20
20
|
: currentPage;
|
|
21
21
|
const { availableSections } = state.wizard;
|
|
22
|
-
const wizardIndexBegin = state.pagination.availableAppStates.indexOf(
|
|
22
|
+
const wizardIndexBegin = state.pagination.availableAppStates.indexOf("wizard");
|
|
23
23
|
const wizardIndexEnd = wizardIndexBegin + state.wizard.availableSections.length;
|
|
24
24
|
let currentSectionId;
|
|
25
25
|
if (currentPage - 1 < wizardIndexBegin) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StateType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
2
|
export declare const goPreviousPageReducer: (state: StateType.App) => StateType.App;
|
|
@@ -5,7 +5,7 @@ export const goPreviousPageReducer = (state) => {
|
|
|
5
5
|
const isLastPage = false;
|
|
6
6
|
const isFirstPage = currentPage === 1;
|
|
7
7
|
const { availableSections } = state.wizard;
|
|
8
|
-
const wizardIndexBegin = state.pagination.availableAppStates.indexOf(
|
|
8
|
+
const wizardIndexBegin = state.pagination.availableAppStates.indexOf("wizard");
|
|
9
9
|
const wizardIndexEnd = wizardIndexBegin + state.wizard.availableSections.length;
|
|
10
10
|
let currentAppStateIndex;
|
|
11
11
|
let currentSectionId;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../../types/State.type";
|
|
3
3
|
export declare const initPaginationReducer: (state: StateType.App, action: ActionsType.App.initPagination) => StateType.App;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registerPluginsAppStates } from
|
|
1
|
+
import { registerPluginsAppStates } from "../../../../PluginLoader";
|
|
2
2
|
export const initPaginationReducer = (state, action) => {
|
|
3
3
|
const { currentPage, currentSectionId, availableSections, greatestPage, currentAppState, } = action;
|
|
4
4
|
const availableAppStates = registerPluginsAppStates(action.availableAppStates);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StateType } from
|
|
2
|
-
import { ActionsType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
3
3
|
export declare const updateAvailableAppStatesReducer: (state: StateType.App, action: ActionsType.App.updateAvailableAppStates) => StateType.App;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registerPluginsAppStates } from
|
|
1
|
+
import { registerPluginsAppStates } from "../../../../PluginLoader";
|
|
2
2
|
export const updateAvailableAppStatesReducer = (state, action) => {
|
|
3
3
|
let availableAppStates;
|
|
4
4
|
if (!action.ingorePluginAppStateReset) {
|
|
@@ -7,15 +7,15 @@ export const updateAvailableAppStatesReducer = (state, action) => {
|
|
|
7
7
|
else {
|
|
8
8
|
availableAppStates = action.availableAppStates;
|
|
9
9
|
}
|
|
10
|
-
if (state.pagination.availableAppStates.reduce((p, c) => p + c,
|
|
11
|
-
availableAppStates.reduce((p, c) => p + c,
|
|
10
|
+
if (state.pagination.availableAppStates.reduce((p, c) => p + c, "") ===
|
|
11
|
+
availableAppStates.reduce((p, c) => p + c, ""))
|
|
12
12
|
return state;
|
|
13
13
|
const totalPages = availableAppStates.length + state.wizard.availableSections.length - 1;
|
|
14
14
|
let appStates = [];
|
|
15
15
|
availableAppStates.forEach((currentAppState) => {
|
|
16
|
-
if (currentAppState ===
|
|
16
|
+
if (currentAppState === "wizard")
|
|
17
17
|
state.wizard.availableSections.forEach(() => {
|
|
18
|
-
appStates = [...appStates,
|
|
18
|
+
appStates = [...appStates, "wizard"];
|
|
19
19
|
});
|
|
20
20
|
else {
|
|
21
21
|
appStates = [...appStates, currentAppState];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StateType } from
|
|
2
|
-
import { ActionsType } from
|
|
1
|
+
import { StateType } from "../../../../types/State.type";
|
|
2
|
+
import { ActionsType } from "../../../../types/Actions.type";
|
|
3
3
|
export declare const updateAvailableSectionsReducer: (state: StateType.App, action: ActionsType.App.updateAvailableSections) => StateType.App;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const updateAvailableSectionsReducer = (state, action) => {
|
|
2
2
|
const { availableSections } = action;
|
|
3
|
-
if (state.wizard.availableSections.reduce((p, c) => p + c,
|
|
4
|
-
availableSections.reduce((p, c) => p + c,
|
|
3
|
+
if (state.wizard.availableSections.reduce((p, c) => p + c, "") ===
|
|
4
|
+
availableSections.reduce((p, c) => p + c, ""))
|
|
5
5
|
return state;
|
|
6
6
|
const totalPages = state.pagination.availableAppStates.length + availableSections.length - 1;
|
|
7
7
|
const isFirstPage = state.pagination.currentPage === 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../types/State.type";
|
|
3
3
|
export declare type PaginationReducerActions = ActionsType.App.initPagination | ActionsType.App.goPage | ActionsType.App.goNextPage | ActionsType.App.goPreviousPage | ActionsType.App.updateAvailableAppStates;
|
|
4
4
|
export declare type WizardReducerActions = ActionsType.App.updateAvailableSections;
|
|
5
5
|
export declare type CustomizationsReducerActions = ActionsType.App.initCustomizationMeta | ActionsType.App.initCustomizationAutoDefault;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { initPaginationReducer } from
|
|
2
|
-
import { INIT_PAGINATION, GO_PAGE, GO_NEXT_PAGE, GO_PREVIOUS_PAGE, INIT_META, INIT_INSTANCE, UPDATE_INSTANCE_PAID, UPDATE_AVAILABLE_SECTIONS, FETCH_MODEL_FAILED, FETCH_MODEL_SUCCEEDED, SET_DATA_STATUS, UPDATE_AVAILABLE_APPSTATES, INIT_CUSTOMIZATION_META, FETCH_MODEL_UNHEALTHY, FETCH_MODEL_USER_LOCKED, INIT_CUSTOMIZATION_AUTO_DEFAULT, UPDATE_INSTANCE, FETCH_MODEL_NONBLOCKING, SET_MODEL_UUID, } from
|
|
3
|
-
import { goPageReducer } from
|
|
4
|
-
import { goNextPageReducer } from
|
|
5
|
-
import { goPreviousPageReducer } from
|
|
6
|
-
import { updateAvailableAppStatesReducer } from
|
|
7
|
-
import { initMetaReducer } from
|
|
8
|
-
import { initInstanceReducer } from
|
|
9
|
-
import { updateInstanceReducer } from
|
|
10
|
-
import { updateInstancePaidReducer } from
|
|
11
|
-
import { updateAvailableSectionsReducer } from
|
|
12
|
-
import { fetchModelSucceededReducer } from
|
|
13
|
-
import { fetchModelUnhealthyReducer } from
|
|
14
|
-
import { fetchModelFailedReducer } from
|
|
15
|
-
import { setDataStatusReducer } from
|
|
16
|
-
import { initCustomizationMetaReducer } from
|
|
17
|
-
import { initCustomizationAutoDefaultTypeReducer } from
|
|
18
|
-
import { fetchModelUserLockedReducer } from
|
|
19
|
-
import { fetchModelNonBlockingReducer } from
|
|
20
|
-
import { setModelUuidReducer } from
|
|
1
|
+
import { initPaginationReducer } from "./app/pagination/initPagination";
|
|
2
|
+
import { INIT_PAGINATION, GO_PAGE, GO_NEXT_PAGE, GO_PREVIOUS_PAGE, INIT_META, INIT_INSTANCE, UPDATE_INSTANCE_PAID, UPDATE_AVAILABLE_SECTIONS, FETCH_MODEL_FAILED, FETCH_MODEL_SUCCEEDED, SET_DATA_STATUS, UPDATE_AVAILABLE_APPSTATES, INIT_CUSTOMIZATION_META, FETCH_MODEL_UNHEALTHY, FETCH_MODEL_USER_LOCKED, INIT_CUSTOMIZATION_AUTO_DEFAULT, UPDATE_INSTANCE, FETCH_MODEL_NONBLOCKING, SET_MODEL_UUID, } from "../constants/app";
|
|
3
|
+
import { goPageReducer } from "./app/pagination/goPage";
|
|
4
|
+
import { goNextPageReducer } from "./app/pagination/goNextPage";
|
|
5
|
+
import { goPreviousPageReducer } from "./app/pagination/goPreviousPage";
|
|
6
|
+
import { updateAvailableAppStatesReducer } from "./app/pagination/updateAvailableAppStates";
|
|
7
|
+
import { initMetaReducer } from "./app/meta/initMeta";
|
|
8
|
+
import { initInstanceReducer } from "./app/instance/initInstance";
|
|
9
|
+
import { updateInstanceReducer } from "./app/instance/updateInstance";
|
|
10
|
+
import { updateInstancePaidReducer } from "./app/instance/updateInstancePaid";
|
|
11
|
+
import { updateAvailableSectionsReducer } from "./app/wizard/updateAvailableSections";
|
|
12
|
+
import { fetchModelSucceededReducer } from "./app/meta/fetchModelSucceeded";
|
|
13
|
+
import { fetchModelUnhealthyReducer } from "./app/meta/fetchModelUnhealthy";
|
|
14
|
+
import { fetchModelFailedReducer } from "./app/meta/fetchModelFailed";
|
|
15
|
+
import { setDataStatusReducer } from "./app/instance/setDataStatus";
|
|
16
|
+
import { initCustomizationMetaReducer } from "./app/customizations/initCustomizationMeta";
|
|
17
|
+
import { initCustomizationAutoDefaultTypeReducer } from "./app/customizations/initCustomizationAutoDefault";
|
|
18
|
+
import { fetchModelUserLockedReducer } from "./app/meta/fetchModelUserLocked";
|
|
19
|
+
import { fetchModelNonBlockingReducer } from "./app/meta/fetchModelNonBlocking";
|
|
20
|
+
import { setModelUuidReducer } from "./app/meta/setModelUuid";
|
|
21
21
|
const initialState = {
|
|
22
22
|
meta: {
|
|
23
|
-
fetchStatus:
|
|
24
|
-
prefix:
|
|
23
|
+
fetchStatus: "waiting",
|
|
24
|
+
prefix: "",
|
|
25
25
|
id: 0,
|
|
26
|
-
permalink:
|
|
27
|
-
title:
|
|
26
|
+
permalink: "",
|
|
27
|
+
title: "",
|
|
28
28
|
modelVersion: 0,
|
|
29
|
-
productType:
|
|
29
|
+
productType: "",
|
|
30
30
|
},
|
|
31
31
|
instance: {
|
|
32
|
-
dataStatus:
|
|
33
|
-
uniqid:
|
|
32
|
+
dataStatus: "saving",
|
|
33
|
+
uniqid: "",
|
|
34
34
|
isPaid: false,
|
|
35
35
|
steps: [1],
|
|
36
36
|
},
|
|
@@ -41,8 +41,8 @@ const initialState = {
|
|
|
41
41
|
pagination: {
|
|
42
42
|
currentPage: 1,
|
|
43
43
|
greatestPage: 1,
|
|
44
|
-
currentAppState:
|
|
45
|
-
availableAppStates: [
|
|
44
|
+
currentAppState: "wizard",
|
|
45
|
+
availableAppStates: ["wizard"],
|
|
46
46
|
isFirstPage: true,
|
|
47
47
|
isLastPage: true,
|
|
48
48
|
totalPages: 1,
|
|
@@ -72,7 +72,7 @@ const reducersEnum = {
|
|
|
72
72
|
};
|
|
73
73
|
export const appReducer = (state = initialState, action) => {
|
|
74
74
|
const reducer = reducersEnum[action.type];
|
|
75
|
-
if (typeof reducer ===
|
|
75
|
+
if (typeof reducer === "function") {
|
|
76
76
|
return reducer.apply(null, [state, action]);
|
|
77
77
|
}
|
|
78
78
|
return state;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const addMultipleOccurencyReducer: (state: StateType.Conditions, action: ActionsType.Inputs.addMultipleOccurency) => StateType.Conditions;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import ConditionsMapper from
|
|
1
|
+
import ConditionsMapper from "@legalplace/referencesparser/dist/libs/ConditionsMapper";
|
|
2
2
|
export const addMultipleOccurencyReducer = (state, action) => {
|
|
3
3
|
const { id, optionRelations, prefillersVariables } = action;
|
|
4
4
|
if (optionRelations === undefined || prefillersVariables === undefined)
|
|
5
|
-
throw new Error(
|
|
5
|
+
throw new Error("ADD_MULTIPLE_OCCURENCY reducer did not recieve complete data when adding " +
|
|
6
6
|
`occurency for ${id}, please make sure "multiplesActions" middleware is ` +
|
|
7
|
-
|
|
7
|
+
"plugged and working properly");
|
|
8
8
|
const conditionnedOptions = Object.keys(state.options).map((currentId) => parseInt(currentId, 10));
|
|
9
9
|
const conditionnedVariables = Object.keys(state.variables).map((currentId) => parseInt(currentId, 10));
|
|
10
10
|
const conditionnedOptionsValidators = Object.keys(state.validators.options).map((currentId) => parseInt(currentId, 10));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const deleteMultipleOccurencyReducer: (state: StateType.Conditions, action: ActionsType.Inputs.deleteMultipleOccurency) => StateType.Conditions;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const deleteMultipleOccurencyReducer = (state, action) => {
|
|
2
2
|
const { id, index, optionRelations } = action;
|
|
3
3
|
if (optionRelations === undefined)
|
|
4
|
-
throw new Error(
|
|
4
|
+
throw new Error("DELETE_MULTIPLE_OCCURENCY reducer did not recieve complete data when removing " +
|
|
5
5
|
`occurency for ${id}, please make sure "multiplesActions" middleware is ` +
|
|
6
|
-
|
|
6
|
+
"plugged and working properly");
|
|
7
7
|
const conditionnedOptions = Object.keys(state.options).map((currentId) => parseInt(currentId, 10));
|
|
8
8
|
const conditionnedVariables = Object.keys(state.variables).map((currentId) => parseInt(currentId, 10));
|
|
9
9
|
const conditionnedOptionsValidators = Object.keys(state.validators.options).map((currentId) => parseInt(currentId, 10));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const initConditionsReducer: (state: StateType.Conditions, action: ActionsType.Conditions.initConditions) => StateType.Conditions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const updateDocumentConditionReducer: (state: StateType.Conditions, action: ActionsType.Conditions.updateDocumentCondition) => StateType.Conditions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const updateOptionConditionReducer: (state: StateType.Conditions, action: ActionsType.Conditions.updateOptionCondition) => StateType.Conditions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const updateOptionValidatorConditionReducer: (state: StateType.Conditions, action: ActionsType.Conditions.updateOptionValidatorCondition) => StateType.Conditions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const updatePrefillerConditionReducer: (state: StateType.Conditions, action: ActionsType.Conditions.updatePrefillerCondition) => StateType.Conditions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const updatePrefillerConditionReducer = (state, action) => {
|
|
2
2
|
const { id, value, index } = action;
|
|
3
3
|
if (!state.prefillers[id][index] ||
|
|
4
|
-
state.prefillers[id][index].reduce((v, p) => v + p,
|
|
5
|
-
value.reduce((v, p) => v + p,
|
|
4
|
+
state.prefillers[id][index].reduce((v, p) => v + p, "") ===
|
|
5
|
+
value.reduce((v, p) => v + p, ""))
|
|
6
6
|
return state;
|
|
7
7
|
return Object.assign(Object.assign({}, state), { prefillers: Object.assign(Object.assign({}, state.prefillers), { [id]: [
|
|
8
8
|
...state.prefillers[id].slice(0, index),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const updateSectionConditionReducer: (state: StateType.Conditions, action: ActionsType.Conditions.updateSectionCondition) => StateType.Conditions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const updateVariableConditionReducer: (state: StateType.Conditions, action: ActionsType.Conditions.updateVariableCondition) => StateType.Conditions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ActionsType } from
|
|
2
|
-
import { StateType } from
|
|
1
|
+
import { ActionsType } from "../../../types/Actions.type";
|
|
2
|
+
import { StateType } from "../../../types/State.type";
|
|
3
3
|
export declare const updateVariableValidatorConditionReducer: (state: StateType.Conditions, action: ActionsType.Conditions.updateVariableValidatorCondition) => StateType.Conditions;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StateType } from
|
|
2
|
-
import { ConditionsActions } from
|
|
1
|
+
import { StateType } from "../../types/State.type";
|
|
2
|
+
import { ConditionsActions } from "../../types/Actions.type";
|
|
3
3
|
export declare const conditionsReducer: (state: StateType.Conditions | undefined, action: ConditionsActions) => StateType.Conditions;
|