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