@inseefr/lunatic 2.6.10 → 2.6.11

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 (381) hide show
  1. package/lib/components/button/lunatic-button.js +1 -2
  2. package/lib/components/checkbox/checkbox-boolean/html/checkbox-boolean.js +1 -2
  3. package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +1 -2
  4. package/lib/components/checkbox/checkbox-group/checkbox-group-content.js +1 -2
  5. package/lib/components/checkbox/checkbox-group/html/checkbox-group-content.js +1 -2
  6. package/lib/components/checkbox/checkbox-group/html/checkbox-group.js +1 -2
  7. package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +1 -2
  8. package/lib/components/checkbox/checkbox-one/html/checkbox-one.js +1 -2
  9. package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +1 -2
  10. package/lib/components/checkbox/commons/checkbox-option.js +1 -2
  11. package/lib/components/checkbox/commons/checkbox-option.spec.js +5 -5
  12. package/lib/components/checkbox/commons/getShortcutKey.js +2 -3
  13. package/lib/components/commons/components/combo-box/combo-box-container.js +1 -2
  14. package/lib/components/commons/components/combo-box/combo-box-content-box.js +1 -2
  15. package/lib/components/commons/components/combo-box/combo-box-content.js +5 -7
  16. package/lib/components/commons/components/combo-box/combo-box.js +4 -5
  17. package/lib/components/commons/components/combo-box/combo-box.stories.js +11 -14
  18. package/lib/components/commons/components/combo-box/keyboard-key-codes.js +2 -3
  19. package/lib/components/commons/components/combo-box/panel/combo-box-option.js +1 -2
  20. package/lib/components/commons/components/combo-box/panel/option-container.spec.js +5 -5
  21. package/lib/components/commons/components/combo-box/panel/panel-container.js +1 -2
  22. package/lib/components/commons/components/combo-box/selection/clear-button.js +1 -2
  23. package/lib/components/commons/components/combo-box/selection/combo-box-label-selection.js +1 -2
  24. package/lib/components/commons/components/combo-box/selection/input.js +4 -5
  25. package/lib/components/commons/components/combo-box/selection/label-selection.js +1 -2
  26. package/lib/components/commons/components/combo-box/selection/selection-container.js +1 -2
  27. package/lib/components/commons/components/combo-box/selection/selection.js +1 -1
  28. package/lib/components/commons/components/description.js +2 -4
  29. package/lib/components/commons/components/dragger/dragger.js +5 -6
  30. package/lib/components/commons/components/errors/errors.js +2 -3
  31. package/lib/components/commons/components/errors/errors.spec.js +3 -3
  32. package/lib/components/commons/components/fab/fab.js +1 -2
  33. package/lib/components/commons/components/field-container/field-container.js +1 -2
  34. package/lib/components/commons/components/fieldset.js +1 -2
  35. package/lib/components/commons/components/html-table/table.js +1 -2
  36. package/lib/components/commons/components/html-table/tbody.js +1 -2
  37. package/lib/components/commons/components/html-table/td.js +1 -2
  38. package/lib/components/commons/components/html-table/th.js +1 -2
  39. package/lib/components/commons/components/html-table/th.spec.js +5 -5
  40. package/lib/components/commons/components/html-table/thead.js +1 -2
  41. package/lib/components/commons/components/html-table/thead.spec.js +5 -5
  42. package/lib/components/commons/components/html-table/tr.js +1 -2
  43. package/lib/components/commons/components/is-network/is-network.js +7 -8
  44. package/lib/components/commons/components/is-network/use-online-status.js +1 -2
  45. package/lib/components/commons/components/label/label.js +1 -2
  46. package/lib/components/commons/components/lunatic-component-with-label.js +6 -7
  47. package/lib/components/commons/components/lunatic-component-without-label.js +6 -7
  48. package/lib/components/commons/components/md-label/link.js +1 -2
  49. package/lib/components/commons/components/md-label/md-label.js +6 -7
  50. package/lib/components/commons/components/missing/missing.js +7 -9
  51. package/lib/components/commons/components/nothing-to-display.js +1 -2
  52. package/lib/components/commons/components/orchestrated-component.js +9 -10
  53. package/lib/components/commons/components/variable-status/variable-status.js +5 -6
  54. package/lib/components/commons/create-customizable-field.js +6 -7
  55. package/lib/components/commons/icons/radio-checked-icon.js +1 -2
  56. package/lib/components/commons/index.js +3 -3
  57. package/lib/components/commons/safety-label.js +2 -3
  58. package/lib/components/commons/use-document-add-event-listener.js +1 -2
  59. package/lib/components/commons/use-on-handle-change.js +1 -2
  60. package/lib/components/commons/use-options-keydown.js +1 -2
  61. package/lib/components/component-set/html/component-set-wrapper.js +2 -3
  62. package/lib/components/component-set/html/component-set.js +1 -2
  63. package/lib/components/component-set/lunatic-component-set.js +6 -6
  64. package/lib/components/datepicker/html/datepicker-container.js +1 -2
  65. package/lib/components/datepicker/html/datepicker-input.js +1 -2
  66. package/lib/components/datepicker/html/datepicker.js +1 -2
  67. package/lib/components/datepicker/lunatic-datepicker.js +1 -2
  68. package/lib/components/declarations/declaration.js +1 -2
  69. package/lib/components/declarations/declarations-after-text.js +8 -9
  70. package/lib/components/declarations/declarations-before-text.js +8 -9
  71. package/lib/components/declarations/declarations-detachable.js +8 -9
  72. package/lib/components/declarations/declarations.js +2 -4
  73. package/lib/components/declarations/index.js +3 -3
  74. package/lib/components/dropdown/html/dropdown-simple/dropdown-simple.js +1 -2
  75. package/lib/components/dropdown/html/dropdown-simple/simple-label-renderer.js +1 -2
  76. package/lib/components/dropdown/html/dropdown-simple/simple-option-renderer.js +1 -2
  77. package/lib/components/dropdown/html/dropdown-writable/dropdown-writable.js +2 -3
  78. package/lib/components/dropdown/html/dropdown-writable/filter-tools/filter-options.js +1 -2
  79. package/lib/components/dropdown/html/dropdown-writable/filter-tools/get-label.js +2 -3
  80. package/lib/components/dropdown/html/dropdown-writable/filter-tools/letters-matching.js +1 -2
  81. package/lib/components/dropdown/html/dropdown-writable/filter-tools/match.js +1 -2
  82. package/lib/components/dropdown/html/dropdown-writable/filter-tools/prepare-prefix.js +1 -2
  83. package/lib/components/dropdown/html/dropdown-writable/writable-label-renderer.js +1 -2
  84. package/lib/components/dropdown/html/dropdown-writable/writable-option-renderer.js +7 -8
  85. package/lib/components/dropdown/html/dropdown.js +1 -2
  86. package/lib/components/dropdown/lunatic-dropdown.js +1 -2
  87. package/lib/components/duration/duration.js +1 -2
  88. package/lib/components/duration/durationInput.js +7 -8
  89. package/lib/components/duration/durationUtils.js +3 -5
  90. package/lib/components/duration/formatDuration.js +2 -3
  91. package/lib/components/duration/getDurationFromValue.js +1 -2
  92. package/lib/components/filter-description/component.js +1 -2
  93. package/lib/components/index.js +7 -0
  94. package/lib/components/input/html/input.js +1 -2
  95. package/lib/components/input/lunatic-input.js +1 -2
  96. package/lib/components/input-number/html/input-number-thousand.js +1 -2
  97. package/lib/components/input-number/html/input-number.js +1 -2
  98. package/lib/components/input-number/lunatic-input-number.js +1 -2
  99. package/lib/components/loop/block-for-loop.js +10 -11
  100. package/lib/components/loop/loop.js +5 -5
  101. package/lib/components/loop/roster-for-loop/roster-for-loop.js +7 -8
  102. package/lib/components/lunatic-components.js +7 -7
  103. package/lib/components/modal/html/modal.js +1 -2
  104. package/lib/components/modal/lunatic-modal.js +2 -3
  105. package/lib/components/modal-controls/close-or-skip.js +1 -2
  106. package/lib/components/modal-controls/modal-container.js +1 -2
  107. package/lib/components/modal-controls/modal-controls.js +7 -8
  108. package/lib/components/pairwise-links/orchestrator.js +2 -3
  109. package/lib/components/pairwise-links/pairwise-links.js +1 -2
  110. package/lib/components/pairwise-links/row.js +2 -3
  111. package/lib/components/question-explication/html/question-explication.js +2 -3
  112. package/lib/components/question-explication/lunatic-question-explication.js +1 -2
  113. package/lib/components/question-explication/question-explication.spec.js +6 -6
  114. package/lib/components/questions/question-context.js +1 -2
  115. package/lib/components/questions/question-information.js +1 -2
  116. package/lib/components/radio/html/radio-group-content.js +1 -2
  117. package/lib/components/radio/html/radio-group.js +1 -2
  118. package/lib/components/radio/html/radio-option.js +2 -3
  119. package/lib/components/radio/lunatic-radio-group.js +1 -2
  120. package/lib/components/remote-component/remote-component.js +118 -0
  121. package/lib/components/roundabout/components/roundabout-container.js +1 -2
  122. package/lib/components/roundabout/components/roundabout-it-button.js +4 -5
  123. package/lib/components/roundabout/components/roundabout-it-container.js +1 -2
  124. package/lib/components/roundabout/components/roundabout-it-title.js +1 -2
  125. package/lib/components/roundabout/components/roundabout-label.js +1 -2
  126. package/lib/components/roundabout/components/roundabout-pending.js +1 -2
  127. package/lib/components/roundabout/lunatic-roundabout.js +1 -2
  128. package/lib/components/roundabout/redirect.js +4 -5
  129. package/lib/components/roundabout/roundabout.js +1 -2
  130. package/lib/components/sequence/html/sequence.js +1 -2
  131. package/lib/components/sequence/lunatic-sequence.js +1 -2
  132. package/lib/components/sequence/sequence.spec.js +5 -6
  133. package/lib/components/subsequence/subsequence.js +1 -2
  134. package/lib/components/subsequence/subsequence.spec.js +5 -5
  135. package/lib/components/suggester/find-best-label/find-best-label.js +1 -2
  136. package/lib/components/suggester/html/notification.js +1 -2
  137. package/lib/components/suggester/html/suggester.js +5 -6
  138. package/lib/components/suggester/idb-suggester/check-store.js +4 -5
  139. package/lib/components/suggester/idb-suggester/idb-suggester.js +1 -1
  140. package/lib/components/suggester/idb-suggester/suggester-notification.js +1 -2
  141. package/lib/components/suggester/idb-suggester/suggester-status.js +1 -2
  142. package/lib/components/suggester/lunatic-suggester.js +1 -2
  143. package/lib/components/suggester/searching/create-searching.js +4 -5
  144. package/lib/components/suggester-loader-widget/loader-row.js +2 -3
  145. package/lib/components/suggester-loader-widget/loader.js +4 -5
  146. package/lib/components/suggester-loader-widget/progress.js +1 -2
  147. package/lib/components/suggester-loader-widget/tools/action-tool.js +1 -2
  148. package/lib/components/suggester-loader-widget/tools/tools.js +1 -2
  149. package/lib/components/suggester-loader-widget/widget-container.js +1 -2
  150. package/lib/components/suggester-loader-widget/widget.js +9 -10
  151. package/lib/components/summary/html/summary-responses.js +1 -2
  152. package/lib/components/summary/html/summary-title.js +1 -2
  153. package/lib/components/switch/html/switch.js +1 -2
  154. package/lib/components/switch/lunatic-switch.js +1 -2
  155. package/lib/components/table/cell.js +3 -3
  156. package/lib/components/table/header.js +1 -2
  157. package/lib/components/table/lunatic-table.js +1 -2
  158. package/lib/components/table/row.js +1 -2
  159. package/lib/components/table/table-orchestrator.js +1 -2
  160. package/lib/components/textarea/html/textarea.js +1 -2
  161. package/lib/components/textarea/lunatic-textarea.js +1 -2
  162. package/lib/constants/component-types.js +1 -2
  163. package/lib/constants/declarations.js +10 -18
  164. package/lib/constants/event-types.js +10 -20
  165. package/lib/constants/supported-preferences.js +4 -5
  166. package/lib/constants/value-types.js +5 -10
  167. package/lib/constants/variable-types.js +3 -5
  168. package/lib/i18n/build-dictionary.js +10 -13
  169. package/lib/i18n/dictionary.js +1 -2
  170. package/lib/i18n/index.js +9 -11
  171. package/lib/i18n/inputNumberProps.js +2 -4
  172. package/lib/src/components/index.d.ts +1 -0
  173. package/lib/src/components/remote-component/remote-component.d.ts +8 -0
  174. package/lib/src/components/sequence/html/sequence.d.ts +1 -1
  175. package/lib/src/components/table/cell.d.ts +1 -0
  176. package/lib/src/components/type.d.ts +12 -0
  177. package/lib/src/use-lunatic/commons/calculated-variables.d.ts +1 -3
  178. package/lib/src/use-lunatic/commons/compose.d.ts +1 -1
  179. package/lib/src/use-lunatic/commons/execute-expression/create-refresh-calculated.d.ts +4 -4
  180. package/lib/src/use-lunatic/use-lunatic.d.ts +2 -506
  181. package/lib/stories/RemoteComponent/mock-server.js +34 -0
  182. package/lib/stories/RemoteComponent/remoteComponent.stories.js +40 -0
  183. package/lib/stories/RemoteComponent/source.json +667 -0
  184. package/lib/stories/behaviour/cleaning/cleaning.stories.js +8 -11
  185. package/lib/stories/behaviour/controls/controls-externes.stories.js +7 -9
  186. package/lib/stories/behaviour/controls/controls.stories.js +11 -17
  187. package/lib/stories/behaviour/others/test.stories.js +11 -17
  188. package/lib/stories/behaviour/paste/test.stories.js +7 -9
  189. package/lib/stories/behaviour/resizing/resizing.stories.js +8 -11
  190. package/lib/stories/checkbox-boolean/checkboxBoolean.stories.js +7 -9
  191. package/lib/stories/checkbox-group/checkbox-group.stories.js +7 -9
  192. package/lib/stories/checkbox-one/checkboxOne.stories.js +7 -9
  193. package/lib/stories/checkboxGroup/checkboxGroup.stories.js +9 -13
  194. package/lib/stories/component-set/component-set.stories.js +9 -13
  195. package/lib/stories/custom-mui/checkbox-boolean-mui.js +4 -5
  196. package/lib/stories/custom-mui/checkbox-group-mui.js +4 -5
  197. package/lib/stories/custom-mui/checkbox-one-mui.js +1 -2
  198. package/lib/stories/custom-mui/input-mui.js +4 -5
  199. package/lib/stories/custom-mui/input-number-mui.js +4 -5
  200. package/lib/stories/custom-mui/radio-mui.js +5 -6
  201. package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +5 -6
  202. package/lib/stories/custom-mui/switch-mui.js +4 -5
  203. package/lib/stories/custom-mui/table-mui.js +1 -2
  204. package/lib/stories/custom-mui/tbody-mui.js +1 -2
  205. package/lib/stories/custom-mui/td-mui.js +1 -2
  206. package/lib/stories/custom-mui/textarea-mui.js +4 -5
  207. package/lib/stories/custom-mui/th-mui.js +1 -2
  208. package/lib/stories/custom-mui/thead-mui.js +1 -2
  209. package/lib/stories/custom-mui/tr-mui.js +1 -2
  210. package/lib/stories/date-picker/datepicker.stories.js +7 -9
  211. package/lib/stories/declaration/input.stories.js +7 -9
  212. package/lib/stories/disabled/disabled.stories.js +7 -9
  213. package/lib/stories/dropdown/dropdown.stories.js +7 -9
  214. package/lib/stories/duration/duration.stories.js +8 -11
  215. package/lib/stories/filter-description/filter-description.stories.js +8 -11
  216. package/lib/stories/input/input.stories.js +8 -11
  217. package/lib/stories/input-number/input-number.stories.js +9 -13
  218. package/lib/stories/loop/block-for-loop.stories.js +9 -13
  219. package/lib/stories/loop/paginated-loop.stories.js +7 -9
  220. package/lib/stories/loop/roster-for-loop.stories.js +10 -14
  221. package/lib/stories/modal/modal.stories.js +7 -9
  222. package/lib/stories/overview/overview.stories.js +7 -9
  223. package/lib/stories/pairwise/pairwise-links.stories.js +10 -14
  224. package/lib/stories/question-explication/question-explication.stories.js +7 -9
  225. package/lib/stories/questionnaires/logement/logement.stories.js +9 -13
  226. package/lib/stories/questionnaires/recensement/recensement.stories.js +7 -9
  227. package/lib/stories/questionnaires/rp/rp.stories.js +7 -9
  228. package/lib/stories/questionnaires/simpsons/simpsons.stories.js +10 -14
  229. package/lib/stories/questionnaires2023/bySequence/ticWeb.stories.js +7 -9
  230. package/lib/stories/questionnaires2023/famille/famille.stories.js +7 -9
  231. package/lib/stories/questionnaires2023/simpsons/simpsons.stories.js +7 -9
  232. package/lib/stories/questionnaires2023/ticTel/ticWeb.stories.js +7 -9
  233. package/lib/stories/questionnaires2023/ticWeb/ticWeb.stories.js +7 -9
  234. package/lib/stories/radio/radio.stories.js +7 -9
  235. package/lib/stories/roundabout/roundabout.stories.js +8 -11
  236. package/lib/stories/sequence/sequence.stories.js +7 -9
  237. package/lib/stories/suggester/suggester-workers.stories.js +7 -9
  238. package/lib/stories/suggester/suggester.stories.js +10 -14
  239. package/lib/stories/summary/summary.stories.js +7 -9
  240. package/lib/stories/switch/switch.stories.js +9 -11
  241. package/lib/stories/table/table.stories.js +12 -17
  242. package/lib/stories/textarea/textarea.stories.js +7 -9
  243. package/lib/stories/utils/default-arg-types.js +6 -7
  244. package/lib/stories/utils/options.js +5 -9
  245. package/lib/stories/utils/orchestrator.js +13 -13
  246. package/lib/stories/utils/overview.js +2 -3
  247. package/lib/stories/utils/waiting/waiting.js +1 -2
  248. package/lib/use-lunatic/actions.js +8 -16
  249. package/lib/use-lunatic/commons/calculated-variables.js +7 -8
  250. package/lib/use-lunatic/commons/check-loops.js +7 -8
  251. package/lib/use-lunatic/commons/compile-controls.js +6 -7
  252. package/lib/use-lunatic/commons/compose.js +1 -2
  253. package/lib/use-lunatic/commons/create-map-pages.js +6 -7
  254. package/lib/use-lunatic/commons/execute-condition-filter.js +1 -2
  255. package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +10 -12
  256. package/lib/use-lunatic/commons/execute-expression/create-execute-expression.spec.js +1 -1
  257. package/lib/use-lunatic/commons/execute-expression/create-memoizer.js +7 -8
  258. package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +7 -8
  259. package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.spec.js +3 -3
  260. package/lib/use-lunatic/commons/execute-expression/execute-expression.js +7 -8
  261. package/lib/use-lunatic/commons/execute-expression/execute-expression.spec.js +1 -1
  262. package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.js +1 -2
  263. package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.spec.js +1 -1
  264. package/lib/use-lunatic/commons/execute-expression/get-safety-expression.js +6 -7
  265. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +6 -7
  266. package/lib/use-lunatic/commons/fill-components/fill-component-required.js +5 -5
  267. package/lib/use-lunatic/commons/fill-components/fill-component-value.js +6 -7
  268. package/lib/use-lunatic/commons/fill-components/fill-components.js +1 -2
  269. package/lib/use-lunatic/commons/fill-components/fill-from-state.js +6 -7
  270. package/lib/use-lunatic/commons/fill-components/fill-management.js +6 -7
  271. package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +6 -7
  272. package/lib/use-lunatic/commons/fill-components/fill-pagination.js +6 -7
  273. package/lib/use-lunatic/commons/fill-components/fill-specific-expression.js +7 -9
  274. package/lib/use-lunatic/commons/get-compatible-vtl-expression.js +2 -3
  275. package/lib/use-lunatic/commons/get-component-value/get-component-value.js +18 -8
  276. package/lib/use-lunatic/commons/get-components-from-state.js +1 -2
  277. package/lib/use-lunatic/commons/get-data.js +8 -9
  278. package/lib/use-lunatic/commons/get-errors-without-empty-value.js +2 -3
  279. package/lib/use-lunatic/commons/getOverview.js +3 -4
  280. package/lib/use-lunatic/commons/is-First-last-page.js +1 -2
  281. package/lib/use-lunatic/commons/is-paginated-loop.js +1 -2
  282. package/lib/use-lunatic/commons/page-navigation.js +6 -6
  283. package/lib/use-lunatic/commons/page-navigation.spec.js +5 -5
  284. package/lib/use-lunatic/commons/page-tag.js +3 -3
  285. package/lib/use-lunatic/commons/use-components-from-state.js +1 -2
  286. package/lib/use-lunatic/initial-state.js +1 -2
  287. package/lib/use-lunatic/lunatic-context.js +3 -6
  288. package/lib/use-lunatic/reducer/commons/auto-explore-loop.js +5 -5
  289. package/lib/use-lunatic/reducer/commons/is-loop-component.js +2 -3
  290. package/lib/use-lunatic/reducer/commons/resize-array-variable.js +1 -2
  291. package/lib/use-lunatic/reducer/commons/validate-condition-filter.js +1 -1
  292. package/lib/use-lunatic/reducer/overview/overview-on-change.js +7 -8
  293. package/lib/use-lunatic/reducer/overview/overview-on-init.js +7 -7
  294. package/lib/use-lunatic/reducer/reduce-go-next-page.js +7 -8
  295. package/lib/use-lunatic/reducer/reduce-go-previous-page.js +6 -7
  296. package/lib/use-lunatic/reducer/reduce-go-to-page.js +6 -7
  297. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +7 -8
  298. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +8 -8
  299. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.js +7 -8
  300. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-missing.js +7 -8
  301. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +8 -9
  302. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.js +6 -7
  303. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.js +6 -7
  304. package/lib/use-lunatic/reducer/reduce-on-init.js +7 -8
  305. package/lib/use-lunatic/reducer/reduce-on-set-waiting.js +6 -7
  306. package/lib/use-lunatic/reducer/reduce-update-state.js +5 -5
  307. package/lib/use-lunatic/reducer/reducer.js +1 -2
  308. package/lib/use-lunatic/type-source.js +4 -7
  309. package/lib/use-lunatic/use-lunatic.js +9 -10
  310. package/lib/use-lunatic/use-lunatic.test.js +5 -5
  311. package/lib/use-lunatic/use-suggesters.js +9 -10
  312. package/lib/utils/constants/alphabet.js +1 -2
  313. package/lib/utils/constants/features.js +3 -6
  314. package/lib/utils/constants/links.js +2 -4
  315. package/lib/utils/constants/missing.js +2 -4
  316. package/lib/utils/constants/variable-status.js +5 -10
  317. package/lib/utils/constants/variable-types.js +1 -2
  318. package/lib/utils/function.js +1 -2
  319. package/lib/utils/get-component-value.js +1 -1
  320. package/lib/utils/idb-tools/clear-store.js +3 -4
  321. package/lib/utils/idb-tools/create-db-opener.js +1 -2
  322. package/lib/utils/idb-tools/create-open-db.js +1 -2
  323. package/lib/utils/idb-tools/get-entity.js +1 -2
  324. package/lib/utils/idb-tools/get-idb.js +1 -2
  325. package/lib/utils/idb-tools/idb-bulk-insert.js +7 -9
  326. package/lib/utils/idb-tools/index.js +3 -3
  327. package/lib/utils/idb-tools/insert-entity.js +1 -2
  328. package/lib/utils/idb-tools/open-db.js +3 -4
  329. package/lib/utils/idb-tools/open-or-create-db.js +2 -3
  330. package/lib/utils/is-object.js +1 -1
  331. package/lib/utils/logger.js +6 -8
  332. package/lib/utils/number.js +1 -1
  333. package/lib/utils/object.js +1 -1
  334. package/lib/utils/store-tools/clear-store-data.js +3 -4
  335. package/lib/utils/store-tools/clear-store-info.js +3 -4
  336. package/lib/utils/store-tools/constantes.js +7 -14
  337. package/lib/utils/store-tools/create/create.js +3 -4
  338. package/lib/utils/store-tools/create/update-store-info.js +1 -2
  339. package/lib/utils/store-tools/get-store-count.js +1 -2
  340. package/lib/utils/store-tools/index.js +3 -3
  341. package/lib/utils/store-tools/initStore.js +2 -2
  342. package/lib/utils/store-tools/open-or-create-store.js +1 -2
  343. package/lib/utils/store-tools/use-store-index.js +4 -5
  344. package/lib/utils/suggester-workers/append-to-index/append.js +3 -4
  345. package/lib/utils/suggester-workers/append-to-index/append.worker.js +1 -2
  346. package/lib/utils/suggester-workers/append-to-index/prepare-entities.js +7 -8
  347. package/lib/utils/suggester-workers/append-to-index/store-messages.js +6 -7
  348. package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +6 -7
  349. package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +7 -8
  350. package/lib/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +6 -7
  351. package/lib/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +1 -2
  352. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +6 -7
  353. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.js +1 -2
  354. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.js +1 -2
  355. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.js +1 -2
  356. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.js +1 -2
  357. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +6 -7
  358. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +1 -2
  359. package/lib/utils/suggester-workers/commons-tokenizer/filters/stop-words.js +1 -2
  360. package/lib/utils/suggester-workers/commons-tokenizer/get-regexp-from-pattern.js +1 -2
  361. package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.js +1 -2
  362. package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.js +1 -2
  363. package/lib/utils/suggester-workers/commons-tokenizer/soft-tokenizer.js +1 -2
  364. package/lib/utils/suggester-workers/create-worker-ts.js +2 -3
  365. package/lib/utils/suggester-workers/find-best-label/find-best-label.js +7 -8
  366. package/lib/utils/suggester-workers/find-best-label/tokenize.js +3 -4
  367. package/lib/utils/suggester-workers/searching/compute-score.js +6 -7
  368. package/lib/utils/suggester-workers/searching/get-db.js +3 -4
  369. package/lib/utils/suggester-workers/searching/order/create-alphanumeric-orderer.js +1 -2
  370. package/lib/utils/suggester-workers/searching/order/index.js +1 -2
  371. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.js +1 -2
  372. package/lib/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +2 -3
  373. package/lib/utils/suggester-workers/searching/resolve-query-parser.js +3 -4
  374. package/lib/utils/suggester-workers/searching/search-in-index.js +1 -2
  375. package/lib/utils/suggester-workers/searching/searching.js +7 -8
  376. package/lib/utils/suggester-workers/worker-path.js +1 -2
  377. package/lib/utils/vtl/dataset-builder.js +1 -2
  378. package/package.json +3 -1
  379. package/workers-release/lunatic-append-worker-0.3.0-experimental.js +1 -1
  380. package/workers-release/lunatic-label-worker-0.3.0-experimental.js +1 -1
  381. package/workers-release/lunatic-searching-worker-0.3.0-experimental.js +1 -1
@@ -1,5 +1,6 @@
1
1
  import type { LunaticBaseProps } from '../type';
2
2
  import type { LunaticComponentDefinition, LunaticExpression } from '../../use-lunatic/type';
3
+ export declare function collecteValue(component: LunaticComponentDefinition, value?: Record<string, unknown>): unknown;
3
4
  type Props = {
4
5
  content: LunaticComponentDefinition | {
5
6
  label: LunaticExpression;
@@ -276,6 +276,18 @@ type ComponentPropsByType = {
276
276
  goNextPage: () => void;
277
277
  goPreviousPage: () => void;
278
278
  };
279
+ RemoteComponent: LunaticBaseProps<string | null> & {
280
+ components: LunaticComponentDefinition[];
281
+ remote: string;
282
+ responses?: Array<{
283
+ responses: {
284
+ name: string;
285
+ };
286
+ }>;
287
+ value: Record<string, unknown>;
288
+ latency?: number;
289
+ retry?: number;
290
+ };
279
291
  };
280
292
  export type LunaticComponentType = keyof ComponentPropsByType;
281
293
  export type LunaticComponentProps<T extends LunaticComponentType = LunaticComponentType> = ComponentPropsByType[T];
@@ -2,7 +2,5 @@ import type { LunaticState, LunaticValues } from '../type';
2
2
  export declare const interpretAllCalculatedVariables: ({ variables, partialVariables, builtVariables, }: {
3
3
  variables: LunaticState['variables'];
4
4
  builtVariables: LunaticValues;
5
- partialVariables?: {
6
- [variableName: string]: import("../type").LunaticStateVariable;
7
- } | undefined;
5
+ partialVariables?: LunaticState['variables'];
8
6
  }) => LunaticValues;
@@ -1,3 +1,3 @@
1
1
  import type { LunaticState } from '../type';
2
- declare const compose: <V>(...functions: ((acc: LunaticState, action: V) => LunaticState)[]) => (acc: LunaticState, action: V) => LunaticState;
2
+ declare const compose: <V>(...functions: Array<(acc: LunaticState, action: V) => LunaticState>) => (acc: LunaticState, action: V) => LunaticState;
3
3
  export default compose;
@@ -17,9 +17,9 @@ type Args = {
17
17
  declare function createRefreshCalculated({ variables, execute, bindings }: Args): readonly [(map: {
18
18
  [variableName: string]: unknown;
19
19
  }, { rootExpression, iteration, linksIterations, skipCleaningRefresh, }?: {
20
- rootExpression?: string | undefined;
21
- iteration?: number | undefined;
22
- linksIterations?: number[] | undefined;
23
- skipCleaningRefresh?: boolean | undefined;
20
+ rootExpression?: string;
21
+ iteration?: number;
22
+ linksIterations?: number[];
23
+ skipCleaningRefresh?: boolean;
24
24
  }) => Record<string, unknown>, (name: string, variable: LunaticVariable) => void];
25
25
  export default createRefreshCalculated;
@@ -29,512 +29,8 @@ declare function useLunatic(source: LunaticSource, data: Partial<Record<"CALCULA
29
29
  workersBasePath?: string;
30
30
  }): {
31
31
  getComponents: ({ only, except, }?: {
32
- only?: (keyof {
33
- InputNumber: import("../components/type").LunaticBaseProps<number | null> & {
34
- min?: number | undefined;
35
- max: number;
36
- decimals: number;
37
- unit?: string | undefined;
38
- response: {
39
- name: string;
40
- };
41
- };
42
- Duration: import("../components/type").LunaticBaseProps<string | null> & {
43
- format: "PTnHnM" | "PnYnM";
44
- response: {
45
- name: string;
46
- };
47
- };
48
- Input: import("../components/type").LunaticBaseProps<string> & {
49
- maxLength?: number | undefined;
50
- value: string | null;
51
- response: {
52
- name: string;
53
- };
54
- };
55
- Sequence: Pick<import("../components/type").LunaticBaseProps<string>, "label" | "style" | "id" | "declarations">;
56
- Subsequence: Pick<import("../components/type").LunaticBaseProps<string>, "label" | "id" | "declarations">;
57
- Question: Pick<import("../components/type").LunaticBaseProps<unknown>, "label" | "description">;
58
- ComponentSet: import("../components/type").LunaticBaseProps<unknown> & {
59
- components: import("./commons/fill-components/fill-components").FilledLunaticComponentProps[];
60
- value: Record<string, unknown>;
61
- response: undefined;
62
- };
63
- RosterForLoop: import("../components/type").LunaticBaseProps<unknown> & {
64
- lines: {
65
- min: number;
66
- max: number;
67
- };
68
- iterations?: number | undefined;
69
- getComponents: (n: number) => import("./commons/fill-components/fill-components").FilledLunaticComponentProps[];
70
- executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
71
- iteration?: number | undefined;
72
- linksIterations?: number[] | undefined;
73
- logging?: import("./commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
74
- bindingDependencies?: string[] | undefined;
75
- skipCleaningRefresh?: boolean | undefined;
76
- } | undefined) => T;
77
- value: Record<string, unknown[]>;
78
- headers?: {
79
- label: import("react").ReactNode;
80
- }[] | undefined;
81
- paginatedLoop?: boolean | undefined;
82
- };
83
- Loop: import("../components/type").LunaticBaseProps<unknown> & {
84
- lines: {
85
- min: number;
86
- max: number;
87
- };
88
- iterations?: number | undefined;
89
- getComponents: (n: number) => import("./commons/fill-components/fill-components").FilledLunaticComponentProps[];
90
- executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
91
- iteration?: number | undefined;
92
- linksIterations?: number[] | undefined;
93
- logging?: import("./commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
94
- bindingDependencies?: string[] | undefined;
95
- skipCleaningRefresh?: boolean | undefined;
96
- } | undefined) => T;
97
- value: Record<string, unknown[]>;
98
- headers?: {
99
- label: import("react").ReactNode;
100
- }[] | undefined;
101
- paginatedLoop?: boolean | undefined;
102
- };
103
- Table: import("../components/type").LunaticBaseProps<unknown> & {
104
- value: Record<string, unknown>;
105
- header: {
106
- label: import("react").ReactNode;
107
- rowspan?: number | undefined;
108
- colspan?: number | undefined;
109
- }[];
110
- body: {
111
- label: import("./type").LunaticExpression;
112
- }[][];
113
- executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
114
- iteration?: number | undefined;
115
- linksIterations?: number[] | undefined;
116
- logging?: import("./commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
117
- bindingDependencies?: string[] | undefined;
118
- skipCleaningRefresh?: boolean | undefined;
119
- } | undefined) => T;
120
- iteration: number | undefined;
121
- };
122
- Datepicker: import("../components/type").LunaticBaseProps<string | null> & {
123
- min?: string | undefined;
124
- max?: string | undefined;
125
- response: {
126
- name: string;
127
- };
128
- };
129
- CheckboxGroup: import("../components/type").LunaticBaseProps<Record<string, boolean | null>> & {
130
- responses: {
131
- id: string;
132
- label: import("react").ReactNode;
133
- description?: import("react").ReactNode;
134
- response: {
135
- name: string;
136
- };
137
- }[];
138
- handleChange: (response: {
139
- name: string;
140
- }, value: boolean, args?: Record<string, unknown> | undefined) => void;
141
- };
142
- CheckboxOne: import("../components/type").LunaticBaseProps<string | null> & {
143
- options: {
144
- description: import("react").ReactNode;
145
- label: import("react").ReactNode;
146
- value: string;
147
- }[];
148
- response: {
149
- name: string;
150
- };
151
- };
152
- Switch: import("../components/type").LunaticBaseProps<boolean> & {
153
- response: {
154
- name: string;
155
- };
156
- statusLabel?: {
157
- true: string;
158
- false: string;
159
- } | undefined;
160
- };
161
- CheckboxBoolean: import("../components/type").LunaticBaseProps<boolean> & {
162
- options: {
163
- description: import("react").ReactNode;
164
- label: import("react").ReactNode;
165
- value: string;
166
- }[];
167
- response: {
168
- name: string;
169
- };
170
- };
171
- Radio: import("../components/type").LunaticBaseProps<string | null> & {
172
- options: {
173
- description: import("react").ReactNode;
174
- label: import("react").ReactNode;
175
- value: string;
176
- }[];
177
- checkboxStyle?: boolean | undefined;
178
- response: {
179
- name: string;
180
- };
181
- };
182
- Roundabout: import("../components/type").LunaticBaseProps<string> & {
183
- iterations: number;
184
- goToPage: (page: {
185
- page: string;
186
- iteration?: number | undefined;
187
- nbIterations?: number | undefined;
188
- subPage?: number | undefined;
189
- }) => void;
190
- page: string;
191
- locked?: boolean | undefined;
192
- expressions: {
193
- unnecessary?: boolean[] | undefined;
194
- complete?: boolean[] | undefined;
195
- partial?: boolean[] | undefined;
196
- label?: string[] | undefined;
197
- };
198
- };
199
- Dropdown: import("../components/type").LunaticBaseProps<string | null> & {
200
- options: {
201
- description: import("react").ReactNode;
202
- label: import("react").ReactNode;
203
- value: string;
204
- }[];
205
- response: {
206
- name: string;
207
- };
208
- writable?: boolean | undefined;
209
- };
210
- Textarea: import("../components/type").LunaticBaseProps<string> & {
211
- cols?: number | undefined;
212
- placeHolder?: string | undefined;
213
- maxLength?: number | undefined;
214
- rows?: number | undefined;
215
- response: {
216
- name: string;
217
- };
218
- };
219
- FilterDescription: Pick<import("../components/type").LunaticBaseProps<string>, "label" | "id">;
220
- QuestionExplication: Pick<import("../components/type").LunaticBaseProps<string>, "label" | "id" | "description"> & {
221
- bgColor?: string | undefined;
222
- };
223
- PairwiseLinks: Omit<import("../components/type").LunaticBaseProps<unknown>, "value"> & {
224
- components: import("./type").LunaticComponentDefinition[];
225
- features?: ["VTL"] | ["VTL", "MD"] | undefined;
226
- executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
227
- iteration?: number | undefined;
228
- linksIterations?: number[] | undefined;
229
- logging?: import("./commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
230
- bindingDependencies?: string[] | undefined;
231
- skipCleaningRefresh?: boolean | undefined;
232
- } | undefined) => T;
233
- xAxisIterations: number;
234
- yAxisIterations: number;
235
- symLinks: Record<string, Record<string, string>>;
236
- value: Record<string, unknown[]>;
237
- };
238
- Suggester: import("../components/type").LunaticBaseProps<string | null> & {
239
- storeName: string;
240
- workersBasePath?: string | undefined;
241
- getSuggesterStatus: (name: string) => {
242
- status: import("./use-suggesters").SuggesterStatus;
243
- timestamp: number;
244
- };
245
- optionRenderer: FunctionComponent<{
246
- option: import("../components/type").SuggesterOption;
247
- placeholder?: string | undefined;
248
- search?: string | undefined;
249
- }>;
250
- labelRenderer: FunctionComponent<{
251
- option?: import("../components/type").SuggesterOption | undefined;
252
- selected?: boolean | undefined;
253
- search?: string | undefined;
254
- }>;
255
- idbVersion?: string | undefined;
256
- focused: boolean;
257
- response: {
258
- name: string;
259
- };
260
- };
261
- Summary: import("../components/type").LunaticBaseProps<string | null> & {
262
- sections: {
263
- id: string;
264
- responses?: {
265
- id: string;
266
- label: import("../components/type").VtlExpression;
267
- value: import("../components/type").VtlExpression;
268
- }[] | undefined;
269
- title?: import("../components/type").VtlExpression | undefined;
270
- iterations?: number | undefined;
271
- }[];
272
- };
273
- ConfirmationModal: import("../components/type").LunaticBaseProps<string | null> & {
274
- goToPage: (page: {
275
- page: string;
276
- iteration?: number | undefined;
277
- nbIterations?: number | undefined;
278
- subPage?: number | undefined;
279
- }) => void;
280
- page: string;
281
- goNextPage: () => void;
282
- goPreviousPage: () => void;
283
- };
284
- })[] | undefined;
285
- except?: (keyof {
286
- InputNumber: import("../components/type").LunaticBaseProps<number | null> & {
287
- min?: number | undefined;
288
- max: number;
289
- decimals: number;
290
- unit?: string | undefined;
291
- response: {
292
- name: string;
293
- };
294
- };
295
- Duration: import("../components/type").LunaticBaseProps<string | null> & {
296
- format: "PTnHnM" | "PnYnM";
297
- response: {
298
- name: string;
299
- };
300
- };
301
- Input: import("../components/type").LunaticBaseProps<string> & {
302
- maxLength?: number | undefined;
303
- value: string | null;
304
- response: {
305
- name: string;
306
- };
307
- };
308
- Sequence: Pick<import("../components/type").LunaticBaseProps<string>, "label" | "style" | "id" | "declarations">;
309
- Subsequence: Pick<import("../components/type").LunaticBaseProps<string>, "label" | "id" | "declarations">;
310
- Question: Pick<import("../components/type").LunaticBaseProps<unknown>, "label" | "description">;
311
- ComponentSet: import("../components/type").LunaticBaseProps<unknown> & {
312
- components: import("./commons/fill-components/fill-components").FilledLunaticComponentProps[];
313
- value: Record<string, unknown>;
314
- response: undefined;
315
- };
316
- RosterForLoop: import("../components/type").LunaticBaseProps<unknown> & {
317
- lines: {
318
- min: number;
319
- max: number;
320
- };
321
- iterations?: number | undefined;
322
- getComponents: (n: number) => import("./commons/fill-components/fill-components").FilledLunaticComponentProps[];
323
- executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
324
- iteration?: number | undefined;
325
- linksIterations?: number[] | undefined;
326
- logging?: import("./commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
327
- bindingDependencies?: string[] | undefined;
328
- skipCleaningRefresh?: boolean | undefined;
329
- } | undefined) => T;
330
- value: Record<string, unknown[]>;
331
- headers?: {
332
- label: import("react").ReactNode;
333
- }[] | undefined;
334
- paginatedLoop?: boolean | undefined;
335
- };
336
- Loop: import("../components/type").LunaticBaseProps<unknown> & {
337
- lines: {
338
- min: number;
339
- max: number;
340
- };
341
- iterations?: number | undefined;
342
- getComponents: (n: number) => import("./commons/fill-components/fill-components").FilledLunaticComponentProps[];
343
- executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
344
- iteration?: number | undefined;
345
- linksIterations?: number[] | undefined;
346
- logging?: import("./commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
347
- bindingDependencies?: string[] | undefined;
348
- skipCleaningRefresh?: boolean | undefined;
349
- } | undefined) => T;
350
- value: Record<string, unknown[]>;
351
- headers?: {
352
- label: import("react").ReactNode;
353
- }[] | undefined;
354
- paginatedLoop?: boolean | undefined;
355
- };
356
- Table: import("../components/type").LunaticBaseProps<unknown> & {
357
- value: Record<string, unknown>;
358
- header: {
359
- label: import("react").ReactNode;
360
- rowspan?: number | undefined;
361
- colspan?: number | undefined;
362
- }[];
363
- body: {
364
- label: import("./type").LunaticExpression;
365
- }[][];
366
- executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
367
- iteration?: number | undefined;
368
- linksIterations?: number[] | undefined;
369
- logging?: import("./commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
370
- bindingDependencies?: string[] | undefined;
371
- skipCleaningRefresh?: boolean | undefined;
372
- } | undefined) => T;
373
- iteration: number | undefined;
374
- };
375
- Datepicker: import("../components/type").LunaticBaseProps<string | null> & {
376
- min?: string | undefined;
377
- max?: string | undefined;
378
- response: {
379
- name: string;
380
- };
381
- };
382
- CheckboxGroup: import("../components/type").LunaticBaseProps<Record<string, boolean | null>> & {
383
- responses: {
384
- id: string;
385
- label: import("react").ReactNode;
386
- description?: import("react").ReactNode;
387
- response: {
388
- name: string;
389
- };
390
- }[];
391
- handleChange: (response: {
392
- name: string;
393
- }, value: boolean, args?: Record<string, unknown> | undefined) => void;
394
- };
395
- CheckboxOne: import("../components/type").LunaticBaseProps<string | null> & {
396
- options: {
397
- description: import("react").ReactNode;
398
- label: import("react").ReactNode;
399
- value: string;
400
- }[];
401
- response: {
402
- name: string;
403
- };
404
- };
405
- Switch: import("../components/type").LunaticBaseProps<boolean> & {
406
- response: {
407
- name: string;
408
- };
409
- statusLabel?: {
410
- true: string;
411
- false: string;
412
- } | undefined;
413
- };
414
- CheckboxBoolean: import("../components/type").LunaticBaseProps<boolean> & {
415
- options: {
416
- description: import("react").ReactNode;
417
- label: import("react").ReactNode;
418
- value: string;
419
- }[];
420
- response: {
421
- name: string;
422
- };
423
- };
424
- Radio: import("../components/type").LunaticBaseProps<string | null> & {
425
- options: {
426
- description: import("react").ReactNode;
427
- label: import("react").ReactNode;
428
- value: string;
429
- }[];
430
- checkboxStyle?: boolean | undefined;
431
- response: {
432
- name: string;
433
- };
434
- };
435
- Roundabout: import("../components/type").LunaticBaseProps<string> & {
436
- iterations: number;
437
- goToPage: (page: {
438
- page: string;
439
- iteration?: number | undefined;
440
- nbIterations?: number | undefined;
441
- subPage?: number | undefined;
442
- }) => void;
443
- page: string;
444
- locked?: boolean | undefined;
445
- expressions: {
446
- unnecessary?: boolean[] | undefined;
447
- complete?: boolean[] | undefined;
448
- partial?: boolean[] | undefined;
449
- label?: string[] | undefined;
450
- };
451
- };
452
- Dropdown: import("../components/type").LunaticBaseProps<string | null> & {
453
- options: {
454
- description: import("react").ReactNode;
455
- label: import("react").ReactNode;
456
- value: string;
457
- }[];
458
- response: {
459
- name: string;
460
- };
461
- writable?: boolean | undefined;
462
- };
463
- Textarea: import("../components/type").LunaticBaseProps<string> & {
464
- cols?: number | undefined;
465
- placeHolder?: string | undefined;
466
- maxLength?: number | undefined;
467
- rows?: number | undefined;
468
- response: {
469
- name: string;
470
- };
471
- };
472
- FilterDescription: Pick<import("../components/type").LunaticBaseProps<string>, "label" | "id">;
473
- QuestionExplication: Pick<import("../components/type").LunaticBaseProps<string>, "label" | "id" | "description"> & {
474
- bgColor?: string | undefined;
475
- };
476
- PairwiseLinks: Omit<import("../components/type").LunaticBaseProps<unknown>, "value"> & {
477
- components: import("./type").LunaticComponentDefinition[];
478
- features?: ["VTL"] | ["VTL", "MD"] | undefined;
479
- executeExpression: <T extends unknown = unknown>(expression: unknown, args?: {
480
- iteration?: number | undefined;
481
- linksIterations?: number[] | undefined;
482
- logging?: import("./commons/execute-expression/create-execute-expression").ExpressionLogger | undefined;
483
- bindingDependencies?: string[] | undefined;
484
- skipCleaningRefresh?: boolean | undefined;
485
- } | undefined) => T;
486
- xAxisIterations: number;
487
- yAxisIterations: number;
488
- symLinks: Record<string, Record<string, string>>;
489
- value: Record<string, unknown[]>;
490
- };
491
- Suggester: import("../components/type").LunaticBaseProps<string | null> & {
492
- storeName: string;
493
- workersBasePath?: string | undefined;
494
- getSuggesterStatus: (name: string) => {
495
- status: import("./use-suggesters").SuggesterStatus;
496
- timestamp: number;
497
- };
498
- optionRenderer: FunctionComponent<{
499
- option: import("../components/type").SuggesterOption;
500
- placeholder?: string | undefined;
501
- search?: string | undefined;
502
- }>;
503
- labelRenderer: FunctionComponent<{
504
- option?: import("../components/type").SuggesterOption | undefined;
505
- selected?: boolean | undefined;
506
- search?: string | undefined;
507
- }>;
508
- idbVersion?: string | undefined;
509
- focused: boolean;
510
- response: {
511
- name: string;
512
- };
513
- };
514
- Summary: import("../components/type").LunaticBaseProps<string | null> & {
515
- sections: {
516
- id: string;
517
- responses?: {
518
- id: string;
519
- label: import("../components/type").VtlExpression;
520
- value: import("../components/type").VtlExpression;
521
- }[] | undefined;
522
- title?: import("../components/type").VtlExpression | undefined;
523
- iterations?: number | undefined;
524
- }[];
525
- };
526
- ConfirmationModal: import("../components/type").LunaticBaseProps<string | null> & {
527
- goToPage: (page: {
528
- page: string;
529
- iteration?: number | undefined;
530
- nbIterations?: number | undefined;
531
- subPage?: number | undefined;
532
- }) => void;
533
- page: string;
534
- goNextPage: () => void;
535
- goPreviousPage: () => void;
536
- };
537
- })[] | undefined;
32
+ only?: LunaticComponentType[];
33
+ except?: LunaticComponentType[];
538
34
  }) => import("./commons/fill-components/fill-components").FilledLunaticComponentProps<"Sequence" | "Subsequence" | "RosterForLoop" | "Loop" | "Table" | "Input" | "InputNumber" | "Datepicker" | "CheckboxGroup" | "CheckboxOne" | "CheckboxBoolean" | "Radio" | "Dropdown" | "Textarea" | "FilterDescription" | "PairwiseLinks" | "Suggester" | "ConfirmationModal" | "ComponentSet" | "Roundabout" | "QuestionExplication">[];
539
35
  goPreviousPage: () => void;
540
36
  goNextPage: (payload?: {}) => void;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var express = require('express');
4
+ var cors = require('cors');
5
+ var bodyParser = require('body-parser');
6
+ var app = express();
7
+ var port = 4000;
8
+ app.use(cors());
9
+ app.use(bodyParser.json());
10
+ app.post('/api/recensement/adresse', function (request, response) {
11
+ console.log('body', request.body); // on n'en fait rien, c juste un mock !
12
+ var _request$body = request.body,
13
+ ZC = _request$body.ZC,
14
+ ADR_RANG = _request$body.ADR_RANG,
15
+ LOG_RANG = _request$body.LOG_RANG;
16
+ if (ZC && ADR_RANG && LOG_RANG) {
17
+ response.status(201).json({
18
+ NUMVOI_LOC: '14',
19
+ BISTER_LOC: null,
20
+ TYPEVOI_LOC: 'Rue',
21
+ NOMVOI_LOC: 'de Picpus',
22
+ CPOST_LOC: '75012',
23
+ LIBELLE_COMMUNE: 'Paris',
24
+ RESPONSE: true
25
+ });
26
+ } else {
27
+ response.status(201).json({
28
+ RESPONSE: false
29
+ });
30
+ }
31
+ });
32
+ app.listen(port, function () {
33
+ console.log("Test app listening at http://localhost:".concat(port));
34
+ });
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.Default = void 0;
7
+ var _orchestrator = _interopRequireDefault(require("../utils/orchestrator"));
8
+ var _source = _interopRequireDefault(require("./source"));
9
+ var _defaultArgTypes = _interopRequireDefault(require("../utils/default-arg-types"));
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
13
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
+ var stories = {
19
+ title: 'Components/RemoteComponent',
20
+ component: _orchestrator["default"],
21
+ argTypes: _objectSpread(_objectSpread({}, _defaultArgTypes["default"]), {}, {
22
+ shortcut: {
23
+ table: {
24
+ disable: false
25
+ },
26
+ control: 'boolean',
27
+ defaultValue: true
28
+ }
29
+ })
30
+ };
31
+ var _default = exports["default"] = stories;
32
+ var Template = function Template(args) {
33
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_orchestrator["default"], _objectSpread({}, args));
34
+ };
35
+ var Default = exports.Default = Template.bind({});
36
+ Default.args = {
37
+ id: 'radio',
38
+ source: _source["default"],
39
+ pagination: true
40
+ };