@inseefr/lunatic 2.0.0-v2 → 2.0.0-v2test

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 (423) hide show
  1. package/lib/components/button/index.js +0 -2
  2. package/lib/components/button/lunatic-button.js +6 -16
  3. package/lib/components/checkbox/checkbox-boolean/checkbox-boolean.js +8 -13
  4. package/lib/components/checkbox/checkbox-boolean/index.js +0 -2
  5. package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +9 -16
  6. package/lib/components/checkbox/checkbox-group/checkbox-group.js +21 -33
  7. package/lib/components/checkbox/checkbox-group/checkbox.scss +1 -0
  8. package/lib/components/checkbox/checkbox-group/index.js +0 -2
  9. package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +9 -15
  10. package/lib/components/checkbox/checkbox-one/index.js +0 -2
  11. package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +5 -14
  12. package/lib/components/checkbox/commons/checkbox-option.js +14 -18
  13. package/lib/components/checkbox/commons/checkbox-option.scss +3 -0
  14. package/lib/components/checkbox/commons/index.js +0 -2
  15. package/lib/components/checkbox/index.js +0 -4
  16. package/lib/components/commons/build-style-object.js +3 -14
  17. package/lib/components/commons/components/combo-box/combo-box-container.js +3 -9
  18. package/lib/components/commons/components/combo-box/combo-box-content.js +6 -19
  19. package/lib/components/commons/components/combo-box/combo-box.js +35 -67
  20. package/lib/components/commons/components/combo-box/combo-box.scss +0 -10
  21. package/lib/components/commons/components/combo-box/index.js +0 -2
  22. package/lib/components/commons/components/combo-box/panel/index.js +0 -2
  23. package/lib/components/commons/components/combo-box/panel/option-container.js +4 -19
  24. package/lib/components/commons/components/combo-box/panel/panel-container.js +3 -8
  25. package/lib/components/commons/components/combo-box/panel/panel.js +13 -22
  26. package/lib/components/commons/components/combo-box/selection/delete.js +3 -19
  27. package/lib/components/commons/components/combo-box/selection/displayLabelOrInput.js +2 -10
  28. package/lib/components/commons/components/combo-box/selection/index.js +0 -2
  29. package/lib/components/commons/components/combo-box/selection/input.js +8 -21
  30. package/lib/components/commons/components/combo-box/selection/label-selection.js +8 -15
  31. package/lib/components/commons/components/combo-box/selection/selection-container.js +4 -9
  32. package/lib/components/commons/components/combo-box/selection/selection.js +12 -22
  33. package/lib/components/commons/components/combo-box/state-management/actions.js +6 -22
  34. package/lib/components/commons/components/combo-box/state-management/combo-box-context.js +0 -4
  35. package/lib/components/commons/components/combo-box/state-management/index.js +0 -9
  36. package/lib/components/commons/components/combo-box/state-management/reducer/index.js +0 -2
  37. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-blur.js +4 -6
  38. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-change.js +4 -6
  39. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-delete.js +4 -6
  40. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-focus.js +4 -6
  41. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-init.js +8 -14
  42. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/index.js +0 -2
  43. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-down.js +4 -9
  44. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-up.js +4 -9
  45. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-end.js +4 -7
  46. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-enter.js +4 -6
  47. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-escape.js +4 -6
  48. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-home.js +4 -7
  49. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-tab.js +4 -6
  50. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/reduce-on-keydown.js +1 -20
  51. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-select.js +4 -6
  52. package/lib/components/commons/components/combo-box/state-management/reducer/reducer.js +0 -22
  53. package/lib/components/commons/components/create-lunatic-component/create-lunatic-component.js +10 -21
  54. package/lib/components/commons/components/create-lunatic-component/index.js +0 -3
  55. package/lib/components/commons/components/default-label-renderer.js +4 -14
  56. package/lib/components/commons/components/default-option-renderer.js +3 -10
  57. package/lib/components/commons/components/dragger/dragger.js +20 -46
  58. package/lib/components/commons/components/dragger/index.js +0 -2
  59. package/lib/components/commons/components/errors/errors.js +18 -12
  60. package/lib/components/commons/components/errors/index.js +0 -2
  61. package/lib/components/commons/components/fab/fab.js +6 -14
  62. package/lib/components/commons/components/fab/index.js +0 -2
  63. package/lib/components/commons/components/field-container/field-container.js +3 -12
  64. package/lib/components/commons/components/field-container/index.js +0 -2
  65. package/lib/components/commons/components/fieldset.js +2 -10
  66. package/lib/components/commons/components/fieldset.scss +2 -0
  67. package/lib/components/commons/components/html-table/index.js +0 -7
  68. package/lib/components/commons/components/html-table/table.js +3 -12
  69. package/lib/components/commons/components/html-table/tbody.js +3 -12
  70. package/lib/components/commons/components/html-table/td.js +7 -16
  71. package/lib/components/commons/components/html-table/th.js +6 -15
  72. package/lib/components/commons/components/html-table/thead.js +3 -12
  73. package/lib/components/commons/components/html-table/tr.js +4 -13
  74. package/lib/components/commons/components/is-network/index.js +0 -2
  75. package/lib/components/commons/components/is-network/is-network.js +8 -27
  76. package/lib/components/commons/components/is-network/use-online-status.js +0 -9
  77. package/lib/components/commons/components/label.js +5 -13
  78. package/lib/components/commons/components/lunatic-component.js +12 -24
  79. package/lib/components/commons/components/lunatic-fieldset-component.js +9 -20
  80. package/lib/components/commons/components/md-label/index.js +0 -2
  81. package/lib/components/commons/components/md-label/link.js +8 -14
  82. package/lib/components/commons/components/md-label/md-label.js +6 -14
  83. package/lib/components/commons/components/missing/index.js +0 -2
  84. package/lib/components/commons/components/missing/missing.js +11 -25
  85. package/lib/components/commons/components/nothing-to-display.js +0 -4
  86. package/lib/components/commons/components/orchestrated-component.js +15 -25
  87. package/lib/components/commons/components/variable-status/img/index.js +0 -3
  88. package/lib/components/commons/components/variable-status/index.js +0 -2
  89. package/lib/components/commons/components/variable-status/variable-status.js +18 -35
  90. package/lib/components/commons/create-customizable-field.js +2 -14
  91. package/lib/components/commons/create-row-orchestrator.js +16 -21
  92. package/lib/components/commons/icons/checkbox-checked.icon.js +4 -9
  93. package/lib/components/commons/icons/checkbox-unchecked.icon.js +4 -9
  94. package/lib/components/commons/icons/closed.icon.js +4 -9
  95. package/lib/components/commons/icons/cross.icon.js +4 -9
  96. package/lib/components/commons/icons/index.js +0 -11
  97. package/lib/components/commons/icons/load.icon.js +4 -9
  98. package/lib/components/commons/icons/lunatic-icon.js +1 -7
  99. package/lib/components/commons/icons/network.icon.js +4 -9
  100. package/lib/components/commons/icons/on-drag.icon.js +4 -9
  101. package/lib/components/commons/icons/opened.icon.js +4 -9
  102. package/lib/components/commons/icons/radio-checked.icon.js +4 -9
  103. package/lib/components/commons/icons/radio-unchecked.icon.js +4 -9
  104. package/lib/components/commons/index.js +0 -24
  105. package/lib/components/commons/prop-types/declarations.js +0 -8
  106. package/lib/components/commons/prop-types/index.js +0 -6
  107. package/lib/components/commons/prop-types/lines.js +0 -4
  108. package/lib/components/commons/prop-types/options.js +0 -4
  109. package/lib/components/commons/prop-types/response.js +0 -4
  110. package/lib/components/commons/prop-types/value-type.js +0 -8
  111. package/lib/components/commons/safety-label.js +0 -8
  112. package/lib/components/commons/use-document-add-event-listener.js +9 -33
  113. package/lib/components/commons/use-on-handle-change.js +2 -5
  114. package/lib/components/commons/use-options-keydown.js +1 -6
  115. package/lib/components/commons/use-previous.js +0 -3
  116. package/lib/components/components.js +8 -33
  117. package/lib/components/datepicker/datepicker.js +9 -17
  118. package/lib/components/datepicker/index.js +0 -2
  119. package/lib/components/datepicker/lunatic-datepicker.js +5 -15
  120. package/lib/components/declarations/declaration.js +2 -9
  121. package/lib/components/declarations/declarations-after-text.js +0 -9
  122. package/lib/components/declarations/declarations-before-text.js +0 -9
  123. package/lib/components/declarations/declarations-detachable.js +0 -9
  124. package/lib/components/declarations/declarations.js +8 -14
  125. package/lib/components/declarations/index.js +0 -8
  126. package/lib/components/dropdown/dropdown-simple/dropdown-simple.js +7 -14
  127. package/lib/components/dropdown/dropdown-simple/index.js +0 -2
  128. package/lib/components/dropdown/dropdown-simple/simple-label-renderer.js +3 -13
  129. package/lib/components/dropdown/dropdown-simple/simple-option-renderer.js +2 -9
  130. package/lib/components/dropdown/dropdown-writable/dropdown-writable.js +11 -31
  131. package/lib/components/dropdown/dropdown-writable/filter-tools/filter-options.js +1 -12
  132. package/lib/components/dropdown/dropdown-writable/filter-tools/letters-matching.js +0 -11
  133. package/lib/components/dropdown/dropdown-writable/filter-tools/match.js +0 -5
  134. package/lib/components/dropdown/dropdown-writable/filter-tools/prepare-prefix.js +0 -4
  135. package/lib/components/dropdown/dropdown-writable/index.js +0 -2
  136. package/lib/components/dropdown/dropdown-writable/writable-label-renderer.js +3 -13
  137. package/lib/components/dropdown/dropdown-writable/writable-option-renderer.js +18 -52
  138. package/lib/components/dropdown/dropdown.js +9 -20
  139. package/lib/components/dropdown/index.js +0 -2
  140. package/lib/components/dropdown/lunatic-dropdown.js +11 -19
  141. package/lib/components/filter-description/component.js +3 -6
  142. package/lib/components/filter-description/index.js +0 -2
  143. package/lib/components/index.js +0 -4
  144. package/lib/components/input/index.js +0 -2
  145. package/lib/components/input/input.js +7 -19
  146. package/lib/components/input/lunatic-input.js +4 -15
  147. package/lib/components/input-number/index.js +0 -2
  148. package/lib/components/input-number/input-number.js +12 -22
  149. package/lib/components/input-number/lunatic-input-number.js +5 -14
  150. package/lib/components/loop/block-for-loop/block-for-loop-ochestrator.js +0 -4
  151. package/lib/components/loop/block-for-loop/block-for-loop.js +38 -76
  152. package/lib/components/loop/block-for-loop/index.js +0 -2
  153. package/lib/components/loop/block-for-loop/row.js +16 -30
  154. package/lib/components/loop/commons/get-init-length.js +0 -3
  155. package/lib/components/loop/commons/handle-row-button.js +2 -7
  156. package/lib/components/loop/commons/index.js +0 -3
  157. package/lib/components/loop/commons/row-component.js +17 -38
  158. package/lib/components/loop/index.js +0 -2
  159. package/lib/components/loop/loop.js +19 -29
  160. package/lib/components/loop/roster-for-loop/body.js +14 -26
  161. package/lib/components/loop/roster-for-loop/header.js +2 -9
  162. package/lib/components/loop/roster-for-loop/index.js +0 -2
  163. package/lib/components/loop/roster-for-loop/roster-for-loop-orchestrator.js +0 -4
  164. package/lib/components/loop/roster-for-loop/roster-for-loop.js +29 -58
  165. package/lib/components/loop/roster-for-loop/roster-table.js +10 -21
  166. package/lib/components/loop/roster-for-loop/row.js +16 -27
  167. package/lib/components/modal-controls/close-or-skip.js +7 -13
  168. package/lib/components/modal-controls/index.js +0 -2
  169. package/lib/components/modal-controls/modal-container.js +1 -6
  170. package/lib/components/modal-controls/modal-controls.js +6 -29
  171. package/lib/components/modal-controls/modal-controls.scss +15 -35
  172. package/lib/components/{pairwise/links → pairwise-links}/index.js +0 -2
  173. package/lib/components/pairwise-links/orchestrator.js +72 -0
  174. package/lib/components/{pairwise/links → pairwise-links}/pairwise-links.js +24 -33
  175. package/lib/components/{pairwise/links → pairwise-links}/row.js +51 -66
  176. package/lib/components/radio/index.js +0 -2
  177. package/lib/components/radio/lunatic-radio-group.js +9 -16
  178. package/lib/components/radio/radio-group.js +10 -19
  179. package/lib/components/radio/radio-option.js +13 -23
  180. package/lib/components/radio/radio.scss +3 -1
  181. package/lib/components/sequence/index.js +0 -2
  182. package/lib/components/sequence/sequence.js +5 -10
  183. package/lib/components/subsequence/index.js +0 -2
  184. package/lib/components/subsequence/subsequence.js +4 -8
  185. package/lib/components/suggester/check-store.js +15 -54
  186. package/lib/components/suggester/find-best-label/find-best-label.js +2 -14
  187. package/lib/components/suggester/find-best-label/index.js +0 -2
  188. package/lib/components/suggester/idb-suggester.js +14 -34
  189. package/lib/components/suggester/index.js +0 -2
  190. package/lib/components/suggester/lunatic-suggester.js +15 -28
  191. package/lib/components/suggester/searching/create-searching.js +5 -18
  192. package/lib/components/suggester/searching/index.js +0 -2
  193. package/lib/components/suggester/suggester.js +22 -56
  194. package/lib/components/suggester-loader-widget/index.js +0 -2
  195. package/lib/components/suggester-loader-widget/loader-row.js +13 -40
  196. package/lib/components/suggester-loader-widget/loader.js +15 -56
  197. package/lib/components/suggester-loader-widget/progress.js +6 -13
  198. package/lib/components/suggester-loader-widget/tools/action-tool.js +5 -12
  199. package/lib/components/suggester-loader-widget/tools/index.js +0 -3
  200. package/lib/components/suggester-loader-widget/tools/tools.js +0 -4
  201. package/lib/components/suggester-loader-widget/widget-container.js +2 -11
  202. package/lib/components/suggester-loader-widget/widget.js +24 -54
  203. package/lib/components/switch/index.js +0 -2
  204. package/lib/components/switch/lunatic-switch.js +5 -17
  205. package/lib/components/switch/switch.js +7 -21
  206. package/lib/components/table/cell.js +14 -39
  207. package/lib/components/table/components/cell.js +14 -39
  208. package/lib/components/table/components/header.js +4 -11
  209. package/lib/components/table/components/row.js +7 -13
  210. package/lib/components/table/components/table.js +3 -10
  211. package/lib/components/table/index.js +0 -2
  212. package/lib/components/table/lunatic-table.js +17 -34
  213. package/lib/components/table/table-orchestrator.js +12 -20
  214. package/lib/components/textarea/index.js +0 -2
  215. package/lib/components/textarea/lunatic-textarea.js +4 -15
  216. package/lib/components/textarea/textarea.js +8 -20
  217. package/lib/constants/declarations.js +3 -1
  218. package/lib/constants/event-types.js +2 -1
  219. package/lib/constants/index.js +0 -10
  220. package/lib/constants/supported-preferences.js +0 -5
  221. package/lib/constants/variable-types.js +2 -2
  222. package/lib/i18n/build-dictionary.js +5 -11
  223. package/lib/i18n/dictionary.js +8 -0
  224. package/lib/i18n/index.js +0 -6
  225. package/lib/index.js +0 -4
  226. package/lib/stories/{pairwise/block/pairwise-block.stories.js → checkboxBoolean/checkboxBoolean.stories.js} +6 -15
  227. package/lib/stories/checkboxBoolean/source.json +36 -0
  228. package/lib/stories/checkboxOne/checkboxOne.stories.js +0 -8
  229. package/lib/stories/custom-mui/checkbox-boolean-mui.js +4 -12
  230. package/lib/stories/custom-mui/checkbox-group-mui.js +9 -23
  231. package/lib/stories/custom-mui/checkbox-one-mui.js +0 -4
  232. package/lib/stories/custom-mui/index.js +0 -16
  233. package/lib/stories/custom-mui/input-mui.js +7 -17
  234. package/lib/stories/custom-mui/input-number-mui.js +7 -15
  235. package/lib/stories/custom-mui/radio-mui.js +7 -23
  236. package/lib/stories/custom-mui/suggester-mui/index.js +0 -2
  237. package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +55 -93
  238. package/lib/stories/custom-mui/switch-mui.js +5 -15
  239. package/lib/stories/custom-mui/table-mui.js +2 -10
  240. package/lib/stories/custom-mui/tbody-mui.js +2 -8
  241. package/lib/stories/custom-mui/td-mui.js +4 -10
  242. package/lib/stories/custom-mui/textarea-mui.js +7 -16
  243. package/lib/stories/custom-mui/th-mui.js +3 -9
  244. package/lib/stories/custom-mui/thead-mui.js +2 -8
  245. package/lib/stories/custom-mui/tr-mui.js +3 -10
  246. package/lib/stories/date-picker/datepicker.stories.js +3 -10
  247. package/lib/stories/date-picker/source.json +2 -51
  248. package/lib/stories/dropdown/dropdown.stories.js +4 -10
  249. package/lib/stories/filter-description/filter-description.stories.js +4 -13
  250. package/lib/stories/input/input.stories.js +0 -9
  251. package/lib/stories/input-number/input-number.stories.js +0 -9
  252. package/lib/stories/pairwise/data.json +12 -0
  253. package/lib/stories/pairwise/links.json +270 -0
  254. package/lib/stories/pairwise/{links/pairwise-links.stories.js → pairwise-links.stories.js} +3 -12
  255. package/lib/stories/paste-questionnaire/test.stories.js +4 -12
  256. package/lib/stories/questionnaires/logement/data.json +6 -11
  257. package/lib/stories/questionnaires/logement/logement.stories.js +4 -15
  258. package/lib/stories/questionnaires/recensement/data.json +12 -0
  259. package/lib/stories/questionnaires/recensement/recensement.stories.js +58 -0
  260. package/lib/stories/questionnaires/recensement/source.json +15202 -0
  261. package/lib/stories/questionnaires/rp/data.json +5 -0
  262. package/lib/stories/questionnaires/rp/rp.stories.js +36 -0
  263. package/lib/stories/questionnaires/rp/source.json +262 -0
  264. package/lib/stories/questionnaires/simpsons/simpsons.stories.js +4 -12
  265. package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees_PasPageFin.json +13 -52
  266. package/lib/stories/questionnaires-test/controls/boucles-n.json +74 -444
  267. package/lib/stories/questionnaires-test/controls/controls.stories.js +12 -24
  268. package/lib/stories/questionnaires-test/test.stories.js +4 -16
  269. package/lib/stories/radio/radio.stories.js +0 -8
  270. package/lib/stories/roster-for-loop/roster-for-loop.stories.js +8 -9
  271. package/lib/stories/roster-for-loop/source-with-header.json +127 -0
  272. package/lib/stories/suggester/suggester-workers.stories.js +201 -0
  273. package/lib/stories/suggester/suggester.stories.js +0 -10
  274. package/lib/stories/switch/SwitchMaterialUI.js +5 -15
  275. package/lib/stories/switch/switch.js +4 -27
  276. package/lib/stories/table/table-dynamique.json +67 -0
  277. package/lib/stories/table/table.stories.js +8 -16
  278. package/lib/stories/utils/default-arg-types.js +4 -5
  279. package/lib/stories/utils/orchestrator.js +61 -84
  280. package/lib/stories/utils/waiting/index.js +0 -2
  281. package/lib/stories/utils/waiting/waiting.js +1 -11
  282. package/lib/use-lunatic/actions.js +8 -20
  283. package/lib/use-lunatic/commons/calculated-variables.js +20 -44
  284. package/lib/use-lunatic/commons/check-loops.js +14 -38
  285. package/lib/use-lunatic/commons/compose.js +0 -4
  286. package/lib/use-lunatic/commons/create-map-pages.js +6 -27
  287. package/lib/use-lunatic/commons/execute-condition-filter.js +0 -7
  288. package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +64 -107
  289. package/lib/use-lunatic/commons/execute-expression/create-memoizer.js +7 -28
  290. package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +23 -45
  291. package/lib/use-lunatic/commons/execute-expression/execute-expression.js +10 -41
  292. package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.js +2 -16
  293. package/lib/use-lunatic/commons/execute-expression/get-safety-expression.js +5 -12
  294. package/lib/use-lunatic/commons/execute-expression/index.js +0 -2
  295. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +20 -46
  296. package/lib/use-lunatic/commons/fill-components/fill-component-value.js +4 -8
  297. package/lib/use-lunatic/commons/fill-components/fill-components.js +0 -13
  298. package/lib/use-lunatic/commons/fill-components/fill-errors.js +4 -8
  299. package/lib/use-lunatic/commons/fill-components/fill-from-state.js +6 -8
  300. package/lib/use-lunatic/commons/fill-components/fill-management.js +4 -8
  301. package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +5 -10
  302. package/lib/use-lunatic/commons/fill-components/fill-pagination.js +4 -6
  303. package/lib/use-lunatic/commons/fill-components/index.js +0 -2
  304. package/lib/use-lunatic/commons/get-compatible-vtl-expression.js +0 -7
  305. package/lib/use-lunatic/commons/get-component-value/get-component-value.js +26 -66
  306. package/lib/use-lunatic/commons/get-component-value/index.js +0 -2
  307. package/lib/use-lunatic/commons/get-components-from-state.js +10 -14
  308. package/lib/use-lunatic/commons/get-data.js +16 -31
  309. package/lib/use-lunatic/commons/get-errors-without-empty-value.js +22 -0
  310. package/lib/use-lunatic/commons/index.js +7 -13
  311. package/lib/use-lunatic/commons/is-First-last-page.js +1 -3
  312. package/lib/use-lunatic/commons/is-paginated-loop.js +1 -3
  313. package/lib/use-lunatic/commons/load-suggesters.js +9 -54
  314. package/lib/use-lunatic/commons/page-tag.js +15 -34
  315. package/lib/use-lunatic/commons/use-components-from-state.js +12 -20
  316. package/lib/use-lunatic/index.js +0 -2
  317. package/lib/use-lunatic/initial-state.js +1 -3
  318. package/lib/use-lunatic/reducer/commons/index.js +0 -5
  319. package/lib/use-lunatic/reducer/commons/is-empty-on-empty-page.js +1 -15
  320. package/lib/use-lunatic/reducer/commons/resize-array-variable.js +2 -12
  321. package/lib/use-lunatic/reducer/commons/validate-condition-filter.js +4 -16
  322. package/lib/use-lunatic/reducer/index.js +0 -2
  323. package/lib/use-lunatic/reducer/reduce-go-next-page.js +37 -65
  324. package/lib/use-lunatic/reducer/reduce-go-previous-page.js +31 -50
  325. package/lib/use-lunatic/reducer/reduce-go-to-page.js +10 -20
  326. package/lib/use-lunatic/reducer/reduce-handle-change/index.js +0 -2
  327. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +13 -29
  328. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +34 -40
  329. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.js +58 -30
  330. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-missing.js +13 -33
  331. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +24 -43
  332. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.js +11 -20
  333. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.js +5 -9
  334. package/lib/use-lunatic/reducer/reduce-on-init.js +69 -104
  335. package/lib/use-lunatic/reducer/reduce-on-set-waiting.js +4 -6
  336. package/lib/use-lunatic/reducer/reducer.js +0 -20
  337. package/lib/use-lunatic/reducer/validate-controls/create-controls-reducer.js +28 -27
  338. package/lib/use-lunatic/reducer/validate-controls/create-modal-controls-reducer.js +22 -26
  339. package/lib/use-lunatic/reducer/validate-controls/index.js +0 -3
  340. package/lib/use-lunatic/reducer/validate-controls/validation-utils.js +11 -22
  341. package/lib/use-lunatic/use-lunatic.js +61 -106
  342. package/lib/utils/constants/index.js +0 -10
  343. package/lib/utils/idb-tools/clear-store.js +1 -11
  344. package/lib/utils/idb-tools/create-db-opener.js +6 -19
  345. package/lib/utils/idb-tools/create-open-db.js +1 -7
  346. package/lib/utils/idb-tools/get-entity.js +0 -4
  347. package/lib/utils/idb-tools/get-idb.js +0 -2
  348. package/lib/utils/idb-tools/idb-bulk-insert.js +15 -38
  349. package/lib/utils/idb-tools/index.js +0 -11
  350. package/lib/utils/idb-tools/insert-entity.js +0 -4
  351. package/lib/utils/idb-tools/open-db.js +1 -6
  352. package/lib/utils/idb-tools/open-or-create-db.js +3 -10
  353. package/lib/utils/is-element.js +0 -2
  354. package/lib/utils/store-tools/auto-load.js +10 -51
  355. package/lib/utils/store-tools/clear-store-data.js +1 -12
  356. package/lib/utils/store-tools/clear-store-info.js +1 -12
  357. package/lib/utils/store-tools/create/create.js +1 -18
  358. package/lib/utils/store-tools/create/index.js +0 -3
  359. package/lib/utils/store-tools/create/update-store-info.js +0 -6
  360. package/lib/utils/store-tools/get-store-count.js +0 -5
  361. package/lib/utils/store-tools/index.js +0 -12
  362. package/lib/utils/store-tools/open-or-create-store.js +1 -11
  363. package/lib/utils/store-tools/use-store-index.js +5 -27
  364. package/lib/utils/suggester-workers/append-to-index/append.js +7 -23
  365. package/lib/utils/suggester-workers/append-to-index/append.worker.js +6 -10
  366. package/lib/utils/suggester-workers/append-to-index/create-append-task.js +3 -11
  367. package/lib/utils/suggester-workers/append-to-index/index.js +0 -3
  368. package/lib/utils/suggester-workers/append-to-index/prepare-entities.js +10 -36
  369. package/lib/utils/suggester-workers/append-to-index/store-messages.js +4 -7
  370. package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +9 -19
  371. package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +16 -42
  372. package/lib/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +4 -15
  373. package/lib/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +0 -3
  374. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +4 -15
  375. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.spec.js +0 -2
  376. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.js +0 -5
  377. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.spec.js +0 -2
  378. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.js +0 -9
  379. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.spec.js +0 -2
  380. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.js +1 -3
  381. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.spec.js +0 -2
  382. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.js +3 -9
  383. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.spec.js +0 -2
  384. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +4 -22
  385. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.spec.js +2 -3
  386. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +0 -3
  387. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.spec.js +0 -2
  388. package/lib/utils/suggester-workers/commons-tokenizer/filters/index.js +0 -3
  389. package/lib/utils/suggester-workers/commons-tokenizer/get-regexp-from-pattern.js +0 -3
  390. package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.js +0 -8
  391. package/lib/utils/suggester-workers/commons-tokenizer/index.js +0 -10
  392. package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.js +0 -6
  393. package/lib/utils/suggester-workers/commons-tokenizer/soft-tokenizer.js +0 -3
  394. package/lib/utils/suggester-workers/create-worker.js +1 -11
  395. package/lib/utils/suggester-workers/find-best-label/find-best-label.js +10 -28
  396. package/lib/utils/suggester-workers/find-best-label/find-best-label.worker.js +9 -23
  397. package/lib/utils/suggester-workers/find-best-label/tokenize.js +6 -23
  398. package/lib/utils/suggester-workers/find-best-label/tokenize.spec.js +0 -2
  399. package/lib/utils/suggester-workers/searching/compute-score.js +4 -16
  400. package/lib/utils/suggester-workers/searching/get-db.js +1 -15
  401. package/lib/utils/suggester-workers/searching/index.js +0 -2
  402. package/lib/utils/suggester-workers/searching/order/create-alphanumeric-orderer.js +0 -5
  403. package/lib/utils/suggester-workers/searching/order/index.js +0 -8
  404. package/lib/utils/suggester-workers/searching/query-parser/index.js +0 -3
  405. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.js +0 -3
  406. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.spec.js +0 -2
  407. package/lib/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +4 -20
  408. package/lib/utils/suggester-workers/searching/resolve-query-parser.js +1 -15
  409. package/lib/utils/suggester-workers/searching/search-in-index.js +0 -3
  410. package/lib/utils/suggester-workers/searching/searching.js +6 -41
  411. package/lib/utils/suggester-workers/searching/searching.worker.js +4 -7
  412. package/lib/utils/vtl/dataset-builder.js +0 -4
  413. package/lib/utils/vtl/index.js +0 -2
  414. package/package.json +7 -4
  415. package/lib/components/checkbox/checkbox-group/checkbox-option.js +0 -57
  416. package/lib/components/checkbox/checkbox.scss +0 -1
  417. package/lib/components/pairwise/block/index.js +0 -15
  418. package/lib/components/pairwise/block/pairwise-block.js +0 -17
  419. package/lib/components/pairwise/index.js +0 -23
  420. package/lib/components/pairwise/links/links-orchestrator.js +0 -16
  421. package/lib/stories/pairwise/block/block.json +0 -3
  422. package/lib/stories/pairwise/links/data.json +0 -12
  423. package/lib/stories/pairwise/links/links.json +0 -141
@@ -4,65 +4,58 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _reduceVariablesArray = _interopRequireDefault(require("./reduce-variables-array"));
9
-
10
8
  var _reduceVariablesSimple = _interopRequireDefault(require("./reduce-variables-simple"));
11
-
12
9
  var _reduceCleaning = _interopRequireDefault(require("./reduce-cleaning"));
13
-
14
10
  var _reduceMissing = _interopRequireDefault(require("./reduce-missing"));
15
-
16
11
  var _reduceResizing = _interopRequireDefault(require("./reduce-resizing"));
17
-
18
12
  var _reduceLinksVariable = _interopRequireDefault(require("./reduce-links-variable"));
19
-
20
13
  var _compose = _interopRequireDefault(require("../../commons/compose"));
21
-
22
14
  var _validateControls = require("../validate-controls");
23
-
24
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
-
16
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
26
17
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
27
-
28
18
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
29
-
30
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31
-
19
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
21
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
32
22
  function isOnSubPage(pager) {
33
23
  var subPage = pager.subPage;
34
24
  return subPage !== undefined;
35
25
  }
26
+
36
27
  /**
37
28
  * met à jour variables qui contient les valeur collectées
38
29
  * @param {*} state
39
30
  * @param {*} action
40
31
  * @returns
41
32
  */
42
-
43
-
44
33
  function updateVariables(state, action) {
45
34
  var payload = action.payload;
46
35
  var response = payload.response,
47
- value = payload.value,
48
- _payload$args = payload.args,
49
- args = _payload$args === void 0 ? {} : _payload$args;
36
+ value = payload.value,
37
+ _payload$args = payload.args,
38
+ args = _payload$args === void 0 ? {} : _payload$args;
50
39
  var name = response.name;
51
40
  var loop = args.loop,
52
- index = args.index,
53
- length = args.length,
54
- linksIterations = args.linksIterations,
55
- paginatedLoop = args.paginatedLoop;
41
+ index = args.index,
42
+ length = args.length,
43
+ linksIterations = args.linksIterations,
44
+ symLinks = args.symLinks,
45
+ paginatedLoop = args.paginatedLoop,
46
+ shallowIteration = args.shallowIteration,
47
+ lengths = args.lengths;
56
48
  var pager = state.pager,
57
- variables = state.variables;
49
+ variables = state.variables;
58
50
  var nbIterations = pager.nbIterations,
59
- iteration = pager.iteration;
60
-
51
+ iteration = pager.iteration;
61
52
  if (linksIterations !== undefined) {
62
53
  var variablesNext = (0, _reduceLinksVariable["default"])(variables, {
63
54
  name: name,
64
55
  value: value,
65
- linksIterations: linksIterations
56
+ linksIterations: linksIterations,
57
+ symLinks: symLinks,
58
+ lengths: lengths
66
59
  });
67
60
  return _objectSpread(_objectSpread({}, state), {}, {
68
61
  variables: variablesNext
@@ -74,7 +67,6 @@ function updateVariables(state, action) {
74
67
  index: index,
75
68
  length: length
76
69
  });
77
-
78
70
  return _objectSpread(_objectSpread({}, state), {}, {
79
71
  variables: _variablesNext
80
72
  });
@@ -85,7 +77,6 @@ function updateVariables(state, action) {
85
77
  index: iteration,
86
78
  length: nbIterations
87
79
  });
88
-
89
80
  return _objectSpread(_objectSpread({}, state), {}, {
90
81
  variables: _variablesNext2
91
82
  });
@@ -94,42 +85,45 @@ function updateVariables(state, action) {
94
85
  name: name,
95
86
  value: value
96
87
  });
97
-
88
+ if (loop) return _objectSpread(_objectSpread({}, state), {}, {
89
+ variables: _variablesNext3,
90
+ pager: _objectSpread(_objectSpread({}, pager), {}, {
91
+ shallowIteration: shallowIteration
92
+ })
93
+ });
98
94
  return _objectSpread(_objectSpread({}, state), {}, {
99
95
  variables: _variablesNext3
100
96
  });
101
97
  }
102
98
  }
99
+
103
100
  /**
104
101
  * met à jour bindings pour l'exe du VTL (en appelant la fonction fournit par createExecuteExpression)
105
102
  * @param {*} state
106
103
  * @param {*} action
107
104
  * @returns
108
105
  */
109
-
110
-
111
106
  function updateBindings(state, action) {
112
107
  var payload = action.payload;
113
- var response = payload.response,
114
- value = payload.value;
108
+ var response = payload.response;
115
109
  var name = response.name;
116
- var updateBindings = state.updateBindings;
117
- updateBindings(name, value);
110
+ var ub = state.updateBindings;
111
+ var variables = state.variables;
112
+ var variable = variables[name];
113
+ var value = variable.value;
114
+ ub(name, value);
118
115
  return state;
119
116
  }
120
-
121
117
  var reducers = (0, _compose["default"])(updateVariables, updateBindings, _reduceResizing["default"], _reduceMissing["default"], _reduceCleaning["default"]);
118
+
122
119
  /**
123
120
  *
124
121
  * @param {*} state
125
122
  * @param {*} action
126
123
  * @returns
127
124
  */
128
-
129
125
  function reduceHandleChange(state, action) {
130
126
  return reducers(state, action);
131
127
  }
132
-
133
128
  var _default = (0, _validateControls.createControlsReducer)(reduceHandleChange);
134
-
135
129
  exports["default"] = _default;
@@ -1,53 +1,81 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports["default"] = void 0;
7
-
8
+ var _commons = require("../commons");
8
9
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
-
10
10
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
-
12
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
-
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
15
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
17
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
14
18
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
-
16
19
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
17
-
18
20
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
19
-
20
21
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
21
-
22
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
23
-
22
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
24
23
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
-
26
- function reduceLinksVariable(variables, _ref) {
24
+ function reduceOne(variables, _ref) {
27
25
  var name = _ref.name,
28
- value = _ref.value,
29
- linksIterations = _ref.linksIterations;
30
-
26
+ value = _ref.value,
27
+ linksIterations = _ref.linksIterations,
28
+ lengths = _ref.lengths;
31
29
  if (name in variables) {
32
30
  var variable = variables[name];
33
31
  var v = variable.value;
34
-
35
32
  var _linksIterations = _slicedToArray(linksIterations, 2),
36
- x = _linksIterations[0],
37
- y = _linksIterations[1];
38
-
39
- if (v[x][y] !== undefined) {
40
- v[x][y] = value;
41
- return _objectSpread(_objectSpread({}, variables), {}, _defineProperty({}, name, _objectSpread(_objectSpread({}, variable), {}, {
42
- value: v
43
- })));
44
- }
45
-
46
- return variables;
33
+ x = _linksIterations[0],
34
+ y = _linksIterations[1];
35
+ var _lengths = _slicedToArray(lengths, 2),
36
+ lx = _lengths[0],
37
+ ly = _lengths[1];
38
+ var next = (0, _commons.resizeArrayVariable)(_toConsumableArray(v), lx, []);
39
+ next[x] = (0, _commons.resizeArrayVariable)(_toConsumableArray(next[x]), ly, null);
40
+ next[x][y] = value;
41
+ return _objectSpread(_objectSpread({}, variables), {}, _defineProperty({}, name, _objectSpread(_objectSpread({}, variable), {}, {
42
+ value: next
43
+ })));
47
44
  }
48
-
49
45
  return variables;
50
46
  }
51
-
47
+ function reduceLinksVariable(variables, _ref2) {
48
+ var name = _ref2.name,
49
+ value = _ref2.value,
50
+ linksIterations = _ref2.linksIterations,
51
+ symLinks = _ref2.symLinks,
52
+ lengths = _ref2.lengths;
53
+ if (symLinks && name in symLinks) {
54
+ var symValue = symLinks[name][value];
55
+ var _linksIterations2 = _slicedToArray(linksIterations, 2),
56
+ x = _linksIterations2[0],
57
+ y = _linksIterations2[1];
58
+ var symIteration = [y, x];
59
+ if (symValue) {
60
+ return reduceOne(reduceOne(variables, {
61
+ name: name,
62
+ value: value,
63
+ linksIterations: linksIterations,
64
+ lengths: lengths
65
+ }), {
66
+ name: name,
67
+ value: symValue,
68
+ linksIterations: symIteration,
69
+ lengths: lengths
70
+ });
71
+ }
72
+ }
73
+ return reduceOne(variables, {
74
+ name: name,
75
+ value: value,
76
+ linksIterations: linksIterations,
77
+ lengths: lengths
78
+ });
79
+ }
52
80
  var _default = reduceLinksVariable;
53
81
  exports["default"] = _default;
@@ -1,76 +1,58 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports["default"] = void 0;
7
-
8
8
  var _reduceCleaning = _interopRequireDefault(require("./reduce-cleaning"));
9
-
10
9
  var _excluded = ["value"];
11
-
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
11
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
-
16
12
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
-
18
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
-
13
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
20
16
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
21
-
22
17
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
-
24
18
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
25
-
26
19
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
27
-
28
20
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
29
-
30
21
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
31
-
32
22
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
33
-
34
23
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
35
-
36
24
  function buildMissingValue(state, oldValue) {
37
- var iteration = state.pager.iteration; // Root question
38
-
39
- if (iteration === undefined) return null; // Loop question
40
-
25
+ var iteration = state.pager.iteration;
26
+ // Root question
27
+ if (iteration === undefined) return null;
28
+ // Loop question
41
29
  var newValue = _toConsumableArray(oldValue);
42
-
43
30
  newValue[iteration] = null;
44
31
  return newValue;
45
32
  }
46
-
47
33
  function reduceMissing(state, action) {
48
34
  var name = action.payload.response.name;
49
35
  var missingBlock = state.missingBlock;
50
-
51
36
  if (name in missingBlock) {
52
37
  var variables = state.variables,
53
- updateBindings = state.updateBindings;
38
+ updateBindings = state.updateBindings;
54
39
  var toClean = missingBlock[name];
55
40
  var delta = toClean.reduce(function (acc, variableName) {
56
41
  var _variables$variableNa = variables[variableName],
57
- value = _variables$variableNa.value,
58
- rest = _objectWithoutProperties(_variables$variableNa, _excluded);
59
-
42
+ value = _variables$variableNa.value,
43
+ rest = _objectWithoutProperties(_variables$variableNa, _excluded);
60
44
  updateBindings(variableName, null);
61
45
  var newValue = buildMissingValue(state, value);
62
46
  return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, variableName, _objectSpread(_objectSpread({}, rest), {}, {
63
47
  value: newValue
64
48
  })));
65
49
  }, {});
66
-
67
50
  var newStateAfterMissing = _objectSpread(_objectSpread({}, state), {}, {
68
51
  variables: _objectSpread(_objectSpread({}, variables), delta)
69
- }); // If missing clean variable which is also into cleaning case,
52
+ });
53
+ // If missing clean variable which is also into cleaning case,
70
54
  // we have to handle theses cleanings
71
55
  // To check: do we have with this trick or triggering handle change action?
72
-
73
-
74
56
  var newStateAfterCleaning = toClean.reduce(function (acc, v) {
75
57
  return (0, _reduceCleaning["default"])(acc, {
76
58
  payload: {
@@ -82,9 +64,7 @@ function reduceMissing(state, action) {
82
64
  }, newStateAfterMissing);
83
65
  return newStateAfterCleaning;
84
66
  }
85
-
86
67
  return state;
87
68
  }
88
-
89
69
  var _default = reduceMissing;
90
70
  exports["default"] = _default;
@@ -4,36 +4,26 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _commons = require("../../commons");
9
-
10
8
  var _commons2 = require("../commons");
11
-
9
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
12
10
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
-
14
11
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
-
16
12
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
-
18
13
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
19
-
20
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
21
-
14
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
22
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
-
24
16
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
25
-
26
17
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
27
-
28
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
29
-
18
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
20
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
30
21
  function reduceResizingVariables(_ref) {
31
22
  var size = _ref.size,
32
- variableArray = _ref.variableArray,
33
- variables = _ref.variables,
34
- executeExpression = _ref.executeExpression,
35
- updateBindings = _ref.updateBindings;
36
-
23
+ variableArray = _ref.variableArray,
24
+ variables = _ref.variables,
25
+ executeExpression = _ref.executeExpression,
26
+ updateBindings = _ref.updateBindings;
37
27
  if (size !== undefined) {
38
28
  var sizeValue = executeExpression((0, _commons.getCompatibleVTLExpression)(size));
39
29
  return variableArray.reduce(function (acc, v) {
@@ -45,25 +35,21 @@ function reduceResizingVariables(_ref) {
45
35
  })));
46
36
  }, {});
47
37
  }
48
-
49
38
  return {};
50
39
  }
51
-
52
40
  function reduceResizingLinksVariables(_ref2) {
53
41
  var sizeForLinksVariables = _ref2.sizeForLinksVariables,
54
- linksVariables = _ref2.linksVariables,
55
- variables = _ref2.variables,
56
- executeExpression = _ref2.executeExpression,
57
- updateBindings = _ref2.updateBindings;
58
-
42
+ linksVariables = _ref2.linksVariables,
43
+ variables = _ref2.variables,
44
+ executeExpression = _ref2.executeExpression,
45
+ updateBindings = _ref2.updateBindings;
59
46
  if (Array.isArray(sizeForLinksVariables)) {
60
47
  var _sizeForLinksVariable = sizeForLinksVariables.map(function (s) {
61
- return executeExpression((0, _commons.getCompatibleVTLExpression)(s));
62
- }),
63
- _sizeForLinksVariable2 = _slicedToArray(_sizeForLinksVariable, 2),
64
- xSize = _sizeForLinksVariable2[0],
65
- ySize = _sizeForLinksVariable2[1];
66
-
48
+ return executeExpression((0, _commons.getCompatibleVTLExpression)(s));
49
+ }),
50
+ _sizeForLinksVariable2 = _slicedToArray(_sizeForLinksVariable, 2),
51
+ xSize = _sizeForLinksVariable2[0],
52
+ ySize = _sizeForLinksVariable2[1];
67
53
  return linksVariables.reduce(function (acc, v) {
68
54
  var value = variables[v].value;
69
55
  var newValue = (0, _commons2.resizeArrayVariable)(value.map(function (i) {
@@ -75,22 +61,19 @@ function reduceResizingLinksVariables(_ref2) {
75
61
  })));
76
62
  }, {});
77
63
  }
78
-
79
64
  return {};
80
65
  }
81
-
82
66
  function reduceResizing(state, action) {
83
67
  var name = action.payload.response.name;
84
68
  var resizing = state.resizing,
85
- variables = state.variables,
86
- updateBindings = state.updateBindings;
87
-
69
+ variables = state.variables,
70
+ updateBindings = state.updateBindings;
88
71
  if (name in resizing) {
89
72
  var _resizing$name = resizing[name],
90
- size = _resizing$name.size,
91
- variableArray = _resizing$name.variables,
92
- sizeForLinksVariables = _resizing$name.sizeForLinksVariables,
93
- linksVariables = _resizing$name.linksVariables;
73
+ size = _resizing$name.size,
74
+ variableArray = _resizing$name.variables,
75
+ sizeForLinksVariables = _resizing$name.sizeForLinksVariables,
76
+ linksVariables = _resizing$name.linksVariables;
94
77
  var executeExpression = state.executeExpression;
95
78
  var newLinksVariables = reduceResizingLinksVariables({
96
79
  sizeForLinksVariables: sizeForLinksVariables,
@@ -110,9 +93,7 @@ function reduceResizing(state, action) {
110
93
  variables: _objectSpread(_objectSpread(_objectSpread({}, variables), newLinksVariables), newVariables)
111
94
  });
112
95
  }
113
-
114
96
  return state;
115
97
  }
116
-
117
98
  var _default = reduceResizing;
118
99
  exports["default"] = _default;
@@ -1,50 +1,41 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports["default"] = void 0;
7
-
8
8
  var _commons = require("../commons");
9
-
10
9
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11
-
12
10
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
13
-
14
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
-
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
13
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
16
14
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
17
-
18
15
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
19
-
20
16
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
-
22
17
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
23
-
24
18
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
25
-
26
19
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27
-
28
20
  function reduceVariablesArray(variables, _ref) {
29
21
  var name = _ref.name,
30
- value = _ref.value,
31
- index = _ref.index,
32
- length = _ref.length;
33
-
22
+ value = _ref.value,
23
+ index = _ref.index,
24
+ length = _ref.length;
34
25
  if (name in variables) {
35
26
  var variable = variables[name];
36
- var previousValue = variable.value; // validation de la valeur courante : si pas un tableau ou si la taille du tableau a changé
27
+ var previousValue = variable.value;
37
28
 
38
- var valueNext = (0, _commons.resizeArrayVariable)(_toConsumableArray(previousValue), length); // value affectation
29
+ // validation de la valeur courante : si pas un tableau ou si la taille du tableau a changé
30
+ var valueNext = (0, _commons.resizeArrayVariable)(_toConsumableArray(previousValue), length);
39
31
 
32
+ // value affectation
40
33
  valueNext[index] = value;
41
34
  return _objectSpread(_objectSpread({}, variables), {}, _defineProperty({}, name, _objectSpread(_objectSpread({}, variable), {}, {
42
35
  value: valueNext
43
36
  })));
44
37
  }
45
-
46
38
  return variables;
47
39
  }
48
-
49
40
  var _default = reduceVariablesArray;
50
41
  exports["default"] = _default;
@@ -4,26 +4,22 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
7
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
8
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
-
10
9
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
-
12
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
-
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
14
13
  function reduceVariablesSimple(variables, _ref) {
15
14
  var name = _ref.name,
16
- value = _ref.value;
17
-
15
+ value = _ref.value;
18
16
  if (name in variables) {
19
17
  var variable = variables[name];
20
18
  return _objectSpread(_objectSpread({}, variables), {}, _defineProperty({}, name, _objectSpread(_objectSpread({}, variable), {}, {
21
19
  value: value
22
20
  })));
23
21
  }
24
-
25
22
  return variables;
26
23
  }
27
-
28
24
  var _default = reduceVariablesSimple;
29
25
  exports["default"] = _default;