@arquimedes.co/eureka-forms 2.0.99 → 3.0.0-refactor
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App/App.js +21 -46
- package/dist/App/AppFunctions.js +177 -328
- package/dist/App/AppFunctions.test.js +638 -0
- package/dist/App/AppHooks.js +127 -223
- package/dist/App/AppHooks.test.js +154 -0
- package/dist/Contexts/CustomContext.js +1 -1
- package/dist/Contexts/FormContext.js +3 -2
- package/dist/Contexts/SectionContext.js +1 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +43 -62
- package/dist/Form/Form.js +75 -160
- package/dist/Form/FormFunctions.js +64 -114
- package/dist/Form/FormFunctions.test.js +454 -0
- package/dist/Form/FormHooks.js +14 -21
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +34 -105
- package/dist/Form/FormTypes/StepperForm/StepperForm.js +48 -110
- package/dist/Form/Section/MaterialSection/MaterialSection.js +10 -23
- package/dist/Form/Section/MaterialSection/MaterialSection.module.css +0 -2
- package/dist/Form/Section/Section.js +4 -15
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.js +30 -65
- package/dist/Form/Terms/Term/Term.js +2 -13
- package/dist/Form/Terms/Terms.js +11 -27
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +36 -106
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +2 -13
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +12 -40
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +57 -77
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +46 -111
- package/dist/FormSteps/AYFStepMapper.js +63 -127
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.js +2 -13
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +63 -165
- package/dist/FormSteps/CBRStepMapper.js +61 -152
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.js +2 -13
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +19 -37
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +2 -13
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +47 -80
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.js +3 -26
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +33 -61
- package/dist/FormSteps/CustomStep.js +17 -31
- package/dist/FormSteps/DatePickerStep/DatePickerStep.js +2 -13
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +7 -20
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.js +2 -13
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.js +16 -32
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +94 -180
- package/dist/FormSteps/FileUploadStep/FileUploadStep.js +2 -13
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +33 -95
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.js +3 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +86 -180
- package/dist/FormSteps/MapperStep/MapperStep.js +2 -13
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +16 -38
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +21 -31
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.js +89 -175
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +20 -47
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +81 -117
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.js +15 -33
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.js +2 -13
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +17 -31
- package/dist/FormSteps/RatingStep/RatingStep.js +2 -13
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +35 -61
- package/dist/FormSteps/SelectorStep/SelectorStep.js +2 -13
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +2 -3
- package/dist/FormSteps/SeparatorStep/SeparatorStep.js +2 -13
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +77 -142
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.js +2 -13
- package/dist/FormSteps/Step.js +29 -58
- package/dist/FormSteps/StepFunctions.js +149 -204
- package/dist/FormSteps/StepFunctions.test.js +695 -0
- package/dist/FormSteps/StepHooks.js +94 -146
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +38 -74
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +12 -28
- package/dist/FormSteps/TextAreaStep/TextAreaStep.js +3 -14
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +12 -30
- package/dist/FormSteps/TextInputStep/TextInputStep.js +2 -13
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.js +9 -26
- package/dist/FormSteps/TimePickerStep/TimePickerStep.js +2 -13
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +13 -26
- package/dist/FormSteps/TitleStep/TitleStep.js +2 -13
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.js +14 -26
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +6 -18
- package/dist/Icons/ArrowLeftIcon.js +6 -0
- package/dist/Icons/ArrowRightIcon.js +6 -0
- package/dist/Icons/CalendarIcon.js +3 -14
- package/dist/Icons/CheckCircleIcon.js +6 -0
- package/dist/Icons/CheckboxCheckedIcon.js +6 -0
- package/dist/Icons/CheckboxUncheckedIcon.js +6 -0
- package/dist/Icons/ClockIcon.js +6 -0
- package/dist/Icons/CloseIcon.js +6 -0
- package/dist/Icons/Construction/LeakIcon.js +3 -14
- package/dist/Icons/Construction/ProjectIcon.js +3 -14
- package/dist/Icons/Construction/PropertyIcon.js +3 -14
- package/dist/Icons/Construction/SpaceIcon.js +3 -14
- package/dist/Icons/DeleteIcon.js +6 -0
- package/dist/Icons/DocumentIcon.js +3 -14
- package/dist/Icons/Entities/CheckListIcon.js +3 -14
- package/dist/Icons/Entities/GenericEntityIcon.js +4 -15
- package/dist/Icons/Entities/HandshakeIcon.js +4 -15
- package/dist/Icons/Entities/SupplierIcon.js +4 -15
- package/dist/Icons/ErkIcon.module.css +9 -0
- package/dist/Icons/ErrorIcon.js +6 -0
- package/dist/Icons/ExpandLessIcon.js +6 -0
- package/dist/Icons/ExpandMoreIcon.js +6 -0
- package/dist/Icons/FileIcon.js +6 -0
- package/dist/Icons/InfoIcon.js +6 -0
- package/dist/Icons/LocationIcon.js +3 -14
- package/dist/Icons/PersonIcon.js +4 -15
- package/dist/Icons/Ratings/DislikeIcon.js +6 -0
- package/dist/Icons/Ratings/DissatisfiedIcon.js +6 -0
- package/dist/Icons/Ratings/LikeIcon.js +6 -0
- package/dist/Icons/Ratings/SatisfiedIcon.js +6 -0
- package/dist/Icons/Ratings/StarIcon.js +6 -0
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +6 -0
- package/dist/Icons/Ratings/VerySatisfiedIcon.js +6 -0
- package/dist/Icons/WarningIcon.js +6 -0
- package/dist/Init.js +2 -0
- 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.js +25 -88
- package/dist/Shared/ErkButton/ErkButton.js +31 -0
- package/dist/Shared/{RoundedButton/RoundedButton.stories.js → ErkButton/ErkButton.stories.js} +6 -6
- package/dist/Shared/ErkCheckbox/ErkCheckBox.js +30 -0
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.js +37 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.js +210 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.js +103 -0
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.js +83 -0
- package/dist/Shared/ErkSelect/ErkSelect.js +90 -0
- package/dist/Shared/ErkSelect/ErkSelect.stories.js +64 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.js +56 -0
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.js +167 -0
- package/dist/Shared/ErkTextField/ErkTextField.js +111 -0
- package/dist/Shared/ErkTextField/ErkTextField.stories.js +105 -0
- package/dist/Shared/ErkTimePicker/ErkTimePicker.js +131 -0
- package/dist/Shared/InputIcon/InputIcon.js +25 -48
- package/dist/Shared/Loader/Loader.js +6 -18
- package/dist/Shared/Navbar/Navbar.js +2 -14
- package/dist/Shared/Navbar/Navbar.stories.js +2 -2
- package/dist/Shared/Rating/Rating.js +4 -27
- package/dist/Shared/Rating/Rating.stories.js +13 -19
- package/dist/Shared/Rating/Ratings/LikeRating.js +19 -33
- package/dist/Shared/Rating/Ratings/SatisfactionRating.js +27 -47
- package/dist/Shared/Rating/Ratings/ScaleRating.js +23 -54
- package/dist/Shared/Toggle/Toggle.js +11 -34
- package/dist/States/GlobalSlice.js +6 -17
- package/dist/States/SiteSlice.js +58 -76
- package/dist/States/WidthStatsSlice.js +8 -9
- package/dist/Utils/AxiosAPI.js +3 -3
- package/dist/Utils/AxiosWidget.js +4 -4
- package/dist/Utils/CBRFunctions.js +29 -30
- package/dist/Utils/DraftFunctions.js +102 -143
- package/dist/Utils/FormStepFunctions.js +27 -45
- package/dist/Utils/LocaleUtils.js +12 -0
- package/dist/Utils/MaterialProviders.js +43 -28
- package/dist/Utils/MuiClassnameSetup.js +3 -0
- package/dist/Utils/PhoneFunctions.js +5 -5
- package/dist/Utils/TestUtils.js +22 -51
- package/dist/Utils/store.js +10 -65
- package/dist/Widget.js +15 -26
- package/dist/constants/Files/FileExtensions.js +3 -3
- package/dist/constants/Files/FileMaxSize.js +1 -1
- package/dist/constants/InternalFormStyle.js +1 -1
- package/dist/hooks.js +14 -16
- package/dist/index.css +4 -0
- package/dist/main.js +22 -0
- package/package.json +108 -124
- package/dist/@Types/@Types.d.ts +0 -2
- package/dist/@Types/AYFFormStep.d.ts +0 -19
- package/dist/@Types/Branding.d.ts +0 -13
- package/dist/@Types/CBRFormStep.d.ts +0 -74
- package/dist/@Types/Condition.d.ts +0 -143
- package/dist/@Types/Draft/Draft.d.ts +0 -12
- package/dist/@Types/Draft/DraftEntityData.d.ts +0 -54
- package/dist/@Types/Entity.d.ts +0 -36
- package/dist/@Types/Form.d.ts +0 -75
- package/dist/@Types/FormStep.d.ts +0 -219
- package/dist/@Types/GenericFormSteps.d.ts +0 -84
- package/dist/@Types/MapperElement.d.ts +0 -8
- package/dist/@Types/Organization.d.ts +0 -11
- package/dist/@Types/Time.d.ts +0 -6
- package/dist/@Types/index.d.ts +0 -1
- package/dist/App/App.d.ts +0 -59
- package/dist/App/AppFunctions.d.ts +0 -23
- package/dist/App/AppHooks.d.ts +0 -10
- package/dist/Contexts/CustomContext.d.ts +0 -12
- package/dist/Contexts/FormContext.d.ts +0 -6
- package/dist/Contexts/SectionContext.d.ts +0 -3
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +0 -12
- package/dist/Form/Form.d.ts +0 -40
- package/dist/Form/FormFunctions.d.ts +0 -12
- package/dist/Form/FormHooks.d.ts +0 -3
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +0 -4
- package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +0 -4
- package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +0 -4
- package/dist/Form/Section/Section.d.ts +0 -6
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +0 -4
- package/dist/Form/Terms/Term/Term.d.ts +0 -8
- package/dist/Form/Terms/Terms.d.ts +0 -3
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +0 -8
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +0 -9
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +0 -8
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +0 -11
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +0 -8
- package/dist/FormSteps/AYFStepMapper.d.ts +0 -12
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +0 -15
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +0 -4
- package/dist/FormSteps/CBRStepMapper.d.ts +0 -13
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +0 -9
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +0 -4
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +0 -9
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +0 -4
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +0 -9
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +0 -4
- package/dist/FormSteps/CustomStep.d.ts +0 -27
- package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +0 -11
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +0 -4
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +0 -15
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +0 -12
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +0 -4
- package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +0 -9
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +0 -14
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +0 -18
- package/dist/FormSteps/MapperStep/MapperStep.d.ts +0 -18
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +0 -5
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.d.ts +0 -15
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +0 -5
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +0 -5
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +0 -21
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +0 -4
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +0 -11
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +0 -4
- package/dist/FormSteps/RatingStep/RatingStep.d.ts +0 -9
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +0 -4
- package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +0 -9
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +0 -4
- package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +0 -9
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +0 -5
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +0 -35
- package/dist/FormSteps/Step.d.ts +0 -8
- package/dist/FormSteps/StepFunctions.d.ts +0 -29
- package/dist/FormSteps/StepHooks.d.ts +0 -55
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +0 -10
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +0 -8
- package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +0 -10
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +0 -4
- package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +0 -17
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +0 -4
- package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +0 -12
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +0 -4
- package/dist/FormSteps/TitleStep/TitleStep.d.ts +0 -9
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +0 -9
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +0 -12
- package/dist/Icons/@IconTypes.d.ts +0 -7
- package/dist/Icons/CalendarIcon.d.ts +0 -4
- package/dist/Icons/Construction/LeakIcon.d.ts +0 -3
- package/dist/Icons/Construction/ProjectIcon.d.ts +0 -3
- package/dist/Icons/Construction/PropertyIcon.d.ts +0 -3
- package/dist/Icons/Construction/SpaceIcon.d.ts +0 -3
- package/dist/Icons/DocumentIcon.d.ts +0 -3
- package/dist/Icons/Entities/CheckListIcon.d.ts +0 -3
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +0 -3
- package/dist/Icons/Entities/HandshakeIcon.d.ts +0 -3
- package/dist/Icons/Entities/SupplierIcon.d.ts +0 -3
- package/dist/Icons/LocationIcon.d.ts +0 -4
- package/dist/Icons/PersonIcon.d.ts +0 -4
- package/dist/Services/FileService.d.ts +0 -5
- package/dist/Services/FormService.d.ts +0 -5
- package/dist/Services/OrganizationService.d.ts +0 -2
- package/dist/Shared/CustomBtn/CustomBtn.d.ts +0 -18
- package/dist/Shared/InputIcon/InputIcon.d.ts +0 -7
- package/dist/Shared/Loader/Loader.d.ts +0 -18
- package/dist/Shared/Navbar/Navbar.d.ts +0 -9
- package/dist/Shared/Navbar/Navbar.stories.d.ts +0 -13
- package/dist/Shared/Rating/Rating.d.ts +0 -15
- package/dist/Shared/Rating/Rating.stories.d.ts +0 -15
- package/dist/Shared/Rating/Ratings/LikeRating.d.ts +0 -4
- package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +0 -4
- package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +0 -4
- 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/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.d.ts +0 -36
- 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.d.ts +0 -37
- 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/Toggle/Toggle.d.ts +0 -18
- package/dist/States/GlobalSlice.d.ts +0 -46
- package/dist/States/SiteSlice.d.ts +0 -95
- package/dist/States/WidthStatsSlice.d.ts +0 -7
- package/dist/Utils/AxiosAPI.d.ts +0 -2
- package/dist/Utils/AxiosWidget.d.ts +0 -2
- package/dist/Utils/CBRFunctions.d.ts +0 -8
- package/dist/Utils/DraftFunctions.d.ts +0 -56
- package/dist/Utils/FormStepFunctions.d.ts +0 -15
- package/dist/Utils/MaterialProviders.d.ts +0 -6
- package/dist/Utils/PhoneFunctions.d.ts +0 -2
- package/dist/Utils/TestUtils.d.ts +0 -77
- package/dist/Utils/store.d.ts +0 -27
- package/dist/Widget.d.ts +0 -1
- package/dist/__mocks__/axios.d.ts +0 -2
- package/dist/__mocks__/axios.js +0 -2
- package/dist/constants/AYFFormStepTypes.d.ts +0 -9
- package/dist/constants/CBRFormStepTypes.d.ts +0 -21
- package/dist/constants/ConditionTypes.d.ts +0 -27
- package/dist/constants/Draft/DraftEntityDataTypes.d.ts +0 -11
- package/dist/constants/Draft/DraftEntityTypes.d.ts +0 -3
- package/dist/constants/Draft/DraftStyleTypes.d.ts +0 -7
- package/dist/constants/EntityPropertyTypes.d.ts +0 -10
- package/dist/constants/Files/FileExtensions.d.ts +0 -3
- package/dist/constants/Files/FileMaxSize.d.ts +0 -2
- package/dist/constants/FormStepTypes.d.ts +0 -64
- package/dist/constants/IconTypes.d.ts +0 -15
- package/dist/constants/InternalFormStyle.d.ts +0 -3
- package/dist/constants/MaterialClassNameSeed.d.ts +0 -1
- package/dist/constants/MaterialClassNameSeed.js +0 -1
- package/dist/constants/TicketPropertyTypes.d.ts +0 -3
- package/dist/hooks.d.ts +0 -7
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -31
- package/dist/index.lib.d.ts +0 -7
- package/dist/setupTests.d.ts +0 -1
- /package/dist/Shared/{RoundedTimePicker/RoundedTimePicker.module.css → ErkTimePicker/ErkTimePicker.module.css} +0 -0
- /package/dist/{setupTests.js → __tests__/setup.js} +0 -0
package/dist/@Types/Form.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { FormStyleTypes, FormTypes } from '../constants/FormStepTypes';
|
|
2
|
-
import { Branding } from './Branding';
|
|
3
|
-
import { FormStep } from './FormStep';
|
|
4
|
-
import { Entity } from './Entity';
|
|
5
|
-
import { EurekaDraft } from './Draft/Draft';
|
|
6
|
-
export interface Form {
|
|
7
|
-
apiKey?: string;
|
|
8
|
-
name?: string;
|
|
9
|
-
sections: Record<string, Section>;
|
|
10
|
-
steps: Record<string, FormStep>;
|
|
11
|
-
size: FormSize;
|
|
12
|
-
firstSection: string;
|
|
13
|
-
type?: FormTypes;
|
|
14
|
-
hasCaptcha?: boolean;
|
|
15
|
-
isStandAlone?: boolean;
|
|
16
|
-
style?: FormStyle;
|
|
17
|
-
branding?: Branding;
|
|
18
|
-
classifiers?: Record<string, Classifier>;
|
|
19
|
-
entities?: Record<string, Entity>;
|
|
20
|
-
terms?: Term[];
|
|
21
|
-
hiddenSteps?: string[];
|
|
22
|
-
confirmationMessage?: EurekaDraft;
|
|
23
|
-
showLink?: boolean;
|
|
24
|
-
nextSectionLabel?: string;
|
|
25
|
-
prevSectionLabel?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface FormSize {
|
|
28
|
-
blockNum: 1 | 2 | 3 | 4;
|
|
29
|
-
blockSize: number;
|
|
30
|
-
spacingSize: number;
|
|
31
|
-
}
|
|
32
|
-
export interface Term {
|
|
33
|
-
id: string;
|
|
34
|
-
message: string;
|
|
35
|
-
clickEffect?: TermDialog | TermLink;
|
|
36
|
-
}
|
|
37
|
-
interface TermDialog {
|
|
38
|
-
type: 'DIALOG';
|
|
39
|
-
title: string;
|
|
40
|
-
text: string;
|
|
41
|
-
}
|
|
42
|
-
interface TermLink {
|
|
43
|
-
type: 'LINK';
|
|
44
|
-
url: string;
|
|
45
|
-
}
|
|
46
|
-
export interface Classifier {
|
|
47
|
-
_id: string;
|
|
48
|
-
name: string;
|
|
49
|
-
clientName?: string;
|
|
50
|
-
children: string[];
|
|
51
|
-
}
|
|
52
|
-
export type FormStyle = MaterialStyle;
|
|
53
|
-
export type StyleKeys = keyof Omit<FormStyle, 'type'>;
|
|
54
|
-
export interface MaterialStyle {
|
|
55
|
-
type: FormStyleTypes.MATERIAL;
|
|
56
|
-
standAloneBackgroundColor: string;
|
|
57
|
-
backgroundColor: string;
|
|
58
|
-
primaryColor: string;
|
|
59
|
-
secondaryColor: string;
|
|
60
|
-
errorColor: string;
|
|
61
|
-
primaryContrastColor: string;
|
|
62
|
-
secondaryContrastColor: string;
|
|
63
|
-
textColor: string;
|
|
64
|
-
outlineColor: string;
|
|
65
|
-
stepBackgroundColor: string;
|
|
66
|
-
descriptionTextColor: string;
|
|
67
|
-
}
|
|
68
|
-
export interface Section {
|
|
69
|
-
id: string;
|
|
70
|
-
name: string | null;
|
|
71
|
-
title?: string;
|
|
72
|
-
steps: string[];
|
|
73
|
-
nextSection: string | null;
|
|
74
|
-
}
|
|
75
|
-
export {};
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import FormStepTypes, { ClassifierOptionTypes, OptionTypes, RatingTypes, MapperStyleTypes, EntityValueOptionTypes, EntityValueDataTypes, ApiSelectorOptionTypes, ApiSelectorParamTypes } from '../constants/FormStepTypes';
|
|
2
|
-
import IconTypes from '../constants/IconTypes';
|
|
3
|
-
import { Condition } from './Condition';
|
|
4
|
-
import { EurekaDraft } from './Draft/Draft';
|
|
5
|
-
import * as GSteps from './GenericFormSteps';
|
|
6
|
-
import { Time } from './Time';
|
|
7
|
-
export type FormStep = Title | TimePicker | Rating | CheckBox | TextArea | TextInput | DatePicker | FileUpload | Separator | FormSelector | ClassifierSelector | Collapsible | EntityValuePicker | ApiSelector | Mapper;
|
|
8
|
-
export interface Title extends GSteps.GBaseStep {
|
|
9
|
-
type: FormStepTypes.TITLE;
|
|
10
|
-
title: string;
|
|
11
|
-
description: string | null;
|
|
12
|
-
size?: 1 | 2 | 3 | 4;
|
|
13
|
-
}
|
|
14
|
-
export interface TimePicker extends GSteps.GTimePicker {
|
|
15
|
-
type: FormStepTypes.TIMEPICKER;
|
|
16
|
-
defaultValue?: Time;
|
|
17
|
-
}
|
|
18
|
-
export interface CheckBox extends GSteps.GCheckBox {
|
|
19
|
-
type: FormStepTypes.CHECKBOX;
|
|
20
|
-
steps?: string[];
|
|
21
|
-
uncheckedSteps?: string[];
|
|
22
|
-
maxSize?: number;
|
|
23
|
-
defaultValue?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface Rating extends GSteps.GBaseStep {
|
|
26
|
-
type: FormStepTypes.RATING;
|
|
27
|
-
label: string;
|
|
28
|
-
description: string;
|
|
29
|
-
required: boolean;
|
|
30
|
-
ratingType: RatingTypes;
|
|
31
|
-
nestedSteps: string[][] | null;
|
|
32
|
-
}
|
|
33
|
-
export interface FileUpload extends GSteps.GBaseStep {
|
|
34
|
-
type: FormStepTypes.FILEUPLOAD;
|
|
35
|
-
label: string;
|
|
36
|
-
description: string | null;
|
|
37
|
-
required: boolean;
|
|
38
|
-
}
|
|
39
|
-
export interface Separator extends GSteps.GSeparator {
|
|
40
|
-
type: FormStepTypes.SEPARATOR;
|
|
41
|
-
}
|
|
42
|
-
export interface TextArea extends GSteps.GTextArea {
|
|
43
|
-
type: FormStepTypes.TEXTAREA;
|
|
44
|
-
}
|
|
45
|
-
export interface TextInput extends GSteps.GTextInput {
|
|
46
|
-
type: FormStepTypes.TEXTINPUT;
|
|
47
|
-
}
|
|
48
|
-
export interface DatePicker extends GSteps.GDatePicker {
|
|
49
|
-
type: FormStepTypes.DATEPICKER;
|
|
50
|
-
}
|
|
51
|
-
export interface Collapsible extends GSteps.GBaseStep {
|
|
52
|
-
type: FormStepTypes.COLLAPSIBLE;
|
|
53
|
-
label: string;
|
|
54
|
-
steps: string[];
|
|
55
|
-
defaultValue?: boolean;
|
|
56
|
-
}
|
|
57
|
-
export interface FormSelector extends GSteps.GBaseStep {
|
|
58
|
-
type: FormStepTypes.SELECTOR;
|
|
59
|
-
label: string;
|
|
60
|
-
description: string;
|
|
61
|
-
required: boolean;
|
|
62
|
-
searchable: boolean;
|
|
63
|
-
options: FormSelectorOption[];
|
|
64
|
-
size: 1 | 2 | 3 | 4;
|
|
65
|
-
maxSize?: number;
|
|
66
|
-
defaultValue?: string;
|
|
67
|
-
}
|
|
68
|
-
export type FormSelectorOption = DefaultFormSelectorOption | NestedStepOption;
|
|
69
|
-
interface DefaultFormSelectorOption {
|
|
70
|
-
label: string;
|
|
71
|
-
value: string;
|
|
72
|
-
type: OptionTypes.DEFAULT;
|
|
73
|
-
condition?: Condition;
|
|
74
|
-
}
|
|
75
|
-
export interface NestedStepOption {
|
|
76
|
-
label: string;
|
|
77
|
-
value: string;
|
|
78
|
-
type: OptionTypes.NESTED;
|
|
79
|
-
steps: string[];
|
|
80
|
-
condition?: Condition;
|
|
81
|
-
}
|
|
82
|
-
export interface ClassifierSelector extends GSteps.GBaseStep {
|
|
83
|
-
type: FormStepTypes.CLASSIFIER_SELECTOR;
|
|
84
|
-
idClassifier: string | null;
|
|
85
|
-
label: string;
|
|
86
|
-
description: string;
|
|
87
|
-
searchable: boolean;
|
|
88
|
-
options: Record<string, FormClassifierSelectorOption>;
|
|
89
|
-
required: boolean;
|
|
90
|
-
size: 1 | 2 | 3 | 4;
|
|
91
|
-
maxSize?: number;
|
|
92
|
-
}
|
|
93
|
-
export type FormClassifierSelectorOption = DefaultClassifierOption | NestedStepClassifierOption | HideValueOption;
|
|
94
|
-
interface DefaultClassifierOption {
|
|
95
|
-
type: ClassifierOptionTypes.DEFAULT;
|
|
96
|
-
idClassifier: string;
|
|
97
|
-
condition?: Condition;
|
|
98
|
-
}
|
|
99
|
-
interface NestedStepClassifierOption {
|
|
100
|
-
type: ClassifierOptionTypes.NESTED;
|
|
101
|
-
idClassifier: string;
|
|
102
|
-
steps: string[];
|
|
103
|
-
condition?: Condition;
|
|
104
|
-
}
|
|
105
|
-
interface HideValueOption {
|
|
106
|
-
type: ClassifierOptionTypes.HIDE;
|
|
107
|
-
idClassifier: string;
|
|
108
|
-
}
|
|
109
|
-
export interface EntityValuePicker extends GSteps.GSmartSelect {
|
|
110
|
-
type: FormStepTypes.ENTITYVALUEPICKER;
|
|
111
|
-
idEntity: string;
|
|
112
|
-
icon: string | null;
|
|
113
|
-
filters: EntityValuePickerFilter[];
|
|
114
|
-
path: EntityValuePickerPath[];
|
|
115
|
-
options: Record<string, FormEntityValuePickerOption>;
|
|
116
|
-
maxSize?: number;
|
|
117
|
-
dialogs?: EntityValuePickerDialog[];
|
|
118
|
-
}
|
|
119
|
-
export type FormEntityValuePickerOption = DefaultEntityValuePickerOption | NestedEntityValuePickerOption | HideFormEntityValuePickerOption;
|
|
120
|
-
export interface EntityValuePickerDialog {
|
|
121
|
-
type: 'WARNING' | 'INFO';
|
|
122
|
-
message: EurekaDraft;
|
|
123
|
-
condition?: Condition;
|
|
124
|
-
}
|
|
125
|
-
interface DefaultEntityValuePickerOption {
|
|
126
|
-
type: EntityValueOptionTypes.DEFAULT;
|
|
127
|
-
condition?: Condition;
|
|
128
|
-
}
|
|
129
|
-
interface NestedEntityValuePickerOption {
|
|
130
|
-
type: EntityValueOptionTypes.NESTED;
|
|
131
|
-
steps: string[];
|
|
132
|
-
condition?: Condition;
|
|
133
|
-
}
|
|
134
|
-
interface HideFormEntityValuePickerOption {
|
|
135
|
-
type: EntityValueOptionTypes.HIDE;
|
|
136
|
-
}
|
|
137
|
-
export type EntityValuePickerPath = StepEntityValuePickerPath | ValueEntityValuePickerPath;
|
|
138
|
-
export interface StepEntityValuePickerPath {
|
|
139
|
-
idEntity: string;
|
|
140
|
-
type: EntityValueDataTypes.STEP;
|
|
141
|
-
idStep: string;
|
|
142
|
-
any: boolean;
|
|
143
|
-
}
|
|
144
|
-
export interface ValueEntityValuePickerPath {
|
|
145
|
-
idEntity: string;
|
|
146
|
-
type: EntityValueDataTypes.VALUE;
|
|
147
|
-
idEntityValue: string | null;
|
|
148
|
-
}
|
|
149
|
-
export type EntityValuePickerFilter = StepEntityValuePickerFilter | ValueEntityValuePickerFilter;
|
|
150
|
-
export interface StepEntityValuePickerFilter {
|
|
151
|
-
idProperty: string;
|
|
152
|
-
type: EntityValueDataTypes.STEP;
|
|
153
|
-
idStep: string;
|
|
154
|
-
any: boolean;
|
|
155
|
-
required: boolean;
|
|
156
|
-
}
|
|
157
|
-
export interface ValueEntityValuePickerFilter {
|
|
158
|
-
idProperty: string;
|
|
159
|
-
type: EntityValueDataTypes.VALUE;
|
|
160
|
-
value: any;
|
|
161
|
-
}
|
|
162
|
-
export interface ApiSelector extends GSteps.GSmartSelect {
|
|
163
|
-
type: FormStepTypes.API_SELECTOR;
|
|
164
|
-
icon?: IconTypes;
|
|
165
|
-
url: string;
|
|
166
|
-
pathParams: ApiSelectorParam[];
|
|
167
|
-
queryParams: ApiSelectorParam[];
|
|
168
|
-
/** Headers? Body, etc?? */
|
|
169
|
-
labelAttribute: string;
|
|
170
|
-
idAttribute: string;
|
|
171
|
-
/** Only has maxSize if level === 0 */
|
|
172
|
-
maxSize?: number;
|
|
173
|
-
options: Record<string, ApiSelectorOption>;
|
|
174
|
-
defaultValue?: any;
|
|
175
|
-
}
|
|
176
|
-
export type ApiSelectorOption = DefaultApiSelectorOption | NestedApiSelectorOption | HideApiSelectorOption;
|
|
177
|
-
interface DefaultApiSelectorOption {
|
|
178
|
-
type: ApiSelectorOptionTypes.DEFAULT;
|
|
179
|
-
condition?: Condition;
|
|
180
|
-
}
|
|
181
|
-
interface NestedApiSelectorOption {
|
|
182
|
-
type: ApiSelectorOptionTypes.NESTED;
|
|
183
|
-
steps: string[];
|
|
184
|
-
condition?: Condition;
|
|
185
|
-
}
|
|
186
|
-
interface HideApiSelectorOption {
|
|
187
|
-
type: ApiSelectorOptionTypes.HIDE;
|
|
188
|
-
idOption: string;
|
|
189
|
-
}
|
|
190
|
-
export type ApiSelectorParam = StepApiSelectorParam | ValueApiSelectorParam;
|
|
191
|
-
export interface StepApiSelectorParam {
|
|
192
|
-
type: ApiSelectorParamTypes.STEP;
|
|
193
|
-
key: string;
|
|
194
|
-
idStep: string;
|
|
195
|
-
required: boolean;
|
|
196
|
-
}
|
|
197
|
-
export interface ValueApiSelectorParam {
|
|
198
|
-
type: ApiSelectorParamTypes.VALUE;
|
|
199
|
-
key: string;
|
|
200
|
-
value: string;
|
|
201
|
-
}
|
|
202
|
-
export interface Mapper extends GSteps.GBaseStep {
|
|
203
|
-
type: FormStepTypes.MAPPER;
|
|
204
|
-
style: {
|
|
205
|
-
type: MapperStyleTypes;
|
|
206
|
-
size?: number;
|
|
207
|
-
};
|
|
208
|
-
label: string;
|
|
209
|
-
description: string | null;
|
|
210
|
-
addBtnLabel: string;
|
|
211
|
-
rootSteps: string[];
|
|
212
|
-
steps: Record<string, FormStep>;
|
|
213
|
-
required: boolean;
|
|
214
|
-
unitLabel: string;
|
|
215
|
-
creatable?: boolean;
|
|
216
|
-
deletable?: boolean;
|
|
217
|
-
max?: number;
|
|
218
|
-
}
|
|
219
|
-
export {};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Condition } from './Condition';
|
|
2
|
-
export interface GBaseStep {
|
|
3
|
-
id: string;
|
|
4
|
-
idSection: string;
|
|
5
|
-
type: string;
|
|
6
|
-
editable?: boolean;
|
|
7
|
-
partial?: boolean;
|
|
8
|
-
clientInfoType?: string;
|
|
9
|
-
dependencies?: string[];
|
|
10
|
-
condition?: Condition;
|
|
11
|
-
}
|
|
12
|
-
export interface GTitle extends GBaseStep {
|
|
13
|
-
title: string;
|
|
14
|
-
description: string | null;
|
|
15
|
-
}
|
|
16
|
-
export interface GCheckBox extends GBaseStep {
|
|
17
|
-
label: string;
|
|
18
|
-
description: string | null;
|
|
19
|
-
required: boolean;
|
|
20
|
-
isList?: boolean;
|
|
21
|
-
size: 1 | 2 | 3 | 4;
|
|
22
|
-
}
|
|
23
|
-
export interface GSeparator extends GBaseStep {
|
|
24
|
-
transparent: boolean;
|
|
25
|
-
}
|
|
26
|
-
export interface GTextArea extends GBaseStep {
|
|
27
|
-
label: string;
|
|
28
|
-
description: string | null;
|
|
29
|
-
required: boolean;
|
|
30
|
-
hasTextEditor: boolean;
|
|
31
|
-
}
|
|
32
|
-
export interface GTextInput extends GBaseStep {
|
|
33
|
-
label: string;
|
|
34
|
-
description: string | null;
|
|
35
|
-
validation?: {
|
|
36
|
-
message: string;
|
|
37
|
-
value: string;
|
|
38
|
-
type: 'EMAIL' | 'PHONE' | 'OTHER';
|
|
39
|
-
};
|
|
40
|
-
required: boolean;
|
|
41
|
-
showIcon?: boolean;
|
|
42
|
-
size: 1 | 2 | 3 | 4;
|
|
43
|
-
maxLength?: number;
|
|
44
|
-
defaultValue?: string;
|
|
45
|
-
}
|
|
46
|
-
export interface GDatePicker extends GBaseStep {
|
|
47
|
-
label: string;
|
|
48
|
-
description: string | null;
|
|
49
|
-
pickTime: boolean;
|
|
50
|
-
required: boolean;
|
|
51
|
-
size: 1 | 2 | 3 | 4;
|
|
52
|
-
}
|
|
53
|
-
export interface GTimePicker extends GBaseStep {
|
|
54
|
-
label: string;
|
|
55
|
-
description: string | null;
|
|
56
|
-
required: boolean;
|
|
57
|
-
size: 1 | 2 | 3 | 4;
|
|
58
|
-
pickDays: boolean;
|
|
59
|
-
minDays?: number;
|
|
60
|
-
maxDays?: number;
|
|
61
|
-
pickHours: boolean;
|
|
62
|
-
minHours?: number;
|
|
63
|
-
maxHours?: number;
|
|
64
|
-
pickMinutes: boolean;
|
|
65
|
-
minMinutes?: number;
|
|
66
|
-
maxMinutes?: number;
|
|
67
|
-
/** Undefined if user can choose */
|
|
68
|
-
working?: boolean;
|
|
69
|
-
}
|
|
70
|
-
export interface GAgentPicker extends GBaseStep {
|
|
71
|
-
label: string;
|
|
72
|
-
description: string | null;
|
|
73
|
-
required: boolean;
|
|
74
|
-
multiple: boolean;
|
|
75
|
-
size: 1 | 2 | 3 | 4;
|
|
76
|
-
}
|
|
77
|
-
export interface GSmartSelect extends GBaseStep {
|
|
78
|
-
label: string;
|
|
79
|
-
description: string | null;
|
|
80
|
-
showIcon: boolean;
|
|
81
|
-
required: boolean;
|
|
82
|
-
searchable: boolean;
|
|
83
|
-
size: 1 | 2 | 3 | 4;
|
|
84
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CountryCode } from 'libphonenumber-js';
|
|
2
|
-
import { Branding } from './Branding';
|
|
3
|
-
export interface Organization {
|
|
4
|
-
/** The Organization's id */
|
|
5
|
-
idOrganization: string;
|
|
6
|
-
/** The Organization's name */
|
|
7
|
-
name: string;
|
|
8
|
-
branding: Branding;
|
|
9
|
-
customBrandings: boolean;
|
|
10
|
-
countryCode?: CountryCode;
|
|
11
|
-
}
|
package/dist/@Types/Time.d.ts
DELETED
package/dist/@Types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './@Types';
|
package/dist/App/App.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Classifier, Form } from '../@Types/Form';
|
|
3
|
-
import './App.css';
|
|
4
|
-
import { CustomStep, CustomStepProps } from '../FormSteps/CustomStep';
|
|
5
|
-
import { EditorState } from 'draft-js';
|
|
6
|
-
import { CountryCode } from 'libphonenumber-js';
|
|
7
|
-
export interface AppProps {
|
|
8
|
-
/** If the app is currently a widget */
|
|
9
|
-
isWidget?: boolean;
|
|
10
|
-
/** The apikey of the Form */
|
|
11
|
-
apiKey?: string;
|
|
12
|
-
/** The id of the form's organization */
|
|
13
|
-
idOrganization?: string;
|
|
14
|
-
/** The form to display, (used for postviews) */
|
|
15
|
-
formData?: Form;
|
|
16
|
-
/** If the widget is usedInternally */
|
|
17
|
-
internal?: boolean;
|
|
18
|
-
/** If the widget is a postview (view what the user filled)*/
|
|
19
|
-
postview?: boolean;
|
|
20
|
-
/** If postview should only show steps with values*/
|
|
21
|
-
partial?: boolean;
|
|
22
|
-
/** If the widget is a preview (view from admin)*/
|
|
23
|
-
preview?: boolean;
|
|
24
|
-
/** If the form can be edited (For entities) */
|
|
25
|
-
editable?: boolean;
|
|
26
|
-
/** The custom send label to display */
|
|
27
|
-
sendLabel?: string;
|
|
28
|
-
/** The data to fill the form with */
|
|
29
|
-
valuesData?: Record<string, unknown>;
|
|
30
|
-
/** Custom steps to display */
|
|
31
|
-
customSteps?: Record<string, CustomStep>;
|
|
32
|
-
/** Custom steps to display */
|
|
33
|
-
customStepProps?: Record<string, unknown>;
|
|
34
|
-
/** Classifiers dict */
|
|
35
|
-
classifiers?: Record<string, Classifier>;
|
|
36
|
-
/** Custom Confirmation Content */
|
|
37
|
-
customConfirmation?: (confirmation: {
|
|
38
|
-
url: string;
|
|
39
|
-
caseNumber: string;
|
|
40
|
-
}, renderIcon: () => JSX.Element, renderConfirmation: (state?: EditorState) => JSX.Element | void, renderLink: () => JSX.Element | void, onClose: () => void) => JSX.Element;
|
|
41
|
-
customClientInfoStep?: (props: CustomStepProps) => JSX.Element;
|
|
42
|
-
/** Custom function to call on send */
|
|
43
|
-
customSubmit?: (values: Record<string, unknown>, reload: () => void) => Promise<void>;
|
|
44
|
-
/** Custom submit function, when passed it is called */
|
|
45
|
-
setSubmit?: (submit: () => Promise<void | Record<string, any>>) => void;
|
|
46
|
-
/** Custom submit buttons */
|
|
47
|
-
customSubmitBtns?: null | ((onSubmit: () => Promise<Record<string, any> | void>, loading: boolean) => JSX.Element);
|
|
48
|
-
/** Function to call on postview to fetch the download url of a file */
|
|
49
|
-
fetchDownloadUrl?: (S3Key: string, fileName: string) => Promise<string>;
|
|
50
|
-
/** Function to call after the confimation dialog has been closed */
|
|
51
|
-
handleConfirmed?: () => void;
|
|
52
|
-
/** Function called to scroll to the top */
|
|
53
|
-
scrollToTop?: () => void;
|
|
54
|
-
/** The default country to use in phone pickers */
|
|
55
|
-
countryCode?: CountryCode;
|
|
56
|
-
}
|
|
57
|
-
export declare const IdFormContext: React.Context<string>;
|
|
58
|
-
declare function AppComponent({ formData, valuesData, ...props }: AppProps): JSX.Element;
|
|
59
|
-
export default AppComponent;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Form } from '../@Types';
|
|
2
|
-
import { FormStep, Mapper } from '../@Types/FormStep';
|
|
3
|
-
import { SiteState, ValuesStore } from '../States/SiteSlice';
|
|
4
|
-
import { CustomStep } from '../FormSteps/CustomStep';
|
|
5
|
-
import { MapperElement } from '../@Types/MapperElement';
|
|
6
|
-
import { MapperValue } from '../FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep';
|
|
7
|
-
import { CountryCode } from 'libphonenumber-js/max';
|
|
8
|
-
export declare const calcValuesStore: (orgInfo: {
|
|
9
|
-
idOrganization: string;
|
|
10
|
-
countryCode: CountryCode;
|
|
11
|
-
}, form: Readonly<Form>, originalValues?: Record<string, any>, postview?: boolean, customSteps?: Record<string, CustomStep>) => Promise<ValuesStore>;
|
|
12
|
-
export declare const addMapperStep: <Type>(step: Mapper, customSteps: Record<string, CustomStep>, path?: string) => {
|
|
13
|
-
element: MapperElement<Type>;
|
|
14
|
-
/** Record of all the new mapper values created */
|
|
15
|
-
mappers: Record<string, MapperValue<Type>>;
|
|
16
|
-
/** Record of all the new steps created */
|
|
17
|
-
steps: Record<string, FormStep>;
|
|
18
|
-
};
|
|
19
|
-
export declare const mapOriginalValue: (orgInfo: {
|
|
20
|
-
idOrganization: string;
|
|
21
|
-
countryCode: CountryCode;
|
|
22
|
-
}, step: FormStep, value: any, values: ValuesStore, form?: Readonly<Form>, path?: string) => Promise<any>;
|
|
23
|
-
export declare const calcInitialSections: (form: Form) => Pick<SiteState, 'previousSections' | 'idCurrentSection' | 'nextSections'>;
|
package/dist/App/AppHooks.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Form, Organization } from '../@Types';
|
|
2
|
-
import { AppProps } from './App';
|
|
3
|
-
import { Branding } from '../@Types/Branding';
|
|
4
|
-
export declare const useSetupApp: (isEmbedded: boolean, { preview, internal, postview, partial, editable, handleConfirmed, customSteps, valuesData, apiKey, formData, classifiers, ...others }: Omit<AppProps, 'isWidget'>) => {
|
|
5
|
-
form: Form | undefined | null;
|
|
6
|
-
organization: Organization | undefined | null;
|
|
7
|
-
branding: Branding | undefined;
|
|
8
|
-
reload: () => void;
|
|
9
|
-
};
|
|
10
|
-
export declare const useLogRocket: (organization: Organization | null | undefined, form: Form | null | undefined, { apiKey, internal, postview, preview, }: Pick<AppProps, 'apiKey' | 'internal' | 'postview' | 'preview'>) => void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CustomStep, CustomStepProps } from '../FormSteps/CustomStep';
|
|
3
|
-
export interface CustomContextData {
|
|
4
|
-
sendLabel?: string;
|
|
5
|
-
customStepProps: Record<string, unknown>;
|
|
6
|
-
customSteps: Record<string, CustomStep>;
|
|
7
|
-
customClientInfoStep?: (props: CustomStepProps) => JSX.Element;
|
|
8
|
-
/** Function to call on postview to fetch the download url of a file */
|
|
9
|
-
fetchDownloadUrl?: (S3Key: string, fileName: string) => Promise<string>;
|
|
10
|
-
}
|
|
11
|
-
declare const CustomContext: import("react").Context<CustomContextData>;
|
|
12
|
-
export default CustomContext;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Form } from '../@Types';
|
|
3
|
-
import { EurekaDraft } from '../@Types/Draft/Draft';
|
|
4
|
-
export declare const BaseConfirmationMessage: EurekaDraft;
|
|
5
|
-
declare const FormContext: import("react").Context<Form>;
|
|
6
|
-
export default FormContext;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { AppProps } from '../../App/App';
|
|
3
|
-
interface ConfirmationDialogProps {
|
|
4
|
-
confirmation: {
|
|
5
|
-
case: string;
|
|
6
|
-
url: string;
|
|
7
|
-
};
|
|
8
|
-
customConfirmation?: AppProps['customConfirmation'];
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare function ConfirmationDialog({ onClose, confirmation, customConfirmation, }: ConfirmationDialogProps): JSX.Element;
|
|
12
|
-
export default ConfirmationDialog;
|
package/dist/Form/Form.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Branding } from '../@Types/Branding';
|
|
3
|
-
import FormStepTypes from '../constants/FormStepTypes';
|
|
4
|
-
import { FieldValues } from 'react-hook-form';
|
|
5
|
-
import { AppProps } from '../App/App';
|
|
6
|
-
import CBRFormStepTypes from '../constants/CBRFormStepTypes';
|
|
7
|
-
import { Form } from '../@Types';
|
|
8
|
-
import { FormStep } from '../@Types/FormStep';
|
|
9
|
-
import { CBRFormStep } from '../@Types/CBRFormStep';
|
|
10
|
-
export declare const getLocale: () => any;
|
|
11
|
-
export interface StepDependency {
|
|
12
|
-
dependents: (FormStep | CBRFormStep)[];
|
|
13
|
-
value: any | undefined;
|
|
14
|
-
type: FormStepTypes | CBRFormStepTypes | 'ORIGINAL';
|
|
15
|
-
empty?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export type DependencyStore = Record<string, StepDependency>;
|
|
18
|
-
export interface WidthStats {
|
|
19
|
-
currentBreakPoint: number;
|
|
20
|
-
isResponsive: boolean;
|
|
21
|
-
isMobile: boolean;
|
|
22
|
-
}
|
|
23
|
-
type CustomAppProps = Pick<AppProps, 'customSteps' | 'customSubmitBtns' | 'setSubmit' | 'customConfirmation'>;
|
|
24
|
-
export interface BaseFormProps extends CustomAppProps {
|
|
25
|
-
form: Form;
|
|
26
|
-
branding?: Branding;
|
|
27
|
-
reload: () => void;
|
|
28
|
-
isWidget: boolean;
|
|
29
|
-
apiKey: string | undefined;
|
|
30
|
-
customSubmit: AppProps['customSubmit'];
|
|
31
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
32
|
-
scrollToTop?: () => void;
|
|
33
|
-
}
|
|
34
|
-
export interface FormComponentProps extends CustomAppProps {
|
|
35
|
-
/** Function called when users clicks submit */
|
|
36
|
-
onSubmit: (values: FieldValues) => Promise<any>;
|
|
37
|
-
scrollToTop?: () => void;
|
|
38
|
-
}
|
|
39
|
-
declare function FormComponent({ form, apiKey, reload, isWidget, branding, setSubmit, scrollToTop, customSteps, containerRef, customSubmit, customSubmitBtns, customConfirmation, }: BaseFormProps): JSX.Element;
|
|
40
|
-
export default FormComponent;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FormStep, Mapper } from '../@Types/FormStep';
|
|
2
|
-
import { DependencyStore } from './Form';
|
|
3
|
-
import { CustomStep } from '../FormSteps/CustomStep';
|
|
4
|
-
import { CBRFormStep } from '../@Types/CBRFormStep';
|
|
5
|
-
import { MapperElement } from '../@Types/MapperElement';
|
|
6
|
-
import { ValuesStore } from '../States/SiteSlice';
|
|
7
|
-
/**
|
|
8
|
-
* Function that cals the value of a step to output on submit
|
|
9
|
-
*/
|
|
10
|
-
export declare const calcValue: (idStep: string, steps: Record<string, FormStep>, values: Record<string, any>, customSteps: Record<string, CustomStep> | undefined, deleteIds: string[], value?: any) => any;
|
|
11
|
-
export declare function calcDependencies(steps: Record<string, FormStep | CBRFormStep>, customSteps?: Record<string, CustomStep>, allSteps?: Record<string, FormStep | CBRFormStep>, dependencies?: DependencyStore, values?: ValuesStore, addDependents?: boolean): DependencyStore;
|
|
12
|
-
export declare const calcMapperSubSteps: (step: Mapper, elements: MapperElement<any>[] | undefined, customSteps: Record<string, CustomStep>) => Record<string, FormStep>;
|
package/dist/Form/FormHooks.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { StepProps } from '../../Step';
|
|
3
|
-
import { CBRElementStep } from '../../../@Types/CBRFormStep';
|
|
4
|
-
export interface ElementStepProps extends Omit<StepProps, 'step'> {
|
|
5
|
-
step: CBRElementStep;
|
|
6
|
-
}
|
|
7
|
-
declare function CBRElementStepComponent(props: ElementStepProps): JSX.Element;
|
|
8
|
-
export default CBRElementStepComponent;
|