@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
|
@@ -13,63 +13,52 @@ class XMLConstraint {
|
|
|
13
13
|
get id() {
|
|
14
14
|
return "Constraint.XML.InvalidFormat";
|
|
15
15
|
}
|
|
16
|
+
|
|
16
17
|
/**
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
19
|
hasValidation() {
|
|
21
20
|
return true;
|
|
22
21
|
}
|
|
22
|
+
|
|
23
23
|
/**
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
25
|
get defaultMessage() {
|
|
28
26
|
return "Must be well-formed XML";
|
|
29
27
|
}
|
|
28
|
+
|
|
30
29
|
/**
|
|
31
30
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
31
|
get parameters() {
|
|
35
32
|
return {};
|
|
36
33
|
}
|
|
34
|
+
|
|
37
35
|
/**
|
|
38
36
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
37
|
isValidXML(value) {
|
|
42
38
|
const oParser = new DOMParser();
|
|
43
|
-
|
|
44
39
|
try {
|
|
45
40
|
const oDom = oParser.parseFromString(value, "text/xml");
|
|
46
|
-
|
|
47
41
|
if (oDom.querySelectorAll("parsererror").length > 0) {
|
|
48
42
|
return false;
|
|
49
43
|
}
|
|
50
44
|
} catch (error) {
|
|
51
45
|
return false;
|
|
52
46
|
}
|
|
53
|
-
|
|
54
47
|
return true;
|
|
55
48
|
}
|
|
49
|
+
|
|
56
50
|
/**
|
|
57
51
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
52
|
validate(value) {
|
|
61
53
|
return this.isValidXML(value);
|
|
62
54
|
}
|
|
55
|
+
|
|
63
56
|
/**
|
|
64
57
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
58
|
get isMandatoryConstraint() {
|
|
68
59
|
return false;
|
|
69
60
|
}
|
|
70
|
-
|
|
71
61
|
}
|
|
72
|
-
|
|
73
62
|
var _default = XMLConstraint;
|
|
74
63
|
exports.default = _default;
|
|
75
64
|
//# sourceMappingURL=XMLConstraint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XMLConstraint.js","names":["XMLConstraint","id","hasValidation","defaultMessage","parameters","isValidXML","value","oParser","DOMParser","oDom","parseFromString","querySelectorAll","length","error","validate","isMandatoryConstraint"],"sources":["../../../../src/models/attributes/input-constraints/XMLConstraint.js"],"sourcesContent":["// @flow\nimport type { IConstraintModel } from \"../../types\";\n\n/**\n */\nclass XMLConstraint implements IConstraintModel {\n /**\n */\n get id(): string {\n return \"Constraint.XML.InvalidFormat\";\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n get defaultMessage(): string {\n return \"Must be well-formed XML\";\n }\n\n /**\n */\n get parameters(): { ... } {\n return {};\n }\n\n /**\n */\n isValidXML(value: string): boolean {\n const oParser = new DOMParser();\n\n try {\n const oDom = oParser.parseFromString(value, \"text/xml\");\n\n if (oDom.querySelectorAll(\"parsererror\").length > 0) {\n return false;\n }\n } catch (error) {\n return false;\n }\n\n return true;\n }\n\n /**\n */\n validate(value: string): boolean {\n return this.isValidXML(value);\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default XMLConstraint;\n"],"mappings":";;;;;;;AAGA;AACA;AACA,MAAMA,
|
|
1
|
+
{"version":3,"file":"XMLConstraint.js","names":["XMLConstraint","id","hasValidation","defaultMessage","parameters","isValidXML","value","oParser","DOMParser","oDom","parseFromString","querySelectorAll","length","error","validate","isMandatoryConstraint"],"sources":["../../../../src/models/attributes/input-constraints/XMLConstraint.js"],"sourcesContent":["// @flow\nimport type { IConstraintModel } from \"../../types\";\n\n/**\n */\nclass XMLConstraint implements IConstraintModel {\n /**\n */\n get id(): string {\n return \"Constraint.XML.InvalidFormat\";\n }\n\n /**\n */\n hasValidation(): boolean {\n return true;\n }\n\n /**\n */\n get defaultMessage(): string {\n return \"Must be well-formed XML\";\n }\n\n /**\n */\n get parameters(): { ... } {\n return {};\n }\n\n /**\n */\n isValidXML(value: string): boolean {\n const oParser = new DOMParser();\n\n try {\n const oDom = oParser.parseFromString(value, \"text/xml\");\n\n if (oDom.querySelectorAll(\"parsererror\").length > 0) {\n return false;\n }\n } catch (error) {\n return false;\n }\n\n return true;\n }\n\n /**\n */\n validate(value: string): boolean {\n return this.isValidXML(value);\n }\n\n /**\n */\n get isMandatoryConstraint(): boolean {\n return false;\n }\n}\n\nexport default XMLConstraint;\n"],"mappings":";;;;;;;AAGA;AACA;AACA,MAAMA,aAAa,CAA6B;EAC9C;AACF;EACE,IAAIC,EAAE,GAAW;IACf,OAAO,8BAA8B;EACvC;;EAEA;AACF;EACEC,aAAa,GAAY;IACvB,OAAO,IAAI;EACb;;EAEA;AACF;EACE,IAAIC,cAAc,GAAW;IAC3B,OAAO,yBAAyB;EAClC;;EAEA;AACF;EACE,IAAIC,UAAU,GAAY;IACxB,OAAO,CAAC,CAAC;EACX;;EAEA;AACF;EACEC,UAAU,CAACC,KAAa,EAAW;IACjC,MAAMC,OAAO,GAAG,IAAIC,SAAS,EAAE;IAE/B,IAAI;MACF,MAAMC,IAAI,GAAGF,OAAO,CAACG,eAAe,CAACJ,KAAK,EAAE,UAAU,CAAC;MAEvD,IAAIG,IAAI,CAACE,gBAAgB,CAAC,aAAa,CAAC,CAACC,MAAM,GAAG,CAAC,EAAE;QACnD,OAAO,KAAK;MACd;IACF,CAAC,CAAC,OAAOC,KAAK,EAAE;MACd,OAAO,KAAK;IACd;IAEA,OAAO,IAAI;EACb;;EAEA;AACF;EACEC,QAAQ,CAACR,KAAa,EAAW;IAC/B,OAAO,IAAI,CAACD,UAAU,CAACC,KAAK,CAAC;EAC/B;;EAEA;AACF;EACE,IAAIS,qBAAqB,GAAY;IACnC,OAAO,KAAK;EACd;AACF;AAAC,eAEcf,aAAa;AAAA"}
|
|
@@ -1,16 +1,12 @@
|
|
|
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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _exceptions = require("../../../exceptions");
|
|
13
|
-
|
|
14
10
|
/* eslint-disable no-unused-vars */
|
|
15
11
|
|
|
16
12
|
/**
|
|
@@ -31,49 +27,43 @@ class BaseLayoutHintRule {
|
|
|
31
27
|
static isApplicableForAttribute(attribute) {
|
|
32
28
|
return true;
|
|
33
29
|
}
|
|
30
|
+
|
|
34
31
|
/**
|
|
35
32
|
* Indicates if the rule instance is applicable for a specific hint<br>
|
|
36
33
|
* Is required when checkHintApplicability is true
|
|
37
34
|
* @abstract
|
|
38
35
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
36
|
static isApplicableForHint(hint) {
|
|
42
|
-
throw new _exceptions.IllegalStateException(
|
|
37
|
+
throw new _exceptions.IllegalStateException(`Missing isApplicableForHint implementation on layout hint rule`);
|
|
43
38
|
}
|
|
39
|
+
|
|
44
40
|
/**
|
|
45
41
|
* Initialize the rule when isApplicableForAttribute is true and checkHintApplicability is false
|
|
46
42
|
* @abstract
|
|
47
43
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
44
|
static initAttribute(attribute) {
|
|
51
|
-
throw new _exceptions.IllegalStateException(
|
|
45
|
+
throw new _exceptions.IllegalStateException(`Missing initAttribute implementation on layout hint rule`);
|
|
52
46
|
}
|
|
47
|
+
|
|
53
48
|
/**
|
|
54
49
|
* Initialize the rule when isApplicableForAttribute and isApplicableForHint are both true,
|
|
55
50
|
* it receives the hint. Allows a rule to be instantiated multiple times for an attribute,
|
|
56
51
|
* but once for each hint entry
|
|
57
52
|
* @abstract
|
|
58
53
|
*/
|
|
59
|
-
|
|
60
|
-
|
|
61
54
|
static initHint(hint) {
|
|
62
|
-
throw new _exceptions.IllegalStateException(
|
|
55
|
+
throw new _exceptions.IllegalStateException(`Missing initHint implementation on layout hint rule`);
|
|
63
56
|
}
|
|
57
|
+
|
|
64
58
|
/**
|
|
65
59
|
* Abstract method, implements process of layout hint rule,
|
|
66
60
|
* use this to enhance the applicable attribute or the attribute collection
|
|
67
61
|
* @abstract
|
|
68
62
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
63
|
process(attribute, attributes) {
|
|
72
|
-
throw new _exceptions.IllegalStateException(
|
|
64
|
+
throw new _exceptions.IllegalStateException(`Missing process implementation on layout hint rule`);
|
|
73
65
|
}
|
|
74
|
-
|
|
75
66
|
}
|
|
76
|
-
|
|
77
67
|
(0, _defineProperty2.default)(BaseLayoutHintRule, "checkHintApplicability", false);
|
|
78
68
|
var _default = BaseLayoutHintRule;
|
|
79
69
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseLayoutHintRule.js","names":["BaseLayoutHintRule","isApplicableForAttribute","attribute","isApplicableForHint","hint","IllegalStateException","initAttribute","initHint","process","attributes"],"sources":["../../../../src/models/attributes/layouthint-rules/BaseLayoutHintRule.js"],"sourcesContent":["// @flow\n/* eslint-disable no-unused-vars */\n\nimport { IllegalStateException } from \"../../../exceptions\";\n\nimport type { ILayoutHintRule, AttributeType } from \"../../types\";\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * Abstract class for layout hint rules\n * @abstract\n */\nclass BaseLayoutHintRule implements ILayoutHintRule {\n /**\n * Indicates if the rule implements the isApplicableForHint method\n * @type {boolean}\n * @default false\n */\n static checkHintApplicability: boolean = false;\n\n /**\n * Indicates if the rule instance is applicable for a specific attribute<br>\n * @default true\n */\n static isApplicableForAttribute(attribute: AttributeType): boolean {\n return true;\n }\n\n /**\n * Indicates if the rule instance is applicable for a specific hint<br>\n * Is required when checkHintApplicability is true\n * @abstract\n */\n static isApplicableForHint(hint: string): boolean {\n throw new IllegalStateException(\n `Missing isApplicableForHint implementation on layout hint rule`\n );\n }\n\n /**\n * Initialize the rule when isApplicableForAttribute is true and checkHintApplicability is false\n * @abstract\n */\n static initAttribute(attribute: AttributeType): ILayoutHintRule {\n throw new IllegalStateException(\n `Missing initAttribute implementation on layout hint rule`\n );\n }\n\n /**\n * Initialize the rule when isApplicableForAttribute and isApplicableForHint are both true,\n * it receives the hint. Allows a rule to be instantiated multiple times for an attribute,\n * but once for each hint entry\n * @abstract\n */\n static initHint(hint: string): ILayoutHintRule {\n throw new IllegalStateException(\n `Missing initHint implementation on layout hint rule`\n );\n }\n\n /**\n * Abstract method, implements process of layout hint rule,\n * use this to enhance the applicable attribute or the attribute collection\n * @abstract\n */\n process(attribute: AttributeModel, attributes: AttributeCollection) {\n throw new IllegalStateException(\n `Missing process implementation on layout hint rule`\n );\n }\n}\n\nexport default BaseLayoutHintRule;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseLayoutHintRule.js","names":["BaseLayoutHintRule","isApplicableForAttribute","attribute","isApplicableForHint","hint","IllegalStateException","initAttribute","initHint","process","attributes"],"sources":["../../../../src/models/attributes/layouthint-rules/BaseLayoutHintRule.js"],"sourcesContent":["// @flow\n/* eslint-disable no-unused-vars */\n\nimport { IllegalStateException } from \"../../../exceptions\";\n\nimport type { ILayoutHintRule, AttributeType } from \"../../types\";\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * Abstract class for layout hint rules\n * @abstract\n */\nclass BaseLayoutHintRule implements ILayoutHintRule {\n /**\n * Indicates if the rule implements the isApplicableForHint method\n * @type {boolean}\n * @default false\n */\n static checkHintApplicability: boolean = false;\n\n /**\n * Indicates if the rule instance is applicable for a specific attribute<br>\n * @default true\n */\n static isApplicableForAttribute(attribute: AttributeType): boolean {\n return true;\n }\n\n /**\n * Indicates if the rule instance is applicable for a specific hint<br>\n * Is required when checkHintApplicability is true\n * @abstract\n */\n static isApplicableForHint(hint: string): boolean {\n throw new IllegalStateException(\n `Missing isApplicableForHint implementation on layout hint rule`\n );\n }\n\n /**\n * Initialize the rule when isApplicableForAttribute is true and checkHintApplicability is false\n * @abstract\n */\n static initAttribute(attribute: AttributeType): ILayoutHintRule {\n throw new IllegalStateException(\n `Missing initAttribute implementation on layout hint rule`\n );\n }\n\n /**\n * Initialize the rule when isApplicableForAttribute and isApplicableForHint are both true,\n * it receives the hint. Allows a rule to be instantiated multiple times for an attribute,\n * but once for each hint entry\n * @abstract\n */\n static initHint(hint: string): ILayoutHintRule {\n throw new IllegalStateException(\n `Missing initHint implementation on layout hint rule`\n );\n }\n\n /**\n * Abstract method, implements process of layout hint rule,\n * use this to enhance the applicable attribute or the attribute collection\n * @abstract\n */\n process(attribute: AttributeModel, attributes: AttributeCollection) {\n throw new IllegalStateException(\n `Missing process implementation on layout hint rule`\n );\n }\n}\n\nexport default BaseLayoutHintRule;\n"],"mappings":";;;;;;;;AAGA;AAFA;;AAQA;AACA;AACA;AACA;AACA,MAAMA,kBAAkB,CAA4B;EAClD;AACF;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;EACE,OAAOC,wBAAwB,CAACC,SAAwB,EAAW;IACjE,OAAO,IAAI;EACb;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAOC,mBAAmB,CAACC,IAAY,EAAW;IAChD,MAAM,IAAIC,iCAAqB,CAC5B,gEAA+D,CACjE;EACH;;EAEA;AACF;AACA;AACA;EACE,OAAOC,aAAa,CAACJ,SAAwB,EAAmB;IAC9D,MAAM,IAAIG,iCAAqB,CAC5B,0DAAyD,CAC3D;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;EACE,OAAOE,QAAQ,CAACH,IAAY,EAAmB;IAC7C,MAAM,IAAIC,iCAAqB,CAC5B,qDAAoD,CACtD;EACH;;EAEA;AACF;AACA;AACA;AACA;EACEG,OAAO,CAACN,SAAyB,EAAEO,UAA+B,EAAE;IAClE,MAAM,IAAIJ,iCAAqB,CAC5B,oDAAmD,CACrD;EACH;AACF;AAAC,8BA3DKL,kBAAkB,4BAMmB,KAAK;AAAA,eAuDjCA,kBAAkB;AAAA"}
|
|
@@ -1,30 +1,18 @@
|
|
|
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
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
11
|
-
|
|
12
8
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
13
|
-
|
|
14
9
|
var _trim = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/trim"));
|
|
15
|
-
|
|
16
10
|
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
17
|
-
|
|
18
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
19
|
-
|
|
20
12
|
var _BaseLayoutHintRule = _interopRequireDefault(require("./BaseLayoutHintRule"));
|
|
21
|
-
|
|
22
13
|
var _constants = require("../../../constants");
|
|
23
|
-
|
|
24
14
|
var _ChoiceAttributeModel = _interopRequireDefault(require("../ChoiceAttributeModel"));
|
|
25
|
-
|
|
26
15
|
var _BooleanAttributeModel = _interopRequireDefault(require("../BooleanAttributeModel"));
|
|
27
|
-
|
|
28
16
|
var _exceptions = require("../../../exceptions");
|
|
29
17
|
|
|
30
18
|
const EQUALS = "equals";
|
|
@@ -35,10 +23,10 @@ const NOT_IS_EMPTY = "notIsEmpty";
|
|
|
35
23
|
const IS_EMPTY = "isEmpty";
|
|
36
24
|
const SHOW = "show";
|
|
37
25
|
const HIDE = "hide";
|
|
26
|
+
|
|
38
27
|
/**
|
|
39
28
|
* Depending attributes hint logic
|
|
40
29
|
*/
|
|
41
|
-
|
|
42
30
|
class DependentAttribute extends _BaseLayoutHintRule.default {
|
|
43
31
|
constructor() {
|
|
44
32
|
super(...arguments);
|
|
@@ -47,211 +35,165 @@ class DependentAttribute extends _BaseLayoutHintRule.default {
|
|
|
47
35
|
(0, _defineProperty2.default)(this, "_operator", void 0);
|
|
48
36
|
(0, _defineProperty2.default)(this, "_options", void 0);
|
|
49
37
|
}
|
|
50
|
-
|
|
51
38
|
/**
|
|
52
39
|
*/
|
|
53
40
|
static isApplicableForHint(hint) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const regex = new RegExp((0, _concat.default)(_context = (0, _concat.default)(_context2 = "^".concat(_constants.DEPENDENT_ATTRIBUTE, "\\s?(")).call(_context2, SHOW, "|")).call(_context, HIDE, ")"), "i");
|
|
41
|
+
const regex = new RegExp(`^${_constants.DEPENDENT_ATTRIBUTE}\\s?(${SHOW}|${HIDE})`, "i");
|
|
57
42
|
return regex.test(hint);
|
|
58
43
|
}
|
|
44
|
+
|
|
59
45
|
/**
|
|
60
46
|
* Used on initHint to create an instance of this rule
|
|
61
47
|
*/
|
|
62
|
-
|
|
63
|
-
|
|
64
48
|
static getRuleInstance() {
|
|
65
49
|
return new DependentAttribute();
|
|
66
50
|
}
|
|
51
|
+
|
|
67
52
|
/**
|
|
68
53
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
54
|
static initHint(hint) {
|
|
72
|
-
var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
|
|
73
|
-
|
|
74
55
|
const rule = this.getRuleInstance();
|
|
75
|
-
const OPERATORS =
|
|
76
|
-
const regex = new RegExp(
|
|
77
|
-
const isEmpyNotIsEmptRegex = new RegExp(
|
|
56
|
+
const OPERATORS = `${EQUALS}|${INCLUDES}|${NOT_EQUALS}|${NOT_INCLUDES}|${NOT_IS_EMPTY}|${IS_EMPTY}`;
|
|
57
|
+
const regex = new RegExp(`${_constants.DEPENDENT_ATTRIBUTE}\\s?(\\S*)\\swhen ${_constants.DEPENDENT_ATTRIBUTE_CONTROL}:\\s?(.*?)\\s*(${OPERATORS})\\s(.*)`, "i");
|
|
58
|
+
const isEmpyNotIsEmptRegex = new RegExp(`${_constants.DEPENDENT_ATTRIBUTE}\\s?(\\S*)\\swhen ${_constants.DEPENDENT_ATTRIBUTE_CONTROL}:\\s?(.*?)\\s*(${OPERATORS})`, "i");
|
|
78
59
|
const result = hint.match(regex) ? hint.match(regex) : hint.match(isEmpyNotIsEmptRegex);
|
|
79
|
-
|
|
80
60
|
if (result) {
|
|
81
61
|
rule.action = result[1];
|
|
82
62
|
rule.control = result[2];
|
|
83
63
|
rule.operator = result[3];
|
|
84
64
|
rule.options = !result[4] ? "" : result[4];
|
|
85
65
|
} else {
|
|
86
|
-
throw new _exceptions.ConfigurationException(
|
|
66
|
+
throw new _exceptions.ConfigurationException(`No dependent information found on layout hint: ${hint}`);
|
|
87
67
|
}
|
|
88
|
-
|
|
89
68
|
return rule;
|
|
90
69
|
}
|
|
70
|
+
|
|
91
71
|
/**
|
|
92
72
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
73
|
get action() {
|
|
96
74
|
return this._action;
|
|
97
75
|
}
|
|
76
|
+
|
|
98
77
|
/**
|
|
99
78
|
*/
|
|
100
|
-
|
|
101
|
-
|
|
102
79
|
set action(action) {
|
|
103
80
|
this._action = action;
|
|
104
81
|
}
|
|
82
|
+
|
|
105
83
|
/**
|
|
106
84
|
*/
|
|
107
|
-
|
|
108
|
-
|
|
109
85
|
get control() {
|
|
110
86
|
return this._control;
|
|
111
87
|
}
|
|
88
|
+
|
|
112
89
|
/**
|
|
113
90
|
*/
|
|
114
|
-
|
|
115
|
-
|
|
116
91
|
set control(control) {
|
|
117
92
|
this._control = control;
|
|
118
93
|
}
|
|
94
|
+
|
|
119
95
|
/**
|
|
120
96
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
97
|
get operator() {
|
|
124
98
|
return this._operator;
|
|
125
99
|
}
|
|
100
|
+
|
|
126
101
|
/**
|
|
127
102
|
*/
|
|
128
|
-
|
|
129
|
-
|
|
130
103
|
set operator(operator) {
|
|
131
104
|
this._operator = operator;
|
|
132
105
|
}
|
|
106
|
+
|
|
133
107
|
/**
|
|
134
108
|
*/
|
|
135
|
-
|
|
136
|
-
|
|
137
109
|
get options() {
|
|
138
110
|
return this._options;
|
|
139
111
|
}
|
|
112
|
+
|
|
140
113
|
/**
|
|
141
114
|
*/
|
|
142
|
-
|
|
143
|
-
|
|
144
115
|
set options(options) {
|
|
145
|
-
var
|
|
146
|
-
|
|
147
|
-
this._options = (0, _map.default)(_context11 = options.split("|")).call(_context11, option => (0, _trim.default)(option).call(option));
|
|
116
|
+
var _context;
|
|
117
|
+
this._options = (0, _map.default)(_context = options.split("|")).call(_context, option => (0, _trim.default)(option).call(option));
|
|
148
118
|
}
|
|
119
|
+
|
|
149
120
|
/**
|
|
150
121
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
153
122
|
processEqualsOptions(controlAttribute) {
|
|
154
123
|
if (controlAttribute instanceof _ChoiceAttributeModel.default || controlAttribute instanceof _BooleanAttributeModel.default) {
|
|
155
124
|
return this.options.every(option => {
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
return (0, _includes.default)(_context12 = controlAttribute.selected).call(_context12, option);
|
|
125
|
+
var _context2;
|
|
126
|
+
return (0, _includes.default)(_context2 = controlAttribute.selected).call(_context2, option);
|
|
159
127
|
});
|
|
160
128
|
}
|
|
161
|
-
|
|
162
129
|
throw new _exceptions.ConfigurationException("Dependent control in combination with equals operator must be a choice, string or number attribute");
|
|
163
130
|
}
|
|
131
|
+
|
|
164
132
|
/**
|
|
165
133
|
*/
|
|
166
|
-
|
|
167
|
-
|
|
168
134
|
processIncludesOptions(controlAttribute) {
|
|
169
135
|
if (controlAttribute instanceof _ChoiceAttributeModel.default) {
|
|
170
136
|
return this.options.some(option => {
|
|
171
|
-
var
|
|
172
|
-
|
|
173
|
-
return (0, _includes.default)(_context13 = controlAttribute.selected).call(_context13, option);
|
|
137
|
+
var _context3;
|
|
138
|
+
return (0, _includes.default)(_context3 = controlAttribute.selected).call(_context3, option);
|
|
174
139
|
});
|
|
175
140
|
}
|
|
176
|
-
|
|
177
141
|
throw new _exceptions.ConfigurationException("Dependent control in combination with includes operator must be a choice attribute");
|
|
178
142
|
}
|
|
143
|
+
|
|
179
144
|
/**
|
|
180
145
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
183
146
|
handleOperator(controlAttribute) {
|
|
184
147
|
switch (this.operator) {
|
|
185
148
|
case EQUALS:
|
|
186
149
|
return this.processEqualsOptions(controlAttribute);
|
|
187
|
-
|
|
188
150
|
case INCLUDES:
|
|
189
151
|
return this.processIncludesOptions(controlAttribute);
|
|
190
|
-
|
|
191
152
|
case NOT_EQUALS:
|
|
192
153
|
return !this.processEqualsOptions(controlAttribute);
|
|
193
|
-
|
|
194
154
|
case NOT_INCLUDES:
|
|
195
155
|
return !this.processIncludesOptions(controlAttribute);
|
|
196
|
-
|
|
197
156
|
case NOT_IS_EMPTY:
|
|
198
157
|
return (controlAttribute === null || controlAttribute === void 0 ? void 0 : controlAttribute.selected.length) !== 0;
|
|
199
|
-
|
|
200
158
|
case IS_EMPTY:
|
|
201
159
|
return (controlAttribute === null || controlAttribute === void 0 ? void 0 : controlAttribute.selected.length) === 0;
|
|
202
|
-
|
|
203
160
|
default:
|
|
204
|
-
throw new _exceptions.ConfigurationException(
|
|
161
|
+
throw new _exceptions.ConfigurationException(`Unsupported operator for dependent question: ${this.operator}`);
|
|
205
162
|
}
|
|
206
163
|
}
|
|
164
|
+
|
|
207
165
|
/**
|
|
208
166
|
*/
|
|
209
|
-
|
|
210
|
-
|
|
211
167
|
getControlAttribute(attributes) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
const attribute = attributes.getAttributeByLayoutHint((0, _concat.default)(_context14 = "".concat(_constants.DEPENDENT_ATTRIBUTE_CONTROL, ":")).call(_context14, this.control), (0, _concat.default)(_context15 = "".concat(_constants.DEPENDENT_ATTRIBUTE_CONTROL, ": ")).call(_context15, this.control));
|
|
215
|
-
|
|
168
|
+
const attribute = attributes.getAttributeByLayoutHint(`${_constants.DEPENDENT_ATTRIBUTE_CONTROL}:${this.control}`, `${_constants.DEPENDENT_ATTRIBUTE_CONTROL}: ${this.control}`);
|
|
216
169
|
if (attribute instanceof _ChoiceAttributeModel.default || attribute instanceof _BooleanAttributeModel.default) {
|
|
217
170
|
return attribute;
|
|
218
171
|
}
|
|
219
|
-
|
|
220
172
|
return null;
|
|
221
173
|
}
|
|
174
|
+
|
|
222
175
|
/**
|
|
223
176
|
*/
|
|
224
|
-
|
|
225
|
-
|
|
226
177
|
process(attribute, attributes) {
|
|
227
178
|
const controlAttribute = this.getControlAttribute(attributes);
|
|
228
|
-
|
|
229
179
|
if (!controlAttribute) {
|
|
230
180
|
return;
|
|
231
181
|
}
|
|
232
|
-
|
|
233
182
|
controlAttribute.processLayoutHintRules(attributes);
|
|
234
|
-
|
|
235
183
|
if (controlAttribute.isHidden) {
|
|
236
184
|
attribute.hide();
|
|
237
185
|
return;
|
|
238
186
|
}
|
|
239
|
-
|
|
240
187
|
const result = this.handleOperator(controlAttribute);
|
|
241
|
-
|
|
242
188
|
if (this.action === SHOW) {
|
|
243
189
|
attribute.isHidden = !result;
|
|
244
190
|
} else if (this.action === HIDE) {
|
|
245
191
|
attribute.isHidden = result;
|
|
246
192
|
} else {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
throw new _exceptions.ConfigurationException((0, _concat.default)(_context16 = "Unsupported action ".concat(this.action, " for dependent question on attribute: ")).call(_context16, attribute.label));
|
|
193
|
+
throw new _exceptions.ConfigurationException(`Unsupported action ${this.action} for dependent question on attribute: ${attribute.label}`);
|
|
250
194
|
}
|
|
251
195
|
}
|
|
252
|
-
|
|
253
196
|
}
|
|
254
|
-
|
|
255
197
|
(0, _defineProperty2.default)(DependentAttribute, "checkHintApplicability", true);
|
|
256
198
|
var _default = DependentAttribute;
|
|
257
199
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependentAttribute.js","names":["EQUALS","INCLUDES","NOT_EQUALS","NOT_INCLUDES","NOT_IS_EMPTY","IS_EMPTY","SHOW","HIDE","DependentAttribute","BaseLayoutHintRule","isApplicableForHint","hint","regex","RegExp","DEPENDENT_ATTRIBUTE","test","getRuleInstance","initHint","rule","OPERATORS","DEPENDENT_ATTRIBUTE_CONTROL","isEmpyNotIsEmptRegex","result","match","action","control","operator","options","ConfigurationException","_action","_control","_operator","_options","split","option","processEqualsOptions","controlAttribute","ChoiceAttributeModel","BooleanAttributeModel","every","selected","processIncludesOptions","some","handleOperator","length","getControlAttribute","attributes","attribute","getAttributeByLayoutHint","process","processLayoutHintRules","isHidden","hide","label"],"sources":["../../../../src/models/attributes/layouthint-rules/DependentAttribute.js"],"sourcesContent":["// @flow\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport {\n DEPENDENT_ATTRIBUTE_CONTROL,\n DEPENDENT_ATTRIBUTE,\n} from \"../../../constants\";\n\nimport ChoiceAttributeModel from \"../ChoiceAttributeModel\";\nimport BooleanAttributeModel from \"../BooleanAttributeModel\";\n\nimport { ConfigurationException } from \"../../../exceptions\";\n\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\nconst EQUALS = \"equals\";\nconst INCLUDES = \"includes\";\nconst NOT_EQUALS = \"notEquals\";\nconst NOT_INCLUDES = \"notIncludes\";\nconst NOT_IS_EMPTY = \"notIsEmpty\";\nconst IS_EMPTY = \"isEmpty\";\n\nconst SHOW = \"show\";\nconst HIDE = \"hide\";\n\n/**\n * Depending attributes hint logic\n */\nclass DependentAttribute extends BaseLayoutHintRule {\n _action: string;\n _control: string;\n _operator: string;\n _options: Array<string>;\n\n /**\n */\n static checkHintApplicability: boolean = true;\n\n /**\n */\n static isApplicableForHint(hint: string): boolean {\n const regex = new RegExp(\n `^${DEPENDENT_ATTRIBUTE}\\\\s?(${SHOW}|${HIDE})`,\n \"i\"\n );\n\n return regex.test(hint);\n }\n\n /**\n * Used on initHint to create an instance of this rule\n */\n static getRuleInstance(): DependentAttribute {\n return new DependentAttribute();\n }\n\n /**\n */\n static initHint(hint: string): any {\n const rule = this.getRuleInstance();\n\n const OPERATORS = `${EQUALS}|${INCLUDES}|${NOT_EQUALS}|${NOT_INCLUDES}|${NOT_IS_EMPTY}|${IS_EMPTY}`;\n const regex = new RegExp(\n `${DEPENDENT_ATTRIBUTE}\\\\s?(\\\\S*)\\\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\\\s?(.*?)\\\\s*(${OPERATORS})\\\\s(.*)`,\n \"i\"\n );\n const isEmpyNotIsEmptRegex = new RegExp(\n `${DEPENDENT_ATTRIBUTE}\\\\s?(\\\\S*)\\\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\\\s?(.*?)\\\\s*(${OPERATORS})`,\n \"i\"\n );\n\n const result = hint.match(regex)\n ? hint.match(regex)\n : hint.match(isEmpyNotIsEmptRegex);\n\n if (result) {\n rule.action = result[1];\n rule.control = result[2];\n rule.operator = result[3];\n rule.options = !result[4] ? \"\" : result[4];\n } else {\n throw new ConfigurationException(\n `No dependent information found on layout hint: ${hint}`\n );\n }\n\n return rule;\n }\n\n /**\n */\n get action(): string {\n return this._action;\n }\n\n /**\n */\n set action(action: string) {\n this._action = action;\n }\n\n /**\n */\n get control(): string {\n return this._control;\n }\n\n /**\n */\n set control(control: string) {\n this._control = control;\n }\n\n /**\n */\n get operator(): string {\n return this._operator;\n }\n\n /**\n */\n set operator(operator: string) {\n this._operator = operator;\n }\n\n /**\n */\n get options(): Array<string> {\n return this._options;\n }\n\n /**\n */\n set options(options: string): void {\n this._options = options.split(\"|\").map((option) => option.trim());\n }\n\n /**\n */\n processEqualsOptions(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n if (\n controlAttribute instanceof ChoiceAttributeModel ||\n controlAttribute instanceof BooleanAttributeModel\n ) {\n return this.options.every((option) =>\n controlAttribute.selected.includes(option)\n );\n }\n\n throw new ConfigurationException(\n \"Dependent control in combination with equals operator must be a choice, string or number attribute\"\n );\n }\n\n /**\n */\n processIncludesOptions(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n if (controlAttribute instanceof ChoiceAttributeModel) {\n return this.options.some((option) =>\n controlAttribute.selected.includes(option)\n );\n }\n\n throw new ConfigurationException(\n \"Dependent control in combination with includes operator must be a choice attribute\"\n );\n }\n\n /**\n */\n handleOperator(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n switch (this.operator) {\n case EQUALS:\n return this.processEqualsOptions(controlAttribute);\n case INCLUDES:\n return this.processIncludesOptions(controlAttribute);\n case NOT_EQUALS:\n return !this.processEqualsOptions(controlAttribute);\n case NOT_INCLUDES:\n return !this.processIncludesOptions(controlAttribute);\n case NOT_IS_EMPTY:\n return controlAttribute?.selected.length !== 0;\n case IS_EMPTY:\n return controlAttribute?.selected.length === 0;\n default:\n throw new ConfigurationException(\n `Unsupported operator for dependent question: ${this.operator}`\n );\n }\n }\n\n /**\n */\n getControlAttribute(\n attributes: AttributeCollection\n ): ChoiceAttributeModel | BooleanAttributeModel | null {\n const attribute = attributes.getAttributeByLayoutHint(\n `${DEPENDENT_ATTRIBUTE_CONTROL}:${this.control}`,\n `${DEPENDENT_ATTRIBUTE_CONTROL}: ${this.control}`\n );\n\n if (\n attribute instanceof ChoiceAttributeModel ||\n attribute instanceof BooleanAttributeModel\n ) {\n return attribute;\n }\n\n return null;\n }\n\n /**\n */\n process(attribute: AttributeModel, attributes: AttributeCollection) {\n const controlAttribute = this.getControlAttribute(attributes);\n if (!controlAttribute) {\n return;\n }\n\n controlAttribute.processLayoutHintRules(attributes);\n if (controlAttribute.isHidden) {\n attribute.hide();\n return;\n }\n\n const result = this.handleOperator(controlAttribute);\n if (this.action === SHOW) {\n attribute.isHidden = !result;\n } else if (this.action === HIDE) {\n attribute.isHidden = result;\n } else {\n throw new ConfigurationException(\n `Unsupported action ${this.action} for dependent question on attribute: ${attribute.label}`\n );\n }\n }\n}\n\nexport default DependentAttribute;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAKA;;AACA;;AAEA;;AAKA,MAAMA,MAAM,GAAG,QAAf;AACA,MAAMC,QAAQ,GAAG,UAAjB;AACA,MAAMC,UAAU,GAAG,WAAnB;AACA,MAAMC,YAAY,GAAG,aAArB;AACA,MAAMC,YAAY,GAAG,YAArB;AACA,MAAMC,QAAQ,GAAG,SAAjB;AAEA,MAAMC,IAAI,GAAG,MAAb;AACA,MAAMC,IAAI,GAAG,MAAb;AAEA;AACA;AACA;;AACA,MAAMC,kBAAN,SAAiCC,2BAAjC,CAAoD;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;;EAUlD;AACF;EAC4B,OAAnBC,mBAAmB,CAACC,IAAD,EAAwB;IAAA;;IAChD,MAAMC,KAAK,GAAG,IAAIC,MAAJ,6EACRC,8BADQ,4BACmBR,IADnB,uBAC2BC,IAD3B,QAEZ,GAFY,CAAd;IAKA,OAAOK,KAAK,CAACG,IAAN,CAAWJ,IAAX,CAAP;EACD;EAED;AACF;AACA;;;EACwB,OAAfK,eAAe,GAAuB;IAC3C,OAAO,IAAIR,kBAAJ,EAAP;EACD;EAED;AACF;;;EACiB,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KZ,MAAL,KAAgBlB,IAApB,EAA0B;MACxByC,SAAS,CAACI,QAAV,GAAqB,CAAC7B,MAAtB;IACD,CAFD,MAEO,IAAI,KAAKE,MAAL,KAAgBjB,IAApB,EAA0B;MAC/BwC,SAAS,CAACI,QAAV,GAAqB7B,MAArB;IACD,CAFM,MAEA;MAAA;;MACL,MAAM,IAAIM,kCAAJ,gEACkB,KAAKJ,MADvB,8DACsEuB,SAAS,CAACM,KADhF,EAAN;IAGD;EACF;;AArNiD;;8BAA9C7C,kB,4BAQqC,I;eAgN5BA,kB"}
|
|
1
|
+
{"version":3,"file":"DependentAttribute.js","names":["EQUALS","INCLUDES","NOT_EQUALS","NOT_INCLUDES","NOT_IS_EMPTY","IS_EMPTY","SHOW","HIDE","DependentAttribute","BaseLayoutHintRule","isApplicableForHint","hint","regex","RegExp","DEPENDENT_ATTRIBUTE","test","getRuleInstance","initHint","rule","OPERATORS","DEPENDENT_ATTRIBUTE_CONTROL","isEmpyNotIsEmptRegex","result","match","action","control","operator","options","ConfigurationException","_action","_control","_operator","_options","split","option","processEqualsOptions","controlAttribute","ChoiceAttributeModel","BooleanAttributeModel","every","selected","processIncludesOptions","some","handleOperator","length","getControlAttribute","attributes","attribute","getAttributeByLayoutHint","process","processLayoutHintRules","isHidden","hide","label"],"sources":["../../../../src/models/attributes/layouthint-rules/DependentAttribute.js"],"sourcesContent":["// @flow\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport {\n DEPENDENT_ATTRIBUTE_CONTROL,\n DEPENDENT_ATTRIBUTE,\n} from \"../../../constants\";\n\nimport ChoiceAttributeModel from \"../ChoiceAttributeModel\";\nimport BooleanAttributeModel from \"../BooleanAttributeModel\";\n\nimport { ConfigurationException } from \"../../../exceptions\";\n\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type AttributeModel from \"../AttributeModel\";\n\nconst EQUALS = \"equals\";\nconst INCLUDES = \"includes\";\nconst NOT_EQUALS = \"notEquals\";\nconst NOT_INCLUDES = \"notIncludes\";\nconst NOT_IS_EMPTY = \"notIsEmpty\";\nconst IS_EMPTY = \"isEmpty\";\n\nconst SHOW = \"show\";\nconst HIDE = \"hide\";\n\n/**\n * Depending attributes hint logic\n */\nclass DependentAttribute extends BaseLayoutHintRule {\n _action: string;\n _control: string;\n _operator: string;\n _options: Array<string>;\n\n /**\n */\n static checkHintApplicability: boolean = true;\n\n /**\n */\n static isApplicableForHint(hint: string): boolean {\n const regex = new RegExp(\n `^${DEPENDENT_ATTRIBUTE}\\\\s?(${SHOW}|${HIDE})`,\n \"i\"\n );\n\n return regex.test(hint);\n }\n\n /**\n * Used on initHint to create an instance of this rule\n */\n static getRuleInstance(): DependentAttribute {\n return new DependentAttribute();\n }\n\n /**\n */\n static initHint(hint: string): any {\n const rule = this.getRuleInstance();\n\n const OPERATORS = `${EQUALS}|${INCLUDES}|${NOT_EQUALS}|${NOT_INCLUDES}|${NOT_IS_EMPTY}|${IS_EMPTY}`;\n const regex = new RegExp(\n `${DEPENDENT_ATTRIBUTE}\\\\s?(\\\\S*)\\\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\\\s?(.*?)\\\\s*(${OPERATORS})\\\\s(.*)`,\n \"i\"\n );\n const isEmpyNotIsEmptRegex = new RegExp(\n `${DEPENDENT_ATTRIBUTE}\\\\s?(\\\\S*)\\\\swhen ${DEPENDENT_ATTRIBUTE_CONTROL}:\\\\s?(.*?)\\\\s*(${OPERATORS})`,\n \"i\"\n );\n\n const result = hint.match(regex)\n ? hint.match(regex)\n : hint.match(isEmpyNotIsEmptRegex);\n\n if (result) {\n rule.action = result[1];\n rule.control = result[2];\n rule.operator = result[3];\n rule.options = !result[4] ? \"\" : result[4];\n } else {\n throw new ConfigurationException(\n `No dependent information found on layout hint: ${hint}`\n );\n }\n\n return rule;\n }\n\n /**\n */\n get action(): string {\n return this._action;\n }\n\n /**\n */\n set action(action: string) {\n this._action = action;\n }\n\n /**\n */\n get control(): string {\n return this._control;\n }\n\n /**\n */\n set control(control: string) {\n this._control = control;\n }\n\n /**\n */\n get operator(): string {\n return this._operator;\n }\n\n /**\n */\n set operator(operator: string) {\n this._operator = operator;\n }\n\n /**\n */\n get options(): Array<string> {\n return this._options;\n }\n\n /**\n */\n set options(options: string): void {\n this._options = options.split(\"|\").map((option) => option.trim());\n }\n\n /**\n */\n processEqualsOptions(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n if (\n controlAttribute instanceof ChoiceAttributeModel ||\n controlAttribute instanceof BooleanAttributeModel\n ) {\n return this.options.every((option) =>\n controlAttribute.selected.includes(option)\n );\n }\n\n throw new ConfigurationException(\n \"Dependent control in combination with equals operator must be a choice, string or number attribute\"\n );\n }\n\n /**\n */\n processIncludesOptions(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n if (controlAttribute instanceof ChoiceAttributeModel) {\n return this.options.some((option) =>\n controlAttribute.selected.includes(option)\n );\n }\n\n throw new ConfigurationException(\n \"Dependent control in combination with includes operator must be a choice attribute\"\n );\n }\n\n /**\n */\n handleOperator(\n controlAttribute: ChoiceAttributeModel | BooleanAttributeModel\n ): boolean {\n switch (this.operator) {\n case EQUALS:\n return this.processEqualsOptions(controlAttribute);\n case INCLUDES:\n return this.processIncludesOptions(controlAttribute);\n case NOT_EQUALS:\n return !this.processEqualsOptions(controlAttribute);\n case NOT_INCLUDES:\n return !this.processIncludesOptions(controlAttribute);\n case NOT_IS_EMPTY:\n return controlAttribute?.selected.length !== 0;\n case IS_EMPTY:\n return controlAttribute?.selected.length === 0;\n default:\n throw new ConfigurationException(\n `Unsupported operator for dependent question: ${this.operator}`\n );\n }\n }\n\n /**\n */\n getControlAttribute(\n attributes: AttributeCollection\n ): ChoiceAttributeModel | BooleanAttributeModel | null {\n const attribute = attributes.getAttributeByLayoutHint(\n `${DEPENDENT_ATTRIBUTE_CONTROL}:${this.control}`,\n `${DEPENDENT_ATTRIBUTE_CONTROL}: ${this.control}`\n );\n\n if (\n attribute instanceof ChoiceAttributeModel ||\n attribute instanceof BooleanAttributeModel\n ) {\n return attribute;\n }\n\n return null;\n }\n\n /**\n */\n process(attribute: AttributeModel, attributes: AttributeCollection) {\n const controlAttribute = this.getControlAttribute(attributes);\n if (!controlAttribute) {\n return;\n }\n\n controlAttribute.processLayoutHintRules(attributes);\n if (controlAttribute.isHidden) {\n attribute.hide();\n return;\n }\n\n const result = this.handleOperator(controlAttribute);\n if (this.action === SHOW) {\n attribute.isHidden = !result;\n } else if (this.action === HIDE) {\n attribute.isHidden = result;\n } else {\n throw new ConfigurationException(\n `Unsupported action ${this.action} for dependent question on attribute: ${attribute.label}`\n );\n }\n }\n}\n\nexport default DependentAttribute;\n"],"mappings":";;;;;;;;;;;AACA;AAEA;AAKA;AACA;AAEA;;AAKA,MAAMA,MAAM,GAAG,QAAQ;AACvB,MAAMC,QAAQ,GAAG,UAAU;AAC3B,MAAMC,UAAU,GAAG,WAAW;AAC9B,MAAMC,YAAY,GAAG,aAAa;AAClC,MAAMC,YAAY,GAAG,YAAY;AACjC,MAAMC,QAAQ,GAAG,SAAS;AAE1B,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,IAAI,GAAG,MAAM;;AAEnB;AACA;AACA;AACA,MAAMC,kBAAkB,SAASC,2BAAkB,CAAC;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAUlD;AACF;EACE,OAAOC,mBAAmB,CAACC,IAAY,EAAW;IAChD,MAAMC,KAAK,GAAG,IAAIC,MAAM,CACrB,IAAGC,8BAAoB,QAAOR,IAAK,IAAGC,IAAK,GAAE,EAC9C,GAAG,CACJ;IAED,OAAOK,KAAK,CAACG,IAAI,CAACJ,IAAI,CAAC;EACzB;;EAEA;AACF;AACA;EACE,OAAOK,eAAe,GAAuB;IAC3C,OAAO,IAAIR,kBAAkB,EAAE;EACjC;;EAEA;AACF;EACE,OAAOS,QAAQ,CAACN,IAAY,EAAO;IACjC,MAAMO,IAAI,GAAG,IAAI,CAACF,eAAe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AACP,gBAAgB,CAAC;IACpD,IAAI,IAAI,CAACZ,MAAM,KAAKlB,IAAI,EAAE;MACxByC,SAAS,CAACI,QAAQ,GAAG,CAAC7B,MAAM;IAC9B,CAAC,MAAM,IAAI,IAAI,CAACE,MAAM,KAAKjB,IAAI,EAAE;MAC/BwC,SAAS,CAACI,QAAQ,GAAG7B,MAAM;IAC7B,CAAC,MAAM;MACL,MAAM,IAAIM,kCAAsB,CAC7B,sBAAqB,IAAI,CAACJ,MAAO,yCAAwCuB,SAAS,CAACM,KAAM,EAAC,CAC5F;IACH;EACF;AACF;AAAC,8BAtNK7C,kBAAkB,4BAQmB,IAAI;AAAA,eAgNhCA,kBAAkB;AAAA"}
|
|
@@ -1,20 +1,14 @@
|
|
|
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.updateLayoutHintRules = exports.default = exports.addLayoutHintRule = void 0;
|
|
9
|
-
|
|
10
8
|
var _BaseCollection = _interopRequireDefault(require("../../base/BaseCollection"));
|
|
11
|
-
|
|
12
9
|
var _BaseLayoutHintRule = _interopRequireDefault(require("./BaseLayoutHintRule"));
|
|
13
|
-
|
|
14
10
|
var _DependentAttribute = _interopRequireDefault(require("./DependentAttribute"));
|
|
15
|
-
|
|
16
11
|
var _RemainingTotalUploadSize = _interopRequireDefault(require("./RemainingTotalUploadSize"));
|
|
17
|
-
|
|
18
12
|
var _exceptions = require("../../../exceptions");
|
|
19
13
|
|
|
20
14
|
/**
|
|
@@ -22,16 +16,14 @@ var _exceptions = require("../../../exceptions");
|
|
|
22
16
|
* @private
|
|
23
17
|
*/
|
|
24
18
|
let layoutHintRules = [_DependentAttribute.default, _RemainingTotalUploadSize.default];
|
|
19
|
+
|
|
25
20
|
/**
|
|
26
21
|
* Add custom layout hint rules
|
|
27
22
|
*/
|
|
28
|
-
|
|
29
23
|
const addLayoutHintRule = rule => {
|
|
30
24
|
layoutHintRules.push(rule);
|
|
31
25
|
};
|
|
32
|
-
|
|
33
26
|
exports.addLayoutHintRule = addLayoutHintRule;
|
|
34
|
-
|
|
35
27
|
/**
|
|
36
28
|
* Update existing array of layout hint rules, use this to update or remove standard rules
|
|
37
29
|
*
|
|
@@ -43,20 +35,17 @@ exports.addLayoutHintRule = addLayoutHintRule;
|
|
|
43
35
|
*/
|
|
44
36
|
const updateLayoutHintRules = updater => {
|
|
45
37
|
const newRules = updater(layoutHintRules);
|
|
46
|
-
|
|
47
38
|
if (Array.isArray(newRules)) {
|
|
48
39
|
layoutHintRules = newRules;
|
|
49
40
|
} else {
|
|
50
41
|
throw new _exceptions.IllegalReturnException("Result of updater of updateLayoutHintRules is not an array");
|
|
51
42
|
}
|
|
52
43
|
};
|
|
44
|
+
|
|
53
45
|
/**
|
|
54
46
|
* Collection of layout hint rules
|
|
55
47
|
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
48
|
exports.updateLayoutHintRules = updateLayoutHintRules;
|
|
59
|
-
|
|
60
49
|
class LayoutHintRuleCollection extends _BaseCollection.default {
|
|
61
50
|
/**
|
|
62
51
|
* Retrieve all rules available in the collection
|
|
@@ -64,11 +53,10 @@ class LayoutHintRuleCollection extends _BaseCollection.default {
|
|
|
64
53
|
get allRules() {
|
|
65
54
|
return layoutHintRules;
|
|
66
55
|
}
|
|
56
|
+
|
|
67
57
|
/**
|
|
68
58
|
* Set layout hint rules on the applicable attributes
|
|
69
59
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
60
|
static setLayoutHintRules(attribute) {
|
|
73
61
|
const rules = new LayoutHintRuleCollection();
|
|
74
62
|
layoutHintRules.forEach(rule => {
|
|
@@ -87,19 +75,16 @@ class LayoutHintRuleCollection extends _BaseCollection.default {
|
|
|
87
75
|
attribute.layoutHintRules = rules;
|
|
88
76
|
return attribute;
|
|
89
77
|
}
|
|
78
|
+
|
|
90
79
|
/**
|
|
91
80
|
* Process layout hint rules in the collection
|
|
92
81
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
82
|
process(attribute, attributes) {
|
|
96
83
|
this.all.forEach(rule => {
|
|
97
84
|
rule.process(attribute, attributes);
|
|
98
85
|
});
|
|
99
86
|
}
|
|
100
|
-
|
|
101
87
|
}
|
|
102
|
-
|
|
103
88
|
var _default = LayoutHintRuleCollection;
|
|
104
89
|
exports.default = _default;
|
|
105
90
|
//# sourceMappingURL=LayoutHintRuleCollection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutHintRuleCollection.js","names":["layoutHintRules","DependentAttribute","RemainingTotalUploadSize","addLayoutHintRule","rule","push","updateLayoutHintRules","updater","newRules","Array","isArray","IllegalReturnException","LayoutHintRuleCollection","BaseCollection","allRules","setLayoutHintRules","attribute","rules","forEach","isApplicableForAttribute","checkHintApplicability","layouthint","hint","isApplicableForHint","add","initHint","initAttribute","process","attributes","all"],"sources":["../../../../src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../../base/BaseCollection\";\n\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport DependentAttribute from \"./DependentAttribute\";\nimport RemainingTotalUploadSize from \"./RemainingTotalUploadSize\";\n\nimport { IllegalReturnException } from \"../../../exceptions\";\n\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type { AttributeType, ILayoutHintRule } from \"../../types\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * Array of available layout hint rules\n * @private\n */\nlet layoutHintRules: Array<Class<BaseLayoutHintRule>> = [\n DependentAttribute,\n RemainingTotalUploadSize,\n];\n\n/**\n * Add custom layout hint rules\n */\nexport const addLayoutHintRule = (rule: Class<BaseLayoutHintRule>) => {\n layoutHintRules.push(rule);\n};\n\ntype LayoutHintRulesUpdater = (\n rules: Array<Class<BaseLayoutHintRule>>\n) => Array<Class<BaseLayoutHintRule>>;\n\n/**\n * Update existing array of layout hint rules, use this to update or remove standard rules\n *\n * @example\n * // remove RemainingTotalUploadSize rule\n * updateLayoutHintRules((rules) => {\n * return rules.filter(rule => rule !== RemainingTotalUploadSize));\n * });\n */\nexport const updateLayoutHintRules = (updater: LayoutHintRulesUpdater) => {\n const newRules = updater(layoutHintRules);\n if (Array.isArray(newRules)) {\n layoutHintRules = newRules;\n } else {\n throw new IllegalReturnException(\n \"Result of updater of updateLayoutHintRules is not an array\"\n );\n }\n};\n\n/**\n * Collection of layout hint rules\n */\nclass LayoutHintRuleCollection extends BaseCollection<ILayoutHintRule> {\n /**\n * Retrieve all rules available in the collection\n */\n get allRules(): Array<Class<BaseLayoutHintRule>> {\n return layoutHintRules;\n }\n\n /**\n * Set layout hint rules on the applicable attributes\n */\n static setLayoutHintRules<T: AttributeType>(attribute: T): T {\n const rules = new LayoutHintRuleCollection();\n\n layoutHintRules.forEach((rule) => {\n if (rule.isApplicableForAttribute(attribute)) {\n if (rule.checkHintApplicability) {\n attribute.layouthint.forEach((hint) => {\n if (rule.isApplicableForHint(hint)) {\n rules.add(rule.initHint(hint));\n }\n });\n } else {\n rules.add(rule.initAttribute(attribute));\n }\n }\n });\n\n attribute.layoutHintRules = rules;\n\n return attribute;\n }\n\n /**\n * Process layout hint rules in the collection\n */\n process(attribute: AttributeModel, attributes: AttributeCollection) {\n this.all.forEach((rule) => {\n rule.process(attribute, attributes);\n });\n }\n}\n\nexport default LayoutHintRuleCollection;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutHintRuleCollection.js","names":["layoutHintRules","DependentAttribute","RemainingTotalUploadSize","addLayoutHintRule","rule","push","updateLayoutHintRules","updater","newRules","Array","isArray","IllegalReturnException","LayoutHintRuleCollection","BaseCollection","allRules","setLayoutHintRules","attribute","rules","forEach","isApplicableForAttribute","checkHintApplicability","layouthint","hint","isApplicableForHint","add","initHint","initAttribute","process","attributes","all"],"sources":["../../../../src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js"],"sourcesContent":["// @flow\nimport BaseCollection from \"../../base/BaseCollection\";\n\nimport BaseLayoutHintRule from \"./BaseLayoutHintRule\";\n\nimport DependentAttribute from \"./DependentAttribute\";\nimport RemainingTotalUploadSize from \"./RemainingTotalUploadSize\";\n\nimport { IllegalReturnException } from \"../../../exceptions\";\n\nimport type AttributeCollection from \"../AttributeCollection\";\nimport type { AttributeType, ILayoutHintRule } from \"../../types\";\nimport type AttributeModel from \"../AttributeModel\";\n\n/**\n * Array of available layout hint rules\n * @private\n */\nlet layoutHintRules: Array<Class<BaseLayoutHintRule>> = [\n DependentAttribute,\n RemainingTotalUploadSize,\n];\n\n/**\n * Add custom layout hint rules\n */\nexport const addLayoutHintRule = (rule: Class<BaseLayoutHintRule>) => {\n layoutHintRules.push(rule);\n};\n\ntype LayoutHintRulesUpdater = (\n rules: Array<Class<BaseLayoutHintRule>>\n) => Array<Class<BaseLayoutHintRule>>;\n\n/**\n * Update existing array of layout hint rules, use this to update or remove standard rules\n *\n * @example\n * // remove RemainingTotalUploadSize rule\n * updateLayoutHintRules((rules) => {\n * return rules.filter(rule => rule !== RemainingTotalUploadSize));\n * });\n */\nexport const updateLayoutHintRules = (updater: LayoutHintRulesUpdater) => {\n const newRules = updater(layoutHintRules);\n if (Array.isArray(newRules)) {\n layoutHintRules = newRules;\n } else {\n throw new IllegalReturnException(\n \"Result of updater of updateLayoutHintRules is not an array\"\n );\n }\n};\n\n/**\n * Collection of layout hint rules\n */\nclass LayoutHintRuleCollection extends BaseCollection<ILayoutHintRule> {\n /**\n * Retrieve all rules available in the collection\n */\n get allRules(): Array<Class<BaseLayoutHintRule>> {\n return layoutHintRules;\n }\n\n /**\n * Set layout hint rules on the applicable attributes\n */\n static setLayoutHintRules<T: AttributeType>(attribute: T): T {\n const rules = new LayoutHintRuleCollection();\n\n layoutHintRules.forEach((rule) => {\n if (rule.isApplicableForAttribute(attribute)) {\n if (rule.checkHintApplicability) {\n attribute.layouthint.forEach((hint) => {\n if (rule.isApplicableForHint(hint)) {\n rules.add(rule.initHint(hint));\n }\n });\n } else {\n rules.add(rule.initAttribute(attribute));\n }\n }\n });\n\n attribute.layoutHintRules = rules;\n\n return attribute;\n }\n\n /**\n * Process layout hint rules in the collection\n */\n process(attribute: AttributeModel, attributes: AttributeCollection) {\n this.all.forEach((rule) => {\n rule.process(attribute, attributes);\n });\n }\n}\n\nexport default LayoutHintRuleCollection;\n"],"mappings":";;;;;;;AACA;AAEA;AAEA;AACA;AAEA;;AAMA;AACA;AACA;AACA;AACA,IAAIA,eAAiD,GAAG,CACtDC,2BAAkB,EAClBC,iCAAwB,CACzB;;AAED;AACA;AACA;AACO,MAAMC,iBAAiB,GAAIC,IAA+B,IAAK;EACpEJ,eAAe,CAACK,IAAI,CAACD,IAAI,CAAC;AAC5B,CAAC;AAAC;AAMF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,qBAAqB,GAAIC,OAA+B,IAAK;EACxE,MAAMC,QAAQ,GAAGD,OAAO,CAACP,eAAe,CAAC;EACzC,IAAIS,KAAK,CAACC,OAAO,CAACF,QAAQ,CAAC,EAAE;IAC3BR,eAAe,GAAGQ,QAAQ;EAC5B,CAAC,MAAM;IACL,MAAM,IAAIG,kCAAsB,CAC9B,4DAA4D,CAC7D;EACH;AACF,CAAC;;AAED;AACA;AACA;AAFA;AAGA,MAAMC,wBAAwB,SAASC,uBAAc,CAAkB;EACrE;AACF;AACA;EACE,IAAIC,QAAQ,GAAqC;IAC/C,OAAOd,eAAe;EACxB;;EAEA;AACF;AACA;EACE,OAAOe,kBAAkB,CAAmBC,SAAY,EAAK;IAC3D,MAAMC,KAAK,GAAG,IAAIL,wBAAwB,EAAE;IAE5CZ,eAAe,CAACkB,OAAO,CAAEd,IAAI,IAAK;MAChC,IAAIA,IAAI,CAACe,wBAAwB,CAACH,SAAS,CAAC,EAAE;QAC5C,IAAIZ,IAAI,CAACgB,sBAAsB,EAAE;UAC/B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