@beinformed/ui 1.31.0 → 1.31.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/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.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/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 +8 -2
- package/esm/hooks/usePreference.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/withMessage.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/ChoiceAttributeModel.js +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 +8 -0
- 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/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/_createAttribute.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/MandatoryConstraint.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/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/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/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/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/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/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.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/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/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js.map +1 -1
- 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/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.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/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/modularui/CaptchaRequest.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/UploadRequest.js.map +1 -1
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/client.js +1 -0
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/createSSRComplete.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/serverUtil.js.map +1 -1
- package/esm/react-theme/createTheme.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/I18nActions.js.map +1 -1
- package/esm/redux/_i18n/I18nReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/esm/redux/_modularui/ModularUIUtils.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/RouterActions.js.map +1 -1
- package/esm/redux/_router/RouterConnectors.js.map +1 -1
- package/esm/redux/_router/RouterReducer.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/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/Notification.js.map +1 -1
- 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/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/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.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.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/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.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/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/__tests__/mergeLayoutHintConfigurations.spec.js.flow +4 -4
- package/lib/builder/mergeLayoutHintConfigurations.js.flow +3 -3
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/LayoutHints.js.flow +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js.flow +2 -2
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/FetchException.js.flow +2 -2
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/NetworkException.js.flow +1 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js.flow +1 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/hooks/__tests__/UseModularUIModel.spec.js.flow +9 -9
- package/lib/hooks/__tests__/useAuthentication.spec.js.flow +2 -2
- package/lib/hooks/__tests__/useForm.spec.js.flow +2 -2
- package/lib/hooks/__tests__/useModelCatalog.spec.js.flow +7 -7
- package/lib/hooks/__tests__/useModularUIBasic.spec.js.flow +2 -2
- package/lib/hooks/__tests__/usePreference.spec.js.flow +1 -1
- package/lib/hooks/useAllFormsOnModel.js.flow +2 -2
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js.flow +2 -2
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.flow +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.flow +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.flow +4 -4
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.flow +3 -3
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.flow +2 -2
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.flow +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModularUI.js.flow +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.flow +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.flow +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.flow +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.flow +2 -2
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js +8 -2
- package/lib/hooks/usePreference.js.flow +17 -7
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/i18n/Locale.js.flow +4 -4
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.flow +8 -8
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.flow +2 -2
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/__tests__/Locale.spec.js.flow +3 -3
- package/lib/i18n/__tests__/Locales.spec.js.flow +15 -13
- package/lib/i18n/withMessage.js.flow +4 -4
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/actions/ActionCollection.js.flow +4 -4
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js.flow +4 -4
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/actions/__tests__/ActionCollection.spec.js.flow +3 -3
- package/lib/models/actions/__tests__/ActionModel.spec.js.flow +1 -1
- package/lib/models/application/ApplicationModel.js.flow +3 -3
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.flow +7 -7
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.flow +9 -9
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.flow +9 -9
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.flow +24 -24
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.flow +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.flow +4 -4
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.flow +7 -7
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.flow +15 -15
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +8 -0
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.flow +19 -11
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.flow +10 -10
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.flow +7 -7
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.flow +6 -6
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.flow +9 -9
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js.flow +8 -8
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.flow +3 -3
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js.flow +5 -5
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/__tests__/AttributeCollection.spec.js.flow +11 -11
- package/lib/models/attributes/__tests__/AttributeContent.spec.js.flow +7 -7
- package/lib/models/attributes/__tests__/AttributeModel.spec.js.flow +5 -5
- package/lib/models/attributes/__tests__/AttributeSetModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/BooleanAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/ChoiceAttributeModel.spec.js.flow +8 -8
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js.flow +8 -8
- package/lib/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/DateAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/DatetimeAttributeModel.spec.js.flow +11 -11
- package/lib/models/attributes/__tests__/HelptextAttributeModel.spec.js.flow +3 -3
- package/lib/models/attributes/__tests__/MemoAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/MoneyAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/NumberAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/PasswordAttributeModel.spec.js.flow +1 -1
- package/lib/models/attributes/__tests__/StringAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/TimeAttributeModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/TimestampModel.spec.js.flow +2 -2
- package/lib/models/attributes/__tests__/UploadAttributeModel.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/_createAttribute.spec.js.flow +6 -6
- package/lib/models/attributes/__tests__/createAttributeComposite.spec.js.flow +3 -3
- package/lib/models/attributes/__tests__/createAttributeDynamicSchema.spec.js.flow +3 -3
- package/lib/models/attributes/_createAttribute.js.flow +5 -5
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.flow +5 -5
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.flow +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.flow +6 -6
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.flow +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.flow +6 -6
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.flow +2 -2
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.flow +2 -2
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js.flow +1 -1
- package/lib/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js.flow +6 -6
- package/lib/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js.flow +5 -5
- package/lib/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js.flow +6 -6
- package/lib/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js.flow +3 -3
- package/lib/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js.flow +2 -2
- package/lib/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js.flow +1 -1
- package/lib/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js.flow +4 -4
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.flow +4 -4
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.flow +15 -15
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.flow +2 -2
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.flow +2 -2
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js.flow +22 -22
- package/lib/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js.flow +1 -1
- package/lib/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js.flow +4 -4
- package/lib/models/base/BaseCollection.js.flow +6 -6
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.flow +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceModel.js.flow +5 -5
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/base/__tests__/ResourceCollection.spec.js.flow +1 -1
- package/lib/models/caseview/CaseViewModel.js.flow +4 -4
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +3 -3
- package/lib/models/concepts/BusinessScenarioModel.js.flow +9 -9
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.flow +17 -17
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js.flow +2 -2
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.flow +6 -4
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js.flow +5 -5
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js.flow +2 -2
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.flow +2 -2
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/concepts/__tests__/ConceptDetailModel.spec.js.flow +1 -1
- package/lib/models/content/ContentIndexModel.js.flow +3 -3
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.flow +11 -9
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js.flow +2 -2
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.flow +4 -4
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.flow +4 -4
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.flow +2 -2
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/content/__tests__/ContentModel.spec.js.flow +16 -16
- package/lib/models/contentconfiguration/ContentConfiguration.js.flow +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.flow +5 -5
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.flow +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.flow +2 -2
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js.flow +12 -12
- package/lib/models/detail/DetailModel.js.flow +5 -5
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js.flow +4 -4
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js.flow +1 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/__tests__/ErrorModel.spec.js.flow +1 -1
- package/lib/models/filters/AssignmentFilterModel.js.flow +3 -3
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.flow +3 -3
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js.flow +5 -5
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/__tests__/AssignmentFilterModel.spec.js.flow +4 -4
- package/lib/models/filters/__tests__/FilterCollection.spec.js.flow +11 -11
- package/lib/models/filters/__tests__/FilterModel.spec.js.flow +1 -1
- package/lib/models/filters/__tests__/RangeFilterModel.spec.js.flow +1 -1
- package/lib/models/form/FormModel.js.flow +39 -39
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.flow +16 -16
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/form/__tests__/FormModel.instrument.spec.js.flow +7 -7
- package/lib/models/form/__tests__/FormModel.repeating.spec.js.flow +2 -2
- package/lib/models/form/__tests__/FormModel.selfhref.spec.js.flow +1 -1
- package/lib/models/form/__tests__/FormModel.spec.js.flow +6 -6
- package/lib/models/form/__tests__/FormResultData.spec.js.flow +1 -1
- package/lib/models/form/__tests__/FormWithContent.spec.js.flow +3 -3
- package/lib/models/grouping/GroupingModel.js.flow +7 -7
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/grouping/__tests__/GroupingModel.spec.js.flow +2 -2
- package/lib/models/href/Href.js.flow +6 -6
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/__tests__/Href.spec.js.flow +18 -16
- package/lib/models/layouthint/LayoutHintCollection.js.flow +3 -3
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.flow +4 -4
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.flow +3 -3
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/__tests__/LinkModel.spec.js.flow +4 -4
- package/lib/models/links/normalizeLinkJSON.js.flow +6 -6
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.flow +7 -7
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.flow +2 -2
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js.flow +2 -2
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js.flow +6 -6
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListDetailModel.spec.js.flow +4 -4
- package/lib/models/list/__tests__/ListItemCollection.spec.js.flow +1 -1
- package/lib/models/list/__tests__/ListModel.spec.js.flow +3 -3
- package/lib/models/list/__tests__/ListResultDetail.spec.js.flow +3 -3
- package/lib/models/lookup/LookupOptionCollection.js.flow +1 -1
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js.flow +4 -4
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/lookup/__tests__/LookupOptionsModel.spec.js.flow +3 -3
- package/lib/models/modelcatalog/ModelCatalogModel.js.flow +2 -2
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.flow +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/paging/__tests__/PagingModel.spec.js.flow +2 -2
- package/lib/models/panels/GroupingPanelModel.js.flow +5 -5
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +8 -8
- package/lib/models/parameter/__tests__/Parameter.spec.js.flow +5 -5
- package/lib/models/process/ProcessStatusSettingsModel.js.flow +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/process/__tests__/ProcessStatusSettingsModel.spec.js.flow +1 -1
- package/lib/models/resolveModel.js.flow +4 -4
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.flow +4 -4
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/sorting/__tests__/SortingModel.spec.js.flow +3 -3
- package/lib/models/tab/TabModel.js.flow +3 -3
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/tab/__tests__/TabModel.spec.js.flow +5 -5
- package/lib/models/taskgroup/TaskGroupModel.js.flow +2 -2
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/types.js.flow +1 -1
- package/lib/models/types.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.flow +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/__tests__/UserModel.spec.js.flow +2 -2
- package/lib/models/user/__tests__/UserProfileModel.spec.js.flow +2 -2
- package/lib/models/user/__tests__/UserServicesModel.spec.js.flow +1 -1
- package/lib/modularui/CaptchaRequest.js.flow +1 -1
- package/lib/modularui/CaptchaRequest.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.flow +26 -26
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/UploadRequest.js.flow +6 -6
- package/lib/modularui/UploadRequest.js.map +1 -1
- package/lib/modularui/__tests__/ModularUIError.spec.js.flow +1 -1
- package/lib/modularui/__tests__/ModularUIRequest.spec.js.flow +9 -9
- package/lib/react/utils.js.flow +1 -1
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/client.js +1 -0
- package/lib/react-client/client.js.flow +11 -10
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.js.flow +2 -2
- package/lib/react-client/contextPath.js.map +1 -1
- package/lib/react-client/rehydrate.js.flow +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +2 -2
- package/lib/react-server/createSSRComplete.js.flow +3 -3
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.flow +4 -4
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.flow +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js.flow +2 -2
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverUtil.js.flow +8 -8
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/__tests__/createTheme.spec.js.flow +4 -4
- package/lib/react-theme/createTheme.js.flow +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/utils/__tests__/background.spec.js.flow +2 -2
- package/lib/react-theme/utils/__tests__/contrast.spec.js.flow +1 -1
- package/lib/react-theme/utils/__tests__/corners.spec.js.flow +3 -3
- package/lib/react-theme/utils/__tests__/spacers.spec.js.flow +1 -1
- package/lib/react-theme/utils/__tests__/themeProps.spec.js.flow +9 -9
- package/lib/react-theme/utils/colors.js.flow +3 -3
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.flow +6 -6
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.flow +2 -2
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.flow +2 -2
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.flow +8 -8
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/I18nActions.js.flow +1 -1
- package/lib/redux/_i18n/I18nActions.js.map +1 -1
- package/lib/redux/_i18n/I18nReducer.js.flow +2 -2
- package/lib/redux/_i18n/I18nReducer.js.map +1 -1
- package/lib/redux/_i18n/__tests__/reducer.spec.js.flow +2 -2
- package/lib/redux/_modularui/ModularUIActions.js.flow +8 -8
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIConnector.js.flow +4 -4
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/lib/redux/_modularui/ModularUIMiddleware.js.flow +6 -6
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/lib/redux/_modularui/ModularUIReducer.js.flow +5 -5
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUISelectors.js.flow +11 -11
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.flow +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/lib/redux/_modularui/__tests__/actions.spec.js.flow +1 -1
- package/lib/redux/_modularui/__tests__/reducer.spec.js.flow +13 -13
- package/lib/redux/_modularui/__tests__/selectors.spec.js.flow +3 -3
- package/lib/redux/_modularui/types.js.flow +4 -4
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.flow +3 -3
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/RouterActions.js.flow +3 -3
- package/lib/redux/_router/RouterActions.js.map +1 -1
- package/lib/redux/_router/RouterConnectors.js.flow +5 -5
- package/lib/redux/_router/RouterConnectors.js.map +1 -1
- package/lib/redux/_router/RouterReducer.js.flow +1 -1
- package/lib/redux/_router/RouterReducer.js.map +1 -1
- package/lib/redux/_router/__tests__/reducer.spec.js.flow +2 -2
- package/lib/redux/actions/Application.js.flow +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.flow +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.flow +3 -3
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.flow +2 -2
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.flow +3 -3
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.flow +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.flow +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.flow +3 -3
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Notification.js.flow +4 -4
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js.flow +11 -11
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js.flow +1 -1
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js.flow +3 -3
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/__tests__/Authorization.spec.js.flow +2 -2
- package/lib/redux/actions/__tests__/Error-server.spec.js.flow +13 -13
- package/lib/redux/actions/__tests__/Error.spec.js.flow +6 -6
- package/lib/redux/actions/__tests__/Notification.spec.js.flow +1 -1
- package/lib/redux/actions/__tests__/Preferences.spec.js.flow +2 -2
- package/lib/redux/connectors/Application.js.flow +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js.flow +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.flow +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.flow +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.flow +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.flow +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.flow +2 -2
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.flow +5 -5
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.flow +6 -6
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.flow +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.flow +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.flow +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.flow +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.flow +2 -2
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.flow +3 -3
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.flow +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.flow +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.flow +2 -2
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js.flow +1 -1
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js.flow +1 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.flow +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js.flow +1 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js.flow +1 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js.flow +1 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js.flow +1 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js.flow +1 -1
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.flow +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/__tests__/AuthReducer.spec.js.flow +10 -10
- package/lib/redux/reducers/__tests__/ErrorReducer.spec.js.flow +1 -1
- package/lib/redux/reducers/__tests__/ModalsReducer.spec.js.flow +3 -3
- package/lib/redux/reducers/__tests__/NotificationReducer.spec.js.flow +3 -3
- package/lib/redux/reducers/__tests__/PreferencesReducer.spec.js.flow +2 -2
- package/lib/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js.flow +8 -8
- package/lib/redux/store/beforeRenderHooks.js.flow +1 -1
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js.flow +3 -3
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/browser/Cookies.js.flow +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/browser/__tests__/Cookies.spec.js.flow +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.flow +15 -15
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/datetime/__tests__/DateTime.spec.js.flow +84 -81
- package/lib/utils/fetch/__tests__/xhr.spec.js.flow +2 -2
- package/lib/utils/fetch/universalFetch.js.flow +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.flow +6 -6
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/__tests__/sanitizeHTML.spec.js.flow +8 -8
- package/lib/utils/helpers/sanitizeHtml.js.flow +3 -3
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.flow +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js.flow +2 -2
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/__tests__/formatValue.spec.js.flow +1 -1
- package/lib/utils/number/formatValue.js.flow +2 -2
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.flow +7 -7
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +20 -20
- package/src/builder/__tests__/mergeLayoutHintConfigurations.spec.js +4 -4
- package/src/builder/mergeLayoutHintConfigurations.js +3 -3
- package/src/constants/LayoutHints.js +1 -1
- package/src/constants/Settings.js +2 -2
- package/src/exceptions/FetchException.js +2 -2
- package/src/exceptions/NetworkException.js +1 -1
- package/src/exceptions/UnauthorizedException.js +1 -1
- package/src/hooks/__tests__/UseModularUIModel.spec.js +9 -9
- package/src/hooks/__tests__/useAuthentication.spec.js +2 -2
- package/src/hooks/__tests__/useForm.spec.js +2 -2
- package/src/hooks/__tests__/useModelCatalog.spec.js +7 -7
- package/src/hooks/__tests__/useModularUIBasic.spec.js +2 -2
- package/src/hooks/__tests__/usePreference.spec.js +1 -1
- package/src/hooks/useAllFormsOnModel.js +2 -2
- package/src/hooks/useAuthentication.js +2 -2
- package/src/hooks/useContent.js +1 -1
- package/src/hooks/useDeepCompareEffect.js +1 -1
- package/src/hooks/useForm.js +4 -4
- package/src/hooks/useI18n.js +3 -3
- package/src/hooks/useModal.js +2 -2
- package/src/hooks/useModelCatalog.js +1 -1
- package/src/hooks/useModularUI.js +1 -1
- package/src/hooks/useModularUIBasic.js +1 -1
- package/src/hooks/useModularUIModel.js +1 -1
- package/src/hooks/useModularUIRequest.js +1 -1
- package/src/hooks/useNotification.js +2 -2
- package/src/hooks/usePreference.js +17 -7
- package/src/i18n/Locale.js +4 -4
- package/src/i18n/Locales.js +8 -8
- package/src/i18n/Message.js +2 -2
- package/src/i18n/__tests__/Locale.spec.js +3 -3
- package/src/i18n/__tests__/Locales.spec.js +15 -13
- package/src/i18n/withMessage.js +4 -4
- package/src/models/actions/ActionCollection.js +4 -4
- package/src/models/actions/ActionModel.js +4 -4
- package/src/models/actions/__tests__/ActionCollection.spec.js +3 -3
- package/src/models/actions/__tests__/ActionModel.spec.js +1 -1
- package/src/models/application/ApplicationModel.js +3 -3
- package/src/models/attributes/AttributeCollection.js +7 -7
- package/src/models/attributes/AttributeContent.js +9 -9
- package/src/models/attributes/AttributeDataHelper.js +9 -9
- package/src/models/attributes/AttributeModel.js +24 -24
- package/src/models/attributes/AttributeSetModel.js +1 -1
- package/src/models/attributes/BooleanAttributeModel.js +4 -4
- package/src/models/attributes/ChoiceAttributeModel.js +7 -7
- package/src/models/attributes/ChoiceAttributeOptionCollection.js +15 -15
- package/src/models/attributes/ChoiceAttributeOptionModel.js +19 -11
- package/src/models/attributes/CompositeAttributeChildCollection.js +10 -10
- package/src/models/attributes/CompositeAttributeModel.js +7 -7
- package/src/models/attributes/DatetimeAttributeModel.js +6 -6
- package/src/models/attributes/NumberAttributeModel.js +9 -9
- package/src/models/attributes/PasswordAttributeModel.js +8 -8
- package/src/models/attributes/StringAttributeModel.js +3 -3
- package/src/models/attributes/UploadAttributeModel.js +5 -5
- package/src/models/attributes/__tests__/AttributeCollection.spec.js +11 -11
- package/src/models/attributes/__tests__/AttributeContent.spec.js +7 -7
- package/src/models/attributes/__tests__/AttributeModel.spec.js +5 -5
- package/src/models/attributes/__tests__/AttributeSetModel.spec.js +2 -2
- package/src/models/attributes/__tests__/BooleanAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/ChoiceAttributeModel.spec.js +8 -8
- package/src/models/attributes/__tests__/ChoiceAttributeOptionCollection.spec.js +8 -8
- package/src/models/attributes/__tests__/ChoiceAttributeOptionModel.spec.js +1 -1
- package/src/models/attributes/__tests__/DateAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/DatetimeAttributeModel.spec.js +11 -11
- package/src/models/attributes/__tests__/HelptextAttributeModel.spec.js +3 -3
- package/src/models/attributes/__tests__/MemoAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/MoneyAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/NumberAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/PasswordAttributeModel.spec.js +1 -1
- package/src/models/attributes/__tests__/StringAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/TimeAttributeModel.spec.js +2 -2
- package/src/models/attributes/__tests__/TimestampModel.spec.js +2 -2
- package/src/models/attributes/__tests__/UploadAttributeModel.spec.js +4 -4
- package/src/models/attributes/__tests__/_createAttribute.spec.js +6 -6
- package/src/models/attributes/__tests__/createAttributeComposite.spec.js +3 -3
- package/src/models/attributes/__tests__/createAttributeDynamicSchema.spec.js +3 -3
- package/src/models/attributes/_createAttribute.js +5 -5
- package/src/models/attributes/input-constraints/ConstraintCollection.js +5 -5
- package/src/models/attributes/input-constraints/ConstraintModel.js +1 -1
- package/src/models/attributes/input-constraints/DateBoundaryConstraint.js +6 -6
- package/src/models/attributes/input-constraints/MandatoryConstraint.js +1 -1
- package/src/models/attributes/input-constraints/NumberBoundaryConstraint.js +6 -6
- package/src/models/attributes/input-constraints/NumberFormatConstraint.js +2 -2
- package/src/models/attributes/input-constraints/NumberGroupingConstraint.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/ConstraintModel.spec.js +1 -1
- package/src/models/attributes/input-constraints/__tests__/DateBoundaryConstraint.spec.js +6 -6
- package/src/models/attributes/input-constraints/__tests__/DateTimeDateFormatConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/DateTimeTimeFormatConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/DatetimeFormatConstraint.spec.js +5 -5
- package/src/models/attributes/input-constraints/__tests__/NumberBoundaryConstraint.spec.js +6 -6
- package/src/models/attributes/input-constraints/__tests__/NumberFormatConstraint.spec.js +3 -3
- package/src/models/attributes/input-constraints/__tests__/NumberGroupingConstraint.spec.js +2 -2
- package/src/models/attributes/input-constraints/__tests__/RegexConstraint.spec.js +1 -1
- package/src/models/attributes/input-constraints/__tests__/StringLengthConstraint.spec.js +4 -4
- package/src/models/attributes/layouthint-rules/BaseLayoutHintRule.js +4 -4
- package/src/models/attributes/layouthint-rules/DependentAttribute.js +15 -15
- package/src/models/attributes/layouthint-rules/LayoutHintRuleCollection.js +2 -2
- package/src/models/attributes/layouthint-rules/RemainingTotalUploadSize.js +2 -2
- package/src/models/attributes/layouthint-rules/__tests__/DependentAttribute.spec.js +22 -22
- package/src/models/attributes/layouthint-rules/__tests__/LayoutHintRuleCollection.spec.js +1 -1
- package/src/models/attributes/layouthint-rules/__tests__/RemainingTotalUploadSize.spec.js +4 -4
- package/src/models/base/BaseCollection.js +6 -6
- package/src/models/base/BaseModel.js +1 -1
- package/src/models/base/ResourceModel.js +5 -5
- package/src/models/base/__tests__/ResourceCollection.spec.js +1 -1
- package/src/models/caseview/CaseViewModel.js +4 -4
- package/src/models/caseview/__tests__/CaseViewModel.spec.js +3 -3
- package/src/models/concepts/BusinessScenarioModel.js +9 -9
- package/src/models/concepts/ConceptDetailModel.js +17 -17
- package/src/models/concepts/ConceptIndexModel.js +2 -2
- package/src/models/concepts/ConceptLinkModel.js +6 -4
- package/src/models/concepts/ConceptRelationCollection.js +5 -5
- package/src/models/concepts/SourceReferenceCollection.js +2 -2
- package/src/models/concepts/SourceReferenceModel.js +2 -2
- package/src/models/concepts/__tests__/ConceptDetailModel.spec.js +1 -1
- package/src/models/content/ContentIndexModel.js +3 -3
- package/src/models/content/ContentLinkModel.js +11 -9
- package/src/models/content/ContentModel.js +2 -2
- package/src/models/content/ContentTOCModel.js +4 -4
- package/src/models/content/SectionModel.js +4 -4
- package/src/models/content/SubSectionModel.js +2 -2
- package/src/models/content/__tests__/ContentModel.spec.js +16 -16
- package/src/models/contentconfiguration/ContentConfiguration.js +1 -1
- package/src/models/contentconfiguration/ContentConfigurationElements.js +5 -5
- package/src/models/contentconfiguration/ContentConfigurationEndResults.js +1 -1
- package/src/models/contentconfiguration/ContentConfigurationQuestions.js +2 -2
- package/src/models/contentconfiguration/__tests__/ContentConfigurationResults.spec.js +12 -12
- package/src/models/detail/DetailModel.js +5 -5
- package/src/models/error/ErrorCollection.js +4 -4
- package/src/models/error/ErrorModel.js +1 -1
- package/src/models/error/__tests__/ErrorModel.spec.js +1 -1
- package/src/models/filters/AssignmentFilterModel.js +3 -3
- package/src/models/filters/BaseFilterModel.js +3 -3
- package/src/models/filters/FilterCollection.js +5 -5
- package/src/models/filters/__tests__/AssignmentFilterModel.spec.js +4 -4
- package/src/models/filters/__tests__/FilterCollection.spec.js +11 -11
- package/src/models/filters/__tests__/FilterModel.spec.js +1 -1
- package/src/models/filters/__tests__/RangeFilterModel.spec.js +1 -1
- package/src/models/form/FormModel.js +39 -39
- package/src/models/form/FormObjectModel.js +16 -16
- package/src/models/form/__tests__/FormModel.instrument.spec.js +7 -7
- package/src/models/form/__tests__/FormModel.repeating.spec.js +2 -2
- package/src/models/form/__tests__/FormModel.selfhref.spec.js +1 -1
- package/src/models/form/__tests__/FormModel.spec.js +6 -6
- package/src/models/form/__tests__/FormResultData.spec.js +1 -1
- package/src/models/form/__tests__/FormWithContent.spec.js +3 -3
- package/src/models/grouping/GroupingModel.js +7 -7
- package/src/models/grouping/__tests__/GroupingModel.spec.js +2 -2
- package/src/models/href/Href.js +6 -6
- package/src/models/href/__tests__/Href.spec.js +18 -16
- package/src/models/layouthint/LayoutHintCollection.js +3 -3
- package/src/models/links/LinkCollection.js +4 -4
- package/src/models/links/LinkModel.js +3 -3
- package/src/models/links/__tests__/LinkModel.spec.js +4 -4
- package/src/models/links/normalizeLinkJSON.js +6 -6
- package/src/models/list/ListDetailModel.js +7 -7
- package/src/models/list/ListItemCollection.js +2 -2
- package/src/models/list/ListItemModel.js +2 -2
- package/src/models/list/ListModel.js +6 -6
- package/src/models/list/__tests__/ListDetailModel.spec.js +4 -4
- package/src/models/list/__tests__/ListItemCollection.spec.js +1 -1
- package/src/models/list/__tests__/ListModel.spec.js +3 -3
- package/src/models/list/__tests__/ListResultDetail.spec.js +3 -3
- package/src/models/lookup/LookupOptionCollection.js +1 -1
- package/src/models/lookup/LookupOptionsModel.js +4 -4
- package/src/models/lookup/__tests__/LookupOptionsModel.spec.js +3 -3
- package/src/models/modelcatalog/ModelCatalogModel.js +2 -2
- package/src/models/paging/PagingModel.js +1 -1
- package/src/models/paging/__tests__/PagingModel.spec.js +2 -2
- package/src/models/panels/GroupingPanelModel.js +5 -5
- package/src/models/panels/__tests__/GroupingPanelModel.spec.js +8 -8
- package/src/models/parameter/__tests__/Parameter.spec.js +5 -5
- package/src/models/process/ProcessStatusSettingsModel.js +1 -1
- package/src/models/process/__tests__/ProcessStatusSettingsModel.spec.js +1 -1
- package/src/models/resolveModel.js +4 -4
- package/src/models/sorting/SortingModel.js +4 -4
- package/src/models/sorting/__tests__/SortingModel.spec.js +3 -3
- package/src/models/tab/TabModel.js +3 -3
- package/src/models/tab/__tests__/TabModel.spec.js +5 -5
- package/src/models/taskgroup/TaskGroupModel.js +2 -2
- package/src/models/types.js +1 -1
- package/src/models/user/UserProfileModel.js +1 -1
- package/src/models/user/__tests__/UserModel.spec.js +2 -2
- package/src/models/user/__tests__/UserProfileModel.spec.js +2 -2
- package/src/models/user/__tests__/UserServicesModel.spec.js +1 -1
- package/src/modularui/CaptchaRequest.js +1 -1
- package/src/modularui/ModularUIRequest.js +26 -26
- package/src/modularui/UploadRequest.js +6 -6
- package/src/modularui/__tests__/ModularUIError.spec.js +1 -1
- package/src/modularui/__tests__/ModularUIRequest.spec.js +9 -9
- package/src/react/utils.js +1 -1
- package/src/react-client/client.js +11 -10
- package/src/react-client/contextPath.js +2 -2
- package/src/react-client/rehydrate.js +1 -1
- package/src/react-server/__tests__/serverUtil.spec.js +2 -2
- package/src/react-server/createSSRComplete.js +3 -3
- package/src/react-server/renderSSRComplete.js +4 -4
- package/src/react-server/renderSSRMinimal.js +1 -1
- package/src/react-server/requestInformation.js +2 -2
- package/src/react-server/serverUtil.js +8 -8
- package/src/react-theme/__tests__/createTheme.spec.js +4 -4
- package/src/react-theme/createTheme.js +1 -1
- package/src/react-theme/utils/__tests__/background.spec.js +2 -2
- package/src/react-theme/utils/__tests__/contrast.spec.js +1 -1
- package/src/react-theme/utils/__tests__/corners.spec.js +3 -3
- package/src/react-theme/utils/__tests__/spacers.spec.js +1 -1
- package/src/react-theme/utils/__tests__/themeProps.spec.js +9 -9
- package/src/react-theme/utils/colors.js +3 -3
- package/src/react-theme/utils/contrast.js +6 -6
- package/src/react-theme/utils/corners.js +2 -2
- package/src/react-theme/utils/spacers.js +2 -2
- package/src/react-theme/utils/themeProps.js +8 -8
- package/src/redux/_i18n/I18nActions.js +1 -1
- package/src/redux/_i18n/I18nReducer.js +2 -2
- package/src/redux/_i18n/__tests__/reducer.spec.js +2 -2
- package/src/redux/_modularui/ModularUIActions.js +8 -8
- package/src/redux/_modularui/ModularUIConnector.js +4 -4
- package/src/redux/_modularui/ModularUIMiddleware.js +6 -6
- package/src/redux/_modularui/ModularUIReducer.js +5 -5
- package/src/redux/_modularui/ModularUISelectors.js +11 -11
- package/src/redux/_modularui/ModularUIUtils.js +1 -1
- package/src/redux/_modularui/__tests__/actions.spec.js +1 -1
- package/src/redux/_modularui/__tests__/reducer.spec.js +13 -13
- package/src/redux/_modularui/__tests__/selectors.spec.js +3 -3
- package/src/redux/_modularui/types.js +4 -4
- package/src/redux/_modularui/withModularUI.js +3 -3
- package/src/redux/_router/RouterActions.js +3 -3
- package/src/redux/_router/RouterConnectors.js +5 -5
- package/src/redux/_router/RouterReducer.js +1 -1
- package/src/redux/_router/__tests__/reducer.spec.js +2 -2
- package/src/redux/actions/Application.js +1 -1
- package/src/redux/actions/Authorization.js +1 -1
- package/src/redux/actions/Error.js +3 -3
- package/src/redux/actions/FormAttributeSet.js +2 -2
- package/src/redux/actions/FormAttributeSetRepeatable.js +3 -3
- package/src/redux/actions/FormAutosave.js +1 -1
- package/src/redux/actions/FormAutosubmit.js +1 -1
- package/src/redux/actions/FormValidations.js +3 -3
- package/src/redux/actions/Notification.js +4 -4
- package/src/redux/actions/Preferences.js +11 -11
- package/src/redux/actions/ProgressIndicator.js +1 -1
- package/src/redux/actions/SignIn.js +3 -3
- package/src/redux/actions/__tests__/Authorization.spec.js +2 -2
- package/src/redux/actions/__tests__/Error-server.spec.js +13 -13
- package/src/redux/actions/__tests__/Error.spec.js +6 -6
- package/src/redux/actions/__tests__/Notification.spec.js +1 -1
- package/src/redux/actions/__tests__/Preferences.spec.js +2 -2
- package/src/redux/connectors/Application.js +1 -1
- package/src/redux/connectors/Breadcrumb.js +1 -1
- package/src/redux/connectors/CaseView.js +1 -1
- package/src/redux/connectors/ConceptDetail.js +1 -1
- package/src/redux/connectors/ContentBrowser.js +1 -1
- package/src/redux/connectors/ContentDetail.js +1 -1
- package/src/redux/connectors/ContentDetailSection.js +2 -2
- package/src/redux/connectors/Form.js +5 -5
- package/src/redux/connectors/FormAttributeSet.js +6 -6
- package/src/redux/connectors/ListDetail.js +1 -1
- package/src/redux/connectors/Modal.js +1 -1
- package/src/redux/connectors/ModelCatalog.js +1 -1
- package/src/redux/connectors/Notification.js +1 -1
- package/src/redux/connectors/PanelRenderer.js +2 -2
- package/src/redux/connectors/Preferences.js +3 -3
- package/src/redux/connectors/Progress.js +1 -1
- package/src/redux/connectors/ProgressIndicator.js +1 -1
- package/src/redux/connectors/QuickSearch.js +2 -2
- package/src/redux/connectors/SignIn.js +1 -1
- package/src/redux/connectors/SignOut.js +1 -1
- package/src/redux/connectors/Tab.js +1 -1
- package/src/redux/reducers/AuthReducer.js +1 -1
- package/src/redux/reducers/ErrorReducer.js +1 -1
- package/src/redux/reducers/ModalsReducer.js +1 -1
- package/src/redux/reducers/NotificationReducer.js +1 -1
- package/src/redux/reducers/PreferencesReducer.js +1 -1
- package/src/redux/reducers/ProgressIndicatorReducer.js +1 -1
- package/src/redux/reducers/__tests__/AuthReducer.spec.js +10 -10
- package/src/redux/reducers/__tests__/ErrorReducer.spec.js +1 -1
- package/src/redux/reducers/__tests__/ModalsReducer.spec.js +3 -3
- package/src/redux/reducers/__tests__/NotificationReducer.spec.js +3 -3
- package/src/redux/reducers/__tests__/PreferencesReducer.spec.js +2 -2
- package/src/redux/reducers/__tests__/ProgressIndicatorReducer.spec.js +8 -8
- package/src/redux/store/beforeRenderHooks.js +1 -1
- package/src/redux/store/configureStore.js +3 -3
- package/src/utils/browser/Cookies.js +1 -1
- package/src/utils/browser/__tests__/Cookies.spec.js +1 -1
- package/src/utils/datetime/DateTimeUtil.js +15 -15
- package/src/utils/datetime/__tests__/DateTime.spec.js +84 -81
- package/src/utils/fetch/__tests__/xhr.spec.js +2 -2
- package/src/utils/fetch/universalFetch.js +1 -1
- package/src/utils/fetch/xhr.js +6 -6
- package/src/utils/helpers/__tests__/sanitizeHTML.spec.js +8 -8
- package/src/utils/helpers/sanitizeHtml.js +3 -3
- package/src/utils/helpers/text.js +1 -1
- package/src/utils/number/DecimalFormat.js +2 -2
- package/src/utils/number/__tests__/formatValue.spec.js +1 -1
- package/src/utils/number/formatValue.js +2 -2
- package/src/utils/number/parseNumbers.js +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadRequest.js","names":["_constants","require","_xhr","_interopRequireDefault","_ErrorModel","UploadRequest","constructor","uploadConstraints","progressHandler","_defineProperty2","default","_uploadConstraints","_progressHandler","getFileExtension","file","name","split","pop","toLowerCase","isNotAllowedFileType","allowedFileTypes","fileTypes","length","fileExtension","some","fileType","_context","_includes","extensions","call","exceedsMaxFileSize","maxFileSize","fileSize","size","uploadFile","error","_promise","reject","ErrorModel","extension","join","xhr","url","getUploadPath","method","HTTP_METHODS","POST","headers","type","encodeURIComponent","toString","onProgress","e","lengthComputable","progress","Math","ceil","loaded","total","data","then","response","token","_default","exports"],"sources":["../../src/modularui/UploadRequest.js"],"sourcesContent":["// @flow\nimport { getUploadPath, HTTP_METHODS } from \"../constants\";\n\nimport xhr from \"../utils/fetch/xhr\";\n\nimport type {\n FilesizeConstraintsType,\n FiletypeConstraintsType,\n} from \"../models\";\nimport ErrorModel from \"../models/error/ErrorModel\";\n\ntype ProgressHandler = (file: File, uploadInfo: Object) => void;\n\ntype UploadResponse = {\n token: string,\n};\n\n/**\n * Upload a file to the upload file service of Be Informed\n */\nclass UploadRequest {\n _uploadConstraints: {\n fileTypes: FiletypeConstraintsType,\n maxFileSize: FilesizeConstraintsType,\n acceptedFiles: Array<string>,\n };\n _progressHandler: ProgressHandler;\n\n constructor(\n uploadConstraints: {\n fileTypes: FiletypeConstraintsType,\n maxFileSize: FilesizeConstraintsType,\n acceptedFiles: Array<string>,\n },\n progressHandler: ProgressHandler
|
|
1
|
+
{"version":3,"file":"UploadRequest.js","names":["_constants","require","_xhr","_interopRequireDefault","_ErrorModel","UploadRequest","constructor","uploadConstraints","progressHandler","_defineProperty2","default","_uploadConstraints","_progressHandler","getFileExtension","file","name","split","pop","toLowerCase","isNotAllowedFileType","allowedFileTypes","fileTypes","length","fileExtension","some","fileType","_context","_includes","extensions","call","exceedsMaxFileSize","maxFileSize","fileSize","size","uploadFile","error","_promise","reject","ErrorModel","extension","join","xhr","url","getUploadPath","method","HTTP_METHODS","POST","headers","type","encodeURIComponent","toString","onProgress","e","lengthComputable","progress","Math","ceil","loaded","total","data","then","response","token","_default","exports"],"sources":["../../src/modularui/UploadRequest.js"],"sourcesContent":["// @flow\nimport { getUploadPath, HTTP_METHODS } from \"../constants\";\n\nimport xhr from \"../utils/fetch/xhr\";\n\nimport type {\n FilesizeConstraintsType,\n FiletypeConstraintsType,\n} from \"../models\";\nimport ErrorModel from \"../models/error/ErrorModel\";\n\ntype ProgressHandler = (file: File, uploadInfo: Object) => void;\n\ntype UploadResponse = {\n token: string,\n};\n\n/**\n * Upload a file to the upload file service of Be Informed\n */\nclass UploadRequest {\n _uploadConstraints: {\n fileTypes: FiletypeConstraintsType,\n maxFileSize: FilesizeConstraintsType,\n acceptedFiles: Array<string>,\n };\n _progressHandler: ProgressHandler;\n\n constructor(\n uploadConstraints: {\n fileTypes: FiletypeConstraintsType,\n maxFileSize: FilesizeConstraintsType,\n acceptedFiles: Array<string>,\n },\n progressHandler: ProgressHandler,\n ) {\n this._uploadConstraints = uploadConstraints;\n this._progressHandler = progressHandler;\n }\n\n /**\n */\n getFileExtension(file: File): string {\n return file.name.split(\".\").pop().toLowerCase();\n }\n\n /**\n */\n isNotAllowedFileType(file: File): boolean {\n const allowedFileTypes = this._uploadConstraints.fileTypes;\n\n if (allowedFileTypes.length > 0) {\n const fileExtension = this.getFileExtension(file);\n\n return !allowedFileTypes.some((fileType) =>\n fileType.extensions.includes(fileExtension),\n );\n }\n\n return false;\n }\n\n /**\n */\n exceedsMaxFileSize(file: File): boolean {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n return maxFileSize > -1 && file.size > maxFileSize;\n }\n\n /**\n */\n uploadFile(file: File): Promise<UploadResponse> {\n const maxFileSize = this._uploadConstraints?.maxFileSize?.fileSize ?? -1;\n\n if (this.exceedsMaxFileSize(file)) {\n this._progressHandler(file, { error: \"errorExceedsMaxFileSize\" });\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.MaxFileSizeExceeded\",\n \"Maximum file upload size is ${max-filesize}\",\n {\n \"max-filesize\": maxFileSize,\n },\n true,\n ),\n );\n }\n\n if (this.isNotAllowedFileType(file)) {\n this._progressHandler(file, { error: \"errorExtensionNotAllowed\" });\n return Promise.reject(\n new ErrorModel(\n \"Constraint.File.InvalidExtension\",\n \"Allowed extensions are: ${extensions}\",\n {\n extension: this.getFileExtension(file),\n extensions: this._uploadConstraints.fileTypes.join(\", \"),\n },\n true,\n ),\n );\n }\n\n return xhr({\n url: getUploadPath(),\n method: HTTP_METHODS.POST,\n headers: {\n \"Content-Type\": file.type,\n \"x-filename\": encodeURIComponent(file.name),\n \"x-filesize\": file.size.toString(),\n },\n onProgress: (e: ProgressEvent) => {\n if (this._progressHandler && e.lengthComputable) {\n this._progressHandler(file, {\n progress: Math.ceil((e.loaded / e.total) * 100),\n });\n }\n },\n data: file,\n }).then((response) => {\n this._progressHandler(file, { progress: 100, token: response.token });\n return response;\n });\n }\n}\n\nexport default UploadRequest;\n"],"mappings":";;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAMA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAQA;AACA;AACA;AACA,MAAMI,aAAa,CAAC;EAQlBC,WAAWA,CACTC,iBAIC,EACDC,eAAgC,EAChC;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IACA,IAAI,CAACC,kBAAkB,GAAGJ,iBAAiB;IAC3C,IAAI,CAACK,gBAAgB,GAAGJ,eAAe;EACzC;;EAEA;AACF;EACEK,gBAAgBA,CAACC,IAAU,EAAU;IACnC,OAAOA,IAAI,CAACC,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;EACjD;;EAEA;AACF;EACEC,oBAAoBA,CAACL,IAAU,EAAW;IACxC,MAAMM,gBAAgB,GAAG,IAAI,CAACT,kBAAkB,CAACU,SAAS;IAE1D,IAAID,gBAAgB,CAACE,MAAM,GAAG,CAAC,EAAE;MAC/B,MAAMC,aAAa,GAAG,IAAI,CAACV,gBAAgB,CAACC,IAAI,CAAC;MAEjD,OAAO,CAACM,gBAAgB,CAACI,IAAI,CAAEC,QAAQ;QAAA,IAAAC,QAAA;QAAA,OACrC,IAAAC,SAAA,CAAAjB,OAAA,EAAAgB,QAAA,GAAAD,QAAQ,CAACG,UAAU,EAAAC,IAAA,CAAAH,Q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,CAAC;MACpBC,MAAM,EAAEC,uBAAY,CAACC,IAAI;MACzBC,OAAO,EAAE;QACP,cAAc,EAAEjC,IAAI,CAACkC,IAAI;QACzB,YAAY,EAAEC,kBAAkB,CAACnC,IAAI,CAACC,IAAI,CAAC;QAC3C,YAAY,EAAED,IAAI,CAACmB,IAAI,CAACiB,QAAQ,CAAC;MACnC,CAAC;MACDC,UAAU,EAAGC,CAAgB,IAAK;QAChC,IAAI,IAAI,CAACxC,gBAAgB,IAAIwC,CAAC,CAACC,gBAAgB,EAAE;UAC/C,IAAI,CAACzC,gBAAgB,CAACE,IAAI,EAAE;YAC1BwC,QAAQ,EAAEC,IAAI,CAACC,IAAI,CAAEJ,CAAC,CAACK,MAAM,GAAGL,CAAC,CAACM,KAAK,GAAI,GAAG;UAChD,CAAC,CAAC;QACJ;MACF,CAAC;MACDC,IAAI,EAAE7C;IACR,CAAC,CAAC,CAAC8C,IAAI,CAAEC,QAAQ,IAAK;MACpB,IAAI,CAACjD,gBAAgB,CAACE,IAAI,EAAE;QAAEwC,QAAQ,EAAE,GAAG;QAAEQ,KAAK,EAAED,QAAQ,CAACC;MAAM,CAAC,CAAC;MACrE,OAAOD,QAAQ;IACjB,CAAC,CAAC;EACJ;AACF;AAAC,IAAAE,QAAA,GAEc1D,aAAa;AAAA2D,OAAA,CAAAtD,OAAA,GAAAqD,QAAA"}
|
|
@@ -119,7 +119,7 @@ describe("modularUIRequest", () => {
|
|
|
119
119
|
const requestWithTargetModel = new ModularUIRequest("/");
|
|
120
120
|
requestWithTargetModel.targetModel = ApplicationModel;
|
|
121
121
|
expect(() => requestWithTargetModel.createModel()).toThrow(
|
|
122
|
-
IllegalArgumentException
|
|
122
|
+
IllegalArgumentException,
|
|
123
123
|
);
|
|
124
124
|
});
|
|
125
125
|
|
|
@@ -136,15 +136,15 @@ describe("modularUIRequest", () => {
|
|
|
136
136
|
const request = new ModularUIRequest("/");
|
|
137
137
|
|
|
138
138
|
expect(() => request.processContributionsService()).toThrow(
|
|
139
|
-
IllegalArgumentException
|
|
139
|
+
IllegalArgumentException,
|
|
140
140
|
);
|
|
141
141
|
|
|
142
142
|
expect(() => request.processContributionsService("string")).toThrow(
|
|
143
|
-
IllegalArgumentException
|
|
143
|
+
IllegalArgumentException,
|
|
144
144
|
);
|
|
145
145
|
|
|
146
146
|
expect(() =>
|
|
147
|
-
request.processContributionsService({ error: "contributions error" })
|
|
147
|
+
request.processContributionsService({ error: "contributions error" }),
|
|
148
148
|
).toThrow(ModularUIError);
|
|
149
149
|
|
|
150
150
|
request.processContributionsService({
|
|
@@ -161,21 +161,21 @@ describe("modularUIRequest", () => {
|
|
|
161
161
|
const request = new ModularUIRequest("/");
|
|
162
162
|
|
|
163
163
|
expect(() => request.processDataService()).toThrow(
|
|
164
|
-
IllegalArgumentException
|
|
164
|
+
IllegalArgumentException,
|
|
165
165
|
);
|
|
166
166
|
|
|
167
167
|
expect(() => request.processDataService("string")).toThrow(
|
|
168
|
-
IllegalArgumentException
|
|
168
|
+
IllegalArgumentException,
|
|
169
169
|
);
|
|
170
170
|
|
|
171
171
|
expect(() => request.processDataService({ error: "data error" })).toThrow(
|
|
172
|
-
IllegalArgumentException
|
|
172
|
+
IllegalArgumentException,
|
|
173
173
|
);
|
|
174
174
|
|
|
175
175
|
expect(() =>
|
|
176
176
|
request.processDataService({
|
|
177
177
|
error: { properties: { message: "data error" } },
|
|
178
|
-
})
|
|
178
|
+
}),
|
|
179
179
|
).toThrow(ModularUIError);
|
|
180
180
|
|
|
181
181
|
expect(() => {
|
|
@@ -223,7 +223,7 @@ describe("modularUIRequest", () => {
|
|
|
223
223
|
it("throws when contributions href is missing", () => {
|
|
224
224
|
const request = new ModularUIRequest("/");
|
|
225
225
|
expect(() => request.fetchContributionsService()).toThrow(
|
|
226
|
-
IllegalStateException
|
|
226
|
+
IllegalStateException,
|
|
227
227
|
);
|
|
228
228
|
});
|
|
229
229
|
|
package/lib/react/utils.js.flow
CHANGED
|
@@ -6,7 +6,7 @@ import type { ComponentType, Ref } from "react";
|
|
|
6
6
|
export const getDisplayName = (
|
|
7
7
|
WrappedComponent: ComponentType<any>,
|
|
8
8
|
defaultName: string = "Component",
|
|
9
|
-
contextId?: string
|
|
9
|
+
contextId?: string,
|
|
10
10
|
): string => {
|
|
11
11
|
const componentName =
|
|
12
12
|
WrappedComponent.displayName || WrappedComponent.name || defaultName;
|
package/lib/react/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["getDisplayName","WrappedComponent","defaultName","arguments","length","undefined","contextId","componentName","displayName","name","exports","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
|
|
1
|
+
{"version":3,"file":"utils.js","names":["getDisplayName","WrappedComponent","defaultName","arguments","length","undefined","contextId","componentName","displayName","name","exports","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,MAAMA,cAAc,GAAG,SAAAA,CAC5BC,gBAAoC,EAGzB;EAAA,IAFXC,WAAmB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,WAAW;EAAA,IACjCG,SAAkB,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAElB,MAAME,aAAa,GACjBN,gBAAgB,CAACO,WAAW,IAAIP,gBAAgB,CAACQ,IAAI,IAAIP,WAAW;EAEtE,IAAII,SAAS,EAAE;IACb,OAAQ,GAAEC,aAAc,IAAGD,SAAU,GAAE;EACzC;EAEA,OAAOC,aAAa;AACtB,CAAC;;AAED;AACA;AADAG,OAAA,CAAAV,cAAA,GAAAA,cAAA;AAEO,MAAMW,SAAS,GACXC,IAAmB,IAC3BC,KAAK,IAAK;EACTD,IAAI,CAACE,OAAO,CAAEC,GAAG,IAAK;IACpB,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACF,KAAK,CAAC;IACZ,CAAC,MAAM,IAAIE,GAAG,IAAI,IAAI,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;MACjDA,GAAG,CAACC,OAAO,GAAGH,KAAK;IACrB;EACF,CAAC,CAAC;AACJ,CAAC;AAACH,OAAA,CAAAC,SAAA,GAAAA,SAAA"}
|
|
@@ -23,6 +23,7 @@ var _exceptions = require("../exceptions");
|
|
|
23
23
|
var _Init = require("./Init");
|
|
24
24
|
var _beforeRenderHooks = require("../redux/store/beforeRenderHooks");
|
|
25
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
26
|
+
// eslint-disable-next-line react/no-deprecated
|
|
26
27
|
/*
|
|
27
28
|
* deserialize serialized data from the server to provide a smooth dehydration.
|
|
28
29
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// @flow
|
|
2
|
+
// eslint-disable-next-line react/no-deprecated
|
|
2
3
|
import { hydrate, render } from "react-dom";
|
|
3
4
|
|
|
4
5
|
import { has } from "../utils/helpers/objects";
|
|
@@ -43,7 +44,7 @@ import type { Props as FallbackProps } from "../react/ErrorBoundaryFallback";
|
|
|
43
44
|
type RenderFunction = () => ReactElement<ElementType>;
|
|
44
45
|
type MountFunction = (
|
|
45
46
|
applicationNode: Element,
|
|
46
|
-
element: ReactElement<ElementType
|
|
47
|
+
element: ReactElement<ElementType>,
|
|
47
48
|
) => void;
|
|
48
49
|
type Props = {
|
|
49
50
|
customReducers?: CustomReducers,
|
|
@@ -67,7 +68,7 @@ const parseDataToJSON = (data: string) => {
|
|
|
67
68
|
|
|
68
69
|
const getDataFromServer = () => {
|
|
69
70
|
const dataElement = document.querySelector(
|
|
70
|
-
'script[type="application/json"][data-app-state="app-json"]'
|
|
71
|
+
'script[type="application/json"][data-app-state="app-json"]',
|
|
71
72
|
);
|
|
72
73
|
|
|
73
74
|
if (!dataElement) {
|
|
@@ -100,7 +101,7 @@ export const setUnhandledRejectionEvent = (store: ReduxStore) => {
|
|
|
100
101
|
*/
|
|
101
102
|
export const setupClient = (
|
|
102
103
|
customReducers: CustomReducers = {},
|
|
103
|
-
beforeRenderHooks: ?Array<BeforeRenderHook
|
|
104
|
+
beforeRenderHooks: ?Array<BeforeRenderHook>,
|
|
104
105
|
): { store: ReduxStore, routerHistory: RouterHistory } => {
|
|
105
106
|
if (typeof window.contextPath === "undefined") {
|
|
106
107
|
throw new Error("Missing contextPath on window object");
|
|
@@ -118,7 +119,7 @@ export const setupClient = (
|
|
|
118
119
|
const { routerHistory, store } = configureStore(
|
|
119
120
|
browserHistory,
|
|
120
121
|
customReducers,
|
|
121
|
-
rehydrate(data)
|
|
122
|
+
rehydrate(data),
|
|
122
123
|
);
|
|
123
124
|
|
|
124
125
|
setAllContentInDataSetting(store.getState());
|
|
@@ -166,13 +167,13 @@ export const addContentLoadedEvent = (
|
|
|
166
167
|
theme?: Theme | Array<Theme>,
|
|
167
168
|
render: RenderFunction,
|
|
168
169
|
ErrorFallbackComponent?: ComponentType<FallbackProps>,
|
|
169
|
-
mount: MountFunction
|
|
170
|
+
mount: MountFunction,
|
|
170
171
|
) => {
|
|
171
172
|
window.addEventListener("DOMContentLoaded", () => {
|
|
172
173
|
const applicationNode = document.querySelector("#application");
|
|
173
174
|
if (!applicationNode) {
|
|
174
175
|
throw new Error(
|
|
175
|
-
"No DOM element with id application found to attach client to"
|
|
176
|
+
"No DOM element with id application found to attach client to",
|
|
176
177
|
);
|
|
177
178
|
}
|
|
178
179
|
|
|
@@ -186,7 +187,7 @@ export const addContentLoadedEvent = (
|
|
|
186
187
|
ErrorFallbackComponent={ErrorFallbackComponent}
|
|
187
188
|
>
|
|
188
189
|
{render()}
|
|
189
|
-
</Init
|
|
190
|
+
</Init>,
|
|
190
191
|
);
|
|
191
192
|
});
|
|
192
193
|
};
|
|
@@ -195,7 +196,7 @@ export const addContentLoadedEvent = (
|
|
|
195
196
|
*/
|
|
196
197
|
const mountClient = (
|
|
197
198
|
applicationNode: Element,
|
|
198
|
-
element: ReactElement<ElementType
|
|
199
|
+
element: ReactElement<ElementType>,
|
|
199
200
|
) => {
|
|
200
201
|
const isSSR = applicationNode.querySelector(".application");
|
|
201
202
|
if (isSSR) {
|
|
@@ -218,7 +219,7 @@ export const client = ({
|
|
|
218
219
|
}: Props) => {
|
|
219
220
|
const { store, routerHistory } = setupClient(
|
|
220
221
|
customReducers,
|
|
221
|
-
beforeRenderHooks
|
|
222
|
+
beforeRenderHooks,
|
|
222
223
|
);
|
|
223
224
|
|
|
224
225
|
addContentLoadedEvent(
|
|
@@ -227,6 +228,6 @@ export const client = ({
|
|
|
227
228
|
theme,
|
|
228
229
|
render,
|
|
229
230
|
ErrorFallbackComponent,
|
|
230
|
-
mount ?? mountClient
|
|
231
|
+
mount ?? mountClient,
|
|
231
232
|
);
|
|
232
233
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":["_reactDom","require","_objects","_setimmediate","_interopRequireDefault","_Cache","_history","_configureStore","_rehydrate","_Settings","_Preferences","_Notification","_Error","_SignIn","_RouterActions","_exceptions","_Init","_beforeRenderHooks","_jsxRuntime","parseDataToJSON","data","JSON","parse","error","JsonParseException","getDataFromServer","_context","dataElement","document","querySelector","Error","_trim","default","textContent","call","setUnhandledRejectionEvent","store","window","onunhandledrejection","event","detail","setImmediate","errorMessage","reason","message","toString","dispatch","showXHRErrorNotification","exports","setupClient","customReducers","arguments","length","undefined","beforeRenderHooks","contextPath","Cache","clear","browserHistory","createBrowserHistory","basename","getBasePath","routerHistory","configureStore","rehydrate","setAllContentInDataSetting","getState","setLoginPreferences","loadOtherBrowserTabs","getItem","loginSuccess","has","FetchException","response","handleError","listen","location","action","locationChange","body","className","handleBeforeRenderHooks","addContentLoadedEvent","theme","render","ErrorFallbackComponent","mount","addEventListener","applicationNode","jsx","Init","children","mountClient","element","isSSR","hydrate","client","_ref"],"sources":["../../src/react-client/client.js"],"sourcesContent":["// @flow\nimport { hydrate, render } 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 { getBasePath } from \"../constants/Settings\";\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/RouterActions\";\n\nimport { JsonParseException, FetchException } from \"../exceptions\";\n\nimport { Init } from \"./Init\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport type {\n ComponentType,\n Element as ReactElement,\n ElementType,\n} from \"react\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { CustomReducers, ReduxStore } from \"../redux/types\";\nimport type { RouterHistory } from \"react-router\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\ntype RenderFunction = () => ReactElement<ElementType>;\ntype MountFunction = (\n applicationNode: Element,\n element: ReactElement<ElementType>\n) => void;\ntype Props = {\n customReducers?: CustomReducers,\n theme?: Theme | Array<Theme>,\n render: RenderFunction,\n mount: MountFunction,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/*\n * deserialize serialized data from the server to provide a smooth dehydration.\n */\nconst parseDataToJSON = (data: string) => {\n try {\n return JSON.parse(data);\n } catch (error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n\nconst getDataFromServer = () => {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]'\n );\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 return parseDataToJSON(dataElement.textContent);\n};\n\n/**\n */\nexport const setUnhandledRejectionEvent = (store: ReduxStore) => {\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\n/**\n */\nexport const setupClient = (\n customReducers: CustomReducers = {},\n beforeRenderHooks: ?Array<BeforeRenderHook>\n): { store: ReduxStore, routerHistory: RouterHistory } => {\n if (typeof window.contextPath === \"undefined\") {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n const data = getDataFromServer();\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n // $FlowExpectedError\n const browserHistory: RouterHistory = createBrowserHistory({\n basename: getBasePath(),\n });\n const { routerHistory, 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 routerHistory.listen((location, action) => {\n store.dispatch(locationChange(location, action));\n });\n\n setUnhandledRejectionEvent(store);\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n if (beforeRenderHooks) {\n handleBeforeRenderHooks(beforeRenderHooks, { store });\n }\n\n return { store, routerHistory };\n};\n\n/**\n */\nexport const addContentLoadedEvent = (\n store: ReduxStore,\n routerHistory: RouterHistory,\n theme?: Theme | Array<Theme>,\n render: RenderFunction,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n mount: MountFunction\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (!applicationNode) {\n throw new Error(\n \"No DOM element with id application found to attach client to\"\n );\n }\n\n mount(\n applicationNode,\n <Init\n store={store}\n routerHistory={routerHistory}\n contextPath={window.contextPath}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>\n );\n });\n};\n\n/**\n */\nconst mountClient = (\n applicationNode: Element,\n element: ReactElement<ElementType>\n) => {\n const isSSR = applicationNode.querySelector(\".application\");\n if (isSSR) {\n hydrate(element, applicationNode);\n } else {\n render(element, applicationNode);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, setup redux store and caches, add unhandledRejectionEvent, used client side when JavaScript is enabled.\n */\nexport const client = ({\n customReducers,\n theme,\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n mount,\n}: Props) => {\n const { store, routerHistory } = setupClient(\n customReducers,\n beforeRenderHooks\n );\n\n addContentLoadedEvent(\n store,\n routerHistory,\n theme,\n render,\n ErrorFallbackComponent,\n mount ?? mountClient\n );\n};\n"],"mappings":";;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AAE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tBC,KAAK,IAAIM,WACX,CAAC;AACH,CAAC;AAAC5C,OAAA,CAAAgD,MAAA,GAAAA,MAAA"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["_reactDom","require","_objects","_setimmediate","_interopRequireDefault","_Cache","_history","_configureStore","_rehydrate","_Settings","_Preferences","_Notification","_Error","_SignIn","_RouterActions","_exceptions","_Init","_beforeRenderHooks","_jsxRuntime","parseDataToJSON","data","JSON","parse","error","JsonParseException","getDataFromServer","_context","dataElement","document","querySelector","Error","_trim","default","textContent","call","setUnhandledRejectionEvent","store","window","onunhandledrejection","event","detail","setImmediate","errorMessage","reason","message","toString","dispatch","showXHRErrorNotification","exports","setupClient","customReducers","arguments","length","undefined","beforeRenderHooks","contextPath","Cache","clear","browserHistory","createBrowserHistory","basename","getBasePath","routerHistory","configureStore","rehydrate","setAllContentInDataSetting","getState","setLoginPreferences","loadOtherBrowserTabs","getItem","loginSuccess","has","FetchException","response","handleError","listen","location","action","locationChange","body","className","handleBeforeRenderHooks","addContentLoadedEvent","theme","render","ErrorFallbackComponent","mount","addEventListener","applicationNode","jsx","Init","children","mountClient","element","isSSR","hydrate","client","_ref"],"sources":["../../src/react-client/client.js"],"sourcesContent":["// @flow\n// eslint-disable-next-line react/no-deprecated\nimport { hydrate, render } 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 { getBasePath } from \"../constants/Settings\";\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/RouterActions\";\n\nimport { JsonParseException, FetchException } from \"../exceptions\";\n\nimport { Init } from \"./Init\";\n\nimport { handleBeforeRenderHooks } from \"../redux/store/beforeRenderHooks\";\n\nimport type {\n ComponentType,\n Element as ReactElement,\n ElementType,\n} from \"react\";\nimport type { Theme } from \"../react-theme/types\";\nimport type { CustomReducers, ReduxStore } from \"../redux/types\";\nimport type { RouterHistory } from \"react-router\";\nimport type { BeforeRenderHook } from \"../redux/store/beforeRenderHooks\";\nimport type { Props as FallbackProps } from \"../react/ErrorBoundaryFallback\";\n\ntype RenderFunction = () => ReactElement<ElementType>;\ntype MountFunction = (\n applicationNode: Element,\n element: ReactElement<ElementType>,\n) => void;\ntype Props = {\n customReducers?: CustomReducers,\n theme?: Theme | Array<Theme>,\n render: RenderFunction,\n mount: MountFunction,\n beforeRenderHooks?: Array<BeforeRenderHook>,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n};\n\n/*\n * deserialize serialized data from the server to provide a smooth dehydration.\n */\nconst parseDataToJSON = (data: string) => {\n try {\n return JSON.parse(data);\n } catch (error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n\nconst getDataFromServer = () => {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]',\n );\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 return parseDataToJSON(dataElement.textContent);\n};\n\n/**\n */\nexport const setUnhandledRejectionEvent = (store: ReduxStore) => {\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\n/**\n */\nexport const setupClient = (\n customReducers: CustomReducers = {},\n beforeRenderHooks: ?Array<BeforeRenderHook>,\n): { store: ReduxStore, routerHistory: RouterHistory } => {\n if (typeof window.contextPath === \"undefined\") {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n const data = getDataFromServer();\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n // $FlowExpectedError\n const browserHistory: RouterHistory = createBrowserHistory({\n basename: getBasePath(),\n });\n const { routerHistory, 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 routerHistory.listen((location, action) => {\n store.dispatch(locationChange(location, action));\n });\n\n setUnhandledRejectionEvent(store);\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n if (beforeRenderHooks) {\n handleBeforeRenderHooks(beforeRenderHooks, { store });\n }\n\n return { store, routerHistory };\n};\n\n/**\n */\nexport const addContentLoadedEvent = (\n store: ReduxStore,\n routerHistory: RouterHistory,\n theme?: Theme | Array<Theme>,\n render: RenderFunction,\n ErrorFallbackComponent?: ComponentType<FallbackProps>,\n mount: MountFunction,\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (!applicationNode) {\n throw new Error(\n \"No DOM element with id application found to attach client to\",\n );\n }\n\n mount(\n applicationNode,\n <Init\n store={store}\n routerHistory={routerHistory}\n contextPath={window.contextPath}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>,\n );\n });\n};\n\n/**\n */\nconst mountClient = (\n applicationNode: Element,\n element: ReactElement<ElementType>,\n) => {\n const isSSR = applicationNode.querySelector(\".application\");\n if (isSSR) {\n hydrate(element, applicationNode);\n } else {\n render(element, applicationNode);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, setup redux store and caches, add unhandledRejectionEvent, used client side when JavaScript is enabled.\n */\nexport const client = ({\n customReducers,\n theme,\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n mount,\n}: Props) => {\n const { store, routerHistory } = setupClient(\n customReducers,\n beforeRenderHooks,\n );\n\n addContentLoadedEvent(\n store,\n routerHistory,\n theme,\n render,\n ErrorFallbackComponent,\n mount ?? mountClient,\n );\n};\n"],"mappings":";;;;;;;;AAEA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAH,sBAAA,CAAAH,OAAA;AAEA,IAAAO,UAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAEA,IAAAS,YAAA,GAAAT,OAAA;AAIA,IAAAU,aAAA,GAAAV,OAAA;AAEA,IAAAW,MAAA,GAAAX,OAAA;AACA,IAAAY,OAAA,GAAAZ,OAAA;AAEA,IAAAa,cAAA,GAAAb,OAAA;AAEA,IAAAc,WAAA,GAAAd,OAAA;AAEA,IAAAe,KAAA,GAAAf,OAAA;AAEA,IAAAgB,kBAAA,GAAAhB,OAAA;AAA2E,IAAAiB,WAAA,GAAAjB,OAAA;AA7B3E;AAwDA;AACA;AACA;AACA,MAAMkB,eAAe,GAAIC,IAAY,IAAK;EACxC,IAAI;IACF,OAAOC,IAAI,CAACC,KAAK,CAACF,IAAI,CAAC;EACzB,CAAC,CAAC,OAAOG,KAAK,EAAE;IACd,MAAM,IAAIC,8BAAkB,CAAE,yBAAwBJ,IAAK,EAAC,CAAC;EAC/D;AACF,CAAC;AAED,MAAMK,iBAAiB,GAAGA,CAAA,KAAM;EAAA,IAAAC,QAAA;EAC9B,MAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAa,CACxC,4DACF,CAAC;EAED,IAAI,CAACF,WAAW,EA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;;AAED;AACA;AACA;AACO,MAAMQ,MAAM,GAAGC,IAAA,IAOT;EAAA,IAPU;IACrB/C,cAAc;IACdiC,KAAK;IACLC,MAAM;IACN9B,iBAAiB;IACjB+B,sBAAsB;IACtBC;EACK,CAAC,GAAAW,IAAA;EACN,MAAM;IAAE7D,KAAK;IAAE0B;EAAc,CAAC,GAAGb,WAAW,CAC1CC,cAAc,EACdI,iBACF,CAAC;EAED4B,qBAAqB,CACnB9C,KAAK,EACL0B,aAAa,EACbqB,KAAK,EACLC,MAAM,EACNC,sBAAsB,EACtBC,KAAK,IAAIM,WACX,CAAC;AACH,CAAC;AAAC5C,OAAA,CAAAgD,MAAA,GAAAA,MAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
(function x() {
|
|
3
3
|
const dataElement = document.querySelector(
|
|
4
|
-
'script[type="application/json"][data-app-state="app-json"]'
|
|
4
|
+
'script[type="application/json"][data-app-state="app-json"]',
|
|
5
5
|
);
|
|
6
6
|
if (!dataElement) {
|
|
7
7
|
throw new Error(
|
|
8
|
-
"Error finding script with attribute app-json to retrieve context path"
|
|
8
|
+
"Error finding script with attribute app-json to retrieve context path",
|
|
9
9
|
);
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
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\"]'
|
|
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,CAACA,CAAA,EAAG;EACZ,MAAMC,WAAW,GAAGC,QAAQ,CAACC,aAAa,CACxC,4DACF,CAAC;EACD,IAAI,CAACF,WAAW,EAAE;IAChB,MAAM,IAAIG,KAAK,CACb,uEACF,CAAC;EACH;EAEA,MAAMC,WAAW,GAAGJ,WAAW,CAACK,YAAY,CAAC,sBAAsB,CAAC;EACpE,IAAID,WAAW,EAAE;IACfE,MAAM,CAACF,WAAW,GAAGA,WAAW;EAClC;EAEA,MAAMG,QAAQ,GAAGP,WAAW,CAACK,YAAY,CAAC,mBAAmB,CAAC;EAC9D,IAAIE,QAAQ,IAAIA,QAAQ,KAAK,YAAY,EAAE;IACzCC,uBAAuB,GAAI,GAAED,QAAS,GAAE,CAAC,CAAC;EAC5C,CAAC,MAAM,IAAIH,WAAW,EAAE;IACtBI,uBAAuB,GAAI,GAAEJ,WAAY,GAAE,CAAC,CAAC;EAC/C;;EAEA,MAAMK,KAAK,GAAGT,WAAW,CAACK,YAAY,CAAC,gBAAgB,CAAC;EACxD,IAAII,KAAK,EAAE;IACTC,iBAAiB,GAAGD,KAAK,CAAC,CAAC;EAC7B;AACF,CAAC,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rehydrate.js","names":["_objects","require","_Locales","_interopRequireDefault","_resolveModel","_ModularUIResponse","recreateModel","data","modelData","ModularUIResponse","rehydrate","Model","resolveModel","_context","model","childModels","_map","default","call","childModel","addChildModels","isModularUIModelData","has","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","Locales","locale","noFurtherRehydration","_includes","state","mappedState","_keys","forEach","_default","exports"],"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)
|
|
1
|
+
{"version":3,"file":"rehydrate.js","names":["_objects","require","_Locales","_interopRequireDefault","_resolveModel","_ModularUIResponse","recreateModel","data","modelData","ModularUIResponse","rehydrate","Model","resolveModel","_context","model","childModels","_map","default","call","childModel","addChildModels","isModularUIModelData","has","rehydratedValue","stateKey","stateValue","Array","isArray","stateItem","locales","Locales","locale","noFurtherRehydration","_includes","state","mappedState","_keys","forEach","_default","exports"],"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: string, stateValue: any) => {\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: { [string]: any } = {};\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,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,kBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAEA;AACA;AACA;AACA,MAAMK,aAAa,GAAIC,IAAY,IAAK;EACtC,MAAMC,SAAS,GAAGC,0BAAiB,CAACC,SAAS,CAACH,IAAI,CAAC;EAEnD,MAAMI,KAAK,GAAG,IAAAC,qBAAY,EAACJ,SAAS,CAAC;EAErC,IAAIG,KAAK,EAAE;IAAA,IAAAE,QAAA;IACT,MAAMC,KAAK,GAAG,IAAIH,KAAK,CAACH,SAAS,CAAC;IAClCM,KAAK,CAACJ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,SAAA,CAAAhB,OAAA,EAAAe,oBAAoB,EAAAd,IAAA,CAApBc,oBAAoB,EAAUR,QAAQ,CAAC,EAAE;IAC3C,OAAOC,UAAU;EACnB;EAEA,IAAIA,UAAU,KAAK,IAAI,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IACzD,OAAOf,SAAS,CAACe,UAAU,CAAC,CAAC,CAAC;EAChC;;EAEA,OAAOA,UAAU;AACnB,CAAC;;AAED;AACA;AACA;AACA,MAAMf,SAAS,GAAIwB,KAAa,IAAc;EAC5C,MAAMC,WAA8B,GAAG,CAAC,CAAC;EAEzC,IAAAC,KAAA,CAAAnB,OAAA,EAAYiB,KAAK,CAAC,CAACG,OAAO,CAAEb,QAAQ,IAAK;IACvC,MAAMC,UAAU,GAAGS,KAAK,CAACV,QAAQ,CAAC;IAClCW,WAAW,CAACX,QAAQ,CAAC,GAAGD,eAAe,CAACC,QAAQ,EAAEC,UAAU,CAAC;EAC/D,CAAC,CAAC;EAEF,OAAOU,WAAW;AACpB,CAAC;AAAC,IAAAG,QAAA,GAEa5B,SAAS;AAAA6B,OAAA,CAAAtB,OAAA,GAAAqB,QAAA"}
|
|
@@ -26,7 +26,7 @@ const getExpectedLocales = () =>
|
|
|
26
26
|
message_nl: "Dutch message",
|
|
27
27
|
},
|
|
28
28
|
}
|
|
29
|
-
: locale
|
|
29
|
+
: locale,
|
|
30
30
|
),
|
|
31
31
|
]);
|
|
32
32
|
|
|
@@ -50,7 +50,7 @@ describe("serverUtil", () => {
|
|
|
50
50
|
{
|
|
51
51
|
getHeader: () => "",
|
|
52
52
|
getCookieByName: () => "",
|
|
53
|
-
}
|
|
53
|
+
},
|
|
54
54
|
);
|
|
55
55
|
|
|
56
56
|
expect(store.getActions()).toStrictEqual([
|
|
@@ -7,21 +7,21 @@ import type { ReduxStore, ReduxState } from "../redux/types";
|
|
|
7
7
|
*/
|
|
8
8
|
const noLoading = (state: ReduxState) =>
|
|
9
9
|
Object.keys(state.modularui).filter(
|
|
10
|
-
(key) => state.modularui[key].status === MODULARUI_STATUS.LOADING
|
|
10
|
+
(key) => state.modularui[key].status === MODULARUI_STATUS.LOADING,
|
|
11
11
|
).length === 0;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
*/
|
|
15
15
|
const loadingCounter = (state: ReduxState) =>
|
|
16
16
|
Object.keys(state.modularui).filter(
|
|
17
|
-
(key) => state.modularui[key].status === MODULARUI_STATUS.LOADING
|
|
17
|
+
(key) => state.modularui[key].status === MODULARUI_STATUS.LOADING,
|
|
18
18
|
).length;
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
*/
|
|
22
22
|
const createSSRComplete = (
|
|
23
23
|
store: ReduxStore,
|
|
24
|
-
render: Function
|
|
24
|
+
render: Function,
|
|
25
25
|
): Promise<string> => {
|
|
26
26
|
let loadingCount = loadingCounter(store.getState());
|
|
27
27
|
let html = "<div>Nothing to render</div>";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSSRComplete.js","names":["_Constants","require","noLoading","state","_context","_filter","default","_keys","modularui","call","key","status","MODULARUI_STATUS","LOADING","length","loadingCounter","_context2","createSSRComplete","store","render","loadingCount","getState","html","_promise","resolve","reject","unsubscribe","subscribe","previousCount","error","_default","exports"],"sources":["../../src/react-server/createSSRComplete.js"],"sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore, ReduxState } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING
|
|
1
|
+
{"version":3,"file":"createSSRComplete.js","names":["_Constants","require","noLoading","state","_context","_filter","default","_keys","modularui","call","key","status","MODULARUI_STATUS","LOADING","length","loadingCounter","_context2","createSSRComplete","store","render","loadingCount","getState","html","_promise","resolve","reject","unsubscribe","subscribe","previousCount","error","_default","exports"],"sources":["../../src/react-server/createSSRComplete.js"],"sourcesContent":["// @flow\nimport { MODULARUI_STATUS } from \"../constants/Constants\";\n\nimport type { ReduxStore, ReduxState } from \"../redux/types\";\n\n/**\n */\nconst noLoading = (state: ReduxState) =>\n Object.keys(state.modularui).filter(\n (key) => state.modularui[key].status === MODULARUI_STATUS.LOADING,\n ).length === 0;\n\n/**\n */\nconst loadingCounter = (state: ReduxState) =>\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,IAAAA,UAAA,GAAAC,OAAA;AAIA;AACA;AACA,MAAMC,SAAS,GAAIC,KAAiB;EAAA,IAAAC,QAAA;EAAA,OAClC,IAAAC,OAAA,CAAAC,OAAA,EAAAF,QAAA,OAAAG,KAAA,CAAAD,OAAA,EAAYH,KAAK,CAACK,SAAS,CAAC,EAAAC,IAAA,CAAAL,QAAA,EACzBM,GAAG,IAAKP,KAAK,CAACK,SAAS,CAACE,GAAG,CAAC,CAACC,MAAM,KAAKC,2BAAgB,CAACC,OAC5D,CAAC,CAACC,MAAM,KAAK,CAAC;AAAA;;AAEhB;AACA;AACA,MAAMC,cAAc,GAAIZ,KAAiB;EAAA,IAAAa,SAAA;EAAA,OACvC,IAAAX,OAAA,CAAAC,OAAA,EAAAU,SAAA,OAA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F,OAAO,CAACF,IAAI,CAAC;IACf;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAQ,QAAA,GAEab,iBAAiB;AAAAc,OAAA,CAAAzB,OAAA,GAAAwB,QAAA"}
|
|
@@ -72,8 +72,8 @@ const renderSSRComplete = ({
|
|
|
72
72
|
</HelmetProvider>
|
|
73
73
|
</ThemeProvider>
|
|
74
74
|
</StyleSheetManager>
|
|
75
|
-
</Provider
|
|
76
|
-
)
|
|
75
|
+
</Provider>,
|
|
76
|
+
),
|
|
77
77
|
)
|
|
78
78
|
.then((appHTML) => {
|
|
79
79
|
handleErrors(store);
|
|
@@ -99,12 +99,12 @@ const renderSSRComplete = ({
|
|
|
99
99
|
errorStack={error.stack}
|
|
100
100
|
/>
|
|
101
101
|
</ThemeProvider>
|
|
102
|
-
</StyleSheetManager
|
|
102
|
+
</StyleSheetManager>,
|
|
103
103
|
),
|
|
104
104
|
head: helmetContext.helmet,
|
|
105
105
|
state: "",
|
|
106
106
|
UUID,
|
|
107
|
-
})
|
|
107
|
+
}),
|
|
108
108
|
);
|
|
109
109
|
};
|
|
110
110
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderSSRComplete.js","names":["_server","require","_reactRedux","_reactRouter","_reactHelmetAsync","_styledComponents","_createSSRComplete","_interopRequireDefault","_htmlpage","_Settings","_ThemeProvider","_ErrorBoundary","_serverUtil","_jsxRuntime","renderSSRComplete","_ref","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","helmet","routerContext","sheet","ServerStyleSheet","location","toLocation","basePath","getBasePath","createSSRComplete","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","HelmetProvider","context","StaticRouter","basename","then","appHTML","handleErrors","head","createHead","contextPath","html","state","dehydrate","catch","error","errorMessage","message","errorResource","fileName","errorLine","lineNumber","errorStack","stack","_default","exports"],"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 { getBasePath } from \"../constants/Settings\";\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 = { helmet: {} };\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 const basePath = getBasePath();\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={basePath}\n location={location}\n context={routerContext}\n >\n {render()}\n </Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </StyleSheetManager>\n </Provider
|
|
1
|
+
{"version":3,"file":"renderSSRComplete.js","names":["_server","require","_reactRedux","_reactRouter","_reactHelmetAsync","_styledComponents","_createSSRComplete","_interopRequireDefault","_htmlpage","_Settings","_ThemeProvider","_ErrorBoundary","_serverUtil","_jsxRuntime","renderSSRComplete","_ref","store","theme","UUID","requestHref","render","ErrorPage","template","htmlpage","helmetContext","helmet","routerContext","sheet","ServerStyleSheet","location","toLocation","basePath","getBasePath","createSSRComplete","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","HelmetProvider","context","StaticRouter","basename","then","appHTML","handleErrors","head","createHead","contextPath","html","state","dehydrate","catch","error","errorMessage","message","errorResource","fileName","errorLine","lineNumber","errorStack","stack","_default","exports"],"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 { getBasePath } from \"../constants/Settings\";\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 = { helmet: {} };\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 const basePath = getBasePath();\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={basePath}\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: basePath,\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n })\n .catch((error) =>\n template({\n contextPath: basePath,\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,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,SAAA,GAAAD,sBAAA,CAAAN,OAAA;AAEA,IAAAQ,SAAA,GAAAR,OAAA;AAEA,IAAAS,cAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,cAAA,GAAAJ,sBAAA,CAAAN,OAAA;AAEA,IAAAW,WAAA,GAAAX,OAAA;AAAmE,IAAAY,WAAA,GAAAZ,OAAA;AAiBnE;AACA;AACA,MAAMa,iBAAiB,GAAGC,IAAA,IAQI;EAAA,IARH;IACzBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,WAAW;IACXC,MAAM;IACNC,SAAS;IACTC,QAAQ,GAAGC;EACN,CAAC,GAAAR,IAAA;EACN,MAAMS,aAAa,GAAG;IAAEC,MAAM,EAAE,CAA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D,OAAOF,QAAQ,CAAC;MACd4B,WAAW,EAAEnB,QAAQ;MACrBoB,IAAI,EAAEL,OAAO;MACbE,IAAI;MACJI,KAAK,EAAE,IAAAC,qBAAS,EAACrC,KAAK,CAAC;MACvBE;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,CACDoC,KAAK,CAAEC,KAAK,IACXjC,QAAQ,CAAC;IACP4B,WAAW,EAAEnB,QAAQ;IACrBoB,IAAI,EAAE,IAAAjB,sBAAc,gBAClB,IAAArB,WAAA,CAAAsB,GAAA,EAAC9B,iBAAA,CAAAiC,iBAAiB;MAACX,KAAK,EAAEA,KAAK,CAACY,QAAS;MAAAF,QAAA,eACvC,IAAAxB,WAAA,CAAAsB,GAAA,EAACzB,cAAA,CAAA8B,OAAa;QAACvB,KAAK,EAAEA,KAAM;QAAAoB,QAAA,eAC1B,IAAAxB,WAAA,CAAAsB,GAAA,EAACd,SAAS;UACRmC,YAAY,EAAED,KAAK,CAACE,OAAQ;UAC5BC,aAAa,EAAEH,KAAK,CAACI,QAAS;UAC9BC,SAAS,EAAEL,KAAK,CAACM,UAAW;UAC5BC,UAAU,EAAEP,KAAK,CAACQ;QAAM,CACzB;MAAC,CACW;IAAC,CACC,CACrB,CAAC;IACDf,IAAI,EAAExB,aAAa,CAACC,MAAM;IAC1B2B,KAAK,EAAE,EAAE;IACTlC;EACF,CAAC,CACH,CAAC;AACL,CAAC;AAAC,IAAA8C,QAAA,GAEalD,iBAAiB;AAAAmD,OAAA,CAAAzB,OAAA,GAAAwB,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderSSRMinimal.js","names":["_server","require","_reactRedux","_styledComponents","_ThemeProvider","_interopRequireDefault","_Settings","_serverUtil","_htmlpage","_jsxRuntime","renderSSRMinimal","_ref","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","head","createHead","contextPath","getBasePath","html","state","dehydrate","_default","exports"],"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 { getBasePath } from \"../constants/Settings\";\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 | Array<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
|
|
1
|
+
{"version":3,"file":"renderSSRMinimal.js","names":["_server","require","_reactRedux","_styledComponents","_ThemeProvider","_interopRequireDefault","_Settings","_serverUtil","_htmlpage","_jsxRuntime","renderSSRMinimal","_ref","store","theme","UUID","render","template","htmlpage","sheet","ServerStyleSheet","appHTML","renderToString","jsx","Provider","children","StyleSheetManager","instance","default","head","createHead","contextPath","getBasePath","html","state","dehydrate","_default","exports"],"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 { getBasePath } from \"../constants/Settings\";\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 | Array<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: getBasePath(),\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport default renderSSRMinimal;\n"],"mappings":";;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAH,sBAAA,CAAAJ,OAAA;AAAkC,IAAAQ,WAAA,GAAAR,OAAA;AAalC;AACA;AACA,MAAMS,gBAAgB,GAAGC,IAAA,IAMJ;EAAA,IANK;IACxBC,KAAK;IACLC,KAAK;IACLC,IAAI,GAAG,EAAE;IACTC,MAAM;IACNC,QAAQ,GAAGC;EACN,CAAC,GAAAN,IAAA;EACN,MAAMO,KAAK,GAAG,IAAIC,kCAAgB,CAAC,CAAC;EAEpC,MAAMC,OAAO,GAAG,IAAAC,sBAAc,gBAC5B,IAAAZ,WAAA,CAAAa,GAAA,EAACpB,WAAA,CAAAqB,QAAQ;IAACX,KAAK,EAAEA,KAAM;IAAAY,QAAA,eACrB,IAAAf,WAAA,CAAAa,GAAA,EAACnB,iBAAA,CAAAsB,iBAAiB;MAACP,KAAK,EAAEA,KAAK,CAACQ,QAAS;MAAAF,QAAA,eACvC,IAAAf,WAAA,CAAAa,GAAA,EAAClB,cAAA,CAAAuB,OAAa;QAACd,KAAK,EAAEA,KAAM;QAAAW,QAAA,EAAET,MAAM,CAAC;MAAC,CAAgB;IAAC,CACtC;EAAC,CACZ,CACZ,CAAC;EAED,MAAMa,IAAI,GAAG,IAAAC,sBAAU,EAACX,KAAK,EAAEJ,IAAI,CAAC;EACpC,OAAOE,QAAQ,CAAC;IACdc,WAAW,EAAE,IAAAC,qBAAW,EAAC,CAAC;IAC1BC,IAAI,EAAEZ,OAAO;IACbQ,IAAI;IACJK,KAAK,EAAE,IAAAC,qBAAS,EAACtB,KAAK,CAAC;IACvBE;EACF,CAAC,CAAC;AACJ,CAAC;AAAC,IAAAqB,QAAA,GAEazB,gBAAgB;AAAA0B,OAAA,CAAAT,OAAA,GAAAQ,QAAA"}
|
|
@@ -25,7 +25,7 @@ export const getFullRequestHref = (request: HttpServletRequestJava): Href =>
|
|
|
25
25
|
*/
|
|
26
26
|
export const getCookieFromRequest = (
|
|
27
27
|
request: HttpServletRequestJava,
|
|
28
|
-
cookieName: string
|
|
28
|
+
cookieName: string,
|
|
29
29
|
): null | string => {
|
|
30
30
|
return request.getCookieByName(cookieName);
|
|
31
31
|
};
|
|
@@ -34,7 +34,7 @@ export const getCookieFromRequest = (
|
|
|
34
34
|
*/
|
|
35
35
|
export const getPreferredLocale = (
|
|
36
36
|
request: HttpServletRequestJava,
|
|
37
|
-
locales: Locales
|
|
37
|
+
locales: Locales,
|
|
38
38
|
): void | string => {
|
|
39
39
|
const languageFromCookie = getCookieFromRequest(request, "locale");
|
|
40
40
|
const acceptLanguageHeader =
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestInformation.js","names":["_Href","_interopRequireDefault","require","getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","exports","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
|
|
1
|
+
{"version":3,"file":"requestInformation.js","names":["_Href","_interopRequireDefault","require","getFullRequestUrl","request","pathInfo","getPathInfo","queryString","getQueryString","exports","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,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,iBAAiB,GAAIC,OAA+B,IAAa;EAC5E,MAAMC,QAAQ,GAAGD,OAAO,CAACE,WAAW,CAAC,CAAC,IAAI,GAAG;EAC7C,MAAMC,WAAW,GAAGH,OAAO,CAACI,cAAc,CAAC,CAAC;EAE5C,IAAID,WAAW,EAAE;IACf,OAAQ,GAAEF,QAAS,IAAGE,WAAY,EAAC;EACrC;EAEA,OAAOF,QAAQ;AACjB,CAAC;;AAED;AACA;AADAI,OAAA,CAAAN,iBAAA,GAAAA,iBAAA;AAEO,MAAMO,kBAAkB,GAAIN,OAA+B,IAChE,IAAIO,aAAI,CAACR,iBAAiB,CAACC,OAAO,CAAC,CAAC;;AAEtC;AACA;AADAK,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAEO,MAAME,oBAAoB,GAAGA,CAClCR,OAA+B,EAC/BS,UAAkB,KACA;EAClB,OAAOT,OAAO,CAACU,eAAe,CAACD,UAAU,CAAC;AAC5C,CAAC;;AAED;AACA;AADAJ,OAAA,CAAAG,oBAAA,GAAAA,oBAAA;AAEO,MAAMG,kBAAkB,GAAGA,CAChCX,OAA+B,EAC/BY,OAAgB,KACE;EAClB,MAAMC,kBAAkB,GAAGL,oBAAoB,CAACR,OAAO,EAAE,QAAQ,CAAC;EAClE,MAAMc,oBAAoB,GACxBD,kBAAkB,IAAIb,OAAO,CAACe,SAAS,CAAC,iBAAiB,CAAC;;EAE5D;EACA,IAAID,oBAAoB,KAAK,IAAI,EAAE;IACjC,OAAOF,OAAO,CAACI,oBAAoB,CAAC,CAAC,CAAC;EACxC;EAEA,OAAOJ,OAAO,CAACD,kBAAkB,CAACG,oBAAoB,CAAC;AACzD,CAAC;AAACT,OAAA,CAAAM,kBAAA,GAAAA,kBAAA"}
|