@beinformed/ui 1.24.0 → 1.24.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/constants/package.json +8 -0
- package/esm/builder/index.js +0 -1
- package/esm/builder/index.js.map +1 -1
- package/esm/constants/Constants.js +0 -1
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/LayoutHintConfig.js +0 -1
- package/esm/constants/LayoutHintConfig.js.map +1 -1
- package/esm/constants/LayoutHints.js +0 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/index.js +0 -1
- package/esm/constants/index.js.map +1 -1
- package/esm/exceptions/ConfigurationException.js +0 -2
- package/esm/exceptions/ConfigurationException.js.map +1 -1
- package/esm/exceptions/FetchException.js +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/IllegalArgumentException.js +0 -1
- package/esm/exceptions/IllegalArgumentException.js.map +1 -1
- package/esm/exceptions/IllegalReturnException.js +0 -1
- package/esm/exceptions/IllegalReturnException.js.map +1 -1
- package/esm/exceptions/IllegalStateException.js +0 -1
- package/esm/exceptions/IllegalStateException.js.map +1 -1
- package/esm/exceptions/JsonParseException.js +0 -1
- package/esm/exceptions/JsonParseException.js.map +1 -1
- package/esm/exceptions/MissingPropertyException.js +0 -1
- package/esm/exceptions/MissingPropertyException.js.map +1 -1
- package/esm/exceptions/NotAllowedUriException.js +0 -1
- package/esm/exceptions/NotAllowedUriException.js.map +1 -1
- package/esm/exceptions/ServerRequestException.js +0 -1
- package/esm/exceptions/ServerRequestException.js.map +1 -1
- package/esm/exceptions/ThemePropertyException.js +0 -1
- package/esm/exceptions/ThemePropertyException.js.map +1 -1
- package/esm/exceptions/TimeoutException.js +0 -1
- package/esm/exceptions/TimeoutException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js +0 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/exceptions/UnsupportedOperationException.js +0 -1
- package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
- package/esm/exceptions/index.js +0 -1
- package/esm/exceptions/index.js.map +1 -1
- package/esm/hooks/index.js +0 -1
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/useAuthentication.js +4 -5
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js +0 -1
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js +1 -2
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useModelCatalog.js +1 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModels.js +0 -1
- package/esm/hooks/useModels.js.map +1 -1
- package/esm/hooks/useModularUI.js +0 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js +3 -3
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js +0 -1
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js +0 -1
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/hooks/useNotification.js +0 -1
- package/esm/hooks/useNotification.js.map +1 -1
- package/esm/hooks/usePreference.js +0 -1
- package/esm/hooks/usePreference.js.map +1 -1
- package/esm/hooks/useProgressIndicator.js +0 -1
- package/esm/hooks/useProgressIndicator.js.map +1 -1
- package/esm/hooks/useRouter.js +3 -13
- package/esm/hooks/useRouter.js.map +1 -1
- package/esm/i18n/Message.js +0 -1
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/index.js +0 -1
- package/esm/i18n/index.js.map +1 -1
- package/esm/i18n/languages.js +0 -1
- package/esm/i18n/languages.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js +0 -1
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js +0 -1
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/esm/index.js +0 -1
- package/esm/index.js.map +1 -1
- package/esm/models/application/ApplicationModel.js +2 -4
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js +3 -8
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js +4 -7
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js +1 -2
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js +2 -4
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/CaptchaAttributeModel.js +0 -1
- package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js +2 -4
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js +2 -3
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js +2 -5
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js +3 -5
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/HelptextAttributeModel.js +1 -2
- package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/esm/models/attributes/LabelAttributeModel.js +1 -1
- package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
- package/esm/models/attributes/MemoAttributeModel.js +1 -2
- package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
- package/esm/models/attributes/MoneyAttributeModel.js +1 -1
- package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js +1 -1
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/XMLAttributeModel.js +1 -1
- package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js +2 -3
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/BSNConstraint.js +0 -2
- package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/IBANConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js +0 -2
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +0 -2
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RegexConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/StringLengthConstraint.js +0 -1
- package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/XMLConstraint.js +0 -2
- package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js +0 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +0 -1
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +0 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/esm/models/base/ResourceCollection.js +1 -2
- package/esm/models/base/ResourceCollection.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js +4 -12
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js +1 -2
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js +1 -2
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js +2 -3
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptTypeDetailModel.js +0 -1
- package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js +3 -8
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js +1 -1
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js +2 -4
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js +2 -4
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/ContentTypeModel.js +0 -1
- package/esm/models/content/ContentTypeModel.js.map +1 -1
- package/esm/models/content/SectionModel.js +1 -2
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationResults.js +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/esm/models/detail/DetailModel.js +2 -2
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorModel.js +0 -1
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/error/ErrorResponse.js +11 -22
- package/esm/models/error/ErrorResponse.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js +2 -4
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js +2 -4
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/filters/FilterModel.js +0 -1
- package/esm/models/filters/FilterModel.js.map +1 -1
- package/esm/models/form/FormModel.js +13 -28
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js +6 -11
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js +1 -1
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/index.js +0 -1
- package/esm/models/index.js.map +1 -1
- package/esm/models/list/ListDetailModel.js +4 -6
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListModel.js +2 -2
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js +0 -1
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js +0 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js +0 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/sorting/SortOptionModel.js +0 -1
- package/esm/models/sorting/SortOptionModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js +1 -1
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js +1 -2
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupCollection.js +0 -1
- package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/esm/models/user/UserModel.js +0 -1
- package/esm/models/user/UserModel.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js +4 -9
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/ModularUIResponse.js +2 -3
- package/esm/modularui/ModularUIResponse.js.map +1 -1
- package/esm/modularui/index.js +0 -1
- package/esm/modularui/index.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.js +0 -1
- package/esm/react/ErrorBoundaryFallback.js.map +1 -1
- package/esm/react/index.js +0 -1
- package/esm/react/index.js.map +1 -1
- package/esm/react/utils.js +0 -2
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/Init.js +0 -1
- package/esm/react-client/Init.js.map +1 -1
- package/esm/react-client/contextPath.js +0 -1
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/index.js +0 -1
- package/esm/react-client/index.js.map +1 -1
- package/esm/react-client/rehydrate.js +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/contextPath.js +0 -1
- package/esm/react-server/contextPath.js.map +1 -1
- package/esm/react-server/htmlpage.js +1 -1
- package/esm/react-server/htmlpage.js.map +1 -1
- package/esm/react-server/index.js +0 -1
- package/esm/react-server/index.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js +0 -1
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js +0 -1
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/requestInformation.js +0 -1
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverNoSSR.js +1 -3
- package/esm/react-server/serverNoSSR.js.map +1 -1
- package/esm/react-server/serverSSR.js +0 -1
- package/esm/react-server/serverSSR.js.map +1 -1
- package/esm/react-theme/ThemeProvider.js +0 -1
- package/esm/react-theme/ThemeProvider.js.map +1 -1
- package/esm/react-theme/index.js +0 -1
- package/esm/react-theme/index.js.map +1 -1
- package/esm/react-theme/useTheme.js +0 -1
- package/esm/react-theme/useTheme.js.map +1 -1
- package/esm/react-theme/utils/background.js +0 -1
- package/esm/react-theme/utils/background.js.map +1 -1
- package/esm/react-theme/utils/colors.js +0 -1
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js +1 -3
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js +0 -1
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js +0 -1
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/actions.js +0 -1
- package/esm/redux/_i18n/actions.js.map +1 -1
- package/esm/redux/_i18n/index.js +0 -1
- package/esm/redux/_i18n/index.js.map +1 -1
- package/esm/redux/_i18n/reducer.js +0 -1
- package/esm/redux/_i18n/reducer.js.map +1 -1
- package/esm/redux/_modularui/actions.js +7 -7
- package/esm/redux/_modularui/actions.js.map +1 -1
- package/esm/redux/_modularui/connector.js +2 -4
- package/esm/redux/_modularui/connector.js.map +1 -1
- package/esm/redux/_modularui/index.js +0 -1
- package/esm/redux/_modularui/index.js.map +1 -1
- package/esm/redux/_modularui/modularuiUtils.js +2 -2
- package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
- package/esm/redux/_modularui/reducer.js +1 -2
- package/esm/redux/_modularui/reducer.js.map +1 -1
- package/esm/redux/_modularui/selectors.js +7 -13
- package/esm/redux/_modularui/selectors.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js +0 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/actions.js +0 -2
- package/esm/redux/_router/actions.js.map +1 -1
- package/esm/redux/_router/connectors.js +9 -19
- package/esm/redux/_router/connectors.js.map +1 -1
- package/esm/redux/_router/index.js +0 -1
- package/esm/redux/_router/index.js.map +1 -1
- package/esm/redux/_router/middleware.js +0 -2
- package/esm/redux/_router/middleware.js.map +1 -1
- package/esm/redux/_router/reducer.js +0 -2
- package/esm/redux/_router/reducer.js.map +1 -1
- package/esm/redux/actions/Application.js +0 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js +4 -7
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js +0 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/Form.js +0 -1
- package/esm/redux/actions/Form.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js +2 -4
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js +0 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js +0 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js +0 -1
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js +0 -1
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Modals.js +0 -2
- package/esm/redux/actions/Modals.js.map +1 -1
- package/esm/redux/actions/Notification.js +0 -1
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js +5 -5
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/ProgressIndicator.js +0 -2
- package/esm/redux/actions/ProgressIndicator.js.map +1 -1
- package/esm/redux/actions/SignIn.js +2 -3
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/actions/SignOut.js +0 -1
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/actions/index.js +0 -1
- package/esm/redux/actions/index.js.map +1 -1
- package/esm/redux/connectors/Application.js +0 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js +0 -1
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js +0 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js +0 -1
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js +0 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js +0 -1
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js +0 -1
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js +3 -7
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js +0 -1
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js +0 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js +0 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/Notification.js +0 -1
- package/esm/redux/connectors/Notification.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js +0 -1
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js +0 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/Progress.js +0 -1
- package/esm/redux/connectors/Progress.js.map +1 -1
- package/esm/redux/connectors/ProgressIndicator.js +0 -1
- package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js +0 -1
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/SignIn.js +1 -2
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js +3 -7
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/connectors/Tab.js +0 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/connectors/index.js +0 -1
- package/esm/redux/connectors/index.js.map +1 -1
- package/esm/redux/index.js +0 -2
- package/esm/redux/index.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js +0 -2
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js +0 -2
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js +0 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js +0 -2
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js +2 -4
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js +1 -4
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/reducers/createReducer.js +0 -1
- package/esm/redux/reducers/createReducer.js.map +1 -1
- package/esm/redux/reducers/index.js +0 -1
- package/esm/redux/reducers/index.js.map +1 -1
- package/esm/redux/selectors/i18n.js +1 -4
- package/esm/redux/selectors/i18n.js.map +1 -1
- package/esm/redux/selectors/index.js +0 -1
- package/esm/redux/selectors/index.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js +0 -2
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js +0 -1
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/utils/browser/Cache.js +0 -1
- package/esm/utils/browser/Cache.js.map +1 -1
- package/esm/utils/browser/Cookies.js +3 -4
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/helpers/createHash.js +0 -2
- package/esm/utils/helpers/createHash.js.map +1 -1
- package/esm/utils/helpers/createUUID.js +0 -1
- package/esm/utils/helpers/createUUID.js.map +1 -1
- package/esm/utils/helpers/objects.js +0 -1
- package/esm/utils/helpers/objects.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js +0 -1
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/helpers/text.js +0 -1
- package/esm/utils/helpers/text.js.map +1 -1
- package/esm/utils/index.js +0 -2
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/number/formatValue.js +0 -1
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js +0 -1
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/constants/LayoutHints.js +0 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js +0 -1
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/ConfigurationException.js +0 -1
- package/lib/exceptions/ConfigurationException.js.map +1 -1
- package/lib/exceptions/FetchException.js +1 -2
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js +0 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/hooks/useAllFormsOnModel.js +0 -1
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js +4 -5
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js +0 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js +0 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js +1 -2
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js +0 -1
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js +0 -1
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js +1 -2
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModels.js +0 -1
- package/lib/hooks/useModels.js.map +1 -1
- package/lib/hooks/useModularUI.js +0 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js +3 -4
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js +0 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js +0 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js +0 -1
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js +0 -1
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js +0 -1
- package/lib/hooks/useProgressIndicator.js.map +1 -1
- package/lib/hooks/useRouter.js +3 -13
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/i18n/Locale.js +0 -1
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js +0 -1
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js +0 -1
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/withMessage.js +0 -1
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/actions/ActionCollection.js +0 -1
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js +0 -1
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js +2 -5
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js +3 -9
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js +4 -8
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js +1 -3
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js +2 -5
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js +0 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js +0 -1
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/CaptchaAttributeModel.js +0 -1
- package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js +2 -5
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js +0 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +2 -4
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js +2 -6
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js +3 -6
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js +0 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/HelptextAttributeModel.js +1 -2
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/LabelAttributeModel.js +1 -2
- package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
- package/lib/models/attributes/MemoAttributeModel.js +1 -2
- package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
- package/lib/models/attributes/MoneyAttributeModel.js +1 -2
- package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js +0 -1
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js +1 -2
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js +1 -2
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js +0 -1
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/XMLAttributeModel.js +1 -2
- package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js +2 -4
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/BSNConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js +0 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js +0 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RangeConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RegexConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/XMLConstraint.js +0 -1
- package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js +0 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -3
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +0 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +0 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/base/BaseCollection.js +0 -1
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js +0 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceCollection.js +1 -2
- package/lib/models/base/ResourceCollection.js.map +1 -1
- package/lib/models/base/ResourceModel.js +0 -1
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/caseview/CaseViewModel.js +0 -1
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js +4 -13
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js +1 -3
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js +1 -3
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js +2 -4
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js +0 -1
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/ConceptRelationModel.js +0 -1
- package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js +0 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js +0 -1
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js +0 -1
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentIndexModel.js +3 -9
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js +1 -2
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js +2 -5
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js +2 -5
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/ContentTypeModel.js +0 -1
- package/lib/models/content/ContentTypeModel.js.map +1 -1
- package/lib/models/content/SectionModel.js +1 -3
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js +0 -1
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js +0 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js +0 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js +0 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js +0 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js +1 -2
- package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/lib/models/detail/DetailModel.js +2 -3
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js +0 -1
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js +0 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/ErrorResponse.js +11 -23
- package/lib/models/error/ErrorResponse.js.map +1 -1
- package/lib/models/filters/AssignmentFilterModel.js +0 -1
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js +2 -5
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/ConceptIndexFilterModel.js +0 -1
- package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js +2 -5
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/FilterModel.js +0 -1
- package/lib/models/filters/FilterModel.js.map +1 -1
- package/lib/models/filters/RangeFilterModel.js +0 -1
- package/lib/models/filters/RangeFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js +13 -29
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js +6 -12
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/grouping/GroupingModel.js +1 -2
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/href/Href.js +0 -1
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/ListHref.js +0 -1
- package/lib/models/href/ListHref.js.map +1 -1
- package/lib/models/layouthint/LayoutHintCollection.js +0 -1
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js +0 -1
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js +0 -1
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/list/ListDetailModel.js +4 -7
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListHeaderModel.js +0 -1
- package/lib/models/list/ListHeaderModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js +0 -1
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js +0 -1
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js +2 -3
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/lookup/LookupOptionCollection.js +0 -1
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js +0 -1
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/modelcatalog/ModelCatalogModel.js +0 -1
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js +0 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js +0 -1
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/parameter/Parameter.js +0 -1
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js +0 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/resolveModel.js +0 -1
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/search/CaseSearchModel.js +0 -1
- package/lib/models/search/CaseSearchModel.js.map +1 -1
- package/lib/models/sorting/SortOptionModel.js +0 -1
- package/lib/models/sorting/SortOptionModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js +1 -2
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/tab/TabModel.js +1 -3
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupCollection.js +0 -1
- package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupModel.js +0 -1
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/user/UserModel.js +0 -1
- package/lib/models/user/UserModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js +0 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js +0 -1
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js +0 -1
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +4 -10
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js +2 -4
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/react/ErrorBoundary.js +0 -1
- package/lib/react/ErrorBoundary.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js +0 -1
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react/utils.js +0 -1
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/Init.js +0 -1
- package/lib/react-client/Init.js.map +1 -1
- package/lib/react-client/client.js +0 -1
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/rehydrate.js +1 -2
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/contextPath.js +0 -1
- package/lib/react-server/contextPath.js.map +1 -1
- package/lib/react-server/createSSRComplete.js +0 -1
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/htmlpage.js +1 -2
- package/lib/react-server/htmlpage.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js +0 -1
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js +0 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js +0 -1
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverNoSSR.js +1 -3
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js +0 -1
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js +0 -1
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js +0 -1
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js +0 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/useTheme.js +0 -1
- package/lib/react-theme/useTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js +0 -1
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js +0 -1
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js +1 -3
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js +0 -1
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js +0 -1
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js +0 -1
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/actions.js +0 -1
- package/lib/redux/_i18n/actions.js.map +1 -1
- package/lib/redux/_i18n/reducer.js +0 -1
- package/lib/redux/_i18n/reducer.js.map +1 -1
- package/lib/redux/_modularui/actions.js +7 -8
- package/lib/redux/_modularui/actions.js.map +1 -1
- package/lib/redux/_modularui/connector.js +2 -4
- package/lib/redux/_modularui/connector.js.map +1 -1
- package/lib/redux/_modularui/middleware.js +0 -1
- package/lib/redux/_modularui/middleware.js.map +1 -1
- package/lib/redux/_modularui/modularuiUtils.js +2 -3
- package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
- package/lib/redux/_modularui/reducer.js +1 -3
- package/lib/redux/_modularui/reducer.js.map +1 -1
- package/lib/redux/_modularui/selectors.js +7 -14
- package/lib/redux/_modularui/selectors.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js +0 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/actions.js +0 -1
- package/lib/redux/_router/actions.js.map +1 -1
- package/lib/redux/_router/connectors.js +9 -19
- package/lib/redux/_router/connectors.js.map +1 -1
- package/lib/redux/_router/middleware.js +0 -1
- package/lib/redux/_router/middleware.js.map +1 -1
- package/lib/redux/_router/reducer.js +0 -1
- package/lib/redux/_router/reducer.js.map +1 -1
- package/lib/redux/actions/Application.js +0 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js +4 -7
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js +0 -1
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js +0 -1
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js +2 -4
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js +0 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js +0 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js +0 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js +0 -1
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Modals.js +0 -1
- package/lib/redux/actions/Modals.js.map +1 -1
- package/lib/redux/actions/Notification.js +0 -1
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js +5 -6
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js +0 -1
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js +2 -4
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/SignOut.js +0 -1
- package/lib/redux/actions/SignOut.js.map +1 -1
- package/lib/redux/connectors/Application.js +0 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js +0 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js +0 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js +0 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js +0 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js +0 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js +0 -1
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js +3 -7
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js +0 -1
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js +0 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js +0 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js +0 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js +0 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js +0 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js +0 -1
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js +0 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js +0 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js +0 -1
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js +1 -2
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js +3 -7
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js +0 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js +0 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js +0 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js +0 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js +0 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js +2 -3
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js +1 -3
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/createReducer.js +0 -1
- package/lib/redux/reducers/createReducer.js.map +1 -1
- package/lib/redux/selectors/i18n.js +1 -3
- package/lib/redux/selectors/i18n.js.map +1 -1
- package/lib/redux/store/beforeRenderHooks.js +0 -1
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js +0 -1
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/browser/Cache.js +0 -1
- package/lib/utils/browser/Cache.js.map +1 -1
- package/lib/utils/browser/Cookies.js +3 -4
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js +0 -1
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/serverFetch.js +0 -1
- package/lib/utils/fetch/serverFetch.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js +0 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js +0 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/checkResource.js +0 -1
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/createHash.js +0 -1
- package/lib/utils/helpers/createHash.js.map +1 -1
- package/lib/utils/helpers/objects.js +0 -1
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js +0 -1
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js +0 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/number/formatValue.js +0 -1
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js +0 -1
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +18 -13
- package/types/constants/Constants.d.ts +151 -0
- package/types/constants/LayoutHintConfig.d.ts +241 -0
- package/types/constants/LayoutHints.d.ts +78 -0
- package/types/constants/Settings.d.ts +16 -0
- package/types/constants/index.d.ts +3 -0
- package/types/exceptions/ConfigurationException.d.ts +6 -0
- package/types/exceptions/FetchException.d.ts +31 -0
- package/types/exceptions/IllegalArgumentException.d.ts +6 -0
- package/types/exceptions/IllegalReturnException.d.ts +5 -0
- package/types/exceptions/IllegalStateException.d.ts +6 -0
- package/types/exceptions/JsonParseException.d.ts +6 -0
- package/types/exceptions/MissingPropertyException.d.ts +6 -0
- package/types/exceptions/NetworkException.d.ts +9 -0
- package/types/exceptions/NotAllowedUriException.d.ts +6 -0
- package/types/exceptions/NotFoundException.d.ts +10 -0
- package/types/exceptions/ServerRequestException.d.ts +6 -0
- package/types/exceptions/ThemePropertyException.d.ts +6 -0
- package/types/exceptions/TimeoutException.d.ts +7 -0
- package/types/exceptions/UnauthorizedException.d.ts +11 -0
- package/types/exceptions/UnsupportedOperationException.d.ts +6 -0
- package/types/exceptions/index.d.ts +15 -0
- package/types/hooks/useI18n.d.ts +9 -0
- package/types/i18n/Locale.d.ts +53 -0
- package/types/i18n/Locales.d.ts +55 -0
- package/types/i18n/Message.d.ts +6 -0
- package/types/i18n/index.d.ts +5 -0
- package/types/i18n/languages.d.ts +215 -0
- package/types/i18n/translations/beinformed_error_messages_en.nl.d.ts +97 -0
- package/types/i18n/translations/beinformed_error_messages_nl.nl.d.ts +97 -0
- package/types/i18n/types.d.ts +11 -0
- package/types/i18n/withMessage.d.ts +3 -0
- package/types/index.d.ts +6 -0
- package/types/models/actions/ActionCollection.d.ts +29 -0
- package/types/models/actions/ActionModel.d.ts +84 -0
- package/types/models/application/ApplicationModel.d.ts +41 -0
- package/types/models/attributes/AttributeCollection.d.ts +96 -0
- package/types/models/attributes/AttributeContent.d.ts +64 -0
- package/types/models/attributes/AttributeDataHelper.d.ts +67 -0
- package/types/models/attributes/AttributeModel.d.ts +395 -0
- package/types/models/attributes/AttributeSetModel.d.ts +28 -0
- package/types/models/attributes/BooleanAttributeModel.d.ts +65 -0
- package/types/models/attributes/CaptchaAttributeModel.d.ts +10 -0
- package/types/models/attributes/ChoiceAttributeModel.d.ts +76 -0
- package/types/models/attributes/ChoiceAttributeOptionCollection.d.ts +82 -0
- package/types/models/attributes/ChoiceAttributeOptionModel.d.ts +133 -0
- package/types/models/attributes/CompositeAttributeChildCollection.d.ts +56 -0
- package/types/models/attributes/CompositeAttributeModel.d.ts +44 -0
- package/types/models/attributes/DatetimeAttributeModel.d.ts +111 -0
- package/types/models/attributes/HelptextAttributeModel.d.ts +16 -0
- package/types/models/attributes/LabelAttributeModel.d.ts +12 -0
- package/types/models/attributes/MemoAttributeModel.d.ts +14 -0
- package/types/models/attributes/MoneyAttributeModel.d.ts +14 -0
- package/types/models/attributes/NumberAttributeModel.d.ts +49 -0
- package/types/models/attributes/PasswordAttributeModel.d.ts +62 -0
- package/types/models/attributes/StringAttributeModel.d.ts +62 -0
- package/types/models/attributes/UploadAttributeModel.d.ts +54 -0
- package/types/models/attributes/XMLAttributeModel.d.ts +10 -0
- package/types/models/attributes/_createAttribute.d.ts +6 -0
- package/types/models/attributes/input-constraints/BSNConstraint.d.ts +26 -0
- package/types/models/attributes/input-constraints/ConstraintCollection.d.ts +24 -0
- package/types/models/attributes/input-constraints/ConstraintModel.d.ts +34 -0
- package/types/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +109 -0
- package/types/models/attributes/input-constraints/DateTimeDateFormatConstraint.d.ts +36 -0
- package/types/models/attributes/input-constraints/DateTimeTimeFormatConstraint.d.ts +36 -0
- package/types/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +92 -0
- package/types/models/attributes/input-constraints/FileExtensionConstraint.d.ts +33 -0
- package/types/models/attributes/input-constraints/FileSizeConstraint.d.ts +42 -0
- package/types/models/attributes/input-constraints/IBANConstraint.d.ts +23 -0
- package/types/models/attributes/input-constraints/MandatoryConstraint.d.ts +23 -0
- package/types/models/attributes/input-constraints/MandatoryRangeConstraint.d.ts +36 -0
- package/types/models/attributes/input-constraints/NumberBoundaryConstraint.d.ts +61 -0
- package/types/models/attributes/input-constraints/NumberFormatConstraint.d.ts +52 -0
- package/types/models/attributes/input-constraints/NumberGroupingConstraint.d.ts +46 -0
- package/types/models/attributes/input-constraints/PasswordConfirmConstraint.d.ts +36 -0
- package/types/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.d.ts +23 -0
- package/types/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.d.ts +32 -0
- package/types/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.d.ts +32 -0
- package/types/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.d.ts +35 -0
- package/types/models/attributes/input-constraints/RangeConstraint.d.ts +97 -0
- package/types/models/attributes/input-constraints/RegexConstraint.d.ts +37 -0
- package/types/models/attributes/input-constraints/StringLengthConstraint.d.ts +46 -0
- package/types/models/attributes/input-constraints/XMLConstraint.d.ts +26 -0
- package/types/models/attributes/layouthint-rules/BaseLayoutHintRule.d.ts +46 -0
- package/types/models/attributes/layouthint-rules/DependentAttribute.d.ts +57 -0
- package/types/models/attributes/layouthint-rules/LayoutHintRuleCollection.d.ts +27 -0
- package/types/models/attributes/layouthint-rules/RemainingTotalUploadSize.d.ts +17 -0
- package/types/models/base/BaseCollection.d.ts +89 -0
- package/types/models/base/BaseModel.d.ts +58 -0
- package/types/models/base/ResourceCollection.d.ts +19 -0
- package/types/models/base/ResourceModel.d.ts +93 -0
- package/types/models/caseview/CaseViewModel.d.ts +45 -0
- package/types/models/concepts/BusinessScenarioModel.d.ts +20 -0
- package/types/models/concepts/ConceptDetailModel.d.ts +69 -0
- package/types/models/concepts/ConceptIndexModel.d.ts +36 -0
- package/types/models/concepts/ConceptLinkModel.d.ts +65 -0
- package/types/models/concepts/ConceptRelationCollection.d.ts +34 -0
- package/types/models/concepts/ConceptRelationModel.d.ts +43 -0
- package/types/models/concepts/ConceptTypeDetailModel.d.ts +39 -0
- package/types/models/concepts/SourceReferenceCollection.d.ts +13 -0
- package/types/models/concepts/SourceReferenceModel.d.ts +30 -0
- package/types/models/content/ContentIndexModel.d.ts +34 -0
- package/types/models/content/ContentLinkModel.d.ts +81 -0
- package/types/models/content/ContentModel.d.ts +74 -0
- package/types/models/content/ContentTOCModel.d.ts +37 -0
- package/types/models/content/ContentTypeModel.d.ts +26 -0
- package/types/models/content/SectionModel.d.ts +75 -0
- package/types/models/content/SubSectionModel.d.ts +64 -0
- package/types/models/contentconfiguration/ContentConfiguration.d.ts +28 -0
- package/types/models/contentconfiguration/ContentConfigurationElements.d.ts +47 -0
- package/types/models/contentconfiguration/ContentConfigurationEndResults.d.ts +16 -0
- package/types/models/contentconfiguration/ContentConfigurationQuestions.d.ts +22 -0
- package/types/models/contentconfiguration/ContentConfigurationResults.d.ts +39 -0
- package/types/models/detail/DetailModel.d.ts +72 -0
- package/types/models/error/ErrorCollection.d.ts +51 -0
- package/types/models/error/ErrorModel.d.ts +36 -0
- package/types/models/error/ErrorResponse.d.ts +148 -0
- package/types/models/filters/AssignmentFilterModel.d.ts +35 -0
- package/types/models/filters/BaseFilterModel.d.ts +85 -0
- package/types/models/filters/ConceptIndexFilterModel.d.ts +6 -0
- package/types/models/filters/FilterCollection.d.ts +48 -0
- package/types/models/filters/FilterModel.d.ts +5 -0
- package/types/models/filters/RangeFilterModel.d.ts +6 -0
- package/types/models/form/FormModel.d.ts +309 -0
- package/types/models/form/FormObjectModel.d.ts +168 -0
- package/types/models/grouping/GroupingModel.d.ts +85 -0
- package/types/models/href/Href.d.ts +17 -0
- package/types/models/href/ListHref.d.ts +64 -0
- package/types/models/index.d.ts +94 -0
- package/types/models/layouthint/LayoutHintCollection.d.ts +43 -0
- package/types/models/links/LinkCollection.d.ts +62 -0
- package/types/models/links/LinkModel.d.ts +92 -0
- package/types/models/links/normalizeLinkJSON.d.ts +9 -0
- package/types/models/list/ListDetailModel.d.ts +69 -0
- package/types/models/list/ListHeaderModel.d.ts +64 -0
- package/types/models/list/ListItemCollection.d.ts +21 -0
- package/types/models/list/ListItemModel.d.ts +34 -0
- package/types/models/list/ListModel.d.ts +135 -0
- package/types/models/lookup/LookupOptionCollection.d.ts +11 -0
- package/types/models/lookup/LookupOptionsModel.d.ts +19 -0
- package/types/models/modelcatalog/ModelCatalogModel.d.ts +18 -0
- package/types/models/paging/PagesizeModel.d.ts +25 -0
- package/types/models/paging/PagingModel.d.ts +49 -0
- package/types/models/panels/GroupingPanelModel.d.ts +39 -0
- package/types/models/parameter/Parameter.d.ts +40 -0
- package/types/models/process/ProcessStatusSettingsModel.d.ts +38 -0
- package/types/models/resolveModel.d.ts +7 -0
- package/types/models/search/CaseSearchModel.d.ts +14 -0
- package/types/models/sorting/SortOptionModel.d.ts +48 -0
- package/types/models/sorting/SortingModel.d.ts +42 -0
- package/types/models/tab/TabModel.d.ts +44 -0
- package/types/models/taskgroup/TaskGroupCollection.d.ts +12 -0
- package/types/models/taskgroup/TaskGroupModel.d.ts +15 -0
- package/types/models/types.d.ts +147 -0
- package/types/models/user/UserModel.d.ts +14 -0
- package/types/models/user/UserProfileModel.d.ts +12 -0
- package/types/models/user/UserServicesModel.d.ts +28 -0
- package/types/modularui/Authenticate.d.ts +42 -0
- package/types/modularui/ModularUIError.d.ts +10 -0
- package/types/modularui/ModularUIRequest.d.ts +170 -0
- package/types/modularui/ModularUIResponse.d.ts +56 -0
- package/types/modularui/index.d.ts +3 -0
- package/types/redux/_i18n/types.d.ts +13 -0
- package/types/redux/_modularui/types.d.ts +49 -0
- package/types/redux/_router/types.d.ts +35 -0
- package/types/redux/selectors/i18n.d.ts +4 -0
- package/types/redux/types.d.ts +105 -0
- package/types/utils/browser/Cache.d.ts +45 -0
- package/types/utils/browser/Cookies.d.ts +15 -0
- package/types/utils/datetime/DateTimeUtil.d.ts +164 -0
- package/types/utils/fetch/serverFetch.d.ts +5 -0
- package/types/utils/fetch/types.d.ts +38 -0
- package/types/utils/fetch/universalFetch.d.ts +7 -0
- package/types/utils/fetch/xhr.d.ts +5 -0
- package/types/utils/helpers/checkResource.d.ts +3 -0
- package/types/utils/helpers/createHash.d.ts +8 -0
- package/types/utils/helpers/createUUID.d.ts +4 -0
- package/types/utils/helpers/objects.d.ts +3 -0
- package/types/utils/helpers/sanitizeHtml.d.ts +9 -0
- package/types/utils/helpers/text.d.ts +7 -0
- package/types/utils/index.d.ts +16 -0
- package/types/utils/number/DecimalFormat.d.ts +90 -0
- package/types/utils/number/formatValue.d.ts +4 -0
- package/types/utils/number/parseNumbers.d.ts +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverNoSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","createTheme","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"serverNoSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleErrors","handleBeforeRenderHooks","renderSSRMinimal","createTheme","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store","storedTheme","getState","preferences"],"sources":["../../src/react-server/serverNoSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n handleErrors,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRMinimal from \"./renderSSRMinimal\";\n\nimport createTheme from \"../react-theme/createTheme\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { Theme } from \"../react-theme/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Theme | Array<Theme>,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n}: serverProps): string => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n\n if (theme) {\n const storedTheme = store.getState()?.preferences?.theme;\n //$FlowFixMe[incompatible-call]\n createTheme(storedTheme, theme);\n }\n\n setI18n(store, locales, request);\n\n handleErrors(store);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store, request });\n\n return renderSSRMinimal({ store, theme, UUID, render, template });\n};\n\nexport default serverNoSSR;\n"],"mappings":"AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,oBAAoB,EACpBC,qBAAqB,EACrBC,YAAY,QACP,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,gBAAgB,MAAM,oBAAoB;AAEjD,OAAOC,WAAW,MAAM,4BAA4B;AAkBpD;AACA;AACA,MAAMC,WAAW,GAAG,QASO;EAAA,IATN;IACnBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC;EACW,CAAC;EACZ,MAAMC,IAAI,GAAGnB,UAAU,EAAE;EACzBoB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGpB,kBAAkB,CAACU,OAAO,CAAC;EAC/C,MAAMW,KAAK,GAAGpB,gBAAgB,CAACmB,WAAW,EAAER,cAAc,CAAC;EAE3DT,oBAAoB,CAACkB,KAAK,EAAER,iBAAiB,CAAC;EAC9CT,qBAAqB,CAACiB,KAAK,CAAC;EAE5B,IAAIP,KAAK,EAAE;IACT,MAAMQ,WAAW,GAAGD,KAAK,CAACE,QAAQ,EAAE,EAAEC,WAAW,EAAEV,KAAK;IACxD;IACAN,WAAW,CAACc,WAAW,EAAER,KAAK,CAAC;EACjC;EAEAZ,OAAO,CAACmB,KAAK,EAAEV,OAAO,EAAED,OAAO,CAAC;EAEhCL,YAAY,CAACgB,KAAK,CAAC;EAEnBf,uBAAuB,CAACW,iBAAiB,EAAE;IAAEI,KAAK;IAAEX;EAAQ,CAAC,CAAC;EAE9D,OAAOH,gBAAgB,CAAC;IAAEc,KAAK;IAAEP,KAAK;IAAEI,IAAI;IAAEH,MAAM;IAAEC;EAAS,CAAC,CAAC;AACnE,CAAC;AAED,eAAeP,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleBeforeRenderHooks","renderSSRComplete","serverSSR","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store"],"sources":["../../src/react-server/serverSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRComplete from \"./renderSSRComplete\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n ErrorPage?: any,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n ErrorPage,\n template,\n beforeRenderHooks,\n}: serverProps): Promise<string> => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n setI18n(store, locales, request);\n\n handleBeforeRenderHooks(beforeRenderHooks, { request, store });\n\n return renderSSRComplete({\n store,\n theme,\n UUID,\n requestHref,\n render,\n ErrorPage,\n template,\n });\n};\n\nexport default serverSSR;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"serverSSR.js","names":["createUUID","getFullRequestHref","createReduxStore","setI18n","setServerPreferences","setConfigurationTheme","handleBeforeRenderHooks","renderSSRComplete","serverSSR","request","locales","customReducers","serverPreferences","theme","render","ErrorPage","template","beforeRenderHooks","UUID","__webpack_nonce__","requestHref","store"],"sources":["../../src/react-server/serverSSR.js"],"sourcesContent":["// @flow\nimport \"./contextPath\";\n\nimport createUUID from \"../utils/helpers/createUUID\";\nimport { getFullRequestHref } from \"./requestInformation\";\n\nimport {\n createReduxStore,\n setI18n,\n setServerPreferences,\n setConfigurationTheme,\n} from \"./serverUtil\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport renderSSRComplete from \"./renderSSRComplete\";\n\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { PreferenceValue } from \"./serverUtil\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\n serverPreferences?: Array<string | PreferenceValue>,\n render: Function,\n ErrorPage?: any,\n template?: (TemplateProps) => string,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n};\n\n/**\n */\nconst serverSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme = null,\n render,\n ErrorPage,\n template,\n beforeRenderHooks,\n}: serverProps): Promise<string> => {\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const requestHref = getFullRequestHref(request);\n const store = createReduxStore(requestHref, customReducers);\n\n setServerPreferences(store, serverPreferences);\n setConfigurationTheme(store);\n setI18n(store, locales, request);\n\n handleBeforeRenderHooks(beforeRenderHooks, { request, store });\n\n return renderSSRComplete({\n store,\n theme,\n UUID,\n requestHref,\n render,\n ErrorPage,\n template,\n });\n};\n\nexport default serverSSR;\n"],"mappings":"AACA,OAAO,eAAe;AAEtB,OAAOA,UAAU,MAAM,6BAA6B;AACpD,SAASC,kBAAkB,QAAQ,sBAAsB;AAEzD,SACEC,gBAAgB,EAChBC,OAAO,EACPC,oBAAoB,EACpBC,qBAAqB,QAChB,cAAc;AAErB,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E,OAAOC,iBAAiB,MAAM,qBAAqB;AAkBnD;AACA;AACA,MAAMC,SAAS,GAAG,QAUkB;EAAA,IAVjB;IACjBC,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,iBAAiB,GAAG,EAAE;IACtBC,KAAK,GAAG,IAAI;IACZC,MAAM;IACNC,SAAS;IACTC,QAAQ;IACRC;EACW,CAAC;EACZ,MAAMC,IAAI,GAAGlB,UAAU,EAAE;EACzBmB,iBAAiB,GAAGD,IAAI,CAAC,CAAC;;EAE1B,MAAME,WAAW,GAAGnB,kBAAkB,CAACQ,OAAO,CAAC;EAC/C,MAAMY,KAAK,GAAGnB,gBAAgB,CAACkB,WAAW,EAAET,cAAc,CAAC;EAE3DP,oBAAoB,CAACiB,KAAK,EAAET,iBAAiB,CAAC;EAC9CP,qBAAqB,CAACgB,KAAK,CAAC;EAC5BlB,OAAO,CAACkB,KAAK,EAAEX,OAAO,EAAED,OAAO,CAAC;EAEhCH,uBAAuB,CAACW,iBAAiB,EAAE;IAAER,OAAO;IAAEY;EAAM,CAAC,CAAC;EAE9D,OAAOd,iBAAiB,CAAC;IACvBc,KAAK;IACLR,KAAK;IACLK,IAAI;IACJE,WAAW;IACXN,MAAM;IACNC,SAAS;IACTC;EACF,CAAC,CAAC;AACJ,CAAC;AAED,eAAeR,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","names":["useSelector","ThemeProvider","SCThemeProvider","createTheme","theme","children","storedTheme","preferences","finalTheme","displayName"],"sources":["../../src/react-theme/ThemeProvider.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport createTheme from \"./createTheme\";\n\nimport type { Node } from \"react\";\nimport type { Theme } from \"./types\";\n\nexport type Props = {\n +theme?: Theme | Array<Theme>,\n +children: Node,\n};\n\n/**\n */\nconst ThemeProvider = ({ theme = {}, children }: Props): Node => {\n const storedTheme = useSelector(({ preferences }) => preferences.theme);\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n\nexport default ThemeProvider;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","names":["useSelector","ThemeProvider","SCThemeProvider","createTheme","theme","children","storedTheme","preferences","finalTheme","displayName"],"sources":["../../src/react-theme/ThemeProvider.js"],"sourcesContent":["// @flow\nimport { useSelector } from \"react-redux\";\nimport { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport createTheme from \"./createTheme\";\n\nimport type { Node } from \"react\";\nimport type { Theme } from \"./types\";\n\nexport type Props = {\n +theme?: Theme | Array<Theme>,\n +children: Node,\n};\n\n/**\n */\nconst ThemeProvider = ({ theme = {}, children }: Props): Node => {\n const storedTheme = useSelector(({ preferences }) => preferences.theme);\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n\nexport default ThemeProvider;\n"],"mappings":"AACA,SAASA,WAAW,QAAQ,aAAa;AACzC,SAASC,aAAa,IAAIC,eAAe,QAAQ,mBAAmB;AAEpE,OAAOC,WAAW,MAAM,eAAe;AAAC;AAUxC;AACA;AACA,MAAMF,aAAa,GAAG,QAA2C;EAAA,IAA1C;IAAEG,KAAK,GAAG,CAAC,CAAC;IAAEC;EAAgB,CAAC;EACpD,MAAMC,WAAW,GAAGN,WAAW,CAAC;IAAA,IAAC;MAAEO;IAAY,CAAC;IAAA,OAAKA,WAAW,CAACH,KAAK;EAAA,EAAC;EACvE,MAAMI,UAAU,GAAGL,WAAW,CAACG,WAAW,EAAEF,KAAK,CAAC;EAElD,oBAAO,KAAC,eAAe;IAAC,KAAK,EAAEI,UAAW;IAAA,UAAEH;EAAQ,EAAmB;AACzE,CAAC;AACDJ,aAAa,CAACQ,WAAW,GAAG,kBAAkB;AAE9C,eAAeR,aAAa"}
|
package/esm/react-theme/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","createTheme","ThemeProvider"],"sources":["../../src/react-theme/index.js"],"sourcesContent":["// @flow\nexport { default as createTheme } from \"./createTheme\";\nexport { default as ThemeProvider } from \"./ThemeProvider\";\n\nexport * from \"./useTheme\";\n\nexport * from \"./utils/themeProps\";\n\nexport * from \"./utils/background\";\nexport * from \"./utils/colors\";\nexport * from \"./utils/contrast\";\nexport * from \"./utils/corners\";\nexport * from \"./utils/spacers\";\n\nexport type * from \"./types\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","createTheme","ThemeProvider"],"sources":["../../src/react-theme/index.js"],"sourcesContent":["// @flow\nexport { default as createTheme } from \"./createTheme\";\nexport { default as ThemeProvider } from \"./ThemeProvider\";\n\nexport * from \"./useTheme\";\n\nexport * from \"./utils/themeProps\";\n\nexport * from \"./utils/background\";\nexport * from \"./utils/colors\";\nexport * from \"./utils/contrast\";\nexport * from \"./utils/corners\";\nexport * from \"./utils/spacers\";\n\nexport type * from \"./types\";\n"],"mappings":"AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,eAAe;AACtD,SAASD,OAAO,IAAIE,aAAa,QAAQ,iBAAiB;AAE1D,cAAc,YAAY;AAE1B,cAAc,oBAAoB;AAElC,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,cAAc,kBAAkB;AAChC,cAAc,iBAAiB;AAC/B,cAAc,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.js","names":["useContext","ThemeContext","useTheme"],"sources":["../../src/react-theme/useTheme.js"],"sourcesContent":["// @flow\nimport { useContext } from \"react\";\nimport { ThemeContext } from \"styled-components\";\n\nimport type { Theme } from \"./types\";\n\n/**\n */\nconst useTheme = (): Theme => {\n return useContext(ThemeContext);\n};\n\nexport { useTheme };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTheme.js","names":["useContext","ThemeContext","useTheme"],"sources":["../../src/react-theme/useTheme.js"],"sourcesContent":["// @flow\nimport { useContext } from \"react\";\nimport { ThemeContext } from \"styled-components\";\n\nimport type { Theme } from \"./types\";\n\n/**\n */\nconst useTheme = (): Theme => {\n return useContext(ThemeContext);\n};\n\nexport { useTheme };\n"],"mappings":"AACA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,YAAY,QAAQ,mBAAmB;AAIhD;AACA;AACA,MAAMC,QAAQ,GAAG,MAAa;EAC5B,OAAOF,UAAU,CAACC,YAAY,CAAC;AACjC,CAAC;AAED,SAASC,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background.js","names":["getThemeProp","renderBackground","path","defaultValue","theme","value"],"sources":["../../../src/react-theme/utils/background.js"],"sourcesContent":["// @flow\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { ThemePropValue, UtilThemeProps } from \"../types\";\n\n/**\n */\nconst renderBackground =\n (path: string, defaultValue?: string): ((UtilThemeProps) => ThemePropValue) =>\n ({ theme }: UtilThemeProps) => {\n const value = getThemeProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return `background: ${value}`;\n }\n\n return value;\n };\n\nexport { renderBackground };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"background.js","names":["getThemeProp","renderBackground","path","defaultValue","theme","value"],"sources":["../../../src/react-theme/utils/background.js"],"sourcesContent":["// @flow\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { ThemePropValue, UtilThemeProps } from \"../types\";\n\n/**\n */\nconst renderBackground =\n (path: string, defaultValue?: string): ((UtilThemeProps) => ThemePropValue) =>\n ({ theme }: UtilThemeProps) => {\n const value = getThemeProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return `background: ${value}`;\n }\n\n return value;\n };\n\nexport { renderBackground };\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA,MAAMC,gBAAgB,GACpB,CAACC,IAAY,EAAEC,YAAqB,KACpC,QAA+B;EAAA,IAA9B;IAAEC;EAAsB,CAAC;EACxB,MAAMC,KAAK,GAAGL,YAAY,CAACI,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC;EAErD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAQ,eAAcA,KAAM,EAAC;EAC/B;EAEA,OAAOA,KAAK;AACd,CAAC;AAEH,SAASJ,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.js","names":["darken","hsl","lighten","parseToHsl","getThemeProp","darkenColor","amount","path","defaultValue","theme","lightenColor","changeHSL","color","saturation","lightness","hueAdjustment","hue"],"sources":["../../../src/react-theme/utils/colors.js"],"sourcesContent":["// @flow\nimport { darken, hsl, lighten, parseToHsl } from \"polished\";\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\n/*\n * Themed color x amount darkened\n */\n/**\n */\nconst darkenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n darken(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Themed color x amount lightened\n */\n/**\n */\nconst lightenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n lighten(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Make a color lighter or darker in the same color family\n */\n/**\n */\nconst changeHSL = (\n color: string,\n saturation?: number,\n lightness?: number,\n hueAdjustment: number = 0\n): string => hsl(parseToHsl(color).hue + hueAdjustment, saturation, lightness);\n\nexport { darkenColor, lightenColor, changeHSL };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"colors.js","names":["darken","hsl","lighten","parseToHsl","getThemeProp","darkenColor","amount","path","defaultValue","theme","lightenColor","changeHSL","color","saturation","lightness","hueAdjustment","hue"],"sources":["../../../src/react-theme/utils/colors.js"],"sourcesContent":["// @flow\nimport { darken, hsl, lighten, parseToHsl } from \"polished\";\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\n/*\n * Themed color x amount darkened\n */\n/**\n */\nconst darkenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n darken(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Themed color x amount lightened\n */\n/**\n */\nconst lightenColor =\n (\n amount: number | string,\n path: string,\n defaultValue?: string\n ): ((UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n lighten(amount, getThemeProp(theme, path, defaultValue));\n\n/*\n * Make a color lighter or darker in the same color family\n */\n/**\n */\nconst changeHSL = (\n color: string,\n saturation?: number,\n lightness?: number,\n hueAdjustment: number = 0\n): string => hsl(parseToHsl(color).hue + hueAdjustment, saturation, lightness);\n\nexport { darkenColor, lightenColor, changeHSL };\n"],"mappings":"AACA,SAASA,MAAM,EAAEC,GAAG,EAAEC,OAAO,EAAEC,UAAU,QAAQ,UAAU;AAC3D,SAASC,YAAY,QAAQ,cAAc;AAI3C;AACA;AACA;AACA;AACA;AACA,MAAMC,WAAW,GACf,CACEC,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvB;EAAA,IAAC;IAAEC;EAAsB,CAAC;EAAA,OACxBT,MAAM,CAACM,MAAM,EAAEF,YAAY,CAACK,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE3D;AACA;AACA;AACA;AACA;AACA,MAAME,YAAY,GAChB,CACEJ,MAAuB,EACvBC,IAAY,EACZC,YAAqB,KAEvB;EAAA,IAAC;IAAEC;EAAsB,CAAC;EAAA,OACxBP,OAAO,CAACI,MAAM,EAAEF,YAAY,CAACK,KAAK,EAAEF,IAAI,EAAEC,YAAY,CAAC,CAAC;AAAA;;AAE5D;AACA;AACA;AACA;AACA;AACA,MAAMG,SAAS,GAAG,UAChBC,KAAa,EACbC,UAAmB,EACnBC,SAAkB;EAAA,IAClBC,aAAqB,uEAAG,CAAC;EAAA,OACdd,GAAG,CAACE,UAAU,CAACS,KAAK,CAAC,CAACI,GAAG,GAAGD,aAAa,EAAEF,UAAU,EAAEC,SAAS,CAAC;AAAA;AAE9E,SAAST,WAAW,EAAEK,YAAY,EAAEC,SAAS"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import { getLuminance, parseToRgb } from "polished";
|
|
3
2
|
import { getThemeStringProp, getProp } from "./themeProps";
|
|
4
3
|
import { ThemePropertyException } from "../../exceptions";
|
|
@@ -55,8 +54,7 @@ const getContrastYIQ = function (color) {
|
|
|
55
54
|
const getBackgroundColor = (theme, bgColorProperty, defaultValue) => {
|
|
56
55
|
let bgColor = getProp(theme, bgColorProperty, defaultValue);
|
|
57
56
|
if (typeof bgColor === "object") {
|
|
58
|
-
|
|
59
|
-
bgColor = ((_bgColor = bgColor) === null || _bgColor === void 0 ? void 0 : _bgColor.backgroundColor) ?? defaultValue;
|
|
57
|
+
bgColor = bgColor?.backgroundColor ?? defaultValue;
|
|
60
58
|
}
|
|
61
59
|
if (typeof bgColor === "string") {
|
|
62
60
|
return bgColor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contrast.js","names":["getLuminance","parseToRgb","getThemeStringProp","getProp","ThemePropertyException","getColorContrast","color1","color2","luminance1","luminance2","parseFloat","toFixed","getYIQ","color","rgb","red","green","blue","getContrastYIQ","dark","light","preferredColor","yiqColor","darkColor","lightColor","getBackgroundColor","theme","bgColorProperty","defaultValue","bgColor","backgroundColor","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty"],"sources":["../../../src/react-theme/utils/contrast.js"],"sourcesContent":["// @flow\nimport { getLuminance, parseToRgb } from \"polished\";\n\nimport { getThemeStringProp, getProp } from \"./themeProps\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\n\n/**\n * calculate the contrast ratio of two colors\n */\nconst getColorContrast = (color1: string, color2: string): number => {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return parseFloat(\n (luminance1 > luminance2\n ? (luminance1 + 0.05) / (luminance2 + 0.05)\n : (luminance2 + 0.05) / (luminance1 + 0.05)\n ).toFixed(2)\n );\n};\n\n/*\n * The YIQ equation converts the RGB color (0 to 255) into a YIQ color space.\n * YIQ is the standard formula for calculating the perceived brightness of a color,\n * and is recommended by the World Wide Web Consortium (W3C).\n */\n/**\n */\nconst getYIQ = (color: string): number => {\n const rgb = parseToRgb(color);\n\n return (rgb.red * 299 + rgb.green * 587 + rgb.blue * 114) / 1000;\n};\n\n/**\n * Get dark or light color, depending on the given color\n * When the contrast between the color and the light or dark color is too low,\n * the preferred color is returned\n */\nconst getContrastYIQ = (\n color: string,\n dark: string = \"#212529\",\n light: string = \"#fff\",\n preferredColor?: string\n): string => {\n const yiqColor = getYIQ(color);\n\n if (preferredColor && getColorContrast(color, preferredColor) >= 4.5) {\n return preferredColor;\n }\n\n const darkColor = getYIQ(dark) < 127.5 ? dark : \"#212529\";\n const lightColor = getYIQ(light) > 127.5 ? light : \"#fff\";\n\n if (yiqColor > 127.5) {\n if (getColorContrast(color, darkColor) < 3) {\n return \"#212529\";\n }\n\n return darkColor;\n }\n\n if (getColorContrast(color, lightColor) < 3) {\n return \"#fff\";\n }\n return lightColor;\n};\n\n/**\n */\nconst getBackgroundColor = (\n theme: Theme,\n bgColorProperty: string,\n defaultValue: string\n) => {\n let bgColor = getProp(theme, bgColorProperty, defaultValue);\n\n if (typeof bgColor === \"object\") {\n bgColor = bgColor?.backgroundColor ?? defaultValue;\n }\n\n if (typeof bgColor === \"string\") {\n return bgColor;\n }\n\n throw new ThemePropertyException(\n `${bgColorProperty} is not a string, but: ${typeof bgColor}`\n );\n};\n\n/**\n * Retrieve the contrast color for the given background property,\n * based on theme properties\n */\nconst renderContrastColor =\n (\n bgColorProperty: string,\n preferredColorProperty?: string,\n standardDarkProperty: string = \"YIQ_DARK_COLOR\",\n standardLightProperty: string = \"YIQ_LIGHT_COLOR\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = {} }: UtilThemeProps) => {\n const bgColor = getBackgroundColor(theme, bgColorProperty, \"#ffffff\");\n const preferredColor = getThemeStringProp(theme, preferredColorProperty);\n const darkColor = getThemeStringProp(\n theme,\n standardDarkProperty,\n \"#212529\"\n );\n const lightColor = getThemeStringProp(theme, standardLightProperty, \"#fff\");\n\n return getContrastYIQ(bgColor, darkColor, lightColor, preferredColor);\n };\n\nexport { getColorContrast, getYIQ, getContrastYIQ, renderContrastColor };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"contrast.js","names":["getLuminance","parseToRgb","getThemeStringProp","getProp","ThemePropertyException","getColorContrast","color1","color2","luminance1","luminance2","parseFloat","toFixed","getYIQ","color","rgb","red","green","blue","getContrastYIQ","dark","light","preferredColor","yiqColor","darkColor","lightColor","getBackgroundColor","theme","bgColorProperty","defaultValue","bgColor","backgroundColor","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty"],"sources":["../../../src/react-theme/utils/contrast.js"],"sourcesContent":["// @flow\nimport { getLuminance, parseToRgb } from \"polished\";\n\nimport { getThemeStringProp, getProp } from \"./themeProps\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\n\n/**\n * calculate the contrast ratio of two colors\n */\nconst getColorContrast = (color1: string, color2: string): number => {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return parseFloat(\n (luminance1 > luminance2\n ? (luminance1 + 0.05) / (luminance2 + 0.05)\n : (luminance2 + 0.05) / (luminance1 + 0.05)\n ).toFixed(2)\n );\n};\n\n/*\n * The YIQ equation converts the RGB color (0 to 255) into a YIQ color space.\n * YIQ is the standard formula for calculating the perceived brightness of a color,\n * and is recommended by the World Wide Web Consortium (W3C).\n */\n/**\n */\nconst getYIQ = (color: string): number => {\n const rgb = parseToRgb(color);\n\n return (rgb.red * 299 + rgb.green * 587 + rgb.blue * 114) / 1000;\n};\n\n/**\n * Get dark or light color, depending on the given color\n * When the contrast between the color and the light or dark color is too low,\n * the preferred color is returned\n */\nconst getContrastYIQ = (\n color: string,\n dark: string = \"#212529\",\n light: string = \"#fff\",\n preferredColor?: string\n): string => {\n const yiqColor = getYIQ(color);\n\n if (preferredColor && getColorContrast(color, preferredColor) >= 4.5) {\n return preferredColor;\n }\n\n const darkColor = getYIQ(dark) < 127.5 ? dark : \"#212529\";\n const lightColor = getYIQ(light) > 127.5 ? light : \"#fff\";\n\n if (yiqColor > 127.5) {\n if (getColorContrast(color, darkColor) < 3) {\n return \"#212529\";\n }\n\n return darkColor;\n }\n\n if (getColorContrast(color, lightColor) < 3) {\n return \"#fff\";\n }\n return lightColor;\n};\n\n/**\n */\nconst getBackgroundColor = (\n theme: Theme,\n bgColorProperty: string,\n defaultValue: string\n) => {\n let bgColor = getProp(theme, bgColorProperty, defaultValue);\n\n if (typeof bgColor === \"object\") {\n bgColor = bgColor?.backgroundColor ?? defaultValue;\n }\n\n if (typeof bgColor === \"string\") {\n return bgColor;\n }\n\n throw new ThemePropertyException(\n `${bgColorProperty} is not a string, but: ${typeof bgColor}`\n );\n};\n\n/**\n * Retrieve the contrast color for the given background property,\n * based on theme properties\n */\nconst renderContrastColor =\n (\n bgColorProperty: string,\n preferredColorProperty?: string,\n standardDarkProperty: string = \"YIQ_DARK_COLOR\",\n standardLightProperty: string = \"YIQ_LIGHT_COLOR\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = {} }: UtilThemeProps) => {\n const bgColor = getBackgroundColor(theme, bgColorProperty, \"#ffffff\");\n const preferredColor = getThemeStringProp(theme, preferredColorProperty);\n const darkColor = getThemeStringProp(\n theme,\n standardDarkProperty,\n \"#212529\"\n );\n const lightColor = getThemeStringProp(theme, standardLightProperty, \"#fff\");\n\n return getContrastYIQ(bgColor, darkColor, lightColor, preferredColor);\n };\n\nexport { getColorContrast, getYIQ, getContrastYIQ, renderContrastColor };\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"corners.js","names":["getThemeStringProp","DEFAULT_CORNER_PROPERTY","roundedCorners","property","path","defaultValue","theme","ROUNDED_CORNERS","propertyName"],"sources":["../../../src/react-theme/utils/corners.js"],"sourcesContent":["// @flow\nimport { getThemeStringProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\nconst DEFAULT_CORNER_PROPERTY = \"border-radius\";\n\n/*\n * Border radius based on the theme setting for rounded corners\n * When ROUNDED_CORNERS is not true in the theme, no rounded corners are returned\n */\n/**\n */\nconst roundedCorners =\n (\n property: string = DEFAULT_CORNER_PROPERTY,\n path: string = \"BORDER_RADIUS\",\n defaultValue: string = \"0.25rem\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = {} }: UtilThemeProps) => {\n if (theme.ROUNDED_CORNERS) {\n const propertyName =\n property && property !== DEFAULT_CORNER_PROPERTY\n ? `border-${property}-radius`\n : DEFAULT_CORNER_PROPERTY;\n\n return `${propertyName}: ${getThemeStringProp(\n theme,\n path,\n defaultValue\n )}`;\n }\n\n return \"\";\n };\n\nexport { roundedCorners };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"corners.js","names":["getThemeStringProp","DEFAULT_CORNER_PROPERTY","roundedCorners","property","path","defaultValue","theme","ROUNDED_CORNERS","propertyName"],"sources":["../../../src/react-theme/utils/corners.js"],"sourcesContent":["// @flow\nimport { getThemeStringProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\nconst DEFAULT_CORNER_PROPERTY = \"border-radius\";\n\n/*\n * Border radius based on the theme setting for rounded corners\n * When ROUNDED_CORNERS is not true in the theme, no rounded corners are returned\n */\n/**\n */\nconst roundedCorners =\n (\n property: string = DEFAULT_CORNER_PROPERTY,\n path: string = \"BORDER_RADIUS\",\n defaultValue: string = \"0.25rem\"\n ): ((UtilThemeProps) => string) =>\n ({ theme = {} }: UtilThemeProps) => {\n if (theme.ROUNDED_CORNERS) {\n const propertyName =\n property && property !== DEFAULT_CORNER_PROPERTY\n ? `border-${property}-radius`\n : DEFAULT_CORNER_PROPERTY;\n\n return `${propertyName}: ${getThemeStringProp(\n theme,\n path,\n defaultValue\n )}`;\n }\n\n return \"\";\n };\n\nexport { roundedCorners };\n"],"mappings":"AACA,SAASA,kBAAkB,QAAQ,cAAc;AAIjD,MAAMC,uBAAuB,GAAG,eAAe;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAClB;EAAA,IACEC,QAAgB,uEAAGF,uBAAuB;EAAA,IAC1CG,IAAY,uEAAG,eAAe;EAAA,IAC9BC,YAAoB,uEAAG,SAAS;EAAA,OAElC,QAAoC;IAAA,IAAnC;MAAEC,KAAK,GAAG,CAAC;IAAkB,CAAC;IAC7B,IAAIA,KAAK,CAACC,eAAe,EAAE;MACzB,MAAMC,YAAY,GAChBL,QAAQ,IAAIA,QAAQ,KAAKF,uBAAuB,GAC3C,UAASE,QAAS,SAAQ,GAC3BF,uBAAuB;MAE7B,OAAQ,GAAEO,YAAa,KAAIR,kBAAkB,CAC3CM,KAAK,EACLF,IAAI,EACJC,YAAY,CACZ,EAAC;IACL;IAEA,OAAO,EAAE;EACX,CAAC;AAAA;AAEH,SAASH,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeProps.js","names":["get","ThemePropertyException","getProp","theme","path","defaultValue","getThemeProp","value","getThemeStringProp","toString","getThemeNumberProp","themeProp"],"sources":["../../../src/react-theme/utils/themeProps.js"],"sourcesContent":["// @flow\nimport { get } from \"../../utils/helpers/objects\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, ThemePropValue } from \"../types\";\n\n/**\n */\nexport const getProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ?ThemePropValue => {\n return path === \"\" ? defaultValue : get(theme, path, defaultValue);\n};\n\n/**\n */\nexport const getThemeProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ThemePropValue => {\n const value = getProp(theme, path, defaultValue);\n\n if (\n value != null &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"object\")\n ) {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, number or plain object, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeStringProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: string = \"\"\n): string => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return value;\n } else if (typeof value === \"number\") {\n return value.toString();\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeNumberProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: number = 0\n): number => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"number\") {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a number, but: ${typeof value}`\n );\n};\n\n/*\n * Retrieve property value from theme property of styled component\n */\n/**\n */\nexport const themeProp =\n (\n path: string,\n defaultValue?: ThemePropValue\n ): (({ theme: Theme }) => ThemePropValue) =>\n ({ theme }: { theme: Theme }) =>\n getThemeProp(theme, path, defaultValue);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"themeProps.js","names":["get","ThemePropertyException","getProp","theme","path","defaultValue","getThemeProp","value","getThemeStringProp","toString","getThemeNumberProp","themeProp"],"sources":["../../../src/react-theme/utils/themeProps.js"],"sourcesContent":["// @flow\nimport { get } from \"../../utils/helpers/objects\";\n\nimport { ThemePropertyException } from \"../../exceptions\";\n\nimport type { Theme, ThemePropValue } from \"../types\";\n\n/**\n */\nexport const getProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ?ThemePropValue => {\n return path === \"\" ? defaultValue : get(theme, path, defaultValue);\n};\n\n/**\n */\nexport const getThemeProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: ThemePropValue = \"\"\n): ThemePropValue => {\n const value = getProp(theme, path, defaultValue);\n\n if (\n value != null &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"object\")\n ) {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, number or plain object, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeStringProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: string = \"\"\n): string => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return value;\n } else if (typeof value === \"number\") {\n return value.toString();\n }\n\n throw new ThemePropertyException(\n `${path} is not a string, but: ${typeof value}`\n );\n};\n\n/**\n */\nexport const getThemeNumberProp = (\n theme: $Shape<Theme> = {},\n path: string = \"\",\n defaultValue: number = 0\n): number => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"number\") {\n return value;\n }\n\n throw new ThemePropertyException(\n `${path} is not a number, but: ${typeof value}`\n );\n};\n\n/*\n * Retrieve property value from theme property of styled component\n */\n/**\n */\nexport const themeProp =\n (\n path: string,\n defaultValue?: ThemePropValue\n ): (({ theme: Theme }) => ThemePropValue) =>\n ({ theme }: { theme: Theme }) =>\n getThemeProp(theme, path, defaultValue);\n"],"mappings":"AACA,SAASA,GAAG,QAAQ,6BAA6B;AAEjD,SAASC,sBAAsB,QAAQ,kBAAkB;AAIzD;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,YAID;EAAA,IAHpBC,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAA4B,uEAAG,EAAE;EAEjC,OAAOD,IAAI,KAAK,EAAE,GAAGC,YAAY,GAAGL,GAAG,CAACG,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;AACpE,CAAC;;AAED;AACA;AACA,OAAO,MAAMC,YAAY,GAAG,YAIP;EAAA,IAHnBH,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAA4B,uEAAG,EAAE;EAEjC,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;EAEhD,IACEE,KAAK,IAAI,IAAI,KACZ,OAAOA,KAAK,KAAK,QAAQ,IACxB,OAAOA,KAAK,KAAK,QAAQ,IACzB,OAAOA,KAAK,KAAK,QAAQ,CAAC,EAC5B;IACA,OAAOA,KAAK;EACd;EAEA,MAAM,IAAIN,sBAAsB,CAC7B,GAAEG,IAAK,kDAAiD,OAAOG,KAAM,EAAC,CACxE;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAG,YAIrB;EAAA,IAHXL,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAAoB,uEAAG,EAAE;EAEzB,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;EAEhD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd,CAAC,MAAM,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IACpC,OAAOA,KAAK,CAACE,QAAQ,EAAE;EACzB;EAEA,MAAM,IAAIR,sBAAsB,CAC7B,GAAEG,IAAK,0BAAyB,OAAOG,KAAM,EAAC,CAChD;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMG,kBAAkB,GAAG,YAIrB;EAAA,IAHXP,KAAoB,uEAAG,CAAC,CAAC;EAAA,IACzBC,IAAY,uEAAG,EAAE;EAAA,IACjBC,YAAoB,uEAAG,CAAC;EAExB,MAAME,KAAK,GAAGL,OAAO,CAACC,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;EAEhD,IAAI,OAAOE,KAAK,KAAK,QAAQ,EAAE;IAC7B,OAAOA,KAAK;EACd;EAEA,MAAM,IAAIN,sBAAsB,CAC7B,GAAEG,IAAK,0BAAyB,OAAOG,KAAM,EAAC,CAChD;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,SAAS,GACpB,CACEP,IAAY,EACZC,YAA6B,KAE/B;EAAA,IAAC;IAAEF;EAAwB,CAAC;EAAA,OAC1BG,YAAY,CAACH,KAAK,EAAEC,IAAI,EAAEC,YAAY,CAAC;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","names":["startProgress","finishProgress","receiveLocale","locale","type","payload","updateLocale","dispatch","setLocales","locales"],"sources":["../../../src/redux/_i18n/actions.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport type Locales from \"../../i18n/Locales\";\nimport type { SetLocalesAction, UpdateLocaleAction } from \"./types\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n * Update current locale\n */\nexport const receiveLocale = (locale: string): UpdateLocaleAction => ({\n type: \"UPDATE_LOCALE\",\n payload: locale,\n});\n\n/**\n * Change locale of application and redirect\n */\nexport const updateLocale =\n (locale: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n dispatch(receiveLocale(locale));\n\n dispatch(finishProgress());\n };\n\n/**\n */\nexport const setLocales = (\n locales: Locales,\n locale: string\n): SetLocalesAction => ({\n type: \"SET_LOCALES\",\n payload: {\n locales,\n locale,\n },\n});\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions.js","names":["startProgress","finishProgress","receiveLocale","locale","type","payload","updateLocale","dispatch","setLocales","locales"],"sources":["../../../src/redux/_i18n/actions.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport type Locales from \"../../i18n/Locales\";\nimport type { SetLocalesAction, UpdateLocaleAction } from \"./types\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n * Update current locale\n */\nexport const receiveLocale = (locale: string): UpdateLocaleAction => ({\n type: \"UPDATE_LOCALE\",\n payload: locale,\n});\n\n/**\n * Change locale of application and redirect\n */\nexport const updateLocale =\n (locale: string): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n dispatch(receiveLocale(locale));\n\n dispatch(finishProgress());\n };\n\n/**\n */\nexport const setLocales = (\n locales: Locales,\n locale: string\n): SetLocalesAction => ({\n type: \"SET_LOCALES\",\n payload: {\n locales,\n locale,\n },\n});\n"],"mappings":"AACA,SAASA,aAAa,EAAEC,cAAc,QAAQ,8BAA8B;AAM5E;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAIC,MAAc,KAA0B;EACpEC,IAAI,EAAE,eAAe;EACrBC,OAAO,EAAEF;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMG,YAAY,GACtBH,MAAc,IACdI,QAAQ,IAAK;EACZA,QAAQ,CAACP,aAAa,EAAE,CAAC;EACzBO,QAAQ,CAACL,aAAa,CAACC,MAAM,CAAC,CAAC;EAE/BI,QAAQ,CAACN,cAAc,EAAE,CAAC;AAC5B,CAAC;;AAEH;AACA;AACA,OAAO,MAAMO,UAAU,GAAG,CACxBC,OAAgB,EAChBN,MAAc,MACQ;EACtBC,IAAI,EAAE,aAAa;EACnBC,OAAO,EAAE;IACPI,OAAO;IACPN;EACF;AACF,CAAC,CAAC"}
|
package/esm/redux/_i18n/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/redux/_i18n/index.js"],"sourcesContent":["// @flow\nexport * from \"./reducer\";\n\nexport * from \"./actions\";\n\nexport type * from \"./types\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/redux/_i18n/index.js"],"sourcesContent":["// @flow\nexport * from \"./reducer\";\n\nexport * from \"./actions\";\n\nexport type * from \"./types\";\n"],"mappings":"AACA,cAAc,WAAW;AAEzB,cAAc,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.js","names":["Cache","setCookie","Locales","updateLocale","state","locale","clear","setLocales","locales","initialState","I18nReducer","action","type","payload"],"sources":["../../../src/redux/_i18n/reducer.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport { setCookie } from \"../../utils/browser/Cookies\";\n\nimport Locales from \"../../i18n/Locales\";\n\nimport type { Reducer } from \"redux\";\nimport type { I18nState } from \"./types\";\nimport type { ReduxAction } from \"../types\";\n\n/**\n */\nconst updateLocale = (state, locale) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n // clear cache because of cached contributions\n Cache.clear();\n\n return {\n ...state,\n locale,\n };\n};\n\n/**\n */\nconst setLocales = (state, { locale, locales }) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n if (locale) {\n return {\n ...state,\n locales,\n locale,\n };\n }\n\n return {\n ...state,\n locales,\n };\n};\n\n// REDUCER\nconst initialState: I18nState = {\n locales: new Locales(),\n locale: \"en\",\n};\n\n/**\n * Form reducer\n */\nexport const I18nReducer: Reducer<I18nState, ReduxAction> = (\n state = initialState,\n action = void 0\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"SET_LOCALES\":\n return setLocales(state, action.payload);\n\n case \"UPDATE_LOCALE\":\n return updateLocale(state, action.payload);\n\n default:\n return state;\n }\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"reducer.js","names":["Cache","setCookie","Locales","updateLocale","state","locale","clear","setLocales","locales","initialState","I18nReducer","action","type","payload"],"sources":["../../../src/redux/_i18n/reducer.js"],"sourcesContent":["// @flow\nimport Cache from \"../../utils/browser/Cache\";\nimport { setCookie } from \"../../utils/browser/Cookies\";\n\nimport Locales from \"../../i18n/Locales\";\n\nimport type { Reducer } from \"redux\";\nimport type { I18nState } from \"./types\";\nimport type { ReduxAction } from \"../types\";\n\n/**\n */\nconst updateLocale = (state, locale) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n // clear cache because of cached contributions\n Cache.clear();\n\n return {\n ...state,\n locale,\n };\n};\n\n/**\n */\nconst setLocales = (state, { locale, locales }) => {\n // set locale in cookie\n setCookie(\"locale\", locale);\n\n if (locale) {\n return {\n ...state,\n locales,\n locale,\n };\n }\n\n return {\n ...state,\n locales,\n };\n};\n\n// REDUCER\nconst initialState: I18nState = {\n locales: new Locales(),\n locale: \"en\",\n};\n\n/**\n * Form reducer\n */\nexport const I18nReducer: Reducer<I18nState, ReduxAction> = (\n state = initialState,\n action = void 0\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"SET_LOCALES\":\n return setLocales(state, action.payload);\n\n case \"UPDATE_LOCALE\":\n return updateLocale(state, action.payload);\n\n default:\n return state;\n }\n};\n"],"mappings":"AACA,OAAOA,KAAK,MAAM,2BAA2B;AAC7C,SAASC,SAAS,QAAQ,6BAA6B;AAEvD,OAAOC,OAAO,MAAM,oBAAoB;AAMxC;AACA;AACA,MAAMC,YAAY,GAAG,CAACC,KAAK,EAAEC,MAAM,KAAK;EACtC;EACAJ,SAAS,CAAC,QAAQ,EAAEI,MAAM,CAAC;;EAE3B;EACAL,KAAK,CAACM,KAAK,EAAE;EAEb,OAAO;IACL,GAAGF,KAAK;IACRC;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,MAAME,UAAU,GAAG,CAACH,KAAK,WAA0B;EAAA,IAAxB;IAAEC,MAAM;IAAEG;EAAQ,CAAC;EAC5C;EACAP,SAAS,CAAC,QAAQ,EAAEI,MAAM,CAAC;EAE3B,IAAIA,MAAM,EAAE;IACV,OAAO;MACL,GAAGD,KAAK;MACRI,OAAO;MACPH;IACF,CAAC;EACH;EAEA,OAAO;IACL,GAAGD,KAAK;IACRI;EACF,CAAC;AACH,CAAC;;AAED;AACA,MAAMC,YAAuB,GAAG;EAC9BD,OAAO,EAAE,IAAIN,OAAO,EAAE;EACtBG,MAAM,EAAE;AACV,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMK,WAA4C,GAAG,YAGvD;EAAA,IAFHN,KAAK,uEAAGK,YAAY;EAAA,IACpBE,MAAM,uEAAG,KAAK,CAAC;EAEf,IAAI,CAACA,MAAM,EAAE;IACX,OAAOP,KAAK;EACd;EAEA,QAAQO,MAAM,CAACC,IAAI;IACjB,KAAK,aAAa;MAChB,OAAOL,UAAU,CAACH,KAAK,EAAEO,MAAM,CAACE,OAAO,CAAC;IAE1C,KAAK,eAAe;MAClB,OAAOV,YAAY,CAACC,KAAK,EAAEO,MAAM,CAACE,OAAO,CAAC;IAE5C;MACE,OAAOT,KAAK;EAAC;AAEnB,CAAC"}
|
|
@@ -70,14 +70,14 @@ export const loadModel = (key, href, options) => ({
|
|
|
70
70
|
type: "MODULARUI/FETCH",
|
|
71
71
|
payload: {
|
|
72
72
|
href: href instanceof Href ? href : new Href(href),
|
|
73
|
-
method:
|
|
74
|
-
data: options
|
|
75
|
-
locale:
|
|
76
|
-
childmodels: options
|
|
77
|
-
targetModel: options
|
|
73
|
+
method: options?.method ?? HTTP_METHODS.GET,
|
|
74
|
+
data: options?.data,
|
|
75
|
+
locale: options?.locale ?? "en",
|
|
76
|
+
childmodels: options?.childmodels,
|
|
77
|
+
targetModel: options?.targetModel,
|
|
78
78
|
/**
|
|
79
79
|
*/
|
|
80
|
-
successAction: model => loadModelSuccessAction(key, model, options
|
|
80
|
+
successAction: model => loadModelSuccessAction(key, model, options?.updateModel),
|
|
81
81
|
/**
|
|
82
82
|
*/
|
|
83
83
|
errorAction: error => {
|
|
@@ -101,7 +101,7 @@ export const loadModularUI = (key, href, options) => dispatch => {
|
|
|
101
101
|
dispatch(startProgress());
|
|
102
102
|
const loadModelPromise = dispatch(loadModel(key, href, options));
|
|
103
103
|
return _Promise.resolve(loadModelPromise).then(response => {
|
|
104
|
-
if (
|
|
104
|
+
if (response?.type === "FINISH_PROGRESS") {
|
|
105
105
|
dispatch(updateStatus(key, MODULARUI_STATUS.FINISHED));
|
|
106
106
|
}
|
|
107
107
|
return dispatch(finishProgress());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","names":["HTTP_METHODS","MODULARUI_STATUS","Href","ErrorResponse","finishProgress","startProgress","handleError","setModel","key","model","connectKey","type","payload","updateModel","removeModelByKey","resetModularUI","updateStatus","status","loadModelSuccessAction","modelToUpdate","clonedModel","clone","update","Error","loadModel","href","options","method","GET","data","locale","childmodels","targetModel","successAction","errorAction","error","errorResponse","isChangePassword","isResourceNotFoundAfterReload","ERROR","loadModularUI","dispatch","LOADING","loadModelPromise","resolve","then","response","FINISHED","catch","reloadModel","selfhref","isReload"],"sources":["../../../src/redux/_modularui/actions.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS, MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { Dispatch, ThunkAction } from \"../types\";\nimport type {\n ModularUIAction,\n SetModelAction,\n UpdateModelAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n UpdateStatusAction,\n} from \"./types\";\nimport type { RequestBaseOptions } from \"../../utils/fetch/types\";\n\n/**\n */\nexport const setModel = (\n key: string,\n model: ModularUIModel\n): SetModelAction => {\n // set key on model for later reference\n model.connectKey = key;\n return {\n type: \"MODULARUI/SET\",\n payload: {\n key,\n model,\n },\n };\n};\n\n/**\n */\nexport const updateModel = (model: ModularUIModel): UpdateModelAction => ({\n type: \"MODULARUI/UPDATE\",\n payload: model,\n});\n\n/**\n */\nexport const removeModelByKey = (key: string): RemoveModelByKeyAction => ({\n type: \"MODULARUI/REMOVE_KEY\",\n payload: key,\n});\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = (): ResetModularUIAction => ({\n type: \"MODULARUI/RESET\",\n});\n\n/**\n */\nexport const updateStatus = (\n key: string,\n status: $Keys<typeof MODULARUI_STATUS>\n): UpdateStatusAction => ({\n type: \"MODULARUI/STATUS\",\n payload: { key, status },\n});\n\n/**\n */\nconst loadModelSuccessAction = (\n key: string,\n model: ModularUIModel,\n modelToUpdate\n): UpdateModelAction | SetModelAction => {\n if (modelToUpdate) {\n // $FlowFixMe[prop-missing]\n if (typeof modelToUpdate[\"update\"] === \"function\") {\n const clonedModel = modelToUpdate.clone();\n clonedModel.update(model);\n\n return updateModel(clonedModel);\n }\n\n throw new Error(\n `loadModel action: updateModel is set as option for ${key}, but the model is missing an update methode`\n );\n }\n\n return setModel(key, model);\n};\n\n/**\n */\nexport const loadModel = (\n key: string,\n href: Href | string,\n options?: RequestBaseOptions\n): ModularUIAction => ({\n type: \"MODULARUI/FETCH\",\n payload: {\n href: href instanceof Href ? href : new Href(href),\n method: options?.method ?? HTTP_METHODS.GET,\n data: options?.data,\n locale: options?.locale ?? \"en\",\n childmodels: options?.childmodels,\n targetModel: options?.targetModel,\n /**\n */\n successAction: (model) =>\n loadModelSuccessAction(key, model, options?.updateModel),\n /**\n */\n errorAction: (error) => {\n const errorResponse = new ErrorResponse(error, key);\n if (errorResponse.isChangePassword) {\n return {\n type: \"NO_ACTION\",\n };\n } else if (errorResponse.isResourceNotFoundAfterReload) {\n return removeModelByKey(key);\n }\n\n return updateStatus(key, MODULARUI_STATUS.ERROR);\n },\n },\n});\n\n/**\n */\nexport const loadModularUI =\n (\n key: string,\n href: Href | string,\n options?: RequestBaseOptions\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(updateStatus(key, MODULARUI_STATUS.LOADING));\n dispatch(startProgress());\n\n const loadModelPromise = dispatch(loadModel(key, href, options));\n\n return Promise.resolve(loadModelPromise)\n .then((response) => {\n if (response?.type === \"FINISH_PROGRESS\") {\n dispatch(updateStatus(key, MODULARUI_STATUS.FINISHED));\n }\n\n return dispatch(finishProgress());\n })\n .catch((error) => dispatch(handleError(error)));\n };\n\n/**\n */\nexport const reloadModel = (\n model: ModularUIModel,\n options?: RequestBaseOptions\n): ThunkAction =>\n loadModularUI(model.connectKey, model.selfhref, {\n ...options,\n isReload: true,\n });\n"],"mappings":";AACA,SAASA,YAAY,EAAEC,gBAAgB,QAAQ,2BAA2B;AAC1E,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,8BAA8B;AAC5E,SAASC,WAAW,QAAQ,kBAAkB;AAc9C;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG,CACtBC,GAAW,EACXC,KAAqB,KACF;EACnB;EACAA,KAAK,CAACC,UAAU,GAAGF,GAAG;EACtB,OAAO;IACLG,IAAI,EAAE,eAAe;IACrBC,OAAO,EAAE;MACPJ,GAAG;MACHC;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMI,WAAW,GAAIJ,KAAqB,KAAyB;EACxEE,IAAI,EAAE,kBAAkB;EACxBC,OAAO,EAAEH;AACX,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMK,gBAAgB,GAAIN,GAAW,KAA8B;EACxEG,IAAI,EAAE,sBAAsB;EAC5BC,OAAO,EAAEJ;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMO,cAAc,GAAG,OAA6B;EACzDJ,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMK,YAAY,GAAG,CAC1BR,GAAW,EACXS,MAAsC,MACd;EACxBN,IAAI,EAAE,kBAAkB;EACxBC,OAAO,EAAE;IAAEJ,GAAG;IAAES;EAAO;AACzB,CAAC,CAAC;;AAEF;AACA;AACA,MAAMC,sBAAsB,GAAG,CAC7BV,GAAW,EACXC,KAAqB,EACrBU,aAAa,KAC0B;EACvC,IAAIA,aAAa,EAAE;IACjB;IACA,IAAI,OAAOA,aAAa,CAAC,QAAQ,CAAC,KAAK,UAAU,EAAE;MACjD,MAAMC,WAAW,GAAGD,aAAa,CAACE,KAAK,EAAE;MACzCD,WAAW,CAACE,MAAM,CAACb,KAAK,CAAC;MAEzB,OAAOI,WAAW,CAACO,WAAW,CAAC;IACjC;IAEA,MAAM,IAAIG,KAAK,CACZ,sDAAqDf,GAAI,8CAA6C,CACxG;EACH;EAEA,OAAOD,QAAQ,CAACC,GAAG,EAAEC,KAAK,CAAC;AAC7B,CAAC;;AAED;AACA;AACA,OAAO,MAAMe,SAAS,GAAG,CACvBhB,GAAW,EACXiB,IAAmB,EACnBC,OAA4B,MACP;EACrBf,IAAI,EAAE,iBAAiB;EACvBC,OAAO,EAAE;IACPa,IAAI,EAAEA,IAAI,YAAYvB,IAAI,GAAGuB,IAAI,GAAG,IAAIvB,IAAI,CAACuB,IAAI,CAAC;IAClDE,MAAM,
|
|
1
|
+
{"version":3,"file":"actions.js","names":["HTTP_METHODS","MODULARUI_STATUS","Href","ErrorResponse","finishProgress","startProgress","handleError","setModel","key","model","connectKey","type","payload","updateModel","removeModelByKey","resetModularUI","updateStatus","status","loadModelSuccessAction","modelToUpdate","clonedModel","clone","update","Error","loadModel","href","options","method","GET","data","locale","childmodels","targetModel","successAction","errorAction","error","errorResponse","isChangePassword","isResourceNotFoundAfterReload","ERROR","loadModularUI","dispatch","LOADING","loadModelPromise","resolve","then","response","FINISHED","catch","reloadModel","selfhref","isReload"],"sources":["../../../src/redux/_modularui/actions.js"],"sourcesContent":["// @flow\nimport { HTTP_METHODS, MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\nimport { finishProgress, startProgress } from \"../actions/ProgressIndicator\";\nimport { handleError } from \"../actions/Error\";\n\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { Dispatch, ThunkAction } from \"../types\";\nimport type {\n ModularUIAction,\n SetModelAction,\n UpdateModelAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n UpdateStatusAction,\n} from \"./types\";\nimport type { RequestBaseOptions } from \"../../utils/fetch/types\";\n\n/**\n */\nexport const setModel = (\n key: string,\n model: ModularUIModel\n): SetModelAction => {\n // set key on model for later reference\n model.connectKey = key;\n return {\n type: \"MODULARUI/SET\",\n payload: {\n key,\n model,\n },\n };\n};\n\n/**\n */\nexport const updateModel = (model: ModularUIModel): UpdateModelAction => ({\n type: \"MODULARUI/UPDATE\",\n payload: model,\n});\n\n/**\n */\nexport const removeModelByKey = (key: string): RemoveModelByKeyAction => ({\n type: \"MODULARUI/REMOVE_KEY\",\n payload: key,\n});\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = (): ResetModularUIAction => ({\n type: \"MODULARUI/RESET\",\n});\n\n/**\n */\nexport const updateStatus = (\n key: string,\n status: $Keys<typeof MODULARUI_STATUS>\n): UpdateStatusAction => ({\n type: \"MODULARUI/STATUS\",\n payload: { key, status },\n});\n\n/**\n */\nconst loadModelSuccessAction = (\n key: string,\n model: ModularUIModel,\n modelToUpdate\n): UpdateModelAction | SetModelAction => {\n if (modelToUpdate) {\n // $FlowFixMe[prop-missing]\n if (typeof modelToUpdate[\"update\"] === \"function\") {\n const clonedModel = modelToUpdate.clone();\n clonedModel.update(model);\n\n return updateModel(clonedModel);\n }\n\n throw new Error(\n `loadModel action: updateModel is set as option for ${key}, but the model is missing an update methode`\n );\n }\n\n return setModel(key, model);\n};\n\n/**\n */\nexport const loadModel = (\n key: string,\n href: Href | string,\n options?: RequestBaseOptions\n): ModularUIAction => ({\n type: \"MODULARUI/FETCH\",\n payload: {\n href: href instanceof Href ? href : new Href(href),\n method: options?.method ?? HTTP_METHODS.GET,\n data: options?.data,\n locale: options?.locale ?? \"en\",\n childmodels: options?.childmodels,\n targetModel: options?.targetModel,\n /**\n */\n successAction: (model) =>\n loadModelSuccessAction(key, model, options?.updateModel),\n /**\n */\n errorAction: (error) => {\n const errorResponse = new ErrorResponse(error, key);\n if (errorResponse.isChangePassword) {\n return {\n type: \"NO_ACTION\",\n };\n } else if (errorResponse.isResourceNotFoundAfterReload) {\n return removeModelByKey(key);\n }\n\n return updateStatus(key, MODULARUI_STATUS.ERROR);\n },\n },\n});\n\n/**\n */\nexport const loadModularUI =\n (\n key: string,\n href: Href | string,\n options?: RequestBaseOptions\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(updateStatus(key, MODULARUI_STATUS.LOADING));\n dispatch(startProgress());\n\n const loadModelPromise = dispatch(loadModel(key, href, options));\n\n return Promise.resolve(loadModelPromise)\n .then((response) => {\n if (response?.type === \"FINISH_PROGRESS\") {\n dispatch(updateStatus(key, MODULARUI_STATUS.FINISHED));\n }\n\n return dispatch(finishProgress());\n })\n .catch((error) => dispatch(handleError(error)));\n };\n\n/**\n */\nexport const reloadModel = (\n model: ModularUIModel,\n options?: RequestBaseOptions\n): ThunkAction =>\n loadModularUI(model.connectKey, model.selfhref, {\n ...options,\n isReload: true,\n });\n"],"mappings":";AACA,SAASA,YAAY,EAAEC,gBAAgB,QAAQ,2BAA2B;AAC1E,OAAOC,IAAI,MAAM,wBAAwB;AACzC,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,SAASC,cAAc,EAAEC,aAAa,QAAQ,8BAA8B;AAC5E,SAASC,WAAW,QAAQ,kBAAkB;AAc9C;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG,CACtBC,GAAW,EACXC,KAAqB,KACF;EACnB;EACAA,KAAK,CAACC,UAAU,GAAGF,GAAG;EACtB,OAAO;IACLG,IAAI,EAAE,eAAe;IACrBC,OAAO,EAAE;MACPJ,GAAG;MACHC;IACF;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,OAAO,MAAMI,WAAW,GAAIJ,KAAqB,KAAyB;EACxEE,IAAI,EAAE,kBAAkB;EACxBC,OAAO,EAAEH;AACX,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMK,gBAAgB,GAAIN,GAAW,KAA8B;EACxEG,IAAI,EAAE,sBAAsB;EAC5BC,OAAO,EAAEJ;AACX,CAAC,CAAC;;AAEF;AACA;AACA;AACA,OAAO,MAAMO,cAAc,GAAG,OAA6B;EACzDJ,IAAI,EAAE;AACR,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMK,YAAY,GAAG,CAC1BR,GAAW,EACXS,MAAsC,MACd;EACxBN,IAAI,EAAE,kBAAkB;EACxBC,OAAO,EAAE;IAAEJ,GAAG;IAAES;EAAO;AACzB,CAAC,CAAC;;AAEF;AACA;AACA,MAAMC,sBAAsB,GAAG,CAC7BV,GAAW,EACXC,KAAqB,EACrBU,aAAa,KAC0B;EACvC,IAAIA,aAAa,EAAE;IACjB;IACA,IAAI,OAAOA,aAAa,CAAC,QAAQ,CAAC,KAAK,UAAU,EAAE;MACjD,MAAMC,WAAW,GAAGD,aAAa,CAACE,KAAK,EAAE;MACzCD,WAAW,CAACE,MAAM,CAACb,KAAK,CAAC;MAEzB,OAAOI,WAAW,CAACO,WAAW,CAAC;IACjC;IAEA,MAAM,IAAIG,KAAK,CACZ,sDAAqDf,GAAI,8CAA6C,CACxG;EACH;EAEA,OAAOD,QAAQ,CAACC,GAAG,EAAEC,KAAK,CAAC;AAC7B,CAAC;;AAED;AACA;AACA,OAAO,MAAMe,SAAS,GAAG,CACvBhB,GAAW,EACXiB,IAAmB,EACnBC,OAA4B,MACP;EACrBf,IAAI,EAAE,iBAAiB;EACvBC,OAAO,EAAE;IACPa,IAAI,EAAEA,IAAI,YAAYvB,IAAI,GAAGuB,IAAI,GAAG,IAAIvB,IAAI,CAACuB,IAAI,CAAC;IAClDE,MAAM,EAAED,OAAO,EAAEC,MAAM,IAAI3B,YAAY,CAAC4B,GAAG;IAC3CC,IAAI,EAAEH,OAAO,EAAEG,IAAI;IACnBC,MAAM,EAAEJ,OAAO,EAAEI,MAAM,IAAI,IAAI;IAC/BC,WAAW,EAAEL,OAAO,EAAEK,WAAW;IACjCC,WAAW,EAAEN,OAAO,EAAEM,WAAW;IACjC;AACJ;IACIC,aAAa,EAAGxB,KAAK,IACnBS,sBAAsB,CAACV,GAAG,EAAEC,KAAK,EAAEiB,OAAO,EAAEb,WAAW,CAAC;IAC1D;AACJ;IACIqB,WAAW,EAAGC,KAAK,IAAK;MACtB,MAAMC,aAAa,GAAG,IAAIjC,aAAa,CAACgC,KAAK,EAAE3B,GAAG,CAAC;MACnD,IAAI4B,aAAa,CAACC,gBAAgB,EAAE;QAClC,OAAO;UACL1B,IAAI,EAAE;QACR,CAAC;MACH,CAAC,MAAM,IAAIyB,aAAa,CAACE,6BAA6B,EAAE;QACtD,OAAOxB,gBAAgB,CAACN,GAAG,CAAC;MAC9B;MAEA,OAAOQ,YAAY,CAACR,GAAG,EAAEP,gBAAgB,CAACsC,KAAK,CAAC;IAClD;EACF;AACF,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAMC,aAAa,GACxB,CACEhC,GAAW,EACXiB,IAAmB,EACnBC,OAA4B,KAE7Be,QAAkB,IAAK;EACtBA,QAAQ,CAACzB,YAAY,CAACR,GAAG,EAAEP,gBAAgB,CAACyC,OAAO,CAAC,CAAC;EACrDD,QAAQ,CAACpC,aAAa,EAAE,CAAC;EAEzB,MAAMsC,gBAAgB,GAAGF,QAAQ,CAACjB,SAAS,CAAChB,GAAG,EAAEiB,IAAI,EAAEC,OAAO,CAAC,CAAC;EAEhE,OAAO,SAAQkB,OAAO,CAACD,gBAAgB,CAAC,CACrCE,IAAI,CAAEC,QAAQ,IAAK;IAClB,IAAIA,QAAQ,EAAEnC,IAAI,KAAK,iBAAiB,EAAE;MACxC8B,QAAQ,CAACzB,YAAY,CAACR,GAAG,EAAEP,gBAAgB,CAAC8C,QAAQ,CAAC,CAAC;IACxD;IAEA,OAAON,QAAQ,CAACrC,cAAc,EAAE,CAAC;EACnC,CAAC,CAAC,CACD4C,KAAK,CAAEb,KAAK,IAAKM,QAAQ,CAACnC,WAAW,CAAC6B,KAAK,CAAC,CAAC,CAAC;AACnD,CAAC;;AAEH;AACA;AACA,OAAO,MAAMc,WAAW,GAAG,CACzBxC,KAAqB,EACrBiB,OAA4B,KAE5Bc,aAAa,CAAC/B,KAAK,CAACC,UAAU,EAAED,KAAK,CAACyC,QAAQ,EAAE;EAC9C,GAAGxB,OAAO;EACVyB,QAAQ,EAAE;AACZ,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import { useEffect } from "react";
|
|
3
2
|
import { useDispatch } from "react-redux";
|
|
4
3
|
import { useLocation } from "react-router";
|
|
@@ -23,7 +22,6 @@ const connector = function (name, resource) {
|
|
|
23
22
|
} = options;
|
|
24
23
|
return Component => {
|
|
25
24
|
const WrappedComponent = props => {
|
|
26
|
-
var _modelEntry$model, _location$state;
|
|
27
25
|
const dispatch = useDispatch();
|
|
28
26
|
const location = useLocation();
|
|
29
27
|
const url = useUrl(resource, {
|
|
@@ -34,7 +32,7 @@ const connector = function (name, resource) {
|
|
|
34
32
|
|
|
35
33
|
// Load the model through the useModUI hook
|
|
36
34
|
const modelEntry = useModularUI(displayName, url, otherOptions);
|
|
37
|
-
const modelKey = modelEntry
|
|
35
|
+
const modelKey = modelEntry?.model?.connectKey;
|
|
38
36
|
|
|
39
37
|
// handle manual reload of model
|
|
40
38
|
const handleManualReload = (model, reloadOptions) => {
|
|
@@ -48,7 +46,7 @@ const connector = function (name, resource) {
|
|
|
48
46
|
};
|
|
49
47
|
|
|
50
48
|
// Check if current model needs a reload
|
|
51
|
-
const reload =
|
|
49
|
+
const reload = location?.state?.reload ?? 0;
|
|
52
50
|
const doReload = useReload(modelEntry, reload);
|
|
53
51
|
useEffect(() => {
|
|
54
52
|
if (doReload) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connector.js","names":["useEffect","useDispatch","useLocation","loadModularUI","reloadModel","removeModelByKey","Href","getDisplayName","useUrl","useReload","useModularUI","useLocale","connector","name","resource","options","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","location","url","displayName","contextId","modelEntry","modelKey","model","connectKey","handleManualReload","reloadOptions","handleFetch","href","fetchOptions","reload","state","doReload","isReload","locale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI"],"sources":["../../../src/redux/_modularui/connector.js"],"sourcesContent":["// @flow\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useLocation } from \"react-router\";\n\nimport { loadModularUI, reloadModel, removeModelByKey } from \"./actions\";\n\nimport Href from \"../../models/href/Href\";\nimport { getDisplayName } from \"../../react/utils\";\n\nimport { useUrl, useReload } from \"./modularuiUtils\";\nimport { useModularUI } from \"../../hooks/useModularUI\";\nimport { useLocale } from \"../../hooks/useI18n\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Location } from \"react-router\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { ModularUIOptions } from \"./types\";\n\nexport type InjectedProps = {\n +modelKey: string,\n +location: Location,\n +status: string | null,\n +lastModification: number | null,\n +hasModel: boolean,\n +locale: string,\n +fetchModularUI: (href: string | Href, fetchOptions: Object) => void,\n +reloadModel: (model: ModularUIModel, options: Object) => void,\n +data?: ?ModularUIModel,\n};\n\n/**\n */\nconst connector = (\n name: string,\n resource: string | Function,\n options: ModularUIOptions = { propName: \"data\", removeOnUnmount: false }\n): ((Component: ComponentType<any>) => (props: any) => Node) => {\n const {\n propName = \"data\",\n removeOnUnmount = false,\n ...otherOptions\n } = options;\n\n return (Component: ComponentType<any>) => {\n const WrappedComponent = (props: any) => {\n const dispatch = useDispatch();\n const location = useLocation();\n\n const url = useUrl(resource, { location, ...props });\n const displayName = getDisplayName(Component, name, props.contextId);\n\n // Load the model through the useModUI hook\n const modelEntry = useModularUI(displayName, url, otherOptions);\n const modelKey = modelEntry?.model?.connectKey;\n\n // handle manual reload of model\n const handleManualReload = (\n model: ModularUIModel,\n reloadOptions?: Object\n ) => {\n dispatch(reloadModel(model, reloadOptions));\n };\n\n // Provide connected models with a fetchModularUI method to be able\n // to run the loadModularUI action from a handler / callback in the component\n const handleFetch = (href: string | Href, fetchOptions: Object) => {\n dispatch(loadModularUI(modelKey, href, fetchOptions));\n };\n\n // Check if current model needs a reload\n const reload = location?.state?.reload ?? 0;\n const doReload = useReload(modelEntry, reload);\n useEffect(() => {\n if (doReload) {\n dispatch(\n loadModularUI(modelKey, url, { ...otherOptions, isReload: true })\n );\n }\n }, [dispatch, doReload, url, modelKey]);\n\n // Remove model when hoc unloads\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(modelKey));\n }\n };\n }, [dispatch, modelKey]);\n\n // Create new properties object to inject modularui properties to own props\n const locale = useLocale();\n const newProps: InjectedProps = {\n modelKey,\n [propName]: modelEntry ? modelEntry.model : null,\n location,\n status: modelEntry ? modelEntry.status : null,\n lastModification: modelEntry ? modelEntry.lastModification : null,\n hasModel: Boolean(modelEntry),\n locale,\n fetchModularUI: handleFetch,\n reloadModel: handleManualReload,\n };\n\n return <Component {...props} {...newProps} />;\n };\n\n WrappedComponent.displayName = `BI.modularui(${getDisplayName(\n WrappedComponent,\n name\n )}`;\n\n return WrappedComponent;\n };\n};\n\nexport default connector;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"connector.js","names":["useEffect","useDispatch","useLocation","loadModularUI","reloadModel","removeModelByKey","Href","getDisplayName","useUrl","useReload","useModularUI","useLocale","connector","name","resource","options","propName","removeOnUnmount","otherOptions","Component","WrappedComponent","props","dispatch","location","url","displayName","contextId","modelEntry","modelKey","model","connectKey","handleManualReload","reloadOptions","handleFetch","href","fetchOptions","reload","state","doReload","isReload","locale","newProps","status","lastModification","hasModel","Boolean","fetchModularUI"],"sources":["../../../src/redux/_modularui/connector.js"],"sourcesContent":["// @flow\nimport { useEffect } from \"react\";\nimport { useDispatch } from \"react-redux\";\nimport { useLocation } from \"react-router\";\n\nimport { loadModularUI, reloadModel, removeModelByKey } from \"./actions\";\n\nimport Href from \"../../models/href/Href\";\nimport { getDisplayName } from \"../../react/utils\";\n\nimport { useUrl, useReload } from \"./modularuiUtils\";\nimport { useModularUI } from \"../../hooks/useModularUI\";\nimport { useLocale } from \"../../hooks/useI18n\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Location } from \"react-router\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { ModularUIOptions } from \"./types\";\n\nexport type InjectedProps = {\n +modelKey: string,\n +location: Location,\n +status: string | null,\n +lastModification: number | null,\n +hasModel: boolean,\n +locale: string,\n +fetchModularUI: (href: string | Href, fetchOptions: Object) => void,\n +reloadModel: (model: ModularUIModel, options: Object) => void,\n +data?: ?ModularUIModel,\n};\n\n/**\n */\nconst connector = (\n name: string,\n resource: string | Function,\n options: ModularUIOptions = { propName: \"data\", removeOnUnmount: false }\n): ((Component: ComponentType<any>) => (props: any) => Node) => {\n const {\n propName = \"data\",\n removeOnUnmount = false,\n ...otherOptions\n } = options;\n\n return (Component: ComponentType<any>) => {\n const WrappedComponent = (props: any) => {\n const dispatch = useDispatch();\n const location = useLocation();\n\n const url = useUrl(resource, { location, ...props });\n const displayName = getDisplayName(Component, name, props.contextId);\n\n // Load the model through the useModUI hook\n const modelEntry = useModularUI(displayName, url, otherOptions);\n const modelKey = modelEntry?.model?.connectKey;\n\n // handle manual reload of model\n const handleManualReload = (\n model: ModularUIModel,\n reloadOptions?: Object\n ) => {\n dispatch(reloadModel(model, reloadOptions));\n };\n\n // Provide connected models with a fetchModularUI method to be able\n // to run the loadModularUI action from a handler / callback in the component\n const handleFetch = (href: string | Href, fetchOptions: Object) => {\n dispatch(loadModularUI(modelKey, href, fetchOptions));\n };\n\n // Check if current model needs a reload\n const reload = location?.state?.reload ?? 0;\n const doReload = useReload(modelEntry, reload);\n useEffect(() => {\n if (doReload) {\n dispatch(\n loadModularUI(modelKey, url, { ...otherOptions, isReload: true })\n );\n }\n }, [dispatch, doReload, url, modelKey]);\n\n // Remove model when hoc unloads\n useEffect(() => {\n return () => {\n if (removeOnUnmount) {\n dispatch(removeModelByKey(modelKey));\n }\n };\n }, [dispatch, modelKey]);\n\n // Create new properties object to inject modularui properties to own props\n const locale = useLocale();\n const newProps: InjectedProps = {\n modelKey,\n [propName]: modelEntry ? modelEntry.model : null,\n location,\n status: modelEntry ? modelEntry.status : null,\n lastModification: modelEntry ? modelEntry.lastModification : null,\n hasModel: Boolean(modelEntry),\n locale,\n fetchModularUI: handleFetch,\n reloadModel: handleManualReload,\n };\n\n return <Component {...props} {...newProps} />;\n };\n\n WrappedComponent.displayName = `BI.modularui(${getDisplayName(\n WrappedComponent,\n name\n )}`;\n\n return WrappedComponent;\n };\n};\n\nexport default connector;\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","modularui","withModularUI"],"sources":["../../../src/redux/_modularui/index.js"],"sourcesContent":["// @flow\nexport * from \"./middleware\";\nexport * from \"./reducer\";\nexport { default as modularui } from \"./connector\";\nexport { default as withModularUI } from \"./withModularUI\";\n\nexport * from \"./modularuiUtils\";\nexport * from \"./actions\";\nexport * from \"./selectors\";\n\nexport type * from \"./types\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","modularui","withModularUI"],"sources":["../../../src/redux/_modularui/index.js"],"sourcesContent":["// @flow\nexport * from \"./middleware\";\nexport * from \"./reducer\";\nexport { default as modularui } from \"./connector\";\nexport { default as withModularUI } from \"./withModularUI\";\n\nexport * from \"./modularuiUtils\";\nexport * from \"./actions\";\nexport * from \"./selectors\";\n\nexport type * from \"./types\";\n"],"mappings":"AACA,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,SAASA,OAAO,IAAIC,SAAS,QAAQ,aAAa;AAClD,SAASD,OAAO,IAAIE,aAAa,QAAQ,iBAAiB;AAE1D,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,aAAa"}
|
|
@@ -62,8 +62,8 @@ export const getKey = (WrappedComponent, name, url) => {
|
|
|
62
62
|
export const useReload = function (modelEntry) {
|
|
63
63
|
let reload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
64
64
|
if (reload > 0) {
|
|
65
|
-
const isFullyLoaded =
|
|
66
|
-
const lastModification =
|
|
65
|
+
const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;
|
|
66
|
+
const lastModification = modelEntry?.lastModification ?? 0;
|
|
67
67
|
if (isFullyLoaded && lastModification < reload) {
|
|
68
68
|
return true;
|
|
69
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modularuiUtils.js","names":["useState","getDisplayName","MODULARUI_STATUS","Href","getUrl","resource","props","url","toString","useUrl","previousUrl","setPreviousUrl","previousExact","setPreviousExact","match","isDifferentUrl","hasDifferentStartUriPart","isExact","getKey","WrappedComponent","name","split","useReload","modelEntry","reload","isFullyLoaded","status","FINISHED","lastModification"],"sources":["../../../src/redux/_modularui/modularuiUtils.js"],"sourcesContent":["// @flow\nimport { useState } from \"react\";\n\nimport { getDisplayName } from \"../../react/utils\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ComponentType } from \"react\";\n\n/**\n * Generate modular ui url\n */\nconst getUrl = (resource: string | Function, props: Object) => {\n const url = typeof resource === \"function\" ? resource(props) : resource;\n\n if (url instanceof Href) {\n return url.toString();\n }\n\n return url || \"\";\n};\n\n/**\n */\nexport const useUrl = (resource: string | Function, props: Object): string => {\n const [previousUrl, setPreviousUrl] = useState(\"\");\n const [previousExact, setPreviousExact] = useState(false);\n\n const url = getUrl(resource, props);\n\n const { match } = props;\n\n // when match is not available through props,\n // this is a direct call to the modular ui hoc, not using a route\n if (!match) {\n return url;\n }\n\n const isDifferentUrl = url !== previousUrl;\n if (!isDifferentUrl) {\n return previousUrl;\n }\n\n const hasDifferentStartUriPart =\n previousUrl !== \"\" && !previousUrl.startsWith(match.url);\n\n // Always create an url when the match is exact\n // Or when the match is not exact AND the original match also was not exact\n // Or when the new start uri is different from the previous url\n if (\n match.isExact === true ||\n previousExact === match.isExact ||\n hasDifferentStartUriPart\n ) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n\n return url;\n }\n\n return previousUrl;\n};\n\n/**\n * Create key for modularui request based on component name and requested url\n */\nexport const getKey = (\n WrappedComponent: ComponentType<any>,\n name: string,\n url: string\n): string => {\n if (url) {\n return `${getDisplayName(WrappedComponent, name)}(${url.split(\"?\")[0]})`;\n }\n\n return getDisplayName(WrappedComponent, name);\n};\n\n/**\n * Check if the model corresponding to a modular ui service should be reloaded\n */\nexport const useReload = (modelEntry: Object, reload: number = 0): boolean => {\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n\n return false;\n};\n"],"mappings":";AACA,SAASA,QAAQ,QAAQ,OAAO;AAEhC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,OAAOC,IAAI,MAAM,wBAAwB;AAIzC;AACA;AACA;AACA,MAAMC,MAAM,GAAG,CAACC,QAA2B,EAAEC,KAAa,KAAK;EAC7D,MAAMC,GAAG,GAAG,OAAOF,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACC,KAAK,CAAC,GAAGD,QAAQ;EAEvE,IAAIE,GAAG,YAAYJ,IAAI,EAAE;IACvB,OAAOI,GAAG,CAACC,QAAQ,EAAE;EACvB;EAEA,OAAOD,GAAG,IAAI,EAAE;AAClB,CAAC;;AAED;AACA;AACA,OAAO,MAAME,MAAM,GAAG,CAACJ,QAA2B,EAAEC,KAAa,KAAa;EAC5E,MAAM,CAACI,WAAW,EAAEC,cAAc,CAAC,GAAGX,QAAQ,CAAC,EAAE,CAAC;EAClD,MAAM,CAACY,aAAa,EAAEC,gBAAgB,CAAC,GAAGb,QAAQ,CAAC,KAAK,CAAC;EAEzD,MAAMO,GAAG,GAAGH,MAAM,CAACC,QAAQ,EAAEC,KAAK,CAAC;EAEnC,MAAM;IAAEQ;EAAM,CAAC,GAAGR,KAAK;;EAEvB;EACA;EACA,IAAI,CAACQ,KAAK,EAAE;IACV,OAAOP,GAAG;EACZ;EAEA,MAAMQ,cAAc,GAAGR,GAAG,KAAKG,WAAW;EAC1C,IAAI,CAACK,cAAc,EAAE;IACnB,OAAOL,WAAW;EACpB;EAEA,MAAMM,wBAAwB,GAC5BN,WAAW,KAAK,EAAE,IAAI,CAAC,4BAAAA,WAAW,OAAXA,WAAW,EAAYI,KAAK,CAACP,GAAG,CAAC;;EAE1D;EACA;EACA;EACA,IACEO,KAAK,CAACG,OAAO,KAAK,IAAI,IACtBL,aAAa,KAAKE,KAAK,CAACG,OAAO,IAC/BD,wBAAwB,EACxB;IACAL,cAAc,CAACJ,GAAG,CAAC;IACnBM,gBAAgB,CAACC,KAAK,CAACG,OAAO,CAAC;IAE/B,OAAOV,GAAG;EACZ;EAEA,OAAOG,WAAW;AACpB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMQ,MAAM,GAAG,CACpBC,gBAAoC,EACpCC,IAAY,EACZb,GAAW,KACA;EACX,IAAIA,GAAG,EAAE;IACP,OAAQ,GAAEN,cAAc,CAACkB,gBAAgB,EAAEC,IAAI,CAAE,IAAGb,GAAG,CAACc,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,GAAE;EAC1E;EAEA,OAAOpB,cAAc,CAACkB,gBAAgB,EAAEC,IAAI,CAAC;AAC/C,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,SAAS,GAAG,UAACC,UAAkB,EAAkC;EAAA,IAAhCC,MAAc,uEAAG,CAAC;EAC9D,IAAIA,MAAM,GAAG,CAAC,EAAE;IACd,MAAMC,aAAa,
|
|
1
|
+
{"version":3,"file":"modularuiUtils.js","names":["useState","getDisplayName","MODULARUI_STATUS","Href","getUrl","resource","props","url","toString","useUrl","previousUrl","setPreviousUrl","previousExact","setPreviousExact","match","isDifferentUrl","hasDifferentStartUriPart","isExact","getKey","WrappedComponent","name","split","useReload","modelEntry","reload","isFullyLoaded","status","FINISHED","lastModification"],"sources":["../../../src/redux/_modularui/modularuiUtils.js"],"sourcesContent":["// @flow\nimport { useState } from \"react\";\n\nimport { getDisplayName } from \"../../react/utils\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ComponentType } from \"react\";\n\n/**\n * Generate modular ui url\n */\nconst getUrl = (resource: string | Function, props: Object) => {\n const url = typeof resource === \"function\" ? resource(props) : resource;\n\n if (url instanceof Href) {\n return url.toString();\n }\n\n return url || \"\";\n};\n\n/**\n */\nexport const useUrl = (resource: string | Function, props: Object): string => {\n const [previousUrl, setPreviousUrl] = useState(\"\");\n const [previousExact, setPreviousExact] = useState(false);\n\n const url = getUrl(resource, props);\n\n const { match } = props;\n\n // when match is not available through props,\n // this is a direct call to the modular ui hoc, not using a route\n if (!match) {\n return url;\n }\n\n const isDifferentUrl = url !== previousUrl;\n if (!isDifferentUrl) {\n return previousUrl;\n }\n\n const hasDifferentStartUriPart =\n previousUrl !== \"\" && !previousUrl.startsWith(match.url);\n\n // Always create an url when the match is exact\n // Or when the match is not exact AND the original match also was not exact\n // Or when the new start uri is different from the previous url\n if (\n match.isExact === true ||\n previousExact === match.isExact ||\n hasDifferentStartUriPart\n ) {\n setPreviousUrl(url);\n setPreviousExact(match.isExact);\n\n return url;\n }\n\n return previousUrl;\n};\n\n/**\n * Create key for modularui request based on component name and requested url\n */\nexport const getKey = (\n WrappedComponent: ComponentType<any>,\n name: string,\n url: string\n): string => {\n if (url) {\n return `${getDisplayName(WrappedComponent, name)}(${url.split(\"?\")[0]})`;\n }\n\n return getDisplayName(WrappedComponent, name);\n};\n\n/**\n * Check if the model corresponding to a modular ui service should be reloaded\n */\nexport const useReload = (modelEntry: Object, reload: number = 0): boolean => {\n if (reload > 0) {\n const isFullyLoaded = modelEntry?.status === MODULARUI_STATUS.FINISHED;\n const lastModification = modelEntry?.lastModification ?? 0;\n\n if (isFullyLoaded && lastModification < reload) {\n return true;\n }\n }\n\n return false;\n};\n"],"mappings":";AACA,SAASA,QAAQ,QAAQ,OAAO;AAEhC,SAASC,cAAc,QAAQ,mBAAmB;AAClD,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,OAAOC,IAAI,MAAM,wBAAwB;AAIzC;AACA;AACA;AACA,MAAMC,MAAM,GAAG,CAACC,QAA2B,EAAEC,KAAa,KAAK;EAC7D,MAAMC,GAAG,GAAG,OAAOF,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACC,KAAK,CAAC,GAAGD,QAAQ;EAEvE,IAAIE,GAAG,YAAYJ,IAAI,EAAE;IACvB,OAAOI,GAAG,CAACC,QAAQ,EAAE;EACvB;EAEA,OAAOD,GAAG,IAAI,EAAE;AAClB,CAAC;;AAED;AACA;AACA,OAAO,MAAME,MAAM,GAAG,CAACJ,QAA2B,EAAEC,KAAa,KAAa;EAC5E,MAAM,CAACI,WAAW,EAAEC,cAAc,CAAC,GAAGX,QAAQ,CAAC,EAAE,CAAC;EAClD,MAAM,CAACY,aAAa,EAAEC,gBAAgB,CAAC,GAAGb,QAAQ,CAAC,KAAK,CAAC;EAEzD,MAAMO,GAAG,GAAGH,MAAM,CAACC,QAAQ,EAAEC,KAAK,CAAC;EAEnC,MAAM;IAAEQ;EAAM,CAAC,GAAGR,KAAK;;EAEvB;EACA;EACA,IAAI,CAACQ,KAAK,EAAE;IACV,OAAOP,GAAG;EACZ;EAEA,MAAMQ,cAAc,GAAGR,GAAG,KAAKG,WAAW;EAC1C,IAAI,CAACK,cAAc,EAAE;IACnB,OAAOL,WAAW;EACpB;EAEA,MAAMM,wBAAwB,GAC5BN,WAAW,KAAK,EAAE,IAAI,CAAC,4BAAAA,WAAW,OAAXA,WAAW,EAAYI,KAAK,CAACP,GAAG,CAAC;;EAE1D;EACA;EACA;EACA,IACEO,KAAK,CAACG,OAAO,KAAK,IAAI,IACtBL,aAAa,KAAKE,KAAK,CAACG,OAAO,IAC/BD,wBAAwB,EACxB;IACAL,cAAc,CAACJ,GAAG,CAAC;IACnBM,gBAAgB,CAACC,KAAK,CAACG,OAAO,CAAC;IAE/B,OAAOV,GAAG;EACZ;EAEA,OAAOG,WAAW;AACpB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMQ,MAAM,GAAG,CACpBC,gBAAoC,EACpCC,IAAY,EACZb,GAAW,KACA;EACX,IAAIA,GAAG,EAAE;IACP,OAAQ,GAAEN,cAAc,CAACkB,gBAAgB,EAAEC,IAAI,CAAE,IAAGb,GAAG,CAACc,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,GAAE;EAC1E;EAEA,OAAOpB,cAAc,CAACkB,gBAAgB,EAAEC,IAAI,CAAC;AAC/C,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAME,SAAS,GAAG,UAACC,UAAkB,EAAkC;EAAA,IAAhCC,MAAc,uEAAG,CAAC;EAC9D,IAAIA,MAAM,GAAG,CAAC,EAAE;IACd,MAAMC,aAAa,GAAGF,UAAU,EAAEG,MAAM,KAAKxB,gBAAgB,CAACyB,QAAQ;IACtE,MAAMC,gBAAgB,GAAGL,UAAU,EAAEK,gBAAgB,IAAI,CAAC;IAE1D,IAAIH,aAAa,IAAIG,gBAAgB,GAAGJ,MAAM,EAAE;MAC9C,OAAO,IAAI;IACb;EACF;EAEA,OAAO,KAAK;AACd,CAAC"}
|
|
@@ -52,8 +52,7 @@ const setModel = (state, _ref2) => {
|
|
|
52
52
|
const getModelKey = (state, model) => {
|
|
53
53
|
var _context;
|
|
54
54
|
return _findInstanceProperty(_context = _Object$keys(state)).call(_context, key => {
|
|
55
|
-
|
|
56
|
-
const connectKey = ((_state$key = state[key]) === null || _state$key === void 0 ? void 0 : (_state$key$model = _state$key.model) === null || _state$key$model === void 0 ? void 0 : _state$key$model.connectKey) ?? "";
|
|
55
|
+
const connectKey = state[key]?.model?.connectKey ?? "";
|
|
57
56
|
return connectKey === model.connectKey;
|
|
58
57
|
});
|
|
59
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reducer.js","names":["IllegalArgumentException","MODULARUI_STATUS","ApplicationModel","updateStatus","state","key","status","LOADING","lastModification","Date","now","setModel","model","getModelKey","connectKey","updateModel","modelKey","Error","removeKey","_","newState","resetModularUI","initialState","ModularUIReducer","action","type","payload"],"sources":["../../../src/redux/_modularui/reducer.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../../exceptions\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport { ApplicationModel } from \"../../models\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { ModularUIState } from \"./types\";\n\n/**\n */\nconst updateStatus = (state, { key, status }) => {\n // model should always be available when status is not loading\n if (status !== MODULARUI_STATUS.LOADING && !state[key]) {\n return state;\n }\n\n return {\n ...state,\n [key]: {\n ...state[key],\n status,\n lastModification: Date.now(),\n },\n };\n};\n\n/**\n */\nconst setModel = (state, { key, model }) => {\n if (!state[key]) {\n return state;\n }\n\n if (model) {\n return {\n ...state,\n [key]: {\n ...state[key],\n model,\n lastModification: Date.now(),\n },\n };\n }\n\n throw new IllegalArgumentException(\"No model for setModel\");\n};\n\n/**\n */\nconst getModelKey = (state, model) =>\n Object.keys(state).find((key) => {\n const connectKey = state[key]?.model?.connectKey ?? \"\";\n return connectKey === model.connectKey;\n });\n\n/**\n */\nconst updateModel = (state, model) => {\n const modelKey = getModelKey(state, model);\n\n if (modelKey) {\n return setModel(state, { key: modelKey, model });\n }\n\n throw new Error(\n `ModularUIReducer: Cannot update model with key ${model.connectKey}`\n );\n};\n\n/**\n */\nconst removeKey = (modelKey: string, state: ModularUIState): ModularUIState => {\n // eslint-disable-next-line no-unused-vars\n const { [modelKey]: _, ...newState } = state;\n\n return newState;\n};\n\n/**\n * Remove all but application models\n */\nconst resetModularUI = (state: ModularUIState) => {\n const newState = {};\n\n for (const key in state) {\n if (state[key].model instanceof ApplicationModel) {\n newState[key] = { ...state[key] };\n }\n }\n\n return newState;\n};\n\nconst initialState: ModularUIState = {};\n\n/**\n * Modular UI Reducer\n */\nexport const ModularUIReducer: Reducer<ModularUIState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"MODULARUI/RESET\":\n return resetModularUI(state);\n\n case \"MODULARUI/STATUS\":\n return updateStatus(state, action.payload);\n\n case \"MODULARUI/SET\":\n return setModel(state, action.payload);\n\n case \"MODULARUI/UPDATE\":\n return updateModel(state, action.payload);\n\n case \"MODULARUI/REMOVE_KEY\":\n return removeKey(action.payload, state);\n\n default:\n return state;\n }\n};\n"],"mappings":";;AACA,SAASA,wBAAwB,QAAQ,kBAAkB;AAC3D,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,gBAAgB,QAAQ,cAAc;AAM/C;AACA;AACA,MAAMC,YAAY,GAAG,CAACC,KAAK,WAAsB;EAAA,IAApB;IAAEC,GAAG;IAAEC;EAAO,CAAC;EAC1C;EACA,IAAIA,MAAM,KAAKL,gBAAgB,CAACM,OAAO,IAAI,CAACH,KAAK,CAACC,GAAG,CAAC,EAAE;IACtD,OAAOD,KAAK;EACd;EAEA,OAAO;IACL,GAAGA,KAAK;IACR,CAACC,GAAG,GAAG;MACL,GAAGD,KAAK,CAACC,GAAG,CAAC;MACbC,MAAM;MACNE,gBAAgB,EAAEC,IAAI,CAACC,GAAG;IAC5B;EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA,MAAMC,QAAQ,GAAG,CAACP,KAAK,YAAqB;EAAA,IAAnB;IAAEC,GAAG;IAAEO;EAAM,CAAC;EACrC,IAAI,CAACR,KAAK,CAACC,GAAG,CAAC,EAAE;IACf,OAAOD,KAAK;EACd;EAEA,IAAIQ,KAAK,EAAE;IACT,OAAO;MACL,GAAGR,KAAK;MACR,CAACC,GAAG,GAAG;QACL,GAAGD,KAAK,CAACC,GAAG,CAAC;QACbO,KAAK;QACLJ,gBAAgB,EAAEC,IAAI,CAACC,GAAG;MAC5B;IACF,CAAC;EACH;EAEA,MAAM,IAAIV,wBAAwB,CAAC,uBAAuB,CAAC;AAC7D,CAAC;;AAED;AACA;AACA,MAAMa,WAAW,GAAG,CAACT,KAAK,EAAEQ,KAAK;EAAA;EAAA,OAC/B,8CAAYR,KAAK,CAAC,iBAAOC,GAAG,IAAK;
|
|
1
|
+
{"version":3,"file":"reducer.js","names":["IllegalArgumentException","MODULARUI_STATUS","ApplicationModel","updateStatus","state","key","status","LOADING","lastModification","Date","now","setModel","model","getModelKey","connectKey","updateModel","modelKey","Error","removeKey","_","newState","resetModularUI","initialState","ModularUIReducer","action","type","payload"],"sources":["../../../src/redux/_modularui/reducer.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../../exceptions\";\nimport { MODULARUI_STATUS } from \"../../constants/Constants\";\nimport { ApplicationModel } from \"../../models\";\n\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { ModularUIState } from \"./types\";\n\n/**\n */\nconst updateStatus = (state, { key, status }) => {\n // model should always be available when status is not loading\n if (status !== MODULARUI_STATUS.LOADING && !state[key]) {\n return state;\n }\n\n return {\n ...state,\n [key]: {\n ...state[key],\n status,\n lastModification: Date.now(),\n },\n };\n};\n\n/**\n */\nconst setModel = (state, { key, model }) => {\n if (!state[key]) {\n return state;\n }\n\n if (model) {\n return {\n ...state,\n [key]: {\n ...state[key],\n model,\n lastModification: Date.now(),\n },\n };\n }\n\n throw new IllegalArgumentException(\"No model for setModel\");\n};\n\n/**\n */\nconst getModelKey = (state, model) =>\n Object.keys(state).find((key) => {\n const connectKey = state[key]?.model?.connectKey ?? \"\";\n return connectKey === model.connectKey;\n });\n\n/**\n */\nconst updateModel = (state, model) => {\n const modelKey = getModelKey(state, model);\n\n if (modelKey) {\n return setModel(state, { key: modelKey, model });\n }\n\n throw new Error(\n `ModularUIReducer: Cannot update model with key ${model.connectKey}`\n );\n};\n\n/**\n */\nconst removeKey = (modelKey: string, state: ModularUIState): ModularUIState => {\n // eslint-disable-next-line no-unused-vars\n const { [modelKey]: _, ...newState } = state;\n\n return newState;\n};\n\n/**\n * Remove all but application models\n */\nconst resetModularUI = (state: ModularUIState) => {\n const newState = {};\n\n for (const key in state) {\n if (state[key].model instanceof ApplicationModel) {\n newState[key] = { ...state[key] };\n }\n }\n\n return newState;\n};\n\nconst initialState: ModularUIState = {};\n\n/**\n * Modular UI Reducer\n */\nexport const ModularUIReducer: Reducer<ModularUIState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"MODULARUI/RESET\":\n return resetModularUI(state);\n\n case \"MODULARUI/STATUS\":\n return updateStatus(state, action.payload);\n\n case \"MODULARUI/SET\":\n return setModel(state, action.payload);\n\n case \"MODULARUI/UPDATE\":\n return updateModel(state, action.payload);\n\n case \"MODULARUI/REMOVE_KEY\":\n return removeKey(action.payload, state);\n\n default:\n return state;\n }\n};\n"],"mappings":"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"}
|
|
@@ -16,9 +16,8 @@ import FormModel from "../../models/form/FormModel";
|
|
|
16
16
|
/**
|
|
17
17
|
*/
|
|
18
18
|
export const getAllModelsByInstance = (state, instance) => {
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
const modularui = state === null || state === void 0 ? void 0 : state.modularui;
|
|
19
|
+
const locale = state?.i18n?.locale || "en";
|
|
20
|
+
const modularui = state?.modularui;
|
|
22
21
|
if (modularui) {
|
|
23
22
|
var _context, _context2;
|
|
24
23
|
return _mapInstanceProperty(_context = _filterInstanceProperty(_context2 = _Object$keys(modularui)).call(_context2, key => {
|
|
@@ -34,9 +33,8 @@ export const getAllModelsByInstance = (state, instance) => {
|
|
|
34
33
|
/**
|
|
35
34
|
*/
|
|
36
35
|
export const getFirstModelByInstance = (state, instance) => {
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
const modularui = state === null || state === void 0 ? void 0 : state.modularui;
|
|
36
|
+
const locale = state?.i18n?.locale || "en";
|
|
37
|
+
const modularui = state?.modularui;
|
|
40
38
|
if (modularui) {
|
|
41
39
|
var _context3;
|
|
42
40
|
const key = _findInstanceProperty(_context3 = _Object$keys(modularui)).call(_context3, key => {
|
|
@@ -60,10 +58,9 @@ export const getFirstModelByInstance = (state, instance) => {
|
|
|
60
58
|
/**
|
|
61
59
|
*/
|
|
62
60
|
export const getActiveModelByInstance = (state, instance) => {
|
|
63
|
-
var _state$i18n3;
|
|
64
61
|
const location = getLocation(state);
|
|
65
|
-
const locale =
|
|
66
|
-
const modularui = state
|
|
62
|
+
const locale = state?.i18n?.locale || "en";
|
|
63
|
+
const modularui = state?.modularui;
|
|
67
64
|
if (modularui) {
|
|
68
65
|
var _context4;
|
|
69
66
|
const key = _findInstanceProperty(_context4 = _Object$keys(modularui)).call(_context4, key => {
|
|
@@ -155,10 +152,7 @@ export const allKeysByHref = (state, href) => {
|
|
|
155
152
|
|
|
156
153
|
/**
|
|
157
154
|
*/
|
|
158
|
-
const getLocation = state =>
|
|
159
|
-
var _state$router;
|
|
160
|
-
return state === null || state === void 0 ? void 0 : (_state$router = state.router) === null || _state$router === void 0 ? void 0 : _state$router.location.pathname;
|
|
161
|
-
};
|
|
155
|
+
const getLocation = state => state?.router?.location.pathname;
|
|
162
156
|
|
|
163
157
|
/**
|
|
164
158
|
*/
|