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