@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,43 +1,29 @@
|
|
|
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
|
|
14
|
-
import
|
|
2
|
+
import { useTheme } from '@mui/material';
|
|
3
|
+
import DislikeIcon from '../../../Icons/Ratings/DislikeIcon';
|
|
4
|
+
import LikeIcon from '../../../Icons/Ratings/LikeIcon';
|
|
15
5
|
import styles from '../Rating.module.css';
|
|
16
|
-
function LikeRating(
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
function LikeRating({ disabled, inputRef, value, onChange }) {
|
|
7
|
+
const { palette } = useTheme();
|
|
8
|
+
const focusColor = palette.primary.main;
|
|
9
|
+
const unSelectedColor = palette.outline.main;
|
|
10
|
+
return (_jsxs("div", { className: styles.ratingContainer, style: {
|
|
19
11
|
'--eureka-primary': focusColor,
|
|
20
12
|
'--eureka-outline': unSelectedColor,
|
|
21
|
-
}
|
|
22
|
-
? styles.disabledIconContainer
|
|
23
|
-
: styles.iconContainer, style: { height: 70 }, onClick: function () {
|
|
13
|
+
}, children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, style: { height: 70 }, onClick: () => {
|
|
24
14
|
if (!disabled)
|
|
25
15
|
onChange(value === 1 ? null : 1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
31
|
-
? styles.disabledIconContainer
|
|
32
|
-
: styles.iconContainer, style: { height: 70 }, onClick: function () {
|
|
16
|
+
}, children: _jsx(LikeIcon, { style: {
|
|
17
|
+
fontSize: 'inherit',
|
|
18
|
+
color: value === 1 ? focusColor : undefined,
|
|
19
|
+
} }) }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, style: { height: 70 }, onClick: () => {
|
|
33
20
|
if (!disabled)
|
|
34
21
|
onChange(value === 0 ? null : 0);
|
|
35
|
-
}
|
|
36
|
-
?
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
: { marginTop: 14, marginLeft: 15 } }) }))] })));
|
|
22
|
+
}, children: _jsx(DislikeIcon, { style: {
|
|
23
|
+
color: value === 0 ? focusColor : undefined,
|
|
24
|
+
fontSize: 'inherit',
|
|
25
|
+
marginTop: 14,
|
|
26
|
+
marginLeft: 15,
|
|
27
|
+
} }) })] }));
|
|
42
28
|
}
|
|
43
29
|
export default LikeRating;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RatingProps } from '../Rating';
|
|
3
|
-
declare function SatisfactionRating({ value, inputRef, disabled, onChange
|
|
2
|
+
declare function SatisfactionRating({ value, inputRef, disabled, onChange }: RatingProps): JSX.Element;
|
|
4
3
|
export default SatisfactionRating;
|
|
@@ -1,61 +1,41 @@
|
|
|
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 styles from '../Rating.module.css';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
import VeryDissatisfiedIcon from '../../../Icons/Ratings/VeryDissatisfiedIcon';
|
|
4
|
+
import DissatisfiedIcon from '../../../Icons/Ratings/DissatisfiedIcon';
|
|
5
|
+
import SatisfiedIcon from '../../../Icons/Ratings/SatisfiedIcon';
|
|
6
|
+
import VerySatisfiedIcon from '../../../Icons/Ratings/VerySatisfiedIcon';
|
|
7
|
+
import { useTheme } from '@mui/material';
|
|
8
|
+
function SatisfactionRating({ value, inputRef, disabled, onChange }) {
|
|
9
|
+
const { palette } = useTheme();
|
|
10
|
+
const focusColor = palette.primary.main;
|
|
11
|
+
const unSelectedColor = palette.outline.main;
|
|
12
|
+
return (_jsxs("div", { className: styles.ratingContainer, style: {
|
|
21
13
|
'--eureka-primary': focusColor,
|
|
22
14
|
'--eureka-outline': unSelectedColor,
|
|
23
|
-
}
|
|
24
|
-
? styles.disabledIconContainer
|
|
25
|
-
: styles.iconContainer, onClick: function () {
|
|
15
|
+
}, children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, onClick: () => {
|
|
26
16
|
if (!disabled)
|
|
27
17
|
onChange(value === 1 ? null : 1);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
33
|
-
? styles.disabledIconContainer
|
|
34
|
-
: styles.iconContainer, onClick: function () {
|
|
18
|
+
}, children: _jsx(VeryDissatisfiedIcon, { style: {
|
|
19
|
+
fontSize: 'inherit',
|
|
20
|
+
color: value === 1 ? focusColor : undefined,
|
|
21
|
+
} }) }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, onClick: () => {
|
|
35
22
|
if (!disabled)
|
|
36
23
|
onChange(value === 2 ? null : 2);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
42
|
-
? styles.disabledIconContainer
|
|
43
|
-
: styles.iconContainer, onClick: function () {
|
|
24
|
+
}, children: _jsx(DissatisfiedIcon, { style: {
|
|
25
|
+
fontSize: 'inherit',
|
|
26
|
+
color: value === 2 ? focusColor : undefined,
|
|
27
|
+
} }) }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, onClick: () => {
|
|
44
28
|
if (!disabled)
|
|
45
29
|
onChange(value === 3 ? null : 3);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
51
|
-
? styles.disabledIconContainer
|
|
52
|
-
: styles.iconContainer, onClick: function () {
|
|
30
|
+
}, children: _jsx(SatisfiedIcon, { style: {
|
|
31
|
+
fontSize: 'inherit',
|
|
32
|
+
color: value === 3 ? focusColor : undefined,
|
|
33
|
+
} }) }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, onClick: () => {
|
|
53
34
|
if (!disabled)
|
|
54
35
|
onChange(value === 4 ? null : 4);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
: {} }) }))] })));
|
|
36
|
+
}, children: _jsx(VerySatisfiedIcon, { style: {
|
|
37
|
+
fontSize: 'inherit',
|
|
38
|
+
color: value === 4 ? focusColor : undefined,
|
|
39
|
+
} }) })] }));
|
|
60
40
|
}
|
|
61
41
|
export default SatisfactionRating;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RatingProps } from '../Rating';
|
|
3
|
-
declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile
|
|
2
|
+
declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile }: RatingProps): JSX.Element;
|
|
4
3
|
export default ScaleRating;
|
|
@@ -1,62 +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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { Rating } from '@material-ui/lab';
|
|
25
|
-
import GradeRoundedIcon from '@material-ui/icons/GradeRounded';
|
|
26
|
-
import { makeStyles } from '@material-ui/core';
|
|
27
2
|
import React from 'react';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
unSelectedColor: unSelectedColor,
|
|
47
|
-
focusColor: focusColor,
|
|
48
|
-
})();
|
|
49
|
-
return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx(Rating, { value: value, onChange: function (_event, newValue) {
|
|
3
|
+
import StarIcon from '../../../Icons/Ratings/StarIcon';
|
|
4
|
+
import { Rating as MuiRating, styled } from '@mui/material';
|
|
5
|
+
const StyledRating = styled(MuiRating)(({ theme }) => ({
|
|
6
|
+
'&.Mui-disabled': {
|
|
7
|
+
opacity: 1,
|
|
8
|
+
},
|
|
9
|
+
'& .EF-MuiRating-iconFilled': {
|
|
10
|
+
color: theme.palette.primary.main,
|
|
11
|
+
},
|
|
12
|
+
'& .EF-MuiRating-iconEmpty': {
|
|
13
|
+
color: theme.palette.outline.main,
|
|
14
|
+
},
|
|
15
|
+
'& .EF-MuiRating-visuallyHidden': {
|
|
16
|
+
display: 'none',
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
19
|
+
function ScaleRating({ value, inputRef, disabled, onChange, isMobile }) {
|
|
20
|
+
return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx(StyledRating, { value: value, onChange: (_event, newValue) => {
|
|
50
21
|
if (!disabled)
|
|
51
22
|
onChange(newValue);
|
|
52
|
-
}, disabled: disabled,
|
|
23
|
+
}, disabled: disabled, size: "large", defaultValue: 0, getLabelText: (value) => value + '/5', max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer })] }));
|
|
53
24
|
}
|
|
54
|
-
function IconContainer(
|
|
55
|
-
|
|
56
|
-
return (_jsx("span", __assign({ className: 'icon' + value }, other, { children: _jsx(GradeRoundedIcon, { style: { fontSize: 60 } }) })));
|
|
25
|
+
function IconContainer({ value, ...other }) {
|
|
26
|
+
return (_jsx("span", { className: 'icon' + value, ...other, children: _jsx(StarIcon, { style: { fontSize: 60 } }) }));
|
|
57
27
|
}
|
|
58
|
-
function SmallIconContainer(
|
|
59
|
-
|
|
60
|
-
return (_jsx("span", __assign({ className: 'icon' + value }, other, { children: _jsx(GradeRoundedIcon, { style: { fontSize: 50 } }) })));
|
|
28
|
+
function SmallIconContainer({ value, ...other }) {
|
|
29
|
+
return (_jsx("span", { className: 'icon' + value, ...other, children: _jsx(StarIcon, { style: { fontSize: 50 } }) }));
|
|
61
30
|
}
|
|
62
31
|
export default ScaleRating;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface StyleProps {
|
|
4
|
-
/** The color of the toggle */
|
|
5
|
-
color?: string;
|
|
6
|
-
/** The color of the toggle when unchecked */
|
|
7
|
-
baseColor?: string;
|
|
8
|
-
}
|
|
9
|
-
interface RoundedToggleProps extends Omit<SwitchProps, 'color' | 'onChange'>, StyleProps {
|
|
10
|
-
/** If the toggle is checked */
|
|
11
|
-
checked?: boolean;
|
|
12
|
-
/** Function to call when the toggle is clicked on */
|
|
1
|
+
interface ToggleProps {
|
|
2
|
+
checked: boolean;
|
|
13
3
|
onChange: (checked: boolean) => void;
|
|
14
4
|
/** If the Toggle is disabled */
|
|
15
5
|
disabled?: boolean;
|
|
16
6
|
}
|
|
17
|
-
declare function
|
|
18
|
-
export default
|
|
7
|
+
declare function Toggle({ checked, onChange }: ToggleProps): JSX.Element;
|
|
8
|
+
export default Toggle;
|
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
color: props.baseColor + ' !important',
|
|
13
|
-
'&$checked': {
|
|
14
|
-
color: props.color + ' !important',
|
|
15
|
-
},
|
|
16
|
-
'&$checked + $track': {
|
|
17
|
-
backgroundColor: props.color + ' !important',
|
|
18
|
-
},
|
|
19
|
-
'&:hover': {
|
|
20
|
-
backgroundColor: ((_a = props.color) === null || _a === void 0 ? void 0 : _a.startsWith('#'))
|
|
21
|
-
? props.color + '40'
|
|
22
|
-
: props.color,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
checked: {},
|
|
26
|
-
track: {},
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
function RoundedToggle(_a) {
|
|
30
|
-
var _b = _a.color, color = _b === void 0 ? '#3d5a7f' : _b, _c = _a.baseColor, baseColor = _c === void 0 ? '#b8b8b8' : _c, _d = _a.checked, checked = _d === void 0 ? true : _d, onChange = _a.onChange, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? 'medium' : _f;
|
|
31
|
-
var classes = useStyles({ color: color, baseColor: baseColor })();
|
|
32
|
-
return (_jsx(Switch, { size: size, classes: classes, checked: checked, disabled: disabled, onChange: function (event) {
|
|
33
|
-
onChange(event.target.checked);
|
|
34
|
-
} }));
|
|
2
|
+
import { styled, Switch as MuiSwitch } from '@mui/material';
|
|
3
|
+
const Styled = styled(MuiSwitch)(({ theme, checked }) => ({
|
|
4
|
+
marginTop: -6,
|
|
5
|
+
marginBottom: -6,
|
|
6
|
+
'& .EF-MuiSwitch-track': {
|
|
7
|
+
backgroundColor: checked ? theme.palette.primary.main : undefined,
|
|
8
|
+
},
|
|
9
|
+
}));
|
|
10
|
+
function Toggle({ checked, onChange }) {
|
|
11
|
+
return _jsx(Styled, { checked: checked, onChange: () => onChange(!checked), size: "medium" });
|
|
35
12
|
}
|
|
36
|
-
export default
|
|
13
|
+
export default Toggle;
|
|
@@ -20,12 +20,12 @@ export interface GlobalState {
|
|
|
20
20
|
loaded: boolean;
|
|
21
21
|
}
|
|
22
22
|
export declare const GlobalSlice: import("@reduxjs/toolkit").Slice<GlobalState, {
|
|
23
|
-
reset: (state: import("immer
|
|
23
|
+
reset: (state: import("immer").WritableDraft<GlobalState>, action: PayloadAction<Omit<GlobalState, "loaded"> & SiteState>) => {
|
|
24
24
|
loaded: true;
|
|
25
25
|
editable: boolean;
|
|
26
26
|
partial: boolean;
|
|
27
|
-
postview: boolean;
|
|
28
27
|
formStyle: FormStyle;
|
|
28
|
+
postview: boolean;
|
|
29
29
|
preview: boolean;
|
|
30
30
|
idOrganization: string;
|
|
31
31
|
countryCode: CountryCode;
|
|
@@ -39,8 +39,8 @@ export declare const GlobalSlice: import("@reduxjs/toolkit").Slice<GlobalState,
|
|
|
39
39
|
idCurrentSection: string | null;
|
|
40
40
|
previousSections: string[];
|
|
41
41
|
nextSections: string[];
|
|
42
|
-
focusStep?: string
|
|
42
|
+
focusStep?: string;
|
|
43
43
|
};
|
|
44
|
-
}, "global"
|
|
44
|
+
}, "global", "global", import("@reduxjs/toolkit").SliceSelectors<GlobalState>>;
|
|
45
45
|
export declare const reset: import("@reduxjs/toolkit").ActionCreatorWithPayload<Omit<GlobalState, "loaded"> & SiteState, "global/reset">;
|
|
46
46
|
export default GlobalSlice;
|
|
@@ -1,18 +1,7 @@
|
|
|
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 InternalFormStyle from '../constants/InternalFormStyle';
|
|
13
2
|
import { createSlice } from '@reduxjs/toolkit';
|
|
14
3
|
import { BaseConfirmationMessage } from '../Contexts/FormContext';
|
|
15
|
-
|
|
4
|
+
const initialState = {
|
|
16
5
|
idOrganization: '',
|
|
17
6
|
countryCode: 'CO',
|
|
18
7
|
formStyle: InternalFormStyle,
|
|
@@ -27,14 +16,14 @@ var initialState = {
|
|
|
27
16
|
internal: false,
|
|
28
17
|
loaded: false,
|
|
29
18
|
};
|
|
30
|
-
export
|
|
19
|
+
export const GlobalSlice = createSlice({
|
|
31
20
|
name: 'global',
|
|
32
|
-
initialState
|
|
21
|
+
initialState,
|
|
33
22
|
reducers: {
|
|
34
|
-
reset:
|
|
35
|
-
return
|
|
23
|
+
reset: (state, action) => {
|
|
24
|
+
return { ...state, ...action.payload, loaded: true };
|
|
36
25
|
},
|
|
37
26
|
},
|
|
38
27
|
});
|
|
39
|
-
export
|
|
28
|
+
export const { reset } = GlobalSlice.actions;
|
|
40
29
|
export default GlobalSlice;
|
|
@@ -19,68 +19,50 @@ export interface ValuesStore {
|
|
|
19
19
|
sections: Record<string, Record<string, any>>;
|
|
20
20
|
}
|
|
21
21
|
export declare const SiteSlice: import("@reduxjs/toolkit").Slice<SiteState, {
|
|
22
|
-
setStepDependency: (state: import("immer
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
type: string;
|
|
51
|
-
}) => void;
|
|
52
|
-
handleNext: (state: import("immer/dist/internal").WritableDraft<SiteState>, { payload: { values, form }, }: {
|
|
53
|
-
payload: {
|
|
54
|
-
values: Record<string, any>;
|
|
55
|
-
form: Form;
|
|
56
|
-
};
|
|
57
|
-
type: string;
|
|
58
|
-
}) => void;
|
|
59
|
-
updateNestedValues: (state: import("immer/dist/internal").WritableDraft<SiteState>, { payload: { key, values }, }: {
|
|
60
|
-
payload: {
|
|
61
|
-
key: string;
|
|
62
|
-
values: Record<string, any>;
|
|
63
|
-
};
|
|
64
|
-
type: string;
|
|
65
|
-
}) => void;
|
|
66
|
-
focusStep: (state: import("immer/dist/internal").WritableDraft<SiteState>, { payload, }: PayloadAction<{
|
|
22
|
+
setStepDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { step: { id, type, idSection }, value, }, }: PayloadAction<{
|
|
23
|
+
step: GBaseStep;
|
|
24
|
+
value: StepDependency["value"];
|
|
25
|
+
}>) => void;
|
|
26
|
+
clearDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { id, idSection } }: PayloadAction<GBaseStep>) => void;
|
|
27
|
+
setEmptyDependency: (state: import("immer").WritableDraft<SiteState>, { payload: { step: { id }, empty, }, }: PayloadAction<{
|
|
28
|
+
step: GBaseStep;
|
|
29
|
+
empty: StepDependency["empty"];
|
|
30
|
+
}>) => void;
|
|
31
|
+
addStepsDependencies: (state: import("immer").WritableDraft<SiteState>, { payload: { steps, customSteps, allSteps }, }: PayloadAction<{
|
|
32
|
+
steps: Record<string, FormStep | CBRFormStep>;
|
|
33
|
+
customSteps: Record<string, CustomStep>;
|
|
34
|
+
allSteps: Record<string, FormStep | CBRFormStep>;
|
|
35
|
+
}>) => void;
|
|
36
|
+
handlePrevious: (state: import("immer").WritableDraft<SiteState>, { payload: { values, form } }: PayloadAction<{
|
|
37
|
+
values: Record<string, any>;
|
|
38
|
+
form: Form;
|
|
39
|
+
}>) => void;
|
|
40
|
+
handleNext: (state: import("immer").WritableDraft<SiteState>, { payload: { values, form } }: PayloadAction<{
|
|
41
|
+
values: Record<string, any>;
|
|
42
|
+
form: Form;
|
|
43
|
+
}>) => void;
|
|
44
|
+
updateNestedValues: (state: import("immer").WritableDraft<SiteState>, { payload: { key, values } }: PayloadAction<{
|
|
45
|
+
key: string;
|
|
46
|
+
values: Record<string, any>;
|
|
47
|
+
}>) => void;
|
|
48
|
+
focusStep: (state: import("immer").WritableDraft<SiteState>, { payload }: PayloadAction<{
|
|
67
49
|
step: FormStep;
|
|
68
50
|
values: FieldValues;
|
|
69
51
|
} | undefined>) => void;
|
|
70
|
-
}, "site"
|
|
52
|
+
}, "site", "site", import("@reduxjs/toolkit").SliceSelectors<SiteState>>;
|
|
71
53
|
export declare const focusStep: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
|
|
72
54
|
step: FormStep;
|
|
73
55
|
values: FieldValues;
|
|
74
56
|
} | undefined, "site/focusStep">, clearDependency: import("@reduxjs/toolkit").ActionCreatorWithPayload<GBaseStep, "site/clearDependency">, setStepDependency: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
75
57
|
step: GBaseStep;
|
|
76
|
-
value: StepDependency[
|
|
58
|
+
value: StepDependency["value"];
|
|
77
59
|
}, "site/setStepDependency">, addStepsDependencies: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
78
60
|
steps: Record<string, FormStep | CBRFormStep>;
|
|
79
61
|
customSteps: Record<string, CustomStep>;
|
|
80
62
|
allSteps: Record<string, FormStep | CBRFormStep>;
|
|
81
63
|
}, "site/addStepsDependencies">, setEmptyDependency: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
82
64
|
step: GBaseStep;
|
|
83
|
-
empty: StepDependency[
|
|
65
|
+
empty: StepDependency["empty"];
|
|
84
66
|
}, "site/setEmptyDependency">, handlePrevious: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
85
67
|
values: Record<string, any>;
|
|
86
68
|
form: Form;
|