@inseefr/lunatic 2.0.0-v2 → 2.0.0-v2test
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/lib/components/button/index.js +0 -2
- package/lib/components/button/lunatic-button.js +6 -16
- package/lib/components/checkbox/checkbox-boolean/checkbox-boolean.js +8 -13
- package/lib/components/checkbox/checkbox-boolean/index.js +0 -2
- package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +9 -16
- package/lib/components/checkbox/checkbox-group/checkbox-group.js +21 -33
- package/lib/components/checkbox/checkbox-group/checkbox.scss +1 -0
- package/lib/components/checkbox/checkbox-group/index.js +0 -2
- package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +9 -15
- package/lib/components/checkbox/checkbox-one/index.js +0 -2
- package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +5 -14
- package/lib/components/checkbox/commons/checkbox-option.js +14 -18
- package/lib/components/checkbox/commons/checkbox-option.scss +3 -0
- package/lib/components/checkbox/commons/index.js +0 -2
- package/lib/components/checkbox/index.js +0 -4
- package/lib/components/commons/build-style-object.js +3 -14
- package/lib/components/commons/components/combo-box/combo-box-container.js +3 -9
- package/lib/components/commons/components/combo-box/combo-box-content.js +6 -19
- package/lib/components/commons/components/combo-box/combo-box.js +35 -67
- package/lib/components/commons/components/combo-box/combo-box.scss +0 -10
- package/lib/components/commons/components/combo-box/index.js +0 -2
- package/lib/components/commons/components/combo-box/panel/index.js +0 -2
- package/lib/components/commons/components/combo-box/panel/option-container.js +4 -19
- package/lib/components/commons/components/combo-box/panel/panel-container.js +3 -8
- package/lib/components/commons/components/combo-box/panel/panel.js +13 -22
- package/lib/components/commons/components/combo-box/selection/delete.js +3 -19
- package/lib/components/commons/components/combo-box/selection/displayLabelOrInput.js +2 -10
- package/lib/components/commons/components/combo-box/selection/index.js +0 -2
- package/lib/components/commons/components/combo-box/selection/input.js +8 -21
- package/lib/components/commons/components/combo-box/selection/label-selection.js +8 -15
- package/lib/components/commons/components/combo-box/selection/selection-container.js +4 -9
- package/lib/components/commons/components/combo-box/selection/selection.js +12 -22
- package/lib/components/commons/components/combo-box/state-management/actions.js +6 -22
- package/lib/components/commons/components/combo-box/state-management/combo-box-context.js +0 -4
- package/lib/components/commons/components/combo-box/state-management/index.js +0 -9
- package/lib/components/commons/components/combo-box/state-management/reducer/index.js +0 -2
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-blur.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-change.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-delete.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-focus.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-init.js +8 -14
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/index.js +0 -2
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-down.js +4 -9
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-arrow-up.js +4 -9
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-end.js +4 -7
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-enter.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-escape.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-home.js +4 -7
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/on-tab.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/reduce-on-keydown.js +1 -20
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-select.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/reducer/reducer.js +0 -22
- package/lib/components/commons/components/create-lunatic-component/create-lunatic-component.js +10 -21
- package/lib/components/commons/components/create-lunatic-component/index.js +0 -3
- package/lib/components/commons/components/default-label-renderer.js +4 -14
- package/lib/components/commons/components/default-option-renderer.js +3 -10
- package/lib/components/commons/components/dragger/dragger.js +20 -46
- package/lib/components/commons/components/dragger/index.js +0 -2
- package/lib/components/commons/components/errors/errors.js +18 -12
- package/lib/components/commons/components/errors/index.js +0 -2
- package/lib/components/commons/components/fab/fab.js +6 -14
- package/lib/components/commons/components/fab/index.js +0 -2
- package/lib/components/commons/components/field-container/field-container.js +3 -12
- package/lib/components/commons/components/field-container/index.js +0 -2
- package/lib/components/commons/components/fieldset.js +2 -10
- package/lib/components/commons/components/fieldset.scss +2 -0
- package/lib/components/commons/components/html-table/index.js +0 -7
- package/lib/components/commons/components/html-table/table.js +3 -12
- package/lib/components/commons/components/html-table/tbody.js +3 -12
- package/lib/components/commons/components/html-table/td.js +7 -16
- package/lib/components/commons/components/html-table/th.js +6 -15
- package/lib/components/commons/components/html-table/thead.js +3 -12
- package/lib/components/commons/components/html-table/tr.js +4 -13
- package/lib/components/commons/components/is-network/index.js +0 -2
- package/lib/components/commons/components/is-network/is-network.js +8 -27
- package/lib/components/commons/components/is-network/use-online-status.js +0 -9
- package/lib/components/commons/components/label.js +5 -13
- package/lib/components/commons/components/lunatic-component.js +12 -24
- package/lib/components/commons/components/lunatic-fieldset-component.js +9 -20
- package/lib/components/commons/components/md-label/index.js +0 -2
- package/lib/components/commons/components/md-label/link.js +8 -14
- package/lib/components/commons/components/md-label/md-label.js +6 -14
- package/lib/components/commons/components/missing/index.js +0 -2
- package/lib/components/commons/components/missing/missing.js +11 -25
- package/lib/components/commons/components/nothing-to-display.js +0 -4
- package/lib/components/commons/components/orchestrated-component.js +15 -25
- package/lib/components/commons/components/variable-status/img/index.js +0 -3
- package/lib/components/commons/components/variable-status/index.js +0 -2
- package/lib/components/commons/components/variable-status/variable-status.js +18 -35
- package/lib/components/commons/create-customizable-field.js +2 -14
- package/lib/components/commons/create-row-orchestrator.js +16 -21
- package/lib/components/commons/icons/checkbox-checked.icon.js +4 -9
- package/lib/components/commons/icons/checkbox-unchecked.icon.js +4 -9
- package/lib/components/commons/icons/closed.icon.js +4 -9
- package/lib/components/commons/icons/cross.icon.js +4 -9
- package/lib/components/commons/icons/index.js +0 -11
- package/lib/components/commons/icons/load.icon.js +4 -9
- package/lib/components/commons/icons/lunatic-icon.js +1 -7
- package/lib/components/commons/icons/network.icon.js +4 -9
- package/lib/components/commons/icons/on-drag.icon.js +4 -9
- package/lib/components/commons/icons/opened.icon.js +4 -9
- package/lib/components/commons/icons/radio-checked.icon.js +4 -9
- package/lib/components/commons/icons/radio-unchecked.icon.js +4 -9
- package/lib/components/commons/index.js +0 -24
- package/lib/components/commons/prop-types/declarations.js +0 -8
- package/lib/components/commons/prop-types/index.js +0 -6
- package/lib/components/commons/prop-types/lines.js +0 -4
- package/lib/components/commons/prop-types/options.js +0 -4
- package/lib/components/commons/prop-types/response.js +0 -4
- package/lib/components/commons/prop-types/value-type.js +0 -8
- package/lib/components/commons/safety-label.js +0 -8
- package/lib/components/commons/use-document-add-event-listener.js +9 -33
- package/lib/components/commons/use-on-handle-change.js +2 -5
- package/lib/components/commons/use-options-keydown.js +1 -6
- package/lib/components/commons/use-previous.js +0 -3
- package/lib/components/components.js +8 -33
- package/lib/components/datepicker/datepicker.js +9 -17
- package/lib/components/datepicker/index.js +0 -2
- package/lib/components/datepicker/lunatic-datepicker.js +5 -15
- package/lib/components/declarations/declaration.js +2 -9
- package/lib/components/declarations/declarations-after-text.js +0 -9
- package/lib/components/declarations/declarations-before-text.js +0 -9
- package/lib/components/declarations/declarations-detachable.js +0 -9
- package/lib/components/declarations/declarations.js +8 -14
- package/lib/components/declarations/index.js +0 -8
- package/lib/components/dropdown/dropdown-simple/dropdown-simple.js +7 -14
- package/lib/components/dropdown/dropdown-simple/index.js +0 -2
- package/lib/components/dropdown/dropdown-simple/simple-label-renderer.js +3 -13
- package/lib/components/dropdown/dropdown-simple/simple-option-renderer.js +2 -9
- package/lib/components/dropdown/dropdown-writable/dropdown-writable.js +11 -31
- package/lib/components/dropdown/dropdown-writable/filter-tools/filter-options.js +1 -12
- package/lib/components/dropdown/dropdown-writable/filter-tools/letters-matching.js +0 -11
- package/lib/components/dropdown/dropdown-writable/filter-tools/match.js +0 -5
- package/lib/components/dropdown/dropdown-writable/filter-tools/prepare-prefix.js +0 -4
- package/lib/components/dropdown/dropdown-writable/index.js +0 -2
- package/lib/components/dropdown/dropdown-writable/writable-label-renderer.js +3 -13
- package/lib/components/dropdown/dropdown-writable/writable-option-renderer.js +18 -52
- package/lib/components/dropdown/dropdown.js +9 -20
- package/lib/components/dropdown/index.js +0 -2
- package/lib/components/dropdown/lunatic-dropdown.js +11 -19
- package/lib/components/filter-description/component.js +3 -6
- package/lib/components/filter-description/index.js +0 -2
- package/lib/components/index.js +0 -4
- package/lib/components/input/index.js +0 -2
- package/lib/components/input/input.js +7 -19
- package/lib/components/input/lunatic-input.js +4 -15
- package/lib/components/input-number/index.js +0 -2
- package/lib/components/input-number/input-number.js +12 -22
- package/lib/components/input-number/lunatic-input-number.js +5 -14
- package/lib/components/loop/block-for-loop/block-for-loop-ochestrator.js +0 -4
- package/lib/components/loop/block-for-loop/block-for-loop.js +38 -76
- package/lib/components/loop/block-for-loop/index.js +0 -2
- package/lib/components/loop/block-for-loop/row.js +16 -30
- package/lib/components/loop/commons/get-init-length.js +0 -3
- package/lib/components/loop/commons/handle-row-button.js +2 -7
- package/lib/components/loop/commons/index.js +0 -3
- package/lib/components/loop/commons/row-component.js +17 -38
- package/lib/components/loop/index.js +0 -2
- package/lib/components/loop/loop.js +19 -29
- package/lib/components/loop/roster-for-loop/body.js +14 -26
- package/lib/components/loop/roster-for-loop/header.js +2 -9
- package/lib/components/loop/roster-for-loop/index.js +0 -2
- package/lib/components/loop/roster-for-loop/roster-for-loop-orchestrator.js +0 -4
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +29 -58
- package/lib/components/loop/roster-for-loop/roster-table.js +10 -21
- package/lib/components/loop/roster-for-loop/row.js +16 -27
- package/lib/components/modal-controls/close-or-skip.js +7 -13
- package/lib/components/modal-controls/index.js +0 -2
- package/lib/components/modal-controls/modal-container.js +1 -6
- package/lib/components/modal-controls/modal-controls.js +6 -29
- package/lib/components/modal-controls/modal-controls.scss +15 -35
- package/lib/components/{pairwise/links → pairwise-links}/index.js +0 -2
- package/lib/components/pairwise-links/orchestrator.js +72 -0
- package/lib/components/{pairwise/links → pairwise-links}/pairwise-links.js +24 -33
- package/lib/components/{pairwise/links → pairwise-links}/row.js +51 -66
- package/lib/components/radio/index.js +0 -2
- package/lib/components/radio/lunatic-radio-group.js +9 -16
- package/lib/components/radio/radio-group.js +10 -19
- package/lib/components/radio/radio-option.js +13 -23
- package/lib/components/radio/radio.scss +3 -1
- package/lib/components/sequence/index.js +0 -2
- package/lib/components/sequence/sequence.js +5 -10
- package/lib/components/subsequence/index.js +0 -2
- package/lib/components/subsequence/subsequence.js +4 -8
- package/lib/components/suggester/check-store.js +15 -54
- package/lib/components/suggester/find-best-label/find-best-label.js +2 -14
- package/lib/components/suggester/find-best-label/index.js +0 -2
- package/lib/components/suggester/idb-suggester.js +14 -34
- package/lib/components/suggester/index.js +0 -2
- package/lib/components/suggester/lunatic-suggester.js +15 -28
- package/lib/components/suggester/searching/create-searching.js +5 -18
- package/lib/components/suggester/searching/index.js +0 -2
- package/lib/components/suggester/suggester.js +22 -56
- package/lib/components/suggester-loader-widget/index.js +0 -2
- package/lib/components/suggester-loader-widget/loader-row.js +13 -40
- package/lib/components/suggester-loader-widget/loader.js +15 -56
- package/lib/components/suggester-loader-widget/progress.js +6 -13
- package/lib/components/suggester-loader-widget/tools/action-tool.js +5 -12
- package/lib/components/suggester-loader-widget/tools/index.js +0 -3
- package/lib/components/suggester-loader-widget/tools/tools.js +0 -4
- package/lib/components/suggester-loader-widget/widget-container.js +2 -11
- package/lib/components/suggester-loader-widget/widget.js +24 -54
- package/lib/components/switch/index.js +0 -2
- package/lib/components/switch/lunatic-switch.js +5 -17
- package/lib/components/switch/switch.js +7 -21
- package/lib/components/table/cell.js +14 -39
- package/lib/components/table/components/cell.js +14 -39
- package/lib/components/table/components/header.js +4 -11
- package/lib/components/table/components/row.js +7 -13
- package/lib/components/table/components/table.js +3 -10
- package/lib/components/table/index.js +0 -2
- package/lib/components/table/lunatic-table.js +17 -34
- package/lib/components/table/table-orchestrator.js +12 -20
- package/lib/components/textarea/index.js +0 -2
- package/lib/components/textarea/lunatic-textarea.js +4 -15
- package/lib/components/textarea/textarea.js +8 -20
- package/lib/constants/declarations.js +3 -1
- package/lib/constants/event-types.js +2 -1
- package/lib/constants/index.js +0 -10
- package/lib/constants/supported-preferences.js +0 -5
- package/lib/constants/variable-types.js +2 -2
- package/lib/i18n/build-dictionary.js +5 -11
- package/lib/i18n/dictionary.js +8 -0
- package/lib/i18n/index.js +0 -6
- package/lib/index.js +0 -4
- package/lib/stories/{pairwise/block/pairwise-block.stories.js → checkboxBoolean/checkboxBoolean.stories.js} +6 -15
- package/lib/stories/checkboxBoolean/source.json +36 -0
- package/lib/stories/checkboxOne/checkboxOne.stories.js +0 -8
- package/lib/stories/custom-mui/checkbox-boolean-mui.js +4 -12
- package/lib/stories/custom-mui/checkbox-group-mui.js +9 -23
- package/lib/stories/custom-mui/checkbox-one-mui.js +0 -4
- package/lib/stories/custom-mui/index.js +0 -16
- package/lib/stories/custom-mui/input-mui.js +7 -17
- package/lib/stories/custom-mui/input-number-mui.js +7 -15
- package/lib/stories/custom-mui/radio-mui.js +7 -23
- package/lib/stories/custom-mui/suggester-mui/index.js +0 -2
- package/lib/stories/custom-mui/suggester-mui/suggester-mui.js +55 -93
- package/lib/stories/custom-mui/switch-mui.js +5 -15
- package/lib/stories/custom-mui/table-mui.js +2 -10
- package/lib/stories/custom-mui/tbody-mui.js +2 -8
- package/lib/stories/custom-mui/td-mui.js +4 -10
- package/lib/stories/custom-mui/textarea-mui.js +7 -16
- package/lib/stories/custom-mui/th-mui.js +3 -9
- package/lib/stories/custom-mui/thead-mui.js +2 -8
- package/lib/stories/custom-mui/tr-mui.js +3 -10
- package/lib/stories/date-picker/datepicker.stories.js +3 -10
- package/lib/stories/date-picker/source.json +2 -51
- package/lib/stories/dropdown/dropdown.stories.js +4 -10
- package/lib/stories/filter-description/filter-description.stories.js +4 -13
- package/lib/stories/input/input.stories.js +0 -9
- package/lib/stories/input-number/input-number.stories.js +0 -9
- package/lib/stories/pairwise/data.json +12 -0
- package/lib/stories/pairwise/links.json +270 -0
- package/lib/stories/pairwise/{links/pairwise-links.stories.js → pairwise-links.stories.js} +3 -12
- package/lib/stories/paste-questionnaire/test.stories.js +4 -12
- package/lib/stories/questionnaires/logement/data.json +6 -11
- package/lib/stories/questionnaires/logement/logement.stories.js +4 -15
- package/lib/stories/questionnaires/recensement/data.json +12 -0
- package/lib/stories/questionnaires/recensement/recensement.stories.js +58 -0
- package/lib/stories/questionnaires/recensement/source.json +15202 -0
- package/lib/stories/questionnaires/rp/data.json +5 -0
- package/lib/stories/questionnaires/rp/rp.stories.js +36 -0
- package/lib/stories/questionnaires/rp/source.json +262 -0
- package/lib/stories/questionnaires/simpsons/simpsons.stories.js +4 -12
- package/lib/stories/questionnaires-test/controls/V2_Controles_BouclesLiees_PasPageFin.json +13 -52
- package/lib/stories/questionnaires-test/controls/boucles-n.json +74 -444
- package/lib/stories/questionnaires-test/controls/controls.stories.js +12 -24
- package/lib/stories/questionnaires-test/test.stories.js +4 -16
- package/lib/stories/radio/radio.stories.js +0 -8
- package/lib/stories/roster-for-loop/roster-for-loop.stories.js +8 -9
- package/lib/stories/roster-for-loop/source-with-header.json +127 -0
- package/lib/stories/suggester/suggester-workers.stories.js +201 -0
- package/lib/stories/suggester/suggester.stories.js +0 -10
- package/lib/stories/switch/SwitchMaterialUI.js +5 -15
- package/lib/stories/switch/switch.js +4 -27
- package/lib/stories/table/table-dynamique.json +67 -0
- package/lib/stories/table/table.stories.js +8 -16
- package/lib/stories/utils/default-arg-types.js +4 -5
- package/lib/stories/utils/orchestrator.js +61 -84
- package/lib/stories/utils/waiting/index.js +0 -2
- package/lib/stories/utils/waiting/waiting.js +1 -11
- package/lib/use-lunatic/actions.js +8 -20
- package/lib/use-lunatic/commons/calculated-variables.js +20 -44
- package/lib/use-lunatic/commons/check-loops.js +14 -38
- package/lib/use-lunatic/commons/compose.js +0 -4
- package/lib/use-lunatic/commons/create-map-pages.js +6 -27
- package/lib/use-lunatic/commons/execute-condition-filter.js +0 -7
- package/lib/use-lunatic/commons/execute-expression/create-execute-expression.js +64 -107
- package/lib/use-lunatic/commons/execute-expression/create-memoizer.js +7 -28
- package/lib/use-lunatic/commons/execute-expression/create-refresh-calculated.js +23 -45
- package/lib/use-lunatic/commons/execute-expression/execute-expression.js +10 -41
- package/lib/use-lunatic/commons/execute-expression/get-expressions-variables.js +2 -16
- package/lib/use-lunatic/commons/execute-expression/get-safety-expression.js +5 -12
- package/lib/use-lunatic/commons/execute-expression/index.js +0 -2
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.js +20 -46
- package/lib/use-lunatic/commons/fill-components/fill-component-value.js +4 -8
- package/lib/use-lunatic/commons/fill-components/fill-components.js +0 -13
- package/lib/use-lunatic/commons/fill-components/fill-errors.js +4 -8
- package/lib/use-lunatic/commons/fill-components/fill-from-state.js +6 -8
- package/lib/use-lunatic/commons/fill-components/fill-management.js +4 -8
- package/lib/use-lunatic/commons/fill-components/fill-missing-response.js +5 -10
- package/lib/use-lunatic/commons/fill-components/fill-pagination.js +4 -6
- package/lib/use-lunatic/commons/fill-components/index.js +0 -2
- package/lib/use-lunatic/commons/get-compatible-vtl-expression.js +0 -7
- package/lib/use-lunatic/commons/get-component-value/get-component-value.js +26 -66
- package/lib/use-lunatic/commons/get-component-value/index.js +0 -2
- package/lib/use-lunatic/commons/get-components-from-state.js +10 -14
- package/lib/use-lunatic/commons/get-data.js +16 -31
- package/lib/use-lunatic/commons/get-errors-without-empty-value.js +22 -0
- package/lib/use-lunatic/commons/index.js +7 -13
- package/lib/use-lunatic/commons/is-First-last-page.js +1 -3
- package/lib/use-lunatic/commons/is-paginated-loop.js +1 -3
- package/lib/use-lunatic/commons/load-suggesters.js +9 -54
- package/lib/use-lunatic/commons/page-tag.js +15 -34
- package/lib/use-lunatic/commons/use-components-from-state.js +12 -20
- package/lib/use-lunatic/index.js +0 -2
- package/lib/use-lunatic/initial-state.js +1 -3
- package/lib/use-lunatic/reducer/commons/index.js +0 -5
- package/lib/use-lunatic/reducer/commons/is-empty-on-empty-page.js +1 -15
- package/lib/use-lunatic/reducer/commons/resize-array-variable.js +2 -12
- package/lib/use-lunatic/reducer/commons/validate-condition-filter.js +4 -16
- package/lib/use-lunatic/reducer/index.js +0 -2
- package/lib/use-lunatic/reducer/reduce-go-next-page.js +37 -65
- package/lib/use-lunatic/reducer/reduce-go-previous-page.js +31 -50
- package/lib/use-lunatic/reducer/reduce-go-to-page.js +10 -20
- package/lib/use-lunatic/reducer/reduce-handle-change/index.js +0 -2
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-cleaning.js +13 -29
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-handle-change.js +34 -40
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-links-variable.js +58 -30
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-missing.js +13 -33
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-resizing.js +24 -43
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-array.js +11 -20
- package/lib/use-lunatic/reducer/reduce-handle-change/reduce-variables-simple.js +5 -9
- package/lib/use-lunatic/reducer/reduce-on-init.js +69 -104
- package/lib/use-lunatic/reducer/reduce-on-set-waiting.js +4 -6
- package/lib/use-lunatic/reducer/reducer.js +0 -20
- package/lib/use-lunatic/reducer/validate-controls/create-controls-reducer.js +28 -27
- package/lib/use-lunatic/reducer/validate-controls/create-modal-controls-reducer.js +22 -26
- package/lib/use-lunatic/reducer/validate-controls/index.js +0 -3
- package/lib/use-lunatic/reducer/validate-controls/validation-utils.js +11 -22
- package/lib/use-lunatic/use-lunatic.js +61 -106
- package/lib/utils/constants/index.js +0 -10
- package/lib/utils/idb-tools/clear-store.js +1 -11
- package/lib/utils/idb-tools/create-db-opener.js +6 -19
- package/lib/utils/idb-tools/create-open-db.js +1 -7
- package/lib/utils/idb-tools/get-entity.js +0 -4
- package/lib/utils/idb-tools/get-idb.js +0 -2
- package/lib/utils/idb-tools/idb-bulk-insert.js +15 -38
- package/lib/utils/idb-tools/index.js +0 -11
- package/lib/utils/idb-tools/insert-entity.js +0 -4
- package/lib/utils/idb-tools/open-db.js +1 -6
- package/lib/utils/idb-tools/open-or-create-db.js +3 -10
- package/lib/utils/is-element.js +0 -2
- package/lib/utils/store-tools/auto-load.js +10 -51
- package/lib/utils/store-tools/clear-store-data.js +1 -12
- package/lib/utils/store-tools/clear-store-info.js +1 -12
- package/lib/utils/store-tools/create/create.js +1 -18
- package/lib/utils/store-tools/create/index.js +0 -3
- package/lib/utils/store-tools/create/update-store-info.js +0 -6
- package/lib/utils/store-tools/get-store-count.js +0 -5
- package/lib/utils/store-tools/index.js +0 -12
- package/lib/utils/store-tools/open-or-create-store.js +1 -11
- package/lib/utils/store-tools/use-store-index.js +5 -27
- package/lib/utils/suggester-workers/append-to-index/append.js +7 -23
- package/lib/utils/suggester-workers/append-to-index/append.worker.js +6 -10
- package/lib/utils/suggester-workers/append-to-index/create-append-task.js +3 -11
- package/lib/utils/suggester-workers/append-to-index/index.js +0 -3
- package/lib/utils/suggester-workers/append-to-index/prepare-entities.js +10 -36
- package/lib/utils/suggester-workers/append-to-index/store-messages.js +4 -7
- package/lib/utils/suggester-workers/commons-tokenizer/create-entity-tokenizer.js +9 -19
- package/lib/utils/suggester-workers/commons-tokenizer/create-fields-tokenizer.js +16 -42
- package/lib/utils/suggester-workers/commons-tokenizer/create-filter-stop-words.js +4 -15
- package/lib/utils/suggester-workers/commons-tokenizer/filters/compose-filters.js +0 -3
- package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.js +4 -15
- package/lib/utils/suggester-workers/commons-tokenizer/filters/create-filter-stop-words.spec.js +0 -2
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.js +0 -5
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-accents.spec.js +0 -2
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.js +0 -9
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-double.spec.js +0 -2
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.js +1 -3
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-length.spec.js +0 -2
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.js +3 -9
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-stemmer.spec.js +0 -2
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.js +4 -22
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-synonyms.spec.js +2 -3
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.js +0 -3
- package/lib/utils/suggester-workers/commons-tokenizer/filters/filter-to-lower.spec.js +0 -2
- package/lib/utils/suggester-workers/commons-tokenizer/filters/index.js +0 -3
- package/lib/utils/suggester-workers/commons-tokenizer/get-regexp-from-pattern.js +0 -3
- package/lib/utils/suggester-workers/commons-tokenizer/get-stemmer.js +0 -8
- package/lib/utils/suggester-workers/commons-tokenizer/index.js +0 -10
- package/lib/utils/suggester-workers/commons-tokenizer/prepare-string-indexation.js +0 -6
- package/lib/utils/suggester-workers/commons-tokenizer/soft-tokenizer.js +0 -3
- package/lib/utils/suggester-workers/create-worker.js +1 -11
- package/lib/utils/suggester-workers/find-best-label/find-best-label.js +10 -28
- package/lib/utils/suggester-workers/find-best-label/find-best-label.worker.js +9 -23
- package/lib/utils/suggester-workers/find-best-label/tokenize.js +6 -23
- package/lib/utils/suggester-workers/find-best-label/tokenize.spec.js +0 -2
- package/lib/utils/suggester-workers/searching/compute-score.js +4 -16
- package/lib/utils/suggester-workers/searching/get-db.js +1 -15
- package/lib/utils/suggester-workers/searching/index.js +0 -2
- package/lib/utils/suggester-workers/searching/order/create-alphanumeric-orderer.js +0 -5
- package/lib/utils/suggester-workers/searching/order/index.js +0 -8
- package/lib/utils/suggester-workers/searching/query-parser/index.js +0 -3
- package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.js +0 -3
- package/lib/utils/suggester-workers/searching/query-parser/query-parser-soft.spec.js +0 -2
- package/lib/utils/suggester-workers/searching/query-parser/query-parser-tokenized.js +4 -20
- package/lib/utils/suggester-workers/searching/resolve-query-parser.js +1 -15
- package/lib/utils/suggester-workers/searching/search-in-index.js +0 -3
- package/lib/utils/suggester-workers/searching/searching.js +6 -41
- package/lib/utils/suggester-workers/searching/searching.worker.js +4 -7
- package/lib/utils/vtl/dataset-builder.js +0 -4
- package/lib/utils/vtl/index.js +0 -2
- package/package.json +7 -4
- package/lib/components/checkbox/checkbox-group/checkbox-option.js +0 -57
- package/lib/components/checkbox/checkbox.scss +0 -1
- package/lib/components/pairwise/block/index.js +0 -15
- package/lib/components/pairwise/block/pairwise-block.js +0 -17
- package/lib/components/pairwise/index.js +0 -23
- package/lib/components/pairwise/links/links-orchestrator.js +0 -16
- package/lib/stories/pairwise/block/block.json +0 -3
- package/lib/stories/pairwise/links/data.json +0 -12
- package/lib/stories/pairwise/links/links.json +0 -141
|
@@ -1,49 +1,33 @@
|
|
|
1
1
|
.lunatic-modal-controls {
|
|
2
2
|
position: fixed;
|
|
3
|
-
|
|
4
3
|
top: 0;
|
|
5
4
|
left: 0;
|
|
6
5
|
width: 100%;
|
|
7
6
|
height: 100%;
|
|
8
7
|
background-color: rgba(50, 50, 50, 0.5);
|
|
8
|
+
z-index: 101;
|
|
9
9
|
|
|
10
|
-
.modal {
|
|
10
|
+
.modal-content {
|
|
11
11
|
background-color: snow;
|
|
12
|
-
height:
|
|
13
|
-
width:
|
|
12
|
+
height: fit-content;
|
|
13
|
+
width: 50%;
|
|
14
14
|
margin: auto;
|
|
15
|
-
margin-top:
|
|
16
|
-
|
|
15
|
+
margin-top: 38vh;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
17
18
|
border-radius: 8px;
|
|
18
|
-
|
|
19
|
-
.title {
|
|
20
|
-
height: 32px;
|
|
21
|
-
background-color: darkslateblue;
|
|
22
|
-
color: black;
|
|
23
|
-
font-size: 18px;
|
|
24
|
-
font-weight: bolder;
|
|
25
|
-
line-height: 32px;
|
|
26
|
-
padding: 0 12px;
|
|
27
|
-
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
|
28
|
-
border-radius: 8px 8px 0 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
19
|
+
overflow-wrap: break-word;
|
|
31
20
|
.body {
|
|
32
|
-
// padding: 0 12px 0 12px;
|
|
33
|
-
padding: 12px 0 0 12px;
|
|
34
|
-
height: 60%;
|
|
35
21
|
color: black;
|
|
36
22
|
font-size: 16px;
|
|
37
23
|
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
|
38
24
|
}
|
|
39
25
|
|
|
40
26
|
.modal-buttons {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
right: 0;
|
|
44
|
-
margin: 0 12px 12px 0;
|
|
27
|
+
align-self: end;
|
|
28
|
+
margin: 0 0.2em 0.2em 0;
|
|
45
29
|
:first-child {
|
|
46
|
-
margin-right:
|
|
30
|
+
margin-right: 0.5em;
|
|
47
31
|
}
|
|
48
32
|
}
|
|
49
33
|
}
|
|
@@ -53,16 +37,12 @@
|
|
|
53
37
|
li,
|
|
54
38
|
div,
|
|
55
39
|
span {
|
|
56
|
-
margin: 0;
|
|
57
|
-
padding: 0;
|
|
58
40
|
border: none;
|
|
59
41
|
list-style: none;
|
|
60
42
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
.info {
|
|
66
|
-
}
|
|
43
|
+
}
|
|
44
|
+
ul {
|
|
45
|
+
margin: 1em;
|
|
46
|
+
padding: 0;
|
|
67
47
|
}
|
|
68
48
|
}
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _pairwiseLinks["default"];
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _pairwiseLinks = _interopRequireDefault(require("./pairwise-links"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _row = _interopRequireDefault(require("./row"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
14
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
18
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
19
|
+
function LinksOrchestrator(props) {
|
|
20
|
+
var id = props.id,
|
|
21
|
+
components = props.components,
|
|
22
|
+
nbRows = props.nbRows,
|
|
23
|
+
valueMap = props.valueMap,
|
|
24
|
+
handleChange = props.handleChange,
|
|
25
|
+
features = props.features,
|
|
26
|
+
missing = props.missing,
|
|
27
|
+
shortcut = props.shortcut,
|
|
28
|
+
preferences = props.preferences,
|
|
29
|
+
executeExpression = props.executeExpression,
|
|
30
|
+
iteration = props.iteration,
|
|
31
|
+
xAxisIterations = props.xAxisIterations,
|
|
32
|
+
yAxisIterations = props.yAxisIterations,
|
|
33
|
+
custom = props.custom,
|
|
34
|
+
errors = props.errors,
|
|
35
|
+
symLinks = props.symLinks;
|
|
36
|
+
var _useState = (0, _react.useState)([xAxisIterations, yAxisIterations]),
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
lengths = _useState2[0],
|
|
39
|
+
setLenghts = _useState2[1];
|
|
40
|
+
(0, _react.useEffect)(function () {
|
|
41
|
+
setLenghts([xAxisIterations, yAxisIterations]);
|
|
42
|
+
}, [xAxisIterations, yAxisIterations]);
|
|
43
|
+
if (nbRows > 0) {
|
|
44
|
+
return new Array(nbRows).fill(null).map(function (_, index) {
|
|
45
|
+
var i = Math.trunc(index / xAxisIterations);
|
|
46
|
+
var j = index % xAxisIterations;
|
|
47
|
+
return /*#__PURE__*/_react["default"].createElement(_row["default"], {
|
|
48
|
+
key: index,
|
|
49
|
+
id: id,
|
|
50
|
+
rowIndex: index,
|
|
51
|
+
components: components,
|
|
52
|
+
valueMap: valueMap,
|
|
53
|
+
handleChange: handleChange,
|
|
54
|
+
executeExpression: executeExpression,
|
|
55
|
+
iteration: iteration,
|
|
56
|
+
linksIterations: [i, j],
|
|
57
|
+
custom: custom,
|
|
58
|
+
lengths: lengths
|
|
59
|
+
/** */,
|
|
60
|
+
features: features,
|
|
61
|
+
shortcut: shortcut,
|
|
62
|
+
preferences: preferences,
|
|
63
|
+
missing: missing,
|
|
64
|
+
errors: errors,
|
|
65
|
+
symLinks: symLinks
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
var _default = LinksOrchestrator;
|
|
72
|
+
exports["default"] = _default;
|
|
@@ -1,47 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _declarations = require("../../declarations");
|
|
15
|
-
|
|
16
|
-
var _commons = require("../../commons");
|
|
17
|
-
|
|
9
|
+
var _orchestrator = _interopRequireDefault(require("./orchestrator"));
|
|
10
|
+
var _declarations = require("../declarations");
|
|
11
|
+
var _nothingToDisplay = _interopRequireDefault(require("../commons/components/nothing-to-display"));
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
-
|
|
22
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
15
|
var PairwiseLinks = function PairwiseLinks(_ref) {
|
|
25
16
|
var declarations = _ref.declarations,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
components = _ref.components,
|
|
18
|
+
handleChange = _ref.handleChange,
|
|
19
|
+
value = _ref.value,
|
|
20
|
+
missing = _ref.missing,
|
|
21
|
+
shortcut = _ref.shortcut,
|
|
22
|
+
features = _ref.features,
|
|
23
|
+
preferences = _ref.preferences,
|
|
24
|
+
management = _ref.management,
|
|
25
|
+
executeExpression = _ref.executeExpression,
|
|
26
|
+
xAxisIterations = _ref.xAxisIterations,
|
|
27
|
+
yAxisIterations = _ref.yAxisIterations,
|
|
28
|
+
custom = _ref.custom,
|
|
29
|
+
id = _ref.id,
|
|
30
|
+
symLinks = _ref.symLinks,
|
|
31
|
+
errors = _ref.errors;
|
|
40
32
|
var nbRows = xAxisIterations * yAxisIterations;
|
|
41
33
|
var handleChangeLinks = (0, _react.useCallback)(function (response, value, args) {
|
|
42
34
|
handleChange(response, value, args);
|
|
43
35
|
}, [handleChange]);
|
|
44
|
-
if (nbRows >
|
|
36
|
+
if (nbRows > 1) return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_declarations.DeclarationsBeforeText, {
|
|
45
37
|
declarations: declarations,
|
|
46
38
|
id: id,
|
|
47
39
|
custom: custom
|
|
@@ -49,7 +41,7 @@ var PairwiseLinks = function PairwiseLinks(_ref) {
|
|
|
49
41
|
declarations: declarations,
|
|
50
42
|
id: id,
|
|
51
43
|
custom: custom
|
|
52
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
44
|
+
}), /*#__PURE__*/_react["default"].createElement(_orchestrator["default"], {
|
|
53
45
|
id: id,
|
|
54
46
|
components: components,
|
|
55
47
|
handleChange: handleChangeLinks,
|
|
@@ -62,16 +54,15 @@ var PairwiseLinks = function PairwiseLinks(_ref) {
|
|
|
62
54
|
preferences: preferences,
|
|
63
55
|
executeExpression: executeExpression,
|
|
64
56
|
custom: custom,
|
|
65
|
-
xAxisIterations: xAxisIterations
|
|
57
|
+
xAxisIterations: xAxisIterations,
|
|
58
|
+
yAxisIterations: yAxisIterations,
|
|
59
|
+
symLinks: symLinks
|
|
66
60
|
}), /*#__PURE__*/_react["default"].createElement(_declarations.DeclarationsDetachable, {
|
|
67
61
|
declarations: declarations,
|
|
68
62
|
id: id,
|
|
69
63
|
custom: custom
|
|
70
|
-
}), /*#__PURE__*/_react["default"].createElement(_commons.Errors, {
|
|
71
|
-
errors: errors
|
|
72
64
|
}));
|
|
73
|
-
return null;
|
|
65
|
+
return /*#__PURE__*/_react["default"].createElement(_nothingToDisplay["default"], null);
|
|
74
66
|
};
|
|
75
|
-
|
|
76
67
|
var _default = PairwiseLinks;
|
|
77
68
|
exports["default"] = _default;
|
|
@@ -1,95 +1,80 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _commons = require("../../commons");
|
|
13
|
-
|
|
9
|
+
var _commons = require("../commons");
|
|
14
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
|
|
16
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
|
|
18
12
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
|
-
|
|
20
13
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
-
|
|
22
14
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
23
|
-
|
|
24
15
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
|
-
|
|
26
16
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
-
|
|
28
17
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
-
|
|
30
18
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
-
|
|
32
19
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
-
|
|
34
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
-
|
|
20
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
36
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
-
|
|
38
22
|
function Row(_ref) {
|
|
39
23
|
var components = _ref.components,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
24
|
+
_ref$valueMap = _ref.valueMap,
|
|
25
|
+
valueMap = _ref$valueMap === void 0 ? {} : _ref$valueMap,
|
|
26
|
+
handleChange = _ref.handleChange,
|
|
27
|
+
features = _ref.features,
|
|
28
|
+
missing = _ref.missing,
|
|
29
|
+
shortcut = _ref.shortcut,
|
|
30
|
+
management = _ref.management,
|
|
31
|
+
preferences = _ref.preferences,
|
|
32
|
+
executeExpression = _ref.executeExpression,
|
|
33
|
+
custom = _ref.custom,
|
|
34
|
+
linksIterations = _ref.linksIterations,
|
|
35
|
+
symLinks = _ref.symLinks,
|
|
36
|
+
lengths = _ref.lengths;
|
|
37
|
+
var _linksIterations = _slicedToArray(linksIterations, 2),
|
|
38
|
+
x = _linksIterations[0],
|
|
39
|
+
y = _linksIterations[1];
|
|
51
40
|
var handleChangeRow = (0, _react.useCallback)(function (response, value) {
|
|
52
41
|
handleChange(response, value, {
|
|
53
|
-
linksIterations: linksIterations
|
|
42
|
+
linksIterations: linksIterations,
|
|
43
|
+
symLinks: symLinks,
|
|
44
|
+
lengths: lengths
|
|
54
45
|
});
|
|
55
|
-
}, [handleChange, linksIterations]);
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
}, [handleChange, linksIterations, symLinks, lengths]);
|
|
47
|
+
if (x !== y) {
|
|
48
|
+
return components.reduce(function (row, component) {
|
|
49
|
+
var response = component.response,
|
|
58
50
|
id = component.id;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (response) {
|
|
68
|
-
var name = response.name;
|
|
69
|
-
var valueArray = valueMap[name];
|
|
70
|
-
|
|
71
|
-
if (Array.isArray(valueArray) && Array.isArray(valueArray[x])) {
|
|
72
|
-
value = valueArray[x][y] || '';
|
|
51
|
+
var idComponent = "".concat(id, "-").concat(x + 1, "-").concat(y + 1, " ");
|
|
52
|
+
var value = undefined;
|
|
53
|
+
if (response) {
|
|
54
|
+
var name = response.name;
|
|
55
|
+
var valueArray = valueMap[name];
|
|
56
|
+
if (Array.isArray(valueArray) && Array.isArray(valueArray[x])) {
|
|
57
|
+
value = valueArray[x][y] || '';
|
|
58
|
+
}
|
|
73
59
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
60
|
+
return [].concat(_toConsumableArray(row), [/*#__PURE__*/_react["default"].createElement(_commons.OrchestratedComponent, {
|
|
61
|
+
component: component,
|
|
62
|
+
key: idComponent,
|
|
63
|
+
handleChange: handleChangeRow,
|
|
64
|
+
features: features,
|
|
65
|
+
missing: missing,
|
|
66
|
+
shortcut: shortcut,
|
|
67
|
+
management: management,
|
|
68
|
+
value: value,
|
|
69
|
+
id: idComponent,
|
|
70
|
+
preferences: preferences,
|
|
71
|
+
linksIterations: linksIterations,
|
|
72
|
+
executeExpression: executeExpression,
|
|
73
|
+
custom: custom
|
|
74
|
+
})]);
|
|
75
|
+
}, []);
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
92
78
|
}
|
|
93
|
-
|
|
94
79
|
var _default = Row;
|
|
95
80
|
exports["default"] = _default;
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _lunaticRadioGroup["default"];
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _lunaticRadioGroup = _interopRequireDefault(require("./lunatic-radio-group"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -4,25 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _radioGroup = _interopRequireDefault(require("./radio-group"));
|
|
11
|
-
|
|
12
9
|
var _commons = require("../commons");
|
|
13
|
-
|
|
14
10
|
require("./radio.scss");
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
12
|
function LunaticRadioGroup(props) {
|
|
19
13
|
var id = props.id,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
options = props.options,
|
|
15
|
+
value = props.value,
|
|
16
|
+
onChange = props.onChange,
|
|
17
|
+
checkboxStyle = props.checkboxStyle,
|
|
18
|
+
custom = props.custom,
|
|
19
|
+
errors = props.errors;
|
|
26
20
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_radioGroup["default"], {
|
|
27
21
|
id: id,
|
|
28
22
|
options: options,
|
|
@@ -31,14 +25,13 @@ function LunaticRadioGroup(props) {
|
|
|
31
25
|
checkboxStyle: checkboxStyle,
|
|
32
26
|
custom: custom
|
|
33
27
|
}), /*#__PURE__*/_react["default"].createElement(_commons.Errors, {
|
|
34
|
-
errors: errors
|
|
28
|
+
errors: errors,
|
|
29
|
+
activeId: id
|
|
35
30
|
}));
|
|
36
31
|
}
|
|
37
|
-
|
|
38
|
-
var _default = (0, _commons.createLunaticComponent)(LunaticRadioGroup, {
|
|
32
|
+
var _default = (0, _commons.createLunaticComponent)((0, _commons.createCustomizableLunaticField)(LunaticRadioGroup, 'LunaticRadioGroup'), {
|
|
39
33
|
// set it to true if you want to display a fieldset + legend on a component
|
|
40
34
|
fieldset: true,
|
|
41
35
|
inputId: 'lunatic-radio-group'
|
|
42
36
|
});
|
|
43
|
-
|
|
44
37
|
exports["default"] = _default;
|
|
@@ -4,26 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _radioOption = _interopRequireDefault(require("./radio-option"));
|
|
11
|
-
|
|
12
9
|
var _commons = require("../commons");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
11
|
function Radio(_ref) {
|
|
17
12
|
var options = _ref.options,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
value = _ref.value,
|
|
14
|
+
id = _ref.id,
|
|
15
|
+
onClick = _ref.onClick,
|
|
16
|
+
_ref$checkboxStyle = _ref.checkboxStyle,
|
|
17
|
+
checkboxStyle = _ref$checkboxStyle === void 0 ? false : _ref$checkboxStyle;
|
|
23
18
|
var onKeyDown = (0, _commons.useOptionsKeydown)(options, onClick);
|
|
24
19
|
return options.map(function (option, index) {
|
|
25
20
|
var valueOption = option.value,
|
|
26
|
-
|
|
21
|
+
label = option.label;
|
|
27
22
|
var radioId = "lunatic-radio-".concat(id, "-").concat(valueOption);
|
|
28
23
|
var labelId = "lunatic-radio-label-".concat(id, "-").concat(valueOption);
|
|
29
24
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -37,14 +32,10 @@ function Radio(_ref) {
|
|
|
37
32
|
onClick: onClick,
|
|
38
33
|
value: valueOption,
|
|
39
34
|
onKeyDown: onKeyDown,
|
|
40
|
-
checkboxStyle: checkboxStyle
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
htmlFor: radioId
|
|
44
|
-
}, label));
|
|
35
|
+
checkboxStyle: checkboxStyle,
|
|
36
|
+
label: label
|
|
37
|
+
}));
|
|
45
38
|
});
|
|
46
39
|
}
|
|
47
|
-
|
|
48
|
-
var _default = (0, _commons.createCustomizableLunaticField)(Radio);
|
|
49
|
-
|
|
40
|
+
var _default = (0, _commons.createCustomizableLunaticField)(Radio, 'Radio');
|
|
50
41
|
exports["default"] = _default;
|
|
@@ -1,50 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
10
|
var _icons = require("../commons/icons");
|
|
15
|
-
|
|
16
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
|
|
20
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
22
14
|
function getIcon(checked, checkboxStyle) {
|
|
23
15
|
if (checked) {
|
|
24
16
|
if (checkboxStyle) {
|
|
25
17
|
return _icons.CheckboxChecked;
|
|
26
18
|
}
|
|
27
|
-
|
|
28
19
|
return _icons.RadioChecked;
|
|
29
20
|
}
|
|
30
|
-
|
|
31
21
|
if (checkboxStyle) {
|
|
32
22
|
return _icons.CheckboxUnchecked;
|
|
33
23
|
}
|
|
34
|
-
|
|
35
24
|
return _icons.RadioUnchecked;
|
|
36
25
|
}
|
|
37
|
-
|
|
38
26
|
function RadioOption(_ref) {
|
|
39
27
|
var checked = _ref.checked,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
onClick = _ref.onClick,
|
|
29
|
+
value = _ref.value,
|
|
30
|
+
id = _ref.id,
|
|
31
|
+
disabled = _ref.disabled,
|
|
32
|
+
onKeyDown = _ref.onKeyDown,
|
|
33
|
+
index = _ref.index,
|
|
34
|
+
labelledBy = _ref.labelledBy,
|
|
35
|
+
checkboxStyle = _ref.checkboxStyle,
|
|
36
|
+
label = _ref.label;
|
|
48
37
|
var spanEl = (0, _react.useRef)();
|
|
49
38
|
var Icon = getIcon(checked, checkboxStyle);
|
|
50
39
|
var tabIndex = checked ? '0' : '-1';
|
|
@@ -63,7 +52,6 @@ function RadioOption(_ref) {
|
|
|
63
52
|
}, [onKeyDown, index, spanEl]);
|
|
64
53
|
(0, _react.useEffect)(function () {
|
|
65
54
|
var current = spanEl.current;
|
|
66
|
-
|
|
67
55
|
if (current && checked) {
|
|
68
56
|
current.focus();
|
|
69
57
|
}
|
|
@@ -83,8 +71,10 @@ function RadioOption(_ref) {
|
|
|
83
71
|
onKeyDown: handleKeyDown,
|
|
84
72
|
"aria-labelledby": labelledBy,
|
|
85
73
|
ref: spanEl
|
|
86
|
-
}, /*#__PURE__*/_react["default"].createElement(Icon, null)
|
|
74
|
+
}, /*#__PURE__*/_react["default"].createElement(Icon, null), /*#__PURE__*/_react["default"].createElement("span", {
|
|
75
|
+
id: labelledBy,
|
|
76
|
+
htmlFor: id
|
|
77
|
+
}, label)));
|
|
87
78
|
}
|
|
88
|
-
|
|
89
79
|
var _default = RadioOption;
|
|
90
80
|
exports["default"] = _default;
|
|
@@ -4,20 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _declarations = require("../declarations");
|
|
11
|
-
|
|
12
9
|
require("./sequence.scss");
|
|
13
|
-
|
|
10
|
+
var _commons = require("../commons");
|
|
14
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
|
|
16
12
|
function Sequence(_ref) {
|
|
17
13
|
var declarations = _ref.declarations,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
label = _ref.label,
|
|
15
|
+
id = _ref.id,
|
|
16
|
+
style = _ref.style;
|
|
21
17
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_declarations.DeclarationsBeforeText, {
|
|
22
18
|
declarations: declarations,
|
|
23
19
|
id: id
|
|
@@ -33,6 +29,5 @@ function Sequence(_ref) {
|
|
|
33
29
|
id: id
|
|
34
30
|
}));
|
|
35
31
|
}
|
|
36
|
-
|
|
37
|
-
var _default = Sequence;
|
|
32
|
+
var _default = (0, _commons.createCustomizableLunaticField)(Sequence, 'Sequence');
|
|
38
33
|
exports["default"] = _default;
|