@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
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TextAreaStepProps } from '../TextAreaStep';
|
|
3
2
|
export interface Payload {
|
|
4
3
|
text: string;
|
|
5
4
|
draft: any;
|
|
6
5
|
}
|
|
7
|
-
declare function TextAreaStep({ step, editable, maxLength
|
|
6
|
+
declare function TextAreaStep({ step, editable, maxLength }: TextAreaStepProps): JSX.Element;
|
|
8
7
|
export default TextAreaStep;
|
|
@@ -1,47 +1,31 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import
|
|
2
|
+
import ErkTextField from '../../../Shared/ErkTextField/ErkTextField';
|
|
14
3
|
import styles from './MaterialTextAreaStep.module.css';
|
|
15
4
|
import React from 'react';
|
|
16
5
|
import { useAppSelector } from '../../../hooks';
|
|
17
6
|
import { useFormStep } from '../../StepHooks';
|
|
18
|
-
function TextAreaStep(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _d = useAppSelector(function (state) { return state.global; }), formStyle = _d.formStyle, postview = _d.postview, partial = _d.partial;
|
|
22
|
-
var _e = useFormStep(step, {
|
|
7
|
+
function TextAreaStep({ step, editable, maxLength }) {
|
|
8
|
+
const { formStyle, postview, partial } = useAppSelector((state) => state.global);
|
|
9
|
+
const { ref, value, onChange, error, field } = useFormStep(step, {
|
|
23
10
|
debounce: true,
|
|
24
11
|
defaultValue: '',
|
|
25
12
|
rules: {
|
|
26
13
|
required: step.required ? 'Este campo es obligatorio' : undefined,
|
|
27
14
|
},
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
? '0px'
|
|
33
|
-
: '5px',
|
|
34
|
-
} }, { children: [_jsx("div", __assign({ className: styles.erkTextArea }, { children: _jsx(RoundedTextField, __assign({}, field, { inputRef: ref, value: value, onChange: function (e) { return onChange(e.target.value); }, "data-testid": step.id, maxLength: maxLength, label: step.label, required: step.required, cantEdit: !canEdit, fontWeight: 400, multiline: true, minRows: postview && partial ? undefined : 4, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.stepBackgroundColor, helperTextColor: formStyle.descriptionTextColor, helperText: (_c = (_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : step.description) !== null && _c !== void 0 ? _c : (step.required ? ' ' : null), error: !!error })) })), _jsxs("div", __assign({ className: styles.print }, { children: [value && (_jsxs(React.Fragment, { children: [_jsx("div", __assign({ className: styles.printLbl, style: {
|
|
15
|
+
});
|
|
16
|
+
return (_jsxs("div", { className: styles.container, style: {
|
|
17
|
+
paddingBottom: step.required || step.description || !!error ? '0px' : '5px',
|
|
18
|
+
}, children: [_jsx("div", { className: styles.erkTextArea, children: _jsx(ErkTextField, { ...field, multiline: true, value: value, inputRef: ref, error: !!error, label: step.label, onChange: onChange, "data-testid": step.id, maxLength: maxLength, required: step.required, disabled: !editable || postview, minRows: postview && partial ? undefined : 4, helperText: error?.message ?? step.description ?? (step.required ? ' ' : null) }) }), _jsxs("div", { className: styles.print, children: [value && (_jsxs(React.Fragment, { children: [_jsx("div", { className: styles.printLbl, style: {
|
|
35
19
|
color: formStyle.descriptionTextColor,
|
|
36
|
-
}
|
|
20
|
+
}, children: step.label }), _jsx("div", { className: styles.printLine, style: {
|
|
37
21
|
color: formStyle.stepBackgroundColor,
|
|
38
22
|
backgroundColor: formStyle.stepBackgroundColor,
|
|
39
|
-
}
|
|
23
|
+
}, children: step.label })] })), !value && (_jsx("div", { className: styles.emptyPrintLbl, style: {
|
|
40
24
|
color: formStyle.textColor + '8a',
|
|
41
|
-
}
|
|
25
|
+
}, children: step.label })), _jsx("p", { className: styles.printContainer, style: {
|
|
42
26
|
backgroundColor: formStyle.stepBackgroundColor,
|
|
43
27
|
borderColor: formStyle.outlineColor,
|
|
44
28
|
whiteSpace: 'pre-wrap',
|
|
45
|
-
}
|
|
29
|
+
}, children: value })] })] }));
|
|
46
30
|
}
|
|
47
31
|
export default TextAreaStep;
|
|
@@ -1,28 +1,17 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { useAppSelector } from '../../hooks';
|
|
14
3
|
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
15
4
|
import MaterialTextAreaStep from './MaterialTextAreaStep/MaterialTextAreaStep';
|
|
16
5
|
import MaterialTextAreaEditorStep from './MaterialTextAreaStep/MaterialTextAreaEditorStep';
|
|
17
6
|
function TextAreaStep(props) {
|
|
18
|
-
|
|
7
|
+
const { formStyle } = useAppSelector((state) => state.global);
|
|
19
8
|
switch (formStyle.type) {
|
|
20
9
|
case FormStyleTypes.MATERIAL:
|
|
21
10
|
default: {
|
|
22
11
|
if (props.step.hasTextEditor)
|
|
23
|
-
return _jsx(MaterialTextAreaEditorStep,
|
|
12
|
+
return _jsx(MaterialTextAreaEditorStep, { ...props });
|
|
24
13
|
else
|
|
25
|
-
return _jsx(MaterialTextAreaStep,
|
|
14
|
+
return _jsx(MaterialTextAreaStep, { ...props });
|
|
26
15
|
}
|
|
27
16
|
}
|
|
28
17
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TextInputStepProps } from '../TextInputStep';
|
|
3
|
-
declare function TextInputStep({
|
|
2
|
+
declare function TextInputStep({ step, editable, maxLength, IconComponent, defaultValue, validation, }: TextInputStepProps): JSX.Element;
|
|
4
3
|
export default TextInputStep;
|
|
@@ -1,30 +1,17 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import
|
|
2
|
+
import ErkTextField from '../../../Shared/ErkTextField/ErkTextField';
|
|
14
3
|
import styles from './MaterialTextInputStep.module.css';
|
|
15
4
|
import { calcStepWidth } from '../../StepFunctions';
|
|
16
5
|
import { useContext } from 'react';
|
|
17
6
|
import FormContext from '../../../Contexts/FormContext';
|
|
18
7
|
import { selectBreakPoint, useAppSelector } from '../../../hooks';
|
|
19
8
|
import { useFormStep } from '../../StepHooks';
|
|
20
|
-
function TextInputStep(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var _f = useFormStep(step, {
|
|
27
|
-
defaultValue: defaultValue !== null && defaultValue !== void 0 ? defaultValue : '',
|
|
9
|
+
function TextInputStep({ step, editable, maxLength, IconComponent, defaultValue = step.defaultValue, validation = step.validation, }) {
|
|
10
|
+
const currentBreakPoint = useAppSelector(selectBreakPoint);
|
|
11
|
+
const { postview } = useAppSelector((state) => state.global);
|
|
12
|
+
const form = useContext(FormContext);
|
|
13
|
+
const { ref, value, onChange, error, field } = useFormStep(step, {
|
|
14
|
+
defaultValue: defaultValue ?? '',
|
|
28
15
|
debounce: true,
|
|
29
16
|
rules: {
|
|
30
17
|
required: step.required ? 'Este campo es obligatorio' : undefined,
|
|
@@ -38,15 +25,10 @@ function TextInputStep(_a) {
|
|
|
38
25
|
}
|
|
39
26
|
: undefined,
|
|
40
27
|
},
|
|
41
|
-
})
|
|
42
|
-
return (_jsx("div",
|
|
43
|
-
width: currentBreakPoint <= step.size
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
minHeight: step.description ||
|
|
47
|
-
(!postview && editable && (step.required || validation))
|
|
48
|
-
? '55px'
|
|
49
|
-
: '43px',
|
|
50
|
-
} }, { children: _jsx(RoundedTextField, __assign({}, field, { inputRef: ref, value: value, onChange: function (e) { return onChange(e.target.value); }, maxLength: maxLength, "data-testid": step.id, label: step.label, cantEdit: !editable || postview, required: step.required, fontWeight: 400, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.stepBackgroundColor, helperText: (_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : step.description, helperTextColor: formStyle.descriptionTextColor, error: !!error, icon: step.showIcon ? icon : undefined })) })));
|
|
28
|
+
});
|
|
29
|
+
return (_jsx("div", { className: styles.container, style: {
|
|
30
|
+
width: currentBreakPoint <= step.size ? '100%' : calcStepWidth(step.size, form.size),
|
|
31
|
+
minHeight: step.description || (!postview && editable && (step.required || validation)) ? '55px' : '43px',
|
|
32
|
+
}, children: _jsx(ErkTextField, { ...field, inputRef: ref, value: value, maxLength: maxLength, "data-testid": step.id, label: step.label, readOnly: !editable || postview, required: step.required, error: !!error, IconComponent: step.showIcon ? IconComponent : undefined, onChange: onChange, helperText: error?.message ?? step.description }) }));
|
|
51
33
|
}
|
|
52
34
|
export default TextInputStep;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TextInput } from '../../@Types/FormStep';
|
|
3
2
|
import { StepProps } from '../Step';
|
|
4
3
|
export interface TextInputStepProps extends StepProps {
|
|
5
4
|
/** The TextInputStep to display */
|
|
6
5
|
step: TextInput;
|
|
7
6
|
/** The icon to display */
|
|
8
|
-
|
|
7
|
+
IconComponent?: React.ElementType;
|
|
9
8
|
/** Default value to display */
|
|
10
9
|
defaultValue?: string;
|
|
11
10
|
/** Custom Validation to display */
|
|
@@ -1,24 +1,13 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
14
3
|
import MaterialTextInputStep from './MaterialTextInputStep/MaterialTextInputStep';
|
|
15
4
|
import { useAppSelector } from '../../hooks';
|
|
16
5
|
function TextInputStep(props) {
|
|
17
|
-
|
|
6
|
+
const { formStyle } = useAppSelector((state) => state.global);
|
|
18
7
|
switch (formStyle.type) {
|
|
19
8
|
case FormStyleTypes.MATERIAL:
|
|
20
9
|
default: {
|
|
21
|
-
return _jsx(MaterialTextInputStep,
|
|
10
|
+
return _jsx(MaterialTextInputStep, { ...props });
|
|
22
11
|
}
|
|
23
12
|
}
|
|
24
13
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TimePickerStepProps } from '../TimePickerStep';
|
|
3
|
-
declare function TimePickerStep({ step, editable, defaultValue
|
|
2
|
+
declare function TimePickerStep({ step, editable, defaultValue }: TimePickerStepProps): JSX.Element;
|
|
4
3
|
export default TimePickerStep;
|
|
@@ -1,40 +1,23 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import
|
|
2
|
+
import ErkTimePicker from '../../../Shared/ErkTimePicker/ErkTimePicker';
|
|
14
3
|
import { useAppSelector } from '../../../hooks';
|
|
15
4
|
import { useFormStep } from '../../StepHooks';
|
|
16
5
|
import MaterialInputContainer from '../../Utils/MaterialInputContainer/MaterialInputContainer';
|
|
17
|
-
function TimePickerStep(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var _d = useFormStep(step, {
|
|
22
|
-
defaultValue: defaultValue,
|
|
6
|
+
function TimePickerStep({ step, editable, defaultValue }) {
|
|
7
|
+
const postview = useAppSelector((state) => state.global.postview);
|
|
8
|
+
const { ref, value, onChange, error, field } = useFormStep(step, {
|
|
9
|
+
defaultValue,
|
|
23
10
|
rules: {
|
|
24
|
-
validate:
|
|
11
|
+
validate: (value) => {
|
|
25
12
|
if (step.required) {
|
|
26
|
-
if (!value ||
|
|
27
|
-
!(value.hours ||
|
|
28
|
-
value.minutes ||
|
|
29
|
-
value.days ||
|
|
30
|
-
value.working !== undefined)) {
|
|
13
|
+
if (!value || !(value.hours || value.minutes || value.days || value.working !== undefined)) {
|
|
31
14
|
return 'Este campo es obligatorio';
|
|
32
15
|
}
|
|
33
16
|
}
|
|
34
17
|
return true;
|
|
35
18
|
},
|
|
36
19
|
},
|
|
37
|
-
})
|
|
38
|
-
return (_jsx(MaterialInputContainer,
|
|
20
|
+
});
|
|
21
|
+
return (_jsx(MaterialInputContainer, { step: step, editable: editable, children: _jsx(ErkTimePicker, { ...field, value: value, onChange: onChange, inputRef: ref, readOnly: !editable || postview, label: step.label, helperText: error?.message ?? step.description, error: !!error, required: step.required, pickDays: step.pickDays, minDays: step.minDays, maxDays: step.maxDays, pickHours: step.pickHours, minHours: step.minHours, maxHours: step.maxHours, pickMinutes: step.pickMinutes, minMinutes: step.minMinutes, maxMinutes: step.maxMinutes, working: step.working }) }));
|
|
39
22
|
}
|
|
40
23
|
export default TimePickerStep;
|
|
@@ -1,24 +1,13 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
14
3
|
import { useAppSelector } from '../../hooks';
|
|
15
4
|
import MaterialTimePickerStep from './MaterialTimePickerStep/MaterialTimePickerStep';
|
|
16
5
|
function TimePickerStep(props) {
|
|
17
|
-
|
|
6
|
+
const { formStyle } = useAppSelector((state) => state.global);
|
|
18
7
|
switch (formStyle.type) {
|
|
19
8
|
case FormStyleTypes.MATERIAL:
|
|
20
9
|
default: {
|
|
21
|
-
return _jsx(MaterialTimePickerStep,
|
|
10
|
+
return _jsx(MaterialTimePickerStep, { ...props });
|
|
22
11
|
}
|
|
23
12
|
}
|
|
24
13
|
}
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { calcStepWidth } from '../../StepFunctions';
|
|
14
3
|
import styles from './MaterialTitleStep.module.css';
|
|
@@ -16,30 +5,28 @@ import { useAppSelector } from '../../../hooks';
|
|
|
16
5
|
import FormContext from '../../../Contexts/FormContext';
|
|
17
6
|
import { useContext } from 'react';
|
|
18
7
|
import { useFormStep } from '../../StepHooks';
|
|
19
|
-
function TitleStep(
|
|
20
|
-
|
|
21
|
-
var step = _a.step;
|
|
22
|
-
var value = useFormStep(step, {
|
|
8
|
+
function TitleStep({ step }) {
|
|
9
|
+
const { value } = useFormStep(step, {
|
|
23
10
|
defaultValue: undefined,
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return (_jsxs("div",
|
|
11
|
+
});
|
|
12
|
+
const title = value?.title ?? step.title;
|
|
13
|
+
const description = value?.description ?? step.description;
|
|
14
|
+
const { formStyle } = useAppSelector((state) => state.global);
|
|
15
|
+
const form = useContext(FormContext);
|
|
16
|
+
const widthStats = useAppSelector((state) => state.widthStats);
|
|
17
|
+
const size = step.size ?? form.size.blockNum;
|
|
18
|
+
return (_jsxs("div", { className: styles.container, style: {
|
|
32
19
|
color: formStyle.textColor,
|
|
33
20
|
width: widthStats.currentBreakPoint <= size
|
|
34
21
|
? '100%'
|
|
35
22
|
: calcStepWidth(size, form.size),
|
|
36
|
-
}
|
|
23
|
+
}, children: [title && (_jsx("div", { className: styles.titleLbl, style: {
|
|
37
24
|
textAlign: widthStats.isMobile &&
|
|
38
25
|
widthStats.currentBreakPoint <= size
|
|
39
26
|
? 'center'
|
|
40
27
|
: 'start',
|
|
41
|
-
}
|
|
28
|
+
}, children: title })), description && (_jsx("p", { className: styles.descriptionPar, style: {
|
|
42
29
|
margin: title ? '10px 0px' : '0px 0px 5px 0px',
|
|
43
|
-
}
|
|
30
|
+
}, children: description }))] }));
|
|
44
31
|
}
|
|
45
32
|
export default TitleStep;
|
|
@@ -1,24 +1,13 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { FormStyleTypes } from '../../constants/FormStepTypes';
|
|
14
3
|
import MaterialTitleStep from './MaterialTitleStep/MaterialTitleStep';
|
|
15
4
|
import { useAppSelector } from '../../hooks';
|
|
16
5
|
function TitleStep(props) {
|
|
17
|
-
|
|
6
|
+
const { formStyle } = useAppSelector((state) => state.global);
|
|
18
7
|
switch (formStyle.type) {
|
|
19
8
|
case FormStyleTypes.MATERIAL:
|
|
20
9
|
default: {
|
|
21
|
-
return _jsx(MaterialTitleStep,
|
|
10
|
+
return _jsx(MaterialTitleStep, { ...props });
|
|
22
11
|
}
|
|
23
12
|
}
|
|
24
13
|
}
|
|
@@ -5,5 +5,5 @@ export interface StepFillerContainerProps {
|
|
|
5
5
|
step: FillerSteps;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
}
|
|
8
|
-
declare function StepFillerContainer({ step, children
|
|
8
|
+
declare function StepFillerContainer({ step, children }: StepFillerContainerProps): JSX.Element;
|
|
9
9
|
export default StepFillerContainer;
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
2
|
import { createContext, useCallback, useContext, useState } from 'react';
|
|
14
3
|
import { useFormContext } from 'react-hook-form';
|
|
@@ -16,30 +5,29 @@ import { calcFillerSize } from '../../StepFunctions';
|
|
|
16
5
|
import FormContext from '../../../Contexts/FormContext';
|
|
17
6
|
import styles from './StepFiller.module.css';
|
|
18
7
|
import { selectBreakPoint, useAppSelector } from '../../../hooks';
|
|
19
|
-
export
|
|
20
|
-
function StepFiller(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var handleSizeChange = useCallback(function () {
|
|
8
|
+
export const SizeChangeContext = createContext(undefined);
|
|
9
|
+
function StepFiller({ step, children }) {
|
|
10
|
+
const { getValues } = useFormContext();
|
|
11
|
+
const form = useContext(FormContext);
|
|
12
|
+
const [fillerSize, setFillerSize] = useState(calcFillerSize(step, form.steps, getValues(), form.size));
|
|
13
|
+
const currentBreakPoint = useAppSelector(selectBreakPoint);
|
|
14
|
+
const handleSizeChange = useCallback(() => {
|
|
27
15
|
setFillerSize(calcFillerSize(step, form.steps, getValues(), form.size));
|
|
16
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
17
|
}, []);
|
|
29
18
|
if (step.maxSize && step.maxSize < form.size.blockNum) {
|
|
30
|
-
return (_jsxs("div",
|
|
19
|
+
return (_jsxs("div", { className: styles.firstLvlContainer, style: {
|
|
31
20
|
width: currentBreakPoint <= step.size ? '100%' : 'fit-content',
|
|
32
|
-
}
|
|
21
|
+
}, children: [_jsx(SizeChangeContext.Provider, { value: handleSizeChange, children: children }), fillerSize > 0 && (_jsx("div", { className: styles.smallSeparator, style: {
|
|
33
22
|
width: fillerSize,
|
|
34
|
-
} }))] }))
|
|
23
|
+
} }))] }));
|
|
35
24
|
}
|
|
36
25
|
else {
|
|
37
|
-
return (_jsxs(SizeChangeContext.Provider,
|
|
26
|
+
return (_jsxs(SizeChangeContext.Provider, { value: handleSizeChange, children: [children, step.maxSize && _jsx("div", { className: styles.separator })] }));
|
|
38
27
|
}
|
|
39
28
|
}
|
|
40
|
-
function StepFillerContainer(
|
|
41
|
-
|
|
42
|
-
var handleSizeChange = useContext(SizeChangeContext);
|
|
29
|
+
function StepFillerContainer({ step, children }) {
|
|
30
|
+
const handleSizeChange = useContext(SizeChangeContext);
|
|
43
31
|
if (handleSizeChange)
|
|
44
32
|
return _jsx(_Fragment, { children: children });
|
|
45
33
|
else
|
|
@@ -1,26 +1,14 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { useContext } from 'react';
|
|
14
3
|
import FormContext from '../../../Contexts/FormContext';
|
|
15
4
|
import { useAppSelector, selectBreakPoint } from '../../../hooks';
|
|
16
5
|
import { calcStepWidth } from '../../StepFunctions';
|
|
17
6
|
import styles from './MaterialInputContainer.module.css';
|
|
18
|
-
function MaterialInputContainer(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return (_jsx("div", __assign({ className: styles.container, style: {
|
|
7
|
+
function MaterialInputContainer({ step, editable, children, onClick, maxHeight = true, }) {
|
|
8
|
+
const form = useContext(FormContext);
|
|
9
|
+
const currentBreakPoint = useAppSelector(selectBreakPoint);
|
|
10
|
+
const postview = useAppSelector((state) => state.global.postview);
|
|
11
|
+
return (_jsx("div", { className: styles.container, style: {
|
|
24
12
|
width: currentBreakPoint <= step.size
|
|
25
13
|
? '100%'
|
|
26
14
|
: calcStepWidth(step.size, form.size),
|
|
@@ -30,6 +18,6 @@ function MaterialInputContainer(_a) {
|
|
|
30
18
|
? '55px'
|
|
31
19
|
: '43px'
|
|
32
20
|
: undefined,
|
|
33
|
-
}, onClick: onClick, "data-testid": step.id
|
|
21
|
+
}, onClick: onClick, "data-testid": step.id, children: children }));
|
|
34
22
|
}
|
|
35
23
|
export default MaterialInputContainer;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from './ErkIcon.module.css';
|
|
3
|
+
function ArrowLeftIcon({ className = styles.ErkIcon, ...props }) {
|
|
4
|
+
return (_jsx("svg", { ...props, className: className, version: "1.1", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M14.71 15.88L10.83 12l3.88-3.88c.39-.39.39-1.02 0-1.41a.9959.9959 0 00-1.41 0L8.71 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42z" }) }));
|
|
5
|
+
}
|
|
6
|
+
export default ArrowLeftIcon;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from './ErkIcon.module.css';
|
|
3
|
+
function ArrowRightIcon({ className = styles.ErkIcon, ...props }) {
|
|
4
|
+
return (_jsx("svg", { ...props, className: className, version: "1.1", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M9.29 15.88L13.17 12 9.29 8.12a.9959.9959 0 010-1.41c.39-.39 1.02-.39 1.41 0l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3c-.39.39-1.02.39-1.41 0-.38-.39-.39-1.03 0-1.42z" }) }));
|
|
5
|
+
}
|
|
6
|
+
export default ArrowRightIcon;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IconProps } from './@IconTypes';
|
|
3
|
-
declare function CalendarIcon({ className,
|
|
2
|
+
declare function CalendarIcon({ className, ...props }: IconProps): JSX.Element;
|
|
4
3
|
export default CalendarIcon;
|
|
@@ -1,17 +1,6 @@
|
|
|
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
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return (_jsx("svg",
|
|
2
|
+
import styles from './ErkIcon.module.css';
|
|
3
|
+
function CalendarIcon({ className = styles.ErkIcon, ...props }) {
|
|
4
|
+
return (_jsx("svg", { ...props, className: className, xmlns: "http://www.w3.org/2000/svg", height: "24", viewBox: "-1 -1 26 26", width: "24", children: _jsx("path", { d: "M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z" }) }));
|
|
16
5
|
}
|
|
17
6
|
export default CalendarIcon;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styles from './ErkIcon.module.css';
|
|
3
|
+
function CheckCircleIcon({ className = styles.ErkIcon, ...props }) {
|
|
4
|
+
return (_jsx("svg", { ...props, className: className, version: "1.1", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.88-11.71L10 14.17l-1.88-1.88a.9959.9959 0 00-1.41 0c-.39.39-.39 1.02 0 1.41l2.59 2.59c.39.39 1.02.39 1.41 0L17.3 9.7c.39-.39.39-1.02 0-1.41-.39-.39-1.03-.39-1.42 0z" }) }));
|
|
5
|
+
}
|
|
6
|
+
export default CheckCircleIcon;
|