@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
|
@@ -4,65 +4,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _reduceVariablesArray = _interopRequireDefault(require("./reduce-variables-array"));
|
|
9
|
-
|
|
10
8
|
var _reduceVariablesSimple = _interopRequireDefault(require("./reduce-variables-simple"));
|
|
11
|
-
|
|
12
9
|
var _reduceCleaning = _interopRequireDefault(require("./reduce-cleaning"));
|
|
13
|
-
|
|
14
10
|
var _reduceMissing = _interopRequireDefault(require("./reduce-missing"));
|
|
15
|
-
|
|
16
11
|
var _reduceResizing = _interopRequireDefault(require("./reduce-resizing"));
|
|
17
|
-
|
|
18
12
|
var _reduceLinksVariable = _interopRequireDefault(require("./reduce-links-variable"));
|
|
19
|
-
|
|
20
13
|
var _compose = _interopRequireDefault(require("../../commons/compose"));
|
|
21
|
-
|
|
22
14
|
var _validateControls = require("../validate-controls");
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
-
|
|
16
|
+
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); }
|
|
26
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
-
|
|
28
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
32
22
|
function isOnSubPage(pager) {
|
|
33
23
|
var subPage = pager.subPage;
|
|
34
24
|
return subPage !== undefined;
|
|
35
25
|
}
|
|
26
|
+
|
|
36
27
|
/**
|
|
37
28
|
* met à jour variables qui contient les valeur collectées
|
|
38
29
|
* @param {*} state
|
|
39
30
|
* @param {*} action
|
|
40
31
|
* @returns
|
|
41
32
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
33
|
function updateVariables(state, action) {
|
|
45
34
|
var payload = action.payload;
|
|
46
35
|
var response = payload.response,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
value = payload.value,
|
|
37
|
+
_payload$args = payload.args,
|
|
38
|
+
args = _payload$args === void 0 ? {} : _payload$args;
|
|
50
39
|
var name = response.name;
|
|
51
40
|
var loop = args.loop,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
index = args.index,
|
|
42
|
+
length = args.length,
|
|
43
|
+
linksIterations = args.linksIterations,
|
|
44
|
+
symLinks = args.symLinks,
|
|
45
|
+
paginatedLoop = args.paginatedLoop,
|
|
46
|
+
shallowIteration = args.shallowIteration,
|
|
47
|
+
lengths = args.lengths;
|
|
56
48
|
var pager = state.pager,
|
|
57
|
-
|
|
49
|
+
variables = state.variables;
|
|
58
50
|
var nbIterations = pager.nbIterations,
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
iteration = pager.iteration;
|
|
61
52
|
if (linksIterations !== undefined) {
|
|
62
53
|
var variablesNext = (0, _reduceLinksVariable["default"])(variables, {
|
|
63
54
|
name: name,
|
|
64
55
|
value: value,
|
|
65
|
-
linksIterations: linksIterations
|
|
56
|
+
linksIterations: linksIterations,
|
|
57
|
+
symLinks: symLinks,
|
|
58
|
+
lengths: lengths
|
|
66
59
|
});
|
|
67
60
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
68
61
|
variables: variablesNext
|
|
@@ -74,7 +67,6 @@ function updateVariables(state, action) {
|
|
|
74
67
|
index: index,
|
|
75
68
|
length: length
|
|
76
69
|
});
|
|
77
|
-
|
|
78
70
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
79
71
|
variables: _variablesNext
|
|
80
72
|
});
|
|
@@ -85,7 +77,6 @@ function updateVariables(state, action) {
|
|
|
85
77
|
index: iteration,
|
|
86
78
|
length: nbIterations
|
|
87
79
|
});
|
|
88
|
-
|
|
89
80
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
90
81
|
variables: _variablesNext2
|
|
91
82
|
});
|
|
@@ -94,42 +85,45 @@ function updateVariables(state, action) {
|
|
|
94
85
|
name: name,
|
|
95
86
|
value: value
|
|
96
87
|
});
|
|
97
|
-
|
|
88
|
+
if (loop) return _objectSpread(_objectSpread({}, state), {}, {
|
|
89
|
+
variables: _variablesNext3,
|
|
90
|
+
pager: _objectSpread(_objectSpread({}, pager), {}, {
|
|
91
|
+
shallowIteration: shallowIteration
|
|
92
|
+
})
|
|
93
|
+
});
|
|
98
94
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
99
95
|
variables: _variablesNext3
|
|
100
96
|
});
|
|
101
97
|
}
|
|
102
98
|
}
|
|
99
|
+
|
|
103
100
|
/**
|
|
104
101
|
* met à jour bindings pour l'exe du VTL (en appelant la fonction fournit par createExecuteExpression)
|
|
105
102
|
* @param {*} state
|
|
106
103
|
* @param {*} action
|
|
107
104
|
* @returns
|
|
108
105
|
*/
|
|
109
|
-
|
|
110
|
-
|
|
111
106
|
function updateBindings(state, action) {
|
|
112
107
|
var payload = action.payload;
|
|
113
|
-
var response = payload.response
|
|
114
|
-
value = payload.value;
|
|
108
|
+
var response = payload.response;
|
|
115
109
|
var name = response.name;
|
|
116
|
-
var
|
|
117
|
-
|
|
110
|
+
var ub = state.updateBindings;
|
|
111
|
+
var variables = state.variables;
|
|
112
|
+
var variable = variables[name];
|
|
113
|
+
var value = variable.value;
|
|
114
|
+
ub(name, value);
|
|
118
115
|
return state;
|
|
119
116
|
}
|
|
120
|
-
|
|
121
117
|
var reducers = (0, _compose["default"])(updateVariables, updateBindings, _reduceResizing["default"], _reduceMissing["default"], _reduceCleaning["default"]);
|
|
118
|
+
|
|
122
119
|
/**
|
|
123
120
|
*
|
|
124
121
|
* @param {*} state
|
|
125
122
|
* @param {*} action
|
|
126
123
|
* @returns
|
|
127
124
|
*/
|
|
128
|
-
|
|
129
125
|
function reduceHandleChange(state, action) {
|
|
130
126
|
return reducers(state, action);
|
|
131
127
|
}
|
|
132
|
-
|
|
133
128
|
var _default = (0, _validateControls.createControlsReducer)(reduceHandleChange);
|
|
134
|
-
|
|
135
129
|
exports["default"] = _default;
|
|
@@ -1,53 +1,81 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
+
var _commons = require("../commons");
|
|
8
9
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
-
|
|
10
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
|
+
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."); }
|
|
16
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
-
|
|
16
19
|
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."); }
|
|
17
|
-
|
|
18
20
|
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); }
|
|
19
|
-
|
|
20
21
|
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; }
|
|
21
|
-
|
|
22
|
-
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; }
|
|
23
|
-
|
|
22
|
+
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; } }
|
|
24
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
-
|
|
26
|
-
function reduceLinksVariable(variables, _ref) {
|
|
24
|
+
function reduceOne(variables, _ref) {
|
|
27
25
|
var name = _ref.name,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
value = _ref.value,
|
|
27
|
+
linksIterations = _ref.linksIterations,
|
|
28
|
+
lengths = _ref.lengths;
|
|
31
29
|
if (name in variables) {
|
|
32
30
|
var variable = variables[name];
|
|
33
31
|
var v = variable.value;
|
|
34
|
-
|
|
35
32
|
var _linksIterations = _slicedToArray(linksIterations, 2),
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
x = _linksIterations[0],
|
|
34
|
+
y = _linksIterations[1];
|
|
35
|
+
var _lengths = _slicedToArray(lengths, 2),
|
|
36
|
+
lx = _lengths[0],
|
|
37
|
+
ly = _lengths[1];
|
|
38
|
+
var next = (0, _commons.resizeArrayVariable)(_toConsumableArray(v), lx, []);
|
|
39
|
+
next[x] = (0, _commons.resizeArrayVariable)(_toConsumableArray(next[x]), ly, null);
|
|
40
|
+
next[x][y] = value;
|
|
41
|
+
return _objectSpread(_objectSpread({}, variables), {}, _defineProperty({}, name, _objectSpread(_objectSpread({}, variable), {}, {
|
|
42
|
+
value: next
|
|
43
|
+
})));
|
|
47
44
|
}
|
|
48
|
-
|
|
49
45
|
return variables;
|
|
50
46
|
}
|
|
51
|
-
|
|
47
|
+
function reduceLinksVariable(variables, _ref2) {
|
|
48
|
+
var name = _ref2.name,
|
|
49
|
+
value = _ref2.value,
|
|
50
|
+
linksIterations = _ref2.linksIterations,
|
|
51
|
+
symLinks = _ref2.symLinks,
|
|
52
|
+
lengths = _ref2.lengths;
|
|
53
|
+
if (symLinks && name in symLinks) {
|
|
54
|
+
var symValue = symLinks[name][value];
|
|
55
|
+
var _linksIterations2 = _slicedToArray(linksIterations, 2),
|
|
56
|
+
x = _linksIterations2[0],
|
|
57
|
+
y = _linksIterations2[1];
|
|
58
|
+
var symIteration = [y, x];
|
|
59
|
+
if (symValue) {
|
|
60
|
+
return reduceOne(reduceOne(variables, {
|
|
61
|
+
name: name,
|
|
62
|
+
value: value,
|
|
63
|
+
linksIterations: linksIterations,
|
|
64
|
+
lengths: lengths
|
|
65
|
+
}), {
|
|
66
|
+
name: name,
|
|
67
|
+
value: symValue,
|
|
68
|
+
linksIterations: symIteration,
|
|
69
|
+
lengths: lengths
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return reduceOne(variables, {
|
|
74
|
+
name: name,
|
|
75
|
+
value: value,
|
|
76
|
+
linksIterations: linksIterations,
|
|
77
|
+
lengths: lengths
|
|
78
|
+
});
|
|
79
|
+
}
|
|
52
80
|
var _default = reduceLinksVariable;
|
|
53
81
|
exports["default"] = _default;
|
|
@@ -1,76 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
8
|
var _reduceCleaning = _interopRequireDefault(require("./reduce-cleaning"));
|
|
9
|
-
|
|
10
9
|
var _excluded = ["value"];
|
|
11
|
-
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
|
-
|
|
16
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
|
-
|
|
22
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
|
-
|
|
24
18
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
25
|
-
|
|
26
19
|
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."); }
|
|
27
|
-
|
|
28
20
|
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); }
|
|
29
|
-
|
|
30
21
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
31
|
-
|
|
32
22
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
33
|
-
|
|
34
23
|
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; }
|
|
35
|
-
|
|
36
24
|
function buildMissingValue(state, oldValue) {
|
|
37
|
-
var iteration = state.pager.iteration;
|
|
38
|
-
|
|
39
|
-
if (iteration === undefined) return null;
|
|
40
|
-
|
|
25
|
+
var iteration = state.pager.iteration;
|
|
26
|
+
// Root question
|
|
27
|
+
if (iteration === undefined) return null;
|
|
28
|
+
// Loop question
|
|
41
29
|
var newValue = _toConsumableArray(oldValue);
|
|
42
|
-
|
|
43
30
|
newValue[iteration] = null;
|
|
44
31
|
return newValue;
|
|
45
32
|
}
|
|
46
|
-
|
|
47
33
|
function reduceMissing(state, action) {
|
|
48
34
|
var name = action.payload.response.name;
|
|
49
35
|
var missingBlock = state.missingBlock;
|
|
50
|
-
|
|
51
36
|
if (name in missingBlock) {
|
|
52
37
|
var variables = state.variables,
|
|
53
|
-
|
|
38
|
+
updateBindings = state.updateBindings;
|
|
54
39
|
var toClean = missingBlock[name];
|
|
55
40
|
var delta = toClean.reduce(function (acc, variableName) {
|
|
56
41
|
var _variables$variableNa = variables[variableName],
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
42
|
+
value = _variables$variableNa.value,
|
|
43
|
+
rest = _objectWithoutProperties(_variables$variableNa, _excluded);
|
|
60
44
|
updateBindings(variableName, null);
|
|
61
45
|
var newValue = buildMissingValue(state, value);
|
|
62
46
|
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, variableName, _objectSpread(_objectSpread({}, rest), {}, {
|
|
63
47
|
value: newValue
|
|
64
48
|
})));
|
|
65
49
|
}, {});
|
|
66
|
-
|
|
67
50
|
var newStateAfterMissing = _objectSpread(_objectSpread({}, state), {}, {
|
|
68
51
|
variables: _objectSpread(_objectSpread({}, variables), delta)
|
|
69
|
-
});
|
|
52
|
+
});
|
|
53
|
+
// If missing clean variable which is also into cleaning case,
|
|
70
54
|
// we have to handle theses cleanings
|
|
71
55
|
// To check: do we have with this trick or triggering handle change action?
|
|
72
|
-
|
|
73
|
-
|
|
74
56
|
var newStateAfterCleaning = toClean.reduce(function (acc, v) {
|
|
75
57
|
return (0, _reduceCleaning["default"])(acc, {
|
|
76
58
|
payload: {
|
|
@@ -82,9 +64,7 @@ function reduceMissing(state, action) {
|
|
|
82
64
|
}, newStateAfterMissing);
|
|
83
65
|
return newStateAfterCleaning;
|
|
84
66
|
}
|
|
85
|
-
|
|
86
67
|
return state;
|
|
87
68
|
}
|
|
88
|
-
|
|
89
69
|
var _default = reduceMissing;
|
|
90
70
|
exports["default"] = _default;
|
|
@@ -4,36 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _commons = require("../../commons");
|
|
9
|
-
|
|
10
8
|
var _commons2 = require("../commons");
|
|
11
|
-
|
|
9
|
+
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); }
|
|
12
10
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
-
|
|
14
11
|
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
|
-
|
|
16
12
|
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); }
|
|
17
|
-
|
|
18
13
|
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; }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
14
|
+
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; } }
|
|
22
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
|
|
24
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
-
|
|
26
17
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
18
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
30
21
|
function reduceResizingVariables(_ref) {
|
|
31
22
|
var size = _ref.size,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
variableArray = _ref.variableArray,
|
|
24
|
+
variables = _ref.variables,
|
|
25
|
+
executeExpression = _ref.executeExpression,
|
|
26
|
+
updateBindings = _ref.updateBindings;
|
|
37
27
|
if (size !== undefined) {
|
|
38
28
|
var sizeValue = executeExpression((0, _commons.getCompatibleVTLExpression)(size));
|
|
39
29
|
return variableArray.reduce(function (acc, v) {
|
|
@@ -45,25 +35,21 @@ function reduceResizingVariables(_ref) {
|
|
|
45
35
|
})));
|
|
46
36
|
}, {});
|
|
47
37
|
}
|
|
48
|
-
|
|
49
38
|
return {};
|
|
50
39
|
}
|
|
51
|
-
|
|
52
40
|
function reduceResizingLinksVariables(_ref2) {
|
|
53
41
|
var sizeForLinksVariables = _ref2.sizeForLinksVariables,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
linksVariables = _ref2.linksVariables,
|
|
43
|
+
variables = _ref2.variables,
|
|
44
|
+
executeExpression = _ref2.executeExpression,
|
|
45
|
+
updateBindings = _ref2.updateBindings;
|
|
59
46
|
if (Array.isArray(sizeForLinksVariables)) {
|
|
60
47
|
var _sizeForLinksVariable = sizeForLinksVariables.map(function (s) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
48
|
+
return executeExpression((0, _commons.getCompatibleVTLExpression)(s));
|
|
49
|
+
}),
|
|
50
|
+
_sizeForLinksVariable2 = _slicedToArray(_sizeForLinksVariable, 2),
|
|
51
|
+
xSize = _sizeForLinksVariable2[0],
|
|
52
|
+
ySize = _sizeForLinksVariable2[1];
|
|
67
53
|
return linksVariables.reduce(function (acc, v) {
|
|
68
54
|
var value = variables[v].value;
|
|
69
55
|
var newValue = (0, _commons2.resizeArrayVariable)(value.map(function (i) {
|
|
@@ -75,22 +61,19 @@ function reduceResizingLinksVariables(_ref2) {
|
|
|
75
61
|
})));
|
|
76
62
|
}, {});
|
|
77
63
|
}
|
|
78
|
-
|
|
79
64
|
return {};
|
|
80
65
|
}
|
|
81
|
-
|
|
82
66
|
function reduceResizing(state, action) {
|
|
83
67
|
var name = action.payload.response.name;
|
|
84
68
|
var resizing = state.resizing,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
variables = state.variables,
|
|
70
|
+
updateBindings = state.updateBindings;
|
|
88
71
|
if (name in resizing) {
|
|
89
72
|
var _resizing$name = resizing[name],
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
73
|
+
size = _resizing$name.size,
|
|
74
|
+
variableArray = _resizing$name.variables,
|
|
75
|
+
sizeForLinksVariables = _resizing$name.sizeForLinksVariables,
|
|
76
|
+
linksVariables = _resizing$name.linksVariables;
|
|
94
77
|
var executeExpression = state.executeExpression;
|
|
95
78
|
var newLinksVariables = reduceResizingLinksVariables({
|
|
96
79
|
sizeForLinksVariables: sizeForLinksVariables,
|
|
@@ -110,9 +93,7 @@ function reduceResizing(state, action) {
|
|
|
110
93
|
variables: _objectSpread(_objectSpread(_objectSpread({}, variables), newLinksVariables), newVariables)
|
|
111
94
|
});
|
|
112
95
|
}
|
|
113
|
-
|
|
114
96
|
return state;
|
|
115
97
|
}
|
|
116
|
-
|
|
117
98
|
var _default = reduceResizing;
|
|
118
99
|
exports["default"] = _default;
|
|
@@ -1,50 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
8
|
var _commons = require("../commons");
|
|
9
|
-
|
|
10
9
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
|
|
12
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
14
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
17
|
-
|
|
18
15
|
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."); }
|
|
19
|
-
|
|
20
16
|
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); }
|
|
21
|
-
|
|
22
17
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
23
|
-
|
|
24
18
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
25
|
-
|
|
26
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; }
|
|
27
|
-
|
|
28
20
|
function reduceVariablesArray(variables, _ref) {
|
|
29
21
|
var name = _ref.name,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
value = _ref.value,
|
|
23
|
+
index = _ref.index,
|
|
24
|
+
length = _ref.length;
|
|
34
25
|
if (name in variables) {
|
|
35
26
|
var variable = variables[name];
|
|
36
|
-
var previousValue = variable.value;
|
|
27
|
+
var previousValue = variable.value;
|
|
37
28
|
|
|
38
|
-
|
|
29
|
+
// validation de la valeur courante : si pas un tableau ou si la taille du tableau a changé
|
|
30
|
+
var valueNext = (0, _commons.resizeArrayVariable)(_toConsumableArray(previousValue), length);
|
|
39
31
|
|
|
32
|
+
// value affectation
|
|
40
33
|
valueNext[index] = value;
|
|
41
34
|
return _objectSpread(_objectSpread({}, variables), {}, _defineProperty({}, name, _objectSpread(_objectSpread({}, variable), {}, {
|
|
42
35
|
value: valueNext
|
|
43
36
|
})));
|
|
44
37
|
}
|
|
45
|
-
|
|
46
38
|
return variables;
|
|
47
39
|
}
|
|
48
|
-
|
|
49
40
|
var _default = reduceVariablesArray;
|
|
50
41
|
exports["default"] = _default;
|
|
@@ -4,26 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
7
|
+
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); }
|
|
8
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
-
|
|
10
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
|
|
10
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
12
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
14
13
|
function reduceVariablesSimple(variables, _ref) {
|
|
15
14
|
var name = _ref.name,
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
value = _ref.value;
|
|
18
16
|
if (name in variables) {
|
|
19
17
|
var variable = variables[name];
|
|
20
18
|
return _objectSpread(_objectSpread({}, variables), {}, _defineProperty({}, name, _objectSpread(_objectSpread({}, variable), {}, {
|
|
21
19
|
value: value
|
|
22
20
|
})));
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
return variables;
|
|
26
23
|
}
|
|
27
|
-
|
|
28
24
|
var _default = reduceVariablesSimple;
|
|
29
25
|
exports["default"] = _default;
|