@inseefr/lunatic 2.4.2 → 2.4.3-beta
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/__snapshots__/lunatic-button.spec.tsx.snap +80 -0
- package/lib/components/button/lunatic-button.js +1 -7
- package/lib/components/checkbox/checkbox-boolean/html/checkbox-boolean.js +7 -27
- package/lib/components/checkbox/checkbox-boolean/html/checkbox-boolean.spec.js +10 -7
- package/lib/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.js +2 -4
- package/lib/components/checkbox/checkbox-group/checkbox-group-content.js +22 -26
- package/lib/components/checkbox/checkbox-group/html/checkbox-group-content.js +18 -29
- package/lib/components/checkbox/checkbox-group/html/checkbox-group.js +0 -17
- package/lib/components/checkbox/checkbox-group/lunatic-checkbox-group.js +9 -4
- package/lib/components/checkbox/checkbox-one/html/checkbox-one.js +0 -19
- package/lib/components/checkbox/checkbox-one/html/checkbox-one.spec.js +6 -11
- package/lib/components/checkbox/checkbox-one/lunatic-checkbox-one.js +0 -2
- package/lib/components/checkbox/commons/checkbox-option.js +3 -21
- package/lib/components/checkbox/commons/checkbox-option.spec.js +8 -9
- package/lib/components/commons/components/combo-box/combo-box-container.js +4 -16
- package/lib/components/commons/components/combo-box/combo-box-container.spec.js +5 -5
- package/lib/components/commons/components/combo-box/combo-box-content.js +10 -8
- package/lib/components/commons/components/combo-box/combo-box.js +43 -77
- package/lib/components/commons/components/combo-box/combo-box.scss +2 -3
- package/lib/components/commons/components/combo-box/{state-management/reducer/reduce-on-focus.js → combo-box.stories.js} +43 -8
- package/lib/components/commons/components/combo-box/combo-box.type.js +5 -0
- package/lib/components/commons/components/combo-box/panel/option-container.js +5 -10
- package/lib/components/commons/components/combo-box/panel/option-container.spec.js +3 -4
- package/lib/components/commons/components/combo-box/panel/panel-container.js +4 -7
- package/lib/components/commons/components/combo-box/panel/panel-container.spec.js +14 -16
- package/lib/components/commons/components/combo-box/panel/panel.js +26 -46
- package/lib/components/commons/components/combo-box/panel/panel.spec.js +22 -20
- package/lib/components/commons/components/combo-box/selection/__snapshots__/selection.spec.jsx.snap +1 -1
- package/lib/components/commons/components/combo-box/selection/__snapshots__/selection.spec.tsx.snap +82 -0
- package/lib/components/commons/components/combo-box/selection/delete.js +22 -30
- package/lib/components/commons/components/combo-box/selection/delete.spec.js +9 -9
- package/lib/components/commons/components/combo-box/selection/displayLabelOrInput.js +6 -9
- package/lib/components/commons/components/combo-box/selection/displayLabelOrInput.spec.js +9 -10
- package/lib/components/commons/components/combo-box/selection/input.js +5 -5
- package/lib/components/commons/components/combo-box/selection/label-selection.js +3 -2
- package/lib/components/commons/components/combo-box/selection/label-selection.spec.js +22 -18
- package/lib/components/commons/components/combo-box/selection/selection-container.js +5 -8
- package/lib/components/commons/components/combo-box/selection/selection-container.spec.js +4 -5
- package/lib/components/commons/components/combo-box/selection/selection.js +11 -18
- package/lib/components/commons/components/combo-box/selection/selection.spec.js +25 -36
- package/lib/components/commons/components/combo-box/state-management/actions.js +21 -24
- package/lib/components/commons/components/combo-box/state-management/index.js +10 -18
- package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-keydown → reduce-on-keydown}/keyboard-key-codes.js +2 -4
- package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-keydown → reduce-on-keydown}/on-arrow-down.js +5 -7
- package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-keydown → reduce-on-keydown}/on-arrow-up.js +5 -7
- package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-keydown → reduce-on-keydown}/on-end.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-keydown → reduce-on-keydown}/on-enter.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-keydown → reduce-on-keydown}/on-escape.js +3 -5
- package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-keydown → reduce-on-keydown}/on-home.js +4 -6
- package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-keydown → reduce-on-keydown}/on-tab.js +3 -5
- package/lib/components/commons/components/combo-box/state-management/reduce-on-keydown/reduce-on-keydown.js +40 -0
- package/lib/components/commons/components/combo-box/state-management/reducer.js +53 -0
- package/lib/components/commons/components/default-label-renderer.js +0 -10
- package/lib/components/commons/components/default-label-renderer.spec.js +1 -1
- package/lib/components/commons/components/default-option-renderer.js +1 -2
- package/lib/components/commons/components/description.js +9 -7
- package/lib/components/commons/components/dragger/dragger.js +5 -15
- package/lib/components/commons/components/dragger/dragger.spec.js +10 -1
- package/lib/components/commons/components/errors/errors.js +26 -30
- package/lib/components/commons/components/errors/errors.spec.js +13 -7
- package/lib/components/commons/components/fab/fab.js +7 -21
- package/lib/components/commons/components/fab/fab.spec.js +1 -1
- package/lib/components/commons/components/field-container/field-container.js +5 -19
- package/lib/components/commons/components/html-table/index.js +12 -13
- package/lib/components/commons/components/html-table/table.js +3 -11
- package/lib/components/commons/components/html-table/table.spec.js +4 -6
- package/lib/components/commons/components/html-table/tbody.js +3 -13
- package/lib/components/commons/components/html-table/tbody.spec.js +4 -6
- package/lib/components/commons/components/html-table/td.js +3 -18
- package/lib/components/commons/components/html-table/td.spec.js +4 -6
- package/lib/components/commons/components/html-table/th.js +3 -17
- package/lib/components/commons/components/html-table/th.spec.js +6 -8
- package/lib/components/commons/components/html-table/thead.js +3 -12
- package/lib/components/commons/components/html-table/thead.spec.js +3 -4
- package/lib/components/commons/components/html-table/tr.js +3 -13
- package/lib/components/commons/components/html-table/tr.spec.js +8 -14
- package/lib/components/commons/components/is-network/is-network.js +2 -2
- package/lib/components/commons/components/is-network/use-online-status.js +2 -2
- package/lib/components/commons/components/is-network/use-online-status.spec.js +0 -1
- package/lib/components/commons/components/label/label.spec.js +4 -5
- package/lib/components/commons/components/lunatic-component-with-label.js +5 -23
- package/lib/components/commons/components/lunatic-component-without-label.js +11 -38
- package/lib/components/commons/components/missing/missing.js +3 -1
- package/lib/components/commons/components/nothing-to-display.spec.js +2 -3
- package/lib/components/commons/components/orchestrated-component.js +1 -3
- package/lib/components/commons/components/variable-status/variable-status.js +7 -2
- package/lib/components/commons/create-customizable-field.js +2 -3
- package/lib/components/commons/create-row-orchestrator.js +10 -8
- package/lib/components/commons/icons/{checkbox-checked.icon.js → checkbox-checked-icon.js} +4 -8
- package/lib/components/commons/icons/{checkbox-unchecked.icon.js → checkbox-unchecked-icon.js} +4 -8
- package/lib/components/commons/icons/{closed.icon.js → closed-icon.js} +4 -6
- package/lib/components/commons/icons/{cross.icon.js → cross-icon.js} +4 -6
- package/lib/components/commons/icons/icon-props.js +5 -0
- package/lib/components/commons/icons/index.js +20 -21
- package/lib/components/commons/icons/{load.icon.js → load-icon.js} +5 -9
- package/lib/components/commons/icons/lunatic-icon.js +3 -6
- package/lib/components/commons/icons/{network.icon.js → network-icon.js} +5 -9
- package/lib/components/commons/icons/{on-drag.icon.js → on-drag-icon.js} +5 -9
- package/lib/components/commons/icons/{opened.icon.js → opened-icon.js} +4 -8
- package/lib/components/commons/icons/{radio-checked.icon.js → radio-checked-icon.js} +3 -4
- package/lib/components/commons/icons/{radio-unchecked.icon.js → radio-unchecked-icon.js} +4 -8
- package/lib/components/commons/index.js +6 -23
- package/lib/components/commons/safety-label.js +5 -6
- package/lib/components/commons/use-document-add-event-listener.js +11 -71
- package/lib/components/commons/use-on-handle-change.spec.js +6 -2
- package/lib/components/commons/use-options-keydown.js +1 -2
- package/lib/components/component-set/html/component-set-component-container.js +3 -3
- package/lib/components/component-set/html/component-set-components.js +15 -6
- package/lib/components/component-set/html/component-set.js +0 -2
- package/lib/components/component-set/html/legend/legend.js +11 -12
- package/lib/components/component-set/index.js +0 -7
- package/lib/components/component-set/lunatic-component-set.js +3 -14
- package/lib/components/datepicker/html/datepicker-input.js +1 -1
- package/lib/components/datepicker/html/datepicker.js +2 -15
- package/lib/components/datepicker/lunatic-datepicker.js +1 -1
- package/lib/components/declarations/declarations-after-text.js +0 -2
- package/lib/components/declarations/declarations.js +5 -11
- package/lib/components/dropdown/html/dropdown-simple/simple-label-renderer.js +0 -8
- package/lib/components/dropdown/html/dropdown-simple/simple-option-renderer.js +1 -1
- package/lib/components/dropdown/html/dropdown-writable/filter-tools/filter-options.js +11 -19
- package/lib/components/dropdown/html/dropdown-writable/filter-tools/filter-options.spec.js +106 -0
- package/lib/components/dropdown/html/dropdown-writable/filter-tools/get-label.js +4 -3
- package/lib/components/dropdown/html/dropdown-writable/filter-tools/letters-matching.js +1 -1
- package/lib/components/dropdown/html/dropdown-writable/filter-tools/prepare-prefix.js +4 -1
- package/lib/components/dropdown/html/dropdown-writable/writable-label-renderer.js +0 -9
- package/lib/components/dropdown/lunatic-dropdown.js +0 -17
- package/lib/components/index.js +159 -14
- package/lib/components/input/html/input.js +4 -24
- package/lib/components/input/lunatic-input.js +0 -1
- package/lib/components/input-number/html/__snapshots__/input-number.spec.tsx.snap +94 -0
- package/lib/components/input-number/html/input-number-default.js +7 -28
- package/lib/components/input-number/html/input-number-thousand.js +5 -4
- package/lib/components/input-number/html/input-number.js +12 -35
- package/lib/components/input-number/html/{inpute-number.spec.js → input-number.spec.js} +15 -16
- package/lib/components/input-number/lunatic-input-number.js +0 -1
- package/lib/components/loop/block-for-loop/block-for-loop.js +41 -46
- package/lib/components/loop/block-for-loop/row.js +31 -33
- package/lib/components/loop/commons/handle-row-button.js +2 -2
- package/lib/components/loop/commons/row-component.js +4 -2
- package/lib/components/loop/loop.js +2 -5
- package/lib/components/loop/roster-for-loop/body.js +17 -21
- package/lib/components/loop/roster-for-loop/header.js +16 -16
- package/lib/components/loop/roster-for-loop/roster-for-loop.js +7 -12
- package/lib/components/loop/roster-for-loop/roster-table.js +22 -21
- package/lib/components/loop/roster-for-loop/row.js +45 -35
- package/lib/components/modal-controls/close-or-skip.js +1 -2
- package/lib/components/modal-controls/close-or-skip.spec.js +0 -16
- package/lib/components/modal-controls/modal-container.spec.js +0 -1
- package/lib/components/modal-controls/modal-controls.js +3 -5
- package/lib/components/modal-controls/modal-controls.spec.js +25 -16
- package/lib/components/pairwise-links/orchestrator.js +10 -8
- package/lib/components/pairwise-links/pairwise-links.js +8 -11
- package/lib/components/pairwise-links/row.js +15 -18
- package/lib/components/radio/html/radio-group-content.js +25 -21
- package/lib/components/radio/html/radio-group-content.spec.js +1 -2
- package/lib/components/radio/html/radio-group.js +0 -27
- package/lib/components/radio/html/radio-option.js +36 -32
- package/lib/components/radio/html/radio-option.spec.js +8 -0
- package/lib/components/radio/lunatic-radio-group.js +2 -6
- package/lib/components/roundabout/components/roundabout-it-button.js +2 -4
- package/lib/components/roundabout/lunatic-roundabout.js +0 -12
- package/lib/components/roundabout/roundabout.js +7 -21
- package/lib/components/sequence/sequence.js +0 -2
- package/lib/components/sequence/sequence.spec.js +9 -6
- package/lib/components/subsequence/subsequence.spec.js +7 -6
- package/lib/components/suggester/find-best-label/find-best-label.js +8 -13
- package/lib/components/suggester/html/suggester.js +24 -53
- package/lib/components/suggester/idb-suggester/check-store.js +3 -1
- package/lib/components/suggester/idb-suggester/idb-suggester.js +4 -22
- package/lib/components/suggester/idb-suggester/suggester-status.js +3 -3
- package/lib/components/suggester/lunatic-suggester.js +20 -63
- package/lib/components/suggester/searching/create-searching.js +6 -8
- package/lib/components/suggester-loader-widget/loader-row.js +4 -29
- package/lib/components/suggester-loader-widget/loader.js +8 -10
- package/lib/components/suggester-loader-widget/widget.js +6 -16
- package/lib/components/switch/html/switch.js +7 -29
- package/lib/components/switch/lunatic-switch.js +6 -14
- package/lib/components/table/cell.js +12 -23
- package/lib/components/table/header.js +23 -23
- package/lib/components/table/lunatic-table.js +4 -40
- package/lib/components/table/row.js +2 -4
- package/lib/components/table/table-orchestrator.js +10 -20
- package/lib/components/textarea/html/textarea.js +3 -3
- package/lib/components/textarea/lunatic-textarea.js +0 -1
- package/lib/hooks/use-ref-sync.js +15 -0
- package/lib/src/components/button/index.d.ts +1 -0
- package/lib/src/components/button/lunatic-button.d.ts +10 -0
- package/lib/src/components/button/lunatic-button.spec.d.ts +1 -0
- package/lib/src/components/checkbox/checkbox-boolean/html/checkbox-boolean.d.ts +13 -0
- package/lib/src/components/checkbox/checkbox-boolean/html/checkbox-boolean.spec.d.ts +1 -0
- package/lib/src/components/checkbox/checkbox-boolean/index.d.ts +1 -0
- package/lib/src/components/checkbox/checkbox-boolean/lunatic-checkbox-boolean.d.ts +9 -0
- package/lib/src/components/checkbox/checkbox-group/checkbox-group-content.d.ts +9 -0
- package/lib/src/components/checkbox/checkbox-group/html/checkbox-group-content.d.ts +9 -0
- package/lib/src/components/checkbox/checkbox-group/html/checkbox-group-content.spec.d.ts +1 -0
- package/lib/src/components/checkbox/checkbox-group/html/checkbox-group.d.ts +14 -0
- package/lib/src/components/checkbox/checkbox-group/index.d.ts +1 -0
- package/lib/src/components/checkbox/checkbox-group/lunatic-checkbox-group.d.ts +11 -0
- package/lib/src/components/checkbox/checkbox-one/html/checkbox-one.d.ts +5 -0
- package/lib/src/components/checkbox/checkbox-one/html/checkbox-one.spec.d.ts +1 -0
- package/lib/src/components/checkbox/checkbox-one/index.d.ts +1 -0
- package/lib/src/components/checkbox/checkbox-one/lunatic-checkbox-one.d.ts +4 -0
- package/lib/src/components/checkbox/commons/checkbox-option.d.ts +15 -0
- package/lib/src/components/checkbox/commons/checkbox-option.spec.d.ts +1 -0
- package/lib/src/components/checkbox/commons/getShortcutKey.d.ts +1 -0
- package/lib/src/components/checkbox/commons/index.d.ts +1 -0
- package/lib/src/components/checkbox/index.d.ts +3 -0
- package/lib/src/components/commons/components/combo-box/combo-box-container.d.ts +8 -0
- package/lib/src/components/commons/components/combo-box/combo-box-container.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/combo-box-content.d.ts +9 -0
- package/lib/src/components/commons/components/combo-box/combo-box.d.ts +21 -0
- package/lib/src/components/commons/components/combo-box/combo-box.stories.d.ts +27 -0
- package/lib/src/components/commons/components/combo-box/combo-box.type.d.ts +8 -0
- package/lib/src/components/commons/components/combo-box/index.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/panel/option-container.d.ts +8 -0
- package/lib/src/components/commons/components/combo-box/panel/option-container.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/panel/panel-container.d.ts +8 -0
- package/lib/src/components/commons/components/combo-box/panel/panel-container.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/panel/panel.d.ts +17 -0
- package/lib/src/components/commons/components/combo-box/panel/panel.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/delete.d.ts +9 -0
- package/lib/src/components/commons/components/combo-box/selection/delete.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/displayLabelOrInput.d.ts +5 -0
- package/lib/src/components/commons/components/combo-box/selection/displayLabelOrInput.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/input.d.ts +6 -0
- package/lib/src/components/commons/components/combo-box/selection/label-selection.d.ts +20 -0
- package/lib/src/components/commons/components/combo-box/selection/label-selection.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/selection-container.d.ts +10 -0
- package/lib/src/components/commons/components/combo-box/selection/selection-container.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/selection/selection.d.ts +11 -0
- package/lib/src/components/commons/components/combo-box/selection/selection.spec.d.ts +1 -0
- package/lib/src/components/commons/components/combo-box/state-management/actions.d.ts +78 -0
- package/lib/src/components/commons/components/combo-box/state-management/index.d.ts +9 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-init.d.ts +4 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/keyboard-key-codes.d.ts +9 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/on-arrow-down.d.ts +2 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/on-arrow-up.d.ts +2 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/on-end.d.ts +2 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/on-enter.d.ts +2 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/on-escape.d.ts +2 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/on-home.d.ts +2 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/on-tab.d.ts +2 -0
- package/lib/src/components/commons/components/combo-box/state-management/reduce-on-keydown/reduce-on-keydown.d.ts +9 -0
- package/lib/src/components/commons/components/combo-box/state-management/reducer.d.ts +3 -0
- package/lib/src/components/commons/components/default-label-renderer.d.ts +9 -0
- package/lib/src/components/commons/components/default-label-renderer.spec.d.ts +1 -0
- package/lib/src/components/commons/components/default-option-renderer.d.ts +8 -0
- package/lib/src/components/commons/components/default-option-renderer.spec.d.ts +1 -0
- package/lib/src/components/commons/components/description.d.ts +22 -0
- package/lib/src/components/commons/components/description.spec.d.ts +1 -0
- package/lib/src/components/commons/components/dragger/dragger.d.ts +17 -0
- package/lib/src/components/commons/components/dragger/dragger.spec.d.ts +1 -0
- package/lib/src/components/commons/components/dragger/index.d.ts +1 -0
- package/lib/src/components/commons/components/errors/errors.d.ts +9 -0
- package/lib/src/components/commons/components/errors/errors.spec.d.ts +1 -0
- package/lib/src/components/commons/components/errors/index.d.ts +1 -0
- package/lib/src/components/commons/components/fab/fab.d.ts +7 -0
- package/lib/src/components/commons/components/fab/fab.spec.d.ts +1 -0
- package/lib/src/components/commons/components/fab/index.d.ts +1 -0
- package/lib/src/components/commons/components/field-container/field-container.d.ts +6 -0
- package/lib/src/components/commons/components/field-container/filed-container.spec.d.ts +1 -0
- package/lib/src/components/commons/components/field-container/index.d.ts +1 -0
- package/lib/src/components/commons/components/fieldset.d.ts +13 -0
- package/lib/src/components/commons/components/fieldset.spec.d.ts +1 -0
- package/lib/src/components/commons/components/html-table/index.d.ts +6 -0
- package/lib/src/components/commons/components/html-table/table.d.ts +8 -0
- package/lib/src/components/commons/components/html-table/table.spec.d.ts +1 -0
- package/lib/src/components/commons/components/html-table/tbody.d.ts +7 -0
- package/lib/src/components/commons/components/html-table/tbody.spec.d.ts +1 -0
- package/lib/src/components/commons/components/html-table/td.d.ts +11 -0
- package/lib/src/components/commons/components/html-table/td.spec.d.ts +1 -0
- package/lib/src/components/commons/components/html-table/th.d.ts +11 -0
- package/lib/src/components/commons/components/html-table/th.spec.d.ts +1 -0
- package/lib/src/components/commons/components/html-table/thead.d.ts +7 -0
- package/lib/src/components/commons/components/html-table/thead.spec.d.ts +1 -0
- package/lib/src/components/commons/components/html-table/tr.d.ts +8 -0
- package/lib/src/components/commons/components/html-table/tr.spec.d.ts +1 -0
- package/lib/src/components/commons/components/is-network/index.d.ts +1 -0
- package/lib/src/components/commons/components/is-network/is-network.d.ts +7 -0
- package/lib/src/components/commons/components/is-network/is-network.spec.d.ts +1 -0
- package/lib/src/components/commons/components/is-network/use-online-status.d.ts +2 -0
- package/lib/src/components/commons/components/is-network/use-online-status.spec.d.ts +1 -0
- package/lib/src/components/commons/components/label/index.d.ts +1 -0
- package/lib/src/components/commons/components/label/label.d.ts +14 -0
- package/lib/src/components/commons/components/label/label.spec.d.ts +1 -0
- package/lib/src/components/commons/components/lunatic-component-with-label.d.ts +12 -0
- package/lib/src/components/commons/components/lunatic-component-without-label.d.ts +12 -0
- package/lib/src/components/commons/components/missing/index.d.ts +1 -0
- package/lib/src/components/commons/components/missing/missing.d.ts +14 -0
- package/lib/src/components/commons/components/missing/missing.spec.d.ts +1 -0
- package/lib/src/components/commons/components/nothing-to-display.d.ts +3 -0
- package/lib/src/components/commons/components/nothing-to-display.spec.d.ts +1 -0
- package/lib/src/components/commons/components/orchestrated-component.d.ts +10 -0
- package/lib/src/components/commons/components/variable-status/img/index.d.ts +2 -0
- package/lib/src/components/commons/components/variable-status/index.d.ts +1 -0
- package/lib/src/components/commons/components/variable-status/variable-status.d.ts +16 -0
- package/lib/src/components/commons/components/variable-status/variable-status.spec.d.ts +1 -0
- package/lib/src/components/commons/create-customizable-field.d.ts +3 -0
- package/lib/src/components/commons/create-row-orchestrator.d.ts +31 -0
- package/lib/src/components/commons/icons/checkbox-checked-icon.d.ts +3 -0
- package/lib/src/components/commons/icons/checkbox-unchecked-icon.d.ts +3 -0
- package/lib/src/components/commons/icons/closed-icon.d.ts +3 -0
- package/lib/src/components/commons/icons/cross-icon.d.ts +3 -0
- package/lib/src/components/commons/icons/icon-props.d.ts +5 -0
- package/lib/src/components/commons/icons/index.d.ts +10 -0
- package/lib/src/components/commons/icons/load-icon.d.ts +3 -0
- package/lib/src/components/commons/icons/lunatic-icon.d.ts +5 -0
- package/lib/src/components/commons/icons/network-icon.d.ts +3 -0
- package/lib/src/components/commons/icons/on-drag-icon.d.ts +3 -0
- package/lib/src/components/commons/icons/opened-icon.d.ts +3 -0
- package/lib/src/components/commons/icons/radio-checked-icon.d.ts +4 -0
- package/lib/src/components/commons/icons/radio-unchecked-icon.d.ts +3 -0
- package/lib/src/components/commons/index.d.ts +17 -0
- package/lib/src/components/commons/safety-label.d.ts +3 -0
- package/lib/src/components/commons/use-document-add-event-listener.d.ts +2 -0
- package/lib/src/components/commons/use-on-handle-change.d.ts +12 -0
- package/lib/src/components/commons/use-on-handle-change.spec.d.ts +1 -0
- package/lib/src/components/commons/use-options-keydown.d.ts +7 -0
- package/lib/src/components/component-set/html/component-set-component-container.d.ts +6 -0
- package/lib/src/components/component-set/html/component-set-components.d.ts +7 -0
- package/lib/src/components/component-set/html/component-set.d.ts +9 -0
- package/lib/src/components/component-set/html/legend/index.d.ts +1 -0
- package/lib/src/components/component-set/html/legend/legend.d.ts +8 -0
- package/lib/src/components/component-set/index.d.ts +1 -0
- package/lib/src/components/component-set/lunatic-component-set.d.ts +4 -0
- package/lib/src/components/datepicker/html/datepicker-container.d.ts +3 -0
- package/lib/src/components/datepicker/html/datepicker-input.d.ts +13 -0
- package/lib/src/components/datepicker/html/datepicker.d.ts +17 -0
- package/lib/src/components/datepicker/index.d.ts +1 -0
- package/lib/src/components/datepicker/lunatic-datepicker.d.ts +9 -0
- package/lib/src/components/declarations/declaration.d.ts +6 -0
- package/lib/src/components/declarations/declaration.spec.d.ts +1 -0
- package/lib/src/components/declarations/declarations-after-text.d.ts +4 -0
- package/lib/src/components/declarations/declarations-before-text.d.ts +4 -0
- package/lib/src/components/declarations/declarations-detachable.d.ts +4 -0
- package/lib/src/components/declarations/declarations.d.ts +15 -0
- package/lib/src/components/declarations/declarations.spec.d.ts +1 -0
- package/lib/src/components/declarations/index.d.ts +4 -0
- package/lib/src/components/dropdown/html/dropdown-simple/dropdown-simple.d.ts +4 -0
- package/lib/src/components/dropdown/html/dropdown-simple/index.d.ts +1 -0
- package/lib/src/components/dropdown/html/dropdown-simple/simple-label-renderer.d.ts +9 -0
- package/lib/src/components/dropdown/html/dropdown-simple/simple-option-renderer.d.ts +8 -0
- package/lib/src/components/dropdown/html/dropdown-writable/dropdown-writable.d.ts +16 -0
- package/lib/src/components/dropdown/html/dropdown-writable/filter-tools/filter-options.d.ts +6 -0
- package/lib/src/components/dropdown/html/dropdown-writable/filter-tools/filter-options.spec.d.ts +1 -0
- package/lib/src/components/dropdown/html/dropdown-writable/filter-tools/get-label.d.ts +9 -0
- package/lib/src/components/dropdown/html/dropdown-writable/filter-tools/letters-matching.d.ts +2 -0
- package/lib/src/components/dropdown/html/dropdown-writable/filter-tools/match.d.ts +2 -0
- package/lib/src/components/dropdown/html/dropdown-writable/filter-tools/prepare-prefix.d.ts +2 -0
- package/lib/src/components/dropdown/html/dropdown-writable/index.d.ts +1 -0
- package/lib/src/components/dropdown/html/dropdown-writable/writable-label-renderer.d.ts +9 -0
- package/lib/src/components/dropdown/html/dropdown-writable/writable-option-renderer.d.ts +9 -0
- package/lib/src/components/dropdown/html/dropdown.d.ts +9 -0
- package/lib/src/components/dropdown/index.d.ts +1 -0
- package/lib/src/components/dropdown/lunatic-dropdown.d.ts +4 -0
- package/lib/src/components/filter-description/component.d.ts +7 -0
- package/lib/src/components/filter-description/component.spec.d.ts +1 -0
- package/lib/src/components/filter-description/index.d.ts +1 -0
- package/lib/src/components/index.d.ts +24 -0
- package/lib/src/components/input/html/input.d.ts +16 -0
- package/lib/src/components/input/index.d.ts +1 -0
- package/lib/src/components/input/lunatic-input.d.ts +4 -0
- package/lib/src/components/input-number/html/input-number-default.d.ts +14 -0
- package/lib/src/components/input-number/html/input-number-thousand.d.ts +14 -0
- package/lib/src/components/input-number/html/input-number.d.ts +20 -0
- package/lib/src/components/input-number/html/input-number.spec.d.ts +1 -0
- package/lib/src/components/input-number/index.d.ts +1 -0
- package/lib/src/components/input-number/lunatic-input-number.d.ts +4 -0
- package/lib/src/components/loop/block-for-loop/block-for-loop-ochestrator.d.ts +50 -0
- package/lib/src/components/loop/block-for-loop/block-for-loop.d.ts +21 -0
- package/lib/src/components/loop/block-for-loop/index.d.ts +1 -0
- package/lib/src/components/loop/block-for-loop/row.d.ts +23 -0
- package/lib/src/components/loop/commons/get-init-length.d.ts +2 -0
- package/lib/src/components/loop/commons/handle-row-button.d.ts +8 -0
- package/lib/src/components/loop/commons/index.d.ts +2 -0
- package/lib/src/components/loop/commons/row-component.d.ts +10 -0
- package/lib/src/components/loop/index.d.ts +1 -0
- package/lib/src/components/loop/loop.d.ts +4 -0
- package/lib/src/components/loop/roster-for-loop/body.d.ts +13 -0
- package/lib/src/components/loop/roster-for-loop/header.d.ts +9 -0
- package/lib/src/components/loop/roster-for-loop/index.d.ts +1 -0
- package/lib/src/components/loop/roster-for-loop/roster-for-loop-orchestrator.d.ts +50 -0
- package/lib/src/components/loop/roster-for-loop/roster-for-loop.d.ts +21 -0
- package/lib/src/components/loop/roster-for-loop/roster-table.d.ts +14 -0
- package/lib/src/components/loop/roster-for-loop/row.d.ts +24 -0
- package/lib/src/components/modal-controls/close-or-skip.d.ts +8 -0
- package/lib/src/components/modal-controls/close-or-skip.spec.d.ts +1 -0
- package/lib/src/components/modal-controls/index.d.ts +1 -0
- package/lib/src/components/modal-controls/modal-container.d.ts +3 -0
- package/lib/src/components/modal-controls/modal-container.spec.d.ts +1 -0
- package/lib/src/components/modal-controls/modal-controls.d.ts +11 -0
- package/lib/src/components/modal-controls/modal-controls.spec.d.ts +1 -0
- package/lib/src/components/pairwise-links/index.d.ts +1 -0
- package/lib/src/components/pairwise-links/orchestrator.d.ts +7 -0
- package/lib/src/components/pairwise-links/pairwise-links.d.ts +4 -0
- package/lib/src/components/pairwise-links/row.d.ts +8 -0
- package/lib/src/components/radio/html/radio-group-content.d.ts +17 -0
- package/lib/src/components/radio/html/radio-group-content.spec.d.ts +1 -0
- package/lib/src/components/radio/html/radio-group.d.ts +22 -0
- package/lib/src/components/radio/html/radio-option.d.ts +21 -0
- package/lib/src/components/radio/html/radio-option.spec.d.ts +1 -0
- package/lib/src/components/radio/index.d.ts +1 -0
- package/lib/src/components/radio/lunatic-radio-group.d.ts +13 -0
- package/lib/src/components/roundabout/components/roundabout-container.d.ts +6 -0
- package/lib/src/components/roundabout/components/roundabout-container.spec.d.ts +1 -0
- package/lib/src/components/roundabout/components/roundabout-it-button.d.ts +11 -0
- package/lib/src/components/roundabout/components/roundabout-it-button.spec.d.ts +1 -0
- package/lib/src/components/roundabout/components/roundabout-it-container.d.ts +5 -0
- package/lib/src/components/roundabout/components/roundabout-it-container.spec.d.ts +1 -0
- package/lib/src/components/roundabout/components/roundabout-it-title.d.ts +5 -0
- package/lib/src/components/roundabout/components/roundabout-it-title.spec.d.ts +1 -0
- package/lib/src/components/roundabout/components/roundabout-label.d.ts +5 -0
- package/lib/src/components/roundabout/components/roundabout-label.spec.d.ts +1 -0
- package/lib/src/components/roundabout/components/roundabout-pending.d.ts +3 -0
- package/lib/src/components/roundabout/components/roundabout-pending.spec.d.ts +1 -0
- package/lib/src/components/roundabout/index.d.ts +1 -0
- package/lib/src/components/roundabout/lunatic-roundabout.d.ts +7 -0
- package/lib/src/components/roundabout/redirect.d.ts +7 -0
- package/lib/src/components/roundabout/redirect.spec.d.ts +1 -0
- package/lib/src/components/roundabout/roundabout.d.ts +15 -0
- package/lib/src/components/roundabout/roundabout.spec.d.ts +1 -0
- package/lib/src/components/sequence/index.d.ts +1 -0
- package/lib/src/components/sequence/sequence.d.ts +4 -0
- package/lib/src/components/sequence/sequence.spec.d.ts +1 -0
- package/lib/src/components/subsequence/index.d.ts +1 -0
- package/lib/src/components/subsequence/subsequence.d.ts +3 -0
- package/lib/src/components/subsequence/subsequence.spec.d.ts +1 -0
- package/lib/src/components/suggester/find-best-label/find-best-label.d.ts +2 -0
- package/lib/src/components/suggester/find-best-label/index.d.ts +1 -0
- package/lib/src/components/suggester/html/notification.d.ts +8 -0
- package/lib/src/components/suggester/html/suggester.d.ts +23 -0
- package/lib/src/components/suggester/idb-suggester/check-store.d.ts +8 -0
- package/lib/src/components/suggester/idb-suggester/idb-suggester.d.ts +7 -0
- package/lib/src/components/suggester/idb-suggester/index.d.ts +1 -0
- package/lib/src/components/suggester/idb-suggester/suggester-notification.d.ts +12 -0
- package/lib/src/components/suggester/idb-suggester/suggester-status.d.ts +26 -0
- package/lib/src/components/suggester/index.d.ts +1 -0
- package/lib/src/components/suggester/lunatic-suggester.d.ts +4 -0
- package/lib/src/components/suggester/searching/create-searching.d.ts +6 -0
- package/lib/src/components/suggester/searching/index.d.ts +1 -0
- package/lib/src/components/suggester-loader-widget/index.d.ts +1 -0
- package/lib/src/components/suggester-loader-widget/loader-row.d.ts +11 -0
- package/lib/src/components/suggester-loader-widget/loader.d.ts +13 -0
- package/lib/src/components/suggester-loader-widget/progress.d.ts +8 -0
- package/lib/src/components/suggester-loader-widget/tools/action-tool.d.ts +9 -0
- package/lib/src/components/suggester-loader-widget/tools/index.d.ts +2 -0
- package/lib/src/components/suggester-loader-widget/tools/tools.d.ts +3 -0
- package/lib/src/components/suggester-loader-widget/widget-container.d.ts +8 -0
- package/lib/src/components/suggester-loader-widget/widget.d.ts +16 -0
- package/lib/src/components/switch/html/switch.d.ts +17 -0
- package/lib/src/components/switch/index.d.ts +1 -0
- package/lib/src/components/switch/lunatic-switch.d.ts +4 -0
- package/lib/src/components/table/cell.d.ts +20 -0
- package/lib/src/components/table/header.d.ts +11 -0
- package/lib/src/components/table/index.d.ts +1 -0
- package/lib/src/components/table/lunatic-table.d.ts +4 -0
- package/lib/src/components/table/row.d.ts +19 -0
- package/lib/src/components/table/table-orchestrator.d.ts +5 -0
- package/lib/src/components/textarea/html/textarea.d.ts +17 -0
- package/lib/src/components/textarea/index.d.ts +1 -0
- package/lib/src/components/textarea/lunatic-textarea.d.ts +19 -0
- package/lib/src/components/type.d.ts +85 -36
- package/lib/src/hooks/use-ref-sync.d.ts +5 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/type.utils.d.ts +4 -0
- package/lib/src/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +4 -1
- package/lib/src/use-lunatic/commons/fill-components/fill-from-state.d.ts +16 -32
- package/lib/src/use-lunatic/commons/fill-components/fill-specific-expression.d.ts +0 -48
- package/lib/src/use-lunatic/commons/use-components-from-state.d.ts +1 -1
- package/lib/src/use-lunatic/reducer/commons/is-loop-component.d.ts +2 -4
- package/lib/src/use-lunatic/reducer/overview/overview-on-init.d.ts +10 -1
- package/lib/src/use-lunatic/reducer/reduce-roundabout.d.ts +1 -98
- package/lib/src/use-lunatic/replace-component-sequence.d.ts +3 -1
- package/lib/src/use-lunatic/type-source.d.ts +2 -2
- package/lib/src/use-lunatic/type.d.ts +11 -3
- package/lib/src/use-lunatic/use-lunatic.d.ts +1 -1
- package/lib/src/utils/constants/alphabet.d.ts +1 -0
- package/lib/src/utils/function.d.ts +4 -0
- package/lib/src/utils/idb-tools/create-db-opener.d.ts +13 -0
- package/lib/src/utils/idb-tools/create-open-db.d.ts +2 -0
- package/lib/src/utils/idb-tools/get-entity.d.ts +2 -0
- package/lib/src/utils/idb-tools/idb-bulk-insert.d.ts +16 -0
- package/lib/src/utils/idb-tools/idb-types.d.ts +16 -0
- package/lib/src/utils/idb-tools/index.d.ts +7 -0
- package/lib/src/utils/idb-tools/open-db.d.ts +2 -0
- package/lib/src/utils/idb-tools/open-or-create-db.d.ts +2 -0
- package/lib/src/utils/store-tools/auto-load.d.ts +6 -0
- package/lib/src/utils/store-tools/clear-store-data.d.ts +2 -0
- package/lib/src/utils/store-tools/clear-store-info.d.ts +2 -0
- package/lib/src/utils/store-tools/create/create.d.ts +4 -0
- package/lib/src/utils/store-tools/create/index.d.ts +2 -0
- package/lib/src/utils/store-tools/create/update-store-info.d.ts +2 -0
- package/lib/src/utils/store-tools/get-store-count.d.ts +2 -0
- package/lib/src/utils/store-tools/index.d.ts +7 -0
- package/lib/src/utils/store-tools/use-store-index.d.ts +4 -0
- package/lib/src/utils/suggester-workers/append-to-index/append.d.ts +6 -0
- package/lib/src/utils/suggester-workers/append-to-index/index.d.ts +2 -0
- package/lib/stories/questionnaires/simpsons/simpsons.stories.js +5 -5
- package/lib/stories/suggester/suggester-workers.stories.js +8 -4
- package/lib/use-lunatic/commons/fill-components/fill-component-expressions.spec.js +0 -2
- package/lib/utils/function.js +11 -0
- package/lib/utils/idb-tools/create-db-opener.js +12 -5
- package/lib/utils/idb-tools/idb-bulk-insert.js +0 -6
- package/lib/utils/idb-tools/idb-types.js +5 -0
- package/lib/utils/idb-tools/open-db.js +2 -1
- package/lib/utils/idb-tools/open-or-create-db.js +5 -3
- package/lib/utils/store-tools/auto-load.js +2 -2
- package/lib/utils/store-tools/use-store-index.js +1 -1
- package/lib/utils/suggester-workers/append-to-index/append.js +3 -2
- package/package.json +7 -3
- package/lib/components/commons/build-style-object.js +0 -25
- package/lib/components/commons/components/combo-box/panel/index.js +0 -13
- package/lib/components/commons/components/combo-box/selection/index.js +0 -13
- package/lib/components/commons/components/combo-box/state-management/combo-box-context.js +0 -16
- package/lib/components/commons/components/combo-box/state-management/initial-state.js +0 -14
- package/lib/components/commons/components/combo-box/state-management/reducer/index.js +0 -13
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-blur.js +0 -20
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-change.js +0 -22
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-delete.js +0 -21
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/index.js +0 -13
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-keydown/reduce-on-keydown.js +0 -40
- package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-select.js +0 -22
- package/lib/components/commons/components/combo-box/state-management/reducer/reducer.js +0 -41
- package/lib/components/commons/prop-types/declarations.js +0 -19
- package/lib/components/commons/prop-types/index.js +0 -41
- package/lib/components/commons/prop-types/lines.js +0 -13
- package/lib/components/commons/prop-types/options.js +0 -13
- package/lib/components/commons/prop-types/response.js +0 -13
- package/lib/components/commons/prop-types/value-type.js +0 -14
- package/lib/components/commons/use-previous.js +0 -16
- package/lib/components/components.js +0 -179
- package/lib/components/radio/html/dist/radio-group.css +0 -12
- package/lib/components/radio/radio-group.js +0 -51
- package/lib/components/suggester/idb-suggester/dist/index.dev.js +0 -12
- package/lib/dist/index.dev.js +0 -31
- package/lib/utils/suggester-workers/append-to-index/dist/append.worker.dev.js +0 -37
- package/lib/utils/suggester-workers/append-to-index/dist/create-append-task.js +0 -71
- package/lib/utils/suggester-workers/append-to-index/dist/index.dev.js +0 -24
- /package/lib/components/commons/components/combo-box/state-management/{reducer/reduce-on-init.js → reduce-on-init.js} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * as CONSTANTES from './constantes';
|
|
2
|
+
export { default as openOrCreateStore } from './open-or-create-store';
|
|
3
|
+
export { default as clearStoreData } from './clear-store-data';
|
|
4
|
+
export { default as clearStoreInfo } from './clear-store-info';
|
|
5
|
+
export { default as useStoreIndex } from './use-store-index';
|
|
6
|
+
export { default as getStoreCount } from './get-store-count';
|
|
7
|
+
export { default as updateStoreInfo } from './create/update-store-info';
|
|
@@ -325,7 +325,7 @@ Filled.play = /*#__PURE__*/function () {
|
|
|
325
325
|
case 98:
|
|
326
326
|
_context.next = 100;
|
|
327
327
|
return page.getByRole('row', {
|
|
328
|
-
name:
|
|
328
|
+
name: /Break the windows of the whole city/
|
|
329
329
|
}).getByRole('combobox').click();
|
|
330
330
|
case 100:
|
|
331
331
|
_context.next = 102;
|
|
@@ -333,7 +333,7 @@ Filled.play = /*#__PURE__*/function () {
|
|
|
333
333
|
case 102:
|
|
334
334
|
_context.next = 104;
|
|
335
335
|
return page.getByRole('row', {
|
|
336
|
-
name:
|
|
336
|
+
name: /Loose the violin of his daughter playing poker/
|
|
337
337
|
}).getByRole('combobox').click();
|
|
338
338
|
case 104:
|
|
339
339
|
_context.next = 106;
|
|
@@ -341,7 +341,7 @@ Filled.play = /*#__PURE__*/function () {
|
|
|
341
341
|
case 106:
|
|
342
342
|
_context.next = 108;
|
|
343
343
|
return page.getByRole('row', {
|
|
344
|
-
name:
|
|
344
|
+
name: /Kill Mr Burns/
|
|
345
345
|
}).getByRole('combobox').click();
|
|
346
346
|
case 108:
|
|
347
347
|
_context.next = 110;
|
|
@@ -402,7 +402,7 @@ Filled.play = /*#__PURE__*/function () {
|
|
|
402
402
|
case 128:
|
|
403
403
|
_context.next = 130;
|
|
404
404
|
return page.getByRole('row', {
|
|
405
|
-
name:
|
|
405
|
+
name: /Leave with pay/
|
|
406
406
|
}).getByText('Please, do something...').click();
|
|
407
407
|
case 130:
|
|
408
408
|
_context.next = 132;
|
|
@@ -410,7 +410,7 @@ Filled.play = /*#__PURE__*/function () {
|
|
|
410
410
|
case 132:
|
|
411
411
|
_context.next = 134;
|
|
412
412
|
return page.getByRole('row', {
|
|
413
|
-
name:
|
|
413
|
+
name: /Leave with pay/
|
|
414
414
|
}).getByRole('spinbutton').fill('12');
|
|
415
415
|
case 134:
|
|
416
416
|
_context.next = 136;
|
|
@@ -103,12 +103,16 @@ function _loadOne() {
|
|
|
103
103
|
_context2.next = 11;
|
|
104
104
|
return (0, _idbTools.clearDb)(db, _storeTools.CONSTANTES.STORE_INFO_NAME);
|
|
105
105
|
case 11:
|
|
106
|
-
|
|
106
|
+
console.log({
|
|
107
|
+
info: info,
|
|
108
|
+
rubriques: rubriques
|
|
109
|
+
});
|
|
110
|
+
_context2.next = 14;
|
|
107
111
|
return (0, _appendToIndex["default"])(info, '1', rubriques, console.log);
|
|
108
|
-
case
|
|
109
|
-
_context2.next =
|
|
112
|
+
case 14:
|
|
113
|
+
_context2.next = 16;
|
|
110
114
|
return (0, _idbTools.insertEntity)(db, _storeTools.CONSTANTES.STORE_INFO_NAME, info);
|
|
111
|
-
case
|
|
115
|
+
case 16:
|
|
112
116
|
case "end":
|
|
113
117
|
return _context2.stop();
|
|
114
118
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.voidFunction = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Global void function to use as default parameters
|
|
9
|
+
*/
|
|
10
|
+
var voidFunction = function voidFunction() {};
|
|
11
|
+
exports.voidFunction = voidFunction;
|
|
@@ -7,10 +7,10 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _getIdb = _interopRequireDefault(require("./get-idb"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
9
|
var IDB_REF = (0, _getIdb["default"])();
|
|
10
|
-
function onSuccessDefault(e, resolve) {
|
|
11
|
-
resolve(e.result);
|
|
10
|
+
function onSuccessDefault(e, resolve, reject) {
|
|
11
|
+
resolve(e.target.result);
|
|
12
12
|
}
|
|
13
|
-
function onUpgradeNeededDefault() {
|
|
13
|
+
function onUpgradeNeededDefault(e, resolve, reject) {
|
|
14
14
|
throw new Error('Upgrade needed hook required!');
|
|
15
15
|
}
|
|
16
16
|
function onErrorDefault(e, _, reject) {
|
|
@@ -32,10 +32,14 @@ function createDbOpener() {
|
|
|
32
32
|
}
|
|
33
33
|
var request = IDB_REF.open(name, version);
|
|
34
34
|
request.onupgradeneeded = function (e) {
|
|
35
|
-
|
|
35
|
+
if (isOpenDBRequestEvent(e)) {
|
|
36
|
+
onUpgradeNeeded(e, resolve, reject);
|
|
37
|
+
}
|
|
36
38
|
};
|
|
37
39
|
request.onsuccess = function (e) {
|
|
38
|
-
|
|
40
|
+
if (isOpenDBRequestEvent(e)) {
|
|
41
|
+
onSuccess(e, resolve, reject);
|
|
42
|
+
}
|
|
39
43
|
};
|
|
40
44
|
request.onerror = function (e) {
|
|
41
45
|
onError(e, resolve, reject);
|
|
@@ -43,5 +47,8 @@ function createDbOpener() {
|
|
|
43
47
|
});
|
|
44
48
|
};
|
|
45
49
|
}
|
|
50
|
+
function isOpenDBRequestEvent(e) {
|
|
51
|
+
return e.target instanceof IDBOpenDBRequest;
|
|
52
|
+
}
|
|
46
53
|
var _default = createDbOpener;
|
|
47
54
|
exports["default"] = _default;
|
|
@@ -31,8 +31,6 @@ var BULK_INSERT_MESSAGES = {
|
|
|
31
31
|
type: 'bulk-insert/error'
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
/* */
|
|
36
34
|
exports.BULK_INSERT_MESSAGES = BULK_INSERT_MESSAGES;
|
|
37
35
|
var pushTask = function pushTask(store, transaction) {
|
|
38
36
|
return function () {
|
|
@@ -53,8 +51,6 @@ var pushTask = function pushTask(store, transaction) {
|
|
|
53
51
|
}
|
|
54
52
|
};
|
|
55
53
|
};
|
|
56
|
-
|
|
57
|
-
/* */
|
|
58
54
|
function split(entities) {
|
|
59
55
|
var limit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : BULK_LIMIT;
|
|
60
56
|
return entities.reduce(function (_ref3, n, i) {
|
|
@@ -64,8 +60,6 @@ function split(entities) {
|
|
|
64
60
|
return (i + 1) % limit === 0 ? [[n], f].concat(_toConsumableArray(r)) : [[n].concat(_toConsumableArray(f))].concat(_toConsumableArray(r));
|
|
65
61
|
}, [[]]);
|
|
66
62
|
}
|
|
67
|
-
|
|
68
|
-
/* */
|
|
69
63
|
var bulkPush = function bulkPush(db, name, hook, resolve, reject, max) {
|
|
70
64
|
return function (lot) {
|
|
71
65
|
var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
@@ -9,7 +9,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
9
9
|
/* eslint-disable no-restricted-globals */
|
|
10
10
|
|
|
11
11
|
function onUpgradeNeeded(e, _, reject) {
|
|
12
|
-
|
|
12
|
+
var _e$target$transaction;
|
|
13
|
+
(_e$target$transaction = e.target.transaction) === null || _e$target$transaction === void 0 ? void 0 : _e$target$transaction.abort();
|
|
13
14
|
reject({
|
|
14
15
|
message: 'base seems to need an upgrade!'
|
|
15
16
|
});
|
|
@@ -25,9 +25,11 @@ function onUpgradeNeeded(e, resolve, reject) {
|
|
|
25
25
|
multiEntry: true
|
|
26
26
|
});
|
|
27
27
|
var txn = e.target.transaction;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
if (txn) {
|
|
29
|
+
txn.oncomplete = function () {
|
|
30
|
+
resolve(db);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
31
33
|
} catch (e) {
|
|
32
34
|
reject(e);
|
|
33
35
|
}
|
|
@@ -19,7 +19,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
19
19
|
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; } }
|
|
20
20
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
21
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
22
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
22
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } // @ts-ignore
|
|
23
23
|
var workerPath = process.env.LUNATIC_LOADER_WORKER_PATH || process.env.REACT_APP_LUNATIC_LOADER_WORKER_PATH || 'workers/lunatic-loader-worker-0.1.0.js';
|
|
24
24
|
var loadSuggesters = function loadSuggesters(suggesterFetcher) {
|
|
25
25
|
return /*#__PURE__*/function () {
|
|
@@ -27,7 +27,7 @@ var loadSuggesters = function loadSuggesters(suggesterFetcher) {
|
|
|
27
27
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
28
28
|
while (1) switch (_context3.prev = _context3.next) {
|
|
29
29
|
case 0:
|
|
30
|
-
Object.entries(suggesters).
|
|
30
|
+
Object.entries(suggesters).map( /*#__PURE__*/function () {
|
|
31
31
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
|
|
32
32
|
var _ref4, name, attrs, version, db;
|
|
33
33
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -18,7 +18,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
18
18
|
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; } }
|
|
19
19
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
20
|
function useStoreIndex(storeInfo, idbVersion) {
|
|
21
|
-
var _useState = (0, _react.useState)(
|
|
21
|
+
var _useState = (0, _react.useState)(),
|
|
22
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
23
23
|
db = _useState2[0],
|
|
24
24
|
setDb = _useState2[1];
|
|
@@ -12,7 +12,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
12
12
|
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); }
|
|
13
13
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
14
14
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
15
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } // @ts-ignore
|
|
16
|
+
// @ts-ignore
|
|
16
17
|
function append(_x, _x2, _x3) {
|
|
17
18
|
return _append.apply(this, arguments);
|
|
18
19
|
}
|
|
@@ -28,7 +29,7 @@ function _append() {
|
|
|
28
29
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29
30
|
while (1) switch (_context.prev = _context.next) {
|
|
30
31
|
case 0:
|
|
31
|
-
log = _args.length > 3 && _args[3] !== undefined ? _args[3] : function () {
|
|
32
|
+
log = _args.length > 3 && _args[3] !== undefined ? _args[3] : function (v) {
|
|
32
33
|
return null;
|
|
33
34
|
};
|
|
34
35
|
_context.prev = 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inseefr/lunatic",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3-beta",
|
|
4
4
|
"workersVersion": "0.2.5-experimental",
|
|
5
5
|
"description": "Library of questionnaire components",
|
|
6
6
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"scripts": {
|
|
31
31
|
"test": "vitest run",
|
|
32
32
|
"test:e2e": "playwright test",
|
|
33
|
-
"test:e2e:visual": "playwright test --headed",
|
|
33
|
+
"test:e2e:visual": "playwright test --headed --debug",
|
|
34
34
|
"test:e2e:codegen": "playwright codegen",
|
|
35
35
|
"test:storybook": "test-storybook --url http://localhost:9999 --maxWorkers=4 --no-cache",
|
|
36
36
|
"test-watch": "vitest",
|
|
@@ -71,6 +71,9 @@
|
|
|
71
71
|
"snowball": "^0.3.1",
|
|
72
72
|
"string-tokenizer": "^0.0.8"
|
|
73
73
|
},
|
|
74
|
+
"resolutions": {
|
|
75
|
+
"@storybook/react-docgen-typescript-plugin": "1.0.6--canary.9.cd77847.0"
|
|
76
|
+
},
|
|
74
77
|
"devDependencies": {
|
|
75
78
|
"@babel/cli": "^7.18.6",
|
|
76
79
|
"@babel/core": "^7.18.6",
|
|
@@ -105,6 +108,7 @@
|
|
|
105
108
|
"@types/object-hash": "^2.2.0",
|
|
106
109
|
"@types/react": "^18.0.26",
|
|
107
110
|
"@types/react-dom": "^18.0.9",
|
|
111
|
+
"@types/react-keyboard-event-handler": "^1.5.2",
|
|
108
112
|
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
|
109
113
|
"@typescript-eslint/parser": "^5.48.2",
|
|
110
114
|
"@vitejs/plugin-react": "^3.0.0",
|
|
@@ -141,7 +145,7 @@
|
|
|
141
145
|
"sass-loader": "^13.2.0",
|
|
142
146
|
"source-map-explorer": "^2.4.2",
|
|
143
147
|
"ts-loader": "^9.4.2",
|
|
144
|
-
"typescript": "^
|
|
148
|
+
"typescript": "^5.0.4",
|
|
145
149
|
"vite": "^4.0.0",
|
|
146
150
|
"vitest": "^0.27.2",
|
|
147
151
|
"wait-on": "^7.0.1",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _lodash = _interopRequireDefault(require("lodash.camelcase"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
-
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."); }
|
|
11
|
-
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); }
|
|
12
|
-
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; }
|
|
13
|
-
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; } }
|
|
14
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
function buildStyleObject(obj) {
|
|
16
|
-
return obj ? Object.entries(obj).reduce(function (_, _ref) {
|
|
17
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
18
|
-
key = _ref2[0],
|
|
19
|
-
value = _ref2[1];
|
|
20
|
-
if (key.startsWith(':')) _[key] = buildStyleObject(value);else _[(0, _lodash["default"])(key)] = value;
|
|
21
|
-
return _;
|
|
22
|
-
}, {}) : {};
|
|
23
|
-
}
|
|
24
|
-
var _default = buildStyleObject;
|
|
25
|
-
exports["default"] = _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "default", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _panel["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _panel = _interopRequireDefault(require("./panel"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "default", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _selection["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _selection = _interopRequireDefault(require("./selection"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
-
var ComboBoxContext = /*#__PURE__*/_react["default"].createContext({
|
|
10
|
-
dispatch: function dispatch(state) {
|
|
11
|
-
return state;
|
|
12
|
-
},
|
|
13
|
-
state: {}
|
|
14
|
-
});
|
|
15
|
-
var _default = ComboBoxContext;
|
|
16
|
-
exports["default"] = _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var INITIAL_STATE = {
|
|
8
|
-
focused: false,
|
|
9
|
-
expended: false,
|
|
10
|
-
selectedIndex: undefined,
|
|
11
|
-
search: ''
|
|
12
|
-
};
|
|
13
|
-
var _default = INITIAL_STATE;
|
|
14
|
-
exports["default"] = _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "default", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _reducer["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _reducer = _interopRequireDefault(require("./reducer"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-blur.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
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
|
-
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
|
-
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; }
|
|
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); }
|
|
13
|
-
function reduceOnBlur(state) {
|
|
14
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
15
|
-
expended: false,
|
|
16
|
-
focused: false
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
var _default = reduceOnBlur;
|
|
20
|
-
exports["default"] = _default;
|
package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-change.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
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
|
-
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
|
-
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; }
|
|
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); }
|
|
13
|
-
function reduceOnChange(state, action) {
|
|
14
|
-
var payload = action.payload;
|
|
15
|
-
var search = payload.search;
|
|
16
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
17
|
-
search: search,
|
|
18
|
-
selectedIndex: undefined
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
var _default = reduceOnChange;
|
|
22
|
-
exports["default"] = _default;
|
package/lib/components/commons/components/combo-box/state-management/reducer/reduce-on-delete.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
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
|
-
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
|
-
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; }
|
|
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); }
|
|
13
|
-
function reduceOnDelete(state) {
|
|
14
|
-
return _objectSpread(_objectSpread({}, state), {}, {
|
|
15
|
-
search: '',
|
|
16
|
-
selectedIndex: undefined,
|
|
17
|
-
expended: false
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
var _default = reduceOnDelete;
|
|
21
|
-
exports["default"] = _default;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "default", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _reduceOnKeydown["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _reduceOnKeydown = _interopRequireDefault(require("./reduce-on-keydown"));
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _keyboardKeyCodes = _interopRequireDefault(require("./keyboard-key-codes"));
|
|
8
|
-
var _onArrowDown = _interopRequireDefault(require("./on-arrow-down"));
|
|
9
|
-
var _onArrowUp = _interopRequireDefault(require("./on-arrow-up"));
|
|
10
|
-
var _onTab = _interopRequireDefault(require("./on-tab"));
|
|
11
|
-
var _onHome = _interopRequireDefault(require("./on-home"));
|
|
12
|
-
var _onEnd = _interopRequireDefault(require("./on-end"));
|
|
13
|
-
var _onEnter = _interopRequireDefault(require("./on-enter"));
|
|
14
|
-
var _onEscape = _interopRequireDefault(require("./on-escape"));
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
|
-
function reduceOnKeyDown(state, action) {
|
|
17
|
-
var payload = action.payload;
|
|
18
|
-
var key = payload.key,
|
|
19
|
-
nbOptions = payload.nbOptions;
|
|
20
|
-
switch (key) {
|
|
21
|
-
case _keyboardKeyCodes["default"].Tab:
|
|
22
|
-
return (0, _onTab["default"])(state, nbOptions);
|
|
23
|
-
case _keyboardKeyCodes["default"].ArrowDown:
|
|
24
|
-
return (0, _onArrowDown["default"])(state, nbOptions);
|
|
25
|
-
case _keyboardKeyCodes["default"].ArrowUp:
|
|
26
|
-
return (0, _onArrowUp["default"])(state, nbOptions);
|
|
27
|
-
case _keyboardKeyCodes["default"].Home:
|
|
28
|
-
return (0, _onHome["default"])(state, nbOptions);
|
|
29
|
-
case _keyboardKeyCodes["default"].End:
|
|
30
|
-
return (0, _onEnd["default"])(state, nbOptions);
|
|
31
|
-
case _keyboardKeyCodes["default"].Enter:
|
|
32
|
-
return (0, _onEnter["default"])(state, nbOptions);
|
|
33
|
-
case _keyboardKeyCodes["default"].Escape:
|
|
34
|
-
return (0, _onEscape["default"])(state, nbOptions);
|
|
35
|
-
default:
|
|
36
|
-
return state;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
var _default = reduceOnKeyDown;
|
|
40
|
-
exports["default"] = _default;
|