@inseefr/lunatic 3.4.5-rc.0 → 3.4.6-rc.0
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/esm/components/Accordion/Accordion.d.ts +7 -0
- package/esm/components/Accordion/Accordion.js +6 -0
- package/esm/components/Accordion/Accordion.js.map +1 -0
- package/esm/components/CheckboxBoolean/CheckboxBoolean.d.ts +10 -0
- package/esm/components/CheckboxBoolean/CheckboxBoolean.js +19 -0
- package/esm/components/CheckboxBoolean/CheckboxBoolean.js.map +1 -0
- package/esm/components/CheckboxBoolean/CheckboxBoolean.spec.d.ts +1 -0
- package/esm/components/CheckboxBoolean/CheckboxBoolean.spec.js +37 -0
- package/esm/components/CheckboxBoolean/CheckboxBoolean.spec.js.map +1 -0
- package/esm/components/CheckboxGroup/CheckboxGroup.d.ts +2 -0
- package/esm/components/CheckboxGroup/CheckboxGroup.js +7 -0
- package/esm/components/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.d.ts +7 -0
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.js +17 -0
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.js.map +1 -0
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.spec.d.ts +1 -0
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.spec.js +45 -0
- package/esm/components/CheckboxGroup/CustomCheckboxGroup.spec.js.map +1 -0
- package/esm/components/CheckboxOne/CheckboxOne.d.ts +5 -0
- package/esm/components/CheckboxOne/CheckboxOne.js +10 -0
- package/esm/components/CheckboxOne/CheckboxOne.js.map +1 -0
- package/esm/components/CheckboxOne/CheckboxOne.spec.d.ts +1 -0
- package/esm/components/CheckboxOne/CheckboxOne.spec.js +24 -0
- package/esm/components/CheckboxOne/CheckboxOne.spec.js.map +1 -0
- package/esm/components/Datepicker/Datepicker.d.ts +9 -0
- package/esm/components/Datepicker/Datepicker.js +66 -0
- package/esm/components/Datepicker/Datepicker.js.map +1 -0
- package/esm/components/Datepicker/Datepicker.spec.d.ts +1 -0
- package/esm/components/Datepicker/Datepicker.spec.js +75 -0
- package/esm/components/Datepicker/Datepicker.spec.js.map +1 -0
- package/esm/components/Datepicker/DatepickerField.d.ts +12 -0
- package/esm/components/Datepicker/DatepickerField.js +13 -0
- package/esm/components/Datepicker/DatepickerField.js.map +1 -0
- package/esm/components/Dropdown/Dropdown.d.ts +9 -0
- package/esm/components/Dropdown/Dropdown.js +15 -0
- package/esm/components/Dropdown/Dropdown.js.map +1 -0
- package/esm/components/Dropdown/Dropdown.spec.d.ts +1 -0
- package/esm/components/Dropdown/Dropdown.spec.js +38 -0
- package/esm/components/Dropdown/Dropdown.spec.js.map +1 -0
- package/esm/components/Dropdown/renderer/SimpleLabelRenderer.d.ts +8 -0
- package/esm/components/Dropdown/renderer/SimpleLabelRenderer.js +19 -0
- package/esm/components/Dropdown/renderer/SimpleLabelRenderer.js.map +1 -0
- package/esm/components/Dropdown/renderer/SimpleOptionRenderer.d.ts +7 -0
- package/esm/components/Dropdown/renderer/SimpleOptionRenderer.js +10 -0
- package/esm/components/Dropdown/renderer/SimpleOptionRenderer.js.map +1 -0
- package/esm/components/Duration/Duration.d.ts +9 -0
- package/esm/components/Duration/Duration.js +34 -0
- package/esm/components/Duration/Duration.js.map +1 -0
- package/esm/components/Duration/durationUtils.d.ts +47 -0
- package/esm/components/Duration/durationUtils.js +26 -0
- package/esm/components/Duration/durationUtils.js.map +1 -0
- package/esm/components/Duration/formatDuration.d.ts +2 -0
- package/esm/components/Duration/formatDuration.js +18 -0
- package/esm/components/Duration/formatDuration.js.map +1 -0
- package/esm/components/Duration/formatDuration.spec.d.ts +1 -0
- package/esm/components/Duration/formatDuration.spec.js +16 -0
- package/esm/components/Duration/formatDuration.spec.js.map +1 -0
- package/esm/components/Duration/getDurationFromValue.d.ts +8 -0
- package/esm/components/Duration/getDurationFromValue.js +36 -0
- package/esm/components/Duration/getDurationFromValue.js.map +1 -0
- package/esm/components/FilterDescription/FilterDescription.d.ts +7 -0
- package/esm/components/FilterDescription/FilterDescription.js +3 -0
- package/esm/components/FilterDescription/FilterDescription.js.map +1 -0
- package/esm/components/FilterDescription/FilterDescription.spec.d.ts +1 -0
- package/esm/components/FilterDescription/FilterDescription.spec.js +16 -0
- package/esm/components/FilterDescription/FilterDescription.spec.js.map +1 -0
- package/esm/components/Input/Input.d.ts +9 -0
- package/esm/components/Input/Input.js +15 -0
- package/esm/components/Input/Input.js.map +1 -0
- package/esm/components/Input/Input.spec.d.ts +1 -0
- package/esm/components/Input/Input.spec.js +52 -0
- package/esm/components/Input/Input.spec.js.map +1 -0
- package/esm/components/InputNumber/InputNumber.d.ts +9 -0
- package/esm/components/InputNumber/InputNumber.js +15 -0
- package/esm/components/InputNumber/InputNumber.js.map +1 -0
- package/esm/components/InputNumber/InputNumber.spec.d.ts +1 -0
- package/esm/components/InputNumber/InputNumber.spec.js +76 -0
- package/esm/components/InputNumber/InputNumber.spec.js.map +1 -0
- package/esm/components/InputNumber/InputNumberThousand.d.ts +14 -0
- package/esm/components/InputNumber/InputNumberThousand.js +20 -0
- package/esm/components/InputNumber/InputNumberThousand.js.map +1 -0
- package/esm/components/Loop/Loop.d.ts +15 -0
- package/esm/components/Loop/Loop.js +56 -0
- package/esm/components/Loop/Loop.js.map +1 -0
- package/esm/components/Loop/constant.d.ts +4 -0
- package/esm/components/Loop/constant.js +10 -0
- package/esm/components/Loop/constant.js.map +1 -0
- package/esm/components/LunaticComponents.d.ts +22 -0
- package/esm/components/LunaticComponents.js +83 -0
- package/esm/components/LunaticComponents.js.map +1 -0
- package/esm/components/PairwiseLinks/PairwiseLinks.d.ts +2 -0
- package/esm/components/PairwiseLinks/PairwiseLinks.js +42 -0
- package/esm/components/PairwiseLinks/PairwiseLinks.js.map +1 -0
- package/esm/components/Question/Question.d.ts +9 -0
- package/esm/components/Question/Question.js +16 -0
- package/esm/components/Question/Question.js.map +1 -0
- package/esm/components/Radio/Radio.d.ts +9 -0
- package/esm/components/Radio/Radio.js +10 -0
- package/esm/components/Radio/Radio.js.map +1 -0
- package/esm/components/RosterForLoop/RosterForLoop.d.ts +5 -0
- package/esm/components/RosterForLoop/RosterForLoop.js +63 -0
- package/esm/components/RosterForLoop/RosterForLoop.js.map +1 -0
- package/esm/components/RosterForLoop/RosterForLoop.spec.d.ts +1 -0
- package/esm/components/RosterForLoop/RosterForLoop.spec.js +28 -0
- package/esm/components/RosterForLoop/RosterForLoop.spec.js.map +1 -0
- package/esm/components/Roundabout/CustomRoundabout.d.ts +16 -0
- package/esm/components/Roundabout/CustomRoundabout.js +31 -0
- package/esm/components/Roundabout/CustomRoundabout.js.map +1 -0
- package/esm/components/Roundabout/Roundabout.d.ts +5 -0
- package/esm/components/Roundabout/Roundabout.js +28 -0
- package/esm/components/Roundabout/Roundabout.js.map +1 -0
- package/esm/components/Roundabout/roundabout.spec.d.ts +1 -0
- package/esm/components/Roundabout/roundabout.spec.js +47 -0
- package/esm/components/Roundabout/roundabout.spec.js.map +1 -0
- package/esm/components/Sequence/Sequence.d.ts +3 -0
- package/esm/components/Sequence/Sequence.js +9 -0
- package/esm/components/Sequence/Sequence.js.map +1 -0
- package/esm/components/Subsequence/Subsequence.d.ts +3 -0
- package/esm/components/Subsequence/Subsequence.js +9 -0
- package/esm/components/Subsequence/Subsequence.js.map +1 -0
- package/esm/components/Subsequence/Subsequence.spec.d.ts +1 -0
- package/esm/components/Subsequence/Subsequence.spec.js +43 -0
- package/esm/components/Subsequence/Subsequence.spec.js.map +1 -0
- package/esm/components/Suggester/CustomSuggester.d.ts +29 -0
- package/esm/components/Suggester/CustomSuggester.js +19 -0
- package/esm/components/Suggester/CustomSuggester.js.map +1 -0
- package/esm/components/Suggester/Suggester.d.ts +2 -0
- package/esm/components/Suggester/Suggester.js +104 -0
- package/esm/components/Suggester/Suggester.js.map +1 -0
- package/esm/components/Suggester/SuggesterNotification.d.ts +9 -0
- package/esm/components/Suggester/SuggesterNotification.js +15 -0
- package/esm/components/Suggester/SuggesterNotification.js.map +1 -0
- package/esm/components/Suggester/SuggesterType.d.ts +5 -0
- package/esm/components/Suggester/SuggesterType.js +2 -0
- package/esm/components/Suggester/SuggesterType.js.map +1 -0
- package/esm/components/Suggester/useSuggestions.d.ts +17 -0
- package/esm/components/Suggester/useSuggestions.js +85 -0
- package/esm/components/Suggester/useSuggestions.js.map +1 -0
- package/esm/components/Summary/Summary.d.ts +25 -0
- package/esm/components/Summary/Summary.js +65 -0
- package/esm/components/Summary/Summary.js.map +1 -0
- package/esm/components/Switch/Switch.d.ts +20 -0
- package/esm/components/Switch/Switch.js +30 -0
- package/esm/components/Switch/Switch.js.map +1 -0
- package/esm/components/Table/Table.d.ts +2 -0
- package/esm/components/Table/Table.js +9 -0
- package/esm/components/Table/Table.js.map +1 -0
- package/esm/components/Text/Text.d.ts +2 -0
- package/esm/components/Text/Text.js +4 -0
- package/esm/components/Text/Text.js.map +1 -0
- package/esm/components/Textarea/Textarea.d.ts +9 -0
- package/esm/components/Textarea/Textarea.js +14 -0
- package/esm/components/Textarea/Textarea.js.map +1 -0
- package/esm/components/Textarea/Textarea.spec.d.ts +1 -0
- package/esm/components/Textarea/Textarea.spec.js +31 -0
- package/esm/components/Textarea/Textarea.spec.js.map +1 -0
- package/esm/components/library.d.ts +73 -0
- package/esm/components/library.js +52 -0
- package/esm/components/library.js.map +1 -0
- package/esm/components/shared/Button/Button.d.ts +14 -0
- package/esm/components/shared/Button/Button.js +13 -0
- package/esm/components/shared/Button/Button.js.map +1 -0
- package/esm/components/shared/Button/Button.spec.d.ts +1 -0
- package/esm/components/shared/Button/Button.spec.js +51 -0
- package/esm/components/shared/Button/Button.spec.js.map +1 -0
- package/esm/components/shared/Button/IconButton.d.ts +6 -0
- package/esm/components/shared/Button/IconButton.js +7 -0
- package/esm/components/shared/Button/IconButton.js.map +1 -0
- package/esm/components/shared/Button/IconButton.spec.d.ts +1 -0
- package/esm/components/shared/Button/IconButton.spec.js +53 -0
- package/esm/components/shared/Button/IconButton.spec.js.map +1 -0
- package/esm/components/shared/Checkbox/CheckboxOption.d.ts +15 -0
- package/esm/components/shared/Checkbox/CheckboxOption.js +26 -0
- package/esm/components/shared/Checkbox/CheckboxOption.js.map +1 -0
- package/esm/components/shared/Checkbox/CheckboxOption.spec.d.ts +1 -0
- package/esm/components/shared/Checkbox/CheckboxOption.spec.js +52 -0
- package/esm/components/shared/Checkbox/CheckboxOption.spec.js.map +1 -0
- package/esm/components/shared/Checkbox/getShortcutKey.d.ts +1 -0
- package/esm/components/shared/Checkbox/getShortcutKey.js +3 -0
- package/esm/components/shared/Checkbox/getShortcutKey.js.map +1 -0
- package/esm/components/shared/Combobox/Combobox.d.ts +25 -0
- package/esm/components/shared/Combobox/Combobox.js +97 -0
- package/esm/components/shared/Combobox/Combobox.js.map +1 -0
- package/esm/components/shared/Combobox/Combobox.stories.d.ts +6 -0
- package/esm/components/shared/Combobox/Combobox.stories.js +47 -0
- package/esm/components/shared/Combobox/Combobox.stories.js.map +1 -0
- package/esm/components/shared/Combobox/ComboboxContainer.d.ts +11 -0
- package/esm/components/shared/Combobox/ComboboxContainer.js +6 -0
- package/esm/components/shared/Combobox/ComboboxContainer.js.map +1 -0
- package/esm/components/shared/Combobox/ComboboxContainer.spec.d.ts +1 -0
- package/esm/components/shared/Combobox/ComboboxContainer.spec.js +24 -0
- package/esm/components/shared/Combobox/ComboboxContainer.spec.js.map +1 -0
- package/esm/components/shared/Combobox/ComboboxContent.d.ts +10 -0
- package/esm/components/shared/Combobox/ComboboxContent.js +35 -0
- package/esm/components/shared/Combobox/ComboboxContent.js.map +1 -0
- package/esm/components/shared/Combobox/ComboboxContentBox.d.ts +7 -0
- package/esm/components/shared/Combobox/ComboboxContentBox.js +7 -0
- package/esm/components/shared/Combobox/ComboboxContentBox.js.map +1 -0
- package/esm/components/shared/Combobox/ComboboxType.d.ts +51 -0
- package/esm/components/shared/Combobox/ComboboxType.js +2 -0
- package/esm/components/shared/Combobox/ComboboxType.js.map +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOption.d.ts +7 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOption.js +15 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOption.js.map +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOption.spec.d.ts +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOption.spec.js +33 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOption.spec.js.map +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOptionContainer.d.ts +8 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOptionContainer.js +36 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOptionContainer.js.map +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOptionContainer.spec.d.ts +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOptionContainer.spec.js +18 -0
- package/esm/components/shared/Combobox/Panel/ComboboxOptionContainer.spec.js.map +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.d.ts +5 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.js +30 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.js.map +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.spec.d.ts +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.spec.js +57 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanel.spec.js.map +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanelContainer.d.ts +8 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanelContainer.js +8 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanelContainer.js.map +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanelContainer.spec.d.ts +1 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanelContainer.spec.js +31 -0
- package/esm/components/shared/Combobox/Panel/ComboboxPanelContainer.spec.js.map +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxClearButton.d.ts +8 -0
- package/esm/components/shared/Combobox/Selection/ComboboxClearButton.js +28 -0
- package/esm/components/shared/Combobox/Selection/ComboboxClearButton.js.map +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxClearButton.spec.d.ts +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxClearButton.spec.js +53 -0
- package/esm/components/shared/Combobox/Selection/ComboboxClearButton.spec.js.map +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxInput.d.ts +11 -0
- package/esm/components/shared/Combobox/Selection/ComboboxInput.js +21 -0
- package/esm/components/shared/Combobox/Selection/ComboboxInput.js.map +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxLabelSelection.d.ts +10 -0
- package/esm/components/shared/Combobox/Selection/ComboboxLabelSelection.js +31 -0
- package/esm/components/shared/Combobox/Selection/ComboboxLabelSelection.js.map +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxLabelSelection.spec.d.ts +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxLabelSelection.spec.js +27 -0
- package/esm/components/shared/Combobox/Selection/ComboboxLabelSelection.spec.js.map +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxSelection.d.ts +6 -0
- package/esm/components/shared/Combobox/Selection/ComboboxSelection.js +18 -0
- package/esm/components/shared/Combobox/Selection/ComboboxSelection.js.map +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxSelection.spec.d.ts +1 -0
- package/esm/components/shared/Combobox/Selection/ComboboxSelection.spec.js +36 -0
- package/esm/components/shared/Combobox/Selection/ComboboxSelection.spec.js.map +1 -0
- package/esm/components/shared/Combobox/constants.d.ts +9 -0
- package/esm/components/shared/Combobox/constants.js +10 -0
- package/esm/components/shared/Combobox/constants.js.map +1 -0
- package/esm/components/shared/Combobox/index.d.ts +0 -0
- package/esm/components/shared/Combobox/index.js +2 -0
- package/esm/components/shared/Combobox/index.js.map +1 -0
- package/esm/components/shared/ComponentErrors/ComponentErrors.d.ts +14 -0
- package/esm/components/shared/ComponentErrors/ComponentErrors.js +24 -0
- package/esm/components/shared/ComponentErrors/ComponentErrors.js.map +1 -0
- package/esm/components/shared/ComponentErrors/ComponentErrors.spec.d.ts +1 -0
- package/esm/components/shared/ComponentErrors/ComponentErrors.spec.js +40 -0
- package/esm/components/shared/ComponentErrors/ComponentErrors.spec.js.map +1 -0
- package/esm/components/shared/ComponentWrapper.d.ts +25 -0
- package/esm/components/shared/ComponentWrapper.js +28 -0
- package/esm/components/shared/ComponentWrapper.js.map +1 -0
- package/esm/components/shared/Declarations/Declarations.d.ts +16 -0
- package/esm/components/shared/Declarations/Declarations.js +14 -0
- package/esm/components/shared/Declarations/Declarations.js.map +1 -0
- package/esm/components/shared/Declarations/Declarations.spec.d.ts +1 -0
- package/esm/components/shared/Declarations/Declarations.spec.js +66 -0
- package/esm/components/shared/Declarations/Declarations.spec.js.map +1 -0
- package/esm/components/shared/Fieldset/Fieldset.d.ts +9 -0
- package/esm/components/shared/Fieldset/Fieldset.js +28 -0
- package/esm/components/shared/Fieldset/Fieldset.js.map +1 -0
- package/esm/components/shared/Fieldset/Fieldset.spec.d.ts +1 -0
- package/esm/components/shared/Fieldset/Fieldset.spec.js +25 -0
- package/esm/components/shared/Fieldset/Fieldset.spec.js.map +1 -0
- package/esm/components/shared/HOC/slottableComponent.d.ts +101 -0
- package/esm/components/shared/HOC/slottableComponent.js +31 -0
- package/esm/components/shared/HOC/slottableComponent.js.map +1 -0
- package/esm/components/shared/Icons/checkbox-checked-icon.d.ts +2 -0
- package/esm/components/shared/Icons/checkbox-checked-icon.js +6 -0
- package/esm/components/shared/Icons/checkbox-checked-icon.js.map +1 -0
- package/esm/components/shared/Icons/checkbox-disabled-icon.d.ts +2 -0
- package/esm/components/shared/Icons/checkbox-disabled-icon.js +6 -0
- package/esm/components/shared/Icons/checkbox-disabled-icon.js.map +1 -0
- package/esm/components/shared/Icons/checkbox-unchecked-icon.d.ts +2 -0
- package/esm/components/shared/Icons/checkbox-unchecked-icon.js +6 -0
- package/esm/components/shared/Icons/checkbox-unchecked-icon.js.map +1 -0
- package/esm/components/shared/Icons/closed-icon.d.ts +2 -0
- package/esm/components/shared/Icons/closed-icon.js +6 -0
- package/esm/components/shared/Icons/closed-icon.js.map +1 -0
- package/esm/components/shared/Icons/cross-icon.d.ts +2 -0
- package/esm/components/shared/Icons/cross-icon.js +6 -0
- package/esm/components/shared/Icons/cross-icon.js.map +1 -0
- package/esm/components/shared/Icons/icon-props.d.ts +5 -0
- package/esm/components/shared/Icons/icon-props.js +2 -0
- package/esm/components/shared/Icons/icon-props.js.map +1 -0
- package/esm/components/shared/Icons/index.d.ts +10 -0
- package/esm/components/shared/Icons/index.js +11 -0
- package/esm/components/shared/Icons/index.js.map +1 -0
- package/esm/components/shared/Icons/load-icon.d.ts +2 -0
- package/esm/components/shared/Icons/load-icon.js +6 -0
- package/esm/components/shared/Icons/load-icon.js.map +1 -0
- package/esm/components/shared/Icons/lunatic-icon.d.ts +4 -0
- package/esm/components/shared/Icons/lunatic-icon.js +6 -0
- package/esm/components/shared/Icons/lunatic-icon.js.map +1 -0
- package/esm/components/shared/Icons/network-icon.d.ts +2 -0
- package/esm/components/shared/Icons/network-icon.js +6 -0
- package/esm/components/shared/Icons/network-icon.js.map +1 -0
- package/esm/components/shared/Icons/on-drag-icon.d.ts +2 -0
- package/esm/components/shared/Icons/on-drag-icon.js +6 -0
- package/esm/components/shared/Icons/on-drag-icon.js.map +1 -0
- package/esm/components/shared/Icons/opened-icon.d.ts +2 -0
- package/esm/components/shared/Icons/opened-icon.js +6 -0
- package/esm/components/shared/Icons/opened-icon.js.map +1 -0
- package/esm/components/shared/Icons/radio-checked-icon.d.ts +3 -0
- package/esm/components/shared/Icons/radio-checked-icon.js +7 -0
- package/esm/components/shared/Icons/radio-checked-icon.js.map +1 -0
- package/esm/components/shared/Icons/radio-unchecked-icon.d.ts +2 -0
- package/esm/components/shared/Icons/radio-unchecked-icon.js +6 -0
- package/esm/components/shared/Icons/radio-unchecked-icon.js.map +1 -0
- package/esm/components/shared/Label/Label.d.ts +10 -0
- package/esm/components/shared/Label/Label.js +15 -0
- package/esm/components/shared/Label/Label.js.map +1 -0
- package/esm/components/shared/Label/Label.spec.d.ts +1 -0
- package/esm/components/shared/Label/Label.spec.js +19 -0
- package/esm/components/shared/Label/Label.spec.js.map +1 -0
- package/esm/components/shared/LabelDescription.d.ts +7 -0
- package/esm/components/shared/LabelDescription.js +11 -0
- package/esm/components/shared/LabelDescription.js.map +1 -0
- package/esm/components/shared/MDLabel/MDLabel.d.ts +5 -0
- package/esm/components/shared/MDLabel/MDLabel.js +20 -0
- package/esm/components/shared/MDLabel/MDLabel.js.map +1 -0
- package/esm/components/shared/MDLabel/MDLabel.spec.d.ts +1 -0
- package/esm/components/shared/MDLabel/MDLabel.spec.js +107 -0
- package/esm/components/shared/MDLabel/MDLabel.spec.js.map +1 -0
- package/esm/components/shared/MDLabel/MarkdownLink.d.ts +7 -0
- package/esm/components/shared/MDLabel/MarkdownLink.js +14 -0
- package/esm/components/shared/MDLabel/MarkdownLink.js.map +1 -0
- package/esm/components/shared/MDLabel/RouterLink.d.ts +6 -0
- package/esm/components/shared/MDLabel/RouterLink.js +7 -0
- package/esm/components/shared/MDLabel/RouterLink.js.map +1 -0
- package/esm/components/shared/Missing/Missing.d.ts +14 -0
- package/esm/components/shared/Missing/Missing.js +52 -0
- package/esm/components/shared/Missing/Missing.js.map +1 -0
- package/esm/components/shared/Missing/Missing.spec.d.ts +1 -0
- package/esm/components/shared/Missing/Missing.spec.js +45 -0
- package/esm/components/shared/Missing/Missing.spec.js.map +1 -0
- package/esm/components/shared/ModalControls/ModalControls.d.ts +10 -0
- package/esm/components/shared/ModalControls/ModalControls.js +29 -0
- package/esm/components/shared/ModalControls/ModalControls.js.map +1 -0
- package/esm/components/shared/ModalControls/ModalControls.spec.d.ts +1 -0
- package/esm/components/shared/ModalControls/ModalControls.spec.js +61 -0
- package/esm/components/shared/ModalControls/ModalControls.spec.js.map +1 -0
- package/esm/components/shared/Notification.d.ts +8 -0
- package/esm/components/shared/Notification.js +8 -0
- package/esm/components/shared/Notification.js.map +1 -0
- package/esm/components/shared/Radio/RadioGroup.d.ts +7 -0
- package/esm/components/shared/Radio/RadioGroup.js +23 -0
- package/esm/components/shared/Radio/RadioGroup.js.map +1 -0
- package/esm/components/shared/Radio/RadioOption.d.ts +17 -0
- package/esm/components/shared/Radio/RadioOption.js +38 -0
- package/esm/components/shared/Radio/RadioOption.js.map +1 -0
- package/esm/components/shared/Radio/RadioOption.spec.d.ts +1 -0
- package/esm/components/shared/Radio/RadioOption.spec.js +46 -0
- package/esm/components/shared/Radio/RadioOption.spec.js.map +1 -0
- package/esm/components/shared/Table/Table.d.ts +8 -0
- package/esm/components/shared/Table/Table.js +13 -0
- package/esm/components/shared/Table/Table.js.map +1 -0
- package/esm/components/shared/Table/Table.spec.d.ts +1 -0
- package/esm/components/shared/Table/Table.spec.js +15 -0
- package/esm/components/shared/Table/Table.spec.js.map +1 -0
- package/esm/components/shared/Table/TableHeader.d.ts +2 -0
- package/esm/components/shared/Table/TableHeader.js +14 -0
- package/esm/components/shared/Table/TableHeader.js.map +1 -0
- package/esm/components/shared/Table/Tbody.d.ts +6 -0
- package/esm/components/shared/Table/Tbody.js +8 -0
- package/esm/components/shared/Table/Tbody.js.map +1 -0
- package/esm/components/shared/Table/Tbody.spec.d.ts +1 -0
- package/esm/components/shared/Table/Tbody.spec.js +22 -0
- package/esm/components/shared/Table/Tbody.spec.js.map +1 -0
- package/esm/components/shared/Table/Td.d.ts +11 -0
- package/esm/components/shared/Table/Td.js +8 -0
- package/esm/components/shared/Table/Td.js.map +1 -0
- package/esm/components/shared/Table/Td.spec.d.ts +1 -0
- package/esm/components/shared/Table/Td.spec.js +21 -0
- package/esm/components/shared/Table/Td.spec.js.map +1 -0
- package/esm/components/shared/Table/Th.d.ts +10 -0
- package/esm/components/shared/Table/Th.js +8 -0
- package/esm/components/shared/Table/Th.js.map +1 -0
- package/esm/components/shared/Table/Th.spec.d.ts +1 -0
- package/esm/components/shared/Table/Th.spec.js +25 -0
- package/esm/components/shared/Table/Th.spec.js.map +1 -0
- package/esm/components/shared/Table/Thead.d.ts +6 -0
- package/esm/components/shared/Table/Thead.js +8 -0
- package/esm/components/shared/Table/Thead.js.map +1 -0
- package/esm/components/shared/Table/Thead.spec.d.ts +1 -0
- package/esm/components/shared/Table/Thead.spec.js +12 -0
- package/esm/components/shared/Table/Thead.spec.js.map +1 -0
- package/esm/components/shared/Table/Tr.d.ts +7 -0
- package/esm/components/shared/Table/Tr.js +8 -0
- package/esm/components/shared/Table/Tr.js.map +1 -0
- package/esm/components/shared/Table/Tr.spec.d.ts +1 -0
- package/esm/components/shared/Table/Tr.spec.js +19 -0
- package/esm/components/shared/Table/Tr.spec.js.map +1 -0
- package/esm/components/shared/Table/index.d.ts +7 -0
- package/esm/components/shared/Table/index.js +8 -0
- package/esm/components/shared/Table/index.js.map +1 -0
- package/esm/components/type.d.ts +305 -0
- package/esm/components/type.js +2 -0
- package/esm/components/type.js.map +1 -0
- package/esm/constants/component-types.d.ts +1 -0
- package/esm/constants/component-types.js +2 -0
- package/esm/constants/component-types.js.map +1 -0
- package/esm/constants/declarations.d.ts +9 -0
- package/esm/constants/declarations.js +12 -0
- package/esm/constants/declarations.js.map +1 -0
- package/esm/constants/event-types.d.ts +10 -0
- package/esm/constants/event-types.js +13 -0
- package/esm/constants/event-types.js.map +1 -0
- package/esm/constants/index.d.ts +5 -0
- package/esm/constants/index.js +6 -0
- package/esm/constants/index.js.map +1 -0
- package/esm/constants/indexedDBStore.d.ts +21 -0
- package/esm/constants/indexedDBStore.js +19 -0
- package/esm/constants/indexedDBStore.js.map +1 -0
- package/esm/constants/supported-preferences.d.ts +1 -0
- package/esm/constants/supported-preferences.js +10 -0
- package/esm/constants/supported-preferences.js.map +1 -0
- package/esm/constants/value-types.d.ts +5 -0
- package/esm/constants/value-types.js +6 -0
- package/esm/constants/value-types.js.map +1 -0
- package/esm/constants/variable-types.d.ts +2 -0
- package/esm/constants/variable-types.js +5 -0
- package/esm/constants/variable-types.js.map +1 -0
- package/esm/hooks/use-auto-focus.d.ts +6 -0
- package/esm/hooks/use-auto-focus.js +19 -0
- package/esm/hooks/use-auto-focus.js.map +1 -0
- package/esm/hooks/use-track-changes.d.ts +11 -0
- package/esm/hooks/use-track-changes.js +41 -0
- package/esm/hooks/use-track-changes.js.map +1 -0
- package/esm/hooks/use-why-render.d.ts +4 -0
- package/esm/hooks/use-why-render.js +14 -0
- package/esm/hooks/use-why-render.js.map +1 -0
- package/esm/hooks/useDebounce.d.ts +4 -0
- package/esm/hooks/useDebounce.js +24 -0
- package/esm/hooks/useDebounce.js.map +1 -0
- package/esm/hooks/useDocumentEvent.d.ts +2 -0
- package/esm/hooks/useDocumentEvent.js +18 -0
- package/esm/hooks/useDocumentEvent.js.map +1 -0
- package/esm/hooks/useKeyboardKey.d.ts +4 -0
- package/esm/hooks/useKeyboardKey.js +25 -0
- package/esm/hooks/useKeyboardKey.js.map +1 -0
- package/esm/hooks/useListKeyboardHandler.d.ts +11 -0
- package/esm/hooks/useListKeyboardHandler.js +28 -0
- package/esm/hooks/useListKeyboardHandler.js.map +1 -0
- package/esm/hooks/useRefSync.d.ts +4 -0
- package/esm/hooks/useRefSync.js +10 -0
- package/esm/hooks/useRefSync.js.map +1 -0
- package/esm/i18n/build-dictionary.d.ts +24 -0
- package/esm/i18n/build-dictionary.js +37 -0
- package/esm/i18n/build-dictionary.js.map +1 -0
- package/esm/i18n/dictionary.d.ts +57 -0
- package/esm/i18n/dictionary.js +27 -0
- package/esm/i18n/dictionary.js.map +1 -0
- package/esm/i18n/index.d.ts +7 -0
- package/esm/i18n/index.js +13 -0
- package/esm/i18n/index.js.map +1 -0
- package/esm/i18n/inputNumberProps.d.ts +13 -0
- package/esm/i18n/inputNumberProps.js +7 -0
- package/esm/i18n/inputNumberProps.js.map +1 -0
- package/esm/index.d.ts +14 -0
- package/esm/index.js +12 -0
- package/esm/index.js.map +1 -0
- package/esm/tests/setup.d.ts +1 -0
- package/esm/tests/setup.js +18 -0
- package/esm/tests/setup.js.map +1 -0
- package/esm/tests/utils/lunatic.d.ts +19 -0
- package/esm/tests/utils/lunatic.js +31 -0
- package/esm/tests/utils/lunatic.js.map +1 -0
- package/esm/tests/utils/timer.d.ts +1 -0
- package/esm/tests/utils/timer.js +4 -0
- package/esm/tests/utils/timer.js.map +1 -0
- package/esm/tsconfig-esm.tsbuildinfo +1 -0
- package/esm/type.source.d.ts +408 -0
- package/esm/type.source.js +7 -0
- package/esm/type.source.js.map +1 -0
- package/esm/type.utils.d.ts +5 -0
- package/esm/type.utils.js +2 -0
- package/esm/type.utils.js.map +1 -0
- package/esm/use-lunatic/actions.d.ts +50 -0
- package/esm/use-lunatic/actions.js +26 -0
- package/esm/use-lunatic/actions.js.map +1 -0
- package/esm/use-lunatic/commons/check-loops.d.ts +30 -0
- package/esm/use-lunatic/commons/check-loops.js +63 -0
- package/esm/use-lunatic/commons/check-loops.js.map +1 -0
- package/esm/use-lunatic/commons/check-pager.d.ts +5 -0
- package/esm/use-lunatic/commons/check-pager.js +17 -0
- package/esm/use-lunatic/commons/check-pager.js.map +1 -0
- package/esm/use-lunatic/commons/compile-controls.d.ts +9 -0
- package/esm/use-lunatic/commons/compile-controls.js +156 -0
- package/esm/use-lunatic/commons/compile-controls.js.map +1 -0
- package/esm/use-lunatic/commons/component.d.ts +22 -0
- package/esm/use-lunatic/commons/component.js +22 -0
- package/esm/use-lunatic/commons/component.js.map +1 -0
- package/esm/use-lunatic/commons/create-map-pages.d.ts +6 -0
- package/esm/use-lunatic/commons/create-map-pages.js +58 -0
- package/esm/use-lunatic/commons/create-map-pages.js.map +1 -0
- package/esm/use-lunatic/commons/execute-condition-filter.d.ts +3 -0
- package/esm/use-lunatic/commons/execute-condition-filter.js +11 -0
- package/esm/use-lunatic/commons/execute-condition-filter.js.map +1 -0
- package/esm/use-lunatic/commons/fill-components/fill-component-expressions.d.ts +34 -0
- package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js +149 -0
- package/esm/use-lunatic/commons/fill-components/fill-component-expressions.js.map +1 -0
- package/esm/use-lunatic/commons/fill-components/fill-component-expressions.spec.d.ts +1 -0
- package/esm/use-lunatic/commons/fill-components/fill-component-expressions.spec.js +83 -0
- package/esm/use-lunatic/commons/fill-components/fill-component-expressions.spec.js.map +1 -0
- package/esm/use-lunatic/commons/fill-components/fill-components.d.ts +25 -0
- package/esm/use-lunatic/commons/fill-components/fill-components.js +41 -0
- package/esm/use-lunatic/commons/fill-components/fill-components.js.map +1 -0
- package/esm/use-lunatic/commons/get-compatible-vtl-expression.d.ts +7 -0
- package/esm/use-lunatic/commons/get-compatible-vtl-expression.js +19 -0
- package/esm/use-lunatic/commons/get-compatible-vtl-expression.js.map +1 -0
- package/esm/use-lunatic/commons/get-components-from-state.d.ts +5 -0
- package/esm/use-lunatic/commons/get-components-from-state.js +22 -0
- package/esm/use-lunatic/commons/get-components-from-state.js.map +1 -0
- package/esm/use-lunatic/commons/index.d.ts +6 -0
- package/esm/use-lunatic/commons/index.js +7 -0
- package/esm/use-lunatic/commons/index.js.map +1 -0
- package/esm/use-lunatic/commons/is-First-last-page.d.ts +6 -0
- package/esm/use-lunatic/commons/is-First-last-page.js +8 -0
- package/esm/use-lunatic/commons/is-First-last-page.js.map +1 -0
- package/esm/use-lunatic/commons/is-paginated-loop.d.ts +6 -0
- package/esm/use-lunatic/commons/is-paginated-loop.js +5 -0
- package/esm/use-lunatic/commons/is-paginated-loop.js.map +1 -0
- package/esm/use-lunatic/commons/is-roundabout.d.ts +2 -0
- package/esm/use-lunatic/commons/is-roundabout.js +5 -0
- package/esm/use-lunatic/commons/is-roundabout.js.map +1 -0
- package/esm/use-lunatic/commons/page-navigation.d.ts +7 -0
- package/esm/use-lunatic/commons/page-navigation.js +95 -0
- package/esm/use-lunatic/commons/page-navigation.js.map +1 -0
- package/esm/use-lunatic/commons/page-navigation.spec.d.ts +1 -0
- package/esm/use-lunatic/commons/page-navigation.spec.js +136 -0
- package/esm/use-lunatic/commons/page-navigation.spec.js.map +1 -0
- package/esm/use-lunatic/commons/page-tag.d.ts +23 -0
- package/esm/use-lunatic/commons/page-tag.js +56 -0
- package/esm/use-lunatic/commons/page-tag.js.map +1 -0
- package/esm/use-lunatic/commons/page-tag.spec.d.ts +1 -0
- package/esm/use-lunatic/commons/page-tag.spec.js +38 -0
- package/esm/use-lunatic/commons/page-tag.spec.js.map +1 -0
- package/esm/use-lunatic/commons/page.d.ts +11 -0
- package/esm/use-lunatic/commons/page.js +35 -0
- package/esm/use-lunatic/commons/page.js.map +1 -0
- package/esm/use-lunatic/commons/variables/behaviours/cleaning-behaviour.d.ts +7 -0
- package/esm/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js +55 -0
- package/esm/use-lunatic/commons/variables/behaviours/cleaning-behaviour.js.map +1 -0
- package/esm/use-lunatic/commons/variables/behaviours/missing-behaviour.d.ts +7 -0
- package/esm/use-lunatic/commons/variables/behaviours/missing-behaviour.js +26 -0
- package/esm/use-lunatic/commons/variables/behaviours/missing-behaviour.js.map +1 -0
- package/esm/use-lunatic/commons/variables/behaviours/resizing-behaviour.d.ts +7 -0
- package/esm/use-lunatic/commons/variables/behaviours/resizing-behaviour.js +62 -0
- package/esm/use-lunatic/commons/variables/behaviours/resizing-behaviour.js.map +1 -0
- package/esm/use-lunatic/commons/variables/errors.d.ts +19 -0
- package/esm/use-lunatic/commons/variables/errors.js +28 -0
- package/esm/use-lunatic/commons/variables/errors.js.map +1 -0
- package/esm/use-lunatic/commons/variables/get-questionnaire-data.d.ts +3 -0
- package/esm/use-lunatic/commons/variables/get-questionnaire-data.js +53 -0
- package/esm/use-lunatic/commons/variables/get-questionnaire-data.js.map +1 -0
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.d.ts +90 -0
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.js +349 -0
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.js.map +1 -0
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.spec.d.ts +1 -0
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.spec.js +438 -0
- package/esm/use-lunatic/commons/variables/lunatic-variables-store.spec.js.map +1 -0
- package/esm/use-lunatic/hooks/use-loop-variables.d.ts +5 -0
- package/esm/use-lunatic/hooks/use-loop-variables.js +18 -0
- package/esm/use-lunatic/hooks/use-loop-variables.js.map +1 -0
- package/esm/use-lunatic/hooks/use-page-has-response.d.ts +6 -0
- package/esm/use-lunatic/hooks/use-page-has-response.js +89 -0
- package/esm/use-lunatic/hooks/use-page-has-response.js.map +1 -0
- package/esm/use-lunatic/hooks/useOverview.d.ts +16 -0
- package/esm/use-lunatic/hooks/useOverview.js +92 -0
- package/esm/use-lunatic/hooks/useOverview.js.map +1 -0
- package/esm/use-lunatic/hooks/useWarnDepChange.d.ts +6 -0
- package/esm/use-lunatic/hooks/useWarnDepChange.js +17 -0
- package/esm/use-lunatic/hooks/useWarnDepChange.js.map +1 -0
- package/esm/use-lunatic/logger/ConsoleLogger.d.ts +5 -0
- package/esm/use-lunatic/logger/ConsoleLogger.js +12 -0
- package/esm/use-lunatic/logger/ConsoleLogger.js.map +1 -0
- package/esm/use-lunatic/logger/type.d.ts +9 -0
- package/esm/use-lunatic/logger/type.js +2 -0
- package/esm/use-lunatic/logger/type.js.map +1 -0
- package/esm/use-lunatic/lunatic-context.d.ts +28 -0
- package/esm/use-lunatic/lunatic-context.js +44 -0
- package/esm/use-lunatic/lunatic-context.js.map +1 -0
- package/esm/use-lunatic/props/getComponentTypeProps.d.ts +291 -0
- package/esm/use-lunatic/props/getComponentTypeProps.js +165 -0
- package/esm/use-lunatic/props/getComponentTypeProps.js.map +1 -0
- package/esm/use-lunatic/props/propIterations.d.ts +7 -0
- package/esm/use-lunatic/props/propIterations.js +26 -0
- package/esm/use-lunatic/props/propIterations.js.map +1 -0
- package/esm/use-lunatic/props/propMissingResponse.d.ts +9 -0
- package/esm/use-lunatic/props/propMissingResponse.js +13 -0
- package/esm/use-lunatic/props/propMissingResponse.js.map +1 -0
- package/esm/use-lunatic/props/propOptions.d.ts +37 -0
- package/esm/use-lunatic/props/propOptions.js +75 -0
- package/esm/use-lunatic/props/propOptions.js.map +1 -0
- package/esm/use-lunatic/props/propOptions.spec.d.ts +1 -0
- package/esm/use-lunatic/props/propOptions.spec.js +57 -0
- package/esm/use-lunatic/props/propOptions.spec.js.map +1 -0
- package/esm/use-lunatic/props/propValue.d.ts +6 -0
- package/esm/use-lunatic/props/propValue.js +29 -0
- package/esm/use-lunatic/props/propValue.js.map +1 -0
- package/esm/use-lunatic/props/propValue.spec.d.ts +1 -0
- package/esm/use-lunatic/props/propValue.spec.js +54 -0
- package/esm/use-lunatic/props/propValue.spec.js.map +1 -0
- package/esm/use-lunatic/reducer/commons/auto-explore-loop.d.ts +5 -0
- package/esm/use-lunatic/reducer/commons/auto-explore-loop.js +52 -0
- package/esm/use-lunatic/reducer/commons/auto-explore-loop.js.map +1 -0
- package/esm/use-lunatic/reducer/commons/index.d.ts +2 -0
- package/esm/use-lunatic/reducer/commons/index.js +3 -0
- package/esm/use-lunatic/reducer/commons/index.js.map +1 -0
- package/esm/use-lunatic/reducer/commons/resize-array-variable.d.ts +5 -0
- package/esm/use-lunatic/reducer/commons/resize-array-variable.js +21 -0
- package/esm/use-lunatic/reducer/commons/resize-array-variable.js.map +1 -0
- package/esm/use-lunatic/reducer/commons/validate-condition-filter.d.ts +6 -0
- package/esm/use-lunatic/reducer/commons/validate-condition-filter.js +12 -0
- package/esm/use-lunatic/reducer/commons/validate-condition-filter.js.map +1 -0
- package/esm/use-lunatic/reducer/controls/check-base-control.d.ts +2 -0
- package/esm/use-lunatic/reducer/controls/check-base-control.js +35 -0
- package/esm/use-lunatic/reducer/controls/check-base-control.js.map +1 -0
- package/esm/use-lunatic/reducer/controls/check-roundabout-control.d.ts +9 -0
- package/esm/use-lunatic/reducer/controls/check-roundabout-control.js +22 -0
- package/esm/use-lunatic/reducer/controls/check-roundabout-control.js.map +1 -0
- package/esm/use-lunatic/reducer/overview/overviewOnInit.d.ts +6 -0
- package/esm/use-lunatic/reducer/overview/overviewOnInit.js +50 -0
- package/esm/use-lunatic/reducer/overview/overviewOnInit.js.map +1 -0
- package/esm/use-lunatic/reducer/reduce-go-next-page.d.ts +2 -0
- package/esm/use-lunatic/reducer/reduce-go-next-page.js +62 -0
- package/esm/use-lunatic/reducer/reduce-go-next-page.js.map +1 -0
- package/esm/use-lunatic/reducer/reduce-go-previous-page.d.ts +2 -0
- package/esm/use-lunatic/reducer/reduce-go-previous-page.js +31 -0
- package/esm/use-lunatic/reducer/reduce-go-previous-page.js.map +1 -0
- package/esm/use-lunatic/reducer/reduce-go-to-page.d.ts +3 -0
- package/esm/use-lunatic/reducer/reduce-go-to-page.js +55 -0
- package/esm/use-lunatic/reducer/reduce-go-to-page.js.map +1 -0
- package/esm/use-lunatic/reducer/reduce-handle-changes.d.ts +6 -0
- package/esm/use-lunatic/reducer/reduce-handle-changes.js +26 -0
- package/esm/use-lunatic/reducer/reduce-handle-changes.js.map +1 -0
- package/esm/use-lunatic/reducer/reducer.d.ts +3 -0
- package/esm/use-lunatic/reducer/reducer.js +20 -0
- package/esm/use-lunatic/reducer/reducer.js.map +1 -0
- package/esm/use-lunatic/reducer/reducerInitializer.d.ts +14 -0
- package/esm/use-lunatic/reducer/reducerInitializer.js +130 -0
- package/esm/use-lunatic/reducer/reducerInitializer.js.map +1 -0
- package/esm/use-lunatic/replace-component-sequence.d.ts +36 -0
- package/esm/use-lunatic/replace-component-sequence.js +19 -0
- package/esm/use-lunatic/replace-component-sequence.js.map +1 -0
- package/esm/use-lunatic/type.d.ts +166 -0
- package/esm/use-lunatic/type.js +2 -0
- package/esm/use-lunatic/type.js.map +1 -0
- package/esm/use-lunatic/use-lunatic.d.ts +37 -0
- package/esm/use-lunatic/use-lunatic.js +140 -0
- package/esm/use-lunatic/use-lunatic.js.map +1 -0
- package/esm/utils/array.d.ts +32 -0
- package/esm/utils/array.js +107 -0
- package/esm/utils/array.js.map +1 -0
- package/esm/utils/array.spec.d.ts +1 -0
- package/esm/utils/array.spec.js +42 -0
- package/esm/utils/array.spec.js.map +1 -0
- package/esm/utils/constants/alphabet.d.ts +1 -0
- package/esm/utils/constants/alphabet.js +2 -0
- package/esm/utils/constants/alphabet.js.map +1 -0
- package/esm/utils/constants/features.d.ts +4 -0
- package/esm/utils/constants/features.js +5 -0
- package/esm/utils/constants/features.js.map +1 -0
- package/esm/utils/constants/index.d.ts +5 -0
- package/esm/utils/constants/index.js +6 -0
- package/esm/utils/constants/index.js.map +1 -0
- package/esm/utils/constants/links.d.ts +2 -0
- package/esm/utils/constants/links.js +3 -0
- package/esm/utils/constants/links.js.map +1 -0
- package/esm/utils/constants/missing.d.ts +2 -0
- package/esm/utils/constants/missing.js +3 -0
- package/esm/utils/constants/missing.js.map +1 -0
- package/esm/utils/constants/variable-status.d.ts +5 -0
- package/esm/utils/constants/variable-status.js +6 -0
- package/esm/utils/constants/variable-status.js.map +1 -0
- package/esm/utils/constants/variable-types.d.ts +1 -0
- package/esm/utils/constants/variable-types.js +2 -0
- package/esm/utils/constants/variable-types.js.map +1 -0
- package/esm/utils/dom.d.ts +14 -0
- package/esm/utils/dom.js +23 -0
- package/esm/utils/dom.js.map +1 -0
- package/esm/utils/env.d.ts +1 -0
- package/esm/utils/env.js +13 -0
- package/esm/utils/env.js.map +1 -0
- package/esm/utils/function.d.ts +5 -0
- package/esm/utils/function.js +23 -0
- package/esm/utils/function.js.map +1 -0
- package/esm/utils/is-element.d.ts +3 -0
- package/esm/utils/is-element.js +6 -0
- package/esm/utils/is-element.js.map +1 -0
- package/esm/utils/is-object.d.ts +4 -0
- package/esm/utils/is-object.js +7 -0
- package/esm/utils/is-object.js.map +1 -0
- package/esm/utils/logger.d.ts +6 -0
- package/esm/utils/logger.js +15 -0
- package/esm/utils/logger.js.map +1 -0
- package/esm/utils/number.d.ts +9 -0
- package/esm/utils/number.js +32 -0
- package/esm/utils/number.js.map +1 -0
- package/esm/utils/number.spec.d.ts +1 -0
- package/esm/utils/number.spec.js +10 -0
- package/esm/utils/number.spec.js.map +1 -0
- package/esm/utils/object.d.ts +6 -0
- package/esm/utils/object.js +27 -0
- package/esm/utils/object.js.map +1 -0
- package/esm/utils/search/SearchInterface.d.ts +12 -0
- package/esm/utils/search/SearchInterface.js +2 -0
- package/esm/utils/search/SearchInterface.js.map +1 -0
- package/esm/utils/search/SearchMinisearch.d.ts +11 -0
- package/esm/utils/search/SearchMinisearch.js +39 -0
- package/esm/utils/search/SearchMinisearch.js.map +1 -0
- package/esm/utils/search/SuggestersDatabase.d.ts +15 -0
- package/esm/utils/search/SuggestersDatabase.js +38 -0
- package/esm/utils/search/SuggestersDatabase.js.map +1 -0
- package/esm/utils/search/melauto.d.ts +15 -0
- package/esm/utils/search/melauto.js +44 -0
- package/esm/utils/search/melauto.js.map +1 -0
- package/esm/utils/search/tokenizer.d.ts +14 -0
- package/esm/utils/search/tokenizer.js +57 -0
- package/esm/utils/search/tokenizer.js.map +1 -0
- package/esm/utils/to-number.d.ts +4 -0
- package/esm/utils/to-number.js +13 -0
- package/esm/utils/to-number.js.map +1 -0
- package/esm/utils/variables.d.ts +5 -0
- package/esm/utils/variables.js +21 -0
- package/esm/utils/variables.js.map +1 -0
- package/esm/utils/variables.spec.d.ts +1 -0
- package/esm/utils/variables.spec.js +83 -0
- package/esm/utils/variables.spec.js.map +1 -0
- package/esm/utils/vtl.d.ts +14 -0
- package/esm/utils/vtl.js +93 -0
- package/esm/utils/vtl.js.map +1 -0
- package/package.json +750 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LunaticIcon } from './lunatic-icon';
|
|
3
|
+
export function RadioCheckedIcon({ className, width = 32, height = 32, }) {
|
|
4
|
+
return (_jsx(LunaticIcon, { className: className, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, x: "0", y: "0", enableBackground: "new 0 0 32 32", version: "1.1", viewBox: "0 0 32 32", xmlSpace: "preserve", children: [_jsx("path", { d: "M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }), _jsx("path", { d: "M0 0h24v24H0z", fill: "none" })] }) }));
|
|
5
|
+
}
|
|
6
|
+
export default RadioCheckedIcon;
|
|
7
|
+
//# sourceMappingURL=radio-checked-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-checked-icon.js","sourceRoot":"","sources":["../../../../src/components/shared/Icons/radio-checked-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,UAAU,gBAAgB,CAAC,EAChC,SAAS,EACT,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,EAAE,GACA;IACX,OAAO,CACN,KAAC,WAAW,IAAC,SAAS,EAAE,SAAS,YAChC,eACC,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,CAAC,EAAC,GAAG,EACL,CAAC,EAAC,GAAG,EACL,gBAAgB,EAAC,eAAe,EAChC,OAAO,EAAC,KAAK,EACb,OAAO,EAAC,WAAW,EACnB,QAAQ,EAAC,UAAU,aAEnB,eAAM,CAAC,EAAC,uLAAuL,GAAG,EAClM,eAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,IACjC,GACO,CACd,CAAC;AACH,CAAC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LunaticIcon } from './lunatic-icon';
|
|
3
|
+
export function RadioUncheckedIcon({ className, width = 32, height = 32, }) {
|
|
4
|
+
return (_jsx(LunaticIcon, { className: className, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: width, height: height, x: "0", y: "0", enableBackground: "new 0 0 32 32", version: "1.1", viewBox: "0 0 32 32", xmlSpace: "preserve", children: [_jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }), _jsx("path", { d: "M0 0h24v24H0z", fill: "none" })] }) }));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=radio-unchecked-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-unchecked-icon.js","sourceRoot":"","sources":["../../../../src/components/shared/Icons/radio-unchecked-icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,UAAU,kBAAkB,CAAC,EAClC,SAAS,EACT,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,EAAE,GACA;IACX,OAAO,CACN,KAAC,WAAW,IAAC,SAAS,EAAE,SAAS,YAChC,eACC,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,CAAC,EAAC,GAAG,EACL,CAAC,EAAC,GAAG,EACL,gBAAgB,EAAC,eAAe,EAChC,OAAO,EAAC,KAAK,EACb,OAAO,EAAC,WAAW,EACnB,QAAQ,EAAC,UAAU,aAEnB,eAAM,CAAC,EAAC,8HAA8H,GAAG,EACzI,eAAM,CAAC,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAG,IACjC,GACO,CACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type CSSProperties, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
|
+
type Props = PropsWithChildren<{
|
|
3
|
+
id?: string;
|
|
4
|
+
htmlFor?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const Label: import("react").ComponentType<Props>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
4
|
+
import { LabelDescription } from '../LabelDescription';
|
|
5
|
+
/**
|
|
6
|
+
* Label displayed on top of a field
|
|
7
|
+
*/
|
|
8
|
+
function LunaticLabel({ children, id, htmlFor, className, style, description, }) {
|
|
9
|
+
if (!children) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return (_jsxs("label", { htmlFor: htmlFor, id: id, className: classnames('lunatic-label', className), style: style, children: [children, _jsx(LabelDescription, { value: description })] }));
|
|
13
|
+
}
|
|
14
|
+
export const Label = slottableComponent('Label', LunaticLabel);
|
|
15
|
+
//# sourceMappingURL=Label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../src/components/shared/Label/Label.tsx"],"names":[],"mappings":";AAKA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAWvD;;GAEG;AACH,SAAS,YAAY,CAAC,EACrB,QAAQ,EACR,EAAE,EACF,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,GACJ;IACP,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,CACN,iBACC,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC,EACjD,KAAK,EAAE,KAAK,aAEX,QAAQ,EACT,KAAC,gBAAgB,IAAC,KAAK,EAAE,WAAW,GAAI,IACjC,CACR,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { Label } from './Label';
|
|
4
|
+
import { describe, it, expect } from 'vitest';
|
|
5
|
+
describe('Label', () => {
|
|
6
|
+
it('renders null when children is falsy', () => {
|
|
7
|
+
const { container } = render(_jsx(Label, { htmlFor: "input", id: "label", description: "This is a label", children: null }));
|
|
8
|
+
expect(container.firstChild).toBeNull();
|
|
9
|
+
});
|
|
10
|
+
it('renders a label without description', () => {
|
|
11
|
+
const { getByText, queryByText } = render(_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: "kze792d8", id: "label", children: _jsx("p", { children: "Name" }) }), _jsx("input", { id: "kze792d8", className: "", type: "number", "aria-labelledby": "label", min: "0", max: "10", value: "", lang: "en" })] }));
|
|
12
|
+
const label = getByText('Name');
|
|
13
|
+
expect(label).toBeInTheDocument();
|
|
14
|
+
expect(label.parentNode).toHaveAttribute('for', 'kze792d8');
|
|
15
|
+
const description = queryByText('This is a label');
|
|
16
|
+
expect(description).not.toBeInTheDocument();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=Label.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Label/Label.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,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-0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export function LabelDescription({ value, className }) {
|
|
5
|
+
if ((typeof value === 'string' && value.length > 0) ||
|
|
6
|
+
React.isValidElement(value)) {
|
|
7
|
+
return (_jsx("span", { className: classnames('label-description', className), children: value }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=LabelDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LabelDescription.js","sourceRoot":"","sources":["../../../src/components/shared/LabelDescription.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAyB,MAAM,OAAO,CAAC;AAO9C,MAAM,UAAU,gBAAgB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAS;IAC3D,IACC,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/C,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC1B,CAAC;QACF,OAAO,CACN,eAAM,SAAS,EAAE,UAAU,CAAC,mBAAmB,EAAE,SAAS,CAAC,YACzD,KAAK,GACA,CACP,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from 'react';
|
|
3
|
+
import Markdown from 'react-markdown';
|
|
4
|
+
import { MarkdownLink } from './MarkdownLink';
|
|
5
|
+
import remarkBreaks from 'remark-breaks';
|
|
6
|
+
import emoji from 'remark-emoji';
|
|
7
|
+
export function MDLabel({ expression }) {
|
|
8
|
+
const hasParagraphs = /\n\n/.test(expression);
|
|
9
|
+
const components = {
|
|
10
|
+
p: hasParagraphs ? 'p' : Fragment,
|
|
11
|
+
br: 'br',
|
|
12
|
+
a: MarkdownA,
|
|
13
|
+
};
|
|
14
|
+
return (_jsx(Markdown, { components: components, remarkPlugins: [[emoji, { accessible: true }], remarkBreaks], children: expression }));
|
|
15
|
+
}
|
|
16
|
+
const MarkdownA = ({ title, href, children, }) => {
|
|
17
|
+
const tooltip = title ? _jsx(MDLabel, { expression: title }) : null;
|
|
18
|
+
return (_jsx(MarkdownLink, { href: href, tooltip: tooltip, children: children }));
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=MDLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MDLabel.js","sourceRoot":"","sources":["../../../../src/components/shared/MDLabel/MDLabel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAA0B,MAAM,OAAO,CAAC;AACzD,OAAO,QAA6B,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,MAAM,cAAc,CAAC;AAIjC,MAAM,UAAU,OAAO,CAAC,EAAE,UAAU,EAAS;IAC5C,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,UAAU,GAAG;QAClB,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ;QACjC,EAAE,EAAE,IAAI;QACR,CAAC,EAAE,SAAS;KACW,CAAC;IACzB,OAAO,CACN,KAAC,QAAQ,IACR,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,EAAE,YAAY,CAAC,YAE3D,UAAU,GACD,CACX,CAAC;AACH,CAAC;AACD,MAAM,SAAS,GAAG,CAAC,EAClB,KAAK,EACL,IAAI,EACJ,QAAQ,GAC6C,EAAE,EAAE;IACzD,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,UAAU,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9D,OAAO,CACN,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,YACxC,QAAQ,GACK,CACf,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { render, waitFor, screen } from '@testing-library/react';
|
|
4
|
+
import userEvent from '@testing-library/user-event';
|
|
5
|
+
import { MDLabel } from './MDLabel';
|
|
6
|
+
function getStringHtmlWithoutId(htmlElement) {
|
|
7
|
+
return htmlElement.outerHTML.replace(/id="[^"]+"/g, '');
|
|
8
|
+
}
|
|
9
|
+
describe('md-label', () => {
|
|
10
|
+
it('should handle simple text', () => {
|
|
11
|
+
const obj = render(_jsx(MDLabel, { expression: "This **is** a simple test" }));
|
|
12
|
+
return expect(obj.container).toMatchInlineSnapshot(`
|
|
13
|
+
<div>
|
|
14
|
+
This
|
|
15
|
+
<strong>
|
|
16
|
+
is
|
|
17
|
+
</strong>
|
|
18
|
+
a simple test
|
|
19
|
+
</div>
|
|
20
|
+
`);
|
|
21
|
+
});
|
|
22
|
+
it('should handle line break', () => {
|
|
23
|
+
const obj = render(_jsx(MDLabel, { expression: 'This **is** a simple test\non multiple line' }));
|
|
24
|
+
return expect(obj.container).toMatchInlineSnapshot(`
|
|
25
|
+
<div>
|
|
26
|
+
This
|
|
27
|
+
<strong>
|
|
28
|
+
is
|
|
29
|
+
</strong>
|
|
30
|
+
a simple test
|
|
31
|
+
<br />
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
on multiple line
|
|
35
|
+
</div>
|
|
36
|
+
`);
|
|
37
|
+
});
|
|
38
|
+
it('should handle paragraphs break', () => {
|
|
39
|
+
const obj = render(_jsx(MDLabel, { expression: 'This **is** a simple test\n\nwith multiple paragraphs' }));
|
|
40
|
+
return expect(obj.container).toMatchInlineSnapshot(`
|
|
41
|
+
<div>
|
|
42
|
+
<p>
|
|
43
|
+
This
|
|
44
|
+
<strong>
|
|
45
|
+
is
|
|
46
|
+
</strong>
|
|
47
|
+
a simple test
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
<p>
|
|
52
|
+
with multiple paragraphs
|
|
53
|
+
</p>
|
|
54
|
+
</div>
|
|
55
|
+
`);
|
|
56
|
+
});
|
|
57
|
+
it('should handle emoticon', () => {
|
|
58
|
+
const obj = render(_jsx(MDLabel, { expression: '**Demo** of a :dog:' }));
|
|
59
|
+
return expect(obj.container).toMatchInlineSnapshot(`
|
|
60
|
+
<div>
|
|
61
|
+
<strong>
|
|
62
|
+
Demo
|
|
63
|
+
</strong>
|
|
64
|
+
of a
|
|
65
|
+
<span
|
|
66
|
+
aria-label="dog emoji"
|
|
67
|
+
role="img"
|
|
68
|
+
>
|
|
69
|
+
🐶
|
|
70
|
+
</span>
|
|
71
|
+
</div>
|
|
72
|
+
`);
|
|
73
|
+
});
|
|
74
|
+
it('should render external link', () => {
|
|
75
|
+
const obj = render(_jsx(MDLabel, { expression: 'This is a [link](https://inseefr.github.io/Lunatic/docs)' }));
|
|
76
|
+
const stringHtmlWithoutId = getStringHtmlWithoutId(obj.container);
|
|
77
|
+
return expect(stringHtmlWithoutId).toMatchInlineSnapshot(`"<div>This is a <a href="https://inseefr.github.io/Lunatic/docs" target="_blank" rel="noopener noreferrer" >link</a></div>"`);
|
|
78
|
+
});
|
|
79
|
+
it('should render external link with tooltip', async () => {
|
|
80
|
+
render(_jsx(MDLabel, { expression: "This is a [link](https://inseefr.github.io/Lunatic/docs 'with a tooltip')" }));
|
|
81
|
+
const link = screen.getByText('link'); // Get the link element by its text content
|
|
82
|
+
// Simulate hover event
|
|
83
|
+
await userEvent.hover(link);
|
|
84
|
+
let tooltip;
|
|
85
|
+
await waitFor(() => {
|
|
86
|
+
tooltip = screen.getByRole('tooltip');
|
|
87
|
+
});
|
|
88
|
+
expect(link.getAttribute('data-tooltip-id')).toBe(tooltip === null || tooltip === void 0 ? void 0 : tooltip.id);
|
|
89
|
+
expect(tooltip).toBeInTheDocument();
|
|
90
|
+
});
|
|
91
|
+
it('should render internal link', () => {
|
|
92
|
+
const obj = render(_jsx(MDLabel, { expression: 'This is an [internal link](/docs)' }));
|
|
93
|
+
return expect(getStringHtmlWithoutId(obj.container)).toMatchInlineSnapshot(`"<div>This is an <a href="/docs" >internal link</a></div>"`);
|
|
94
|
+
});
|
|
95
|
+
it('should render internal link with tooltip', async () => {
|
|
96
|
+
render(_jsx(MDLabel, { expression: "This is an [internal link](/docs 'with a tooltip')" }));
|
|
97
|
+
const link = screen.getByText('internal link'); // Get the link element by its text content
|
|
98
|
+
// Simulate hover event
|
|
99
|
+
await userEvent.hover(link);
|
|
100
|
+
let tooltip = null;
|
|
101
|
+
await waitFor(() => {
|
|
102
|
+
tooltip = screen.getByRole('tooltip');
|
|
103
|
+
});
|
|
104
|
+
expect(tooltip).toBeInTheDocument();
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=MDLabel.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MDLabel.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/MDLabel/MDLabel.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,SAAS,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,SAAS,sBAAsB,CAAC,WAAwB;IACvD,OAAO,WA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,oDAAoD,GAC/D,CACF,CAAC;QAEF,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,2CAA2C;QAC3F,uBAAuB;QACvB,MAAM,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAE5B,IAAI,OAAO,GAAG,IAAI,CAAC;QAEnB,MAAM,OAAO,CAAC,GAAG,EAAE;YAClB,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,OAAO,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACrC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import { Tooltip } from 'react-tooltip';
|
|
4
|
+
import { RouterLink } from './RouterLink';
|
|
5
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
6
|
+
export const MarkdownLink = slottableComponent('MarkdownLink', ({ href, children, tooltip }) => {
|
|
7
|
+
const id = useId();
|
|
8
|
+
const extraProps = tooltip
|
|
9
|
+
? { 'data-tooltip-id': `tooltip-${id}`, className: 'link-md' }
|
|
10
|
+
: {};
|
|
11
|
+
const isAbsoluteLink = href.trim().startsWith('/');
|
|
12
|
+
return (_jsxs(_Fragment, { children: [isAbsoluteLink ? (_jsx(RouterLink, { to: href, id: id, ...extraProps, children: children })) : (_jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", id: id, ...extraProps, children: children })), tooltip && (_jsx(Tooltip, { className: "tooltip-content", id: `tooltip-${id}`, children: tooltip }))] }));
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=MarkdownLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownLink.js","sourceRoot":"","sources":["../../../../src/components/shared/MDLabel/MarkdownLink.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAA0C,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAC7C,cAAc,EACd,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE;IAC/B,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAEnB,MAAM,UAAU,GAAG,OAAO;QACzB,CAAC,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE;QAC9D,CAAC,CAAC,EAAE,CAAC;IACN,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAEnD,OAAO,CACN,8BACE,cAAc,CAAC,CAAC,CAAC,CACjB,KAAC,UAAU,IAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,KAAM,UAAU,YAC1C,QAAQ,GACG,CACb,CAAC,CAAC,CAAC,CACH,YACC,IAAI,EAAE,IAAI,EACV,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,EAAE,EAAE,EAAE,KACF,UAAU,YAEb,QAAQ,GACN,CACJ,EACA,OAAO,IAAI,CACX,KAAC,OAAO,IAAC,SAAS,EAAC,iBAAiB,EAAC,EAAE,EAAE,WAAW,EAAE,EAAE,YACtD,OAAO,GACC,CACV,IACC,CACH,CAAC;AACH,CAAC,CACD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
3
|
+
export const RouterLink = slottableComponent('RouterLink', (props) => {
|
|
4
|
+
const { to, children, ...rest } = props;
|
|
5
|
+
return (_jsx("a", { href: to, ...rest, children: children }));
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=RouterLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouterLink.js","sourceRoot":"","sources":["../../../../src/components/shared/MDLabel/RouterLink.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAI/D,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,YAAY,EAAE,CAAC,KAAY,EAAE,EAAE;IAC3E,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACxC,OAAO,CACN,YAAG,IAAI,EAAE,EAAE,KAAM,IAAI,YACnB,QAAQ,GACN,CACJ,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useLunaticMissing } from '../../../use-lunatic/lunatic-context';
|
|
2
|
+
import type { LunaticBaseProps } from '../../type';
|
|
3
|
+
type Props = {
|
|
4
|
+
handleChanges: LunaticBaseProps<any>['handleChanges'];
|
|
5
|
+
componentType?: string;
|
|
6
|
+
paginatedLoop?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
missingResponse?: LunaticBaseProps['missingResponse'];
|
|
10
|
+
};
|
|
11
|
+
type PropsFromContext = Pick<ReturnType<typeof useLunaticMissing>, 'shortcut' | 'missingStrategy' | 'dontKnowButton' | 'refusedButton' | 'missingShortcut'>;
|
|
12
|
+
export declare const Missing: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export declare const MissingPure: (props: Pick<Props, "handleChanges" | "missingResponse" | "disabled" | "readOnly"> & PropsFromContext) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default Missing;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from 'react';
|
|
3
|
+
import { DK, RF } from '../../../utils/constants';
|
|
4
|
+
import { useLunaticMissing } from '../../../use-lunatic/lunatic-context';
|
|
5
|
+
import { Button } from '../Button/Button';
|
|
6
|
+
import { useKeyboardKey } from '../../../hooks/useKeyboardKey';
|
|
7
|
+
export const Missing = (props) => {
|
|
8
|
+
const propsContext = useLunaticMissing();
|
|
9
|
+
if (!propsContext.missing || !props.missingResponse) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
if (props.componentType === 'Loop' && props.paginatedLoop) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return _jsx(MissingPure, { ...props, ...propsContext });
|
|
16
|
+
};
|
|
17
|
+
export const MissingPure = (props) => {
|
|
18
|
+
const { missingResponse, handleChanges, missingStrategy, shortcut, missingShortcut, dontKnowButton, refusedButton, disabled, readOnly, } = props;
|
|
19
|
+
const value = missingResponse === null || missingResponse === void 0 ? void 0 : missingResponse.value;
|
|
20
|
+
const onClick = (value) => {
|
|
21
|
+
var _a;
|
|
22
|
+
handleChanges([{ name: (_a = missingResponse === null || missingResponse === void 0 ? void 0 : missingResponse.name) !== null && _a !== void 0 ? _a : 'UNKNOWN', value }]);
|
|
23
|
+
};
|
|
24
|
+
const handleMissingStrategy = useCallback(() => {
|
|
25
|
+
if (missingStrategy)
|
|
26
|
+
missingStrategy();
|
|
27
|
+
}, [missingStrategy]);
|
|
28
|
+
const onClickDK = () => {
|
|
29
|
+
onClick(DK);
|
|
30
|
+
handleMissingStrategy();
|
|
31
|
+
};
|
|
32
|
+
const onClickRF = () => {
|
|
33
|
+
onClick(RF);
|
|
34
|
+
handleMissingStrategy();
|
|
35
|
+
};
|
|
36
|
+
const hasKeyboardShortcut = Boolean(shortcut &&
|
|
37
|
+
!disabled &&
|
|
38
|
+
!readOnly &&
|
|
39
|
+
missingShortcut &&
|
|
40
|
+
missingShortcut.dontKnow &&
|
|
41
|
+
missingShortcut.refused);
|
|
42
|
+
useKeyboardKey(Object.values(missingShortcut), (e) => {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
if (e.key.toLowerCase() === missingShortcut.dontKnow.toLowerCase())
|
|
45
|
+
onClickDK();
|
|
46
|
+
if (e.key.toLowerCase() === missingShortcut.refused.toLowerCase())
|
|
47
|
+
onClickRF();
|
|
48
|
+
}, hasKeyboardShortcut);
|
|
49
|
+
return (_jsxs("div", { className: "missing-buttons", children: [_jsx("span", { className: `missing-button${value === DK ? '-active' : ''} missing-button-dk${value === DK ? '-active' : ''}`, children: _jsx(Button, { selected: value === DK, disabled: disabled, readOnly: readOnly, label: dontKnowButton, onClick: onClickDK }) }), _jsx("span", { className: `missing-button${value === RF ? '-active' : ''} missing-button-rf${value === RF ? '-active' : ''}`, children: _jsx(Button, { selected: value === RF, disabled: disabled, readOnly: readOnly, label: refusedButton, onClick: onClickRF }) })] }));
|
|
50
|
+
};
|
|
51
|
+
export default Missing;
|
|
52
|
+
//# sourceMappingURL=Missing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Missing.js","sourceRoot":"","sources":["../../../../src/components/shared/Missing/Missing.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAoB/D,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAY,EAAE,EAAE;IACvC,MAAM,YAAY,GAAG,iBAAiB,EAAE,CAAC;IACzC,IAAI,CAAC,YAAY,CAAC,OAAO,IAA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@@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render, fireEvent } from '@testing-library/react';
|
|
3
|
+
import { MissingPure } from './Missing';
|
|
4
|
+
import { describe, it, expect, vi, afterEach } from 'vitest';
|
|
5
|
+
describe('Missing', () => {
|
|
6
|
+
const handleChanges = vi.fn();
|
|
7
|
+
const missingResponse = {
|
|
8
|
+
name: 'Demo',
|
|
9
|
+
value: '',
|
|
10
|
+
};
|
|
11
|
+
const dontKnowButton = "Don't know";
|
|
12
|
+
const refusedButton = 'Refused';
|
|
13
|
+
afterEach(() => {
|
|
14
|
+
vi.clearAllMocks();
|
|
15
|
+
});
|
|
16
|
+
it('should render the "Don\'t Know" and "Refused" buttons', () => {
|
|
17
|
+
const { getByText } = render(_jsx(MissingPure, { dontKnowButton: dontKnowButton, refusedButton: refusedButton, missingResponse: missingResponse, handleChanges: handleChanges, missingShortcut: { dontKnow: '', refused: '' }, missingStrategy: () => { }, shortcut: false }));
|
|
18
|
+
const dontKnow = getByText(dontKnowButton);
|
|
19
|
+
const refused = getByText(refusedButton);
|
|
20
|
+
expect(dontKnow).toBeInTheDocument();
|
|
21
|
+
expect(refused).toBeInTheDocument();
|
|
22
|
+
});
|
|
23
|
+
it('should call the handleChanges function when a button is clicked', () => {
|
|
24
|
+
const { getByText } = render(_jsx(MissingPure, { dontKnowButton: dontKnowButton, refusedButton: refusedButton, missingResponse: missingResponse, handleChanges: handleChanges, missingShortcut: { dontKnow: '', refused: '' }, missingStrategy: () => { }, shortcut: false }));
|
|
25
|
+
const dontKnow = getByText(dontKnowButton);
|
|
26
|
+
const refused = getByText(refusedButton);
|
|
27
|
+
fireEvent.click(dontKnow);
|
|
28
|
+
fireEvent.click(refused);
|
|
29
|
+
expect(handleChanges).toHaveBeenCalledTimes(2);
|
|
30
|
+
expect(handleChanges).toHaveBeenCalledWith([
|
|
31
|
+
{ ...missingResponse, value: 'DK' },
|
|
32
|
+
]);
|
|
33
|
+
expect(handleChanges).toHaveBeenCalledWith([
|
|
34
|
+
{ ...missingResponse, value: 'RF' },
|
|
35
|
+
]);
|
|
36
|
+
});
|
|
37
|
+
it('should not handle keyboard shortcuts when a shortcut is not provided', () => {
|
|
38
|
+
render(_jsx(MissingPure, { dontKnowButton: dontKnowButton, refusedButton: refusedButton, missingResponse: missingResponse, handleChanges: handleChanges, missingShortcut: { dontKnow: '', refused: '' }, missingStrategy: () => { }, shortcut: false }));
|
|
39
|
+
const body = document.body;
|
|
40
|
+
fireEvent.click(body, { key: 'd' });
|
|
41
|
+
fireEvent.click(body, { key: 'r' });
|
|
42
|
+
expect(handleChanges).toHaveBeenCalledTimes(0);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=Missing.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Missing.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Missing/Missing.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE7D,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACxB,MAAM,aAAa,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;IAC9B,MAAM,eAAe,GAAG;QACvB,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,EAAE;KACT,CAAC;IACF,MAAM,cAAc,GAAG,YAAY,CAAC;IACpC,MAAM,aAAa,GAAG,SAAS,CAAC;IAEhC,SAAS,CAAC,GAAG,EAAE;QACd,EAAE,CAAC,aAAa,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,GAA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,aAAa,CAAC,CAAC,oBAAoB,CAAC;YAC1C,EAAE,GAAG,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE;SACnC,CAAC,CAAC;QACH,MAAM,CAAC,aAAa,CAAC,CAAC,oBAAoB,CAAC;YAC1C,EAAE,GAAG,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE;SACnC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC/E,MAAM,CACL,KAAC,WAAW,IACX,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAC9C,eAAe,EAAE,GAAG,EAAE,GAAE,CAAC,EACzB,QAAQ,EAAE,KAAK,GACd,CACF,CAAC;QACF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC3B,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QACpC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QACpC,MAAM,CAAC,aAAa,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type MouseEventHandler, type ReactPortal } from 'react';
|
|
2
|
+
import type { LunaticError } from '../../../use-lunatic/type';
|
|
3
|
+
type Props = {
|
|
4
|
+
goNext: MouseEventHandler;
|
|
5
|
+
onClose: MouseEventHandler;
|
|
6
|
+
isCritical?: boolean;
|
|
7
|
+
errors: Record<string, LunaticError[]>;
|
|
8
|
+
};
|
|
9
|
+
export declare function ModalControls(props: Props): ReactPortal | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import ReactDOM from 'react-dom';
|
|
5
|
+
import { Button } from '../Button/Button';
|
|
6
|
+
import D from '../../../i18n';
|
|
7
|
+
function ErrorItem({ criticality, errorMessage }) {
|
|
8
|
+
return _jsx("li", { className: classnames(criticality), children: errorMessage });
|
|
9
|
+
}
|
|
10
|
+
function ComponentErrors({ errors }) {
|
|
11
|
+
const content = errors.map(function (error, index) {
|
|
12
|
+
return _createElement(ErrorItem, { ...error, key: index });
|
|
13
|
+
}, []);
|
|
14
|
+
return _jsx("ul", { className: classnames('errors'), children: content });
|
|
15
|
+
}
|
|
16
|
+
export function ModalControls(props) {
|
|
17
|
+
if (typeof props.errors !== 'object') {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const errors = Object.values(props.errors).flat();
|
|
21
|
+
return ReactDOM.createPortal(_jsx("div", { className: "lunatic-modal-controls", children: _jsxs("div", { className: "modal-content", children: [_jsx("div", { className: "body", children: _jsx(ComponentErrors, { errors: errors }) }), _jsx(CloseOrSkip, { ...props })] }) }), document.body);
|
|
22
|
+
}
|
|
23
|
+
function CloseOrSkip({ onClose, goNext, isCritical }) {
|
|
24
|
+
if (isCritical) {
|
|
25
|
+
return (_jsx("div", { className: "modal-buttons", children: _jsx(Button, { className: "modal-button", onClick: onClose, children: D.MODAL_CORRECT }) }));
|
|
26
|
+
}
|
|
27
|
+
return (_jsxs("div", { className: "modal-buttons", children: [_jsx(Button, { className: "modal-button", onClick: onClose, children: D.MODAL_CORRECT }), _jsx(Button, { className: "modal-button", onClick: goNext, children: D.MODAL_IGNORE })] }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ModalControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalContro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AE,MAAM,EAAE,UAAU,EAAS;IAC1D,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,CACN,cAAK,SAAS,EAAC,eAAe,YAC7B,KAAC,MAAM,IAAC,SAAS,EAAC,cAAc,EAAC,OAAO,EAAE,OAAO,YAC/C,CAAC,CAAC,aAAa,GACR,GACJ,CACN,CAAC;IACH,CAAC;IACD,OAAO,CACN,eAAK,SAAS,EAAC,eAAe,aAC7B,KAAC,MAAM,IAAC,SAAS,EAAC,cAAc,EAAC,OAAO,EAAE,OAAO,YAC/C,CAAC,CAAC,aAAa,GACR,EACT,KAAC,MAAM,IAAC,SAAS,EAAC,cAAc,EAAC,OAAO,EAAE,MAAM,YAC9C,CAAC,CAAC,YAAY,GACP,IACJ,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fireEvent, render } from '@testing-library/react';
|
|
3
|
+
import { ModalControls } from './ModalControls';
|
|
4
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
5
|
+
describe('ModalControls component', () => {
|
|
6
|
+
it('should render correctly when there are errors', () => {
|
|
7
|
+
const errors = {
|
|
8
|
+
field1: [
|
|
9
|
+
{
|
|
10
|
+
id: 'message1',
|
|
11
|
+
criticality: 'ERROR',
|
|
12
|
+
errorMessage: 'Error message 1',
|
|
13
|
+
typeOfControl: 'CONSISTENCY',
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
field2: [
|
|
17
|
+
{
|
|
18
|
+
id: 'message2',
|
|
19
|
+
criticality: 'ERROR',
|
|
20
|
+
errorMessage: 'Error message 2',
|
|
21
|
+
typeOfControl: 'CONSISTENCY',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
};
|
|
25
|
+
const goNext = vi.fn();
|
|
26
|
+
const { getByText } = render(_jsx(ModalControls, { errors: errors, goNext: goNext, onClose: () => { } }));
|
|
27
|
+
expect(getByText('Error message 1')).toBeInTheDocument();
|
|
28
|
+
expect(getByText('Error message 2')).toBeInTheDocument();
|
|
29
|
+
});
|
|
30
|
+
it('should render correctly when there are no errors', () => {
|
|
31
|
+
const goNext = vi.fn();
|
|
32
|
+
const { queryByText } = render(_jsx(ModalControls, { errors: {}, goNext: goNext, onClose: () => { } }));
|
|
33
|
+
expect(queryByText('Error message 1')).toBeNull();
|
|
34
|
+
expect(queryByText('Error message 2')).toBeNull();
|
|
35
|
+
});
|
|
36
|
+
it('should call the goNext function when the skip button is clicked', () => {
|
|
37
|
+
const errors = {
|
|
38
|
+
field1: [
|
|
39
|
+
{
|
|
40
|
+
criticality: 'ERROR',
|
|
41
|
+
errorMessage: 'Error message 1',
|
|
42
|
+
id: 'message1',
|
|
43
|
+
typeOfControl: 'CONSISTENCY',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
field2: [
|
|
47
|
+
{
|
|
48
|
+
criticality: 'ERROR',
|
|
49
|
+
errorMessage: 'Error message 2',
|
|
50
|
+
id: 'message2',
|
|
51
|
+
typeOfControl: 'CONSISTENCY',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
const goNext = vi.fn();
|
|
56
|
+
const { getByText } = render(_jsx(ModalControls, { errors: errors, goNext: goNext, onClose: () => { } }));
|
|
57
|
+
fireEvent.click(getByText('Ignore'));
|
|
58
|
+
expect(goNext).toHaveBeenCalled();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=ModalControls.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalControls.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/ModalControls/ModalControls.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,O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AClD,MAAM,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QAC1E,MAAM,MAAM,GAAG;YACd,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,OAAO;oBACpB,YAAY,EAAE,iBAAiB;oBAC/B,EAAE,EAAE,UAAU;oBACd,aAAa,EAAE,aAAa;iBAC5B;aACD;YACD,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,OAAO;oBACpB,YAAY,EAAE,iBAAiB;oBAC/B,EAAE,EAAE,UAAU;oBACd,aAAa,EAAE,aAAa;iBAC5B;aACD;SACwC,CAAC;QAC3C,MAAM,MAAM,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QACvB,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC3B,KAAC,aAAa,IAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,GAAI,CACpE,CAAC;QACF,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { slottableComponent } from './HOC/slottableComponent';
|
|
4
|
+
function LunaticNotification({ className, title, description }) {
|
|
5
|
+
return (_jsx("div", { className: classnames('lunatic-notification', className), children: _jsxs("div", { className: "lunatic-notification-container", children: [_jsx("div", { className: "title", children: title }), _jsx("div", { className: "descripttion", children: description })] }) }));
|
|
6
|
+
}
|
|
7
|
+
export const Notification = slottableComponent('Notification', LunaticNotification);
|
|
8
|
+
//# sourceMappingURL=Notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Notification.js","sourceRoot":"","sources":["../../../src/components/shared/Notification.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAQ9D,SAAS,mBAAmB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAS;IACpE,OAAO,CACN,cAAK,SAAS,EAAE,UAAU,CAAC,sBAAsB,EAAE,SAAS,CAAC,YAC5D,eAAK,SAAS,EAAC,gCAAgC,aAC9C,cAAK,SAAS,EAAC,OAAO,YAAE,KAAK,GAAO,EACpC,cAAK,SAAS,EAAC,cAAc,YAAE,WAAW,GAAO,IAC5C,GACD,CACN,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAC7C,cAAc,EACd,mBAAmB,CACnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LunaticError } from '../../../use-lunatic/type';
|
|
2
|
+
import type { LunaticComponentProps } from '../../type';
|
|
3
|
+
export type RadioGroupProps = Pick<LunaticComponentProps<'Radio'>, 'id' | 'options' | 'value' | 'checkboxStyle' | 'label' | 'shortcut' | 'className' | 'disabled' | 'readOnly' | 'description' | 'declarations' | 'orientation'> & {
|
|
4
|
+
errors?: LunaticError[];
|
|
5
|
+
clearable?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare const RadioGroup: import("react").ComponentType<RadioGroupProps>;
|