@inseefr/lunatic 0.1.13-hackathon → 0.2.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.
- package/README.md +2 -0
- package/lib/components/button/button.scss +24 -0
- package/lib/components/button/index.js +15 -0
- package/lib/components/button/lunatic-button.js +62 -0
- package/lib/components/checkbox/checkbox-boolean/checkbox-boolean.js +34 -0
- package/lib/components/checkbox/checkbox-boolean/index.js +15 -0
- package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +42 -0
- package/lib/components/checkbox/checkbox-group/checkbox-group.js +94 -0
- package/lib/components/checkbox/checkbox-group/checkbox-option.js +57 -0
- package/lib/components/checkbox/checkbox-group/index.js +15 -0
- package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +36 -0
- package/lib/components/checkbox/checkbox-one/index.js +15 -0
- package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +23 -0
- package/lib/components/checkbox/checkbox.scss +1 -0
- package/lib/components/checkbox/commons/checkbox-option.js +59 -0
- package/lib/components/checkbox/commons/index.js +15 -0
- package/lib/components/checkbox/index.js +31 -0
- package/lib/components/commons/build-style-object.js +36 -0
- package/lib/components/commons/components/combo-box/combo-box-container.js +37 -0
- package/lib/components/commons/components/combo-box/combo-box-content.js +73 -0
- package/lib/components/commons/components/combo-box/combo-box.js +222 -0
- package/lib/components/commons/components/combo-box/combo-box.scss +218 -0
- package/lib/components/commons/components/combo-box/index.js +15 -0
- package/lib/components/commons/components/combo-box/panel/index.js +15 -0
- package/lib/components/commons/components/combo-box/panel/option-container.js +77 -0
- package/lib/components/commons/components/combo-box/panel/panel-container.js +31 -0
- package/lib/components/commons/components/combo-box/panel/panel.js +70 -0
- package/lib/components/commons/components/combo-box/selection/delete.js +69 -0
- package/lib/components/commons/components/combo-box/selection/displayLabelOrInput.js +30 -0
- package/lib/components/commons/components/combo-box/selection/index.js +15 -0
- package/lib/components/commons/components/combo-box/selection/input.js +68 -0
- package/lib/components/commons/components/combo-box/selection/label-selection.js +39 -0
- package/lib/components/commons/components/combo-box/selection/selection-container.js +40 -0
- package/lib/components/commons/components/combo-box/selection/selection.js +71 -0
- package/lib/components/commons/components/combo-box/state-management/actions.js +98 -0
- package/lib/components/commons/components/combo-box/state-management/combo-box-context.js +20 -0
- package/lib/components/commons/components/combo-box/state-management/index.js +42 -0
- package/lib/components/commons/components/combo-box/state-management/initial-state.js +14 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/index.js +15 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-blur.js +22 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-change.js +24 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-delete.js +23 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-focus.js +22 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-init.js +46 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/index.js +15 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/keyboard-key-codes.js +18 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-down.js +37 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-up.js +37 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-end.js +28 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-enter.js +23 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-escape.js +22 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-home.js +28 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-tab.js +22 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/reduce-on-keydown.js +59 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-select.js +24 -0
- package/lib/components/commons/components/combo-box/state-management/reducer/reducer.js +63 -0
- package/lib/components/commons/components/create-lunatic-component/create-lunatic-component.js +75 -0
- package/lib/components/commons/components/create-lunatic-component/index.js +14 -0
- package/lib/components/commons/components/default-label-renderer.js +54 -0
- package/lib/components/commons/components/default-option-renderer.js +43 -0
- package/lib/components/commons/components/dragger/dragger.js +118 -0
- package/lib/components/commons/components/dragger/dragger.scss +8 -0
- package/lib/components/commons/components/dragger/index.js +15 -0
- package/lib/components/commons/components/fab/fab.js +56 -0
- package/lib/components/commons/components/fab/fab.scss +32 -0
- package/lib/components/commons/components/fab/index.js +15 -0
- package/lib/components/commons/components/field-container/field-container.js +48 -0
- package/lib/components/commons/components/field-container/field-container.scss +0 -0
- package/lib/components/commons/components/field-container/index.js +15 -0
- package/lib/components/commons/components/fieldset.js +24 -0
- package/lib/components/commons/components/html-table/index.js +55 -0
- package/lib/components/commons/components/html-table/table.js +38 -0
- package/lib/components/commons/components/html-table/tbody.js +38 -0
- package/lib/components/commons/components/html-table/td.js +50 -0
- package/lib/components/commons/components/html-table/th.js +48 -0
- package/lib/components/commons/components/html-table/thead.js +38 -0
- package/lib/components/commons/components/html-table/tr.js +40 -0
- package/lib/components/commons/components/is-network/index.js +15 -0
- package/lib/components/commons/components/is-network/is-network.js +70 -0
- package/lib/components/commons/components/is-network/use-online-status.js +55 -0
- package/lib/components/commons/components/label.js +35 -0
- package/lib/components/commons/components/lunatic-component.js +64 -0
- package/lib/components/commons/components/lunatic-fieldset-component.js +57 -0
- package/lib/components/commons/components/md-label/index.js +15 -0
- package/lib/components/commons/components/md-label/link.js +57 -0
- package/lib/components/commons/components/md-label/md-label.js +52 -0
- package/lib/components/commons/components/missing/index.js +15 -0
- package/lib/components/commons/components/missing/missing.js +90 -0
- package/lib/components/commons/components/missing/missing.scss +30 -0
- package/lib/components/commons/components/nothing-to-display.js +17 -0
- package/lib/components/commons/components/orchestrated-component.js +68 -0
- package/lib/components/commons/components/variable-status/img/edited.png +0 -0
- package/lib/components/commons/components/variable-status/img/forced.png +0 -0
- package/lib/components/commons/components/variable-status/img/index.js +23 -0
- package/lib/components/commons/components/variable-status/index.js +15 -0
- package/lib/components/commons/components/variable-status/variable-status.js +95 -0
- package/lib/components/commons/components/variable-status/variable-status.scss +39 -0
- package/lib/components/commons/create-customizable-field.js +38 -0
- package/lib/components/commons/create-row-orchestrator.js +58 -0
- package/lib/components/commons/icons/checkbox-checked.icon.js +41 -0
- package/lib/components/commons/icons/checkbox-unchecked.icon.js +41 -0
- package/lib/components/commons/icons/closed.icon.js +38 -0
- package/lib/components/commons/icons/cross.icon.js +38 -0
- package/lib/components/commons/icons/index.js +87 -0
- package/lib/components/commons/icons/load.icon.js +38 -0
- package/lib/components/commons/icons/lunatic-icon.js +25 -0
- package/lib/components/commons/icons/lunatic-icon.scss +4 -0
- package/lib/components/commons/icons/network.icon.js +38 -0
- package/lib/components/commons/icons/on-drag.icon.js +38 -0
- package/lib/components/commons/icons/opened.icon.js +38 -0
- package/lib/components/commons/icons/radio-checked.icon.js +41 -0
- package/lib/components/commons/icons/radio-unchecked.icon.js +41 -0
- package/lib/components/commons/index.js +154 -0
- package/lib/components/commons/prop-types/declarations.js +27 -0
- package/lib/components/commons/prop-types/index.js +47 -0
- package/lib/components/commons/prop-types/lines.js +17 -0
- package/lib/components/commons/prop-types/options.js +17 -0
- package/lib/components/commons/prop-types/response.js +17 -0
- package/lib/components/commons/prop-types/value-type.js +22 -0
- package/lib/components/commons/safety-label.js +34 -0
- package/lib/components/commons/use-document-add-event-listener.js +108 -0
- package/lib/components/commons/use-on-handle-change.js +23 -0
- package/lib/components/commons/use-options-keydown.js +29 -0
- package/lib/components/commons/use-previous.js +19 -0
- package/lib/components/components.js +188 -0
- package/lib/components/datepicker/datepicker.js +49 -0
- package/lib/components/datepicker/datepicker.scss +1 -0
- package/lib/components/datepicker/index.js +15 -0
- package/lib/components/datepicker/lunatic-datepicker.js +20 -0
- package/lib/components/declarations/declaration.js +26 -0
- package/lib/components/declarations/declarations-after-text.js +29 -0
- package/lib/components/declarations/declarations-before-text.js +29 -0
- package/lib/components/declarations/declarations-detachable.js +29 -0
- package/lib/components/declarations/declarations.js +57 -0
- package/lib/components/declarations/declarations.scss +36 -0
- package/lib/components/declarations/index.js +51 -0
- package/lib/components/dropdown/dropdown-simple/dropdown-simple.js +43 -0
- package/lib/components/dropdown/dropdown-simple/index.js +15 -0
- package/lib/components/dropdown/dropdown-simple/simple-label-renderer.js +53 -0
- package/lib/components/dropdown/dropdown-simple/simple-option-renderer.js +42 -0
- package/lib/components/dropdown/dropdown-writable/dropdown-writable.js +79 -0
- package/lib/components/dropdown/dropdown-writable/filter-tools/filter-options.js +47 -0
- package/lib/components/dropdown/dropdown-writable/filter-tools/letters-matching.js +40 -0
- package/lib/components/dropdown/dropdown-writable/filter-tools/match.js +27 -0
- package/lib/components/dropdown/dropdown-writable/filter-tools/prepare-prefix.js +17 -0
- package/lib/components/dropdown/dropdown-writable/index.js +15 -0
- package/lib/components/dropdown/dropdown-writable/writable-label-renderer.js +53 -0
- package/lib/components/dropdown/dropdown-writable/writable-option-renderer.js +170 -0
- package/lib/components/dropdown/dropdown.js +58 -0
- package/lib/components/dropdown/dropdown.scss +41 -0
- package/lib/components/dropdown/index.js +15 -0
- package/lib/components/dropdown/lunatic-dropdown.js +58 -0
- package/lib/components/filter-description/component.js +24 -0
- package/lib/components/filter-description/index.js +15 -0
- package/lib/components/index.js +32 -0
- package/lib/components/index.scss +139 -0
- package/lib/components/input/index.js +15 -0
- package/lib/components/input/input.js +61 -0
- package/lib/components/input/input.scss +31 -0
- package/lib/components/input/lunatic-input.js +23 -0
- package/lib/components/input-number/index.js +15 -0
- package/lib/components/input-number/input-number.js +57 -0
- package/lib/components/input-number/input-number.scss +0 -0
- package/lib/components/input-number/lunatic-input-number.js +18 -0
- package/lib/components/loop/block-for-loop/block-for-loop-ochestrator.js +16 -0
- package/lib/components/loop/block-for-loop/block-for-loop.js +132 -0
- package/lib/components/loop/block-for-loop/index.js +15 -0
- package/lib/components/loop/block-for-loop/row.js +82 -0
- package/lib/components/loop/commons/index.js +15 -0
- package/lib/components/loop/commons/row-component.js +86 -0
- package/lib/components/loop/index.js +15 -0
- package/lib/components/loop/loop.js +89 -0
- package/lib/components/loop/roster-for-loop/body.js +69 -0
- package/lib/components/loop/roster-for-loop/handle-row-button.js +25 -0
- package/lib/components/loop/roster-for-loop/header.js +42 -0
- package/lib/components/loop/roster-for-loop/index.js +15 -0
- package/lib/components/loop/roster-for-loop/roster-for-loop-orchestrator.js +16 -0
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +163 -0
- package/lib/components/loop/roster-for-loop/roster-table.js +61 -0
- package/lib/components/loop/roster-for-loop/roster.scss +42 -0
- package/lib/components/loop/roster-for-loop/row.js +86 -0
- package/lib/components/modal-controls/close-or-skip.js +37 -0
- package/lib/components/modal-controls/index.js +15 -0
- package/lib/components/modal-controls/modal-container.js +24 -0
- package/lib/components/modal-controls/modal-controls.js +97 -0
- package/lib/components/modal-controls/modal-controls.scss +63 -0
- package/lib/components/pairwise/block/index.js +15 -0
- package/lib/components/pairwise/block/pairwise-block.js +17 -0
- package/lib/components/pairwise/index.js +23 -0
- package/lib/components/pairwise/links/index.js +15 -0
- package/lib/components/pairwise/links/links-orchestrator.js +16 -0
- package/lib/components/pairwise/links/pairwise-links.js +69 -0
- package/lib/components/pairwise/links/row.js +95 -0
- package/lib/components/radio/index.js +15 -0
- package/lib/components/radio/lunatic-radio-group.js +40 -0
- package/lib/components/radio/radio-group.js +50 -0
- package/lib/components/radio/radio-option.js +89 -0
- package/lib/components/radio/radio.scss +59 -0
- package/lib/components/sequence/index.js +15 -0
- package/lib/components/sequence/sequence.js +37 -0
- package/lib/components/sequence/sequence.scss +10 -0
- package/lib/components/subsequence/index.js +15 -0
- package/lib/components/subsequence/subsequence.js +32 -0
- package/lib/components/suggester/check-store.js +154 -0
- package/lib/components/suggester/default-style.scss +125 -0
- package/lib/components/suggester/find-best-label/find-best-label.js +67 -0
- package/lib/components/suggester/find-best-label/index.js +15 -0
- package/lib/components/suggester/idb-suggester.js +95 -0
- package/lib/components/suggester/index.js +15 -0
- package/lib/components/suggester/lunatic-suggester.js +90 -0
- package/lib/components/suggester/searching/create-searching.js +88 -0
- package/lib/components/suggester/searching/index.js +15 -0
- package/lib/components/suggester/suggester.js +172 -0
- package/lib/components/suggester-loader-widget/index.js +15 -0
- package/lib/components/suggester-loader-widget/loader-row.js +150 -0
- package/lib/components/suggester-loader-widget/loader.js +180 -0
- package/lib/components/suggester-loader-widget/progress.js +45 -0
- package/lib/components/suggester-loader-widget/tools/action-tool.js +35 -0
- package/lib/components/suggester-loader-widget/tools/index.js +23 -0
- package/lib/components/suggester-loader-widget/tools/tools.js +20 -0
- package/lib/components/suggester-loader-widget/widget-container.js +48 -0
- package/lib/components/suggester-loader-widget/widget.js +170 -0
- package/lib/components/suggester-loader-widget/widget.scss +176 -0
- package/lib/components/switch/index.js +15 -0
- package/lib/components/switch/lunatic-switch.js +59 -0
- package/lib/components/switch/switch.js +92 -0
- package/lib/components/switch/switch.scss +47 -0
- package/lib/components/table/cell.js +113 -0
- package/lib/components/table/components/cell.js +113 -0
- package/lib/components/table/components/header.js +48 -0
- package/lib/components/table/components/row.js +47 -0
- package/lib/components/table/components/table.js +38 -0
- package/lib/components/table/components/table.scss +26 -0
- package/lib/components/table/index.js +15 -0
- package/lib/components/table/lunatic-table.js +91 -0
- package/lib/components/table/table-orchestrator.js +55 -0
- package/lib/components/textarea/index.js +15 -0
- package/lib/components/textarea/lunatic-textarea.js +32 -0
- package/lib/components/textarea/textarea.js +54 -0
- package/lib/components/textarea/textarea.scss +8 -0
- package/lib/constants/component-types.js +8 -0
- package/lib/constants/declarations.js +26 -0
- package/lib/constants/event-types.js +28 -0
- package/lib/constants/index.js +70 -0
- package/lib/constants/supported-preferences.js +18 -0
- package/lib/constants/value-types.js +16 -0
- package/lib/constants/variable-types.js +12 -0
- package/lib/i18n/build-dictionary.js +56 -0
- package/lib/i18n/dictionary.js +26 -0
- package/lib/i18n/index.js +19 -0
- package/lib/index.js +159 -201
- package/lib/index.js.map +1 -1
- package/lib/stories/Introduction.stories.mdx +114 -0
- package/lib/stories/custom-mui/checkbox-boolean-mui.js +39 -0
- package/lib/stories/custom-mui/checkbox-group-mui.js +80 -0
- package/lib/stories/custom-mui/checkbox-one-mui.js +17 -0
- package/lib/stories/custom-mui/index.js +127 -0
- package/lib/stories/custom-mui/input-mui.js +61 -0
- package/lib/stories/custom-mui/input-number-mui.js +47 -0
- package/lib/stories/custom-mui/radio-mui.js +75 -0
- package/lib/stories/custom-mui/suggester-mui/index.js +15 -0
- package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +328 -0
- package/lib/stories/custom-mui/switch-mui.js +51 -0
- package/lib/stories/custom-mui/table-mui.js +33 -0
- package/lib/stories/custom-mui/tbody-mui.js +27 -0
- package/lib/stories/custom-mui/td-mui.js +29 -0
- package/lib/stories/custom-mui/textarea-mui.js +56 -0
- package/lib/stories/custom-mui/th-mui.js +28 -0
- package/lib/stories/custom-mui/thead-mui.js +27 -0
- package/lib/stories/custom-mui/tr-mui.js +38 -0
- package/lib/stories/dropdown/data.json +16 -0
- package/lib/stories/dropdown/dropdown.stories.js +38 -0
- package/lib/stories/dropdown/source.json +98 -0
- package/lib/stories/input/data.json +5 -0
- package/lib/stories/input/input.stories.js +38 -0
- package/lib/stories/input/source.json +28 -0
- package/lib/stories/pairwise/block/block.json +3 -0
- package/lib/stories/pairwise/block/pairwise-block.stories.js +36 -0
- package/lib/stories/pairwise/links/data.json +12 -0
- package/lib/stories/pairwise/links/links.json +141 -0
- package/lib/stories/pairwise/links/pairwise-links.stories.js +39 -0
- package/lib/stories/questionnaires/logement/data.json +2691 -0
- package/lib/stories/questionnaires/logement/logement.stories.js +77 -0
- package/lib/stories/questionnaires/logement/source-sequence.json +33114 -0
- package/lib/stories/questionnaires/logement/source.json +33124 -0
- package/lib/stories/questionnaires/simpsons/simpsons.stories.js +71 -0
- package/lib/stories/questionnaires/simpsons/source.json +6290 -0
- package/lib/stories/roster-for-loop/roster-for-loop.stories.js +35 -0
- package/lib/stories/roster-for-loop/source.json +114 -0
- package/lib/stories/suggester/source.json +234 -0
- package/lib/stories/suggester/suggester.stories.js +59 -0
- package/lib/stories/switch/README.md +31 -0
- package/lib/stories/switch/SwitchMaterialUI.js +51 -0
- package/lib/stories/switch/data-forced.json +48 -0
- package/lib/stories/switch/data.json +80 -0
- package/lib/stories/switch/switch.js +108 -0
- package/lib/stories/table/data-roster.json +1 -0
- package/lib/stories/table/data.json +1 -0
- package/lib/stories/table/source-roster.json +504 -0
- package/lib/stories/table/source.json +19 -0
- package/lib/stories/table/table.stories.js +65 -0
- package/lib/stories/utils/custom-lunatic.scss +28 -0
- package/lib/stories/utils/default-arg-types.js +23 -0
- package/lib/stories/utils/options.js +32 -0
- package/lib/stories/utils/orchestrator.js +168 -0
- package/lib/stories/utils/waiting/index.js +15 -0
- package/lib/stories/utils/waiting/preloader.svg +1 -0
- package/lib/stories/utils/waiting/waiting.js +40 -0
- package/lib/stories/utils/waiting/waiting.scss +21 -0
- package/lib/tests/sample.spec.js +7 -0
- package/lib/use-lunatic/actions.js +88 -0
- package/lib/use-lunatic/commons/check-loops.js +111 -0
- package/lib/use-lunatic/commons/compose.js +28 -0
- package/lib/use-lunatic/commons/create-map-pages.js +108 -0
- package/lib/use-lunatic/commons/execute-condition-filter.js +34 -0
- package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +264 -0
- package/lib/use-lunatic/commons/execute-expression/create-memoizer.js +78 -0
- package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +148 -0
- package/lib/use-lunatic/commons/execute-expression/execute-expression.js +90 -0
- package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.js +51 -0
- package/lib/use-lunatic/commons/execute-expression/get-safety-expression.js +37 -0
- package/lib/use-lunatic/commons/execute-expression/index.js +15 -0
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +149 -0
- package/lib/use-lunatic/commons/fill-components/fill-component-value.js +26 -0
- package/lib/use-lunatic/commons/fill-components/fill-components.js +47 -0
- package/lib/use-lunatic/commons/fill-components/fill-errors.js +31 -0
- package/lib/use-lunatic/commons/fill-components/fill-from-state.js +26 -0
- package/lib/use-lunatic/commons/fill-components/fill-management.js +27 -0
- package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +37 -0
- package/lib/use-lunatic/commons/fill-components/fill-pagination.js +23 -0
- package/lib/use-lunatic/commons/fill-components/index.js +15 -0
- package/lib/use-lunatic/commons/get-compatible-vtl-expression.js +32 -0
- package/lib/use-lunatic/commons/get-component-value/get-component-value.js +217 -0
- package/lib/use-lunatic/commons/get-component-value/index.js +15 -0
- package/lib/use-lunatic/commons/get-components-from-state.js +37 -0
- package/lib/use-lunatic/commons/get-page-tag.js +21 -0
- package/lib/use-lunatic/commons/index.js +103 -0
- package/lib/use-lunatic/commons/is-First-last-page.js +20 -0
- package/lib/use-lunatic/commons/is-paginated-loop.js +15 -0
- package/lib/use-lunatic/commons/load-suggesters.js +199 -0
- package/lib/use-lunatic/commons/use-components-from-state.js +49 -0
- package/lib/use-lunatic/index.js +15 -0
- package/lib/use-lunatic/initial-state.js +41 -0
- package/lib/use-lunatic/reducer/commons/Insee.code-workspace +47 -0
- package/lib/use-lunatic/reducer/commons/index.js +41 -0
- package/lib/use-lunatic/reducer/commons/is-empty-on-empty-page.js +49 -0
- package/lib/use-lunatic/reducer/commons/resize-array-variable.js +48 -0
- package/lib/use-lunatic/reducer/commons/validate-condition-filter.js +41 -0
- package/lib/use-lunatic/reducer/index.js +15 -0
- package/lib/use-lunatic/reducer/reduce-go-next-page.js +176 -0
- package/lib/use-lunatic/reducer/reduce-go-previous-page.js +160 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/index.js +15 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +76 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +131 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.js +53 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-missing.js +90 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +118 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.js +50 -0
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.js +29 -0
- package/lib/use-lunatic/reducer/reduce-on-init.js +255 -0
- package/lib/use-lunatic/reducer/reduce-on-set-waiting.js +23 -0
- package/lib/use-lunatic/reducer/reducer.js +53 -0
- package/lib/use-lunatic/reducer/validate-controls/create-validate-reducer.js +146 -0
- package/lib/use-lunatic/reducer/validate-controls/index.js +15 -0
- package/lib/use-lunatic/use-lunatic.js +201 -0
- package/lib/utils/constants/features.js +12 -0
- package/lib/utils/constants/index.js +70 -0
- package/lib/utils/constants/links.js +10 -0
- package/lib/utils/constants/missing.js +10 -0
- package/lib/utils/constants/variable-status.js +16 -0
- package/lib/utils/constants/variable-types.js +8 -0
- package/lib/utils/idb-tools/clear-store.js +52 -0
- package/lib/utils/idb-tools/create-db-opener.js +60 -0
- package/lib/utils/idb-tools/create-open-db.js +35 -0
- package/lib/utils/idb-tools/get-entity.js +25 -0
- package/lib/utils/idb-tools/get-idb.js +15 -0
- package/lib/utils/idb-tools/idb-bulk-insert.js +157 -0
- package/lib/utils/idb-tools/index.js +75 -0
- package/lib/utils/idb-tools/insert-entity.js +25 -0
- package/lib/utils/idb-tools/open-db.js +29 -0
- package/lib/utils/idb-tools/open-or-create-db.js +49 -0
- package/lib/utils/is-element.js +12 -0
- package/lib/utils/store-tools/auto-load.js +209 -0
- package/lib/utils/store-tools/clear-store-data.js +46 -0
- package/lib/utils/store-tools/clear-store-info.js +46 -0
- package/lib/utils/store-tools/constantes.js +31 -0
- package/lib/utils/store-tools/create/create.js +70 -0
- package/lib/utils/store-tools/create/index.js +23 -0
- package/lib/utils/store-tools/create/update-store-info.js +33 -0
- package/lib/utils/store-tools/get-store-count.js +29 -0
- package/lib/utils/store-tools/index.js +66 -0
- package/lib/utils/store-tools/open-or-create-store.js +60 -0
- package/lib/utils/store-tools/use-store-index.js +82 -0
- package/lib/utils/suggester-workers/append-to-index/append.js +96 -0
- package/lib/utils/suggester-workers/append-to-index/append.worker.js +31 -0
- package/lib/utils/suggester-workers/append-to-index/create-append-task.js +66 -0
- package/lib/utils/suggester-workers/append-to-index/index.js +23 -0
- package/lib/utils/suggester-workers/append-to-index/prepare-entities.js +114 -0
- package/lib/utils/suggester-workers/append-to-index/store-messages.js +48 -0
- package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +66 -0
- package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +101 -0
- package/lib/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +47 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +24 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +47 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.spec.js +16 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.js +24 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.spec.js +18 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.js +34 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.spec.js +25 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.js +17 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.spec.js +25 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.js +29 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.spec.js +18 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +71 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.spec.js +15 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +19 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.spec.js +16 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/index.js +23 -0
- package/lib/utils/suggester-workers/commons-tokenizer/filters/stop-words.js +9 -0
- package/lib/utils/suggester-workers/commons-tokenizer/get-regexp-from-pattern.js +17 -0
- package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.js +31 -0
- package/lib/utils/suggester-workers/commons-tokenizer/index.js +79 -0
- package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.js +24 -0
- package/lib/utils/suggester-workers/commons-tokenizer/soft-tokenizer.js +15 -0
- package/lib/utils/suggester-workers/create-worker.js +64 -0
- package/lib/utils/suggester-workers/find-best-label/find-best-label.js +81 -0
- package/lib/utils/suggester-workers/find-best-label/find-best-label.worker.js +67 -0
- package/lib/utils/suggester-workers/find-best-label/index.js +1 -0
- package/lib/utils/suggester-workers/find-best-label/tokenize.js +62 -0
- package/lib/utils/suggester-workers/find-best-label/tokenize.spec.js +26 -0
- package/lib/utils/suggester-workers/searching/compute-score.js +63 -0
- package/lib/utils/suggester-workers/searching/get-db.js +64 -0
- package/lib/utils/suggester-workers/searching/index.js +15 -0
- package/lib/utils/suggester-workers/searching/order/create-alphanumeric-orderer.js +33 -0
- package/lib/utils/suggester-workers/searching/order/index.js +33 -0
- package/lib/utils/suggester-workers/searching/query-parser/index.js +23 -0
- package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.js +15 -0
- package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.spec.js +28 -0
- package/lib/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +51 -0
- package/lib/utils/suggester-workers/searching/resolve-query-parser.js +73 -0
- package/lib/utils/suggester-workers/searching/search-in-index.js +25 -0
- package/lib/utils/suggester-workers/searching/searching.js +170 -0
- package/lib/utils/suggester-workers/searching/searching.worker.js +23 -0
- package/lib/utils/vtl/dataset-builder.js +28 -0
- package/lib/utils/vtl/index.js +15 -0
- package/package.json +4 -3
- package/src/components/breadcrumb/component.js +29 -29
- package/src/components/breadcrumb/index.js +1 -1
- package/src/components/button/button.scss +24 -24
- package/src/components/button/component.js +53 -53
- package/src/components/button/index.js +1 -1
- package/src/components/checkbox/index.js +3 -3
- package/src/components/component-wrapper/controls/validators/datepicker.js +25 -14
- package/src/components/component-wrapper/missing/component.js +87 -9
- package/src/components/components.js +19 -19
- package/src/components/datepicker/component.js +8 -12
- package/src/components/datepicker/datepicker.scss +1 -1
- package/src/components/datepicker/index.js +1 -1
- package/src/components/declarations/index.js +1 -1
- package/src/components/declarations/wrappers/index.js +3 -3
- package/src/components/declarations/wrappers/input-declarations-wrapper.js +35 -9
- package/src/components/declarations/wrappers/list-declarations-wrapper.js +232 -232
- package/src/components/dropdown/commons/components/dropdown-field.js +46 -46
- package/src/components/dropdown/commons/components/dropdown.js +21 -0
- package/src/components/dropdown/commons/components/label.js +28 -28
- package/src/components/dropdown/commons/event-callbacks/index.js +5 -5
- package/src/components/dropdown/commons/event-callbacks/on-keydown-callback.js +29 -29
- package/src/components/dropdown/commons/reducer.js +152 -152
- package/src/components/dropdown/dropdown-edit/dropdown-edit.js +4 -1
- package/src/components/dropdown/dropdown-edit/icone.js +33 -33
- package/src/components/dropdown/dropdown-edit/option.js +62 -62
- package/src/components/dropdown/dropdown-edit/prefix-tools.js +51 -51
- package/src/components/dropdown/dropdown-simple/dropdown.js +3 -1
- package/src/components/dropdown/dropdown-simple/option.js +15 -15
- package/src/components/dropdown/index.js +1 -1
- package/src/components/filter-description/component.js +42 -42
- package/src/components/filter-description/index.js +1 -1
- package/src/components/icon/assets/checkbox-checked.js +16 -16
- package/src/components/icon/assets/checkbox-unchecked.js +16 -16
- package/src/components/icon/assets/index.js +4 -4
- package/src/components/icon/assets/radio-checked.js +16 -16
- package/src/components/icon/assets/radio-unchecked.js +16 -16
- package/src/components/icon/component.js +33 -33
- package/src/components/icon/index.js +1 -1
- package/src/components/index.js +5 -3
- package/src/components/input/index.js +2 -2
- package/src/components/input/input-number.js +3 -1
- package/src/components/loop/component.js +1 -0
- package/src/components/loop/index.js +1 -1
- package/src/components/loop-constructor/block/index.js +1 -1
- package/src/components/loop-constructor/index.js +1 -1
- package/src/components/loop-constructor/roster/index.js +1 -1
- package/src/components/loop-constructor/wrapper/body-component.js +19 -0
- package/src/components/loop-constructor/wrapper/build-components.js +33 -33
- package/src/components/loop-constructor/wrapper/index.js +1 -1
- package/src/components/progress-bar/component.js +28 -28
- package/src/components/progress-bar/index.js +1 -1
- package/src/components/radio/index.js +1 -1
- package/src/components/sequence/index.js +1 -1
- package/src/components/subsequence/index.js +1 -1
- package/src/components/suggester/check-store.js +68 -70
- package/src/components/suggester/commons-tools/binded-keys.js +11 -11
- package/src/components/suggester/commons-tools/index.js +1 -1
- package/src/components/suggester/components/create-on-keydown-callback.js +28 -28
- package/src/components/suggester/components/index.js +2 -2
- package/src/components/suggester/components/panel/index.js +2 -2
- package/src/components/suggester/components/panel/option-container.js +1 -1
- package/src/components/suggester/components/panel/panel-container.js +21 -21
- package/src/components/suggester/components/selection/delete.js +38 -38
- package/src/components/suggester/components/selection/index.js +1 -1
- package/src/components/suggester/components/suggester-content.js +42 -42
- package/src/components/suggester/components/suggester.js +43 -3
- package/src/components/suggester/idb-suggester.js +7 -1
- package/src/components/suggester/index.js +1 -1
- package/src/components/suggester/lunatic-suggester.js +1 -0
- package/src/components/suggester/state-management/index.js +6 -6
- package/src/components/suggester/state-management/intial-state.js +13 -13
- package/src/components/suggester/state-management/reducer/index.js +1 -1
- package/src/components/suggester/state-management/reducer/reduce-on-blur.js +5 -5
- package/src/components/suggester/state-management/reducer/reduce-on-change-search.js +8 -8
- package/src/components/suggester/state-management/reducer/reduce-on-click-option.js +8 -8
- package/src/components/suggester/state-management/reducer/reduce-on-error.js +8 -8
- package/src/components/suggester/state-management/reducer/reduce-on-focus.js +5 -5
- package/src/components/suggester/state-management/reducer/reduce-on-key-down.js +73 -73
- package/src/components/suggester/state-management/reducer/reduce-on-unexpected-error.js +7 -7
- package/src/components/suggester/state-management/reducer/reduce-on-update-options.js +11 -11
- package/src/components/suggester/state-management/suggester-context.js +4 -4
- package/src/components/suggester/state-management/use-dispatch.js +11 -11
- package/src/components/suggester/suggester-wrapper.js +9 -3
- package/src/components/suggester-loader-widget/index.js +1 -1
- package/src/components/suggester-loader-widget/loader-row.js +102 -102
- package/src/components/suggester-loader-widget/progress.js +25 -25
- package/src/components/suggester-loader-widget/tools/action-tool.js +20 -20
- package/src/components/suggester-loader-widget/tools/index.js +2 -2
- package/src/components/suggester-loader-widget/tools/tools.js +7 -7
- package/src/components/suggester-loader-widget/widget-container.js +35 -35
- package/src/components/suggester-loader-widget/widget.scss +176 -176
- package/src/components/table/index.js +1 -1
- package/src/components/table/table.js +3 -1
- package/src/components/textarea/index.js +1 -1
- package/src/components/tooltip/img/index.js +4 -4
- package/src/components/tooltip/index.js +1 -1
- package/src/components/tooltip/response.js +52 -52
- package/src/constants/component-types.js +1 -1
- package/src/constants/declarations.js +14 -14
- package/src/constants/event-types.js +13 -13
- package/src/constants/index.js +5 -5
- package/src/constants/supported-preferences.js +10 -10
- package/src/constants/value-types.js +5 -5
- package/src/constants/variable-types.js +4 -4
- package/src/stories/breadcrumb/README.md +14 -14
- package/src/stories/button/README.md +14 -14
- package/src/stories/button/button.stories.js +27 -27
- package/src/stories/checkbox-boolean/README.md +27 -27
- package/src/stories/checkbox-boolean/checkbox-boolean.stories.js +54 -54
- package/src/stories/checkbox-boolean/data-forced.json +48 -48
- package/src/stories/checkbox-group/README.md +29 -29
- package/src/stories/checkbox-group/checkbox-group.stories.js +60 -60
- package/src/stories/checkbox-group/data-forced.json +89 -89
- package/src/stories/checkbox-group/data-vtl.json +102 -102
- package/src/stories/checkbox-group/data.json +89 -89
- package/src/stories/checkbox-one/README.md +31 -31
- package/src/stories/checkbox-one/checkbox-one.stories.js +57 -57
- package/src/stories/checkbox-one/data-forced.json +33 -33
- package/src/stories/checkbox-one/data-vtl.json +48 -48
- package/src/stories/checkbox-one/data.json +33 -33
- package/src/stories/datepicker/README.md +31 -31
- package/src/stories/datepicker/data-forced.json +28 -28
- package/src/stories/datepicker/datepicker.stories.js +60 -60
- package/src/stories/declarations/README.md +19 -19
- package/src/stories/dropdown/data-forced.json +81 -81
- package/src/stories/dropdown/data-naf.json +6963 -6963
- package/src/stories/dropdown/data-props.json +111 -111
- package/src/stories/filter-description/README.md +15 -15
- package/src/stories/filter-description/filter-description.stories.js +53 -53
- package/src/stories/icons/icons.stories.js +16 -16
- package/src/stories/icons/lunatic-icon.scss +10 -10
- package/src/stories/input/README.md +33 -33
- package/src/stories/input/data-forced.json +41 -41
- package/src/stories/input/data.json +41 -41
- package/src/stories/input/input.stories.js +72 -72
- package/src/stories/input-number/README.md +37 -37
- package/src/stories/input-number/data-forced.json +27 -27
- package/src/stories/input-number/data.json +42 -42
- package/src/stories/input-number/input-number.stories.js +81 -81
- package/src/stories/loop/README.md +25 -25
- package/src/stories/loop/loop.stories.js +88 -88
- package/src/stories/loop/with-loop/data-loop-deeper.json +298 -298
- package/src/stories/loop/with-loop/data-loop.json +336 -336
- package/src/stories/loop/with-loop/index.js +2 -2
- package/src/stories/loop/with-roster/data-forced.json +213 -213
- package/src/stories/loop/with-roster/data-loop-deeper.json +298 -298
- package/src/stories/loop/with-roster/data-loop.json +288 -288
- package/src/stories/loop/with-roster/index.js +3 -3
- package/src/stories/loop-constructor/README.md +27 -27
- package/src/stories/loop-constructor/data-input-forced.json +64 -64
- package/src/stories/loop-constructor/data-input.json +100 -100
- package/src/stories/loop-constructor/data-loop-forced.json +66 -66
- package/src/stories/loop-constructor/data-loop-static-forced.json +66 -66
- package/src/stories/loop-constructor/data-loop-static.json +81 -81
- package/src/stories/loop-constructor/data-loop.json +81 -81
- package/src/stories/loop-constructor/data-roster-forced.json +68 -68
- package/src/stories/loop-constructor/data-roster.json +83 -83
- package/src/stories/loop-constructor/loop-constructor.stories.js +180 -180
- package/src/stories/pagination/deeper-loop.json +327 -327
- package/src/stories/pagination/pagination.stories.js +60 -60
- package/src/stories/pagination/simple-loop.json +277 -277
- package/src/stories/pagination/simpsons-question.json +4952 -4952
- package/src/stories/pagination/simpsons-sequence.json +4362 -4362
- package/src/stories/progress-bar/README.md +13 -13
- package/src/stories/questionnaire/arithmetic-management.json +47 -0
- package/src/stories/questionnaire/kish.json +275 -0
- package/src/stories/questionnaire/logement-queen.json +23390 -22706
- package/src/stories/questionnaire/logement-s2.json +46027 -44536
- package/src/stories/questionnaire/logement.json +21072 -21072
- package/src/stories/questionnaire/loop-and-controls.json +481 -0
- package/src/stories/questionnaire/questionnaire.stories.js +77 -13
- package/src/stories/questionnaire/simpsons.json +4816 -4816
- package/src/stories/questionnaire/update-external/data.json +1 -0
- package/src/stories/questionnaire/update-external/questionnaire.json +75 -0
- package/src/stories/radio/README.md +31 -31
- package/src/stories/radio/data-forced.json +32 -32
- package/src/stories/radio/data-vtl.json +47 -47
- package/src/stories/radio/data.json +32 -32
- package/src/stories/radio/radio.stories.js +64 -64
- package/src/stories/sequence/README.md +18 -18
- package/src/stories/subsequence/README.md +18 -18
- package/src/stories/suggester/bailleurs-sociaux-2021/fetch-bailleurs.js +12 -0
- package/src/stories/suggester/bailleurs-sociaux-2021/index.js +1 -0
- package/src/stories/suggester/cog-communes/index.js +2 -2
- package/src/stories/suggester/cog-communes/option-cog-renderer.js +15 -15
- package/src/stories/suggester/cog-communes/theme.scss +12 -12
- package/src/stories/suggester/data.json +35 -2
- package/src/stories/suggester/naf-rev2/fetch-naf.js +57 -57
- package/src/stories/suggester/naf-rev2/theme.scss +36 -36
- package/src/stories/suggester/suggester-workers.stories.js +48 -1
- package/src/stories/suggester/suggester.stories.js +5 -0
- package/src/stories/table/README.md +29 -29
- package/src/stories/table/data-default.json +19 -19
- package/src/stories/table/data-one-axis-one-measure.json +139 -139
- package/src/stories/table/data-one-axis-two-measures.json +208 -208
- package/src/stories/table/data-one-hierarchical-axis.json +219 -219
- package/src/stories/table/data-roster.json +486 -486
- package/src/stories/table/data-two-axis-one-measure.json +507 -507
- package/src/stories/table/table.stories.js +82 -82
- package/src/stories/textarea/README.md +33 -33
- package/src/stories/textarea/data-forced.json +28 -28
- package/src/stories/textarea/data.json +43 -43
- package/src/stories/textarea/textarea.stories.js +68 -68
- package/src/stories/tooltip-response/README.md +14 -14
- package/src/stories/tooltip-response/md-link.json +31 -31
- package/src/stories/tooltip-response/md-tooltip.json +31 -31
- package/src/stories/tooltip-response/tooltip.stories.js +83 -83
- package/src/stories/utils/custom-lunatic.scss +23 -23
- package/src/stories/utils/options.js +25 -25
- package/src/stories/utils/orchestrator-split.js +119 -0
- package/src/stories/utils/orchestrator.js +12 -3
- package/src/tests/components/breadcrumb.spec.js +13 -13
- package/src/tests/components/button.spec.js +11 -11
- package/src/tests/components/checkbox-boolean.spec.js +45 -45
- package/src/tests/components/checkbox-group.spec.js +53 -53
- package/src/tests/components/checkbox-one.spec.js +32 -32
- package/src/tests/components/datepicker.spec.js +22 -22
- package/src/tests/components/declarations-wrappers/input-declarations-wrapper.spec.js +67 -67
- package/src/tests/components/declarations-wrappers/list-declarations-wrapper.spec.js +52 -52
- package/src/tests/components/declarations-wrappers/simple-declarations-wrapper.spec.js +21 -21
- package/src/tests/components/declarations.spec.js +46 -46
- package/src/tests/components/input-number.spec.js +188 -188
- package/src/tests/components/input.spec.js +18 -18
- package/src/tests/components/loops/loop-static.json +66 -66
- package/src/tests/components/loops/loop.json +258 -258
- package/src/tests/components/loops/loop.spec.js +30 -30
- package/src/tests/components/loops/roster-for-loop.spec.js +18 -18
- package/src/tests/components/progress-bar.spec.js +15 -15
- package/src/tests/components/radio.spec.js +27 -27
- package/src/tests/components/sequence.spec.js +9 -9
- package/src/tests/components/subsequence.spec.js +9 -9
- package/src/tests/components/table.spec.js +11 -11
- package/src/tests/components/textarea.spec.js +18 -18
- package/src/tests/components/tooltip.spec.js +25 -25
- package/src/tests/setup/setupTests.js +4 -4
- package/src/tests/utils/lib/alphabet.spec.js +36 -36
- package/src/tests/utils/lib/array.spec.js +22 -22
- package/src/tests/utils/lib/checkbox/group.spec.js +72 -72
- package/src/tests/utils/lib/decorator/title-decorator.spec.js +12 -12
- package/src/tests/utils/lib/input-number.spec.js +18 -18
- package/src/tests/utils/lib/items-positioning.spec.js +17 -17
- package/src/tests/utils/lib/label-position.spec.js +22 -22
- package/src/tests/utils/lib/loops/bindings.spec.js +75 -75
- package/src/tests/utils/lib/loops/shared.spec.js +82 -82
- package/src/tests/utils/lib/missing/missing.spec.js +74 -74
- package/src/tests/utils/lib/missing/mock.js +137 -137
- package/src/tests/utils/lib/pagination/shared.spec.js +42 -42
- package/src/tests/utils/lib/responses.spec.js +64 -64
- package/src/tests/utils/lib/style.spec.js +26 -26
- package/src/tests/utils/lib/tooltip/build-response.spec.js +95 -95
- package/src/tests/utils/lib/tooltip/content.spec.js +109 -109
- package/src/tests/utils/to-expose/handler/handler.spec.js +94 -94
- package/src/tests/utils/to-expose/handler/questionnaire.json +158 -158
- package/src/tests/utils/to-expose/handler/results/index.js +6 -6
- package/src/tests/utils/to-expose/handler/results/res-double.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-input-collected.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-input-edited.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-loop.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-matrix.json +158 -158
- package/src/tests/utils/to-expose/handler/results/res-responses.json +158 -158
- package/src/tests/utils/to-expose/init-questionnaire/data.json +12 -12
- package/src/tests/utils/to-expose/init-questionnaire/init-questionnaire.spec.js +19 -19
- package/src/tests/utils/to-expose/interpret/interpret.spec.js +48 -48
- package/src/tests/utils/to-expose/state/questionnaire.json +61 -61
- package/src/tests/utils/to-expose/state/results.js +78 -78
- package/src/tests/utils/to-expose/state/state.spec.js +59 -59
- package/src/utils/components/dragger/dragger.js +64 -64
- package/src/utils/components/dragger/index.js +1 -1
- package/src/utils/components/fab/fab.js +50 -50
- package/src/utils/components/fab/fab.scss +32 -32
- package/src/utils/components/fab/index.js +1 -1
- package/src/utils/components/field-wrapper.js +23 -23
- package/src/utils/components/is-network/index.js +1 -1
- package/src/utils/components/is-network/is-network.js +39 -39
- package/src/utils/components/is-network/use-online-status.js +51 -51
- package/src/utils/components/label-wrapper.js +45 -45
- package/src/utils/icons/closed.icon.js +24 -24
- package/src/utils/icons/cross.icon.js +24 -24
- package/src/utils/icons/load.icon.js +24 -24
- package/src/utils/icons/lunatic-icon.js +9 -9
- package/src/utils/icons/lunatic-icon.scss +4 -4
- package/src/utils/icons/network.icon.js +24 -24
- package/src/utils/icons/on-drag.icon.js +24 -24
- package/src/utils/icons/opened.icon.js +24 -24
- package/src/utils/idb-tools/clear-store.js +16 -16
- package/src/utils/idb-tools/get-entity.js +15 -15
- package/src/utils/idb-tools/get-idb.js +12 -12
- package/src/utils/lib/alphabet.js +1 -1
- package/src/utils/lib/array.js +7 -7
- package/src/utils/lib/checkbox/group.js +21 -21
- package/src/utils/lib/checkbox/index.js +1 -1
- package/src/utils/lib/controls/utils.js +8 -2
- package/src/utils/lib/decorator/index.js +1 -1
- package/src/utils/lib/env.js +2 -2
- package/src/utils/lib/event.js +15 -15
- package/src/utils/lib/function.js +1 -1
- package/src/utils/lib/index.js +21 -20
- package/src/utils/lib/input-number.js +6 -6
- package/src/utils/lib/label-position.js +12 -12
- package/src/utils/lib/loops/bindings.js +66 -66
- package/src/utils/lib/loops/build-components.js +33 -33
- package/src/utils/lib/loops/index.js +3 -3
- package/src/utils/lib/loops/shared.js +55 -55
- package/src/utils/lib/memo-check.js +24 -24
- package/src/utils/lib/missing.js +52 -52
- package/src/utils/lib/pagination/flow.js +2 -2
- package/src/utils/lib/pagination/index.js +2 -2
- package/src/utils/lib/pagination/navigation/index.js +1 -1
- package/src/utils/lib/pagination/navigation/shared.js +5 -5
- package/src/utils/lib/prop-types/declarations.js +22 -22
- package/src/utils/lib/prop-types/index.js +5 -5
- package/src/utils/lib/prop-types/options.js +8 -8
- package/src/utils/lib/prop-types/response.js +6 -6
- package/src/utils/lib/prop-types/value-type.js +9 -9
- package/src/utils/lib/splitting.js +142 -0
- package/src/utils/lib/table/index.js +1 -1
- package/src/utils/lib/table/roster.js +23 -23
- package/src/utils/lib/tooltip/build-response.js +41 -41
- package/src/utils/lib/tooltip/content.js +55 -55
- package/src/utils/lib/tooltip/index.js +6 -6
- package/src/utils/store-tools/clear-store-data.js +8 -8
- package/src/utils/store-tools/clear-store-info.js +8 -8
- package/src/utils/store-tools/constantes.js +20 -20
- package/src/utils/store-tools/create/create.js +19 -19
- package/src/utils/store-tools/create/index.js +1 -1
- package/src/utils/store-tools/create/update-store-info.js +26 -26
- package/src/utils/store-tools/get-store-count.js +22 -22
- package/src/utils/store-tools/index.js +5 -5
- package/src/utils/store-tools/open-or-create-store.js +47 -47
- package/src/utils/store-tools/use-store-index.js +24 -24
- package/src/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +4 -2
- package/src/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +5 -1
- package/src/utils/suggester-workers/commons-tokenizer/filters/{filter-accents-to-lower.js → filter-accents.js} +2 -2
- package/src/utils/suggester-workers/commons-tokenizer/filters/{filter-accents-to-lower.spec.js → filter-accents.spec.js} +1 -1
- package/src/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +27 -1
- package/src/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +10 -0
- package/src/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.spec.js +12 -0
- package/src/utils/suggester-workers/commons-tokenizer/index.js +2 -1
- package/src/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +7 -1
- package/src/utils/to-expose/handler.js +68 -31
- package/src/utils/to-expose/hooks/filter-components.js +121 -106
- package/src/utils/to-expose/hooks/index.js +2 -1
- package/src/utils/to-expose/hooks/lunatic-split.js +428 -0
- package/src/utils/to-expose/hooks/lunatic.js +57 -8
- package/src/utils/to-expose/hooks/use-document-add-event-listener.js +63 -63
- package/src/utils/to-expose/index.js +11 -11
- package/src/utils/to-expose/interpret/index.js +1 -1
- package/src/utils/to-expose/interpret/main.js +16 -16
- package/src/utils/to-expose/interpret/md.js +65 -65
- package/src/utils/to-expose/state.js +23 -15
- package/src/tests/utils/to-expose/hooks/use-lunatic.spec.js +0 -46
|
@@ -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;
|