@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,121 +0,0 @@
|
|
|
1
|
-
import { MiddlewareAPI, Dispatch } from "redux";
|
|
2
|
-
import { ActionsType } from "../../types/Actions.type";
|
|
3
|
-
import {
|
|
4
|
-
ADD_MULTIPLE_OCCURENCY,
|
|
5
|
-
DELETE_MULTIPLE_OCCURENCY,
|
|
6
|
-
} from "../constants/inputs";
|
|
7
|
-
import {
|
|
8
|
-
selectOptionRelations,
|
|
9
|
-
selectOptionReference,
|
|
10
|
-
selectVariableReference,
|
|
11
|
-
} from "../selectors/references";
|
|
12
|
-
import { StateType } from "../../types/State.type";
|
|
13
|
-
|
|
14
|
-
export type WatcherActions =
|
|
15
|
-
| ActionsType.Inputs.addMultipleOccurency
|
|
16
|
-
| ActionsType.Inputs.deleteMultipleOccurency;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Watching ADD_MULTIPLE_OCCURENCY action
|
|
20
|
-
* @param mpi MiddlewareAPI
|
|
21
|
-
* @param next Dispatch function
|
|
22
|
-
* @param action Actions
|
|
23
|
-
*/
|
|
24
|
-
const completeAddMultipleOccurency = (
|
|
25
|
-
mpi: MiddlewareAPI<Dispatch, StateType>,
|
|
26
|
-
next: Dispatch,
|
|
27
|
-
action: ActionsType.Inputs.addMultipleOccurency
|
|
28
|
-
) => {
|
|
29
|
-
const { id } = action;
|
|
30
|
-
|
|
31
|
-
// Getting option relations
|
|
32
|
-
const optionRelations = selectOptionRelations(id);
|
|
33
|
-
const optionsIds: number[] = [
|
|
34
|
-
id,
|
|
35
|
-
...optionRelations.children.options,
|
|
36
|
-
...optionRelations.dependants,
|
|
37
|
-
];
|
|
38
|
-
|
|
39
|
-
// Getting options references
|
|
40
|
-
const optionsReferences: Record<string, StateType.References.Options.Option> =
|
|
41
|
-
{};
|
|
42
|
-
optionsIds.forEach((currentOptionId) => {
|
|
43
|
-
optionsReferences[currentOptionId] = selectOptionReference(currentOptionId);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
// Getting prefillers variables
|
|
47
|
-
const statePrefillers = mpi.getState().conditions.prefillers;
|
|
48
|
-
const conditionnedPrefillers = Object.keys(statePrefillers).map((currentId) =>
|
|
49
|
-
parseInt(currentId, 10)
|
|
50
|
-
);
|
|
51
|
-
const prefillersIds: number[] = optionRelations.children.variables.filter(
|
|
52
|
-
(currentId) => conditionnedPrefillers.includes(currentId)
|
|
53
|
-
);
|
|
54
|
-
const prefillersVariables: Record<
|
|
55
|
-
string,
|
|
56
|
-
StateType.References.Variables.Variable["prefillings"]
|
|
57
|
-
> = {};
|
|
58
|
-
prefillersIds.forEach((currentVariableId) => {
|
|
59
|
-
prefillersVariables[currentVariableId] =
|
|
60
|
-
selectVariableReference(currentVariableId).prefillings;
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// Completed Action
|
|
64
|
-
const completedAction: ActionsType.Inputs.addMultipleOccurency = {
|
|
65
|
-
...action,
|
|
66
|
-
optionRelations,
|
|
67
|
-
optionsReferences,
|
|
68
|
-
prefillersVariables,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
next(completedAction);
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Watching ADD_MULTIPLE_OCCURENCY action
|
|
76
|
-
* @param mpi MiddlewareAPI
|
|
77
|
-
* @param next Dispatch function
|
|
78
|
-
* @param action Actions
|
|
79
|
-
*/
|
|
80
|
-
const completeDeleteMultipleOccurency = (
|
|
81
|
-
mpi: MiddlewareAPI<Dispatch, StateType>,
|
|
82
|
-
next: Dispatch,
|
|
83
|
-
action: ActionsType.Inputs.addMultipleOccurency
|
|
84
|
-
) => {
|
|
85
|
-
const { id } = action;
|
|
86
|
-
|
|
87
|
-
// Getting option relations
|
|
88
|
-
const optionRelations = selectOptionRelations(id);
|
|
89
|
-
|
|
90
|
-
// Completed Action
|
|
91
|
-
const completedAction: ActionsType.Inputs.addMultipleOccurency = {
|
|
92
|
-
...action,
|
|
93
|
-
optionRelations,
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
next(completedAction);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// Enumerating watchers
|
|
100
|
-
const watchersEnum: Record<
|
|
101
|
-
string,
|
|
102
|
-
(mpi: MiddlewareAPI<Dispatch, StateType>, next: Dispatch, action: any) => void
|
|
103
|
-
> = {
|
|
104
|
-
[ADD_MULTIPLE_OCCURENCY]: completeAddMultipleOccurency,
|
|
105
|
-
[DELETE_MULTIPLE_OCCURENCY]: completeDeleteMultipleOccurency,
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Multiples actions Watcher Middleware
|
|
110
|
-
* @param mpi MiddlewareAPI
|
|
111
|
-
* @param next Dispatch function
|
|
112
|
-
* @param action Actions
|
|
113
|
-
*/
|
|
114
|
-
const multiplesActionsMiddleware =
|
|
115
|
-
(mpi: MiddlewareAPI) => (next: Dispatch) => (action: WatcherActions) => {
|
|
116
|
-
if (Object.prototype.hasOwnProperty.call(watchersEnum, action.type))
|
|
117
|
-
return watchersEnum[action.type].apply(null, [mpi, next, action]);
|
|
118
|
-
return next(action);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export default multiplesActionsMiddleware;
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import { LocationChangeAction, LOCATION_CHANGE } from "connected-react-router";
|
|
2
|
-
|
|
3
|
-
import { MiddlewareAPI, Dispatch } from "redux";
|
|
4
|
-
import { ActionsType } from "../../types/Actions.type";
|
|
5
|
-
import {
|
|
6
|
-
goPageAction,
|
|
7
|
-
updateAvailableSectionsAction,
|
|
8
|
-
initMetaAction,
|
|
9
|
-
initInstanceAction,
|
|
10
|
-
} from "../actions/app";
|
|
11
|
-
import { UPDATE_SECTION_CONDITION } from "../constants/conditions";
|
|
12
|
-
import {
|
|
13
|
-
selectAllSectionsReferences,
|
|
14
|
-
selectUserEmailSectionVariableIds,
|
|
15
|
-
} from "../selectors/references";
|
|
16
|
-
import { selectSectionConditionValue } from "../selectors/conditions";
|
|
17
|
-
import { isLevelAccessibleForUser, selectUserEmail } from "../selectors/user";
|
|
18
|
-
import {
|
|
19
|
-
selectAvailableSections,
|
|
20
|
-
selectPermalink,
|
|
21
|
-
selectCurrentPage,
|
|
22
|
-
isStepAvailable,
|
|
23
|
-
selectCurrentSectionId,
|
|
24
|
-
} from "../selectors/app";
|
|
25
|
-
import {
|
|
26
|
-
GO_PAGE,
|
|
27
|
-
GO_NEXT_PAGE,
|
|
28
|
-
GO_PREVIOUS_PAGE,
|
|
29
|
-
FETCH_MODEL_SUCCEEDED,
|
|
30
|
-
} from "../constants/app";
|
|
31
|
-
import { getHistory } from "../routerHistory";
|
|
32
|
-
import { StateType } from "../../types/State.type";
|
|
33
|
-
import { PathReader } from "../../libs/PathReader";
|
|
34
|
-
import { selectVariableInputByIndex } from "../selectors/inputs";
|
|
35
|
-
import { setUserEmail } from "../actions/sagas/user";
|
|
36
|
-
|
|
37
|
-
export type WatcherActions =
|
|
38
|
-
| ActionsType.Conditions.updateSectionCondition
|
|
39
|
-
| LocationChangeAction;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Watching FETCH_MODEL_SUCCEEDED action
|
|
43
|
-
* @param mpi MiddlewareAPI
|
|
44
|
-
* @param next Dispatch function
|
|
45
|
-
* @param action Actions
|
|
46
|
-
*/
|
|
47
|
-
const watchFetchModelSucceeded = (
|
|
48
|
-
mpi: MiddlewareAPI<Dispatch, StateType>,
|
|
49
|
-
next: Dispatch,
|
|
50
|
-
action: ActionsType.App.fetchModelSucceeded
|
|
51
|
-
) => {
|
|
52
|
-
const result = next(action);
|
|
53
|
-
|
|
54
|
-
const pathReader = new PathReader(mpi.getState());
|
|
55
|
-
mpi.dispatch(goPageAction(pathReader.currentPage, false));
|
|
56
|
-
|
|
57
|
-
return result;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Watching @@router/LOCATION_CHANGE action
|
|
62
|
-
* @param mpi MiddlewareAPI
|
|
63
|
-
* @param next Dispatch function
|
|
64
|
-
* @param action Actions
|
|
65
|
-
*/
|
|
66
|
-
const watchLocationChange = (
|
|
67
|
-
mpi: MiddlewareAPI<Dispatch, StateType>,
|
|
68
|
-
next: Dispatch,
|
|
69
|
-
action: ActionsType.Inputs.updateOptionInput
|
|
70
|
-
) => {
|
|
71
|
-
const result = next(action);
|
|
72
|
-
|
|
73
|
-
const pathReader = new PathReader(mpi.getState());
|
|
74
|
-
|
|
75
|
-
if (selectPermalink() === "") {
|
|
76
|
-
mpi.dispatch(
|
|
77
|
-
initMetaAction({
|
|
78
|
-
permalink: pathReader.currentPermalink,
|
|
79
|
-
prefix: pathReader.prefix,
|
|
80
|
-
id: 0,
|
|
81
|
-
title: "",
|
|
82
|
-
modelVersion: 0,
|
|
83
|
-
productType: "",
|
|
84
|
-
})
|
|
85
|
-
);
|
|
86
|
-
|
|
87
|
-
if (pathReader.currentUniqid !== undefined) {
|
|
88
|
-
// Dispatching instance
|
|
89
|
-
mpi.dispatch(
|
|
90
|
-
initInstanceAction({
|
|
91
|
-
dataStatus: "saved",
|
|
92
|
-
uniqid: pathReader.currentUniqid,
|
|
93
|
-
// TODO: Check this one
|
|
94
|
-
steps: [1],
|
|
95
|
-
})
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// If previousState is defined, we dispatch a goPage action
|
|
101
|
-
mpi.dispatch(goPageAction(pathReader.currentPage, false));
|
|
102
|
-
|
|
103
|
-
// Setting default values
|
|
104
|
-
mpi.dispatch({ type: "SET_DEFAULTS" });
|
|
105
|
-
|
|
106
|
-
return result;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Watching @@router/LOCATION_CHANGE action
|
|
111
|
-
* @param mpi MiddlewareAPI
|
|
112
|
-
* @param next Dispatch function
|
|
113
|
-
* @param action Actions
|
|
114
|
-
*/
|
|
115
|
-
const watchSectionConditionUpdate = (
|
|
116
|
-
mpi: MiddlewareAPI<Dispatch, StateType>,
|
|
117
|
-
next: Dispatch,
|
|
118
|
-
action: ActionsType.Inputs.updateOptionInput
|
|
119
|
-
) => {
|
|
120
|
-
const result = next(action);
|
|
121
|
-
const sectionsReferences = selectAllSectionsReferences();
|
|
122
|
-
if (sectionsReferences === undefined)
|
|
123
|
-
throw new Error(`Sections references not found`);
|
|
124
|
-
|
|
125
|
-
const availableSections = Object.keys(sectionsReferences)
|
|
126
|
-
.filter((sectionId) => {
|
|
127
|
-
const condition =
|
|
128
|
-
selectSectionConditionValue(parseInt(sectionId, 10)) !== false;
|
|
129
|
-
const sectionReference = sectionsReferences[sectionId];
|
|
130
|
-
const sectionGrantLevel = sectionReference.grantLevel
|
|
131
|
-
? sectionReference.grantLevel
|
|
132
|
-
: "GUEST";
|
|
133
|
-
const grant = isLevelAccessibleForUser(sectionGrantLevel);
|
|
134
|
-
const availableStep = isStepAvailable(sectionReference.step);
|
|
135
|
-
return condition && grant && availableStep;
|
|
136
|
-
})
|
|
137
|
-
.map((c) => parseInt(c, 10));
|
|
138
|
-
|
|
139
|
-
const currentAvailableSectionsReduced = selectAvailableSections().reduce(
|
|
140
|
-
(p: string, c: number) => `${p} ${c.toString()}`,
|
|
141
|
-
""
|
|
142
|
-
);
|
|
143
|
-
const nextvailableSectionsReduced = availableSections.reduce(
|
|
144
|
-
(p: string, c: number) => `${p} ${c.toString()}`,
|
|
145
|
-
""
|
|
146
|
-
);
|
|
147
|
-
|
|
148
|
-
if (currentAvailableSectionsReduced !== nextvailableSectionsReduced) {
|
|
149
|
-
mpi.dispatch(updateAvailableSectionsAction(availableSections));
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return result;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Watching GO_PAGE action
|
|
157
|
-
* @param mpi MiddlewareAPI
|
|
158
|
-
* @param next Dispatch function
|
|
159
|
-
* @param action Actions
|
|
160
|
-
*/
|
|
161
|
-
const watchGoPage = (
|
|
162
|
-
mpi: MiddlewareAPI<Dispatch, StateType>,
|
|
163
|
-
next: Dispatch,
|
|
164
|
-
action: ActionsType.App.goPage
|
|
165
|
-
) => {
|
|
166
|
-
// If we're in the wizard, let's dispatch SET_DEFAULTS
|
|
167
|
-
const state: StateType = mpi.getState();
|
|
168
|
-
if (state.app.pagination.currentAppState === "wizard") {
|
|
169
|
-
mpi.dispatch({ type: "SET_DEFAULTS" });
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
// Executing the action
|
|
173
|
-
const result = next(action);
|
|
174
|
-
|
|
175
|
-
// Pushing to History if necessary
|
|
176
|
-
if (action.pushHistory === true) {
|
|
177
|
-
const pathReader = new PathReader(mpi.getState());
|
|
178
|
-
const currentPage = selectCurrentPage();
|
|
179
|
-
const path = pathReader.parsePath(currentPage);
|
|
180
|
-
|
|
181
|
-
getHistory().push(path);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
return result;
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Watching GO_NEXT_PAGE & GO_PREVIOUS_PAGE action
|
|
189
|
-
* @param mpi MiddlewareAPI
|
|
190
|
-
* @param next Dispatch function
|
|
191
|
-
* @param action Actions
|
|
192
|
-
*/
|
|
193
|
-
const watchNextPreviousPage = (
|
|
194
|
-
mpi: MiddlewareAPI<Dispatch, StateType>,
|
|
195
|
-
next: Dispatch,
|
|
196
|
-
action: ActionsType.App.goPage
|
|
197
|
-
) => {
|
|
198
|
-
// If we're in the wizard, let's dispatch SET_DEFAULTS
|
|
199
|
-
const state: StateType = mpi.getState();
|
|
200
|
-
if (state.app.pagination.currentAppState === "wizard") {
|
|
201
|
-
mpi.dispatch({ type: "SET_DEFAULTS" });
|
|
202
|
-
}
|
|
203
|
-
const sectionUserEmailVariables = selectUserEmailSectionVariableIds(
|
|
204
|
-
selectCurrentSectionId()
|
|
205
|
-
);
|
|
206
|
-
if (sectionUserEmailVariables.length && !selectUserEmail()) {
|
|
207
|
-
const [firstUserEmailVariable] = sectionUserEmailVariables;
|
|
208
|
-
const userEmail = selectVariableInputByIndex(
|
|
209
|
-
parseInt(firstUserEmailVariable, 10),
|
|
210
|
-
0
|
|
211
|
-
) as string;
|
|
212
|
-
mpi.dispatch(setUserEmail(userEmail, true, true));
|
|
213
|
-
}
|
|
214
|
-
// Executing the action
|
|
215
|
-
const result = next(action);
|
|
216
|
-
const pathReader = new PathReader(mpi.getState());
|
|
217
|
-
|
|
218
|
-
const path = pathReader.parsePath(selectCurrentPage());
|
|
219
|
-
|
|
220
|
-
getHistory().push(path);
|
|
221
|
-
|
|
222
|
-
return result;
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
// Enumerating watchers
|
|
226
|
-
const watchersEnum: Record<
|
|
227
|
-
string,
|
|
228
|
-
(mpi: MiddlewareAPI<Dispatch, StateType>, next: Dispatch, action: any) => void
|
|
229
|
-
> = {
|
|
230
|
-
[LOCATION_CHANGE]: watchLocationChange,
|
|
231
|
-
[UPDATE_SECTION_CONDITION]: watchSectionConditionUpdate,
|
|
232
|
-
[GO_PAGE]: watchGoPage,
|
|
233
|
-
[GO_NEXT_PAGE]: watchNextPreviousPage,
|
|
234
|
-
[GO_PREVIOUS_PAGE]: watchNextPreviousPage,
|
|
235
|
-
[FETCH_MODEL_SUCCEEDED]: watchFetchModelSucceeded,
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Pagination Watcher Middleware
|
|
240
|
-
* @param mpi MiddlewareAPI
|
|
241
|
-
* @param next Dispatch function
|
|
242
|
-
* @param action Actions
|
|
243
|
-
*/
|
|
244
|
-
const paginationWatcherMiddleware =
|
|
245
|
-
(mpi: MiddlewareAPI) => (next: Dispatch) => (action: WatcherActions) => {
|
|
246
|
-
if (Object.prototype.hasOwnProperty.call(watchersEnum, action.type))
|
|
247
|
-
return watchersEnum[action.type].apply(null, [mpi, next, action]);
|
|
248
|
-
return next(action);
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
export default paginationWatcherMiddleware;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len */
|
|
2
|
-
import { MiddlewareAPI, Dispatch, Action } from "redux";
|
|
3
|
-
import { RunActionAnchor, RunOverrideActionAnchor } from "../../PluginLoader";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Prefiller Watcher Middleware
|
|
7
|
-
* @param mpi MiddlewareAPI
|
|
8
|
-
* @param next Dispatch function
|
|
9
|
-
* @param action Actions
|
|
10
|
-
*/
|
|
11
|
-
const pluginsHookMiddleware =
|
|
12
|
-
(mpi: MiddlewareAPI) => (next: Dispatch) => (action: Action) => {
|
|
13
|
-
const previousState = mpi.getState();
|
|
14
|
-
const overridenAction = RunOverrideActionAnchor(action);
|
|
15
|
-
const nextResult = next(overridenAction);
|
|
16
|
-
const nextState = mpi.getState();
|
|
17
|
-
|
|
18
|
-
// Running anchors
|
|
19
|
-
RunActionAnchor(action.type, previousState, nextState);
|
|
20
|
-
|
|
21
|
-
return nextResult;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default pluginsHookMiddleware;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import prefillerWatcherMiddleware from './prefillerWatcherMiddleware';
|
|
2
|
-
import { updatePrefillersConditionsAction } from '../actions/conditions';
|
|
3
|
-
import { StateType } from '../../types/State.type';
|
|
4
|
-
|
|
5
|
-
// Mocking MPI
|
|
6
|
-
const mpi = {
|
|
7
|
-
dispatch: jest.fn(),
|
|
8
|
-
getState: jest.fn(),
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
// Mocking Next
|
|
12
|
-
const next = jest.fn();
|
|
13
|
-
|
|
14
|
-
const mockVariablesInputs: Record<string, any[]> = {
|
|
15
|
-
3: ['Option 4 selected', 'Random text'],
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const mockVariablesReferences: StateType.References.Variables = {
|
|
19
|
-
3: {
|
|
20
|
-
id: 3,
|
|
21
|
-
label: 'Variable',
|
|
22
|
-
type: 'textarea',
|
|
23
|
-
step: '*',
|
|
24
|
-
prefillings: [
|
|
25
|
-
{
|
|
26
|
-
value: 'Option 4 selected',
|
|
27
|
-
conditions: {
|
|
28
|
-
selected: [
|
|
29
|
-
{
|
|
30
|
-
var: 'o.4',
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
value: 'Option 3 selected',
|
|
37
|
-
conditions: {
|
|
38
|
-
selected: [
|
|
39
|
-
{
|
|
40
|
-
var: 'o.3',
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
value: 'Variable 1 = Hello',
|
|
47
|
-
conditions: {
|
|
48
|
-
contains: [
|
|
49
|
-
{
|
|
50
|
-
var: 'v.1',
|
|
51
|
-
},
|
|
52
|
-
'Hello',
|
|
53
|
-
],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// Mocking input selecteor
|
|
61
|
-
// ../selectors/inputs.ts
|
|
62
|
-
jest.mock('../selectors/inputs', () => ({
|
|
63
|
-
__esModule: true,
|
|
64
|
-
selectVariableInputByIndex: (id: number, index: number) =>
|
|
65
|
-
mockVariablesInputs[id][index],
|
|
66
|
-
}));
|
|
67
|
-
|
|
68
|
-
// Mocking reference selecteor
|
|
69
|
-
// ../selectors/references.ts
|
|
70
|
-
jest.mock('../selectors/references', () => ({
|
|
71
|
-
__esModule: true,
|
|
72
|
-
selectVariableReference: (id: number) => mockVariablesReferences[id],
|
|
73
|
-
}));
|
|
74
|
-
|
|
75
|
-
describe('Prefillers Watcher Middleware Test suit', () => {
|
|
76
|
-
beforeEach(() => {
|
|
77
|
-
jest.clearAllMocks();
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
it('Updates variables properly if prefillers conditions changed', () => {
|
|
81
|
-
// Running watcher
|
|
82
|
-
prefillerWatcherMiddleware(mpi)(next)(
|
|
83
|
-
updatePrefillersConditionsAction(3, 0, [false, false, true])
|
|
84
|
-
);
|
|
85
|
-
|
|
86
|
-
expect(mpi.dispatch.mock.calls[0][0]).toStrictEqual({
|
|
87
|
-
type: 'UPDATE_VARIABLE_INPUT',
|
|
88
|
-
id: 3,
|
|
89
|
-
value: 'Variable 1 = Hello',
|
|
90
|
-
index: 0,
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
it('Should throw an error if variable does not exist', () => {
|
|
95
|
-
// Running watcher
|
|
96
|
-
expect(() =>
|
|
97
|
-
prefillerWatcherMiddleware(mpi)(next)(
|
|
98
|
-
updatePrefillersConditionsAction(13243, 0, [true, false, false])
|
|
99
|
-
)
|
|
100
|
-
).toThrowError('Variable 13243 does not exist');
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
it('Should not send update variable value if value is already equal to the prefiller', () => {
|
|
104
|
-
// Running watcher
|
|
105
|
-
prefillerWatcherMiddleware(mpi)(next)(
|
|
106
|
-
updatePrefillersConditionsAction(3, 0, [true, false, false])
|
|
107
|
-
);
|
|
108
|
-
expect(mpi.dispatch.mock.calls.length).toEqual(0);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
it('Should not send update variable value if value has been changed by user', () => {
|
|
112
|
-
// Running watcher
|
|
113
|
-
prefillerWatcherMiddleware(mpi)(next)(
|
|
114
|
-
updatePrefillersConditionsAction(3, 1, [true, true, true])
|
|
115
|
-
);
|
|
116
|
-
expect(mpi.dispatch.mock.calls.length).toEqual(0);
|
|
117
|
-
});
|
|
118
|
-
});
|