@beinformed/ui 1.17.4 → 1.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/esm/builder/index.js.map +1 -1
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/Constants.js +4 -0
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/LayoutHintConfig.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js +25 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/constants/index.js.map +1 -1
- package/esm/exceptions/ConfigurationException.js.map +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/IllegalArgumentException.js.map +1 -1
- package/esm/exceptions/IllegalReturnException.js.map +1 -1
- package/esm/exceptions/IllegalStateException.js.map +1 -1
- package/esm/exceptions/JsonParseException.js.map +1 -1
- package/esm/exceptions/MissingPropertyException.js.map +1 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/NotAllowedUriException.js.map +1 -1
- package/esm/exceptions/NotFoundException.js.map +1 -1
- package/esm/exceptions/ServerRequestException.js.map +1 -1
- package/esm/exceptions/ThemePropertyException.js.map +1 -1
- package/esm/exceptions/TimeoutException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
- package/esm/exceptions/index.js.map +1 -1
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/useAllFormsOnModel.js.map +1 -1
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useContent.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useI18n.js.map +1 -1
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModels.js.map +1 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/hooks/useNotification.js.map +1 -1
- package/esm/hooks/usePreference.js.map +1 -1
- package/esm/hooks/useProgressIndicator.js.map +1 -1
- package/esm/hooks/useRouter.js.map +1 -1
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/index.js.map +1 -1
- package/esm/i18n/languages.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/esm/i18n/types.js.map +1 -1
- package/esm/i18n/withMessage.js.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
- package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
- package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
- package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/esm/models/base/BaseCollection.js.map +1 -1
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceCollection.js.map +1 -1
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
- package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/ContentTypeModel.js.map +1 -1
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/content/SubSectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorCollection.js.map +1 -1
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/error/ErrorResponse.js.map +1 -1
- package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/filters/FilterModel.js.map +1 -1
- package/esm/models/filters/RangeFilterModel.js.map +1 -1
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/href/ListHref.js.map +1 -1
- package/esm/models/index.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListHeaderModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js +2 -2
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/paging/PagesizeModel.js.map +1 -1
- package/esm/models/paging/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/parameter/Parameter.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/search/CaseSearchModel.js.map +1 -1
- package/esm/models/sorting/SortOptionModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserModel.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/models/user/UserServicesModel.js.map +1 -1
- package/esm/modularui/Authenticate.js +9 -9
- package/esm/modularui/Authenticate.js.map +1 -1
- package/esm/modularui/ModularUIError.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/ModularUIResponse.js.map +1 -1
- package/esm/modularui/index.js.map +1 -1
- package/esm/react/ErrorBoundary.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.js.map +1 -1
- package/esm/react/index.js.map +1 -1
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/Init.js.map +1 -1
- package/esm/react-client/client.js +3 -2
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/index.js.map +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/contextPath.js.map +1 -1
- package/esm/react-server/createSSRComplete.js.map +1 -1
- package/esm/react-server/htmlpage.js.map +1 -1
- package/esm/react-server/index.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverNoSSR.js.map +1 -1
- package/esm/react-server/serverSSR.js.map +1 -1
- package/esm/react-server/serverUtil.js +2 -1
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/ThemeProvider.js.map +1 -1
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/index.js.map +1 -1
- package/esm/react-theme/types.js.map +1 -1
- package/esm/react-theme/useTheme.js.map +1 -1
- package/esm/react-theme/utils/background.js.map +1 -1
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/actions.js.map +1 -1
- package/esm/redux/_i18n/index.js.map +1 -1
- package/esm/redux/_i18n/reducer.js.map +1 -1
- package/esm/redux/_i18n/types.js.map +1 -1
- package/esm/redux/_modularui/actions.js.map +1 -1
- package/esm/redux/_modularui/connector.js.map +1 -1
- package/esm/redux/_modularui/index.js.map +1 -1
- package/esm/redux/_modularui/middleware.js.map +1 -1
- package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
- package/esm/redux/_modularui/reducer.js.map +1 -1
- package/esm/redux/_modularui/selectors.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/actions.js.map +1 -1
- package/esm/redux/_router/connectors.js.map +1 -1
- package/esm/redux/_router/index.js.map +1 -1
- package/esm/redux/_router/middleware.js.map +1 -1
- package/esm/redux/_router/reducer.js.map +1 -1
- package/esm/redux/_router/types.js.map +1 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/Form.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Modals.js.map +1 -1
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js +32 -2
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/ProgressIndicator.js.map +1 -1
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/actions/index.js.map +1 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/Modal.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/Notification.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/Progress.js.map +1 -1
- package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/connectors/index.js.map +1 -1
- package/esm/redux/index.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js +5 -1
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/reducers/createReducer.js.map +1 -1
- package/esm/redux/reducers/index.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/redux/types.js.map +1 -1
- package/esm/utils/browser/Cache.js.map +1 -1
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/esm/utils/fetch/serverFetch.js.map +1 -1
- package/esm/utils/fetch/types.js.map +1 -1
- package/esm/utils/fetch/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/checkResource.js.map +1 -1
- package/esm/utils/helpers/createHash.js.map +1 -1
- package/esm/utils/helpers/createUUID.js.map +1 -1
- package/esm/utils/helpers/objects.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/helpers/text.js.map +1 -1
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/number/DecimalFormat.js.map +1 -1
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/builder/index.js.map +1 -1
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/Constants.js +9 -1
- package/lib/constants/Constants.js.flow +5 -0
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/LayoutHintConfig.js.map +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js +37 -1
- package/lib/constants/Settings.js.flow +25 -1
- package/lib/constants/Settings.js.map +1 -1
- package/lib/constants/index.js.map +1 -1
- package/lib/exceptions/ConfigurationException.js.map +1 -1
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/IllegalArgumentException.js.map +1 -1
- package/lib/exceptions/IllegalReturnException.js.map +1 -1
- package/lib/exceptions/IllegalStateException.js.map +1 -1
- package/lib/exceptions/JsonParseException.js.map +1 -1
- package/lib/exceptions/MissingPropertyException.js.map +1 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/NotAllowedUriException.js.map +1 -1
- package/lib/exceptions/NotFoundException.js.map +1 -1
- package/lib/exceptions/ServerRequestException.js.map +1 -1
- package/lib/exceptions/ThemePropertyException.js.map +1 -1
- package/lib/exceptions/TimeoutException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
- package/lib/exceptions/index.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModels.js.map +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js.map +1 -1
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/index.js.map +1 -1
- package/lib/i18n/languages.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/lib/i18n/types.js.map +1 -1
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
- package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
- package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceCollection.js.map +1 -1
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/ContentTypeModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/ErrorResponse.js.map +1 -1
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/FilterModel.js.map +1 -1
- package/lib/models/filters/RangeFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/ListHref.js.map +1 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListHeaderModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js +2 -2
- package/lib/models/list/ListModel.js.flow +1 -2
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListModel.spec.js.flow +13 -0
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagesizeModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/search/CaseSearchModel.js.map +1 -1
- package/lib/models/sorting/SortOptionModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/types.js.map +1 -1
- package/lib/models/user/UserModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js +10 -10
- package/lib/modularui/Authenticate.js.flow +11 -7
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/ModularUIError.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/modularui/index.js.map +1 -1
- package/lib/react/ErrorBoundary.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react/index.js.map +1 -1
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/Init.js.map +1 -1
- package/lib/react-client/client.js +2 -1
- package/lib/react-client/client.js.flow +5 -1
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.js.map +1 -1
- package/lib/react-client/index.js.map +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +18 -0
- package/lib/react-server/contextPath.js.map +1 -1
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/htmlpage.js.map +1 -1
- package/lib/react-server/index.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js +1 -0
- package/lib/react-server/serverUtil.js.flow +2 -0
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/index.js.map +1 -1
- package/lib/react-theme/types.js.map +1 -1
- package/lib/react-theme/useTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/actions.js.map +1 -1
- package/lib/redux/_i18n/index.js.map +1 -1
- package/lib/redux/_i18n/reducer.js.map +1 -1
- package/lib/redux/_i18n/types.js.map +1 -1
- package/lib/redux/_modularui/actions.js.map +1 -1
- package/lib/redux/_modularui/connector.js.map +1 -1
- package/lib/redux/_modularui/index.js.map +1 -1
- package/lib/redux/_modularui/middleware.js.map +1 -1
- package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
- package/lib/redux/_modularui/reducer.js.map +1 -1
- package/lib/redux/_modularui/selectors.js.map +1 -1
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/actions.js.map +1 -1
- package/lib/redux/_router/connectors.js.map +1 -1
- package/lib/redux/_router/index.js.map +1 -1
- package/lib/redux/_router/middleware.js.map +1 -1
- package/lib/redux/_router/reducer.js.map +1 -1
- package/lib/redux/_router/types.js.map +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Modals.js.map +1 -1
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js +41 -1
- package/lib/redux/actions/Preferences.js.flow +49 -2
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/SignOut.js.map +1 -1
- package/lib/redux/actions/__tests__/Preferences.spec.js.flow +11 -0
- package/lib/redux/actions/index.js.map +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/connectors/index.js.map +1 -1
- package/lib/redux/index.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js +5 -1
- package/lib/redux/reducers/PreferencesReducer.js.flow +8 -1
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/__tests__/PreferencesReducer.spec.js.flow +12 -0
- package/lib/redux/reducers/createReducer.js.map +1 -1
- package/lib/redux/reducers/index.js.map +1 -1
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/redux/types.js.flow +5 -0
- package/lib/redux/types.js.map +1 -1
- package/lib/utils/browser/Cache.js.map +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/serverFetch.js.map +1 -1
- package/lib/utils/fetch/types.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/createHash.js.map +1 -1
- package/lib/utils/helpers/createUUID.js.map +1 -1
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +16 -15
- package/src/constants/Constants.js +5 -0
- package/src/constants/Settings.js +25 -1
- package/src/models/list/ListModel.js +1 -2
- package/src/models/list/__tests__/ListModel.spec.js +13 -0
- package/src/models/list/__tests__/related-contributions.json +42 -0
- package/src/models/list/__tests__/related-data.json +32 -0
- package/src/modularui/Authenticate.js +11 -7
- package/src/react-client/client.js +5 -1
- package/src/react-server/__tests__/serverUtil.spec.js +18 -0
- package/src/react-server/serverUtil.js +2 -0
- package/src/redux/actions/Preferences.js +49 -2
- package/src/redux/actions/__tests__/Preferences.spec.js +11 -0
- package/src/redux/reducers/PreferencesReducer.js +8 -1
- package/src/redux/reducers/__tests__/PreferencesReducer.spec.js +12 -0
- package/src/redux/types.js +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modularui/ModularUIRequest.js"],"names":["ModularUIRequest","href","options","HTTP_METHODS","GET","IllegalArgumentException","_response","ModularUIResponse","Href","locale","parameters","targetModel","method","_contributionsHref","contributionsHref","_locale","_href","_method","_options","childmodels","_targetModel","Model","response","isApplicableModel","IllegalStateException","contributionsData","contributionsKey","error","handleContributionsError","key","contributions","errorMessage","properties","message","ModularUIError","path","toString","data","links","_links","Array","isArray","handleDataError","handleData","url","BASE","cache","params","getQuerystringForModularUI","onProgress","processApplicationLinks","processTabLinks","processPanelLinks","resolve","contributionLinks","dataLinks","tab","contributionTabLink","dataTabLinks","dataLink","name","processLinks","components","then","newLinks","replaceApplicationLinks","tabName","tabLink","component","panel","linksPerName","dataLinksPerName","hideWhenEmptyLinks","contributionLink","layouthint","HIDE_WHEN_EMPTY","isHiddenListChecks","push","isHiddenList","all","hiddenLinks","newDataLinks","dataLinkKey","_embedded","actions","isHidden","catch","_progressEvent","progressEvent","model","prevData","JSON","parse","FormModel","newData","validationData","isValidationRequest","currentFormObject","hasDynamicValidations","validationHref","setParameter","getDynamicValidationData","updateValidations","fetchDataService","Error","processDataService","fetchContributionsService","processContributionsService","processAsyncLayoutHints","createModel","loadDynamicValidations","withChildModels","fetchChildModels","fetch","childModelLinks","getInitialChildModelLinks","childModelRequests","childModelLink","request","isCacheable","fetchFromCache","allSettled","childModels","resolvedChildModels","forEach","childModel","status","reason","console","value","addChildModels","withChildSections","ContentModel","childSectionLinks","length","fetchContentChildSections","contentModel","newContentModel","clone","childSectionLink","contentHrefWithEntryDate","selfhref","addParameter","TIMEVERSION_FILTER_NAME","entryDate","fetchContent","sectionModels","childSections"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAMA;;AAEA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;;;;;;;;;;;AAKA;AACA;AACA;AACA;IACMA,gB;AAYJ;AACF;AACE,4BAAYC,IAAZ,EAA2E;AAAA;;AAAA,QAA1CC,OAA0C,uEAAJ,EAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mDANrCC,wBAAaC,GAMwB;AAAA;;AACzE,QAAI,CAACH,IAAL,EAAW;AACT,YAAM,IAAII,oCAAJ,CACJ,wDADI,CAAN;AAGD;;AAED,SAAKH,OAAL,GAAeA,OAAf;AAEA,SAAKI,SAAL,GAAiB,IAAIC,0BAAJ,EAAjB;AAEA,SAAKN,IAAL,GAAY,OAAOA,IAAP,KAAgB,QAAhB,GAA2B,IAAIO,aAAJ,CAASP,IAAT,CAA3B,GAA4CA,IA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ants/Constants\";\n\nimport { HIDE_WHEN_EMPTY } from \"../constants/LayoutHints\";\n\nimport { getSetting } from \"../constants/Settings\";\n\nimport Href from \"../models/href/Href\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport resolveModel from \"../models/resolveModel\";\nimport FormModel from \"../models/form/FormModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport ModularUIResponse from \"./ModularUIResponse\";\n\nimport ModularUIError from \"./ModularUIError\";\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport { isPlainObject } from \"../utils/helpers/objects\";\n\nimport type { RequestBaseOptions } from \"../utils/fetch/types\";\nimport type { ModularUIModel } from \"../models/types\";\n\n/**\n * Helper for fetching data and contributions from the Be Informed modular ui\n * and merge it into a target or resolvable model.\n */\nclass ModularUIRequest {\n _response: ModularUIResponse;\n\n _href: Href;\n _options: RequestBaseOptions;\n _targetModel: ?Class<ModularUIModel>;\n _contributionsHref: string;\n _locale: string;\n _method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;\n\n _progressEvent: ProgressEventHandler;\n\n /**\n */\n constructor(href: Href | string, options: $Shape<RequestBaseOptions> = {}) {\n if (!href) {\n throw new IllegalArgumentException(\n \"You must pass a href to the resource that is requested\"\n );\n }\n\n this.options = options;\n\n this._response = new ModularUIResponse();\n\n this.href = typeof href === \"string\" ? new Href(href) : href;\n this.locale = options.locale ?? \"en\";\n\n // copy request parameters to response, to be able to use them in the models\n // self links are missing the request parameters\n this._response.parameters = this.href.parameters;\n\n if (options.targetModel) {\n this.targetModel = options.targetModel;\n }\n\n if (options.method) {\n this.method = options.method;\n } else {\n this.method = this.href.method;\n }\n }\n\n /**\n */\n get contributionsHref(): string {\n return this._contributionsHref;\n }\n\n /**\n */\n set contributionsHref(contributionsHref: string) {\n this._contributionsHref = contributionsHref;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n this._response.locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n get response(): ModularUIResponse {\n return this._response;\n }\n\n /**\n */\n set href(href: Href) {\n this._href = href;\n }\n\n /**\n */\n get href(): Href {\n return this._href;\n }\n\n /**\n */\n set method(method: $Keys<typeof HTTP_METHODS>) {\n this._method = method;\n }\n\n /**\n */\n get method(): $Keys<typeof HTTP_METHODS> {\n return this._method;\n }\n\n /**\n */\n get options(): RequestBaseOptions {\n return {\n ...this._options,\n locale: this.locale,\n method: this.method,\n };\n }\n\n /**\n */\n set options(options: RequestBaseOptions) {\n this._options = options;\n }\n\n /**\n */\n get withChildModels(): boolean {\n return (\n !(\"childmodels\" in this.options) || this.options.childmodels === true\n );\n }\n\n /**\n */\n set targetModel(targetModel: ?Class<ModularUIModel>) {\n this._targetModel = targetModel;\n }\n\n /**\n */\n get targetModel(): ?Class<ModularUIModel> {\n return this._targetModel;\n }\n\n /**\n */\n createModel(): ModularUIModel {\n const Model = this.targetModel || resolveModel(this.response);\n\n // check for ResourceModel\n if (Model && Model.isApplicableModel) {\n return new Model(this.response);\n }\n\n throw new IllegalStateException(\n `No model available for data: ${JSON.stringify(this.response)}`\n );\n }\n\n /**\n */\n processContributionsService(contributionsData: Object) {\n if (!isPlainObject(contributionsData)) {\n throw new IllegalArgumentException(\n \"Missing contributions data or contributions is not JSON\"\n );\n }\n\n const [contributionsKey] = Object.keys(contributionsData);\n\n if (contributionsData.error && contributionsKey === \"error\") {\n this.handleContributionsError(contributionsData.error);\n }\n\n // The key of the data service is different from the contributions service for forms\n if (!(this.response.key in contributionsData)) {\n this.response.key = contributionsKey;\n }\n\n this.response.contributions = contributionsData[this.response.key];\n }\n\n /**\n */\n handleContributionsError(error: Object) {\n const errorMessage = error.properties?.message ?? \"Error in contribution\";\n throw new ModularUIError(errorMessage, error, this.contributionsHref);\n }\n\n /**\n */\n handleDataError(error: Object) {\n if (error.properties) {\n const errorMessage = error.properties?.message ?? \"Error in data\";\n throw new ModularUIError(errorMessage, error, this.href.path.toString());\n }\n\n throw new IllegalArgumentException(error);\n }\n\n /**\n */\n handleData(key: string, data: Object) {\n this.response.key = key;\n this.response.data = data;\n\n const links = data._links;\n\n if (links && links.contributions) {\n this.contributionsHref = links.contributions.href;\n } else if (Array.isArray(links) && links[0].contributions) {\n this.contributionsHref = links[0].contributions.href;\n } else {\n throw new IllegalArgumentException(\n `Contributions link not found for data with key ${key}`\n );\n }\n }\n\n /**\n */\n processDataService(data: Object) {\n if (!isPlainObject(data)) {\n throw new IllegalArgumentException(\"Missing data or data is not JSON\");\n }\n\n if (data.error) {\n this.handleDataError(data.error);\n } else {\n const [key] = Object.keys(data);\n this.handleData(key, data[key]);\n }\n }\n\n /**\n */\n fetchContributionsService(): Promise<any> {\n if (!this.contributionsHref) {\n throw new IllegalStateException(\"Missing a contributions href\");\n }\n\n return universalFetch({\n url: `${BASE}${this.contributionsHref}`,\n cache: true,\n locale: this.options.locale,\n });\n }\n\n /**\n */\n fetchDataService(): Promise<any> {\n return universalFetch({\n ...this.options,\n url: `${BASE}${this.href.path}`,\n params: this.href.getQuerystringForModularUI(),\n locale: this.options.locale,\n onProgress: this.onProgress,\n });\n }\n\n /**\n * Check if links contain a 'hide-when-empty' layout hint and remove the link from\n * the component when it exists and no results are available\n */\n async processAsyncLayoutHints(): Promise<void> {\n if (getSetting(\"ALLOW_HIDE_WHEN_EMPTY_ON_TABS\")) {\n await this.processApplicationLinks();\n await this.processTabLinks();\n }\n await this.processPanelLinks();\n\n return Promise.resolve();\n }\n\n /**\n * hide application links<br>\n * _links on application data contains an extra level of tab links\n */\n processApplicationLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n const dataLinks = this.response.data._links;\n if (!contributionLinks || !dataLinks) {\n return Promise.resolve();\n }\n\n if (\"tab\" in contributionLinks && \"tab\" in dataLinks) {\n for (const contributionTabLink of contributionLinks.tab) {\n if (\"components\" in contributionTabLink) {\n const dataTabLinks = dataLinks.tab.find(\n (dataLink) => dataLink.name === contributionTabLink.name\n );\n\n if (dataTabLinks && \"components\" in dataTabLinks) {\n return this.processLinks(\n dataTabLinks.components,\n contributionTabLink.components\n ).then((newLinks) =>\n this.replaceApplicationLinks(contributionTabLink.name, newLinks)\n );\n }\n }\n }\n }\n\n return Promise.resolve();\n }\n\n /**\n * Replace hidden link in application link tree\n */\n replaceApplicationLinks(tabName: string, newLinks: Array<Object>): void {\n this.response.data._links.tab = this.response.data._links.tab.map(\n (tabLink) => {\n const key = tabLink.name;\n if (tabName === key) {\n tabLink.components = newLinks;\n }\n return tabLink;\n }\n );\n }\n\n /**\n */\n processTabLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"component\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links.component,\n contributionLinks.component\n ).then((newLinks) => {\n this.response.data._links.component = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n */\n processPanelLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"panel\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links,\n contributionLinks.panel\n ).then((newLinks) => {\n this.response.data._links = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n * Retrieve an object of key: link\n */\n dataLinksPerName(dataLinks: any): { [linkName: string]: any } {\n if (Array.isArray(dataLinks)) {\n const links = {};\n for (const dataLink of dataLinks) {\n links[dataLink.name] = dataLink;\n }\n return links;\n }\n return dataLinks;\n }\n\n /**\n * Check if links are empty and hide them when hide-when-empty hint exists\n */\n processLinks(\n dataLinks: any,\n contributionLinks: any\n ): Promise<Object | Array<Object>> {\n const linksPerName = this.dataLinksPerName(dataLinks);\n const hideWhenEmptyLinks = contributionLinks.filter((contributionLink) =>\n contributionLink.layouthint?.includes(HIDE_WHEN_EMPTY)\n );\n\n const isHiddenListChecks = [];\n\n for (const contributionLink of hideWhenEmptyLinks) {\n const dataLink = linksPerName[contributionLink.name];\n if (dataLink?.href) {\n isHiddenListChecks.push(\n this.isHiddenList(contributionLink.name, dataLink.href)\n );\n }\n }\n\n return Promise.all(isHiddenListChecks).then(\n (hiddenLinks: Array<string>) => {\n if (Array.isArray(dataLinks)) {\n return dataLinks.filter(\n (dataLink) => !hiddenLinks.includes(dataLink.name)\n );\n }\n\n const newDataLinks = {};\n for (const dataLinkKey in dataLinks) {\n if (!hiddenLinks.includes(dataLinkKey)) {\n newDataLinks[dataLinkKey] = dataLinks[dataLinkKey];\n }\n }\n return newDataLinks;\n }\n );\n }\n\n /**\n */\n isHiddenList(name: string, href: string): Promise<string> {\n return universalFetch({\n ...this.options,\n url: `${BASE}${href}`,\n })\n .then((response: Object) => {\n if (isPlainObject(response)) {\n const [key] = Object.keys(response);\n const { _embedded, actions } = response[key];\n\n const isHidden = _embedded == null && actions == null;\n if (isHidden) {\n return name;\n }\n }\n return \"\";\n })\n .catch(() => {\n return \"\";\n });\n }\n\n /**\n */\n set onProgress(progressEvent: ProgressEventHandler) {\n this._progressEvent = progressEvent;\n }\n\n /**\n */\n get onProgress(): ProgressEventHandler {\n return this._progressEvent || null;\n }\n\n /**\n * Combine previous send request data with new validation data to create a complete request object\n * The received model is new FormModel containing ONLY the current question, not the previously entered questions\n * to create a complete request we append the originally send form objects\n */\n getDynamicValidationData(model: ModularUIModel): string {\n const prevData =\n typeof this.options.data === \"string\"\n ? JSON.parse(this.options.data)\n : this.options.data;\n\n if (model instanceof FormModel) {\n const newData = JSON.parse(model.validationData);\n // $FlowFixMe incompatible-call\n return JSON.stringify(deepmerge(prevData || {}, newData));\n }\n\n return JSON.stringify(prevData) ?? \"{}\";\n }\n\n /**\n * First load of dynamic values when a form is loaded\n */\n loadDynamicValidations(model: ModularUIModel): Promise<ModularUIModel> {\n if (\n !this.options.isValidationRequest &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\") &&\n model instanceof FormModel &&\n model.currentFormObject &&\n model.currentFormObject.hasDynamicValidations\n ) {\n const validationHref = this.href.setParameter(\"commit\", \"false\");\n return universalFetch({\n ...this.options,\n url: `${BASE}${this.href.path}`,\n params: validationHref.getQuerystringForModularUI(),\n childmodels: false,\n data: this.getDynamicValidationData(model),\n }).then((data) => {\n if (data == null || typeof data !== \"object\") {\n return model;\n }\n\n const [key] = Object.keys(data);\n return model.updateValidations(data[key]);\n });\n }\n\n return Promise.resolve(model);\n }\n\n /**\n */\n fetch(): Promise<ModularUIModel> {\n return this.fetchDataService()\n .then((data) => {\n if (data == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(data);\n return this.fetchContributionsService();\n })\n .then((contributionsData) => {\n if (contributionsData == null) {\n throw new Error(\n `No contributions data received for ${this.contributionsHref}`\n );\n }\n\n this.processContributionsService(contributionsData);\n return this.processAsyncLayoutHints();\n })\n .then(() => Promise.resolve(this.createModel()))\n .then((model) => this.loadDynamicValidations(model))\n .then((model) => {\n if (this.withChildModels) {\n return this.fetchChildModels(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n */\n fetchFromCache(): Promise<ModularUIModel> {\n this.options = {\n ...this.options,\n cache: true,\n };\n\n return this.fetch();\n }\n\n /**\n */\n fetchChildModels(model: ModularUIModel): Promise<ModularUIModel> {\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModelRequests = childModelLinks.map((childModelLink) => {\n const request = new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n });\n\n if (childModelLink.targetModel) {\n request.targetModel = childModelLink.targetModel;\n }\n\n if (childModelLink.isCacheable) {\n return request.fetchFromCache();\n }\n\n return request.fetch();\n });\n\n return Promise.allSettled(childModelRequests).then((childModels) => {\n const resolvedChildModels = [];\n\n childModels.forEach((childModel) => {\n if (childModel.status === \"rejected\") {\n const { reason } = childModel;\n if (reason.name !== \"Error.ChangePasswordRequired\") {\n console.error(\n \"Unexpected error when retrieving child model:\",\n reason\n );\n }\n } else {\n resolvedChildModels.push(childModel.value);\n }\n });\n\n model.addChildModels(resolvedChildModels);\n\n return model;\n });\n }\n\n /**\n */\n fetchContent(withChildSections: boolean): Promise<mixed> {\n return this.fetchFromCache().then((model) => {\n if (\n withChildSections &&\n model instanceof ContentModel &&\n model.childSectionLinks.length > 0\n ) {\n return this.fetchContentChildSections(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n * Recursively return child sections defined on the content model\n */\n fetchContentChildSections(contentModel: ContentModel): Promise<mixed> {\n const newContentModel = contentModel.clone();\n\n return Promise.all(\n contentModel.childSectionLinks.map((childSectionLink) => {\n const contentHrefWithEntryDate = childSectionLink.selfhref.addParameter(\n TIMEVERSION_FILTER_NAME,\n contentModel.entryDate\n );\n\n const request = new ModularUIRequest(contentHrefWithEntryDate, {\n locale: this.locale,\n });\n\n return request.fetchContent(true);\n })\n ).then((sectionModels) => {\n newContentModel.childSections = sectionModels;\n\n return newContentModel;\n });\n }\n}\n\nexport default ModularUIRequest;\n"],"file":"ModularUIRequest.js"}
|
|
1
|
+
{"version":3,"file":"ModularUIRequest.js","names":["ModularUIRequest","href","options","HTTP_METHODS","GET","IllegalArgumentException","_response","ModularUIResponse","Href","locale","parameters","targetModel","method","_contributionsHref","contributionsHref","_locale","_href","_method","_options","childmodels","_targetModel","Model","response","isApplicableModel","IllegalStateException","contributionsData","contributionsKey","error","handleContributionsError","key","contributions","errorMessage","properties","message","ModularUIError","path","toString","data","links","_links","Array","isArray","handleDataError","handleData","url","BASE","cache","params","getQuerystringForModularUI","onProgress","processApplicationLinks","processTabLinks","processPanelLinks","resolve","contributionLinks","dataLinks","tab","contributionTabLink","dataTabLinks","dataLink","name","processLinks","components","then","newLinks","replaceApplicationLinks","tabName","tabLink","component","panel","linksPerName","dataLinksPerName","hideWhenEmptyLinks","contributionLink","layouthint","HIDE_WHEN_EMPTY","isHiddenListChecks","push","isHiddenList","all","hiddenLinks","newDataLinks","dataLinkKey","_embedded","actions","isHidden","catch","_progressEvent","progressEvent","model","prevData","JSON","parse","FormModel","newData","validationData","isValidationRequest","currentFormObject","hasDynamicValidations","validationHref","setParameter","getDynamicValidationData","updateValidations","fetchDataService","Error","processDataService","fetchContributionsService","processContributionsService","processAsyncLayoutHints","createModel","loadDynamicValidations","withChildModels","fetchChildModels","fetch","childModelLinks","getInitialChildModelLinks","childModelRequests","childModelLink","request","isCacheable","fetchFromCache","allSettled","childModels","resolvedChildModels","forEach","childModel","status","reason","console","value","addChildModels","withChildSections","ContentModel","childSectionLinks","length","fetchContentChildSections","contentModel","newContentModel","clone","childSectionLink","contentHrefWithEntryDate","selfhref","addParameter","TIMEVERSION_FILTER_NAME","entryDate","fetchContent","sectionModels","childSections"],"sources":["../../src/modularui/ModularUIRequest.js"],"sourcesContent":["// @flow\nimport deepmerge from \"deepmerge\";\n\nimport {\n BASE,\n HTTP_METHODS,\n TIMEVERSION_FILTER_NAME,\n} from \"../constants/Constants\";\n\nimport { HIDE_WHEN_EMPTY } from \"../constants/LayoutHints\";\n\nimport { getSetting } from \"../constants/Settings\";\n\nimport Href from \"../models/href/Href\";\n\nimport universalFetch from \"../utils/fetch/universalFetch\";\nimport resolveModel from \"../models/resolveModel\";\nimport FormModel from \"../models/form/FormModel\";\nimport ContentModel from \"../models/content/ContentModel\";\n\nimport ModularUIResponse from \"./ModularUIResponse\";\n\nimport ModularUIError from \"./ModularUIError\";\nimport { IllegalArgumentException, IllegalStateException } from \"../exceptions\";\n\nimport { isPlainObject } from \"../utils/helpers/objects\";\n\nimport type { RequestBaseOptions } from \"../utils/fetch/types\";\nimport type { ModularUIModel } from \"../models/types\";\n\n/**\n * Helper for fetching data and contributions from the Be Informed modular ui\n * and merge it into a target or resolvable model.\n */\nclass ModularUIRequest {\n _response: ModularUIResponse;\n\n _href: Href;\n _options: RequestBaseOptions;\n _targetModel: ?Class<ModularUIModel>;\n _contributionsHref: string;\n _locale: string;\n _method: $Keys<typeof HTTP_METHODS> = HTTP_METHODS.GET;\n\n _progressEvent: ProgressEventHandler;\n\n /**\n */\n constructor(href: Href | string, options: $Shape<RequestBaseOptions> = {}) {\n if (!href) {\n throw new IllegalArgumentException(\n \"You must pass a href to the resource that is requested\"\n );\n }\n\n this.options = options;\n\n this._response = new ModularUIResponse();\n\n this.href = typeof href === \"string\" ? new Href(href) : href;\n this.locale = options.locale ?? \"en\";\n\n // copy request parameters to response, to be able to use them in the models\n // self links are missing the request parameters\n this._response.parameters = this.href.parameters;\n\n if (options.targetModel) {\n this.targetModel = options.targetModel;\n }\n\n if (options.method) {\n this.method = options.method;\n } else {\n this.method = this.href.method;\n }\n }\n\n /**\n */\n get contributionsHref(): string {\n return this._contributionsHref;\n }\n\n /**\n */\n set contributionsHref(contributionsHref: string) {\n this._contributionsHref = contributionsHref;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n this._response.locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n get response(): ModularUIResponse {\n return this._response;\n }\n\n /**\n */\n set href(href: Href) {\n this._href = href;\n }\n\n /**\n */\n get href(): Href {\n return this._href;\n }\n\n /**\n */\n set method(method: $Keys<typeof HTTP_METHODS>) {\n this._method = method;\n }\n\n /**\n */\n get method(): $Keys<typeof HTTP_METHODS> {\n return this._method;\n }\n\n /**\n */\n get options(): RequestBaseOptions {\n return {\n ...this._options,\n locale: this.locale,\n method: this.method,\n };\n }\n\n /**\n */\n set options(options: RequestBaseOptions) {\n this._options = options;\n }\n\n /**\n */\n get withChildModels(): boolean {\n return (\n !(\"childmodels\" in this.options) || this.options.childmodels === true\n );\n }\n\n /**\n */\n set targetModel(targetModel: ?Class<ModularUIModel>) {\n this._targetModel = targetModel;\n }\n\n /**\n */\n get targetModel(): ?Class<ModularUIModel> {\n return this._targetModel;\n }\n\n /**\n */\n createModel(): ModularUIModel {\n const Model = this.targetModel || resolveModel(this.response);\n\n // check for ResourceModel\n if (Model && Model.isApplicableModel) {\n return new Model(this.response);\n }\n\n throw new IllegalStateException(\n `No model available for data: ${JSON.stringify(this.response)}`\n );\n }\n\n /**\n */\n processContributionsService(contributionsData: Object) {\n if (!isPlainObject(contributionsData)) {\n throw new IllegalArgumentException(\n \"Missing contributions data or contributions is not JSON\"\n );\n }\n\n const [contributionsKey] = Object.keys(contributionsData);\n\n if (contributionsData.error && contributionsKey === \"error\") {\n this.handleContributionsError(contributionsData.error);\n }\n\n // The key of the data service is different from the contributions service for forms\n if (!(this.response.key in contributionsData)) {\n this.response.key = contributionsKey;\n }\n\n this.response.contributions = contributionsData[this.response.key];\n }\n\n /**\n */\n handleContributionsError(error: Object) {\n const errorMessage = error.properties?.message ?? \"Error in contribution\";\n throw new ModularUIError(errorMessage, error, this.contributionsHref);\n }\n\n /**\n */\n handleDataError(error: Object) {\n if (error.properties) {\n const errorMessage = error.properties?.message ?? \"Error in data\";\n throw new ModularUIError(errorMessage, error, this.href.path.toString());\n }\n\n throw new IllegalArgumentException(error);\n }\n\n /**\n */\n handleData(key: string, data: Object) {\n this.response.key = key;\n this.response.data = data;\n\n const links = data._links;\n\n if (links && links.contributions) {\n this.contributionsHref = links.contributions.href;\n } else if (Array.isArray(links) && links[0].contributions) {\n this.contributionsHref = links[0].contributions.href;\n } else {\n throw new IllegalArgumentException(\n `Contributions link not found for data with key ${key}`\n );\n }\n }\n\n /**\n */\n processDataService(data: Object) {\n if (!isPlainObject(data)) {\n throw new IllegalArgumentException(\"Missing data or data is not JSON\");\n }\n\n if (data.error) {\n this.handleDataError(data.error);\n } else {\n const [key] = Object.keys(data);\n this.handleData(key, data[key]);\n }\n }\n\n /**\n */\n fetchContributionsService(): Promise<any> {\n if (!this.contributionsHref) {\n throw new IllegalStateException(\"Missing a contributions href\");\n }\n\n return universalFetch({\n url: `${BASE}${this.contributionsHref}`,\n cache: true,\n locale: this.options.locale,\n });\n }\n\n /**\n */\n fetchDataService(): Promise<any> {\n return universalFetch({\n ...this.options,\n url: `${BASE}${this.href.path}`,\n params: this.href.getQuerystringForModularUI(),\n locale: this.options.locale,\n onProgress: this.onProgress,\n });\n }\n\n /**\n * Check if links contain a 'hide-when-empty' layout hint and remove the link from\n * the component when it exists and no results are available\n */\n async processAsyncLayoutHints(): Promise<void> {\n if (getSetting(\"ALLOW_HIDE_WHEN_EMPTY_ON_TABS\")) {\n await this.processApplicationLinks();\n await this.processTabLinks();\n }\n await this.processPanelLinks();\n\n return Promise.resolve();\n }\n\n /**\n * hide application links<br>\n * _links on application data contains an extra level of tab links\n */\n processApplicationLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n const dataLinks = this.response.data._links;\n if (!contributionLinks || !dataLinks) {\n return Promise.resolve();\n }\n\n if (\"tab\" in contributionLinks && \"tab\" in dataLinks) {\n for (const contributionTabLink of contributionLinks.tab) {\n if (\"components\" in contributionTabLink) {\n const dataTabLinks = dataLinks.tab.find(\n (dataLink) => dataLink.name === contributionTabLink.name\n );\n\n if (dataTabLinks && \"components\" in dataTabLinks) {\n return this.processLinks(\n dataTabLinks.components,\n contributionTabLink.components\n ).then((newLinks) =>\n this.replaceApplicationLinks(contributionTabLink.name, newLinks)\n );\n }\n }\n }\n }\n\n return Promise.resolve();\n }\n\n /**\n * Replace hidden link in application link tree\n */\n replaceApplicationLinks(tabName: string, newLinks: Array<Object>): void {\n this.response.data._links.tab = this.response.data._links.tab.map(\n (tabLink) => {\n const key = tabLink.name;\n if (tabName === key) {\n tabLink.components = newLinks;\n }\n return tabLink;\n }\n );\n }\n\n /**\n */\n processTabLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"component\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links.component,\n contributionLinks.component\n ).then((newLinks) => {\n this.response.data._links.component = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n */\n processPanelLinks(): Promise<void> {\n const contributionLinks = this.response.contributions._links;\n\n if (!contributionLinks) {\n return Promise.resolve();\n }\n\n if (\"panel\" in contributionLinks) {\n return this.processLinks(\n this.response.data._links,\n contributionLinks.panel\n ).then((newLinks) => {\n this.response.data._links = newLinks;\n });\n }\n\n return Promise.resolve();\n }\n\n /**\n * Retrieve an object of key: link\n */\n dataLinksPerName(dataLinks: any): { [linkName: string]: any } {\n if (Array.isArray(dataLinks)) {\n const links = {};\n for (const dataLink of dataLinks) {\n links[dataLink.name] = dataLink;\n }\n return links;\n }\n return dataLinks;\n }\n\n /**\n * Check if links are empty and hide them when hide-when-empty hint exists\n */\n processLinks(\n dataLinks: any,\n contributionLinks: any\n ): Promise<Object | Array<Object>> {\n const linksPerName = this.dataLinksPerName(dataLinks);\n const hideWhenEmptyLinks = contributionLinks.filter((contributionLink) =>\n contributionLink.layouthint?.includes(HIDE_WHEN_EMPTY)\n );\n\n const isHiddenListChecks = [];\n\n for (const contributionLink of hideWhenEmptyLinks) {\n const dataLink = linksPerName[contributionLink.name];\n if (dataLink?.href) {\n isHiddenListChecks.push(\n this.isHiddenList(contributionLink.name, dataLink.href)\n );\n }\n }\n\n return Promise.all(isHiddenListChecks).then(\n (hiddenLinks: Array<string>) => {\n if (Array.isArray(dataLinks)) {\n return dataLinks.filter(\n (dataLink) => !hiddenLinks.includes(dataLink.name)\n );\n }\n\n const newDataLinks = {};\n for (const dataLinkKey in dataLinks) {\n if (!hiddenLinks.includes(dataLinkKey)) {\n newDataLinks[dataLinkKey] = dataLinks[dataLinkKey];\n }\n }\n return newDataLinks;\n }\n );\n }\n\n /**\n */\n isHiddenList(name: string, href: string): Promise<string> {\n return universalFetch({\n ...this.options,\n url: `${BASE}${href}`,\n })\n .then((response: Object) => {\n if (isPlainObject(response)) {\n const [key] = Object.keys(response);\n const { _embedded, actions } = response[key];\n\n const isHidden = _embedded == null && actions == null;\n if (isHidden) {\n return name;\n }\n }\n return \"\";\n })\n .catch(() => {\n return \"\";\n });\n }\n\n /**\n */\n set onProgress(progressEvent: ProgressEventHandler) {\n this._progressEvent = progressEvent;\n }\n\n /**\n */\n get onProgress(): ProgressEventHandler {\n return this._progressEvent || null;\n }\n\n /**\n * Combine previous send request data with new validation data to create a complete request object\n * The received model is new FormModel containing ONLY the current question, not the previously entered questions\n * to create a complete request we append the originally send form objects\n */\n getDynamicValidationData(model: ModularUIModel): string {\n const prevData =\n typeof this.options.data === \"string\"\n ? JSON.parse(this.options.data)\n : this.options.data;\n\n if (model instanceof FormModel) {\n const newData = JSON.parse(model.validationData);\n // $FlowFixMe incompatible-call\n return JSON.stringify(deepmerge(prevData || {}, newData));\n }\n\n return JSON.stringify(prevData) ?? \"{}\";\n }\n\n /**\n * First load of dynamic values when a form is loaded\n */\n loadDynamicValidations(model: ModularUIModel): Promise<ModularUIModel> {\n if (\n !this.options.isValidationRequest &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\") &&\n model instanceof FormModel &&\n model.currentFormObject &&\n model.currentFormObject.hasDynamicValidations\n ) {\n const validationHref = this.href.setParameter(\"commit\", \"false\");\n return universalFetch({\n ...this.options,\n url: `${BASE}${this.href.path}`,\n params: validationHref.getQuerystringForModularUI(),\n childmodels: false,\n data: this.getDynamicValidationData(model),\n }).then((data) => {\n if (data == null || typeof data !== \"object\") {\n return model;\n }\n\n const [key] = Object.keys(data);\n return model.updateValidations(data[key]);\n });\n }\n\n return Promise.resolve(model);\n }\n\n /**\n */\n fetch(): Promise<ModularUIModel> {\n return this.fetchDataService()\n .then((data) => {\n if (data == null) {\n throw new Error(`No data received for ${this.href.toString()}`);\n }\n\n this.processDataService(data);\n return this.fetchContributionsService();\n })\n .then((contributionsData) => {\n if (contributionsData == null) {\n throw new Error(\n `No contributions data received for ${this.contributionsHref}`\n );\n }\n\n this.processContributionsService(contributionsData);\n return this.processAsyncLayoutHints();\n })\n .then(() => Promise.resolve(this.createModel()))\n .then((model) => this.loadDynamicValidations(model))\n .then((model) => {\n if (this.withChildModels) {\n return this.fetchChildModels(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n */\n fetchFromCache(): Promise<ModularUIModel> {\n this.options = {\n ...this.options,\n cache: true,\n };\n\n return this.fetch();\n }\n\n /**\n */\n fetchChildModels(model: ModularUIModel): Promise<ModularUIModel> {\n const childModelLinks = model.getInitialChildModelLinks();\n\n const childModelRequests = childModelLinks.map((childModelLink) => {\n const request = new ModularUIRequest(childModelLink.href, {\n locale: this.locale,\n });\n\n if (childModelLink.targetModel) {\n request.targetModel = childModelLink.targetModel;\n }\n\n if (childModelLink.isCacheable) {\n return request.fetchFromCache();\n }\n\n return request.fetch();\n });\n\n return Promise.allSettled(childModelRequests).then((childModels) => {\n const resolvedChildModels = [];\n\n childModels.forEach((childModel) => {\n if (childModel.status === \"rejected\") {\n const { reason } = childModel;\n if (reason.name !== \"Error.ChangePasswordRequired\") {\n console.error(\n \"Unexpected error when retrieving child model:\",\n reason\n );\n }\n } else {\n resolvedChildModels.push(childModel.value);\n }\n });\n\n model.addChildModels(resolvedChildModels);\n\n return model;\n });\n }\n\n /**\n */\n fetchContent(withChildSections: boolean): Promise<mixed> {\n return this.fetchFromCache().then((model) => {\n if (\n withChildSections &&\n model instanceof ContentModel &&\n model.childSectionLinks.length > 0\n ) {\n return this.fetchContentChildSections(model);\n }\n\n return Promise.resolve(model);\n });\n }\n\n /**\n * Recursively return child sections defined on the content model\n */\n fetchContentChildSections(contentModel: ContentModel): Promise<mixed> {\n const newContentModel = contentModel.clone();\n\n return Promise.all(\n contentModel.childSectionLinks.map((childSectionLink) => {\n const contentHrefWithEntryDate = childSectionLink.selfhref.addParameter(\n TIMEVERSION_FILTER_NAME,\n contentModel.entryDate\n );\n\n const request = new ModularUIRequest(contentHrefWithEntryDate, {\n locale: this.locale,\n });\n\n return request.fetchContent(true);\n })\n ).then((sectionModels) => {\n newContentModel.childSections = sectionModels;\n\n return newContentModel;\n });\n }\n}\n\nexport default ModularUIRequest;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAMA;;AAEA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;;;;;;;;;;;AAKA;AACA;AACA;AACA;IACMA,gB;EA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,CAACU,aAAhB,GAAgCD,aAAhC;QAEA,OAAOT,eAAP;MACD,CAjBM,CAAP;IAkBD;;;;;eAGYzI,gB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ModularUIResponse.js","names":["ModularUIResponse","_locale","locale","_key","key","_data","data","_contributions","contributions","_parameters","parameters","input","response","dataKey","contributionsKey","modelData"],"sources":["../../src/modularui/ModularUIResponse.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\n\nimport type Parameter from \"../models/parameter/Parameter\";\n\n/**\n */\nclass ModularUIResponse {\n _key: string = \"unknown\";\n _data: Object;\n _contributions: Object;\n _locale: string = \"en\";\n _parameters: Array<Parameter> = [];\n\n /**\n */\n static create(input: {\n key: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const response = new ModularUIResponse();\n\n if (has(input, \"data\") && has(input, \"contributions\")) {\n const [dataKey] = Object.keys(input.data);\n const [contributionsKey] = Object.keys(input.contributions);\n\n response.key = input.key ?? contributionsKey;\n response.data = input.data?.[dataKey];\n response.contributions = input.contributions?.[contributionsKey];\n }\n\n return response;\n }\n\n /**\n */\n set locale(locale: string) {\n this._locale = locale;\n }\n\n /**\n */\n get locale(): string {\n return this._locale;\n }\n\n /**\n */\n set key(key: string) {\n this._key = key;\n }\n\n /**\n */\n get key(): string {\n return this._key;\n }\n\n /**\n */\n set data(data: Object) {\n this._data = data;\n }\n\n /**\n */\n get data(): Object {\n return this._data;\n }\n\n /**\n */\n set contributions(contributions: Object) {\n this._contributions = contributions;\n }\n\n /**\n */\n get contributions(): Object {\n return this._contributions;\n }\n\n /**\n */\n set parameters(parameters: Array<Parameter>) {\n this._parameters = parameters;\n }\n\n /**\n */\n get parameters(): Array<Parameter> {\n return this._parameters;\n }\n\n /**\n */\n static rehydrate(data: {\n key: string,\n locale: string,\n data: Object,\n contributions: Object,\n }): ModularUIResponse {\n const modelData = new ModularUIResponse();\n\n modelData.locale = data.locale;\n modelData.key = data.key;\n modelData.data = data.data;\n modelData.contributions = data.contributions;\n\n return modelData;\n }\n}\n\nexport default ModularUIResponse;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;;AAIA;AACA;IACMA,iB;;;gDACW,S;;;mDAGG,I;uDACc,E;;;;;;IA6BhC;AACF;IACE,eAAqB;MACnB,OAAO,KAAKC,OAAZ;IACD;IAED;AACF;;;IAbE;AACF;IACE,aAAWC,MAAX,EAA2B;MACzB,KAAKD,OAAL,GAAeC,MAAf;IACD;;;;IAcD;AACF;IACE,eAAkB;MAChB,OAAO,KAAKC,IAAZ;IACD;IAED;AACF;;SAXE,aAAQC,GAAR,EAAqB;MACnB,KAAKD,IAAL,GAAYC,GAAZ;IACD;;;;IAcD;AACF;IACE,eAAmB;MACjB,OAAO,KAAKC,KAAZ;IACD;IAED;AACF;;SAXE,aAASC,IAAT,EAAuB;MACrB,KAAKD,KAAL,GAAaC,IAAb;IACD;;;;IAcD;AACF;IACE,eAA4B;MAC1B,OAAO,KAAKC,cAAZ;IACD;IAED;AACF;;SAXE,aAAkBC,aAAlB,EAAyC;MACvC,KAAKD,cAAL,GAAsBC,aAAtB;IACD;;;;IAcD;AACF;IACE,eAAmC;MACjC,OAAO,KAAKC,WAAZ;IACD;IAED;AACF;;SAXE,aAAeC,UAAf,EAA6C;MAC3C,KAAKD,WAAL,GAAmBC,UAAnB;IACD;;;;IAzED;AACF;IACE,gBAAcC,KAAd,EAIsB;MACpB,IAAMC,QAAQ,GAAG,IAAIZ,iBAAJ,EAAjB;;MAEA,IAAI,kBAAIW,KAAJ,EAAW,MAAX,KAAsB,kBAAIA,KAAJ,EAAW,eAAX,CAA1B,EAAuD;QAAA;;QACrD,mBAAkB,mBAAYA,KAAK,CAACL,IAAlB,CAAlB;QAAA;QAAA,IAAOO,OAAP;;QACA,oBAA2B,mBAAYF,KAAK,CAACH,aAAlB,CAA3B;QAAA;QAAA,IAAOM,gBAAP;;QAEAF,QAAQ,CAACR,GAAT,iBAAeO,KAAK,CAACP,GAArB,mDAA4BU,gBAA5B;QACAF,QAAQ,CAACN,IAAT,kBAAgBK,KAAK,CAACL,IAAtB,gDAAgB,YAAaO,OAAb,CAAhB;QACAD,QAAQ,CAACJ,aAAT,2BAAyBG,KAAK,CAACH,aAA/B,yDAAyB,qBAAsBM,gBAAtB,CAAzB;MACD;;MAED,OAAOF,QAAP;IACD;;;WAgED,mBAAiBN,IAAjB,EAKsB;MACpB,IAAMS,SAAS,GAAG,IAAIf,iBAAJ,EAAlB;MAEAe,SAAS,CAACb,MAAV,GAAmBI,IAAI,CAACJ,MAAxB;MACAa,SAAS,CAACX,GAAV,GAAgBE,IAAI,CAACF,GAArB;MACAW,SAAS,CAACT,IAAV,GAAiBA,IAAI,CAACA,IAAtB;MACAS,SAAS,CAACP,aAAV,GAA0BF,IAAI,CAACE,aAA/B;MAEA,OAAOO,SAAP;IACD;;;;;eAGYf,iB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/modularui/index.js"],"sourcesContent":["// @flow\nexport { default as Authenticate } from \"./Authenticate\";\nexport { default as ModularUIRequest } from \"./ModularUIRequest\";\nexport { default as ModularUIResponse } from \"./ModularUIResponse\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","names":["ErrorBoundary","error","errorInfo","setState","props","children","FallbackComponent","state","componentStack","Component","ErrorBoundaryFallback","displayName"],"sources":["../../src/react/ErrorBoundary.js"],"sourcesContent":["// @flow\nimport { Component } from \"react\";\n\nimport ErrorBoundaryFallback from \"./ErrorBoundaryFallback\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { Props as FallbackProps } from \"./ErrorBoundaryFallback\";\nexport type Props = {\n +children: ?Node,\n +FallbackComponent: ComponentType<FallbackProps>,\n};\n\ntype ErrorInfo = {\n componentStack: string,\n ...\n};\n\ntype State = {\n error: ?Error,\n errorInfo: ?ErrorInfo,\n};\n\n/**\n */\nclass ErrorBoundary extends Component<Props, State> {\n static defaultProps: { FallbackComponent: ComponentType<FallbackProps> } = {\n FallbackComponent: ErrorBoundaryFallback,\n };\n\n state: State = {\n error: null,\n errorInfo: null,\n };\n\n /**\n */\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n this.setState({ error, errorInfo });\n }\n\n /**\n */\n render(): Node {\n const { children, FallbackComponent } = this.props; // NOSONAR\n const { error, errorInfo } = this.state;\n\n if (error != null) {\n return (\n <FallbackComponent\n componentStack={errorInfo ? errorInfo.componentStack : \"\"}\n error={error}\n />\n );\n }\n\n return children ?? null;\n }\n}\nErrorBoundary.displayName = \"BI.ErrorBoundary\";\n\nexport default ErrorBoundary;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;;;;;;;AAmBA;AACA;IACMA,a;;;;;;;;;;;;;;;;;wFAKW;MACbC,KAAK,EAAE,IADM;MAEbC,SAAS,EAAE;IAFE,C;;;;;;;IAKf;AACF;IACE,2BAAkBD,KAAlB,EAAgCC,SAAhC,EAA4D;MAC1D,KAAKC,QAAL,CAAc;QAAEF,KAAK,EAALA,KAAF;QAASC,SAAS,EAATA;MAAT,CAAd;IACD;IAED;AACF;;;;WACE,kBAAe;MACb,kBAAwC,KAAKE,KAA7C;MAAA,IAAQC,QAAR,eAAQA,QAAR;MAAA,IAAkBC,iBAAlB,eAAkBA,iBAAlB,CADa,CACuC;;MACpD,kBAA6B,KAAKC,KAAlC;MAAA,IAAQN,KAAR,eAAQA,KAAR;MAAA,IAAeC,SAAf,eAAeA,SAAf;;MAEA,IAAID,KAAK,IAAI,IAAb,EAAmB;QACjB,oBACE,qBAAC,iBAAD;UACE,cAAc,EAAEC,SAAS,GAAGA,SAAS,CAACM,cAAb,GAA8B,EADzD;UAEE,KAAK,EAAEP;QAFT,EADF;MAMD;;MAED,OAAOI,QAAP,aAAOA,QAAP,cAAOA,QAAP,GAAmB,IAAnB;IACD;;;EAhCyBI,gB;;8BAAtBT,a,kBACuE;EACzEM,iBAAiB,EAAEI;AADsD,C;AAiC7EV,aAAa,CAACW,WAAd,GAA4B,kBAA5B;eAEeX,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"ErrorBoundaryFallback.js","names":["StyledBoundary","styled","div","StyledStack","pre","ErrorBoundaryFallback","className","componentStack","error","toString","displayName"],"sources":["../../src/react/ErrorBoundaryFallback.js"],"sourcesContent":["// @flow\nimport styled from \"styled-components\";\nimport { spacers, spacer } from \"../react-theme/utils/spacers\";\n\nimport type { StyledComponent } from \"styled-components\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { Node } from \"react\";\n\nexport type Props = {\n +className?: string,\n +componentStack: string,\n +error: Error,\n};\n\nconst StyledBoundary: StyledComponent<{}, Theme, *> = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\n/**\n */\nconst ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: Props): Node => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n\nexport default ErrorBoundaryFallback;\n"],"mappings":";;;;;;;;;AACA;;AACA;;;;AAYA,IAAMA,cAA6C,gBAAGC,0BAAOC,GAAV;EAAA;AAAA,sFACtC,sBAAQ,CAAR,EAAW,CAAX,CADsC,EAEhC,qBAAO,CAAP,CAFgC,CAAnD;;AAOA,IAAMC,WAAW,gBAAGF,0BAAOG,GAAV;EAAA;AAAA,sEAAjB;AAOA;AACA;;;AACA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB;EAAA,IAC5BC,SAD4B,QAC5BA,SAD4B;EAAA,IAE5BC,cAF4B,QAE5BA,cAF4B;EAAA,IAG5BC,KAH4B,QAG5BA,KAH4B;EAAA,oBAK5B,sBAAC,cAAD;IAAgB,SAAS,EAAEF,SAA3B;IAAA,wBACE;MAAA,UAAKE,KAAK,CAACC,QAAN;IAAL,EADF,eAEE,qBAAC,WAAD;MAAa,SAAS,EAAC,OAAvB;MAAA,UAAgCF;IAAhC,EAFF;EAAA,EAL4B;AAAA,CAA9B;;AAWAF,qBAAqB,CAACK,WAAtB,GAAoC,0BAApC;eAEeL,qB"}
|
package/lib/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/react/index.js"],"sourcesContent":["// @flow\nexport * from \"./utils\";\nexport * from \"../hooks\";\n"],"mappings":";;;;;;;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/lib/react/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"utils.js","names":["getDisplayName","WrappedComponent","defaultName","contextId","componentName","displayName","name","mergeRefs","refs","value","forEach","ref","current"],"sources":["../../src/react/utils.js"],"sourcesContent":["// @flow\nimport type { ComponentType, Ref } from \"react\";\n\n/**\n */\nexport const getDisplayName = (\n WrappedComponent: ComponentType<any>,\n defaultName: string = \"Component\",\n contextId?: string\n): string => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\n/**\n */\nexport const mergeRefs =\n <T: any>(refs: Array<Ref<T>>): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n ref.current = value;\n }\n });\n };\n"],"mappings":";;;;;;;;;;;;;AAGA;AACA;AACO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAC5BC,gBAD4B,EAIjB;EAAA,IAFXC,WAEW,uEAFW,WAEX;EAAA,IADXC,SACW;EACX,IAAMC,aAAa,GACjBH,gBAAgB,CAACI,WAAjB,IAAgCJ,gBAAgB,CAACK,IAAjD,IAAyDJ,WAD3D;;EAGA,IAAIC,SAAJ,EAAe;IAAA;;IACb,iDAAUC,aAAV,uBAA2BD,SAA3B;EACD;;EAED,OAAOC,aAAP;AACD,CAbM;AAeP;AACA;;;;;AACO,IAAMG,SAAS,GACpB,SADWA,SACX,CAASC,IAAT;EAAA,OACA,UAACC,KAAD,EAAW;IACTD,IAAI,CAACE,OAAL,CAAa,UAACC,GAAD,EAAS;MACpB,IAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;QAC7BA,GAAG,CAACF,KAAD,CAAH;MACD,CAFD,MAEO,IAAIE,GAAG,IAAI,IAAP,IAAe,sBAAOA,GAAP,MAAe,QAAlC,EAA4C;QACjDA,GAAG,CAACC,OAAJ,GAAcH,KAAd;MACD;IACF,CAND;EAOD,CATD;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Init.js","names":["Init","store","history","contextPath","theme","children","ErrorFallbackComponent","displayName"],"sources":["../../src/react-client/Init.js"],"sourcesContent":["// @flow\nimport { Provider } from \"react-redux\";\nimport { HelmetProvider } from \"react-helmet-async\";\nimport { Router } from \"react-router\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport type { ComponentType, Node } from \"react\";\nimport type { RouterHistory } from \"react-router\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\nexport type Props = {\n +store: ReduxStore,\n +history: RouterHistory,\n +contextPath: string,\n +theme: Theme | Array<Theme>,\n +children: ?Node,\n +ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/**\n */\nconst Init = ({\n store,\n history,\n contextPath,\n theme,\n children,\n ErrorFallbackComponent,\n}: Props): Node => (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <HelmetProvider>\n <ErrorBoundary FallbackComponent={ErrorFallbackComponent}>\n <Router history={history} basename={contextPath}>\n {children}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </Provider>\n);\n\nInit.displayName = \"BI.Init\";\n\nexport default Init;\n"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;AAiBA;AACA;AACA,IAAMA,IAAI,GAAG,SAAPA,IAAO;EAAA,IACXC,KADW,QACXA,KADW;EAAA,IAEXC,OAFW,QAEXA,OAFW;EAAA,IAGXC,WAHW,QAGXA,WAHW;EAAA,IAIXC,KAJW,QAIXA,KAJW;EAAA,IAKXC,QALW,QAKXA,QALW;EAAA,IAMXC,sBANW,QAMXA,sBANW;EAAA,oBAQX,qBAAC,oBAAD;IAAU,KAAK,EAAEL,KAAjB;IAAA,uBACE,qBAAC,sBAAD;MAAe,KAAK,EAAEG,KAAtB;MAAA,uBACE,qBAAC,gCAAD;QAAA,uBACE,qBAAC,sBAAD;UAAe,iBAAiB,EAAEE,sBAAlC;UAAA,uBACE,qBAAC,mBAAD;YAAQ,OAAO,EAAEJ,OAAjB;YAA0B,QAAQ,EAAEC,WAApC;YAAA,UACGE;UADH;QADF;MADF;IADF;EADF,EARW;AAAA,CAAb;;AAqBAL,IAAI,CAACO,WAAL,GAAmB,SAAnB;eAEeP,I"}
|
|
@@ -106,7 +106,8 @@ var client = function client() {
|
|
|
106
106
|
history = _configureStore.history,
|
|
107
107
|
store = _configureStore.store;
|
|
108
108
|
|
|
109
|
-
(0, _Preferences.setAllContentInDataSetting)(store.getState());
|
|
109
|
+
(0, _Preferences.setAllContentInDataSetting)(store.getState());
|
|
110
|
+
(0, _Preferences.setLoginPreferences)(store.getState()); // load existing cache from other browser tabs
|
|
110
111
|
|
|
111
112
|
_Cache.default.loadOtherBrowserTabs(function () {
|
|
112
113
|
if (_Cache.default.getItem("auth")) {
|
|
@@ -19,7 +19,10 @@ import configureStore from "../redux/store/configureStore";
|
|
|
19
19
|
import rehydrate from "./rehydrate";
|
|
20
20
|
import { BASE } from "../constants/Constants";
|
|
21
21
|
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
setAllContentInDataSetting,
|
|
24
|
+
setLoginPreferences,
|
|
25
|
+
} from "../redux/actions/Preferences";
|
|
23
26
|
import { showXHRErrorNotification } from "../redux/actions/Notification";
|
|
24
27
|
|
|
25
28
|
import { handleError } from "../redux/actions/Error";
|
|
@@ -99,6 +102,7 @@ const client = ({
|
|
|
99
102
|
);
|
|
100
103
|
|
|
101
104
|
setAllContentInDataSetting(store.getState());
|
|
105
|
+
setLoginPreferences(store.getState());
|
|
102
106
|
|
|
103
107
|
// load existing cache from other browser tabs
|
|
104
108
|
Cache.loadOtherBrowserTabs(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"client.js","names":["window","parseDataToJSON","data","JSON","parse","error","JsonParseException","client","customReducers","theme","render","beforeRenderHooks","ErrorFallbackComponent","contextPath","Error","dataElement","document","querySelector","textContent","Cache","clear","browserHistory","basename","BASE","history","store","getState","loadOtherBrowserTabs","getItem","dispatch","FetchException","response","listen","location","action","onunhandledrejection","event","detail","errorMessage","reason","message","toString","body","className","addContentLoadedEvent","addEventListener","applicationNode","isSSR","mount","hydrate","reactRender"],"sources":["../../src/react-client/client.js"],"sourcesContent":["// @flow\n/* polyfills needed for ie11 */\nimport elementClosest from \"element-closest\";\nelementClosest(window);\n\n/* polyfill for focus-visible */\nimport \"focus-visible\";\n\nimport { hydrate, render as reactRender } from \"react-dom\";\n\nimport { has } from \"../utils/helpers/objects\";\nimport setImmediate from \"setimmediate\";\n\nimport Cache from \"../utils/browser/Cache\";\n\nimport { createBrowserHistory } from \"history\";\nimport configureStore from \"../redux/store/configureStore\";\n\nimport rehydrate from \"./rehydrate\";\nimport { BASE } from \"../constants/Constants\";\n\nimport {\n setAllContentInDataSetting,\n setLoginPreferences,\n} from \"../redux/actions/Preferences\";\nimport { showXHRErrorNotification } from \"../redux/actions/Notification\";\n\nimport { handleError } from \"../redux/actions/Error\";\nimport { loginSuccess } from \"../redux/actions/SignIn\";\n\nimport { locationChange } from \"../redux/_router/actions\";\n\nimport { JsonParseException, FetchException } from \"../exceptions\";\n\nimport Init from \"./Init\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport type { ComponentType } from \"react\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { CustomReducers } from \"../redux/types\";\nimport type { RouterHistory } from \"react-router\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\nexport type Props = {\n customReducers?: CustomReducers,\n theme?: Theme | Array<Theme>,\n render: Function,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/*\n * deserialize serialized data from the server to provide a smooth dehydration.\n */\n/**\n */\nconst parseDataToJSON = (data) => {\n try {\n return JSON.parse(data);\n } catch (error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, used client side when JavaScript is enabled.\n */\nconst client = ({\n customReducers = {},\n theme = {},\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n}: Props = {}) => {\n if (typeof window.contextPath === \"undefined\") {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n if (!dataElement) {\n throw new Error(\"Error loading state, json not found\");\n } else if (dataElement.textContent.trim() === \"\") {\n return;\n }\n\n const data = parseDataToJSON(dataElement.textContent);\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n // $FlowExpectedError\n const browserHistory: RouterHistory = createBrowserHistory({\n basename: BASE,\n });\n const { history, store } = configureStore(\n browserHistory,\n customReducers,\n rehydrate(data)\n );\n\n setAllContentInDataSetting(store.getState());\n setLoginPreferences(store.getState());\n\n // load existing cache from other browser tabs\n Cache.loadOtherBrowserTabs(() => {\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n });\n\n if (has(data, \"error.name\")) {\n const error = new FetchException(data.error.response);\n store.dispatch(handleError(error));\n }\n\n if (Cache.getItem(\"auth\")) {\n store.dispatch(loginSuccess());\n }\n\n // listen to history change and update the redux router store\n history.listen((location, action) => {\n store.dispatch(locationChange(location, action));\n });\n\n /**\n */\n window.onunhandledrejection = (event) => {\n if (event.detail) {\n return setImmediate(() => {\n const errorMessage = event.detail.reason.message.toString();\n\n store.dispatch(showXHRErrorNotification(errorMessage));\n throw event.detail.reason;\n });\n }\n\n return event;\n };\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n handleBeforeRenderHooks(beforeRenderHooks, { store });\n\n addContentLoadedEvent(store, history, theme, render, ErrorFallbackComponent);\n};\n\n/**\n */\nconst addContentLoadedEvent = (\n store,\n history,\n theme,\n render,\n ErrorFallbackComponent\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (applicationNode) {\n const isSSR = applicationNode.querySelector(\".application\");\n const mount = isSSR ? hydrate : reactRender;\n mount(\n <Init\n store={store}\n history={history}\n contextPath={window.contextPath}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>,\n applicationNode\n );\n } else {\n throw new Error(\n \"No DOM element with id application found to attach client to\"\n );\n }\n });\n};\n\nexport default client;\n"],"mappings":";;;;;;;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M,CAAP;IAMD;;IAED,OAAOH,KAAP;EACD,CAXD;;EAaA,IAAIpB,QAAQ,CAAC0B,IAAb,EAAmB;IACjB1B,QAAQ,CAAC0B,IAAT,CAAcC,SAAd,GAA0B,IAA1B;EACD;;EAED,gDAAwBhC,iBAAxB,EAA2C;IAAEc,KAAK,EAALA;EAAF,CAA3C;EAEAmB,qBAAqB,CAACnB,KAAD,EAAQD,OAAR,EAAiBf,KAAjB,EAAwBC,MAAxB,EAAgCE,sBAAhC,CAArB;AACD,CAjFD;AAmFA;AACA;;;AACA,IAAMgC,qBAAqB,GAAG,SAAxBA,qBAAwB,CAC5BnB,KAD4B,EAE5BD,OAF4B,EAG5Bf,KAH4B,EAI5BC,MAJ4B,EAK5BE,sBAL4B,EAMzB;EACHZ,MAAM,CAAC6C,gBAAP,CAAwB,kBAAxB,EAA4C,YAAM;IAChD,IAAMC,eAAe,GAAG9B,QAAQ,CAACC,aAAT,CAAuB,cAAvB,CAAxB;;IACA,IAAI6B,eAAJ,EAAqB;MACnB,IAAMC,KAAK,GAAGD,eAAe,CAAC7B,aAAhB,CAA8B,cAA9B,CAAd;MACA,IAAM+B,KAAK,GAAGD,KAAK,GAAGE,iBAAH,GAAaC,gBAAhC;MACAF,KAAK,eACH,qBAAC,aAAD;QACE,KAAK,EAAEvB,KADT;QAEE,OAAO,EAAED,OAFX;QAGE,WAAW,EAAExB,MAAM,CAACa,WAHtB;QAIE,KAAK,EAAEJ,KAJT;QAKE,sBAAsB,EAAEG,sBAL1B;QAAA,UAOGF,MAAM;MAPT,EADG,EAUHoC,eAVG,CAAL;IAYD,CAfD,MAeO;MACL,MAAM,IAAIhC,KAAJ,CACJ,8DADI,CAAN;IAGD;EACF,CAtBD;AAuBD,CA9BD;;eAgCeP,M"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"contextPath.js","names":["x","dataElement","document","querySelector","Error","contextPath","getAttribute","window","filePath","__webpack_public_path__","nonce","__webpack_nonce__"],"sources":["../../src/react-client/contextPath.js"],"sourcesContent":["// @flow\n(function x() {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\n if (!dataElement) {\n throw new Error(\n \"Error finding script with attribute app-json to retrieve context path\"\n );\n }\n\n const contextPath = dataElement.getAttribute(\"data-app-contextpath\");\n if (contextPath) {\n window.contextPath = contextPath;\n }\n\n const filePath = dataElement.getAttribute(\"data-app-filepath\");\n if (filePath && filePath !== \"{FILEPATH}\") {\n __webpack_public_path__ = `${filePath}/`; // NOSONAR\n } else if (contextPath) {\n __webpack_public_path__ = `${contextPath}/`; // NOSONAR\n }\n\n const nonce = dataElement.getAttribute(\"data-app-nonce\");\n if (nonce) {\n __webpack_nonce__ = nonce; // NOSONAR\n }\n})();\n\nexport {};\n"],"mappings":";;;;;;AACA,CAAC,SAASA,CAAT,GAAa;EACZ,IAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAT,CAClB,4DADkB,CAApB;;EAGA,IAAI,CAACF,WAAL,EAAkB;IAChB,MAAM,IAAIG,KAAJ,CACJ,uEADI,CAAN;EAGD;;EAED,IAAMC,WAAW,GAAGJ,WAAW,CAACK,YAAZ,CAAyB,sBAAzB,CAApB;;EACA,IAAID,WAAJ,EAAiB;IACfE,MAAM,CAACF,WAAP,GAAqBA,WAArB;EACD;;EAED,IAAMG,QAAQ,GAAGP,WAAW,CAACK,YAAZ,CAAyB,mBAAzB,CAAjB;;EACA,IAAIE,QAAQ,IAAIA,QAAQ,KAAK,YAA7B,EAA2C;IACzCC,uBAAuB,aAAMD,QAAN,MAAvB,CADyC,CACC;EAC3C,CAFD,MAEO,IAAIH,WAAJ,EAAiB;IACtBI,uBAAuB,aAAMJ,WAAN,MAAvB,CADsB,CACuB;EAC9C;;EAED,IAAMK,KAAK,GAAGT,WAAW,CAACK,YAAZ,CAAyB,gBAAzB,CAAd;;EACA,IAAII,KAAJ,EAAW;IACTC,iBAAiB,GAAGD,KAApB,CADS,CACkB;EAC5B;AACF,CA1BD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/react-client/index.js"],"sourcesContent":["// @flow\nexport { setCustomErrorResponseHandler } from \"../redux/actions/Error\";\n\nexport { default as Init } from \"./Init\";\n\nexport { default as client } from \"./client\";\nexport type { Props } from \"./client\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"rehydrate.js","names":["recreateModel","data","modelData","ModularUIResponse","rehydrate","Model","model","childModels","childModel","addChildModels","isModularUIModelData","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","Locales","locale","noFurtherRehydration","state","mappedState","forEach"],"sources":["../../src/react-client/rehydrate.js"],"sourcesContent":["// @flow\nimport { has } from \"../utils/helpers/objects\";\nimport Locales from \"../i18n/Locales\";\n\nimport resolveModel from \"../models/resolveModel\";\n\nimport ModularUIResponse from \"../modularui/ModularUIResponse\";\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: Object) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n model.rehydrate(data);\n\n const childModels = data.childModels.map((childModel) =>\n recreateModel(childModel)\n );\n\n model.addChildModels(childModels);\n\n return model;\n }\n\n return data;\n};\n\n/**\n */\nconst isModularUIModelData = (data: any) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\");\n\n/**\n */\nconst rehydratedValue = (stateKey, stateValue) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem)); // NOSONAR\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\"preferences\", \"router\", \"progressindicator\"];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue); // NOSONAR\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nconst rehydrate = (state: Object): { ... } => {\n const mappedState = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n\nexport default rehydrate;\n"],"mappings":";;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,IAAD,EAAkB;EACtC,IAAMC,SAAS,GAAGC,2BAAkBC,SAAlB,CAA4BH,IAA5B,CAAlB;;EAEA,IAAMI,KAAK,GAAG,2BAAaH,SAAb,CAAd;;EAEA,IAAIG,KAAJ,EAAW;IAAA;;IACT,IAAMC,KAAK,GAAG,IAAID,KAAJ,CAAUH,SAAV,CAAd;IACAI,KAAK,CAACF,SAAN,CAAgBH,IAAhB;IAEA,IAAMM,WAAW,GAAG,6BAAAN,IAAI,CAACM,WAAL,iBAAqB,UAACC,UAAD;MAAA,OACvCR,aAAa,CAACQ,UAAD,CAD0B;IAAA,CAArB,CAApB;IAIAF,KAAK,CAACG,cAAN,CAAqBF,WAArB;IAEA,OAAOD,KAAP;EACD;;EAED,OAAOL,IAAP;AACD,CAnBD;AAqBA;AACA;;;AACA,IAAMS,oBAAoB,GAAG,SAAvBA,oBAAuB,CAACT,IAAD;EAAA,OAC3BA,IAAI,IAAI,IAAR,IACA,sBAAOA,IAAP,MAAgB,QADhB,IAEA,kBAAIA,IAAJ,EAAU,MAAV,CAFA,IAGA,kBAA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U,GAAGQ,KAAK,CAACT,QAAD,CAAxB;IACAU,WAAW,CAACV,QAAD,CAAX,GAAwBD,eAAe,CAACC,QAAD,EAAWC,UAAX,CAAvC;EACD,CAHD;EAKA,OAAOS,WAAP;AACD,CATD;;eAWelB,S"}
|
|
@@ -109,6 +109,15 @@ describe("serverUtil", () => {
|
|
|
109
109
|
hasAllContentInData: false,
|
|
110
110
|
},
|
|
111
111
|
},
|
|
112
|
+
{
|
|
113
|
+
type: "SET_PREFERENCES",
|
|
114
|
+
payload: {
|
|
115
|
+
"FormClient.login_url": "/BeInformed/j_security_check",
|
|
116
|
+
"FormClient.logout_url": "/BeInformed/Logoff",
|
|
117
|
+
"FormClient.password_field_name": "j_password",
|
|
118
|
+
"FormClient.username_field_name": "j_username",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
112
121
|
]);
|
|
113
122
|
});
|
|
114
123
|
|
|
@@ -146,6 +155,15 @@ describe("serverUtil", () => {
|
|
|
146
155
|
hasAllContentInData: false,
|
|
147
156
|
},
|
|
148
157
|
},
|
|
158
|
+
{
|
|
159
|
+
type: "SET_PREFERENCES",
|
|
160
|
+
payload: {
|
|
161
|
+
"FormClient.login_url": "/BeInformed/j_security_check",
|
|
162
|
+
"FormClient.logout_url": "/BeInformed/Logoff",
|
|
163
|
+
"FormClient.password_field_name": "j_password",
|
|
164
|
+
"FormClient.username_field_name": "j_username",
|
|
165
|
+
},
|
|
166
|
+
},
|
|
149
167
|
]);
|
|
150
168
|
});
|
|
151
169
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"contextPath.js","names":["x","__webpack_public_path__","BASE"],"sources":["../../src/react-server/contextPath.js"],"sourcesContent":["// @flow\nimport { BASE } from \"../constants/Constants\";\n\n(function x() {\n __webpack_public_path__ = `${BASE}/`; // NOSONAR\n})();\n\nexport {};\n"],"mappings":";;;;;;AACA;;AAEA,CAAC,SAASA,CAAT,GAAa;EACZC,uBAAuB,aAAMC,eAAN,MAAvB,CADY,CAC0B;AACvC,CAFD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"createSSRComplete.js","names":["noLoading","state","modularui","key","status","MODULARUI_STATUS","LOADING","length","loadingCounter","createSSRComplete","store","render","loadingCount","getState","html","resolve","reject","unsubscribe","subscribe","previousCount","error"],"sources":["../../src/react-server/createSSRComplete.js"],"sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length === 0;\n\n/**\n */\nconst loadingCounter = (state) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING\n ).length;\n\n/**\n */\nconst createSSRComplete = (\n store: ReduxStore,\n render: Function\n): Promise<string> => {\n let loadingCount = loadingCounter(store.getState());\n let html = \"<div>Nothing to render</div>\";\n\n return new Promise((resolve, reject) => {\n const unsubscribe = store.subscribe(() => {\n const previousCount = loadingCount;\n loadingCount = loadingCounter(store.getState());\n\n if (previousCount !== loadingCount && noLoading(store.getState())) {\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n }\n });\n\n try {\n html = render();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (noLoading(store.getState())) {\n unsubscribe();\n resolve(html);\n }\n });\n};\n\nexport default createSSRComplete;\n"],"mappings":";;;;;;;;;;;;;;;AACA;;AAIA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;EAAA;;EAAA,OAChB,mDAAYA,KAAK,CAACC,SAAlB,kBACE,UAACC,GAAD;IAAA,OAASF,KAAK,CAACC,SAAN,CAAgBC,GAAhB,EAAqBC,MAArB,KAAgCC,4BAAiBC,OAA1D;EAAA,C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C;MAC/BI,WAAW;MACXF,OAAO,CAACD,IAAD,CAAP;IACD;EACF,CA/BM,CAAP;AAgCD,CAvCD;;eAyCeL,iB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"htmlpage.js","names":["htmlpage","contextPath","html","head","state","UUID","undefined","IllegalArgumentException","template","htmlAttributes","toString","key","join","replace"],"sources":["../../src/react-server/htmlpage.js"],"sourcesContent":["// @flow\nimport { IllegalArgumentException } from \"../exceptions\";\n\nexport type TemplateProps = {\n contextPath: string,\n html: string,\n head: Object,\n state: string,\n UUID: string,\n};\n\n/**\n */\nconst htmlpage = ({\n contextPath,\n html,\n head = {},\n state = \"\",\n UUID = \"\",\n}: TemplateProps = {}): string => {\n if (contextPath === undefined) {\n throw new IllegalArgumentException(\"Missing contextPath argument\");\n }\n if (html === undefined) {\n throw new IllegalArgumentException(\"Missing html for server\");\n }\n\n const template = `\n <!doctype html>\n <html ${head && head.htmlAttributes ? head.htmlAttributes.toString() : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n ${Object.keys(head)\n .filter((key) => key !== \"htmlAttributes\")\n .map((key) => head[key].toString())\n .join(\"\")}\n {CSSASSETS:<link rel=\"stylesheet\" type=\"text/css\" href=\"{CONTEXT_PATH}/{FILE}\" />:CSSASSETS}\n </head>\n <body class=\"nojs\">\n <div id=\"application\">${html}</div>\n <div id=\"portal\"></div>\n <script\n type=\"application/json\"\n data-app-state=\"app-json\"\n data-app-contextpath=\"{CONTEXT_PATH}\"\n data-app-filepath=\"{FILEPATH}\"\n data-app-nonce=\"${UUID}\">${state}</script>\n {JSASSETS:<script src=\"{CONTEXT_PATH}/{FILE}\"></script>:JSASSETS}\n </body>\n </html>\n`;\n\n // It is important to replace the context afterwards,\n // the JSASSESTS and CSSASSETS parts act as a small template for all generated javascript and css files\n // these templates must be pure strings to make it possible to add the context path in all situations\n return template.replace(/{CONTEXT_PATH}/g, contextPath).trim();\n};\n\nexport default htmlpage;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AACA;;AAUA;AACA;AACA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,GAMiB;EAAA;;EAAA,+EAAf,EAAe;EAAA,IALhCC,WAKgC,QALhCA,WAKgC;EAAA,IAJhCC,IAIgC,QAJhCA,IAIgC;EAAA,qBAHhCC,IAGgC;EAAA,IAHhCA,IAGgC,0BAHzB,EAGyB;EAAA,sBAFhCC,KAEgC;EAAA,IAFhCA,KAEgC,2BAFxB,EAEwB;EAAA,qBADhCC,IACgC;EAAA,IADhCA,IACgC,0BADzB,EACyB;;EAChC,IAAIJ,WAAW,KAAKK,SAApB,EAA+B;IAC7B,MAAM,IAAIC,oCAAJ,CAA6B,8BAA7B,CAAN;EACD;;EACD,IAAIL,IAAI,KAAKI,SAAb,EAAwB;IACtB,MAAM,IAAIC,oCAAJ,CAA6B,yBAA7B,CAAN;EACD;;EAED,IAAMC,QAAQ,6KAENL,IAAI,IAAIA,IAAI,CAACM,cAAb,GAA8BN,IAAI,CAACM,cAAL,CAAoBC,QAApB,EAA9B,GAA+D,EAFzD,8EAKR,kFAAYP,IAAZ,mBACQ,UAACQ,GAAD;IAAA,OAASA,GAAG,KAAK,gBAAjB;EAAA,CADR,mBAEK,UAACA,GAAD;IAAA,OAASR,IAAI,CAACQ,GAAD,CAAJ,CAAUD,QAAV,EAAT;EAAA,CAFL,EAGCE,IAHD,CAGM,EAHN,CALQ,yMAYcV,IAZd,2QAmBUG,IAnBV,yBAmBmBD,KAnBnB,mHAAd,CARgC,CAiChC;EACA;EACA;;EACA,OAAO,+BAAAI,QAAQ,CAACK,OAAT,CAAiB,iBAAjB,EAAoCZ,WAApC,kBAAP;AACD,CA3CD;;eA6CeD,Q"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/react-server/index.js"],"sourcesContent":["// @flow\nexport { setCustomErrorResponseHandler } from \"../redux/actions/Error\";\n\nexport { default as renderSSRComplete } from \"./renderSSRComplete\";\nexport { default as renderSSRMinimal } from \"./renderSSRMinimal\";\n\nexport { default as serverNoSSR } from \"./serverNoSSR\";\nexport { default as serverSSR } from \"./serverSSR\";\n\nexport { default as htmlpage } from \"./htmlpage\";\n\nexport * from \"./requestInformation\";\nexport * from \"./serverUtil\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AACA;;AAEA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"renderSSRComplete.js","names":["renderSSRComplete","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","routerContext","sheet","ServerStyleSheet","location","toLocation","instance","BASE","then","appHTML","head","contextPath","html","state","catch","error","message","fileName","lineNumber","stack","helmet"],"sources":["../../src/react-server/renderSSRComplete.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\nimport { Provider } from \"react-redux\";\nimport { StaticRouter as Router } from \"react-router\";\n\nimport { HelmetProvider } from \"react-helmet-async\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nimport createSSRComplete from \"./createSSRComplete\";\nimport htmlpage from \"./htmlpage\";\n\nimport { BASE } from \"../constants/Constants\";\n\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\nimport ErrorBoundary from \"../react/ErrorBoundary\";\n\nimport { createHead, handleErrors, dehydrate } from \"./serverUtil\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type Href from \"../models/href/Href\";\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { Location } from \"react-router\";\n\ntype Props = {\n store: ReduxStore,\n theme: Theme,\n UUID: string,\n requestHref: Href,\n render: Function,\n ErrorPage: any,\n template?: (TemplateProps) => string,\n};\n/**\n */\nconst renderSSRComplete = ({\n store,\n theme = {},\n UUID = \"\",\n requestHref,\n render,\n ErrorPage,\n template = htmlpage,\n}: Props): Promise<string> => {\n const helmetContext = {};\n const routerContext = {};\n\n const sheet = new ServerStyleSheet();\n\n // $FlowFixMe[incompatible-type]\n // $FlowFixMe[prop-missing]\n const location: Location = requestHref.toLocation();\n\n return createSSRComplete(store, () =>\n renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <HelmetProvider context={helmetContext}>\n <ErrorBoundary>\n <Router\n basename={BASE}\n location={location}\n context={routerContext}\n >\n {render()}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </StyleSheetManager>\n </Provider>\n )\n )\n .then((appHTML) => {\n handleErrors(store);\n const head = createHead(sheet, UUID, helmetContext);\n return template({\n contextPath: BASE,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: BASE,\n html: renderToString(\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>\n <ErrorPage\n errorMessage={error.message}\n errorResource={error.fileName}\n errorLine={error.lineNumber}\n errorStack={error.stack}\n />\n </ThemeProvider>\n </StyleSheetManager>\n ),\n head: helmetContext.helmet,\n state: \"\",\n UUID,\n })\n );\n};\n\nexport default renderSSRComplete;\n"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AAEA;;AAEA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;;;AAiBA;AACA;AACA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,OAQI;EAAA,IAP5BC,KAO4B,QAP5BA,KAO4B;EAAA,sBAN5BC,KAM4B;EAAA,IAN5BA,KAM4B,2BANpB,EAMoB;EAAA,qBAL5BC,IAK4B;E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AACC,KAAD;IAAA,OACLjB,QAAQ,CAAC;MACPa,WAAW,EAAEJ,eADN;MAEPK,IAAI,EAAE,0CACJ,qBAAC,mCAAD;QAAmB,KAAK,EAAEV,KAAK,CAACI,QAAhC;QAAA,uBACE,qBAAC,sBAAD;UAAe,KAAK,EAAEb,KAAtB;UAAA,uBACE,qBAAC,SAAD;YACE,YAAY,EAAEsB,KAAK,CAACC,OADtB;YAEE,aAAa,EAAED,KAAK,CAACE,QAFvB;YAGE,SAAS,EAAEF,KAAK,CAACG,UAHnB;YAIE,UAAU,EAAEH,KAAK,CAACI;UAJpB;QADF;MADF,EADI,CAFC;MAcPT,IAAI,EAAEV,aAAa,CAACoB,MAdb;MAePP,KAAK,EAAE,EAfA;MAgBPnB,IAAI,EAAJA;IAhBO,CAAD,CADH;EAAA,CAhCF,CAAP;AAoDD,CAtED;;eAwEeH,iB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"renderSSRMinimal.js","names":["renderSSRMinimal","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","instance","head","contextPath","BASE","html","state"],"sources":["../../src/react-server/renderSSRMinimal.js"],"sourcesContent":["// @flow\nimport { renderToString } from \"react-dom/server\";\n\nimport { Provider } from \"react-redux\";\n\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\nimport ThemeProvider from \"../react-theme/ThemeProvider\";\n\nimport { BASE } from \"../constants/Constants\";\n\nimport { createHead, dehydrate } from \"./serverUtil\";\nimport htmlpage from \"./htmlpage\";\n\nimport type { Theme } from \"../react-theme/types\";\nimport type { ReduxStore } from \"../redux/types\";\nimport type { TemplateProps } from \"./htmlpage\";\ntype Props = {\n store: ReduxStore,\n theme: Theme,\n UUID: string,\n render: Function,\n template?: (TemplateProps) => string,\n};\n\n/**\n */\nconst renderSSRMinimal = ({\n store,\n theme = {},\n UUID = \"\",\n render,\n template = htmlpage,\n}: Props): string => {\n const sheet = new ServerStyleSheet();\n\n const appHTML = renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>{render()}</ThemeProvider>\n </StyleSheetManager>\n </Provider>\n );\n\n const head = createHead(sheet, UUID);\n return template({\n contextPath: BASE,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport default renderSSRMinimal;\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AAEA;;AACA;;;;AAaA;AACA;AACA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAmB,OAMJ;EAAA,IALnBC,KAKmB,QALnBA,KAKmB;EAAA,sBAJnBC,KAImB;EAAA,IAJnBA,KAImB,2BAJX,EAIW;EAAA,qBAHnBC,IAGmB;EAAA,IAHnBA,IAGmB,0BAHZ,EAGY;EAAA,IAFnBC,MAEmB,QAFnBA,MAEmB;EAAA,yBADnBC,QACmB;EAAA,IADnBA,QACmB,8BADRC,iBACQ;EACnB,IAAMC,KAAK,GAAG,IAAIC,kCAAJ,EAAd;EAEA,IAAMC,OAAO,GAAG,0CACd,qBAAC,oBAAD;IAAU,KAAK,EAAER,KAAjB;IAAA,uBACE,qBAAC,mCAAD;MAAmB,KAAK,EAAEM,KAAK,CAACG,QAAhC;MAAA,uBACE,qBAAC,sBAAD;QAAe,KAAK,EAAER,KAAtB;QAAA,UAA8BE,MAAM;MAApC;IADF;EADF,EADc,CAAhB;EAQA,IAAMO,IAAI,GAAG,4BAAWJ,KAAX,EAAkBJ,IAAlB,CAAb;EACA,OAAOE,QAAQ,CAAC;IACdO,WAAW,EAAEC,eADC;IAEdC,IAAI,EAAEL,OAFQ;IAGdE,IAAI,EAAJA,IAHc;IAIdI,KAAK,EAAE,2BAAUd,KAAV,CAJO;IAKdE,IAAI,EAAJA;EALc,CAAD,CAAf;AAOD,CAzBD;;eA2BeH,gB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"requestInformation.js","names":["getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","getFullRequestHref","Href","getCookieFromRequest","cookieName","getCookieByName","getPreferredLocale","locales","languageFromCookie","acceptLanguageHeader","getHeader","availableLocaleCodes"],"sources":["../../src/react-server/requestInformation.js"],"sourcesContent":["// @flow\nimport Href from \"../models/href/Href\";\n\nimport type Locales from \"../i18n/Locales\";\n\n/**\n */\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n const pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n if (queryString) {\n return `${pathInfo}?${queryString}`;\n }\n\n return pathInfo;\n};\n\n/**\n */\nexport const getFullRequestHref = (request: HttpServletRequestJava): Href =>\n new Href(getFullRequestUrl(request));\n\n/**\n */\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\n/**\n */\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n"],"mappings":";;;;;;;;;;;AACA;;AAIA;AACA;AACO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,OAAD,EAA6C;EAC5E,IAAMC,QAAQ,GAAGD,OAAO,CAACE,WAAR,MAAyB,GAA1C;EACA,IAAMC,WAAW,GAAGH,OAAO,CAACI,cAAR,EAApB;;EAEA,IAAID,WAAJ,EAAiB;IAAA;;IACf,iDAAUF,QAAV,uBAAsBE,WAAtB;EACD;;EAED,OAAOF,QAAP;AACD,CATM;AAWP;AACA;;;;;AACO,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAACL,OAAD;EAAA,OAChC,IAAIM,aAAJ,CAASP,iBAAiB,CAACC,OAAD,CAA1B,CADgC;AAAA,CAA3B;AAGP;AACA;;;;;AACO,IAAMO,oBAAoB,GAAG,SAAvBA,oBAAuB,CAClCP,OADkC,EAElCQ,UAFkC,EAGhB;EAClB,OAAOR,OAAO,CAACS,eAAR,CAAwBD,UAAxB,CAAP;AACD,CALM;AAOP;AACA;;;;;AACO,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCV,OADgC,EAEhCW,OAFgC,EAGd;EAClB,IAAMC,kBAAkB,GAAGL,oBAAoB,CAACP,OAAD,EAAU,QAAV,CAA/C;EACA,IAAMa,oBAAoB,GACxBD,kBAAkB,IAAIZ,OAAO,CAACc,SAAR,CAAkB,iBAAlB,CADxB,CAFkB,CAKlB;;EACA,IAAID,oBAAoB,KAAK,IAA7B,EAAmC;IACjC,OAAOF,OAAO,CAACI,oBAAR,CAA6B,CAA7B,CAAP;EACD;;EAED,OAAOJ,OAAO,CAACD,kBAAR,CAA2BG,oBAA3B,CAAP;AACD,CAdM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"serverNoSSR.js","names":["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\";\ntype serverProps = {\n request: HttpServletRequestJava,\n locales?: Array<LocaleConfiguration>,\n customReducers?: Object,\n theme?: Object,\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 = null,\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;;AAEA;;AACA;;AAEA;;AAQA;;AAEA;;AAEA;;AAiBA;AACA;AACA,IAAMA,WAAW,GAAG,SAAdA,WAAc,OASO;EAAA,IARzBC,OAQyB,QARzBA,OAQyB;EAAA,IAPzBC,OAOyB,QAPzBA,OAOyB;EAAA,IANzBC,cAMyB,QANzBA,cAMyB;EAAA,iCALzBC,iBAKyB;EAAA,IALzBA,iBAKyB,sCALL,EAKK;EAAA,sBAJzBC,KAIyB;EAAA,IAJzBA,KAIyB,2BAJjB,IAIiB;EAAA,IAHzBC,MAGyB,QAHzBA,MAGyB;EAAA,IAFzBC,QAEyB,QAFzBA,QAEyB;EAAA,IADzBC,iBACyB,QADzBA,iBACyB;EACzB,IAAMC,IAAI,GAAG,0BAAb;EACAC,iBAAiB,GAAGD,IAApB,CAFyB,CAEC;;EAE1B,IAAME,WAAW,GAAG,4CAAmB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