@inseefr/lunatic 0.3.2-experimental → 0.3.2-v2

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 (711) hide show
  1. package/README.md +2 -0
  2. package/lib/index.js +1102 -1706
  3. package/lib/index.js.map +1 -1
  4. package/package.json +23 -20
  5. package/src/components/button/button.scss +24 -24
  6. package/src/components/button/index.js +1 -1
  7. package/src/components/button/lunatic-button.js +48 -0
  8. package/src/components/checkbox/checkbox-boolean/checkbox-boolean.js +18 -0
  9. package/src/components/checkbox/checkbox-boolean/index.js +1 -0
  10. package/src/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +30 -0
  11. package/src/components/checkbox/checkbox-group/checkbox-group.js +84 -0
  12. package/src/components/checkbox/checkbox-group/checkbox-option.js +45 -0
  13. package/src/components/checkbox/checkbox-group/index.js +1 -0
  14. package/src/components/checkbox/checkbox-group/lunatic-checkbox-group.js +27 -0
  15. package/src/components/checkbox/checkbox-one/index.js +1 -0
  16. package/src/components/checkbox/checkbox-one/lunatic-checkbox-one.js +7 -0
  17. package/src/components/checkbox/checkbox.scss +1 -73
  18. package/src/components/checkbox/commons/checkbox-option.js +55 -0
  19. package/src/components/checkbox/commons/index.js +1 -0
  20. package/src/components/checkbox/index.js +3 -3
  21. package/src/{utils/lib/style.js → components/commons/build-style-object.js} +4 -2
  22. package/src/components/commons/components/combo-box/combo-box-container.js +31 -0
  23. package/src/components/commons/components/combo-box/combo-box-content.js +57 -0
  24. package/src/components/commons/components/combo-box/combo-box.js +189 -0
  25. package/src/components/commons/components/combo-box/combo-box.scss +218 -0
  26. package/src/components/commons/components/combo-box/index.js +2 -0
  27. package/src/components/commons/components/combo-box/panel/index.js +1 -0
  28. package/src/components/{suggester/components → commons/components/combo-box}/panel/option-container.js +13 -11
  29. package/src/components/{suggester/components → commons/components/combo-box}/panel/panel-container.js +20 -21
  30. package/src/components/{suggester/components → commons/components/combo-box}/panel/panel.js +23 -12
  31. package/src/components/commons/components/combo-box/selection/delete.js +40 -0
  32. package/src/components/commons/components/combo-box/selection/displayLabelOrInput.js +23 -0
  33. package/src/components/{suggester/components → commons/components/combo-box}/selection/index.js +1 -1
  34. package/src/components/commons/components/combo-box/selection/input.js +55 -0
  35. package/src/components/commons/components/combo-box/selection/label.js +29 -0
  36. package/src/components/commons/components/combo-box/selection/selection-container.js +32 -0
  37. package/src/components/commons/components/combo-box/selection/selection.js +63 -0
  38. package/src/components/commons/components/combo-box/state-management/actions.js +29 -0
  39. package/src/components/commons/components/combo-box/state-management/combo-box-context.js +8 -0
  40. package/src/components/commons/components/combo-box/state-management/index.js +4 -0
  41. package/src/components/commons/components/combo-box/state-management/initial-state.js +8 -0
  42. package/src/components/{suggester → commons/components/combo-box}/state-management/reducer/index.js +1 -1
  43. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-blur.js +5 -0
  44. package/src/components/{suggester/state-management/reducer/reduce-on-change-search.js → commons/components/combo-box/state-management/reducer/reduce-on-change.js} +8 -8
  45. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-delete.js +10 -0
  46. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-focus.js +5 -0
  47. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-init.js +23 -0
  48. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/index.js +1 -0
  49. package/src/components/{suggester/commons-tools/binded-keys.js → commons/components/combo-box/state-management/reducer/reduce-on-keydown/keyboard-key-codes.js} +11 -11
  50. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-down.js +22 -0
  51. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-up.js +22 -0
  52. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-end.js +13 -0
  53. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-enter.js +6 -0
  54. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-escape.js +5 -0
  55. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-home.js +13 -0
  56. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-tab.js +5 -0
  57. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/reduce-on-keydown.js +34 -0
  58. package/src/components/commons/components/combo-box/state-management/reducer/reduce-on-select.js +8 -0
  59. package/src/components/commons/components/combo-box/state-management/reducer/reducer.js +32 -0
  60. package/src/components/commons/components/create-lunatic-component/create-lunatic-component.js +58 -0
  61. package/src/components/commons/components/create-lunatic-component/index.js +5 -0
  62. package/src/components/{suggester/components/selection → commons/components}/default-label-renderer.js +6 -6
  63. package/src/components/{suggester/components/panel → commons/components}/default-option-renderer.js +4 -4
  64. package/src/{utils → components/commons}/components/dragger/dragger.js +64 -64
  65. package/src/{utils → components/commons}/components/dragger/dragger.scss +0 -0
  66. package/src/{utils → components/commons}/components/dragger/index.js +1 -1
  67. package/src/{utils → components/commons}/components/fab/fab.js +50 -50
  68. package/src/{utils → components/commons}/components/fab/fab.scss +32 -32
  69. package/src/{utils → components/commons}/components/fab/index.js +1 -1
  70. package/src/components/commons/components/field-container/field-container.js +28 -0
  71. package/src/components/commons/components/field-container/field-container.scss +0 -0
  72. package/src/components/commons/components/field-container/index.js +1 -0
  73. package/src/components/commons/components/fieldset.js +14 -0
  74. package/src/components/commons/components/html-table/index.js +6 -0
  75. package/src/components/commons/components/html-table/table.js +26 -0
  76. package/src/components/commons/components/html-table/tbody.js +26 -0
  77. package/src/components/commons/components/html-table/td.js +33 -0
  78. package/src/components/commons/components/html-table/th.js +33 -0
  79. package/src/components/commons/components/html-table/thead.js +26 -0
  80. package/src/components/commons/components/html-table/tr.js +27 -0
  81. package/src/{utils → components/commons}/components/is-network/index.js +1 -1
  82. package/src/{utils → components/commons}/components/is-network/is-network.js +39 -39
  83. package/src/{utils → components/commons}/components/is-network/use-online-status.js +51 -51
  84. package/src/components/commons/components/label.js +15 -0
  85. package/src/components/commons/components/lunatic-component.js +56 -0
  86. package/src/components/commons/components/lunatic-fieldset-component.js +46 -0
  87. package/src/components/commons/components/md-label/index.js +1 -0
  88. package/src/components/commons/components/md-label/link.js +54 -0
  89. package/src/components/commons/components/md-label/md-label.js +21 -0
  90. package/src/components/commons/components/missing/index.js +1 -0
  91. package/src/components/commons/components/missing/missing.js +81 -0
  92. package/src/components/commons/components/missing/missing.scss +30 -0
  93. package/src/components/commons/components/nothing-to-display.js +7 -0
  94. package/src/components/commons/components/orchestrated-component.js +49 -0
  95. package/src/components/{tooltip → commons/components/variable-status}/img/edited.png +0 -0
  96. package/src/components/{tooltip → commons/components/variable-status}/img/forced.png +0 -0
  97. package/src/components/{tooltip → commons/components/variable-status}/img/index.js +4 -4
  98. package/src/components/commons/components/variable-status/index.js +1 -0
  99. package/src/components/commons/components/variable-status/variable-status.js +54 -0
  100. package/src/components/{tooltip/tooltip.scss → commons/components/variable-status/variable-status.scss} +12 -3
  101. package/src/components/commons/create-customizable-field.js +18 -0
  102. package/src/components/commons/create-row-orchestrator.js +48 -0
  103. package/src/components/commons/icons/checkbox-checked.icon.js +25 -0
  104. package/src/components/commons/icons/checkbox-unchecked.icon.js +25 -0
  105. package/src/{utils → components/commons}/icons/closed.icon.js +24 -24
  106. package/src/{utils → components/commons}/icons/cross.icon.js +24 -24
  107. package/src/components/commons/icons/index.js +10 -0
  108. package/src/{utils → components/commons}/icons/load.icon.js +24 -24
  109. package/src/{utils → components/commons}/icons/lunatic-icon.js +9 -9
  110. package/src/{utils → components/commons}/icons/lunatic-icon.scss +4 -4
  111. package/src/{utils → components/commons}/icons/network.icon.js +24 -24
  112. package/src/{utils → components/commons}/icons/on-drag.icon.js +24 -24
  113. package/src/{utils → components/commons}/icons/opened.icon.js +24 -24
  114. package/src/components/commons/icons/radio-checked.icon.js +25 -0
  115. package/src/components/commons/icons/radio-unchecked.icon.js +25 -0
  116. package/src/components/commons/index.js +18 -0
  117. package/src/{utils/lib → components/commons}/prop-types/declarations.js +22 -22
  118. package/src/{utils/lib → components/commons}/prop-types/index.js +5 -5
  119. package/src/{utils/lib → components/commons}/prop-types/lines.js +0 -0
  120. package/src/{utils/lib → components/commons}/prop-types/options.js +8 -8
  121. package/src/{utils/lib → components/commons}/prop-types/response.js +6 -6
  122. package/src/components/commons/prop-types/value-type.js +10 -0
  123. package/src/components/commons/safety-label.js +25 -0
  124. package/src/{utils/to-expose/hooks → components/commons}/use-document-add-event-listener.js +63 -63
  125. package/src/components/commons/use-on-handle-change.js +16 -0
  126. package/src/components/commons/use-options-keydown.js +22 -0
  127. package/src/components/commons/use-previous.js +11 -0
  128. package/src/components/components.js +7 -7
  129. package/src/components/datepicker/datepicker.js +27 -0
  130. package/src/components/datepicker/datepicker.scss +1 -1
  131. package/src/components/datepicker/index.js +1 -1
  132. package/src/components/datepicker/lunatic-datepicker.js +7 -0
  133. package/src/components/declarations/declaration.js +17 -0
  134. package/src/components/declarations/declarations-after-text.js +8 -0
  135. package/src/components/declarations/declarations-before-text.js +8 -0
  136. package/src/components/declarations/declarations-detachable.js +8 -0
  137. package/src/components/declarations/declarations.js +39 -0
  138. package/src/components/declarations/declarations.scss +3 -7
  139. package/src/components/declarations/index.js +4 -1
  140. package/src/components/dropdown/dropdown-simple/dropdown-simple.js +33 -0
  141. package/src/components/dropdown/dropdown-simple/index.js +1 -20
  142. package/src/components/dropdown/dropdown-simple/simple-label-renderer.js +31 -0
  143. package/src/components/dropdown/dropdown-simple/simple-option-renderer.js +27 -0
  144. package/src/components/dropdown/dropdown-writable/dropdown-writable.js +49 -0
  145. package/src/components/dropdown/dropdown-writable/filter-tools/filter-options.js +20 -0
  146. package/src/components/dropdown/dropdown-writable/filter-tools/letters-matching.js +16 -0
  147. package/src/components/dropdown/dropdown-writable/filter-tools/match.js +18 -0
  148. package/src/components/dropdown/dropdown-writable/filter-tools/prepare-prefix.js +9 -0
  149. package/src/components/dropdown/dropdown-writable/index.js +1 -0
  150. package/src/components/dropdown/dropdown-writable/writable-label-renderer.js +31 -0
  151. package/src/components/dropdown/dropdown-writable/writable-option-renderer.js +84 -0
  152. package/src/components/dropdown/dropdown.js +46 -0
  153. package/src/components/dropdown/dropdown.scss +18 -155
  154. package/src/components/dropdown/index.js +1 -1
  155. package/src/components/dropdown/lunatic-dropdown.js +55 -0
  156. package/src/components/filter-description/component.js +14 -42
  157. package/src/components/filter-description/index.js +1 -1
  158. package/src/components/index.js +3 -3
  159. package/src/components/index.scss +0 -38
  160. package/src/components/input/index.js +1 -2
  161. package/src/components/input/input.js +46 -9
  162. package/src/components/input/input.scss +3 -3
  163. package/src/components/input/lunatic-input.js +13 -0
  164. package/src/components/input-number/index.js +1 -0
  165. package/src/components/input-number/input-number.js +40 -0
  166. package/src/components/input-number/input-number.scss +0 -0
  167. package/src/components/input-number/lunatic-input-number.js +8 -0
  168. package/src/components/loop/block-for-loop/block-for-loop-ochestrator.js +6 -0
  169. package/src/components/loop/block-for-loop/block-for-loop.js +93 -0
  170. package/src/components/loop/block-for-loop/index.js +1 -0
  171. package/src/components/loop/block-for-loop/row.js +58 -0
  172. package/src/components/loop/commons/index.js +2 -0
  173. package/src/components/loop/commons/row-component.js +52 -0
  174. package/src/components/loop/index.js +1 -1
  175. package/src/components/loop/loop.js +81 -0
  176. package/src/components/loop/roster-for-loop/add-row-button.js +12 -0
  177. package/src/components/loop/roster-for-loop/body.js +46 -0
  178. package/src/components/loop/roster-for-loop/header.js +28 -0
  179. package/src/components/loop/roster-for-loop/index.js +1 -0
  180. package/src/components/loop/roster-for-loop/roster-for-loop-orchestrator.js +6 -0
  181. package/src/components/loop/roster-for-loop/roster-for-loop.js +92 -0
  182. package/src/components/loop/roster-for-loop/roster-table.js +43 -0
  183. package/src/components/loop/roster-for-loop/roster.scss +42 -0
  184. package/src/components/loop/roster-for-loop/row.js +67 -0
  185. package/src/components/modal-controls/close-or-skip.js +25 -0
  186. package/src/components/modal-controls/index.js +1 -0
  187. package/src/components/modal-controls/modal-container.js +13 -0
  188. package/src/components/modal-controls/modal-controls.js +42 -0
  189. package/src/components/modal-controls/modal-controls.scss +63 -0
  190. package/src/components/pairwise/block/index.js +1 -0
  191. package/src/components/pairwise/block/pairwise-block.js +5 -0
  192. package/src/components/pairwise/index.js +2 -0
  193. package/src/components/pairwise/links/index.js +1 -0
  194. package/src/components/pairwise/links/links-orchestrator.js +6 -0
  195. package/src/components/pairwise/links/pairwise-links.js +58 -0
  196. package/src/components/pairwise/links/row.js +59 -0
  197. package/src/components/radio/index.js +1 -1
  198. package/src/components/radio/lunatic-radio-group.js +23 -0
  199. package/src/components/radio/radio-group.js +34 -0
  200. package/src/components/radio/radio-option.js +89 -0
  201. package/src/components/radio/radio.scss +52 -52
  202. package/src/components/sequence/index.js +1 -1
  203. package/src/components/sequence/sequence.js +23 -0
  204. package/src/components/subsequence/index.js +1 -1
  205. package/src/components/subsequence/subsequence.js +25 -0
  206. package/src/components/suggester/check-store.js +70 -70
  207. package/src/components/suggester/idb-suggester.js +6 -4
  208. package/src/components/suggester/index.js +1 -1
  209. package/src/components/suggester/lunatic-suggester.js +38 -104
  210. package/src/components/suggester/suggester.js +117 -0
  211. package/src/components/suggester-loader-widget/index.js +1 -1
  212. package/src/components/suggester-loader-widget/loader-row.js +101 -102
  213. package/src/components/suggester-loader-widget/progress.js +25 -25
  214. package/src/components/suggester-loader-widget/tools/action-tool.js +20 -20
  215. package/src/components/suggester-loader-widget/tools/index.js +2 -2
  216. package/src/components/suggester-loader-widget/tools/tools.js +7 -7
  217. package/src/components/suggester-loader-widget/widget-container.js +35 -35
  218. package/src/components/suggester-loader-widget/widget.js +3 -3
  219. package/src/components/suggester-loader-widget/widget.scss +176 -176
  220. package/src/components/switch/index.js +1 -0
  221. package/src/components/switch/lunatic-switch.js +36 -0
  222. package/src/components/switch/switch.js +73 -0
  223. package/src/components/switch/switch.scss +47 -0
  224. package/src/components/table/cell.js +83 -0
  225. package/src/components/table/components/cell.js +83 -0
  226. package/src/components/table/components/header.js +36 -0
  227. package/src/components/table/components/row.js +38 -0
  228. package/src/components/table/components/table.js +21 -0
  229. package/src/components/table/{table.scss → components/table.scss} +1 -1
  230. package/src/components/table/index.js +1 -1
  231. package/src/components/table/lunatic-table.js +60 -0
  232. package/src/components/table/table-orchestrator.js +44 -0
  233. package/src/components/textarea/index.js +1 -1
  234. package/src/components/textarea/lunatic-textarea.js +23 -0
  235. package/src/components/textarea/textarea.js +41 -0
  236. package/src/constants/component-types.js +1 -1
  237. package/src/constants/declarations.js +14 -14
  238. package/src/constants/event-types.js +13 -13
  239. package/src/constants/index.js +5 -5
  240. package/src/constants/supported-preferences.js +10 -10
  241. package/src/constants/value-types.js +5 -5
  242. package/src/constants/variable-types.js +4 -4
  243. package/src/i18n/build-dictionary.js +43 -0
  244. package/src/i18n/dictionary.js +7 -0
  245. package/src/i18n/index.js +7 -0
  246. package/src/stories/Introduction.stories.mdx +114 -0
  247. package/src/stories/custom-mui/checkbox-boolean-mui.js +23 -0
  248. package/src/stories/custom-mui/checkbox-group-mui.js +63 -0
  249. package/src/stories/custom-mui/checkbox-one-mui.js +7 -0
  250. package/src/stories/custom-mui/index.js +15 -0
  251. package/src/stories/custom-mui/input-mui.js +50 -0
  252. package/src/stories/custom-mui/input-number-mui.js +36 -0
  253. package/src/stories/custom-mui/radio-mui.js +39 -0
  254. package/src/stories/custom-mui/suggester-mui/index.js +1 -0
  255. package/src/stories/custom-mui/suggester-mui/suggester-mui.js +285 -0
  256. package/src/stories/custom-mui/switch-mui.js +29 -0
  257. package/src/stories/custom-mui/table-mui.js +20 -0
  258. package/src/stories/custom-mui/tbody-mui.js +16 -0
  259. package/src/stories/custom-mui/td-mui.js +16 -0
  260. package/src/stories/custom-mui/textarea-mui.js +38 -0
  261. package/src/stories/custom-mui/th-mui.js +16 -0
  262. package/src/stories/custom-mui/thead-mui.js +16 -0
  263. package/src/stories/custom-mui/tr-mui.js +27 -0
  264. package/src/stories/input/data.json +5 -41
  265. package/src/stories/input/input.stories.js +18 -72
  266. package/src/stories/input/source.json +28 -0
  267. package/src/stories/pairwise/block/block.json +3 -0
  268. package/src/stories/pairwise/block/pairwise-block.stories.js +17 -0
  269. package/src/stories/pairwise/links/data.json +12 -0
  270. package/src/stories/pairwise/links/links.json +164 -0
  271. package/src/stories/pairwise/links/pairwise-links.stories.js +18 -0
  272. package/src/stories/{questionnaire/data-logement.json → questionnaires/logement/data.json} +0 -0
  273. package/src/stories/questionnaires/logement/logement.stories.js +50 -0
  274. package/src/stories/questionnaires/logement/source-sequence.json +29291 -0
  275. package/src/stories/questionnaires/logement/source.json +33450 -0
  276. package/src/stories/questionnaires/simpsons/simpsons.stories.js +39 -0
  277. package/src/stories/{pagination/simpsons-question.json → questionnaires/simpsons/source.json} +6290 -4952
  278. package/src/stories/suggester/{data-auto.json → source.json} +28 -26
  279. package/src/stories/suggester/suggester.stories.js +30 -123
  280. package/src/stories/{checkbox-one → switch}/README.md +31 -31
  281. package/src/stories/switch/SwitchMaterialUI.js +35 -0
  282. package/src/stories/{checkbox-boolean → switch}/data-forced.json +48 -48
  283. package/src/stories/{checkbox-boolean → switch}/data.json +5 -3
  284. package/src/stories/{checkbox-boolean/checkbox-boolean.stories.js → switch/switch.js} +72 -54
  285. package/src/stories/utils/custom-lunatic.scss +28 -23
  286. package/src/stories/utils/default-arg-types.js +29 -0
  287. package/src/stories/utils/options.js +25 -25
  288. package/src/stories/utils/orchestrator.js +86 -73
  289. package/src/stories/utils/waiting/index.js +1 -0
  290. package/src/stories/utils/waiting/preloader.svg +1 -0
  291. package/src/stories/utils/waiting/waiting.js +21 -0
  292. package/src/stories/utils/waiting/waiting.scss +21 -0
  293. package/src/tests/sample.spec.js +5 -0
  294. package/src/use-lunatic/actions.js +44 -0
  295. package/src/use-lunatic/commons/check-loops.js +61 -0
  296. package/src/use-lunatic/commons/create-map-pages.js +69 -0
  297. package/src/use-lunatic/commons/execute-condition-filter.js +16 -0
  298. package/src/use-lunatic/commons/execute-expression/create-execute-expression.js +188 -0
  299. package/src/use-lunatic/commons/execute-expression/create-memoizer.js +42 -0
  300. package/src/use-lunatic/commons/execute-expression/create-refresh-calculated.js +98 -0
  301. package/src/use-lunatic/commons/execute-expression/execute-expression.js +69 -0
  302. package/src/use-lunatic/commons/execute-expression/get-expressions-variables.js +22 -0
  303. package/src/use-lunatic/commons/execute-expression/get-safety-expression.js +19 -0
  304. package/src/use-lunatic/commons/execute-expression/index.js +1 -0
  305. package/src/use-lunatic/commons/fill-components/fill-component-expressions.js +129 -0
  306. package/src/use-lunatic/commons/fill-components/fill-component-value.js +8 -0
  307. package/src/use-lunatic/commons/fill-components/fill-components.js +34 -0
  308. package/src/use-lunatic/commons/fill-components/fill-errors.js +13 -0
  309. package/src/use-lunatic/commons/fill-components/fill-from-state.js +6 -0
  310. package/src/use-lunatic/commons/fill-components/fill-management.js +9 -0
  311. package/src/use-lunatic/commons/fill-components/fill-missing-response.js +22 -0
  312. package/src/use-lunatic/commons/fill-components/fill-pagination.js +8 -0
  313. package/src/use-lunatic/commons/fill-components/index.js +1 -0
  314. package/src/use-lunatic/commons/get-compatible-vtl-expression.js +16 -0
  315. package/src/use-lunatic/commons/get-component-value/get-component-value.js +118 -0
  316. package/src/use-lunatic/commons/get-component-value/index.js +1 -0
  317. package/src/use-lunatic/commons/get-components-from-state.js +24 -0
  318. package/src/use-lunatic/commons/get-page-tag.js +10 -0
  319. package/src/use-lunatic/commons/index.js +12 -0
  320. package/src/use-lunatic/commons/is-First-last-page.js +8 -0
  321. package/src/use-lunatic/commons/is-paginated-loop.js +6 -0
  322. package/src/use-lunatic/commons/load-suggesters.js +59 -0
  323. package/src/use-lunatic/commons/use-components-from-state.js +20 -0
  324. package/src/use-lunatic/index.js +1 -0
  325. package/src/use-lunatic/initial-state.js +31 -0
  326. package/src/use-lunatic/reducer/commons/Insee.code-workspace +47 -0
  327. package/src/use-lunatic/reducer/commons/index.js +3 -0
  328. package/src/use-lunatic/reducer/commons/is-empty-on-empty-page.js +29 -0
  329. package/src/use-lunatic/reducer/commons/resize-array-variable.js +28 -0
  330. package/src/use-lunatic/reducer/commons/validate-condition-filter.js +20 -0
  331. package/src/use-lunatic/reducer/index.js +1 -0
  332. package/src/use-lunatic/reducer/reduce-go-next-page.js +135 -0
  333. package/src/use-lunatic/reducer/reduce-go-previous-page.js +133 -0
  334. package/src/use-lunatic/reducer/reduce-handle-change/index.js +1 -0
  335. package/src/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +44 -0
  336. package/src/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +89 -0
  337. package/src/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.js +18 -0
  338. package/src/use-lunatic/reducer/reduce-handle-change/reduce-missing.js +47 -0
  339. package/src/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +91 -0
  340. package/src/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.js +22 -0
  341. package/src/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.js +13 -0
  342. package/src/use-lunatic/reducer/reduce-on-init.js +183 -0
  343. package/src/use-lunatic/reducer/reduce-on-set-waiting.js +7 -0
  344. package/src/use-lunatic/reducer/reducer.js +26 -0
  345. package/src/use-lunatic/reducer/validate-controls/create-validate-reducer.js +86 -0
  346. package/src/use-lunatic/reducer/validate-controls/index.js +1 -0
  347. package/src/use-lunatic/use-lunatic.js +155 -0
  348. package/src/utils/constants/features.js +3 -0
  349. package/src/utils/constants/index.js +5 -0
  350. package/src/utils/constants/links.js +2 -0
  351. package/src/utils/constants/missing.js +2 -0
  352. package/src/utils/constants/variable-status.js +5 -0
  353. package/src/utils/constants/variable-types.js +1 -0
  354. package/src/utils/idb-tools/clear-store.js +16 -16
  355. package/src/utils/idb-tools/get-entity.js +15 -15
  356. package/src/utils/idb-tools/get-idb.js +12 -12
  357. package/src/utils/is-element.js +7 -0
  358. package/src/utils/store-tools/clear-store-data.js +8 -8
  359. package/src/utils/store-tools/clear-store-info.js +8 -8
  360. package/src/utils/store-tools/constantes.js +20 -20
  361. package/src/utils/store-tools/create/create.js +19 -19
  362. package/src/utils/store-tools/create/index.js +2 -1
  363. package/src/utils/store-tools/create/update-store-info.js +26 -26
  364. package/src/utils/store-tools/get-store-count.js +22 -22
  365. package/src/utils/store-tools/index.js +7 -5
  366. package/src/utils/store-tools/open-or-create-store.js +47 -47
  367. package/src/utils/store-tools/use-store-index.js +24 -24
  368. package/src/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +5 -1
  369. package/src/utils/suggester-workers/commons-tokenizer/index.js +1 -0
  370. package/src/utils/suggester-workers/create-worker.js +0 -1
  371. package/src/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +7 -1
  372. package/src/utils/vtl/dataset-builder.js +17 -0
  373. package/src/utils/vtl/index.js +1 -0
  374. package/src/components/breadcrumb/breadcrumb.scss +0 -22
  375. package/src/components/breadcrumb/component.js +0 -29
  376. package/src/components/breadcrumb/index.js +0 -1
  377. package/src/components/button/component.js +0 -53
  378. package/src/components/checkbox/boolean.js +0 -172
  379. package/src/components/checkbox/group.js +0 -231
  380. package/src/components/checkbox/one.js +0 -11
  381. package/src/components/component-wrapper/controls/component.js +0 -70
  382. package/src/components/component-wrapper/controls/controls.scss +0 -6
  383. package/src/components/component-wrapper/controls/index.js +0 -1
  384. package/src/components/component-wrapper/controls/validators/datepicker.js +0 -44
  385. package/src/components/component-wrapper/controls/validators/index.js +0 -16
  386. package/src/components/component-wrapper/controls/validators/input-number.js +0 -23
  387. package/src/components/component-wrapper/index.js +0 -1
  388. package/src/components/component-wrapper/missing/component.js +0 -200
  389. package/src/components/component-wrapper/missing/index.js +0 -1
  390. package/src/components/component-wrapper/missing/missing.scss +0 -32
  391. package/src/components/component-wrapper/wrapper.js +0 -23
  392. package/src/components/datepicker/component.js +0 -26
  393. package/src/components/declarations/component.js +0 -46
  394. package/src/components/declarations/wrappers/index.js +0 -3
  395. package/src/components/declarations/wrappers/input-declarations-wrapper.js +0 -303
  396. package/src/components/declarations/wrappers/list-declarations-wrapper.js +0 -232
  397. package/src/components/declarations/wrappers/simple-declarations-wrapper.js +0 -54
  398. package/src/components/dropdown/commons/actions.js +0 -65
  399. package/src/components/dropdown/commons/children-to-option.js +0 -9
  400. package/src/components/dropdown/commons/cleaner-callbacks.js +0 -58
  401. package/src/components/dropdown/commons/components/dropdown-container.js +0 -29
  402. package/src/components/dropdown/commons/components/dropdown-field.js +0 -46
  403. package/src/components/dropdown/commons/components/dropdown.js +0 -183
  404. package/src/components/dropdown/commons/components/label.js +0 -28
  405. package/src/components/dropdown/commons/components/panel.js +0 -78
  406. package/src/components/dropdown/commons/event-callbacks/index.js +0 -5
  407. package/src/components/dropdown/commons/event-callbacks/on-keydown-callback.js +0 -29
  408. package/src/components/dropdown/commons/event-callbacks/on-mousedown-callback.js +0 -15
  409. package/src/components/dropdown/commons/reducer.js +0 -152
  410. package/src/components/dropdown/commons/tools/index.js +0 -17
  411. package/src/components/dropdown/component.js +0 -135
  412. package/src/components/dropdown/dropdown-edit/dropdown-edit.js +0 -191
  413. package/src/components/dropdown/dropdown-edit/icone.js +0 -33
  414. package/src/components/dropdown/dropdown-edit/index.js +0 -11
  415. package/src/components/dropdown/dropdown-edit/option.js +0 -62
  416. package/src/components/dropdown/dropdown-edit/prefix-tools.js +0 -51
  417. package/src/components/dropdown/dropdown-simple/dropdown.js +0 -171
  418. package/src/components/dropdown/dropdown-simple/option.js +0 -15
  419. package/src/components/icon/assets/checkbox-checked.js +0 -16
  420. package/src/components/icon/assets/checkbox-unchecked.js +0 -16
  421. package/src/components/icon/assets/index.js +0 -4
  422. package/src/components/icon/assets/radio-checked.js +0 -16
  423. package/src/components/icon/assets/radio-unchecked.js +0 -16
  424. package/src/components/icon/component.js +0 -33
  425. package/src/components/icon/icon.scss +0 -15
  426. package/src/components/icon/index.js +0 -1
  427. package/src/components/input/input-number.js +0 -28
  428. package/src/components/loop/component.js +0 -170
  429. package/src/components/loop/loop.scss +0 -13
  430. package/src/components/loop/wrapper.js +0 -15
  431. package/src/components/loop-constructor/block/block.scss +0 -10
  432. package/src/components/loop-constructor/block/component.js +0 -9
  433. package/src/components/loop-constructor/block/index.js +0 -1
  434. package/src/components/loop-constructor/index.js +0 -1
  435. package/src/components/loop-constructor/roster/component.js +0 -8
  436. package/src/components/loop-constructor/roster/index.js +0 -1
  437. package/src/components/loop-constructor/wrapper/body-component.js +0 -134
  438. package/src/components/loop-constructor/wrapper/build-components.js +0 -33
  439. package/src/components/loop-constructor/wrapper/component.js +0 -190
  440. package/src/components/loop-constructor/wrapper/index.js +0 -1
  441. package/src/components/modal/component.js +0 -36
  442. package/src/components/modal/index.js +0 -1
  443. package/src/components/modal/modal.scss +0 -33
  444. package/src/components/progress-bar/component.js +0 -28
  445. package/src/components/progress-bar/index.js +0 -1
  446. package/src/components/progress-bar/progress-bar.scss +0 -54
  447. package/src/components/radio/component.js +0 -9
  448. package/src/components/sequence/component.js +0 -50
  449. package/src/components/subsequence/component.js +0 -49
  450. package/src/components/suggester/commons-tools/index.js +0 -1
  451. package/src/components/suggester/components/create-on-keydown-callback.js +0 -28
  452. package/src/components/suggester/components/index.js +0 -2
  453. package/src/components/suggester/components/panel/index.js +0 -2
  454. package/src/components/suggester/components/selection/delete.js +0 -38
  455. package/src/components/suggester/components/selection/label.js +0 -35
  456. package/src/components/suggester/components/selection/selection.js +0 -50
  457. package/src/components/suggester/components/suggester-content.js +0 -42
  458. package/src/components/suggester/components/suggester.js +0 -88
  459. package/src/components/suggester/components/suggester.scss +0 -101
  460. package/src/components/suggester/state-management/actions.js +0 -38
  461. package/src/components/suggester/state-management/index.js +0 -6
  462. package/src/components/suggester/state-management/intial-state.js +0 -13
  463. package/src/components/suggester/state-management/reducer/reduce-on-blur.js +0 -5
  464. package/src/components/suggester/state-management/reducer/reduce-on-click-option.js +0 -8
  465. package/src/components/suggester/state-management/reducer/reduce-on-delete-search.js +0 -11
  466. package/src/components/suggester/state-management/reducer/reduce-on-error.js +0 -8
  467. package/src/components/suggester/state-management/reducer/reduce-on-focus.js +0 -5
  468. package/src/components/suggester/state-management/reducer/reduce-on-init.js +0 -29
  469. package/src/components/suggester/state-management/reducer/reduce-on-key-down.js +0 -73
  470. package/src/components/suggester/state-management/reducer/reduce-on-unexpected-error.js +0 -7
  471. package/src/components/suggester/state-management/reducer/reduce-on-update-options.js +0 -11
  472. package/src/components/suggester/state-management/reducer/reducer.js +0 -38
  473. package/src/components/suggester/state-management/suggester-context.js +0 -4
  474. package/src/components/suggester/state-management/use-dispatch.js +0 -11
  475. package/src/components/suggester/suggester-wrapper.js +0 -121
  476. package/src/components/table/table.js +0 -173
  477. package/src/components/textarea/component.js +0 -11
  478. package/src/components/tooltip/index.js +0 -1
  479. package/src/components/tooltip/response.js +0 -52
  480. package/src/stories/breadcrumb/README.md +0 -14
  481. package/src/stories/breadcrumb/breadcrumb.stories.js +0 -21
  482. package/src/stories/button/README.md +0 -14
  483. package/src/stories/button/button.stories.js +0 -27
  484. package/src/stories/checkbox-boolean/README.md +0 -27
  485. package/src/stories/checkbox-group/README.md +0 -29
  486. package/src/stories/checkbox-group/checkbox-group.stories.js +0 -60
  487. package/src/stories/checkbox-group/data-forced.json +0 -89
  488. package/src/stories/checkbox-group/data-vtl.json +0 -102
  489. package/src/stories/checkbox-group/data.json +0 -89
  490. package/src/stories/checkbox-one/checkbox-one.stories.js +0 -57
  491. package/src/stories/checkbox-one/data-forced.json +0 -33
  492. package/src/stories/checkbox-one/data-vtl.json +0 -48
  493. package/src/stories/checkbox-one/data.json +0 -33
  494. package/src/stories/datepicker/README.md +0 -31
  495. package/src/stories/datepicker/data-forced.json +0 -28
  496. package/src/stories/datepicker/data.json +0 -45
  497. package/src/stories/datepicker/datepicker.stories.js +0 -60
  498. package/src/stories/declarations/README.md +0 -19
  499. package/src/stories/declarations/declarations.stories.js +0 -116
  500. package/src/stories/dropdown/README.md +0 -44
  501. package/src/stories/dropdown/data-forced.json +0 -81
  502. package/src/stories/dropdown/data-naf.json +0 -6963
  503. package/src/stories/dropdown/data-props.json +0 -111
  504. package/src/stories/dropdown/data.json +0 -98
  505. package/src/stories/dropdown/dropdown.stories.js +0 -89
  506. package/src/stories/filter-description/README.md +0 -15
  507. package/src/stories/filter-description/filter-description.stories.js +0 -53
  508. package/src/stories/icons/icons.stories.js +0 -16
  509. package/src/stories/icons/lunatic-icon.scss +0 -10
  510. package/src/stories/input/README.md +0 -33
  511. package/src/stories/input/data-forced.json +0 -41
  512. package/src/stories/input-number/README.md +0 -37
  513. package/src/stories/input-number/data-forced.json +0 -27
  514. package/src/stories/input-number/data.json +0 -42
  515. package/src/stories/input-number/input-number.stories.js +0 -81
  516. package/src/stories/loop/README.md +0 -25
  517. package/src/stories/loop/loop.stories.js +0 -88
  518. package/src/stories/loop/with-loop/data-loop-deeper.json +0 -298
  519. package/src/stories/loop/with-loop/data-loop.json +0 -336
  520. package/src/stories/loop/with-loop/index.js +0 -2
  521. package/src/stories/loop/with-roster/data-forced.json +0 -213
  522. package/src/stories/loop/with-roster/data-loop-deeper.json +0 -298
  523. package/src/stories/loop/with-roster/data-loop.json +0 -288
  524. package/src/stories/loop/with-roster/index.js +0 -3
  525. package/src/stories/loop-constructor/README.md +0 -27
  526. package/src/stories/loop-constructor/data-input-forced.json +0 -64
  527. package/src/stories/loop-constructor/data-input.json +0 -100
  528. package/src/stories/loop-constructor/data-loop-forced.json +0 -66
  529. package/src/stories/loop-constructor/data-loop-static-forced.json +0 -66
  530. package/src/stories/loop-constructor/data-loop-static.json +0 -81
  531. package/src/stories/loop-constructor/data-loop.json +0 -81
  532. package/src/stories/loop-constructor/data-roster-forced.json +0 -68
  533. package/src/stories/loop-constructor/data-roster.json +0 -83
  534. package/src/stories/loop-constructor/loop-constructor.stories.js +0 -180
  535. package/src/stories/pagination/deeper-loop.json +0 -327
  536. package/src/stories/pagination/pagination.stories.js +0 -60
  537. package/src/stories/pagination/simple-loop.json +0 -277
  538. package/src/stories/pagination/simpsons-sequence.json +0 -4362
  539. package/src/stories/progress-bar/README.md +0 -13
  540. package/src/stories/progress-bar/progress-bar.stories.js +0 -24
  541. package/src/stories/questionnaire/arithmetic-management.json +0 -47
  542. package/src/stories/questionnaire/arithmetic.json +0 -247
  543. package/src/stories/questionnaire/calc-var.json +0 -187
  544. package/src/stories/questionnaire/logement-queen.json +0 -23390
  545. package/src/stories/questionnaire/logement-s2.json +0 -44537
  546. package/src/stories/questionnaire/logement-sequence.json +0 -26742
  547. package/src/stories/questionnaire/logement.json +0 -21073
  548. package/src/stories/questionnaire/questionnaire.stories.js +0 -205
  549. package/src/stories/questionnaire/simpsons.json +0 -4816
  550. package/src/stories/questionnaire/update-external/data.json +0 -1
  551. package/src/stories/questionnaire/update-external/questionnaire.json +0 -75
  552. package/src/stories/radio/README.md +0 -31
  553. package/src/stories/radio/data-forced.json +0 -32
  554. package/src/stories/radio/data-vtl.json +0 -47
  555. package/src/stories/radio/data.json +0 -32
  556. package/src/stories/radio/radio.stories.js +0 -64
  557. package/src/stories/sequence/README.md +0 -18
  558. package/src/stories/sequence/sequence.stories.js +0 -32
  559. package/src/stories/subsequence/README.md +0 -18
  560. package/src/stories/subsequence/subsequence.stories.js +0 -32
  561. package/src/stories/suggester/README.md +0 -46
  562. package/src/stories/suggester/bailleurs-sociaux/fetch-bailleurs.js +0 -15
  563. package/src/stories/suggester/bailleurs-sociaux/index.js +0 -2
  564. package/src/stories/suggester/bailleurs-sociaux/option-bailleur-renderer.js +0 -58
  565. package/src/stories/suggester/bailleurs-sociaux/preloader.svg +0 -52
  566. package/src/stories/suggester/bailleurs-sociaux/theme.scss +0 -22
  567. package/src/stories/suggester/cog-communes/fetch-cog.js +0 -15
  568. package/src/stories/suggester/cog-communes/index.js +0 -2
  569. package/src/stories/suggester/cog-communes/option-cog-renderer.js +0 -15
  570. package/src/stories/suggester/cog-communes/theme.scss +0 -12
  571. package/src/stories/suggester/data-vtl.json +0 -82
  572. package/src/stories/suggester/data.json +0 -139
  573. package/src/stories/suggester/naf-rev2/fetch-naf.js +0 -57
  574. package/src/stories/suggester/naf-rev2/index.js +0 -2
  575. package/src/stories/suggester/naf-rev2/option-naf-renderer.js +0 -17
  576. package/src/stories/suggester/naf-rev2/theme.scss +0 -36
  577. package/src/stories/suggester/suggester-workers.stories.js +0 -182
  578. package/src/stories/table/README.md +0 -29
  579. package/src/stories/table/data-default.json +0 -19
  580. package/src/stories/table/data-one-axis-one-measure.json +0 -139
  581. package/src/stories/table/data-one-axis-two-measures.json +0 -208
  582. package/src/stories/table/data-one-hierarchical-axis.json +0 -219
  583. package/src/stories/table/data-roster.json +0 -486
  584. package/src/stories/table/data-two-axis-one-measure.json +0 -507
  585. package/src/stories/table/table.stories.js +0 -82
  586. package/src/stories/textarea/README.md +0 -33
  587. package/src/stories/textarea/data-forced.json +0 -28
  588. package/src/stories/textarea/data.json +0 -43
  589. package/src/stories/textarea/textarea.stories.js +0 -68
  590. package/src/stories/tooltip-response/README.md +0 -14
  591. package/src/stories/tooltip-response/md-link.json +0 -31
  592. package/src/stories/tooltip-response/md-tooltip.json +0 -31
  593. package/src/stories/tooltip-response/tooltip.stories.js +0 -83
  594. package/src/stories/utils/img/arrow.png +0 -0
  595. package/src/stories/utils/img/check_box.svg +0 -1
  596. package/src/stories/utils/img/check_box_outline.svg +0 -1
  597. package/src/stories/utils/img/lunatic-logo.png +0 -0
  598. package/src/stories/utils/img/menu-down.svg +0 -1
  599. package/src/stories/utils/img/menu-up.svg +0 -1
  600. package/src/stories/utils/img/radio_button_checked.svg +0 -1
  601. package/src/stories/utils/img/radio_button_unchecked.svg +0 -1
  602. package/src/stories/utils/orchestrator-split.js +0 -117
  603. package/src/tests/components/breadcrumb.spec.js +0 -13
  604. package/src/tests/components/button.spec.js +0 -11
  605. package/src/tests/components/checkbox-boolean.spec.js +0 -45
  606. package/src/tests/components/checkbox-group.spec.js +0 -53
  607. package/src/tests/components/checkbox-one.spec.js +0 -32
  608. package/src/tests/components/datepicker.spec.js +0 -22
  609. package/src/tests/components/declarations-wrappers/input-declarations-wrapper.spec.js +0 -67
  610. package/src/tests/components/declarations-wrappers/list-declarations-wrapper.spec.js +0 -52
  611. package/src/tests/components/declarations-wrappers/simple-declarations-wrapper.spec.js +0 -21
  612. package/src/tests/components/declarations.spec.js +0 -46
  613. package/src/tests/components/input-number.spec.js +0 -188
  614. package/src/tests/components/input.spec.js +0 -18
  615. package/src/tests/components/loops/loop-static.json +0 -66
  616. package/src/tests/components/loops/loop.json +0 -258
  617. package/src/tests/components/loops/loop.spec.js +0 -30
  618. package/src/tests/components/loops/roster-for-loop.spec.js +0 -18
  619. package/src/tests/components/loops/roster-loop.json +0 -71
  620. package/src/tests/components/missing-wrapper.spec.js +0 -32
  621. package/src/tests/components/progress-bar.spec.js +0 -15
  622. package/src/tests/components/radio.spec.js +0 -27
  623. package/src/tests/components/sequence.spec.js +0 -9
  624. package/src/tests/components/subsequence.spec.js +0 -9
  625. package/src/tests/components/table.spec.js +0 -11
  626. package/src/tests/components/textarea.spec.js +0 -18
  627. package/src/tests/components/tooltip.spec.js +0 -25
  628. package/src/tests/setup/setupTests.js +0 -4
  629. package/src/tests/utils/lib/alphabet.spec.js +0 -36
  630. package/src/tests/utils/lib/array.spec.js +0 -22
  631. package/src/tests/utils/lib/checkbox/group.spec.js +0 -72
  632. package/src/tests/utils/lib/decorator/title-decorator.spec.js +0 -12
  633. package/src/tests/utils/lib/input-number.spec.js +0 -18
  634. package/src/tests/utils/lib/items-positioning.spec.js +0 -17
  635. package/src/tests/utils/lib/label-position.spec.js +0 -22
  636. package/src/tests/utils/lib/loops/bindings.spec.js +0 -75
  637. package/src/tests/utils/lib/loops/shared.spec.js +0 -82
  638. package/src/tests/utils/lib/missing/missing.spec.js +0 -74
  639. package/src/tests/utils/lib/missing/mock.js +0 -137
  640. package/src/tests/utils/lib/pagination/shared.spec.js +0 -42
  641. package/src/tests/utils/lib/responses.spec.js +0 -64
  642. package/src/tests/utils/lib/style.spec.js +0 -26
  643. package/src/tests/utils/lib/table/roster.spec.js +0 -25
  644. package/src/tests/utils/lib/tooltip/build-response.spec.js +0 -95
  645. package/src/tests/utils/lib/tooltip/content.spec.js +0 -109
  646. package/src/tests/utils/to-expose/handler/handler.spec.js +0 -94
  647. package/src/tests/utils/to-expose/handler/questionnaire.json +0 -158
  648. package/src/tests/utils/to-expose/handler/results/index.js +0 -6
  649. package/src/tests/utils/to-expose/handler/results/res-double.json +0 -158
  650. package/src/tests/utils/to-expose/handler/results/res-input-collected.json +0 -158
  651. package/src/tests/utils/to-expose/handler/results/res-input-edited.json +0 -158
  652. package/src/tests/utils/to-expose/handler/results/res-loop.json +0 -158
  653. package/src/tests/utils/to-expose/handler/results/res-matrix.json +0 -158
  654. package/src/tests/utils/to-expose/handler/results/res-responses.json +0 -158
  655. package/src/tests/utils/to-expose/hooks/use-lunatic.spec.js +0 -46
  656. package/src/tests/utils/to-expose/init-questionnaire/data.json +0 -12
  657. package/src/tests/utils/to-expose/init-questionnaire/init-questionnaire.spec.js +0 -19
  658. package/src/tests/utils/to-expose/init-questionnaire/questionnaire.json +0 -148
  659. package/src/tests/utils/to-expose/init-questionnaire/result.json +0 -181
  660. package/src/tests/utils/to-expose/interpret/interpret.spec.js +0 -48
  661. package/src/tests/utils/to-expose/state/questionnaire.json +0 -61
  662. package/src/tests/utils/to-expose/state/results.js +0 -78
  663. package/src/tests/utils/to-expose/state/state.spec.js +0 -59
  664. package/src/utils/components/field-wrapper.js +0 -23
  665. package/src/utils/components/label-wrapper.js +0 -45
  666. package/src/utils/lib/alphabet.js +0 -1
  667. package/src/utils/lib/array.js +0 -7
  668. package/src/utils/lib/checkbox/group.js +0 -21
  669. package/src/utils/lib/checkbox/index.js +0 -1
  670. package/src/utils/lib/controls/index.js +0 -1
  671. package/src/utils/lib/controls/utils.js +0 -146
  672. package/src/utils/lib/decorator/index.js +0 -1
  673. package/src/utils/lib/decorator/title-decorator.js +0 -16
  674. package/src/utils/lib/env.js +0 -2
  675. package/src/utils/lib/event.js +0 -15
  676. package/src/utils/lib/function.js +0 -1
  677. package/src/utils/lib/index.js +0 -21
  678. package/src/utils/lib/input-number.js +0 -6
  679. package/src/utils/lib/label-position.js +0 -12
  680. package/src/utils/lib/loops/bindings.js +0 -66
  681. package/src/utils/lib/loops/build-components.js +0 -33
  682. package/src/utils/lib/loops/index.js +0 -3
  683. package/src/utils/lib/loops/shared.js +0 -55
  684. package/src/utils/lib/memo-check.js +0 -24
  685. package/src/utils/lib/missing.js +0 -52
  686. package/src/utils/lib/options-positioning.js +0 -9
  687. package/src/utils/lib/pagination/flow.js +0 -2
  688. package/src/utils/lib/pagination/index.js +0 -2
  689. package/src/utils/lib/pagination/navigation/index.js +0 -1
  690. package/src/utils/lib/pagination/navigation/shared.js +0 -256
  691. package/src/utils/lib/prop-types/value-type.js +0 -9
  692. package/src/utils/lib/responses.js +0 -11
  693. package/src/utils/lib/splitting.js +0 -110
  694. package/src/utils/lib/table/index.js +0 -1
  695. package/src/utils/lib/table/roster.js +0 -23
  696. package/src/utils/lib/tooltip/build-response.js +0 -41
  697. package/src/utils/lib/tooltip/content.js +0 -55
  698. package/src/utils/lib/tooltip/index.js +0 -6
  699. package/src/utils/to-expose/calculated-variables.js +0 -113
  700. package/src/utils/to-expose/handler.js +0 -151
  701. package/src/utils/to-expose/hooks/filter-components.js +0 -106
  702. package/src/utils/to-expose/hooks/index.js +0 -2
  703. package/src/utils/to-expose/hooks/lunatic-split.js +0 -407
  704. package/src/utils/to-expose/hooks/lunatic.js +0 -263
  705. package/src/utils/to-expose/index.js +0 -11
  706. package/src/utils/to-expose/init-questionnaire.js +0 -164
  707. package/src/utils/to-expose/interpret/index.js +0 -1
  708. package/src/utils/to-expose/interpret/main.js +0 -16
  709. package/src/utils/to-expose/interpret/md.js +0 -65
  710. package/src/utils/to-expose/interpret/vtl.js +0 -18
  711. package/src/utils/to-expose/state.js +0 -66
@@ -1,111 +0,0 @@
1
- {
2
- "components": [
3
- {
4
- "id": "j4nw5cqz",
5
- "componentType": "Dropdown",
6
- "mandatory": false,
7
- "label": "\"In which state do The \" || NAME || \" reside?\"",
8
- "response": {
9
- "name": "STATE"
10
- },
11
- "missingResponse": {
12
- "name": "STATE_MISSING"
13
- },
14
- "options": [
15
- {
16
- "value": "1",
17
- "label": "Washington Washington Washington Washington Washington Washington"
18
- },
19
- { "value": "2", "label": "Kentucky" },
20
- { "value": "3", "label": "Ohio" },
21
- { "value": "4", "label": "Maine" },
22
- { "value": "5", "label": "North Dakota" },
23
- { "value": "6", "label": "Florida" },
24
- { "value": "7", "label": "North Takoma" },
25
- { "value": "8", "label": "California" },
26
- { "value": "9", "label": "TEXAS" },
27
- { "value": "10", "label": "Massachusetts" },
28
- { "value": "11", "label": "Nevada" },
29
- { "value": "12", "label": "Illinois" },
30
- { "value": "13", "label": "Not in any state, you fool!" }
31
- ]
32
- },
33
- {
34
- "id": "j4nw5cqz-bis",
35
- "componentType": "Dropdown",
36
- "mandatory": false,
37
- "label": "\"In which state do The \" || NAME || \" reside?\"",
38
- "response": {
39
- "name": "STATE2"
40
- },
41
- "missingResponse": {
42
- "name": "STATE2_MISSING"
43
- },
44
- "options": [
45
- { "value": "1", "label": "Washington" },
46
- { "value": "2", "label": "Kentucky" },
47
- { "value": "3", "label": "Ohio" },
48
- { "value": "4", "label": "Maine" },
49
- { "value": "5", "label": "North Dakota" },
50
- { "value": "6", "label": "Florida" },
51
- { "value": "7", "label": "North Takoma" },
52
- { "value": "8", "label": "California" },
53
- { "value": "9", "label": "TEXAS" },
54
- { "value": "10", "label": "Massachusetts" },
55
- { "value": "11", "label": "Nevada" },
56
- { "value": "12", "label": "Illinois" },
57
- { "value": "13", "label": "Not in any state, you fool!" }
58
- ]
59
- }
60
- ],
61
- "variables": [
62
- {
63
- "variableType": "COLLECTED",
64
- "name": "STATE",
65
- "componentRef": "j4nw5cqz",
66
- "values": {
67
- "PREVIOUS": null,
68
- "COLLECTED": "2",
69
- "FORCED": "3",
70
- "EDITED": null,
71
- "INPUTED": null
72
- }
73
- },
74
- {
75
- "variableType": "COLLECTED",
76
- "name": "STATE_MISSING",
77
- "componentRef": "j4nw5cqz",
78
- "values": {
79
- "PREVIOUS": null,
80
- "COLLECTED": null,
81
- "FORCED": null,
82
- "EDITED": null,
83
- "INPUTED": null
84
- }
85
- },
86
- {
87
- "variableType": "COLLECTED",
88
- "name": "STATE2",
89
- "componentRef": "j4nw5cqz-bis",
90
- "values": {
91
- "PREVIOUS": null,
92
- "COLLECTED": "3",
93
- "FORCED": "2",
94
- "EDITED": null,
95
- "INPUTED": null
96
- }
97
- },
98
- {
99
- "variableType": "COLLECTED",
100
- "name": "STATE2_MISSING",
101
- "componentRef": "j4nw5cqz-bis",
102
- "values": {
103
- "PREVIOUS": null,
104
- "COLLECTED": null,
105
- "FORCED": null,
106
- "EDITED": null,
107
- "INPUTED": null
108
- }
109
- }
110
- ]
111
- }
@@ -1,98 +0,0 @@
1
- {
2
- "components": [
3
- {
4
- "id": "j4nw5cqz",
5
- "componentType": "Dropdown",
6
- "mandatory": false,
7
- "label": "In which state do The Simpsons reside?",
8
- "response": {
9
- "name": "STATE"
10
- },
11
- "declarations": [
12
- {
13
- "id": "d1",
14
- "declarationType": "COMMENT",
15
- "position": "BEFORE_QUESTION_TEXT",
16
- "label": "Test declaration before"
17
- },
18
- {
19
- "id": "d2",
20
- "declarationType": "COMMENT",
21
- "position": "AFTER_QUESTION_TEXT",
22
- "label": "Test declaration after"
23
- },
24
- {
25
- "id": "d3",
26
- "declarationType": "COMMENT",
27
- "position": "DETACHABLE",
28
- "label": "Test detachable declaration"
29
- }
30
- ],
31
- "options": [
32
- { "value": "1", "label": "Washington" },
33
- { "value": "2", "label": "Kentucky" },
34
- { "value": "3", "label": "Ohio" },
35
- { "value": "4", "label": "Maine" },
36
- { "value": "5", "label": "North Dakota" },
37
- { "value": "6", "label": "Florida" },
38
- { "value": "7", "label": "North Takoma" },
39
- { "value": "8", "label": "California" },
40
- { "value": "9", "label": "Texas" },
41
- { "value": "10", "label": "Massachusetts" },
42
- { "value": "11", "label": "Nevada" },
43
- { "value": "12", "label": "Illinois" },
44
- { "value": "13", "label": "Not in any state, you fool!" }
45
- ]
46
- },
47
- {
48
- "id": "j4nw5cqz-bis",
49
- "componentType": "Dropdown",
50
- "mandatory": false,
51
- "label": "In which state do The Simpsons reside?",
52
- "response": {
53
- "name": "STATE2"
54
- },
55
- "options": [
56
- { "value": "1", "label": "Washington" },
57
- { "value": "2", "label": "Kentucky" },
58
- { "value": "3", "label": "Ohio" },
59
- { "value": "4", "label": "Maine" },
60
- { "value": "5", "label": "North Dakota" },
61
- { "value": "6", "label": "Florida" },
62
- { "value": "7", "label": "North Takoma" },
63
- { "value": "8", "label": "California" },
64
- { "value": "9", "label": "Texas" },
65
- { "value": "10", "label": "Massachusetts" },
66
- { "value": "11", "label": "Nevada" },
67
- { "value": "12", "label": "Illinois" },
68
- { "value": "13", "label": "Not in any state, you fool!" }
69
- ]
70
- }
71
- ],
72
- "variables": [
73
- {
74
- "variableType": "COLLECTED",
75
- "name": "STATE",
76
- "componentRef": "j4nw5cqz",
77
- "values": {
78
- "PREVIOUS": null,
79
- "COLLECTED": "2",
80
- "FORCED": "3",
81
- "EDITED": null,
82
- "INPUTED": null
83
- }
84
- },
85
- {
86
- "variableType": "COLLECTED",
87
- "name": "STATE2",
88
- "componentRef": "j4nw5cqz-bis",
89
- "values": {
90
- "PREVIOUS": null,
91
- "COLLECTED": "3",
92
- "FORCED": "2",
93
- "EDITED": null,
94
- "INPUTED": null
95
- }
96
- }
97
- ]
98
- }
@@ -1,89 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { withReadme } from 'storybook-readme';
4
- import Orchestrator from '../utils/orchestrator';
5
- import readme from './README.md';
6
- import { titleDecorator } from 'utils/lib';
7
- import data from './data';
8
- import dataProps from './data-props';
9
- import dataForced from './data-forced';
10
- import dataNAF from './data-naf';
11
- import { labelPositionOptions, featuresOptions } from '../utils/options';
12
- import {
13
- text,
14
- boolean,
15
- select,
16
- object,
17
- number,
18
- } from '@storybook/addon-knobs/react';
19
-
20
- const stories = storiesOf('Dropdown', module)
21
- .addDecorator(withReadme(readme))
22
- .addDecorator((Component) => {
23
- const WrappedComponent = titleDecorator(Component);
24
- return <WrappedComponent title="<Dropdown />" />;
25
- });
26
-
27
- stories.addWithJSX('Default', () => (
28
- <Orchestrator id="default" source={data} />
29
- ));
30
-
31
- stories.addWithJSX('Props', () => (
32
- <Orchestrator
33
- id="props"
34
- source={dataProps}
35
- placeholderList={text('Placeholder', 'Placeholder')}
36
- missing={boolean('Missing', false)}
37
- features={select('Features', featuresOptions, ['VTL', 'MD'])}
38
- bindings={object('Bindings', { NAME: 'Simpsons', TEXAS: 'Texas' })}
39
- disabled={boolean('Disabled', false)}
40
- focused={boolean('Focused', false)}
41
- writable={boolean('Writable', false)}
42
- widthAuto={boolean('Options auto width', false)}
43
- labelPosition={select('Label position', labelPositionOptions, 'DEFAULT')}
44
- mandatory={boolean('Mandatory', false)}
45
- management={boolean('Management', false)}
46
- zIndex={number('zIndex', 0)}
47
- freezeOptions={boolean('Freeze options', false)}
48
- />
49
- ));
50
-
51
- stories.addWithJSX('External update', () => {
52
- const Fake = () => {
53
- const [up, setUp] = useState(false);
54
- return (
55
- <>
56
- <button
57
- type="button"
58
- onClick={() => {
59
- setUp(true);
60
- }}
61
- disabled={up}
62
- >
63
- Force external update
64
- </button>
65
-
66
- <Orchestrator id="default" source={up ? dataForced : dataProps} />
67
- </>
68
- );
69
- };
70
- return <Fake />;
71
- });
72
-
73
- stories.addWithJSX('Naf', () => (
74
- <Orchestrator
75
- id="props"
76
- source={dataNAF}
77
- placeholderList={text('Placeholder', 'Placeholder')}
78
- features={select('Features', featuresOptions, ['VTL', 'MD'])}
79
- bindings={object('Bindings', { NAME: 'Simpsons', TEXAS: 'Texas' })}
80
- disabled={boolean('Disabled', false)}
81
- focused={boolean('Focused', false)}
82
- writable={boolean('Writable', false)}
83
- labelPosition={select('Label position', labelPositionOptions, 'DEFAULT')}
84
- mandatory={boolean('Mandatory', false)}
85
- management={boolean('Management', false)}
86
- zIndex={number('zIndex', 0)}
87
- freezeOptions={boolean('Freeze options', true)}
88
- />
89
- ));
@@ -1,15 +0,0 @@
1
- # FilterDescription component
2
-
3
- ## Props
4
-
5
- | Props | Type | Default value | Required | Description |
6
- | :---------------: | :----: | :-----------: | :------: | ------------------------------- |
7
- | label | string | - | ✓ | Label of the filter description |
8
- | filterDescription | bool | false | | Is filter description displayed |
9
- | features | array | [ ] | | Component features for label |
10
- | bindings | object | [ ] | | Questionnaire bindings |
11
- | style | object | { } | | Style of the filter description |
12
-
13
- ## Styles
14
-
15
- **Breadcrumb** component has for class `filter-description-lunatic`.
@@ -1,53 +0,0 @@
1
- import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import Orchestrator from '../utils/orchestrator';
4
- import { withReadme } from 'storybook-readme';
5
- import readme from './README.md';
6
- import { titleDecorator } from 'utils/lib';
7
- import { featuresOptions } from '../utils/options';
8
- import { text, boolean, select, object } from '@storybook/addon-knobs/react';
9
-
10
- const stories = storiesOf('FilterDescription', module)
11
- .addDecorator(withReadme(readme))
12
- .addDecorator((Component) => {
13
- const WrappedComponent = titleDecorator(Component);
14
- return <WrappedComponent title="<FilterDescription />" />;
15
- });
16
-
17
- const data = {
18
- components: [
19
- {
20
- id: 'j6p6my1d',
21
- componentType: 'FilterDescription',
22
- filterDescription: true,
23
- label: 'If you are not ready, please go to the end of the questionnaire',
24
- },
25
- ],
26
- };
27
-
28
- stories.addWithJSX('Default', () => <Orchestrator source={data} />);
29
-
30
- const dataProps = {
31
- components: [
32
- {
33
- id: 'j6p6my1d',
34
- componentType: 'FilterDescription',
35
- filterDescription: true,
36
- label:
37
- '"If you are not ready, please go to the end of the questionnaire: " || TITLE',
38
- },
39
- ],
40
- };
41
-
42
- stories.addWithJSX('Props', () => (
43
- <Orchestrator
44
- source={dataProps}
45
- label={text(
46
- 'Label',
47
- '"If you are not ready, please go to the end of the questionnaire: " || TITLE'
48
- )}
49
- filterDescription={boolean('Filter description', true)}
50
- features={select('Features', featuresOptions, ['VTL', 'MD'])}
51
- bindings={object('Bindings', { TITLE: 'Title' })}
52
- />
53
- ));
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import CrossIcon from '../../utils/icons/cross.icon';
4
- import ClosedIcon from '../../utils/icons/closed.icon';
5
- import OpenedIcon from '../../utils/icons/opened.icon';
6
- import LoadIcon from '../../utils/icons/load.icon';
7
- import NetworkIcon from '../../utils/icons/network.icon';
8
- import OnDragIcon from '../../utils/icons/on-drag.icon';
9
-
10
- storiesOf('Icons', module)
11
- .add('cross', () => <CrossIcon />)
12
- .add('opened', () => <OpenedIcon />)
13
- .add('closed', () => <ClosedIcon />)
14
- .add('load', () => <LoadIcon />)
15
- .add('network', () => <NetworkIcon />)
16
- .add('on-drag', () => <OnDragIcon />);
@@ -1,10 +0,0 @@
1
- .lunatic-icon {
2
- display: inline-block;
3
- width: 32px;
4
- height: 32px;
5
- // background-color: red;
6
- &.mini {
7
- width: 16px;
8
- height: 16px;
9
- }
10
- }
@@ -1,33 +0,0 @@
1
- # Input component
2
-
3
- ## Props
4
-
5
- | Props | Type | Default value | Required | Description |
6
- | :--------------: | :------------: | :-----------: | :------: | ------------------------------------ |
7
- | id | string | - | ✓ | Id of the input |
8
- | label | string | "" | | Label of the input |
9
- | preferences \* | array | ["COLLECTED"] | | Preferences to manage input response |
10
- | response \* | object | {} | | Response concerned by the component |
11
- | placeholder | string | " " | | Placeholder of the input |
12
- | handleChange | func | - | ✓ | Handler of the input |
13
- | readOnly | bool | false | | Is the input read only |
14
- | disabled | bool | false | | Is the input disabled |
15
- | maxLength | number, string | 524 288 | | Maximum length of the input |
16
- | autoComplete | bool | false | | Is the input autocompletable |
17
- | labelPosition \* | string | "DEFAULT" | | Position of the input label |
18
- | mandatory | bool | false | | Is the input mandatory |
19
- | focused | bool | false | | Is the input focused |
20
- | declarations \* | array | [] | | Declarations of the input |
21
- | features | array | [ ] | | Component features for labels |
22
- | bindings | object | [ ] | | Questionnaire bindings |
23
- | management | bool | false | | Management mode of the input |
24
- | style | object | {} | | Style of the input |
25
-
26
- - `preferences` props has to be an ordered array of `COLLECTED`, `FORCED` or `EDITED`
27
- - `response` props has to be a shape of `{name: string, values: object}`
28
- - `labelPosition` props has to be one of `DEFAULT`, `TOP`, `BOTTOM`, `RIGHT` or `LEFT`
29
- - `declarations` are documented in the `Declarations` component
30
-
31
- ## Styles
32
-
33
- **Input** component has for class `.input-lunatic`.
@@ -1,41 +0,0 @@
1
- {
2
- "components": [
3
- {
4
- "id": "j3343qhx",
5
- "componentType": "Input",
6
- "mandatory": false,
7
- "maxLength": "30",
8
- "label": "➡ 3. Who is the producer?",
9
- "response": {
10
- "name": "PRODUCER"
11
- },
12
- "missingResponse": "PRODUCER_MISSING"
13
- }
14
- ],
15
- "variables": [
16
- {
17
- "variableType": "COLLECTED",
18
- "name": "PRODUCER",
19
- "componentRef": "j3343qhx",
20
- "values": {
21
- "PREVIOUS": null,
22
- "COLLECTED": "James L. Brooks",
23
- "FORCED": null,
24
- "EDITED": "Matt Groening",
25
- "INPUTED": null
26
- }
27
- },
28
- {
29
- "variableType": "COLLECTED",
30
- "name": "PRODUCER_MISSING",
31
- "componentRef": "j3343qhx",
32
- "values": {
33
- "PREVIOUS": null,
34
- "COLLECTED": null,
35
- "FORCED": null,
36
- "EDITED": null,
37
- "INPUTED": null
38
- }
39
- }
40
- ]
41
- }
@@ -1,37 +0,0 @@
1
- # InputNumber component
2
-
3
- ## Props
4
-
5
- | Props | Type | Default value | Required | Description |
6
- | :--------------: | :----: | :-----------: | :------: | ------------------------------------ |
7
- | id | string | - | ✓ | Id of the input |
8
- | label | string | " " | | Label of the input |
9
- | preferences \* | array | ["COLLECTED"] | | Preferences to manage input response |
10
- | response \* | object | {} | | Response concerned by the component |
11
- | min | number | undefined | | Minimum of the input |
12
- | max | number | undefined | | Maximum of the input |
13
- | decimals | number | 0 | | Number of decimals of the input |
14
- | placeholder | string | "" | | Placeholder of the input |
15
- | handleChange | func | - | ✓ | Handler of the input |
16
- | readOnly | bool | false | | Is the input read only |
17
- | disabled | bool | false | | Is the input disabled |
18
- | autoComplete | bool | false | | Is the input autocompletable |
19
- | focused | bool | false | | Is the input focused |
20
- | labelPosition \* | string | "DEFAULT" | | Position of the input label |
21
- | unitPosition \* | string | "DEFAULT" | | Position of the unit label |
22
- | declarations \* | array | [ ] | | Declarations of the input |
23
- | features | array | [ ] | | Component features for labels |
24
- | bindings | object | [ ] | | Questionnaire bindings |
25
- | mandatory | bool | false | | Is the input mandatory |
26
- | management | bool | false | | Management mode of the input |
27
- | style | object | {} | | Style of the input |
28
-
29
- - `preferences` props has to be an ordered array of `COLLECTED`, `FORCED` or `EDITED`
30
- - `response` props has to be a shape of `{name: string, values: object}`
31
- - `labelPosition` props has to be one of `DEFAULT`, `TOP`, `BOTTOM`, `RIGHT` or `LEFT`
32
- - `unitPosition` props has to be one of `DEFAULT`, `BEFORE` or `AFTER`
33
- - `declarations` are documented in the `Declarations` component
34
-
35
- ## Styles
36
-
37
- **InputNumber** component has for classes `.input-lunatic`, `.warning`, `.unit` and `.lunatic-input-number-errors > error`.
@@ -1,27 +0,0 @@
1
- {
2
- "components": [
3
- {
4
- "id": "j6q9h8tj",
5
- "componentType": "InputNumber",
6
- "mandatory": false,
7
- "label": "➡ 4. What is the current season number?",
8
- "response": {
9
- "name": "SEASON_NUMBER"
10
- }
11
- }
12
- ],
13
- "variables": [
14
- {
15
- "variableType": "COLLECTED",
16
- "name": "SEASON_NUMBER",
17
- "componentRef": "j6q9h8tj",
18
- "values": {
19
- "PREVIOUS": null,
20
- "COLLECTED": "29000",
21
- "FORCED": "30000",
22
- "EDITED": null,
23
- "INPUTED": null
24
- }
25
- }
26
- ]
27
- }
@@ -1,42 +0,0 @@
1
- {
2
- "components": [
3
- {
4
- "id": "j6q9h8tj",
5
- "componentType": "InputNumber",
6
- "mandatory": false,
7
- "label": "➡ 4. What is the current season number?",
8
- "response": {
9
- "name": "SEASON_NUMBER"
10
- },
11
- "missingResponse": {
12
- "name": "SEASON_NUMBER_MISSING"
13
- }
14
- }
15
- ],
16
- "variables": [
17
- {
18
- "variableType": "COLLECTED",
19
- "name": "SEASON_NUMBER",
20
- "componentRef": "j6q9h8tj",
21
- "values": {
22
- "PREVIOUS": null,
23
- "COLLECTED": "29",
24
- "FORCED": "30",
25
- "EDITED": null,
26
- "INPUTED": null
27
- }
28
- },
29
- {
30
- "variableType": "COLLECTED",
31
- "name": "SEASON_NUMBER_MISSING",
32
- "componentRef": "j6q9h8tj",
33
- "values": {
34
- "PREVIOUS": null,
35
- "COLLECTED": null,
36
- "FORCED": null,
37
- "EDITED": null,
38
- "INPUTED": null
39
- }
40
- }
41
- ]
42
- }
@@ -1,81 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { storiesOf } from '@storybook/react';
3
- import { withReadme } from 'storybook-readme';
4
- import Orchestrator from '../utils/orchestrator';
5
- import readme from './README.md';
6
- import { titleDecorator } from 'utils/lib';
7
- import data from './data';
8
- import dataForced from './data-forced';
9
- import {
10
- labelPositionOptions,
11
- unitPositionOptions,
12
- featuresOptions,
13
- } from '../utils/options';
14
- import {
15
- text,
16
- boolean,
17
- number,
18
- object,
19
- select,
20
- } from '@storybook/addon-knobs/react';
21
-
22
- const stories = storiesOf('InputNumber', module)
23
- .addDecorator(withReadme(readme))
24
- .addDecorator((Component) => {
25
- const WrappedComponent = titleDecorator(Component);
26
- return <WrappedComponent title="<InputNumber />" />;
27
- });
28
-
29
- stories.addWithJSX('Default', () => (
30
- <Orchestrator id="default" source={data} />
31
- ));
32
-
33
- stories.addWithJSX('Props', () => (
34
- <Orchestrator
35
- id="props"
36
- source={data}
37
- label={text('Label', '"I\'m the label of the number input"')}
38
- missing={boolean('Missing', false)}
39
- unit={text('Unit', 'euros')}
40
- numberAsTextfield={boolean('numberAsTextfield', false)}
41
- min={number('Min', -99)}
42
- max={number('Max', 99)}
43
- decimals={number('Decimals', 1)}
44
- placeholder={text('Placeholder', 'Placeholder')}
45
- features={select('Features', featuresOptions, ['VTL', 'MD'])}
46
- bindings={object('Bindings', { test: 'test' })}
47
- readOnly={boolean('Read only', false)}
48
- autoComplete={boolean('Autocomplete', false)}
49
- mandatory={boolean('Mandatory', false)}
50
- focused={boolean('Focused', false)}
51
- management={boolean('Management', false)}
52
- labelPosition={select('Label position', labelPositionOptions, 'DEFAULT')}
53
- unitPosition={select('Unit position', unitPositionOptions, 'DEFAULT')}
54
- />
55
- ));
56
-
57
- stories.addWithJSX('External update', () => {
58
- const Fake = () => {
59
- const [up, setUp] = useState(false);
60
- return (
61
- <>
62
- <button
63
- type="button"
64
- onClick={() => {
65
- setUp(true);
66
- }}
67
- disabled={up}
68
- >
69
- Force external update
70
- </button>
71
-
72
- <Orchestrator
73
- id="default"
74
- source={up ? dataForced : data}
75
- management={boolean('Management', false)}
76
- />
77
- </>
78
- );
79
- };
80
- return <Fake />;
81
- });