@inseefr/lunatic 2.0.2 → 2.0.3-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 (746) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +25 -22
  3. package/lib/components/button/button.scss +24 -0
  4. package/lib/components/button/index.js +15 -0
  5. package/lib/components/button/lunatic-button.js +66 -0
  6. package/lib/components/checkbox/checkbox-boolean/checkbox-boolean.js +36 -0
  7. package/lib/components/checkbox/checkbox-boolean/index.js +15 -0
  8. package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +48 -0
  9. package/lib/components/checkbox/checkbox-group/checkbox-group.js +96 -0
  10. package/lib/components/checkbox/checkbox-group/checkbox.scss +4 -0
  11. package/lib/components/checkbox/checkbox-group/index.js +15 -0
  12. package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +42 -0
  13. package/lib/components/checkbox/checkbox-one/index.js +15 -0
  14. package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +39 -0
  15. package/lib/components/checkbox/commons/checkbox-option.js +68 -0
  16. package/lib/components/checkbox/commons/checkbox-option.scss +3 -0
  17. package/lib/components/checkbox/commons/index.js +15 -0
  18. package/lib/components/checkbox/index.js +31 -0
  19. package/lib/components/commons/build-style-object.js +36 -0
  20. package/lib/components/commons/components/combo-box/combo-box-container.js +37 -0
  21. package/lib/components/commons/components/combo-box/combo-box-content.js +73 -0
  22. package/lib/components/commons/components/combo-box/combo-box.js +222 -0
  23. package/lib/components/commons/components/combo-box/combo-box.scss +205 -0
  24. package/lib/components/commons/components/combo-box/index.js +15 -0
  25. package/lib/components/commons/components/combo-box/panel/index.js +15 -0
  26. package/lib/components/commons/components/combo-box/panel/option-container.js +77 -0
  27. package/lib/components/commons/components/combo-box/panel/panel-container.js +31 -0
  28. package/lib/components/commons/components/combo-box/panel/panel.js +70 -0
  29. package/lib/components/commons/components/combo-box/selection/delete.js +69 -0
  30. package/lib/components/commons/components/combo-box/selection/displayLabelOrInput.js +30 -0
  31. package/lib/components/commons/components/combo-box/selection/index.js +15 -0
  32. package/lib/components/commons/components/combo-box/selection/input.js +68 -0
  33. package/lib/components/commons/components/combo-box/selection/label-selection.js +39 -0
  34. package/lib/components/commons/components/combo-box/selection/selection-container.js +40 -0
  35. package/lib/components/commons/components/combo-box/selection/selection.js +71 -0
  36. package/lib/components/commons/components/combo-box/state-management/actions.js +98 -0
  37. package/lib/components/commons/components/combo-box/state-management/combo-box-context.js +20 -0
  38. package/lib/components/commons/components/combo-box/state-management/index.js +42 -0
  39. package/lib/components/commons/components/combo-box/state-management/initial-state.js +14 -0
  40. package/lib/components/commons/components/combo-box/state-management/reducer/index.js +15 -0
  41. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-blur.js +22 -0
  42. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-change.js +24 -0
  43. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-delete.js +23 -0
  44. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-focus.js +22 -0
  45. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-init.js +46 -0
  46. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/index.js +15 -0
  47. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/keyboard-key-codes.js +18 -0
  48. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-down.js +37 -0
  49. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-up.js +37 -0
  50. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-end.js +28 -0
  51. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-enter.js +23 -0
  52. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-escape.js +22 -0
  53. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-home.js +28 -0
  54. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-tab.js +22 -0
  55. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/reduce-on-keydown.js +59 -0
  56. package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-select.js +24 -0
  57. package/lib/components/commons/components/combo-box/state-management/reducer/reducer.js +63 -0
  58. package/lib/components/commons/components/create-lunatic-component/create-lunatic-component.js +75 -0
  59. package/lib/components/commons/components/create-lunatic-component/index.js +14 -0
  60. package/lib/components/commons/components/default-label-renderer.js +54 -0
  61. package/lib/components/commons/components/default-option-renderer.js +43 -0
  62. package/lib/components/commons/components/dragger/dragger.js +118 -0
  63. package/lib/components/commons/components/dragger/dragger.scss +8 -0
  64. package/lib/components/commons/components/dragger/index.js +15 -0
  65. package/lib/components/commons/components/errors/errors.js +55 -0
  66. package/lib/components/commons/components/errors/errors.scss +5 -0
  67. package/lib/components/commons/components/errors/index.js +15 -0
  68. package/lib/components/commons/components/fab/fab.js +56 -0
  69. package/lib/components/commons/components/fab/fab.scss +32 -0
  70. package/lib/components/commons/components/fab/index.js +15 -0
  71. package/lib/components/commons/components/field-container/field-container.js +48 -0
  72. package/lib/components/commons/components/field-container/field-container.scss +0 -0
  73. package/lib/components/commons/components/field-container/index.js +15 -0
  74. package/lib/components/commons/components/fieldset.js +26 -0
  75. package/lib/components/commons/components/fieldset.scss +5 -0
  76. package/lib/components/commons/components/html-table/index.js +55 -0
  77. package/lib/components/commons/components/html-table/table.js +38 -0
  78. package/lib/components/commons/components/html-table/tbody.js +38 -0
  79. package/lib/components/commons/components/html-table/td.js +50 -0
  80. package/lib/components/commons/components/html-table/th.js +48 -0
  81. package/lib/components/commons/components/html-table/thead.js +38 -0
  82. package/lib/components/commons/components/html-table/tr.js +40 -0
  83. package/lib/components/commons/components/is-network/index.js +15 -0
  84. package/lib/components/commons/components/is-network/is-network.js +70 -0
  85. package/lib/components/commons/components/is-network/use-online-status.js +55 -0
  86. package/lib/components/commons/components/label.js +35 -0
  87. package/lib/components/commons/components/lunatic-component.js +67 -0
  88. package/lib/components/commons/components/lunatic-fieldset-component.js +60 -0
  89. package/lib/components/commons/components/md-label/index.js +15 -0
  90. package/lib/components/commons/components/md-label/link.js +57 -0
  91. package/lib/components/commons/components/md-label/md-label.js +52 -0
  92. package/lib/components/commons/components/missing/index.js +15 -0
  93. package/lib/components/commons/components/missing/missing.js +90 -0
  94. package/lib/components/commons/components/missing/missing.scss +30 -0
  95. package/lib/components/commons/components/nothing-to-display.js +17 -0
  96. package/lib/components/commons/components/orchestrated-component.js +71 -0
  97. package/{src/components/tooltip → lib/components/commons/components/variable-status}/img/edited.png +0 -0
  98. package/{src/components/tooltip → lib/components/commons/components/variable-status}/img/forced.png +0 -0
  99. package/lib/components/commons/components/variable-status/img/index.js +23 -0
  100. package/lib/components/commons/components/variable-status/index.js +15 -0
  101. package/lib/components/commons/components/variable-status/variable-status.js +95 -0
  102. package/lib/components/commons/components/variable-status/variable-status.scss +39 -0
  103. package/lib/components/commons/create-customizable-field.js +37 -0
  104. package/lib/components/commons/create-row-orchestrator.js +60 -0
  105. package/lib/components/commons/icons/checkbox-checked.icon.js +41 -0
  106. package/lib/components/commons/icons/checkbox-unchecked.icon.js +41 -0
  107. package/lib/components/commons/icons/closed.icon.js +38 -0
  108. package/lib/components/commons/icons/cross.icon.js +38 -0
  109. package/lib/components/commons/icons/index.js +87 -0
  110. package/lib/components/commons/icons/load.icon.js +38 -0
  111. package/lib/components/commons/icons/lunatic-icon.js +25 -0
  112. package/lib/components/commons/icons/lunatic-icon.scss +3 -0
  113. package/lib/components/commons/icons/network.icon.js +38 -0
  114. package/lib/components/commons/icons/on-drag.icon.js +38 -0
  115. package/lib/components/commons/icons/opened.icon.js +38 -0
  116. package/lib/components/commons/icons/radio-checked.icon.js +41 -0
  117. package/lib/components/commons/icons/radio-unchecked.icon.js +41 -0
  118. package/lib/components/commons/index.js +162 -0
  119. package/lib/components/commons/prop-types/declarations.js +27 -0
  120. package/lib/components/commons/prop-types/index.js +47 -0
  121. package/lib/components/commons/prop-types/lines.js +17 -0
  122. package/lib/components/commons/prop-types/options.js +17 -0
  123. package/lib/components/commons/prop-types/response.js +17 -0
  124. package/lib/components/commons/prop-types/value-type.js +22 -0
  125. package/lib/components/commons/safety-label.js +34 -0
  126. package/lib/components/commons/use-document-add-event-listener.js +108 -0
  127. package/lib/components/commons/use-on-handle-change.js +22 -0
  128. package/lib/components/commons/use-options-keydown.js +29 -0
  129. package/lib/components/commons/use-previous.js +19 -0
  130. package/lib/components/components.js +188 -0
  131. package/lib/components/datepicker/datepicker.js +56 -0
  132. package/lib/components/datepicker/datepicker.scss +1 -0
  133. package/lib/components/datepicker/index.js +15 -0
  134. package/lib/components/datepicker/lunatic-datepicker.js +39 -0
  135. package/lib/components/declarations/declaration.js +26 -0
  136. package/lib/components/declarations/declarations-after-text.js +29 -0
  137. package/lib/components/declarations/declarations-before-text.js +29 -0
  138. package/lib/components/declarations/declarations-detachable.js +29 -0
  139. package/lib/components/declarations/declarations.js +61 -0
  140. package/lib/components/declarations/declarations.scss +36 -0
  141. package/lib/components/declarations/index.js +51 -0
  142. package/lib/components/dropdown/dropdown-simple/dropdown-simple.js +43 -0
  143. package/lib/components/dropdown/dropdown-simple/index.js +15 -0
  144. package/lib/components/dropdown/dropdown-simple/simple-label-renderer.js +53 -0
  145. package/lib/components/dropdown/dropdown-simple/simple-option-renderer.js +42 -0
  146. package/lib/components/dropdown/dropdown-writable/dropdown-writable.js +79 -0
  147. package/lib/components/dropdown/dropdown-writable/filter-tools/filter-options.js +47 -0
  148. package/lib/components/dropdown/dropdown-writable/filter-tools/letters-matching.js +40 -0
  149. package/lib/components/dropdown/dropdown-writable/filter-tools/match.js +27 -0
  150. package/lib/components/dropdown/dropdown-writable/filter-tools/prepare-prefix.js +17 -0
  151. package/lib/components/dropdown/dropdown-writable/index.js +15 -0
  152. package/lib/components/dropdown/dropdown-writable/writable-label-renderer.js +53 -0
  153. package/lib/components/dropdown/dropdown-writable/writable-option-renderer.js +170 -0
  154. package/lib/components/dropdown/dropdown.js +58 -0
  155. package/lib/components/dropdown/dropdown.scss +41 -0
  156. package/lib/components/dropdown/index.js +15 -0
  157. package/lib/components/dropdown/lunatic-dropdown.js +62 -0
  158. package/lib/components/filter-description/component.js +26 -0
  159. package/lib/components/filter-description/index.js +15 -0
  160. package/lib/components/index.js +32 -0
  161. package/lib/components/index.scss +136 -0
  162. package/lib/components/input/index.js +15 -0
  163. package/lib/components/input/input.js +61 -0
  164. package/lib/components/input/input.scss +32 -0
  165. package/lib/components/input/lunatic-input.js +43 -0
  166. package/lib/components/input-number/index.js +15 -0
  167. package/lib/components/input-number/input-number.js +61 -0
  168. package/lib/components/input-number/input-number.scss +7 -0
  169. package/lib/components/input-number/lunatic-input-number.js +37 -0
  170. package/lib/components/loop/block-for-loop/block-for-loop-ochestrator.js +16 -0
  171. package/lib/components/loop/block-for-loop/block-for-loop.js +171 -0
  172. package/lib/components/loop/block-for-loop/index.js +15 -0
  173. package/lib/components/loop/block-for-loop/row.js +84 -0
  174. package/lib/components/loop/commons/get-init-length.js +19 -0
  175. package/lib/components/loop/commons/handle-row-button.js +25 -0
  176. package/lib/components/loop/commons/index.js +23 -0
  177. package/lib/components/loop/commons/row-component.js +86 -0
  178. package/lib/components/loop/index.js +15 -0
  179. package/lib/components/loop/loop.js +94 -0
  180. package/lib/components/loop/roster-for-loop/body.js +69 -0
  181. package/lib/components/loop/roster-for-loop/header.js +42 -0
  182. package/lib/components/loop/roster-for-loop/index.js +15 -0
  183. package/lib/components/loop/roster-for-loop/roster-for-loop-orchestrator.js +16 -0
  184. package/lib/components/loop/roster-for-loop/roster-for-loop.js +153 -0
  185. package/lib/components/loop/roster-for-loop/roster-table.js +61 -0
  186. package/lib/components/loop/roster-for-loop/roster.scss +42 -0
  187. package/lib/components/loop/roster-for-loop/row.js +88 -0
  188. package/lib/components/modal-controls/close-or-skip.js +46 -0
  189. package/lib/components/modal-controls/index.js +15 -0
  190. package/lib/components/modal-controls/modal-container.js +24 -0
  191. package/lib/components/modal-controls/modal-controls.js +94 -0
  192. package/lib/components/modal-controls/modal-controls.scss +47 -0
  193. package/lib/components/pairwise/index.js +15 -0
  194. package/lib/components/pairwise/links/index.js +15 -0
  195. package/lib/components/pairwise/links/orchestrator.js +16 -0
  196. package/lib/components/pairwise/links/pairwise-links.js +75 -0
  197. package/lib/components/pairwise/links/row.js +95 -0
  198. package/lib/components/radio/index.js +15 -0
  199. package/lib/components/radio/lunatic-radio-group.js +45 -0
  200. package/lib/components/radio/radio-group.js +48 -0
  201. package/lib/components/radio/radio-option.js +94 -0
  202. package/lib/components/radio/radio.scss +66 -0
  203. package/lib/components/sequence/index.js +15 -0
  204. package/lib/components/sequence/sequence.js +41 -0
  205. package/lib/components/sequence/sequence.scss +10 -0
  206. package/lib/components/subsequence/index.js +15 -0
  207. package/lib/components/subsequence/subsequence.js +38 -0
  208. package/lib/components/suggester/check-store.js +149 -0
  209. package/lib/components/suggester/default-style.scss +125 -0
  210. package/lib/components/suggester/find-best-label/find-best-label.js +67 -0
  211. package/lib/components/suggester/find-best-label/index.js +15 -0
  212. package/lib/components/suggester/idb-suggester.js +95 -0
  213. package/lib/components/suggester/index.js +15 -0
  214. package/lib/components/suggester/lunatic-suggester.js +94 -0
  215. package/lib/components/suggester/searching/create-searching.js +88 -0
  216. package/lib/components/suggester/searching/index.js +15 -0
  217. package/lib/components/suggester/suggester.js +172 -0
  218. package/lib/components/suggester-loader-widget/index.js +15 -0
  219. package/lib/components/suggester-loader-widget/loader-row.js +150 -0
  220. package/lib/components/suggester-loader-widget/loader.js +180 -0
  221. package/lib/components/suggester-loader-widget/progress.js +45 -0
  222. package/lib/components/suggester-loader-widget/tools/action-tool.js +35 -0
  223. package/lib/components/suggester-loader-widget/tools/index.js +23 -0
  224. package/lib/components/suggester-loader-widget/tools/tools.js +20 -0
  225. package/lib/components/suggester-loader-widget/widget-container.js +48 -0
  226. package/lib/components/suggester-loader-widget/widget.js +170 -0
  227. package/lib/components/suggester-loader-widget/widget.scss +176 -0
  228. package/lib/components/switch/index.js +15 -0
  229. package/lib/components/switch/lunatic-switch.js +59 -0
  230. package/lib/components/switch/switch.js +92 -0
  231. package/lib/components/switch/switch.scss +47 -0
  232. package/lib/components/table/cell.js +113 -0
  233. package/lib/components/table/components/cell.js +113 -0
  234. package/lib/components/table/components/header.js +48 -0
  235. package/lib/components/table/components/row.js +47 -0
  236. package/lib/components/table/components/table.js +38 -0
  237. package/lib/components/table/components/table.scss +27 -0
  238. package/lib/components/table/index.js +15 -0
  239. package/lib/components/table/lunatic-table.js +97 -0
  240. package/lib/components/table/table-orchestrator.js +55 -0
  241. package/lib/components/textarea/index.js +15 -0
  242. package/lib/components/textarea/lunatic-textarea.js +52 -0
  243. package/lib/components/textarea/textarea.js +54 -0
  244. package/lib/components/textarea/textarea.scss +8 -0
  245. package/lib/constants/component-types.js +8 -0
  246. package/lib/constants/declarations.js +26 -0
  247. package/lib/constants/event-types.js +28 -0
  248. package/lib/constants/index.js +70 -0
  249. package/lib/constants/supported-preferences.js +18 -0
  250. package/lib/constants/value-types.js +16 -0
  251. package/lib/constants/variable-types.js +12 -0
  252. package/lib/i18n/build-dictionary.js +56 -0
  253. package/lib/i18n/dictionary.js +26 -0
  254. package/lib/i18n/index.js +19 -0
  255. package/lib/index.js +21 -4300
  256. package/lib/stories/Introduction.stories.mdx +114 -0
  257. package/lib/stories/checkboxBoolean/checkboxBoolean.stories.js +35 -0
  258. package/lib/stories/checkboxBoolean/source.json +36 -0
  259. package/lib/stories/checkboxOne/checkboxOne.stories.js +35 -0
  260. package/lib/stories/checkboxOne/source.json +36 -0
  261. package/lib/stories/custom-mui/checkbox-boolean-mui.js +39 -0
  262. package/lib/stories/custom-mui/checkbox-group-mui.js +80 -0
  263. package/lib/stories/custom-mui/checkbox-one-mui.js +17 -0
  264. package/lib/stories/custom-mui/index.js +127 -0
  265. package/lib/stories/custom-mui/input-mui.js +61 -0
  266. package/lib/stories/custom-mui/input-number-mui.js +47 -0
  267. package/lib/stories/custom-mui/radio-mui.js +75 -0
  268. package/lib/stories/custom-mui/suggester-mui/index.js +15 -0
  269. package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +328 -0
  270. package/lib/stories/custom-mui/switch-mui.js +51 -0
  271. package/lib/stories/custom-mui/table-mui.js +33 -0
  272. package/lib/stories/custom-mui/tbody-mui.js +27 -0
  273. package/lib/stories/custom-mui/td-mui.js +29 -0
  274. package/lib/stories/custom-mui/textarea-mui.js +51 -0
  275. package/lib/stories/custom-mui/th-mui.js +28 -0
  276. package/lib/stories/custom-mui/thead-mui.js +27 -0
  277. package/lib/stories/custom-mui/tr-mui.js +38 -0
  278. package/lib/stories/date-picker/data.json +3 -0
  279. package/lib/stories/date-picker/datepicker.stories.js +40 -0
  280. package/lib/stories/date-picker/source.json +91 -0
  281. package/lib/stories/dropdown/data.json +16 -0
  282. package/lib/stories/dropdown/dropdown.stories.js +41 -0
  283. package/lib/stories/dropdown/source.json +122 -0
  284. package/lib/stories/filter-description/filter-description.stories.js +58 -0
  285. package/lib/stories/filter-description/source-options.json +81 -0
  286. package/lib/stories/filter-description/source.json +11 -0
  287. package/lib/stories/input/data.json +1 -0
  288. package/lib/stories/input/input.stories.js +38 -0
  289. package/lib/stories/input/source.json +28 -0
  290. package/lib/stories/input-number/input-number.stories.js +43 -0
  291. package/lib/stories/input-number/source-euros.json +38 -0
  292. package/lib/stories/input-number/source.json +37 -0
  293. package/lib/stories/pairwise/data.json +13 -0
  294. package/lib/stories/pairwise/links.json +207 -0
  295. package/lib/stories/pairwise/pairwise-links.stories.js +39 -0
  296. package/lib/stories/paste-questionnaire/source.json +6290 -0
  297. package/lib/stories/paste-questionnaire/test.stories.js +91 -0
  298. package/lib/stories/questionnaires/logement/data.json +2691 -0
  299. package/lib/stories/questionnaires/logement/logement.stories.js +86 -0
  300. package/lib/stories/questionnaires/logement/source-sequence.json +34181 -0
  301. package/lib/stories/questionnaires/logement/source-sum.json +34612 -0
  302. package/lib/stories/questionnaires/logement/source.json +34191 -0
  303. package/lib/stories/questionnaires/simpsons/simpsons.stories.js +71 -0
  304. package/lib/stories/questionnaires/simpsons/source.json +6290 -0
  305. package/lib/stories/questionnaires-test/V2_DeclarationsSimples.json +848 -0
  306. package/lib/stories/questionnaires-test/V2_MinMaxSum_Boucles.json +509 -0
  307. package/lib/stories/questionnaires-test/V2_QuestSimple_Boucles.json +4091 -0
  308. package/lib/stories/questionnaires-test/V2_TCMRallyeGames.json +2892 -0
  309. package/lib/stories/questionnaires-test/controls/V2_ControlesNonNum_horsBoucle_PasPageFin.json +666 -0
  310. package/lib/stories/questionnaires-test/controls/V2_ControlesNum_horsBoucle_PasPageFin.json +1957 -0
  311. package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees2_PasPageFin.json +709 -0
  312. package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees_PasPageFin.json +533 -0
  313. package/lib/stories/questionnaires-test/controls/boucles-n.json +202 -0
  314. package/lib/stories/questionnaires-test/controls/controls.stories.js +108 -0
  315. package/lib/stories/questionnaires-test/test-dylan.json +558 -0
  316. package/lib/stories/questionnaires-test/test.stories.js +104 -0
  317. package/lib/stories/radio/radio.stories.js +35 -0
  318. package/lib/stories/radio/source.json +36 -0
  319. package/lib/stories/roster-for-loop/roster-for-loop.stories.js +35 -0
  320. package/lib/stories/roster-for-loop/source.json +114 -0
  321. package/lib/stories/suggester/source.json +234 -0
  322. package/lib/stories/suggester/suggester-workers.stories.js +242 -0
  323. package/lib/stories/suggester/suggester.stories.js +59 -0
  324. package/{src/stories/checkbox-one → lib/stories/switch}/README.md +31 -31
  325. package/lib/stories/switch/SwitchMaterialUI.js +51 -0
  326. package/{src/stories/checkbox-boolean/data.json → lib/stories/switch/data-forced.json} +48 -48
  327. package/lib/stories/switch/data.json +80 -0
  328. package/lib/stories/switch/switch.js +108 -0
  329. package/lib/stories/table/data-roster.json +1 -0
  330. package/lib/stories/table/data.json +1 -0
  331. package/{src/stories/table/data-roster.json → lib/stories/table/source-roster.json} +504 -461
  332. package/{src/stories/table/data-default.json → lib/stories/table/source.json} +19 -19
  333. package/lib/stories/table/table-dynamique.json +67 -0
  334. package/lib/stories/table/table.stories.js +73 -0
  335. package/lib/stories/utils/custom-lunatic.scss +28 -0
  336. package/lib/stories/utils/default-arg-types.js +23 -0
  337. package/lib/stories/utils/options.js +32 -0
  338. package/lib/stories/utils/orchestrator.js +188 -0
  339. package/lib/stories/utils/waiting/index.js +15 -0
  340. package/lib/stories/utils/waiting/preloader.svg +1 -0
  341. package/lib/stories/utils/waiting/waiting.js +40 -0
  342. package/lib/stories/utils/waiting/waiting.scss +21 -0
  343. package/lib/tests/sample.spec.js +7 -0
  344. package/lib/use-lunatic/actions.js +102 -0
  345. package/lib/use-lunatic/commons/calculated-variables.js +124 -0
  346. package/lib/use-lunatic/commons/check-loops.js +111 -0
  347. package/lib/use-lunatic/commons/compose.js +28 -0
  348. package/lib/use-lunatic/commons/create-map-pages.js +108 -0
  349. package/lib/use-lunatic/commons/execute-condition-filter.js +34 -0
  350. package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +308 -0
  351. package/lib/use-lunatic/commons/execute-expression/create-memoizer.js +78 -0
  352. package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +160 -0
  353. package/lib/use-lunatic/commons/execute-expression/execute-expression.js +118 -0
  354. package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.js +51 -0
  355. package/lib/use-lunatic/commons/execute-expression/get-safety-expression.js +37 -0
  356. package/lib/use-lunatic/commons/execute-expression/index.js +15 -0
  357. package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +149 -0
  358. package/lib/use-lunatic/commons/fill-components/fill-component-value.js +26 -0
  359. package/lib/use-lunatic/commons/fill-components/fill-components.js +47 -0
  360. package/lib/use-lunatic/commons/fill-components/fill-errors.js +31 -0
  361. package/lib/use-lunatic/commons/fill-components/fill-from-state.js +26 -0
  362. package/lib/use-lunatic/commons/fill-components/fill-management.js +27 -0
  363. package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +37 -0
  364. package/lib/use-lunatic/commons/fill-components/fill-pagination.js +23 -0
  365. package/lib/use-lunatic/commons/fill-components/index.js +15 -0
  366. package/lib/use-lunatic/commons/get-compatible-vtl-expression.js +32 -0
  367. package/lib/use-lunatic/commons/get-component-value/get-component-value.js +217 -0
  368. package/lib/use-lunatic/commons/get-component-value/index.js +15 -0
  369. package/lib/use-lunatic/commons/get-components-from-state.js +44 -0
  370. package/lib/use-lunatic/commons/get-data.js +90 -0
  371. package/lib/use-lunatic/commons/get-errors-without-empty-value.js +31 -0
  372. package/lib/use-lunatic/commons/index.js +123 -0
  373. package/lib/use-lunatic/commons/is-First-last-page.js +20 -0
  374. package/lib/use-lunatic/commons/is-paginated-loop.js +15 -0
  375. package/lib/use-lunatic/commons/load-suggesters.js +199 -0
  376. package/lib/use-lunatic/commons/page-tag.js +83 -0
  377. package/lib/use-lunatic/commons/use-components-from-state.js +49 -0
  378. package/lib/use-lunatic/index.js +15 -0
  379. package/lib/use-lunatic/initial-state.js +44 -0
  380. package/lib/use-lunatic/reducer/commons/index.js +41 -0
  381. package/lib/use-lunatic/reducer/commons/is-empty-on-empty-page.js +49 -0
  382. package/lib/use-lunatic/reducer/commons/resize-array-variable.js +48 -0
  383. package/lib/use-lunatic/reducer/commons/validate-condition-filter.js +41 -0
  384. package/lib/use-lunatic/reducer/index.js +15 -0
  385. package/lib/use-lunatic/reducer/reduce-go-next-page.js +218 -0
  386. package/lib/use-lunatic/reducer/reduce-go-previous-page.js +165 -0
  387. package/lib/use-lunatic/reducer/reduce-go-to-page.js +60 -0
  388. package/lib/use-lunatic/reducer/reduce-handle-change/index.js +15 -0
  389. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +77 -0
  390. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +142 -0
  391. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.js +53 -0
  392. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-missing.js +90 -0
  393. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +118 -0
  394. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.js +50 -0
  395. package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.js +29 -0
  396. package/lib/use-lunatic/reducer/reduce-on-init.js +260 -0
  397. package/lib/use-lunatic/reducer/reduce-on-set-waiting.js +23 -0
  398. package/lib/use-lunatic/reducer/reducer.js +58 -0
  399. package/lib/use-lunatic/reducer/validate-controls/create-controls-reducer.js +69 -0
  400. package/lib/use-lunatic/reducer/validate-controls/create-modal-controls-reducer.js +100 -0
  401. package/lib/use-lunatic/reducer/validate-controls/index.js +23 -0
  402. package/lib/use-lunatic/reducer/validate-controls/validation-utils.js +73 -0
  403. package/lib/use-lunatic/use-lunatic.js +215 -0
  404. package/lib/utils/constants/features.js +12 -0
  405. package/lib/utils/constants/index.js +70 -0
  406. package/lib/utils/constants/links.js +10 -0
  407. package/lib/utils/constants/missing.js +10 -0
  408. package/lib/utils/constants/variable-status.js +16 -0
  409. package/lib/utils/constants/variable-types.js +8 -0
  410. package/lib/utils/idb-tools/clear-store.js +52 -0
  411. package/lib/utils/idb-tools/create-db-opener.js +60 -0
  412. package/lib/utils/idb-tools/create-open-db.js +35 -0
  413. package/lib/utils/idb-tools/get-entity.js +25 -0
  414. package/lib/utils/idb-tools/get-idb.js +15 -0
  415. package/lib/utils/idb-tools/idb-bulk-insert.js +157 -0
  416. package/lib/utils/idb-tools/index.js +75 -0
  417. package/lib/utils/idb-tools/insert-entity.js +25 -0
  418. package/lib/utils/idb-tools/open-db.js +29 -0
  419. package/lib/utils/idb-tools/open-or-create-db.js +49 -0
  420. package/lib/utils/is-element.js +12 -0
  421. package/lib/utils/store-tools/auto-load.js +209 -0
  422. package/lib/utils/store-tools/clear-store-data.js +46 -0
  423. package/lib/utils/store-tools/clear-store-info.js +46 -0
  424. package/lib/utils/store-tools/constantes.js +31 -0
  425. package/lib/utils/store-tools/create/create.js +70 -0
  426. package/lib/utils/store-tools/create/index.js +23 -0
  427. package/lib/utils/store-tools/create/update-store-info.js +33 -0
  428. package/lib/utils/store-tools/get-store-count.js +29 -0
  429. package/lib/utils/store-tools/index.js +66 -0
  430. package/lib/utils/store-tools/open-or-create-store.js +60 -0
  431. package/lib/utils/store-tools/use-store-index.js +82 -0
  432. package/lib/utils/suggester-workers/append-to-index/append.js +96 -0
  433. package/lib/utils/suggester-workers/append-to-index/append.worker.js +31 -0
  434. package/lib/utils/suggester-workers/append-to-index/create-append-task.js +66 -0
  435. package/lib/utils/suggester-workers/append-to-index/index.js +23 -0
  436. package/lib/utils/suggester-workers/append-to-index/prepare-entities.js +114 -0
  437. package/lib/utils/suggester-workers/append-to-index/store-messages.js +48 -0
  438. package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +70 -0
  439. package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +103 -0
  440. package/lib/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +47 -0
  441. package/lib/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +24 -0
  442. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +47 -0
  443. package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.spec.js +16 -0
  444. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.js +24 -0
  445. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.spec.js +18 -0
  446. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.js +34 -0
  447. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.spec.js +25 -0
  448. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.js +17 -0
  449. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.spec.js +25 -0
  450. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.js +29 -0
  451. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.spec.js +18 -0
  452. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +71 -0
  453. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.spec.js +15 -0
  454. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +19 -0
  455. package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.spec.js +16 -0
  456. package/lib/utils/suggester-workers/commons-tokenizer/filters/index.js +23 -0
  457. package/lib/utils/suggester-workers/commons-tokenizer/filters/stop-words.js +9 -0
  458. package/lib/utils/suggester-workers/commons-tokenizer/get-regexp-from-pattern.js +17 -0
  459. package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.js +31 -0
  460. package/lib/utils/suggester-workers/commons-tokenizer/index.js +79 -0
  461. package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.js +24 -0
  462. package/lib/utils/suggester-workers/commons-tokenizer/soft-tokenizer.js +15 -0
  463. package/lib/utils/suggester-workers/create-worker.js +64 -0
  464. package/lib/utils/suggester-workers/find-best-label/find-best-label.js +81 -0
  465. package/lib/utils/suggester-workers/find-best-label/find-best-label.worker.js +67 -0
  466. package/lib/utils/suggester-workers/find-best-label/index.js +1 -0
  467. package/lib/utils/suggester-workers/find-best-label/tokenize.js +62 -0
  468. package/lib/utils/suggester-workers/find-best-label/tokenize.spec.js +26 -0
  469. package/lib/utils/suggester-workers/searching/compute-score.js +63 -0
  470. package/lib/utils/suggester-workers/searching/get-db.js +64 -0
  471. package/lib/utils/suggester-workers/searching/index.js +15 -0
  472. package/lib/utils/suggester-workers/searching/order/create-alphanumeric-orderer.js +33 -0
  473. package/lib/utils/suggester-workers/searching/order/index.js +33 -0
  474. package/lib/utils/suggester-workers/searching/query-parser/index.js +23 -0
  475. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.js +15 -0
  476. package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.spec.js +28 -0
  477. package/lib/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +51 -0
  478. package/lib/utils/suggester-workers/searching/resolve-query-parser.js +73 -0
  479. package/lib/utils/suggester-workers/searching/search-in-index.js +25 -0
  480. package/lib/utils/suggester-workers/searching/searching.js +170 -0
  481. package/lib/utils/suggester-workers/searching/searching.worker.js +23 -0
  482. package/lib/utils/vtl/dataset-builder.js +28 -0
  483. package/lib/utils/vtl/index.js +15 -0
  484. package/package.json +161 -139
  485. package/lib/index.js.map +0 -1
  486. package/src/components/breadcrumb/breadcrumb.scss +0 -22
  487. package/src/components/breadcrumb/component.js +0 -29
  488. package/src/components/breadcrumb/index.js +0 -1
  489. package/src/components/button/button.scss +0 -26
  490. package/src/components/button/component.js +0 -25
  491. package/src/components/button/index.js +0 -1
  492. package/src/components/checkbox/boolean.js +0 -147
  493. package/src/components/checkbox/checkbox.scss +0 -43
  494. package/src/components/checkbox/group.js +0 -183
  495. package/src/components/checkbox/index.js +0 -3
  496. package/src/components/checkbox/one.js +0 -10
  497. package/src/components/components.js +0 -16
  498. package/src/components/datepicker/component.js +0 -10
  499. package/src/components/datepicker/datepicker.scss +0 -16
  500. package/src/components/datepicker/index.js +0 -1
  501. package/src/components/declarations/component.js +0 -38
  502. package/src/components/declarations/declarations.scss +0 -34
  503. package/src/components/declarations/index.js +0 -1
  504. package/src/components/declarations/wrappers/index.js +0 -3
  505. package/src/components/declarations/wrappers/input-declarations-wrapper.js +0 -168
  506. package/src/components/declarations/wrappers/list-declarations-wrapper.js +0 -190
  507. package/src/components/declarations/wrappers/simple-declarations-wrapper.js +0 -54
  508. package/src/components/dropdown/commons/actions.js +0 -56
  509. package/src/components/dropdown/commons/children-to-option.js +0 -9
  510. package/src/components/dropdown/commons/cleaner-callbacks.js +0 -58
  511. package/src/components/dropdown/commons/components/closed.icon.js +0 -24
  512. package/src/components/dropdown/commons/components/dropdown-container.js +0 -29
  513. package/src/components/dropdown/commons/components/dropdown-field.js +0 -46
  514. package/src/components/dropdown/commons/components/dropdown.js +0 -182
  515. package/src/components/dropdown/commons/components/label.js +0 -28
  516. package/src/components/dropdown/commons/components/opened.icon.js +0 -24
  517. package/src/components/dropdown/commons/components/panel.js +0 -78
  518. package/src/components/dropdown/commons/event-callbacks/index.js +0 -5
  519. package/src/components/dropdown/commons/event-callbacks/on-keydown-callback.js +0 -29
  520. package/src/components/dropdown/commons/event-callbacks/on-mousedown-callback.js +0 -11
  521. package/src/components/dropdown/commons/reducer.js +0 -149
  522. package/src/components/dropdown/commons/tools/index.js +0 -17
  523. package/src/components/dropdown/component.js +0 -117
  524. package/src/components/dropdown/dropdown-edit/cross.icon.js +0 -20
  525. package/src/components/dropdown/dropdown-edit/dropdown-edit.js +0 -185
  526. package/src/components/dropdown/dropdown-edit/icone.js +0 -33
  527. package/src/components/dropdown/dropdown-edit/index.js +0 -11
  528. package/src/components/dropdown/dropdown-edit/option.js +0 -62
  529. package/src/components/dropdown/dropdown-edit/prefix-tools.js +0 -51
  530. package/src/components/dropdown/dropdown-simple/dropdown.js +0 -155
  531. package/src/components/dropdown/dropdown-simple/index.js +0 -20
  532. package/src/components/dropdown/dropdown-simple/option.js +0 -15
  533. package/src/components/dropdown/dropdown.scss +0 -201
  534. package/src/components/dropdown/index.js +0 -1
  535. package/src/components/filter-description/component.js +0 -41
  536. package/src/components/filter-description/index.js +0 -1
  537. package/src/components/index.js +0 -4
  538. package/src/components/index.scss +0 -76
  539. package/src/components/input/index.js +0 -2
  540. package/src/components/input/input-number.js +0 -232
  541. package/src/components/input/input.js +0 -10
  542. package/src/components/input/input.scss +0 -27
  543. package/src/components/loop/build-components.js +0 -33
  544. package/src/components/loop/component.js +0 -94
  545. package/src/components/loop/index.js +0 -1
  546. package/src/components/loop/loop.scss +0 -17
  547. package/src/components/loop/wrapper.js +0 -11
  548. package/src/components/loop-constructor/block/block.scss +0 -10
  549. package/src/components/loop-constructor/block/component.js +0 -8
  550. package/src/components/loop-constructor/block/index.js +0 -1
  551. package/src/components/loop-constructor/index.js +0 -1
  552. package/src/components/loop-constructor/roster/component.js +0 -7
  553. package/src/components/loop-constructor/roster/index.js +0 -1
  554. package/src/components/loop-constructor/wrapper/body-component.js +0 -118
  555. package/src/components/loop-constructor/wrapper/build-components.js +0 -33
  556. package/src/components/loop-constructor/wrapper/component.js +0 -152
  557. package/src/components/loop-constructor/wrapper/index.js +0 -1
  558. package/src/components/progress-bar/component.js +0 -28
  559. package/src/components/progress-bar/index.js +0 -1
  560. package/src/components/progress-bar/progress-bar.scss +0 -54
  561. package/src/components/radio/component.js +0 -8
  562. package/src/components/radio/index.js +0 -1
  563. package/src/components/radio/radio.scss +0 -24
  564. package/src/components/sequence/component.js +0 -41
  565. package/src/components/sequence/index.js +0 -1
  566. package/src/components/sequence/sequence.scss +0 -15
  567. package/src/components/subsequence/component.js +0 -48
  568. package/src/components/subsequence/index.js +0 -1
  569. package/src/components/subsequence/subsequence.scss +0 -15
  570. package/src/components/table/index.js +0 -1
  571. package/src/components/table/table.js +0 -160
  572. package/src/components/table/table.scss +0 -23
  573. package/src/components/textarea/component.js +0 -10
  574. package/src/components/textarea/index.js +0 -1
  575. package/src/components/textarea/textarea.scss +0 -16
  576. package/src/components/tooltip/img/collected.png +0 -0
  577. package/src/components/tooltip/img/index.js +0 -5
  578. package/src/components/tooltip/index.js +0 -1
  579. package/src/components/tooltip/response.js +0 -51
  580. package/src/components/tooltip/tooltip.scss +0 -35
  581. package/src/constants/component-types.js +0 -1
  582. package/src/constants/declarations.js +0 -14
  583. package/src/constants/index.js +0 -4
  584. package/src/constants/supported-preferences.js +0 -10
  585. package/src/constants/value-types.js +0 -5
  586. package/src/constants/variable-types.js +0 -4
  587. package/src/stories/breadcrumb/README.md +0 -14
  588. package/src/stories/breadcrumb/breadcrumb.stories.js +0 -33
  589. package/src/stories/button/README.md +0 -14
  590. package/src/stories/button/button.stories.js +0 -63
  591. package/src/stories/checkbox-boolean/README.md +0 -27
  592. package/src/stories/checkbox-boolean/checkbox-boolean.stories.js +0 -30
  593. package/src/stories/checkbox-group/README.md +0 -29
  594. package/src/stories/checkbox-group/checkbox-group.stories.js +0 -81
  595. package/src/stories/checkbox-group/data-vtl.json +0 -89
  596. package/src/stories/checkbox-group/data.json +0 -89
  597. package/src/stories/checkbox-one/checkbox-one.stories.js +0 -77
  598. package/src/stories/checkbox-one/data-vtl.json +0 -33
  599. package/src/stories/checkbox-one/data.json +0 -33
  600. package/src/stories/datepicker/README.md +0 -31
  601. package/src/stories/datepicker/data.json +0 -28
  602. package/src/stories/datepicker/datepicker.stories.js +0 -65
  603. package/src/stories/declarations/README.md +0 -19
  604. package/src/stories/declarations/declarations.stories.js +0 -112
  605. package/src/stories/dropdown/README.md +0 -44
  606. package/src/stories/dropdown/data-naf.json +0 -6963
  607. package/src/stories/dropdown/data-props.json +0 -81
  608. package/src/stories/dropdown/data.json +0 -78
  609. package/src/stories/dropdown/dropdown.stories.js +0 -65
  610. package/src/stories/filter-description/README.md +0 -15
  611. package/src/stories/filter-description/filter-description.stories.js +0 -70
  612. package/src/stories/input/README.md +0 -33
  613. package/src/stories/input/data.json +0 -28
  614. package/src/stories/input/input.stories.js +0 -67
  615. package/src/stories/input-number/README.md +0 -37
  616. package/src/stories/input-number/data.json +0 -30
  617. package/src/stories/input-number/input-number.stories.js +0 -75
  618. package/src/stories/loop/README.md +0 -25
  619. package/src/stories/loop/loop.stories.js +0 -80
  620. package/src/stories/loop/with-loop/data-loop-deeper.json +0 -298
  621. package/src/stories/loop/with-loop/data-loop.json +0 -211
  622. package/src/stories/loop/with-loop/data-vqs.json +0 -1384
  623. package/src/stories/loop/with-loop/index.js +0 -3
  624. package/src/stories/loop/with-roster/data-loop-deeper.json +0 -298
  625. package/src/stories/loop/with-roster/data-loop.json +0 -213
  626. package/src/stories/loop/with-roster/data-vqs.json +0 -1383
  627. package/src/stories/loop/with-roster/index.js +0 -3
  628. package/src/stories/loop-constructor/README.md +0 -27
  629. package/src/stories/loop-constructor/data-loop.json +0 -66
  630. package/src/stories/loop-constructor/data-roster.json +0 -68
  631. package/src/stories/loop-constructor/loop-constructor.stories.js +0 -42
  632. package/src/stories/progress-bar/README.md +0 -13
  633. package/src/stories/progress-bar/progress-bar.stories.js +0 -24
  634. package/src/stories/questionnaire/fat.json +0 -6558
  635. package/src/stories/questionnaire/questionnaire.stories.js +0 -25
  636. package/src/stories/radio/README.md +0 -31
  637. package/src/stories/radio/data-vtl.json +0 -32
  638. package/src/stories/radio/data.json +0 -32
  639. package/src/stories/radio/radio.stories.js +0 -81
  640. package/src/stories/sequence/README.md +0 -18
  641. package/src/stories/sequence/sequence.stories.js +0 -58
  642. package/src/stories/subsequence/README.md +0 -18
  643. package/src/stories/subsequence/subsequence.stories.js +0 -58
  644. package/src/stories/table/README.md +0 -29
  645. package/src/stories/table/data-one-axis-one-measure.json +0 -124
  646. package/src/stories/table/data-one-axis-two-measures.json +0 -193
  647. package/src/stories/table/data-one-hierarchical-axis.json +0 -204
  648. package/src/stories/table/data-two-axis-one-measure.json +0 -492
  649. package/src/stories/table/table.stories.js +0 -77
  650. package/src/stories/textarea/README.md +0 -33
  651. package/src/stories/textarea/data-forced.json +0 -28
  652. package/src/stories/textarea/data.json +0 -28
  653. package/src/stories/textarea/textarea.stories.js +0 -90
  654. package/src/stories/tooltip-response/README.md +0 -14
  655. package/src/stories/tooltip-response/tooltip.stories.js +0 -43
  656. package/src/stories/utils/custom-lunatic.scss +0 -595
  657. package/src/stories/utils/img/arrow.png +0 -0
  658. package/src/stories/utils/img/check_box.svg +0 -1
  659. package/src/stories/utils/img/check_box_outline.svg +0 -1
  660. package/src/stories/utils/img/lunatic-logo.png +0 -0
  661. package/src/stories/utils/img/menu-down.svg +0 -1
  662. package/src/stories/utils/img/menu-up.svg +0 -1
  663. package/src/stories/utils/img/radio_button_checked.svg +0 -1
  664. package/src/stories/utils/img/radio_button_unchecked.svg +0 -1
  665. package/src/stories/utils/options.js +0 -21
  666. package/src/stories/utils/orchestrator.js +0 -53
  667. package/src/tests/components/breadcrumb.spec.js +0 -13
  668. package/src/tests/components/button.spec.js +0 -11
  669. package/src/tests/components/checkbox-boolean.spec.js +0 -45
  670. package/src/tests/components/checkbox-group.spec.js +0 -53
  671. package/src/tests/components/checkbox-one.spec.js +0 -32
  672. package/src/tests/components/datepicker.spec.js +0 -22
  673. package/src/tests/components/declarations-wrappers/input-declarations-wrapper.spec.js +0 -67
  674. package/src/tests/components/declarations-wrappers/list-declarations-wrapper.spec.js +0 -52
  675. package/src/tests/components/declarations-wrappers/simple-declarations-wrapper.spec.js +0 -21
  676. package/src/tests/components/declarations.spec.js +0 -46
  677. package/src/tests/components/input-number.spec.js +0 -175
  678. package/src/tests/components/input.spec.js +0 -18
  679. package/src/tests/components/progress-bar.spec.js +0 -15
  680. package/src/tests/components/radio.spec.js +0 -27
  681. package/src/tests/components/sequence.spec.js +0 -9
  682. package/src/tests/components/subsequence.spec.js +0 -9
  683. package/src/tests/components/table.spec.js +0 -11
  684. package/src/tests/components/textarea.spec.js +0 -18
  685. package/src/tests/components/tooltip.spec.js +0 -25
  686. package/src/tests/setup/setupTests.js +0 -4
  687. package/src/tests/utils/lib/alphabet.spec.js +0 -36
  688. package/src/tests/utils/lib/checkbox/group.spec.js +0 -72
  689. package/src/tests/utils/lib/decorator/title-decorator.spec.js +0 -12
  690. package/src/tests/utils/lib/items-positioning.spec.js +0 -17
  691. package/src/tests/utils/lib/label-position.spec.js +0 -22
  692. package/src/tests/utils/lib/loops/bindings.spec.js +0 -60
  693. package/src/tests/utils/lib/loops/shared.spec.js +0 -77
  694. package/src/tests/utils/lib/responses.spec.js +0 -64
  695. package/src/tests/utils/lib/style.spec.js +0 -26
  696. package/src/tests/utils/lib/table/roster.spec.js +0 -25
  697. package/src/tests/utils/lib/tooltip/build-response.spec.js +0 -95
  698. package/src/tests/utils/lib/tooltip/content.spec.js +0 -109
  699. package/src/tests/utils/to-expose/handler/handler.spec.js +0 -86
  700. package/src/tests/utils/to-expose/handler/questionnaire.json +0 -154
  701. package/src/tests/utils/to-expose/handler/results/index.js +0 -6
  702. package/src/tests/utils/to-expose/handler/results/res-double.json +0 -157
  703. package/src/tests/utils/to-expose/handler/results/res-input-collected.json +0 -154
  704. package/src/tests/utils/to-expose/handler/results/res-input-edited.json +0 -157
  705. package/src/tests/utils/to-expose/handler/results/res-loop.json +0 -157
  706. package/src/tests/utils/to-expose/handler/results/res-matrix.json +0 -157
  707. package/src/tests/utils/to-expose/handler/results/res-responses.json +0 -157
  708. package/src/tests/utils/to-expose/init-questionnaire/data.json +0 -12
  709. package/src/tests/utils/to-expose/init-questionnaire/init-questionnaire.spec.js +0 -19
  710. package/src/tests/utils/to-expose/init-questionnaire/questionnaire.json +0 -129
  711. package/src/tests/utils/to-expose/init-questionnaire/result.json +0 -162
  712. package/src/tests/utils/to-expose/interpret.spec.js +0 -42
  713. package/src/tests/utils/to-expose/state/questionnaire.json +0 -61
  714. package/src/tests/utils/to-expose/state/results.js +0 -78
  715. package/src/tests/utils/to-expose/state/state.spec.js +0 -59
  716. package/src/utils/lib/alphabet.js +0 -1
  717. package/src/utils/lib/checkbox/group.js +0 -21
  718. package/src/utils/lib/checkbox/index.js +0 -1
  719. package/src/utils/lib/decorator/index.js +0 -1
  720. package/src/utils/lib/decorator/title-decorator.js +0 -16
  721. package/src/utils/lib/index.js +0 -12
  722. package/src/utils/lib/label-position.js +0 -12
  723. package/src/utils/lib/loops/bindings.js +0 -47
  724. package/src/utils/lib/loops/index.js +0 -2
  725. package/src/utils/lib/loops/shared.js +0 -43
  726. package/src/utils/lib/memo-check.js +0 -24
  727. package/src/utils/lib/options-positioning.js +0 -9
  728. package/src/utils/lib/prop-types/declarations.js +0 -22
  729. package/src/utils/lib/prop-types/index.js +0 -5
  730. package/src/utils/lib/prop-types/lines.js +0 -6
  731. package/src/utils/lib/prop-types/options.js +0 -8
  732. package/src/utils/lib/prop-types/response.js +0 -6
  733. package/src/utils/lib/prop-types/value-type.js +0 -9
  734. package/src/utils/lib/responses.js +0 -9
  735. package/src/utils/lib/style.js +0 -10
  736. package/src/utils/lib/table/index.js +0 -1
  737. package/src/utils/lib/table/roster.js +0 -18
  738. package/src/utils/lib/tooltip/build-response.js +0 -41
  739. package/src/utils/lib/tooltip/content.js +0 -52
  740. package/src/utils/lib/tooltip/index.js +0 -6
  741. package/src/utils/to-expose/handler.js +0 -99
  742. package/src/utils/to-expose/hook.js +0 -65
  743. package/src/utils/to-expose/index.js +0 -11
  744. package/src/utils/to-expose/init-questionnaire.js +0 -114
  745. package/src/utils/to-expose/interpret.js +0 -53
  746. package/src/utils/to-expose/state.js +0 -58
@@ -1,595 +0,0 @@
1
- // Lunatic
2
-
3
- // Define colors
4
- $colorPrimaryDark: #2a5885;
5
- $colorPrimaryLight: rgb(81, 129, 184);
6
- $colorPrimaryMain: #4a73a4;
7
- $colorPrimaryContrastText: #ffffff;
8
-
9
- $colorVeryLight: rgb(219, 228, 239);
10
- $colorCurrentItem: #0d823e;
11
-
12
- $colorSecondaryDark: #1a293b;
13
- $colorSecondaryLight: #f7f8fa;
14
- $colorSecondaryMain: #1a293b;
15
- $colorSecondaryContrastText: #ffffff;
16
-
17
- * {
18
- box-sizing: border-box;
19
- font-family: 'Gotham SSm A', 'Gotham SSm B', sans-serif;
20
- }
21
-
22
- .lunatic input[type='number']::-webkit-inner-spin-button,
23
- .lunatic input[type='number']::-webkit-outer-spin-button {
24
- -webkit-appearance: none;
25
- margin: 0;
26
- }
27
-
28
- .lunatic input[type='number'] {
29
- text-align: left;
30
- }
31
-
32
- .lunatic textarea {
33
- border-color: $colorPrimaryDark;
34
- &:focus {
35
- outline: none;
36
- box-shadow: 0 0 10px $colorPrimaryMain;
37
- }
38
- }
39
-
40
- .lunatic .datepicker-lunatic {
41
- border-color: $colorPrimaryDark;
42
- &:focus {
43
- outline: none;
44
- box-shadow: 0 0 10px $colorPrimaryMain;
45
- }
46
- }
47
-
48
- // Conteneur
49
- .component.lunatic {
50
- margin-bottom: 0.4375rem;
51
- }
52
-
53
- #componentsPrix {
54
- display: flex;
55
- flex-wrap: wrap;
56
- flex-direction: row;
57
-
58
- // border: 1px solid #39d2b4;
59
- width: 650px;
60
- }
61
-
62
- .promotionEtPrixLieQuantite {
63
- margin-left: 15px;
64
- visibility: hidden;
65
- // border: 1px solid red;
66
- }
67
-
68
- .cacher {
69
- visibility: hidden;
70
- //border: 1px solid red;
71
- }
72
- // sequence-lunatic
73
-
74
- .lunatic .sequence-lunatic {
75
- padding: 0;
76
- font-size: 0.875rem;
77
- color: $colorPrimaryLight;
78
- background-color: $colorSecondaryContrastText;
79
- border: 0;
80
- height: 1.875rem;
81
- }
82
-
83
- // FIELDSET
84
- .lunatic fieldset,
85
- .lunatic .checkbox-group,
86
- .lunatic .radio-group {
87
- border: 0;
88
- outline: 0;
89
- margin-top: 0.9375rem;
90
- }
91
-
92
- // CHECKBOXES & RADIO_BUTTONS
93
- .lunatic .checkbox-modality,
94
- .lunatic .radio-modality {
95
- margin-top: 0.375rem;
96
- }
97
-
98
- .lunatic .checkbox-lunatic,
99
- .lunatic .radio-lunatic {
100
- box-shadow: none;
101
- opacity: 0;
102
- margin-right: -1.1875rem;
103
- }
104
-
105
- .lunatic .checkbox-lunatic:focus,
106
- .lunatic .radio-lunatic:focus {
107
- box-shadow: none;
108
- }
109
-
110
- .lunatic .checkbox-lunatic + label,
111
- .lunatic .radio-lunatic + label {
112
- padding-right: 0.3125rem;
113
- padding-top: 0.125rem;
114
- }
115
-
116
- .lunatic .checkbox-lunatic:focus + label,
117
- .lunatic .radio-lunatic:focus + label {
118
- box-shadow: none;
119
- background-color: rgba(0, 0, 0, 0.05);
120
- border-right: 1px solid $colorVeryLight;
121
- padding-right: 0.3125rem;
122
- padding-top: 0.125rem;
123
- padding-bottom: 0.125rem;
124
- }
125
- .lunatic .checkbox-modality label::before,
126
- .lunatic .checkbox-lunatic + label::before,
127
- .lunatic .radio-lunatic + label::before {
128
- border: 0;
129
- transform: none;
130
- margin: 0;
131
- margin-right: 0.375rem;
132
- padding: 0;
133
- position: relative;
134
- top: 0.4375rem;
135
- }
136
-
137
- .lunatic .checkbox-lunatic + label::before {
138
- content: url(./img/check_box_outline.svg);
139
- }
140
-
141
- .lunatic .radio-lunatic + label::before {
142
- content: url(./img/radio_button_unchecked.svg);
143
- }
144
-
145
- .lunatic .checkbox-lunatic:checked + label,
146
- .lunatic .radio-lunatic:checked + label {
147
- border: 0;
148
- outline: 0;
149
- padding: 0;
150
- padding-right: 0.3125rem;
151
- padding-top: 0.125rem;
152
- padding-bottom: 0.125rem;
153
- background-color: rgba(0, 0, 0, 0.05);
154
- border-right: 1px solid $colorVeryLight;
155
- }
156
-
157
- .lunatic.checkbox-boolean .checkbox-modality {
158
- display: flex;
159
- flex-direction: row-reverse;
160
- justify-content: flex-end;
161
- }
162
-
163
- .lunatic.checkbox-boolean .checkbox-lunatic {
164
- position: relative;
165
- top: 5px;
166
- }
167
-
168
- .lunatic .checkbox-lunatic:checked + label::before {
169
- content: url(./img/check_box.svg);
170
- }
171
-
172
- .lunatic .radio-lunatic:checked + label::before {
173
- content: url(./img/radio_button_checked.svg);
174
- }
175
-
176
- // CHECKBOX BOOLEAN
177
- .lunatic .checkbox-boolean-lunatic + label::before,
178
- .lunatic .checkbox-boolean-lunatic-no-margin + label::before {
179
- content: url(./img/check_box_outline.svg);
180
- }
181
- .lunatic .checkbox-boolean-lunatic:checked + label::before,
182
- .lunatic .checkbox-boolean-lunatic-no-margin:checked + label::before {
183
- content: url(./img/check_box.svg);
184
- }
185
- .lunatic .checkbox-boolean-lunatic {
186
- box-shadow: none;
187
- opacity: 1;
188
- margin-right: -1.1875rem;
189
- & + span {
190
- padding-right: 0.3125rem;
191
- padding-top: 0.125rem;
192
- }
193
- }
194
- .lunatic .checkbox-boolean-modality label::before {
195
- border: 0;
196
- transform: none;
197
- margin: 0;
198
- margin-right: 0.375rem;
199
- padding: 0;
200
- position: relative;
201
- top: 0.4375rem;
202
- }
203
-
204
- // LABEL, LEGEND
205
- .lunatic label,
206
- .lunatic legend,
207
- .lunatic .subsequence-lunatic,
208
- .lunatic-dropdown-label {
209
- color: $colorPrimaryDark;
210
- background-color: $colorPrimaryContrastText;
211
- border: 0;
212
- padding: 0;
213
- font-size: 0.75rem;
214
- font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
215
- line-height: 0.75rem;
216
- font-weight: bold;
217
- margin-bottom: 0.375rem;
218
- }
219
-
220
- // SELECT
221
- // .lunatic .simple-select {
222
- // display: inline-block;
223
- // position: relative;
224
- // }
225
-
226
- // .lunatic .simple-select button {
227
- // width: 100%;
228
- // height: 2rem;
229
- // line-height: 1.1875rem;
230
-
231
- // color: $colorPrimaryMain;
232
- // background-color: white;
233
- // position: relative;
234
-
235
- // border: 0;
236
- // border-radius: 0;
237
- // border-bottom-width: 0.0625rem;
238
- // border-bottom-color: $colorPrimaryDark;
239
- // border-bottom-style: dotted;
240
-
241
- // margin: 0;
242
-
243
- // padding-bottom: 0.4375rem;
244
- // padding-left: 0.375rem;
245
- // padding-right: 0;
246
- // padding-top: 0.375rem;
247
-
248
- // text-decoration: none;
249
- // display: block;
250
-
251
- // text-align: left;
252
- // }
253
-
254
- // .lunatic .simple-select button:focus {
255
- // border: 0;
256
- // outline: none;
257
- // box-shadow: none;
258
- // background: rgba(0, 0, 0, 0.05);
259
- // border-bottom-width: 0.0625rem;
260
- // border-bottom-color: $colorPrimaryDark;
261
- // border-bottom-style: dotted;
262
- // }
263
- // .lunatic .simple-select button:after {
264
- // border: 0;
265
- // transform: none;
266
- // float: right;
267
- // margin-left: 0.3125rem;
268
- // content: url(./img/menu-down.svg);
269
- // color: rgba(0, 0, 0, 0.54);
270
- // padding: 0;
271
- // }
272
-
273
- // .lunatic .simple-select button[aria-expanded='true']:after {
274
- // border: 0;
275
- // transform: none;
276
- // float: right;
277
- // margin-left: 0.3125rem;
278
- // content: url(./img/menu-up.svg);
279
- // padding: 0;
280
- // }
281
-
282
- // .lunatic .simple-select ul.options,
283
- // .lunatic .simple-select ul.options:active {
284
- // box-shadow: 0 0.3125rem 0.3125rem -0.1875rem rgba(0, 0, 0, 0.2),
285
- // 0 0.5rem 0.625rem 0.0625rem rgba(0, 0, 0, 0.14),
286
- // 0 0.1875rem 0.875rem 0.125rem rgba(0, 0, 0, 0.12);
287
- // opacity: 1;
288
- // transform: scale(1, 1) translateZ(0);
289
- // transition: opacity 343ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
290
- // transform 228ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
291
- // transform-origin: 0 12.75rem 0;
292
- // padding: 0.5rem 0;
293
- // margin: 0;
294
- // background-color: white;
295
- // position: absolute;
296
- // top: -3.125rem;
297
- // list-style: none;
298
- // border: 0;
299
- // list-style-type: none;
300
-
301
- // min-width: 100%;
302
- // width: auto;
303
-
304
- // overflow-y: auto;
305
- // z-index: 1;
306
- // max-height: none;
307
- // }
308
-
309
- // .lunatic .simple-select .hidden {
310
- // display: none;
311
- // }
312
-
313
- // .lunatic .simple-select ul.options li.option {
314
- // cursor: pointer;
315
- // }
316
-
317
- // .lunatic .simple-select ul.options li.selected {
318
- // background-color: rgba(0, 0, 0, 0.14);
319
- // color: black;
320
- // }
321
-
322
- // .lunatic .simple-select .read-only {
323
- // background-color: #ebebe4;
324
- // color: black;
325
- // }
326
-
327
- // .lunatic .simple-select ul.options:focus {
328
- // border: 0;
329
- // outline: none;
330
- // background-color: white;
331
- // }
332
-
333
- // .lunatic .simple-select ul li.option {
334
- // display: flex;
335
- // justify-content: flex-start;
336
- // align-items: center;
337
-
338
- // border-color: rgba(0, 0, 0, 0.87);
339
- // border-radius: 0;
340
- // border-style: none;
341
- // border-width: 0;
342
- // border-image-outset: 0;
343
- // border-image-repeat: stretch;
344
- // border-image-slice: 100%;
345
- // border-image-source: none;
346
- // border-image-width: 1;
347
-
348
- // box-sizing: content-box;
349
- // color: rgba(0, 0, 0, 0.87);
350
- // cursor: pointer;
351
-
352
- // font-family: Roboto, Helvetica, Arial, sans-serif;
353
- // font-size: 1.1rem;
354
- // font-weight: normal;
355
- // height: 1.5rem;
356
-
357
- // line-height: 1.65rem;
358
- // list-style-image: none;
359
- // list-style-position: outside;
360
- // list-style-type: none;
361
- // margin: 0;
362
- // outline-color: rgba(0, 0, 0, 0.87);
363
- // outline-style: none;
364
- // outline-width: 0;
365
- // overflow: hidden;
366
-
367
- // padding: 0.6875rem 1rem;
368
-
369
- // position: relative;
370
- // text-align: left;
371
- // text-decoration-color: rgba(0, 0, 0, 0.87);
372
- // text-decoration-line: none;
373
- // text-decoration-style: solid;
374
- // transition-delay: 0s;
375
- // transition-duration: 0.15s;
376
- // transition-property: background-color;
377
- // transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
378
- // user-select: none;
379
- // vertical-align: middle;
380
- // white-space: nowrap;
381
- // -webkit-appearance: none;
382
- // -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
383
- // }
384
-
385
- // .lunatic .simple-select ul li:hover {
386
- // text-decoration: none;
387
- // background-color: rgba(0, 0, 0, 0.08);
388
- // }
389
-
390
- //TEXT
391
- .lunatic .input-lunatic {
392
- font: inherit;
393
- color: currentColor;
394
- border: 0;
395
- border-radius: 0;
396
- border-bottom: 0.125rem double rgba(0, 0, 0, 0.42);
397
- margin: 0;
398
- padding: 0.375rem 0 0.375rem 0.4375rem;
399
- display: block;
400
- min-width: 0;
401
- box-sizing: content-box;
402
- background: none;
403
- // -webkit-tap-highlight-color: transparent;
404
- }
405
-
406
- .lunatic .input-lunatic:hover {
407
- outline: none;
408
- box-shadow: none;
409
- border-bottom: 0.125rem solid black;
410
- }
411
-
412
- .lunatic .input-lunatic:focus {
413
- outline: none;
414
- box-shadow: none;
415
- border-bottom: 0.125rem solid $colorPrimaryMain;
416
- }
417
-
418
- // CHECKBOXES SWITCH
419
- // https://www.creativejuiz.fr/blog/tutoriels/personnaliser-aspect-boutons-radio-checkbox-css
420
-
421
- .lunatic.switch [type='checkbox']:not(:checked),
422
- .lunatic.switch [type='checkbox']:checked {
423
- opacity: 0;
424
- }
425
-
426
- .lunatic.switch [type='checkbox']:not(:checked) + label,
427
- .lunatic.switch [type='checkbox']:checked + label {
428
- position: relative;
429
- padding-left: 46px;
430
- cursor: pointer;
431
- }
432
-
433
- .lunatic.switch [type='checkbox']:not(:checked) + label:before,
434
- .lunatic.switch [type='checkbox']:checked + label:before,
435
- .lunatic.switch [type='checkbox']:not(:checked) + label:after,
436
- .lunatic.switch [type='checkbox']:checked + label:after {
437
- content: '';
438
- position: absolute;
439
- }
440
-
441
- .lunatic.switch [type='checkbox']:not(:checked) + label:before,
442
- .lunatic.switch [type='checkbox']:checked + label:before {
443
- left: 0;
444
- top: 2px;
445
- width: 34px;
446
- height: 14px;
447
- background: #dddddd;
448
- border-radius: 15px;
449
- -webkit-transition: background-color 0.2s;
450
- -moz-transition: background-color 0.2s;
451
- -ms-transition: background-color 0.2s;
452
- transition: background-color 0.2s;
453
- }
454
-
455
- .lunatic.switch [type='checkbox']:not(:checked) + label:after,
456
- .lunatic.switch [type='checkbox']:checked + label:after {
457
- width: 20px;
458
- height: 20px;
459
- -webkit-transition: all 0.2s;
460
- -moz-transition: all 0.2s;
461
- -ms-transition: all 0.2s;
462
- transition: all 0.2s;
463
- border-radius: 50%;
464
- background: #7f8c9a;
465
- top: -1px;
466
- left: 0;
467
- }
468
-
469
- /* on checked */
470
- .lunatic.switch [type='checkbox']:checked + label:before {
471
- background: #34495e;
472
- }
473
- .lunatic.switch [type='checkbox']:checked + label:after {
474
- background: $colorCurrentItem;
475
- top: -1px;
476
- left: 15px;
477
- }
478
-
479
- .lunatic.switch [type='checkbox']:checked + label .ui,
480
- .lunatic.switch [type='checkbox']:not(:checked) + label .ui:before,
481
- .lunatic.switch [type='checkbox']:checked + label .ui:after {
482
- position: absolute;
483
- left: 6px;
484
- width: 65px;
485
- border-radius: 15px;
486
- font-size: 14px;
487
- font-weight: bold;
488
- line-height: 22px;
489
- -webkit-transition: all 0.2s;
490
- -moz-transition: all 0.2s;
491
- -ms-transition: all 0.2s;
492
- transition: all 0.2s;
493
- }
494
- .lunatic.switch [type='checkbox']:not(:checked) + label .ui:before {
495
- content: 'no';
496
- left: 32px;
497
- }
498
- .lunatic.switch [type='checkbox']:checked + label .ui:after {
499
- content: 'yes';
500
- color: #39d2b4;
501
- }
502
- .lunatic.switch [type='checkbox']:focus + label:before {
503
- -webkit-box-sizing: border-box;
504
- -moz-box-sizing: border-box;
505
- -ms-box-sizing: border-box;
506
- box-sizing: border-box;
507
- }
508
-
509
- .lunatic table.table-lunatic {
510
- .table-cell-axis {
511
- text-align: left;
512
- width: 100%;
513
- }
514
- & td {
515
- border-color: $colorPrimaryDark;
516
- }
517
- & thead td {
518
- text-align: center;
519
- }
520
- td,
521
- th {
522
- border-color: $colorPrimaryDark;
523
- padding: 0.4em;
524
- }
525
- }
526
-
527
- .lunatic .button-lunatic {
528
- color: white;
529
- font-size: medium;
530
- background-color: $colorPrimaryDark;
531
- border-color: $colorPrimaryDark;
532
- width: 30%;
533
- &:hover {
534
- background-color: white;
535
- color: $colorPrimaryDark;
536
- border-color: $colorPrimaryDark;
537
- }
538
- &:disabled {
539
- color: $colorPrimaryDark;
540
- background-color: $colorVeryLight;
541
- border-color: $colorPrimaryDark;
542
- }
543
- }
544
-
545
- .lunatic .tooltip-lunatic {
546
- border: none;
547
- color: white;
548
- .tooltip-text {
549
- background-color: $colorPrimaryDark;
550
- }
551
- }
552
-
553
- .lunatic .filter-description-lunatic {
554
- display: inline;
555
- color: $colorPrimaryDark;
556
- background-color: #dcdcdc;
557
- font-weight: bold;
558
- padding: 0.2em;
559
- }
560
- .lunatic .filter-description-lunatic::before {
561
- content: url(./img/arrow.png);
562
- vertical-align: -40%;
563
- margin-right: 0.5em;
564
- }
565
-
566
- .field-container {
567
- width: 100%;
568
- }
569
-
570
- .field-with-tooltip {
571
- width: 90%;
572
- }
573
-
574
- .tooltip {
575
- width: 10%;
576
- }
577
-
578
- .lunatic .table-lunatic {
579
- width: 50%;
580
- .field-with-tooltip {
581
- width: 95%;
582
- }
583
- .tooltip {
584
- width: 5%;
585
- }
586
- .tooltip-lunatic {
587
- img {
588
- width: 1em;
589
- }
590
- }
591
- }
592
-
593
- .lunatic-loop {
594
- border: 1px solid $colorPrimaryMain;
595
- }
Binary file
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="rgb(74,118,168)"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="rgb(74,118,168)"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24" fill="rgba(0, 0, 0, 0.54)"><path d="M7,10L12,15L17,10H7Z" /></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M7,15L12,10L17,15H7Z" /></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="rgb(74,118,168)"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="rgb(74,118,168)"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
@@ -1,21 +0,0 @@
1
- export const positioningOptions = {
2
- Default: 'DEFAULT',
3
- Horizontal: 'HORIZONTAL',
4
- Vertical: 'VERTICAL',
5
- };
6
-
7
- export const labelPositionOptions = {
8
- Default: 'DEFAULT',
9
- Top: 'TOP',
10
- Right: 'RIGHT',
11
- Bottom: 'BOTTOM',
12
- Left: 'LEFT',
13
- };
14
-
15
- export const unitPositionOptions = {
16
- Default: 'DEFAULT',
17
- Before: 'BEFORE',
18
- After: 'AFTER',
19
- };
20
-
21
- export const featuresOptions = { None: [], Vtl: ['VTL'] };
@@ -1,53 +0,0 @@
1
- import React from 'react';
2
- import * as lunatic from 'components';
3
- import './custom-lunatic.scss';
4
-
5
- const OrchestratorForStories = ({
6
- source,
7
- data = {},
8
- management = false,
9
- features,
10
- ...rest
11
- }) => {
12
- const preferences = management
13
- ? ['COLLECTED', 'FORCED', 'EDITED']
14
- : ['COLLECTED'];
15
- const savingType = management ? 'EDITED' : 'COLLECTED';
16
- const { handleChange, components, bindings } = lunatic.useLunatic(
17
- source,
18
- data,
19
- {
20
- savingType,
21
- preferences,
22
- features,
23
- management,
24
- }
25
- );
26
-
27
- return (
28
- <div className="container">
29
- <div className="components">
30
- {components.map((q) => {
31
- const { id, componentType } = q;
32
- const Component = lunatic[componentType];
33
- return (
34
- <div className="lunatic lunatic-component" key={`component-${id}`}>
35
- <Component
36
- {...rest}
37
- {...q}
38
- handleChange={handleChange}
39
- preferences={preferences}
40
- management={management}
41
- features={features}
42
- bindings={bindings}
43
- writable
44
- />
45
- </div>
46
- );
47
- })}
48
- </div>
49
- </div>
50
- );
51
- };
52
-
53
- export default OrchestratorForStories;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { shallow } from 'enzyme';
3
- import { Breadcrumb } from 'components';
4
-
5
- describe('breadcrumb', () => {
6
- it('renders without crashing', () => {
7
- shallow(<Breadcrumb elements={[]} />);
8
- });
9
- it('renders with elements', () => {
10
- const wrapper = shallow(<Breadcrumb elements={['One', 'Two']} />);
11
- expect(wrapper.find('.breadcrumb-lunatic').children()).toHaveLength(2);
12
- });
13
- });