@arquimedes.co/eureka-forms 2.0.99 → 3.0.1-refactor
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/dist/@Types/FormStep.d.ts +1 -1
- package/dist/App/App.d.ts +1 -3
- package/dist/App/App.js +21 -46
- package/dist/App/AppFunctions.d.ts +1 -1
- package/dist/App/AppFunctions.js +177 -328
- package/dist/App/AppFunctions.test.js +638 -0
- package/dist/App/AppHooks.d.ts +2 -2
- package/dist/App/AppHooks.js +127 -223
- package/dist/App/AppHooks.test.d.ts +1 -0
- package/dist/App/AppHooks.test.js +154 -0
- package/dist/Contexts/CustomContext.d.ts +0 -1
- package/dist/Contexts/CustomContext.js +1 -1
- package/dist/Contexts/FormContext.d.ts +1 -1
- package/dist/Contexts/FormContext.js +3 -2
- package/dist/Contexts/SectionContext.d.ts +0 -1
- package/dist/Contexts/SectionContext.js +1 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +0 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +43 -62
- package/dist/Form/Form.d.ts +1 -2
- package/dist/Form/Form.js +75 -160
- package/dist/Form/FormFunctions.js +64 -114
- package/dist/Form/FormFunctions.test.d.ts +1 -0
- package/dist/Form/FormFunctions.test.js +454 -0
- package/dist/Form/FormHooks.d.ts +0 -1
- package/dist/Form/FormHooks.js +14 -21
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +0 -1
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +34 -105
- package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +1 -2
- package/dist/Form/FormTypes/StepperForm/StepperForm.js +48 -110
- package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +0 -1
- package/dist/Form/Section/MaterialSection/MaterialSection.js +10 -23
- package/dist/Form/Section/MaterialSection/MaterialSection.module.css +0 -2
- package/dist/Form/Section/Section.d.ts +0 -1
- package/dist/Form/Section/Section.js +4 -15
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +0 -1
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.js +30 -65
- package/dist/Form/Terms/Term/Term.d.ts +0 -1
- package/dist/Form/Terms/Term/Term.js +2 -13
- package/dist/Form/Terms/Terms.d.ts +0 -1
- package/dist/Form/Terms/Terms.js +11 -27
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +36 -106
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +2 -13
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +12 -40
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +57 -77
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +46 -111
- package/dist/FormSteps/AYFStepMapper.d.ts +0 -1
- package/dist/FormSteps/AYFStepMapper.js +63 -127
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +0 -1
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.js +2 -13
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +0 -1
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +63 -165
- package/dist/FormSteps/CBRStepMapper.d.ts +0 -1
- package/dist/FormSteps/CBRStepMapper.js +61 -152
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +0 -1
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.js +2 -13
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +0 -1
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +19 -37
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +0 -1
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +2 -13
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +1 -2
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +47 -80
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +0 -1
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.js +3 -26
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +0 -1
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +33 -61
- package/dist/FormSteps/CustomStep.d.ts +0 -1
- package/dist/FormSteps/CustomStep.js +17 -31
- package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +0 -1
- package/dist/FormSteps/DatePickerStep/DatePickerStep.js +2 -13
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +1 -2
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +7 -20
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +0 -1
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.js +2 -13
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +0 -1
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.js +16 -32
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +1 -2
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +94 -180
- package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +0 -1
- package/dist/FormSteps/FileUploadStep/FileUploadStep.js +2 -13
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +0 -1
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +33 -95
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +2 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.js +3 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +0 -2
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +86 -180
- package/dist/FormSteps/MapperStep/MapperStep.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MapperStep.js +2 -13
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +16 -38
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +21 -31
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.js +89 -175
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +20 -47
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +81 -117
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +1 -2
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.js +15 -33
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +0 -1
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.js +2 -13
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +0 -1
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +17 -31
- package/dist/FormSteps/RatingStep/RatingStep.d.ts +0 -1
- package/dist/FormSteps/RatingStep/RatingStep.js +2 -13
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +0 -1
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +35 -61
- package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +0 -1
- package/dist/FormSteps/SelectorStep/SelectorStep.js +2 -13
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +0 -1
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +2 -3
- package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +0 -1
- package/dist/FormSteps/SeparatorStep/SeparatorStep.js +2 -13
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +1 -2
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +77 -142
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +5 -5
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.js +2 -13
- package/dist/FormSteps/Step.d.ts +0 -1
- package/dist/FormSteps/Step.js +29 -58
- package/dist/FormSteps/StepFunctions.d.ts +4 -6
- package/dist/FormSteps/StepFunctions.js +149 -204
- package/dist/FormSteps/StepFunctions.test.d.ts +1 -0
- package/dist/FormSteps/StepFunctions.test.js +695 -0
- package/dist/FormSteps/StepHooks.d.ts +68 -14
- package/dist/FormSteps/StepHooks.js +94 -146
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +0 -1
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +38 -74
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +1 -2
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +12 -28
- package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +0 -1
- package/dist/FormSteps/TextAreaStep/TextAreaStep.js +3 -14
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +1 -2
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +12 -30
- package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +1 -2
- package/dist/FormSteps/TextInputStep/TextInputStep.js +2 -13
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +1 -2
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.js +9 -26
- package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +0 -1
- package/dist/FormSteps/TimePickerStep/TimePickerStep.js +2 -13
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +0 -1
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +13 -26
- package/dist/FormSteps/TitleStep/TitleStep.d.ts +0 -1
- package/dist/FormSteps/TitleStep/TitleStep.js +2 -13
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +1 -1
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.js +14 -26
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +0 -1
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +6 -18
- package/dist/Icons/@IconTypes.d.ts +0 -1
- package/dist/Icons/ArrowLeftIcon.d.ts +3 -0
- package/dist/Icons/ArrowLeftIcon.js +6 -0
- package/dist/Icons/ArrowRightIcon.d.ts +3 -0
- package/dist/Icons/ArrowRightIcon.js +6 -0
- package/dist/Icons/CalendarIcon.d.ts +1 -2
- package/dist/Icons/CalendarIcon.js +3 -14
- package/dist/Icons/CheckCircleIcon.d.ts +3 -0
- package/dist/Icons/CheckCircleIcon.js +6 -0
- package/dist/Icons/CheckboxCheckedIcon.d.ts +3 -0
- package/dist/Icons/CheckboxCheckedIcon.js +6 -0
- package/dist/Icons/CheckboxUncheckedIcon.d.ts +3 -0
- package/dist/Icons/CheckboxUncheckedIcon.js +6 -0
- package/dist/Icons/ClockIcon.d.ts +3 -0
- package/dist/Icons/ClockIcon.js +6 -0
- package/dist/Icons/CloseIcon.d.ts +3 -0
- package/dist/Icons/CloseIcon.js +6 -0
- package/dist/Icons/Construction/LeakIcon.d.ts +2 -2
- package/dist/Icons/Construction/LeakIcon.js +3 -14
- package/dist/Icons/Construction/ProjectIcon.d.ts +2 -2
- package/dist/Icons/Construction/ProjectIcon.js +3 -14
- package/dist/Icons/Construction/PropertyIcon.d.ts +2 -2
- package/dist/Icons/Construction/PropertyIcon.js +3 -14
- package/dist/Icons/Construction/SpaceIcon.d.ts +2 -2
- package/dist/Icons/Construction/SpaceIcon.js +3 -14
- package/dist/Icons/DeleteIcon.d.ts +3 -0
- package/dist/Icons/DeleteIcon.js +6 -0
- package/dist/Icons/DocumentIcon.d.ts +2 -2
- package/dist/Icons/DocumentIcon.js +3 -14
- package/dist/Icons/Entities/CheckListIcon.d.ts +2 -2
- package/dist/Icons/Entities/CheckListIcon.js +3 -14
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -2
- package/dist/Icons/Entities/GenericEntityIcon.js +4 -15
- package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -2
- package/dist/Icons/Entities/HandshakeIcon.js +4 -15
- package/dist/Icons/Entities/SupplierIcon.d.ts +2 -2
- package/dist/Icons/Entities/SupplierIcon.js +4 -15
- package/dist/Icons/ErkIcon.module.css +9 -0
- package/dist/Icons/ErrorIcon.d.ts +3 -0
- package/dist/Icons/ErrorIcon.js +6 -0
- package/dist/Icons/ExpandLessIcon.d.ts +3 -0
- package/dist/Icons/ExpandLessIcon.js +6 -0
- package/dist/Icons/ExpandMoreIcon.d.ts +3 -0
- package/dist/Icons/ExpandMoreIcon.js +6 -0
- package/dist/Icons/FileIcon.d.ts +3 -0
- package/dist/Icons/FileIcon.js +6 -0
- package/dist/Icons/InfoIcon.d.ts +3 -0
- package/dist/Icons/InfoIcon.js +6 -0
- package/dist/Icons/LocationIcon.d.ts +1 -2
- package/dist/Icons/LocationIcon.js +3 -14
- package/dist/Icons/PersonIcon.d.ts +1 -2
- package/dist/Icons/PersonIcon.js +4 -15
- package/dist/Icons/Ratings/DislikeIcon.d.ts +3 -0
- package/dist/Icons/Ratings/DislikeIcon.js +6 -0
- package/dist/Icons/Ratings/DissatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/DissatisfiedIcon.js +6 -0
- package/dist/Icons/Ratings/LikeIcon.d.ts +3 -0
- package/dist/Icons/Ratings/LikeIcon.js +6 -0
- package/dist/Icons/Ratings/SatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/SatisfiedIcon.js +6 -0
- package/dist/Icons/Ratings/StarIcon.d.ts +3 -0
- package/dist/Icons/Ratings/StarIcon.js +6 -0
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +6 -0
- package/dist/Icons/Ratings/VerySatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/VerySatisfiedIcon.js +6 -0
- package/dist/Icons/WarningIcon.d.ts +3 -0
- package/dist/Icons/WarningIcon.js +6 -0
- package/dist/Init.d.ts +1 -0
- package/dist/Init.js +2 -0
- package/dist/Services/FileService.d.ts +1 -1
- package/dist/Services/FileService.js +29 -86
- package/dist/Services/FormService.js +11 -56
- package/dist/Services/OrganizationService.js +11 -62
- package/dist/Shared/CustomBtn/CustomBtn.d.ts +1 -2
- package/dist/Shared/CustomBtn/CustomBtn.js +25 -88
- package/dist/Shared/{RoundedButton/RoundedButton.d.ts → ErkButton/ErkButton.d.ts} +6 -5
- package/dist/Shared/ErkButton/ErkButton.js +31 -0
- package/dist/Shared/{RoundedButton/RoundedButton.stories.d.ts → ErkButton/ErkButton.stories.d.ts} +2 -2
- package/dist/Shared/{RoundedButton/RoundedButton.stories.js → ErkButton/ErkButton.stories.js} +6 -6
- package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +19 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.js +30 -0
- package/dist/Shared/{RoundedCheckBox/RoundedCheckBox.stories.d.ts → ErkCheckbox/ErkCheckBox.stories.d.ts} +2 -7
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.js +37 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +16 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.js +210 -0
- package/dist/Shared/{RoundedDatePicker/RoundedDatePicker.stories.d.ts → ErkDatePicker/ErkDatePicker.stories.d.ts} +3 -16
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.js +103 -0
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.d.ts +16 -0
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.js +83 -0
- package/dist/Shared/ErkSelect/ErkSelect.d.ts +39 -0
- package/dist/Shared/ErkSelect/ErkSelect.js +90 -0
- package/dist/Shared/{RoundedSelect/RoundedSelect.stories.d.ts → ErkSelect/ErkSelect.stories.d.ts} +2 -12
- package/dist/Shared/ErkSelect/ErkSelect.stories.js +64 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.d.ts +28 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.js +56 -0
- package/dist/Shared/{RoundedSmartSelect/RoundedSmartSelect.stories.d.ts → ErkSmartSelect/ErkSmartSelect.stories.d.ts} +2 -12
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.js +167 -0
- package/dist/Shared/ErkTextField/ErkTextField.d.ts +26 -0
- package/dist/Shared/ErkTextField/ErkTextField.js +111 -0
- package/dist/Shared/{RoundedTextField/RoundedTextField.stories.d.ts → ErkTextField/ErkTextField.stories.d.ts} +3 -16
- package/dist/Shared/ErkTextField/ErkTextField.stories.js +105 -0
- package/dist/Shared/{RoundedTimePicker/RoundedTimePicker.d.ts → ErkTimePicker/ErkTimePicker.d.ts} +6 -16
- package/dist/Shared/ErkTimePicker/ErkTimePicker.js +131 -0
- package/dist/Shared/InputIcon/InputIcon.d.ts +2 -2
- package/dist/Shared/InputIcon/InputIcon.js +25 -48
- package/dist/Shared/Loader/Loader.d.ts +0 -1
- package/dist/Shared/Loader/Loader.js +6 -18
- package/dist/Shared/Navbar/Navbar.d.ts +0 -1
- package/dist/Shared/Navbar/Navbar.js +2 -14
- package/dist/Shared/Navbar/Navbar.stories.js +2 -2
- package/dist/Shared/Rating/Rating.d.ts +3 -5
- package/dist/Shared/Rating/Rating.js +4 -27
- package/dist/Shared/Rating/Rating.stories.js +13 -19
- package/dist/Shared/Rating/Ratings/LikeRating.d.ts +1 -2
- package/dist/Shared/Rating/Ratings/LikeRating.js +19 -33
- package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +1 -2
- package/dist/Shared/Rating/Ratings/SatisfactionRating.js +27 -47
- package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +1 -2
- package/dist/Shared/Rating/Ratings/ScaleRating.js +23 -54
- package/dist/Shared/Toggle/Toggle.d.ts +4 -14
- package/dist/Shared/Toggle/Toggle.js +11 -34
- package/dist/States/GlobalSlice.d.ts +4 -4
- package/dist/States/GlobalSlice.js +6 -17
- package/dist/States/SiteSlice.d.ts +30 -48
- package/dist/States/SiteSlice.js +58 -76
- package/dist/States/WidthStatsSlice.d.ts +2 -2
- package/dist/States/WidthStatsSlice.js +8 -9
- package/dist/Utils/AxiosAPI.js +3 -3
- package/dist/Utils/AxiosWidget.js +4 -4
- package/dist/Utils/CBRFunctions.js +29 -30
- package/dist/Utils/DraftFunctions.d.ts +3 -3
- package/dist/Utils/DraftFunctions.js +102 -143
- package/dist/Utils/FormStepFunctions.d.ts +1 -1
- package/dist/Utils/FormStepFunctions.js +27 -45
- package/dist/Utils/LocaleUtils.d.ts +2 -0
- package/dist/Utils/LocaleUtils.js +12 -0
- package/dist/Utils/MaterialProviders.d.ts +20 -1
- package/dist/Utils/MaterialProviders.js +43 -28
- package/dist/Utils/MuiClassnameSetup.js +3 -0
- package/dist/Utils/PhoneFunctions.js +5 -5
- package/dist/Utils/TestUtils.d.ts +55 -62
- package/dist/Utils/TestUtils.js +22 -51
- package/dist/Utils/store.d.ts +4 -2
- package/dist/Utils/store.js +10 -65
- package/dist/Widget.js +15 -26
- package/dist/constants/Draft/DraftEntityDataTypes.d.ts +3 -3
- package/dist/constants/Files/FileExtensions.js +3 -3
- package/dist/constants/Files/FileMaxSize.js +1 -1
- package/dist/constants/InternalFormStyle.js +1 -1
- package/dist/hooks.js +14 -16
- package/dist/index.css +4 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +22 -0
- package/package.json +108 -124
- package/dist/Shared/RoundedButton/RoundedButton.js +0 -45
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.d.ts +0 -24
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.js +0 -101
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.js +0 -50
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.d.ts +0 -49
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.js +0 -351
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.js +0 -223
- package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.d.ts +0 -43
- package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.js +0 -226
- package/dist/Shared/RoundedSelect/RoundedSelect.d.ts +0 -68
- package/dist/Shared/RoundedSelect/RoundedSelect.js +0 -214
- package/dist/Shared/RoundedSelect/RoundedSelect.stories.js +0 -91
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +0 -63
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.js +0 -236
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.js +0 -318
- package/dist/Shared/RoundedTextField/RoundedTextField.d.ts +0 -45
- package/dist/Shared/RoundedTextField/RoundedTextField.js +0 -175
- package/dist/Shared/RoundedTextField/RoundedTextField.stories.js +0 -224
- package/dist/Shared/RoundedTimePicker/RoundedTimePicker.js +0 -314
- package/dist/__mocks__/axios.d.ts +0 -2
- package/dist/__mocks__/axios.js +0 -2
- package/dist/constants/MaterialClassNameSeed.js +0 -1
- package/dist/index.js +0 -31
- /package/dist/{index.d.ts → App/AppFunctions.test.d.ts} +0 -0
- /package/dist/Shared/{RoundedTimePicker/RoundedTimePicker.module.css → ErkTimePicker/ErkTimePicker.module.css} +0 -0
- /package/dist/{constants/MaterialClassNameSeed.d.ts → Utils/MuiClassnameSetup.d.ts} +0 -0
- /package/dist/{setupTests.d.ts → __tests__/setup.d.ts} +0 -0
- /package/dist/{setupTests.js → __tests__/setup.js} +0 -0
package/dist/hooks.js
CHANGED
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { createDispatchHook, createSelectorHook } from 'react-redux';
|
|
2
|
-
import { defaultRootState
|
|
2
|
+
import { defaultRootState } from './Utils/store';
|
|
3
3
|
import { useContext } from 'react';
|
|
4
|
-
import { IdFormContext } from './App/App';
|
|
5
4
|
import React from 'react';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { IdFormContext } from './Contexts/FormContext';
|
|
6
|
+
export const StoreContext = React.createContext({});
|
|
7
|
+
const useSelector = createSelectorHook(StoreContext);
|
|
8
|
+
const useDispatch = createDispatchHook(StoreContext);
|
|
9
9
|
// Use throughout your app instead of plain `useDispatch` and `useSelector`
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
action.meta = { idForm
|
|
10
|
+
export const useAppDispatch = () => {
|
|
11
|
+
const idForm = useContext(IdFormContext);
|
|
12
|
+
const dispatch = useDispatch();
|
|
13
|
+
const appDispatch = (action) => {
|
|
14
|
+
action.meta = { idForm };
|
|
15
15
|
return dispatch(action);
|
|
16
16
|
};
|
|
17
17
|
return appDispatch;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
return useSelector(
|
|
22
|
-
};
|
|
23
|
-
export var selectBreakPoint = function (state) {
|
|
24
|
-
return state.widthStats.currentBreakPoint;
|
|
19
|
+
export const useAppSelector = (selector, options) => {
|
|
20
|
+
const idForm = useContext(IdFormContext);
|
|
21
|
+
return useSelector((state) => selector(state[idForm] ?? defaultRootState), options);
|
|
25
22
|
};
|
|
23
|
+
export const selectBreakPoint = (state) => state.widthStats.currentBreakPoint;
|
package/dist/index.css
ADDED
package/dist/main.d.ts
ADDED
package/dist/main.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './Init.ts';
|
|
3
|
+
import ReactDOM from 'react-dom/client';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
import App from './App/App';
|
|
6
|
+
import './index.css';
|
|
7
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
8
|
+
const values = urlParams.get('data-values');
|
|
9
|
+
let dataValues = undefined;
|
|
10
|
+
if (values) {
|
|
11
|
+
try {
|
|
12
|
+
dataValues = JSON.parse(decodeURIComponent(values));
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
console.error('Invalid data-values JSON', error);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
ReactDOM.createRoot(document.getElementById('eureka-root')).render(_jsx("div", { className: styles.eurekaForm, children: _jsx(App, { isWidget: false, idOrganization: urlParams.get('idOrganization') ?? undefined, apiKey: window.location.pathname.replace('/', ''), valuesData: dataValues, scrollToTop: () => {
|
|
19
|
+
location.href = '#';
|
|
20
|
+
location.href = '#eureka-root';
|
|
21
|
+
location.href = '#';
|
|
22
|
+
} }) }));
|
package/package.json
CHANGED
|
@@ -1,127 +1,111 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"browserslist": {
|
|
45
|
-
"production": [
|
|
46
|
-
">0.2%",
|
|
47
|
-
"not dead",
|
|
48
|
-
"not op_mini all"
|
|
49
|
-
],
|
|
50
|
-
"development": [
|
|
51
|
-
"last 1 chrome version",
|
|
52
|
-
"last 1 firefox version",
|
|
53
|
-
"last 1 safari version"
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
"devDependencies": {
|
|
57
|
-
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
58
|
-
"@babel/preset-env": "^7.23.5",
|
|
59
|
-
"@babel/preset-react": "^7.23.3",
|
|
60
|
-
"@babel/preset-typescript": "^7.23.3",
|
|
61
|
-
"@faker-js/faker": "^8.3.1",
|
|
62
|
-
"@storybook/addon-coverage": "^1.0.0",
|
|
63
|
-
"@storybook/addon-essentials": "^7.6.4",
|
|
64
|
-
"@storybook/addon-interactions": "^7.6.4",
|
|
65
|
-
"@storybook/addon-links": "^7.6.4",
|
|
66
|
-
"@storybook/addon-onboarding": "^1.0.9",
|
|
67
|
-
"@storybook/addon-themes": "^7.6.4",
|
|
68
|
-
"@storybook/blocks": "^7.6.4",
|
|
69
|
-
"@storybook/react": "^7.6.4",
|
|
70
|
-
"@storybook/react-webpack5": "^7.6.4",
|
|
71
|
-
"@storybook/test": "^7.6.4",
|
|
72
|
-
"@storybook/testing-library": "^0.2.2",
|
|
73
|
-
"@testing-library/dom": "^9.3.3",
|
|
74
|
-
"@testing-library/jest-dom": "^6.1.5",
|
|
75
|
-
"@testing-library/react": "^12.1.5",
|
|
76
|
-
"@testing-library/react-hooks": "^8.0.1",
|
|
77
|
-
"@testing-library/user-event": "^14.5.1",
|
|
78
|
-
"@types/draft-js": "^0.11.16",
|
|
79
|
-
"@types/jest": "^29.5.10",
|
|
80
|
-
"@types/react": "^17.0.71",
|
|
81
|
-
"@types/react-dom": "^17.0.25",
|
|
82
|
-
"@types/react-draft-wysiwyg": "^1.13.7",
|
|
83
|
-
"@types/react-google-recaptcha": "^2.1.8",
|
|
84
|
-
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
85
|
-
"@typescript-eslint/parser": "^6.13.1",
|
|
86
|
-
"chromatic": "^10.0.0",
|
|
87
|
-
"cypress": "^13.8.1",
|
|
88
|
-
"dotenv-webpack": "^8.0.1",
|
|
89
|
-
"eslint": "^8.55.0",
|
|
90
|
-
"eslint-config-prettier": "^9.1.0",
|
|
91
|
-
"eslint-plugin-css-modules": "^2.12.0",
|
|
92
|
-
"eslint-plugin-prettier": "^5.0.1",
|
|
93
|
-
"eslint-plugin-storybook": "^0.6.15",
|
|
94
|
-
"identity-obj-proxy": "^3.0.0",
|
|
95
|
-
"jest": "^29.7.0",
|
|
96
|
-
"jest-environment-jsdom": "^29.7.0",
|
|
97
|
-
"jest-junit": "^16.0.0",
|
|
98
|
-
"jest-mock-axios": "^4.7.3",
|
|
99
|
-
"prettier": "^3.1.0",
|
|
100
|
-
"react-docgen-typescript": "^2.2.2",
|
|
101
|
-
"react-refresh": "^0.11.0",
|
|
102
|
-
"react-scripts": "5.0.1",
|
|
103
|
-
"storybook": "^7.6.4",
|
|
104
|
-
"storybook-mock-date-decorator": "^1.0.1",
|
|
105
|
-
"ts-jest": "^29.1.1"
|
|
106
|
-
},
|
|
107
|
-
"peerDependencies": {
|
|
108
|
-
"react": "^17.x.x",
|
|
109
|
-
"react-dom": "^17.x.x"
|
|
110
|
-
},
|
|
111
|
-
"publishConfig": {
|
|
112
|
-
"access": "public"
|
|
113
|
-
},
|
|
114
|
-
"main": "./dist/index.lib.js",
|
|
115
|
-
"files": [
|
|
116
|
-
"/dist"
|
|
2
|
+
"name": "@arquimedes.co/eureka-forms",
|
|
3
|
+
"repository": "git://github.com/Arquimede5/Eureka-Forms.git",
|
|
4
|
+
"version":"3.0.1-refactor",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"watch": "tsc --noEmit --watch --project tsconfig.app.json",
|
|
7
|
+
"start": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"format": "prettier --write ./src",
|
|
10
|
+
"lint": "eslint ./src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"test": "vitest",
|
|
13
|
+
"tsc-build": "tsc --p tsconfig.app.json --noEmit false --outDir ./dist --composite false --declaration true --allowImportingTsExtensions false",
|
|
14
|
+
"storybook": "storybook dev -p 6006",
|
|
15
|
+
"build-storybook": "storybook build",
|
|
16
|
+
"cypress": "DISPLAY=:0 cypress open"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@emotion/react": "^11.13.3",
|
|
20
|
+
"@emotion/styled": "^11.13.0",
|
|
21
|
+
"@mui/material": "^6.1.3",
|
|
22
|
+
"@mui/x-date-pickers": "^7.19.0",
|
|
23
|
+
"@reduxjs/toolkit": "^2.2.8",
|
|
24
|
+
"axios": "^1.7.7",
|
|
25
|
+
"date-fns": "^4.1.0",
|
|
26
|
+
"draft-js": "^0.11.7",
|
|
27
|
+
"i18n-iso-countries": "^7.12.0",
|
|
28
|
+
"libphonenumber-js": "^1.11.11",
|
|
29
|
+
"logrocket": "^9.0.0",
|
|
30
|
+
"nanoid": "^5.0.7",
|
|
31
|
+
"react-draft-wysiwyg": "^1.15.0",
|
|
32
|
+
"react-google-recaptcha": "^3.1.0",
|
|
33
|
+
"react-hook-form": "^7.53.0",
|
|
34
|
+
"react-international-phone": "^4.3.0",
|
|
35
|
+
"react-redux": "^9.1.2",
|
|
36
|
+
"typescript": "^5.6.2"
|
|
37
|
+
},
|
|
38
|
+
"eslintConfig": {},
|
|
39
|
+
"browserslist": {
|
|
40
|
+
"production": [
|
|
41
|
+
">0.2%",
|
|
42
|
+
"not dead",
|
|
43
|
+
"not op_mini all"
|
|
117
44
|
],
|
|
118
|
-
"
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
45
|
+
"development": [
|
|
46
|
+
"last 1 chrome version",
|
|
47
|
+
"last 1 firefox version",
|
|
48
|
+
"last 1 safari version"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
53
|
+
"@babel/preset-env": "^7.25.7",
|
|
54
|
+
"@babel/preset-react": "^7.25.7",
|
|
55
|
+
"@babel/preset-typescript": "^7.25.7",
|
|
56
|
+
"@faker-js/faker": "^9.0.3",
|
|
57
|
+
"@storybook/addon-coverage": "^1.0.4",
|
|
58
|
+
"@storybook/addon-essentials": "^8.3.5",
|
|
59
|
+
"@storybook/addon-interactions": "^8.3.5",
|
|
60
|
+
"@storybook/addon-links": "^8.3.5",
|
|
61
|
+
"@storybook/addon-onboarding": "^8.3.5",
|
|
62
|
+
"@storybook/addon-themes": "^8.3.5",
|
|
63
|
+
"@storybook/blocks": "^8.3.5",
|
|
64
|
+
"@storybook/react": "^8.3.5",
|
|
65
|
+
"@storybook/react-webpack5": "^8.3.5",
|
|
66
|
+
"@storybook/test": "^8.3.5",
|
|
67
|
+
"@storybook/testing-library": "^0.2.2",
|
|
68
|
+
"@testing-library/dom": "^10.4.0",
|
|
69
|
+
"@testing-library/jest-dom": "^6.4.8",
|
|
70
|
+
"@testing-library/react": "^16.0.1",
|
|
71
|
+
"@testing-library/user-event": "^14.5.2",
|
|
72
|
+
"@types/draft-js": "^0.11.18",
|
|
73
|
+
"@types/react": "^18.3.11",
|
|
74
|
+
"@types/react-dom": "^18.3.0",
|
|
75
|
+
"@types/react-draft-wysiwyg": "^1.13.8",
|
|
76
|
+
"@types/react-google-recaptcha": "^2.1.9",
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^8.8.1",
|
|
78
|
+
"@typescript-eslint/parser": "^8.8.1",
|
|
79
|
+
"@vitejs/plugin-react-swc": "^3.7.1",
|
|
80
|
+
"chromatic": "^11.12.5",
|
|
81
|
+
"cypress": "^13.15.0",
|
|
82
|
+
"dotenv-webpack": "^8.1.0",
|
|
83
|
+
"eslint": "^8.57.1",
|
|
84
|
+
"eslint-config-prettier": "^9.1.0",
|
|
85
|
+
"eslint-plugin-react": "^7.37.1",
|
|
86
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
87
|
+
"eslint-plugin-react-refresh": "^0.4.12",
|
|
88
|
+
"eslint-plugin-storybook": "^0.9.0",
|
|
89
|
+
"identity-obj-proxy": "^3.0.0",
|
|
90
|
+
"jsdom": "^25.0.1",
|
|
91
|
+
"prettier": "3.3.3",
|
|
92
|
+
"react-docgen-typescript": "^2.2.2",
|
|
93
|
+
"react-refresh": "^0.14.2",
|
|
94
|
+
"storybook": "^8.3.5",
|
|
95
|
+
"storybook-mock-date-decorator": "^2.0.6",
|
|
96
|
+
"vite": "^5.4.8",
|
|
97
|
+
"vite-plugin-svgr": "^4.2.0",
|
|
98
|
+
"vitest": "^2.1.2"
|
|
99
|
+
},
|
|
100
|
+
"peerDependencies": {
|
|
101
|
+
"react": "^18.x.x",
|
|
102
|
+
"react-dom": "^18.x.x"
|
|
103
|
+
},
|
|
104
|
+
"publishConfig": {
|
|
105
|
+
"access": "public"
|
|
106
|
+
},
|
|
107
|
+
"main": "./dist/index.lib.js",
|
|
108
|
+
"files": [
|
|
109
|
+
"/dist"
|
|
110
|
+
]
|
|
127
111
|
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { Button, withStyles } from '@material-ui/core';
|
|
14
|
-
/**
|
|
15
|
-
* Generic rounded button
|
|
16
|
-
*/
|
|
17
|
-
function RoundedButton(_a) {
|
|
18
|
-
var text = _a.text, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.color, color = _c === void 0 ? '#ffffff' : _c, onClick = _a.onClick, disabled = _a.disabled, _d = _a.fontSize, fontSize = _d === void 0 ? '1rem' : _d, _e = _a.padding, padding = _e === void 0 ? '0 13px 0 13px' : _e, _f = _a.borderRadius, borderRadius = _f === void 0 ? 10 : _f, _g = _a.height, height = _g === void 0 ? 28 : _g, _h = _a.bold, bold = _h === void 0 ? false : _h, _j = _a.width, width = _j === void 0 ? 'fit-content' : _j;
|
|
19
|
-
var CustomButton = withStyles({
|
|
20
|
-
root: {
|
|
21
|
-
width: width,
|
|
22
|
-
textTransform: 'none',
|
|
23
|
-
fontFamily: 'inherit',
|
|
24
|
-
fontSize: fontSize,
|
|
25
|
-
borderRadius: borderRadius,
|
|
26
|
-
padding: padding,
|
|
27
|
-
height: height,
|
|
28
|
-
boxShadow: 'none',
|
|
29
|
-
backgroundColor: backgroundColor,
|
|
30
|
-
color: color,
|
|
31
|
-
'&:hover': {
|
|
32
|
-
boxShadow: 'none',
|
|
33
|
-
backgroundColor: backgroundColor,
|
|
34
|
-
},
|
|
35
|
-
'&:disabled': {
|
|
36
|
-
backgroundColor: backgroundColor,
|
|
37
|
-
color: color,
|
|
38
|
-
opacity: 0.5,
|
|
39
|
-
},
|
|
40
|
-
fontWeight: bold ? 'bold' : 'normal',
|
|
41
|
-
},
|
|
42
|
-
})(Button);
|
|
43
|
-
return (_jsx(CustomButton, __assign({ variant: "contained", onMouseDown: onClick, disabled: disabled }, { children: text })));
|
|
44
|
-
}
|
|
45
|
-
export default RoundedButton;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CheckboxProps } from '@material-ui/core';
|
|
3
|
-
interface StyleProps {
|
|
4
|
-
error?: boolean;
|
|
5
|
-
padding?: string;
|
|
6
|
-
uncheckedColor?: string;
|
|
7
|
-
checkedColor?: string;
|
|
8
|
-
checkedHoverColor?: string;
|
|
9
|
-
errorColor?: string;
|
|
10
|
-
disabledColor?: string;
|
|
11
|
-
size?: number | string;
|
|
12
|
-
cantEdit?: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface ComponentProps extends StyleProps, Omit<CheckboxProps, 'size' | 'onChange'> {
|
|
15
|
-
onChange?: (checked: boolean) => void;
|
|
16
|
-
checked: boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Generic datepicker with apps designs. Is class due to the use in the react-hook-forms library
|
|
20
|
-
*/
|
|
21
|
-
declare class RoundedCheckBox extends React.Component<ComponentProps> {
|
|
22
|
-
render(): JSX.Element;
|
|
23
|
-
}
|
|
24
|
-
export default RoundedCheckBox;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
-
var t = {};
|
|
29
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
-
t[p] = s[p];
|
|
31
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
-
t[p[i]] = s[p[i]];
|
|
35
|
-
}
|
|
36
|
-
return t;
|
|
37
|
-
};
|
|
38
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
39
|
-
import React from 'react';
|
|
40
|
-
import { Checkbox, makeStyles } from '@material-ui/core';
|
|
41
|
-
import CheckBoxRoundedIcon from '@material-ui/icons/CheckBoxRounded';
|
|
42
|
-
import CheckBoxOutlineBlankRoundedIcon from '@material-ui/icons/CheckBoxOutlineBlankRounded';
|
|
43
|
-
var useCheckBoxStyles = function (props) {
|
|
44
|
-
return makeStyles(function () { return ({
|
|
45
|
-
root: {
|
|
46
|
-
padding: props.padding,
|
|
47
|
-
fontSize: props.size,
|
|
48
|
-
color: props.error ? props.errorColor : props.uncheckedColor,
|
|
49
|
-
'&.Mui-checked': {
|
|
50
|
-
color: props.checkedColor,
|
|
51
|
-
},
|
|
52
|
-
'&.Mui-checked:hover': {
|
|
53
|
-
backgroundColor: props.checkedHoverColor,
|
|
54
|
-
},
|
|
55
|
-
'&.Mui-disabled': {
|
|
56
|
-
cursor: 'default',
|
|
57
|
-
pointerEvents: 'all !important',
|
|
58
|
-
color: props.cantEdit
|
|
59
|
-
? props.disabledColor
|
|
60
|
-
: props.checkedColor,
|
|
61
|
-
},
|
|
62
|
-
'&:hover': {
|
|
63
|
-
backgroundColor: props.cantEdit
|
|
64
|
-
? 'transparent'
|
|
65
|
-
: props.checkedHoverColor,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
}); });
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* Generic rounded checkbox
|
|
72
|
-
*/
|
|
73
|
-
function CustomCheckBox(_a) {
|
|
74
|
-
var _b = _a.padding, padding = _b === void 0 ? '9px' : _b, onChange = _a.onChange, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? '1.5rem' : _d, _e = _a.checkedColor, checkedColor = _e === void 0 ? '#3d5a7f' : _e, _f = _a.uncheckedColor, uncheckedColor = _f === void 0 ? '#787878' : _f, _g = _a.disabledColor, disabledColor = _g === void 0 ? '#A0A0A0' : _g, _h = _a.errorColor, errorColor = _h === void 0 ? '#cc2936' : _h, _j = _a.cantEdit, cantEdit = _j === void 0 ? false : _j, checked = _a.checked, others = __rest(_a, ["padding", "onChange", "error", "size", "checkedColor", "uncheckedColor", "disabledColor", "errorColor", "cantEdit", "checked"]);
|
|
75
|
-
var classes = useCheckBoxStyles({
|
|
76
|
-
size: size,
|
|
77
|
-
error: error,
|
|
78
|
-
padding: padding,
|
|
79
|
-
cantEdit: cantEdit,
|
|
80
|
-
errorColor: errorColor,
|
|
81
|
-
checkedColor: checkedColor,
|
|
82
|
-
disabledColor: disabledColor,
|
|
83
|
-
uncheckedColor: uncheckedColor,
|
|
84
|
-
checkedHoverColor: checkedColor + '0a',
|
|
85
|
-
})();
|
|
86
|
-
return (_jsx(Checkbox, __assign({}, others, { disabled: cantEdit, classes: classes, checked: checked, onChange: function (event) { return onChange === null || onChange === void 0 ? void 0 : onChange(event.target.checked); }, required: true, icon: _jsx(CheckBoxOutlineBlankRoundedIcon, { fontSize: "inherit" }), checkedIcon: _jsx(CheckBoxRoundedIcon, { fontSize: "inherit" }) })));
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Generic datepicker with apps designs. Is class due to the use in the react-hook-forms library
|
|
90
|
-
*/
|
|
91
|
-
var RoundedCheckBox = /** @class */ (function (_super) {
|
|
92
|
-
__extends(RoundedCheckBox, _super);
|
|
93
|
-
function RoundedCheckBox() {
|
|
94
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
95
|
-
}
|
|
96
|
-
RoundedCheckBox.prototype.render = function () {
|
|
97
|
-
return _jsx(CustomCheckBox, __assign({}, this.props));
|
|
98
|
-
};
|
|
99
|
-
return RoundedCheckBox;
|
|
100
|
-
}(React.Component));
|
|
101
|
-
export default RoundedCheckBox;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import RoundedCheckBox from './RoundedCheckBox';
|
|
2
|
-
var meta = {
|
|
3
|
-
component: RoundedCheckBox,
|
|
4
|
-
tags: ['autodocs'],
|
|
5
|
-
args: {
|
|
6
|
-
checkedColor: '#3d5a7f',
|
|
7
|
-
uncheckedColor: '#787878',
|
|
8
|
-
disabledColor: '#A0A0A0',
|
|
9
|
-
size: '1.5rem',
|
|
10
|
-
errorColor: '#cc2936',
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
export var Uncheked = {
|
|
15
|
-
args: {
|
|
16
|
-
checked: false,
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
export var Checked = {
|
|
20
|
-
args: {
|
|
21
|
-
checked: true,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
export var Error = {
|
|
25
|
-
args: {
|
|
26
|
-
checked: false,
|
|
27
|
-
error: true,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
export var Disabled = {
|
|
31
|
-
args: {
|
|
32
|
-
checked: false,
|
|
33
|
-
disabled: true,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
export var ErrorColor = {
|
|
37
|
-
args: {
|
|
38
|
-
checked: false,
|
|
39
|
-
error: true,
|
|
40
|
-
errorColor: 'blue',
|
|
41
|
-
},
|
|
42
|
-
};
|
|
43
|
-
export var DifferentColors = {
|
|
44
|
-
args: {
|
|
45
|
-
checked: true,
|
|
46
|
-
checkedColor: 'red',
|
|
47
|
-
uncheckedColor: 'blue',
|
|
48
|
-
disabledColor: '#A0A0A0',
|
|
49
|
-
},
|
|
50
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DatePickerProps } from '@material-ui/pickers';
|
|
3
|
-
interface StyleProps {
|
|
4
|
-
/** The color of the text */
|
|
5
|
-
textColor?: string;
|
|
6
|
-
/** The color of the outline when selected and hovered on */
|
|
7
|
-
focusColor?: string;
|
|
8
|
-
hoverColor?: string;
|
|
9
|
-
/** The color of the error to display */
|
|
10
|
-
errorColor?: string;
|
|
11
|
-
/** The color of the outline when it is not selected */
|
|
12
|
-
outlineColor?: string;
|
|
13
|
-
/** The backgroundColor of the input */
|
|
14
|
-
backgroundColor?: string;
|
|
15
|
-
/** The secondary color of the dialog */
|
|
16
|
-
secondaryColor?: string;
|
|
17
|
-
/** The contrastColor of the input */
|
|
18
|
-
contrastColor?: string;
|
|
19
|
-
/** The accent color of the input */
|
|
20
|
-
accentColor?: string;
|
|
21
|
-
/** The borderRadius of the input */
|
|
22
|
-
borderRadius?: number;
|
|
23
|
-
/** If it should display the timePicker */
|
|
24
|
-
pickTime?: boolean;
|
|
25
|
-
/** The padding of the input */
|
|
26
|
-
padding?: string;
|
|
27
|
-
/** The size of the font to display the input in */
|
|
28
|
-
fontSize?: number | string;
|
|
29
|
-
/** The weight of the font of the value and the placeholder */
|
|
30
|
-
fontWeight?: number | string;
|
|
31
|
-
/** The fontsize of the shrunken label */
|
|
32
|
-
shrunkenFontSize?: number | string;
|
|
33
|
-
/** Cant edit */
|
|
34
|
-
cantEdit?: boolean;
|
|
35
|
-
/** The color of the helper text when not error */
|
|
36
|
-
helperTextColor?: string;
|
|
37
|
-
/** Height of the component */
|
|
38
|
-
height?: string;
|
|
39
|
-
}
|
|
40
|
-
interface RoundedDatePickerProps extends Omit<DatePickerProps, 'ref'>, StyleProps {
|
|
41
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Generic datepicker with apps designs. Is class due to the use in the react-hook-forms library
|
|
45
|
-
*/
|
|
46
|
-
declare class RoundedDatePicker extends React.Component<RoundedDatePickerProps> {
|
|
47
|
-
render(): JSX.Element;
|
|
48
|
-
}
|
|
49
|
-
export default RoundedDatePicker;
|