@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,23 @@
|
|
|
1
|
+
import { createElement as _createElement } from "react";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Fieldset } from '../Fieldset/Fieldset';
|
|
4
|
+
import { ComponentErrors } from '../ComponentErrors/ComponentErrors';
|
|
5
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
6
|
+
import { getShortcutKey } from '../Checkbox/getShortcutKey';
|
|
7
|
+
import { RadioOption } from './RadioOption';
|
|
8
|
+
import { useListKeyboardHandler } from '../../../hooks/useListKeyboardHandler';
|
|
9
|
+
import { Declarations } from '../Declarations/Declarations';
|
|
10
|
+
/**
|
|
11
|
+
* Stack of radios fields surrounded by a fieldset
|
|
12
|
+
*/
|
|
13
|
+
function LunaticRadioGroup({ options, value, id, label, description, checkboxStyle = false, errors, className, shortcut, disabled, readOnly, declarations, orientation, }) {
|
|
14
|
+
const onKeyDown = useListKeyboardHandler(options);
|
|
15
|
+
const maxIndex = options.length;
|
|
16
|
+
return (_jsxs(Fieldset, { className: className, legend: label, description: description, children: [_jsx(Declarations, { type: "AFTER_QUESTION_TEXT", declarations: declarations }), _jsx("div", { className: `lunatic-checkboxes lunatic-checkboxes--${orientation}`, children: options.map(function (option, index) {
|
|
17
|
+
const radioId = `lunatic-radio-${id}-${option.value}`;
|
|
18
|
+
const codeModality = getShortcutKey(index, maxIndex);
|
|
19
|
+
return (_createElement(RadioOption, { ...option, key: radioId, id: radioId, index: index, checked: value === option.value, onKeyDown: onKeyDown, checkboxStyle: checkboxStyle, codeModality: shortcut ? codeModality : undefined, shortcut: shortcut, disabled: disabled, readOnly: readOnly, invalid: !!errors }));
|
|
20
|
+
}) }), _jsx(ComponentErrors, { errors: errors })] }));
|
|
21
|
+
}
|
|
22
|
+
export const RadioGroup = slottableComponent('RadioGroup', LunaticRadioGroup);
|
|
23
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../../src/components/shared/Radio/RadioGroup.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAsB5D;;GAEG;AACH,SAAS,iBAAiB,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,EAAE,EACF,KAAK,EACL,WAAW,EACX,aAAa,GAAG,KAAK,EACrB,MAAM,EACN,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,WAAW,GACM;IACjB,MAAM,SAAS,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAChC,OAAO,CACN,MAAC,QAAQ,IAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,aACtE,KAAC,YAAY,IAAC,IAAI,EAAC,qBAAqB,EAAC,YAAY,EAAE,YAAY,GAAI,EACvE,cAAK,SAAS,EAAE,0CAA0C,WAAW,EAAE,YACrE,OAAO,CAAC,GAAG,CAAC,UAAU,MAAM,EAAE,KAAK;oBACnC,MAAM,OAAO,GAAG,iBAAiB,EAAE,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;oBACtD,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;oBACrD,OAAO,CACN,eAAC,WAAW,OACP,MAAM,EACV,GAAG,EAAE,OAAO,EACZ,EAAE,EAAE,OAAO,EACX,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,KAAK,KAAK,MAAM,CAAC,KAAK,EAC/B,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EACjD,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,CAAC,CAAC,MAAM,GAChB,CACF,CAAC;gBACH,CAAC,CAAC,GACG,EACN,KAAC,eAAe,IAAC,MAAM,EAAE,MAAM,GAAI,IACzB,CACX,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,kBAAkB,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InterpretedOption } from '../../../use-lunatic/props/propOptions';
|
|
2
|
+
export type Props = {
|
|
3
|
+
id: string;
|
|
4
|
+
onKeyDown?: (v: {
|
|
5
|
+
key: string;
|
|
6
|
+
index: number;
|
|
7
|
+
}) => void;
|
|
8
|
+
checkboxStyle?: boolean;
|
|
9
|
+
shortcut?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
index?: number;
|
|
13
|
+
labelledBy?: string;
|
|
14
|
+
codeModality?: string;
|
|
15
|
+
invalid?: boolean;
|
|
16
|
+
} & InterpretedOption;
|
|
17
|
+
export declare const RadioOption: import("react").ComponentType<Props>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
4
|
+
import { useKeyboardKey } from '../../../hooks/useKeyboardKey';
|
|
5
|
+
import { Label } from '../Label/Label';
|
|
6
|
+
import classnames from 'classnames';
|
|
7
|
+
import { CustomInput } from '../../Input/Input';
|
|
8
|
+
function LunaticRadioOption({ checked, disabled, readOnly, checkboxStyle, value, onKeyDown, index, shortcut, codeModality, id, labelledBy, description, label, onDetailChange, detailLabel, detailValue, onCheck, }) {
|
|
9
|
+
const divEl = useRef(null);
|
|
10
|
+
const isEnabled = !disabled && !readOnly;
|
|
11
|
+
const isRadio = !checkboxStyle;
|
|
12
|
+
const hasDetail = !!onDetailChange;
|
|
13
|
+
const onClickOption = () => {
|
|
14
|
+
if (!isEnabled || !onCheck || checked) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
onCheck();
|
|
18
|
+
};
|
|
19
|
+
const handleKeyDown = (e) => {
|
|
20
|
+
var _a;
|
|
21
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown({ key: e.key, index: index !== null && index !== void 0 ? index : -1 });
|
|
22
|
+
(_a = divEl.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
23
|
+
};
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
const { current } = divEl;
|
|
26
|
+
if (current && checked) {
|
|
27
|
+
current.focus();
|
|
28
|
+
}
|
|
29
|
+
}, [checked, divEl, value]);
|
|
30
|
+
const hasKeyboardShortcut = Boolean(shortcut && codeModality && isEnabled);
|
|
31
|
+
useKeyboardKey(codeModality ? [codeModality] : [], (e) => {
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
onClickOption();
|
|
34
|
+
}, hasKeyboardShortcut);
|
|
35
|
+
return (_jsxs("div", { className: "lunatic-input-checkbox-wrapper", children: [_jsxs("div", { id: id, role: "radio", "aria-disabled": disabled, className: classnames('lunatic-input-checkbox', isRadio && 'lunatic-input-radio'), "aria-checked": checked, tabIndex: checked ? -1 : 0, onClick: onClickOption, onKeyDown: handleKeyDown, "aria-labelledby": labelledBy, ref: divEl, children: [_jsx("div", { className: "lunatic-input-checkbox__icon", children: checked && checkboxStyle && (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 11", children: _jsx("path", { d: "M5 11 0 6l1.4-1.4L5 8.2 12.6.6 14 2l-9 9Z", fill: "currentColor" }) })) }), _jsxs(Label, { id: labelledBy, htmlFor: id, description: description, children: [codeModality && (_jsx("span", { className: "code-modality", children: codeModality.toUpperCase() })), label] })] }), hasDetail && checked && (_jsx(CustomInput, { id: "detailId", label: detailLabel !== null && detailLabel !== void 0 ? detailLabel : 'Précisez :', value: typeof detailValue === 'string' ? detailValue : '', onChange: onDetailChange, disabled: disabled }))] }));
|
|
36
|
+
}
|
|
37
|
+
export const RadioOption = slottableComponent('RadioOption', LunaticRadioOption);
|
|
38
|
+
//# sourceMappingURL=RadioOption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioOption.js","sourceRoot":"","sources":["../../../../src/components/shared/Radio/RadioOption.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render, screen, fireEvent } from '@testing-library/react';
|
|
3
|
+
import { RadioOption } from './RadioOption';
|
|
4
|
+
import { describe, it, expect, vi } from 'vitest';
|
|
5
|
+
describe('RadioOption', () => {
|
|
6
|
+
it('renders the component with the correct label', () => {
|
|
7
|
+
const label = 'Test Option';
|
|
8
|
+
const { getByText } = render(_jsx(RadioOption, { id: "radio-option", label: label }));
|
|
9
|
+
expect(getByText(label)).toBeInTheDocument();
|
|
10
|
+
});
|
|
11
|
+
it('calls the onClick handler when clicked', () => {
|
|
12
|
+
const onClickMock = vi.fn();
|
|
13
|
+
render(_jsx(RadioOption, { id: "radio-option", label: "Test Option", onCheck: onClickMock }));
|
|
14
|
+
const option = screen.getByRole('radio');
|
|
15
|
+
fireEvent.click(option);
|
|
16
|
+
expect(onClickMock).toHaveBeenCalled();
|
|
17
|
+
});
|
|
18
|
+
it('sets the tabIndex to 0 when unchecked', () => {
|
|
19
|
+
const { getByRole } = render(_jsx(RadioOption, { id: "radio-option", label: "Test Option", checked: false }));
|
|
20
|
+
expect(getByRole('radio')).toHaveAttribute('tabIndex', '0');
|
|
21
|
+
});
|
|
22
|
+
it('sets the tabIndex to -1 when checked', () => {
|
|
23
|
+
const { getByRole } = render(_jsx(RadioOption, { id: "radio-option", label: "Test Option", checked: true }));
|
|
24
|
+
expect(getByRole('radio')).toHaveAttribute('tabIndex', '-1');
|
|
25
|
+
});
|
|
26
|
+
it('applies the disabled aria when disabled prop is present', () => {
|
|
27
|
+
const { getByRole } = render(_jsx(RadioOption, { id: "radio-option", label: "Test Option", disabled: true }));
|
|
28
|
+
expect(getByRole('radio')).toHaveAttribute('aria-disabled');
|
|
29
|
+
});
|
|
30
|
+
it('applies the checked aria when checked prop is present', () => {
|
|
31
|
+
const { getByRole } = render(_jsx(RadioOption, { id: "radio-option", label: "Test Option", checked: true }));
|
|
32
|
+
expect(getByRole('radio')).toHaveAttribute('aria-checked', 'true');
|
|
33
|
+
});
|
|
34
|
+
it('applies the code-modality class when codeModality prop is present', () => {
|
|
35
|
+
const { getByText } = render(_jsx(RadioOption, { id: "radio-option", label: "Test Option", codeModality: "html" }));
|
|
36
|
+
expect(getByText('HTML')).toHaveClass('code-modality');
|
|
37
|
+
});
|
|
38
|
+
it('calls the onKeyDown handler when a key is pressed', () => {
|
|
39
|
+
const onKeyDownMock = vi.fn();
|
|
40
|
+
render(_jsx(RadioOption, { id: "radio-option", label: "Test Option", onKeyDown: onKeyDownMock }));
|
|
41
|
+
const option = screen.getByRole('radio');
|
|
42
|
+
fireEvent.keyDown(option, { key: 'Enter', code: 'Enter' });
|
|
43
|
+
expect(onKeyDownMock).toHaveBeenCalled();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=RadioOption.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioOption.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Radio/RadioOption.spec.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { LunaticError } from '../../../use-lunatic/type';
|
|
3
|
+
import type { LunaticComponentProps } from '../../type';
|
|
4
|
+
type Props = PropsWithChildren<Pick<LunaticComponentProps<'Table'>, 'className' | 'id' | 'label' | 'declarations'> & {
|
|
5
|
+
errors?: LunaticError[];
|
|
6
|
+
}>;
|
|
7
|
+
export declare const Table: React.ComponentType<Props>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
4
|
+
import { ComponentErrors } from '../ComponentErrors/ComponentErrors';
|
|
5
|
+
import { Label } from '../Label/Label';
|
|
6
|
+
import { Declarations } from '../Declarations/Declarations';
|
|
7
|
+
function LunaticTable({ id, className, children, errors, declarations, label, }) {
|
|
8
|
+
const tableId = `table-${id}`;
|
|
9
|
+
const labelId = `label-${id}`;
|
|
10
|
+
return (_jsxs(_Fragment, { children: [_jsx(Label, { htmlFor: tableId, id: labelId, children: label }), _jsx(Declarations, { type: "AFTER_QUESTION_TEXT", declarations: declarations, id: id }), _jsx("table", { id: tableId, className: classnames('lunatic-table', className), children: children }), _jsx(ComponentErrors, { errors: errors })] }));
|
|
11
|
+
}
|
|
12
|
+
export const Table = slottableComponent('Table', LunaticTable);
|
|
13
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Table.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAW5D,SAAS,YAAY,CAAC,EACrB,EAAE,EACF,SAAS,EACT,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,KAAK,GACE;IACP,MAAM,OAAO,GAAG,SAAS,EAAE,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,SAAS,EAAE,EAAE,CAAC;IAE9B,OAAO,CACN,8BACC,KAAC,KAAK,IAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,YAClC,KAAK,GACC,EACR,KAAC,YAAY,IACZ,IAAI,EAAC,qBAAqB,EAC1B,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,EAAE,GACL,EACF,gBAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE,SAAS,CAAC,YACnE,QAAQ,GACF,EACR,KAAC,eAAe,IAAC,MAAM,EAAE,MAAM,GAAI,IACjC,CACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { Table } from './Table';
|
|
4
|
+
import { expect, it, describe } from 'vitest';
|
|
5
|
+
describe('Table', () => {
|
|
6
|
+
it('renders without crashing', () => {
|
|
7
|
+
const { getByRole } = render(_jsx(Table, { id: "test-table" }));
|
|
8
|
+
expect(getByRole('table')).toBeInTheDocument();
|
|
9
|
+
});
|
|
10
|
+
it('applies custom className when provided', () => {
|
|
11
|
+
const { getByRole } = render(_jsx(Table, { id: "test-table", className: "custom-class" }));
|
|
12
|
+
expect(getByRole('table')).toHaveClass('custom-class');
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=Table.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Table.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACtB,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QACnC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,KAAC,KAAK,IAAC,EAAE,EAAC,YAAY,GAAG,CAAC,CAAC;QACxD,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QACjD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC3B,KAAC,KAAK,IAAC,EAAE,EAAC,YAAY,EAAC,SAAS,EAAC,cAAc,GAAG,CAClD,CAAC;QACF,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Th } from './Th';
|
|
3
|
+
import { Thead } from './Thead';
|
|
4
|
+
import { Tr } from './Tr';
|
|
5
|
+
export function TableHeader({ header, }) {
|
|
6
|
+
if (!Array.isArray(header)) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
const content = header.map(function ({ label, rowspan, colspan }, index) {
|
|
10
|
+
return (_jsx(Th, { row: 0, index: index, rowSpan: rowspan, colSpan: colspan, children: label }, index));
|
|
11
|
+
});
|
|
12
|
+
return (_jsx(Thead, { children: _jsx(Tr, { row: 0, children: content }) }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=TableHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/TableHeader.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE1B,MAAM,UAAU,WAAW,CAAC,EAC3B,MAAM,GAC0C;IAChD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACb,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,KAAK;QACtE,OAAO,CACN,KAAC,EAAE,IAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,YAC1D,KAAK,IAD4D,KAAK,CAEnE,CACL,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,CACN,KAAC,KAAK,cACL,KAAC,EAAE,IAAC,GAAG,EAAE,CAAC,YAAG,OAAO,GAAM,GACnB,CACR,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
4
|
+
function LunaticTbody({ className, children }) {
|
|
5
|
+
return (_jsx("tbody", { className: classnames('lunatic-table-tbody', className), children: children }));
|
|
6
|
+
}
|
|
7
|
+
export const Tbody = slottableComponent('Tbody', LunaticTbody);
|
|
8
|
+
//# sourceMappingURL=Tbody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tbody.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Tbody.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAM/D,SAAS,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAS;IACnD,OAAO,CACN,gBAAO,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,YAC5D,QAAQ,GACF,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,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { Tbody } from './Tbody';
|
|
4
|
+
import { expect, describe, it } from 'vitest';
|
|
5
|
+
describe('Tbody component', () => {
|
|
6
|
+
it('renders the component with the correct props and children', () => {
|
|
7
|
+
const testClass = 'test-class';
|
|
8
|
+
const testContent = 'Test content';
|
|
9
|
+
const { getByRole, getByText } = render(_jsx(Tbody, { className: testClass, children: testContent }));
|
|
10
|
+
const tbodyElement = getByRole('rowgroup');
|
|
11
|
+
expect(tbodyElement).toHaveClass('lunatic-table-tbody');
|
|
12
|
+
expect(tbodyElement).toHaveClass(testClass);
|
|
13
|
+
expect(getByText(testContent)).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
it('renders the component without an ID or class when not provided', () => {
|
|
16
|
+
const { getByRole } = render(_jsx(Tbody, {}));
|
|
17
|
+
const tbodyElement = getByRole('rowgroup');
|
|
18
|
+
expect(tbodyElement).not.toHaveAttribute('id');
|
|
19
|
+
expect(tbodyElement).toHaveClass('lunatic-table-tbody');
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=Tbody.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tbody.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Tbody.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,2DAA2D,EAAE,GAAG,EAAE;QACpE,MAAM,SAAS,GAAG,YAAY,CAAC;QAC/B,MAAM,WAAW,GAAG,cAAc,CAAC;QACnC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,MAAM,CACtC,KAAC,KAAK,IAAC,SAAS,EAAE,SAAS,YAAG,WAAW,GAAS,CAClD,CAAC;QACF,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3C,MAAM,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACxD,MAAM,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC5C,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACzE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,KAAC,KAAK,KAAG,CAAC,CAAC;QACxC,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3C,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { LunaticComponentProps } from '../../type';
|
|
3
|
+
type Props = PropsWithChildren<{
|
|
4
|
+
className?: string;
|
|
5
|
+
row?: string | number;
|
|
6
|
+
index?: string | number;
|
|
7
|
+
colSpan?: number;
|
|
8
|
+
rowSpan?: number;
|
|
9
|
+
} & LunaticComponentProps>;
|
|
10
|
+
export declare const Td: import("react").ComponentType<Props>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
4
|
+
function LunaticTd({ children, className, colSpan, rowSpan }) {
|
|
5
|
+
return (_jsx("td", { className: classnames('lunatic-table-td', className), colSpan: colSpan, rowSpan: rowSpan, children: children }));
|
|
6
|
+
}
|
|
7
|
+
export const Td = slottableComponent('Td', LunaticTd);
|
|
8
|
+
//# sourceMappingURL=Td.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Td.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Td.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAa/D,SAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAS;IAClE,OAAO,CACN,aACC,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,EACpD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,YAEf,QAAQ,GACL,CACL,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,GAAG,kBAAkB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { Td } from './Td';
|
|
4
|
+
import { describe, expect, it } from 'vitest';
|
|
5
|
+
describe('Td', () => {
|
|
6
|
+
it('renders a td element with the correct props and children', () => {
|
|
7
|
+
const row = 1;
|
|
8
|
+
const index = 2;
|
|
9
|
+
const className = 'test-class';
|
|
10
|
+
const colSpan = 2;
|
|
11
|
+
const rowSpan = 3;
|
|
12
|
+
const children = 'Test content';
|
|
13
|
+
const { getByRole } = render(_jsx("table", { children: _jsx("tbody", { children: _jsx("tr", { children: _jsx(Td, { id: "a", row: row, index: index, className: className, colSpan: colSpan, rowSpan: rowSpan, children: children }) }) }) }));
|
|
14
|
+
const td = getByRole('cell', { name: children });
|
|
15
|
+
expect(td).toHaveClass('lunatic-table-td');
|
|
16
|
+
expect(td).toHaveClass(className);
|
|
17
|
+
expect(td).toHaveAttribute('colspan', colSpan.toString());
|
|
18
|
+
expect(td).toHaveAttribute('rowspan', rowSpan.toString());
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=Td.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Td.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Td.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE;IACnB,EAAE,CAAC,0DAA0D,EAAE,GAAG,EAAE;QACnE,MAAM,GAAG,GAAG,CAAC,CAAC;QACd,MAAM,KAAK,GAAG,CAAC,CAAC;QAChB,MAAM,SAAS,GAAG,YAAY,CAAC;QAC/B,MAAM,OAAO,GAAG,CAAC,CAAC;QAClB,MAAM,OAAO,GAAG,CAAC,CAAC;QAClB,MAAM,QAAQ,GAAG,cAAc,CAAC;QAChC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC3B,0BACC,0BACC,uBACC,KAAC,EAAE,IACF,EAAE,EAAC,GAAG,EACN,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,YAEf,QAAQ,GACL,GACD,GACE,GACD,CACR,CAAC;QACF,MAAM,EAAE,GAAG,SAAS,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QACjD,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QAC3C,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAClC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1D,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
type Props = PropsWithChildren<{
|
|
3
|
+
className?: string;
|
|
4
|
+
row?: string | number;
|
|
5
|
+
index?: string | number;
|
|
6
|
+
colSpan?: number;
|
|
7
|
+
rowSpan?: number;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const Th: import("react").ComponentType<Props>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
4
|
+
function LunaticTh({ children, className, colSpan, rowSpan }) {
|
|
5
|
+
return (_jsx("th", { className: classnames('lunatic-table-th', className), colSpan: colSpan, rowSpan: rowSpan, children: children }));
|
|
6
|
+
}
|
|
7
|
+
export const Th = slottableComponent('Th', LunaticTh);
|
|
8
|
+
//# sourceMappingURL=Th.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Th.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Th.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAU/D,SAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAS;IAClE,OAAO,CACN,aACC,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,EACpD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,YAEf,QAAQ,GACL,CACL,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,GAAG,kBAAkB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import { Th } from './Th';
|
|
4
|
+
import { expect, describe, it } from 'vitest';
|
|
5
|
+
describe('<Th />', () => {
|
|
6
|
+
const props = {
|
|
7
|
+
index: 1,
|
|
8
|
+
colSpan: 2,
|
|
9
|
+
rowSpan: 3,
|
|
10
|
+
className: 'test-class',
|
|
11
|
+
children: 'test children',
|
|
12
|
+
};
|
|
13
|
+
it('renders children', () => {
|
|
14
|
+
const { getByRole } = render(_jsx("table", { children: _jsx("tr", { children: _jsx(Th, { ...props }) }) }));
|
|
15
|
+
expect(getByRole('columnheader')).toHaveTextContent(props.children);
|
|
16
|
+
});
|
|
17
|
+
it('renders with correct attributes', () => {
|
|
18
|
+
const { getByRole } = render(_jsx("table", { children: _jsx("tr", { children: _jsx(Th, { ...props }) }) }));
|
|
19
|
+
const th = getByRole('columnheader');
|
|
20
|
+
expect(th).toHaveAttribute('colSpan', props.colSpan.toString());
|
|
21
|
+
expect(th).toHaveAttribute('rowSpan', props.rowSpan.toString());
|
|
22
|
+
expect(th).toHaveClass(props.className);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=Th.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Th.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Th.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;IACvB,MAAM,KAAK,GAAG;QACb,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;QACV,SAAS,EAAE,YAAY;QACvB,QAAQ,EAAE,eAAe;KACzB,CAAC;IAEF,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAC3B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC3B,0BACC,uBACC,KAAC,EAAE,OAAK,KAAK,GAAI,GACb,GACE,CACR,CAAC;QACF,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC1C,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC3B,0BACC,uBACC,KAAC,EAAE,OAAK,KAAK,GAAI,GACb,GACE,CACR,CAAC;QACF,MAAM,EAAE,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;QACrC,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAChE,MAAM,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAChE,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
4
|
+
function LunaticThead({ children, className }) {
|
|
5
|
+
return (_jsx("thead", { className: classnames('lunatic-table-thead', className), children: children }));
|
|
6
|
+
}
|
|
7
|
+
export const Thead = slottableComponent('Thead', LunaticThead);
|
|
8
|
+
//# sourceMappingURL=Thead.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thead.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Thead.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAM/D,SAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAS;IACnD,OAAO,CACN,gBAAO,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,SAAS,CAAC,YAC5D,QAAQ,GACF,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,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { Thead } from './Thead';
|
|
4
|
+
import { expect, describe, it } from 'vitest';
|
|
5
|
+
describe('Thead', () => {
|
|
6
|
+
it('renders with the correct class name', () => {
|
|
7
|
+
const props = { className: 'test' };
|
|
8
|
+
render(_jsx(Thead, { ...props }));
|
|
9
|
+
expect(screen.getByRole('rowgroup')).toHaveClass('lunatic-table-thead test');
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=Thead.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Thead.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Thead.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACtB,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC9C,MAAM,KAAK,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QACpC,MAAM,CAAC,KAAC,KAAK,OAAK,KAAK,GAAI,CAAC,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAC/C,0BAA0B,CAC1B,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import { slottableComponent } from '../HOC/slottableComponent';
|
|
4
|
+
function LunaticTr({ children, className }) {
|
|
5
|
+
return (_jsx("tr", { className: classnames('lunatic-table-tr', className), children: children }));
|
|
6
|
+
}
|
|
7
|
+
export const Tr = slottableComponent('Tr', LunaticTr);
|
|
8
|
+
//# sourceMappingURL=Tr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tr.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Tr.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAO/D,SAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAS;IAChD,OAAO,CACN,aAAI,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,YAAG,QAAQ,GAAM,CACzE,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,EAAE,GAAG,kBAAkB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { Tr } from './Tr';
|
|
4
|
+
import { expect, describe, it } from 'vitest';
|
|
5
|
+
describe('Tr', () => {
|
|
6
|
+
it('renders a table row with the correct id and class name', () => {
|
|
7
|
+
render(_jsx("table", { children: _jsx("tbody", { children: _jsx(Tr, { row: 1, className: "highlighted-row" }) }) }));
|
|
8
|
+
const tr = screen.getByRole('row');
|
|
9
|
+
expect(tr).toHaveClass('lunatic-table-tr', 'highlighted-row');
|
|
10
|
+
});
|
|
11
|
+
it('renders the children components', () => {
|
|
12
|
+
render(_jsxs(Tr, { row: 1, children: [_jsx("td", { id: "1", children: "Cell 1,1" }), _jsx("td", { id: "1", children: "Cell 1,2" })] }));
|
|
13
|
+
const cell1 = screen.getByText('Cell 1,1');
|
|
14
|
+
const cell2 = screen.getByText('Cell 1,2');
|
|
15
|
+
expect(cell1).toBeInTheDocument();
|
|
16
|
+
expect(cell2).toBeInTheDocument();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=Tr.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tr.spec.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/Tr.spec.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE;IACnB,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QACjE,MAAM,CACL,0BACC,0BACC,KAAC,EAAE,IAAC,GAAG,EAAE,CAAC,EAAE,SAAS,EAAC,iBAAiB,GAAG,GACnC,GACD,CACR,CAAC;QACF,MAAM,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC1C,MAAM,CACL,MAAC,EAAE,IAAC,GAAG,EAAE,CAAC,aACT,aAAI,EAAE,EAAC,GAAG,yBAAc,EACxB,aAAI,EAAE,EAAC,GAAG,yBAAc,IACpB,CACL,CAAC;QACF,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,CAAC;QAClC,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Table } from './Table';
|
|
2
|
+
export { Tbody } from './Tbody';
|
|
3
|
+
export { Td } from './Td';
|
|
4
|
+
export { Th } from './Th';
|
|
5
|
+
export { Thead } from './Thead';
|
|
6
|
+
export { Tr } from './Tr';
|
|
7
|
+
export { TableHeader } from './TableHeader';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/shared/Table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|