@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,28 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
11
|
-
|
|
12
9
|
var _startsWith = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/starts-with"));
|
|
13
|
-
|
|
14
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
15
|
-
|
|
16
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
17
|
-
|
|
18
11
|
// @see: https://docs.oracle.com/javase/tutorial/i18n/format/decimalFormat.html
|
|
19
|
-
|
|
20
12
|
/**
|
|
21
13
|
*/
|
|
22
14
|
class DecimalFormat {
|
|
23
15
|
// Grouping size
|
|
16
|
+
|
|
24
17
|
// Minimum integer digits to be displayed
|
|
18
|
+
|
|
25
19
|
// Minimum fractional digits to be displayed
|
|
20
|
+
|
|
26
21
|
// Maximum fractional digits to be displayed
|
|
27
22
|
|
|
28
23
|
/**
|
|
@@ -41,376 +36,303 @@ class DecimalFormat {
|
|
|
41
36
|
this.setMinLength(format);
|
|
42
37
|
this.setPercentage();
|
|
43
38
|
}
|
|
39
|
+
|
|
44
40
|
/**
|
|
45
41
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
42
|
get prefix() {
|
|
49
43
|
return this._prefix;
|
|
50
44
|
}
|
|
45
|
+
|
|
51
46
|
/**
|
|
52
47
|
*/
|
|
53
|
-
|
|
54
|
-
|
|
55
48
|
get suffix() {
|
|
56
49
|
return this._suffix;
|
|
57
50
|
}
|
|
51
|
+
|
|
58
52
|
/**
|
|
59
53
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
54
|
get comma() {
|
|
63
55
|
return this._comma;
|
|
64
56
|
}
|
|
57
|
+
|
|
65
58
|
/**
|
|
66
59
|
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
60
|
get minInt() {
|
|
70
61
|
return this._minInt;
|
|
71
62
|
}
|
|
63
|
+
|
|
72
64
|
/**
|
|
73
65
|
*/
|
|
74
|
-
|
|
75
|
-
|
|
76
66
|
get minFrac() {
|
|
77
67
|
return this._minFrac;
|
|
78
68
|
}
|
|
69
|
+
|
|
79
70
|
/**
|
|
80
71
|
*/
|
|
81
|
-
|
|
82
|
-
|
|
83
72
|
get maxFrac() {
|
|
84
73
|
return this._maxFrac;
|
|
85
74
|
}
|
|
75
|
+
|
|
86
76
|
/**
|
|
87
77
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
90
78
|
get isPercentage() {
|
|
91
79
|
return this._isPercentage;
|
|
92
80
|
}
|
|
81
|
+
|
|
93
82
|
/**
|
|
94
83
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
84
|
setAffix(format) {
|
|
98
85
|
const beforeDigit = (0, _includes.default)(format).call(format, "#") ? format.substring(0, format.indexOf("#")) : format;
|
|
99
86
|
this._prefix = (0, _includes.default)(beforeDigit).call(beforeDigit, "0") ? beforeDigit.substring(0, beforeDigit.indexOf("0")) : beforeDigit;
|
|
100
87
|
this._suffix = format.substring(this._prefix.length).replace(/[#,.0]/gu, "");
|
|
101
88
|
}
|
|
89
|
+
|
|
102
90
|
/**
|
|
103
91
|
*/
|
|
104
|
-
|
|
105
|
-
|
|
106
92
|
setFractionLengths(format) {
|
|
107
93
|
this._minFrac = 0;
|
|
108
94
|
this._maxFrac = 0;
|
|
109
95
|
const numberStr = format.replace(/[^#,.0]/gu, "");
|
|
110
|
-
|
|
111
96
|
if ((0, _includes.default)(numberStr).call(numberStr, ".")) {
|
|
112
97
|
const fracStr = numberStr.substring(numberStr.indexOf(".") + 1);
|
|
113
98
|
const maxFrac = fracStr.replace(/,|\.+/g, "");
|
|
114
|
-
this._maxFrac = maxFrac.length;
|
|
99
|
+
this._maxFrac = maxFrac.length;
|
|
115
100
|
|
|
101
|
+
// replace all but zeros
|
|
116
102
|
const minFrac = maxFrac.replace(/[^0]/gu, "");
|
|
117
103
|
this._minFrac = minFrac.length;
|
|
118
104
|
}
|
|
119
105
|
}
|
|
106
|
+
|
|
120
107
|
/**
|
|
121
108
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
109
|
setGroupLength(format) {
|
|
125
110
|
this._comma = 0;
|
|
126
111
|
const numberStr = format.replace(/[^#,.0]/gu, "");
|
|
127
112
|
const intStr = (0, _includes.default)(numberStr).call(numberStr, ".") ? numberStr.substring(0, numberStr.indexOf(".")) : numberStr;
|
|
128
|
-
|
|
129
113
|
if ((0, _includes.default)(intStr).call(intStr, ",")) {
|
|
130
114
|
this._comma = intStr.length - 1 - intStr.lastIndexOf(",");
|
|
131
115
|
}
|
|
132
116
|
}
|
|
117
|
+
|
|
133
118
|
/**
|
|
134
119
|
*/
|
|
135
|
-
|
|
136
|
-
|
|
137
120
|
setMinLength(format) {
|
|
138
121
|
const intFormatStr = (0, _includes.default)(format).call(format, ".") ? format.substring(0, format.indexOf(".")) : format;
|
|
139
122
|
const intStr = intFormatStr.replace(/[^0]/gu, "");
|
|
140
123
|
this._minInt = intStr.length > 1 ? intStr.length : 1;
|
|
141
124
|
}
|
|
125
|
+
|
|
142
126
|
/**
|
|
143
127
|
*/
|
|
144
|
-
|
|
145
|
-
|
|
146
128
|
setPercentage() {
|
|
147
129
|
this._isPercentage = this.suffix.charAt(0) === "%";
|
|
148
130
|
}
|
|
131
|
+
|
|
149
132
|
/**
|
|
150
133
|
* Solves problem where big numbers loose the precision:
|
|
151
134
|
* e.g. Number(23423423423342234.34) => 23423423423342236
|
|
152
135
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
136
|
static getNumericString(stringNumber) {
|
|
156
137
|
const number = Number(stringNumber);
|
|
157
138
|
const string = String(number);
|
|
158
|
-
|
|
159
139
|
if (!(0, _includes.default)(string).call(string, ".") && (0, _includes.default)(stringNumber).call(stringNumber, ".")) {
|
|
160
140
|
// check if original string has all zeros after dot or not
|
|
161
141
|
const precision = stringNumber.substring(stringNumber.indexOf(".") + 1);
|
|
162
|
-
|
|
163
142
|
if (precision.replace(/0/gu, "").length > 0) {
|
|
164
143
|
return stringNumber;
|
|
165
144
|
}
|
|
166
|
-
|
|
167
145
|
return string;
|
|
168
146
|
}
|
|
169
|
-
|
|
170
147
|
return stringNumber;
|
|
171
148
|
}
|
|
149
|
+
|
|
172
150
|
/**
|
|
173
151
|
* Converts formatted value back to non-formatted value
|
|
174
152
|
* e.g. $1,223.06 --> 1223.06
|
|
175
153
|
*/
|
|
176
|
-
|
|
177
|
-
|
|
178
154
|
formatBack(formattedNumber) {
|
|
179
155
|
const stringNumber = String(formattedNumber);
|
|
180
|
-
|
|
181
156
|
if (!stringNumber) {
|
|
182
157
|
return "";
|
|
183
158
|
}
|
|
184
|
-
|
|
185
159
|
if (!isNaN(stringNumber)) {
|
|
186
160
|
return DecimalFormat.getNumericString(stringNumber);
|
|
187
161
|
}
|
|
188
|
-
|
|
189
162
|
let tempNumber = formattedNumber;
|
|
190
163
|
let negative = false;
|
|
191
|
-
|
|
192
164
|
if (formattedNumber.charAt(0) === "-") {
|
|
193
165
|
tempNumber = formattedNumber.substr(1);
|
|
194
166
|
negative = true;
|
|
195
167
|
}
|
|
196
|
-
|
|
197
168
|
const hasPrefix = (0, _startsWith.default)(formattedNumber).call(formattedNumber, this.prefix);
|
|
198
169
|
const suffixIndex = this.suffix === "" ? formattedNumber.length : formattedNumber.indexOf(this.suffix, this.prefix.length + 1);
|
|
199
|
-
|
|
200
170
|
if (hasPrefix && suffixIndex > 0) {
|
|
201
171
|
tempNumber = tempNumber.substr(0, suffixIndex);
|
|
202
172
|
tempNumber = tempNumber.substr(this.prefix.length);
|
|
203
173
|
tempNumber = tempNumber.replace(/,/gu, "");
|
|
204
|
-
|
|
205
174
|
if (negative) {
|
|
206
|
-
tempNumber =
|
|
175
|
+
tempNumber = `-${tempNumber}`;
|
|
207
176
|
}
|
|
208
|
-
|
|
209
177
|
if (!isNaN(tempNumber)) {
|
|
210
178
|
return DecimalFormat.getNumericString(tempNumber);
|
|
211
179
|
}
|
|
212
180
|
}
|
|
213
|
-
|
|
214
181
|
return tempNumber;
|
|
215
182
|
}
|
|
183
|
+
|
|
216
184
|
/**
|
|
217
185
|
*/
|
|
218
|
-
|
|
219
|
-
|
|
220
186
|
static scientificNumber(stringNumber) {
|
|
221
187
|
if ((0, _includes.default)(stringNumber).call(stringNumber, "e")) {
|
|
222
188
|
const number = Number(stringNumber);
|
|
223
|
-
|
|
224
189
|
if (number === Infinity || number === -Infinity) {
|
|
225
190
|
return stringNumber;
|
|
226
191
|
}
|
|
227
|
-
|
|
228
192
|
return String(number);
|
|
229
193
|
}
|
|
230
|
-
|
|
231
194
|
return stringNumber;
|
|
232
195
|
}
|
|
196
|
+
|
|
233
197
|
/**
|
|
234
198
|
*/
|
|
235
|
-
|
|
236
|
-
|
|
237
199
|
getFracAsNumber(fracStr) {
|
|
238
|
-
const number = Number(
|
|
200
|
+
const number = Number(`0.${fracStr}`);
|
|
239
201
|
const DECIMAL_RADIX = 10;
|
|
240
202
|
return this.maxFrac === 0 ? Math.round(number).toString(DECIMAL_RADIX) : number.toFixed(this.maxFrac);
|
|
241
203
|
}
|
|
204
|
+
|
|
242
205
|
/**
|
|
243
206
|
*/
|
|
244
|
-
|
|
245
|
-
|
|
246
207
|
getRoundedFrac(fracStr) {
|
|
247
|
-
const num = this.getFracAsNumber(fracStr);
|
|
208
|
+
const num = this.getFracAsNumber(fracStr);
|
|
248
209
|
|
|
210
|
+
// toFixed method has bugs on IE (0.7 --> 0)
|
|
249
211
|
return num.substr(2);
|
|
250
212
|
}
|
|
213
|
+
|
|
251
214
|
/**
|
|
252
215
|
*/
|
|
253
|
-
|
|
254
|
-
|
|
255
216
|
static getFraction(number) {
|
|
256
217
|
let fracStr = (0, _includes.default)(number).call(number, ".") ? number.substring(number.indexOf(".") + 1) : "";
|
|
257
218
|
fracStr = fracStr.replace(/\./, "");
|
|
258
219
|
return fracStr;
|
|
259
220
|
}
|
|
221
|
+
|
|
260
222
|
/**
|
|
261
223
|
*/
|
|
262
|
-
|
|
263
|
-
|
|
264
224
|
getFracCorrectLength(frac) {
|
|
265
225
|
let fracStr = frac;
|
|
266
|
-
|
|
267
226
|
if (fracStr.length > this.maxFrac) {
|
|
268
227
|
fracStr = this.getRoundedFrac(fracStr);
|
|
269
228
|
}
|
|
270
|
-
|
|
271
229
|
for (let i = fracStr.length; i < this.minFrac; i++) {
|
|
272
230
|
// if minFrac=4 then 1.12 --> 1.1200
|
|
273
|
-
fracStr =
|
|
231
|
+
fracStr = `${fracStr}0`;
|
|
274
232
|
}
|
|
275
|
-
|
|
276
233
|
while (fracStr.length > this.minFrac && fracStr.charAt(fracStr.length - 1) === "0") {
|
|
277
234
|
// if minInt=4 then 00034 --> 0034)
|
|
278
235
|
fracStr = fracStr.substring(0, fracStr.length - 1);
|
|
279
236
|
}
|
|
280
|
-
|
|
281
237
|
return fracStr;
|
|
282
238
|
}
|
|
239
|
+
|
|
283
240
|
/**
|
|
284
241
|
*/
|
|
285
|
-
|
|
286
|
-
|
|
287
242
|
getInteger(number) {
|
|
288
243
|
let intStr = (0, _includes.default)(number).call(number, ".") ? number.substring(0, number.indexOf(".")) : number;
|
|
289
244
|
let doCarry = Number(this.getFracAsNumber(number)) > 1;
|
|
290
245
|
let i = intStr.length - 1;
|
|
291
|
-
|
|
292
246
|
while (doCarry) {
|
|
293
247
|
if (i === -1) {
|
|
294
|
-
intStr =
|
|
248
|
+
intStr = `1${intStr}`;
|
|
295
249
|
break;
|
|
296
250
|
}
|
|
297
|
-
|
|
298
251
|
let x = intStr.charAt(i);
|
|
299
|
-
|
|
300
252
|
if (x === "9") {
|
|
301
253
|
x = "0";
|
|
302
254
|
} else {
|
|
303
|
-
x =
|
|
255
|
+
x = `${x + 1}`;
|
|
304
256
|
doCarry = false;
|
|
305
257
|
}
|
|
306
|
-
|
|
307
258
|
intStr = intStr.substring(0, i) + x + intStr.substring(i + 1, intStr.length);
|
|
308
259
|
i -= 1;
|
|
309
260
|
}
|
|
310
|
-
|
|
311
261
|
for (let j = intStr.length; j < this.minInt; j++) {
|
|
312
262
|
// if minInt=4 then 034 --> 0034
|
|
313
|
-
intStr =
|
|
263
|
+
intStr = `0${intStr}`;
|
|
314
264
|
}
|
|
315
|
-
|
|
316
265
|
while (intStr.length > this.minInt && intStr.charAt(0) === "0") {
|
|
317
266
|
// if minInt=4 then 00034 --> 0034)
|
|
318
267
|
intStr = intStr.substring(1);
|
|
319
268
|
}
|
|
320
|
-
|
|
321
269
|
return intStr;
|
|
322
270
|
}
|
|
271
|
+
|
|
323
272
|
/**
|
|
324
273
|
*/
|
|
325
|
-
|
|
326
|
-
|
|
327
274
|
addGrouping(intStr) {
|
|
328
275
|
let groupedIntStr = intStr;
|
|
329
276
|
let j = 0;
|
|
330
|
-
|
|
331
277
|
for (let i = groupedIntStr.length; i > 0; i--) {
|
|
332
278
|
// add commas
|
|
333
279
|
if (j !== 0 && j % this.comma === 0) {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
groupedIntStr = (0, _concat.default)(_context = "".concat(groupedIntStr.substring(0, i), ",")).call(_context, groupedIntStr.substring(i));
|
|
280
|
+
groupedIntStr = `${groupedIntStr.substring(0, i)},${groupedIntStr.substring(i)}`;
|
|
337
281
|
j = 0;
|
|
338
282
|
}
|
|
339
|
-
|
|
340
283
|
j += 1;
|
|
341
284
|
}
|
|
342
|
-
|
|
343
285
|
return groupedIntStr;
|
|
344
286
|
}
|
|
287
|
+
|
|
345
288
|
/**
|
|
346
289
|
*/
|
|
347
|
-
|
|
348
|
-
|
|
349
290
|
getFormattedValue(intStr, fracStr, isNegative) {
|
|
350
|
-
var _context2, _context3;
|
|
351
|
-
|
|
352
291
|
let formattedValue;
|
|
353
|
-
if (fracStr.length > 0) formattedValue =
|
|
354
|
-
|
|
292
|
+
if (fracStr.length > 0) formattedValue = `${this.prefix + intStr}.${fracStr}${this.suffix}`;else formattedValue = this.prefix + intStr + this.suffix;
|
|
355
293
|
if (isNegative) {
|
|
356
|
-
formattedValue =
|
|
294
|
+
formattedValue = `-${formattedValue}`;
|
|
357
295
|
}
|
|
358
|
-
|
|
359
296
|
return formattedValue;
|
|
360
297
|
}
|
|
298
|
+
|
|
361
299
|
/**
|
|
362
300
|
* Formats given value, using the pattern
|
|
363
301
|
* e.g. $#,###.00: 1223.06 --> $1,223.06
|
|
364
302
|
*/
|
|
365
|
-
|
|
366
|
-
|
|
367
303
|
format() {
|
|
368
304
|
let stringNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
369
|
-
|
|
370
305
|
if (stringNumber === null) {
|
|
371
306
|
return "";
|
|
372
307
|
}
|
|
373
|
-
|
|
374
308
|
let formattedNumber = this.formatBack(stringNumber).toLowerCase();
|
|
375
|
-
|
|
376
309
|
if (isNaN(formattedNumber) || formattedNumber.length === 0) {
|
|
377
310
|
return stringNumber;
|
|
378
311
|
}
|
|
379
|
-
|
|
380
312
|
formattedNumber = DecimalFormat.scientificNumber(formattedNumber);
|
|
381
|
-
|
|
382
313
|
if ((0, _includes.default)(formattedNumber).call(formattedNumber, "e")) {
|
|
383
314
|
return formattedNumber;
|
|
384
315
|
}
|
|
385
|
-
|
|
386
316
|
const isNegative = formattedNumber.charAt(0) === "-";
|
|
387
|
-
|
|
388
317
|
if (isNegative || formattedNumber.charAt(0) === "+") {
|
|
389
318
|
formattedNumber = formattedNumber.substring(1);
|
|
390
319
|
}
|
|
391
|
-
|
|
392
320
|
let fracStr = DecimalFormat.getFraction(formattedNumber);
|
|
393
321
|
let intStr = this.getInteger(formattedNumber);
|
|
394
|
-
|
|
395
322
|
if (this.isPercentage) {
|
|
396
|
-
var _context4;
|
|
397
|
-
|
|
398
323
|
// Add zeros behind fraction to make sure we have at least two characters and take first two character:
|
|
399
324
|
// 1 --> 100 --> 10
|
|
400
|
-
const addZeroToFrac =
|
|
401
|
-
|
|
402
|
-
const lastTwoFrac =
|
|
403
|
-
intStr =
|
|
325
|
+
const addZeroToFrac = `${fracStr}00`.substr(0, 2);
|
|
326
|
+
// Add zeros in front of frac and get last two characters
|
|
327
|
+
const lastTwoFrac = `00${addZeroToFrac}`.substr(-2);
|
|
328
|
+
intStr = `${intStr}${lastTwoFrac}`;
|
|
404
329
|
fracStr = fracStr.substr(2);
|
|
405
330
|
}
|
|
406
|
-
|
|
407
331
|
fracStr = this.getFracCorrectLength(fracStr);
|
|
408
332
|
intStr = this.addGrouping(intStr);
|
|
409
333
|
return this.getFormattedValue(intStr, fracStr, isNegative);
|
|
410
334
|
}
|
|
411
|
-
|
|
412
335
|
}
|
|
413
|
-
|
|
414
336
|
var _default = DecimalFormat;
|
|
415
337
|
exports.default = _default;
|
|
416
338
|
//# 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;;;EACY,IAANC,MAAM,GAAW;IACnB,OAAO,KAAKC,OAAZ;EACD;EAED;AACF;;;EACa,IAAPC,OAAO,GAAW;IACpB,OAAO,KAAKC,QAAZ;EACD;EAED;AACF;;;EACa,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Ae,GAAGzC,aAAa,CAACgD,gBAAd,CAA+BP,eAA/B,CAAlB;;IACA,IAAI,uBAAAA,eAAe,MAAf,CAAAA,eAAe,EAAU,GAAV,CAAnB,EAAmC;MACjC,OAAOA,eAAP;IACD;;IAED,MAAM4B,UAAU,GAAG5B,eAAe,CAACT,MAAhB,CAAuB,CAAvB,MAA8B,GAAjD;;IACA,IAAIqC,UAAU,IAAI5B,eAAe,CAACT,MAAhB,CAAuB,CAAvB,MAA8B,GAAhD,EAAqD;MACnDS,eAAe,GAAGA,eAAe,CAAClB,SAAhB,CAA0B,CAA1B,CAAlB;IACD;;IAED,IAAIK,OAAO,GAAG5B,aAAa,CAAC0D,WAAd,CAA0BjB,eAA1B,CAAd;IACA,IAAIZ,MAAM,GAAG,KAAKiC,UAAL,CAAgBrB,eAAhB,CAAb;;IACA,IAAI,KAAKrB,YAAT,EAAuB;MAAA;;MACrB;MACA;MACA,MAAMoD,aAAa,GAAG,UAAG5C,OAAH,QAAeiB,MAAf,CAAsB,CAAtB,EAAyB,CAAzB,CAAtB,CAHqB,CAIrB;;MACA,MAAM4B,WAAW,GAAG,YAAKD,aAAL,EAAqB3B,MAArB,CAA4B,CAAC,CAA7B,CAApB;MAEAhB,MAAM,8CAAMA,MAAN,mBAAe4C,WAAf,CAAN;MACA7C,OAAO,GAAGA,OAAO,CAACiB,MAAR,CAAe,CAAf,CAAV;IACD;;IAEDjB,OAAO,GAAG,KAAK+B,oBAAL,CAA0B/B,OAA1B,CAAV;IAEAC,MAAM,GAAG,KAAKqC,WAAL,CAAiBrC,MAAjB,CAAT;IAEA,OAAO,KAAKuC,iBAAL,CAAuBvC,MAAvB,EAA+BD,OAA/B,EAAwCyC,UAAxC,CAAP;EACD;;AAlZiB;;eAqZLrE,a"}
|
|
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,MAAM,GAAW;IACnB,OAAO,IAAI,CAACC,OAAO;EACrB;;EAEA;AACF;EACE,IAAIC,KAAK,GAAW;IAClB,OAAO,IAAI,CAACC,MAAM;EACpB;;EAEA;AACF;EACE,IAAIC,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3
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
11
|
-
|
|
12
8
|
var _exceptions = require("../../exceptions");
|
|
13
|
-
|
|
14
9
|
var _DecimalFormat = _interopRequireDefault(require("./DecimalFormat"));
|
|
15
|
-
|
|
16
10
|
var _parseNumbers = require("./parseNumbers");
|
|
17
11
|
|
|
18
12
|
/**
|
|
@@ -22,47 +16,34 @@ const updateGroupingSeparator = (input, groupingSeparator) => {
|
|
|
22
16
|
if (groupingSeparator == null) {
|
|
23
17
|
return input;
|
|
24
18
|
}
|
|
25
|
-
|
|
26
19
|
return input.replace(/,/g, groupingSeparator);
|
|
27
20
|
};
|
|
21
|
+
|
|
28
22
|
/**
|
|
29
23
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
24
|
const formatValue = function (value) {
|
|
33
25
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "0";
|
|
34
26
|
let groupingSeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ",";
|
|
35
27
|
let decimalSeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ".";
|
|
36
|
-
|
|
37
28
|
if (value == null) {
|
|
38
29
|
return "";
|
|
39
30
|
}
|
|
40
|
-
|
|
41
31
|
const numberValue = typeof value === "number" ? value : (0, _parseNumbers.parseToNumber)(value, groupingSeparator, decimalSeparator);
|
|
42
|
-
|
|
43
32
|
if (typeof numberValue !== "number") {
|
|
44
|
-
throw new _exceptions.IllegalArgumentException(
|
|
33
|
+
throw new _exceptions.IllegalArgumentException(`Not a valid number: ${value} for formatValue`);
|
|
45
34
|
}
|
|
46
|
-
|
|
47
35
|
const stringValue = (0, _parseNumbers.parseNumberToString)(numberValue);
|
|
48
|
-
|
|
49
36
|
if (format != null) {
|
|
50
37
|
const formattedValue = new _DecimalFormat.default(format).format(stringValue);
|
|
51
38
|
const [integer, decimal] = formattedValue.split(".");
|
|
52
39
|
const integerPart = updateGroupingSeparator(integer, groupingSeparator);
|
|
53
|
-
|
|
54
40
|
if (decimal) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return (0, _concat.default)(_context = (0, _concat.default)(_context2 = "".concat(integerPart)).call(_context2, decimalSeparator)).call(_context, decimal);
|
|
41
|
+
return `${integerPart}${decimalSeparator}${decimal}`;
|
|
58
42
|
}
|
|
59
|
-
|
|
60
43
|
return integerPart;
|
|
61
44
|
}
|
|
62
|
-
|
|
63
45
|
return stringValue;
|
|
64
46
|
};
|
|
65
|
-
|
|
66
47
|
var _default = formatValue;
|
|
67
48
|
exports.default = _default;
|
|
68
49
|
//# sourceMappingURL=formatValue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatValue.js","names":["updateGroupingSeparator","input","groupingSeparator","replace","formatValue","value","format","decimalSeparator","numberValue","parseToNumber","IllegalArgumentException","stringValue","parseNumberToString","formattedValue","DecimalFormat","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":"
|
|
1
|
+
{"version":3,"file":"formatValue.js","names":["updateGroupingSeparator","input","groupingSeparator","replace","formatValue","value","format","decimalSeparator","numberValue","parseToNumber","IllegalArgumentException","stringValue","parseNumberToString","formattedValue","DecimalFormat","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":";;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