@inseefr/lunatic 3.0.0-rc.9 → 3.0.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 (1249) hide show
  1. package/README.md +19 -59
  2. package/lib/components/CheckboxBoolean/CheckboxBoolean.d.ts +11 -0
  3. package/lib/components/CheckboxBoolean/CheckboxBoolean.js +18 -64
  4. package/lib/components/CheckboxBoolean/CheckboxBoolean.js.map +1 -0
  5. package/lib/components/CheckboxBoolean/CheckboxBoolean.spec.js +37 -71
  6. package/lib/components/CheckboxBoolean/CheckboxBoolean.spec.js.map +1 -0
  7. package/lib/components/CheckboxGroup/CheckboxGroup.d.ts +11 -0
  8. package/lib/components/CheckboxGroup/CheckboxGroup.js +25 -49
  9. package/lib/components/CheckboxGroup/CheckboxGroup.js.map +1 -0
  10. package/lib/components/CheckboxGroup/CustomCheckboxGroup.d.ts +10 -0
  11. package/lib/components/CheckboxGroup/CustomCheckboxGroup.js +13 -43
  12. package/lib/components/CheckboxGroup/CustomCheckboxGroup.js.map +1 -0
  13. package/lib/components/CheckboxGroup/CustomCheckboxGroup.spec.js +45 -46
  14. package/lib/components/CheckboxGroup/CustomCheckboxGroup.spec.js.map +1 -0
  15. package/lib/components/CheckboxOne/CheckboxOne.d.ts +5 -0
  16. package/lib/components/CheckboxOne/CheckboxOne.js +7 -35
  17. package/lib/components/CheckboxOne/CheckboxOne.js.map +1 -0
  18. package/lib/components/CheckboxOne/CheckboxOne.spec.js +27 -53
  19. package/lib/components/CheckboxOne/CheckboxOne.spec.js.map +1 -0
  20. package/lib/components/Datepicker/Datepicker.d.ts +10 -0
  21. package/lib/components/Datepicker/Datepicker.js +60 -155
  22. package/lib/components/Datepicker/Datepicker.js.map +1 -0
  23. package/lib/components/Datepicker/Datepicker.spec.js +70 -87
  24. package/lib/components/Datepicker/Datepicker.spec.js.map +1 -0
  25. package/lib/components/Datepicker/DatepickerField.js +13 -47
  26. package/lib/components/Datepicker/DatepickerField.js.map +1 -0
  27. package/lib/components/Dropdown/Dropdown.d.ts +10 -0
  28. package/lib/components/Dropdown/Dropdown.js +14 -62
  29. package/lib/components/Dropdown/Dropdown.js.map +1 -0
  30. package/lib/components/Dropdown/Dropdown.spec.js +38 -49
  31. package/lib/components/Dropdown/Dropdown.spec.js.map +1 -0
  32. package/lib/components/Dropdown/renderer/SimpleLabelRenderer.js +17 -32
  33. package/lib/components/Dropdown/renderer/SimpleLabelRenderer.js.map +1 -0
  34. package/lib/components/Dropdown/renderer/SimpleOptionRenderer.js +10 -40
  35. package/lib/components/Dropdown/renderer/SimpleOptionRenderer.js.map +1 -0
  36. package/lib/components/Duration/Duration.d.ts +10 -0
  37. package/lib/components/Duration/Duration.js +29 -102
  38. package/lib/components/Duration/Duration.js.map +1 -0
  39. package/lib/components/Duration/durationUtils.js +22 -55
  40. package/lib/components/Duration/durationUtils.js.map +1 -0
  41. package/lib/components/Duration/formatDuration.js +17 -26
  42. package/lib/components/Duration/formatDuration.js.map +1 -0
  43. package/lib/components/Duration/formatDuration.spec.js +16 -38
  44. package/lib/components/Duration/formatDuration.spec.js.map +1 -0
  45. package/lib/components/Duration/getDurationFromValue.js +24 -49
  46. package/lib/components/Duration/getDurationFromValue.js.map +1 -0
  47. package/lib/components/FilterDescription/FilterDescription.js +4 -17
  48. package/lib/components/FilterDescription/FilterDescription.js.map +1 -0
  49. package/lib/components/FilterDescription/FilterDescription.spec.js +16 -21
  50. package/lib/components/FilterDescription/FilterDescription.spec.js.map +1 -0
  51. package/lib/components/Input/Input.d.ts +10 -0
  52. package/lib/components/Input/Input.js +14 -78
  53. package/lib/components/Input/Input.js.map +1 -0
  54. package/lib/components/Input/Input.spec.js +51 -83
  55. package/lib/components/Input/Input.spec.js.map +1 -0
  56. package/lib/components/InputNumber/InputNumber.d.ts +10 -0
  57. package/lib/components/InputNumber/InputNumber.js +14 -79
  58. package/lib/components/InputNumber/InputNumber.js.map +1 -0
  59. package/lib/components/InputNumber/InputNumber.spec.js +75 -112
  60. package/lib/components/InputNumber/InputNumber.spec.js.map +1 -0
  61. package/lib/components/InputNumber/InputNumberThousand.js +19 -55
  62. package/lib/components/InputNumber/InputNumberThousand.js.map +1 -0
  63. package/lib/components/Loop/Loop.d.ts +15 -0
  64. package/lib/components/Loop/Loop.js +49 -125
  65. package/lib/components/Loop/Loop.js.map +1 -0
  66. package/lib/components/Loop/constant.js +7 -7
  67. package/lib/components/Loop/constant.js.map +1 -0
  68. package/lib/components/LunaticComponents.d.ts +22 -0
  69. package/lib/components/LunaticComponents.js +72 -119
  70. package/lib/components/LunaticComponents.js.map +1 -0
  71. package/lib/components/PairwiseLinks/PairwiseLinks.js +42 -54
  72. package/lib/components/PairwiseLinks/PairwiseLinks.js.map +1 -0
  73. package/lib/components/Question/Question.js +16 -50
  74. package/lib/components/Question/Question.js.map +1 -0
  75. package/lib/components/Radio/Radio.d.ts +13 -0
  76. package/lib/components/Radio/Radio.js +8 -39
  77. package/lib/components/Radio/Radio.js.map +1 -0
  78. package/lib/components/RosterForLoop/RosterForLoop.js +53 -131
  79. package/lib/components/RosterForLoop/RosterForLoop.js.map +1 -0
  80. package/lib/components/RosterForLoop/RosterForLoop.spec.js +27 -45
  81. package/lib/components/RosterForLoop/RosterForLoop.spec.js.map +1 -0
  82. package/lib/components/Roundabout/CustomRoundabout.js +19 -66
  83. package/lib/components/Roundabout/CustomRoundabout.js.map +1 -0
  84. package/lib/components/Roundabout/Roundabout.js +15 -32
  85. package/lib/components/Roundabout/Roundabout.js.map +1 -0
  86. package/lib/components/Roundabout/RoundaboutItButton.js +37 -72
  87. package/lib/components/Roundabout/RoundaboutItButton.js.map +1 -0
  88. package/lib/components/Roundabout/RoundaboutItButton.spec.js +48 -101
  89. package/lib/components/Roundabout/RoundaboutItButton.spec.js.map +1 -0
  90. package/lib/components/Roundabout/RoundaboutRedirect.js +11 -21
  91. package/lib/components/Roundabout/RoundaboutRedirect.js.map +1 -0
  92. package/lib/components/Roundabout/extra.js +9 -44
  93. package/lib/components/Roundabout/extra.js.map +1 -0
  94. package/lib/components/Roundabout/redirect.spec.js +13 -17
  95. package/lib/components/Roundabout/redirect.spec.js.map +1 -0
  96. package/lib/components/Roundabout/roundabout.spec.js +49 -70
  97. package/lib/components/Roundabout/roundabout.spec.js.map +1 -0
  98. package/lib/components/Sequence/Sequence.d.ts +4 -0
  99. package/lib/components/Sequence/Sequence.js +8 -31
  100. package/lib/components/Sequence/Sequence.js.map +1 -0
  101. package/lib/components/Subsequence/Subsequence.d.ts +4 -0
  102. package/lib/components/Subsequence/Subsequence.js +7 -26
  103. package/lib/components/Subsequence/Subsequence.js.map +1 -0
  104. package/lib/components/Subsequence/Subsequence.spec.js +42 -59
  105. package/lib/components/Subsequence/Subsequence.spec.js.map +1 -0
  106. package/lib/components/Suggester/CustomSuggester.d.ts +31 -0
  107. package/lib/components/Suggester/CustomSuggester.js +15 -119
  108. package/lib/components/Suggester/CustomSuggester.js.map +1 -0
  109. package/lib/components/Suggester/Suggester.d.ts +2 -0
  110. package/lib/components/Suggester/Suggester.js +99 -136
  111. package/lib/components/Suggester/Suggester.js.map +1 -0
  112. package/lib/components/Suggester/SuggesterNotification.d.ts +9 -0
  113. package/lib/components/Suggester/SuggesterNotification.js +15 -59
  114. package/lib/components/Suggester/SuggesterNotification.js.map +1 -0
  115. package/lib/components/Suggester/SuggesterType.js +2 -5
  116. package/lib/components/Suggester/SuggesterType.js.map +1 -0
  117. package/lib/components/Suggester/useSuggestions.d.ts +17 -0
  118. package/lib/components/Suggester/useSuggestions.js +85 -0
  119. package/lib/components/Suggester/useSuggestions.js.map +1 -0
  120. package/lib/components/Summary/Summary.js +55 -105
  121. package/lib/components/Summary/Summary.js.map +1 -0
  122. package/lib/components/Switch/Switch.d.ts +20 -0
  123. package/lib/components/Switch/Switch.js +29 -105
  124. package/lib/components/Switch/Switch.js.map +1 -0
  125. package/lib/components/Table/Table.js +12 -65
  126. package/lib/components/Table/Table.js.map +1 -0
  127. package/lib/components/Text/Text.d.ts +3 -0
  128. package/lib/components/Text/Text.js +4 -0
  129. package/lib/components/Text/Text.js.map +1 -0
  130. package/lib/components/Textarea/Textarea.d.ts +10 -0
  131. package/lib/components/Textarea/Textarea.js +13 -78
  132. package/lib/components/Textarea/Textarea.js.map +1 -0
  133. package/lib/components/Textarea/Textarea.spec.js +31 -46
  134. package/lib/components/Textarea/Textarea.spec.js.map +1 -0
  135. package/lib/components/library.d.ts +106 -0
  136. package/lib/components/library.js +49 -52
  137. package/lib/components/library.js.map +1 -0
  138. package/lib/components/shared/Button/Button.d.ts +13 -0
  139. package/lib/components/shared/Button/Button.js +13 -44
  140. package/lib/components/shared/Button/Button.js.map +1 -0
  141. package/lib/components/shared/Button/Button.spec.js +51 -85
  142. package/lib/components/shared/Button/Button.spec.js.map +1 -0
  143. package/lib/components/shared/Button/IconButton.js +7 -32
  144. package/lib/components/shared/Button/IconButton.js.map +1 -0
  145. package/lib/components/shared/Button/IconButton.spec.js +53 -101
  146. package/lib/components/shared/Button/IconButton.spec.js.map +1 -0
  147. package/lib/components/shared/Checkbox/CheckboxOption.d.ts +15 -0
  148. package/lib/components/shared/Checkbox/CheckboxOption.js +24 -69
  149. package/lib/components/shared/Checkbox/CheckboxOption.js.map +1 -0
  150. package/lib/components/shared/Checkbox/CheckboxOption.spec.js +51 -68
  151. package/lib/components/shared/Checkbox/CheckboxOption.spec.js.map +1 -0
  152. package/lib/components/shared/Checkbox/getShortcutKey.js +3 -10
  153. package/lib/components/shared/Checkbox/getShortcutKey.js.map +1 -0
  154. package/lib/components/shared/Combobox/Combobox.d.ts +23 -0
  155. package/lib/components/shared/Combobox/Combobox.js +87 -199
  156. package/lib/components/shared/Combobox/Combobox.js.map +1 -0
  157. package/lib/components/shared/Combobox/Combobox.stories.js +42 -105
  158. package/lib/components/shared/Combobox/Combobox.stories.js.map +1 -0
  159. package/lib/components/shared/Combobox/ComboboxContainer.js +6 -27
  160. package/lib/components/shared/Combobox/ComboboxContainer.js.map +1 -0
  161. package/lib/components/shared/Combobox/ComboboxContainer.spec.js +24 -43
  162. package/lib/components/shared/Combobox/ComboboxContainer.spec.js.map +1 -0
  163. package/lib/components/shared/Combobox/ComboboxContent.js +33 -62
  164. package/lib/components/shared/Combobox/ComboboxContent.js.map +1 -0
  165. package/lib/components/shared/Combobox/ComboboxContentBox.js +8 -22
  166. package/lib/components/shared/Combobox/ComboboxContentBox.js.map +1 -0
  167. package/lib/components/shared/Combobox/ComboboxType.d.ts +51 -0
  168. package/lib/components/shared/Combobox/ComboboxType.js +2 -5
  169. package/lib/components/shared/Combobox/ComboboxType.js.map +1 -0
  170. package/lib/components/shared/Combobox/Panel/ComboboxOption.js +14 -41
  171. package/lib/components/shared/Combobox/Panel/ComboboxOption.js.map +1 -0
  172. package/lib/components/shared/Combobox/Panel/ComboboxOption.spec.js +33 -63
  173. package/lib/components/shared/Combobox/Panel/ComboboxOption.spec.js.map +1 -0
  174. package/lib/components/shared/Combobox/Panel/ComboboxOptionContainer.js +30 -50
  175. package/lib/components/shared/Combobox/Panel/ComboboxOptionContainer.js.map +1 -0
  176. package/lib/components/shared/Combobox/Panel/ComboboxOptionContainer.spec.js +18 -26
  177. package/lib/components/shared/Combobox/Panel/ComboboxOptionContainer.spec.js.map +1 -0
  178. package/lib/components/shared/Combobox/Panel/ComboboxPanel.d.ts +5 -0
  179. package/lib/components/shared/Combobox/Panel/ComboboxPanel.js +24 -41
  180. package/lib/components/shared/Combobox/Panel/ComboboxPanel.js.map +1 -0
  181. package/lib/components/shared/Combobox/Panel/ComboboxPanel.spec.js +55 -108
  182. package/lib/components/shared/Combobox/Panel/ComboboxPanel.spec.js.map +1 -0
  183. package/lib/components/shared/Combobox/Panel/ComboboxPanelContainer.js +9 -26
  184. package/lib/components/shared/Combobox/Panel/ComboboxPanelContainer.js.map +1 -0
  185. package/lib/components/shared/Combobox/Panel/ComboboxPanelContainer.spec.js +31 -57
  186. package/lib/components/shared/Combobox/Panel/ComboboxPanelContainer.spec.js.map +1 -0
  187. package/lib/components/shared/Combobox/Selection/ComboboxClearButton.d.ts +9 -0
  188. package/lib/components/shared/Combobox/Selection/ComboboxClearButton.js +22 -43
  189. package/lib/components/shared/Combobox/Selection/ComboboxClearButton.js.map +1 -0
  190. package/lib/components/shared/Combobox/Selection/ComboboxClearButton.spec.js +52 -121
  191. package/lib/components/shared/Combobox/Selection/ComboboxClearButton.spec.js.map +1 -0
  192. package/lib/components/shared/Combobox/Selection/ComboboxInput.js +20 -56
  193. package/lib/components/shared/Combobox/Selection/ComboboxInput.js.map +1 -0
  194. package/lib/components/shared/Combobox/Selection/ComboboxLabelSelection.js +28 -43
  195. package/lib/components/shared/Combobox/Selection/ComboboxLabelSelection.js.map +1 -0
  196. package/lib/components/shared/Combobox/Selection/ComboboxLabelSelection.spec.js +26 -40
  197. package/lib/components/shared/Combobox/Selection/ComboboxLabelSelection.spec.js.map +1 -0
  198. package/lib/components/shared/Combobox/Selection/ComboboxSelection.js +14 -64
  199. package/lib/components/shared/Combobox/Selection/ComboboxSelection.js.map +1 -0
  200. package/lib/components/shared/Combobox/Selection/ComboboxSelection.spec.js +36 -68
  201. package/lib/components/shared/Combobox/Selection/ComboboxSelection.spec.js.map +1 -0
  202. package/lib/components/shared/Combobox/constants.js +10 -15
  203. package/lib/components/shared/Combobox/constants.js.map +1 -0
  204. package/lib/components/shared/Combobox/index.js +2 -1
  205. package/lib/components/shared/Combobox/index.js.map +1 -0
  206. package/lib/components/shared/ComponentErrors/ComponentErrors.js +19 -45
  207. package/lib/components/shared/ComponentErrors/ComponentErrors.js.map +1 -0
  208. package/lib/components/shared/ComponentErrors/ComponentErrors.spec.js +40 -44
  209. package/lib/components/shared/ComponentErrors/ComponentErrors.spec.js.map +1 -0
  210. package/lib/components/shared/ComponentWrapper.d.ts +25 -0
  211. package/lib/components/shared/ComponentWrapper.js +14 -53
  212. package/lib/components/shared/ComponentWrapper.js.map +1 -0
  213. package/lib/components/shared/Declarations/Declarations.js +13 -45
  214. package/lib/components/shared/Declarations/Declarations.js.map +1 -0
  215. package/lib/components/shared/Declarations/Declarations.spec.js +54 -77
  216. package/lib/components/shared/Declarations/Declarations.spec.js.map +1 -0
  217. package/lib/components/shared/Fieldset/Fieldset.js +25 -39
  218. package/lib/components/shared/Fieldset/Fieldset.js.map +1 -0
  219. package/lib/components/shared/Fieldset/Fieldset.spec.js +25 -37
  220. package/lib/components/shared/Fieldset/Fieldset.spec.js.map +1 -0
  221. package/lib/components/shared/HOC/slottableComponent.d.ts +105 -0
  222. package/lib/components/shared/HOC/slottableComponent.js +22 -45
  223. package/lib/components/shared/HOC/slottableComponent.js.map +1 -0
  224. package/lib/components/shared/Icons/checkbox-checked-icon.js +7 -35
  225. package/lib/components/shared/Icons/checkbox-checked-icon.js.map +1 -0
  226. package/lib/components/shared/Icons/checkbox-disabled-icon.d.ts +2 -0
  227. package/lib/components/shared/Icons/checkbox-disabled-icon.js +7 -0
  228. package/lib/components/shared/Icons/checkbox-disabled-icon.js.map +1 -0
  229. package/lib/components/shared/Icons/checkbox-unchecked-icon.js +7 -35
  230. package/lib/components/shared/Icons/checkbox-unchecked-icon.js.map +1 -0
  231. package/lib/components/shared/Icons/closed-icon.js +7 -32
  232. package/lib/components/shared/Icons/closed-icon.js.map +1 -0
  233. package/lib/components/shared/Icons/cross-icon.js +7 -32
  234. package/lib/components/shared/Icons/cross-icon.js.map +1 -0
  235. package/lib/components/shared/Icons/icon-props.js +2 -5
  236. package/lib/components/shared/Icons/icon-props.js.map +1 -0
  237. package/lib/components/shared/Icons/index.js +11 -75
  238. package/lib/components/shared/Icons/index.js.map +1 -0
  239. package/lib/components/shared/Icons/load-icon.js +7 -32
  240. package/lib/components/shared/Icons/load-icon.js.map +1 -0
  241. package/lib/components/shared/Icons/lunatic-icon.js +7 -17
  242. package/lib/components/shared/Icons/lunatic-icon.js.map +1 -0
  243. package/lib/components/shared/Icons/network-icon.js +7 -32
  244. package/lib/components/shared/Icons/network-icon.js.map +1 -0
  245. package/lib/components/shared/Icons/on-drag-icon.js +7 -32
  246. package/lib/components/shared/Icons/on-drag-icon.js.map +1 -0
  247. package/lib/components/shared/Icons/opened-icon.js +7 -32
  248. package/lib/components/shared/Icons/opened-icon.js.map +1 -0
  249. package/lib/components/shared/Icons/radio-checked-icon.js +7 -36
  250. package/lib/components/shared/Icons/radio-checked-icon.js.map +1 -0
  251. package/lib/components/shared/Icons/radio-unchecked-icon.js +7 -35
  252. package/lib/components/shared/Icons/radio-unchecked-icon.js.map +1 -0
  253. package/lib/components/shared/Label/Label.js +12 -31
  254. package/lib/components/shared/Label/Label.js.map +1 -0
  255. package/lib/components/shared/Label/Label.spec.js +19 -45
  256. package/lib/components/shared/Label/Label.spec.js.map +1 -0
  257. package/lib/components/shared/LabelDescription.js +11 -21
  258. package/lib/components/shared/LabelDescription.js.map +1 -0
  259. package/lib/components/shared/MDLabel/MDLabel.d.ts +5 -0
  260. package/lib/components/shared/MDLabel/MDLabel.js +21 -43
  261. package/lib/components/shared/MDLabel/MDLabel.js.map +1 -0
  262. package/lib/components/shared/MDLabel/MDLabel.spec.js +105 -101
  263. package/lib/components/shared/MDLabel/MDLabel.spec.js.map +1 -0
  264. package/lib/components/shared/MDLabel/MDLabelLink.js +34 -74
  265. package/lib/components/shared/MDLabel/MDLabelLink.js.map +1 -0
  266. package/lib/components/shared/MDLabel/RouterLink.js +6 -26
  267. package/lib/components/shared/MDLabel/RouterLink.js.map +1 -0
  268. package/lib/components/shared/MDLabel/generateUniqueId.js +2 -1
  269. package/lib/components/shared/MDLabel/generateUniqueId.js.map +1 -0
  270. package/lib/components/shared/Missing/Missing.d.ts +14 -0
  271. package/lib/components/shared/Missing/Missing.js +48 -81
  272. package/lib/components/shared/Missing/Missing.js.map +1 -0
  273. package/lib/components/shared/Missing/Missing.spec.js +43 -79
  274. package/lib/components/shared/Missing/Missing.spec.js.map +1 -0
  275. package/lib/components/shared/ModalControls/ModalControls.d.ts +10 -0
  276. package/lib/components/shared/ModalControls/ModalControls.js +27 -81
  277. package/lib/components/shared/ModalControls/ModalControls.js.map +1 -0
  278. package/lib/components/shared/ModalControls/ModalControls.spec.js +61 -69
  279. package/lib/components/shared/ModalControls/ModalControls.spec.js.map +1 -0
  280. package/lib/components/shared/Notification.js +8 -28
  281. package/lib/components/shared/Notification.js.map +1 -0
  282. package/lib/components/shared/Radio/RadioGroup.d.ts +9 -0
  283. package/lib/components/shared/Radio/RadioGroup.js +19 -63
  284. package/lib/components/shared/Radio/RadioGroup.js.map +1 -0
  285. package/lib/components/shared/Radio/RadioOption.js +34 -113
  286. package/lib/components/shared/Radio/RadioOption.js.map +1 -0
  287. package/lib/components/shared/Radio/RadioOption.spec.js +45 -86
  288. package/lib/components/shared/Radio/RadioOption.spec.js.map +1 -0
  289. package/lib/components/shared/Table/Table.js +8 -21
  290. package/lib/components/shared/Table/Table.js.map +1 -0
  291. package/lib/components/shared/Table/Table.spec.js +15 -23
  292. package/lib/components/shared/Table/Table.spec.js.map +1 -0
  293. package/lib/components/shared/Table/TableHeader.d.ts +2 -0
  294. package/lib/components/shared/Table/TableHeader.js +14 -38
  295. package/lib/components/shared/Table/TableHeader.js.map +1 -0
  296. package/lib/components/shared/Table/Tbody.d.ts +6 -0
  297. package/lib/components/shared/Table/Tbody.js +7 -20
  298. package/lib/components/shared/Table/Tbody.js.map +1 -0
  299. package/lib/components/shared/Table/Tbody.spec.js +22 -32
  300. package/lib/components/shared/Table/Tbody.spec.js.map +1 -0
  301. package/lib/components/shared/Table/Td.d.ts +10 -0
  302. package/lib/components/shared/Table/Td.js +7 -26
  303. package/lib/components/shared/Table/Td.js.map +1 -0
  304. package/lib/components/shared/Table/Td.spec.js +20 -40
  305. package/lib/components/shared/Table/Td.spec.js.map +1 -0
  306. package/lib/components/shared/Table/Th.d.ts +10 -0
  307. package/lib/components/shared/Table/Th.js +7 -25
  308. package/lib/components/shared/Table/Th.js.map +1 -0
  309. package/lib/components/shared/Table/Th.spec.js +25 -44
  310. package/lib/components/shared/Table/Th.spec.js.map +1 -0
  311. package/lib/components/shared/Table/Thead.d.ts +6 -0
  312. package/lib/components/shared/Table/Thead.js +8 -20
  313. package/lib/components/shared/Table/Thead.js.map +1 -0
  314. package/lib/components/shared/Table/Thead.spec.js +12 -29
  315. package/lib/components/shared/Table/Thead.spec.js.map +1 -0
  316. package/lib/components/shared/Table/Tr.d.ts +7 -0
  317. package/lib/components/shared/Table/Tr.js +7 -21
  318. package/lib/components/shared/Table/Tr.js.map +1 -0
  319. package/lib/components/shared/Table/Tr.spec.js +19 -39
  320. package/lib/components/shared/Table/Tr.spec.js.map +1 -0
  321. package/lib/components/shared/Table/index.js +8 -54
  322. package/lib/components/shared/Table/index.js.map +1 -0
  323. package/lib/components/type.d.ts +296 -0
  324. package/lib/components/type.js +2 -5
  325. package/lib/components/type.js.map +1 -0
  326. package/lib/constants/component-types.js +2 -7
  327. package/lib/constants/component-types.js.map +1 -0
  328. package/lib/constants/declarations.js +10 -18
  329. package/lib/constants/declarations.js.map +1 -0
  330. package/lib/constants/event-types.js +11 -17
  331. package/lib/constants/event-types.js.map +1 -0
  332. package/lib/constants/index.js +6 -60
  333. package/lib/constants/index.js.map +1 -0
  334. package/lib/constants/indexedDBStore.js +17 -22
  335. package/lib/constants/indexedDBStore.js.map +1 -0
  336. package/lib/constants/supported-preferences.js +9 -11
  337. package/lib/constants/supported-preferences.js.map +1 -0
  338. package/lib/constants/value-types.js +6 -11
  339. package/lib/constants/value-types.js.map +1 -0
  340. package/lib/constants/variable-types.js +4 -9
  341. package/lib/constants/variable-types.js.map +1 -0
  342. package/lib/hooks/use-auto-focus.js +16 -23
  343. package/lib/hooks/use-auto-focus.js.map +1 -0
  344. package/lib/hooks/use-track-changes.d.ts +17 -0
  345. package/lib/hooks/use-track-changes.js +37 -46
  346. package/lib/hooks/use-track-changes.js.map +1 -0
  347. package/lib/hooks/use-why-render.js +10 -16
  348. package/lib/hooks/use-why-render.js.map +1 -0
  349. package/lib/hooks/useDebounce.d.ts +4 -0
  350. package/lib/hooks/useDebounce.js +24 -0
  351. package/lib/hooks/useDebounce.js.map +1 -0
  352. package/lib/hooks/useDocumentEvent.js +16 -21
  353. package/lib/hooks/useDocumentEvent.js.map +1 -0
  354. package/lib/hooks/useKeyboardKey.d.ts +4 -0
  355. package/lib/hooks/useKeyboardKey.js +25 -0
  356. package/lib/hooks/useKeyboardKey.js.map +1 -0
  357. package/lib/hooks/useListKeyboardHandler.js +15 -21
  358. package/lib/hooks/useListKeyboardHandler.js.map +1 -0
  359. package/lib/hooks/useRefSync.js +10 -0
  360. package/lib/hooks/useRefSync.js.map +1 -0
  361. package/lib/i18n/build-dictionary.js +17 -35
  362. package/lib/i18n/build-dictionary.js.map +1 -0
  363. package/lib/i18n/dictionary.d.ts +57 -0
  364. package/lib/i18n/dictionary.js +26 -36
  365. package/lib/i18n/dictionary.js.map +1 -0
  366. package/lib/i18n/index.d.ts +7 -0
  367. package/lib/i18n/index.js +13 -26
  368. package/lib/i18n/index.js.map +1 -0
  369. package/lib/i18n/inputNumberProps.js +6 -17
  370. package/lib/i18n/inputNumberProps.js.map +1 -0
  371. package/lib/index.d.ts +13 -0
  372. package/lib/index.js +10 -41
  373. package/lib/index.js.map +1 -0
  374. package/lib/main.css +77 -28
  375. package/lib/main.css.map +1 -1
  376. package/lib/tests/setup.d.ts +1 -0
  377. package/lib/tests/setup.js +18 -0
  378. package/lib/tests/setup.js.map +1 -0
  379. package/lib/tests/utils/lunatic.d.ts +19 -0
  380. package/lib/tests/utils/lunatic.js +31 -0
  381. package/lib/tests/utils/lunatic.js.map +1 -0
  382. package/lib/tests/utils/timer.d.ts +1 -0
  383. package/lib/tests/utils/timer.js +4 -0
  384. package/lib/tests/utils/timer.js.map +1 -0
  385. package/lib/type.source.d.ts +371 -0
  386. package/lib/type.source.js +8 -0
  387. package/lib/type.source.js.map +1 -0
  388. package/lib/type.utils.js +2 -5
  389. package/lib/type.utils.js.map +1 -0
  390. package/lib/use-lunatic/actions.d.ts +49 -0
  391. package/lib/use-lunatic/actions.js +21 -47
  392. package/lib/use-lunatic/actions.js.map +1 -0
  393. package/lib/use-lunatic/commons/check-loops.d.ts +30 -0
  394. package/lib/use-lunatic/commons/check-loops.js +55 -90
  395. package/lib/use-lunatic/commons/check-loops.js.map +1 -0
  396. package/lib/use-lunatic/commons/check-pager.d.ts +5 -0
  397. package/lib/use-lunatic/commons/check-pager.js +14 -20
  398. package/lib/use-lunatic/commons/check-pager.js.map +1 -0
  399. package/lib/use-lunatic/commons/compile-controls.d.ts +9 -0
  400. package/lib/use-lunatic/commons/compile-controls.js +107 -144
  401. package/lib/use-lunatic/commons/compile-controls.js.map +1 -0
  402. package/lib/use-lunatic/commons/component.js +19 -19
  403. package/lib/use-lunatic/commons/component.js.map +1 -0
  404. package/lib/use-lunatic/commons/compose.d.ts +3 -0
  405. package/lib/use-lunatic/commons/compose.js +6 -18
  406. package/lib/use-lunatic/commons/compose.js.map +1 -0
  407. package/lib/use-lunatic/commons/create-map-pages.d.ts +6 -0
  408. package/lib/use-lunatic/commons/create-map-pages.js +40 -62
  409. package/lib/use-lunatic/commons/create-map-pages.js.map +1 -0
  410. package/lib/use-lunatic/commons/execute-condition-filter.d.ts +3 -0
  411. package/lib/use-lunatic/commons/execute-condition-filter.js +9 -19
  412. package/lib/use-lunatic/commons/execute-condition-filter.js.map +1 -0
  413. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +34 -0
  414. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +129 -110
  415. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -0
  416. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.spec.js +81 -38
  417. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.spec.js.map +1 -0
  418. package/lib/use-lunatic/commons/fill-components/fill-components.d.ts +25 -0
  419. package/lib/use-lunatic/commons/fill-components/fill-components.js +31 -47
  420. package/lib/use-lunatic/commons/fill-components/fill-components.js.map +1 -0
  421. package/lib/use-lunatic/commons/get-compatible-vtl-expression.js +12 -21
  422. package/lib/use-lunatic/commons/get-compatible-vtl-expression.js.map +1 -0
  423. package/lib/use-lunatic/commons/get-components-from-state.d.ts +5 -0
  424. package/lib/use-lunatic/commons/get-components-from-state.js +16 -40
  425. package/lib/use-lunatic/commons/get-components-from-state.js.map +1 -0
  426. package/lib/use-lunatic/commons/index.d.ts +6 -0
  427. package/lib/use-lunatic/commons/index.js +7 -81
  428. package/lib/use-lunatic/commons/index.js.map +1 -0
  429. package/lib/use-lunatic/commons/is-First-last-page.d.ts +6 -0
  430. package/lib/use-lunatic/commons/is-First-last-page.js +6 -15
  431. package/lib/use-lunatic/commons/is-First-last-page.js.map +1 -0
  432. package/lib/use-lunatic/commons/is-paginated-loop.js +3 -8
  433. package/lib/use-lunatic/commons/is-paginated-loop.js.map +1 -0
  434. package/lib/use-lunatic/commons/is-roundabout.js +5 -10
  435. package/lib/use-lunatic/commons/is-roundabout.js.map +1 -0
  436. package/lib/use-lunatic/commons/page-navigation.d.ts +7 -0
  437. package/lib/use-lunatic/commons/page-navigation.js +87 -103
  438. package/lib/use-lunatic/commons/page-navigation.js.map +1 -0
  439. package/lib/use-lunatic/commons/page-navigation.spec.js +134 -127
  440. package/lib/use-lunatic/commons/page-navigation.spec.js.map +1 -0
  441. package/lib/use-lunatic/commons/page-tag.d.ts +23 -0
  442. package/lib/use-lunatic/commons/page-tag.js +60 -65
  443. package/lib/use-lunatic/commons/page-tag.js.map +1 -0
  444. package/lib/use-lunatic/commons/page-tag.spec.js +38 -0
  445. package/lib/use-lunatic/commons/page-tag.spec.js.map +1 -0
  446. package/lib/use-lunatic/commons/page.d.ts +11 -0
  447. package/lib/use-lunatic/commons/page.js +26 -41
  448. package/lib/use-lunatic/commons/page.js.map +1 -0
  449. package/lib/use-lunatic/commons/variables/behaviours/cleaning-behaviour.d.ts +7 -0
  450. package/lib/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js +44 -50
  451. package/lib/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js.map +1 -0
  452. package/lib/use-lunatic/commons/variables/behaviours/missing-behaviour.d.ts +7 -0
  453. package/lib/use-lunatic/commons/variables/behaviours/missing-behaviour.js +21 -42
  454. package/lib/use-lunatic/commons/variables/behaviours/missing-behaviour.js.map +1 -0
  455. package/lib/use-lunatic/commons/variables/behaviours/resizing-behaviour.d.ts +7 -0
  456. package/lib/use-lunatic/commons/variables/behaviours/resizing-behaviour.js +51 -74
  457. package/lib/use-lunatic/commons/variables/behaviours/resizing-behaviour.js.map +1 -0
  458. package/lib/use-lunatic/commons/variables/get-questionnaire-data.d.ts +3 -0
  459. package/lib/use-lunatic/commons/variables/get-questionnaire-data.js +51 -68
  460. package/lib/use-lunatic/commons/variables/get-questionnaire-data.js.map +1 -0
  461. package/lib/use-lunatic/commons/variables/lunatic-variables-store.d.ts +88 -0
  462. package/lib/use-lunatic/commons/variables/lunatic-variables-store.js +284 -364
  463. package/lib/use-lunatic/commons/variables/lunatic-variables-store.js.map +1 -0
  464. package/lib/use-lunatic/commons/variables/lunatic-variables-store.spec.js +354 -382
  465. package/lib/use-lunatic/commons/variables/lunatic-variables-store.spec.js.map +1 -0
  466. package/lib/use-lunatic/hooks/use-loop-variables.d.ts +5 -0
  467. package/lib/use-lunatic/hooks/use-loop-variables.js +14 -23
  468. package/lib/use-lunatic/hooks/use-loop-variables.js.map +1 -0
  469. package/lib/use-lunatic/hooks/use-page-has-response.d.ts +6 -0
  470. package/lib/use-lunatic/hooks/use-page-has-response.js +66 -107
  471. package/lib/use-lunatic/hooks/use-page-has-response.js.map +1 -0
  472. package/lib/use-lunatic/hooks/useOverview.d.ts +16 -0
  473. package/lib/use-lunatic/hooks/useOverview.js +91 -0
  474. package/lib/use-lunatic/hooks/useOverview.js.map +1 -0
  475. package/lib/use-lunatic/index.js +2 -13
  476. package/lib/use-lunatic/index.js.map +1 -0
  477. package/lib/use-lunatic/lunatic-context.js +38 -66
  478. package/lib/use-lunatic/lunatic-context.js.map +1 -0
  479. package/lib/use-lunatic/props/getComponentTypeProps.d.ts +9 -0
  480. package/lib/use-lunatic/props/getComponentTypeProps.js +164 -0
  481. package/lib/use-lunatic/props/getComponentTypeProps.js.map +1 -0
  482. package/lib/use-lunatic/props/propIterations.d.ts +7 -0
  483. package/lib/use-lunatic/props/propIterations.js +26 -0
  484. package/lib/use-lunatic/props/propIterations.js.map +1 -0
  485. package/lib/use-lunatic/props/propMissingResponse.d.ts +9 -0
  486. package/lib/use-lunatic/props/propMissingResponse.js +13 -0
  487. package/lib/use-lunatic/props/propMissingResponse.js.map +1 -0
  488. package/lib/use-lunatic/props/propValue.d.ts +6 -0
  489. package/lib/use-lunatic/props/propValue.js +28 -0
  490. package/lib/use-lunatic/props/propValue.js.map +1 -0
  491. package/lib/use-lunatic/props/propValue.spec.js +54 -0
  492. package/lib/use-lunatic/props/propValue.spec.js.map +1 -0
  493. package/lib/use-lunatic/reducer/commons/auto-explore-loop.d.ts +5 -0
  494. package/lib/use-lunatic/reducer/commons/auto-explore-loop.js +42 -52
  495. package/lib/use-lunatic/reducer/commons/auto-explore-loop.js.map +1 -0
  496. package/lib/use-lunatic/reducer/commons/index.js +3 -28
  497. package/lib/use-lunatic/reducer/commons/index.js.map +1 -0
  498. package/lib/use-lunatic/reducer/commons/resize-array-variable.js +16 -26
  499. package/lib/use-lunatic/reducer/commons/resize-array-variable.js.map +1 -0
  500. package/lib/use-lunatic/reducer/commons/validate-condition-filter.d.ts +6 -0
  501. package/lib/use-lunatic/reducer/commons/validate-condition-filter.js +14 -28
  502. package/lib/use-lunatic/reducer/commons/validate-condition-filter.js.map +1 -0
  503. package/lib/use-lunatic/reducer/controls/check-base-control.d.ts +2 -0
  504. package/lib/use-lunatic/reducer/controls/check-base-control.js +35 -39
  505. package/lib/use-lunatic/reducer/controls/check-base-control.js.map +1 -0
  506. package/lib/use-lunatic/reducer/controls/check-roundabout-control.d.ts +9 -0
  507. package/lib/use-lunatic/reducer/controls/check-roundabout-control.js +16 -46
  508. package/lib/use-lunatic/reducer/controls/check-roundabout-control.js.map +1 -0
  509. package/lib/use-lunatic/reducer/overview/overviewOnInit.d.ts +6 -0
  510. package/lib/use-lunatic/reducer/overview/overviewOnInit.js +49 -0
  511. package/lib/use-lunatic/reducer/overview/overviewOnInit.js.map +1 -0
  512. package/lib/use-lunatic/reducer/reduce-go-next-page.d.ts +2 -0
  513. package/lib/use-lunatic/reducer/reduce-go-next-page.js +32 -52
  514. package/lib/use-lunatic/reducer/reduce-go-next-page.js.map +1 -0
  515. package/lib/use-lunatic/reducer/reduce-go-previous-page.d.ts +2 -0
  516. package/lib/use-lunatic/reducer/reduce-go-previous-page.js +28 -46
  517. package/lib/use-lunatic/reducer/reduce-go-previous-page.js.map +1 -0
  518. package/lib/use-lunatic/reducer/reduce-go-to-page.d.ts +3 -0
  519. package/lib/use-lunatic/reducer/reduce-go-to-page.js +52 -68
  520. package/lib/use-lunatic/reducer/reduce-go-to-page.js.map +1 -0
  521. package/lib/use-lunatic/reducer/reduce-handle-changes.d.ts +6 -0
  522. package/lib/use-lunatic/reducer/reduce-handle-changes.js +24 -0
  523. package/lib/use-lunatic/reducer/reduce-handle-changes.js.map +1 -0
  524. package/lib/use-lunatic/reducer/reducer.d.ts +3 -0
  525. package/lib/use-lunatic/reducer/reducer.js +19 -35
  526. package/lib/use-lunatic/reducer/reducer.js.map +1 -0
  527. package/lib/use-lunatic/reducer/reducerInitializer.d.ts +11 -0
  528. package/lib/use-lunatic/reducer/reducerInitializer.js +121 -0
  529. package/lib/use-lunatic/reducer/reducerInitializer.js.map +1 -0
  530. package/lib/use-lunatic/replace-component-sequence.d.ts +9 -0
  531. package/lib/use-lunatic/replace-component-sequence.js +12 -23
  532. package/lib/use-lunatic/replace-component-sequence.js.map +1 -0
  533. package/lib/use-lunatic/type.d.ts +165 -0
  534. package/lib/use-lunatic/type.js +2 -5
  535. package/lib/use-lunatic/type.js.map +1 -0
  536. package/lib/use-lunatic/use-lunatic.d.ts +56 -0
  537. package/lib/use-lunatic/use-lunatic.js +135 -214
  538. package/lib/use-lunatic/use-lunatic.js.map +1 -0
  539. package/lib/utils/array.d.ts +28 -0
  540. package/lib/utils/array.js +63 -102
  541. package/lib/utils/array.js.map +1 -0
  542. package/lib/utils/array.spec.js +39 -32
  543. package/lib/utils/array.spec.js.map +1 -0
  544. package/lib/utils/constants/alphabet.js +2 -7
  545. package/lib/utils/constants/alphabet.js.map +1 -0
  546. package/lib/utils/constants/features.d.ts +4 -0
  547. package/lib/utils/constants/features.js +5 -9
  548. package/lib/utils/constants/features.js.map +1 -0
  549. package/lib/utils/constants/index.js +6 -60
  550. package/lib/utils/constants/index.js.map +1 -0
  551. package/lib/utils/constants/links.js +3 -8
  552. package/lib/utils/constants/links.js.map +1 -0
  553. package/lib/utils/constants/missing.js +3 -8
  554. package/lib/utils/constants/missing.js.map +1 -0
  555. package/lib/utils/constants/variable-status.js +6 -11
  556. package/lib/utils/constants/variable-status.js.map +1 -0
  557. package/lib/utils/constants/variable-types.js +2 -7
  558. package/lib/utils/constants/variable-types.js.map +1 -0
  559. package/lib/utils/dom.js +16 -20
  560. package/lib/utils/dom.js.map +1 -0
  561. package/lib/utils/env.js +13 -17
  562. package/lib/utils/env.js.map +1 -0
  563. package/lib/utils/function.d.ts +5 -0
  564. package/lib/utils/function.js +20 -7
  565. package/lib/utils/function.js.map +1 -0
  566. package/lib/utils/is-element.js +5 -9
  567. package/lib/utils/is-element.js.map +1 -0
  568. package/lib/utils/is-object.js +4 -10
  569. package/lib/utils/is-object.js.map +1 -0
  570. package/lib/utils/logger.js +11 -39
  571. package/lib/utils/logger.js.map +1 -0
  572. package/lib/utils/number.js +23 -33
  573. package/lib/utils/number.js.map +1 -0
  574. package/lib/utils/number.spec.js +10 -11
  575. package/lib/utils/number.spec.js.map +1 -0
  576. package/lib/utils/object.d.ts +6 -0
  577. package/lib/utils/object.js +20 -31
  578. package/lib/utils/object.js.map +1 -0
  579. package/lib/utils/search/SearchInterface.d.ts +13 -0
  580. package/lib/utils/search/SearchInterface.js +2 -0
  581. package/lib/utils/search/SearchInterface.js.map +1 -0
  582. package/lib/utils/search/SearchMinisearch.d.ts +11 -0
  583. package/lib/utils/search/SearchMinisearch.js +40 -0
  584. package/lib/utils/search/SearchMinisearch.js.map +1 -0
  585. package/lib/utils/search/SuggestersDatabase.d.ts +15 -0
  586. package/lib/utils/search/SuggestersDatabase.js +37 -0
  587. package/lib/utils/search/SuggestersDatabase.js.map +1 -0
  588. package/lib/utils/search/melauto.d.ts +15 -0
  589. package/lib/utils/search/melauto.js +41 -0
  590. package/lib/utils/search/melauto.js.map +1 -0
  591. package/lib/utils/search/tokenizer.d.ts +14 -0
  592. package/lib/utils/search/tokenizer.js +57 -0
  593. package/lib/utils/search/tokenizer.js.map +1 -0
  594. package/lib/utils/to-number.js +10 -15
  595. package/lib/utils/to-number.js.map +1 -0
  596. package/lib/utils/variables.d.ts +13 -0
  597. package/lib/utils/variables.js +16 -23
  598. package/lib/utils/variables.js.map +1 -0
  599. package/lib/utils/variables.spec.js +75 -66
  600. package/lib/utils/variables.spec.js.map +1 -0
  601. package/lib/utils/vtl.js +76 -83
  602. package/lib/utils/vtl.js.map +1 -0
  603. package/package.json +54 -107
  604. package/README.fr.md +0 -186
  605. package/lib/components/CheckboxGroup/CheckboxGroup.scss +0 -13
  606. package/lib/components/CheckboxOne/CheckboxOne.scss +0 -19
  607. package/lib/components/Datepicker/Datepicker.scss +0 -19
  608. package/lib/components/Datepicker/__snapshots__/Datepicker.spec.tsx.snap +0 -166
  609. package/lib/components/Dropdown/Dropdown.scss +0 -38
  610. package/lib/components/Dropdown/__snapshots__/Dropdown.spec.tsx.snap +0 -85
  611. package/lib/components/Dropdown/helpers.js +0 -94
  612. package/lib/components/Duration/Duration.scss +0 -9
  613. package/lib/components/Input/Input.scss +0 -42
  614. package/lib/components/Input/__snapshots__/Input.spec.tsx.snap +0 -36
  615. package/lib/components/InputNumber/InputNumber.scss +0 -11
  616. package/lib/components/InputNumber/__snapshots__/InputNumber.spec.tsx.snap +0 -40
  617. package/lib/components/Radio/Radio.scss +0 -19
  618. package/lib/components/RosterForLoop/RosterForLoop.scss +0 -39
  619. package/lib/components/RosterForLoop/__snapshots__/RosterForLoop.spec.tsx.snap +0 -95
  620. package/lib/components/Roundabout/Roundabout.scss +0 -13
  621. package/lib/components/Sequence/Sequence.scss +0 -10
  622. package/lib/components/Suggester/Suggester.scss +0 -170
  623. package/lib/components/Suggester/SuggesterStatus.js +0 -46
  624. package/lib/components/Suggester/helpers.js +0 -50
  625. package/lib/components/Switch/switch.scss +0 -45
  626. package/lib/components/Textarea/Textarea.scss +0 -8
  627. package/lib/components/Textarea/__snapshots__/Textarea.spec.tsx.snap +0 -32
  628. package/lib/components/index.scss +0 -154
  629. package/lib/components/shared/Button/Button.scss +0 -24
  630. package/lib/components/shared/Button/IconButton.scss +0 -33
  631. package/lib/components/shared/Button/__snapshots__/Button.spec.tsx.snap +0 -80
  632. package/lib/components/shared/Checkbox/CheckboxOption.scss +0 -19
  633. package/lib/components/shared/Combobox/Combobox.scss +0 -206
  634. package/lib/components/shared/Combobox/Selection/__snapshots__/ComboboxSelection.spec.tsx.snap +0 -76
  635. package/lib/components/shared/ComponentErrors/ComponentErrors.scss +0 -5
  636. package/lib/components/shared/Declarations/Declarations.scss +0 -42
  637. package/lib/components/shared/Fieldset/Fieldset.scss +0 -5
  638. package/lib/components/shared/Icons/lunatic-icon.scss +0 -4
  639. package/lib/components/shared/Label/Label.scss +0 -6
  640. package/lib/components/shared/Missing/Missing.scss +0 -27
  641. package/lib/components/shared/ModalControls/ModalControls.scss +0 -48
  642. package/lib/components/shared/Radio/RadioGroup.scss +0 -21
  643. package/lib/components/shared/Table/Table.scss +0 -27
  644. package/lib/components/shared/VariableStatus/VariableStatus.js +0 -72
  645. package/lib/components/shared/VariableStatus/VariableStatus.scss +0 -39
  646. package/lib/components/shared/VariableStatus/VariableStatus.spec.js +0 -24
  647. package/lib/components/shared/VariableStatus/icons/edited.png +0 -0
  648. package/lib/components/shared/VariableStatus/icons/forced.png +0 -0
  649. package/lib/components/shared/suggester-loader-widget/dragger/dragger.js +0 -84
  650. package/lib/components/shared/suggester-loader-widget/dragger/dragger.scss +0 -8
  651. package/lib/components/shared/suggester-loader-widget/dragger/dragger.spec.js +0 -89
  652. package/lib/components/shared/suggester-loader-widget/dragger/index.js +0 -13
  653. package/lib/components/shared/suggester-loader-widget/index.js +0 -13
  654. package/lib/components/shared/suggester-loader-widget/is-network/index.js +0 -13
  655. package/lib/components/shared/suggester-loader-widget/is-network/is-network.js +0 -52
  656. package/lib/components/shared/suggester-loader-widget/is-network/is-network.spec.js +0 -34
  657. package/lib/components/shared/suggester-loader-widget/is-network/use-online-status.js +0 -45
  658. package/lib/components/shared/suggester-loader-widget/is-network/use-online-status.spec.js +0 -40
  659. package/lib/components/shared/suggester-loader-widget/loader-row.js +0 -103
  660. package/lib/components/shared/suggester-loader-widget/loader.js +0 -132
  661. package/lib/components/shared/suggester-loader-widget/progress.js +0 -40
  662. package/lib/components/shared/suggester-loader-widget/tools/action-tool.js +0 -29
  663. package/lib/components/shared/suggester-loader-widget/tools/index.js +0 -20
  664. package/lib/components/shared/suggester-loader-widget/tools/tools.js +0 -17
  665. package/lib/components/shared/suggester-loader-widget/widget-container.js +0 -43
  666. package/lib/components/shared/suggester-loader-widget/widget.js +0 -133
  667. package/lib/components/shared/suggester-loader-widget/widget.scss +0 -176
  668. package/lib/css/components/Button.scss +0 -24
  669. package/lib/css/components/CheckboxGroup.scss +0 -13
  670. package/lib/css/components/CheckboxOne.scss +0 -19
  671. package/lib/css/components/CheckboxOption.scss +0 -19
  672. package/lib/css/components/Combobox.scss +0 -206
  673. package/lib/css/components/ComponentErrors.scss +0 -5
  674. package/lib/css/components/Datepicker.scss +0 -19
  675. package/lib/css/components/Declarations.scss +0 -42
  676. package/lib/css/components/Dragger.scss +0 -8
  677. package/lib/css/components/Dropdown.scss +0 -38
  678. package/lib/css/components/Duration.scss +0 -9
  679. package/lib/css/components/Fieldset.scss +0 -5
  680. package/lib/css/components/IconButton.scss +0 -38
  681. package/lib/css/components/Input.scss +0 -42
  682. package/lib/css/components/InputNumber.scss +0 -11
  683. package/lib/css/components/Label.scss +0 -6
  684. package/lib/css/components/Missing.scss +0 -27
  685. package/lib/css/components/ModalControls.scss +0 -48
  686. package/lib/css/components/RadioGroup.scss +0 -21
  687. package/lib/css/components/RosterForLoop.scss +0 -39
  688. package/lib/css/components/Roundabout.scss +0 -13
  689. package/lib/css/components/Sequence.scss +0 -10
  690. package/lib/css/components/Suggester.scss +0 -170
  691. package/lib/css/components/SuggesterWidget.scss +0 -176
  692. package/lib/css/components/Table.scss +0 -27
  693. package/lib/css/components/Textarea.scss +0 -8
  694. package/lib/css/components/VariableStatus.scss +0 -36
  695. package/lib/css/main.scss +0 -181
  696. package/lib/hooks/use-ref-sync.js +0 -15
  697. package/lib/hooks/useSuggesterInfo.js +0 -69
  698. package/lib/insee.d.js +0 -1
  699. package/lib/src/components/CheckboxBoolean/CheckboxBoolean.d.ts +0 -11
  700. package/lib/src/components/CheckboxGroup/CheckboxGroup.d.ts +0 -11
  701. package/lib/src/components/CheckboxGroup/CustomCheckboxGroup.d.ts +0 -13
  702. package/lib/src/components/CheckboxOne/CheckboxOne.d.ts +0 -5
  703. package/lib/src/components/Datepicker/Datepicker.d.ts +0 -10
  704. package/lib/src/components/Dropdown/Dropdown.d.ts +0 -10
  705. package/lib/src/components/Dropdown/helpers.d.ts +0 -19
  706. package/lib/src/components/Duration/Duration.d.ts +0 -10
  707. package/lib/src/components/Input/Input.d.ts +0 -10
  708. package/lib/src/components/InputNumber/InputNumber.d.ts +0 -10
  709. package/lib/src/components/Loop/Loop.d.ts +0 -15
  710. package/lib/src/components/LunaticComponents.d.ts +0 -25
  711. package/lib/src/components/Radio/Radio.d.ts +0 -12
  712. package/lib/src/components/Sequence/Sequence.d.ts +0 -2
  713. package/lib/src/components/Subsequence/Subsequence.d.ts +0 -2
  714. package/lib/src/components/Suggester/CustomSuggester.d.ts +0 -29
  715. package/lib/src/components/Suggester/Suggester.d.ts +0 -2
  716. package/lib/src/components/Suggester/SuggesterNotification.d.ts +0 -10
  717. package/lib/src/components/Suggester/SuggesterStatus.d.ts +0 -23
  718. package/lib/src/components/Suggester/helpers.d.ts +0 -6
  719. package/lib/src/components/Switch/Switch.d.ts +0 -19
  720. package/lib/src/components/Textarea/Textarea.d.ts +0 -10
  721. package/lib/src/components/library.d.ts +0 -94
  722. package/lib/src/components/shared/Button/Button.d.ts +0 -11
  723. package/lib/src/components/shared/Checkbox/CheckboxOption.d.ts +0 -14
  724. package/lib/src/components/shared/Combobox/Combobox.d.ts +0 -21
  725. package/lib/src/components/shared/Combobox/ComboboxType.d.ts +0 -50
  726. package/lib/src/components/shared/Combobox/Panel/ComboboxPanel.d.ts +0 -5
  727. package/lib/src/components/shared/Combobox/Selection/ComboboxClearButton.d.ts +0 -9
  728. package/lib/src/components/shared/ComponentWrapper.d.ts +0 -26
  729. package/lib/src/components/shared/HOC/slottableComponent.d.ts +0 -105
  730. package/lib/src/components/shared/MDLabel/MDLabel.d.ts +0 -7
  731. package/lib/src/components/shared/Missing/Missing.d.ts +0 -13
  732. package/lib/src/components/shared/ModalControls/ModalControls.d.ts +0 -10
  733. package/lib/src/components/shared/Radio/RadioGroup.d.ts +0 -22
  734. package/lib/src/components/shared/Table/TableHeader.d.ts +0 -2
  735. package/lib/src/components/shared/Table/Tbody.d.ts +0 -7
  736. package/lib/src/components/shared/Table/Td.d.ts +0 -11
  737. package/lib/src/components/shared/Table/Th.d.ts +0 -11
  738. package/lib/src/components/shared/Table/Thead.d.ts +0 -7
  739. package/lib/src/components/shared/Table/Tr.d.ts +0 -8
  740. package/lib/src/components/shared/VariableStatus/VariableStatus.d.ts +0 -6
  741. package/lib/src/components/shared/suggester-loader-widget/dragger/dragger.d.ts +0 -16
  742. package/lib/src/components/shared/suggester-loader-widget/dragger/index.d.ts +0 -1
  743. package/lib/src/components/shared/suggester-loader-widget/index.d.ts +0 -1
  744. package/lib/src/components/shared/suggester-loader-widget/is-network/index.d.ts +0 -1
  745. package/lib/src/components/shared/suggester-loader-widget/is-network/is-network.d.ts +0 -6
  746. package/lib/src/components/shared/suggester-loader-widget/is-network/is-network.spec.d.ts +0 -1
  747. package/lib/src/components/shared/suggester-loader-widget/is-network/use-online-status.d.ts +0 -2
  748. package/lib/src/components/shared/suggester-loader-widget/is-network/use-online-status.spec.d.ts +0 -1
  749. package/lib/src/components/shared/suggester-loader-widget/loader-row.d.ts +0 -11
  750. package/lib/src/components/shared/suggester-loader-widget/loader.d.ts +0 -13
  751. package/lib/src/components/shared/suggester-loader-widget/progress.d.ts +0 -7
  752. package/lib/src/components/shared/suggester-loader-widget/tools/action-tool.d.ts +0 -9
  753. package/lib/src/components/shared/suggester-loader-widget/tools/index.d.ts +0 -2
  754. package/lib/src/components/shared/suggester-loader-widget/tools/tools.d.ts +0 -3
  755. package/lib/src/components/shared/suggester-loader-widget/widget-container.d.ts +0 -8
  756. package/lib/src/components/shared/suggester-loader-widget/widget.d.ts +0 -15
  757. package/lib/src/components/type.d.ts +0 -275
  758. package/lib/src/hooks/use-track-changes.d.ts +0 -17
  759. package/lib/src/hooks/useSuggesterInfo.d.ts +0 -9
  760. package/lib/src/i18n/dictionary.d.ts +0 -41
  761. package/lib/src/i18n/index.d.ts +0 -7
  762. package/lib/src/index.d.ts +0 -13
  763. package/lib/src/use-lunatic/actions.d.ts +0 -117
  764. package/lib/src/use-lunatic/commons/check-loops.d.ts +0 -3
  765. package/lib/src/use-lunatic/commons/check-pager.d.ts +0 -5
  766. package/lib/src/use-lunatic/commons/compile-controls.d.ts +0 -9
  767. package/lib/src/use-lunatic/commons/compose.d.ts +0 -3
  768. package/lib/src/use-lunatic/commons/create-map-pages.d.ts +0 -7
  769. package/lib/src/use-lunatic/commons/execute-condition-filter.d.ts +0 -3
  770. package/lib/src/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +0 -15
  771. package/lib/src/use-lunatic/commons/fill-components/fill-component-required.d.ts +0 -419
  772. package/lib/src/use-lunatic/commons/fill-components/fill-component-value.d.ts +0 -5
  773. package/lib/src/use-lunatic/commons/fill-components/fill-component-value.spec.d.ts +0 -1
  774. package/lib/src/use-lunatic/commons/fill-components/fill-components.d.ts +0 -23
  775. package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +0 -827
  776. package/lib/src/use-lunatic/commons/fill-components/fill-iterations.d.ts +0 -122
  777. package/lib/src/use-lunatic/commons/fill-components/fill-management.d.ts +0 -6
  778. package/lib/src/use-lunatic/commons/fill-components/fill-missing-response.d.ts +0 -12
  779. package/lib/src/use-lunatic/commons/fill-components/fill-pagination.d.ts +0 -9
  780. package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +0 -1200
  781. package/lib/src/use-lunatic/commons/fill-components/index.d.ts +0 -1
  782. package/lib/src/use-lunatic/commons/get-components-from-state.d.ts +0 -6
  783. package/lib/src/use-lunatic/commons/getOverview.d.ts +0 -19
  784. package/lib/src/use-lunatic/commons/index.d.ts +0 -9
  785. package/lib/src/use-lunatic/commons/is-First-last-page.d.ts +0 -6
  786. package/lib/src/use-lunatic/commons/page-navigation.d.ts +0 -7
  787. package/lib/src/use-lunatic/commons/page-tag.d.ts +0 -12
  788. package/lib/src/use-lunatic/commons/page.d.ts +0 -11
  789. package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +0 -3
  790. package/lib/src/use-lunatic/commons/variables/behaviours/cleaning-behaviour.d.ts +0 -7
  791. package/lib/src/use-lunatic/commons/variables/behaviours/missing-behaviour.d.ts +0 -7
  792. package/lib/src/use-lunatic/commons/variables/behaviours/resizing-behaviour.d.ts +0 -7
  793. package/lib/src/use-lunatic/commons/variables/get-questionnaire-data.d.ts +0 -4
  794. package/lib/src/use-lunatic/commons/variables/lunatic-variables-store.d.ts +0 -86
  795. package/lib/src/use-lunatic/hooks/use-loop-variables.d.ts +0 -5
  796. package/lib/src/use-lunatic/hooks/use-page-has-response.d.ts +0 -6
  797. package/lib/src/use-lunatic/initial-state.d.ts +0 -3
  798. package/lib/src/use-lunatic/reducer/commons/auto-explore-loop.d.ts +0 -5
  799. package/lib/src/use-lunatic/reducer/commons/validate-condition-filter.d.ts +0 -6
  800. package/lib/src/use-lunatic/reducer/controls/check-base-control.d.ts +0 -2
  801. package/lib/src/use-lunatic/reducer/controls/check-roundabout-control.d.ts +0 -10
  802. package/lib/src/use-lunatic/reducer/index.d.ts +0 -1
  803. package/lib/src/use-lunatic/reducer/overview/overview-on-change.d.ts +0 -2
  804. package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +0 -107
  805. package/lib/src/use-lunatic/reducer/reduce-go-next-page.d.ts +0 -2
  806. package/lib/src/use-lunatic/reducer/reduce-go-previous-page.d.ts +0 -3
  807. package/lib/src/use-lunatic/reducer/reduce-go-to-page.d.ts +0 -4
  808. package/lib/src/use-lunatic/reducer/reduce-handle-change.d.ts +0 -6
  809. package/lib/src/use-lunatic/reducer/reduce-on-init.d.ts +0 -4
  810. package/lib/src/use-lunatic/reducer/reduce-on-set-waiting.d.ts +0 -4
  811. package/lib/src/use-lunatic/reducer/reduce-update-state.d.ts +0 -3
  812. package/lib/src/use-lunatic/reducer/reducer.d.ts +0 -4
  813. package/lib/src/use-lunatic/replace-component-sequence.d.ts +0 -29
  814. package/lib/src/use-lunatic/type-source.d.ts +0 -304
  815. package/lib/src/use-lunatic/type.d.ts +0 -148
  816. package/lib/src/use-lunatic/use-lunatic.d.ts +0 -589
  817. package/lib/src/use-lunatic/use-lunatic.test.d.ts +0 -1
  818. package/lib/src/use-lunatic/use-suggesters.d.ts +0 -20
  819. package/lib/src/utils/array.d.ts +0 -28
  820. package/lib/src/utils/constants/features.d.ts +0 -3
  821. package/lib/src/utils/function.d.ts +0 -4
  822. package/lib/src/utils/idb-tools/clear-store.d.ts +0 -2
  823. package/lib/src/utils/idb-tools/create-db-opener.d.ts +0 -13
  824. package/lib/src/utils/idb-tools/create-open-db.d.ts +0 -2
  825. package/lib/src/utils/idb-tools/get-entity.d.ts +0 -2
  826. package/lib/src/utils/idb-tools/get-idb.d.ts +0 -2
  827. package/lib/src/utils/idb-tools/idb-bulk-insert.d.ts +0 -16
  828. package/lib/src/utils/idb-tools/idb-types.d.ts +0 -16
  829. package/lib/src/utils/idb-tools/index.d.ts +0 -7
  830. package/lib/src/utils/idb-tools/insert-entity.d.ts +0 -2
  831. package/lib/src/utils/idb-tools/open-db.d.ts +0 -2
  832. package/lib/src/utils/idb-tools/open-or-create-db.d.ts +0 -2
  833. package/lib/src/utils/object.d.ts +0 -5
  834. package/lib/src/utils/store-tools/clear-store-data.d.ts +0 -2
  835. package/lib/src/utils/store-tools/clear-store-info.d.ts +0 -2
  836. package/lib/src/utils/store-tools/create/create.d.ts +0 -4
  837. package/lib/src/utils/store-tools/create/index.d.ts +0 -2
  838. package/lib/src/utils/store-tools/create/update-store-info.d.ts +0 -2
  839. package/lib/src/utils/store-tools/get-store-count.d.ts +0 -2
  840. package/lib/src/utils/store-tools/index.d.ts +0 -7
  841. package/lib/src/utils/store-tools/initStore.d.ts +0 -2
  842. package/lib/src/utils/store-tools/open-or-create-store.d.ts +0 -2
  843. package/lib/src/utils/store-tools/use-store-index.d.ts +0 -4
  844. package/lib/src/utils/suggester-workers/append-to-index/append.d.ts +0 -6
  845. package/lib/src/utils/suggester-workers/append-to-index/create-append-task.d.ts +0 -7
  846. package/lib/src/utils/suggester-workers/append-to-index/index.d.ts +0 -2
  847. package/lib/src/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.d.ts +0 -2
  848. package/lib/src/utils/suggester-workers/create-worker.d.ts +0 -1
  849. package/lib/src/utils/suggester-workers/searching/compute-score.d.ts +0 -3
  850. package/lib/src/utils/suggester-workers/searching/meloto-order.d.ts +0 -25
  851. package/lib/src/utils/suggester-workers/worker-path.d.ts +0 -6
  852. package/lib/src/utils/variables.d.ts +0 -13
  853. package/lib/stories/behaviour/cleaning/cleaning.stories.js +0 -90
  854. package/lib/stories/behaviour/cleaning/source-loop.json +0 -130
  855. package/lib/stories/behaviour/cleaning/source.json +0 -151
  856. package/lib/stories/behaviour/controls/V2_Controles_BouclesLiees2_PasPageFin.json +0 -709
  857. package/lib/stories/behaviour/controls/boucles-n.json +0 -202
  858. package/lib/stories/behaviour/controls/controls-externes.json +0 -75
  859. package/lib/stories/behaviour/controls/controls-externes.stories.js +0 -60
  860. package/lib/stories/behaviour/controls/controls.stories.js +0 -98
  861. package/lib/stories/behaviour/controls/loop.json +0 -130
  862. package/lib/stories/behaviour/controls/simple-numeric.json +0 -1966
  863. package/lib/stories/behaviour/controls/simple.json +0 -666
  864. package/lib/stories/behaviour/missing/missing.stories.js +0 -90
  865. package/lib/stories/behaviour/missing/source.json +0 -822
  866. package/lib/stories/behaviour/others/V2_DeclarationsSimples.json +0 -964
  867. package/lib/stories/behaviour/others/V2_MinMaxSum_Boucles.json +0 -509
  868. package/lib/stories/behaviour/others/V2_QuestSimple_Boucles.json +0 -4354
  869. package/lib/stories/behaviour/others/V2_TCMRallyeGames.json +0 -2892
  870. package/lib/stories/behaviour/others/test-dylan.json +0 -558
  871. package/lib/stories/behaviour/others/test.stories.js +0 -87
  872. package/lib/stories/behaviour/paste/source.json +0 -44949
  873. package/lib/stories/behaviour/paste/test.stories.js +0 -83
  874. package/lib/stories/behaviour/performance/performance.stories.js +0 -47
  875. package/lib/stories/behaviour/performance/source.json +0 -172
  876. package/lib/stories/behaviour/resizing/resizing.stories.js +0 -90
  877. package/lib/stories/behaviour/resizing/source-resizing-cleaning.json +0 -171
  878. package/lib/stories/behaviour/resizing/source.json +0 -789
  879. package/lib/stories/behaviour/slots.stories.js +0 -64
  880. package/lib/stories/checkbox-boolean/checkboxBoolean.stories.js +0 -32
  881. package/lib/stories/checkbox-boolean/source.json +0 -58
  882. package/lib/stories/checkbox-group/checkbox-group.stories.js +0 -46
  883. package/lib/stories/checkbox-group/source.json +0 -402
  884. package/lib/stories/checkbox-group/sourceLoop.json +0 -83
  885. package/lib/stories/checkbox-one/checkboxOne.stories.js +0 -41
  886. package/lib/stories/checkbox-one/source.json +0 -52
  887. package/lib/stories/date-picker/data.json +0 -3
  888. package/lib/stories/date-picker/datepicker.stories.js +0 -38
  889. package/lib/stories/date-picker/source.json +0 -65
  890. package/lib/stories/declaration/data.json +0 -1
  891. package/lib/stories/declaration/input.stories.js +0 -34
  892. package/lib/stories/declaration/source.json +0 -84
  893. package/lib/stories/disabled/data.json +0 -32
  894. package/lib/stories/disabled/disabled.stories.js +0 -34
  895. package/lib/stories/disabled/source.json +0 -382
  896. package/lib/stories/dropdown/data.json +0 -16
  897. package/lib/stories/dropdown/dropdown.stories.js +0 -37
  898. package/lib/stories/dropdown/source.json +0 -141
  899. package/lib/stories/duration/duration.stories.js +0 -38
  900. package/lib/stories/duration/mois.json +0 -32
  901. package/lib/stories/duration/time.json +0 -32
  902. package/lib/stories/filter-description/filter-description.stories.js +0 -47
  903. package/lib/stories/filter-description/source-options.json +0 -81
  904. package/lib/stories/filter-description/source.json +0 -12
  905. package/lib/stories/input/data.json +0 -1
  906. package/lib/stories/input/input.stories.js +0 -34
  907. package/lib/stories/input/source.json +0 -35
  908. package/lib/stories/input-number/input-number.stories.js +0 -32
  909. package/lib/stories/input-number/source.json +0 -31
  910. package/lib/stories/loop/loop.stories.js +0 -46
  911. package/lib/stories/loop/roster-for-loop.stories.js +0 -126
  912. package/lib/stories/loop/source-bloc.json +0 -85
  913. package/lib/stories/loop/source-paginated.json +0 -113
  914. package/lib/stories/loop/source-roster.json +0 -114
  915. package/lib/stories/loop/source-with-header.json +0 -127
  916. package/lib/stories/markdown/markdown.stories.js +0 -32
  917. package/lib/stories/markdown/source.json +0 -40
  918. package/lib/stories/overview/data.json +0 -1
  919. package/lib/stories/overview/overview.stories.js +0 -35
  920. package/lib/stories/overview/source.json +0 -28
  921. package/lib/stories/overview/sourceWithHierarchy.json +0 -6298
  922. package/lib/stories/pairwise/data.json +0 -12
  923. package/lib/stories/pairwise/pairwise-links.stories.js +0 -134
  924. package/lib/stories/pairwise/source.json +0 -266
  925. package/lib/stories/question/question.stories.js +0 -28
  926. package/lib/stories/question/source.json +0 -220
  927. package/lib/stories/questionnaires/logement/data.json +0 -2686
  928. package/lib/stories/questionnaires/logement/logement.stories.js +0 -72
  929. package/lib/stories/questionnaires/logement/source-sequence.json +0 -34181
  930. package/lib/stories/questionnaires/logement/source-sum.json +0 -31806
  931. package/lib/stories/questionnaires/logement/source.json +0 -34191
  932. package/lib/stories/questionnaires/recensement/data.json +0 -12
  933. package/lib/stories/questionnaires/recensement/recensement.stories.js +0 -50
  934. package/lib/stories/questionnaires/recensement/source.json +0 -15190
  935. package/lib/stories/questionnaires/rp/data.json +0 -5
  936. package/lib/stories/questionnaires/rp/rp.stories.js +0 -35
  937. package/lib/stories/questionnaires/rp/source.json +0 -262
  938. package/lib/stories/questionnaires/simpsons/simpsons.stories.js +0 -547
  939. package/lib/stories/questionnaires/simpsons/source.json +0 -6296
  940. package/lib/stories/questionnaires2023/bySequence/source.json +0 -5054
  941. package/lib/stories/questionnaires2023/bySequence/ticWeb.stories.js +0 -62
  942. package/lib/stories/questionnaires2023/famille/famille.stories.js +0 -62
  943. package/lib/stories/questionnaires2023/famille/source.json +0 -50344
  944. package/lib/stories/questionnaires2023/simpsons/simpsons.stories.js +0 -62
  945. package/lib/stories/questionnaires2023/simpsons/source.json +0 -5176
  946. package/lib/stories/questionnaires2023/ticTel/source.json +0 -12888
  947. package/lib/stories/questionnaires2023/ticTel/ticWeb.stories.js +0 -62
  948. package/lib/stories/questionnaires2023/ticWeb/source.json +0 -11331
  949. package/lib/stories/questionnaires2023/ticWeb/ticWeb.stories.js +0 -62
  950. package/lib/stories/radio/radio.stories.js +0 -41
  951. package/lib/stories/radio/source.json +0 -51
  952. package/lib/stories/roundabout/data1.json +0 -25
  953. package/lib/stories/roundabout/data2.json +0 -25
  954. package/lib/stories/roundabout/roundabout.stories.js +0 -42
  955. package/lib/stories/roundabout/source.json +0 -286
  956. package/lib/stories/sequence/sequence.stories.js +0 -38
  957. package/lib/stories/sequence/source-declarations.json +0 -40
  958. package/lib/stories/sequence/source.json +0 -17
  959. package/lib/stories/suggester/SuggesterNotification.js +0 -26
  960. package/lib/stories/suggester/fakeReferentiel.json +0 -12
  961. package/lib/stories/suggester/source-option-responses.json +0 -145
  962. package/lib/stories/suggester/source.json +0 -398
  963. package/lib/stories/suggester/suggester-workers.stories.js +0 -249
  964. package/lib/stories/suggester/suggester.stories.js +0 -81
  965. package/lib/stories/summary/data.json +0 -32
  966. package/lib/stories/summary/source.json +0 -368
  967. package/lib/stories/summary/summary.stories.js +0 -35
  968. package/lib/stories/switch/README.md +0 -31
  969. package/lib/stories/switch/data-forced.json +0 -48
  970. package/lib/stories/switch/source.json +0 -80
  971. package/lib/stories/switch/switch.stories.js +0 -32
  972. package/lib/stories/table/data-roster.json +0 -1
  973. package/lib/stories/table/data.json +0 -1
  974. package/lib/stories/table/source-colspan.json +0 -314
  975. package/lib/stories/table/source-roster.json +0 -513
  976. package/lib/stories/table/source.json +0 -31
  977. package/lib/stories/table/table-dynamique.json +0 -67
  978. package/lib/stories/table/table.stories.js +0 -54
  979. package/lib/stories/textarea/data.json +0 -1
  980. package/lib/stories/textarea/source.json +0 -35
  981. package/lib/stories/textarea/textarea.stories.js +0 -34
  982. package/lib/stories/utils/custom-lunatic.scss +0 -28
  983. package/lib/stories/utils/default-arg-types.js +0 -21
  984. package/lib/stories/utils/options.js +0 -28
  985. package/lib/stories/utils/orchestrator.js +0 -319
  986. package/lib/stories/utils/orchestrator.scss +0 -54
  987. package/lib/stories/utils/overview.js +0 -53
  988. package/lib/stories/utils/overview.scss +0 -30
  989. package/lib/stories/utils/referentiel.js +0 -33
  990. package/lib/stories/utils/waiting/index.js +0 -13
  991. package/lib/stories/utils/waiting/preloader.svg +0 -1
  992. package/lib/stories/utils/waiting/waiting.js +0 -32
  993. package/lib/stories/utils/waiting/waiting.scss +0 -21
  994. package/lib/test.d.js +0 -3
  995. package/lib/use-lunatic/commons/fill-components/fill-component-required.js +0 -23
  996. package/lib/use-lunatic/commons/fill-components/fill-component-value.js +0 -46
  997. package/lib/use-lunatic/commons/fill-components/fill-component-value.spec.js +0 -67
  998. package/lib/use-lunatic/commons/fill-components/fill-from-state.js +0 -38
  999. package/lib/use-lunatic/commons/fill-components/fill-iterations.js +0 -45
  1000. package/lib/use-lunatic/commons/fill-components/fill-management.js +0 -22
  1001. package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +0 -29
  1002. package/lib/use-lunatic/commons/fill-components/fill-pagination.js +0 -23
  1003. package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +0 -162
  1004. package/lib/use-lunatic/commons/fill-components/index.js +0 -13
  1005. package/lib/use-lunatic/commons/getOverview.js +0 -39
  1006. package/lib/use-lunatic/commons/use-components-from-state.js +0 -28
  1007. package/lib/use-lunatic/initial-state.js +0 -54
  1008. package/lib/use-lunatic/reducer/index.js +0 -13
  1009. package/lib/use-lunatic/reducer/overview/overview-on-change.js +0 -48
  1010. package/lib/use-lunatic/reducer/overview/overview-on-init.js +0 -106
  1011. package/lib/use-lunatic/reducer/reduce-handle-change.js +0 -29
  1012. package/lib/use-lunatic/reducer/reduce-on-init.js +0 -148
  1013. package/lib/use-lunatic/reducer/reduce-on-set-waiting.js +0 -20
  1014. package/lib/use-lunatic/reducer/reduce-update-state.js +0 -22
  1015. package/lib/use-lunatic/type-source.js +0 -5
  1016. package/lib/use-lunatic/use-lunatic.test.js +0 -352
  1017. package/lib/use-lunatic/use-suggesters.js +0 -178
  1018. package/lib/utils/idb-tools/clear-store.js +0 -39
  1019. package/lib/utils/idb-tools/create-db-opener.js +0 -53
  1020. package/lib/utils/idb-tools/create-open-db.js +0 -28
  1021. package/lib/utils/idb-tools/get-entity.js +0 -20
  1022. package/lib/utils/idb-tools/get-idb.js +0 -12
  1023. package/lib/utils/idb-tools/idb-bulk-insert.js +0 -126
  1024. package/lib/utils/idb-tools/idb-types.js +0 -5
  1025. package/lib/utils/idb-tools/index.js +0 -64
  1026. package/lib/utils/idb-tools/insert-entity.js +0 -20
  1027. package/lib/utils/idb-tools/open-db.js +0 -24
  1028. package/lib/utils/idb-tools/open-or-create-db.js +0 -43
  1029. package/lib/utils/store-tools/clear-store-data.js +0 -32
  1030. package/lib/utils/store-tools/clear-store-info.js +0 -32
  1031. package/lib/utils/store-tools/create/create.js +0 -50
  1032. package/lib/utils/store-tools/create/index.js +0 -20
  1033. package/lib/utils/store-tools/create/update-store-info.js +0 -26
  1034. package/lib/utils/store-tools/get-store-count.js +0 -23
  1035. package/lib/utils/store-tools/index.js +0 -54
  1036. package/lib/utils/store-tools/initStore.js +0 -57
  1037. package/lib/utils/store-tools/open-or-create-store.js +0 -51
  1038. package/lib/utils/store-tools/use-store-index.js +0 -57
  1039. package/lib/utils/suggester-workers/append-to-index/append.js +0 -78
  1040. package/lib/utils/suggester-workers/append-to-index/append.worker.js +0 -32
  1041. package/lib/utils/suggester-workers/append-to-index/create-append-task.js +0 -70
  1042. package/lib/utils/suggester-workers/append-to-index/index.js +0 -20
  1043. package/lib/utils/suggester-workers/append-to-index/prepare-entities.js +0 -87
  1044. package/lib/utils/suggester-workers/append-to-index/store-messages.js +0 -44
  1045. package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +0 -53
  1046. package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +0 -76
  1047. package/lib/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +0 -35
  1048. package/lib/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +0 -20
  1049. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +0 -35
  1050. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.spec.js +0 -15
  1051. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.js +0 -18
  1052. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.spec.js +0 -17
  1053. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.js +0 -24
  1054. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.spec.js +0 -24
  1055. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.js +0 -14
  1056. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.spec.js +0 -24
  1057. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.js +0 -22
  1058. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.spec.js +0 -17
  1059. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +0 -52
  1060. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.spec.js +0 -13
  1061. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +0 -15
  1062. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.spec.js +0 -15
  1063. package/lib/utils/suggester-workers/commons-tokenizer/filters/index.js +0 -20
  1064. package/lib/utils/suggester-workers/commons-tokenizer/filters/stop-words.js +0 -8
  1065. package/lib/utils/suggester-workers/commons-tokenizer/get-regexp-from-pattern.js +0 -13
  1066. package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.js +0 -22
  1067. package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.spec.js +0 -11
  1068. package/lib/utils/suggester-workers/commons-tokenizer/index.js +0 -69
  1069. package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.js +0 -17
  1070. package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.spec.js +0 -10
  1071. package/lib/utils/suggester-workers/commons-tokenizer/soft-tokenizer.js +0 -11
  1072. package/lib/utils/suggester-workers/create-worker.js +0 -60
  1073. package/lib/utils/suggester-workers/find-best-label/find-best-label.js +0 -62
  1074. package/lib/utils/suggester-workers/find-best-label/find-best-label.worker.js +0 -53
  1075. package/lib/utils/suggester-workers/find-best-label/index.js +0 -1
  1076. package/lib/utils/suggester-workers/find-best-label/tokenize.js +0 -44
  1077. package/lib/utils/suggester-workers/find-best-label/tokenize.spec.js +0 -25
  1078. package/lib/utils/suggester-workers/searching/compute-score.js +0 -30
  1079. package/lib/utils/suggester-workers/searching/get-db.js +0 -47
  1080. package/lib/utils/suggester-workers/searching/index.js +0 -13
  1081. package/lib/utils/suggester-workers/searching/meloto-order.js +0 -54
  1082. package/lib/utils/suggester-workers/searching/meloto-order.spec.js +0 -67
  1083. package/lib/utils/suggester-workers/searching/order/create-alphanumeric-orderer.js +0 -27
  1084. package/lib/utils/suggester-workers/searching/order/index.js +0 -24
  1085. package/lib/utils/suggester-workers/searching/query-parser/index.js +0 -20
  1086. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.js +0 -11
  1087. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.spec.js +0 -27
  1088. package/lib/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +0 -34
  1089. package/lib/utils/suggester-workers/searching/resolve-query-parser.js +0 -56
  1090. package/lib/utils/suggester-workers/searching/search-in-index.js +0 -21
  1091. package/lib/utils/suggester-workers/searching/searching.js +0 -150
  1092. package/lib/utils/suggester-workers/searching/searching.worker.js +0 -26
  1093. package/lib/utils/suggester-workers/worker-path.js +0 -29
  1094. package/scripts/build/add-workers-to-public.js +0 -44
  1095. package/scripts/build/workers-paths.js +0 -53
  1096. package/workers-release/lunatic-append-worker-0.3.0.js +0 -2
  1097. package/workers-release/lunatic-append-worker-0.3.0.js.LICENSE.txt +0 -24
  1098. package/workers-release/lunatic-label-worker-0.3.0.js +0 -2
  1099. package/workers-release/lunatic-label-worker-0.3.0.js.LICENSE.txt +0 -13
  1100. package/workers-release/lunatic-search-worker-0.3.0.js +0 -2
  1101. package/workers-release/lunatic-search-worker-0.3.0.js.LICENSE.txt +0 -24
  1102. /package/lib/{src/components → components}/CheckboxBoolean/CheckboxBoolean.spec.d.ts +0 -0
  1103. /package/lib/{src/components → components}/CheckboxGroup/CustomCheckboxGroup.spec.d.ts +0 -0
  1104. /package/lib/{src/components → components}/CheckboxOne/CheckboxOne.spec.d.ts +0 -0
  1105. /package/lib/{src/components → components}/Datepicker/Datepicker.spec.d.ts +0 -0
  1106. /package/lib/{src/components → components}/Datepicker/DatepickerField.d.ts +0 -0
  1107. /package/lib/{src/components → components}/Dropdown/Dropdown.spec.d.ts +0 -0
  1108. /package/lib/{src/components → components}/Dropdown/renderer/SimpleLabelRenderer.d.ts +0 -0
  1109. /package/lib/{src/components → components}/Dropdown/renderer/SimpleOptionRenderer.d.ts +0 -0
  1110. /package/lib/{src/components → components}/Duration/durationUtils.d.ts +0 -0
  1111. /package/lib/{src/components → components}/Duration/formatDuration.d.ts +0 -0
  1112. /package/lib/{src/components → components}/Duration/formatDuration.spec.d.ts +0 -0
  1113. /package/lib/{src/components → components}/Duration/getDurationFromValue.d.ts +0 -0
  1114. /package/lib/{src/components → components}/FilterDescription/FilterDescription.d.ts +0 -0
  1115. /package/lib/{src/components → components}/FilterDescription/FilterDescription.spec.d.ts +0 -0
  1116. /package/lib/{src/components → components}/Input/Input.spec.d.ts +0 -0
  1117. /package/lib/{src/components → components}/InputNumber/InputNumber.spec.d.ts +0 -0
  1118. /package/lib/{src/components → components}/InputNumber/InputNumberThousand.d.ts +0 -0
  1119. /package/lib/{src/components → components}/Loop/constant.d.ts +0 -0
  1120. /package/lib/{src/components → components}/PairwiseLinks/PairwiseLinks.d.ts +0 -0
  1121. /package/lib/{src/components → components}/Question/Question.d.ts +0 -0
  1122. /package/lib/{src/components → components}/RosterForLoop/RosterForLoop.d.ts +0 -0
  1123. /package/lib/{src/components → components}/RosterForLoop/RosterForLoop.spec.d.ts +0 -0
  1124. /package/lib/{src/components → components}/Roundabout/CustomRoundabout.d.ts +0 -0
  1125. /package/lib/{src/components → components}/Roundabout/Roundabout.d.ts +0 -0
  1126. /package/lib/{src/components → components}/Roundabout/RoundaboutItButton.d.ts +0 -0
  1127. /package/lib/{src/components → components}/Roundabout/RoundaboutItButton.spec.d.ts +0 -0
  1128. /package/lib/{src/components → components}/Roundabout/RoundaboutRedirect.d.ts +0 -0
  1129. /package/lib/{src/components → components}/Roundabout/extra.d.ts +0 -0
  1130. /package/lib/{src/components → components}/Roundabout/redirect.spec.d.ts +0 -0
  1131. /package/lib/{src/components → components}/Roundabout/roundabout.spec.d.ts +0 -0
  1132. /package/lib/{src/components → components}/Subsequence/Subsequence.spec.d.ts +0 -0
  1133. /package/lib/{src/components → components}/Suggester/SuggesterType.d.ts +0 -0
  1134. /package/lib/{src/components → components}/Summary/Summary.d.ts +0 -0
  1135. /package/lib/{src/components → components}/Table/Table.d.ts +0 -0
  1136. /package/lib/{src/components → components}/Textarea/Textarea.spec.d.ts +0 -0
  1137. /package/lib/{src/components → components}/shared/Button/Button.spec.d.ts +0 -0
  1138. /package/lib/{src/components → components}/shared/Button/IconButton.d.ts +0 -0
  1139. /package/lib/{src/components → components}/shared/Button/IconButton.spec.d.ts +0 -0
  1140. /package/lib/{src/components → components}/shared/Checkbox/CheckboxOption.spec.d.ts +0 -0
  1141. /package/lib/{src/components → components}/shared/Checkbox/getShortcutKey.d.ts +0 -0
  1142. /package/lib/{src/components → components}/shared/Combobox/Combobox.stories.d.ts +0 -0
  1143. /package/lib/{src/components → components}/shared/Combobox/ComboboxContainer.d.ts +0 -0
  1144. /package/lib/{src/components → components}/shared/Combobox/ComboboxContainer.spec.d.ts +0 -0
  1145. /package/lib/{src/components → components}/shared/Combobox/ComboboxContent.d.ts +0 -0
  1146. /package/lib/{src/components → components}/shared/Combobox/ComboboxContentBox.d.ts +0 -0
  1147. /package/lib/{src/components → components}/shared/Combobox/Panel/ComboboxOption.d.ts +0 -0
  1148. /package/lib/{src/components → components}/shared/Combobox/Panel/ComboboxOption.spec.d.ts +0 -0
  1149. /package/lib/{src/components → components}/shared/Combobox/Panel/ComboboxOptionContainer.d.ts +0 -0
  1150. /package/lib/{src/components → components}/shared/Combobox/Panel/ComboboxOptionContainer.spec.d.ts +0 -0
  1151. /package/lib/{src/components → components}/shared/Combobox/Panel/ComboboxPanel.spec.d.ts +0 -0
  1152. /package/lib/{src/components → components}/shared/Combobox/Panel/ComboboxPanelContainer.d.ts +0 -0
  1153. /package/lib/{src/components → components}/shared/Combobox/Panel/ComboboxPanelContainer.spec.d.ts +0 -0
  1154. /package/lib/{src/components → components}/shared/Combobox/Selection/ComboboxClearButton.spec.d.ts +0 -0
  1155. /package/lib/{src/components → components}/shared/Combobox/Selection/ComboboxInput.d.ts +0 -0
  1156. /package/lib/{src/components → components}/shared/Combobox/Selection/ComboboxLabelSelection.d.ts +0 -0
  1157. /package/lib/{src/components → components}/shared/Combobox/Selection/ComboboxLabelSelection.spec.d.ts +0 -0
  1158. /package/lib/{src/components → components}/shared/Combobox/Selection/ComboboxSelection.d.ts +0 -0
  1159. /package/lib/{src/components → components}/shared/Combobox/Selection/ComboboxSelection.spec.d.ts +0 -0
  1160. /package/lib/{src/components → components}/shared/Combobox/constants.d.ts +0 -0
  1161. /package/lib/{src/components → components}/shared/Combobox/index.d.ts +0 -0
  1162. /package/lib/{src/components → components}/shared/ComponentErrors/ComponentErrors.d.ts +0 -0
  1163. /package/lib/{src/components → components}/shared/ComponentErrors/ComponentErrors.spec.d.ts +0 -0
  1164. /package/lib/{src/components → components}/shared/Declarations/Declarations.d.ts +0 -0
  1165. /package/lib/{src/components → components}/shared/Declarations/Declarations.spec.d.ts +0 -0
  1166. /package/lib/{src/components → components}/shared/Fieldset/Fieldset.d.ts +0 -0
  1167. /package/lib/{src/components → components}/shared/Fieldset/Fieldset.spec.d.ts +0 -0
  1168. /package/lib/{src/components → components}/shared/Icons/checkbox-checked-icon.d.ts +0 -0
  1169. /package/lib/{src/components → components}/shared/Icons/checkbox-unchecked-icon.d.ts +0 -0
  1170. /package/lib/{src/components → components}/shared/Icons/closed-icon.d.ts +0 -0
  1171. /package/lib/{src/components → components}/shared/Icons/cross-icon.d.ts +0 -0
  1172. /package/lib/{src/components → components}/shared/Icons/icon-props.d.ts +0 -0
  1173. /package/lib/{src/components → components}/shared/Icons/index.d.ts +0 -0
  1174. /package/lib/{src/components → components}/shared/Icons/load-icon.d.ts +0 -0
  1175. /package/lib/{src/components → components}/shared/Icons/lunatic-icon.d.ts +0 -0
  1176. /package/lib/{src/components → components}/shared/Icons/network-icon.d.ts +0 -0
  1177. /package/lib/{src/components → components}/shared/Icons/on-drag-icon.d.ts +0 -0
  1178. /package/lib/{src/components → components}/shared/Icons/opened-icon.d.ts +0 -0
  1179. /package/lib/{src/components → components}/shared/Icons/radio-checked-icon.d.ts +0 -0
  1180. /package/lib/{src/components → components}/shared/Icons/radio-unchecked-icon.d.ts +0 -0
  1181. /package/lib/{src/components → components}/shared/Label/Label.d.ts +0 -0
  1182. /package/lib/{src/components → components}/shared/Label/Label.spec.d.ts +0 -0
  1183. /package/lib/{src/components → components}/shared/LabelDescription.d.ts +0 -0
  1184. /package/lib/{src/components → components}/shared/MDLabel/MDLabel.spec.d.ts +0 -0
  1185. /package/lib/{src/components → components}/shared/MDLabel/MDLabelLink.d.ts +0 -0
  1186. /package/lib/{src/components → components}/shared/MDLabel/RouterLink.d.ts +0 -0
  1187. /package/lib/{src/components → components}/shared/MDLabel/generateUniqueId.d.ts +0 -0
  1188. /package/lib/{src/components → components}/shared/Missing/Missing.spec.d.ts +0 -0
  1189. /package/lib/{src/components → components}/shared/ModalControls/ModalControls.spec.d.ts +0 -0
  1190. /package/lib/{src/components → components}/shared/Notification.d.ts +0 -0
  1191. /package/lib/{src/components → components}/shared/Radio/RadioOption.d.ts +0 -0
  1192. /package/lib/{src/components → components}/shared/Radio/RadioOption.spec.d.ts +0 -0
  1193. /package/lib/{src/components → components}/shared/Table/Table.d.ts +0 -0
  1194. /package/lib/{src/components → components}/shared/Table/Table.spec.d.ts +0 -0
  1195. /package/lib/{src/components → components}/shared/Table/Tbody.spec.d.ts +0 -0
  1196. /package/lib/{src/components → components}/shared/Table/Td.spec.d.ts +0 -0
  1197. /package/lib/{src/components → components}/shared/Table/Th.spec.d.ts +0 -0
  1198. /package/lib/{src/components → components}/shared/Table/Thead.spec.d.ts +0 -0
  1199. /package/lib/{src/components → components}/shared/Table/Tr.spec.d.ts +0 -0
  1200. /package/lib/{src/components → components}/shared/Table/index.d.ts +0 -0
  1201. /package/lib/{src/constants → constants}/component-types.d.ts +0 -0
  1202. /package/lib/{src/constants → constants}/declarations.d.ts +0 -0
  1203. /package/lib/{src/constants → constants}/event-types.d.ts +0 -0
  1204. /package/lib/{src/constants → constants}/index.d.ts +0 -0
  1205. /package/lib/{src/constants → constants}/indexedDBStore.d.ts +0 -0
  1206. /package/lib/{src/constants → constants}/supported-preferences.d.ts +0 -0
  1207. /package/lib/{src/constants → constants}/value-types.d.ts +0 -0
  1208. /package/lib/{src/constants → constants}/variable-types.d.ts +0 -0
  1209. /package/lib/{src/hooks → hooks}/use-auto-focus.d.ts +0 -0
  1210. /package/lib/{src/hooks → hooks}/use-why-render.d.ts +0 -0
  1211. /package/lib/{src/hooks → hooks}/useDocumentEvent.d.ts +0 -0
  1212. /package/lib/{src/hooks → hooks}/useListKeyboardHandler.d.ts +0 -0
  1213. /package/lib/{src/hooks/use-ref-sync.d.ts → hooks/useRefSync.d.ts} +0 -0
  1214. /package/lib/{src/i18n → i18n}/build-dictionary.d.ts +0 -0
  1215. /package/lib/{src/i18n → i18n}/inputNumberProps.d.ts +0 -0
  1216. /package/lib/{components/Suggester/icons → icons}/alert-icon.svg +0 -0
  1217. /package/lib/{components/Suggester/icons → icons}/wait-icon.svg +0 -0
  1218. /package/lib/{components/Suggester/icons → icons}/warn-icon.svg +0 -0
  1219. /package/lib/{src/type.utils.d.ts → type.utils.d.ts} +0 -0
  1220. /package/lib/{src/use-lunatic → use-lunatic}/commons/component.d.ts +0 -0
  1221. /package/lib/{src/use-lunatic → use-lunatic}/commons/fill-components/fill-component-expressions.spec.d.ts +0 -0
  1222. /package/lib/{src/use-lunatic → use-lunatic}/commons/get-compatible-vtl-expression.d.ts +0 -0
  1223. /package/lib/{src/use-lunatic → use-lunatic}/commons/is-paginated-loop.d.ts +0 -0
  1224. /package/lib/{src/use-lunatic → use-lunatic}/commons/is-roundabout.d.ts +0 -0
  1225. /package/lib/{src/use-lunatic → use-lunatic}/commons/page-navigation.spec.d.ts +0 -0
  1226. /package/lib/{src/components/shared/VariableStatus/VariableStatus.spec.d.ts → use-lunatic/commons/page-tag.spec.d.ts} +0 -0
  1227. /package/lib/{src/use-lunatic → use-lunatic}/commons/variables/lunatic-variables-store.spec.d.ts +0 -0
  1228. /package/lib/{src/use-lunatic → use-lunatic}/index.d.ts +0 -0
  1229. /package/lib/{src/use-lunatic → use-lunatic}/lunatic-context.d.ts +0 -0
  1230. /package/lib/{src/components/shared/suggester-loader-widget/dragger/dragger.spec.d.ts → use-lunatic/props/propValue.spec.d.ts} +0 -0
  1231. /package/lib/{src/use-lunatic → use-lunatic}/reducer/commons/index.d.ts +0 -0
  1232. /package/lib/{src/use-lunatic → use-lunatic}/reducer/commons/resize-array-variable.d.ts +0 -0
  1233. /package/lib/{src/utils → utils}/array.spec.d.ts +0 -0
  1234. /package/lib/{src/utils → utils}/constants/alphabet.d.ts +0 -0
  1235. /package/lib/{src/utils → utils}/constants/index.d.ts +0 -0
  1236. /package/lib/{src/utils → utils}/constants/links.d.ts +0 -0
  1237. /package/lib/{src/utils → utils}/constants/missing.d.ts +0 -0
  1238. /package/lib/{src/utils → utils}/constants/variable-status.d.ts +0 -0
  1239. /package/lib/{src/utils → utils}/constants/variable-types.d.ts +0 -0
  1240. /package/lib/{src/utils → utils}/dom.d.ts +0 -0
  1241. /package/lib/{src/utils → utils}/env.d.ts +0 -0
  1242. /package/lib/{src/utils → utils}/is-element.d.ts +0 -0
  1243. /package/lib/{src/utils → utils}/is-object.d.ts +0 -0
  1244. /package/lib/{src/utils → utils}/logger.d.ts +0 -0
  1245. /package/lib/{src/utils → utils}/number.d.ts +0 -0
  1246. /package/lib/{src/utils → utils}/number.spec.d.ts +0 -0
  1247. /package/lib/{src/utils → utils}/to-number.d.ts +0 -0
  1248. /package/lib/{src/utils → utils}/variables.spec.d.ts +0 -0
  1249. /package/lib/{src/utils → utils}/vtl.d.ts +0 -0
@@ -1,36 +1,20 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _actions = require("../actions");
8
- var _reduceGoNextPage = require("./reduce-go-next-page");
9
- var _reduceGoPreviousPage = _interopRequireDefault(require("./reduce-go-previous-page"));
10
- var _reduceGoToPage = _interopRequireDefault(require("./reduce-go-to-page"));
11
- var _reduceHandleChange = require("./reduce-handle-change");
12
- var _reduceOnInit = _interopRequireDefault(require("./reduce-on-init"));
13
- var _reduceOnSetWaiting = _interopRequireDefault(require("./reduce-on-set-waiting"));
14
- var _reduceUpdateState = require("./reduce-update-state");
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
16
- function reducer(state, action) {
17
- switch (action.type) {
18
- case _actions.ActionKind.ON_INIT:
19
- return (0, _reduceOnInit["default"])(state, action);
20
- case _actions.ActionKind.GO_PREVIOUS_PAGE:
21
- return (0, _reduceGoPreviousPage["default"])(state);
22
- case _actions.ActionKind.GO_NEXT_PAGE:
23
- return (0, _reduceGoNextPage.reduceGoNextPage)(state);
24
- case _actions.ActionKind.GO_TO_PAGE:
25
- return (0, _reduceGoToPage["default"])(state, action);
26
- case _actions.ActionKind.HANDLE_CHANGE:
27
- return (0, _reduceHandleChange.reduceHandleChange)(state, action);
28
- case _actions.ActionKind.ON_SET_WAITING:
29
- return (0, _reduceOnSetWaiting["default"])(state, action);
30
- case _actions.ActionKind.UPDATE_STATE:
31
- return (0, _reduceUpdateState.reduceUpdateState)(state, action);
32
- default:
33
- return state;
34
- }
1
+ import { ActionKind } from '../actions';
2
+ import { reduceGoNextPage } from './reduce-go-next-page';
3
+ import { reduceHandleChanges } from './reduce-handle-changes';
4
+ import { reduceGoPreviousPage } from './reduce-go-previous-page';
5
+ import { reduceGoToPage } from './reduce-go-to-page';
6
+ export function reducer(state, action) {
7
+ switch (action.type) {
8
+ case ActionKind.GO_PREVIOUS_PAGE:
9
+ return reduceGoPreviousPage(state);
10
+ case ActionKind.GO_NEXT_PAGE:
11
+ return reduceGoNextPage(state);
12
+ case ActionKind.GO_TO_PAGE:
13
+ return reduceGoToPage(state, action);
14
+ case ActionKind.HANDLE_CHANGES:
15
+ return reduceHandleChanges(state, action);
16
+ default:
17
+ return state;
18
+ }
35
19
  }
36
- var _default = exports["default"] = reducer;
20
+ //# sourceMappingURL=reducer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducer.js","sourceRoot":"","sources":["../../../src/use-lunatic/reducer/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,UAAU,OAAO,CACtB,KAA0B,EAC1B,MAAc;IAEd,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,UAAU,CAAC,gBAAgB;YAC/B,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACpC,KAAK,UAAU,CAAC,YAAY;YAC3B,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAChC,KAAK,UAAU,CAAC,UAAU;YACzB,OAAO,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACtC,KAAK,UAAU,CAAC,cAAc;YAC7B,OAAO,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC3C;YACC,OAAO,KAAK,CAAC;IACf,CAAC;AACF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { LunaticSource } from '../type';
2
+ import type { LunaticData, LunaticOptions, LunaticReducerState } from '../type';
3
+ export declare function reducerInitializer({ source, data, features, initialPage, lastReachedPage, withOverview, getReferentiel, }: {
4
+ source: LunaticSource;
5
+ data: LunaticData;
6
+ features?: LunaticOptions['features'];
7
+ initialPage?: LunaticOptions['initialPage'];
8
+ lastReachedPage?: LunaticOptions['lastReachedPage'];
9
+ withOverview?: LunaticOptions['withOverview'];
10
+ getReferentiel?: LunaticOptions['getReferentiel'];
11
+ }): LunaticReducerState;
@@ -0,0 +1,121 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LunaticVariablesStore } from '../commons/variables/lunatic-variables-store';
3
+ import { checkLoops, createMapPages } from '../commons';
4
+ import { getExpressionAsString, getExpressionType } from '../../utils/vtl';
5
+ import { MD, VTL } from '../../utils/constants';
6
+ import { MDLabel } from '../../components/shared/MDLabel/MDLabel';
7
+ import { getPagerFromPageTag } from '../commons/page-tag';
8
+ import { buildOverview } from './overview/overviewOnInit';
9
+ import { forceInt } from '../../utils/number';
10
+ import { registerSuggesters } from '../../utils/search/SuggestersDatabase';
11
+ const baseState = {
12
+ variables: new LunaticVariablesStore(),
13
+ pager: {
14
+ page: 1,
15
+ maxPage: 1,
16
+ subPage: undefined,
17
+ nbSubPages: undefined,
18
+ iteration: undefined,
19
+ shallowIteration: undefined,
20
+ nbIterations: undefined,
21
+ },
22
+ pages: {},
23
+ isInLoop: false,
24
+ updatedAt: Date.now(),
25
+ overview: [],
26
+ updateBindings: () => { },
27
+ executeExpression: () => null,
28
+ };
29
+ export function reducerInitializer({ source, data, features = ['VTL'], initialPage = '1', lastReachedPage = undefined, withOverview = false, getReferentiel, }) {
30
+ const variables = LunaticVariablesStore.makeFromSource(source, data);
31
+ const pages = checkLoops(createMapPages(source));
32
+ if (!source || !data) {
33
+ return baseState;
34
+ }
35
+ // Register suggesters
36
+ if (getReferentiel && source.suggesters) {
37
+ registerSuggesters(source.suggesters, getReferentiel);
38
+ }
39
+ const executeExpression = (expression, args = {}) => {
40
+ // This is kept to ensure backward compatibility
41
+ if (args?.bindingDependencies) {
42
+ args.deps = args.bindingDependencies;
43
+ }
44
+ // Remove above code on next update
45
+ const expressionType = getExpressionType(expression);
46
+ const expressionString = getExpressionAsString(expression);
47
+ // If VTL is not supported, or the expression does not use VTL, return the uninterpreted value
48
+ if (!features?.includes(VTL) || !expressionType.includes(VTL)) {
49
+ return expressionString;
50
+ }
51
+ try {
52
+ const result = variables.run(expressionString, {
53
+ ...args,
54
+ iteration: typeof args.iteration === 'number'
55
+ ? [args.iteration]
56
+ : args.iteration,
57
+ });
58
+ if (features.includes(MD) &&
59
+ expressionType.includes(MD) &&
60
+ typeof result === 'string') {
61
+ return _jsx(MDLabel, { expression: result });
62
+ }
63
+ return result;
64
+ }
65
+ catch (e) {
66
+ // If there is an error interpreting a variable, return the raw expression
67
+ console.error(`Cannot interpret expression : ${expressionString}`, e);
68
+ return expressionString;
69
+ }
70
+ };
71
+ const updateBindings = (variableName, value, options) => {
72
+ variables.set(variableName, value, options);
73
+ };
74
+ const initialPager = getPagerFromPageTag(initialPage);
75
+ const pager = {
76
+ page: initialPager?.page ?? 1,
77
+ maxPage: source.maxPage ? parseInt(source.maxPage, 10) : 1,
78
+ subPage: undefined,
79
+ nbSubPages: undefined,
80
+ iteration: undefined,
81
+ nbIterations: undefined,
82
+ lastReachedPage: lastReachedPage ?? initialPage,
83
+ };
84
+ return fillPagerForLoop({
85
+ variables,
86
+ pager,
87
+ pages,
88
+ isInLoop: false,
89
+ updatedAt: Date.now(),
90
+ overview: withOverview ? buildOverview(source) : [],
91
+ updateBindings,
92
+ executeExpression,
93
+ });
94
+ }
95
+ /**
96
+ * Check if there is a loop and populate the pager accordingly
97
+ **/
98
+ function fillPagerForLoop(state) {
99
+ const { pager, pages } = state;
100
+ if (!(pager.page in pages)) {
101
+ return state;
102
+ }
103
+ const { isLoop, subPages, iterations, loopDependencies } = pages[pager.page];
104
+ if (!isLoop) {
105
+ return state;
106
+ }
107
+ return {
108
+ ...state,
109
+ isInLoop: true,
110
+ pager: {
111
+ ...pager,
112
+ subPage: pager?.subPage ?? 0,
113
+ nbSubPages: (subPages ?? []).length,
114
+ iteration: pager?.iteration ?? 0,
115
+ nbIterations: forceInt(state.executeExpression(iterations, {
116
+ deps: loopDependencies,
117
+ })),
118
+ },
119
+ };
120
+ }
121
+ //# sourceMappingURL=reducerInitializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reducerInitializer.js","sourceRoot":"","sources":["../../../src/use-lunatic/reducer/reducerInitializer.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,SAAS,GAAG;IACjB,SAAS,EAAE,IAAI,qBAAqB,EAAE;IACtC,KAAK,EAAE;QACN,IAAI,EAAE,CAAC;QACP,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,SAAS;QACpB,gBAAgB,EAAE,SAAS;QAC3B,YAAY,EAAE,SAAS;KACvB;IACD,KAAK,EAAE,EAAE;IACT,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;IACrB,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;IACxB,iBAAiB,EAAE,GAAO,EAAE,CAAC,IAAS;CACR,CAAC;AAEhC,MAAM,UAAU,kBAAkB,CAAC,EAClC,MAAM,EACN,IAAI,EACJ,QAAQ,GAAG,CAAC,KAAK,CAAC,EAClB,WAAW,GAAG,GAAG,EACjB,eAAe,GAAG,SAAS,EAC3B,YAAY,GAAG,KAAK,EACpB,cAAc,GASd;IACA,MAAM,SAAS,GAAG,qBAAqB,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACrE,MAAM,KAAK,GAAG,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAEjD,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,sBAAsB;IACtB,IAAI,cAAc,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACzC,kBAAkB,CAAC,MAAM,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,iBAAiB,GAA6C,CACnE,UAAU,EACV,IAAI,GAAG,EAAE,EACR,EAAE;QACH,gDAAgD;QAChD,IAAI,IAAI,EAAE,mBAAmB,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,mBAAmB,CAAC;QACtC,CAAC;QACD,mCAAmC;QACnC,MAAM,cAAc,GAAG,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACrD,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAC3D,8FAA8F;QAC9F,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/D,OAAO,gBAAgB,CAAC;QACzB,CAAC;QACD,IAAI,CAAC;YACJ,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,gBAAgB,EAAE;gBAC9C,GAAG,IAAI;gBACP,SAAS,EACR,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ;oBACjC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;oBAClB,CAAC,CAAC,IAAI,CAAC,SAAS;aAClB,CAAC,CAAC;YACH,IACC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACrB,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC3B,OAAO,MAAM,KAAK,QAAQ,EACzB,CAAC;gBACF,OAAO,KAAC,OAAO,IAAC,UAAU,EAAE,MAAM,GAAI,CAAC;YACxC,CAAC;YACD,OAAO,MAAa,CAAC;QACtB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,0EAA0E;YAC1E,OAAO,CAAC,KAAK,CAAC,iCAAiC,gBAAgB,EAAE,EAAE,CAAC,CAAC,CAAC;YACtE,OAAO,gBAAgB,CAAC;QACzB,CAAC;IACF,CAAC,CAAC;IAEF,MAAM,cAAc,GAA0C,CAC7D,YAAY,EACZ,KAAK,EACL,OAAO,EACN,EAAE;QACH,SAAS,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;IACtD,MAAM,KAAK,GAAG;QACb,IAAI,EAAE,YAAY,EAAE,IAAI,IAAI,CAAC;QAC7B,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,SAAS;QACpB,YAAY,EAAE,SAAS;QACvB,eAAe,EAAE,eAAe,IAAI,WAAW;KAC/C,CAAC;IAEF,OAAO,gBAAgB,CAAC;QACvB,SAAS;QACT,KAAK;QACL,KAAK;QACL,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;QACnD,cAAc;QACd,iBAAiB;KACjB,CAAC,CAAC;AACJ,CAAC;AAED;;IAEI;AACJ,SAAS,gBAAgB,CAAC,KAA0B;IACnD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC/B,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7E,IAAI,CAAC,MAAM,EAAE,CAAC;QACb,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO;QACN,GAAG,KAAK;QACR,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE;YACN,GAAG,KAAK;YACR,OAAO,EAAE,KAAK,EAAE,OAAO,IAAI,CAAC;YAC5B,UAAU,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,MAAM;YACnC,SAAS,EAAE,KAAK,EAAE,SAAS,IAAI,CAAC;YAChC,YAAY,EAAE,QAAQ,CACrB,KAAK,CAAC,iBAAiB,CAAC,UAAU,EAAE;gBACnC,IAAI,EAAE,gBAAgB;aACtB,CAAC,CACF;SACD;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { LunaticComponentDefinition } from './type';
2
+ /**
3
+ * Pour le Question : les composants du fieldset n'existe pas dans pages.
4
+ * Ils échappent donc aux controls. On les substitue ici au Question.
5
+ * On ne peut pas les ajouter directement dans pages (en spécifiant un page), car ils s'afficheraient 2 fois : dans le fieldset et en dessus, comme
6
+ * des composant à part entière.
7
+ * D'autres composant pourraient un jour figurer ici.
8
+ */
9
+ export declare function replaceComponentSequence(components: Array<LunaticComponentDefinition>): LunaticComponentDefinition[];
@@ -1,15 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.replaceComponentSequence = replaceComponentSequence;
7
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
- 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."); }
9
- 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); }
10
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
- 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; }
13
1
  /**
14
2
  * Pour le Question : les composants du fieldset n'existe pas dans pages.
15
3
  * Ils échappent donc aux controls. On les substitue ici au Question.
@@ -17,14 +5,15 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
17
5
  * des composant à part entière.
18
6
  * D'autres composant pourraient un jour figurer ici.
19
7
  */
20
- function replaceComponentSequence(components) {
21
- return components.reduce(function (acc, component) {
22
- var componentType = component.componentType;
23
- switch (componentType) {
24
- case 'Question':
25
- return [].concat(_toConsumableArray(acc), _toConsumableArray(component.components));
26
- default:
27
- return [].concat(_toConsumableArray(acc), [component]);
28
- }
29
- }, []);
30
- }
8
+ export function replaceComponentSequence(components) {
9
+ return components.reduce(function (acc, component) {
10
+ const { componentType } = component;
11
+ switch (componentType) {
12
+ case 'Question':
13
+ return [...acc, ...component.components];
14
+ default:
15
+ return [...acc, component];
16
+ }
17
+ }, []);
18
+ }
19
+ //# sourceMappingURL=replace-component-sequence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-component-sequence.js","sourceRoot":"","sources":["../../src/use-lunatic/replace-component-sequence.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACvC,UAA6C;IAE7C,OAAO,UAAU,CAAC,MAAM,CAAC,UACxB,GAAsC,EACtC,SAAS;QAET,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;QACpC,QAAQ,aAAa,EAAE,CAAC;YACvB,KAAK,UAAU;gBACd,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;YAC1C;gBACC,OAAO,CAAC,GAAG,GAAG,EAAE,SAAS,CAAC,CAAC;QAC7B,CAAC;IACF,CAAC,EAAE,EAAE,CAAC,CAAC;AACR,CAAC"}
@@ -0,0 +1,165 @@
1
+ import type { FunctionComponent, PropsWithChildren, ReactNode } from 'react';
2
+ import type { ComponentDefinition, ControlDefinition, LunaticSource, SuggesterDefinition, Variable, VTLExpression, VTLScalarExpression } from '../type.source';
3
+ import type { LunaticVariablesStore } from './commons/variables/lunatic-variables-store';
4
+ import type { IndexEntry } from '../utils/search/SearchInterface';
5
+ import type { InterpretedLunaticOverviewItem } from './hooks/useOverview';
6
+ import type { LunaticComponentProps } from '../components/type';
7
+ export type { LunaticSource } from '../type.source';
8
+ export type LunaticComponentDefinition<T extends string = string> = ComponentDefinition & {
9
+ componentType: T;
10
+ page?: string;
11
+ };
12
+ export type LunaticControl = ControlDefinition;
13
+ export type LunaticOverviewItem = {
14
+ id: string;
15
+ pageTag: string;
16
+ page: number;
17
+ label: LunaticExpression;
18
+ description: LunaticExpression | undefined;
19
+ type: string;
20
+ conditionFilter?: LunaticExpression;
21
+ iterations?: LunaticExpression;
22
+ };
23
+ export type LunaticSuggester = SuggesterDefinition;
24
+ export type LunaticData = Partial<Record<Exclude<VariableType, 'COLLECTED'>, Record<string, unknown>> & {
25
+ COLLECTED: Record<string, LunaticCollectedValue>;
26
+ }>;
27
+ export type LunaticValues = {
28
+ [variableName: string]: unknown;
29
+ };
30
+ export type LunaticError = Pick<ControlDefinition, 'id' | 'criticality' | 'typeOfControl'> & {
31
+ errorMessage: ReactNode;
32
+ };
33
+ export type VariableType = 'COLLECTED' | 'EXTERNAL' | 'CALCULATED';
34
+ export type LunaticExpression = VTLExpression | VTLScalarExpression;
35
+ export type PageTag = `${number}.${number}#${number}` | `${number}`;
36
+ export type LunaticVariable = Variable;
37
+ export type LunaticCollectedValue = Partial<{
38
+ COLLECTED: unknown;
39
+ EDITED: unknown;
40
+ FORCED: unknown;
41
+ INPUTTED: unknown;
42
+ PREVIOUS: unknown;
43
+ }>;
44
+ export type LunaticStateVariable = {
45
+ [key in LunaticVariable['variableType']]: {
46
+ type: key;
47
+ value: unknown;
48
+ variable: LunaticVariable & {
49
+ variableType: key;
50
+ };
51
+ CalculatedLinked?: LunaticVariable[];
52
+ };
53
+ }[LunaticVariable['variableType']];
54
+ export type LunaticPager = {
55
+ lastReachedPage?: PageTag;
56
+ maxPage: number;
57
+ nbSubPages?: number;
58
+ page: number;
59
+ subPage?: number;
60
+ iteration?: number;
61
+ nbIterations?: number;
62
+ shallowIteration?: number;
63
+ linksIterations?: number[];
64
+ };
65
+ export type LunaticReducerState = {
66
+ variables: LunaticVariablesStore;
67
+ overview: LunaticOverviewItem[];
68
+ pager: LunaticPager;
69
+ pages: {
70
+ [key: number | string]: {
71
+ components: LunaticSource['components'];
72
+ isLoop: false;
73
+ iterations?: undefined;
74
+ loopDependencies?: undefined;
75
+ subPages?: undefined;
76
+ } | {
77
+ components: LunaticSource['components'];
78
+ isLoop: true;
79
+ iterations: VTLScalarExpression;
80
+ loopDependencies: string[];
81
+ subPages: string[];
82
+ };
83
+ };
84
+ executeExpression: <T extends unknown = unknown>(expression: VTLExpression, args?: {
85
+ iteration?: number | number[];
86
+ bindingDependencies?: string[];
87
+ deps?: string[];
88
+ }) => T;
89
+ isInLoop: boolean;
90
+ updatedAt: number;
91
+ updateBindings: (variableName: string, value: unknown, options: {
92
+ iteration?: number[];
93
+ }) => unknown;
94
+ };
95
+ export type LunaticOptions = {
96
+ features?: ('MD' | 'VTL')[];
97
+ preferences?: ['COLLECTED'];
98
+ savingType?: 'COLLECTED';
99
+ onChange?: LunaticChangesHandler;
100
+ management?: boolean;
101
+ shortcut?: boolean;
102
+ initialPage?: PageTag;
103
+ lastReachedPage?: PageTag;
104
+ autoSuggesterLoading?: boolean;
105
+ getReferentiel?: (name: string) => Promise<Array<IndexEntry>>;
106
+ activeControls?: boolean;
107
+ withOverview?: boolean;
108
+ missing?: boolean;
109
+ missingStrategy?: () => void;
110
+ missingShortcut?: {
111
+ dontKnow: string;
112
+ refused: string;
113
+ };
114
+ dontKnowButton?: string;
115
+ refusedButton?: string;
116
+ trackChanges?: boolean;
117
+ };
118
+ export type LunaticState = {
119
+ pager: LunaticPager;
120
+ overview: InterpretedLunaticOverviewItem[];
121
+ pageTag: PageTag;
122
+ updatedAt: number;
123
+ Provider: FunctionComponent<PropsWithChildren>;
124
+ isInLoop: boolean;
125
+ loopVariables: string[];
126
+ isFirstPage: boolean;
127
+ isLastPage: boolean;
128
+ errors?: {
129
+ [page: string]: {
130
+ [id: string]: LunaticError[];
131
+ };
132
+ };
133
+ currentErrors?: {
134
+ [id: string]: LunaticError[];
135
+ };
136
+ modalErrors?: Record<string, LunaticError[]>;
137
+ goToPage: (page: {
138
+ page: PageTag | number;
139
+ iteration?: number;
140
+ nbIterations?: number;
141
+ subPage?: number;
142
+ }) => void;
143
+ goNextPage: () => void;
144
+ goPreviousPage: () => void;
145
+ compileControls: () => {
146
+ currentErrors: Record<string, LunaticError[]> | undefined;
147
+ isCritical: boolean;
148
+ };
149
+ getComponents: (params?: {
150
+ only?: LunaticComponentProps['componentType'];
151
+ except?: LunaticComponentProps['componentType'];
152
+ }) => LunaticComponentProps[];
153
+ getData: (withRefreshedCalculated: boolean, variableNames?: string[]) => LunaticData;
154
+ getChangedData: (reset: boolean) => LunaticData;
155
+ resetChangedData: () => void;
156
+ hasPageResponse: () => boolean;
157
+ testing: {
158
+ handleChanges: LunaticChangesHandler;
159
+ };
160
+ };
161
+ export type LunaticChangesHandler = (args: {
162
+ name: string;
163
+ value: any;
164
+ iteration?: number[];
165
+ }[]) => void;
@@ -1,5 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/use-lunatic/type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,56 @@
1
+ /// <reference types="react" />
2
+ import type { LunaticChangesHandler, LunaticData, LunaticOptions, PageTag } from './type';
3
+ import type { LunaticSource } from './type';
4
+ declare function useLunatic(source: LunaticSource, data?: LunaticData, argOptions?: LunaticOptions): {
5
+ pageTag: PageTag;
6
+ isFirstPage: boolean;
7
+ isLastPage: boolean;
8
+ updatedAt: number;
9
+ pager: import("./type").LunaticPager;
10
+ isInLoop: boolean;
11
+ overview: import("./hooks/useOverview").InterpretedLunaticOverviewItem[];
12
+ loopVariables: string[];
13
+ getComponents: (params?: {
14
+ only?: "Input" | "Textarea" | "Sequence" | "Subsequence" | "Roundabout" | "Loop" | "RosterForLoop" | "Table" | "InputNumber" | "Duration" | "Datepicker" | "CheckboxGroup" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Question" | "CheckboxOne" | "Suggester" | "PairwiseLinks" | "Summary" | "Text" | "Switch" | "FilterDescription" | undefined;
15
+ except?: "Input" | "Textarea" | "Sequence" | "Subsequence" | "Roundabout" | "Loop" | "RosterForLoop" | "Table" | "InputNumber" | "Duration" | "Datepicker" | "CheckboxGroup" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Question" | "CheckboxOne" | "Suggester" | "PairwiseLinks" | "Summary" | "Text" | "Switch" | "FilterDescription" | undefined;
16
+ } | undefined) => import("..").LunaticComponentProps[];
17
+ goPreviousPage: () => void;
18
+ goNextPage: () => void;
19
+ goToPage: (page: {
20
+ page: number | PageTag;
21
+ iteration?: number | undefined;
22
+ nbIterations?: number | undefined;
23
+ subPage?: number | undefined;
24
+ }) => void;
25
+ compileControls: () => {
26
+ currentErrors: Record<string, import("./type").LunaticError[]> | undefined;
27
+ isCritical: boolean;
28
+ };
29
+ getData: (withRefreshedCalculated: boolean, variableNames?: string[] | undefined) => Partial<Record<"EXTERNAL" | "CALCULATED", Record<string, unknown>> & {
30
+ COLLECTED: Record<string, Partial<{
31
+ COLLECTED: unknown;
32
+ EDITED: unknown;
33
+ FORCED: unknown;
34
+ INPUTTED: unknown;
35
+ PREVIOUS: unknown;
36
+ }>>;
37
+ }>;
38
+ getChangedData: (reset?: boolean) => Partial<Record<"EXTERNAL" | "CALCULATED", Record<string, unknown>> & {
39
+ COLLECTED: Record<string, Partial<{
40
+ COLLECTED: unknown;
41
+ EDITED: unknown;
42
+ FORCED: unknown;
43
+ INPUTTED: unknown;
44
+ PREVIOUS: unknown;
45
+ }>>;
46
+ }>;
47
+ resetChangedData: () => void;
48
+ hasPageResponse: () => boolean;
49
+ Provider: import("react").FunctionComponent<{
50
+ children?: import("react").ReactNode;
51
+ }>;
52
+ testing: {
53
+ handleChanges: LunaticChangesHandler;
54
+ };
55
+ };
56
+ export default useLunatic;