@arquimedes.co/eureka-forms 3.0.31-test → 3.0.32
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 +11 -4
- 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 +173 -64
- 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 +300 -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 -29
- package/dist/FormSteps/StepFunctions.d.ts +6 -4
- package/dist/FormSteps/StepFunctions.js +208 -152
- 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 +1 -0
- 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/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 -1
- package/dist/constants/FormStepTypes.js +1 -0
- 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 +93 -72
- 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/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +0 -2
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.js +0 -3
- package/dist/FormSteps/StepFunctions.test.js +0 -695
- 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/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,16 +1,39 @@
|
|
|
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 { RatingTypes } from '../../constants/FormStepTypes';
|
|
3
25
|
import LikeRating from './Ratings/LikeRating';
|
|
4
26
|
import SatisfactionRating from './Ratings/SatisfactionRating';
|
|
5
27
|
import ScaleRating from './Ratings/ScaleRating';
|
|
6
|
-
function Rating(
|
|
28
|
+
function Rating(_a) {
|
|
29
|
+
var type = _a.type, others = __rest(_a, ["type"]);
|
|
7
30
|
switch (type) {
|
|
8
31
|
case RatingTypes.LIKE:
|
|
9
|
-
return _jsx(LikeRating, {
|
|
32
|
+
return _jsx(LikeRating, __assign({}, others));
|
|
10
33
|
case RatingTypes.SATISFACTION:
|
|
11
|
-
return _jsx(SatisfactionRating, {
|
|
34
|
+
return _jsx(SatisfactionRating, __assign({}, others));
|
|
12
35
|
case RatingTypes.SCALE:
|
|
13
|
-
return _jsx(ScaleRating, {
|
|
36
|
+
return _jsx(ScaleRating, __assign({}, others));
|
|
14
37
|
default:
|
|
15
38
|
return _jsx("div", {});
|
|
16
39
|
}
|
|
@@ -1,47 +1,53 @@
|
|
|
1
1
|
import Rating from './Rating';
|
|
2
2
|
import { RatingTypes } from '../../constants/FormStepTypes';
|
|
3
|
-
|
|
3
|
+
var meta = {
|
|
4
4
|
component: Rating,
|
|
5
5
|
tags: ['autodocs'],
|
|
6
6
|
args: {},
|
|
7
7
|
};
|
|
8
8
|
export default meta;
|
|
9
|
-
export
|
|
9
|
+
export var ScaleRating = {
|
|
10
10
|
args: {
|
|
11
11
|
type: RatingTypes.SCALE,
|
|
12
|
-
|
|
12
|
+
focusColor: '#3d5a7f',
|
|
13
|
+
unSelectedColor: '#d8d8d8',
|
|
13
14
|
},
|
|
14
15
|
};
|
|
15
|
-
export
|
|
16
|
+
export var ScaleRatingWidthValue = {
|
|
16
17
|
args: {
|
|
17
18
|
type: RatingTypes.SCALE,
|
|
18
|
-
|
|
19
|
+
focusColor: '#3d5a7f',
|
|
20
|
+
unSelectedColor: '#d8d8d8',
|
|
19
21
|
value: 4,
|
|
20
22
|
},
|
|
21
23
|
};
|
|
22
|
-
export
|
|
24
|
+
export var LikeRating = {
|
|
23
25
|
args: {
|
|
24
26
|
type: RatingTypes.LIKE,
|
|
25
|
-
|
|
27
|
+
focusColor: '#3d5a7f',
|
|
28
|
+
unSelectedColor: '#d8d8d8',
|
|
26
29
|
},
|
|
27
30
|
};
|
|
28
|
-
export
|
|
31
|
+
export var LikeRatingWithValue = {
|
|
29
32
|
args: {
|
|
30
33
|
type: RatingTypes.LIKE,
|
|
31
|
-
|
|
34
|
+
focusColor: '#3d5a7f',
|
|
35
|
+
unSelectedColor: '#d8d8d8',
|
|
32
36
|
value: 1,
|
|
33
37
|
},
|
|
34
38
|
};
|
|
35
|
-
export
|
|
39
|
+
export var SatisfactionRating = {
|
|
36
40
|
args: {
|
|
37
41
|
type: RatingTypes.SATISFACTION,
|
|
38
|
-
|
|
42
|
+
focusColor: '#3d5a7f',
|
|
43
|
+
unSelectedColor: '#d8d8d8',
|
|
39
44
|
},
|
|
40
45
|
};
|
|
41
|
-
export
|
|
46
|
+
export var SatisfactionRatingWidthValue = {
|
|
42
47
|
args: {
|
|
43
48
|
type: RatingTypes.SATISFACTION,
|
|
44
|
-
|
|
49
|
+
focusColor: '#3d5a7f',
|
|
50
|
+
unSelectedColor: '#d8d8d8',
|
|
45
51
|
value: 3,
|
|
46
52
|
},
|
|
47
53
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { RatingProps } from '../Rating';
|
|
2
|
-
declare function LikeRating({ disabled, inputRef, value, onChange }: RatingProps): JSX.Element;
|
|
3
|
+
declare function LikeRating({ disabled, inputRef, value, onChange, focusColor, unSelectedColor, }: RatingProps): JSX.Element;
|
|
3
4
|
export default LikeRating;
|
|
@@ -1,29 +1,43 @@
|
|
|
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import LikeIcon from '../../../Icons/Ratings/LikeIcon';
|
|
13
|
+
import ThumbDownRoundedIcon from '@material-ui/icons/ThumbDownRounded';
|
|
14
|
+
import ThumbUpRoundedIcon from '@material-ui/icons/ThumbUpRounded';
|
|
5
15
|
import styles from '../Rating.module.css';
|
|
6
|
-
function LikeRating(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const unSelectedColor = palette.outline.main;
|
|
10
|
-
return (_jsxs("div", { className: styles.ratingContainer, style: {
|
|
16
|
+
function LikeRating(_a) {
|
|
17
|
+
var disabled = _a.disabled, inputRef = _a.inputRef, value = _a.value, onChange = _a.onChange, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
18
|
+
return (_jsxs("div", __assign({ className: styles.ratingContainer, style: {
|
|
11
19
|
'--eureka-primary': focusColor,
|
|
12
20
|
'--eureka-outline': unSelectedColor,
|
|
13
|
-
}, children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx("div", { className: disabled
|
|
21
|
+
} }, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx("div", __assign({ className: disabled
|
|
22
|
+
? styles.disabledIconContainer
|
|
23
|
+
: styles.iconContainer, style: { height: 70 }, onClick: function () {
|
|
14
24
|
if (!disabled)
|
|
15
25
|
onChange(value === 1 ? null : 1);
|
|
16
|
-
}, children: _jsx(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
} }, { children: _jsx(ThumbUpRoundedIcon, { fontSize: "inherit", style: value === 1
|
|
27
|
+
? {
|
|
28
|
+
color: focusColor,
|
|
29
|
+
}
|
|
30
|
+
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
31
|
+
? styles.disabledIconContainer
|
|
32
|
+
: styles.iconContainer, style: { height: 70 }, onClick: function () {
|
|
20
33
|
if (!disabled)
|
|
21
34
|
onChange(value === 0 ? null : 0);
|
|
22
|
-
}, children: _jsx(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
} }, { children: _jsx(ThumbDownRoundedIcon, { fontSize: "inherit", style: value === 0
|
|
36
|
+
? {
|
|
37
|
+
color: focusColor,
|
|
38
|
+
marginTop: 14,
|
|
39
|
+
marginLeft: 15,
|
|
40
|
+
}
|
|
41
|
+
: { marginTop: 14, marginLeft: 15 } }) }))] })));
|
|
28
42
|
}
|
|
29
43
|
export default LikeRating;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { RatingProps } from '../Rating';
|
|
2
|
-
declare function SatisfactionRating({ value, inputRef, disabled, onChange }: RatingProps): JSX.Element;
|
|
3
|
+
declare function SatisfactionRating({ value, inputRef, disabled, onChange, focusColor, unSelectedColor, }: RatingProps): JSX.Element;
|
|
3
4
|
export default SatisfactionRating;
|
|
@@ -1,41 +1,61 @@
|
|
|
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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
13
|
import styles from '../Rating.module.css';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const focusColor = palette.primary.main;
|
|
11
|
-
const unSelectedColor = palette.outline.main;
|
|
12
|
-
return (_jsxs("div", { className: styles.ratingContainer, style: {
|
|
14
|
+
import SentimentVeryDissatisfiedIcon from '@material-ui/icons/SentimentVeryDissatisfied';
|
|
15
|
+
import SentimentDissatisfiedIcon from '@material-ui/icons/SentimentDissatisfied';
|
|
16
|
+
import SentimentSatisfiedAltIcon from '@material-ui/icons/SentimentSatisfiedAltOutlined';
|
|
17
|
+
import SentimentVerySatisfiedIcon from '@material-ui/icons/SentimentVerySatisfied';
|
|
18
|
+
function SatisfactionRating(_a) {
|
|
19
|
+
var value = _a.value, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
20
|
+
return (_jsxs("div", __assign({ className: styles.ratingContainer, style: {
|
|
13
21
|
'--eureka-primary': focusColor,
|
|
14
22
|
'--eureka-outline': unSelectedColor,
|
|
15
|
-
}, children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx("div", { className: disabled
|
|
23
|
+
} }, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx("div", __assign({ className: disabled
|
|
24
|
+
? styles.disabledIconContainer
|
|
25
|
+
: styles.iconContainer, onClick: function () {
|
|
16
26
|
if (!disabled)
|
|
17
27
|
onChange(value === 1 ? null : 1);
|
|
18
|
-
}, children: _jsx(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
} }, { children: _jsx(SentimentVeryDissatisfiedIcon, { fontSize: "inherit", style: value === 1
|
|
29
|
+
? {
|
|
30
|
+
color: focusColor,
|
|
31
|
+
}
|
|
32
|
+
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
33
|
+
? styles.disabledIconContainer
|
|
34
|
+
: styles.iconContainer, onClick: function () {
|
|
22
35
|
if (!disabled)
|
|
23
36
|
onChange(value === 2 ? null : 2);
|
|
24
|
-
}, children: _jsx(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
} }, { children: _jsx(SentimentDissatisfiedIcon, { fontSize: "inherit", style: value === 2
|
|
38
|
+
? {
|
|
39
|
+
color: focusColor,
|
|
40
|
+
}
|
|
41
|
+
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
42
|
+
? styles.disabledIconContainer
|
|
43
|
+
: styles.iconContainer, onClick: function () {
|
|
28
44
|
if (!disabled)
|
|
29
45
|
onChange(value === 3 ? null : 3);
|
|
30
|
-
}, children: _jsx(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
46
|
+
} }, { children: _jsx(SentimentSatisfiedAltIcon, { fontSize: "inherit", style: value === 3
|
|
47
|
+
? {
|
|
48
|
+
color: focusColor,
|
|
49
|
+
}
|
|
50
|
+
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
51
|
+
? styles.disabledIconContainer
|
|
52
|
+
: styles.iconContainer, onClick: function () {
|
|
34
53
|
if (!disabled)
|
|
35
54
|
onChange(value === 4 ? null : 4);
|
|
36
|
-
}, children: _jsx(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
55
|
+
} }, { children: _jsx(SentimentVerySatisfiedIcon, { fontSize: "inherit", style: value === 4
|
|
56
|
+
? {
|
|
57
|
+
color: focusColor,
|
|
58
|
+
}
|
|
59
|
+
: {} }) }))] })));
|
|
40
60
|
}
|
|
41
61
|
export default SatisfactionRating;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { RatingProps } from '../Rating';
|
|
2
|
-
declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile }: RatingProps): JSX.Element;
|
|
3
|
+
declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile, focusColor, unSelectedColor, }: RatingProps): JSX.Element;
|
|
3
4
|
export default ScaleRating;
|
|
@@ -1,31 +1,62 @@
|
|
|
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, 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';
|
|
2
27
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
var useRatingStyles = function (props) {
|
|
29
|
+
return makeStyles({
|
|
30
|
+
root: {
|
|
31
|
+
'&.Mui-disabled': {
|
|
32
|
+
opacity: 1,
|
|
33
|
+
},
|
|
34
|
+
'& .EF-MuiRating-iconFilled': {
|
|
35
|
+
color: props.focusColor,
|
|
36
|
+
},
|
|
37
|
+
'& .EF-MuiRating-iconEmpty': {
|
|
38
|
+
color: props.unSelectedColor,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
function ScaleRating(_a) {
|
|
44
|
+
var value = _a.value, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, isMobile = _a.isMobile, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
45
|
+
var ratingClasses = useRatingStyles({
|
|
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) {
|
|
21
50
|
if (!disabled)
|
|
22
51
|
onChange(newValue);
|
|
23
|
-
}, disabled: disabled, size: "large", defaultValue: 0, getLabelText: (value)
|
|
52
|
+
}, disabled: disabled, classes: ratingClasses, size: "large", defaultValue: 0, getLabelText: function (value) { return value + '/5'; }, max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer })] }));
|
|
24
53
|
}
|
|
25
|
-
function IconContainer(
|
|
26
|
-
|
|
54
|
+
function IconContainer(_a) {
|
|
55
|
+
var value = _a.value, other = __rest(_a, ["value"]);
|
|
56
|
+
return (_jsx("span", __assign({ className: 'icon' + value }, other, { children: _jsx(GradeRoundedIcon, { style: { fontSize: 60 } }) })));
|
|
27
57
|
}
|
|
28
|
-
function SmallIconContainer(
|
|
29
|
-
|
|
58
|
+
function SmallIconContainer(_a) {
|
|
59
|
+
var value = _a.value, other = __rest(_a, ["value"]);
|
|
60
|
+
return (_jsx("span", __assign({ className: 'icon' + value }, other, { children: _jsx(GradeRoundedIcon, { style: { fontSize: 50 } }) })));
|
|
30
61
|
}
|
|
31
62
|
export default ScaleRating;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ComponentProps {
|
|
3
|
+
/** Button text */
|
|
4
|
+
text: string;
|
|
5
|
+
/** Background Color */
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
/** Font Color */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Button Click Handle */
|
|
10
|
+
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
11
|
+
/** If button is disabled */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Text font size */
|
|
14
|
+
fontSize?: number | string;
|
|
15
|
+
/** Button padding '0 13px 0 13px' format */
|
|
16
|
+
padding?: string;
|
|
17
|
+
/** border radius */
|
|
18
|
+
borderRadius?: number;
|
|
19
|
+
/** Component height */
|
|
20
|
+
height?: number;
|
|
21
|
+
/** If text is bold */
|
|
22
|
+
bold?: boolean;
|
|
23
|
+
/** The width of the button */
|
|
24
|
+
width?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Generic rounded button
|
|
28
|
+
*/
|
|
29
|
+
declare function RoundedButton({ text, backgroundColor, color, onClick, disabled, fontSize, padding, borderRadius, height, bold, width, }: ComponentProps): JSX.Element;
|
|
30
|
+
export default RoundedButton;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Button, withStyles } from '@material-ui/core';
|
|
14
|
+
/**
|
|
15
|
+
* Generic rounded button
|
|
16
|
+
*/
|
|
17
|
+
function RoundedButton(_a) {
|
|
18
|
+
var text = _a.text, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.color, color = _c === void 0 ? '#ffffff' : _c, onClick = _a.onClick, disabled = _a.disabled, _d = _a.fontSize, fontSize = _d === void 0 ? '1rem' : _d, _e = _a.padding, padding = _e === void 0 ? '0 13px 0 13px' : _e, _f = _a.borderRadius, borderRadius = _f === void 0 ? 10 : _f, _g = _a.height, height = _g === void 0 ? 28 : _g, _h = _a.bold, bold = _h === void 0 ? false : _h, _j = _a.width, width = _j === void 0 ? 'fit-content' : _j;
|
|
19
|
+
var CustomButton = withStyles({
|
|
20
|
+
root: {
|
|
21
|
+
width: width,
|
|
22
|
+
textTransform: 'none',
|
|
23
|
+
fontFamily: 'inherit',
|
|
24
|
+
fontSize: fontSize,
|
|
25
|
+
borderRadius: borderRadius,
|
|
26
|
+
padding: padding,
|
|
27
|
+
height: height,
|
|
28
|
+
boxShadow: 'none',
|
|
29
|
+
backgroundColor: backgroundColor,
|
|
30
|
+
color: color,
|
|
31
|
+
'&:hover': {
|
|
32
|
+
boxShadow: 'none',
|
|
33
|
+
backgroundColor: backgroundColor,
|
|
34
|
+
},
|
|
35
|
+
'&:disabled': {
|
|
36
|
+
backgroundColor: backgroundColor,
|
|
37
|
+
color: color,
|
|
38
|
+
opacity: 0.5,
|
|
39
|
+
},
|
|
40
|
+
fontWeight: bold ? 'bold' : 'normal',
|
|
41
|
+
},
|
|
42
|
+
})(Button);
|
|
43
|
+
return (_jsx(CustomButton, __assign({ variant: "contained", onMouseDown: onClick, disabled: disabled }, { children: text })));
|
|
44
|
+
}
|
|
45
|
+
export default RoundedButton;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import RoundedButton from './RoundedButton';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: typeof RoundedButton;
|
|
5
|
+
tags: string[];
|
|
6
|
+
args: {
|
|
7
|
+
text: string;
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
color: string;
|
|
10
|
+
disabled: false;
|
|
11
|
+
fontSize: string;
|
|
12
|
+
padding: string;
|
|
13
|
+
borderRadius: number;
|
|
14
|
+
height: number;
|
|
15
|
+
bold: false;
|
|
16
|
+
width: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Default: Story;
|
|
22
|
+
export declare const Disabled: Story;
|
|
23
|
+
export declare const DifferentColors: Story;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import RoundedButton from './RoundedButton';
|
|
2
|
+
var meta = {
|
|
3
|
+
component: RoundedButton,
|
|
4
|
+
tags: ['autodocs'],
|
|
5
|
+
args: {
|
|
6
|
+
text: 'Label',
|
|
7
|
+
backgroundColor: '#3d5a7f',
|
|
8
|
+
color: '#ffffff',
|
|
9
|
+
disabled: false,
|
|
10
|
+
fontSize: '1rem',
|
|
11
|
+
padding: '0 13px 0 13px',
|
|
12
|
+
borderRadius: 10,
|
|
13
|
+
height: 28,
|
|
14
|
+
bold: false,
|
|
15
|
+
width: 'fit-content',
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
export var Default = {
|
|
20
|
+
args: {
|
|
21
|
+
text: 'Label',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export var Disabled = {
|
|
25
|
+
args: {
|
|
26
|
+
text: 'Label',
|
|
27
|
+
disabled: true,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export var DifferentColors = {
|
|
31
|
+
args: {
|
|
32
|
+
text: 'Label',
|
|
33
|
+
backgroundColor: 'red',
|
|
34
|
+
color: 'blue',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CheckboxProps } from '@material-ui/core';
|
|
3
|
+
interface StyleProps {
|
|
4
|
+
error?: boolean;
|
|
5
|
+
padding?: string;
|
|
6
|
+
uncheckedColor?: string;
|
|
7
|
+
checkedColor?: string;
|
|
8
|
+
checkedHoverColor?: string;
|
|
9
|
+
errorColor?: string;
|
|
10
|
+
disabledColor?: string;
|
|
11
|
+
size?: number | string;
|
|
12
|
+
cantEdit?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface ComponentProps extends StyleProps, Omit<CheckboxProps, 'size' | 'onChange'> {
|
|
15
|
+
onChange?: (checked: boolean) => void;
|
|
16
|
+
checked: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generic datepicker with apps designs. Is class due to the use in the react-hook-forms library
|
|
20
|
+
*/
|
|
21
|
+
declare class RoundedCheckBox extends React.Component<ComponentProps> {
|
|
22
|
+
render(): JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export default RoundedCheckBox;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
+
var t = {};
|
|
29
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
+
t[p] = s[p];
|
|
31
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
};
|
|
38
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
39
|
+
import React from 'react';
|
|
40
|
+
import { Checkbox, makeStyles } from '@material-ui/core';
|
|
41
|
+
import CheckBoxRoundedIcon from '@material-ui/icons/CheckBoxRounded';
|
|
42
|
+
import CheckBoxOutlineBlankRoundedIcon from '@material-ui/icons/CheckBoxOutlineBlankRounded';
|
|
43
|
+
var useCheckBoxStyles = function (props) {
|
|
44
|
+
return makeStyles(function () { return ({
|
|
45
|
+
root: {
|
|
46
|
+
padding: props.padding,
|
|
47
|
+
fontSize: props.size,
|
|
48
|
+
color: props.error ? props.errorColor : props.uncheckedColor,
|
|
49
|
+
'&.Mui-checked': {
|
|
50
|
+
color: props.checkedColor,
|
|
51
|
+
},
|
|
52
|
+
'&.Mui-checked:hover': {
|
|
53
|
+
backgroundColor: props.checkedHoverColor,
|
|
54
|
+
},
|
|
55
|
+
'&.Mui-disabled': {
|
|
56
|
+
cursor: 'default',
|
|
57
|
+
pointerEvents: 'all !important',
|
|
58
|
+
color: props.cantEdit
|
|
59
|
+
? props.disabledColor
|
|
60
|
+
: props.checkedColor,
|
|
61
|
+
},
|
|
62
|
+
'&:hover': {
|
|
63
|
+
backgroundColor: props.cantEdit
|
|
64
|
+
? 'transparent'
|
|
65
|
+
: props.checkedHoverColor,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
}); });
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Generic rounded checkbox
|
|
72
|
+
*/
|
|
73
|
+
function CustomCheckBox(_a) {
|
|
74
|
+
var _b = _a.padding, padding = _b === void 0 ? '9px' : _b, onChange = _a.onChange, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? '1.5rem' : _d, _e = _a.checkedColor, checkedColor = _e === void 0 ? '#3d5a7f' : _e, _f = _a.uncheckedColor, uncheckedColor = _f === void 0 ? '#787878' : _f, _g = _a.disabledColor, disabledColor = _g === void 0 ? '#A0A0A0' : _g, _h = _a.errorColor, errorColor = _h === void 0 ? '#cc2936' : _h, _j = _a.cantEdit, cantEdit = _j === void 0 ? false : _j, checked = _a.checked, others = __rest(_a, ["padding", "onChange", "error", "size", "checkedColor", "uncheckedColor", "disabledColor", "errorColor", "cantEdit", "checked"]);
|
|
75
|
+
var classes = useCheckBoxStyles({
|
|
76
|
+
size: size,
|
|
77
|
+
error: error,
|
|
78
|
+
padding: padding,
|
|
79
|
+
cantEdit: cantEdit,
|
|
80
|
+
errorColor: errorColor,
|
|
81
|
+
checkedColor: checkedColor,
|
|
82
|
+
disabledColor: disabledColor,
|
|
83
|
+
uncheckedColor: uncheckedColor,
|
|
84
|
+
checkedHoverColor: checkedColor + '0a',
|
|
85
|
+
})();
|
|
86
|
+
return (_jsx(Checkbox, __assign({}, others, { disabled: cantEdit, classes: classes, checked: checked, onChange: function (event) { return onChange === null || onChange === void 0 ? void 0 : onChange(event.target.checked); }, required: true, icon: _jsx(CheckBoxOutlineBlankRoundedIcon, { fontSize: "inherit" }), checkedIcon: _jsx(CheckBoxRoundedIcon, { fontSize: "inherit" }) })));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Generic datepicker with apps designs. Is class due to the use in the react-hook-forms library
|
|
90
|
+
*/
|
|
91
|
+
var RoundedCheckBox = /** @class */ (function (_super) {
|
|
92
|
+
__extends(RoundedCheckBox, _super);
|
|
93
|
+
function RoundedCheckBox() {
|
|
94
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
95
|
+
}
|
|
96
|
+
RoundedCheckBox.prototype.render = function () {
|
|
97
|
+
return _jsx(CustomCheckBox, __assign({}, this.props));
|
|
98
|
+
};
|
|
99
|
+
return RoundedCheckBox;
|
|
100
|
+
}(React.Component));
|
|
101
|
+
export default RoundedCheckBox;
|