@arquimedes.co/eureka-forms 3.0.41 → 3.0.42-test
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 +4 -6
- package/dist/@Types/Form.d.ts +0 -1
- package/dist/@Types/FormStep.d.ts +8 -12
- package/dist/@Types/GenericFormSteps.d.ts +8 -0
- package/dist/App/App.d.ts +1 -3
- package/dist/App/App.js +21 -46
- package/dist/App/AppFunctions.d.ts +1 -1
- package/dist/App/AppFunctions.js +177 -336
- package/dist/App/AppFunctions.test.js +708 -0
- package/dist/App/AppHooks.d.ts +2 -2
- package/dist/App/AppHooks.js +149 -252
- package/dist/App/AppHooks.test.js +154 -0
- package/dist/Contexts/CustomContext.d.ts +0 -1
- package/dist/Contexts/CustomContext.js +1 -1
- package/dist/Contexts/FormContext.d.ts +1 -1
- package/dist/Contexts/FormContext.js +3 -2
- package/dist/Contexts/SectionContext.d.ts +0 -1
- package/dist/Contexts/SectionContext.js +1 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +1 -2
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +36 -62
- package/dist/Form/Form.d.ts +2 -3
- package/dist/Form/Form.js +74 -164
- package/dist/Form/Form.module.css +0 -9
- package/dist/Form/FormFunctions.js +63 -112
- package/dist/Form/FormFunctions.test.js +458 -0
- package/dist/Form/FormHooks.d.ts +1 -2
- package/dist/Form/FormHooks.js +14 -21
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +0 -1
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +34 -105
- package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +1 -2
- package/dist/Form/FormTypes/StepperForm/StepperForm.js +48 -110
- package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +0 -1
- package/dist/Form/Section/MaterialSection/MaterialSection.js +10 -23
- package/dist/Form/Section/MaterialSection/MaterialSection.module.css +0 -2
- package/dist/Form/Section/Section.d.ts +0 -1
- package/dist/Form/Section/Section.js +4 -15
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +0 -1
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.js +30 -65
- package/dist/Form/Terms/Term/Term.d.ts +0 -1
- package/dist/Form/Terms/Term/Term.js +2 -13
- package/dist/Form/Terms/Terms.d.ts +0 -1
- package/dist/Form/Terms/Terms.js +17 -29
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +34 -107
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +2 -13
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +12 -40
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +66 -93
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/addRecursiveElementStep.d.ts +2 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/addRecursiveElementStep.js +22 -0
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +0 -1
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +45 -115
- package/dist/FormSteps/AYFStepMapper.d.ts +0 -1
- package/dist/FormSteps/AYFStepMapper.js +60 -137
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +0 -1
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.js +2 -13
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +0 -1
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +66 -172
- package/dist/FormSteps/CBRStepMapper.d.ts +0 -1
- package/dist/FormSteps/CBRStepMapper.js +57 -169
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +0 -1
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.js +2 -13
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +0 -1
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +19 -37
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +0 -1
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +2 -13
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +1 -2
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +49 -81
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +0 -1
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.js +3 -26
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +0 -1
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +35 -66
- package/dist/FormSteps/CustomStep.d.ts +0 -1
- package/dist/FormSteps/CustomStep.js +17 -31
- package/dist/FormSteps/DatePickerRangeStep/DatePickerRangeStep.d.ts +10 -0
- package/dist/FormSteps/DatePickerRangeStep/DatePickerRangeStep.js +14 -0
- package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.d.ts +3 -0
- package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.js +34 -0
- package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +1 -2
- package/dist/FormSteps/DatePickerStep/DatePickerStep.js +2 -13
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +1 -2
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +9 -20
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +0 -1
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.js +2 -13
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +0 -1
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.js +16 -32
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +1 -2
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +107 -302
- package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +0 -1
- package/dist/FormSteps/FileUploadStep/FileUploadStep.js +2 -13
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +0 -1
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +33 -95
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +2 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.js +3 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +0 -2
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +91 -184
- package/dist/FormSteps/MapperStep/MapperStep.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MapperStep.js +2 -13
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +16 -38
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +22 -33
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.js +89 -175
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +20 -47
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +0 -1
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +78 -117
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +1 -2
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.js +15 -33
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +0 -1
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.js +2 -13
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +0 -1
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +17 -31
- package/dist/FormSteps/RatingStep/RatingStep.d.ts +0 -1
- package/dist/FormSteps/RatingStep/RatingStep.js +2 -13
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +0 -1
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +37 -61
- package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +0 -1
- package/dist/FormSteps/SelectorStep/SelectorStep.js +2 -13
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +0 -1
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +2 -3
- package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +0 -1
- package/dist/FormSteps/SeparatorStep/SeparatorStep.js +2 -13
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +1 -2
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +80 -155
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +7 -7
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.js +2 -13
- package/dist/FormSteps/Step.d.ts +0 -1
- package/dist/FormSteps/Step.js +33 -58
- package/dist/FormSteps/StepFunctions.d.ts +4 -6
- package/dist/FormSteps/StepFunctions.js +153 -208
- package/dist/FormSteps/StepFunctions.test.js +702 -0
- package/dist/FormSteps/StepHooks.d.ts +68 -14
- package/dist/FormSteps/StepHooks.js +96 -155
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +18 -20
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +0 -1
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +39 -75
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +1 -2
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +12 -28
- package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +0 -1
- package/dist/FormSteps/TextAreaStep/TextAreaStep.js +3 -14
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +1 -2
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +13 -31
- package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +1 -2
- package/dist/FormSteps/TextInputStep/TextInputStep.js +2 -13
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +1 -2
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.js +9 -26
- package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +0 -1
- package/dist/FormSteps/TimePickerStep/TimePickerStep.js +2 -13
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +0 -1
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +21 -54
- package/dist/FormSteps/TitleStep/TitleStep.d.ts +0 -1
- package/dist/FormSteps/TitleStep/TitleStep.js +2 -13
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +1 -2
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.js +15 -27
- package/dist/FormSteps/Utils/@StepFiller/StepFillerContext.d.ts +1 -0
- package/dist/FormSteps/Utils/@StepFiller/StepFillerContext.js +2 -0
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +2 -3
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +8 -23
- package/dist/Icons/@ErkIcon.d.ts +14 -0
- package/dist/Icons/@ErkIcon.js +9 -0
- package/dist/Icons/ArrowLeftIcon.d.ts +3 -0
- package/dist/Icons/ArrowLeftIcon.js +7 -0
- package/dist/Icons/ArrowRightIcon.d.ts +3 -0
- package/dist/Icons/ArrowRightIcon.js +7 -0
- package/dist/Icons/CalendarIcon.d.ts +2 -3
- package/dist/Icons/CalendarIcon.js +4 -14
- package/dist/Icons/CheckCircleIcon.d.ts +3 -0
- package/dist/Icons/CheckCircleIcon.js +7 -0
- package/dist/Icons/CheckboxCheckedIcon.d.ts +3 -0
- package/dist/Icons/CheckboxCheckedIcon.js +7 -0
- package/dist/Icons/CheckboxUncheckedIcon.d.ts +3 -0
- package/dist/Icons/CheckboxUncheckedIcon.js +7 -0
- package/dist/Icons/ClockIcon.d.ts +3 -0
- package/dist/Icons/ClockIcon.js +7 -0
- package/dist/Icons/CloseIcon.d.ts +3 -0
- package/dist/Icons/CloseIcon.js +7 -0
- package/dist/Icons/Construction/LeakIcon.d.ts +2 -2
- package/dist/Icons/Construction/LeakIcon.js +3 -13
- package/dist/Icons/Construction/ProjectIcon.d.ts +2 -2
- package/dist/Icons/Construction/ProjectIcon.js +3 -13
- package/dist/Icons/Construction/PropertyIcon.d.ts +2 -2
- package/dist/Icons/Construction/PropertyIcon.js +3 -13
- package/dist/Icons/Construction/SpaceIcon.d.ts +2 -2
- package/dist/Icons/Construction/SpaceIcon.js +3 -13
- package/dist/Icons/DeleteIcon.d.ts +3 -0
- package/dist/Icons/DeleteIcon.js +7 -0
- package/dist/Icons/DocumentIcon.d.ts +2 -2
- package/dist/Icons/DocumentIcon.js +3 -13
- package/dist/Icons/Entities/CheckListIcon.d.ts +2 -2
- package/dist/Icons/Entities/CheckListIcon.js +3 -13
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -2
- package/dist/Icons/Entities/GenericEntityIcon.js +5 -15
- package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -2
- package/dist/Icons/Entities/HandshakeIcon.js +5 -15
- package/dist/Icons/Entities/SupplierIcon.d.ts +2 -2
- package/dist/Icons/Entities/SupplierIcon.js +5 -15
- package/dist/Icons/Entities/WorkIcon.d.ts +3 -0
- package/dist/Icons/Entities/WorkIcon.js +7 -0
- package/dist/Icons/ErrorIcon.d.ts +3 -0
- package/dist/Icons/ErrorIcon.js +7 -0
- package/dist/Icons/ExpandLessIcon.d.ts +3 -0
- package/dist/Icons/ExpandLessIcon.js +7 -0
- package/dist/Icons/ExpandMoreIcon.d.ts +3 -0
- package/dist/Icons/ExpandMoreIcon.js +7 -0
- package/dist/Icons/FileIcon.d.ts +3 -0
- package/dist/Icons/FileIcon.js +7 -0
- package/dist/Icons/InfoIcon.d.ts +3 -0
- package/dist/Icons/InfoIcon.js +7 -0
- package/dist/Icons/LocationIcon.d.ts +2 -3
- package/dist/Icons/LocationIcon.js +4 -14
- package/dist/Icons/PersonIcon.d.ts +2 -3
- package/dist/Icons/PersonIcon.js +6 -16
- package/dist/Icons/Ratings/DislikeIcon.d.ts +3 -0
- package/dist/Icons/Ratings/DislikeIcon.js +7 -0
- package/dist/Icons/Ratings/DissatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/DissatisfiedIcon.js +7 -0
- package/dist/Icons/Ratings/LikeIcon.d.ts +3 -0
- package/dist/Icons/Ratings/LikeIcon.js +7 -0
- package/dist/Icons/Ratings/SatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/SatisfiedIcon.js +7 -0
- package/dist/Icons/Ratings/StarIcon.d.ts +3 -0
- package/dist/Icons/Ratings/StarIcon.js +7 -0
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +7 -0
- package/dist/Icons/Ratings/VerySatisfiedIcon.d.ts +3 -0
- package/dist/Icons/Ratings/VerySatisfiedIcon.js +7 -0
- package/dist/Icons/WarningIcon.d.ts +3 -0
- package/dist/Icons/WarningIcon.js +7 -0
- package/dist/Init.d.ts +1 -0
- package/dist/Init.js +2 -0
- package/dist/Services/DraftService.d.ts +14 -14
- package/dist/Services/DraftService.js +22 -72
- package/dist/Services/FileService.d.ts +1 -1
- package/dist/Services/FileService.js +29 -86
- package/dist/Services/FormService.js +11 -56
- package/dist/Services/OrganizationService.js +11 -62
- package/dist/Shared/CustomBtn/CustomBtn.d.ts +1 -2
- package/dist/Shared/CustomBtn/CustomBtn.js +25 -88
- package/dist/Shared/ErkButton/ErkButton.d.ts +25 -0
- package/dist/Shared/ErkButton/ErkButton.js +31 -0
- package/dist/Shared/ErkButton/ErkButton.stories.d.ts +16 -0
- package/dist/Shared/ErkButton/ErkButton.stories.js +28 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +19 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.js +31 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +13 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.js +34 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +18 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.js +277 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +23 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.js +98 -0
- package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.d.ts +18 -0
- package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.js +180 -0
- package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.stories.d.ts +36 -0
- package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.stories.js +274 -0
- package/dist/Shared/ErkMenuItem.d.ts +2 -0
- package/dist/Shared/ErkMenuItem.js +18 -0
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.d.ts +17 -0
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.js +96 -0
- package/dist/Shared/ErkSelect/ErkSelect.d.ts +48 -0
- package/dist/Shared/ErkSelect/ErkSelect.js +142 -0
- package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +21 -0
- package/dist/Shared/ErkSelect/ErkSelect.stories.js +87 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.d.ts +28 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.js +54 -0
- package/dist/Shared/{RoundedSmartSelect/RoundedSmartSelect.stories.d.ts → ErkSmartSelect/ErkSmartSelect.stories.d.ts} +3 -13
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.js +159 -0
- package/dist/Shared/ErkTextField/ErkTextField.d.ts +34 -0
- package/dist/Shared/ErkTextField/ErkTextField.js +149 -0
- package/dist/Shared/{RoundedTextField/RoundedTextField.stories.d.ts → ErkTextField/ErkTextField.stories.d.ts} +4 -17
- package/dist/Shared/ErkTextField/ErkTextField.stories.js +99 -0
- package/dist/Shared/ErkTimePicker/ErkTimePicker.d.ts +32 -0
- package/dist/Shared/ErkTimePicker/ErkTimePicker.js +107 -0
- package/dist/Shared/InputIcon/InputIcon.d.ts +3 -3
- package/dist/Shared/InputIcon/InputIcon.js +29 -112
- package/dist/Shared/Loader/Loader.d.ts +0 -1
- package/dist/Shared/Loader/Loader.js +6 -18
- package/dist/Shared/Navbar/Navbar.d.ts +1 -3
- package/dist/Shared/Navbar/Navbar.js +3 -96
- package/dist/Shared/Navbar/Navbar.module.css +0 -15
- 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 +3 -5
- package/dist/Shared/Rating/Rating.js +4 -27
- package/dist/Shared/Rating/Rating.stories.d.ts +1 -1
- package/dist/Shared/Rating/Rating.stories.js +13 -19
- package/dist/Shared/Rating/Ratings/LikeRating.d.ts +1 -2
- package/dist/Shared/Rating/Ratings/LikeRating.js +19 -33
- package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +1 -2
- package/dist/Shared/Rating/Ratings/SatisfactionRating.js +27 -47
- package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +1 -2
- package/dist/Shared/Rating/Ratings/ScaleRating.js +23 -54
- package/dist/Shared/SmartDraftRenderer/DraftLoadingContext.d.ts +1 -0
- package/dist/Shared/SmartDraftRenderer/DraftLoadingContext.js +2 -0
- package/dist/Shared/SmartDraftRenderer/FormDecorator.d.ts +1 -2
- package/dist/Shared/SmartDraftRenderer/FormDecorator.js +8 -22
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.d.ts +1 -2
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.js +27 -43
- package/dist/Shared/Toggle/Toggle.d.ts +5 -14
- package/dist/Shared/Toggle/Toggle.js +29 -32
- package/dist/States/GlobalSlice.d.ts +7 -12
- package/dist/States/GlobalSlice.js +6 -26
- package/dist/States/SiteSlice.d.ts +30 -48
- package/dist/States/SiteSlice.js +58 -76
- package/dist/States/WidthStatsSlice.d.ts +2 -2
- package/dist/States/WidthStatsSlice.js +8 -9
- package/dist/Utils/AxiosAPI.d.ts +4 -5
- package/dist/Utils/AxiosAPI.js +23 -73
- package/dist/Utils/AxiosWidget.js +4 -4
- package/dist/Utils/CBRFunctions.js +29 -30
- package/dist/Utils/DraftFunctions.d.ts +3 -3
- package/dist/Utils/DraftFunctions.js +102 -143
- package/dist/Utils/FormStepFunctions.d.ts +1 -1
- package/dist/Utils/FormStepFunctions.js +27 -45
- package/dist/Utils/LocaleUtils.d.ts +2 -0
- package/dist/Utils/LocaleUtils.js +12 -0
- package/dist/Utils/MaterialProviders.d.ts +21 -1
- package/dist/Utils/MaterialProviders.js +46 -28
- package/dist/Utils/MuiClassnameSetup.d.ts +1 -0
- package/dist/Utils/MuiClassnameSetup.js +3 -0
- package/dist/Utils/PhoneFunctions.js +5 -5
- package/dist/Utils/StoreContext.js +1 -1
- package/dist/Utils/TestUtils.d.ts +60 -81
- package/dist/Utils/TestUtils.js +28 -57
- package/dist/Utils/_api.d.ts +7 -7
- package/dist/Utils/_api.js +10 -8
- package/dist/Utils/store.d.ts +9 -17
- package/dist/Utils/store.js +15 -74
- package/dist/Widget.d.ts +1 -1
- package/dist/Widget.js +17 -27
- package/dist/constants/Draft/DraftEntityDataTypes.d.ts +3 -3
- package/dist/constants/{IconTypes.d.ts → ErkIconTypes.d.ts} +2 -4
- package/dist/constants/ErkIconTypes.js +16 -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/InternalFormStyle.js +1 -1
- package/dist/hooks.d.ts +0 -3
- package/dist/hooks.js +14 -77
- package/dist/index.css +15 -0
- package/dist/index.lib.d.ts +0 -1
- package/dist/index.lib.js +0 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.js +25 -0
- package/package.json +111 -125
- package/dist/@Types/ErkValue.d.ts +0 -16
- package/dist/@Types/User.d.ts +0 -13
- package/dist/Icons/@IconTypes.d.ts +0 -7
- package/dist/Icons/EmailIcon.d.ts +0 -4
- package/dist/Icons/EmailIcon.js +0 -17
- package/dist/Icons/Entities/SchoolIcon.d.ts +0 -2
- package/dist/Icons/Entities/SchoolIcon.js +0 -17
- package/dist/Icons/GroupIcon.d.ts +0 -4
- package/dist/Icons/GroupIcon.js +0 -17
- package/dist/Icons/LockedIcon.d.ts +0 -4
- package/dist/Icons/LockedIcon.js +0 -17
- package/dist/Login/Login.module.css +0 -135
- package/dist/Login/LoginLayout.module.css +0 -68
- package/dist/Login/LoginPage.d.ts +0 -11
- package/dist/Login/LoginPage.js +0 -179
- package/dist/Login/LoginTextField.d.ts +0 -15
- package/dist/Login/LoginTextField.js +0 -134
- package/dist/Services/ApiSelectorService.d.ts +0 -39
- package/dist/Services/ApiSelectorService.js +0 -244
- package/dist/Services/IntegrationService.d.ts +0 -21
- package/dist/Services/IntegrationService.js +0 -69
- package/dist/Services/UserService.d.ts +0 -10
- package/dist/Services/UserService.js +0 -71
- package/dist/Shared/RoundedButton/RoundedButton.d.ts +0 -30
- package/dist/Shared/RoundedButton/RoundedButton.js +0 -45
- package/dist/Shared/RoundedButton/RoundedButton.stories.d.ts +0 -23
- package/dist/Shared/RoundedButton/RoundedButton.stories.js +0 -36
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.d.ts +0 -24
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.js +0 -101
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.d.ts +0 -21
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.js +0 -50
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.d.ts +0 -49
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.js +0 -351
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.d.ts +0 -36
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.js +0 -223
- package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.d.ts +0 -43
- package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.js +0 -226
- package/dist/Shared/RoundedSelect/RoundedSelect.d.ts +0 -68
- package/dist/Shared/RoundedSelect/RoundedSelect.js +0 -214
- package/dist/Shared/RoundedSelect/RoundedSelect.stories.d.ts +0 -28
- package/dist/Shared/RoundedSelect/RoundedSelect.stories.js +0 -91
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +0 -63
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.js +0 -236
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.js +0 -318
- package/dist/Shared/RoundedTextField/RoundedTextField.d.ts +0 -45
- package/dist/Shared/RoundedTextField/RoundedTextField.js +0 -175
- package/dist/Shared/RoundedTextField/RoundedTextField.stories.js +0 -224
- package/dist/Shared/RoundedTimePicker/RoundedTimePicker.d.ts +0 -41
- package/dist/Shared/RoundedTimePicker/RoundedTimePicker.js +0 -314
- package/dist/Shared/SmartDraftRenderer/LinkDecorator.d.ts +0 -14
- package/dist/Shared/SmartDraftRenderer/LinkDecorator.js +0 -60
- package/dist/__mocks__/axios.d.ts +0 -2
- package/dist/__mocks__/axios.js +0 -2
- package/dist/constants/ErkValueTypes.d.ts +0 -6
- package/dist/constants/ErkValueTypes.js +0 -7
- package/dist/constants/IconTypes.js +0 -18
- package/dist/constants/MaterialClassNameSeed.d.ts +0 -1
- package/dist/constants/MaterialClassNameSeed.js +0 -1
- package/dist/index.js +0 -31
- /package/dist/{@Types/ErkValue.js → App/AppFunctions.test.d.ts} +0 -0
- /package/dist/{@Types/User.js → App/AppHooks.test.d.ts} +0 -0
- /package/dist/{Icons/@IconTypes.js → Form/FormFunctions.test.d.ts} +0 -0
- /package/dist/{index.d.ts → FormSteps/StepFunctions.test.d.ts} +0 -0
- /package/dist/Shared/{RoundedTimePicker/RoundedTimePicker.module.css → ErkTimePicker/ErkTimePicker.module.css} +0 -0
- /package/dist/{setupTests.d.ts → __tests__/setup.d.ts} +0 -0
- /package/dist/{setupTests.js → __tests__/setup.js} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RatingProps } from '../Rating';
|
|
3
|
-
declare function LikeRating({ disabled, inputRef, value, onChange
|
|
2
|
+
declare function LikeRating({ disabled, inputRef, value, onChange }: RatingProps): JSX.Element;
|
|
4
3
|
export default LikeRating;
|
|
@@ -1,43 +1,29 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
2
|
+
import { useTheme } from '@mui/material';
|
|
3
|
+
import DislikeIcon from '../../../Icons/Ratings/DislikeIcon';
|
|
4
|
+
import LikeIcon from '../../../Icons/Ratings/LikeIcon';
|
|
15
5
|
import styles from '../Rating.module.css';
|
|
16
|
-
function LikeRating(
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
function LikeRating({ disabled, inputRef, value, onChange }) {
|
|
7
|
+
const { palette } = useTheme();
|
|
8
|
+
const focusColor = palette.primary.main;
|
|
9
|
+
const unSelectedColor = palette.outline.main;
|
|
10
|
+
return (_jsxs("div", { className: styles.ratingContainer, style: {
|
|
19
11
|
'--eureka-primary': focusColor,
|
|
20
12
|
'--eureka-outline': unSelectedColor,
|
|
21
|
-
}
|
|
22
|
-
? styles.disabledIconContainer
|
|
23
|
-
: styles.iconContainer, style: { height: 70 }, onClick: function () {
|
|
13
|
+
}, children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, style: { height: 70 }, onClick: () => {
|
|
24
14
|
if (!disabled)
|
|
25
15
|
onChange(value === 1 ? null : 1);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
31
|
-
? styles.disabledIconContainer
|
|
32
|
-
: styles.iconContainer, style: { height: 70 }, onClick: function () {
|
|
16
|
+
}, children: _jsx(LikeIcon, { style: {
|
|
17
|
+
fontSize: 'inherit',
|
|
18
|
+
color: value === 1 ? focusColor : undefined,
|
|
19
|
+
} }) }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, style: { height: 70 }, onClick: () => {
|
|
33
20
|
if (!disabled)
|
|
34
21
|
onChange(value === 0 ? null : 0);
|
|
35
|
-
}
|
|
36
|
-
?
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
: { marginTop: 14, marginLeft: 15 } }) }))] })));
|
|
22
|
+
}, children: _jsx(DislikeIcon, { style: {
|
|
23
|
+
color: value === 0 ? focusColor : undefined,
|
|
24
|
+
fontSize: 'inherit',
|
|
25
|
+
marginTop: 14,
|
|
26
|
+
marginLeft: 15,
|
|
27
|
+
} }) })] }));
|
|
42
28
|
}
|
|
43
29
|
export default LikeRating;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RatingProps } from '../Rating';
|
|
3
|
-
declare function SatisfactionRating({ value, inputRef, disabled, onChange
|
|
2
|
+
declare function SatisfactionRating({ value, inputRef, disabled, onChange }: RatingProps): JSX.Element;
|
|
4
3
|
export default SatisfactionRating;
|
|
@@ -1,61 +1,41 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import styles from '../Rating.module.css';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
import VeryDissatisfiedIcon from '../../../Icons/Ratings/VeryDissatisfiedIcon';
|
|
4
|
+
import DissatisfiedIcon from '../../../Icons/Ratings/DissatisfiedIcon';
|
|
5
|
+
import SatisfiedIcon from '../../../Icons/Ratings/SatisfiedIcon';
|
|
6
|
+
import VerySatisfiedIcon from '../../../Icons/Ratings/VerySatisfiedIcon';
|
|
7
|
+
import { useTheme } from '@mui/material';
|
|
8
|
+
function SatisfactionRating({ value, inputRef, disabled, onChange }) {
|
|
9
|
+
const { palette } = useTheme();
|
|
10
|
+
const focusColor = palette.primary.main;
|
|
11
|
+
const unSelectedColor = palette.outline.main;
|
|
12
|
+
return (_jsxs("div", { className: styles.ratingContainer, style: {
|
|
21
13
|
'--eureka-primary': focusColor,
|
|
22
14
|
'--eureka-outline': unSelectedColor,
|
|
23
|
-
}
|
|
24
|
-
? styles.disabledIconContainer
|
|
25
|
-
: styles.iconContainer, onClick: function () {
|
|
15
|
+
}, children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, onClick: () => {
|
|
26
16
|
if (!disabled)
|
|
27
17
|
onChange(value === 1 ? null : 1);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
33
|
-
? styles.disabledIconContainer
|
|
34
|
-
: styles.iconContainer, onClick: function () {
|
|
18
|
+
}, children: _jsx(VeryDissatisfiedIcon, { style: {
|
|
19
|
+
fontSize: 'inherit',
|
|
20
|
+
color: value === 1 ? focusColor : undefined,
|
|
21
|
+
} }) }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, onClick: () => {
|
|
35
22
|
if (!disabled)
|
|
36
23
|
onChange(value === 2 ? null : 2);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
42
|
-
? styles.disabledIconContainer
|
|
43
|
-
: styles.iconContainer, onClick: function () {
|
|
24
|
+
}, children: _jsx(DissatisfiedIcon, { style: {
|
|
25
|
+
fontSize: 'inherit',
|
|
26
|
+
color: value === 2 ? focusColor : undefined,
|
|
27
|
+
} }) }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, onClick: () => {
|
|
44
28
|
if (!disabled)
|
|
45
29
|
onChange(value === 3 ? null : 3);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
51
|
-
? styles.disabledIconContainer
|
|
52
|
-
: styles.iconContainer, onClick: function () {
|
|
30
|
+
}, children: _jsx(SatisfiedIcon, { style: {
|
|
31
|
+
fontSize: 'inherit',
|
|
32
|
+
color: value === 3 ? focusColor : undefined,
|
|
33
|
+
} }) }), _jsx("div", { className: disabled ? styles.disabledIconContainer : styles.iconContainer, onClick: () => {
|
|
53
34
|
if (!disabled)
|
|
54
35
|
onChange(value === 4 ? null : 4);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
: {} }) }))] })));
|
|
36
|
+
}, children: _jsx(VerySatisfiedIcon, { style: {
|
|
37
|
+
fontSize: 'inherit',
|
|
38
|
+
color: value === 4 ? focusColor : undefined,
|
|
39
|
+
} }) })] }));
|
|
60
40
|
}
|
|
61
41
|
export default SatisfactionRating;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RatingProps } from '../Rating';
|
|
3
|
-
declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile
|
|
2
|
+
declare function ScaleRating({ value, inputRef, disabled, onChange, isMobile }: RatingProps): JSX.Element;
|
|
4
3
|
export default ScaleRating;
|
|
@@ -1,62 +1,31 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { Rating } from '@material-ui/lab';
|
|
25
|
-
import GradeRoundedIcon from '@material-ui/icons/GradeRounded';
|
|
26
|
-
import { makeStyles } from '@material-ui/core';
|
|
27
2
|
import React from 'react';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
unSelectedColor: unSelectedColor,
|
|
47
|
-
focusColor: focusColor,
|
|
48
|
-
})();
|
|
49
|
-
return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx(Rating, { value: value, onChange: function (_event, newValue) {
|
|
3
|
+
import StarIcon from '../../../Icons/Ratings/StarIcon';
|
|
4
|
+
import { Rating as MuiRating, styled } from '@mui/material';
|
|
5
|
+
const StyledRating = styled(MuiRating)(({ theme }) => ({
|
|
6
|
+
'&.Mui-disabled': {
|
|
7
|
+
opacity: 1,
|
|
8
|
+
},
|
|
9
|
+
'& .Erk-MuiRating-iconFilled': {
|
|
10
|
+
color: theme.palette.primary.main,
|
|
11
|
+
},
|
|
12
|
+
'& .Erk-MuiRating-iconEmpty': {
|
|
13
|
+
color: theme.palette.outline.main,
|
|
14
|
+
},
|
|
15
|
+
'& .Erk-MuiRating-visuallyHidden': {
|
|
16
|
+
display: 'none',
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
19
|
+
function ScaleRating({ value, inputRef, disabled, onChange, isMobile }) {
|
|
20
|
+
return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: 'hidden-input' }), _jsx(StyledRating, { value: value, onChange: (_event, newValue) => {
|
|
50
21
|
if (!disabled)
|
|
51
22
|
onChange(newValue);
|
|
52
|
-
}, disabled: disabled,
|
|
23
|
+
}, disabled: disabled, size: "large", defaultValue: 0, getLabelText: (value) => value + '/5', max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer })] }));
|
|
53
24
|
}
|
|
54
|
-
function IconContainer(
|
|
55
|
-
|
|
56
|
-
return (_jsx("span", __assign({ className: 'icon' + value }, other, { children: _jsx(GradeRoundedIcon, { style: { fontSize: 60 } }) })));
|
|
25
|
+
function IconContainer({ value, ...other }) {
|
|
26
|
+
return (_jsx("span", { className: 'icon' + value, ...other, children: _jsx(StarIcon, { style: { fontSize: 60 } }) }));
|
|
57
27
|
}
|
|
58
|
-
function SmallIconContainer(
|
|
59
|
-
|
|
60
|
-
return (_jsx("span", __assign({ className: 'icon' + value }, other, { children: _jsx(GradeRoundedIcon, { style: { fontSize: 50 } }) })));
|
|
28
|
+
function SmallIconContainer({ value, ...other }) {
|
|
29
|
+
return (_jsx("span", { className: 'icon' + value, ...other, children: _jsx(StarIcon, { style: { fontSize: 50 } }) }));
|
|
61
30
|
}
|
|
62
31
|
export default ScaleRating;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DraftLoadingContext: import("react").Context<boolean>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ContentState } from 'draft-js';
|
|
3
2
|
export interface DecoratorComponentProps {
|
|
4
3
|
children: JSX.Element;
|
|
@@ -9,5 +8,5 @@ export interface DecoratorComponentProps {
|
|
|
9
8
|
end: number;
|
|
10
9
|
editable?: boolean;
|
|
11
10
|
}
|
|
12
|
-
export declare function FormDecorator({ children, entityKey
|
|
11
|
+
export declare function FormDecorator({ children, entityKey }: DecoratorComponentProps): JSX.Element;
|
|
13
12
|
export declare function FormDecoratorsStrategy(contentBlock: any, callback: any, contentState: any): void;
|
|
@@ -1,34 +1,20 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { useContext } from 'react';
|
|
14
3
|
import { DraftEntityTypes } from '../../constants/Draft/DraftEntityTypes';
|
|
15
|
-
import { DraftLoadingContext } from './SmartDraftRenderer';
|
|
16
4
|
import styles from './FormDecorator.module.css';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return (_jsx("span",
|
|
5
|
+
import { DraftLoadingContext } from './DraftLoadingContext';
|
|
6
|
+
export function FormDecorator({ children, entityKey }) {
|
|
7
|
+
const loading = useContext(DraftLoadingContext);
|
|
8
|
+
return (_jsx("span", { id: entityKey, className: loading ? styles.loadingDecorator : styles.decorator, style: {
|
|
21
9
|
overflow: 'hidden',
|
|
22
10
|
position: 'relative',
|
|
23
11
|
padding: '0px 3px',
|
|
24
12
|
borderRadius: 12,
|
|
25
|
-
}
|
|
13
|
+
}, children: children }));
|
|
26
14
|
}
|
|
27
15
|
export function FormDecoratorsStrategy(contentBlock, callback, contentState) {
|
|
28
|
-
contentBlock.findEntityRanges(
|
|
29
|
-
|
|
30
|
-
return
|
|
31
|
-
contentState.getEntity(entityKey).getType() ===
|
|
32
|
-
DraftEntityTypes.EUREKA);
|
|
16
|
+
contentBlock.findEntityRanges((character) => {
|
|
17
|
+
const entityKey = character.getEntity();
|
|
18
|
+
return entityKey !== null && contentState.getEntity(entityKey).getType() === DraftEntityTypes.EUREKA;
|
|
33
19
|
}, callback);
|
|
34
20
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EurekaDraft } from '../../@Types/Draft/Draft';
|
|
3
|
-
export declare const DraftLoadingContext: React.Context<boolean>;
|
|
4
3
|
interface SmartDraftRendererProps {
|
|
5
4
|
property: string;
|
|
6
5
|
draft: EurekaDraft;
|
|
@@ -8,5 +7,5 @@ interface SmartDraftRendererProps {
|
|
|
8
7
|
dependencies: Record<string, any>;
|
|
9
8
|
onChange?: (value: EurekaDraft) => void;
|
|
10
9
|
}
|
|
11
|
-
declare function SmartDraftRenderer({ draft, margin, onChange, property, dependencies
|
|
10
|
+
declare function SmartDraftRenderer({ draft, margin, onChange, property, dependencies }: SmartDraftRendererProps): JSX.Element;
|
|
12
11
|
export default SmartDraftRenderer;
|
|
@@ -1,72 +1,56 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import {
|
|
14
|
-
import { IdFormContext } from '../../App/App';
|
|
2
|
+
import { useContext, useEffect, useMemo } from 'react';
|
|
15
3
|
import { DraftApi } from '../../Services/DraftService';
|
|
16
4
|
import { convertFromRaw, EditorState } from 'draft-js';
|
|
17
5
|
import { Editor } from 'react-draft-wysiwyg';
|
|
18
6
|
import { produce } from 'immer';
|
|
19
7
|
import CustomContext from '../../Contexts/CustomContext';
|
|
20
8
|
import { FormDecoratorsStrategy, FormDecorator } from './FormDecorator';
|
|
21
|
-
import { linkDecorator } from './LinkDecorator';
|
|
22
9
|
import { skipToken } from '@reduxjs/toolkit/query';
|
|
23
10
|
import { useAppSelector } from '../../hooks';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
11
|
+
import { IdFormContext } from '../../Contexts/FormContext';
|
|
12
|
+
import { DraftLoadingContext } from './DraftLoadingContext';
|
|
13
|
+
function SmartDraftRenderer({ draft, margin, onChange, property, dependencies }) {
|
|
14
|
+
const idForm = useContext(IdFormContext);
|
|
15
|
+
const mapDraftEntities = useContext(CustomContext).mapDraftEntities;
|
|
16
|
+
const postview = useAppSelector((state) => state.global.postview);
|
|
17
|
+
const hasEntities = useMemo(() => Object.keys(draft.entityMap).length > 0, [draft]);
|
|
18
|
+
const { data: mapped, isFetching } = DraftApi.useMapDraftQuery(!hasEntities || postview
|
|
32
19
|
? skipToken
|
|
33
20
|
: {
|
|
34
|
-
idForm
|
|
35
|
-
property
|
|
36
|
-
dependencies
|
|
37
|
-
mapDraftEntities
|
|
38
|
-
})
|
|
39
|
-
useEffect(
|
|
21
|
+
idForm,
|
|
22
|
+
property,
|
|
23
|
+
dependencies,
|
|
24
|
+
mapDraftEntities,
|
|
25
|
+
});
|
|
26
|
+
useEffect(() => {
|
|
40
27
|
if (mapped && !postview)
|
|
41
|
-
onChange
|
|
42
|
-
}, [mapped]);
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
onChange?.(mapped);
|
|
29
|
+
}, [mapped, onChange, postview]);
|
|
30
|
+
const { editorState, isEmpty } = useMemo(() => {
|
|
31
|
+
const content = convertFromRaw(cleanUpDraftParams(isFetching ? draft : (mapped ?? draft)));
|
|
45
32
|
return {
|
|
46
33
|
editorState: EditorState.createWithContent(content),
|
|
47
34
|
isEmpty: !content.hasText(),
|
|
48
35
|
};
|
|
49
|
-
}, [mapped, draft, isFetching])
|
|
36
|
+
}, [mapped, draft, isFetching]);
|
|
50
37
|
if (isEmpty)
|
|
51
38
|
return _jsx(_Fragment, {});
|
|
52
|
-
return (_jsx("div",
|
|
39
|
+
return (_jsx("div", { style: { margin }, children: _jsx(DraftLoadingContext.Provider, { value: !postview && isFetching, children: _jsx(Editor, { readOnly: true, toolbarHidden: true, editorState: editorState, editorClassName: 'Erk-Forms-Draft', customDecorators: customDecorators }) }) }));
|
|
53
40
|
}
|
|
54
41
|
export default SmartDraftRenderer;
|
|
55
42
|
function cleanUpDraftParams(draft) {
|
|
56
|
-
return produce(draft,
|
|
57
|
-
for (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var entity = _c[_b];
|
|
61
|
-
var offset = entity.offset, length_1 = entity.length;
|
|
43
|
+
return produce(draft, (draft) => {
|
|
44
|
+
for (const block of draft.blocks) {
|
|
45
|
+
for (const entity of block.entityRanges) {
|
|
46
|
+
const { offset, length } = entity;
|
|
62
47
|
//Change text into spaces
|
|
63
|
-
block.text = block.text.replace(block.text.substring(offset, offset +
|
|
48
|
+
block.text = block.text.replace(block.text.substring(offset, offset + length), ' '.repeat(length));
|
|
64
49
|
}
|
|
65
50
|
}
|
|
66
51
|
});
|
|
67
52
|
}
|
|
68
|
-
|
|
69
|
-
linkDecorator,
|
|
53
|
+
const customDecorators = [
|
|
70
54
|
{
|
|
71
55
|
strategy: FormDecoratorsStrategy,
|
|
72
56
|
component: FormDecorator,
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { SwitchProps } from '@material-ui/core';
|
|
3
|
-
interface StyleProps {
|
|
4
|
-
/** The color of the toggle */
|
|
5
|
-
color?: string;
|
|
6
|
-
/** The color of the toggle when unchecked */
|
|
7
|
-
baseColor?: string;
|
|
8
|
-
}
|
|
9
|
-
interface RoundedToggleProps extends Omit<SwitchProps, 'color' | 'onChange'>, StyleProps {
|
|
10
|
-
/** If the toggle is checked */
|
|
1
|
+
interface ToggleProps {
|
|
11
2
|
checked?: boolean;
|
|
12
|
-
|
|
13
|
-
onChange
|
|
3
|
+
size?: 'small' | 'medium';
|
|
4
|
+
onChange?: (checked: boolean) => void | Promise<void>;
|
|
14
5
|
/** If the Toggle is disabled */
|
|
15
6
|
disabled?: boolean;
|
|
16
7
|
}
|
|
17
|
-
declare function
|
|
18
|
-
export default
|
|
8
|
+
declare function ErkToggle({ checked, onChange, size, ...others }: ToggleProps): JSX.Element;
|
|
9
|
+
export default ErkToggle;
|
|
@@ -1,36 +1,33 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
'&$checked + $track': {
|
|
17
|
-
backgroundColor: props.color + ' !important',
|
|
18
|
-
},
|
|
19
|
-
'&:hover': {
|
|
20
|
-
backgroundColor: ((_a = props.color) === null || _a === void 0 ? void 0 : _a.startsWith('#'))
|
|
21
|
-
? props.color + '40'
|
|
22
|
-
: props.color,
|
|
2
|
+
import { styled, Switch as MuiSwitch } from '@mui/material';
|
|
3
|
+
const Styled = styled(MuiSwitch)(({ theme, checked, size }) => ({
|
|
4
|
+
marginTop: size === 'medium' ? -6 : undefined,
|
|
5
|
+
marginBottom: size === 'medium' ? -6 : undefined,
|
|
6
|
+
overflow: 'visible',
|
|
7
|
+
'& .Erk-MuiSwitch-switchBase': {
|
|
8
|
+
marginTop: size === 'small' ? -5 : undefined,
|
|
9
|
+
transform: size === 'small' ? 'translateX(-5px)' : undefined,
|
|
10
|
+
color: '#b8b8b8',
|
|
11
|
+
'&.Mui-checked': {
|
|
12
|
+
transform: size === 'small' ? 'translateX(12px)' : undefined,
|
|
13
|
+
'& .Erk-MuiSwitch-thumb': {
|
|
14
|
+
backgroundColor: theme.palette.primary.main,
|
|
23
15
|
},
|
|
24
16
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
'& .Erk-MuiSwitch-thumb': {
|
|
18
|
+
width: size === 'small' ? 16 : 20,
|
|
19
|
+
height: size === 'small' ? 16 : 20,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
'& .Erk-MuiSwitch-track': {
|
|
23
|
+
backgroundColor: checked ? theme.palette.primary.main : undefined,
|
|
24
|
+
opacity: checked ? 0.5 : undefined,
|
|
25
|
+
},
|
|
26
|
+
}));
|
|
27
|
+
function ErkToggle({ checked, onChange, size = 'medium', ...others }) {
|
|
28
|
+
return (_jsx(Styled, { ...others, checked: checked, onChange: () => {
|
|
29
|
+
if (onChange)
|
|
30
|
+
void onChange(!checked);
|
|
31
|
+
}, size: size }));
|
|
35
32
|
}
|
|
36
|
-
export default
|
|
33
|
+
export default ErkToggle;
|
|
@@ -3,7 +3,6 @@ import type { PayloadAction } from '@reduxjs/toolkit';
|
|
|
3
3
|
import { SiteState } from './SiteSlice';
|
|
4
4
|
import { EurekaDraft } from '../@Types/Draft/Draft';
|
|
5
5
|
import { CountryCode } from 'libphonenumber-js';
|
|
6
|
-
import { User } from '../@Types/User';
|
|
7
6
|
export interface GlobalState {
|
|
8
7
|
apiKey?: string;
|
|
9
8
|
idOrganization: string;
|
|
@@ -21,35 +20,31 @@ export interface GlobalState {
|
|
|
21
20
|
partial: boolean;
|
|
22
21
|
internal: boolean;
|
|
23
22
|
loaded: boolean;
|
|
24
|
-
/** Current User */
|
|
25
|
-
user: User | null | undefined;
|
|
26
23
|
}
|
|
27
24
|
export declare const GlobalSlice: import("@reduxjs/toolkit").Slice<GlobalState, {
|
|
28
|
-
reset: (state: import("immer
|
|
25
|
+
reset: (state: import("immer").WritableDraft<GlobalState>, action: PayloadAction<Omit<GlobalState, "loaded"> & SiteState>) => {
|
|
29
26
|
loaded: true;
|
|
30
27
|
editable: boolean;
|
|
31
28
|
partial: boolean;
|
|
32
|
-
postview: boolean;
|
|
33
29
|
formStyle: FormStyle;
|
|
30
|
+
postview: boolean;
|
|
34
31
|
preview: boolean;
|
|
35
32
|
idOrganization: string;
|
|
36
|
-
idCurrentAgent?: string
|
|
37
|
-
apiKey?: string
|
|
33
|
+
idCurrentAgent?: string;
|
|
34
|
+
apiKey?: string;
|
|
38
35
|
countryCode: CountryCode;
|
|
39
36
|
confirmation: {
|
|
40
37
|
confirmationMessage: EurekaDraft;
|
|
41
38
|
showLink: boolean;
|
|
42
39
|
};
|
|
43
40
|
internal: boolean;
|
|
44
|
-
user: User | null | undefined;
|
|
45
41
|
dependencies: import("../Form/Form").DependencyStore;
|
|
46
42
|
values: import("./SiteSlice").ValuesStore;
|
|
47
43
|
idCurrentSection: string | null;
|
|
48
44
|
previousSections: string[];
|
|
49
45
|
nextSections: string[];
|
|
50
|
-
focusStep?: string
|
|
46
|
+
focusStep?: string;
|
|
51
47
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export declare const reset: import("@reduxjs/toolkit").ActionCreatorWithPayload<Omit<GlobalState, "loaded"> & SiteState, "global/reset">, setUser: import("@reduxjs/toolkit").ActionCreatorWithPayload<User | null, "global/setUser">;
|
|
48
|
+
}, "global", "global", import("@reduxjs/toolkit").SliceSelectors<GlobalState>>;
|
|
49
|
+
export declare const reset: import("@reduxjs/toolkit").ActionCreatorWithPayload<Omit<GlobalState, "loaded"> & SiteState, "global/reset">;
|
|
55
50
|
export default GlobalSlice;
|