@arquimedes.co/eureka-forms 3.0.34-test → 3.0.35
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/Condition.d.ts +6 -4
- package/dist/@Types/ErkValue.d.ts +16 -0
- package/dist/@Types/Form.d.ts +1 -0
- package/dist/@Types/FormStep.d.ts +12 -8
- package/dist/@Types/GenericFormSteps.d.ts +0 -8
- package/dist/@Types/User.d.ts +13 -0
- package/dist/App/App.d.ts +3 -1
- package/dist/App/App.js +46 -21
- package/dist/App/AppFunctions.d.ts +1 -1
- package/dist/App/AppFunctions.js +336 -177
- package/dist/App/AppHooks.d.ts +2 -2
- package/dist/App/AppHooks.js +252 -146
- package/dist/Contexts/CustomContext.d.ts +1 -0
- package/dist/Contexts/CustomContext.js +1 -1
- package/dist/Contexts/FormContext.d.ts +1 -1
- package/dist/Contexts/FormContext.js +2 -3
- package/dist/Contexts/SectionContext.d.ts +1 -0
- package/dist/Contexts/SectionContext.js +1 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +2 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +62 -36
- package/dist/Form/Form.d.ts +2 -1
- package/dist/Form/Form.js +164 -71
- package/dist/Form/Form.module.css +9 -0
- package/dist/Form/FormFunctions.js +112 -63
- package/dist/Form/FormHooks.d.ts +1 -0
- package/dist/Form/FormHooks.js +21 -13
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +1 -0
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +105 -32
- package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +2 -1
- package/dist/Form/FormTypes/StepperForm/StepperForm.js +110 -46
- package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +1 -0
- package/dist/Form/Section/MaterialSection/MaterialSection.js +23 -10
- package/dist/Form/Section/MaterialSection/MaterialSection.module.css +2 -0
- package/dist/Form/Section/Section.d.ts +1 -0
- package/dist/Form/Section/Section.js +15 -4
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +1 -0
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.js +65 -30
- package/dist/Form/Terms/Term/Term.d.ts +1 -0
- package/dist/Form/Terms/Term/Term.js +13 -2
- package/dist/Form/Terms/Terms.d.ts +1 -0
- package/dist/Form/Terms/Terms.js +27 -11
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +107 -34
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +13 -2
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +40 -12
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +77 -56
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +115 -45
- package/dist/FormSteps/AYFStepMapper.d.ts +1 -0
- package/dist/FormSteps/AYFStepMapper.js +137 -60
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +1 -0
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.js +13 -2
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +1 -0
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +172 -66
- package/dist/FormSteps/CBRStepMapper.d.ts +1 -0
- package/dist/FormSteps/CBRStepMapper.js +168 -56
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +1 -0
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.js +13 -2
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +1 -0
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +37 -19
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +1 -0
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +13 -2
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +2 -1
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +81 -44
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +1 -0
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.js +26 -3
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +1 -0
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +61 -31
- package/dist/FormSteps/CustomStep.d.ts +1 -0
- package/dist/FormSteps/CustomStep.js +31 -17
- package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +2 -1
- package/dist/FormSteps/DatePickerStep/DatePickerStep.js +13 -2
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +2 -1
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +20 -9
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +1 -0
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.js +13 -2
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +1 -0
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.js +32 -16
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +2 -1
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +302 -106
- package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +1 -0
- package/dist/FormSteps/FileUploadStep/FileUploadStep.js +13 -2
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +1 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +95 -33
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +2 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +180 -85
- package/dist/FormSteps/MapperStep/MapperStep.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MapperStep.js +13 -2
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +38 -16
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +31 -20
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.js +175 -85
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +47 -20
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +115 -70
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +2 -1
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.js +33 -15
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +1 -0
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.js +13 -2
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +1 -0
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +31 -17
- package/dist/FormSteps/RatingStep/RatingStep.d.ts +1 -0
- package/dist/FormSteps/RatingStep/RatingStep.js +13 -2
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +1 -0
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +61 -31
- package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +1 -0
- package/dist/FormSteps/SelectorStep/SelectorStep.js +13 -2
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +1 -0
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +3 -2
- package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +1 -0
- package/dist/FormSteps/SeparatorStep/SeparatorStep.js +13 -2
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +2 -1
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +155 -73
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +7 -7
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.js +13 -2
- package/dist/FormSteps/Step.d.ts +1 -0
- package/dist/FormSteps/Step.js +58 -33
- package/dist/FormSteps/StepFunctions.d.ts +6 -4
- package/dist/FormSteps/StepFunctions.js +208 -153
- package/dist/FormSteps/StepHooks.d.ts +14 -68
- package/dist/FormSteps/StepHooks.js +154 -88
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +20 -18
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +1 -0
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +74 -36
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +2 -1
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +28 -12
- package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +1 -0
- package/dist/FormSteps/TextAreaStep/TextAreaStep.js +14 -3
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +2 -1
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +30 -12
- package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +2 -1
- package/dist/FormSteps/TextInputStep/TextInputStep.js +13 -2
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +2 -1
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.js +26 -9
- package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +1 -0
- package/dist/FormSteps/TimePickerStep/TimePickerStep.js +13 -2
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +1 -0
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +54 -21
- package/dist/FormSteps/TitleStep/TitleStep.d.ts +1 -0
- package/dist/FormSteps/TitleStep/TitleStep.js +13 -2
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +2 -1
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.js +27 -14
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +3 -2
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +23 -8
- package/dist/Icons/@IconTypes.d.ts +7 -0
- package/dist/Icons/CalendarIcon.d.ts +3 -2
- package/dist/Icons/CalendarIcon.js +14 -4
- package/dist/Icons/Construction/LeakIcon.d.ts +2 -2
- package/dist/Icons/Construction/LeakIcon.js +13 -3
- package/dist/Icons/Construction/ProjectIcon.d.ts +2 -2
- package/dist/Icons/Construction/ProjectIcon.js +13 -3
- package/dist/Icons/Construction/PropertyIcon.d.ts +2 -2
- package/dist/Icons/Construction/PropertyIcon.js +13 -3
- package/dist/Icons/Construction/SpaceIcon.d.ts +2 -2
- package/dist/Icons/Construction/SpaceIcon.js +13 -3
- package/dist/Icons/DocumentIcon.d.ts +2 -2
- package/dist/Icons/DocumentIcon.js +13 -3
- package/dist/Icons/EmailIcon.d.ts +4 -0
- package/dist/Icons/EmailIcon.js +17 -0
- package/dist/Icons/Entities/CheckListIcon.d.ts +2 -2
- package/dist/Icons/Entities/CheckListIcon.js +13 -3
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -2
- package/dist/Icons/Entities/GenericEntityIcon.js +15 -5
- package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -2
- package/dist/Icons/Entities/HandshakeIcon.js +15 -5
- package/dist/Icons/Entities/SchoolIcon.d.ts +2 -0
- package/dist/Icons/Entities/SchoolIcon.js +17 -0
- package/dist/Icons/Entities/SupplierIcon.d.ts +2 -2
- package/dist/Icons/Entities/SupplierIcon.js +15 -5
- package/dist/Icons/GroupIcon.d.ts +4 -0
- package/dist/Icons/GroupIcon.js +17 -0
- package/dist/Icons/LocationIcon.d.ts +3 -2
- package/dist/Icons/LocationIcon.js +14 -4
- package/dist/Icons/LockedIcon.d.ts +4 -0
- package/dist/Icons/LockedIcon.js +17 -0
- package/dist/Icons/PersonIcon.d.ts +3 -2
- package/dist/Icons/PersonIcon.js +16 -6
- package/dist/Login/Login.module.css +135 -0
- package/dist/Login/LoginLayout.module.css +68 -0
- package/dist/Login/LoginPage.d.ts +11 -0
- package/dist/Login/LoginPage.js +177 -0
- package/dist/Login/LoginTextField.d.ts +15 -0
- package/dist/Login/LoginTextField.js +134 -0
- package/dist/Services/ApiSelectorService.d.ts +57 -0
- package/dist/Services/ApiSelectorService.js +253 -0
- package/dist/Services/DraftService.d.ts +14 -14
- package/dist/Services/DraftService.js +72 -22
- package/dist/Services/FileService.d.ts +1 -1
- package/dist/Services/FileService.js +86 -29
- package/dist/Services/FormService.js +56 -11
- package/dist/Services/IntegrationService.d.ts +21 -0
- package/dist/Services/IntegrationService.js +69 -0
- package/dist/Services/OrganizationService.js +62 -11
- package/dist/Services/UserService.d.ts +10 -0
- package/dist/Services/UserService.js +71 -0
- package/dist/Shared/CustomBtn/CustomBtn.d.ts +2 -1
- package/dist/Shared/CustomBtn/CustomBtn.js +88 -24
- package/dist/Shared/InputIcon/InputIcon.d.ts +3 -3
- package/dist/Shared/InputIcon/InputIcon.js +112 -29
- package/dist/Shared/Loader/Loader.d.ts +1 -0
- package/dist/Shared/Loader/Loader.js +18 -6
- package/dist/Shared/Navbar/Navbar.d.ts +3 -1
- package/dist/Shared/Navbar/Navbar.js +96 -3
- package/dist/Shared/Navbar/Navbar.module.css +15 -0
- package/dist/Shared/Navbar/Navbar.stories.d.ts +1 -1
- package/dist/Shared/Navbar/Navbar.stories.js +2 -2
- package/dist/Shared/Rating/Rating.d.ts +5 -3
- package/dist/Shared/Rating/Rating.js +27 -4
- package/dist/Shared/Rating/Rating.stories.d.ts +1 -1
- package/dist/Shared/Rating/Rating.stories.js +19 -13
- package/dist/Shared/Rating/Ratings/LikeRating.d.ts +2 -1
- package/dist/Shared/Rating/Ratings/LikeRating.js +33 -19
- package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +2 -1
- package/dist/Shared/Rating/Ratings/SatisfactionRating.js +47 -27
- package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +2 -1
- package/dist/Shared/Rating/Ratings/ScaleRating.js +54 -23
- package/dist/Shared/RoundedButton/RoundedButton.d.ts +30 -0
- package/dist/Shared/RoundedButton/RoundedButton.js +45 -0
- package/dist/Shared/RoundedButton/RoundedButton.stories.d.ts +23 -0
- package/dist/Shared/RoundedButton/RoundedButton.stories.js +36 -0
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -0
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.js +101 -0
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.d.ts +21 -0
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.js +50 -0
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.d.ts +49 -0
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.js +351 -0
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.d.ts +36 -0
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.js +223 -0
- package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.d.ts +43 -0
- package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.js +226 -0
- package/dist/Shared/RoundedSelect/RoundedSelect.d.ts +68 -0
- package/dist/Shared/RoundedSelect/RoundedSelect.js +214 -0
- package/dist/Shared/RoundedSelect/RoundedSelect.stories.d.ts +28 -0
- package/dist/Shared/RoundedSelect/RoundedSelect.stories.js +91 -0
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +63 -0
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.js +236 -0
- package/dist/Shared/{ErkSmartSelect/ErkSmartSelect.stories.d.ts → RoundedSmartSelect/RoundedSmartSelect.stories.d.ts} +13 -3
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.js +318 -0
- package/dist/Shared/RoundedTextField/RoundedTextField.d.ts +45 -0
- package/dist/Shared/RoundedTextField/RoundedTextField.js +175 -0
- package/dist/Shared/{ErkTextField/ErkTextField.stories.d.ts → RoundedTextField/RoundedTextField.stories.d.ts} +17 -4
- package/dist/Shared/RoundedTextField/RoundedTextField.stories.js +224 -0
- package/dist/Shared/RoundedTimePicker/RoundedTimePicker.d.ts +41 -0
- package/dist/Shared/RoundedTimePicker/RoundedTimePicker.js +314 -0
- package/dist/Shared/SmartDraftRenderer/FormDecorator.d.ts +2 -1
- package/dist/Shared/SmartDraftRenderer/FormDecorator.js +22 -8
- package/dist/Shared/SmartDraftRenderer/LinkDecorator.d.ts +14 -0
- package/dist/Shared/SmartDraftRenderer/LinkDecorator.js +60 -0
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.d.ts +2 -1
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.js +43 -27
- package/dist/Shared/Toggle/Toggle.d.ts +14 -5
- package/dist/Shared/Toggle/Toggle.js +32 -29
- package/dist/States/GlobalSlice.d.ts +12 -7
- package/dist/States/GlobalSlice.js +22 -6
- package/dist/States/SiteSlice.d.ts +48 -30
- package/dist/States/SiteSlice.js +76 -58
- package/dist/States/WidthStatsSlice.d.ts +2 -2
- package/dist/States/WidthStatsSlice.js +9 -8
- package/dist/Utils/AxiosAPI.d.ts +5 -4
- package/dist/Utils/AxiosAPI.js +73 -23
- package/dist/Utils/AxiosWidget.js +4 -4
- package/dist/Utils/CBRFunctions.js +30 -29
- package/dist/Utils/DraftFunctions.d.ts +3 -3
- package/dist/Utils/DraftFunctions.js +143 -102
- package/dist/Utils/FormStepFunctions.d.ts +1 -1
- package/dist/Utils/FormStepFunctions.js +45 -27
- package/dist/Utils/MaterialProviders.d.ts +1 -21
- package/dist/Utils/MaterialProviders.js +28 -46
- package/dist/Utils/PhoneFunctions.js +5 -5
- package/dist/Utils/StoreContext.js +1 -1
- package/dist/Utils/TestUtils.d.ts +81 -60
- package/dist/Utils/TestUtils.js +57 -28
- package/dist/Utils/_api.d.ts +7 -7
- package/dist/Utils/_api.js +8 -10
- package/dist/Utils/store.d.ts +17 -9
- package/dist/Utils/store.js +74 -15
- package/dist/Widget.d.ts +1 -1
- package/dist/Widget.js +26 -16
- package/dist/__mocks__/axios.d.ts +2 -0
- package/dist/__mocks__/axios.js +2 -0
- package/dist/constants/Draft/DraftEntityDataTypes.d.ts +3 -3
- package/dist/constants/ErkValueTypes.d.ts +6 -0
- package/dist/constants/ErkValueTypes.js +7 -0
- package/dist/constants/Files/FileExtensions.js +3 -3
- package/dist/constants/Files/FileMaxSize.js +1 -1
- package/dist/constants/FormStepTypes.d.ts +2 -2
- package/dist/constants/FormStepTypes.js +1 -1
- package/dist/constants/{ErkIconTypes.d.ts → IconTypes.d.ts} +4 -2
- package/dist/constants/IconTypes.js +18 -0
- package/dist/constants/InternalFormStyle.js +1 -1
- package/dist/constants/MaterialClassNameSeed.d.ts +1 -0
- package/dist/constants/MaterialClassNameSeed.js +1 -0
- package/dist/hooks.d.ts +3 -0
- package/dist/hooks.js +77 -14
- package/dist/index.js +31 -0
- package/dist/index.lib.d.ts +1 -0
- package/dist/index.lib.js +1 -0
- package/package.json +125 -104
- package/dist/App/AppFunctions.test.js +0 -708
- package/dist/App/AppHooks.test.js +0 -154
- package/dist/Form/FormFunctions.test.js +0 -458
- package/dist/FormSteps/DatePickerRangeStep/DatePickerRangeStep.d.ts +0 -10
- package/dist/FormSteps/DatePickerRangeStep/DatePickerRangeStep.js +0 -14
- package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.d.ts +0 -3
- package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.js +0 -34
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +0 -2
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.js +0 -3
- package/dist/FormSteps/StepFunctions.test.js +0 -702
- package/dist/FormSteps/Utils/@StepFiller/StepFillerContext.d.ts +0 -1
- package/dist/FormSteps/Utils/@StepFiller/StepFillerContext.js +0 -2
- package/dist/Icons/@ErkIcon.d.ts +0 -14
- package/dist/Icons/@ErkIcon.js +0 -9
- package/dist/Icons/ArrowLeftIcon.d.ts +0 -3
- package/dist/Icons/ArrowLeftIcon.js +0 -7
- package/dist/Icons/ArrowRightIcon.d.ts +0 -3
- package/dist/Icons/ArrowRightIcon.js +0 -7
- package/dist/Icons/CheckCircleIcon.d.ts +0 -3
- package/dist/Icons/CheckCircleIcon.js +0 -7
- package/dist/Icons/CheckboxCheckedIcon.d.ts +0 -3
- package/dist/Icons/CheckboxCheckedIcon.js +0 -7
- package/dist/Icons/CheckboxUncheckedIcon.d.ts +0 -3
- package/dist/Icons/CheckboxUncheckedIcon.js +0 -7
- package/dist/Icons/ClockIcon.d.ts +0 -3
- package/dist/Icons/ClockIcon.js +0 -7
- package/dist/Icons/CloseIcon.d.ts +0 -3
- package/dist/Icons/CloseIcon.js +0 -7
- package/dist/Icons/DeleteIcon.d.ts +0 -3
- package/dist/Icons/DeleteIcon.js +0 -7
- package/dist/Icons/Entities/WorkIcon.d.ts +0 -3
- package/dist/Icons/Entities/WorkIcon.js +0 -7
- package/dist/Icons/ErrorIcon.d.ts +0 -3
- package/dist/Icons/ErrorIcon.js +0 -7
- package/dist/Icons/ExpandLessIcon.d.ts +0 -3
- package/dist/Icons/ExpandLessIcon.js +0 -7
- package/dist/Icons/ExpandMoreIcon.d.ts +0 -3
- package/dist/Icons/ExpandMoreIcon.js +0 -7
- package/dist/Icons/FileIcon.d.ts +0 -3
- package/dist/Icons/FileIcon.js +0 -7
- package/dist/Icons/InfoIcon.d.ts +0 -3
- package/dist/Icons/InfoIcon.js +0 -7
- package/dist/Icons/Ratings/DislikeIcon.d.ts +0 -3
- package/dist/Icons/Ratings/DislikeIcon.js +0 -7
- package/dist/Icons/Ratings/DissatisfiedIcon.d.ts +0 -3
- package/dist/Icons/Ratings/DissatisfiedIcon.js +0 -7
- package/dist/Icons/Ratings/LikeIcon.d.ts +0 -3
- package/dist/Icons/Ratings/LikeIcon.js +0 -7
- package/dist/Icons/Ratings/SatisfiedIcon.d.ts +0 -3
- package/dist/Icons/Ratings/SatisfiedIcon.js +0 -7
- package/dist/Icons/Ratings/StarIcon.d.ts +0 -3
- package/dist/Icons/Ratings/StarIcon.js +0 -7
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.d.ts +0 -3
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +0 -7
- package/dist/Icons/Ratings/VerySatisfiedIcon.d.ts +0 -3
- package/dist/Icons/Ratings/VerySatisfiedIcon.js +0 -7
- package/dist/Icons/WarningIcon.d.ts +0 -3
- package/dist/Icons/WarningIcon.js +0 -7
- package/dist/Init.d.ts +0 -1
- package/dist/Init.js +0 -2
- package/dist/Shared/ErkButton/ErkButton.d.ts +0 -25
- package/dist/Shared/ErkButton/ErkButton.js +0 -31
- package/dist/Shared/ErkButton/ErkButton.stories.d.ts +0 -16
- package/dist/Shared/ErkButton/ErkButton.stories.js +0 -28
- package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +0 -19
- package/dist/Shared/ErkCheckbox/ErkCheckBox.js +0 -31
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +0 -13
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.js +0 -34
- package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +0 -18
- package/dist/Shared/ErkDatePicker/ErkDatePicker.js +0 -266
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +0 -23
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.js +0 -98
- package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.d.ts +0 -18
- package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.js +0 -173
- package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.stories.d.ts +0 -36
- package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.stories.js +0 -274
- package/dist/Shared/ErkMenuItem.d.ts +0 -4
- package/dist/Shared/ErkMenuItem.js +0 -18
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.d.ts +0 -17
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.js +0 -96
- package/dist/Shared/ErkSelect/ErkSelect.d.ts +0 -52
- package/dist/Shared/ErkSelect/ErkSelect.js +0 -141
- package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +0 -21
- package/dist/Shared/ErkSelect/ErkSelect.stories.js +0 -87
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.d.ts +0 -28
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.js +0 -54
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.js +0 -159
- package/dist/Shared/ErkTextField/ErkTextField.d.ts +0 -34
- package/dist/Shared/ErkTextField/ErkTextField.js +0 -146
- package/dist/Shared/ErkTextField/ErkTextField.stories.js +0 -99
- package/dist/Shared/ErkTimePicker/ErkTimePicker.d.ts +0 -32
- package/dist/Shared/ErkTimePicker/ErkTimePicker.js +0 -107
- package/dist/Shared/SmartDraftRenderer/DraftLoadingContext.d.ts +0 -1
- package/dist/Shared/SmartDraftRenderer/DraftLoadingContext.js +0 -2
- package/dist/Utils/LocaleUtils.d.ts +0 -2
- package/dist/Utils/LocaleUtils.js +0 -12
- package/dist/Utils/MuiClassnameSetup.d.ts +0 -1
- package/dist/Utils/MuiClassnameSetup.js +0 -3
- package/dist/constants/ErkIconTypes.js +0 -16
- package/dist/index.css +0 -15
- package/dist/main.d.ts +0 -3
- package/dist/main.js +0 -25
- /package/dist/{App/AppFunctions.test.d.ts → @Types/ErkValue.js} +0 -0
- /package/dist/{App/AppHooks.test.d.ts → @Types/User.js} +0 -0
- /package/dist/{Form/FormFunctions.test.d.ts → Icons/@IconTypes.js} +0 -0
- /package/dist/Shared/{ErkTimePicker/ErkTimePicker.module.css → RoundedTimePicker/RoundedTimePicker.module.css} +0 -0
- /package/dist/{FormSteps/StepFunctions.test.d.ts → index.d.ts} +0 -0
- /package/dist/{__tests__/setup.d.ts → setupTests.d.ts} +0 -0
- /package/dist/{__tests__/setup.js → setupTests.js} +0 -0
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
1
10
|
import AYFFormStepTypes from '../constants/AYFFormStepTypes';
|
|
2
11
|
import CBRFormStepTypes from '../constants/CBRFormStepTypes';
|
|
3
12
|
import ConditionTypes from '../constants/ConditionTypes';
|
|
@@ -5,36 +14,38 @@ import FormStepTypes, { ClassifierOptionTypes, EntityValueDataTypes, EntityValue
|
|
|
5
14
|
export function calcRecursiveData(element, newSteps, customSteps) {
|
|
6
15
|
if (!newSteps)
|
|
7
16
|
return;
|
|
8
|
-
for (
|
|
17
|
+
for (var _i = 0, _a = Object.entries(newSteps); _i < _a.length; _i++) {
|
|
18
|
+
var _b = _a[_i], idStep = _b[0], step = _b[1];
|
|
9
19
|
step.id = idStep;
|
|
10
20
|
if (step.dependencies) {
|
|
11
|
-
for (
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
for (var i = 0; i < step.dependencies.length; i++) {
|
|
22
|
+
var idDep = step.dependencies[i];
|
|
23
|
+
var newId = element.ids[idDep];
|
|
14
24
|
if (newId) {
|
|
15
25
|
step.dependencies[i] = newId;
|
|
16
26
|
}
|
|
17
27
|
}
|
|
18
28
|
}
|
|
19
|
-
|
|
20
|
-
if (custom
|
|
29
|
+
var custom = customSteps[step === null || step === void 0 ? void 0 : step.type];
|
|
30
|
+
if (custom === null || custom === void 0 ? void 0 : custom.calcRecursiveData) {
|
|
21
31
|
custom.calcRecursiveData(step, element.ids);
|
|
22
32
|
}
|
|
23
33
|
if (step.condition) {
|
|
24
34
|
calcRecursiveCondition(step.condition, element.ids);
|
|
25
35
|
}
|
|
26
|
-
calcSubSteps(step.id, newSteps, (idStep)
|
|
36
|
+
calcSubSteps(step.id, newSteps, function (idStep) { var _a; return (_a = element.ids[idStep]) !== null && _a !== void 0 ? _a : idStep; });
|
|
27
37
|
}
|
|
28
38
|
}
|
|
29
|
-
export
|
|
39
|
+
export var calcRecursiveCondition = function (condition, ids) {
|
|
30
40
|
switch (condition.type) {
|
|
31
41
|
case ConditionTypes.EXPRESSION:
|
|
32
|
-
for (
|
|
42
|
+
for (var _i = 0, _a = condition.conditions; _i < _a.length; _i++) {
|
|
43
|
+
var subCondition = _a[_i];
|
|
33
44
|
calcRecursiveCondition(subCondition, ids);
|
|
34
45
|
}
|
|
35
46
|
break;
|
|
36
47
|
case ConditionTypes.FORM_STEP: {
|
|
37
|
-
|
|
48
|
+
var newId = ids[condition.idStep];
|
|
38
49
|
if (newId) {
|
|
39
50
|
condition.idStep = newId;
|
|
40
51
|
}
|
|
@@ -50,22 +61,24 @@ export const calcRecursiveCondition = (condition, ids) => {
|
|
|
50
61
|
* @param idModifier optional modifier for the ids of the substeps and all other properties
|
|
51
62
|
* @returns list of the ids of the substeps of the step, if modifier returns modified steps
|
|
52
63
|
*/
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
export var calcSubSteps = function (idStep, allSteps, idModifier) {
|
|
65
|
+
var _a;
|
|
66
|
+
var step = allSteps[idStep];
|
|
67
|
+
var subSteps = [];
|
|
56
68
|
if (!step)
|
|
57
69
|
return [];
|
|
58
|
-
|
|
59
|
-
for (
|
|
60
|
-
|
|
70
|
+
var handleSteps = function (steps) {
|
|
71
|
+
for (var i = 0; i < steps.length; i++) {
|
|
72
|
+
var idSubStep = steps[i];
|
|
61
73
|
if (idModifier)
|
|
62
74
|
steps[i] = idModifier(steps[i]);
|
|
63
|
-
subSteps.push(idSubStep,
|
|
75
|
+
subSteps.push.apply(subSteps, __spreadArray([idSubStep], calcSubSteps(idSubStep, allSteps, idModifier), false));
|
|
64
76
|
}
|
|
65
77
|
};
|
|
66
78
|
switch (step.type) {
|
|
67
79
|
case FormStepTypes.SELECTOR: {
|
|
68
|
-
for (
|
|
80
|
+
for (var _i = 0, _b = step.options; _i < _b.length; _i++) {
|
|
81
|
+
var option = _b[_i];
|
|
69
82
|
if (option.type === OptionTypes.NESTED) {
|
|
70
83
|
handleSteps(option.steps);
|
|
71
84
|
}
|
|
@@ -73,8 +86,9 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
73
86
|
break;
|
|
74
87
|
}
|
|
75
88
|
case FormStepTypes.CLASSIFIER_SELECTOR:
|
|
76
|
-
for (
|
|
77
|
-
|
|
89
|
+
for (var _c = 0, _d = Object.keys(step.options); _c < _d.length; _c++) {
|
|
90
|
+
var idOption = _d[_c];
|
|
91
|
+
var option = step.options[idOption];
|
|
78
92
|
if (option.type === ClassifierOptionTypes.NESTED) {
|
|
79
93
|
handleSteps(option.steps);
|
|
80
94
|
}
|
|
@@ -82,7 +96,8 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
82
96
|
break;
|
|
83
97
|
case FormStepTypes.RATING:
|
|
84
98
|
if (step.nestedSteps) {
|
|
85
|
-
for (
|
|
99
|
+
for (var _e = 0, _f = step.nestedSteps; _e < _f.length; _e++) {
|
|
100
|
+
var steps = _f[_e];
|
|
86
101
|
handleSteps(steps);
|
|
87
102
|
}
|
|
88
103
|
}
|
|
@@ -100,19 +115,22 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
100
115
|
}
|
|
101
116
|
case FormStepTypes.ENTITYVALUEPICKER:
|
|
102
117
|
if (idModifier) {
|
|
103
|
-
for (
|
|
118
|
+
for (var _g = 0, _h = step.path; _g < _h.length; _g++) {
|
|
119
|
+
var path = _h[_g];
|
|
104
120
|
if (path.type === EntityValueDataTypes.STEP) {
|
|
105
121
|
path.idStep = idModifier(path.idStep);
|
|
106
122
|
}
|
|
107
123
|
}
|
|
108
|
-
for (
|
|
124
|
+
for (var _j = 0, _k = step.filters; _j < _k.length; _j++) {
|
|
125
|
+
var filter = _k[_j];
|
|
109
126
|
if (filter.type === EntityValueDataTypes.STEP) {
|
|
110
127
|
filter.idStep = idModifier(filter.idStep);
|
|
111
128
|
}
|
|
112
129
|
}
|
|
113
130
|
}
|
|
114
|
-
for (
|
|
115
|
-
|
|
131
|
+
for (var _l = 0, _m = Object.keys((_a = step.options) !== null && _a !== void 0 ? _a : {}); _l < _m.length; _l++) {
|
|
132
|
+
var idOption = _m[_l];
|
|
133
|
+
var option = step.options[idOption];
|
|
116
134
|
if (option.type === EntityValueOptionTypes.NESTED) {
|
|
117
135
|
handleSteps(option.steps);
|
|
118
136
|
}
|
|
@@ -120,7 +138,7 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
120
138
|
break;
|
|
121
139
|
case CBRFormStepTypes.CBR_LOCATIVAS:
|
|
122
140
|
{
|
|
123
|
-
|
|
141
|
+
var elementStep = step;
|
|
124
142
|
if (elementStep.subStep) {
|
|
125
143
|
if (idModifier)
|
|
126
144
|
elementStep.subStep = idModifier(elementStep.subStep);
|
|
@@ -129,7 +147,7 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
129
147
|
}
|
|
130
148
|
break;
|
|
131
149
|
case AYFFormStepTypes.AYF_ICA_CITY: {
|
|
132
|
-
|
|
150
|
+
var cityStep = step;
|
|
133
151
|
if (cityStep.idNitStep) {
|
|
134
152
|
if (idModifier)
|
|
135
153
|
cityStep.idNitStep = idModifier(cityStep.idNitStep);
|
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormStyle } from '../@Types/Form';
|
|
3
|
-
import { Palette, PaletteColor } from '@mui/material/styles';
|
|
4
|
-
declare module '@mui/material/styles' {
|
|
5
|
-
interface Palette {
|
|
6
|
-
outline: Palette['primary'];
|
|
7
|
-
helperText: Palette['text'];
|
|
8
|
-
greyBtn: Palette['primary'];
|
|
9
|
-
stepBackgroundColor: Palette['background'];
|
|
10
|
-
}
|
|
11
|
-
interface PaletteOptions {
|
|
12
|
-
outline: PaletteOptions['primary'];
|
|
13
|
-
helperText: PaletteOptions['text'];
|
|
14
|
-
greyBtn: PaletteOptions['primary'];
|
|
15
|
-
stepBackgroundColor: PaletteOptions['background'];
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export type PaletteKey = keyof {
|
|
19
|
-
[Key in keyof Palette as Palette[Key] extends PaletteColor ? Key : never]: true;
|
|
20
|
-
};
|
|
21
2
|
interface MaterialProvidersProps {
|
|
22
3
|
children: React.ReactNode;
|
|
23
|
-
formStyle: FormStyle;
|
|
24
4
|
}
|
|
25
|
-
declare function MaterialProviders({ children
|
|
5
|
+
declare function MaterialProviders({ children }: MaterialProvidersProps): JSX.Element;
|
|
26
6
|
export default MaterialProviders;
|
|
@@ -1,49 +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
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { getLocale } from '
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
contrastText: formStyle.primaryContrastColor,
|
|
20
|
-
},
|
|
21
|
-
secondary: {
|
|
22
|
-
main: formStyle.secondaryColor,
|
|
23
|
-
contrastText: formStyle.secondaryContrastColor,
|
|
24
|
-
},
|
|
25
|
-
outline: {
|
|
26
|
-
main: formStyle.outlineColor,
|
|
27
|
-
},
|
|
28
|
-
greyBtn: {
|
|
29
|
-
main: '#d6d6d6',
|
|
30
|
-
contrastText: '#293241',
|
|
31
|
-
},
|
|
32
|
-
helperText: {
|
|
33
|
-
primary: formStyle.descriptionTextColor,
|
|
34
|
-
},
|
|
35
|
-
stepBackgroundColor: {
|
|
36
|
-
default: formStyle.stepBackgroundColor,
|
|
37
|
-
},
|
|
38
|
-
error: {
|
|
39
|
-
main: formStyle.errorColor,
|
|
40
|
-
},
|
|
41
|
-
text: {
|
|
42
|
-
primary: formStyle.textColor,
|
|
43
|
-
secondary: formStyle.descriptionTextColor,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
}, DatePickersEs //Potencialmente cambiar esto dependiendo de la empresa?
|
|
47
|
-
), children: _jsx(LocalizationProvider, { dateAdapter: AdapterDateFns, adapterLocale: getLocale(), children: children }) }));
|
|
13
|
+
import { StylesProvider, ThemeProvider, createGenerateClassName, createTheme, } from '@material-ui/core';
|
|
14
|
+
import DateFnsUtils from '@date-io/date-fns';
|
|
15
|
+
import { MuiPickersUtilsProvider } from '@material-ui/pickers';
|
|
16
|
+
import { SEED } from '../constants/MaterialClassNameSeed';
|
|
17
|
+
import { getLocale } from '../Form/Form';
|
|
18
|
+
var muiTheme = createTheme({
|
|
19
|
+
typography: {
|
|
20
|
+
fontFamily: 'inherit',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
var generateClassName = createGenerateClassName({
|
|
24
|
+
seed: SEED,
|
|
25
|
+
productionPrefix: 'efjss',
|
|
26
|
+
});
|
|
27
|
+
function MaterialProviders(_a) {
|
|
28
|
+
var children = _a.children;
|
|
29
|
+
return (_jsx(StylesProvider, __assign({ generateClassName: generateClassName }, { children: _jsx(ThemeProvider, __assign({ theme: muiTheme }, { children: _jsx(MuiPickersUtilsProvider, __assign({ utils: DateFnsUtils, locale: getLocale() }, { children: children })) })) })));
|
|
48
30
|
}
|
|
49
31
|
export default MaterialProviders;
|
|
@@ -8,13 +8,13 @@ export function isValidPhoneNumber(phone) {
|
|
|
8
8
|
export function isEmptyPhoneNumber(phone) {
|
|
9
9
|
if (!phone.startsWith('+'))
|
|
10
10
|
phone = '+' + phone;
|
|
11
|
-
|
|
12
|
-
phone,
|
|
13
|
-
});
|
|
11
|
+
var country = guessCountryByPartialPhoneNumber({
|
|
12
|
+
phone: phone,
|
|
13
|
+
}).country;
|
|
14
14
|
if (country &&
|
|
15
15
|
!removeDialCode({
|
|
16
|
-
phone,
|
|
17
|
-
dialCode: country
|
|
16
|
+
phone: phone,
|
|
17
|
+
dialCode: country === null || country === void 0 ? void 0 : country.dialCode,
|
|
18
18
|
})) {
|
|
19
19
|
return true;
|
|
20
20
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export var StoreContext = React.createContext({});
|
|
@@ -1,76 +1,97 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { RenderOptions } from '@testing-library/react';
|
|
3
3
|
import { AppStore } from './store';
|
|
4
|
+
import { RenderHookOptions } from '@testing-library/react-hooks';
|
|
4
5
|
interface ExtendedRenderOptions extends Omit<RenderOptions, 'queries'> {
|
|
5
6
|
store?: AppStore;
|
|
6
7
|
}
|
|
7
8
|
export declare function renderWithProviders(ui: React.ReactElement, { store, ...renderOptions }?: ExtendedRenderOptions): {
|
|
8
9
|
container: HTMLElement;
|
|
9
10
|
baseElement: HTMLElement;
|
|
10
|
-
debug: (baseElement?:
|
|
11
|
-
rerender: (ui: React.
|
|
11
|
+
debug: (baseElement?: Element | DocumentFragment | (Element | DocumentFragment)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
|
|
12
|
+
rerender: (ui: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => void;
|
|
12
13
|
unmount: () => void;
|
|
13
14
|
asFragment: () => DocumentFragment;
|
|
14
|
-
getByLabelText: (id: import("@testing-library/
|
|
15
|
-
getAllByLabelText: (id: import("@testing-library/
|
|
16
|
-
queryByLabelText: (id: import("@testing-library/
|
|
17
|
-
queryAllByLabelText: (id: import("@testing-library/
|
|
18
|
-
findByLabelText: (id: import("@testing-library/
|
|
19
|
-
findAllByLabelText: (id: import("@testing-library/
|
|
20
|
-
getByPlaceholderText: (id: import("@testing-library/
|
|
21
|
-
getAllByPlaceholderText: (id: import("@testing-library/
|
|
22
|
-
queryByPlaceholderText: (id: import("@testing-library/
|
|
23
|
-
queryAllByPlaceholderText: (id: import("@testing-library/
|
|
24
|
-
findByPlaceholderText: (id: import("@testing-library/
|
|
25
|
-
findAllByPlaceholderText: (id: import("@testing-library/
|
|
26
|
-
getByText: (id: import("@testing-library/
|
|
27
|
-
getAllByText: (id: import("@testing-library/
|
|
28
|
-
queryByText: (id: import("@testing-library/
|
|
29
|
-
queryAllByText: (id: import("@testing-library/
|
|
30
|
-
findByText: (id: import("@testing-library/
|
|
31
|
-
findAllByText: (id: import("@testing-library/
|
|
32
|
-
getByAltText: (id: import("@testing-library/
|
|
33
|
-
getAllByAltText: (id: import("@testing-library/
|
|
34
|
-
queryByAltText: (id: import("@testing-library/
|
|
35
|
-
queryAllByAltText: (id: import("@testing-library/
|
|
36
|
-
findByAltText: (id: import("@testing-library/
|
|
37
|
-
findAllByAltText: (id: import("@testing-library/
|
|
38
|
-
getByTitle: (id: import("@testing-library/
|
|
39
|
-
getAllByTitle: (id: import("@testing-library/
|
|
40
|
-
queryByTitle: (id: import("@testing-library/
|
|
41
|
-
queryAllByTitle: (id: import("@testing-library/
|
|
42
|
-
findByTitle: (id: import("@testing-library/
|
|
43
|
-
findAllByTitle: (id: import("@testing-library/
|
|
44
|
-
getByDisplayValue: (id: import("@testing-library/
|
|
45
|
-
getAllByDisplayValue: (id: import("@testing-library/
|
|
46
|
-
queryByDisplayValue: (id: import("@testing-library/
|
|
47
|
-
queryAllByDisplayValue: (id: import("@testing-library/
|
|
48
|
-
findByDisplayValue: (id: import("@testing-library/
|
|
49
|
-
findAllByDisplayValue: (id: import("@testing-library/
|
|
50
|
-
getByRole: (role: import("@testing-library/
|
|
51
|
-
getAllByRole: (role: import("@testing-library/
|
|
52
|
-
queryByRole: (role: import("@testing-library/
|
|
53
|
-
queryAllByRole: (role: import("@testing-library/
|
|
54
|
-
findByRole: (role: import("@testing-library/
|
|
55
|
-
findAllByRole: (role: import("@testing-library/
|
|
56
|
-
getByTestId: (id: import("@testing-library/
|
|
57
|
-
getAllByTestId: (id: import("@testing-library/
|
|
58
|
-
queryByTestId: (id: import("@testing-library/
|
|
59
|
-
queryAllByTestId: (id: import("@testing-library/
|
|
60
|
-
findByTestId: (id: import("@testing-library/
|
|
61
|
-
findAllByTestId: (id: import("@testing-library/
|
|
62
|
-
store: import("@reduxjs/toolkit").
|
|
63
|
-
forms:
|
|
15
|
+
getByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
16
|
+
getAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
17
|
+
queryByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
18
|
+
queryAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
19
|
+
findByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
20
|
+
findAllByLabelText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
21
|
+
getByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
22
|
+
getAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
23
|
+
queryByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
24
|
+
queryAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
25
|
+
findByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
26
|
+
findAllByPlaceholderText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
27
|
+
getByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
28
|
+
getAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
29
|
+
queryByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
30
|
+
queryAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
31
|
+
findByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
32
|
+
findAllByText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
33
|
+
getByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
34
|
+
getAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
35
|
+
queryByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
36
|
+
queryAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
37
|
+
findByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
38
|
+
findAllByAltText: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
39
|
+
getByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
40
|
+
getAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
41
|
+
queryByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
42
|
+
queryAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
43
|
+
findByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
44
|
+
findAllByTitle: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
45
|
+
getByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
46
|
+
getAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
47
|
+
queryByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
48
|
+
queryAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
49
|
+
findByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
50
|
+
findAllByDisplayValue: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
51
|
+
getByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement;
|
|
52
|
+
getAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
|
|
53
|
+
queryByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement | null;
|
|
54
|
+
queryAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined) => HTMLElement[];
|
|
55
|
+
findByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
56
|
+
findAllByRole: (role: import("@testing-library/react").ByRoleMatcher, options?: import("@testing-library/react").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
57
|
+
getByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement;
|
|
58
|
+
getAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
59
|
+
queryByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement | null;
|
|
60
|
+
queryAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
|
|
61
|
+
findByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
62
|
+
findAllByTestId: (id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/react").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
63
|
+
store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
64
|
+
forms: {
|
|
65
|
+
[x: string]: import("./store").RootState;
|
|
66
|
+
};
|
|
64
67
|
api: import("@reduxjs/toolkit/query").CombinedState<{}, never, "api">;
|
|
65
|
-
}, import("redux").
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
}>, import("redux").
|
|
68
|
+
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
69
|
+
forms: {
|
|
70
|
+
[x: string]: import("./store").RootState;
|
|
71
|
+
};
|
|
72
|
+
api: import("@reduxjs/toolkit/query").CombinedState<{}, never, "api">;
|
|
73
|
+
}>, import("redux").AnyAction, undefined>, import("redux").Middleware<{}, import("@reduxjs/toolkit/query").RootState<{}, string, "api">, import("@reduxjs/toolkit").ThunkDispatch<any, any, import("redux").AnyAction>>]>>;
|
|
71
74
|
};
|
|
72
75
|
interface ExtendedRenderHookOptions<TProps> extends Omit<RenderHookOptions<TProps>, 'wrapper'> {
|
|
73
76
|
store?: AppStore;
|
|
74
77
|
}
|
|
75
|
-
export declare function renderHookWithProviders<TProps, TResult>(callback: (props: TProps) => TResult, { store, ...renderHookOptions }?: ExtendedRenderHookOptions<TProps>):
|
|
78
|
+
export declare function renderHookWithProviders<TProps, TResult>(callback: (props: TProps) => TResult, { store, ...renderHookOptions }?: ExtendedRenderHookOptions<TProps>): {
|
|
79
|
+
result: import("@testing-library/react-hooks").RenderResult<TResult>;
|
|
80
|
+
rerender: (props?: TProps | undefined) => void;
|
|
81
|
+
unmount: () => void;
|
|
82
|
+
waitFor: import("@testing-library/react-hooks").WaitFor;
|
|
83
|
+
waitForValueToChange: import("@testing-library/react-hooks").WaitForValueToChange;
|
|
84
|
+
waitForNextUpdate: import("@testing-library/react-hooks").WaitForNextUpdate;
|
|
85
|
+
store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
86
|
+
forms: {
|
|
87
|
+
[x: string]: import("./store").RootState;
|
|
88
|
+
};
|
|
89
|
+
api: import("@reduxjs/toolkit/query").CombinedState<{}, never, "api">;
|
|
90
|
+
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
91
|
+
forms: {
|
|
92
|
+
[x: string]: import("./store").RootState;
|
|
93
|
+
};
|
|
94
|
+
api: import("@reduxjs/toolkit/query").CombinedState<{}, never, "api">;
|
|
95
|
+
}>, import("redux").AnyAction, undefined>, import("redux").Middleware<{}, import("@reduxjs/toolkit/query").RootState<{}, string, "api">, import("@reduxjs/toolkit").ThunkDispatch<any, any, import("redux").AnyAction>>]>>;
|
|
96
|
+
};
|
|
76
97
|
export {};
|
package/dist/Utils/TestUtils.js
CHANGED
|
@@ -1,43 +1,72 @@
|
|
|
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
|
+
};
|
|
1
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
24
|
import React from 'react';
|
|
3
|
-
import { render
|
|
25
|
+
import { render } from '@testing-library/react';
|
|
4
26
|
import { combineReducers, configureStore, nanoid } from '@reduxjs/toolkit';
|
|
5
27
|
import { Provider } from 'react-redux';
|
|
6
28
|
// As a basic setup, import your same slice reducers
|
|
7
29
|
import { EurekaFormsReducer } from './store';
|
|
8
|
-
import {
|
|
30
|
+
import { renderHook } from '@testing-library/react-hooks';
|
|
31
|
+
import { IdFormContext } from '../App/App';
|
|
9
32
|
import { RootApi } from './_api';
|
|
10
33
|
import { StoreContext } from './StoreContext';
|
|
11
34
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
12
|
-
export function renderWithProviders(ui, {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
35
|
+
export function renderWithProviders(ui, _a) {
|
|
36
|
+
if (_a === void 0) { _a = {}; }
|
|
37
|
+
var
|
|
38
|
+
// Automatically create a store instance if no store was passed in
|
|
39
|
+
_b = _a.store,
|
|
40
|
+
// Automatically create a store instance if no store was passed in
|
|
41
|
+
store = _b === void 0 ? configureStore({
|
|
42
|
+
reducer: combineReducers({
|
|
43
|
+
forms: EurekaFormsReducer,
|
|
44
|
+
api: RootApi.reducer,
|
|
45
|
+
}),
|
|
46
|
+
}) : _b, renderOptions = __rest(_a, ["store"]);
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
48
|
+
function Wrapper(_a) {
|
|
49
|
+
var children = _a.children;
|
|
50
|
+
return _jsx(Provider, __assign({ store: store }, { children: children }));
|
|
22
51
|
}
|
|
23
52
|
// Return an object with the store and all of RTL's query functions
|
|
24
|
-
return { store,
|
|
53
|
+
return __assign({ store: store }, render(ui, __assign({ wrapper: Wrapper }, renderOptions)));
|
|
25
54
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
56
|
+
export function renderHookWithProviders(callback, _a) {
|
|
57
|
+
if (_a === void 0) { _a = {}; }
|
|
58
|
+
var _b = _a.store, store = _b === void 0 ? configureStore({
|
|
59
|
+
reducer: combineReducers({
|
|
60
|
+
forms: EurekaFormsReducer,
|
|
61
|
+
api: RootApi.reducer,
|
|
62
|
+
}),
|
|
63
|
+
}) : _b, renderHookOptions = __rest(_a, ["store"]);
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
65
|
+
function Wrapper(_a) {
|
|
66
|
+
var children = _a.children;
|
|
67
|
+
var idForm = React.useState(nanoid(6))[0];
|
|
68
|
+
return (_jsx(IdFormContext.Provider, __assign({ value: idForm }, { children: _jsx(Provider, __assign({ store: store, context: StoreContext }, { children: children })) })));
|
|
35
69
|
}
|
|
36
70
|
// Return an object with the store and all of RTL's query functions
|
|
37
|
-
return {
|
|
38
|
-
...renderHook(callback, {
|
|
39
|
-
wrapper: Wrapper,
|
|
40
|
-
...renderHookOptions,
|
|
41
|
-
}),
|
|
42
|
-
};
|
|
71
|
+
return __assign({ store: store }, renderHook(callback, __assign({ wrapper: Wrapper }, renderHookOptions)));
|
|
43
72
|
}
|
package/dist/Utils/_api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const RootApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<{
|
|
1
|
+
export declare const RootApi: import("@reduxjs/toolkit/query/react").Api<import("@reduxjs/toolkit/query/react").BaseQueryFn<{
|
|
2
2
|
url: string;
|
|
3
|
-
timeout?:
|
|
4
|
-
method?:
|
|
5
|
-
body?:
|
|
6
|
-
params?:
|
|
7
|
-
headers?: Record<string, any
|
|
8
|
-
}, unknown, unknown>, {}, "api", never, typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
|
3
|
+
timeout?: number | undefined;
|
|
4
|
+
method?: string | undefined;
|
|
5
|
+
body?: any;
|
|
6
|
+
params?: any;
|
|
7
|
+
headers?: Record<string, any> | undefined;
|
|
8
|
+
}, unknown, unknown, {}, {}>, {}, "api", never, typeof import("@reduxjs/toolkit/query/react").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
package/dist/Utils/_api.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { buildCreateApi, coreModule, reactHooksModule } from '@reduxjs/toolkit/query/react';
|
|
1
|
+
import { buildCreateApi, coreModule, reactHooksModule, } from '@reduxjs/toolkit/query/react';
|
|
2
2
|
import { axiosBaseQuery } from './AxiosAPI';
|
|
3
|
-
import { createDispatchHook, createSelectorHook, createStoreHook } from 'react-redux';
|
|
3
|
+
import { createDispatchHook, createSelectorHook, createStoreHook, } from 'react-redux';
|
|
4
4
|
import { StoreContext } from './StoreContext';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
useStore: createStoreHook(StoreContext),
|
|
10
|
-
},
|
|
5
|
+
var customCreateApi = buildCreateApi(coreModule(), reactHooksModule({
|
|
6
|
+
useDispatch: createDispatchHook(StoreContext),
|
|
7
|
+
useSelector: createSelectorHook(StoreContext),
|
|
8
|
+
useStore: createStoreHook(StoreContext),
|
|
11
9
|
}));
|
|
12
|
-
export
|
|
10
|
+
export var RootApi = customCreateApi({
|
|
13
11
|
baseQuery: axiosBaseQuery(),
|
|
14
|
-
endpoints: ()
|
|
12
|
+
endpoints: function () { return ({}); },
|
|
15
13
|
});
|