@arquimedes.co/eureka-forms 3.0.33-test → 3.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@Types/Condition.d.ts +6 -4
- package/dist/@Types/ErkValue.d.ts +16 -0
- package/dist/@Types/Form.d.ts +1 -0
- package/dist/@Types/FormStep.d.ts +12 -8
- package/dist/@Types/GenericFormSteps.d.ts +0 -8
- package/dist/@Types/User.d.ts +13 -0
- package/dist/App/App.d.ts +3 -1
- package/dist/App/App.js +46 -21
- package/dist/App/AppFunctions.d.ts +1 -1
- package/dist/App/AppFunctions.js +336 -177
- package/dist/App/AppHooks.d.ts +2 -2
- package/dist/App/AppHooks.js +252 -146
- package/dist/Contexts/CustomContext.d.ts +1 -0
- package/dist/Contexts/CustomContext.js +1 -1
- package/dist/Contexts/FormContext.d.ts +1 -1
- package/dist/Contexts/FormContext.js +2 -3
- package/dist/Contexts/SectionContext.d.ts +1 -0
- package/dist/Contexts/SectionContext.js +1 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +2 -1
- package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +62 -36
- package/dist/Form/Form.d.ts +2 -1
- package/dist/Form/Form.js +164 -71
- package/dist/Form/Form.module.css +9 -0
- package/dist/Form/FormFunctions.js +112 -63
- package/dist/Form/FormHooks.d.ts +1 -0
- package/dist/Form/FormHooks.js +21 -13
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +1 -0
- package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +105 -32
- package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +2 -1
- package/dist/Form/FormTypes/StepperForm/StepperForm.js +110 -46
- package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +1 -0
- package/dist/Form/Section/MaterialSection/MaterialSection.js +23 -10
- package/dist/Form/Section/MaterialSection/MaterialSection.module.css +2 -0
- package/dist/Form/Section/Section.d.ts +1 -0
- package/dist/Form/Section/Section.js +15 -4
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +1 -0
- package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.js +65 -30
- package/dist/Form/Terms/Term/Term.d.ts +1 -0
- package/dist/Form/Terms/Term/Term.js +13 -2
- package/dist/Form/Terms/Terms.d.ts +1 -0
- package/dist/Form/Terms/Terms.js +27 -11
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +107 -34
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +13 -2
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +40 -12
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +77 -56
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +1 -0
- package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +115 -45
- package/dist/FormSteps/AYFStepMapper.d.ts +1 -0
- package/dist/FormSteps/AYFStepMapper.js +137 -60
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +1 -0
- package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.js +13 -2
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +1 -0
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +173 -64
- package/dist/FormSteps/CBRStepMapper.d.ts +1 -0
- package/dist/FormSteps/CBRStepMapper.js +168 -56
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +1 -0
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.js +13 -2
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +1 -0
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +37 -19
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +1 -0
- package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +13 -2
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +2 -1
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +81 -44
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +1 -0
- package/dist/FormSteps/CollapsibleStep/CollapsibleStep.js +26 -3
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +1 -0
- package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +61 -31
- package/dist/FormSteps/CustomStep.d.ts +1 -0
- package/dist/FormSteps/CustomStep.js +31 -17
- package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +2 -1
- package/dist/FormSteps/DatePickerStep/DatePickerStep.js +13 -2
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +2 -1
- package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +20 -9
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +1 -0
- package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.js +13 -2
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +1 -0
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.js +32 -16
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +2 -1
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +302 -106
- package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +1 -0
- package/dist/FormSteps/FileUploadStep/FileUploadStep.js +13 -2
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +1 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +95 -33
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +2 -0
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +180 -85
- package/dist/FormSteps/MapperStep/MapperStep.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MapperStep.js +13 -2
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +38 -16
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +31 -20
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.js +175 -85
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +47 -20
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +1 -0
- package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +115 -70
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +2 -1
- package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.js +33 -15
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +1 -0
- package/dist/FormSteps/PhoneInputStep/PhoneInputStep.js +13 -2
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +1 -0
- package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +31 -17
- package/dist/FormSteps/RatingStep/RatingStep.d.ts +1 -0
- package/dist/FormSteps/RatingStep/RatingStep.js +13 -2
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +1 -0
- package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +61 -31
- package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +1 -0
- package/dist/FormSteps/SelectorStep/SelectorStep.js +13 -2
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +1 -0
- package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +3 -2
- package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +1 -0
- package/dist/FormSteps/SeparatorStep/SeparatorStep.js +13 -2
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +2 -1
- package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +155 -73
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +7 -7
- package/dist/FormSteps/SmartSelectStep/SmartSelectStep.js +13 -2
- package/dist/FormSteps/Step.d.ts +1 -0
- package/dist/FormSteps/Step.js +58 -33
- package/dist/FormSteps/StepFunctions.d.ts +6 -4
- package/dist/FormSteps/StepFunctions.js +208 -153
- package/dist/FormSteps/StepHooks.d.ts +14 -68
- package/dist/FormSteps/StepHooks.js +154 -88
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +20 -18
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +1 -0
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +74 -36
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +2 -1
- package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +28 -12
- package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +1 -0
- package/dist/FormSteps/TextAreaStep/TextAreaStep.js +14 -3
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +2 -1
- package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +30 -12
- package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +2 -1
- package/dist/FormSteps/TextInputStep/TextInputStep.js +13 -2
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +2 -1
- package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.js +26 -9
- package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +1 -0
- package/dist/FormSteps/TimePickerStep/TimePickerStep.js +13 -2
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +1 -0
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +54 -21
- package/dist/FormSteps/TitleStep/TitleStep.d.ts +1 -0
- package/dist/FormSteps/TitleStep/TitleStep.js +13 -2
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +2 -1
- package/dist/FormSteps/Utils/@StepFiller/StepFiller.js +27 -14
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +3 -2
- package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +23 -8
- package/dist/Icons/@IconTypes.d.ts +7 -0
- package/dist/Icons/CalendarIcon.d.ts +3 -2
- package/dist/Icons/CalendarIcon.js +14 -4
- package/dist/Icons/Construction/LeakIcon.d.ts +2 -2
- package/dist/Icons/Construction/LeakIcon.js +13 -3
- package/dist/Icons/Construction/ProjectIcon.d.ts +2 -2
- package/dist/Icons/Construction/ProjectIcon.js +13 -3
- package/dist/Icons/Construction/PropertyIcon.d.ts +2 -2
- package/dist/Icons/Construction/PropertyIcon.js +13 -3
- package/dist/Icons/Construction/SpaceIcon.d.ts +2 -2
- package/dist/Icons/Construction/SpaceIcon.js +13 -3
- package/dist/Icons/DocumentIcon.d.ts +2 -2
- package/dist/Icons/DocumentIcon.js +13 -3
- package/dist/Icons/EmailIcon.d.ts +4 -0
- package/dist/Icons/EmailIcon.js +17 -0
- package/dist/Icons/Entities/CheckListIcon.d.ts +2 -2
- package/dist/Icons/Entities/CheckListIcon.js +13 -3
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -2
- package/dist/Icons/Entities/GenericEntityIcon.js +15 -5
- package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -2
- package/dist/Icons/Entities/HandshakeIcon.js +15 -5
- package/dist/Icons/Entities/SchoolIcon.d.ts +2 -0
- package/dist/Icons/Entities/SchoolIcon.js +17 -0
- package/dist/Icons/Entities/SupplierIcon.d.ts +2 -2
- package/dist/Icons/Entities/SupplierIcon.js +15 -5
- package/dist/Icons/GroupIcon.d.ts +4 -0
- package/dist/Icons/GroupIcon.js +17 -0
- package/dist/Icons/LocationIcon.d.ts +3 -2
- package/dist/Icons/LocationIcon.js +14 -4
- package/dist/Icons/LockedIcon.d.ts +4 -0
- package/dist/Icons/LockedIcon.js +17 -0
- package/dist/Icons/PersonIcon.d.ts +3 -2
- package/dist/Icons/PersonIcon.js +16 -6
- package/dist/Login/Login.module.css +135 -0
- package/dist/Login/LoginLayout.module.css +68 -0
- package/dist/Login/LoginPage.d.ts +11 -0
- package/dist/Login/LoginPage.js +177 -0
- package/dist/Login/LoginTextField.d.ts +15 -0
- package/dist/Login/LoginTextField.js +134 -0
- package/dist/Services/DraftService.d.ts +14 -14
- package/dist/Services/DraftService.js +72 -22
- package/dist/Services/FileService.d.ts +1 -1
- package/dist/Services/FileService.js +86 -29
- package/dist/Services/FormService.js +56 -11
- package/dist/Services/IntegrationService.d.ts +21 -0
- package/dist/Services/IntegrationService.js +69 -0
- package/dist/Services/OrganizationService.js +62 -11
- package/dist/Services/UserService.d.ts +10 -0
- package/dist/Services/UserService.js +71 -0
- package/dist/Shared/CustomBtn/CustomBtn.d.ts +2 -1
- package/dist/Shared/CustomBtn/CustomBtn.js +88 -24
- package/dist/Shared/InputIcon/InputIcon.d.ts +3 -3
- package/dist/Shared/InputIcon/InputIcon.js +112 -29
- package/dist/Shared/Loader/Loader.d.ts +1 -0
- package/dist/Shared/Loader/Loader.js +18 -6
- package/dist/Shared/Navbar/Navbar.d.ts +3 -1
- package/dist/Shared/Navbar/Navbar.js +96 -3
- package/dist/Shared/Navbar/Navbar.module.css +15 -0
- package/dist/Shared/Navbar/Navbar.stories.d.ts +1 -1
- package/dist/Shared/Navbar/Navbar.stories.js +2 -2
- package/dist/Shared/Rating/Rating.d.ts +5 -3
- package/dist/Shared/Rating/Rating.js +27 -4
- package/dist/Shared/Rating/Rating.stories.d.ts +1 -1
- package/dist/Shared/Rating/Rating.stories.js +19 -13
- package/dist/Shared/Rating/Ratings/LikeRating.d.ts +2 -1
- package/dist/Shared/Rating/Ratings/LikeRating.js +33 -19
- package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +2 -1
- package/dist/Shared/Rating/Ratings/SatisfactionRating.js +47 -27
- package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +2 -1
- package/dist/Shared/Rating/Ratings/ScaleRating.js +54 -23
- package/dist/Shared/RoundedButton/RoundedButton.d.ts +30 -0
- package/dist/Shared/RoundedButton/RoundedButton.js +45 -0
- package/dist/Shared/RoundedButton/RoundedButton.stories.d.ts +23 -0
- package/dist/Shared/RoundedButton/RoundedButton.stories.js +36 -0
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -0
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.js +101 -0
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.d.ts +21 -0
- package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.js +50 -0
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.d.ts +49 -0
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.js +351 -0
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.d.ts +36 -0
- package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.js +223 -0
- package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.d.ts +43 -0
- package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.js +226 -0
- package/dist/Shared/RoundedSelect/RoundedSelect.d.ts +68 -0
- package/dist/Shared/RoundedSelect/RoundedSelect.js +214 -0
- package/dist/Shared/RoundedSelect/RoundedSelect.stories.d.ts +28 -0
- package/dist/Shared/RoundedSelect/RoundedSelect.stories.js +91 -0
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +63 -0
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.js +236 -0
- package/dist/Shared/{ErkSmartSelect/ErkSmartSelect.stories.d.ts → RoundedSmartSelect/RoundedSmartSelect.stories.d.ts} +13 -3
- package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.js +318 -0
- package/dist/Shared/RoundedTextField/RoundedTextField.d.ts +45 -0
- package/dist/Shared/RoundedTextField/RoundedTextField.js +175 -0
- package/dist/Shared/{ErkTextField/ErkTextField.stories.d.ts → RoundedTextField/RoundedTextField.stories.d.ts} +17 -4
- package/dist/Shared/RoundedTextField/RoundedTextField.stories.js +224 -0
- package/dist/Shared/RoundedTimePicker/RoundedTimePicker.d.ts +41 -0
- package/dist/Shared/RoundedTimePicker/RoundedTimePicker.js +314 -0
- package/dist/Shared/SmartDraftRenderer/FormDecorator.d.ts +2 -1
- package/dist/Shared/SmartDraftRenderer/FormDecorator.js +22 -8
- package/dist/Shared/SmartDraftRenderer/LinkDecorator.d.ts +14 -0
- package/dist/Shared/SmartDraftRenderer/LinkDecorator.js +60 -0
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.d.ts +2 -1
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.js +43 -27
- package/dist/Shared/Toggle/Toggle.d.ts +14 -5
- package/dist/Shared/Toggle/Toggle.js +32 -29
- package/dist/States/GlobalSlice.d.ts +12 -7
- package/dist/States/GlobalSlice.js +22 -6
- package/dist/States/SiteSlice.d.ts +48 -30
- package/dist/States/SiteSlice.js +76 -58
- package/dist/States/WidthStatsSlice.d.ts +2 -2
- package/dist/States/WidthStatsSlice.js +9 -8
- package/dist/Utils/AxiosAPI.d.ts +5 -4
- package/dist/Utils/AxiosAPI.js +73 -23
- package/dist/Utils/AxiosWidget.js +4 -4
- package/dist/Utils/CBRFunctions.js +30 -29
- package/dist/Utils/DraftFunctions.d.ts +3 -3
- package/dist/Utils/DraftFunctions.js +143 -102
- package/dist/Utils/FormStepFunctions.d.ts +1 -1
- package/dist/Utils/FormStepFunctions.js +45 -27
- package/dist/Utils/MaterialProviders.d.ts +1 -21
- package/dist/Utils/MaterialProviders.js +28 -46
- package/dist/Utils/PhoneFunctions.js +5 -5
- package/dist/Utils/StoreContext.js +1 -1
- package/dist/Utils/TestUtils.d.ts +81 -60
- package/dist/Utils/TestUtils.js +57 -28
- package/dist/Utils/_api.d.ts +7 -7
- package/dist/Utils/_api.js +8 -10
- package/dist/Utils/store.d.ts +17 -9
- package/dist/Utils/store.js +74 -15
- package/dist/Widget.d.ts +1 -1
- package/dist/Widget.js +26 -16
- package/dist/__mocks__/axios.d.ts +2 -0
- package/dist/__mocks__/axios.js +2 -0
- package/dist/constants/Draft/DraftEntityDataTypes.d.ts +3 -3
- package/dist/constants/ErkValueTypes.d.ts +6 -0
- package/dist/constants/ErkValueTypes.js +7 -0
- package/dist/constants/Files/FileExtensions.js +3 -3
- package/dist/constants/Files/FileMaxSize.js +1 -1
- package/dist/constants/FormStepTypes.d.ts +2 -2
- package/dist/constants/FormStepTypes.js +1 -1
- package/dist/constants/{ErkIconTypes.d.ts → IconTypes.d.ts} +4 -2
- package/dist/constants/IconTypes.js +18 -0
- package/dist/constants/InternalFormStyle.js +1 -1
- package/dist/constants/MaterialClassNameSeed.d.ts +1 -0
- package/dist/constants/MaterialClassNameSeed.js +1 -0
- package/dist/hooks.d.ts +3 -0
- package/dist/hooks.js +77 -14
- package/dist/index.js +31 -0
- package/dist/index.lib.d.ts +1 -0
- package/dist/index.lib.js +1 -0
- package/package.json +125 -104
- package/dist/App/AppFunctions.test.js +0 -708
- package/dist/App/AppHooks.test.js +0 -154
- package/dist/Form/FormFunctions.test.js +0 -458
- package/dist/FormSteps/DatePickerRangeStep/DatePickerRangeStep.d.ts +0 -10
- package/dist/FormSteps/DatePickerRangeStep/DatePickerRangeStep.js +0 -14
- package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.d.ts +0 -3
- package/dist/FormSteps/DatePickerRangeStep/MaterialDatePickerRangeStep/MaterialDatePickerRangeStep.js +0 -34
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +0 -2
- package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.js +0 -3
- package/dist/FormSteps/StepFunctions.test.js +0 -702
- package/dist/FormSteps/Utils/@StepFiller/StepFillerContext.d.ts +0 -1
- package/dist/FormSteps/Utils/@StepFiller/StepFillerContext.js +0 -2
- package/dist/Icons/@ErkIcon.d.ts +0 -14
- package/dist/Icons/@ErkIcon.js +0 -9
- package/dist/Icons/ArrowLeftIcon.d.ts +0 -3
- package/dist/Icons/ArrowLeftIcon.js +0 -7
- package/dist/Icons/ArrowRightIcon.d.ts +0 -3
- package/dist/Icons/ArrowRightIcon.js +0 -7
- package/dist/Icons/CheckCircleIcon.d.ts +0 -3
- package/dist/Icons/CheckCircleIcon.js +0 -7
- package/dist/Icons/CheckboxCheckedIcon.d.ts +0 -3
- package/dist/Icons/CheckboxCheckedIcon.js +0 -7
- package/dist/Icons/CheckboxUncheckedIcon.d.ts +0 -3
- package/dist/Icons/CheckboxUncheckedIcon.js +0 -7
- package/dist/Icons/ClockIcon.d.ts +0 -3
- package/dist/Icons/ClockIcon.js +0 -7
- package/dist/Icons/CloseIcon.d.ts +0 -3
- package/dist/Icons/CloseIcon.js +0 -7
- package/dist/Icons/DeleteIcon.d.ts +0 -3
- package/dist/Icons/DeleteIcon.js +0 -7
- package/dist/Icons/Entities/WorkIcon.d.ts +0 -3
- package/dist/Icons/Entities/WorkIcon.js +0 -7
- package/dist/Icons/ErrorIcon.d.ts +0 -3
- package/dist/Icons/ErrorIcon.js +0 -7
- package/dist/Icons/ExpandLessIcon.d.ts +0 -3
- package/dist/Icons/ExpandLessIcon.js +0 -7
- package/dist/Icons/ExpandMoreIcon.d.ts +0 -3
- package/dist/Icons/ExpandMoreIcon.js +0 -7
- package/dist/Icons/FileIcon.d.ts +0 -3
- package/dist/Icons/FileIcon.js +0 -7
- package/dist/Icons/InfoIcon.d.ts +0 -3
- package/dist/Icons/InfoIcon.js +0 -7
- package/dist/Icons/Ratings/DislikeIcon.d.ts +0 -3
- package/dist/Icons/Ratings/DislikeIcon.js +0 -7
- package/dist/Icons/Ratings/DissatisfiedIcon.d.ts +0 -3
- package/dist/Icons/Ratings/DissatisfiedIcon.js +0 -7
- package/dist/Icons/Ratings/LikeIcon.d.ts +0 -3
- package/dist/Icons/Ratings/LikeIcon.js +0 -7
- package/dist/Icons/Ratings/SatisfiedIcon.d.ts +0 -3
- package/dist/Icons/Ratings/SatisfiedIcon.js +0 -7
- package/dist/Icons/Ratings/StarIcon.d.ts +0 -3
- package/dist/Icons/Ratings/StarIcon.js +0 -7
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.d.ts +0 -3
- package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +0 -7
- package/dist/Icons/Ratings/VerySatisfiedIcon.d.ts +0 -3
- package/dist/Icons/Ratings/VerySatisfiedIcon.js +0 -7
- package/dist/Icons/WarningIcon.d.ts +0 -3
- package/dist/Icons/WarningIcon.js +0 -7
- package/dist/Init.d.ts +0 -1
- package/dist/Init.js +0 -2
- package/dist/Shared/ErkButton/ErkButton.d.ts +0 -25
- package/dist/Shared/ErkButton/ErkButton.js +0 -31
- package/dist/Shared/ErkButton/ErkButton.stories.d.ts +0 -16
- package/dist/Shared/ErkButton/ErkButton.stories.js +0 -28
- package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +0 -19
- package/dist/Shared/ErkCheckbox/ErkCheckBox.js +0 -31
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +0 -13
- package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.js +0 -34
- package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +0 -18
- package/dist/Shared/ErkDatePicker/ErkDatePicker.js +0 -266
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +0 -23
- package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.js +0 -98
- package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.d.ts +0 -18
- package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.js +0 -162
- package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.stories.d.ts +0 -36
- package/dist/Shared/ErkDatePickerRange/ErkDatePickerRange.stories.js +0 -274
- package/dist/Shared/ErkMenuItem.d.ts +0 -4
- package/dist/Shared/ErkMenuItem.js +0 -18
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.d.ts +0 -17
- package/dist/Shared/ErkPhoneInput/EkrPhoneInput.js +0 -96
- package/dist/Shared/ErkSelect/ErkSelect.d.ts +0 -52
- package/dist/Shared/ErkSelect/ErkSelect.js +0 -141
- package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +0 -21
- package/dist/Shared/ErkSelect/ErkSelect.stories.js +0 -87
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.d.ts +0 -28
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.js +0 -54
- package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.js +0 -159
- package/dist/Shared/ErkTextField/ErkTextField.d.ts +0 -34
- package/dist/Shared/ErkTextField/ErkTextField.js +0 -146
- package/dist/Shared/ErkTextField/ErkTextField.stories.js +0 -99
- package/dist/Shared/ErkTimePicker/ErkTimePicker.d.ts +0 -32
- package/dist/Shared/ErkTimePicker/ErkTimePicker.js +0 -107
- package/dist/Shared/SmartDraftRenderer/DraftLoadingContext.d.ts +0 -1
- package/dist/Shared/SmartDraftRenderer/DraftLoadingContext.js +0 -2
- package/dist/Utils/LocaleUtils.d.ts +0 -2
- package/dist/Utils/LocaleUtils.js +0 -12
- package/dist/Utils/MuiClassnameSetup.d.ts +0 -1
- package/dist/Utils/MuiClassnameSetup.js +0 -3
- package/dist/constants/ErkIconTypes.js +0 -16
- package/dist/index.css +0 -15
- package/dist/main.d.ts +0 -3
- package/dist/main.js +0 -25
- /package/dist/{App/AppFunctions.test.d.ts → @Types/ErkValue.js} +0 -0
- /package/dist/{App/AppHooks.test.d.ts → @Types/User.js} +0 -0
- /package/dist/{Form/FormFunctions.test.d.ts → Icons/@IconTypes.js} +0 -0
- /package/dist/Shared/{ErkTimePicker/ErkTimePicker.module.css → RoundedTimePicker/RoundedTimePicker.module.css} +0 -0
- /package/dist/{FormSteps/StepFunctions.test.d.ts → index.d.ts} +0 -0
- /package/dist/{__tests__/setup.d.ts → setupTests.d.ts} +0 -0
- /package/dist/{__tests__/setup.js → setupTests.js} +0 -0
|
@@ -1,32 +1,43 @@
|
|
|
1
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
+
if (ar || !(i in from)) {
|
|
4
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
+
ar[i] = from[i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
+
};
|
|
1
10
|
import FormStepTypes, { ApiSelectorOptionTypes, ClassifierOptionTypes, EntityValueDataTypes, EntityValueOptionTypes, OptionTypes, } from '../constants/FormStepTypes';
|
|
2
11
|
import CBRFormStepTypes from '../constants/CBRFormStepTypes';
|
|
3
12
|
import AYFFormStepTypes from '../constants/AYFFormStepTypes';
|
|
4
13
|
import { getRawText } from '../Utils/DraftFunctions';
|
|
5
|
-
import ConditionTypes, { ExpressionTypes, OperatorTypes } from '../constants/ConditionTypes';
|
|
14
|
+
import ConditionTypes, { ExpressionTypes, OperatorTypes, } from '../constants/ConditionTypes';
|
|
6
15
|
import EntityPropertyTypes from '../constants/EntityPropertyTypes';
|
|
7
16
|
export function calcFillerSize(step, steps, values, size) {
|
|
8
|
-
|
|
17
|
+
var _a;
|
|
18
|
+
var maxSize = (_a = step.maxSize) !== null && _a !== void 0 ? _a : size.blockNum;
|
|
9
19
|
if (maxSize < size.blockNum) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return size.blockSize * stepSize + size.spacingSize * (stepSize - 1) + 20;
|
|
20
|
+
var tsize = recursivelyCheckOpenSize(step.id, steps, values);
|
|
21
|
+
var stepSize = maxSize - tsize;
|
|
22
|
+
return (size.blockSize * stepSize + size.spacingSize * (stepSize - 1) + 20);
|
|
13
23
|
}
|
|
14
24
|
else {
|
|
15
25
|
return 0;
|
|
16
26
|
}
|
|
17
27
|
}
|
|
18
28
|
function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
var step = steps[idStep];
|
|
30
|
+
var value = values[idStep];
|
|
21
31
|
switch (step.type) {
|
|
22
32
|
case FormStepTypes.SELECTOR: {
|
|
23
|
-
|
|
33
|
+
var size = step.size;
|
|
24
34
|
if (value) {
|
|
25
|
-
|
|
26
|
-
if (currentOption
|
|
27
|
-
|
|
28
|
-
for (
|
|
29
|
-
|
|
35
|
+
var currentOption = step.options.find(function (option) { return option.value === value.value; });
|
|
36
|
+
if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === OptionTypes.NESTED) {
|
|
37
|
+
var optionSize = 0;
|
|
38
|
+
for (var _i = 0, _a = currentOption.steps; _i < _a.length; _i++) {
|
|
39
|
+
var pStepId = _a[_i];
|
|
40
|
+
var temp = recursivelyCheckOpenSize(pStepId, steps, values);
|
|
30
41
|
optionSize += temp;
|
|
31
42
|
}
|
|
32
43
|
size += optionSize;
|
|
@@ -35,12 +46,13 @@ function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
|
35
46
|
return size;
|
|
36
47
|
}
|
|
37
48
|
case FormStepTypes.CLASSIFIER_SELECTOR: {
|
|
38
|
-
|
|
49
|
+
var size = step.size;
|
|
39
50
|
if (value) {
|
|
40
|
-
|
|
41
|
-
if (currentOption
|
|
42
|
-
|
|
43
|
-
for (
|
|
51
|
+
var currentOption = step.options[value];
|
|
52
|
+
if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === ClassifierOptionTypes.NESTED) {
|
|
53
|
+
var optionSize = 0;
|
|
54
|
+
for (var _b = 0, _c = currentOption.steps; _b < _c.length; _b++) {
|
|
55
|
+
var pStepId = _c[_b];
|
|
44
56
|
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
45
57
|
}
|
|
46
58
|
size += optionSize;
|
|
@@ -49,12 +61,13 @@ function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
|
49
61
|
return size;
|
|
50
62
|
}
|
|
51
63
|
case FormStepTypes.ENTITYVALUEPICKER: {
|
|
52
|
-
|
|
64
|
+
var size = step.size;
|
|
53
65
|
if (value) {
|
|
54
|
-
|
|
55
|
-
if (currentOption
|
|
56
|
-
|
|
57
|
-
for (
|
|
66
|
+
var currentOption = step.options[value];
|
|
67
|
+
if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === EntityValueOptionTypes.NESTED) {
|
|
68
|
+
var optionSize = 0;
|
|
69
|
+
for (var _d = 0, _e = currentOption.steps; _d < _e.length; _d++) {
|
|
70
|
+
var pStepId = _e[_d];
|
|
58
71
|
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
59
72
|
}
|
|
60
73
|
size += optionSize;
|
|
@@ -63,12 +76,13 @@ function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
|
63
76
|
return size;
|
|
64
77
|
}
|
|
65
78
|
case FormStepTypes.API_SELECTOR: {
|
|
66
|
-
|
|
79
|
+
var size = step.size;
|
|
67
80
|
if (value) {
|
|
68
|
-
|
|
69
|
-
if (currentOption
|
|
70
|
-
|
|
71
|
-
for (
|
|
81
|
+
var currentOption = step.options[value];
|
|
82
|
+
if ((currentOption === null || currentOption === void 0 ? void 0 : currentOption.type) === ApiSelectorOptionTypes.NESTED) {
|
|
83
|
+
var optionSize = 0;
|
|
84
|
+
for (var _f = 0, _g = currentOption.steps; _f < _g.length; _f++) {
|
|
85
|
+
var pStepId = _g[_f];
|
|
72
86
|
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
73
87
|
}
|
|
74
88
|
size += optionSize;
|
|
@@ -77,10 +91,11 @@ function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
|
77
91
|
return size;
|
|
78
92
|
}
|
|
79
93
|
case FormStepTypes.CHECKBOX: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
for (
|
|
94
|
+
var size = step.size;
|
|
95
|
+
var stepSteps = value ? step.steps : step.uncheckedSteps;
|
|
96
|
+
var optionSize = 0;
|
|
97
|
+
for (var _h = 0, _j = stepSteps !== null && stepSteps !== void 0 ? stepSteps : []; _h < _j.length; _h++) {
|
|
98
|
+
var pStepId = _j[_h];
|
|
84
99
|
optionSize += recursivelyCheckOpenSize(pStepId, steps, values);
|
|
85
100
|
}
|
|
86
101
|
size += optionSize;
|
|
@@ -94,20 +109,21 @@ function recursivelyCheckOpenSize(idStep, steps, values) {
|
|
|
94
109
|
return 4;
|
|
95
110
|
}
|
|
96
111
|
}
|
|
97
|
-
export
|
|
112
|
+
export var calcStepWidth = function (stepSize, size) {
|
|
98
113
|
return size.blockSize * stepSize + size.spacingSize * (stepSize - 1);
|
|
99
114
|
};
|
|
100
|
-
export
|
|
115
|
+
export var calcDefaultValue = function (step) {
|
|
116
|
+
var _a, _b;
|
|
101
117
|
switch (step.type) {
|
|
102
118
|
case FormStepTypes.CHECKBOX:
|
|
103
|
-
return step.defaultValue
|
|
119
|
+
return (_a = step.defaultValue) !== null && _a !== void 0 ? _a : false;
|
|
104
120
|
case FormStepTypes.TITLE:
|
|
105
121
|
return undefined;
|
|
106
122
|
case FormStepTypes.TIMEPICKER:
|
|
107
123
|
return step.defaultValue;
|
|
108
124
|
case FormStepTypes.SELECTOR:
|
|
109
125
|
if (step.defaultValue)
|
|
110
|
-
return step.options.find((option)
|
|
126
|
+
return ((_b = step.options.find(function (option) { return option.value === step.defaultValue; })) !== null && _b !== void 0 ? _b : '');
|
|
111
127
|
return '';
|
|
112
128
|
case FormStepTypes.TEXTINPUT:
|
|
113
129
|
case FormStepTypes.CLASSIFIER_SELECTOR:
|
|
@@ -119,7 +135,6 @@ export const calcDefaultValue = (step) => {
|
|
|
119
135
|
return '';
|
|
120
136
|
case FormStepTypes.RATING:
|
|
121
137
|
case FormStepTypes.DATEPICKER:
|
|
122
|
-
case FormStepTypes.DATEPICKER_RANGE:
|
|
123
138
|
case FormStepTypes.API_SELECTOR:
|
|
124
139
|
case FormStepTypes.ENTITYVALUEPICKER:
|
|
125
140
|
return null;
|
|
@@ -135,24 +150,26 @@ export const calcDefaultValue = (step) => {
|
|
|
135
150
|
return undefined;
|
|
136
151
|
}
|
|
137
152
|
};
|
|
138
|
-
export
|
|
139
|
-
|
|
153
|
+
export var iterateNestedSteps = function (idStep, steps, iteration, path) {
|
|
154
|
+
if (path === void 0) { path = []; }
|
|
155
|
+
var step = steps[idStep];
|
|
140
156
|
if (!step) {
|
|
141
157
|
console.error('Missing Step:', idStep);
|
|
142
158
|
return;
|
|
143
159
|
}
|
|
144
160
|
iteration(step, path);
|
|
145
161
|
if (step.type === FormStepTypes.MAPPER) {
|
|
146
|
-
for (
|
|
147
|
-
|
|
148
|
-
|
|
162
|
+
for (var _i = 0, _a = step.rootSteps; _i < _a.length; _i++) {
|
|
163
|
+
var idStep_1 = _a[_i];
|
|
164
|
+
iterateNestedSteps(idStep_1, step.steps, iteration, __spreadArray(__spreadArray([], path, true), [
|
|
149
165
|
step.id,
|
|
150
|
-
]);
|
|
166
|
+
], false));
|
|
151
167
|
}
|
|
152
168
|
}
|
|
153
169
|
else {
|
|
154
|
-
for (
|
|
155
|
-
|
|
170
|
+
for (var _b = 0, _c = calcSubSteps(step.id, steps); _b < _c.length; _b++) {
|
|
171
|
+
var idSubStep = _c[_b];
|
|
172
|
+
iterateNestedSteps(idSubStep, steps, iteration, path);
|
|
156
173
|
}
|
|
157
174
|
}
|
|
158
175
|
};
|
|
@@ -162,22 +179,24 @@ export const iterateNestedSteps = (idStep, steps, iteration, path = [idStep]) =>
|
|
|
162
179
|
* @param idModifier optional modifier for the ids of the substeps and all other properties
|
|
163
180
|
* @returns list of the ids of the substeps of the step, if modifier returns modified steps
|
|
164
181
|
*/
|
|
165
|
-
export
|
|
166
|
-
|
|
167
|
-
|
|
182
|
+
export var calcSubSteps = function (idStep, allSteps, idModifier) {
|
|
183
|
+
var _a;
|
|
184
|
+
var step = allSteps[idStep];
|
|
185
|
+
var subSteps = [];
|
|
168
186
|
if (!step)
|
|
169
187
|
return [];
|
|
170
|
-
|
|
171
|
-
for (
|
|
172
|
-
|
|
188
|
+
var handleSteps = function (steps) {
|
|
189
|
+
for (var i = 0; i < steps.length; i++) {
|
|
190
|
+
var idSubStep = steps[i];
|
|
173
191
|
if (idModifier)
|
|
174
192
|
steps[i] = idModifier(steps[i]);
|
|
175
|
-
subSteps.push(idSubStep,
|
|
193
|
+
subSteps.push.apply(subSteps, __spreadArray([idSubStep], calcSubSteps(idSubStep, allSteps, idModifier), false));
|
|
176
194
|
}
|
|
177
195
|
};
|
|
178
196
|
switch (step.type) {
|
|
179
197
|
case FormStepTypes.SELECTOR: {
|
|
180
|
-
for (
|
|
198
|
+
for (var _i = 0, _b = step.options; _i < _b.length; _i++) {
|
|
199
|
+
var option = _b[_i];
|
|
181
200
|
if (option.type === OptionTypes.NESTED) {
|
|
182
201
|
handleSteps(option.steps);
|
|
183
202
|
}
|
|
@@ -185,8 +204,9 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
185
204
|
break;
|
|
186
205
|
}
|
|
187
206
|
case FormStepTypes.CLASSIFIER_SELECTOR:
|
|
188
|
-
for (
|
|
189
|
-
|
|
207
|
+
for (var _c = 0, _d = Object.keys(step.options); _c < _d.length; _c++) {
|
|
208
|
+
var idOption = _d[_c];
|
|
209
|
+
var option = step.options[idOption];
|
|
190
210
|
if (option.type === ClassifierOptionTypes.NESTED) {
|
|
191
211
|
handleSteps(option.steps);
|
|
192
212
|
}
|
|
@@ -194,7 +214,8 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
194
214
|
break;
|
|
195
215
|
case FormStepTypes.RATING:
|
|
196
216
|
if (step.nestedSteps) {
|
|
197
|
-
for (
|
|
217
|
+
for (var _e = 0, _f = step.nestedSteps; _e < _f.length; _e++) {
|
|
218
|
+
var steps = _f[_e];
|
|
198
219
|
handleSteps(steps);
|
|
199
220
|
}
|
|
200
221
|
}
|
|
@@ -212,19 +233,22 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
212
233
|
}
|
|
213
234
|
case FormStepTypes.ENTITYVALUEPICKER:
|
|
214
235
|
if (idModifier) {
|
|
215
|
-
for (
|
|
236
|
+
for (var _g = 0, _h = step.path; _g < _h.length; _g++) {
|
|
237
|
+
var path = _h[_g];
|
|
216
238
|
if (path.type === EntityValueDataTypes.STEP) {
|
|
217
239
|
path.idStep = idModifier(path.idStep);
|
|
218
240
|
}
|
|
219
241
|
}
|
|
220
|
-
for (
|
|
242
|
+
for (var _j = 0, _k = step.filters; _j < _k.length; _j++) {
|
|
243
|
+
var filter = _k[_j];
|
|
221
244
|
if (filter.type === EntityValueDataTypes.STEP) {
|
|
222
245
|
filter.idStep = idModifier(filter.idStep);
|
|
223
246
|
}
|
|
224
247
|
}
|
|
225
248
|
}
|
|
226
|
-
for (
|
|
227
|
-
|
|
249
|
+
for (var _l = 0, _m = Object.keys((_a = step.options) !== null && _a !== void 0 ? _a : {}); _l < _m.length; _l++) {
|
|
250
|
+
var idOption = _m[_l];
|
|
251
|
+
var option = step.options[idOption];
|
|
228
252
|
if (option.type === EntityValueOptionTypes.NESTED) {
|
|
229
253
|
handleSteps(option.steps);
|
|
230
254
|
}
|
|
@@ -232,7 +256,7 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
232
256
|
break;
|
|
233
257
|
case CBRFormStepTypes.CBR_LOCATIVAS:
|
|
234
258
|
{
|
|
235
|
-
|
|
259
|
+
var elementStep = step;
|
|
236
260
|
if (elementStep.subStep) {
|
|
237
261
|
if (idModifier)
|
|
238
262
|
elementStep.subStep = idModifier(elementStep.subStep);
|
|
@@ -241,7 +265,7 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
241
265
|
}
|
|
242
266
|
break;
|
|
243
267
|
case AYFFormStepTypes.AYF_ICA_CITY: {
|
|
244
|
-
|
|
268
|
+
var cityStep = step;
|
|
245
269
|
if (cityStep.idNitStep) {
|
|
246
270
|
if (idModifier)
|
|
247
271
|
cityStep.idNitStep = idModifier(cityStep.idNitStep);
|
|
@@ -254,18 +278,21 @@ export const calcSubSteps = (idStep, allSteps, idModifier) => {
|
|
|
254
278
|
}
|
|
255
279
|
return subSteps;
|
|
256
280
|
};
|
|
257
|
-
export
|
|
281
|
+
export var evaluateCondition = function (condition, dependencies, entityValue) {
|
|
282
|
+
var _a, _b, _c;
|
|
258
283
|
switch (condition.type) {
|
|
259
284
|
case ConditionTypes.EXPRESSION: {
|
|
260
285
|
if (condition.expression === ExpressionTypes.OR) {
|
|
261
|
-
for (
|
|
286
|
+
for (var _i = 0, _d = condition.conditions; _i < _d.length; _i++) {
|
|
287
|
+
var subCondition = _d[_i];
|
|
262
288
|
if (evaluateCondition(subCondition, dependencies))
|
|
263
289
|
return true;
|
|
264
290
|
}
|
|
265
291
|
return false;
|
|
266
292
|
}
|
|
267
293
|
else {
|
|
268
|
-
for (
|
|
294
|
+
for (var _e = 0, _f = condition.conditions; _e < _f.length; _e++) {
|
|
295
|
+
var subCondition = _f[_e];
|
|
269
296
|
if (!evaluateCondition(subCondition, dependencies))
|
|
270
297
|
return false;
|
|
271
298
|
}
|
|
@@ -274,14 +301,14 @@ export const evaluateCondition = (condition, dependencies, entityValue) => {
|
|
|
274
301
|
}
|
|
275
302
|
case ConditionTypes.FORM_STEP: {
|
|
276
303
|
if (isFormStepExistance(condition)) {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
if (
|
|
304
|
+
var boolFactor = condition.operator === OperatorTypes.EXISTS;
|
|
305
|
+
var value_1 = dependencies[condition.idStep].value;
|
|
306
|
+
if (value_1)
|
|
280
307
|
return boolFactor;
|
|
281
308
|
return !boolFactor;
|
|
282
309
|
}
|
|
283
|
-
|
|
284
|
-
|
|
310
|
+
var dependency = dependencies[condition.idStep];
|
|
311
|
+
var value_2 = dependencies[condition.idStep].value;
|
|
285
312
|
switch (condition.stepType) {
|
|
286
313
|
// case FormStepTypes.AGENTPICKER:
|
|
287
314
|
// return await evaluateAgentCondition(
|
|
@@ -289,24 +316,25 @@ export const evaluateCondition = (condition, dependencies, entityValue) => {
|
|
|
289
316
|
// value as string[]
|
|
290
317
|
// );
|
|
291
318
|
case FormStepTypes.CHECKBOX: {
|
|
292
|
-
|
|
293
|
-
return
|
|
319
|
+
var boolFactor = condition.operator === OperatorTypes.EQUAL;
|
|
320
|
+
return value_2 === condition.value ? boolFactor : !boolFactor;
|
|
294
321
|
}
|
|
295
322
|
case FormStepTypes.TIMEPICKER: {
|
|
296
|
-
|
|
297
|
-
if (!
|
|
323
|
+
var boolFactor = condition.operator === OperatorTypes.INCLUDES;
|
|
324
|
+
if (!value_2)
|
|
298
325
|
return !boolFactor;
|
|
299
|
-
|
|
300
|
-
|
|
326
|
+
var evaluateCondition_1 = function (condition) {
|
|
327
|
+
var property = condition.property;
|
|
301
328
|
if (property === 'working') {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
329
|
+
var boolFactor_1 = condition.propertyOperator ===
|
|
330
|
+
OperatorTypes.EQUAL;
|
|
331
|
+
if (value_2.working === condition.value) {
|
|
332
|
+
return boolFactor_1;
|
|
305
333
|
}
|
|
306
|
-
return !
|
|
334
|
+
return !boolFactor_1;
|
|
307
335
|
}
|
|
308
336
|
else {
|
|
309
|
-
|
|
337
|
+
var time = value_2;
|
|
310
338
|
switch (condition.propertyOperator) {
|
|
311
339
|
case OperatorTypes.EQUAL: {
|
|
312
340
|
return time[property] === condition.value;
|
|
@@ -315,13 +343,13 @@ export const evaluateCondition = (condition, dependencies, entityValue) => {
|
|
|
315
343
|
return time[property] !== condition.value;
|
|
316
344
|
}
|
|
317
345
|
case OperatorTypes.LESS: {
|
|
318
|
-
|
|
346
|
+
var propValue = time[property];
|
|
319
347
|
if (!propValue)
|
|
320
348
|
return false;
|
|
321
349
|
return propValue < condition.value;
|
|
322
350
|
}
|
|
323
351
|
case OperatorTypes.MORE: {
|
|
324
|
-
|
|
352
|
+
var propValue = time[property];
|
|
325
353
|
if (!propValue)
|
|
326
354
|
return false;
|
|
327
355
|
return propValue > condition.value;
|
|
@@ -332,28 +360,34 @@ export const evaluateCondition = (condition, dependencies, entityValue) => {
|
|
|
332
360
|
}
|
|
333
361
|
}
|
|
334
362
|
};
|
|
335
|
-
return
|
|
363
|
+
return evaluateCondition_1(condition)
|
|
364
|
+
? boolFactor
|
|
365
|
+
: !boolFactor;
|
|
336
366
|
}
|
|
337
367
|
case FormStepTypes.DATEPICKER: {
|
|
338
|
-
if (!(
|
|
368
|
+
if (!(value_2 instanceof Date) || isNaN(value_2.getTime())) {
|
|
339
369
|
return condition.operator === OperatorTypes.NOTEQUAL;
|
|
340
370
|
}
|
|
341
|
-
|
|
371
|
+
var propertyDate = new Date(condition.value);
|
|
342
372
|
switch (condition.operator) {
|
|
343
373
|
case OperatorTypes.EQUAL:
|
|
344
|
-
return
|
|
374
|
+
return (value_2.toUTCString().split('T')[0] ===
|
|
375
|
+
propertyDate.toUTCString().split('T')[0]);
|
|
345
376
|
case OperatorTypes.NOTEQUAL:
|
|
346
|
-
return
|
|
377
|
+
return (value_2.toUTCString().split('T')[0] !==
|
|
378
|
+
propertyDate.toUTCString().split('T')[0]);
|
|
347
379
|
case OperatorTypes.LESS:
|
|
348
|
-
return
|
|
380
|
+
return value_2.getTime() < propertyDate.getTime();
|
|
349
381
|
case OperatorTypes.MORE:
|
|
350
|
-
return
|
|
382
|
+
return value_2.getTime() > propertyDate.getTime();
|
|
351
383
|
default:
|
|
352
384
|
return false;
|
|
353
385
|
}
|
|
354
386
|
}
|
|
355
387
|
case FormStepTypes.SELECTOR: {
|
|
356
|
-
|
|
388
|
+
var val = dependency.type === 'ORIGINAL'
|
|
389
|
+
? value_2
|
|
390
|
+
: (_a = value_2 === null || value_2 === void 0 ? void 0 : value_2.value) !== null && _a !== void 0 ? _a : null;
|
|
357
391
|
if (condition.operator === OperatorTypes.EQUAL) {
|
|
358
392
|
return condition.value === val;
|
|
359
393
|
}
|
|
@@ -363,58 +397,61 @@ export const evaluateCondition = (condition, dependencies, entityValue) => {
|
|
|
363
397
|
}
|
|
364
398
|
case FormStepTypes.TEXTINPUT: {
|
|
365
399
|
if (condition.operator === OperatorTypes.INCLUDES) {
|
|
366
|
-
return
|
|
400
|
+
return (_b = value_2 === null || value_2 === void 0 ? void 0 : value_2.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(condition.value.toLowerCase());
|
|
367
401
|
}
|
|
368
402
|
else if (condition.operator === OperatorTypes.NOTINCLUDES) {
|
|
369
|
-
return !
|
|
403
|
+
return !((_c = value_2 === null || value_2 === void 0 ? void 0 : value_2.toLowerCase()) === null || _c === void 0 ? void 0 : _c.includes(condition.value.toLowerCase()));
|
|
370
404
|
}
|
|
371
405
|
else if (condition.operator === OperatorTypes.EQUAL) {
|
|
372
|
-
return condition.value.toLowerCase() ===
|
|
406
|
+
return (condition.value.toLowerCase() ===
|
|
407
|
+
(value_2 === null || value_2 === void 0 ? void 0 : value_2.toLowerCase()));
|
|
373
408
|
}
|
|
374
409
|
else if (condition.operator === OperatorTypes.NOTEQUAL) {
|
|
375
|
-
return !(condition.value.toLowerCase() ===
|
|
410
|
+
return !(condition.value.toLowerCase() ===
|
|
411
|
+
(value_2 === null || value_2 === void 0 ? void 0 : value_2.toLowerCase()));
|
|
376
412
|
}
|
|
377
413
|
else {
|
|
378
414
|
return false;
|
|
379
415
|
}
|
|
380
416
|
}
|
|
381
417
|
case FormStepTypes.TEXTAREA: {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
for (
|
|
385
|
-
regx +=
|
|
418
|
+
var words = condition.values;
|
|
419
|
+
var regx = "\\b(".concat(words[0].toLowerCase());
|
|
420
|
+
for (var i = 1; i < words.length; i++) {
|
|
421
|
+
regx += "|".concat(words[i].toLowerCase());
|
|
386
422
|
}
|
|
387
423
|
regx += ')\\b';
|
|
388
424
|
if (condition.operator === OperatorTypes.INCLUDES) {
|
|
389
|
-
return
|
|
425
|
+
return (value_2 && new RegExp(regx).test(value_2.toLowerCase()));
|
|
390
426
|
}
|
|
391
427
|
else {
|
|
392
|
-
return !
|
|
428
|
+
return (!value_2 ||
|
|
429
|
+
!new RegExp(regx).test(value_2.toLowerCase()));
|
|
393
430
|
}
|
|
394
431
|
}
|
|
395
432
|
case FormStepTypes.RATING: {
|
|
396
|
-
if (!
|
|
433
|
+
if (!value_2 || isNaN(value_2)) {
|
|
397
434
|
return condition.operator === OperatorTypes.NOTEQUAL;
|
|
398
435
|
}
|
|
399
436
|
switch (condition.operator) {
|
|
400
437
|
case OperatorTypes.EQUAL:
|
|
401
438
|
case OperatorTypes.NOTEQUAL: {
|
|
402
|
-
|
|
403
|
-
if (
|
|
439
|
+
var boolFactor = condition.operator === OperatorTypes.EQUAL;
|
|
440
|
+
if (value_2 === condition.value)
|
|
404
441
|
return boolFactor;
|
|
405
442
|
return !boolFactor;
|
|
406
443
|
}
|
|
407
444
|
case OperatorTypes.LESS:
|
|
408
|
-
return
|
|
445
|
+
return value_2 < condition.value;
|
|
409
446
|
case OperatorTypes.MORE:
|
|
410
|
-
return
|
|
447
|
+
return value_2 > condition.value;
|
|
411
448
|
default:
|
|
412
449
|
return false;
|
|
413
450
|
}
|
|
414
451
|
}
|
|
415
452
|
case FormStepTypes.CLASSIFIER_SELECTOR: {
|
|
416
|
-
|
|
417
|
-
if (value
|
|
453
|
+
var boolFactor = condition.operator === OperatorTypes.EQUAL;
|
|
454
|
+
if ((value_2 === null || value_2 === void 0 ? void 0 : value_2.value) === condition.idValue) {
|
|
418
455
|
//Si op es EQUALS (boolfactor true) evaluará a true
|
|
419
456
|
//Si op es NOTEQUALS (boolfactor false) evaluará a false
|
|
420
457
|
return boolFactor;
|
|
@@ -424,9 +461,10 @@ export const evaluateCondition = (condition, dependencies, entityValue) => {
|
|
|
424
461
|
return !boolFactor;
|
|
425
462
|
}
|
|
426
463
|
case FormStepTypes.ENTITYVALUEPICKER: {
|
|
427
|
-
|
|
428
|
-
for (
|
|
429
|
-
|
|
464
|
+
var boolFactor = condition.operator === OperatorTypes.EQUAL;
|
|
465
|
+
for (var _g = 0, _h = condition.values; _g < _h.length; _g++) {
|
|
466
|
+
var idEntityValue = _h[_g];
|
|
467
|
+
if ((value_2 === null || value_2 === void 0 ? void 0 : value_2._id) === idEntityValue) {
|
|
430
468
|
return boolFactor;
|
|
431
469
|
}
|
|
432
470
|
}
|
|
@@ -438,7 +476,7 @@ export const evaluateCondition = (condition, dependencies, entityValue) => {
|
|
|
438
476
|
break;
|
|
439
477
|
}
|
|
440
478
|
case ConditionTypes.ENTITYVALUE: {
|
|
441
|
-
if (!entityValue
|
|
479
|
+
if (!entityValue || !entityValue.entity)
|
|
442
480
|
return false;
|
|
443
481
|
return evaluateEntityValueCondition(condition, entityValue.entity, entityValue.entityValue);
|
|
444
482
|
}
|
|
@@ -448,14 +486,16 @@ export const evaluateCondition = (condition, dependencies, entityValue) => {
|
|
|
448
486
|
return false;
|
|
449
487
|
};
|
|
450
488
|
function isFormStepExistance(condition) {
|
|
451
|
-
return condition.operator === OperatorTypes.EXISTS ||
|
|
489
|
+
return (condition.operator === OperatorTypes.EXISTS ||
|
|
490
|
+
condition.operator === OperatorTypes.NOTEXISTS);
|
|
452
491
|
}
|
|
453
|
-
|
|
492
|
+
var evaluateEntityValueCondition = function (condition, entity, entityValue) {
|
|
454
493
|
switch (condition.operator) {
|
|
455
494
|
case OperatorTypes.EQUAL:
|
|
456
495
|
case OperatorTypes.NOTEQUAL: {
|
|
457
|
-
|
|
458
|
-
for (
|
|
496
|
+
var boolFactor = condition.operator === OperatorTypes.EQUAL;
|
|
497
|
+
for (var _i = 0, _a = condition.values; _i < _a.length; _i++) {
|
|
498
|
+
var value = _a[_i];
|
|
459
499
|
if (value === entityValue._id) {
|
|
460
500
|
return boolFactor;
|
|
461
501
|
}
|
|
@@ -473,80 +513,87 @@ const evaluateEntityValueCondition = (condition, entity, entityValue) => {
|
|
|
473
513
|
}
|
|
474
514
|
return false;
|
|
475
515
|
};
|
|
476
|
-
|
|
516
|
+
var evaluateEntityPropertyCondition = function (condition, entity, entityValue) {
|
|
517
|
+
var _a, _b, _c;
|
|
477
518
|
if (isEntityPropertyExistance(condition)) {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
if (
|
|
519
|
+
var boolFactor = condition.propertyOperator === OperatorTypes.EXISTS;
|
|
520
|
+
var value_3 = entityValue[condition.idProperty];
|
|
521
|
+
if (value_3 !== undefined) {
|
|
481
522
|
return boolFactor;
|
|
482
523
|
}
|
|
483
524
|
return !boolFactor;
|
|
484
525
|
}
|
|
485
|
-
|
|
526
|
+
var property = entity.steps[condition.idProperty];
|
|
486
527
|
if (!property || property.type !== condition.propertyType) {
|
|
487
528
|
return false;
|
|
488
529
|
}
|
|
489
|
-
|
|
530
|
+
var value = entityValue[condition.idProperty];
|
|
490
531
|
if (value === undefined)
|
|
491
532
|
return false;
|
|
492
533
|
switch (condition.propertyType) {
|
|
493
534
|
case EntityPropertyTypes.CHECKBOX: {
|
|
494
|
-
|
|
535
|
+
var boolFactor = condition.propertyOperator === OperatorTypes.EQUAL;
|
|
495
536
|
if (value === condition.propertyValue) {
|
|
496
537
|
return boolFactor;
|
|
497
538
|
}
|
|
498
539
|
return !boolFactor;
|
|
499
540
|
}
|
|
500
541
|
case EntityPropertyTypes.DATEPICKER: {
|
|
501
|
-
|
|
542
|
+
var date = new Date(value);
|
|
502
543
|
if (!(date instanceof Date) || isNaN(date.getTime())) {
|
|
503
544
|
return condition.propertyOperator === OperatorTypes.NOTEQUAL;
|
|
504
545
|
}
|
|
505
546
|
switch (condition.propertyOperator) {
|
|
506
547
|
case OperatorTypes.EQUAL: {
|
|
507
|
-
|
|
548
|
+
var propertyDate = new Date(condition.propertyValue);
|
|
508
549
|
return date.getTime() === propertyDate.getTime();
|
|
509
550
|
}
|
|
510
551
|
case OperatorTypes.NOTEQUAL: {
|
|
511
|
-
|
|
552
|
+
var propertyDate = new Date(condition.propertyValue);
|
|
512
553
|
return date.getTime() !== propertyDate.getTime();
|
|
513
554
|
}
|
|
514
555
|
case OperatorTypes.LESS: {
|
|
515
|
-
|
|
556
|
+
var propertyDate = new Date(condition.propertyValue);
|
|
516
557
|
return date.getTime() < propertyDate.getTime();
|
|
517
558
|
}
|
|
518
559
|
case OperatorTypes.MORE: {
|
|
519
|
-
|
|
560
|
+
var propertyDate = new Date(condition.propertyValue);
|
|
520
561
|
return date.getTime() > propertyDate.getTime();
|
|
521
562
|
}
|
|
522
563
|
case OperatorTypes.PAST_RELATIVE_LESS:
|
|
523
564
|
case OperatorTypes.PAST_RELATIVE_MORE:
|
|
524
565
|
case OperatorTypes.FUTURE_RELATIVE_LESS:
|
|
525
566
|
case OperatorTypes.FUTURE_RELATIVE_MORE: {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
567
|
+
var date_1 = getRelativeDate((_a = condition.value) === null || _a === void 0 ? void 0 : _a.days, (_b = condition.value) === null || _b === void 0 ? void 0 : _b.hours, (_c = condition.value) === null || _c === void 0 ? void 0 : _c.minutes, condition.propertyOperator ===
|
|
568
|
+
OperatorTypes.PAST_RELATIVE_LESS ||
|
|
569
|
+
condition.propertyOperator ===
|
|
570
|
+
OperatorTypes.PAST_RELATIVE_MORE);
|
|
571
|
+
if (condition.propertyOperator ===
|
|
572
|
+
OperatorTypes.PAST_RELATIVE_LESS ||
|
|
573
|
+
condition.propertyOperator ===
|
|
574
|
+
OperatorTypes.FUTURE_RELATIVE_LESS)
|
|
575
|
+
return new Date(value).getTime() < date_1.getTime();
|
|
531
576
|
else
|
|
532
|
-
return new Date().getTime()
|
|
577
|
+
return new Date(value).getTime() > date_1.getTime();
|
|
533
578
|
}
|
|
579
|
+
default:
|
|
580
|
+
false;
|
|
534
581
|
}
|
|
535
582
|
return false;
|
|
536
583
|
}
|
|
537
584
|
case EntityPropertyTypes.TIMEPICKER: {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
585
|
+
var boolFactor = condition.propertyOperator === OperatorTypes.INCLUDES;
|
|
586
|
+
var evaluateCondition_2 = function (condition) {
|
|
587
|
+
var timeProperty = condition.property;
|
|
541
588
|
if (timeProperty === 'working') {
|
|
542
|
-
|
|
589
|
+
var boolFactor_2 = condition.timePropertyOperator === OperatorTypes.EQUAL;
|
|
543
590
|
if (value.working === condition.value) {
|
|
544
|
-
return
|
|
591
|
+
return boolFactor_2;
|
|
545
592
|
}
|
|
546
|
-
return !
|
|
593
|
+
return !boolFactor_2;
|
|
547
594
|
}
|
|
548
595
|
else {
|
|
549
|
-
|
|
596
|
+
var time = value;
|
|
550
597
|
switch (condition.timePropertyOperator) {
|
|
551
598
|
case OperatorTypes.EQUAL: {
|
|
552
599
|
return time[timeProperty] === condition.value;
|
|
@@ -555,13 +602,13 @@ const evaluateEntityPropertyCondition = (condition, entity, entityValue) => {
|
|
|
555
602
|
return time[timeProperty] !== condition.value;
|
|
556
603
|
}
|
|
557
604
|
case OperatorTypes.LESS: {
|
|
558
|
-
|
|
605
|
+
var propValue = time[timeProperty];
|
|
559
606
|
if (!propValue)
|
|
560
607
|
return false;
|
|
561
608
|
return propValue < condition.value;
|
|
562
609
|
}
|
|
563
610
|
case OperatorTypes.MORE: {
|
|
564
|
-
|
|
611
|
+
var propValue = time[timeProperty];
|
|
565
612
|
if (!propValue)
|
|
566
613
|
return false;
|
|
567
614
|
return propValue > condition.value;
|
|
@@ -572,17 +619,17 @@ const evaluateEntityPropertyCondition = (condition, entity, entityValue) => {
|
|
|
572
619
|
}
|
|
573
620
|
}
|
|
574
621
|
};
|
|
575
|
-
return
|
|
622
|
+
return evaluateCondition_2(condition) ? boolFactor : !boolFactor;
|
|
576
623
|
}
|
|
577
624
|
case EntityPropertyTypes.SELECTOR:
|
|
578
625
|
case EntityPropertyTypes.TEXTAREA:
|
|
579
626
|
case EntityPropertyTypes.TEXTINPUT: {
|
|
580
627
|
if (condition.propertyOperator === OperatorTypes.INCLUDES ||
|
|
581
628
|
condition.propertyOperator === OperatorTypes.NOTINCLUDES) {
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
for (
|
|
585
|
-
regx +=
|
|
629
|
+
var words = condition.propertyValues;
|
|
630
|
+
var regx = "\\b(".concat(words[0].toLowerCase());
|
|
631
|
+
for (var i = 1; i < words.length; i++) {
|
|
632
|
+
regx += "|".concat(words[i].toLowerCase());
|
|
586
633
|
}
|
|
587
634
|
regx += ')\\b';
|
|
588
635
|
if (condition.propertyOperator === OperatorTypes.INCLUDES) {
|
|
@@ -594,10 +641,12 @@ const evaluateEntityPropertyCondition = (condition, entity, entityValue) => {
|
|
|
594
641
|
/** For Inputs and Selectors */
|
|
595
642
|
}
|
|
596
643
|
else if (condition.propertyOperator === OperatorTypes.EQUAL) {
|
|
597
|
-
return condition.propertyValue.toLowerCase() ===
|
|
644
|
+
return (condition.propertyValue.toLowerCase() ===
|
|
645
|
+
value.toLowerCase());
|
|
598
646
|
}
|
|
599
647
|
else if (condition.propertyOperator === OperatorTypes.NOTEQUAL) {
|
|
600
|
-
return !(condition.propertyValue.toLowerCase() ===
|
|
648
|
+
return !(condition.propertyValue.toLowerCase() ===
|
|
649
|
+
value.toLowerCase());
|
|
601
650
|
}
|
|
602
651
|
return false;
|
|
603
652
|
}
|
|
@@ -607,9 +656,15 @@ const evaluateEntityPropertyCondition = (condition, entity, entityValue) => {
|
|
|
607
656
|
return false;
|
|
608
657
|
};
|
|
609
658
|
function isEntityPropertyExistance(condition) {
|
|
610
|
-
return (condition.propertyOperator === OperatorTypes.EXISTS ||
|
|
659
|
+
return (condition.propertyOperator === OperatorTypes.EXISTS ||
|
|
660
|
+
condition.propertyOperator === OperatorTypes.NOTEXISTS);
|
|
611
661
|
}
|
|
612
|
-
export function getRelativeDate(nDays
|
|
613
|
-
|
|
662
|
+
export function getRelativeDate(nDays, nHours, nMinutes, subtract, date) {
|
|
663
|
+
if (nDays === void 0) { nDays = 0; }
|
|
664
|
+
if (nHours === void 0) { nHours = 0; }
|
|
665
|
+
if (nMinutes === void 0) { nMinutes = 0; }
|
|
666
|
+
if (subtract === void 0) { subtract = false; }
|
|
667
|
+
if (date === void 0) { date = new Date(); }
|
|
668
|
+
var millis = nDays * 86400000 + nHours * 3600000 + nMinutes * 60000;
|
|
614
669
|
return new Date(date.getTime() + (subtract ? -millis : millis));
|
|
615
670
|
}
|