@legalplace/wizardx-core 2.3.0 → 2.4.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.
Files changed (538) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/App.d.ts +5 -5
  3. package/dist/App.js +22 -35
  4. package/dist/App.test.js +2 -2
  5. package/dist/Globals.d.ts +4 -0
  6. package/dist/Globals.js +9 -6
  7. package/dist/Loader.d.ts +1 -0
  8. package/dist/Loader.js +2 -0
  9. package/dist/PluginLoader.d.ts +3 -3
  10. package/dist/PluginLoader.js +22 -26
  11. package/dist/PluginLoader.test.js +6 -6
  12. package/dist/Shimmer.d.ts +1 -1
  13. package/dist/Shimmer.js +45 -47
  14. package/dist/ThemeLoader.d.ts +6 -5
  15. package/dist/ThemeLoader.js +21 -25
  16. package/dist/ThemeLoader.test.js +4 -3
  17. package/dist/components/PluginRoute.d.ts +3 -3
  18. package/dist/components/PluginRoute.js +8 -7
  19. package/dist/components/SmartScript.d.ts +7 -8
  20. package/dist/components/SmartScript.js +22 -21
  21. package/dist/components/UserLocked/UserLockedComponent.d.ts +1 -1
  22. package/dist/components/UserLocked/UserLockedComponent.js +5 -6
  23. package/dist/components/View.d.ts +8 -4
  24. package/dist/components/View.js +46 -55
  25. package/dist/components/View.test.js +6 -5
  26. package/dist/componentsConnectors/connectBox.d.ts +2 -3
  27. package/dist/componentsConnectors/connectBox.js +4 -4
  28. package/dist/componentsConnectors/connectBox.test.js +7 -7
  29. package/dist/componentsConnectors/connectDocument.d.ts +0 -1
  30. package/dist/componentsConnectors/connectDocument.js +6 -6
  31. package/dist/componentsConnectors/connectDocument.test.js +5 -5
  32. package/dist/componentsConnectors/connectHeader.d.ts +0 -1
  33. package/dist/componentsConnectors/connectHeader.js +2 -2
  34. package/dist/componentsConnectors/connectMetaTitle.d.ts +0 -1
  35. package/dist/componentsConnectors/connectMetaTitle.js +2 -2
  36. package/dist/componentsConnectors/connectMetaTitle.test.js +3 -3
  37. package/dist/componentsConnectors/connectOption.d.ts +2 -3
  38. package/dist/componentsConnectors/connectOption.js +9 -9
  39. package/dist/componentsConnectors/connectPagination.d.ts +0 -1
  40. package/dist/componentsConnectors/connectPagination.js +3 -3
  41. package/dist/componentsConnectors/connectPreview.d.ts +0 -1
  42. package/dist/componentsConnectors/connectPreview.js +2 -2
  43. package/dist/componentsConnectors/connectProgress.d.ts +0 -1
  44. package/dist/componentsConnectors/connectProgress.js +3 -3
  45. package/dist/componentsConnectors/connectRootOption.d.ts +2 -3
  46. package/dist/componentsConnectors/connectRootOption.js +2 -2
  47. package/dist/componentsConnectors/connectSection.d.ts +0 -1
  48. package/dist/componentsConnectors/connectSection.js +4 -4
  49. package/dist/componentsConnectors/connectSummary.d.ts +0 -1
  50. package/dist/componentsConnectors/connectSummary.js +2 -2
  51. package/dist/componentsConnectors/connectSummaryItem.d.ts +0 -1
  52. package/dist/componentsConnectors/connectSummaryItem.js +6 -6
  53. package/dist/componentsConnectors/connectTermsheet.d.ts +2 -2
  54. package/dist/componentsConnectors/connectTermsheet.js +43 -46
  55. package/dist/componentsConnectors/connectVariable.d.ts +1 -2
  56. package/dist/componentsConnectors/connectVariable.js +10 -10
  57. package/dist/componentsConnectors/connectWizardWrapper.d.ts +0 -1
  58. package/dist/componentsConnectors/connectWizardWrapper.js +4 -4
  59. package/dist/componentsConnectors/connector/componentConnector.d.ts +8 -8
  60. package/dist/componentsConnectors/connector/componentConnector.js +16 -19
  61. package/dist/componentsConnectors/library.d.ts +61 -0
  62. package/dist/componentsConnectors/library.js +34 -0
  63. package/dist/config.d.ts +1 -1
  64. package/dist/constants/phoneValidation.d.ts +3 -0
  65. package/dist/constants/phoneValidation.js +3 -0
  66. package/dist/helpers/outputsParsing.d.ts +1 -1
  67. package/dist/helpers/outputsParsing.js +25 -25
  68. package/dist/helpers/preloadTheme.js +1 -1
  69. package/dist/helpers/scriptsLoader.d.ts +1 -0
  70. package/dist/helpers/scriptsLoader.js +24 -0
  71. package/dist/helpers/sendinblueHelper.d.ts +3 -3
  72. package/dist/helpers/sendinblueHelper.js +29 -18
  73. package/dist/hooks/usePrevious.js +1 -1
  74. package/dist/libs/ConditionsInitiator.d.ts +1 -1
  75. package/dist/libs/ConditionsInitiator.js +2 -2
  76. package/dist/libs/ConditionsRunner/DataPopulator.js +7 -7
  77. package/dist/libs/ConditionsRunner.d.ts +3 -3
  78. package/dist/libs/ConditionsRunner.js +43 -43
  79. package/dist/libs/DocumentsOutputs.d.ts +2 -2
  80. package/dist/libs/DocumentsOutputs.js +5 -5
  81. package/dist/libs/Eval/EvalBase.js +17 -17
  82. package/dist/libs/Eval/EvalFunctions.d.ts +1 -1
  83. package/dist/libs/Eval/EvalFunctions.js +100 -100
  84. package/dist/libs/Eval/NumbersToLetters.js +46 -46
  85. package/dist/libs/EvalVariable.d.ts +2 -2
  86. package/dist/libs/EvalVariable.js +30 -29
  87. package/dist/libs/EventsTracking.js +32 -32
  88. package/dist/libs/Extracts.js +20 -20
  89. package/dist/libs/InputsInitiator.d.ts +1 -1
  90. package/dist/libs/InputsInitiator.js +15 -15
  91. package/dist/libs/NumAuto.js +1 -1
  92. package/dist/libs/OvcConverter.d.ts +1 -1
  93. package/dist/libs/OvcConverter.js +23 -23
  94. package/dist/libs/PathReader.d.ts +1 -1
  95. package/dist/libs/PathReader.js +22 -22
  96. package/dist/libs/SectionValidity.js +3 -3
  97. package/dist/libs/SmartScriptStore.d.ts +6 -6
  98. package/dist/libs/SmartScriptStore.js +33 -33
  99. package/dist/misc/test_model.d.ts +2 -2
  100. package/dist/misc/test_model.js +3807 -3807
  101. package/dist/polyfills/index.d.ts +5 -0
  102. package/dist/polyfills/index.js +5 -0
  103. package/dist/polyfills/prepend.js +2 -2
  104. package/dist/polyfills/stringRepeat.js +4 -4
  105. package/dist/redux/actions/app.d.ts +12 -12
  106. package/dist/redux/actions/app.js +1 -1
  107. package/dist/redux/actions/conditions.d.ts +2 -2
  108. package/dist/redux/actions/conditions.js +1 -1
  109. package/dist/redux/actions/inputs.d.ts +1 -1
  110. package/dist/redux/actions/inputs.js +1 -1
  111. package/dist/redux/actions/library.d.ts +73 -0
  112. package/dist/redux/actions/library.js +11 -0
  113. package/dist/redux/actions/mandatories.d.ts +1 -1
  114. package/dist/redux/actions/mandatories.js +1 -1
  115. package/dist/redux/actions/references.d.ts +4 -4
  116. package/dist/redux/actions/references.js +1 -1
  117. package/dist/redux/actions/sagas/data.d.ts +1 -1
  118. package/dist/redux/actions/sagas/data.js +1 -1
  119. package/dist/redux/actions/sagas/model.d.ts +3 -3
  120. package/dist/redux/actions/sagas/model.js +3 -3
  121. package/dist/redux/actions/sagas/user.d.ts +1 -1
  122. package/dist/redux/actions/sagas/user.js +1 -1
  123. package/dist/redux/actions/smartscript.d.ts +3 -3
  124. package/dist/redux/actions/smartscript.js +1 -1
  125. package/dist/redux/actions/user.d.ts +4 -4
  126. package/dist/redux/actions/user.js +1 -1
  127. package/dist/redux/constants/app.js +22 -22
  128. package/dist/redux/constants/conditions.js +8 -8
  129. package/dist/redux/constants/inputs.js +6 -6
  130. package/dist/redux/constants/mandatories.js +6 -6
  131. package/dist/redux/constants/references.js +3 -3
  132. package/dist/redux/constants/sagas/data.js +1 -1
  133. package/dist/redux/constants/sagas/model.js +2 -2
  134. package/dist/redux/constants/sagas/user.js +2 -2
  135. package/dist/redux/constants/smartscript.js +4 -4
  136. package/dist/redux/constants/user.js +3 -3
  137. package/dist/redux/listeners/subscriber.d.ts +2 -2
  138. package/dist/redux/middlewares/conditionsWatcherMiddleware.d.ts +2 -2
  139. package/dist/redux/middlewares/conditionsWatcherMiddleware.js +28 -28
  140. package/dist/redux/middlewares/evaluationsWatcherMiddleware.d.ts +4 -2
  141. package/dist/redux/middlewares/evaluationsWatcherMiddleware.js +10 -10
  142. package/dist/redux/middlewares/mandatoriesWatcherMiddleware.d.ts +2 -2
  143. package/dist/redux/middlewares/mandatoriesWatcherMiddleware.js +13 -13
  144. package/dist/redux/middlewares/multiplesActionsMiddleware.d.ts +2 -2
  145. package/dist/redux/middlewares/multiplesActionsMiddleware.js +2 -2
  146. package/dist/redux/middlewares/paginationWatcherMiddleware.d.ts +3 -3
  147. package/dist/redux/middlewares/paginationWatcherMiddleware.js +24 -24
  148. package/dist/redux/middlewares/pluginsHookMiddleware.d.ts +1 -1
  149. package/dist/redux/middlewares/pluginsHookMiddleware.js +1 -1
  150. package/dist/redux/middlewares/prefillerWatcherMiddleware.d.ts +2 -2
  151. package/dist/redux/middlewares/prefillerWatcherMiddleware.js +28 -28
  152. package/dist/redux/middlewares/smartscriptMiddleware.d.ts +2 -2
  153. package/dist/redux/middlewares/smartscriptMiddleware.js +15 -15
  154. package/dist/redux/middlewares/thirdpartyScriptsMiddleware.d.ts +5 -0
  155. package/dist/redux/middlewares/thirdpartyScriptsMiddleware.js +16 -0
  156. package/dist/redux/reducers/app/customizations/initCustomizationAutoDefault.d.ts +2 -2
  157. package/dist/redux/reducers/app/customizations/initCustomizationMeta.d.ts +2 -2
  158. package/dist/redux/reducers/app/instance/initInstance.d.ts +2 -2
  159. package/dist/redux/reducers/app/instance/setDataStatus.d.ts +2 -2
  160. package/dist/redux/reducers/app/instance/updateInstance.d.ts +2 -2
  161. package/dist/redux/reducers/app/instance/updateInstancePaid.d.ts +2 -2
  162. package/dist/redux/reducers/app/meta/fetchModelFailed.d.ts +1 -1
  163. package/dist/redux/reducers/app/meta/fetchModelFailed.js +1 -1
  164. package/dist/redux/reducers/app/meta/fetchModelNonBlocking.d.ts +1 -1
  165. package/dist/redux/reducers/app/meta/fetchModelNonBlocking.js +1 -1
  166. package/dist/redux/reducers/app/meta/fetchModelSucceeded.d.ts +1 -1
  167. package/dist/redux/reducers/app/meta/fetchModelSucceeded.js +1 -1
  168. package/dist/redux/reducers/app/meta/fetchModelUnhealthy.d.ts +2 -2
  169. package/dist/redux/reducers/app/meta/fetchModelUnhealthy.js +1 -1
  170. package/dist/redux/reducers/app/meta/fetchModelUserLocked.d.ts +1 -1
  171. package/dist/redux/reducers/app/meta/fetchModelUserLocked.js +1 -1
  172. package/dist/redux/reducers/app/meta/initMeta.d.ts +2 -2
  173. package/dist/redux/reducers/app/meta/setModelUuid.d.ts +2 -2
  174. package/dist/redux/reducers/app/pagination/goNextPage.d.ts +1 -1
  175. package/dist/redux/reducers/app/pagination/goNextPage.js +1 -1
  176. package/dist/redux/reducers/app/pagination/goPage.d.ts +2 -2
  177. package/dist/redux/reducers/app/pagination/goPage.js +2 -2
  178. package/dist/redux/reducers/app/pagination/goPreviousPage.d.ts +1 -1
  179. package/dist/redux/reducers/app/pagination/goPreviousPage.js +1 -1
  180. package/dist/redux/reducers/app/pagination/initPagination.d.ts +2 -2
  181. package/dist/redux/reducers/app/pagination/initPagination.js +1 -1
  182. package/dist/redux/reducers/app/pagination/updateAvailableAppStates.d.ts +2 -2
  183. package/dist/redux/reducers/app/pagination/updateAvailableAppStates.js +5 -5
  184. package/dist/redux/reducers/app/wizard/updateAvailableSections.d.ts +2 -2
  185. package/dist/redux/reducers/app/wizard/updateAvailableSections.js +2 -2
  186. package/dist/redux/reducers/app.d.ts +2 -2
  187. package/dist/redux/reducers/app.js +30 -30
  188. package/dist/redux/reducers/conditions/addMultipleOccurency.d.ts +2 -2
  189. package/dist/redux/reducers/conditions/addMultipleOccurency.js +3 -3
  190. package/dist/redux/reducers/conditions/deleteMultipleOccurency.d.ts +2 -2
  191. package/dist/redux/reducers/conditions/deleteMultipleOccurency.js +2 -2
  192. package/dist/redux/reducers/conditions/initConditions.d.ts +2 -2
  193. package/dist/redux/reducers/conditions/updateDocumentConditions.d.ts +2 -2
  194. package/dist/redux/reducers/conditions/updateOptionConditions.d.ts +2 -2
  195. package/dist/redux/reducers/conditions/updateOptionValidatorCondition.d.ts +2 -2
  196. package/dist/redux/reducers/conditions/updatePrefillerConditions.d.ts +2 -2
  197. package/dist/redux/reducers/conditions/updatePrefillerConditions.js +2 -2
  198. package/dist/redux/reducers/conditions/updateSectionConditions.d.ts +2 -2
  199. package/dist/redux/reducers/conditions/updateVariableConditions.d.ts +2 -2
  200. package/dist/redux/reducers/conditions/updateVariableValidatorCondition.d.ts +2 -2
  201. package/dist/redux/reducers/conditions.d.ts +2 -2
  202. package/dist/redux/reducers/conditions.js +13 -13
  203. package/dist/redux/reducers/inputs/addMultipleOccurency.d.ts +2 -2
  204. package/dist/redux/reducers/inputs/addMultipleOccurency.js +4 -4
  205. package/dist/redux/reducers/inputs/deleteMultipleOccurency.d.ts +2 -2
  206. package/dist/redux/reducers/inputs/deleteMultipleOccurency.js +2 -2
  207. package/dist/redux/reducers/inputs/initOption.d.ts +2 -2
  208. package/dist/redux/reducers/inputs/initVariable.d.ts +2 -2
  209. package/dist/redux/reducers/inputs/updateOptionInput.d.ts +2 -2
  210. package/dist/redux/reducers/inputs/updateVariableInput.d.ts +2 -2
  211. package/dist/redux/reducers/inputs.d.ts +2 -2
  212. package/dist/redux/reducers/inputs.js +8 -8
  213. package/dist/redux/reducers/mandatories/addMultipleOccurency.d.ts +2 -2
  214. package/dist/redux/reducers/mandatories/addMultipleOccurency.js +2 -2
  215. package/dist/redux/reducers/mandatories/deleteMultipleOccurency.d.ts +2 -2
  216. package/dist/redux/reducers/mandatories/deleteMultipleOccurency.js +2 -2
  217. package/dist/redux/reducers/mandatories/initMandatoryOption.d.ts +2 -2
  218. package/dist/redux/reducers/mandatories/initMandatoryVariable.d.ts +2 -2
  219. package/dist/redux/reducers/mandatories/setMandatoryIgnore.d.ts +2 -2
  220. package/dist/redux/reducers/mandatories/setMandatoryOption.d.ts +2 -2
  221. package/dist/redux/reducers/mandatories/setMandatorySection.d.ts +2 -2
  222. package/dist/redux/reducers/mandatories/setMandatoryVariable.d.ts +2 -2
  223. package/dist/redux/reducers/mandatories.d.ts +2 -2
  224. package/dist/redux/reducers/mandatories.js +11 -11
  225. package/dist/redux/reducers/references/initReferences.d.ts +2 -2
  226. package/dist/redux/reducers/references/updateOptionMeta.d.ts +2 -2
  227. package/dist/redux/reducers/references/updateOptionMeta.js +2 -2
  228. package/dist/redux/reducers/references/updateVariableMeta.d.ts +2 -2
  229. package/dist/redux/reducers/references/updateVariableMeta.js +2 -2
  230. package/dist/redux/reducers/references.d.ts +2 -2
  231. package/dist/redux/reducers/references.js +5 -5
  232. package/dist/redux/reducers/smartscript/enableSmartScript.d.ts +1 -1
  233. package/dist/redux/reducers/smartscript/initSmartScriptTriggers.d.ts +2 -2
  234. package/dist/redux/reducers/smartscript/updateSmartscriptOptionHidden.d.ts +2 -2
  235. package/dist/redux/reducers/smartscript/updateSmartscriptVariableHidden.d.ts +2 -2
  236. package/dist/redux/reducers/smartscript.d.ts +2 -2
  237. package/dist/redux/reducers/smartscript.js +6 -6
  238. package/dist/redux/reducers/user/initUser.d.ts +2 -2
  239. package/dist/redux/reducers/user/setUserStatus.d.ts +2 -2
  240. package/dist/redux/reducers/user/setUserValidToken.d.ts +2 -2
  241. package/dist/redux/reducers/user.d.ts +2 -2
  242. package/dist/redux/reducers/user.js +9 -9
  243. package/dist/redux/routerHistory.d.ts +2 -2
  244. package/dist/redux/routerHistory.js +5 -5
  245. package/dist/redux/sagas/fetchModel.d.ts +4 -4
  246. package/dist/redux/sagas/fetchModel.js +84 -88
  247. package/dist/redux/sagas/fetchModel.test.js +2 -3
  248. package/dist/redux/sagas/homogeneousRadioInputsSaga.js +5 -5
  249. package/dist/redux/sagas/runner.d.ts +1 -1
  250. package/dist/redux/sagas/runner.js +5 -5
  251. package/dist/redux/sagas/saveData.js +34 -25
  252. package/dist/redux/sagas/setDefaults.js +8 -8
  253. package/dist/redux/sagas/setUserEmail.js +43 -43
  254. package/dist/redux/selectors/app.d.ts +1 -0
  255. package/dist/redux/selectors/app.js +26 -25
  256. package/dist/redux/selectors/conditions.js +34 -34
  257. package/dist/redux/selectors/inputs.d.ts +1 -1
  258. package/dist/redux/selectors/inputs.js +8 -8
  259. package/dist/{componentsConnectors/connector/connectorSelectors.d.ts → redux/selectors/library.d.ts} +16 -16
  260. package/dist/redux/selectors/library.js +8 -0
  261. package/dist/redux/selectors/mandatories.js +10 -10
  262. package/dist/redux/selectors/references.js +19 -19
  263. package/dist/redux/selectors/selectors.d.ts +2 -2
  264. package/dist/redux/selectors/selectors.js +2 -2
  265. package/dist/redux/selectors/smartscript.js +5 -5
  266. package/dist/redux/selectors/user.js +5 -5
  267. package/dist/redux/store.d.ts +6 -2
  268. package/dist/redux/store.js +31 -31
  269. package/dist/service/api.manager.d.ts +2 -2
  270. package/dist/service/api.manager.js +46 -46
  271. package/dist/service/auth.service.js +2 -2
  272. package/dist/service/pardot.service.js +2 -2
  273. package/dist/tests-misc/plugins/jestTestPlugin/after.d.ts +1 -1
  274. package/dist/tests-misc/plugins/jestTestPlugin/after.js +2 -2
  275. package/dist/tests-misc/plugins/jestTestPlugin/before.d.ts +1 -1
  276. package/dist/tests-misc/plugins/jestTestPlugin/before.js +2 -5
  277. package/dist/tests-misc/plugins/jestTestPlugin/index.js +4 -4
  278. package/dist/tests-misc/plugins/jestTestPlugin/title.d.ts +1 -1
  279. package/dist/tests-misc/plugins/jestTestPlugin/title.js +2 -2
  280. package/dist/tests-misc/themes/jestTestTheme/components/EmailComponent.d.ts +0 -1
  281. package/dist/tests-misc/themes/jestTestTheme/components/EmailComponent.js +2 -2
  282. package/dist/tests-misc/themes/jestTestTheme/components/TermsheetComponent.d.ts +0 -1
  283. package/dist/tests-misc/themes/jestTestTheme/components/TermsheetComponent.js +2 -2
  284. package/dist/tests-misc/themes/jestTestTheme/components/WizardComponent.d.ts +0 -1
  285. package/dist/tests-misc/themes/jestTestTheme/components/WizardComponent.js +2 -2
  286. package/dist/tests-misc/themes/jestTestTheme/faltyIndex.js +1 -1
  287. package/dist/tests-misc/themes/jestTestTheme/faltyIndexLoader.js +1 -1
  288. package/dist/tests-misc/themes/jestTestTheme/index.js +4 -4
  289. package/dist/types/Actions.type.d.ts +37 -37
  290. package/dist/types/Components.type.d.ts +4 -5
  291. package/dist/types/State.type.d.ts +9 -9
  292. package/dist/types/Termsheet.type.d.ts +4 -4
  293. package/dist/types/api.type.d.ts +4 -4
  294. package/dist/types/config.type.d.ts +2 -3
  295. package/dist/types/getActions.type.d.ts +2 -2
  296. package/dist/types/getConnectors.type.d.ts +2 -3
  297. package/dist/types/getSelectors.type.d.ts +2 -2
  298. package/dist/wizard-params.d.ts +1 -1
  299. package/dist/wizard-params.js +16 -16
  300. package/jest.config.ts +1 -1
  301. package/package.json +16 -8
  302. package/setupJest.ts +8 -0
  303. package/src/App.tsx +22 -25
  304. package/src/Globals.ts +12 -8
  305. package/src/Loader.tsx +8 -0
  306. package/src/PluginLoader.tsx +20 -37
  307. package/src/Shimmer.tsx +58 -45
  308. package/src/ThemeLoader.test.tsx +1 -0
  309. package/src/ThemeLoader.tsx +27 -42
  310. package/src/components/PluginRoute.tsx +8 -6
  311. package/src/components/SmartScript.tsx +29 -28
  312. package/src/components/UserLocked/UserLockedComponent.tsx +3 -3
  313. package/src/components/View.test.tsx +3 -0
  314. package/src/components/View.tsx +52 -54
  315. package/src/componentsConnectors/connectBox.tsx +6 -6
  316. package/src/componentsConnectors/connectDocument.tsx +6 -6
  317. package/src/componentsConnectors/connectHeader.tsx +2 -2
  318. package/src/componentsConnectors/connectMetaTitle.tsx +2 -2
  319. package/src/componentsConnectors/connectOption.tsx +11 -11
  320. package/src/componentsConnectors/connectPagination.tsx +3 -3
  321. package/src/componentsConnectors/connectPreview.tsx +2 -2
  322. package/src/componentsConnectors/connectProgress.tsx +3 -3
  323. package/src/componentsConnectors/connectRootOption.tsx +4 -4
  324. package/src/componentsConnectors/connectSection.tsx +4 -4
  325. package/src/componentsConnectors/connectSummary.tsx +2 -2
  326. package/src/componentsConnectors/connectSummaryItem.tsx +6 -6
  327. package/src/componentsConnectors/connectTermsheet.tsx +46 -46
  328. package/src/componentsConnectors/connectVariable.tsx +11 -11
  329. package/src/componentsConnectors/connectWizardWrapper.tsx +4 -4
  330. package/src/componentsConnectors/connector/componentConnector.tsx +22 -20
  331. package/src/componentsConnectors/library.ts +35 -0
  332. package/src/config.test.ts +2 -1
  333. package/src/config.ts +1 -1
  334. package/src/constants/phoneValidation.ts +6 -0
  335. package/src/definitions/path.join.d.ts +1 -1
  336. package/src/helpers/outputsParsing.ts +26 -26
  337. package/src/helpers/preloadTheme.ts +2 -2
  338. package/src/helpers/scriptsLoader.ts +20 -0
  339. package/src/helpers/sendinblueHelper.ts +23 -17
  340. package/src/hooks/usePrevious.ts +1 -1
  341. package/src/libs/ConditionsInitiator.ts +3 -3
  342. package/src/libs/ConditionsRunner/DataPopulator.ts +7 -7
  343. package/src/libs/ConditionsRunner.ts +53 -53
  344. package/src/libs/DocumentsOutputs.ts +7 -7
  345. package/src/libs/Eval/EvalBase.ts +17 -17
  346. package/src/libs/Eval/EvalFunctions.ts +100 -100
  347. package/src/libs/Eval/NumbersToLetters.ts +48 -48
  348. package/src/libs/EvalVariable.ts +34 -31
  349. package/src/libs/EventsTracking.ts +38 -38
  350. package/src/libs/Extracts.ts +21 -21
  351. package/src/libs/InputsInitiator.ts +16 -16
  352. package/src/libs/NumAuto.ts +1 -1
  353. package/src/libs/OvcConverter.ts +25 -25
  354. package/src/libs/PathReader.ts +23 -23
  355. package/src/libs/SectionValidity.ts +3 -3
  356. package/src/libs/SmartScriptStore.ts +40 -40
  357. package/src/misc/test_model.ts +3809 -3809
  358. package/src/polyfills/index.ts +5 -0
  359. package/src/polyfills/prepend.ts +2 -2
  360. package/src/polyfills/stringRepeat.ts +4 -4
  361. package/src/redux/actions/app.ts +13 -13
  362. package/src/redux/actions/conditions.ts +3 -3
  363. package/src/redux/actions/inputs.ts +2 -2
  364. package/src/redux/actions/library.ts +23 -0
  365. package/src/redux/actions/mandatories.ts +2 -2
  366. package/src/redux/actions/references.ts +5 -5
  367. package/src/redux/actions/sagas/data.ts +2 -2
  368. package/src/redux/actions/sagas/model.ts +6 -6
  369. package/src/redux/actions/sagas/user.ts +2 -2
  370. package/src/redux/actions/smartscript.ts +4 -4
  371. package/src/redux/actions/user.ts +5 -5
  372. package/src/redux/constants/app.ts +22 -22
  373. package/src/redux/constants/conditions.ts +8 -8
  374. package/src/redux/constants/inputs.ts +6 -6
  375. package/src/redux/constants/mandatories.ts +6 -6
  376. package/src/redux/constants/references.ts +3 -3
  377. package/src/redux/constants/sagas/data.ts +1 -1
  378. package/src/redux/constants/sagas/model.ts +2 -2
  379. package/src/redux/constants/sagas/user.ts +2 -2
  380. package/src/redux/constants/smartscript.ts +4 -4
  381. package/src/redux/constants/user.ts +3 -3
  382. package/src/redux/listeners/subscriber.ts +2 -2
  383. package/src/redux/middlewares/conditionsWatcherMiddleware.ts +31 -31
  384. package/src/redux/middlewares/evaluationsWatcherMiddleware.test.ts +1 -1
  385. package/src/redux/middlewares/evaluationsWatcherMiddleware.ts +13 -13
  386. package/src/redux/middlewares/mandatoriesWatcherMiddleware.ts +16 -16
  387. package/src/redux/middlewares/multiplesActionsMiddleware.ts +6 -6
  388. package/src/redux/middlewares/paginationWatcherMiddleware.ts +27 -27
  389. package/src/redux/middlewares/pluginsHookMiddleware.ts +2 -2
  390. package/src/redux/middlewares/prefillerWatcherMiddleware.ts +31 -31
  391. package/src/redux/middlewares/smartscriptMiddleware.ts +20 -20
  392. package/src/redux/middlewares/thirdpartyScriptsMiddleware.ts +41 -0
  393. package/src/redux/reducers/app/customizations/initCustomizationAutoDefault.ts +2 -2
  394. package/src/redux/reducers/app/customizations/initCustomizationMeta.ts +2 -2
  395. package/src/redux/reducers/app/instance/initInstance.ts +2 -2
  396. package/src/redux/reducers/app/instance/setDataStatus.ts +2 -2
  397. package/src/redux/reducers/app/instance/updateInstance.ts +2 -2
  398. package/src/redux/reducers/app/instance/updateInstancePaid.ts +2 -2
  399. package/src/redux/reducers/app/meta/fetchModelFailed.ts +2 -2
  400. package/src/redux/reducers/app/meta/fetchModelNonBlocking.ts +2 -2
  401. package/src/redux/reducers/app/meta/fetchModelSucceeded.ts +2 -2
  402. package/src/redux/reducers/app/meta/fetchModelUnhealthy.ts +3 -3
  403. package/src/redux/reducers/app/meta/fetchModelUserLocked.ts +2 -2
  404. package/src/redux/reducers/app/meta/initMeta.ts +2 -2
  405. package/src/redux/reducers/app/meta/setModelUuid.ts +2 -2
  406. package/src/redux/reducers/app/pagination/goNextPage.ts +2 -2
  407. package/src/redux/reducers/app/pagination/goPage.ts +4 -4
  408. package/src/redux/reducers/app/pagination/goPreviousPage.ts +2 -2
  409. package/src/redux/reducers/app/pagination/initPagination.ts +3 -3
  410. package/src/redux/reducers/app/pagination/updateAvailableAppStates.ts +7 -7
  411. package/src/redux/reducers/app/wizard/updateAvailableSections.ts +4 -4
  412. package/src/redux/reducers/app.ts +32 -32
  413. package/src/redux/reducers/conditions/addMultipleOccurency.ts +5 -5
  414. package/src/redux/reducers/conditions/deleteMultipleOccurency.ts +4 -4
  415. package/src/redux/reducers/conditions/initConditions.ts +2 -2
  416. package/src/redux/reducers/conditions/updateDocumentConditions.ts +2 -2
  417. package/src/redux/reducers/conditions/updateOptionConditions.ts +2 -2
  418. package/src/redux/reducers/conditions/updateOptionValidatorCondition.ts +2 -2
  419. package/src/redux/reducers/conditions/updatePrefillerConditions.ts +4 -4
  420. package/src/redux/reducers/conditions/updateSectionConditions.ts +2 -2
  421. package/src/redux/reducers/conditions/updateVariableConditions.ts +2 -2
  422. package/src/redux/reducers/conditions/updateVariableValidatorCondition.ts +2 -2
  423. package/src/redux/reducers/conditions.ts +15 -15
  424. package/src/redux/reducers/inputs/addMultipleOccurency.ts +6 -6
  425. package/src/redux/reducers/inputs/deleteMultipleOccurency.ts +4 -4
  426. package/src/redux/reducers/inputs/initOption.ts +2 -2
  427. package/src/redux/reducers/inputs/initVariable.ts +2 -2
  428. package/src/redux/reducers/inputs/updateOptionInput.ts +2 -2
  429. package/src/redux/reducers/inputs/updateVariableInput.ts +2 -2
  430. package/src/redux/reducers/inputs.ts +10 -10
  431. package/src/redux/reducers/mandatories/addMultipleOccurency.ts +4 -4
  432. package/src/redux/reducers/mandatories/deleteMultipleOccurency.ts +4 -4
  433. package/src/redux/reducers/mandatories/initMandatoryOption.ts +2 -2
  434. package/src/redux/reducers/mandatories/initMandatoryVariable.ts +2 -2
  435. package/src/redux/reducers/mandatories/setMandatoryIgnore.ts +2 -2
  436. package/src/redux/reducers/mandatories/setMandatoryOption.ts +2 -2
  437. package/src/redux/reducers/mandatories/setMandatorySection.ts +2 -2
  438. package/src/redux/reducers/mandatories/setMandatoryVariable.ts +2 -2
  439. package/src/redux/reducers/mandatories.ts +13 -13
  440. package/src/redux/reducers/references/initReferences.ts +2 -2
  441. package/src/redux/reducers/references/updateOptionMeta.ts +4 -4
  442. package/src/redux/reducers/references/updateVariableMeta.ts +4 -4
  443. package/src/redux/reducers/references.ts +7 -7
  444. package/src/redux/reducers/smartscript/enableSmartScript.ts +1 -1
  445. package/src/redux/reducers/smartscript/initSmartScriptTriggers.ts +2 -2
  446. package/src/redux/reducers/smartscript/updateSmartscriptOptionHidden.ts +2 -2
  447. package/src/redux/reducers/smartscript/updateSmartscriptVariableHidden.ts +2 -2
  448. package/src/redux/reducers/smartscript.ts +8 -8
  449. package/src/redux/reducers/user/initUser.ts +2 -2
  450. package/src/redux/reducers/user/setUserStatus.ts +2 -2
  451. package/src/redux/reducers/user/setUserValidToken.ts +2 -2
  452. package/src/redux/reducers/user.ts +11 -11
  453. package/src/redux/routerHistory.ts +6 -6
  454. package/src/redux/sagas/fetchModel.test.ts +2 -5
  455. package/src/redux/sagas/fetchModel.ts +91 -100
  456. package/src/redux/sagas/homogeneousRadioInputsSaga.ts +6 -6
  457. package/src/redux/sagas/runner.ts +6 -6
  458. package/src/redux/sagas/saveData.ts +32 -28
  459. package/src/redux/sagas/setDefaults.ts +8 -8
  460. package/src/redux/sagas/setUserEmail.ts +46 -45
  461. package/src/redux/selectors/app.ts +34 -28
  462. package/src/redux/selectors/conditions.ts +41 -41
  463. package/src/redux/selectors/inputs.ts +10 -10
  464. package/src/redux/selectors/library.ts +17 -0
  465. package/src/redux/selectors/mandatories.ts +10 -10
  466. package/src/redux/selectors/references.ts +21 -21
  467. package/src/redux/selectors/selectors.ts +4 -4
  468. package/src/redux/selectors/smartscript.ts +6 -6
  469. package/src/redux/selectors/user.ts +8 -8
  470. package/src/redux/store.ts +42 -32
  471. package/src/service/api.manager.ts +53 -53
  472. package/src/service/auth.service.ts +2 -2
  473. package/src/service/pardot.service.ts +2 -2
  474. package/src/tests-misc/plugins/jestTestPlugin/after.tsx +1 -1
  475. package/src/tests-misc/plugins/jestTestPlugin/before.tsx +1 -1
  476. package/src/tests-misc/plugins/jestTestPlugin/index.ts +4 -4
  477. package/src/tests-misc/plugins/jestTestPlugin/title.tsx +2 -2
  478. package/src/tests-misc/themes/jestTestTheme/components/EmailComponent.tsx +1 -1
  479. package/src/tests-misc/themes/jestTestTheme/components/TermsheetComponent.tsx +1 -1
  480. package/src/tests-misc/themes/jestTestTheme/components/WizardComponent.tsx +1 -1
  481. package/src/tests-misc/themes/jestTestTheme/faltyIndex.ts +1 -1
  482. package/src/tests-misc/themes/jestTestTheme/faltyIndexLoader.ts +1 -1
  483. package/src/tests-misc/themes/jestTestTheme/index.ts +4 -4
  484. package/src/types/Actions.type.ts +55 -55
  485. package/src/types/Components.type.ts +4 -4
  486. package/src/types/State.type.ts +14 -14
  487. package/src/types/Termsheet.type.ts +4 -4
  488. package/src/types/api.type.ts +4 -4
  489. package/src/types/config.type.ts +3 -3
  490. package/src/types/getActions.type.ts +2 -2
  491. package/src/types/getConnectors.type.ts +2 -2
  492. package/src/types/getSelectors.type.ts +2 -2
  493. package/src/wizard-params.ts +17 -17
  494. package/tsconfig.json +1 -1
  495. package/dist/componentsConnectors/connector/connectorSelectors.js +0 -9
  496. package/dist/componentsConnectors/index.d.ts +0 -16
  497. package/dist/componentsConnectors/index.js +0 -16
  498. package/dist/constants/index.d.ts +0 -1
  499. package/dist/constants/index.js +0 -1
  500. package/dist/helpers/index.d.ts +0 -2
  501. package/dist/helpers/index.js +0 -2
  502. package/dist/hooks/index.d.ts +0 -1
  503. package/dist/hooks/index.js +0 -1
  504. package/dist/index.d.ts +0 -23
  505. package/dist/index.js +0 -23
  506. package/dist/libs/index.d.ts +0 -12
  507. package/dist/libs/index.js +0 -12
  508. package/dist/redux/actions/index.d.ts +0 -8
  509. package/dist/redux/actions/index.js +0 -8
  510. package/dist/redux/actions/sagas/index.d.ts +0 -3
  511. package/dist/redux/actions/sagas/index.js +0 -3
  512. package/dist/redux/constants/index.d.ts +0 -8
  513. package/dist/redux/constants/index.js +0 -8
  514. package/dist/redux/constants/sagas/index.d.ts +0 -3
  515. package/dist/redux/constants/sagas/index.js +0 -3
  516. package/dist/redux/index.d.ts +0 -4
  517. package/dist/redux/index.js +0 -4
  518. package/dist/redux/selectors/index.d.ts +0 -7
  519. package/dist/redux/selectors/index.js +0 -7
  520. package/dist/service/index.d.ts +0 -3
  521. package/dist/service/index.js +0 -3
  522. package/dist/types/index.d.ts +0 -10
  523. package/dist/types/index.js +0 -10
  524. package/src/componentsConnectors/connector/connectorSelectors.ts +0 -19
  525. package/src/componentsConnectors/index.ts +0 -16
  526. package/src/constants/index.ts +0 -1
  527. package/src/helpers/index.ts +0 -2
  528. package/src/hooks/index.ts +0 -1
  529. package/src/index.ts +0 -47
  530. package/src/libs/index.ts +0 -12
  531. package/src/redux/actions/index.ts +0 -8
  532. package/src/redux/actions/sagas/index.ts +0 -3
  533. package/src/redux/constants/index.ts +0 -8
  534. package/src/redux/constants/sagas/index.ts +0 -3
  535. package/src/redux/index.ts +0 -4
  536. package/src/redux/selectors/index.ts +0 -7
  537. package/src/service/index.ts +0 -3
  538. package/src/types/index.ts +0 -10
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const initOptionReducer: (state: StateType.Inputs, action: ActionsType.Inputs.initOption) => StateType.Inputs;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const initVariableReducer: (state: StateType.Inputs, action: ActionsType.Inputs.initVariable) => StateType.Inputs;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const updateOptionInputReducer: (state: StateType.Inputs, action: ActionsType.Inputs.updateOptionInput) => StateType.Inputs;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const updateVariableInputReducer: (state: StateType.Inputs, action: ActionsType.Inputs.updateVariableInput) => StateType.Inputs;
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../types/State.type';
2
- import { InputsActions } from '../../types/Actions.type';
1
+ import { StateType } from "../../types/State.type";
2
+ import { InputsActions } from "../../types/Actions.type";
3
3
  export declare const inputsReducer: (state: StateType.Inputs | undefined, action: InputsActions) => StateType.Inputs;
@@ -1,10 +1,10 @@
1
- import { INIT_OPTION, INIT_VARIABLE, UPDATE_OPTION_INPUT, UPDATE_VARIABLE_INPUT, ADD_MULTIPLE_OCCURENCY, DELETE_MULTIPLE_OCCURENCY, } from '../constants/inputs';
2
- import { initOptionReducer } from './inputs/initOption';
3
- import { updateOptionInputReducer } from './inputs/updateOptionInput';
4
- import { initVariableReducer } from './inputs/initVariable';
5
- import { updateVariableInputReducer } from './inputs/updateVariableInput';
6
- import { addMultipleOccurencyReducer } from './inputs/addMultipleOccurency';
7
- import { deleteMultipleOccurencyReducer } from './inputs/deleteMultipleOccurency';
1
+ import { INIT_OPTION, INIT_VARIABLE, UPDATE_OPTION_INPUT, UPDATE_VARIABLE_INPUT, ADD_MULTIPLE_OCCURENCY, DELETE_MULTIPLE_OCCURENCY, } from "../constants/inputs";
2
+ import { initOptionReducer } from "./inputs/initOption";
3
+ import { updateOptionInputReducer } from "./inputs/updateOptionInput";
4
+ import { initVariableReducer } from "./inputs/initVariable";
5
+ import { updateVariableInputReducer } from "./inputs/updateVariableInput";
6
+ import { addMultipleOccurencyReducer } from "./inputs/addMultipleOccurency";
7
+ import { deleteMultipleOccurencyReducer } from "./inputs/deleteMultipleOccurency";
8
8
  const initialState = {
9
9
  options: {},
10
10
  variables: {},
@@ -19,7 +19,7 @@ const reducersEnum = {
19
19
  };
20
20
  export const inputsReducer = (state = initialState, action) => {
21
21
  const reducer = reducersEnum[action.type];
22
- if (typeof reducer === 'function')
22
+ if (typeof reducer === "function")
23
23
  return reducer.apply(null, [state, action]);
24
24
  return state;
25
25
  };
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const addMultipleOccurencyReducer: (state: StateType.Mandatories, action: ActionsType.Inputs.addMultipleOccurency) => StateType.Mandatories;
@@ -1,9 +1,9 @@
1
1
  export const addMultipleOccurencyReducer = (state, action) => {
2
2
  const { id, optionRelations, optionsReferences } = action;
3
3
  if (optionRelations === undefined || optionsReferences === undefined)
4
- throw new Error('ADD_MULTIPLE_OCCURENCY reducer did not recieve complete data when adding ' +
4
+ throw new Error("ADD_MULTIPLE_OCCURENCY reducer did not recieve complete data when adding " +
5
5
  `occurency for ${id}, please make sure "multiplesActions" middleware is ` +
6
- 'plugged and working properly');
6
+ "plugged and working properly");
7
7
  const optionsIds = [id, ...optionRelations.children.options];
8
8
  const variablesIds = optionRelations.children.variables;
9
9
  const options = {};
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const deleteMultipleOccurencyReducer: (state: StateType.Mandatories, action: ActionsType.Inputs.deleteMultipleOccurency) => StateType.Mandatories;
@@ -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('DELETE_MULTIPLE_OCCURENCY reducer did not recieve complete data when removing ' +
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
- 'plugged and working properly');
6
+ "plugged and working properly");
7
7
  const optionsIds = [id, ...optionRelations.children.options];
8
8
  const variablesIds = optionRelations.children.variables;
9
9
  const options = {};
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const initMandatoryOptionReducer: (state: StateType.Mandatories, action: ActionsType.Mandatories.initMandatoryOption) => StateType.Mandatories;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const initMandatoryVariableReducer: (state: StateType.Mandatories, action: ActionsType.Mandatories.initMandatoryVariable) => StateType.Mandatories;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const setMandatoryIgnoreReducer: (state: StateType.Mandatories, action: ActionsType.Mandatories.setMandatoryIgnore) => StateType.Mandatories;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const setMandatoryOptionReducer: (state: StateType.Mandatories, action: ActionsType.Mandatories.setMandatoryOption) => StateType.Mandatories;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const setMandatorySectionReducer: (state: StateType.Mandatories, action: ActionsType.Mandatories.setMandatorySection) => StateType.Mandatories;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const setMandatoryVariableReducer: (state: StateType.Mandatories, action: ActionsType.Mandatories.setMandatoryVariable) => StateType.Mandatories;
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../types/State.type';
2
- import { MandatoriesActions } from '../../types/Actions.type';
1
+ import { StateType } from "../../types/State.type";
2
+ import { MandatoriesActions } from "../../types/Actions.type";
3
3
  export declare const mandatoriesReducer: (state: StateType.Mandatories | undefined, action: MandatoriesActions) => StateType.Mandatories;
@@ -1,13 +1,13 @@
1
- import { ADD_MULTIPLE_OCCURENCY, DELETE_MULTIPLE_OCCURENCY, } from '../constants/inputs';
2
- import { addMultipleOccurencyReducer } from './mandatories/addMultipleOccurency';
3
- import { deleteMultipleOccurencyReducer } from './mandatories/deleteMultipleOccurency';
4
- import { INIT_MANDATORY_OPTION, INIT_MANDATORY_VARIABLE, SET_MANDATORY_IGNORE, SET_MANDATORY_SECTION, SET_MANDATORY_OPTION, SET_MANDATORY_VARIABLE, } from '../constants/mandatories';
5
- import { initMandatoryOptionReducer } from './mandatories/initMandatoryOption';
6
- import { initMandatoryVariableReducer } from './mandatories/initMandatoryVariable';
7
- import { setMandatoryIgnoreReducer } from './mandatories/setMandatoryIgnore';
8
- import { setMandatorySectionReducer } from './mandatories/setMandatorySection';
9
- import { setMandatoryOptionReducer } from './mandatories/setMandatoryOption';
10
- import { setMandatoryVariableReducer } from './mandatories/setMandatoryVariable';
1
+ import { ADD_MULTIPLE_OCCURENCY, DELETE_MULTIPLE_OCCURENCY, } from "../constants/inputs";
2
+ import { addMultipleOccurencyReducer } from "./mandatories/addMultipleOccurency";
3
+ import { deleteMultipleOccurencyReducer } from "./mandatories/deleteMultipleOccurency";
4
+ import { INIT_MANDATORY_OPTION, INIT_MANDATORY_VARIABLE, SET_MANDATORY_IGNORE, SET_MANDATORY_SECTION, SET_MANDATORY_OPTION, SET_MANDATORY_VARIABLE, } from "../constants/mandatories";
5
+ import { initMandatoryOptionReducer } from "./mandatories/initMandatoryOption";
6
+ import { initMandatoryVariableReducer } from "./mandatories/initMandatoryVariable";
7
+ import { setMandatoryIgnoreReducer } from "./mandatories/setMandatoryIgnore";
8
+ import { setMandatorySectionReducer } from "./mandatories/setMandatorySection";
9
+ import { setMandatoryOptionReducer } from "./mandatories/setMandatoryOption";
10
+ import { setMandatoryVariableReducer } from "./mandatories/setMandatoryVariable";
11
11
  const initialState = {
12
12
  ignore: true,
13
13
  sections: {},
@@ -26,7 +26,7 @@ const reducersEnum = {
26
26
  };
27
27
  export const mandatoriesReducer = (state = initialState, action) => {
28
28
  const reducer = reducersEnum[action.type];
29
- if (typeof reducer === 'function')
29
+ if (typeof reducer === "function")
30
30
  return reducer.apply(null, [state, action]);
31
31
  return state;
32
32
  };
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../../types/State.type';
2
- import { ActionsType } from '../../../types/Actions.type';
1
+ import { StateType } from "../../../types/State.type";
2
+ import { ActionsType } from "../../../types/Actions.type";
3
3
  export declare const initReferencesReducer: (state: StateType.References, action: ActionsType.References.initReferences) => StateType.References;
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../../types/State.type';
2
- import { ActionsType } from '../../../types/Actions.type';
1
+ import { StateType } from "../../../types/State.type";
2
+ import { ActionsType } from "../../../types/Actions.type";
3
3
  export declare const updateOptionMetaReducer: (state: StateType.References, action: ActionsType.References.updateOptionMeta) => StateType.References;
@@ -2,8 +2,8 @@ export const updateOptionMetaReducer = (state, action) => {
2
2
  var _a, _b;
3
3
  const { id, meta } = action;
4
4
  let boxes = Object.assign({}, state.boxes);
5
- if (((_a = state.options[id]) === null || _a === void 0 ? void 0 : _a.meta.type) === 'box') {
6
- const raw = ((_b = meta.box) === null || _b === void 0 ? void 0 : _b.content) || '';
5
+ if (((_a = state.options[id]) === null || _a === void 0 ? void 0 : _a.meta.type) === "box") {
6
+ const raw = ((_b = meta.box) === null || _b === void 0 ? void 0 : _b.content) || "";
7
7
  let variables = [];
8
8
  if (raw.trim().length > 0) {
9
9
  const tagsMatch = raw.match(/\[var:([0-9]+)\]/gi);
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../../types/State.type';
2
- import { ActionsType } from '../../../types/Actions.type';
1
+ import { StateType } from "../../../types/State.type";
2
+ import { ActionsType } from "../../../types/Actions.type";
3
3
  export declare const updateVariableMetaReducer: (state: StateType.References, action: ActionsType.References.updateVariableMeta) => StateType.References;
@@ -2,8 +2,8 @@ export const updateVariableMetaReducer = (state, action) => {
2
2
  var _a, _b;
3
3
  const { id, meta } = action;
4
4
  const evaluations = Object.assign({}, state.evaluations);
5
- if (((_a = state.variables[id]) === null || _a === void 0 ? void 0 : _a.type) === 'eval') {
6
- const formula = ((_b = meta.eval) === null || _b === void 0 ? void 0 : _b.formula) || '';
5
+ if (((_a = state.variables[id]) === null || _a === void 0 ? void 0 : _a.type) === "eval") {
6
+ const formula = ((_b = meta.eval) === null || _b === void 0 ? void 0 : _b.formula) || "";
7
7
  let variables = [];
8
8
  if (formula.trim().length > 0) {
9
9
  const tagsMatch = formula.match(/\[var:([0-9]+)\]/gi);
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../types/State.type';
2
- import { ReferencesActions } from '../../types/Actions.type';
1
+ import { StateType } from "../../types/State.type";
2
+ import { ReferencesActions } from "../../types/Actions.type";
3
3
  export declare const referencesReducer: (state: StateType.References | undefined, action: ReferencesActions) => StateType.References;
@@ -1,7 +1,7 @@
1
- import { initReferencesReducer } from './references/initReferences';
2
- import { updateOptionMetaReducer } from './references/updateOptionMeta';
3
- import { updateVariableMetaReducer } from './references/updateVariableMeta';
4
- import { INIT_REFERENCES, UPDATE_OPTION_META, UPDATE_VARIABLE_META, } from '../constants/references';
1
+ import { initReferencesReducer } from "./references/initReferences";
2
+ import { updateOptionMetaReducer } from "./references/updateOptionMeta";
3
+ import { updateVariableMetaReducer } from "./references/updateVariableMeta";
4
+ import { INIT_REFERENCES, UPDATE_OPTION_META, UPDATE_VARIABLE_META, } from "../constants/references";
5
5
  const initialState = {
6
6
  options: {},
7
7
  variables: {},
@@ -35,7 +35,7 @@ const reducersEnum = {
35
35
  };
36
36
  export const referencesReducer = (state = initialState, action) => {
37
37
  const reducer = reducersEnum[action.type];
38
- if (typeof reducer === 'function')
38
+ if (typeof reducer === "function")
39
39
  return reducer.apply(null, [state, action]);
40
40
  return state;
41
41
  };
@@ -1,2 +1,2 @@
1
- import { StateType } from '../../../types/State.type';
1
+ import { StateType } from "../../../types/State.type";
2
2
  export declare const enableSmartScriptReducer: (state: StateType.SmartScript) => StateType.SmartScript;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const initSmartscriptTriggersReducer: (state: StateType.SmartScript, action: ActionsType.SmartScript.initSmartscriptTriggers) => StateType.SmartScript;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const updateSmartscriptOptionHiddenReducer: (state: StateType.SmartScript, action: ActionsType.SmartScript.updateSmartscriptOptionHidden) => StateType.SmartScript;
@@ -1,3 +1,3 @@
1
- import { ActionsType } from '../../../types/Actions.type';
2
- import { StateType } from '../../../types/State.type';
1
+ import { ActionsType } from "../../../types/Actions.type";
2
+ import { StateType } from "../../../types/State.type";
3
3
  export declare const updateSmartscriptVariableHiddenReducer: (state: StateType.SmartScript, action: ActionsType.SmartScript.updateSmartscriptVariableHidden) => StateType.SmartScript;
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../types/State.type';
2
- import { SmartScriptActions } from '../../types/Actions.type';
1
+ import { StateType } from "../../types/State.type";
2
+ import { SmartScriptActions } from "../../types/Actions.type";
3
3
  export declare const smartscriptReducer: (state: StateType.SmartScript | undefined, action: SmartScriptActions) => StateType.SmartScript;
@@ -1,8 +1,8 @@
1
- import { ENABLE_SMARTSCRIPT, INIT_SMARTSCRIPT_TRIGGERS, UPDATE_SMARTSCRIPT_OPTION_HIDDEN, UPDATE_SMARTSCRIPT_VARIABLE_HIDDEN, } from '../constants/smartscript';
2
- import { enableSmartScriptReducer } from './smartscript/enableSmartScript';
3
- import { initSmartscriptTriggersReducer } from './smartscript/initSmartScriptTriggers';
4
- import { updateSmartscriptOptionHiddenReducer } from './smartscript/updateSmartscriptOptionHidden';
5
- import { updateSmartscriptVariableHiddenReducer } from './smartscript/updateSmartscriptVariableHidden';
1
+ import { ENABLE_SMARTSCRIPT, INIT_SMARTSCRIPT_TRIGGERS, UPDATE_SMARTSCRIPT_OPTION_HIDDEN, UPDATE_SMARTSCRIPT_VARIABLE_HIDDEN, } from "../constants/smartscript";
2
+ import { enableSmartScriptReducer } from "./smartscript/enableSmartScript";
3
+ import { initSmartscriptTriggersReducer } from "./smartscript/initSmartScriptTriggers";
4
+ import { updateSmartscriptOptionHiddenReducer } from "./smartscript/updateSmartscriptOptionHidden";
5
+ import { updateSmartscriptVariableHiddenReducer } from "./smartscript/updateSmartscriptVariableHidden";
6
6
  const initialState = {
7
7
  enabled: false,
8
8
  triggers: {
@@ -22,7 +22,7 @@ const reducersEnum = {
22
22
  };
23
23
  export const smartscriptReducer = (state = initialState, action) => {
24
24
  const reducer = reducersEnum[action.type];
25
- if (typeof reducer === 'function')
25
+ if (typeof reducer === "function")
26
26
  return reducer.apply(null, [state, action]);
27
27
  return state;
28
28
  };
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../../types/State.type';
2
- import { ActionsType } from '../../../types/Actions.type';
1
+ import { StateType } from "../../../types/State.type";
2
+ import { ActionsType } from "../../../types/Actions.type";
3
3
  export declare const initUserReducer: (state: StateType.User, action: ActionsType.User.initUser) => StateType.User;
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../../types/State.type';
2
- import { ActionsType } from '../../../types/Actions.type';
1
+ import { StateType } from "../../../types/State.type";
2
+ import { ActionsType } from "../../../types/Actions.type";
3
3
  export declare const setUserStatusReducer: (state: StateType.User, action: ActionsType.User.setUserStatus) => StateType.User;
@@ -1,3 +1,3 @@
1
- import { StateType } from '../../../types/State.type';
2
- import { ActionsType } from '../../../types/Actions.type';
1
+ import { StateType } from "../../../types/State.type";
2
+ import { ActionsType } from "../../../types/Actions.type";
3
3
  export declare const setUserValidTokenReducer: (state: StateType.User, action: ActionsType.User.setUserValidToken) => StateType.User;
@@ -1,3 +1,3 @@
1
- import { UserActions } from '../../types/Actions.type';
2
- import { StateType } from '../../types/State.type';
1
+ import { UserActions } from "../../types/Actions.type";
2
+ import { StateType } from "../../types/State.type";
3
3
  export declare const userReducer: (state: StateType.User | undefined, action: UserActions) => StateType.User;
@@ -1,12 +1,12 @@
1
- import { setUserValidTokenReducer } from './user/setUserValidToken';
2
- import { SET_USER_VALID_TOKEN, INIT_USER, SET_USER_STATUS, } from '../constants/user';
3
- import { initUserReducer } from './user/initUser';
4
- import { setUserStatusReducer } from './user/setUserStatus';
1
+ import { setUserValidTokenReducer } from "./user/setUserValidToken";
2
+ import { SET_USER_VALID_TOKEN, INIT_USER, SET_USER_STATUS, } from "../constants/user";
3
+ import { initUserReducer } from "./user/initUser";
4
+ import { setUserStatusReducer } from "./user/setUserStatus";
5
5
  const initialState = {
6
- status: 'unauthenticated',
7
- email: '',
8
- displayName: '',
9
- level: 'GUEST',
6
+ status: "unauthenticated",
7
+ email: "",
8
+ displayName: "",
9
+ level: "GUEST",
10
10
  validToken: false,
11
11
  };
12
12
  const reducersEnum = {
@@ -16,7 +16,7 @@ const reducersEnum = {
16
16
  };
17
17
  export const userReducer = (state = initialState, action) => {
18
18
  const reducer = reducersEnum[action.type];
19
- if (typeof reducer === 'function') {
19
+ if (typeof reducer === "function") {
20
20
  return reducer.apply(null, [state, action]);
21
21
  }
22
22
  return state;
@@ -1,3 +1,3 @@
1
- import { MemoryHistory, History } from 'history';
2
- export declare const createHistory: (historyType: 'memory' | 'browser') => History<unknown>;
1
+ import { MemoryHistory, History } from "history";
2
+ export declare const createHistory: (historyType: "memory" | "browser") => History<unknown>;
3
3
  export declare const getHistory: () => History<unknown> | MemoryHistory<unknown>;
@@ -1,17 +1,17 @@
1
- import { createMemoryHistory, createBrowserHistory, } from 'history';
1
+ import { createMemoryHistory, createBrowserHistory, } from "history";
2
2
  let history;
3
3
  export const createHistory = (historyType) => {
4
4
  history =
5
- historyType === 'memory'
5
+ historyType === "memory"
6
6
  ? createMemoryHistory({
7
- initialEntries: ['/one', '/two'],
7
+ initialEntries: ["/one", "/two"],
8
8
  initialIndex: 1,
9
9
  })
10
10
  : createBrowserHistory();
11
11
  return history;
12
12
  };
13
13
  export const getHistory = () => {
14
- if (typeof history === 'undefined')
15
- throw new Error('History not yet created');
14
+ if (typeof history === "undefined")
15
+ throw new Error("History not yet created");
16
16
  return history;
17
17
  };
@@ -1,7 +1,7 @@
1
- import type { CustomizationMetaDefault } from '@legalplace/models-v3-types';
2
- import type { HealthCheckReport } from '@legalplace/model-healthcheck/dist/libs/HealthCheck.type';
3
- import { OvcType } from '../../libs/OvcConverter';
4
- import { StateType } from '../../types/State.type';
1
+ import type { CustomizationMetaDefault } from "@legalplace/models-v3-types";
2
+ import type { HealthCheckReport } from "@legalplace/model-healthcheck/dist/libs/HealthCheck.type";
3
+ import { OvcType } from "../../libs/OvcConverter";
4
+ import { StateType } from "../../types/State.type";
5
5
  export interface FetchModelInformationResponse {
6
6
  references: StateType.References;
7
7
  meta: {