@inseefr/lunatic 0.1.0-hackathon → 0.1.0-prisme

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 (421) hide show
  1. package/README.md +2 -0
  2. package/lib/index.js +1184 -468
  3. package/lib/index.js.map +1 -1
  4. package/package.json +6 -4
  5. package/src/components/breadcrumb/component.js +29 -29
  6. package/src/components/breadcrumb/index.js +1 -1
  7. package/src/components/button/button.scss +24 -24
  8. package/src/components/button/component.js +53 -53
  9. package/src/components/button/index.js +1 -1
  10. package/src/components/checkbox/boolean.js +2 -2
  11. package/src/components/checkbox/group.js +2 -2
  12. package/src/components/checkbox/index.js +3 -3
  13. package/src/components/checkbox/one.js +2 -2
  14. package/src/components/component-wrapper/controls/component.js +70 -0
  15. package/src/components/component-wrapper/controls/controls.scss +6 -0
  16. package/src/components/component-wrapper/controls/index.js +1 -0
  17. package/src/components/component-wrapper/controls/validators/datepicker.js +44 -0
  18. package/src/components/component-wrapper/controls/validators/index.js +16 -0
  19. package/src/components/component-wrapper/controls/validators/input-number.js +23 -0
  20. package/src/components/{missing-wrapper → component-wrapper}/index.js +1 -1
  21. package/src/components/component-wrapper/missing/component.js +200 -0
  22. package/src/components/component-wrapper/missing/index.js +1 -0
  23. package/src/components/{missing-wrapper → component-wrapper/missing}/missing.scss +0 -0
  24. package/src/components/component-wrapper/wrapper.js +23 -0
  25. package/src/components/components.js +19 -18
  26. package/src/components/datepicker/component.js +18 -3
  27. package/src/components/datepicker/datepicker.scss +1 -1
  28. package/src/components/datepicker/index.js +1 -1
  29. package/src/components/declarations/index.js +1 -1
  30. package/src/components/declarations/wrappers/index.js +3 -3
  31. package/src/components/declarations/wrappers/input-declarations-wrapper.js +65 -16
  32. package/src/components/declarations/wrappers/list-declarations-wrapper.js +232 -232
  33. package/src/components/dropdown/commons/actions.js +40 -31
  34. package/src/components/dropdown/commons/components/dropdown-field.js +46 -46
  35. package/src/components/dropdown/commons/components/dropdown.js +21 -0
  36. package/src/components/dropdown/commons/components/label.js +28 -28
  37. package/src/components/dropdown/commons/components/panel.js +78 -78
  38. package/src/components/dropdown/commons/event-callbacks/index.js +5 -5
  39. package/src/components/dropdown/commons/event-callbacks/on-keydown-callback.js +29 -29
  40. package/src/components/dropdown/commons/reducer.js +152 -149
  41. package/src/components/dropdown/component.js +2 -2
  42. package/src/components/dropdown/dropdown-edit/dropdown-edit.js +10 -1
  43. package/src/components/dropdown/dropdown-edit/icone.js +33 -33
  44. package/src/components/dropdown/dropdown-edit/option.js +62 -62
  45. package/src/components/dropdown/dropdown-edit/prefix-tools.js +51 -51
  46. package/src/components/dropdown/dropdown-simple/dropdown.js +11 -2
  47. package/src/components/dropdown/dropdown-simple/option.js +15 -15
  48. package/src/components/dropdown/index.js +1 -1
  49. package/src/components/filter-description/component.js +42 -42
  50. package/src/components/filter-description/index.js +1 -1
  51. package/src/components/icon/assets/checkbox-checked.js +16 -16
  52. package/src/components/icon/assets/checkbox-unchecked.js +16 -16
  53. package/src/components/icon/assets/index.js +4 -4
  54. package/src/components/icon/assets/radio-checked.js +16 -16
  55. package/src/components/icon/assets/radio-unchecked.js +16 -16
  56. package/src/components/icon/component.js +33 -33
  57. package/src/components/icon/index.js +1 -1
  58. package/src/components/index.js +5 -3
  59. package/src/components/index.scss +5 -3
  60. package/src/components/input/index.js +2 -2
  61. package/src/components/input/input-number.js +14 -39
  62. package/src/components/input/input.js +2 -2
  63. package/src/components/input/input.scss +0 -6
  64. package/src/components/loop/component.js +1 -0
  65. package/src/components/loop/index.js +1 -1
  66. package/src/components/loop/wrapper.js +15 -15
  67. package/src/components/loop-constructor/block/component.js +2 -2
  68. package/src/components/loop-constructor/block/index.js +1 -1
  69. package/src/components/loop-constructor/index.js +1 -1
  70. package/src/components/loop-constructor/roster/component.js +2 -2
  71. package/src/components/loop-constructor/roster/index.js +1 -1
  72. package/src/components/loop-constructor/wrapper/body-component.js +21 -0
  73. package/src/components/loop-constructor/wrapper/build-components.js +33 -33
  74. package/src/components/loop-constructor/wrapper/index.js +1 -1
  75. package/src/components/modal/component.js +36 -0
  76. package/src/components/modal/index.js +1 -0
  77. package/src/components/modal/modal.scss +33 -0
  78. package/src/components/progress-bar/component.js +28 -28
  79. package/src/components/progress-bar/index.js +1 -1
  80. package/src/components/radio/component.js +2 -2
  81. package/src/components/radio/index.js +1 -1
  82. package/src/components/sequence/index.js +1 -1
  83. package/src/components/subsequence/index.js +1 -1
  84. package/src/components/suggester/check-store.js +68 -70
  85. package/src/components/suggester/commons-tools/binded-keys.js +11 -11
  86. package/src/components/suggester/commons-tools/index.js +1 -1
  87. package/src/components/suggester/components/create-on-keydown-callback.js +28 -28
  88. package/src/components/suggester/components/index.js +2 -2
  89. package/src/components/suggester/components/panel/index.js +2 -2
  90. package/src/components/suggester/components/panel/option-container.js +1 -1
  91. package/src/components/suggester/components/panel/panel-container.js +21 -21
  92. package/src/components/suggester/components/selection/delete.js +38 -38
  93. package/src/components/suggester/components/selection/index.js +1 -1
  94. package/src/components/suggester/components/selection/selection.js +1 -1
  95. package/src/components/suggester/components/suggester-content.js +42 -42
  96. package/src/components/suggester/components/suggester.js +43 -3
  97. package/src/components/suggester/find-best-label/find-best-label.js +3 -1
  98. package/src/components/suggester/idb-suggester.js +7 -1
  99. package/src/components/suggester/index.js +1 -1
  100. package/src/components/suggester/lunatic-suggester.js +6 -3
  101. package/src/components/suggester/searching/create-searching.js +3 -1
  102. package/src/components/suggester/state-management/index.js +6 -6
  103. package/src/components/suggester/state-management/intial-state.js +13 -13
  104. package/src/components/suggester/state-management/reducer/index.js +1 -1
  105. package/src/components/suggester/state-management/reducer/reduce-on-blur.js +5 -5
  106. package/src/components/suggester/state-management/reducer/reduce-on-change-search.js +8 -8
  107. package/src/components/suggester/state-management/reducer/reduce-on-click-option.js +8 -8
  108. package/src/components/suggester/state-management/reducer/reduce-on-error.js +8 -8
  109. package/src/components/suggester/state-management/reducer/reduce-on-focus.js +5 -5
  110. package/src/components/suggester/state-management/reducer/reduce-on-key-down.js +73 -73
  111. package/src/components/suggester/state-management/reducer/reduce-on-unexpected-error.js +7 -7
  112. package/src/components/suggester/state-management/reducer/reduce-on-update-options.js +11 -11
  113. package/src/components/suggester/state-management/suggester-context.js +4 -4
  114. package/src/components/suggester/state-management/use-dispatch.js +11 -11
  115. package/src/components/suggester/suggester-wrapper.js +9 -3
  116. package/src/components/suggester-loader-widget/index.js +1 -1
  117. package/src/components/suggester-loader-widget/loader-row.js +102 -102
  118. package/src/components/suggester-loader-widget/progress.js +25 -25
  119. package/src/components/suggester-loader-widget/tools/action-tool.js +20 -20
  120. package/src/components/suggester-loader-widget/tools/index.js +2 -2
  121. package/src/components/suggester-loader-widget/tools/tools.js +7 -7
  122. package/src/components/suggester-loader-widget/widget-container.js +35 -35
  123. package/src/components/suggester-loader-widget/widget.scss +176 -176
  124. package/src/components/table/index.js +1 -1
  125. package/src/components/table/table.js +5 -3
  126. package/src/components/textarea/component.js +2 -2
  127. package/src/components/textarea/index.js +1 -1
  128. package/src/components/tooltip/img/index.js +4 -4
  129. package/src/components/tooltip/index.js +1 -1
  130. package/src/components/tooltip/response.js +52 -52
  131. package/src/constants/component-types.js +1 -1
  132. package/src/constants/declarations.js +14 -14
  133. package/src/constants/event-types.js +13 -13
  134. package/src/constants/index.js +5 -5
  135. package/src/constants/supported-preferences.js +10 -10
  136. package/src/constants/value-types.js +5 -5
  137. package/src/constants/variable-types.js +4 -4
  138. package/src/stories/breadcrumb/README.md +14 -14
  139. package/src/stories/button/README.md +14 -14
  140. package/src/stories/button/button.stories.js +27 -27
  141. package/src/stories/checkbox-boolean/README.md +27 -27
  142. package/src/stories/checkbox-boolean/checkbox-boolean.stories.js +54 -54
  143. package/src/stories/checkbox-boolean/data-forced.json +48 -48
  144. package/src/stories/checkbox-group/README.md +29 -29
  145. package/src/stories/checkbox-group/checkbox-group.stories.js +60 -60
  146. package/src/stories/checkbox-group/data-forced.json +89 -89
  147. package/src/stories/checkbox-group/data-vtl.json +102 -102
  148. package/src/stories/checkbox-group/data.json +89 -89
  149. package/src/stories/checkbox-one/README.md +31 -31
  150. package/src/stories/checkbox-one/checkbox-one.stories.js +57 -57
  151. package/src/stories/checkbox-one/data-forced.json +33 -33
  152. package/src/stories/checkbox-one/data-vtl.json +48 -48
  153. package/src/stories/checkbox-one/data.json +33 -33
  154. package/src/stories/datepicker/README.md +31 -31
  155. package/src/stories/datepicker/data-forced.json +28 -28
  156. package/src/stories/datepicker/data.json +45 -43
  157. package/src/stories/datepicker/datepicker.stories.js +60 -60
  158. package/src/stories/declarations/README.md +19 -19
  159. package/src/stories/dropdown/data-forced.json +81 -81
  160. package/src/stories/dropdown/data-naf.json +6963 -6963
  161. package/src/stories/dropdown/data-props.json +111 -111
  162. package/src/stories/filter-description/README.md +15 -15
  163. package/src/stories/filter-description/filter-description.stories.js +53 -53
  164. package/src/stories/icons/icons.stories.js +16 -16
  165. package/src/stories/icons/lunatic-icon.scss +10 -10
  166. package/src/stories/input/README.md +33 -33
  167. package/src/stories/input/data-forced.json +41 -41
  168. package/src/stories/input/data.json +41 -41
  169. package/src/stories/input/input.stories.js +72 -72
  170. package/src/stories/input-number/README.md +37 -37
  171. package/src/stories/input-number/data-forced.json +27 -27
  172. package/src/stories/input-number/data.json +42 -42
  173. package/src/stories/input-number/input-number.stories.js +81 -81
  174. package/src/stories/loop/README.md +25 -25
  175. package/src/stories/loop/loop.stories.js +88 -88
  176. package/src/stories/loop/with-loop/data-loop-deeper.json +298 -298
  177. package/src/stories/loop/with-loop/data-loop.json +336 -336
  178. package/src/stories/loop/with-loop/index.js +2 -2
  179. package/src/stories/loop/with-roster/data-forced.json +213 -213
  180. package/src/stories/loop/with-roster/data-loop-deeper.json +298 -298
  181. package/src/stories/loop/with-roster/data-loop.json +288 -288
  182. package/src/stories/loop/with-roster/index.js +3 -3
  183. package/src/stories/loop-constructor/README.md +27 -27
  184. package/src/stories/loop-constructor/data-input-forced.json +64 -64
  185. package/src/stories/loop-constructor/data-input.json +100 -100
  186. package/src/stories/loop-constructor/data-loop-forced.json +66 -66
  187. package/src/stories/loop-constructor/data-loop-static-forced.json +66 -66
  188. package/src/stories/loop-constructor/data-loop-static.json +81 -81
  189. package/src/stories/loop-constructor/data-loop.json +81 -81
  190. package/src/stories/loop-constructor/data-roster-forced.json +68 -68
  191. package/src/stories/loop-constructor/data-roster.json +83 -83
  192. package/src/stories/loop-constructor/loop-constructor.stories.js +180 -180
  193. package/src/stories/pagination/deeper-loop.json +327 -327
  194. package/src/stories/pagination/pagination.stories.js +60 -60
  195. package/src/stories/pagination/simple-loop.json +277 -277
  196. package/src/stories/pagination/simpsons-question.json +4952 -4952
  197. package/src/stories/pagination/simpsons-sequence.json +4362 -4362
  198. package/src/stories/progress-bar/README.md +13 -13
  199. package/src/stories/questionnaire/arithmetic-management.json +47 -0
  200. package/src/stories/questionnaire/kish.json +275 -0
  201. package/src/stories/questionnaire/logement-queen.json +23390 -0
  202. package/src/stories/questionnaire/logement-s2.json +46027 -44536
  203. package/src/stories/questionnaire/logement.json +20347 -26087
  204. package/src/stories/questionnaire/loop-and-controls.json +481 -0
  205. package/src/stories/questionnaire/questionnaire.stories.js +94 -12
  206. package/src/stories/questionnaire/simpsons.json +4816 -4816
  207. package/src/stories/questionnaire/update-external/data.json +1 -0
  208. package/src/stories/questionnaire/update-external/questionnaire.json +75 -0
  209. package/src/stories/radio/README.md +31 -31
  210. package/src/stories/radio/data-forced.json +32 -32
  211. package/src/stories/radio/data-vtl.json +47 -47
  212. package/src/stories/radio/data.json +32 -32
  213. package/src/stories/radio/radio.stories.js +64 -64
  214. package/src/stories/sequence/README.md +18 -18
  215. package/src/stories/subsequence/README.md +18 -18
  216. package/src/stories/suggester/bailleurs-sociaux-2021/fetch-bailleurs.js +12 -0
  217. package/src/stories/suggester/bailleurs-sociaux-2021/index.js +1 -0
  218. package/src/stories/suggester/cog-communes/index.js +2 -2
  219. package/src/stories/suggester/cog-communes/option-cog-renderer.js +15 -15
  220. package/src/stories/suggester/cog-communes/theme.scss +12 -12
  221. package/src/stories/suggester/data-auto.json +1 -0
  222. package/src/stories/suggester/data.json +35 -2
  223. package/src/stories/suggester/naf-rev2/fetch-naf.js +57 -57
  224. package/src/stories/suggester/naf-rev2/theme.scss +36 -36
  225. package/src/stories/suggester/suggester-workers.stories.js +48 -1
  226. package/src/stories/suggester/suggester.stories.js +5 -0
  227. package/src/stories/table/README.md +29 -29
  228. package/src/stories/table/data-default.json +19 -19
  229. package/src/stories/table/data-one-axis-one-measure.json +139 -139
  230. package/src/stories/table/data-one-axis-two-measures.json +208 -208
  231. package/src/stories/table/data-one-hierarchical-axis.json +219 -219
  232. package/src/stories/table/data-roster.json +486 -486
  233. package/src/stories/table/data-two-axis-one-measure.json +507 -507
  234. package/src/stories/table/table.stories.js +82 -82
  235. package/src/stories/textarea/README.md +33 -33
  236. package/src/stories/textarea/data-forced.json +28 -28
  237. package/src/stories/textarea/data.json +43 -43
  238. package/src/stories/textarea/textarea.stories.js +68 -68
  239. package/src/stories/tooltip-response/README.md +14 -14
  240. package/src/stories/tooltip-response/md-link.json +31 -31
  241. package/src/stories/tooltip-response/md-tooltip.json +31 -31
  242. package/src/stories/tooltip-response/tooltip.stories.js +83 -83
  243. package/src/stories/utils/custom-lunatic.scss +23 -23
  244. package/src/stories/utils/options.js +25 -25
  245. package/src/stories/utils/orchestrator-split.js +119 -0
  246. package/src/stories/utils/orchestrator.js +14 -3
  247. package/src/tests/components/breadcrumb.spec.js +13 -13
  248. package/src/tests/components/button.spec.js +11 -11
  249. package/src/tests/components/checkbox-boolean.spec.js +45 -45
  250. package/src/tests/components/checkbox-group.spec.js +53 -53
  251. package/src/tests/components/checkbox-one.spec.js +32 -32
  252. package/src/tests/components/datepicker.spec.js +22 -22
  253. package/src/tests/components/declarations-wrappers/input-declarations-wrapper.spec.js +67 -67
  254. package/src/tests/components/declarations-wrappers/list-declarations-wrapper.spec.js +52 -52
  255. package/src/tests/components/declarations-wrappers/simple-declarations-wrapper.spec.js +21 -21
  256. package/src/tests/components/declarations.spec.js +46 -46
  257. package/src/tests/components/input-number.spec.js +188 -194
  258. package/src/tests/components/input.spec.js +18 -18
  259. package/src/tests/components/loops/loop-static.json +66 -66
  260. package/src/tests/components/loops/loop.json +258 -258
  261. package/src/tests/components/loops/loop.spec.js +30 -30
  262. package/src/tests/components/loops/roster-for-loop.spec.js +18 -18
  263. package/src/tests/components/missing-wrapper.spec.js +32 -33
  264. package/src/tests/components/progress-bar.spec.js +15 -15
  265. package/src/tests/components/radio.spec.js +27 -27
  266. package/src/tests/components/sequence.spec.js +9 -9
  267. package/src/tests/components/subsequence.spec.js +9 -9
  268. package/src/tests/components/table.spec.js +11 -11
  269. package/src/tests/components/textarea.spec.js +18 -18
  270. package/src/tests/components/tooltip.spec.js +25 -25
  271. package/src/tests/setup/setupTests.js +4 -4
  272. package/src/tests/utils/lib/alphabet.spec.js +36 -36
  273. package/src/tests/utils/lib/array.spec.js +22 -22
  274. package/src/tests/utils/lib/checkbox/group.spec.js +72 -72
  275. package/src/tests/utils/lib/decorator/title-decorator.spec.js +12 -12
  276. package/src/tests/utils/lib/input-number.spec.js +18 -18
  277. package/src/tests/utils/lib/items-positioning.spec.js +17 -17
  278. package/src/tests/utils/lib/label-position.spec.js +22 -22
  279. package/src/tests/utils/lib/loops/bindings.spec.js +75 -75
  280. package/src/tests/utils/lib/loops/shared.spec.js +82 -82
  281. package/src/tests/utils/lib/missing/missing.spec.js +74 -74
  282. package/src/tests/utils/lib/missing/mock.js +137 -137
  283. package/src/tests/utils/lib/pagination/shared.spec.js +42 -42
  284. package/src/tests/utils/lib/responses.spec.js +64 -64
  285. package/src/tests/utils/lib/style.spec.js +26 -26
  286. package/src/tests/utils/lib/tooltip/build-response.spec.js +95 -95
  287. package/src/tests/utils/lib/tooltip/content.spec.js +109 -109
  288. package/src/tests/utils/to-expose/handler/handler.spec.js +94 -94
  289. package/src/tests/utils/to-expose/handler/questionnaire.json +158 -158
  290. package/src/tests/utils/to-expose/handler/results/index.js +6 -6
  291. package/src/tests/utils/to-expose/handler/results/res-double.json +158 -158
  292. package/src/tests/utils/to-expose/handler/results/res-input-collected.json +158 -158
  293. package/src/tests/utils/to-expose/handler/results/res-input-edited.json +158 -158
  294. package/src/tests/utils/to-expose/handler/results/res-loop.json +158 -158
  295. package/src/tests/utils/to-expose/handler/results/res-matrix.json +158 -158
  296. package/src/tests/utils/to-expose/handler/results/res-responses.json +158 -158
  297. package/src/tests/utils/to-expose/init-questionnaire/data.json +12 -12
  298. package/src/tests/utils/to-expose/init-questionnaire/init-questionnaire.spec.js +19 -19
  299. package/src/tests/utils/to-expose/interpret/interpret.spec.js +48 -48
  300. package/src/tests/utils/to-expose/state/questionnaire.json +61 -61
  301. package/src/tests/utils/to-expose/state/results.js +78 -78
  302. package/src/tests/utils/to-expose/state/state.spec.js +59 -59
  303. package/src/utils/components/dragger/dragger.js +64 -64
  304. package/src/utils/components/dragger/index.js +1 -1
  305. package/src/utils/components/fab/fab.js +50 -50
  306. package/src/utils/components/fab/fab.scss +32 -32
  307. package/src/utils/components/fab/index.js +1 -1
  308. package/src/utils/components/field-wrapper.js +23 -23
  309. package/src/utils/components/is-network/index.js +1 -1
  310. package/src/utils/components/is-network/is-network.js +39 -39
  311. package/src/utils/components/is-network/use-online-status.js +51 -51
  312. package/src/utils/components/label-wrapper.js +45 -45
  313. package/src/utils/icons/closed.icon.js +24 -24
  314. package/src/utils/icons/cross.icon.js +24 -24
  315. package/src/utils/icons/load.icon.js +24 -24
  316. package/src/utils/icons/lunatic-icon.js +9 -9
  317. package/src/utils/icons/lunatic-icon.scss +4 -4
  318. package/src/utils/icons/network.icon.js +24 -24
  319. package/src/utils/icons/on-drag.icon.js +24 -24
  320. package/src/utils/icons/opened.icon.js +24 -24
  321. package/src/utils/idb-tools/clear-store.js +16 -16
  322. package/src/utils/idb-tools/get-entity.js +15 -15
  323. package/src/utils/idb-tools/get-idb.js +12 -12
  324. package/src/utils/lib/alphabet.js +1 -1
  325. package/src/utils/lib/array.js +7 -7
  326. package/src/utils/lib/checkbox/group.js +21 -21
  327. package/src/utils/lib/checkbox/index.js +1 -1
  328. package/src/utils/lib/controls/index.js +1 -0
  329. package/src/utils/lib/controls/utils.js +152 -0
  330. package/src/utils/lib/decorator/index.js +1 -1
  331. package/src/utils/lib/env.js +2 -2
  332. package/src/utils/lib/event.js +15 -15
  333. package/src/utils/lib/function.js +1 -1
  334. package/src/utils/lib/index.js +21 -19
  335. package/src/utils/lib/input-number.js +6 -6
  336. package/src/utils/lib/label-position.js +12 -12
  337. package/src/utils/lib/loops/bindings.js +66 -66
  338. package/src/utils/lib/loops/build-components.js +33 -33
  339. package/src/utils/lib/loops/index.js +3 -3
  340. package/src/utils/lib/loops/shared.js +55 -55
  341. package/src/utils/lib/memo-check.js +24 -24
  342. package/src/utils/lib/missing.js +52 -52
  343. package/src/utils/lib/pagination/flow.js +2 -2
  344. package/src/utils/lib/pagination/index.js +2 -2
  345. package/src/utils/lib/pagination/navigation/index.js +1 -1
  346. package/src/utils/lib/pagination/navigation/shared.js +12 -9
  347. package/src/utils/lib/prop-types/declarations.js +22 -22
  348. package/src/utils/lib/prop-types/index.js +5 -5
  349. package/src/utils/lib/prop-types/options.js +8 -8
  350. package/src/utils/lib/prop-types/response.js +6 -6
  351. package/src/utils/lib/prop-types/value-type.js +9 -9
  352. package/src/utils/lib/responses.js +9 -7
  353. package/src/utils/lib/splitting.js +142 -0
  354. package/src/utils/lib/table/index.js +1 -1
  355. package/src/utils/lib/table/roster.js +23 -23
  356. package/src/utils/lib/tooltip/build-response.js +41 -41
  357. package/src/utils/lib/tooltip/content.js +55 -55
  358. package/src/utils/lib/tooltip/index.js +6 -6
  359. package/src/utils/store-tools/auto-load.js +2 -1
  360. package/src/utils/store-tools/clear-store-data.js +8 -8
  361. package/src/utils/store-tools/clear-store-info.js +8 -8
  362. package/src/utils/store-tools/constantes.js +20 -20
  363. package/src/utils/store-tools/create/create.js +19 -19
  364. package/src/utils/store-tools/create/index.js +1 -1
  365. package/src/utils/store-tools/create/update-store-info.js +26 -26
  366. package/src/utils/store-tools/get-store-count.js +22 -22
  367. package/src/utils/store-tools/index.js +5 -5
  368. package/src/utils/store-tools/open-or-create-store.js +47 -47
  369. package/src/utils/store-tools/use-store-index.js +24 -24
  370. package/src/utils/suggester-workers/append-to-index/create-append-task.js +3 -1
  371. package/src/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +56 -0
  372. package/src/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +56 -0
  373. package/src/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +11 -11
  374. package/src/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +10 -0
  375. package/src/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +17 -0
  376. package/src/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.spec.js +14 -0
  377. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-accents.js +12 -0
  378. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-accents.spec.js +12 -0
  379. package/src/utils/suggester-workers/commons-tokenizer/{filter-double.js → filters/filter-double.js} +0 -0
  380. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-double.spec.js +20 -0
  381. package/src/utils/suggester-workers/commons-tokenizer/{filter-length.js → filters/filter-length.js} +0 -0
  382. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-length.spec.js +18 -0
  383. package/src/utils/suggester-workers/commons-tokenizer/{filter-stemmer.js → filters/filter-stemmer.js} +2 -2
  384. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.spec.js +12 -0
  385. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +36 -0
  386. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.spec.js +12 -0
  387. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +10 -0
  388. package/src/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.spec.js +12 -0
  389. package/src/utils/suggester-workers/commons-tokenizer/filters/index.js +2 -0
  390. package/src/utils/suggester-workers/commons-tokenizer/{stop-words.js → filters/stop-words.js} +0 -0
  391. package/src/utils/suggester-workers/commons-tokenizer/index.js +6 -5
  392. package/src/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.js +7 -3
  393. package/src/utils/suggester-workers/commons-tokenizer/soft-tokenizer.js +1 -1
  394. package/src/utils/suggester-workers/create-worker.js +56 -0
  395. package/src/utils/suggester-workers/find-best-label/tokenize.js +2 -5
  396. package/src/utils/suggester-workers/{query-parser → searching/query-parser}/index.js +0 -0
  397. package/src/utils/suggester-workers/searching/query-parser/query-parser-soft.js +7 -0
  398. package/src/utils/suggester-workers/{query-parser → searching/query-parser}/query-parser-soft.spec.js +0 -0
  399. package/src/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +34 -0
  400. package/src/utils/suggester-workers/searching/resolve-query-parser.js +2 -2
  401. package/src/utils/suggester-workers/searching/searching.js +2 -2
  402. package/src/utils/to-expose/handler.js +68 -31
  403. package/src/utils/to-expose/hooks/filter-components.js +121 -106
  404. package/src/utils/to-expose/hooks/index.js +2 -1
  405. package/src/utils/to-expose/hooks/lunatic-split.js +428 -0
  406. package/src/utils/to-expose/hooks/lunatic.js +107 -11
  407. package/src/utils/to-expose/hooks/use-document-add-event-listener.js +63 -63
  408. package/src/utils/to-expose/index.js +11 -11
  409. package/src/utils/to-expose/interpret/index.js +1 -1
  410. package/src/utils/to-expose/interpret/main.js +16 -16
  411. package/src/utils/to-expose/interpret/md.js +65 -65
  412. package/src/utils/to-expose/state.js +23 -15
  413. package/src/components/missing-wrapper/component.js +0 -120
  414. package/src/components/missing-wrapper/wrapper.js +0 -10
  415. package/src/tests/utils/to-expose/hooks/use-lunatic.spec.js +0 -46
  416. package/src/utils/suggester-workers/commons-tokenizer/create-tokenizer.js +0 -103
  417. package/src/utils/suggester-workers/commons-tokenizer/filter-accents-to-lower.js +0 -9
  418. package/src/utils/suggester-workers/commons-tokenizer/filter-synonyms.js +0 -10
  419. package/src/utils/suggester-workers/query-parser/query-parser-soft.js +0 -7
  420. package/src/utils/suggester-workers/query-parser/query-parser-tokenized.js +0 -31
  421. package/src/utils/suggester-workers/query-parser/query-parser-tokenized.spec.js +0 -32
@@ -1,39 +1,39 @@
1
- import React, { useCallback, useState } from 'react';
2
- import classnames from 'classnames';
3
- import useOnlineStatus from './use-online-status';
4
- import NetworkIcon from '../../icons/network.icon';
5
-
6
- function getTitle(online) {
7
- return `Network ${online ? 'on' : 'off'}`;
8
- }
9
-
10
- function IsNetwork({ notify = () => null, className }) {
11
- const [online, setOnline] = useState(window.navigator.onLine);
12
- const onlineCallback = useCallback(
13
- function () {
14
- setOnline(true);
15
- notify(true);
16
- },
17
- [notify]
18
- );
19
- const offlineCallback = useCallback(
20
- function () {
21
- setOnline(false);
22
- notify(false);
23
- },
24
- [notify]
25
- );
26
-
27
- useOnlineStatus(onlineCallback, offlineCallback);
28
-
29
- return (
30
- <div
31
- className={classnames('is-network', className, { online })}
32
- title={getTitle(online)}
33
- >
34
- <NetworkIcon />
35
- </div>
36
- );
37
- }
38
-
39
- export default IsNetwork;
1
+ import React, { useCallback, useState } from 'react';
2
+ import classnames from 'classnames';
3
+ import useOnlineStatus from './use-online-status';
4
+ import NetworkIcon from '../../icons/network.icon';
5
+
6
+ function getTitle(online) {
7
+ return `Network ${online ? 'on' : 'off'}`;
8
+ }
9
+
10
+ function IsNetwork({ notify = () => null, className }) {
11
+ const [online, setOnline] = useState(window.navigator.onLine);
12
+ const onlineCallback = useCallback(
13
+ function () {
14
+ setOnline(true);
15
+ notify(true);
16
+ },
17
+ [notify]
18
+ );
19
+ const offlineCallback = useCallback(
20
+ function () {
21
+ setOnline(false);
22
+ notify(false);
23
+ },
24
+ [notify]
25
+ );
26
+
27
+ useOnlineStatus(onlineCallback, offlineCallback);
28
+
29
+ return (
30
+ <div
31
+ className={classnames('is-network', className, { online })}
32
+ title={getTitle(online)}
33
+ >
34
+ <NetworkIcon />
35
+ </div>
36
+ );
37
+ }
38
+
39
+ export default IsNetwork;
@@ -1,51 +1,51 @@
1
- import { useEffect } from 'react';
2
-
3
- function useOnlineStatus(online, offline) {
4
- useEffect(
5
- function () {
6
- if (window.navigator.onLine && typeof online === 'function') {
7
- online();
8
- } else if (typeof offline === 'function') {
9
- offline();
10
- }
11
- },
12
- [online, offline]
13
- );
14
- useEffect(
15
- function () {
16
- let callback;
17
- if (typeof online === 'function') {
18
- callback = function (e) {
19
- online();
20
- };
21
- window.addEventListener('online', callback);
22
- }
23
- return function () {
24
- if (callback) {
25
- window.removeEventListener('online', callback);
26
- }
27
- };
28
- },
29
- [online]
30
- );
31
-
32
- useEffect(
33
- function () {
34
- let callback;
35
- if (typeof offline === 'function') {
36
- callback = function (e) {
37
- offline();
38
- };
39
- window.addEventListener('offline', callback);
40
- }
41
- return function () {
42
- if (callback) {
43
- window.removeEventListener('offline', callback);
44
- }
45
- };
46
- },
47
- [offline]
48
- );
49
- }
50
-
51
- export default useOnlineStatus;
1
+ import { useEffect } from 'react';
2
+
3
+ function useOnlineStatus(online, offline) {
4
+ useEffect(
5
+ function () {
6
+ if (window.navigator.onLine && typeof online === 'function') {
7
+ online();
8
+ } else if (typeof offline === 'function') {
9
+ offline();
10
+ }
11
+ },
12
+ [online, offline]
13
+ );
14
+ useEffect(
15
+ function () {
16
+ let callback;
17
+ if (typeof online === 'function') {
18
+ callback = function (e) {
19
+ online();
20
+ };
21
+ window.addEventListener('online', callback);
22
+ }
23
+ return function () {
24
+ if (callback) {
25
+ window.removeEventListener('online', callback);
26
+ }
27
+ };
28
+ },
29
+ [online]
30
+ );
31
+
32
+ useEffect(
33
+ function () {
34
+ let callback;
35
+ if (typeof offline === 'function') {
36
+ callback = function (e) {
37
+ offline();
38
+ };
39
+ window.addEventListener('offline', callback);
40
+ }
41
+ return function () {
42
+ if (callback) {
43
+ window.removeEventListener('offline', callback);
44
+ }
45
+ };
46
+ },
47
+ [offline]
48
+ );
49
+ }
50
+
51
+ export default useOnlineStatus;
@@ -1,45 +1,45 @@
1
- import React from 'react';
2
- import classnames from 'classnames';
3
- import * as U from '../lib';
4
- import { interpret } from '../to-expose';
5
-
6
- function Label({ htmlFor, features, logFunction, bindings, label, id }) {
7
- if (label) {
8
- return (
9
- <label className={classnames('lunatic-label')} htmlFor={htmlFor} id={id}>
10
- {interpret(features, logFunction)(bindings)(label)}
11
- </label>
12
- );
13
- }
14
- return undefined;
15
- }
16
-
17
- function LabelWrapper({
18
- children,
19
- id,
20
- htmlFor = '',
21
- labelPosition = '',
22
- bindings,
23
- label,
24
- features,
25
- logFunction,
26
- }) {
27
- const position = U.getLabelPositionClass(labelPosition);
28
- return (
29
- <div
30
- className={classnames('lunatic-component-container', `${position}-ex`)}
31
- >
32
- <Label
33
- id={id}
34
- htmlFor={htmlFor}
35
- bindings={bindings}
36
- label={label}
37
- features={features}
38
- logFunction={logFunction}
39
- />
40
- {children}
41
- </div>
42
- );
43
- }
44
-
45
- export default LabelWrapper;
1
+ import React from 'react';
2
+ import classnames from 'classnames';
3
+ import * as U from '../lib';
4
+ import { interpret } from '../to-expose';
5
+
6
+ function Label({ htmlFor, features, logFunction, bindings, label, id }) {
7
+ if (label) {
8
+ return (
9
+ <label className={classnames('lunatic-label')} htmlFor={htmlFor} id={id}>
10
+ {interpret(features, logFunction)(bindings)(label)}
11
+ </label>
12
+ );
13
+ }
14
+ return undefined;
15
+ }
16
+
17
+ function LabelWrapper({
18
+ children,
19
+ id,
20
+ htmlFor = '',
21
+ labelPosition = '',
22
+ bindings,
23
+ label,
24
+ features,
25
+ logFunction,
26
+ }) {
27
+ const position = U.getLabelPositionClass(labelPosition);
28
+ return (
29
+ <div
30
+ className={classnames('lunatic-component-container', `${position}-ex`)}
31
+ >
32
+ <Label
33
+ id={id}
34
+ htmlFor={htmlFor}
35
+ bindings={bindings}
36
+ label={label}
37
+ features={features}
38
+ logFunction={logFunction}
39
+ />
40
+ {children}
41
+ </div>
42
+ );
43
+ }
44
+
45
+ export default LabelWrapper;
@@ -1,24 +1,24 @@
1
- import React from 'react';
2
- import LunaticIcon from './lunatic-icon';
3
-
4
- function ClosedIcon({ className, width = 32, height = 32 }) {
5
- return (
6
- <LunaticIcon className={className}>
7
- <svg
8
- xmlns="http://www.w3.org/2000/svg"
9
- width={width}
10
- height={height}
11
- x="0"
12
- y="0"
13
- enableBackground="new 0 0 32 32"
14
- version="1.1"
15
- viewBox="0 0 32 32"
16
- xmlSpace="preserve"
17
- >
18
- <path d="M 25.628748,11.329813 C 25.38152,11.109877 25.088459,11 24.749838,11 H 7.2500941 C 6.9113359,11 6.6184798,11.109877 6.3710468,11.329813 6.1236139,11.549992 6,11.810303 6,12.111233 c 0,0.300869 0.1236139,0.56118 0.3710468,0.781177 l 8.7499062,7.777534 C 15.368659,20.88988 15.661516,21 16,21 c 0.338484,0 0.631614,-0.11012 0.878842,-0.330056 l 8.749906,-7.777595 C 25.875907,12.672413 26,12.412102 26,12.111172 c 0,-0.300869 -0.124093,-0.56118 -0.371252,-0.781359 z"></path>
19
- </svg>
20
- </LunaticIcon>
21
- );
22
- }
23
-
24
- export default ClosedIcon;
1
+ import React from 'react';
2
+ import LunaticIcon from './lunatic-icon';
3
+
4
+ function ClosedIcon({ className, width = 32, height = 32 }) {
5
+ return (
6
+ <LunaticIcon className={className}>
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width={width}
10
+ height={height}
11
+ x="0"
12
+ y="0"
13
+ enableBackground="new 0 0 32 32"
14
+ version="1.1"
15
+ viewBox="0 0 32 32"
16
+ xmlSpace="preserve"
17
+ >
18
+ <path d="M 25.628748,11.329813 C 25.38152,11.109877 25.088459,11 24.749838,11 H 7.2500941 C 6.9113359,11 6.6184798,11.109877 6.3710468,11.329813 6.1236139,11.549992 6,11.810303 6,12.111233 c 0,0.300869 0.1236139,0.56118 0.3710468,0.781177 l 8.7499062,7.777534 C 15.368659,20.88988 15.661516,21 16,21 c 0.338484,0 0.631614,-0.11012 0.878842,-0.330056 l 8.749906,-7.777595 C 25.875907,12.672413 26,12.412102 26,12.111172 c 0,-0.300869 -0.124093,-0.56118 -0.371252,-0.781359 z"></path>
19
+ </svg>
20
+ </LunaticIcon>
21
+ );
22
+ }
23
+
24
+ export default ClosedIcon;
@@ -1,24 +1,24 @@
1
- import React from 'react';
2
- import LunaticIcon from './lunatic-icon';
3
-
4
- function CrossIcon({ className, width = 32, height = 32 }) {
5
- return (
6
- <LunaticIcon className={className}>
7
- <svg
8
- xmlns="http://www.w3.org/2000/svg"
9
- width={width}
10
- height={height}
11
- x="0"
12
- y="0"
13
- enableBackground="new 0 0 32 32"
14
- version="1.1"
15
- viewBox="0 0 32 32"
16
- xmlSpace="preserve"
17
- >
18
- <path d="M 7.097006,7.0709627 C 6.4710386,7.6950801 6.0348033,8.5167883 6,9.3333333 l 6.666666,6.6666677 -6.6666655,6.666666 C 6.0406655,24.255963 7.7002437,25.930395 9.3333333,26 L 15.999999,19.333334 22.666665,26 C 24.255962,25.95934 25.930393,24.299755 26,22.666667 L 19.333332,16.000001 26,9.3333334 C 25.959335,7.7440359 24.299754,6.069605 22.666665,6 L 15.999999,12.666666 9.3333333,6 C 8.5386853,6.020332 7.7229758,6.4468492 7.097006,7.0709627 Z"></path>
19
- </svg>
20
- </LunaticIcon>
21
- );
22
- }
23
-
24
- export default CrossIcon;
1
+ import React from 'react';
2
+ import LunaticIcon from './lunatic-icon';
3
+
4
+ function CrossIcon({ className, width = 32, height = 32 }) {
5
+ return (
6
+ <LunaticIcon className={className}>
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width={width}
10
+ height={height}
11
+ x="0"
12
+ y="0"
13
+ enableBackground="new 0 0 32 32"
14
+ version="1.1"
15
+ viewBox="0 0 32 32"
16
+ xmlSpace="preserve"
17
+ >
18
+ <path d="M 7.097006,7.0709627 C 6.4710386,7.6950801 6.0348033,8.5167883 6,9.3333333 l 6.666666,6.6666677 -6.6666655,6.666666 C 6.0406655,24.255963 7.7002437,25.930395 9.3333333,26 L 15.999999,19.333334 22.666665,26 C 24.255962,25.95934 25.930393,24.299755 26,22.666667 L 19.333332,16.000001 26,9.3333334 C 25.959335,7.7440359 24.299754,6.069605 22.666665,6 L 15.999999,12.666666 9.3333333,6 C 8.5386853,6.020332 7.7229758,6.4468492 7.097006,7.0709627 Z"></path>
19
+ </svg>
20
+ </LunaticIcon>
21
+ );
22
+ }
23
+
24
+ export default CrossIcon;
@@ -1,24 +1,24 @@
1
- import React from 'react';
2
- import LunaticIcon from './lunatic-icon';
3
-
4
- function ClosedIcon({ className, width = 32, height = 32 }) {
5
- return (
6
- <LunaticIcon className={className}>
7
- <svg
8
- xmlns="http://www.w3.org/2000/svg"
9
- width={width}
10
- height={height}
11
- x="0"
12
- y="0"
13
- enableBackground="new 0 0 32 32"
14
- version="1.1"
15
- viewBox="0 0 32 32"
16
- xmlSpace="preserve"
17
- >
18
- <path d="m 10.628906,5.8808594 c -0.214987,-0.001 -0.42313,0.066105 -0.621094,0.203125 -0.197929,0.13695 -0.3337126,0.3059125 -0.4082026,0.5078125 -0.07434,0.20177 -0.063157,0.3725087 0.033203,0.5117187 L 10.667969,8.5996094 C 7.7654347,10.429719 6.000564,13.619938 6,17.054688 c 0,5.522849 4.477153,10 10,10 5.522847,0 10,-4.477151 10,-10 C 26.000084,13.846958 24.464581,10.867019 21.925781,9 l -2.167969,4.773438 c 0.779895,0.889532 1.238599,2.0462 1.242188,3.28125 0,2.76142 -2.238576,5 -5,5 -2.761424,0 -5,-2.238581 -5,-5 0.0042,-1.793391 0.969178,-3.443679 2.523438,-4.330079 l 1.089843,1.574219 c 0.09638,0.13927 0.25171,0.209318 0.466797,0.210938 0.215229,10e-4 0.421172,-0.06601 0.619141,-0.203125 0.19792,-0.13696 0.333879,-0.305933 0.408203,-0.507813 l 2.626953,-7.1386718 c 0.07422,-0.2019799 0.06311,-0.3725587 -0.0332,-0.5117187 -0.0963,-0.13917 -0.251768,-0.2093975 -0.4668,-0.2109375 z"></path>
19
- </svg>
20
- </LunaticIcon>
21
- );
22
- }
23
-
24
- export default ClosedIcon;
1
+ import React from 'react';
2
+ import LunaticIcon from './lunatic-icon';
3
+
4
+ function ClosedIcon({ className, width = 32, height = 32 }) {
5
+ return (
6
+ <LunaticIcon className={className}>
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width={width}
10
+ height={height}
11
+ x="0"
12
+ y="0"
13
+ enableBackground="new 0 0 32 32"
14
+ version="1.1"
15
+ viewBox="0 0 32 32"
16
+ xmlSpace="preserve"
17
+ >
18
+ <path d="m 10.628906,5.8808594 c -0.214987,-0.001 -0.42313,0.066105 -0.621094,0.203125 -0.197929,0.13695 -0.3337126,0.3059125 -0.4082026,0.5078125 -0.07434,0.20177 -0.063157,0.3725087 0.033203,0.5117187 L 10.667969,8.5996094 C 7.7654347,10.429719 6.000564,13.619938 6,17.054688 c 0,5.522849 4.477153,10 10,10 5.522847,0 10,-4.477151 10,-10 C 26.000084,13.846958 24.464581,10.867019 21.925781,9 l -2.167969,4.773438 c 0.779895,0.889532 1.238599,2.0462 1.242188,3.28125 0,2.76142 -2.238576,5 -5,5 -2.761424,0 -5,-2.238581 -5,-5 0.0042,-1.793391 0.969178,-3.443679 2.523438,-4.330079 l 1.089843,1.574219 c 0.09638,0.13927 0.25171,0.209318 0.466797,0.210938 0.215229,10e-4 0.421172,-0.06601 0.619141,-0.203125 0.19792,-0.13696 0.333879,-0.305933 0.408203,-0.507813 l 2.626953,-7.1386718 c 0.07422,-0.2019799 0.06311,-0.3725587 -0.0332,-0.5117187 -0.0963,-0.13917 -0.251768,-0.2093975 -0.4668,-0.2109375 z"></path>
19
+ </svg>
20
+ </LunaticIcon>
21
+ );
22
+ }
23
+
24
+ export default ClosedIcon;
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
- import classnames from 'classnames';
3
- import './lunatic-icon.scss';
4
-
5
- function ClosedIcon({ className, children }) {
6
- return <i className={classnames('lunatic-icon', className)}>{children}</i>;
7
- }
8
-
9
- export default ClosedIcon;
1
+ import React from 'react';
2
+ import classnames from 'classnames';
3
+ import './lunatic-icon.scss';
4
+
5
+ function ClosedIcon({ className, children }) {
6
+ return <i className={classnames('lunatic-icon', className)}>{children}</i>;
7
+ }
8
+
9
+ export default ClosedIcon;
@@ -1,4 +1,4 @@
1
- .lunatic-icon {
2
- display: flex;
3
- justify-content: center;
4
- }
1
+ .lunatic-icon {
2
+ display: flex;
3
+ justify-content: center;
4
+ }
@@ -1,24 +1,24 @@
1
- import React from 'react';
2
- import LunaticIcon from './lunatic-icon';
3
-
4
- function CrossIcon({ className, width = 32, height = 32 }) {
5
- return (
6
- <LunaticIcon className={className}>
7
- <svg
8
- xmlns="http://www.w3.org/2000/svg"
9
- width={width}
10
- height={height}
11
- x="0"
12
- y="0"
13
- enableBackground="new 0 0 32 32"
14
- version="1.1"
15
- viewBox="0 0 32 32"
16
- xmlSpace="preserve"
17
- >
18
- <path d="M 16.211514,6 C 11.574486,6.008 7.1494292,7.94279 4,11.34621 c 0.067313,0.60594 0.3511557,1.08182 1.0781965,1.29181 2.8398143,-3.15866 6.8857655,-4.96513 11.1333175,-4.9708 4.246875,0.008 8.291469,1.81516 11.12987,4.9742 0.42856,-0.18331 0.899659,-0.21808 1.074753,-1.28833 C 25.269539,7.94895 20.847185,6.00922 16.211514,6 Z m 0,3.33452 c -3.859338,0.004 -7.5270269,1.68269 -10.055121,4.59867 0.082129,0.59595 0.3347147,1.09028 1.0747495,1.2918 2.214919,-2.67556 5.5069425,-4.22502 8.9803715,-4.22664 3.472148,0.004 6.761427,1.5572 8.973481,4.23352 0.574616,-0.21997 1.032388,-0.55661 1.081639,-1.30212 -2.528736,-2.91477 -6.196335,-4.59084 -10.05512,-4.59523 z m -0.0034,3.33101 c -3.084894,0.002 -5.995941,1.42878 -7.8883982,3.86498 0.015118,0.87625 0.5660293,1.08257 1.095416,1.31584 1.5613712,-2.20255 4.0931392,-3.51208 6.7929792,-3.51359 2.700508,0.004 5.231123,1.31845 6.789531,3.52395 0.886465,-0.21657 1.135403,-0.70692 1.098867,-1.31932 -1.891063,-2.43881 -4.802322,-3.8677 -7.888395,-3.87186 z m 0,3.33449 c -2.316849,0.002 -4.46631,1.20748 -5.676888,3.18293 L 16.211554,26 21.884999,19.18982 c -1.2089,-1.97805 -3.358668,-3.18598 -5.676885,-3.1898 z" />
19
- </svg>
20
- </LunaticIcon>
21
- );
22
- }
23
-
24
- export default CrossIcon;
1
+ import React from 'react';
2
+ import LunaticIcon from './lunatic-icon';
3
+
4
+ function CrossIcon({ className, width = 32, height = 32 }) {
5
+ return (
6
+ <LunaticIcon className={className}>
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width={width}
10
+ height={height}
11
+ x="0"
12
+ y="0"
13
+ enableBackground="new 0 0 32 32"
14
+ version="1.1"
15
+ viewBox="0 0 32 32"
16
+ xmlSpace="preserve"
17
+ >
18
+ <path d="M 16.211514,6 C 11.574486,6.008 7.1494292,7.94279 4,11.34621 c 0.067313,0.60594 0.3511557,1.08182 1.0781965,1.29181 2.8398143,-3.15866 6.8857655,-4.96513 11.1333175,-4.9708 4.246875,0.008 8.291469,1.81516 11.12987,4.9742 0.42856,-0.18331 0.899659,-0.21808 1.074753,-1.28833 C 25.269539,7.94895 20.847185,6.00922 16.211514,6 Z m 0,3.33452 c -3.859338,0.004 -7.5270269,1.68269 -10.055121,4.59867 0.082129,0.59595 0.3347147,1.09028 1.0747495,1.2918 2.214919,-2.67556 5.5069425,-4.22502 8.9803715,-4.22664 3.472148,0.004 6.761427,1.5572 8.973481,4.23352 0.574616,-0.21997 1.032388,-0.55661 1.081639,-1.30212 -2.528736,-2.91477 -6.196335,-4.59084 -10.05512,-4.59523 z m -0.0034,3.33101 c -3.084894,0.002 -5.995941,1.42878 -7.8883982,3.86498 0.015118,0.87625 0.5660293,1.08257 1.095416,1.31584 1.5613712,-2.20255 4.0931392,-3.51208 6.7929792,-3.51359 2.700508,0.004 5.231123,1.31845 6.789531,3.52395 0.886465,-0.21657 1.135403,-0.70692 1.098867,-1.31932 -1.891063,-2.43881 -4.802322,-3.8677 -7.888395,-3.87186 z m 0,3.33449 c -2.316849,0.002 -4.46631,1.20748 -5.676888,3.18293 L 16.211554,26 21.884999,19.18982 c -1.2089,-1.97805 -3.358668,-3.18598 -5.676885,-3.1898 z" />
19
+ </svg>
20
+ </LunaticIcon>
21
+ );
22
+ }
23
+
24
+ export default CrossIcon;
@@ -1,24 +1,24 @@
1
- import React from 'react';
2
- import LunaticIcon from './lunatic-icon';
3
-
4
- function CrossIcon({ className, width = 32, height = 32 }) {
5
- return (
6
- <LunaticIcon className={className}>
7
- <svg
8
- xmlns="http://www.w3.org/2000/svg"
9
- width={width}
10
- height={height}
11
- x="0"
12
- y="0"
13
- enableBackground="new 0 0 32 32"
14
- version="1.1"
15
- viewBox="0 0 32 32"
16
- xmlSpace="preserve"
17
- >
18
- <path d="M 15.998805,0 C 15.791758,0 15.614821,0.068587 15.4636,0.2030911 L 10.109162,4.9578137 C 9.95798,5.0923491 9.884566,5.2516109 9.884566,5.4356753 c 0,0.1840189 0.07342,0.3431857 0.224596,0.4778615 0.151203,0.1345354 0.330468,0.2030913 0.537594,0.2030913 h 4.205182 V 14.854326 H 6.1166281 v -4.202792 c 0,-0.2072 -0.068555,-0.388637 -0.2030912,-0.539983 C 5.7788793,9.9602251 5.6197345,9.8845661 5.4356754,9.8845661 c -0.1840494,0 -0.3432982,0.07566 -0.4778615,0.2269849 L 0.2030911,15.4636 C 0.0685559,15.615109 1.2e-6,15.794159 0,16.001195 0,16.208242 0.068592,16.385179 0.2030911,16.5364 l 4.7547228,5.352049 c 0.1345352,0.151182 0.2937975,0.226985 0.4778615,0.226985 0.1840188,0 0.3431856,-0.07581 0.4778615,-0.226985 0.1345353,-0.151203 0.2030912,-0.328079 0.2030912,-0.535205 v -4.205182 h 8.7353099 v 8.73531 h -4.202794 c -0.207124,0 -0.388779,0.06855 -0.539982,0.203092 -0.151179,0.134675 -0.224596,0.293842 -0.224596,0.477861 0,0.184064 0.07341,0.343326 0.224596,0.477862 L 15.4636,31.796909 C 15.614821,31.931407 15.794147,32 16.001195,32 c 0.207036,-1e-6 0.383696,-0.06855 0.535205,-0.203091 l 5.352049,-4.754722 c 0.151326,-0.134563 0.226985,-0.293813 0.226985,-0.477862 0,-0.184058 -0.07566,-0.343204 -0.226985,-0.477861 -0.151346,-0.134536 -0.337561,-0.203092 -0.544762,-0.203092 h -4.198013 v -8.73531 h 8.737698 v 4.202793 c 0,0.207125 0.06855,0.386391 0.203092,0.537594 0.134675,0.151179 0.293842,0.226985 0.477861,0.226985 0.184064,0 0.343326,-0.0758 0.477862,-0.226985 L 31.796909,16.5364 C 31.931407,16.385179 32,16.205853 32,15.998805 31.999999,15.791768 31.93144,15.615109 31.796909,15.4636 L 27.042187,10.111551 C 26.907624,9.9602251 26.748374,9.8845661 26.564325,9.8845661 c -0.184058,0 -0.343204,0.07566 -0.477861,0.2269849 -0.134536,0.151346 -0.203092,0.335171 -0.203092,0.542372 v 4.200403 H 17.145674 V 6.1166281 h 4.200403 c 0.207201,0 0.391026,-0.068557 0.542372,-0.2030913 0.151326,-0.1346576 0.226985,-0.2938028 0.226985,-0.4778615 0,-0.1840494 -0.07566,-0.3432989 -0.226985,-0.4778616 L 16.5364,0.2030911 C 16.384891,0.0685559 16.205841,1.5e-6 15.998805,0 Z" />
19
- </svg>
20
- </LunaticIcon>
21
- );
22
- }
23
-
24
- export default CrossIcon;
1
+ import React from 'react';
2
+ import LunaticIcon from './lunatic-icon';
3
+
4
+ function CrossIcon({ className, width = 32, height = 32 }) {
5
+ return (
6
+ <LunaticIcon className={className}>
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width={width}
10
+ height={height}
11
+ x="0"
12
+ y="0"
13
+ enableBackground="new 0 0 32 32"
14
+ version="1.1"
15
+ viewBox="0 0 32 32"
16
+ xmlSpace="preserve"
17
+ >
18
+ <path d="M 15.998805,0 C 15.791758,0 15.614821,0.068587 15.4636,0.2030911 L 10.109162,4.9578137 C 9.95798,5.0923491 9.884566,5.2516109 9.884566,5.4356753 c 0,0.1840189 0.07342,0.3431857 0.224596,0.4778615 0.151203,0.1345354 0.330468,0.2030913 0.537594,0.2030913 h 4.205182 V 14.854326 H 6.1166281 v -4.202792 c 0,-0.2072 -0.068555,-0.388637 -0.2030912,-0.539983 C 5.7788793,9.9602251 5.6197345,9.8845661 5.4356754,9.8845661 c -0.1840494,0 -0.3432982,0.07566 -0.4778615,0.2269849 L 0.2030911,15.4636 C 0.0685559,15.615109 1.2e-6,15.794159 0,16.001195 0,16.208242 0.068592,16.385179 0.2030911,16.5364 l 4.7547228,5.352049 c 0.1345352,0.151182 0.2937975,0.226985 0.4778615,0.226985 0.1840188,0 0.3431856,-0.07581 0.4778615,-0.226985 0.1345353,-0.151203 0.2030912,-0.328079 0.2030912,-0.535205 v -4.205182 h 8.7353099 v 8.73531 h -4.202794 c -0.207124,0 -0.388779,0.06855 -0.539982,0.203092 -0.151179,0.134675 -0.224596,0.293842 -0.224596,0.477861 0,0.184064 0.07341,0.343326 0.224596,0.477862 L 15.4636,31.796909 C 15.614821,31.931407 15.794147,32 16.001195,32 c 0.207036,-1e-6 0.383696,-0.06855 0.535205,-0.203091 l 5.352049,-4.754722 c 0.151326,-0.134563 0.226985,-0.293813 0.226985,-0.477862 0,-0.184058 -0.07566,-0.343204 -0.226985,-0.477861 -0.151346,-0.134536 -0.337561,-0.203092 -0.544762,-0.203092 h -4.198013 v -8.73531 h 8.737698 v 4.202793 c 0,0.207125 0.06855,0.386391 0.203092,0.537594 0.134675,0.151179 0.293842,0.226985 0.477861,0.226985 0.184064,0 0.343326,-0.0758 0.477862,-0.226985 L 31.796909,16.5364 C 31.931407,16.385179 32,16.205853 32,15.998805 31.999999,15.791768 31.93144,15.615109 31.796909,15.4636 L 27.042187,10.111551 C 26.907624,9.9602251 26.748374,9.8845661 26.564325,9.8845661 c -0.184058,0 -0.343204,0.07566 -0.477861,0.2269849 -0.134536,0.151346 -0.203092,0.335171 -0.203092,0.542372 v 4.200403 H 17.145674 V 6.1166281 h 4.200403 c 0.207201,0 0.391026,-0.068557 0.542372,-0.2030913 0.151326,-0.1346576 0.226985,-0.2938028 0.226985,-0.4778615 0,-0.1840494 -0.07566,-0.3432989 -0.226985,-0.4778616 L 16.5364,0.2030911 C 16.384891,0.0685559 16.205841,1.5e-6 15.998805,0 Z" />
19
+ </svg>
20
+ </LunaticIcon>
21
+ );
22
+ }
23
+
24
+ export default CrossIcon;
@@ -1,24 +1,24 @@
1
- import React from 'react';
2
- import LunaticIcon from './lunatic-icon';
3
-
4
- function OpenedIcon({ className, width = 32, height = 32 }) {
5
- return (
6
- <LunaticIcon className={className}>
7
- <svg
8
- xmlns="http://www.w3.org/2000/svg"
9
- width={width}
10
- height={height}
11
- x="0"
12
- y="0"
13
- enableBackground="new 0 0 32 32"
14
- version="1.1"
15
- viewBox="0 0 32 32"
16
- xmlSpace="preserve"
17
- >
18
- <path d="M 11.329813,6.371252 C 11.109877,6.61848 11,6.911541 11,7.250162 v 17.499744 c 0,0.338758 0.109877,0.631614 0.329813,0.879047 C 11.549992,25.876386 11.810303,26 12.111233,26 c 0.300869,0 0.56118,-0.123614 0.781177,-0.371047 l 7.777534,-8.749906 C 20.88988,16.631341 21,16.338484 21,16 21,15.661516 20.88988,15.368386 20.669944,15.121158 L 12.892349,6.371252 C 12.672413,6.124093 12.412102,6 12.111172,6 11.810303,6 11.549992,6.124093 11.329813,6.371252 Z"></path>
19
- </svg>
20
- </LunaticIcon>
21
- );
22
- }
23
-
24
- export default OpenedIcon;
1
+ import React from 'react';
2
+ import LunaticIcon from './lunatic-icon';
3
+
4
+ function OpenedIcon({ className, width = 32, height = 32 }) {
5
+ return (
6
+ <LunaticIcon className={className}>
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width={width}
10
+ height={height}
11
+ x="0"
12
+ y="0"
13
+ enableBackground="new 0 0 32 32"
14
+ version="1.1"
15
+ viewBox="0 0 32 32"
16
+ xmlSpace="preserve"
17
+ >
18
+ <path d="M 11.329813,6.371252 C 11.109877,6.61848 11,6.911541 11,7.250162 v 17.499744 c 0,0.338758 0.109877,0.631614 0.329813,0.879047 C 11.549992,25.876386 11.810303,26 12.111233,26 c 0.300869,0 0.56118,-0.123614 0.781177,-0.371047 l 7.777534,-8.749906 C 20.88988,16.631341 21,16.338484 21,16 21,15.661516 20.88988,15.368386 20.669944,15.121158 L 12.892349,6.371252 C 12.672413,6.124093 12.412102,6 12.111172,6 11.810303,6 11.549992,6.124093 11.329813,6.371252 Z"></path>
19
+ </svg>
20
+ </LunaticIcon>
21
+ );
22
+ }
23
+
24
+ export default OpenedIcon;
@@ -1,16 +1,16 @@
1
- async function clearStore(db, name) {
2
- new Promise(function (resolve, reject) {
3
- try {
4
- const transaction = db.transaction(name, 'readwrite');
5
- transaction.oncomplete = function () {
6
- resolve(true);
7
- };
8
- const store = transaction.objectStore(name);
9
- store.clear();
10
- } catch (e) {
11
- reject(e);
12
- }
13
- });
14
- }
15
-
16
- export default clearStore;
1
+ async function clearStore(db, name) {
2
+ new Promise(function (resolve, reject) {
3
+ try {
4
+ const transaction = db.transaction(name, 'readwrite');
5
+ transaction.oncomplete = function () {
6
+ resolve(true);
7
+ };
8
+ const store = transaction.objectStore(name);
9
+ store.clear();
10
+ } catch (e) {
11
+ reject(e);
12
+ }
13
+ });
14
+ }
15
+
16
+ export default clearStore;