@beinformed/ui 1.31.0 → 1.31.3
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/CHANGELOG.md +20 -0
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/hooks/useAllFormsOnModel.js.map +1 -1
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useContent.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useI18n.js.map +1 -1
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/hooks/useNotification.js.map +1 -1
- package/esm/hooks/usePreference.js +8 -2
- package/esm/hooks/usePreference.js.map +1 -1
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/withMessage.js.map +1 -1
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js +8 -0
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/esm/models/base/BaseCollection.js.map +1 -1
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/content/SubSectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorCollection.js.map +1 -1
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/paging/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/modularui/CaptchaRequest.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/UploadRequest.js.map +1 -1
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/client.js +1 -0
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/createSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/I18nActions.js.map +1 -1
- package/esm/redux/_i18n/I18nReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/RouterActions.js.map +1 -1
- package/esm/redux/_router/RouterConnectors.js.map +1 -1
- package/esm/redux/_router/RouterReducer.js.map +1 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/ProgressIndicator.js.map +1 -1
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/Modal.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/Notification.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/Progress.js.map +1 -1
- package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/esm/utils/fetch/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/helpers/text.js.map +1 -1
- package/esm/utils/number/DecimalFormat.js.map +1 -1
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/builder/__tests__/mergeLayoutHintConfigurations.spec.js.flow +4 -4
- package/lib/builder/mergeLayoutHintConfigurations.js.flow +3 -3
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/LayoutHints.js.flow +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js.flow +2 -2
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/FetchException.js.flow +2 -2
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/NetworkException.js.flow +1 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js.flow +1 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/hooks/__tests__/UseModularUIModel.spec.js.flow +9 -9
- package/lib/hooks/__tests__/useAuthentication.spec.js.flow +2 -2
- package/lib/hooks/__tests__/useForm.spec.js.flow +2 -2
- package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +7 -7
- package/lib/hooks/__tests__/useModularUIBasic.spec.js.flow +2 -2
- package/lib/hooks/__tests__/usePreference.spec.js.flow +1 -1
- package/lib/hooks/useAllFormsOnModel.js.flow +2 -2
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js.flow +2 -2
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.flow +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.flow +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.flow +4 -4
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.flow +3 -3
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.flow +2 -2
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.flow +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModularUI.js.flow +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.flow +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.flow +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.flow +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.flow +2 -2
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js +8 -2
- package/lib/hooks/usePreference.js.flow +17 -7
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/i18n/Locale.js.flow +4 -4
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.flow +8 -8
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.flow +2 -2
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/__tests__/Locale.spec.js.flow +3 -3
- package/lib/i18n/__tests__/Locales.spec.js.flow +15 -13
- package/lib/i18n/withMessage.js.flow +4 -4
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/actions/ActionCollection.js.flow +4 -4
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js.flow +4 -4
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/actions/__tests__/ActionCollection.spec.js.flow +3 -3
- package/lib/models/actions/__tests__/ActionModel.spec.js.flow +1 -1
- package/lib/models/application/ApplicationModel.js.flow +3 -3
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.flow +7 -7
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.flow +9 -9
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.flow +9 -9
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.flow +24 -24
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.flow +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.flow +4 -4
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.flow +7 -7
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.flow +15 -15
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +8 -0
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.flow +19 -11
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +10 -10
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.flow +7 -7
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.flow +6 -6
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.flow +9 -9
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js.flow +8 -8
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.flow +3 -3
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js.flow +5 -5
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/__tests__/AttributeCollection.spec.js.flow +11 -11
- package/lib/models/attributes/__tests__/AttributeContent.spec.js.flow +7 -7
- package/lib/models/attributes/__tests__/AttributeModel.spec.js.flow +5 -5
- package/lib/models/attributes/__tests__/AttributeSetModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/BooleanAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/ChoiceAttributeModel.spec.js.flow +8 -8
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js.flow +8 -8
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/DateAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/DatetimeAttributeModel.spec.js.flow +11 -11
- package/lib/models/attributes/__tests__/HelptextAttributeModel.spec.js.flow +3 -3
- package/lib/models/attributes/__tests__/MemoAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/MoneyAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/NumberAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/PasswordAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/StringAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/TimeAttributeModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/TimestampModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/UploadAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/_createAttribute.spec.js.flow +6 -6
- package/lib/models/attributes/__tests__/createAttributeComposite.spec.js.flow +3 -3
- package/lib/models/attributes/__tests__/createAttributeDynamicSchema.spec.js.flow +3 -3
- package/lib/models/attributes/_createAttribute.js.flow +5 -5
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.flow +5 -5
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.flow +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.flow +6 -6
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.flow +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.flow +6 -6
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.flow +2 -2
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.flow +2 -2
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js.flow +1 -1
- package/lib/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js.flow +6 -6
- package/lib/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js.flow +5 -5
- package/lib/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js.flow +6 -6
- package/lib/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js.flow +3 -3
- package/lib/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js.flow +1 -1
- package/lib/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js.flow +4 -4
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +4 -4
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.flow +15 -15
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.flow +2 -2
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.flow +2 -2
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js.flow +22 -22
- package/lib/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js.flow +1 -1
- package/lib/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js.flow +4 -4
- package/lib/models/base/BaseCollection.js.flow +6 -6
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.flow +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceModel.js.flow +5 -5
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/base/__tests__/ResourceCollection.spec.js.flow +1 -1
- package/lib/models/caseview/CaseViewModel.js.flow +4 -4
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +3 -3
- package/lib/models/concepts/BusinessScenarioModel.js.flow +9 -9
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.flow +17 -17
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js.flow +2 -2
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.flow +6 -4
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js.flow +5 -5
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js.flow +2 -2
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.flow +2 -2
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/concepts/__tests__/ConceptDetailModel.spec.js.flow +1 -1
- package/lib/models/content/ContentIndexModel.js.flow +3 -3
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.flow +11 -9
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js.flow +2 -2
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.flow +4 -4
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.flow +4 -4
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.flow +2 -2
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/content/__tests__/ContentModel.spec.js.flow +16 -16
- package/lib/models/contentconfiguration/ContentConfiguration.js.flow +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.flow +5 -5
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.flow +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.flow +2 -2
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js.flow +12 -12
- package/lib/models/detail/DetailModel.js.flow +5 -5
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js.flow +4 -4
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js.flow +1 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/__tests__/ErrorModel.spec.js.flow +1 -1
- package/lib/models/filters/AssignmentFilterModel.js.flow +3 -3
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.flow +3 -3
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js.flow +5 -5
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/__tests__/AssignmentFilterModel.spec.js.flow +4 -4
- package/lib/models/filters/__tests__/FilterCollection.spec.js.flow +11 -11
- package/lib/models/filters/__tests__/FilterModel.spec.js.flow +1 -1
- package/lib/models/filters/__tests__/RangeFilterModel.spec.js.flow +1 -1
- package/lib/models/form/FormModel.js.flow +39 -39
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.flow +16 -16
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/form/__tests__/FormModel.instrument.spec.js.flow +7 -7
- package/lib/models/form/__tests__/FormModel.repeating.spec.js.flow +2 -2
- package/lib/models/form/__tests__/FormModel.selfhref.spec.js.flow +1 -1
- package/lib/models/form/__tests__/FormModel.spec.js.flow +6 -6
- package/lib/models/form/__tests__/FormResultData.spec.js.flow +1 -1
- package/lib/models/form/__tests__/FormWithContent.spec.js.flow +3 -3
- package/lib/models/grouping/GroupingModel.js.flow +7 -7
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/grouping/__tests__/GroupingModel.spec.js.flow +2 -2
- package/lib/models/href/Href.js.flow +6 -6
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/__tests__/Href.spec.js.flow +18 -16
- package/lib/models/layouthint/LayoutHintCollection.js.flow +3 -3
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.flow +4 -4
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.flow +3 -3
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/__tests__/LinkModel.spec.js.flow +4 -4
- package/lib/models/links/normalizeLinkJSON.js.flow +6 -6
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.flow +7 -7
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.flow +2 -2
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js.flow +2 -2
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js.flow +6 -6
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListDetailModel.spec.js.flow +4 -4
- package/lib/models/list/__tests__/ListItemCollection.spec.js.flow +1 -1
- package/lib/models/list/__tests__/ListModel.spec.js.flow +3 -3
- package/lib/models/list/__tests__/ListResultDetail.spec.js.flow +3 -3
- package/lib/models/lookup/LookupOptionCollection.js.flow +1 -1
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js.flow +4 -4
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/lookup/__tests__/LookupOptionsModel.spec.js.flow +3 -3
- package/lib/models/modelcatalog/ModelCatalogModel.js.flow +2 -2
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.flow +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/paging/__tests__/PagingModel.spec.js.flow +2 -2
- package/lib/models/panels/GroupingPanelModel.js.flow +5 -5
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +8 -8
- package/lib/models/parameter/__tests__/Parameter.spec.js.flow +5 -5
- package/lib/models/process/ProcessStatusSettingsModel.js.flow +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/process/__tests__/ProcessStatusSettingsModel.spec.js.flow +1 -1
- package/lib/models/resolveModel.js.flow +4 -4
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.flow +4 -4
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/sorting/__tests__/SortingModel.spec.js.flow +3 -3
- package/lib/models/tab/TabModel.js.flow +3 -3
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/tab/__tests__/TabModel.spec.js.flow +5 -5
- package/lib/models/taskgroup/TaskGroupModel.js.flow +2 -2
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/types.js.flow +1 -1
- package/lib/models/types.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.flow +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/__tests__/UserModel.spec.js.flow +2 -2
- package/lib/models/user/__tests__/UserProfileModel.spec.js.flow +2 -2
- package/lib/models/user/__tests__/UserServicesModel.spec.js.flow +1 -1
- package/lib/modularui/CaptchaRequest.js.flow +1 -1
- package/lib/modularui/CaptchaRequest.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.flow +26 -26
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/UploadRequest.js.flow +6 -6
- package/lib/modularui/UploadRequest.js.map +1 -1
- package/lib/modularui/__tests__/ModularUIError.spec.js.flow +1 -1
- package/lib/modularui/__tests__/ModularUIRequest.spec.js.flow +9 -9
- package/lib/react/utils.js.flow +1 -1
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/client.js +1 -0
- package/lib/react-client/client.js.flow +11 -10
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.js.flow +2 -2
- package/lib/react-client/contextPath.js.map +1 -1
- package/lib/react-client/rehydrate.js.flow +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +2 -2
- package/lib/react-server/createSSRComplete.js.flow +3 -3
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.flow +4 -4
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.flow +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js.flow +2 -2
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverUtil.js.flow +8 -8
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/__tests__/createTheme.spec.js.flow +4 -4
- package/lib/react-theme/createTheme.js.flow +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/utils/__tests__/background.spec.js.flow +2 -2
- package/lib/react-theme/utils/__tests__/contrast.spec.js.flow +1 -1
- package/lib/react-theme/utils/__tests__/corners.spec.js.flow +3 -3
- package/lib/react-theme/utils/__tests__/spacers.spec.js.flow +1 -1
- package/lib/react-theme/utils/__tests__/themeProps.spec.js.flow +9 -9
- package/lib/react-theme/utils/colors.js.flow +3 -3
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.flow +6 -6
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.flow +2 -2
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.flow +2 -2
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.flow +8 -8
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/I18nActions.js.flow +1 -1
- package/lib/redux/_i18n/I18nActions.js.map +1 -1
- package/lib/redux/_i18n/I18nReducer.js.flow +2 -2
- package/lib/redux/_i18n/I18nReducer.js.map +1 -1
- package/lib/redux/_i18n/__tests__/reducer.spec.js.flow +2 -2
- package/lib/redux/_modularui/ModularUIActions.js.flow +8 -8
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIConnector.js.flow +4 -4
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/lib/redux/_modularui/ModularUIMiddleware.js.flow +6 -6
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/lib/redux/_modularui/ModularUIReducer.js.flow +5 -5
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUISelectors.js.flow +11 -11
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.flow +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/lib/redux/_modularui/__tests__/actions.spec.js.flow +1 -1
- package/lib/redux/_modularui/__tests__/reducer.spec.js.flow +13 -13
- package/lib/redux/_modularui/__tests__/selectors.spec.js.flow +3 -3
- package/lib/redux/_modularui/types.js.flow +4 -4
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.flow +3 -3
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/RouterActions.js.flow +3 -3
- package/lib/redux/_router/RouterActions.js.map +1 -1
- package/lib/redux/_router/RouterConnectors.js.flow +5 -5
- package/lib/redux/_router/RouterConnectors.js.map +1 -1
- package/lib/redux/_router/RouterReducer.js.flow +1 -1
- package/lib/redux/_router/RouterReducer.js.map +1 -1
- package/lib/redux/_router/__tests__/reducer.spec.js.flow +2 -2
- package/lib/redux/actions/Application.js.flow +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.flow +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.flow +3 -3
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.flow +2 -2
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.flow +3 -3
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.flow +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.flow +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.flow +3 -3
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Notification.js.flow +4 -4
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js.flow +11 -11
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js.flow +1 -1
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js.flow +3 -3
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/__tests__/Authorization.spec.js.flow +2 -2
- package/lib/redux/actions/__tests__/Error-server.spec.js.flow +13 -13
- package/lib/redux/actions/__tests__/Error.spec.js.flow +6 -6
- package/lib/redux/actions/__tests__/Notification.spec.js.flow +1 -1
- package/lib/redux/actions/__tests__/Preferences.spec.js.flow +2 -2
- package/lib/redux/connectors/Application.js.flow +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js.flow +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.flow +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.flow +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.flow +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.flow +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.flow +2 -2
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.flow +5 -5
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.flow +6 -6
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.flow +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.flow +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.flow +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.flow +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.flow +2 -2
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.flow +3 -3
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.flow +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.flow +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.flow +2 -2
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js.flow +1 -1
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js.flow +1 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.flow +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js.flow +1 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js.flow +1 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js.flow +1 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js.flow +1 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js.flow +1 -1
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.flow +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/__tests__/AuthReducer.spec.js.flow +10 -10
- package/lib/redux/reducers/__tests__/ErrorReducer.spec.js.flow +1 -1
- package/lib/redux/reducers/__tests__/ModalsReducer.spec.js.flow +3 -3
- package/lib/redux/reducers/__tests__/NotificationReducer.spec.js.flow +3 -3
- package/lib/redux/reducers/__tests__/PreferencesReducer.spec.js.flow +2 -2
- package/lib/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js.flow +8 -8
- package/lib/redux/store/beforeRenderHooks.js.flow +1 -1
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js.flow +3 -3
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/browser/Cookies.js.flow +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/browser/__tests__/Cookies.spec.js.flow +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.flow +15 -15
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/datetime/__tests__/DateTime.spec.js.flow +84 -81
- package/lib/utils/fetch/__tests__/xhr.spec.js.flow +2 -2
- package/lib/utils/fetch/universalFetch.js.flow +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.flow +6 -6
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/__tests__/sanitizeHTML.spec.js.flow +8 -8
- package/lib/utils/helpers/sanitizeHtml.js.flow +3 -3
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.flow +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js.flow +2 -2
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/__tests__/formatValue.spec.js.flow +1 -1
- package/lib/utils/number/formatValue.js.flow +2 -2
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.flow +7 -7
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +20 -20
- package/src/builder/__tests__/mergeLayoutHintConfigurations.spec.js +4 -4
- package/src/builder/mergeLayoutHintConfigurations.js +3 -3
- package/src/constants/LayoutHints.js +1 -1
- package/src/constants/Settings.js +2 -2
- package/src/exceptions/FetchException.js +2 -2
- package/src/exceptions/NetworkException.js +1 -1
- package/src/exceptions/UnauthorizedException.js +1 -1
- package/src/hooks/__tests__/UseModularUIModel.spec.js +9 -9
- package/src/hooks/__tests__/useAuthentication.spec.js +2 -2
- package/src/hooks/__tests__/useForm.spec.js +2 -2
- package/src/hooks/__tests__/useModelCatalog.spec.js +7 -7
- package/src/hooks/__tests__/useModularUIBasic.spec.js +2 -2
- package/src/hooks/__tests__/usePreference.spec.js +1 -1
- package/src/hooks/useAllFormsOnModel.js +2 -2
- package/src/hooks/useAuthentication.js +2 -2
- package/src/hooks/useContent.js +1 -1
- package/src/hooks/useDeepCompareEffect.js +1 -1
- package/src/hooks/useForm.js +4 -4
- package/src/hooks/useI18n.js +3 -3
- package/src/hooks/useModal.js +2 -2
- package/src/hooks/useModelCatalog.js +1 -1
- package/src/hooks/useModularUI.js +1 -1
- package/src/hooks/useModularUIBasic.js +1 -1
- package/src/hooks/useModularUIModel.js +1 -1
- package/src/hooks/useModularUIRequest.js +1 -1
- package/src/hooks/useNotification.js +2 -2
- package/src/hooks/usePreference.js +17 -7
- package/src/i18n/Locale.js +4 -4
- package/src/i18n/Locales.js +8 -8
- package/src/i18n/Message.js +2 -2
- package/src/i18n/__tests__/Locale.spec.js +3 -3
- package/src/i18n/__tests__/Locales.spec.js +15 -13
- package/src/i18n/withMessage.js +4 -4
- package/src/models/actions/ActionCollection.js +4 -4
- package/src/models/actions/ActionModel.js +4 -4
- package/src/models/actions/__tests__/ActionCollection.spec.js +3 -3
- package/src/models/actions/__tests__/ActionModel.spec.js +1 -1
- package/src/models/application/ApplicationModel.js +3 -3
- package/src/models/attributes/AttributeCollection.js +7 -7
- package/src/models/attributes/AttributeContent.js +9 -9
- package/src/models/attributes/AttributeDataHelper.js +9 -9
- package/src/models/attributes/AttributeModel.js +24 -24
- package/src/models/attributes/AttributeSetModel.js +1 -1
- package/src/models/attributes/BooleanAttributeModel.js +4 -4
- package/src/models/attributes/ChoiceAttributeModel.js +7 -7
- package/src/models/attributes/ChoiceAttributeOptionCollection.js +15 -15
- package/src/models/attributes/ChoiceAttributeOptionModel.js +19 -11
- package/src/models/attributes/CompositeAttributeChildCollection.js +10 -10
- package/src/models/attributes/CompositeAttributeModel.js +7 -7
- package/src/models/attributes/DatetimeAttributeModel.js +6 -6
- package/src/models/attributes/NumberAttributeModel.js +9 -9
- package/src/models/attributes/PasswordAttributeModel.js +8 -8
- package/src/models/attributes/StringAttributeModel.js +3 -3
- package/src/models/attributes/UploadAttributeModel.js +5 -5
- package/src/models/attributes/__tests__/AttributeCollection.spec.js +11 -11
- package/src/models/attributes/__tests__/AttributeContent.spec.js +7 -7
- package/src/models/attributes/__tests__/AttributeModel.spec.js +5 -5
- package/src/models/attributes/__tests__/AttributeSetModel.spec.js +2 -2
- package/src/models/attributes/__tests__/BooleanAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/ChoiceAttributeModel.spec.js +8 -8
- package/src/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js +8 -8
- package/src/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js +1 -1
- package/src/models/attributes/__tests__/DateAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/DatetimeAttributeModel.spec.js +11 -11
- package/src/models/attributes/__tests__/HelptextAttributeModel.spec.js +3 -3
- package/src/models/attributes/__tests__/MemoAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/MoneyAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/NumberAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/PasswordAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/StringAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/TimeAttributeModel.spec.js +2 -2
- package/src/models/attributes/__tests__/TimestampModel.spec.js +2 -2
- package/src/models/attributes/__tests__/UploadAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/_createAttribute.spec.js +6 -6
- package/src/models/attributes/__tests__/createAttributeComposite.spec.js +3 -3
- package/src/models/attributes/__tests__/createAttributeDynamicSchema.spec.js +3 -3
- package/src/models/attributes/_createAttribute.js +5 -5
- package/src/models/attributes/input-constraints/ConstraintCollection.js +5 -5
- package/src/models/attributes/input-constraints/ConstraintModel.js +1 -1
- package/src/models/attributes/input-constraints/DateBoundaryConstraint.js +6 -6
- package/src/models/attributes/input-constraints/MandatoryConstraint.js +1 -1
- package/src/models/attributes/input-constraints/NumberBoundaryConstraint.js +6 -6
- package/src/models/attributes/input-constraints/NumberFormatConstraint.js +2 -2
- package/src/models/attributes/input-constraints/NumberGroupingConstraint.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js +1 -1
- package/src/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js +6 -6
- package/src/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js +5 -5
- package/src/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js +6 -6
- package/src/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js +3 -3
- package/src/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js +1 -1
- package/src/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js +4 -4
- package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +4 -4
- package/src/models/attributes/layouthint-rules/DependentAttribute.js +15 -15
- package/src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +2 -2
- package/src/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +2 -2
- package/src/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js +22 -22
- package/src/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js +1 -1
- package/src/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js +4 -4
- package/src/models/base/BaseCollection.js +6 -6
- package/src/models/base/BaseModel.js +1 -1
- package/src/models/base/ResourceModel.js +5 -5
- package/src/models/base/__tests__/ResourceCollection.spec.js +1 -1
- package/src/models/caseview/CaseViewModel.js +4 -4
- package/src/models/caseview/__tests__/CaseViewModel.spec.js +3 -3
- package/src/models/concepts/BusinessScenarioModel.js +9 -9
- package/src/models/concepts/ConceptDetailModel.js +17 -17
- package/src/models/concepts/ConceptIndexModel.js +2 -2
- package/src/models/concepts/ConceptLinkModel.js +6 -4
- package/src/models/concepts/ConceptRelationCollection.js +5 -5
- package/src/models/concepts/SourceReferenceCollection.js +2 -2
- package/src/models/concepts/SourceReferenceModel.js +2 -2
- package/src/models/concepts/__tests__/ConceptDetailModel.spec.js +1 -1
- package/src/models/content/ContentIndexModel.js +3 -3
- package/src/models/content/ContentLinkModel.js +11 -9
- package/src/models/content/ContentModel.js +2 -2
- package/src/models/content/ContentTOCModel.js +4 -4
- package/src/models/content/SectionModel.js +4 -4
- package/src/models/content/SubSectionModel.js +2 -2
- package/src/models/content/__tests__/ContentModel.spec.js +16 -16
- package/src/models/contentconfiguration/ContentConfiguration.js +1 -1
- package/src/models/contentconfiguration/ContentConfigurationElements.js +5 -5
- package/src/models/contentconfiguration/ContentConfigurationEndResults.js +1 -1
- package/src/models/contentconfiguration/ContentConfigurationQuestions.js +2 -2
- package/src/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js +12 -12
- package/src/models/detail/DetailModel.js +5 -5
- package/src/models/error/ErrorCollection.js +4 -4
- package/src/models/error/ErrorModel.js +1 -1
- package/src/models/error/__tests__/ErrorModel.spec.js +1 -1
- package/src/models/filters/AssignmentFilterModel.js +3 -3
- package/src/models/filters/BaseFilterModel.js +3 -3
- package/src/models/filters/FilterCollection.js +5 -5
- package/src/models/filters/__tests__/AssignmentFilterModel.spec.js +4 -4
- package/src/models/filters/__tests__/FilterCollection.spec.js +11 -11
- package/src/models/filters/__tests__/FilterModel.spec.js +1 -1
- package/src/models/filters/__tests__/RangeFilterModel.spec.js +1 -1
- package/src/models/form/FormModel.js +39 -39
- package/src/models/form/FormObjectModel.js +16 -16
- package/src/models/form/__tests__/FormModel.instrument.spec.js +7 -7
- package/src/models/form/__tests__/FormModel.repeating.spec.js +2 -2
- package/src/models/form/__tests__/FormModel.selfhref.spec.js +1 -1
- package/src/models/form/__tests__/FormModel.spec.js +6 -6
- package/src/models/form/__tests__/FormResultData.spec.js +1 -1
- package/src/models/form/__tests__/FormWithContent.spec.js +3 -3
- package/src/models/grouping/GroupingModel.js +7 -7
- package/src/models/grouping/__tests__/GroupingModel.spec.js +2 -2
- package/src/models/href/Href.js +6 -6
- package/src/models/href/__tests__/Href.spec.js +18 -16
- package/src/models/layouthint/LayoutHintCollection.js +3 -3
- package/src/models/links/LinkCollection.js +4 -4
- package/src/models/links/LinkModel.js +3 -3
- package/src/models/links/__tests__/LinkModel.spec.js +4 -4
- package/src/models/links/normalizeLinkJSON.js +6 -6
- package/src/models/list/ListDetailModel.js +7 -7
- package/src/models/list/ListItemCollection.js +2 -2
- package/src/models/list/ListItemModel.js +2 -2
- package/src/models/list/ListModel.js +6 -6
- package/src/models/list/__tests__/ListDetailModel.spec.js +4 -4
- package/src/models/list/__tests__/ListItemCollection.spec.js +1 -1
- package/src/models/list/__tests__/ListModel.spec.js +3 -3
- package/src/models/list/__tests__/ListResultDetail.spec.js +3 -3
- package/src/models/lookup/LookupOptionCollection.js +1 -1
- package/src/models/lookup/LookupOptionsModel.js +4 -4
- package/src/models/lookup/__tests__/LookupOptionsModel.spec.js +3 -3
- package/src/models/modelcatalog/ModelCatalogModel.js +2 -2
- package/src/models/paging/PagingModel.js +1 -1
- package/src/models/paging/__tests__/PagingModel.spec.js +2 -2
- package/src/models/panels/GroupingPanelModel.js +5 -5
- package/src/models/panels/__tests__/GroupingPanelModel.spec.js +8 -8
- package/src/models/parameter/__tests__/Parameter.spec.js +5 -5
- package/src/models/process/ProcessStatusSettingsModel.js +1 -1
- package/src/models/process/__tests__/ProcessStatusSettingsModel.spec.js +1 -1
- package/src/models/resolveModel.js +4 -4
- package/src/models/sorting/SortingModel.js +4 -4
- package/src/models/sorting/__tests__/SortingModel.spec.js +3 -3
- package/src/models/tab/TabModel.js +3 -3
- package/src/models/tab/__tests__/TabModel.spec.js +5 -5
- package/src/models/taskgroup/TaskGroupModel.js +2 -2
- package/src/models/types.js +1 -1
- package/src/models/user/UserProfileModel.js +1 -1
- package/src/models/user/__tests__/UserModel.spec.js +2 -2
- package/src/models/user/__tests__/UserProfileModel.spec.js +2 -2
- package/src/models/user/__tests__/UserServicesModel.spec.js +1 -1
- package/src/modularui/CaptchaRequest.js +1 -1
- package/src/modularui/ModularUIRequest.js +26 -26
- package/src/modularui/UploadRequest.js +6 -6
- package/src/modularui/__tests__/ModularUIError.spec.js +1 -1
- package/src/modularui/__tests__/ModularUIRequest.spec.js +9 -9
- package/src/react/utils.js +1 -1
- package/src/react-client/client.js +11 -10
- package/src/react-client/contextPath.js +2 -2
- package/src/react-client/rehydrate.js +1 -1
- package/src/react-server/__tests__/serverUtil.spec.js +2 -2
- package/src/react-server/createSSRComplete.js +3 -3
- package/src/react-server/renderSSRComplete.js +4 -4
- package/src/react-server/renderSSRMinimal.js +1 -1
- package/src/react-server/requestInformation.js +2 -2
- package/src/react-server/serverUtil.js +8 -8
- package/src/react-theme/__tests__/createTheme.spec.js +4 -4
- package/src/react-theme/createTheme.js +1 -1
- package/src/react-theme/utils/__tests__/background.spec.js +2 -2
- package/src/react-theme/utils/__tests__/contrast.spec.js +1 -1
- package/src/react-theme/utils/__tests__/corners.spec.js +3 -3
- package/src/react-theme/utils/__tests__/spacers.spec.js +1 -1
- package/src/react-theme/utils/__tests__/themeProps.spec.js +9 -9
- package/src/react-theme/utils/colors.js +3 -3
- package/src/react-theme/utils/contrast.js +6 -6
- package/src/react-theme/utils/corners.js +2 -2
- package/src/react-theme/utils/spacers.js +2 -2
- package/src/react-theme/utils/themeProps.js +8 -8
- package/src/redux/_i18n/I18nActions.js +1 -1
- package/src/redux/_i18n/I18nReducer.js +2 -2
- package/src/redux/_i18n/__tests__/reducer.spec.js +2 -2
- package/src/redux/_modularui/ModularUIActions.js +8 -8
- package/src/redux/_modularui/ModularUIConnector.js +4 -4
- package/src/redux/_modularui/ModularUIMiddleware.js +6 -6
- package/src/redux/_modularui/ModularUIReducer.js +5 -5
- package/src/redux/_modularui/ModularUISelectors.js +11 -11
- package/src/redux/_modularui/ModularUIUtils.js +1 -1
- package/src/redux/_modularui/__tests__/actions.spec.js +1 -1
- package/src/redux/_modularui/__tests__/reducer.spec.js +13 -13
- package/src/redux/_modularui/__tests__/selectors.spec.js +3 -3
- package/src/redux/_modularui/types.js +4 -4
- package/src/redux/_modularui/withModularUI.js +3 -3
- package/src/redux/_router/RouterActions.js +3 -3
- package/src/redux/_router/RouterConnectors.js +5 -5
- package/src/redux/_router/RouterReducer.js +1 -1
- package/src/redux/_router/__tests__/reducer.spec.js +2 -2
- package/src/redux/actions/Application.js +1 -1
- package/src/redux/actions/Authorization.js +1 -1
- package/src/redux/actions/Error.js +3 -3
- package/src/redux/actions/FormAttributeSet.js +2 -2
- package/src/redux/actions/FormAttributeSetRepeatable.js +3 -3
- package/src/redux/actions/FormAutosave.js +1 -1
- package/src/redux/actions/FormAutosubmit.js +1 -1
- package/src/redux/actions/FormValidations.js +3 -3
- package/src/redux/actions/Notification.js +4 -4
- package/src/redux/actions/Preferences.js +11 -11
- package/src/redux/actions/ProgressIndicator.js +1 -1
- package/src/redux/actions/SignIn.js +3 -3
- package/src/redux/actions/__tests__/Authorization.spec.js +2 -2
- package/src/redux/actions/__tests__/Error-server.spec.js +13 -13
- package/src/redux/actions/__tests__/Error.spec.js +6 -6
- package/src/redux/actions/__tests__/Notification.spec.js +1 -1
- package/src/redux/actions/__tests__/Preferences.spec.js +2 -2
- package/src/redux/connectors/Application.js +1 -1
- package/src/redux/connectors/Breadcrumb.js +1 -1
- package/src/redux/connectors/CaseView.js +1 -1
- package/src/redux/connectors/ConceptDetail.js +1 -1
- package/src/redux/connectors/ContentBrowser.js +1 -1
- package/src/redux/connectors/ContentDetail.js +1 -1
- package/src/redux/connectors/ContentDetailSection.js +2 -2
- package/src/redux/connectors/Form.js +5 -5
- package/src/redux/connectors/FormAttributeSet.js +6 -6
- package/src/redux/connectors/ListDetail.js +1 -1
- package/src/redux/connectors/Modal.js +1 -1
- package/src/redux/connectors/ModelCatalog.js +1 -1
- package/src/redux/connectors/Notification.js +1 -1
- package/src/redux/connectors/PanelRenderer.js +2 -2
- package/src/redux/connectors/Preferences.js +3 -3
- package/src/redux/connectors/Progress.js +1 -1
- package/src/redux/connectors/ProgressIndicator.js +1 -1
- package/src/redux/connectors/QuickSearch.js +2 -2
- package/src/redux/connectors/SignIn.js +1 -1
- package/src/redux/connectors/SignOut.js +1 -1
- package/src/redux/connectors/Tab.js +1 -1
- package/src/redux/reducers/AuthReducer.js +1 -1
- package/src/redux/reducers/ErrorReducer.js +1 -1
- package/src/redux/reducers/ModalsReducer.js +1 -1
- package/src/redux/reducers/NotificationReducer.js +1 -1
- package/src/redux/reducers/PreferencesReducer.js +1 -1
- package/src/redux/reducers/ProgressIndicatorReducer.js +1 -1
- package/src/redux/reducers/__tests__/AuthReducer.spec.js +10 -10
- package/src/redux/reducers/__tests__/ErrorReducer.spec.js +1 -1
- package/src/redux/reducers/__tests__/ModalsReducer.spec.js +3 -3
- package/src/redux/reducers/__tests__/NotificationReducer.spec.js +3 -3
- package/src/redux/reducers/__tests__/PreferencesReducer.spec.js +2 -2
- package/src/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js +8 -8
- package/src/redux/store/beforeRenderHooks.js +1 -1
- package/src/redux/store/configureStore.js +3 -3
- package/src/utils/browser/Cookies.js +1 -1
- package/src/utils/browser/__tests__/Cookies.spec.js +1 -1
- package/src/utils/datetime/DateTimeUtil.js +15 -15
- package/src/utils/datetime/__tests__/DateTime.spec.js +84 -81
- package/src/utils/fetch/__tests__/xhr.spec.js +2 -2
- package/src/utils/fetch/universalFetch.js +1 -1
- package/src/utils/fetch/xhr.js +6 -6
- package/src/utils/helpers/__tests__/sanitizeHTML.spec.js +8 -8
- package/src/utils/helpers/sanitizeHtml.js +3 -3
- package/src/utils/helpers/text.js +1 -1
- package/src/utils/number/DecimalFormat.js +2 -2
- package/src/utils/number/__tests__/formatValue.spec.js +1 -1
- package/src/utils/number/formatValue.js +2 -2
- package/src/utils/number/parseNumbers.js +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConstraintCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_ConstraintModel","_Settings","ConstraintCollection","BaseCollection","addConstraint","id","validateMethod","defaultMessage","data","useClientsideValidation","arguments","length","undefined","getSetting","add","ConstraintModel","validate","value","isEmpty","collection","every","constraint","hasMandatoryConstraint","some","isMandatoryConstraint","invalidConstraints","_context","_filter","default","call","exports"],"sources":["../../../../src/models/attributes/input-constraints/ConstraintCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../../base/BaseCollection\";\nimport ConstraintModel from \"./ConstraintModel\";\n\nimport { getSetting } from \"../../../constants/Settings\";\n\nimport type { IConstraintModel } from \"../../types\";\n\n/**\n * Attribute constraints\n */\nexport default class ConstraintCollection extends BaseCollection<IConstraintModel> {\n /**\n * Add constraint\n */\n addConstraint(\n id: string,\n validateMethod: ?Function,\n defaultMessage: ?string,\n data: ?Object,\n useClientsideValidation: boolean = getSetting(\"USE_CLIENTSIDE_VALIDATION\")
|
|
1
|
+
{"version":3,"file":"ConstraintCollection.js","names":["_BaseCollection","_interopRequireDefault","require","_ConstraintModel","_Settings","ConstraintCollection","BaseCollection","addConstraint","id","validateMethod","defaultMessage","data","useClientsideValidation","arguments","length","undefined","getSetting","add","ConstraintModel","validate","value","isEmpty","collection","every","constraint","hasMandatoryConstraint","some","isMandatoryConstraint","invalidConstraints","_context","_filter","default","call","exports"],"sources":["../../../../src/models/attributes/input-constraints/ConstraintCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../../base/BaseCollection\";\nimport ConstraintModel from \"./ConstraintModel\";\n\nimport { getSetting } from \"../../../constants/Settings\";\n\nimport type { IConstraintModel } from \"../../types\";\n\n/**\n * Attribute constraints\n */\nexport default class ConstraintCollection extends BaseCollection<IConstraintModel> {\n /**\n * Add constraint\n */\n addConstraint(\n id: string,\n validateMethod: ?Function,\n defaultMessage: ?string,\n data: ?Object,\n useClientsideValidation: boolean = getSetting(\"USE_CLIENTSIDE_VALIDATION\"),\n ) {\n this.add(\n new ConstraintModel(\n id,\n validateMethod,\n defaultMessage,\n data,\n useClientsideValidation,\n ),\n );\n }\n\n /**\n * Validate if complete collection is valid\n */\n validate(value: any): boolean {\n return (\n this.isEmpty ||\n this.collection.every((constraint) => constraint.validate(value))\n );\n }\n\n /**\n * Indicates if a mandatory constraint exists in the collection\n */\n hasMandatoryConstraint(): boolean {\n return this.collection.some(\n (constraint) => constraint.isMandatoryConstraint,\n );\n }\n\n /**\n * Retrieve all invalid constraints\n */\n invalidConstraints(value: any): Array<IConstraintModel> {\n if (value === \"\" && !this.hasMandatoryConstraint()) {\n return [];\n }\n\n return this.collection.filter(\n (constraint) => constraint.validate(value) === false,\n );\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAIA;AACA;AACA;AACe,MAAMG,oBAAoB,SAASC,uBAAc,CAAmB;EACjF;AACF;AACA;EACEC,aAAaA,CACXC,EAAU,EACVC,cAAyB,EACzBC,cAAuB,EACvBC,IAAa,EAEb;IAAA,IADAC,uBAAgC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAAG,oBAAU,EAAC,2BAA2B,CAAC;IAE1E,IAAI,CAACC,GAAG,CACN,IAAIC,wBAAe,CACjBV,EAAE,EACFC,cAAc,EACdC,cAAc,EACdC,IAAI,EACJC,uBACF,CACF,CAAC;EACH;;EAEA;AACF;AACA;EACEO,QAAQA,CAACC,KAAU,EAAW;IAC5B,OACE,IAAI,CAACC,OAAO,IACZ,IAAI,CAACC,UAAU,CAACC,KAAK,CAAEC,UAAU,IAAKA,UAAU,CAACL,QAAQ,CAACC,KAAK,CAAC,CAAC;EAErE;;EAEA;AACF;AACA;EACEK,sBAAsBA,CAAA,EAAY;IAChC,OAAO,IAAI,CAACH,UAAU,CAACI,IAAI,CACxBF,UAAU,IAAKA,UAAU,CAACG,qBAC7B,CAAC;EACH;;EAEA;AACF;AACA;EACEC,kBAAkBA,CAACR,KAAU,EAA2B;IAAA,IAAAS,QAAA;IACtD,IAAIT,KAAK,KAAK,EAAE,IAAI,CAAC,IAAI,CAACK,sBAAsB,CAAC,CAAC,EAAE;MAClD,OAAO,EAAE;IACX;IAEA,OAAO,IAAAK,OAAA,CAAAC,OAAA,EAAAF,QAAA,OAAI,CAACP,UAAU,EAAAU,IAAA,CAAAH,QAAA,EACnBL,UAAU,IAAKA,UAAU,CAACL,QAAQ,CAACC,KAAK,CAAC,KAAK,KACjD,CAAC;EACH;AACF;AAACa,OAAA,CAAAF,OAAA,GAAA1B,oBAAA"}
|
|
@@ -19,7 +19,7 @@ export default class ConstraintModel implements IConstraintModel {
|
|
|
19
19
|
validateMethod: ?Function,
|
|
20
20
|
defaultMessage: ?string,
|
|
21
21
|
parameters: ?Object,
|
|
22
|
-
useClientsideValidation: boolean = getSetting("USE_CLIENTSIDE_VALIDATION")
|
|
22
|
+
useClientsideValidation: boolean = getSetting("USE_CLIENTSIDE_VALIDATION"),
|
|
23
23
|
) {
|
|
24
24
|
this._id = id;
|
|
25
25
|
this._validateMethod = validateMethod;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConstraintModel.js","names":["_Settings","require","ConstraintModel","constructor","id","validateMethod","defaultMessage","parameters","useClientsideValidation","arguments","length","undefined","getSetting","_defineProperty2","default","_id","_validateMethod","_defaultMessage","_parameters","_useClientsideValidation","hasValidation","validate","value","isMandatoryConstraint","exports"],"sources":["../../../../src/models/attributes/input-constraints/ConstraintModel.js"],"sourcesContent":["// @flow\nimport { getSetting } from \"../../../constants/Settings\";\n\nimport type { IConstraintModel } from \"../../types\";\n\n/**\n */\nexport default class ConstraintModel implements IConstraintModel {\n _id: string;\n _validateMethod: ?(value: any) => boolean;\n _defaultMessage: ?string;\n _parameters: ?Object;\n _useClientsideValidation: boolean;\n\n /**\n */\n constructor(\n id: string,\n validateMethod: ?Function,\n defaultMessage: ?string,\n parameters: ?Object,\n useClientsideValidation: boolean = getSetting(\"USE_CLIENTSIDE_VALIDATION\")
|
|
1
|
+
{"version":3,"file":"ConstraintModel.js","names":["_Settings","require","ConstraintModel","constructor","id","validateMethod","defaultMessage","parameters","useClientsideValidation","arguments","length","undefined","getSetting","_defineProperty2","default","_id","_validateMethod","_defaultMessage","_parameters","_useClientsideValidation","hasValidation","validate","value","isMandatoryConstraint","exports"],"sources":["../../../../src/models/attributes/input-constraints/ConstraintModel.js"],"sourcesContent":["// @flow\nimport { getSetting } from \"../../../constants/Settings\";\n\nimport type { IConstraintModel } from \"../../types\";\n\n/**\n */\nexport default class ConstraintModel implements IConstraintModel {\n _id: string;\n _validateMethod: ?(value: any) => boolean;\n _defaultMessage: ?string;\n _parameters: ?Object;\n _useClientsideValidation: boolean;\n\n /**\n */\n constructor(\n id: string,\n validateMethod: ?Function,\n defaultMessage: ?string,\n parameters: ?Object,\n useClientsideValidation: boolean = getSetting(\"USE_CLIENTSIDE_VALIDATION\"),\n ) {\n this._id = id;\n this._validateMethod = validateMethod;\n this._defaultMessage = defaultMessage;\n this._parameters = parameters;\n this._useClientsideValidation = useClientsideValidation;\n }\n\n /**\n * Retreive type of constraint\n */\n get id(): string {\n return this._id;\n }\n\n /**\n */\n get defaultMessage(): string {\n return this._defaultMessage || \"Missing default message\";\n }\n\n /**\n * Returns available data for constraint\n */\n get parameters(): ?Object {\n return this._parameters;\n }\n\n /**\n * Inidicates if validation message is present\n */\n hasValidation(): boolean {\n return this._validateMethod != null;\n }\n\n /**\n * Validate constraint with value\n */\n validate(value: any): boolean {\n const validateMethod = this._validateMethod;\n\n if (this._useClientsideValidation && validateMethod) {\n return validateMethod(value);\n }\n\n return true;\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return this._id === \"mandatory\" || this._id === \"Constraint.Mandatory\";\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAIA;AACA;AACe,MAAMC,eAAe,CAA6B;EAO/D;AACF;EACEC,WAAWA,CACTC,EAAU,EACVC,cAAyB,EACzBC,cAAuB,EACvBC,UAAmB,EAEnB;IAAA,IADAC,uBAAgC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAAG,oBAAU,EAAC,2BAA2B,CAAC;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAE1E,IAAI,CAACC,GAAG,GAAGX,EAAE;IACb,IAAI,CAACY,eAAe,GAAGX,cAAc;IACrC,IAAI,CAACY,eAAe,GAAGX,cAAc;IACrC,IAAI,CAACY,WAAW,GAAGX,UAAU;IAC7B,IAAI,CAACY,wBAAwB,GAAGX,uBAAuB;EACzD;;EAEA;AACF;AACA;EACE,IAAIJ,EAAEA,CAAA,EAAW;IACf,OAAO,IAAI,CAACW,GAAG;EACjB;;EAEA;AACF;EACE,IAAIT,cAAcA,CAAA,EAAW;IAC3B,OAAO,IAAI,CAACW,eAAe,IAAI,yBAAyB;EAC1D;;EAEA;AACF;AACA;EACE,IAAIV,UAAUA,CAAA,EAAY;IACxB,OAAO,IAAI,CAACW,WAAW;EACzB;;EAEA;AACF;AACA;EACEE,aAAaA,CAAA,EAAY;IACvB,OAAO,IAAI,CAACJ,eAAe,IAAI,IAAI;EACrC;;EAEA;AACF;AACA;EACEK,QAAQA,CAACC,KAAU,EAAW;IAC5B,MAAMjB,cAAc,GAAG,IAAI,CAACW,eAAe;IAE3C,IAAI,IAAI,CAACG,wBAAwB,IAAId,cAAc,EAAE;MACnD,OAAOA,cAAc,CAACiB,KAAK,CAAC;IAC9B;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIC,qBAAqBA,CAAA,EAAY;IACnC,OAAO,IAAI,CAACR,GAAG,KAAK,WAAW,IAAI,IAAI,CAACA,GAAG,KAAK,sBAAsB;EACxE;AACF;AAACS,OAAA,CAAAV,OAAA,GAAAZ,eAAA"}
|
|
@@ -31,7 +31,7 @@ class DateBoundaryConstraint implements IConstraintModel {
|
|
|
31
31
|
type: string,
|
|
32
32
|
minDate: ?string = null,
|
|
33
33
|
maxDate: ?string = null,
|
|
34
|
-
format: string = "yyyy-MM-dd"
|
|
34
|
+
format: string = "yyyy-MM-dd",
|
|
35
35
|
) {
|
|
36
36
|
this._type = type;
|
|
37
37
|
this._format = format;
|
|
@@ -124,7 +124,7 @@ class DateBoundaryConstraint implements IConstraintModel {
|
|
|
124
124
|
isExactDate(value: string): boolean {
|
|
125
125
|
if (typeof value !== "string") {
|
|
126
126
|
throw new IllegalArgumentException(
|
|
127
|
-
"isBetweenDates: Not comparing to string"
|
|
127
|
+
"isBetweenDates: Not comparing to string",
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -140,7 +140,7 @@ class DateBoundaryConstraint implements IConstraintModel {
|
|
|
140
140
|
isBetweenDates(value: string): boolean {
|
|
141
141
|
if (typeof value !== "string") {
|
|
142
142
|
throw new IllegalArgumentException(
|
|
143
|
-
"isBetweenDates: Not comparing to string"
|
|
143
|
+
"isBetweenDates: Not comparing to string",
|
|
144
144
|
);
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -158,7 +158,7 @@ class DateBoundaryConstraint implements IConstraintModel {
|
|
|
158
158
|
isSameOrAfterMinDate(value: string): boolean {
|
|
159
159
|
if (typeof value !== "string") {
|
|
160
160
|
throw new IllegalArgumentException(
|
|
161
|
-
"isSameOrAfterMinDate: Not comparing to string"
|
|
161
|
+
"isSameOrAfterMinDate: Not comparing to string",
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -174,13 +174,13 @@ class DateBoundaryConstraint implements IConstraintModel {
|
|
|
174
174
|
isSameOrBeforeMaxDate(value: string): boolean {
|
|
175
175
|
if (typeof value !== "string") {
|
|
176
176
|
throw new IllegalArgumentException(
|
|
177
|
-
"isSameOrBeforeMaxDate: Not comparing to string"
|
|
177
|
+
"isSameOrBeforeMaxDate: Not comparing to string",
|
|
178
178
|
);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
if (this.maxDate == null) {
|
|
182
182
|
throw new IllegalStateException(
|
|
183
|
-
"isSameOrBeforeMaxDate: Max date not set"
|
|
183
|
+
"isSameOrBeforeMaxDate: Max date not set",
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateBoundaryConstraint.js","names":["_DateTimeUtil","require","_exceptions","INEXACT_DATE_ID","OUT_OF_RANGE_ID","BELOW_MINIMUM_ID","ABOVE_MAXIMUM_ID","DateBoundaryConstraint","constructor","type","minDate","arguments","length","undefined","maxDate","format","_defineProperty2","default","_type","_format","_minDate","_maxDate","id","defaultMessage","parameters","formatUtil","toFormat","hasValidation","isExactDate","value","IllegalArgumentException","IllegalStateException","isSame","isBetweenDates","isSameOrAfterMinDate","isSameOrBeforeMaxDate","isSameOrAfter","isSameOrBefore","TimeUtil","TimestampUtil","DateTimeUtil","DateUtil","validate","TypeError","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/DateBoundaryConstraint.js"],"sourcesContent":["// @flow\nimport {\n TimeUtil,\n DateUtil,\n TimestampUtil,\n DateTimeUtil,\n} from \"../../../utils/datetime/DateTimeUtil\";\n\nimport type { IConstraintModel } from \"../../types\";\nimport {\n IllegalArgumentException,\n IllegalStateException,\n} from \"../../../exceptions\";\n\nconst INEXACT_DATE_ID = \"Constraint.Date.InexactDate\";\nconst OUT_OF_RANGE_ID = \"Constraint.Date.OutOfRange\";\nconst BELOW_MINIMUM_ID = \"Constraint.Date.BelowMinimum\";\nconst ABOVE_MAXIMUM_ID = \"Constraint.Date.AboveMaximum\";\n\n/**\n */\nclass DateBoundaryConstraint implements IConstraintModel {\n _type: string;\n _format: string;\n _minDate: ?string;\n _maxDate: ?string;\n\n /**\n */\n constructor(\n type: string,\n minDate: ?string = null,\n maxDate: ?string = null,\n format: string = \"yyyy-MM-dd\"\n ) {\n this._type = type;\n this._format = format;\n this._minDate = minDate;\n this._maxDate = maxDate;\n }\n\n /**\n */\n get type(): string {\n return this._type;\n }\n\n /**\n */\n get id(): string {\n if (\n this.minDate !== null &&\n this.maxDate !== null &&\n this.minDate === this.maxDate\n ) {\n return INEXACT_DATE_ID;\n } else if (this.minDate !== null && this.maxDate !== null) {\n return OUT_OF_RANGE_ID;\n } else if (this.minDate !== null) {\n return BELOW_MINIMUM_ID;\n } else if (this.maxDate !== null) {\n return ABOVE_MAXIMUM_ID;\n }\n\n return \"Constraint.Date.NoBoundaryConstraint\";\n }\n\n /**\n */\n get format(): string {\n return this._format;\n }\n\n /**\n */\n get minDate(): ?string {\n return this._minDate;\n }\n\n /**\n */\n get maxDate(): ?string {\n return this._maxDate;\n }\n\n /**\n */\n get defaultMessage(): string {\n switch (this.id) {\n case INEXACT_DATE_ID:\n return \"Date must be precisely ${min-date}\"; // NOSONAR\n case OUT_OF_RANGE_ID:\n return \"Must be between ${min-date} and ${max-date}\"; // NOSONAR\n case BELOW_MINIMUM_ID:\n return \"Must be on or after ${min-date}\"; // NOSONAR\n case ABOVE_MAXIMUM_ID:\n return \"Must be on or before ${max-date}\"; // NOSONAR\n default:\n return \"\";\n }\n }\n\n /**\n */\n get parameters(): { \"max-date\": string | null, \"min-date\": string | null } {\n return {\n \"min-date\": this.minDate\n ? this.formatUtil.toFormat(this.minDate, this.format)\n : null,\n \"max-date\": this.maxDate\n ? this.formatUtil.toFormat(this.maxDate, this.format)\n : null,\n };\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n isExactDate(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new IllegalArgumentException(\n \"isBetweenDates: Not comparing to string\"\n );\n }\n\n if (this.minDate === null) {\n throw new IllegalStateException(\"isExactDate: Min and max date not set\");\n }\n\n return this.formatUtil.isSame(value, this.minDate, this.format);\n }\n\n /**\n */\n isBetweenDates(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new IllegalArgumentException(\n \"isBetweenDates: Not comparing to string\"\n );\n }\n\n if (this.minDate === null || this.maxDate === null) {\n throw new IllegalStateException(\"isBetweenDate: Min or max date not set\");\n }\n\n return (\n this.isSameOrAfterMinDate(value) && this.isSameOrBeforeMaxDate(value)\n );\n }\n\n /**\n */\n isSameOrAfterMinDate(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new IllegalArgumentException(\n \"isSameOrAfterMinDate: Not comparing to string\"\n );\n }\n\n if (this.minDate == null) {\n throw new IllegalStateException(\"isSameOrAfterMinDate: Min date not set\");\n }\n\n return this.formatUtil.isSameOrAfter(value, this.minDate, this.format);\n }\n\n /**\n */\n isSameOrBeforeMaxDate(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new IllegalArgumentException(\n \"isSameOrBeforeMaxDate: Not comparing to string\"\n );\n }\n\n if (this.maxDate == null) {\n throw new IllegalStateException(\n \"isSameOrBeforeMaxDate: Max date not set\"\n );\n }\n\n return this.formatUtil.isSameOrBefore(value, this.maxDate, this.format);\n }\n\n /**\n */\n get formatUtil():\n | typeof TimeUtil\n | typeof TimestampUtil\n | typeof DateTimeUtil\n | typeof DateUtil {\n switch (this.type) {\n case \"time\":\n return TimeUtil;\n case \"timestamp\":\n return TimestampUtil;\n case \"datetime\":\n return DateTimeUtil;\n default:\n return DateUtil;\n }\n }\n\n /**\n */\n validate(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new TypeError(\"isNotEmptyString: Not comparing to string\");\n }\n\n switch (this.id) {\n case INEXACT_DATE_ID:\n return this.isExactDate(value);\n case OUT_OF_RANGE_ID:\n return this.isBetweenDates(value);\n case BELOW_MINIMUM_ID:\n return this.isSameOrAfterMinDate(value);\n case ABOVE_MAXIMUM_ID:\n return this.isSameOrBeforeMaxDate(value);\n default:\n return true;\n }\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default DateBoundaryConstraint;\n"],"mappings":";;;;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AAQA,IAAAC,WAAA,GAAAD,OAAA;AAKA,MAAME,eAAe,GAAG,6BAA6B;AACrD,MAAMC,eAAe,GAAG,4BAA4B;AACpD,MAAMC,gBAAgB,GAAG,8BAA8B;AACvD,MAAMC,gBAAgB,GAA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A;AACF;EACE,IAAIU,UAAUA,CAAA,EAIM;IAClB,QAAQ,IAAI,CAAChB,IAAI;MACf,KAAK,MAAM;QACT,OAAO6B,sBAAQ;MACjB,KAAK,WAAW;QACd,OAAOC,2BAAa;MACtB,KAAK,UAAU;QACb,OAAOC,0BAAY;MACrB;QACE,OAAOC,sBAAQ;IACnB;EACF;;EAEA;AACF;EACEC,QAAQA,CAACb,KAAa,EAAW;IAC/B,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;MAC7B,MAAM,IAAIc,SAAS,CAAC,2CAA2C,CAAC;IAClE;IAEA,QAAQ,IAAI,CAACrB,EAAE;MACb,KAAKnB,eAAe;QAClB,OAAO,IAAI,CAACyB,WAAW,CAACC,KAAK,CAAC;MAChC,KAAKzB,eAAe;QAClB,OAAO,IAAI,CAAC6B,cAAc,CAACJ,KAAK,CAAC;MACnC,KAAKxB,gBAAgB;QACnB,OAAO,IAAI,CAAC6B,oBAAoB,CAACL,KAAK,CAAC;MACzC,KAAKvB,gBAAgB;QACnB,OAAO,IAAI,CAAC6B,qBAAqB,CAACN,KAAK,CAAC;MAC1C;QACE,OAAO,IAAI;IACf;EACF;;EAEA;AACF;EACE,IAAIe,qBAAqBA,CAAA,EAAY;IACnC,OAAO,KAAK;EACd;AACF;AAAC,IAAAC,QAAA,GAEctC,sBAAsB;AAAAuC,OAAA,CAAA7B,OAAA,GAAA4B,QAAA"}
|
|
1
|
+
{"version":3,"file":"DateBoundaryConstraint.js","names":["_DateTimeUtil","require","_exceptions","INEXACT_DATE_ID","OUT_OF_RANGE_ID","BELOW_MINIMUM_ID","ABOVE_MAXIMUM_ID","DateBoundaryConstraint","constructor","type","minDate","arguments","length","undefined","maxDate","format","_defineProperty2","default","_type","_format","_minDate","_maxDate","id","defaultMessage","parameters","formatUtil","toFormat","hasValidation","isExactDate","value","IllegalArgumentException","IllegalStateException","isSame","isBetweenDates","isSameOrAfterMinDate","isSameOrBeforeMaxDate","isSameOrAfter","isSameOrBefore","TimeUtil","TimestampUtil","DateTimeUtil","DateUtil","validate","TypeError","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/DateBoundaryConstraint.js"],"sourcesContent":["// @flow\nimport {\n TimeUtil,\n DateUtil,\n TimestampUtil,\n DateTimeUtil,\n} from \"../../../utils/datetime/DateTimeUtil\";\n\nimport type { IConstraintModel } from \"../../types\";\nimport {\n IllegalArgumentException,\n IllegalStateException,\n} from \"../../../exceptions\";\n\nconst INEXACT_DATE_ID = \"Constraint.Date.InexactDate\";\nconst OUT_OF_RANGE_ID = \"Constraint.Date.OutOfRange\";\nconst BELOW_MINIMUM_ID = \"Constraint.Date.BelowMinimum\";\nconst ABOVE_MAXIMUM_ID = \"Constraint.Date.AboveMaximum\";\n\n/**\n */\nclass DateBoundaryConstraint implements IConstraintModel {\n _type: string;\n _format: string;\n _minDate: ?string;\n _maxDate: ?string;\n\n /**\n */\n constructor(\n type: string,\n minDate: ?string = null,\n maxDate: ?string = null,\n format: string = \"yyyy-MM-dd\",\n ) {\n this._type = type;\n this._format = format;\n this._minDate = minDate;\n this._maxDate = maxDate;\n }\n\n /**\n */\n get type(): string {\n return this._type;\n }\n\n /**\n */\n get id(): string {\n if (\n this.minDate !== null &&\n this.maxDate !== null &&\n this.minDate === this.maxDate\n ) {\n return INEXACT_DATE_ID;\n } else if (this.minDate !== null && this.maxDate !== null) {\n return OUT_OF_RANGE_ID;\n } else if (this.minDate !== null) {\n return BELOW_MINIMUM_ID;\n } else if (this.maxDate !== null) {\n return ABOVE_MAXIMUM_ID;\n }\n\n return \"Constraint.Date.NoBoundaryConstraint\";\n }\n\n /**\n */\n get format(): string {\n return this._format;\n }\n\n /**\n */\n get minDate(): ?string {\n return this._minDate;\n }\n\n /**\n */\n get maxDate(): ?string {\n return this._maxDate;\n }\n\n /**\n */\n get defaultMessage(): string {\n switch (this.id) {\n case INEXACT_DATE_ID:\n return \"Date must be precisely ${min-date}\"; // NOSONAR\n case OUT_OF_RANGE_ID:\n return \"Must be between ${min-date} and ${max-date}\"; // NOSONAR\n case BELOW_MINIMUM_ID:\n return \"Must be on or after ${min-date}\"; // NOSONAR\n case ABOVE_MAXIMUM_ID:\n return \"Must be on or before ${max-date}\"; // NOSONAR\n default:\n return \"\";\n }\n }\n\n /**\n */\n get parameters(): { \"max-date\": string | null, \"min-date\": string | null } {\n return {\n \"min-date\": this.minDate\n ? this.formatUtil.toFormat(this.minDate, this.format)\n : null,\n \"max-date\": this.maxDate\n ? this.formatUtil.toFormat(this.maxDate, this.format)\n : null,\n };\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n isExactDate(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new IllegalArgumentException(\n \"isBetweenDates: Not comparing to string\",\n );\n }\n\n if (this.minDate === null) {\n throw new IllegalStateException(\"isExactDate: Min and max date not set\");\n }\n\n return this.formatUtil.isSame(value, this.minDate, this.format);\n }\n\n /**\n */\n isBetweenDates(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new IllegalArgumentException(\n \"isBetweenDates: Not comparing to string\",\n );\n }\n\n if (this.minDate === null || this.maxDate === null) {\n throw new IllegalStateException(\"isBetweenDate: Min or max date not set\");\n }\n\n return (\n this.isSameOrAfterMinDate(value) && this.isSameOrBeforeMaxDate(value)\n );\n }\n\n /**\n */\n isSameOrAfterMinDate(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new IllegalArgumentException(\n \"isSameOrAfterMinDate: Not comparing to string\",\n );\n }\n\n if (this.minDate == null) {\n throw new IllegalStateException(\"isSameOrAfterMinDate: Min date not set\");\n }\n\n return this.formatUtil.isSameOrAfter(value, this.minDate, this.format);\n }\n\n /**\n */\n isSameOrBeforeMaxDate(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new IllegalArgumentException(\n \"isSameOrBeforeMaxDate: Not comparing to string\",\n );\n }\n\n if (this.maxDate == null) {\n throw new IllegalStateException(\n \"isSameOrBeforeMaxDate: Max date not set\",\n );\n }\n\n return this.formatUtil.isSameOrBefore(value, this.maxDate, this.format);\n }\n\n /**\n */\n get formatUtil():\n | typeof TimeUtil\n | typeof TimestampUtil\n | typeof DateTimeUtil\n | typeof DateUtil {\n switch (this.type) {\n case \"time\":\n return TimeUtil;\n case \"timestamp\":\n return TimestampUtil;\n case \"datetime\":\n return DateTimeUtil;\n default:\n return DateUtil;\n }\n }\n\n /**\n */\n validate(value: string): boolean {\n if (typeof value !== \"string\") {\n throw new TypeError(\"isNotEmptyString: Not comparing to string\");\n }\n\n switch (this.id) {\n case INEXACT_DATE_ID:\n return this.isExactDate(value);\n case OUT_OF_RANGE_ID:\n return this.isBetweenDates(value);\n case BELOW_MINIMUM_ID:\n return this.isSameOrAfterMinDate(value);\n case ABOVE_MAXIMUM_ID:\n return this.isSameOrBeforeMaxDate(value);\n default:\n return true;\n }\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default DateBoundaryConstraint;\n"],"mappings":";;;;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AAQA,IAAAC,WAAA,GAAAD,OAAA;AAKA,MAAME,eAAe,GAAG,6BAA6B;AACrD,MAAMC,eAAe,GAAG,4BAA4B;AACpD,MAAMC,gBAAgB,GAAG,8BAA8B;AACvD,MAAMC,gBAAgB,GAAG,8BAA8B;;AAEvD;AACA;AACA,MAAMC,sBAAsB,CAA6B;EAMvD;AACF;EACEC,WAAWA,CACTC,IAAY,EAIZ;IAAA,IAHAC,OAAgB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAAA,IACvBG,OAAgB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAAA,IACvBI,MAAc,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,YAAY;IAAA,IAAAK,gBAAA,CAAAC,OAAA;IA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AAI,CAACyB,WAAW,CAACC,KAAK,CAAC;MAChC,KAAKzB,eAAe;QAClB,OAAO,IAAI,CAAC6B,cAAc,CAACJ,KAAK,CAAC;MACnC,KAAKxB,gBAAgB;QACnB,OAAO,IAAI,CAAC6B,oBAAoB,CAACL,KAAK,CAAC;MACzC,KAAKvB,gBAAgB;QACnB,OAAO,IAAI,CAAC6B,qBAAqB,CAACN,KAAK,CAAC;MAC1C;QACE,OAAO,IAAI;IACf;EACF;;EAEA;AACF;EACE,IAAIe,qBAAqBA,CAAA,EAAY;IACnC,OAAO,KAAK;EACd;AACF;AAAC,IAAAC,QAAA,GAEctC,sBAAsB;AAAAuC,OAAA,CAAA7B,OAAA,GAAA4B,QAAA"}
|
|
@@ -37,7 +37,7 @@ class MandatoryConstraint implements IConstraintModel {
|
|
|
37
37
|
|
|
38
38
|
if (typeof value != "string") {
|
|
39
39
|
throw new TypeError(
|
|
40
|
-
`isNotEmptyString: Not comparing to string: ${typeof value}
|
|
40
|
+
`isNotEmptyString: Not comparing to string: ${typeof value}`,
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MandatoryConstraint.js","names":["MandatoryConstraint","id","hasValidation","defaultMessage","parameters","validate","value","TypeError","isMandatoryConstraint","_default","exports","default"],"sources":["../../../../src/models/attributes/input-constraints/MandatoryConstraint.js"],"sourcesContent":["// @flow\nimport type { IConstraintModel } from \"../../types\";\n\n/**\n */\nclass MandatoryConstraint implements IConstraintModel {\n /**\n */\n get id(): string {\n return \"Constraint.Mandatory\";\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n get defaultMessage(): string {\n return \"Field is mandatory\";\n }\n\n /**\n */\n get parameters(): { ... } {\n return {};\n }\n\n /**\n */\n validate(value: string): boolean {\n if (value == null) {\n return false;\n }\n\n if (typeof value != \"string\") {\n throw new TypeError(\n `isNotEmptyString: Not comparing to string: ${typeof value}
|
|
1
|
+
{"version":3,"file":"MandatoryConstraint.js","names":["MandatoryConstraint","id","hasValidation","defaultMessage","parameters","validate","value","TypeError","isMandatoryConstraint","_default","exports","default"],"sources":["../../../../src/models/attributes/input-constraints/MandatoryConstraint.js"],"sourcesContent":["// @flow\nimport type { IConstraintModel } from \"../../types\";\n\n/**\n */\nclass MandatoryConstraint implements IConstraintModel {\n /**\n */\n get id(): string {\n return \"Constraint.Mandatory\";\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n get defaultMessage(): string {\n return \"Field is mandatory\";\n }\n\n /**\n */\n get parameters(): { ... } {\n return {};\n }\n\n /**\n */\n validate(value: string): boolean {\n if (value == null) {\n return false;\n }\n\n if (typeof value != \"string\") {\n throw new TypeError(\n `isNotEmptyString: Not comparing to string: ${typeof value}`,\n );\n }\n\n return value !== \"\";\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return true;\n }\n}\n\nexport default MandatoryConstraint;\n"],"mappings":";;;;;;AAGA;AACA;AACA,MAAMA,mBAAmB,CAA6B;EACpD;AACF;EACE,IAAIC,EAAEA,CAAA,EAAW;IACf,OAAO,sBAAsB;EAC/B;;EAEA;AACF;EACEC,aAAaA,CAAA,EAAY;IACvB,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIC,cAAcA,CAAA,EAAW;IAC3B,OAAO,oBAAoB;EAC7B;;EAEA;AACF;EACE,IAAIC,UAAUA,CAAA,EAAY;IACxB,OAAO,CAAC,CAAC;EACX;;EAEA;AACF;EACEC,QAAQA,CAACC,KAAa,EAAW;IAC/B,IAAIA,KAAK,IAAI,IAAI,EAAE;MACjB,OAAO,KAAK;IACd;IAEA,IAAI,OAAOA,KAAK,IAAI,QAAQ,EAAE;MAC5B,MAAM,IAAIC,SAAS,CAChB,8CAA6C,OAAOD,KAAM,EAC7D,CAAC;IACH;IAEA,OAAOA,KAAK,KAAK,EAAE;EACrB;;EAEA;AACF;EACE,IAAIE,qBAAqBA,CAAA,EAAY;IACnC,OAAO,IAAI;EACb;AACF;AAAC,IAAAC,QAAA,GAEcT,mBAAmB;AAAAU,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -25,7 +25,7 @@ class NumberBoundaryConstraint implements IConstraintModel {
|
|
|
25
25
|
maxNumber: ?number = null,
|
|
26
26
|
groupingSeparator: string,
|
|
27
27
|
decimalSeparator: string,
|
|
28
|
-
format: string | null
|
|
28
|
+
format: string | null,
|
|
29
29
|
) {
|
|
30
30
|
this._format = format ?? "";
|
|
31
31
|
this._groupingSeparator = groupingSeparator;
|
|
@@ -121,7 +121,7 @@ class NumberBoundaryConstraint implements IConstraintModel {
|
|
|
121
121
|
this.minNumber,
|
|
122
122
|
this.format,
|
|
123
123
|
this.groupingSeparator,
|
|
124
|
-
this.decimalSeparator
|
|
124
|
+
this.decimalSeparator,
|
|
125
125
|
),
|
|
126
126
|
"max-number":
|
|
127
127
|
this.maxNumber === null
|
|
@@ -130,7 +130,7 @@ class NumberBoundaryConstraint implements IConstraintModel {
|
|
|
130
130
|
this.maxNumber,
|
|
131
131
|
this.format,
|
|
132
132
|
this.groupingSeparator,
|
|
133
|
-
this.decimalSeparator
|
|
133
|
+
this.decimalSeparator,
|
|
134
134
|
),
|
|
135
135
|
};
|
|
136
136
|
}
|
|
@@ -141,7 +141,7 @@ class NumberBoundaryConstraint implements IConstraintModel {
|
|
|
141
141
|
const parsedNumber = parseToNumber(
|
|
142
142
|
value,
|
|
143
143
|
this.groupingSeparator,
|
|
144
|
-
this.decimalSeparator
|
|
144
|
+
this.decimalSeparator,
|
|
145
145
|
);
|
|
146
146
|
return parsedNumber === this.minNumber;
|
|
147
147
|
}
|
|
@@ -152,7 +152,7 @@ class NumberBoundaryConstraint implements IConstraintModel {
|
|
|
152
152
|
const parsedNumber = parseToNumber(
|
|
153
153
|
value,
|
|
154
154
|
this.groupingSeparator,
|
|
155
|
-
this.decimalSeparator
|
|
155
|
+
this.decimalSeparator,
|
|
156
156
|
);
|
|
157
157
|
|
|
158
158
|
if (isNaN(parsedNumber) || parsedNumber == null) {
|
|
@@ -168,7 +168,7 @@ class NumberBoundaryConstraint implements IConstraintModel {
|
|
|
168
168
|
const parsedNumber = parseToNumber(
|
|
169
169
|
value,
|
|
170
170
|
this.groupingSeparator,
|
|
171
|
-
this.decimalSeparator
|
|
171
|
+
this.decimalSeparator,
|
|
172
172
|
);
|
|
173
173
|
|
|
174
174
|
if (isNaN(parsedNumber) || parsedNumber == null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberBoundaryConstraint.js","names":["_formatValue","_interopRequireDefault","require","_parseNumbers","INEXACT_NUMBER_ID","OUT_OF_RANGE_ID","BELOW_MINIMUM_ID","ABOVE_MAXIMUM_ID","NumberBoundaryConstraint","constructor","minNumber","arguments","length","undefined","maxNumber","groupingSeparator","decimalSeparator","format","_defineProperty2","default","_format","_groupingSeparator","_decimalSeparator","_minNumber","_maxNumber","id","hasValidation","defaultMessage","parameters","formatValue","isExactNumber","value","parsedNumber","parseToNumber","isSameOrAboveMinNumber","isNaN","isSameOrBelowMaxNumber","isBetweenNumbers","validate","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/NumberBoundaryConstraint.js"],"sourcesContent":["// @flow\nimport formatValue from \"../../../utils/number/formatValue\";\nimport { parseToNumber } from \"../../../utils/number/parseNumbers\";\n\nimport type { IConstraintModel } from \"../../types\";\n\nconst INEXACT_NUMBER_ID = \"Constraint.Number.InexactNumber\";\nconst OUT_OF_RANGE_ID = \"Constraint.Number.OutOfRange\";\nconst BELOW_MINIMUM_ID = \"Constraint.Number.BelowMinimum\";\nconst ABOVE_MAXIMUM_ID = \"Constraint.Number.AboveMaximum\";\n\n/**\n */\nclass NumberBoundaryConstraint implements IConstraintModel {\n _minNumber: ?number;\n _maxNumber: ?number;\n _groupingSeparator: string = \",\";\n _decimalSeparator: string = \".\";\n _format: string = \"\";\n\n /**\n */\n constructor(\n minNumber: ?number = null,\n maxNumber: ?number = null,\n groupingSeparator: string,\n decimalSeparator: string,\n format: string | null
|
|
1
|
+
{"version":3,"file":"NumberBoundaryConstraint.js","names":["_formatValue","_interopRequireDefault","require","_parseNumbers","INEXACT_NUMBER_ID","OUT_OF_RANGE_ID","BELOW_MINIMUM_ID","ABOVE_MAXIMUM_ID","NumberBoundaryConstraint","constructor","minNumber","arguments","length","undefined","maxNumber","groupingSeparator","decimalSeparator","format","_defineProperty2","default","_format","_groupingSeparator","_decimalSeparator","_minNumber","_maxNumber","id","hasValidation","defaultMessage","parameters","formatValue","isExactNumber","value","parsedNumber","parseToNumber","isSameOrAboveMinNumber","isNaN","isSameOrBelowMaxNumber","isBetweenNumbers","validate","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/NumberBoundaryConstraint.js"],"sourcesContent":["// @flow\nimport formatValue from \"../../../utils/number/formatValue\";\nimport { parseToNumber } from \"../../../utils/number/parseNumbers\";\n\nimport type { IConstraintModel } from \"../../types\";\n\nconst INEXACT_NUMBER_ID = \"Constraint.Number.InexactNumber\";\nconst OUT_OF_RANGE_ID = \"Constraint.Number.OutOfRange\";\nconst BELOW_MINIMUM_ID = \"Constraint.Number.BelowMinimum\";\nconst ABOVE_MAXIMUM_ID = \"Constraint.Number.AboveMaximum\";\n\n/**\n */\nclass NumberBoundaryConstraint implements IConstraintModel {\n _minNumber: ?number;\n _maxNumber: ?number;\n _groupingSeparator: string = \",\";\n _decimalSeparator: string = \".\";\n _format: string = \"\";\n\n /**\n */\n constructor(\n minNumber: ?number = null,\n maxNumber: ?number = null,\n groupingSeparator: string,\n decimalSeparator: string,\n format: string | null,\n ) {\n this._format = format ?? \"\";\n this._groupingSeparator = groupingSeparator;\n this._decimalSeparator = decimalSeparator;\n this._minNumber = minNumber;\n this._maxNumber = maxNumber;\n }\n\n /**\n */\n get id(): string {\n if (\n this.minNumber !== null &&\n this.maxNumber !== null &&\n this.minNumber === this.maxNumber\n ) {\n return INEXACT_NUMBER_ID;\n } else if (this.minNumber !== null && this.maxNumber !== null) {\n return OUT_OF_RANGE_ID;\n } else if (this.minNumber !== null) {\n return BELOW_MINIMUM_ID;\n } else if (this.maxNumber !== null) {\n return ABOVE_MAXIMUM_ID;\n }\n\n return \"Constraint.Number.NoBoundaryConstraint\";\n }\n\n /**\n */\n get minNumber(): ?number {\n return this._minNumber;\n }\n\n /**\n */\n get maxNumber(): ?number {\n return this._maxNumber;\n }\n\n /**\n */\n get format(): string {\n return this._format;\n }\n\n /**\n */\n get groupingSeparator(): string {\n return this._groupingSeparator;\n }\n\n /**\n */\n get decimalSeparator(): string {\n return this._decimalSeparator;\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n get defaultMessage(): string {\n switch (this.id) {\n case INEXACT_NUMBER_ID:\n return \"Number must be precisely ${min-number}\"; // NOSONAR\n case OUT_OF_RANGE_ID:\n return \"Must be between ${min-number} and ${max-number}\"; // NOSONAR\n case BELOW_MINIMUM_ID:\n return \"The number must be larger than ${min-number}\"; // NOSONAR\n case ABOVE_MAXIMUM_ID:\n return \"The number must be smaller than ${max-number}\"; // NOSONAR\n default:\n return \"\";\n }\n }\n\n /**\n */\n get parameters(): {\n \"max-number\": null | string,\n \"min-number\": null | string,\n } {\n return {\n \"min-number\":\n this.minNumber === null\n ? null\n : formatValue(\n this.minNumber,\n this.format,\n this.groupingSeparator,\n this.decimalSeparator,\n ),\n \"max-number\":\n this.maxNumber === null\n ? null\n : formatValue(\n this.maxNumber,\n this.format,\n this.groupingSeparator,\n this.decimalSeparator,\n ),\n };\n }\n\n /**\n */\n isExactNumber(value: string): boolean {\n const parsedNumber = parseToNumber(\n value,\n this.groupingSeparator,\n this.decimalSeparator,\n );\n return parsedNumber === this.minNumber;\n }\n\n /**\n */\n isSameOrAboveMinNumber(value: string): boolean {\n const parsedNumber = parseToNumber(\n value,\n this.groupingSeparator,\n this.decimalSeparator,\n );\n\n if (isNaN(parsedNumber) || parsedNumber == null) {\n return false;\n }\n\n return this.minNumber != null && parsedNumber >= this.minNumber;\n }\n\n /**\n */\n isSameOrBelowMaxNumber(value: string): boolean {\n const parsedNumber = parseToNumber(\n value,\n this.groupingSeparator,\n this.decimalSeparator,\n );\n\n if (isNaN(parsedNumber) || parsedNumber == null) {\n return false;\n }\n\n return this.maxNumber != null && parsedNumber <= this.maxNumber;\n }\n\n /**\n */\n isBetweenNumbers(value: string): boolean {\n return (\n this.isSameOrAboveMinNumber(value) && this.isSameOrBelowMaxNumber(value)\n );\n }\n\n /**\n */\n validate(value: string): boolean {\n switch (this.id) {\n case INEXACT_NUMBER_ID:\n return this.isExactNumber(value);\n case OUT_OF_RANGE_ID:\n return this.isBetweenNumbers(value);\n case BELOW_MINIMUM_ID:\n return this.isSameOrAboveMinNumber(value);\n case ABOVE_MAXIMUM_ID:\n return this.isSameOrBelowMaxNumber(value);\n default:\n return true;\n }\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default NumberBoundaryConstraint;\n"],"mappings":";;;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAIA,MAAME,iBAAiB,GAAG,iCAAiC;AAC3D,MAAMC,eAAe,GAAG,8BAA8B;AACtD,MAAMC,gBAAgB,GAAG,gCAAgC;AACzD,MAAMC,gBAAgB,GAAG,gCAAgC;;AAEzD;AACA;AACA,MAAMC,wBAAwB,CAA6B;EAOzD;AACF;EACEC,WAAWA,CAAA,EAMT;IAAA,IALAC,SAAkB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAAA,IACzBG,SAAkB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;IAAA,IACzBI,iBAAyB,GAAAJ,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;IAAA,IACzBG,gBAAwB,GA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AEA;AACF;EACE,IAAIQ,qBAAqBA,CAAA,EAAY;IACnC,OAAO,KAAK;EACd;AACF;AAAC,IAAAC,QAAA,GAEchC,wBAAwB;AAAAiC,OAAA,CAAAtB,OAAA,GAAAqB,QAAA"}
|
|
@@ -21,7 +21,7 @@ class NumberFormatConstraint implements IConstraintModel {
|
|
|
21
21
|
constructor(
|
|
22
22
|
groupingSeparator: string,
|
|
23
23
|
decimalSeparator: string,
|
|
24
|
-
format: string | null
|
|
24
|
+
format: string | null,
|
|
25
25
|
) {
|
|
26
26
|
this._decimalSeparator = decimalSeparator;
|
|
27
27
|
this._groupingSeparator = groupingSeparator;
|
|
@@ -133,7 +133,7 @@ class NumberFormatConstraint implements IConstraintModel {
|
|
|
133
133
|
const parsedNumber = parseToNumber(
|
|
134
134
|
value,
|
|
135
135
|
this.groupingSeparator,
|
|
136
|
-
this.decimalSeparator
|
|
136
|
+
this.decimalSeparator,
|
|
137
137
|
);
|
|
138
138
|
|
|
139
139
|
if (this.id === INVALID_INTEGER_ID) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberFormatConstraint.js","names":["_DecimalFormat","_interopRequireDefault","require","_parseNumbers","INVALID_INTEGER_ID","NumberFormatConstraint","constructor","groupingSeparator","decimalSeparator","format","_defineProperty2","default","_decimalSeparator","_groupingSeparator","_format","id","maxDigits","DecimalFormat","maxFrac","hasValidation","defaultMessage","parameters","isInteger","value","_isInteger","getNumberOfDigits","Math","floor","stringValue","parseNumberToString","split","length","isValidDecimal","isNaN","numberOfDigits","parseFloat","isFinite","validate","_context","_includes","toString","call","parsedNumber","parseToNumber","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/NumberFormatConstraint.js"],"sourcesContent":["// @flow\nimport DecimalFormat from \"../../../utils/number/DecimalFormat\";\nimport {\n parseNumberToString,\n parseToNumber,\n} from \"../../../utils/number/parseNumbers\";\n\nimport type { IConstraintModel } from \"../../types\";\n\nconst INVALID_INTEGER_ID = \"Constraint.Number.InvalidInteger\";\n\n/**\n */\nclass NumberFormatConstraint implements IConstraintModel {\n _decimalSeparator: string = \",\";\n _groupingSeparator: string = \".\";\n _format: string = \"0\";\n\n /**\n */\n constructor(\n groupingSeparator: string,\n decimalSeparator: string,\n format: string | null
|
|
1
|
+
{"version":3,"file":"NumberFormatConstraint.js","names":["_DecimalFormat","_interopRequireDefault","require","_parseNumbers","INVALID_INTEGER_ID","NumberFormatConstraint","constructor","groupingSeparator","decimalSeparator","format","_defineProperty2","default","_decimalSeparator","_groupingSeparator","_format","id","maxDigits","DecimalFormat","maxFrac","hasValidation","defaultMessage","parameters","isInteger","value","_isInteger","getNumberOfDigits","Math","floor","stringValue","parseNumberToString","split","length","isValidDecimal","isNaN","numberOfDigits","parseFloat","isFinite","validate","_context","_includes","toString","call","parsedNumber","parseToNumber","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/NumberFormatConstraint.js"],"sourcesContent":["// @flow\nimport DecimalFormat from \"../../../utils/number/DecimalFormat\";\nimport {\n parseNumberToString,\n parseToNumber,\n} from \"../../../utils/number/parseNumbers\";\n\nimport type { IConstraintModel } from \"../../types\";\n\nconst INVALID_INTEGER_ID = \"Constraint.Number.InvalidInteger\";\n\n/**\n */\nclass NumberFormatConstraint implements IConstraintModel {\n _decimalSeparator: string = \",\";\n _groupingSeparator: string = \".\";\n _format: string = \"0\";\n\n /**\n */\n constructor(\n groupingSeparator: string,\n decimalSeparator: string,\n format: string | null,\n ) {\n this._decimalSeparator = decimalSeparator;\n this._groupingSeparator = groupingSeparator;\n this._format = format ?? \"0\";\n }\n\n /**\n */\n get id(): string {\n if (this.maxDigits === 0) {\n return INVALID_INTEGER_ID;\n }\n\n return \"Constraint.Number.InvalidDecimal\";\n }\n\n /**\n */\n get decimalSeparator(): string {\n return this._decimalSeparator;\n }\n\n /**\n */\n get groupingSeparator(): string {\n return this._groupingSeparator;\n }\n\n /**\n */\n get format(): string {\n return this._format;\n }\n\n /**\n */\n get maxDigits(): number {\n return this.format ? new DecimalFormat(this.format).maxFrac : 0;\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n get defaultMessage(): string {\n if (this.id === INVALID_INTEGER_ID) {\n return \"Must be a whole number\";\n }\n\n return \"The value is not correct numeric format\";\n }\n\n /**\n */\n get parameters(): { \"max-digits\": number } {\n return {\n \"max-digits\": this.maxDigits,\n };\n }\n\n /**\n */\n isInteger(value: number): boolean {\n return Number.isInteger(value);\n }\n\n /**\n */\n getNumberOfDigits(value: number): number {\n if (Math.floor(value) === value) {\n return 0;\n }\n\n const stringValue = parseNumberToString(value);\n return stringValue.split(\".\")[1].length;\n }\n\n /**\n */\n isValidDecimal(value: number): boolean {\n if (isNaN(value)) {\n return false;\n }\n\n const numberOfDigits = this.getNumberOfDigits(value);\n\n return (\n !isNaN(parseFloat(value)) &&\n isFinite(value) &&\n numberOfDigits <= this.maxDigits\n );\n }\n\n /**\n */\n validate(value: string | number): boolean {\n if (\n this.maxDigits === 0 &&\n this.decimalSeparator !== \"\" &&\n value.toString().includes(this.decimalSeparator)\n ) {\n return false;\n }\n\n const parsedNumber = parseToNumber(\n value,\n this.groupingSeparator,\n this.decimalSeparator,\n );\n\n if (this.id === INVALID_INTEGER_ID) {\n return this.isInteger(parsedNumber);\n }\n\n return this.isValidDecimal(parsedNumber);\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default NumberFormatConstraint;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAOA,MAAME,kBAAkB,GAAG,kCAAkC;;AAE7D;AACA;AACA,MAAMC,sBAAsB,CAA6B;EAKvD;AACF;EACEC,WAAWA,CACTC,iBAAyB,EACzBC,gBAAwB,EACxBC,MAAqB,EACrB;IAAA,IAAAC,gBAAA,CAAAC,OAAA,6BAV0B,GAAG;IAAA,IAAAD,gB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AC,IAAAC,QAAA,GAEcxC,sBAAsB;AAAAyC,OAAA,CAAAnC,OAAA,GAAAkC,QAAA"}
|
|
@@ -17,7 +17,7 @@ class NumberGroupingConstraint implements IConstraintModel {
|
|
|
17
17
|
constructor(
|
|
18
18
|
groupingSeparator: string = ",",
|
|
19
19
|
decimalSeparator: string = ".",
|
|
20
|
-
format: ?string = "0"
|
|
20
|
+
format: ?string = "0",
|
|
21
21
|
) {
|
|
22
22
|
this._decimalSeparator = decimalSeparator;
|
|
23
23
|
this._groupingSeparator = groupingSeparator;
|
|
@@ -105,7 +105,7 @@ class NumberGroupingConstraint implements IConstraintModel {
|
|
|
105
105
|
|
|
106
106
|
integer = absStringValue.substring(
|
|
107
107
|
0,
|
|
108
|
-
absStringValue.indexOf(this.decimalSeparator)
|
|
108
|
+
absStringValue.indexOf(this.decimalSeparator),
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberGroupingConstraint.js","names":["_DecimalFormat","_interopRequireDefault","require","DEFAULT_GROUPING_SIZE","NumberGroupingConstraint","constructor","groupingSeparator","arguments","length","undefined","decimalSeparator","format","_defineProperty2","default","_decimalSeparator","_groupingSeparator","_format","id","groupSize","fromFormat","DecimalFormat","comma","hasValidation","defaultMessage","parameters","hasCorrectGrouping","value","absStringValue","replace","_includes","call","integer","indexOf","substring","groups","split","_slice","every","group","validate","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/NumberGroupingConstraint.js"],"sourcesContent":["// @flow\nimport DecimalFormat from \"../../../utils/number/DecimalFormat\";\n\nimport type { IConstraintModel } from \"../../types\";\n\nconst DEFAULT_GROUPING_SIZE = 3;\n\n/**\n */\nclass NumberGroupingConstraint implements IConstraintModel {\n _decimalSeparator: string;\n _groupingSeparator: string;\n _format: string;\n\n /**\n */\n constructor(\n groupingSeparator: string = \",\",\n decimalSeparator: string = \".\",\n format: ?string = \"0\"
|
|
1
|
+
{"version":3,"file":"NumberGroupingConstraint.js","names":["_DecimalFormat","_interopRequireDefault","require","DEFAULT_GROUPING_SIZE","NumberGroupingConstraint","constructor","groupingSeparator","arguments","length","undefined","decimalSeparator","format","_defineProperty2","default","_decimalSeparator","_groupingSeparator","_format","id","groupSize","fromFormat","DecimalFormat","comma","hasValidation","defaultMessage","parameters","hasCorrectGrouping","value","absStringValue","replace","_includes","call","integer","indexOf","substring","groups","split","_slice","every","group","validate","isMandatoryConstraint","_default","exports"],"sources":["../../../../src/models/attributes/input-constraints/NumberGroupingConstraint.js"],"sourcesContent":["// @flow\nimport DecimalFormat from \"../../../utils/number/DecimalFormat\";\n\nimport type { IConstraintModel } from \"../../types\";\n\nconst DEFAULT_GROUPING_SIZE = 3;\n\n/**\n */\nclass NumberGroupingConstraint implements IConstraintModel {\n _decimalSeparator: string;\n _groupingSeparator: string;\n _format: string;\n\n /**\n */\n constructor(\n groupingSeparator: string = \",\",\n decimalSeparator: string = \".\",\n format: ?string = \"0\",\n ) {\n this._decimalSeparator = decimalSeparator;\n this._groupingSeparator = groupingSeparator;\n this._format = format ?? \"0\";\n }\n\n /**\n */\n get id(): string {\n return \"Constraint.Number.GroupingSeparator\";\n }\n\n /**\n */\n get decimalSeparator(): string {\n return this._decimalSeparator;\n }\n\n /**\n */\n get groupingSeparator(): string {\n return this._groupingSeparator;\n }\n\n /**\n */\n get format(): string {\n return this._format;\n }\n\n /**\n */\n get groupSize(): number {\n if (this.format) {\n const fromFormat = new DecimalFormat(this.format).comma;\n if (fromFormat > 0) {\n return fromFormat;\n }\n }\n\n return DEFAULT_GROUPING_SIZE;\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n get defaultMessage(): string {\n return \"Group divider '${group-divider}' must be correctly placed\"; // NOSONAR\n }\n\n /**\n */\n get parameters(): { \"group-divider\": string } {\n return { \"group-divider\": this.groupingSeparator };\n }\n\n /**\n */\n // $FlowFixMe\n hasCorrectGrouping(value: string) {\n // A negative or a negative value may cause an incorrect group length compared to groupSize. To avoid this, the negative or positive sign must be removed from the value.\n const absStringValue = value.replace(\"-\", \"\").replace(\"+\", \"\");\n\n if (!absStringValue.includes(this.groupingSeparator)) {\n return true;\n }\n\n let integer = absStringValue;\n if (\n this.decimalSeparator !== \"\" &&\n absStringValue.includes(this.decimalSeparator)\n ) {\n // decimal before grouping\n if (\n absStringValue.indexOf(this.decimalSeparator) <\n absStringValue.indexOf(this.groupingSeparator)\n ) {\n return false;\n }\n\n integer = absStringValue.substring(\n 0,\n absStringValue.indexOf(this.decimalSeparator),\n );\n }\n\n let groups = integer.split(this.groupingSeparator);\n\n // when the first item is smaller than group size, remove it from check\n if (groups[0].length < this.groupSize) {\n groups = groups.slice(1);\n }\n\n return groups.every((group) => group.length === this.groupSize);\n }\n\n /**\n */\n validate(value: string | number): boolean {\n return (\n this.groupingSeparator === \"\" ||\n typeof value !== \"string\" ||\n !value.includes(this.groupingSeparator) ||\n this.hasCorrectGrouping(value)\n );\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default NumberGroupingConstraint;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,MAAMC,qBAAqB,GAAG,CAAC;;AAE/B;AACA;AACA,MAAMC,wBAAwB,CAA6B;EAKzD;AACF;EACEC,WAAWA,CAAA,EAIT;IAAA,IAHAC,iBAAyB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;IAAA,IAC/BG,gBAAwB,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;IAAA,IAC9BI,MAAe,GAAAJ,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;IAAA,IAAAK,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC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ACmB,kBAAkB,CAACC,KAAK,CAAC;EAElC;;EAEA;AACF;EACE,IAAIc,qBAAqBA,CAAA,EAAY;IACnC,OAAO,KAAK;EACd;AACF;AAAC,IAAAC,QAAA,GAEcrC,wBAAwB;AAAAsC,OAAA,CAAA7B,OAAA,GAAA4B,QAAA"}
|
package/lib/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js.flow
CHANGED
|
@@ -44,7 +44,7 @@ describe("dateBoundaryConstraint", () => {
|
|
|
44
44
|
"date",
|
|
45
45
|
"2010-01-01",
|
|
46
46
|
"2010-12-31",
|
|
47
|
-
"yyyy-MM-dd"
|
|
47
|
+
"yyyy-MM-dd",
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
expect(yearConstraint.validate("2009-01-01")).toBeFalsy();
|
|
@@ -66,7 +66,7 @@ describe("dateBoundaryConstraint", () => {
|
|
|
66
66
|
"date",
|
|
67
67
|
"2010-01-01",
|
|
68
68
|
"2010-01-01",
|
|
69
|
-
"yyyy-MM-dd"
|
|
69
|
+
"yyyy-MM-dd",
|
|
70
70
|
);
|
|
71
71
|
expect(dayConstraint.validate("2010-01-01")).toBeTruthy();
|
|
72
72
|
expect(dayConstraint.validate("2010-01-02")).toBeFalsy();
|
|
@@ -77,7 +77,7 @@ describe("dateBoundaryConstraint", () => {
|
|
|
77
77
|
"datetime",
|
|
78
78
|
"2020-05-01T08:00:00",
|
|
79
79
|
"2020-05-01T10:00:00",
|
|
80
|
-
"dd-MM-yyyy HH:mm:ss"
|
|
80
|
+
"dd-MM-yyyy HH:mm:ss",
|
|
81
81
|
);
|
|
82
82
|
|
|
83
83
|
expect(exactDateConstraint.validate("01-04-2020 09:00:00")).toBeFalsy();
|
|
@@ -87,7 +87,7 @@ describe("dateBoundaryConstraint", () => {
|
|
|
87
87
|
"datetime",
|
|
88
88
|
"2020-05-01T08:00:00",
|
|
89
89
|
"2020-05-10T10:00:00",
|
|
90
|
-
"dd-MM-yyyy HH:mm:ss"
|
|
90
|
+
"dd-MM-yyyy HH:mm:ss",
|
|
91
91
|
);
|
|
92
92
|
|
|
93
93
|
expect(betweenDatesConstraint.validate("01-05-2020 08:00:00")).toBeTruthy();
|
|
@@ -98,7 +98,7 @@ describe("dateBoundaryConstraint", () => {
|
|
|
98
98
|
"datetime",
|
|
99
99
|
"2020-01-01T08:00:00",
|
|
100
100
|
null,
|
|
101
|
-
"dd-MM-yyyy HH:mm:ss"
|
|
101
|
+
"dd-MM-yyyy HH:mm:ss",
|
|
102
102
|
);
|
|
103
103
|
|
|
104
104
|
expect(minDateConstraint.validate("01-07-2020 08:00:00")).toBeTruthy();
|
|
@@ -108,7 +108,7 @@ describe("dateBoundaryConstraint", () => {
|
|
|
108
108
|
"datetime",
|
|
109
109
|
null,
|
|
110
110
|
"2020-08-17T13:40:46",
|
|
111
|
-
"dd-MM-yyyy HH:mm:ss"
|
|
111
|
+
"dd-MM-yyyy HH:mm:ss",
|
|
112
112
|
);
|
|
113
113
|
|
|
114
114
|
expect(maxDateConstraint.validate("01-07-2020 08:00:00")).toBeTruthy();
|
package/lib/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js.flow
CHANGED
|
@@ -4,7 +4,7 @@ describe("dateTimeDateFormatConstraint", () => {
|
|
|
4
4
|
it("dateTimeDateFormatConstraint checks for date", () => {
|
|
5
5
|
const constraint = new DateTimeDateFormatConstraint(
|
|
6
6
|
"dd-MM-yyyy",
|
|
7
|
-
"dd-mm-jjjj"
|
|
7
|
+
"dd-mm-jjjj",
|
|
8
8
|
);
|
|
9
9
|
|
|
10
10
|
expect(constraint.hasValidation()).toBe(true);
|
|
@@ -14,7 +14,7 @@ describe("dateTimeDateFormatConstraint", () => {
|
|
|
14
14
|
expect(constraint.format).toBe("dd-MM-yyyy");
|
|
15
15
|
|
|
16
16
|
expect(constraint.defaultMessage).toBe(
|
|
17
|
-
"Date must be entered in the format ${format}"
|
|
17
|
+
"Date must be entered in the format ${format}",
|
|
18
18
|
);
|
|
19
19
|
expect(constraint.formatLabel).toBe("dd-mm-jjjj");
|
|
20
20
|
|
package/lib/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js.flow
CHANGED
|
@@ -11,7 +11,7 @@ describe("dateTimeDateFormatConstraint", () => {
|
|
|
11
11
|
expect(constraint.format).toBe("HH:mm:ss");
|
|
12
12
|
|
|
13
13
|
expect(constraint.defaultMessage).toBe(
|
|
14
|
-
"Time must be entered in the format ${format}"
|
|
14
|
+
"Time must be entered in the format ${format}",
|
|
15
15
|
);
|
|
16
16
|
expect(constraint.formatLabel).toBe("hh:mm:ss");
|
|
17
17
|
|
|
@@ -27,7 +27,7 @@ describe("dateTimeDateFormatConstraint", () => {
|
|
|
27
27
|
it("validates am/pm", () => {
|
|
28
28
|
const constraint = new DateTimeTimeFormatConstraint(
|
|
29
29
|
"hh:mm a",
|
|
30
|
-
"hh:mm am/pm"
|
|
30
|
+
"hh:mm am/pm",
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
expect(constraint.hasValidation()).toBe(true);
|
package/lib/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js.flow
CHANGED
|
@@ -5,7 +5,7 @@ describe("datetimeFormatConstraint", () => {
|
|
|
5
5
|
const constraint = new DatetimeFormatConstraint(
|
|
6
6
|
"datetime",
|
|
7
7
|
"dd-MM-yyyy HH:mm",
|
|
8
|
-
"dd-mm-yyyy hh:mm"
|
|
8
|
+
"dd-mm-yyyy hh:mm",
|
|
9
9
|
);
|
|
10
10
|
|
|
11
11
|
expect(constraint.hasValidation()).toBe(true);
|
|
@@ -15,7 +15,7 @@ describe("datetimeFormatConstraint", () => {
|
|
|
15
15
|
expect(constraint.format).toBe("dd-MM-yyyy HH:mm");
|
|
16
16
|
|
|
17
17
|
expect(constraint.defaultMessage).toBe(
|
|
18
|
-
"Date and time should both be entered"
|
|
18
|
+
"Date and time should both be entered",
|
|
19
19
|
);
|
|
20
20
|
expect(constraint.formatLabel).toBe("dd-mm-yyyy hh:mm");
|
|
21
21
|
|
|
@@ -28,7 +28,7 @@ describe("datetimeFormatConstraint", () => {
|
|
|
28
28
|
const constraint = new DatetimeFormatConstraint(
|
|
29
29
|
"datetime",
|
|
30
30
|
"dd-MM-yyyy hh:mm a",
|
|
31
|
-
"dd-mm-yyyy hh:mm am/pm"
|
|
31
|
+
"dd-mm-yyyy hh:mm am/pm",
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
expect(constraint.hasValidation()).toBe(true);
|
|
@@ -58,7 +58,7 @@ describe("datetimeFormatConstraint", () => {
|
|
|
58
58
|
const constraint = new DatetimeFormatConstraint(
|
|
59
59
|
"timestamp",
|
|
60
60
|
"dd-MM-yyyy HH:mm:ss.SSS",
|
|
61
|
-
"dd-mm-yyyy hh:mm:ss.sss"
|
|
61
|
+
"dd-mm-yyyy hh:mm:ss.sss",
|
|
62
62
|
);
|
|
63
63
|
|
|
64
64
|
expect(constraint.id).toBe("Constraint.DateTime.MissingValue");
|
|
@@ -68,7 +68,7 @@ describe("datetimeFormatConstraint", () => {
|
|
|
68
68
|
expect(constraint.hasValidation()).toBe(true);
|
|
69
69
|
|
|
70
70
|
expect(constraint.defaultMessage).toBe(
|
|
71
|
-
"Date and time should both be entered"
|
|
71
|
+
"Date and time should both be entered",
|
|
72
72
|
);
|
|
73
73
|
expect(constraint.formatLabel).toBe("dd-mm-yyyy hh:mm:ss.sss");
|
|
74
74
|
|
package/lib/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js.flow
CHANGED
|
@@ -3,19 +3,19 @@ import NumberBoundaryConstraint from "../NumberBoundaryConstraint";
|
|
|
3
3
|
describe("numberBoundaryConstraint", () => {
|
|
4
4
|
it("retrieves correct id", () => {
|
|
5
5
|
expect(new NumberBoundaryConstraint().id).toBe(
|
|
6
|
-
"Constraint.Number.NoBoundaryConstraint"
|
|
6
|
+
"Constraint.Number.NoBoundaryConstraint",
|
|
7
7
|
);
|
|
8
8
|
expect(new NumberBoundaryConstraint(1, 1).id).toBe(
|
|
9
|
-
"Constraint.Number.InexactNumber"
|
|
9
|
+
"Constraint.Number.InexactNumber",
|
|
10
10
|
);
|
|
11
11
|
expect(new NumberBoundaryConstraint(1, 100).id).toBe(
|
|
12
|
-
"Constraint.Number.OutOfRange"
|
|
12
|
+
"Constraint.Number.OutOfRange",
|
|
13
13
|
);
|
|
14
14
|
expect(new NumberBoundaryConstraint(1).id).toBe(
|
|
15
|
-
"Constraint.Number.BelowMinimum"
|
|
15
|
+
"Constraint.Number.BelowMinimum",
|
|
16
16
|
);
|
|
17
17
|
expect(new NumberBoundaryConstraint(null, 100).id).toBe(
|
|
18
|
-
"Constraint.Number.AboveMaximum"
|
|
18
|
+
"Constraint.Number.AboveMaximum",
|
|
19
19
|
);
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -25,7 +25,7 @@ describe("numberBoundaryConstraint", () => {
|
|
|
25
25
|
1000,
|
|
26
26
|
".",
|
|
27
27
|
",",
|
|
28
|
-
"##.00"
|
|
28
|
+
"##.00",
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
expect(betweenConstraint.hasValidation()).toBe(true);
|
package/lib/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js.flow
CHANGED
|
@@ -66,7 +66,7 @@ describe("numberFormatConstraint", () => {
|
|
|
66
66
|
|
|
67
67
|
const onlyDecimal = new NumberFormatConstraint(".", ",", "###.##");
|
|
68
68
|
expect(onlyDecimal.defaultMessage).toBe(
|
|
69
|
-
"The value is not correct numeric format"
|
|
69
|
+
"The value is not correct numeric format",
|
|
70
70
|
);
|
|
71
71
|
expect(onlyDecimal.parameters).toStrictEqual({ "max-digits": 2 });
|
|
72
72
|
|
|
@@ -97,7 +97,7 @@ describe("numberFormatConstraint", () => {
|
|
|
97
97
|
const constraintGroupingDot = new NumberFormatConstraint(
|
|
98
98
|
".",
|
|
99
99
|
",",
|
|
100
|
-
"##,##.##"
|
|
100
|
+
"##,##.##",
|
|
101
101
|
);
|
|
102
102
|
expect(constraintGroupingDot.validate("1000000")).toBe(true);
|
|
103
103
|
expect(constraintGroupingDot.validate("1.00.00.00")).toBe(true);
|
|
@@ -114,7 +114,7 @@ describe("numberFormatConstraint", () => {
|
|
|
114
114
|
const constraintGroupingComma = new NumberFormatConstraint(
|
|
115
115
|
",",
|
|
116
116
|
".",
|
|
117
|
-
"##,##.##"
|
|
117
|
+
"##,##.##",
|
|
118
118
|
);
|
|
119
119
|
expect(constraintGroupingComma.validate("1000000")).toBe(true);
|
|
120
120
|
expect(constraintGroupingComma.validate("1.00.00.00")).toBe(false);
|
package/lib/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js.flow
CHANGED
|
@@ -45,7 +45,7 @@ describe("numberGroupingConstraint", () => {
|
|
|
45
45
|
const constraintGroupingDot = new NumberGroupingConstraint(
|
|
46
46
|
".",
|
|
47
47
|
",",
|
|
48
|
-
"##,##.##"
|
|
48
|
+
"##,##.##",
|
|
49
49
|
);
|
|
50
50
|
expect(constraintGroupingDot.validate("1000000")).toBe(true);
|
|
51
51
|
expect(constraintGroupingDot.validate("1.00.00.00")).toBe(true);
|
|
@@ -62,7 +62,7 @@ describe("numberGroupingConstraint", () => {
|
|
|
62
62
|
const constraintGroupingComma = new NumberGroupingConstraint(
|
|
63
63
|
",",
|
|
64
64
|
".",
|
|
65
|
-
"##,##.##"
|
|
65
|
+
"##,##.##",
|
|
66
66
|
);
|
|
67
67
|
expect(constraintGroupingComma.validate("1000000")).toBe(true);
|
|
68
68
|
expect(constraintGroupingComma.validate("1.00.00.00")).toBe(true);
|