@beinformed/ui 1.23.2 → 1.24.0
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 +11 -6
- package/esm/builder/index.js +1 -0
- package/esm/builder/index.js.map +1 -1
- package/esm/builder/mergeLayoutHintConfigurations.js +1 -11
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/Constants.js +23 -28
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/LayoutHintConfig.js +1 -0
- package/esm/constants/LayoutHintConfig.js.map +1 -1
- package/esm/constants/LayoutHints.js +11 -27
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js +9 -15
- package/esm/constants/Settings.js.map +1 -1
- package/esm/constants/index.js +1 -0
- package/esm/constants/index.js.map +1 -1
- package/esm/exceptions/ConfigurationException.js +2 -2
- package/esm/exceptions/ConfigurationException.js.map +1 -1
- package/esm/exceptions/FetchException.js +9 -28
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/IllegalArgumentException.js +1 -2
- package/esm/exceptions/IllegalArgumentException.js.map +1 -1
- package/esm/exceptions/IllegalReturnException.js +1 -2
- package/esm/exceptions/IllegalReturnException.js.map +1 -1
- package/esm/exceptions/IllegalStateException.js +1 -2
- package/esm/exceptions/IllegalStateException.js.map +1 -1
- package/esm/exceptions/JsonParseException.js +1 -2
- package/esm/exceptions/JsonParseException.js.map +1 -1
- package/esm/exceptions/MissingPropertyException.js +1 -2
- package/esm/exceptions/MissingPropertyException.js.map +1 -1
- package/esm/exceptions/NetworkException.js +1 -10
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/NotAllowedUriException.js +1 -2
- package/esm/exceptions/NotAllowedUriException.js.map +1 -1
- package/esm/exceptions/NotFoundException.js +1 -11
- package/esm/exceptions/NotFoundException.js.map +1 -1
- package/esm/exceptions/ServerRequestException.js +1 -2
- package/esm/exceptions/ServerRequestException.js.map +1 -1
- package/esm/exceptions/ThemePropertyException.js +1 -2
- package/esm/exceptions/ThemePropertyException.js.map +1 -1
- package/esm/exceptions/TimeoutException.js +1 -6
- package/esm/exceptions/TimeoutException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js +1 -10
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/exceptions/UnsupportedOperationException.js +1 -2
- package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
- package/esm/exceptions/index.js +1 -0
- package/esm/exceptions/index.js.map +1 -1
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/useAllFormsOnModel.js +0 -16
- package/esm/hooks/useAllFormsOnModel.js.map +1 -1
- package/esm/hooks/useAuthentication.js +9 -23
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useContent.js +3 -10
- package/esm/hooks/useContent.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js +2 -6
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js +4 -13
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useI18n.js +3 -7
- package/esm/hooks/useI18n.js.map +1 -1
- package/esm/hooks/useModal.js +0 -3
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModelCatalog.js +10 -21
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModels.js +1 -1
- package/esm/hooks/useModels.js.map +1 -1
- package/esm/hooks/useModularUI.js +7 -11
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js +2 -12
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js +11 -10
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js +2 -1
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/hooks/useNotification.js +2 -2
- package/esm/hooks/useNotification.js.map +1 -1
- package/esm/hooks/usePreference.js +1 -1
- package/esm/hooks/usePreference.js.map +1 -1
- package/esm/hooks/useProgressIndicator.js +3 -2
- package/esm/hooks/useProgressIndicator.js.map +1 -1
- package/esm/hooks/useRouter.js +7 -10
- package/esm/hooks/useRouter.js.map +1 -1
- package/esm/i18n/Locale.js +15 -40
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js +13 -33
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/i18n/Message.js +3 -5
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/index.js +1 -0
- package/esm/i18n/index.js.map +1 -1
- package/esm/i18n/languages.js +1 -0
- package/esm/i18n/languages.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js +1 -0
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js +1 -0
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/esm/i18n/withMessage.js +1 -4
- package/esm/i18n/withMessage.js.map +1 -1
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -1
- package/esm/models/actions/ActionCollection.js +13 -26
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js +23 -60
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js +14 -34
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js +27 -81
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js +23 -56
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js +33 -83
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js +102 -258
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js +6 -17
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js +29 -76
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/CaptchaAttributeModel.js +5 -8
- package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js +38 -108
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js +27 -80
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js +34 -102
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js +23 -64
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js +40 -99
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js +51 -145
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/HelptextAttributeModel.js +7 -17
- package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/esm/models/attributes/LabelAttributeModel.js +4 -8
- package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
- package/esm/models/attributes/MemoAttributeModel.js +6 -10
- package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
- package/esm/models/attributes/MoneyAttributeModel.js +5 -10
- package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/esm/models/attributes/NumberAttributeModel.js +22 -49
- package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js +23 -65
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js +29 -72
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/UploadAttributeModel.js +21 -62
- package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
- package/esm/models/attributes/XMLAttributeModel.js +5 -10
- package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js +7 -21
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/BSNConstraint.js +8 -19
- package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintCollection.js +3 -10
- package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintModel.js +6 -22
- package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js +16 -59
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +8 -22
- package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +8 -22
- package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js +10 -28
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.js +7 -18
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileSizeConstraint.js +10 -24
- package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/IBANConstraint.js +6 -13
- package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js +8 -15
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js +8 -25
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js +17 -53
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.js +15 -41
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js +15 -39
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js +8 -20
- package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +7 -12
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +7 -17
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +7 -17
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +8 -22
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RangeConstraint.js +22 -57
- package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RegexConstraint.js +7 -18
- package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/StringLengthConstraint.js +14 -50
- package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/XMLConstraint.js +8 -17
- package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js +9 -17
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js +30 -84
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +5 -11
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +4 -10
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/esm/models/base/BaseCollection.js +27 -67
- package/esm/models/base/BaseCollection.js.map +1 -1
- package/esm/models/base/BaseModel.js +14 -39
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceCollection.js +2 -5
- package/esm/models/base/ResourceCollection.js.map +1 -1
- package/esm/models/base/ResourceModel.js +21 -53
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js +16 -46
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js +10 -39
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js +32 -85
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js +12 -36
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js +16 -45
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js +7 -20
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/ConceptRelationModel.js +8 -22
- package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
- package/esm/models/concepts/ConceptTypeDetailModel.js +12 -25
- package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js +2 -5
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js +10 -21
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js +13 -37
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js +19 -56
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js +22 -59
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js +17 -45
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/ContentTypeModel.js +8 -16
- package/esm/models/content/ContentTypeModel.js.map +1 -1
- package/esm/models/content/SectionModel.js +20 -57
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/content/SubSectionModel.js +16 -43
- package/esm/models/content/SubSectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfiguration.js +6 -20
- package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js +11 -48
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.js +3 -13
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js +5 -15
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationResults.js +13 -32
- package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/esm/models/detail/DetailModel.js +21 -54
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorCollection.js +11 -29
- package/esm/models/error/ErrorCollection.js.map +1 -1
- package/esm/models/error/ErrorModel.js +8 -21
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/error/ErrorResponse.js +37 -93
- package/esm/models/error/ErrorResponse.js.map +1 -1
- package/esm/models/filters/AssignmentFilterModel.js +19 -45
- package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js +25 -58
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/ConceptIndexFilterModel.js +1 -5
- package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js +11 -44
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/filters/FilterModel.js +2 -1
- package/esm/models/filters/FilterModel.js.map +1 -1
- package/esm/models/filters/RangeFilterModel.js +1 -6
- package/esm/models/filters/RangeFilterModel.js.map +1 -1
- package/esm/models/form/FormModel.js +136 -332
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js +55 -141
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js +20 -58
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/href/Href.js +47 -121
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/href/ListHref.js +11 -32
- package/esm/models/href/ListHref.js.map +1 -1
- package/esm/models/index.js +1 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js +9 -32
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js +15 -44
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js +21 -57
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js +5 -21
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListDetailModel.js +31 -79
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListHeaderModel.js +10 -28
- package/esm/models/list/ListHeaderModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js +4 -20
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js +7 -23
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js +38 -115
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js +4 -6
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js +5 -16
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js +6 -14
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/paging/PagesizeModel.js +4 -12
- package/esm/models/paging/PagesizeModel.js.map +1 -1
- package/esm/models/paging/PagingModel.js +11 -26
- package/esm/models/paging/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js +14 -41
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/parameter/Parameter.js +14 -41
- package/esm/models/parameter/Parameter.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js +10 -24
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js +2 -7
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/search/CaseSearchModel.js +3 -9
- package/esm/models/search/CaseSearchModel.js.map +1 -1
- package/esm/models/sorting/SortOptionModel.js +15 -41
- package/esm/models/sorting/SortOptionModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js +9 -28
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js +14 -41
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupCollection.js +1 -2
- package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js +7 -17
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/user/UserModel.js +5 -10
- package/esm/models/user/UserModel.js.map +1 -1
- package/esm/models/user/UserProfileModel.js +2 -10
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/models/user/UserServicesModel.js +11 -27
- package/esm/models/user/UserServicesModel.js.map +1 -1
- package/esm/modularui/Authenticate.js +21 -56
- package/esm/modularui/Authenticate.js.map +1 -1
- package/esm/modularui/ModularUIError.js +3 -8
- package/esm/modularui/ModularUIError.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js +89 -193
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/ModularUIResponse.js +13 -37
- package/esm/modularui/ModularUIResponse.js.map +1 -1
- package/esm/modularui/index.js +1 -0
- package/esm/modularui/index.js.map +1 -1
- package/esm/react/ErrorBoundary.js +2 -12
- package/esm/react/ErrorBoundary.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.js +2 -2
- package/esm/react/ErrorBoundaryFallback.js.map +1 -1
- package/esm/react/index.js +1 -0
- package/esm/react/index.js.map +1 -1
- package/esm/react/utils.js +3 -7
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/Init.js +1 -2
- package/esm/react-client/Init.js.map +1 -1
- package/esm/react-client/client.js +15 -29
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.js +3 -8
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/index.js +1 -0
- package/esm/react-client/index.js.map +1 -1
- package/esm/react-client/rehydrate.js +4 -19
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/contextPath.js +2 -2
- package/esm/react-server/contextPath.js.map +1 -1
- package/esm/react-server/createSSRComplete.js +2 -12
- package/esm/react-server/createSSRComplete.js.map +1 -1
- package/esm/react-server/htmlpage.js +25 -12
- package/esm/react-server/htmlpage.js.map +1 -1
- package/esm/react-server/index.js +1 -0
- package/esm/react-server/index.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js +4 -4
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js +1 -2
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/requestInformation.js +7 -12
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverNoSSR.js +3 -7
- package/esm/react-server/serverNoSSR.js.map +1 -1
- package/esm/react-server/serverSSR.js +1 -2
- package/esm/react-server/serverSSR.js.map +1 -1
- package/esm/react-server/serverUtil.js +13 -37
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/ThemeProvider.js +1 -2
- package/esm/react-theme/ThemeProvider.js.map +1 -1
- package/esm/react-theme/createTheme.js +7 -20
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/index.js +1 -0
- package/esm/react-theme/index.js.map +1 -1
- package/esm/react-theme/useTheme.js +1 -2
- package/esm/react-theme/useTheme.js.map +1 -1
- package/esm/react-theme/utils/background.js +2 -5
- package/esm/react-theme/utils/background.js.map +1 -1
- package/esm/react-theme/utils/colors.js +3 -9
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js +8 -27
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js +4 -10
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js +7 -22
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js +8 -22
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/actions.js +3 -3
- package/esm/redux/_i18n/actions.js.map +1 -1
- package/esm/redux/_i18n/index.js +1 -0
- package/esm/redux/_i18n/index.js.map +1 -1
- package/esm/redux/_i18n/reducer.js +13 -16
- package/esm/redux/_i18n/reducer.js.map +1 -1
- package/esm/redux/_modularui/actions.js +36 -48
- package/esm/redux/_modularui/actions.js.map +1 -1
- package/esm/redux/_modularui/connector.js +21 -18
- package/esm/redux/_modularui/connector.js.map +1 -1
- package/esm/redux/_modularui/index.js +1 -0
- package/esm/redux/_modularui/index.js.map +1 -1
- package/esm/redux/_modularui/middleware.js +8 -22
- package/esm/redux/_modularui/middleware.js.map +1 -1
- package/esm/redux/_modularui/modularuiUtils.js +10 -25
- package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
- package/esm/redux/_modularui/reducer.js +19 -39
- package/esm/redux/_modularui/reducer.js.map +1 -1
- package/esm/redux/_modularui/selectors.js +20 -62
- package/esm/redux/_modularui/selectors.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js +3 -3
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/actions.js +7 -5
- package/esm/redux/_router/actions.js.map +1 -1
- package/esm/redux/_router/connectors.js +11 -14
- package/esm/redux/_router/connectors.js.map +1 -1
- package/esm/redux/_router/index.js +1 -0
- package/esm/redux/_router/index.js.map +1 -1
- package/esm/redux/_router/middleware.js +2 -1
- package/esm/redux/_router/middleware.js.map +1 -1
- package/esm/redux/_router/reducer.js +3 -3
- package/esm/redux/_router/reducer.js.map +1 -1
- package/esm/redux/actions/Application.js +2 -4
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js +8 -14
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js +5 -13
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/Form.js +2 -3
- package/esm/redux/actions/Form.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js +1 -9
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js +3 -3
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js +4 -6
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js +1 -4
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js +3 -7
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Modals.js +3 -1
- package/esm/redux/actions/Modals.js.map +1 -1
- package/esm/redux/actions/Notification.js +5 -10
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js +14 -26
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/ProgressIndicator.js +5 -4
- package/esm/redux/actions/ProgressIndicator.js.map +1 -1
- package/esm/redux/actions/SignIn.js +5 -8
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/actions/SignOut.js +2 -2
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/actions/index.js +1 -0
- package/esm/redux/actions/index.js.map +1 -1
- package/esm/redux/connectors/Application.js +1 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js +2 -3
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js +1 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js +2 -5
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js +1 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js +2 -5
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js +2 -5
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js +3 -10
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js +2 -3
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js +1 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/Modal.js +1 -5
- package/esm/redux/connectors/Modal.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js +1 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/Notification.js +2 -3
- package/esm/redux/connectors/Notification.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js +1 -5
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js +2 -4
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/Progress.js +2 -1
- package/esm/redux/connectors/Progress.js.map +1 -1
- package/esm/redux/connectors/ProgressIndicator.js +2 -3
- package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js +2 -1
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/SignIn.js +3 -6
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js +4 -6
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/connectors/Tab.js +1 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/connectors/index.js +1 -0
- package/esm/redux/connectors/index.js.map +1 -1
- package/esm/redux/index.js +16 -7
- package/esm/redux/index.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js +13 -14
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js +3 -4
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js +11 -15
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js +7 -8
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js +7 -7
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js +11 -15
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/reducers/createReducer.js +1 -1
- package/esm/redux/reducers/createReducer.js.map +1 -1
- package/esm/redux/reducers/index.js +1 -0
- package/esm/redux/reducers/index.js.map +1 -1
- package/esm/redux/selectors/i18n.js +5 -4
- package/esm/redux/selectors/i18n.js.map +1 -1
- package/esm/redux/selectors/index.js +1 -0
- package/esm/redux/selectors/index.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js +2 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js +3 -7
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/utils/browser/Cache.js +17 -44
- package/esm/utils/browser/Cache.js.map +1 -1
- package/esm/utils/browser/Cookies.js +4 -9
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js +53 -110
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/esm/utils/fetch/serverFetch.js +2 -8
- package/esm/utils/fetch/serverFetch.js.map +1 -1
- package/esm/utils/fetch/universalFetch.js +6 -17
- package/esm/utils/fetch/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.js +42 -101
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/checkResource.js +6 -6
- package/esm/utils/helpers/checkResource.js.map +1 -1
- package/esm/utils/helpers/createHash.js +3 -5
- package/esm/utils/helpers/createHash.js.map +1 -1
- package/esm/utils/helpers/createUUID.js +1 -1
- package/esm/utils/helpers/createUUID.js.map +1 -1
- package/esm/utils/helpers/objects.js +5 -8
- package/esm/utils/helpers/objects.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js +7 -9
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/helpers/text.js +2 -3
- package/esm/utils/helpers/text.js.map +1 -1
- package/esm/utils/index.js +8 -3
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/number/DecimalFormat.js +43 -124
- package/esm/utils/number/DecimalFormat.js.map +1 -1
- package/esm/utils/number/formatValue.js +5 -18
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js +5 -17
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/builder/index.js +0 -3
- package/lib/builder/index.js.map +1 -1
- package/lib/builder/mergeLayoutHintConfigurations.js +1 -13
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/Constants.js +25 -32
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/LayoutHintConfig.js.map +1 -1
- package/lib/constants/LayoutHints.js +9 -29
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js +9 -38
- package/lib/constants/Settings.js.map +1 -1
- package/lib/constants/index.js +0 -7
- package/lib/constants/index.js.map +1 -1
- package/lib/exceptions/ConfigurationException.js +0 -2
- package/lib/exceptions/ConfigurationException.js.map +1 -1
- package/lib/exceptions/FetchException.js +9 -27
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/IllegalArgumentException.js +0 -3
- package/lib/exceptions/IllegalArgumentException.js.map +1 -1
- package/lib/exceptions/IllegalReturnException.js +0 -3
- package/lib/exceptions/IllegalReturnException.js.map +1 -1
- package/lib/exceptions/IllegalStateException.js +0 -3
- package/lib/exceptions/IllegalStateException.js.map +1 -1
- package/lib/exceptions/JsonParseException.js +0 -3
- package/lib/exceptions/JsonParseException.js.map +1 -1
- package/lib/exceptions/MissingPropertyException.js +0 -3
- package/lib/exceptions/MissingPropertyException.js.map +1 -1
- package/lib/exceptions/NetworkException.js +1 -10
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/NotAllowedUriException.js +0 -3
- package/lib/exceptions/NotAllowedUriException.js.map +1 -1
- package/lib/exceptions/NotFoundException.js +1 -10
- package/lib/exceptions/NotFoundException.js.map +1 -1
- package/lib/exceptions/ServerRequestException.js +0 -3
- package/lib/exceptions/ServerRequestException.js.map +1 -1
- package/lib/exceptions/ThemePropertyException.js +0 -3
- package/lib/exceptions/ThemePropertyException.js.map +1 -1
- package/lib/exceptions/TimeoutException.js +1 -10
- package/lib/exceptions/TimeoutException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js +1 -9
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/exceptions/UnsupportedOperationException.js +0 -3
- package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
- package/lib/exceptions/index.js +0 -16
- package/lib/exceptions/index.js.map +1 -1
- package/lib/hooks/index.js +0 -33
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useAllFormsOnModel.js +0 -23
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js +8 -35
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js +3 -16
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js +1 -12
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js +3 -27
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js +3 -15
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js +0 -9
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js +9 -45
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModels.js +0 -3
- package/lib/hooks/useModels.js.map +1 -1
- package/lib/hooks/useModularUI.js +6 -19
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js +2 -17
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js +9 -39
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js +1 -7
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js +1 -7
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js +0 -4
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js +2 -4
- package/lib/hooks/useProgressIndicator.js.map +1 -1
- package/lib/hooks/useRouter.js +6 -20
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/i18n/Locale.js +15 -44
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js +13 -44
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js +2 -8
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/index.js +0 -9
- package/lib/i18n/index.js.map +1 -1
- package/lib/i18n/languages.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/lib/i18n/withMessage.js +1 -10
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/index.js +0 -13
- package/lib/index.js.map +1 -1
- package/lib/models/actions/ActionCollection.js +12 -33
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js +23 -68
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js +14 -41
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js +27 -87
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js +23 -65
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js +32 -89
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js +101 -254
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js +5 -20
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js +29 -83
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/CaptchaAttributeModel.js +3 -10
- package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js +38 -115
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js +26 -84
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +34 -108
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js +23 -70
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js +40 -109
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js +51 -159
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/HelptextAttributeModel.js +5 -20
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/LabelAttributeModel.js +3 -11
- package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
- package/lib/models/attributes/MemoAttributeModel.js +4 -13
- package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
- package/lib/models/attributes/MoneyAttributeModel.js +4 -14
- package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js +21 -61
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js +23 -75
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js +28 -79
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js +21 -66
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/XMLAttributeModel.js +4 -16
- package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js +7 -41
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/BSNConstraint.js +6 -19
- package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js +3 -15
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js +6 -19
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +16 -58
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +8 -22
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +8 -22
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +10 -27
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +7 -20
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js +10 -26
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js +5 -14
- package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js +6 -15
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +8 -25
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +17 -51
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +15 -44
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +15 -40
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +8 -20
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +5 -12
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +7 -18
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +7 -18
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +8 -24
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RangeConstraint.js +22 -57
- package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RegexConstraint.js +7 -19
- package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js +13 -50
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/XMLConstraint.js +6 -17
- package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +8 -18
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js +30 -88
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +4 -19
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +3 -13
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/base/BaseCollection.js +26 -73
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js +14 -40
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceCollection.js +1 -6
- package/lib/models/base/ResourceCollection.js.map +1 -1
- package/lib/models/base/ResourceModel.js +21 -53
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/caseview/CaseViewModel.js +16 -54
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js +10 -44
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js +32 -90
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js +12 -42
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js +16 -49
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js +6 -25
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/ConceptRelationModel.js +8 -23
- package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js +11 -26
- package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js +1 -11
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js +9 -22
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentIndexModel.js +12 -44
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js +19 -61
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js +21 -67
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js +17 -55
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/ContentTypeModel.js +7 -18
- package/lib/models/content/ContentTypeModel.js.map +1 -1
- package/lib/models/content/SectionModel.js +19 -62
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js +15 -51
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js +5 -25
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js +10 -45
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +2 -17
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +4 -16
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js +12 -37
- package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/lib/models/detail/DetailModel.js +21 -61
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js +10 -35
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js +6 -17
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/ErrorResponse.js +36 -96
- package/lib/models/error/ErrorResponse.js.map +1 -1
- package/lib/models/filters/AssignmentFilterModel.js +19 -45
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js +24 -60
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/ConceptIndexFilterModel.js +0 -9
- package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js +11 -55
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/FilterModel.js +0 -3
- package/lib/models/filters/FilterModel.js.map +1 -1
- package/lib/models/filters/RangeFilterModel.js +1 -10
- package/lib/models/filters/RangeFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js +135 -328
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js +55 -144
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/grouping/GroupingModel.js +20 -58
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/href/Href.js +47 -123
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/ListHref.js +11 -29
- package/lib/models/href/ListHref.js.map +1 -1
- package/lib/models/index.js +0 -97
- package/lib/models/index.js.map +1 -1
- package/lib/models/layouthint/LayoutHintCollection.js +8 -40
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js +15 -51
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js +20 -62
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/normalizeLinkJSON.js +5 -21
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListDetailModel.js +31 -84
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListHeaderModel.js +10 -30
- package/lib/models/list/ListHeaderModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js +4 -24
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js +7 -29
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js +38 -123
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/lookup/LookupOptionCollection.js +2 -8
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js +5 -19
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/modelcatalog/ModelCatalogModel.js +4 -17
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagesizeModel.js +4 -13
- package/lib/models/paging/PagesizeModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js +10 -26
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js +14 -47
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/parameter/Parameter.js +13 -42
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js +9 -29
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/resolveModel.js +1 -33
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/search/CaseSearchModel.js +3 -12
- package/lib/models/search/CaseSearchModel.js.map +1 -1
- package/lib/models/sorting/SortOptionModel.js +13 -39
- package/lib/models/sorting/SortOptionModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js +8 -35
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/tab/TabModel.js +14 -48
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupCollection.js +0 -4
- package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupModel.js +6 -19
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/user/UserModel.js +4 -12
- package/lib/models/user/UserModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js +2 -14
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js +11 -30
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js +20 -66
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/ModularUIError.js +3 -7
- package/lib/modularui/ModularUIError.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +89 -200
- package/lib/modularui/ModularUIRequest.js.flow +14 -0
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js +13 -34
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/modularui/index.js +0 -4
- package/lib/modularui/index.js.map +1 -1
- package/lib/react/ErrorBoundary.js +2 -14
- package/lib/react/ErrorBoundary.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js +1 -8
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react/index.js +0 -5
- package/lib/react/index.js.map +1 -1
- package/lib/react/utils.js +2 -13
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/Init.js +0 -8
- package/lib/react-client/Init.js.map +1 -1
- package/lib/react-client/client.js +16 -49
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.js +2 -9
- package/lib/react-client/contextPath.js.map +1 -1
- package/lib/react-client/index.js +0 -4
- package/lib/react-client/index.js.map +1 -1
- package/lib/react-client/rehydrate.js +3 -23
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/contextPath.js +1 -2
- package/lib/react-server/contextPath.js.map +1 -1
- package/lib/react-server/createSSRComplete.js +2 -16
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/htmlpage.js +25 -16
- package/lib/react-server/htmlpage.js.map +1 -1
- package/lib/react-server/index.js +0 -12
- package/lib/react-server/index.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js +3 -16
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js +0 -10
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js +6 -21
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverNoSSR.js +2 -14
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js +0 -8
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js +13 -60
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js +0 -6
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js +7 -23
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/index.js +0 -18
- package/lib/react-theme/index.js.map +1 -1
- package/lib/react-theme/useTheme.js +0 -3
- package/lib/react-theme/useTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js +1 -5
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js +2 -12
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js +7 -35
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js +3 -14
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js +6 -30
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js +7 -35
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/actions.js +2 -8
- package/lib/redux/_i18n/actions.js.map +1 -1
- package/lib/redux/_i18n/index.js +0 -5
- package/lib/redux/_i18n/index.js.map +1 -1
- package/lib/redux/_i18n/reducer.js +12 -21
- package/lib/redux/_i18n/reducer.js.map +1 -1
- package/lib/redux/_modularui/actions.js +36 -69
- package/lib/redux/_modularui/actions.js.map +1 -1
- package/lib/redux/_modularui/connector.js +20 -28
- package/lib/redux/_modularui/connector.js.map +1 -1
- package/lib/redux/_modularui/index.js +0 -14
- package/lib/redux/_modularui/index.js.map +1 -1
- package/lib/redux/_modularui/middleware.js +8 -28
- package/lib/redux/_modularui/middleware.js.map +1 -1
- package/lib/redux/_modularui/modularuiUtils.js +10 -36
- package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
- package/lib/redux/_modularui/reducer.js +19 -45
- package/lib/redux/_modularui/reducer.js.map +1 -1
- package/lib/redux/_modularui/selectors.js +20 -97
- package/lib/redux/_modularui/selectors.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js +2 -11
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/actions.js +5 -16
- package/lib/redux/_router/actions.js.map +1 -1
- package/lib/redux/_router/connectors.js +10 -15
- package/lib/redux/_router/connectors.js.map +1 -1
- package/lib/redux/_router/index.js +0 -9
- package/lib/redux/_router/index.js.map +1 -1
- package/lib/redux/_router/middleware.js +0 -2
- package/lib/redux/_router/middleware.js.map +1 -1
- package/lib/redux/_router/reducer.js +2 -4
- package/lib/redux/_router/reducer.js.map +1 -1
- package/lib/redux/actions/Application.js +1 -8
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js +6 -25
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js +4 -24
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js +1 -12
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js +0 -14
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js +2 -8
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js +3 -12
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js +0 -6
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js +2 -13
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Modals.js +1 -4
- package/lib/redux/actions/Modals.js.map +1 -1
- package/lib/redux/actions/Notification.js +4 -19
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js +13 -44
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js +3 -11
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js +5 -28
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/SignOut.js +1 -9
- package/lib/redux/actions/SignOut.js.map +1 -1
- package/lib/redux/actions/index.js +0 -31
- package/lib/redux/actions/index.js.map +1 -1
- package/lib/redux/connectors/Application.js +0 -2
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js +1 -4
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js +0 -2
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js +1 -7
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js +0 -2
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js +1 -7
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js +1 -8
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js +2 -19
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js +1 -5
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js +0 -3
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js +1 -7
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js +0 -2
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js +1 -4
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js +0 -7
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js +1 -5
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js +1 -4
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js +1 -3
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js +1 -7
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js +2 -8
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js +3 -8
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js +0 -2
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/connectors/index.js +0 -21
- package/lib/redux/connectors/index.js.map +1 -1
- package/lib/redux/index.js +0 -17
- package/lib/redux/index.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js +12 -14
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js +2 -4
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js +11 -18
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js +6 -8
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js +6 -7
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js +10 -15
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/createReducer.js +0 -11
- package/lib/redux/reducers/createReducer.js.map +1 -1
- package/lib/redux/reducers/index.js +0 -10
- package/lib/redux/reducers/index.js.map +1 -1
- package/lib/redux/selectors/i18n.js +3 -7
- package/lib/redux/selectors/i18n.js.map +1 -1
- package/lib/redux/selectors/index.js +0 -3
- package/lib/redux/selectors/index.js.map +1 -1
- package/lib/redux/store/beforeRenderHooks.js +0 -2
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js +2 -13
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/browser/Cache.js +16 -49
- package/lib/utils/browser/Cache.js.map +1 -1
- package/lib/utils/browser/Cookies.js +3 -14
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js +52 -115
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/serverFetch.js +2 -13
- package/lib/utils/fetch/serverFetch.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js +6 -25
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js +42 -111
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/checkResource.js +5 -11
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/createHash.js +1 -6
- package/lib/utils/helpers/createHash.js.map +1 -1
- package/lib/utils/helpers/createUUID.js +0 -2
- package/lib/utils/helpers/createUUID.js.map +1 -1
- package/lib/utils/helpers/objects.js +3 -15
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js +6 -13
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js +0 -4
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/index.js +0 -25
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js +43 -121
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/formatValue.js +3 -22
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js +3 -19
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +29 -29
- package/src/modularui/ModularUIRequest.js +14 -0
|
@@ -1,411 +1,330 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
2
2
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
3
3
|
import _startsWithInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/starts-with";
|
|
4
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
5
|
-
|
|
6
4
|
// @see: https://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html
|
|
7
|
-
|
|
8
5
|
/**
|
|
9
6
|
*/
|
|
10
7
|
class DecimalFormat {
|
|
11
8
|
// Grouping size
|
|
9
|
+
|
|
12
10
|
// Minimum integer digits to be displayed
|
|
11
|
+
|
|
13
12
|
// Minimum fractional digits to be displayed
|
|
13
|
+
|
|
14
14
|
// Maximum fractional digits to be displayed
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
*/
|
|
18
18
|
constructor(format) {
|
|
19
19
|
_defineProperty(this, "_prefix", void 0);
|
|
20
|
-
|
|
21
20
|
_defineProperty(this, "_suffix", void 0);
|
|
22
|
-
|
|
23
21
|
_defineProperty(this, "_comma", void 0);
|
|
24
|
-
|
|
25
22
|
_defineProperty(this, "_minInt", void 0);
|
|
26
|
-
|
|
27
23
|
_defineProperty(this, "_minFrac", void 0);
|
|
28
|
-
|
|
29
24
|
_defineProperty(this, "_maxFrac", void 0);
|
|
30
|
-
|
|
31
25
|
_defineProperty(this, "_isPercentage", void 0);
|
|
32
|
-
|
|
33
26
|
this.setAffix(format);
|
|
34
27
|
this.setFractionLengths(format);
|
|
35
28
|
this.setGroupLength(format);
|
|
36
29
|
this.setMinLength(format);
|
|
37
30
|
this.setPercentage();
|
|
38
31
|
}
|
|
32
|
+
|
|
39
33
|
/**
|
|
40
34
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
43
35
|
get prefix() {
|
|
44
36
|
return this._prefix;
|
|
45
37
|
}
|
|
38
|
+
|
|
46
39
|
/**
|
|
47
40
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
41
|
get suffix() {
|
|
51
42
|
return this._suffix;
|
|
52
43
|
}
|
|
44
|
+
|
|
53
45
|
/**
|
|
54
46
|
*/
|
|
55
|
-
|
|
56
|
-
|
|
57
47
|
get comma() {
|
|
58
48
|
return this._comma;
|
|
59
49
|
}
|
|
50
|
+
|
|
60
51
|
/**
|
|
61
52
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
53
|
get minInt() {
|
|
65
54
|
return this._minInt;
|
|
66
55
|
}
|
|
56
|
+
|
|
67
57
|
/**
|
|
68
58
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
59
|
get minFrac() {
|
|
72
60
|
return this._minFrac;
|
|
73
61
|
}
|
|
62
|
+
|
|
74
63
|
/**
|
|
75
64
|
*/
|
|
76
|
-
|
|
77
|
-
|
|
78
65
|
get maxFrac() {
|
|
79
66
|
return this._maxFrac;
|
|
80
67
|
}
|
|
68
|
+
|
|
81
69
|
/**
|
|
82
70
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
85
71
|
get isPercentage() {
|
|
86
72
|
return this._isPercentage;
|
|
87
73
|
}
|
|
74
|
+
|
|
88
75
|
/**
|
|
89
76
|
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
77
|
setAffix(format) {
|
|
93
78
|
const beforeDigit = _includesInstanceProperty(format).call(format, "#") ? format.substring(0, format.indexOf("#")) : format;
|
|
94
79
|
this._prefix = _includesInstanceProperty(beforeDigit).call(beforeDigit, "0") ? beforeDigit.substring(0, beforeDigit.indexOf("0")) : beforeDigit;
|
|
95
80
|
this._suffix = format.substring(this._prefix.length).replace(/[#,.0]/gu, "");
|
|
96
81
|
}
|
|
82
|
+
|
|
97
83
|
/**
|
|
98
84
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
85
|
setFractionLengths(format) {
|
|
102
86
|
this._minFrac = 0;
|
|
103
87
|
this._maxFrac = 0;
|
|
104
88
|
const numberStr = format.replace(/[^#,.0]/gu, "");
|
|
105
|
-
|
|
106
89
|
if (_includesInstanceProperty(numberStr).call(numberStr, ".")) {
|
|
107
90
|
const fracStr = numberStr.substring(numberStr.indexOf(".") + 1);
|
|
108
91
|
const maxFrac = fracStr.replace(/,|\.+/g, "");
|
|
109
|
-
this._maxFrac = maxFrac.length;
|
|
92
|
+
this._maxFrac = maxFrac.length;
|
|
110
93
|
|
|
94
|
+
// replace all but zeros
|
|
111
95
|
const minFrac = maxFrac.replace(/[^0]/gu, "");
|
|
112
96
|
this._minFrac = minFrac.length;
|
|
113
97
|
}
|
|
114
98
|
}
|
|
99
|
+
|
|
115
100
|
/**
|
|
116
101
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
102
|
setGroupLength(format) {
|
|
120
103
|
this._comma = 0;
|
|
121
104
|
const numberStr = format.replace(/[^#,.0]/gu, "");
|
|
122
105
|
const intStr = _includesInstanceProperty(numberStr).call(numberStr, ".") ? numberStr.substring(0, numberStr.indexOf(".")) : numberStr;
|
|
123
|
-
|
|
124
106
|
if (_includesInstanceProperty(intStr).call(intStr, ",")) {
|
|
125
107
|
this._comma = intStr.length - 1 - intStr.lastIndexOf(",");
|
|
126
108
|
}
|
|
127
109
|
}
|
|
110
|
+
|
|
128
111
|
/**
|
|
129
112
|
*/
|
|
130
|
-
|
|
131
|
-
|
|
132
113
|
setMinLength(format) {
|
|
133
114
|
const intFormatStr = _includesInstanceProperty(format).call(format, ".") ? format.substring(0, format.indexOf(".")) : format;
|
|
134
115
|
const intStr = intFormatStr.replace(/[^0]/gu, "");
|
|
135
116
|
this._minInt = intStr.length > 1 ? intStr.length : 1;
|
|
136
117
|
}
|
|
118
|
+
|
|
137
119
|
/**
|
|
138
120
|
*/
|
|
139
|
-
|
|
140
|
-
|
|
141
121
|
setPercentage() {
|
|
142
122
|
this._isPercentage = this.suffix.charAt(0) === "%";
|
|
143
123
|
}
|
|
124
|
+
|
|
144
125
|
/**
|
|
145
126
|
* Solves problem where big numbers loose the precision:
|
|
146
127
|
* e.g. Number(23423423423342234.34) => 23423423423342236
|
|
147
128
|
*/
|
|
148
|
-
|
|
149
|
-
|
|
150
129
|
static getNumericString(stringNumber) {
|
|
151
130
|
const number = Number(stringNumber);
|
|
152
131
|
const string = String(number);
|
|
153
|
-
|
|
154
132
|
if (!_includesInstanceProperty(string).call(string, ".") && _includesInstanceProperty(stringNumber).call(stringNumber, ".")) {
|
|
155
133
|
// check if original string has all zeros after dot or not
|
|
156
134
|
const precision = stringNumber.substring(stringNumber.indexOf(".") + 1);
|
|
157
|
-
|
|
158
135
|
if (precision.replace(/0/gu, "").length > 0) {
|
|
159
136
|
return stringNumber;
|
|
160
137
|
}
|
|
161
|
-
|
|
162
138
|
return string;
|
|
163
139
|
}
|
|
164
|
-
|
|
165
140
|
return stringNumber;
|
|
166
141
|
}
|
|
142
|
+
|
|
167
143
|
/**
|
|
168
144
|
* Converts formatted value back to non-formatted value
|
|
169
145
|
* e.g. $1,223.06 --> 1223.06
|
|
170
146
|
*/
|
|
171
|
-
|
|
172
|
-
|
|
173
147
|
formatBack(formattedNumber) {
|
|
174
148
|
const stringNumber = String(formattedNumber);
|
|
175
|
-
|
|
176
149
|
if (!stringNumber) {
|
|
177
150
|
return "";
|
|
178
151
|
}
|
|
179
|
-
|
|
180
152
|
if (!isNaN(stringNumber)) {
|
|
181
153
|
return DecimalFormat.getNumericString(stringNumber);
|
|
182
154
|
}
|
|
183
|
-
|
|
184
155
|
let tempNumber = formattedNumber;
|
|
185
156
|
let negative = false;
|
|
186
|
-
|
|
187
157
|
if (formattedNumber.charAt(0) === "-") {
|
|
188
158
|
tempNumber = formattedNumber.substr(1);
|
|
189
159
|
negative = true;
|
|
190
160
|
}
|
|
191
|
-
|
|
192
161
|
const hasPrefix = _startsWithInstanceProperty(formattedNumber).call(formattedNumber, this.prefix);
|
|
193
|
-
|
|
194
162
|
const suffixIndex = this.suffix === "" ? formattedNumber.length : formattedNumber.indexOf(this.suffix, this.prefix.length + 1);
|
|
195
|
-
|
|
196
163
|
if (hasPrefix && suffixIndex > 0) {
|
|
197
164
|
tempNumber = tempNumber.substr(0, suffixIndex);
|
|
198
165
|
tempNumber = tempNumber.substr(this.prefix.length);
|
|
199
166
|
tempNumber = tempNumber.replace(/,/gu, "");
|
|
200
|
-
|
|
201
167
|
if (negative) {
|
|
202
|
-
tempNumber =
|
|
168
|
+
tempNumber = `-${tempNumber}`;
|
|
203
169
|
}
|
|
204
|
-
|
|
205
170
|
if (!isNaN(tempNumber)) {
|
|
206
171
|
return DecimalFormat.getNumericString(tempNumber);
|
|
207
172
|
}
|
|
208
173
|
}
|
|
209
|
-
|
|
210
174
|
return tempNumber;
|
|
211
175
|
}
|
|
176
|
+
|
|
212
177
|
/**
|
|
213
178
|
*/
|
|
214
|
-
|
|
215
|
-
|
|
216
179
|
static scientificNumber(stringNumber) {
|
|
217
180
|
if (_includesInstanceProperty(stringNumber).call(stringNumber, "e")) {
|
|
218
181
|
const number = Number(stringNumber);
|
|
219
|
-
|
|
220
182
|
if (number === Infinity || number === -Infinity) {
|
|
221
183
|
return stringNumber;
|
|
222
184
|
}
|
|
223
|
-
|
|
224
185
|
return String(number);
|
|
225
186
|
}
|
|
226
|
-
|
|
227
187
|
return stringNumber;
|
|
228
188
|
}
|
|
189
|
+
|
|
229
190
|
/**
|
|
230
191
|
*/
|
|
231
|
-
|
|
232
|
-
|
|
233
192
|
getFracAsNumber(fracStr) {
|
|
234
|
-
const number = Number(
|
|
193
|
+
const number = Number(`0.${fracStr}`);
|
|
235
194
|
const DECIMAL_RADIX = 10;
|
|
236
195
|
return this.maxFrac === 0 ? Math.round(number).toString(DECIMAL_RADIX) : number.toFixed(this.maxFrac);
|
|
237
196
|
}
|
|
197
|
+
|
|
238
198
|
/**
|
|
239
199
|
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
200
|
getRoundedFrac(fracStr) {
|
|
243
|
-
const num = this.getFracAsNumber(fracStr);
|
|
201
|
+
const num = this.getFracAsNumber(fracStr);
|
|
244
202
|
|
|
203
|
+
// toFixed method has bugs on IE (0.7 --> 0)
|
|
245
204
|
return num.substr(2);
|
|
246
205
|
}
|
|
206
|
+
|
|
247
207
|
/**
|
|
248
208
|
*/
|
|
249
|
-
|
|
250
|
-
|
|
251
209
|
static getFraction(number) {
|
|
252
210
|
let fracStr = _includesInstanceProperty(number).call(number, ".") ? number.substring(number.indexOf(".") + 1) : "";
|
|
253
211
|
fracStr = fracStr.replace(/\./, "");
|
|
254
212
|
return fracStr;
|
|
255
213
|
}
|
|
214
|
+
|
|
256
215
|
/**
|
|
257
216
|
*/
|
|
258
|
-
|
|
259
|
-
|
|
260
217
|
getFracCorrectLength(frac) {
|
|
261
218
|
let fracStr = frac;
|
|
262
|
-
|
|
263
219
|
if (fracStr.length > this.maxFrac) {
|
|
264
220
|
fracStr = this.getRoundedFrac(fracStr);
|
|
265
221
|
}
|
|
266
|
-
|
|
267
222
|
for (let i = fracStr.length; i < this.minFrac; i++) {
|
|
268
223
|
// if minFrac=4 then 1.12 --> 1.1200
|
|
269
|
-
fracStr =
|
|
224
|
+
fracStr = `${fracStr}0`;
|
|
270
225
|
}
|
|
271
|
-
|
|
272
226
|
while (fracStr.length > this.minFrac && fracStr.charAt(fracStr.length - 1) === "0") {
|
|
273
227
|
// if minInt=4 then 00034 --> 0034)
|
|
274
228
|
fracStr = fracStr.substring(0, fracStr.length - 1);
|
|
275
229
|
}
|
|
276
|
-
|
|
277
230
|
return fracStr;
|
|
278
231
|
}
|
|
232
|
+
|
|
279
233
|
/**
|
|
280
234
|
*/
|
|
281
|
-
|
|
282
|
-
|
|
283
235
|
getInteger(number) {
|
|
284
236
|
let intStr = _includesInstanceProperty(number).call(number, ".") ? number.substring(0, number.indexOf(".")) : number;
|
|
285
237
|
let doCarry = Number(this.getFracAsNumber(number)) > 1;
|
|
286
238
|
let i = intStr.length - 1;
|
|
287
|
-
|
|
288
239
|
while (doCarry) {
|
|
289
240
|
if (i === -1) {
|
|
290
|
-
intStr =
|
|
241
|
+
intStr = `1${intStr}`;
|
|
291
242
|
break;
|
|
292
243
|
}
|
|
293
|
-
|
|
294
244
|
let x = intStr.charAt(i);
|
|
295
|
-
|
|
296
245
|
if (x === "9") {
|
|
297
246
|
x = "0";
|
|
298
247
|
} else {
|
|
299
|
-
x =
|
|
248
|
+
x = `${x + 1}`;
|
|
300
249
|
doCarry = false;
|
|
301
250
|
}
|
|
302
|
-
|
|
303
251
|
intStr = intStr.substring(0, i) + x + intStr.substring(i + 1, intStr.length);
|
|
304
252
|
i -= 1;
|
|
305
253
|
}
|
|
306
|
-
|
|
307
254
|
for (let j = intStr.length; j < this.minInt; j++) {
|
|
308
255
|
// if minInt=4 then 034 --> 0034
|
|
309
|
-
intStr =
|
|
256
|
+
intStr = `0${intStr}`;
|
|
310
257
|
}
|
|
311
|
-
|
|
312
258
|
while (intStr.length > this.minInt && intStr.charAt(0) === "0") {
|
|
313
259
|
// if minInt=4 then 00034 --> 0034)
|
|
314
260
|
intStr = intStr.substring(1);
|
|
315
261
|
}
|
|
316
|
-
|
|
317
262
|
return intStr;
|
|
318
263
|
}
|
|
264
|
+
|
|
319
265
|
/**
|
|
320
266
|
*/
|
|
321
|
-
|
|
322
|
-
|
|
323
267
|
addGrouping(intStr) {
|
|
324
268
|
let groupedIntStr = intStr;
|
|
325
269
|
let j = 0;
|
|
326
|
-
|
|
327
270
|
for (let i = groupedIntStr.length; i > 0; i--) {
|
|
328
271
|
// add commas
|
|
329
272
|
if (j !== 0 && j % this.comma === 0) {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
groupedIntStr = _concatInstanceProperty(_context = "".concat(groupedIntStr.substring(0, i), ",")).call(_context, groupedIntStr.substring(i));
|
|
273
|
+
groupedIntStr = `${groupedIntStr.substring(0, i)},${groupedIntStr.substring(i)}`;
|
|
333
274
|
j = 0;
|
|
334
275
|
}
|
|
335
|
-
|
|
336
276
|
j += 1;
|
|
337
277
|
}
|
|
338
|
-
|
|
339
278
|
return groupedIntStr;
|
|
340
279
|
}
|
|
280
|
+
|
|
341
281
|
/**
|
|
342
282
|
*/
|
|
343
|
-
|
|
344
|
-
|
|
345
283
|
getFormattedValue(intStr, fracStr, isNegative) {
|
|
346
|
-
var _context2, _context3;
|
|
347
|
-
|
|
348
284
|
let formattedValue;
|
|
349
|
-
if (fracStr.length > 0) formattedValue =
|
|
350
|
-
|
|
285
|
+
if (fracStr.length > 0) formattedValue = `${this.prefix + intStr}.${fracStr}${this.suffix}`;else formattedValue = this.prefix + intStr + this.suffix;
|
|
351
286
|
if (isNegative) {
|
|
352
|
-
formattedValue =
|
|
287
|
+
formattedValue = `-${formattedValue}`;
|
|
353
288
|
}
|
|
354
|
-
|
|
355
289
|
return formattedValue;
|
|
356
290
|
}
|
|
291
|
+
|
|
357
292
|
/**
|
|
358
293
|
* Formats given value, using the pattern
|
|
359
294
|
* e.g. $#,###.00: 1223.06 --> $1,223.06
|
|
360
295
|
*/
|
|
361
|
-
|
|
362
|
-
|
|
363
296
|
format() {
|
|
364
297
|
let stringNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
365
|
-
|
|
366
298
|
if (stringNumber === null) {
|
|
367
299
|
return "";
|
|
368
300
|
}
|
|
369
|
-
|
|
370
301
|
let formattedNumber = this.formatBack(stringNumber).toLowerCase();
|
|
371
|
-
|
|
372
302
|
if (isNaN(formattedNumber) || formattedNumber.length === 0) {
|
|
373
303
|
return stringNumber;
|
|
374
304
|
}
|
|
375
|
-
|
|
376
305
|
formattedNumber = DecimalFormat.scientificNumber(formattedNumber);
|
|
377
|
-
|
|
378
306
|
if (_includesInstanceProperty(formattedNumber).call(formattedNumber, "e")) {
|
|
379
307
|
return formattedNumber;
|
|
380
308
|
}
|
|
381
|
-
|
|
382
309
|
const isNegative = formattedNumber.charAt(0) === "-";
|
|
383
|
-
|
|
384
310
|
if (isNegative || formattedNumber.charAt(0) === "+") {
|
|
385
311
|
formattedNumber = formattedNumber.substring(1);
|
|
386
312
|
}
|
|
387
|
-
|
|
388
313
|
let fracStr = DecimalFormat.getFraction(formattedNumber);
|
|
389
314
|
let intStr = this.getInteger(formattedNumber);
|
|
390
|
-
|
|
391
315
|
if (this.isPercentage) {
|
|
392
|
-
var _context4;
|
|
393
|
-
|
|
394
316
|
// Add zeros behind fraction to make sure we have at least two characters and take first two character:
|
|
395
317
|
// 1 --> 100 --> 10
|
|
396
|
-
const addZeroToFrac =
|
|
397
|
-
|
|
398
|
-
const lastTwoFrac =
|
|
399
|
-
intStr =
|
|
318
|
+
const addZeroToFrac = `${fracStr}00`.substr(0, 2);
|
|
319
|
+
// Add zeros in front of frac and get last two characters
|
|
320
|
+
const lastTwoFrac = `00${addZeroToFrac}`.substr(-2);
|
|
321
|
+
intStr = `${intStr}${lastTwoFrac}`;
|
|
400
322
|
fracStr = fracStr.substr(2);
|
|
401
323
|
}
|
|
402
|
-
|
|
403
324
|
fracStr = this.getFracCorrectLength(fracStr);
|
|
404
325
|
intStr = this.addGrouping(intStr);
|
|
405
326
|
return this.getFormattedValue(intStr, fracStr, isNegative);
|
|
406
327
|
}
|
|
407
|
-
|
|
408
328
|
}
|
|
409
|
-
|
|
410
329
|
export default DecimalFormat;
|
|
411
330
|
//# sourceMappingURL=DecimalFormat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DecimalFormat.js","names":["DecimalFormat","constructor","format","setAffix","setFractionLengths","setGroupLength","setMinLength","setPercentage","prefix","_prefix","suffix","_suffix","comma","_comma","minInt","_minInt","minFrac","_minFrac","maxFrac","_maxFrac","isPercentage","_isPercentage","beforeDigit","substring","indexOf","length","replace","numberStr","fracStr","intStr","lastIndexOf","intFormatStr","charAt","getNumericString","stringNumber","number","Number","string","String","precision","formatBack","formattedNumber","isNaN","tempNumber","negative","substr","hasPrefix","suffixIndex","scientificNumber","Infinity","getFracAsNumber","DECIMAL_RADIX","Math","round","toString","toFixed","getRoundedFrac","num","getFraction","getFracCorrectLength","frac","i","getInteger","doCarry","x","j","addGrouping","groupedIntStr","getFormattedValue","isNegative","formattedValue","toLowerCase","addZeroToFrac","lastTwoFrac"],"sources":["../../../src/utils/number/DecimalFormat.js"],"sourcesContent":["// @flow\n// @see: https://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html\n/**\n */\nclass DecimalFormat {\n _prefix: string;\n _suffix: string;\n\n // Grouping size\n _comma: number;\n // Minimum integer digits to be displayed\n _minInt: number;\n\n // Minimum fractional digits to be displayed\n _minFrac: number;\n // Maximum fractional digits to be displayed\n _maxFrac: number;\n\n _isPercentage: boolean;\n\n /**\n */\n constructor(format: string) {\n this.setAffix(format);\n this.setFractionLengths(format);\n this.setGroupLength(format);\n this.setMinLength(format);\n\n this.setPercentage();\n }\n\n /**\n */\n get prefix(): string {\n return this._prefix;\n }\n\n /**\n */\n get suffix(): string {\n return this._suffix;\n }\n\n /**\n */\n get comma(): number {\n return this._comma;\n }\n\n /**\n */\n get minInt(): number {\n return this._minInt;\n }\n\n /**\n */\n get minFrac(): number {\n return this._minFrac;\n }\n\n /**\n */\n get maxFrac(): number {\n return this._maxFrac;\n }\n\n /**\n */\n get isPercentage(): boolean {\n return this._isPercentage;\n }\n\n /**\n */\n setAffix(format: string) {\n const beforeDigit = format.includes(\"#\")\n ? format.substring(0, format.indexOf(\"#\"))\n : format;\n\n this._prefix = beforeDigit.includes(\"0\")\n ? beforeDigit.substring(0, beforeDigit.indexOf(\"0\"))\n : beforeDigit;\n this._suffix = format\n .substring(this._prefix.length)\n .replace(/[#,.0]/gu, \"\");\n }\n\n /**\n */\n setFractionLengths(format: string) {\n this._minFrac = 0;\n this._maxFrac = 0;\n\n const numberStr = format.replace(/[^#,.0]/gu, \"\");\n if (numberStr.includes(\".\")) {\n const fracStr = numberStr.substring(numberStr.indexOf(\".\") + 1);\n\n const maxFrac = fracStr.replace(/,|\\.+/g, \"\");\n this._maxFrac = maxFrac.length;\n\n // replace all but zeros\n const minFrac = maxFrac.replace(/[^0]/gu, \"\");\n this._minFrac = minFrac.length;\n }\n }\n\n /**\n */\n setGroupLength(format: string) {\n this._comma = 0;\n\n const numberStr = format.replace(/[^#,.0]/gu, \"\");\n const intStr = numberStr.includes(\".\")\n ? numberStr.substring(0, numberStr.indexOf(\".\"))\n : numberStr;\n\n if (intStr.includes(\",\")) {\n this._comma = intStr.length - 1 - intStr.lastIndexOf(\",\");\n }\n }\n\n /**\n */\n setMinLength(format: string) {\n const intFormatStr = format.includes(\".\")\n ? format.substring(0, format.indexOf(\".\"))\n : format;\n const intStr = intFormatStr.replace(/[^0]/gu, \"\");\n\n this._minInt = intStr.length > 1 ? intStr.length : 1;\n }\n\n /**\n */\n setPercentage() {\n this._isPercentage = this.suffix.charAt(0) === \"%\";\n }\n\n /**\n * Solves problem where big numbers loose the precision:\n * e.g. Number(23423423423342234.34) => 23423423423342236\n */\n static getNumericString(stringNumber: string): string {\n const number = Number(stringNumber);\n const string = String(number);\n\n if (!string.includes(\".\") && stringNumber.includes(\".\")) {\n // check if original string has all zeros after dot or not\n const precision = stringNumber.substring(stringNumber.indexOf(\".\") + 1);\n if (precision.replace(/0/gu, \"\").length > 0) {\n return stringNumber;\n }\n\n return string;\n }\n\n return stringNumber;\n }\n\n /**\n * Converts formatted value back to non-formatted value\n * e.g. $1,223.06 --> 1223.06\n */\n formatBack(formattedNumber: string): string {\n const stringNumber = String(formattedNumber);\n\n if (!stringNumber) {\n return \"\";\n }\n\n if (!isNaN(stringNumber)) {\n return DecimalFormat.getNumericString(stringNumber);\n }\n\n let tempNumber = formattedNumber;\n\n let negative = false;\n if (formattedNumber.charAt(0) === \"-\") {\n tempNumber = formattedNumber.substr(1);\n negative = true;\n }\n\n const hasPrefix = formattedNumber.startsWith(this.prefix);\n\n const suffixIndex =\n this.suffix === \"\"\n ? formattedNumber.length\n : formattedNumber.indexOf(this.suffix, this.prefix.length + 1);\n\n if (hasPrefix && suffixIndex > 0) {\n tempNumber = tempNumber.substr(0, suffixIndex);\n tempNumber = tempNumber.substr(this.prefix.length);\n tempNumber = tempNumber.replace(/,/gu, \"\");\n\n if (negative) {\n tempNumber = `-${tempNumber}`;\n }\n\n if (!isNaN(tempNumber)) {\n return DecimalFormat.getNumericString(tempNumber);\n }\n }\n\n return tempNumber;\n }\n\n /**\n */\n static scientificNumber(stringNumber: string): string {\n if (stringNumber.includes(\"e\")) {\n const number = Number(stringNumber);\n if (number === Infinity || number === -Infinity) {\n return stringNumber;\n }\n\n return String(number);\n }\n\n return stringNumber;\n }\n\n /**\n */\n getFracAsNumber(fracStr: string): string {\n const number = Number(`0.${fracStr}`);\n const DECIMAL_RADIX = 10;\n\n return this.maxFrac === 0\n ? Math.round(number).toString(DECIMAL_RADIX)\n : number.toFixed(this.maxFrac);\n }\n\n /**\n */\n getRoundedFrac(fracStr: string): string {\n const num = this.getFracAsNumber(fracStr);\n\n // toFixed method has bugs on IE (0.7 --> 0)\n return num.substr(2);\n }\n\n /**\n */\n static getFraction(number: string): string {\n let fracStr = number.includes(\".\")\n ? number.substring(number.indexOf(\".\") + 1)\n : \"\";\n\n fracStr = fracStr.replace(/\\./, \"\");\n\n return fracStr;\n }\n\n /**\n */\n getFracCorrectLength(frac: string): string {\n let fracStr = frac;\n\n if (fracStr.length > this.maxFrac) {\n fracStr = this.getRoundedFrac(fracStr);\n }\n\n for (let i = fracStr.length; i < this.minFrac; i++) {\n // if minFrac=4 then 1.12 --> 1.1200\n fracStr = `${fracStr}0`;\n }\n\n while (\n fracStr.length > this.minFrac &&\n fracStr.charAt(fracStr.length - 1) === \"0\"\n ) {\n // if minInt=4 then 00034 --> 0034)\n fracStr = fracStr.substring(0, fracStr.length - 1);\n }\n\n return fracStr;\n }\n\n /**\n */\n getInteger(number: string): string {\n let intStr = number.includes(\".\")\n ? number.substring(0, number.indexOf(\".\"))\n : number;\n\n let doCarry = Number(this.getFracAsNumber(number)) > 1;\n let i = intStr.length - 1;\n\n while (doCarry) {\n if (i === -1) {\n intStr = `1${intStr}`;\n break;\n }\n\n let x = intStr.charAt(i);\n if (x === \"9\") {\n x = \"0\";\n } else {\n x = `${x + 1}`;\n doCarry = false;\n }\n\n intStr =\n intStr.substring(0, i) + x + intStr.substring(i + 1, intStr.length);\n\n i -= 1;\n }\n\n for (let j = intStr.length; j < this.minInt; j++) {\n // if minInt=4 then 034 --> 0034\n intStr = `0${intStr}`;\n }\n\n while (intStr.length > this.minInt && intStr.charAt(0) === \"0\") {\n // if minInt=4 then 00034 --> 0034)\n intStr = intStr.substring(1);\n }\n\n return intStr;\n }\n\n /**\n */\n addGrouping(intStr: string): string {\n let groupedIntStr = intStr;\n\n let j = 0;\n for (let i = groupedIntStr.length; i > 0; i--) {\n // add commas\n if (j !== 0 && j % this.comma === 0) {\n groupedIntStr = `${groupedIntStr.substring(\n 0,\n i\n )},${groupedIntStr.substring(i)}`;\n j = 0;\n }\n\n j += 1;\n }\n\n return groupedIntStr;\n }\n\n /**\n */\n getFormattedValue(\n intStr: string,\n fracStr: string,\n isNegative: boolean\n ): string {\n let formattedValue;\n if (fracStr.length > 0)\n formattedValue = `${this.prefix + intStr}.${fracStr}${this.suffix}`;\n else formattedValue = this.prefix + intStr + this.suffix;\n\n if (isNegative) {\n formattedValue = `-${formattedValue}`;\n }\n\n return formattedValue;\n }\n\n /**\n * Formats given value, using the pattern\n * e.g. $#,###.00: 1223.06 --> $1,223.06\n */\n format(stringNumber: string = \"\"): string {\n if (stringNumber === null) {\n return \"\";\n }\n\n let formattedNumber = this.formatBack(stringNumber).toLowerCase();\n\n if (isNaN(formattedNumber) || formattedNumber.length === 0) {\n return stringNumber;\n }\n\n formattedNumber = DecimalFormat.scientificNumber(formattedNumber);\n if (formattedNumber.includes(\"e\")) {\n return formattedNumber;\n }\n\n const isNegative = formattedNumber.charAt(0) === \"-\";\n if (isNegative || formattedNumber.charAt(0) === \"+\") {\n formattedNumber = formattedNumber.substring(1);\n }\n\n let fracStr = DecimalFormat.getFraction(formattedNumber);\n let intStr = this.getInteger(formattedNumber);\n if (this.isPercentage) {\n // Add zeros behind fraction to make sure we have at least two characters and take first two character:\n // 1 --> 100 --> 10\n const addZeroToFrac = `${fracStr}00`.substr(0, 2);\n // Add zeros in front of frac and get last two characters\n const lastTwoFrac = `00${addZeroToFrac}`.substr(-2);\n\n intStr = `${intStr}${lastTwoFrac}`;\n fracStr = fracStr.substr(2);\n }\n\n fracStr = this.getFracCorrectLength(fracStr);\n\n intStr = this.addGrouping(intStr);\n\n return this.getFormattedValue(intStr, fracStr, isNegative);\n }\n}\n\nexport default DecimalFormat;\n"],"mappings":";;;;;AACA;;AACA;AACA;AACA,MAAMA,aAAN,CAAoB;EAIlB;EAEA;EAGA;EAEA;;EAKA;AACF;EACEC,WAAW,CAACC,MAAD,EAAiB;IAAA;;IAAA;;IAAA;;IAAA;;IAAA;;IAAA;;IAAA;;IAC1B,KAAKC,QAAL,CAAcD,MAAd;IACA,KAAKE,kBAAL,CAAwBF,MAAxB;IACA,KAAKG,cAAL,CAAoBH,MAApB;IACA,KAAKI,YAAL,CAAkBJ,MAAlB;IAEA,KAAKK,aAAL;EACD;EAED;AACF;;;EACY,IAANC,MAAM,GAAW;IACnB,OAAO,KAAKC,OAAZ;EACD;EAED;AACF;;;EACY,IAANC,MAAM,GAAW;IACnB,OAAO,KAAKC,OAAZ;EACD;EAED;AACF;;;EACW,IAALC,KAAK,GAAW;IAClB,OAAO,KAAKC,MAAZ;EACD;EAED;AACF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eAAerE,aAAf"}
|
|
1
|
+
{"version":3,"file":"DecimalFormat.js","names":["DecimalFormat","constructor","format","setAffix","setFractionLengths","setGroupLength","setMinLength","setPercentage","prefix","_prefix","suffix","_suffix","comma","_comma","minInt","_minInt","minFrac","_minFrac","maxFrac","_maxFrac","isPercentage","_isPercentage","beforeDigit","substring","indexOf","length","replace","numberStr","fracStr","intStr","lastIndexOf","intFormatStr","charAt","getNumericString","stringNumber","number","Number","string","String","precision","formatBack","formattedNumber","isNaN","tempNumber","negative","substr","hasPrefix","suffixIndex","scientificNumber","Infinity","getFracAsNumber","DECIMAL_RADIX","Math","round","toString","toFixed","getRoundedFrac","num","getFraction","getFracCorrectLength","frac","i","getInteger","doCarry","x","j","addGrouping","groupedIntStr","getFormattedValue","isNegative","formattedValue","toLowerCase","addZeroToFrac","lastTwoFrac"],"sources":["../../../src/utils/number/DecimalFormat.js"],"sourcesContent":["// @flow\n// @see: https://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html\n/**\n */\nclass DecimalFormat {\n _prefix: string;\n _suffix: string;\n\n // Grouping size\n _comma: number;\n // Minimum integer digits to be displayed\n _minInt: number;\n\n // Minimum fractional digits to be displayed\n _minFrac: number;\n // Maximum fractional digits to be displayed\n _maxFrac: number;\n\n _isPercentage: boolean;\n\n /**\n */\n constructor(format: string) {\n this.setAffix(format);\n this.setFractionLengths(format);\n this.setGroupLength(format);\n this.setMinLength(format);\n\n this.setPercentage();\n }\n\n /**\n */\n get prefix(): string {\n return this._prefix;\n }\n\n /**\n */\n get suffix(): string {\n return this._suffix;\n }\n\n /**\n */\n get comma(): number {\n return this._comma;\n }\n\n /**\n */\n get minInt(): number {\n return this._minInt;\n }\n\n /**\n */\n get minFrac(): number {\n return this._minFrac;\n }\n\n /**\n */\n get maxFrac(): number {\n return this._maxFrac;\n }\n\n /**\n */\n get isPercentage(): boolean {\n return this._isPercentage;\n }\n\n /**\n */\n setAffix(format: string) {\n const beforeDigit = format.includes(\"#\")\n ? format.substring(0, format.indexOf(\"#\"))\n : format;\n\n this._prefix = beforeDigit.includes(\"0\")\n ? beforeDigit.substring(0, beforeDigit.indexOf(\"0\"))\n : beforeDigit;\n this._suffix = format\n .substring(this._prefix.length)\n .replace(/[#,.0]/gu, \"\");\n }\n\n /**\n */\n setFractionLengths(format: string) {\n this._minFrac = 0;\n this._maxFrac = 0;\n\n const numberStr = format.replace(/[^#,.0]/gu, \"\");\n if (numberStr.includes(\".\")) {\n const fracStr = numberStr.substring(numberStr.indexOf(\".\") + 1);\n\n const maxFrac = fracStr.replace(/,|\\.+/g, \"\");\n this._maxFrac = maxFrac.length;\n\n // replace all but zeros\n const minFrac = maxFrac.replace(/[^0]/gu, \"\");\n this._minFrac = minFrac.length;\n }\n }\n\n /**\n */\n setGroupLength(format: string) {\n this._comma = 0;\n\n const numberStr = format.replace(/[^#,.0]/gu, \"\");\n const intStr = numberStr.includes(\".\")\n ? numberStr.substring(0, numberStr.indexOf(\".\"))\n : numberStr;\n\n if (intStr.includes(\",\")) {\n this._comma = intStr.length - 1 - intStr.lastIndexOf(\",\");\n }\n }\n\n /**\n */\n setMinLength(format: string) {\n const intFormatStr = format.includes(\".\")\n ? format.substring(0, format.indexOf(\".\"))\n : format;\n const intStr = intFormatStr.replace(/[^0]/gu, \"\");\n\n this._minInt = intStr.length > 1 ? intStr.length : 1;\n }\n\n /**\n */\n setPercentage() {\n this._isPercentage = this.suffix.charAt(0) === \"%\";\n }\n\n /**\n * Solves problem where big numbers loose the precision:\n * e.g. Number(23423423423342234.34) => 23423423423342236\n */\n static getNumericString(stringNumber: string): string {\n const number = Number(stringNumber);\n const string = String(number);\n\n if (!string.includes(\".\") && stringNumber.includes(\".\")) {\n // check if original string has all zeros after dot or not\n const precision = stringNumber.substring(stringNumber.indexOf(\".\") + 1);\n if (precision.replace(/0/gu, \"\").length > 0) {\n return stringNumber;\n }\n\n return string;\n }\n\n return stringNumber;\n }\n\n /**\n * Converts formatted value back to non-formatted value\n * e.g. $1,223.06 --> 1223.06\n */\n formatBack(formattedNumber: string): string {\n const stringNumber = String(formattedNumber);\n\n if (!stringNumber) {\n return \"\";\n }\n\n if (!isNaN(stringNumber)) {\n return DecimalFormat.getNumericString(stringNumber);\n }\n\n let tempNumber = formattedNumber;\n\n let negative = false;\n if (formattedNumber.charAt(0) === \"-\") {\n tempNumber = formattedNumber.substr(1);\n negative = true;\n }\n\n const hasPrefix = formattedNumber.startsWith(this.prefix);\n\n const suffixIndex =\n this.suffix === \"\"\n ? formattedNumber.length\n : formattedNumber.indexOf(this.suffix, this.prefix.length + 1);\n\n if (hasPrefix && suffixIndex > 0) {\n tempNumber = tempNumber.substr(0, suffixIndex);\n tempNumber = tempNumber.substr(this.prefix.length);\n tempNumber = tempNumber.replace(/,/gu, \"\");\n\n if (negative) {\n tempNumber = `-${tempNumber}`;\n }\n\n if (!isNaN(tempNumber)) {\n return DecimalFormat.getNumericString(tempNumber);\n }\n }\n\n return tempNumber;\n }\n\n /**\n */\n static scientificNumber(stringNumber: string): string {\n if (stringNumber.includes(\"e\")) {\n const number = Number(stringNumber);\n if (number === Infinity || number === -Infinity) {\n return stringNumber;\n }\n\n return String(number);\n }\n\n return stringNumber;\n }\n\n /**\n */\n getFracAsNumber(fracStr: string): string {\n const number = Number(`0.${fracStr}`);\n const DECIMAL_RADIX = 10;\n\n return this.maxFrac === 0\n ? Math.round(number).toString(DECIMAL_RADIX)\n : number.toFixed(this.maxFrac);\n }\n\n /**\n */\n getRoundedFrac(fracStr: string): string {\n const num = this.getFracAsNumber(fracStr);\n\n // toFixed method has bugs on IE (0.7 --> 0)\n return num.substr(2);\n }\n\n /**\n */\n static getFraction(number: string): string {\n let fracStr = number.includes(\".\")\n ? number.substring(number.indexOf(\".\") + 1)\n : \"\";\n\n fracStr = fracStr.replace(/\\./, \"\");\n\n return fracStr;\n }\n\n /**\n */\n getFracCorrectLength(frac: string): string {\n let fracStr = frac;\n\n if (fracStr.length > this.maxFrac) {\n fracStr = this.getRoundedFrac(fracStr);\n }\n\n for (let i = fracStr.length; i < this.minFrac; i++) {\n // if minFrac=4 then 1.12 --> 1.1200\n fracStr = `${fracStr}0`;\n }\n\n while (\n fracStr.length > this.minFrac &&\n fracStr.charAt(fracStr.length - 1) === \"0\"\n ) {\n // if minInt=4 then 00034 --> 0034)\n fracStr = fracStr.substring(0, fracStr.length - 1);\n }\n\n return fracStr;\n }\n\n /**\n */\n getInteger(number: string): string {\n let intStr = number.includes(\".\")\n ? number.substring(0, number.indexOf(\".\"))\n : number;\n\n let doCarry = Number(this.getFracAsNumber(number)) > 1;\n let i = intStr.length - 1;\n\n while (doCarry) {\n if (i === -1) {\n intStr = `1${intStr}`;\n break;\n }\n\n let x = intStr.charAt(i);\n if (x === \"9\") {\n x = \"0\";\n } else {\n x = `${x + 1}`;\n doCarry = false;\n }\n\n intStr =\n intStr.substring(0, i) + x + intStr.substring(i + 1, intStr.length);\n\n i -= 1;\n }\n\n for (let j = intStr.length; j < this.minInt; j++) {\n // if minInt=4 then 034 --> 0034\n intStr = `0${intStr}`;\n }\n\n while (intStr.length > this.minInt && intStr.charAt(0) === \"0\") {\n // if minInt=4 then 00034 --> 0034)\n intStr = intStr.substring(1);\n }\n\n return intStr;\n }\n\n /**\n */\n addGrouping(intStr: string): string {\n let groupedIntStr = intStr;\n\n let j = 0;\n for (let i = groupedIntStr.length; i > 0; i--) {\n // add commas\n if (j !== 0 && j % this.comma === 0) {\n groupedIntStr = `${groupedIntStr.substring(\n 0,\n i\n )},${groupedIntStr.substring(i)}`;\n j = 0;\n }\n\n j += 1;\n }\n\n return groupedIntStr;\n }\n\n /**\n */\n getFormattedValue(\n intStr: string,\n fracStr: string,\n isNegative: boolean\n ): string {\n let formattedValue;\n if (fracStr.length > 0)\n formattedValue = `${this.prefix + intStr}.${fracStr}${this.suffix}`;\n else formattedValue = this.prefix + intStr + this.suffix;\n\n if (isNegative) {\n formattedValue = `-${formattedValue}`;\n }\n\n return formattedValue;\n }\n\n /**\n * Formats given value, using the pattern\n * e.g. $#,###.00: 1223.06 --> $1,223.06\n */\n format(stringNumber: string = \"\"): string {\n if (stringNumber === null) {\n return \"\";\n }\n\n let formattedNumber = this.formatBack(stringNumber).toLowerCase();\n\n if (isNaN(formattedNumber) || formattedNumber.length === 0) {\n return stringNumber;\n }\n\n formattedNumber = DecimalFormat.scientificNumber(formattedNumber);\n if (formattedNumber.includes(\"e\")) {\n return formattedNumber;\n }\n\n const isNegative = formattedNumber.charAt(0) === \"-\";\n if (isNegative || formattedNumber.charAt(0) === \"+\") {\n formattedNumber = formattedNumber.substring(1);\n }\n\n let fracStr = DecimalFormat.getFraction(formattedNumber);\n let intStr = this.getInteger(formattedNumber);\n if (this.isPercentage) {\n // Add zeros behind fraction to make sure we have at least two characters and take first two character:\n // 1 --> 100 --> 10\n const addZeroToFrac = `${fracStr}00`.substr(0, 2);\n // Add zeros in front of frac and get last two characters\n const lastTwoFrac = `00${addZeroToFrac}`.substr(-2);\n\n intStr = `${intStr}${lastTwoFrac}`;\n fracStr = fracStr.substr(2);\n }\n\n fracStr = this.getFracCorrectLength(fracStr);\n\n intStr = this.addGrouping(intStr);\n\n return this.getFormattedValue(intStr, fracStr, isNegative);\n }\n}\n\nexport default DecimalFormat;\n"],"mappings":";;;AACA;AACA;AACA;AACA,MAAMA,aAAa,CAAC;EAIlB;;EAEA;;EAGA;;EAEA;;EAKA;AACF;EACEC,WAAW,CAACC,MAAc,EAAE;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAC1B,IAAI,CAACC,QAAQ,CAACD,MAAM,CAAC;IACrB,IAAI,CAACE,kBAAkB,CAACF,MAAM,CAAC;IAC/B,IAAI,CAACG,cAAc,CAACH,MAAM,CAAC;IAC3B,IAAI,CAACI,YAAY,CAACJ,MAAM,CAAC;IAEzB,IAAI,CAACK,aAAa,EAAE;EACtB;;EAEA;AACF;EACE,IAAIC,MAAM,GAAW;IACnB,OAAO,IAAI,CAACC,OAAO;EACrB;;EAEA;AACF;EACE,IAAIC,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MAAM,EAAED,OAAO,EAAEyC,UAAU,CAAC;EAC5D;AACF;AAEA,eAAerE,aAAa"}
|
|
@@ -1,55 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
import { IllegalArgumentException } from "../../exceptions";
|
|
3
3
|
import DecimalFormat from "./DecimalFormat";
|
|
4
4
|
import { parseNumberToString, parseToNumber } from "./parseNumbers";
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* @private
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
9
|
const updateGroupingSeparator = (input, groupingSeparator) => {
|
|
10
10
|
if (groupingSeparator == null) {
|
|
11
11
|
return input;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
13
|
return input.replace(/,/g, groupingSeparator);
|
|
15
14
|
};
|
|
15
|
+
|
|
16
16
|
/**
|
|
17
17
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
18
|
const formatValue = function (value) {
|
|
21
19
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "0";
|
|
22
20
|
let groupingSeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ",";
|
|
23
21
|
let decimalSeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ".";
|
|
24
|
-
|
|
25
22
|
if (value == null) {
|
|
26
23
|
return "";
|
|
27
24
|
}
|
|
28
|
-
|
|
29
25
|
const numberValue = typeof value === "number" ? value : parseToNumber(value, groupingSeparator, decimalSeparator);
|
|
30
|
-
|
|
31
26
|
if (typeof numberValue !== "number") {
|
|
32
|
-
throw new IllegalArgumentException(
|
|
27
|
+
throw new IllegalArgumentException(`Not a valid number: ${value} for formatValue`);
|
|
33
28
|
}
|
|
34
|
-
|
|
35
29
|
const stringValue = parseNumberToString(numberValue);
|
|
36
|
-
|
|
37
30
|
if (format != null) {
|
|
38
31
|
const formattedValue = new DecimalFormat(format).format(stringValue);
|
|
39
32
|
const [integer, decimal] = formattedValue.split(".");
|
|
40
33
|
const integerPart = updateGroupingSeparator(integer, groupingSeparator);
|
|
41
|
-
|
|
42
34
|
if (decimal) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return _concatInstanceProperty(_context = _concatInstanceProperty(_context2 = "".concat(integerPart)).call(_context2, decimalSeparator)).call(_context, decimal);
|
|
35
|
+
return `${integerPart}${decimalSeparator}${decimal}`;
|
|
46
36
|
}
|
|
47
|
-
|
|
48
37
|
return integerPart;
|
|
49
38
|
}
|
|
50
|
-
|
|
51
39
|
return stringValue;
|
|
52
40
|
};
|
|
53
|
-
|
|
54
41
|
export default formatValue;
|
|
55
42
|
//# sourceMappingURL=formatValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatValue.js","names":["IllegalArgumentException","DecimalFormat","parseNumberToString","parseToNumber","updateGroupingSeparator","input","groupingSeparator","replace","formatValue","value","format","decimalSeparator","numberValue","stringValue","formattedValue","integer","decimal","split","integerPart"],"sources":["../../../src/utils/number/formatValue.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../../exceptions\";\n\nimport DecimalFormat from \"./DecimalFormat\";\nimport { parseNumberToString, parseToNumber } from \"./parseNumbers\";\n\n/**\n * @private\n */\nconst updateGroupingSeparator = (input: string, groupingSeparator: string) => {\n if (groupingSeparator == null) {\n return input;\n }\n\n return input.replace(/,/g, groupingSeparator);\n};\n\n/**\n */\nconst formatValue = (\n value: ?number | ?string,\n format: ?string = \"0\",\n groupingSeparator: string = \",\",\n decimalSeparator: string = \".\"\n): string => {\n if (value == null) {\n return \"\";\n }\n\n const numberValue =\n typeof value === \"number\"\n ? value\n : parseToNumber(value, groupingSeparator, decimalSeparator);\n\n if (typeof numberValue !== \"number\") {\n throw new IllegalArgumentException(\n `Not a valid number: ${value} for formatValue`\n );\n }\n\n const stringValue = parseNumberToString(numberValue);\n\n if (format != null) {\n const formattedValue = new DecimalFormat(format).format(stringValue);\n\n const [integer, decimal] = formattedValue.split(\".\");\n\n const integerPart = updateGroupingSeparator(integer, groupingSeparator);\n\n if (decimal) {\n return `${integerPart}${decimalSeparator}${decimal}`;\n }\n\n return integerPart;\n }\n\n return stringValue;\n};\n\nexport default formatValue;\n"],"mappings":";AACA,SAASA,
|
|
1
|
+
{"version":3,"file":"formatValue.js","names":["IllegalArgumentException","DecimalFormat","parseNumberToString","parseToNumber","updateGroupingSeparator","input","groupingSeparator","replace","formatValue","value","format","decimalSeparator","numberValue","stringValue","formattedValue","integer","decimal","split","integerPart"],"sources":["../../../src/utils/number/formatValue.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../../exceptions\";\n\nimport DecimalFormat from \"./DecimalFormat\";\nimport { parseNumberToString, parseToNumber } from \"./parseNumbers\";\n\n/**\n * @private\n */\nconst updateGroupingSeparator = (input: string, groupingSeparator: string) => {\n if (groupingSeparator == null) {\n return input;\n }\n\n return input.replace(/,/g, groupingSeparator);\n};\n\n/**\n */\nconst formatValue = (\n value: ?number | ?string,\n format: ?string = \"0\",\n groupingSeparator: string = \",\",\n decimalSeparator: string = \".\"\n): string => {\n if (value == null) {\n return \"\";\n }\n\n const numberValue =\n typeof value === \"number\"\n ? value\n : parseToNumber(value, groupingSeparator, decimalSeparator);\n\n if (typeof numberValue !== \"number\") {\n throw new IllegalArgumentException(\n `Not a valid number: ${value} for formatValue`\n );\n }\n\n const stringValue = parseNumberToString(numberValue);\n\n if (format != null) {\n const formattedValue = new DecimalFormat(format).format(stringValue);\n\n const [integer, decimal] = formattedValue.split(\".\");\n\n const integerPart = updateGroupingSeparator(integer, groupingSeparator);\n\n if (decimal) {\n return `${integerPart}${decimalSeparator}${decimal}`;\n }\n\n return integerPart;\n }\n\n return stringValue;\n};\n\nexport default formatValue;\n"],"mappings":";AACA,SAASA,wBAAwB,QAAQ,kBAAkB;AAE3D,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,SAASC,mBAAmB,EAAEC,aAAa,QAAQ,gBAAgB;;AAEnE;AACA;AACA;AACA,MAAMC,uBAAuB,GAAG,CAACC,KAAa,E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