@beinformed/ui 1.17.4 → 1.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/esm/builder/index.js.map +1 -1
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/Constants.js +4 -0
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/LayoutHintConfig.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js +25 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/constants/index.js.map +1 -1
- package/esm/exceptions/ConfigurationException.js.map +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/IllegalArgumentException.js.map +1 -1
- package/esm/exceptions/IllegalReturnException.js.map +1 -1
- package/esm/exceptions/IllegalStateException.js.map +1 -1
- package/esm/exceptions/JsonParseException.js.map +1 -1
- package/esm/exceptions/MissingPropertyException.js.map +1 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/NotAllowedUriException.js.map +1 -1
- package/esm/exceptions/NotFoundException.js.map +1 -1
- package/esm/exceptions/ServerRequestException.js.map +1 -1
- package/esm/exceptions/ThemePropertyException.js.map +1 -1
- package/esm/exceptions/TimeoutException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
- package/esm/exceptions/index.js.map +1 -1
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/useAllFormsOnModel.js.map +1 -1
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useContent.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useI18n.js.map +1 -1
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModels.js.map +1 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/hooks/useNotification.js.map +1 -1
- package/esm/hooks/usePreference.js.map +1 -1
- package/esm/hooks/useProgressIndicator.js.map +1 -1
- package/esm/hooks/useRouter.js.map +1 -1
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/index.js.map +1 -1
- package/esm/i18n/languages.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/esm/i18n/types.js.map +1 -1
- package/esm/i18n/withMessage.js.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
- package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
- package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
- package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/esm/models/base/BaseCollection.js.map +1 -1
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceCollection.js.map +1 -1
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
- package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/ContentTypeModel.js.map +1 -1
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/content/SubSectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorCollection.js.map +1 -1
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/error/ErrorResponse.js.map +1 -1
- package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/filters/FilterModel.js.map +1 -1
- package/esm/models/filters/RangeFilterModel.js.map +1 -1
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/href/ListHref.js.map +1 -1
- package/esm/models/index.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListHeaderModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js +2 -2
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/paging/PagesizeModel.js.map +1 -1
- package/esm/models/paging/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/parameter/Parameter.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/search/CaseSearchModel.js.map +1 -1
- package/esm/models/sorting/SortOptionModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserModel.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/models/user/UserServicesModel.js.map +1 -1
- package/esm/modularui/Authenticate.js +9 -9
- package/esm/modularui/Authenticate.js.map +1 -1
- package/esm/modularui/ModularUIError.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/modularui/ModularUIResponse.js.map +1 -1
- package/esm/modularui/index.js.map +1 -1
- package/esm/react/ErrorBoundary.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.js.map +1 -1
- package/esm/react/index.js.map +1 -1
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/Init.js.map +1 -1
- package/esm/react-client/client.js +3 -2
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/index.js.map +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/contextPath.js.map +1 -1
- package/esm/react-server/createSSRComplete.js.map +1 -1
- package/esm/react-server/htmlpage.js.map +1 -1
- package/esm/react-server/index.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverNoSSR.js.map +1 -1
- package/esm/react-server/serverSSR.js.map +1 -1
- package/esm/react-server/serverUtil.js +2 -1
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/ThemeProvider.js.map +1 -1
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/index.js.map +1 -1
- package/esm/react-theme/types.js.map +1 -1
- package/esm/react-theme/useTheme.js.map +1 -1
- package/esm/react-theme/utils/background.js.map +1 -1
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/actions.js.map +1 -1
- package/esm/redux/_i18n/index.js.map +1 -1
- package/esm/redux/_i18n/reducer.js.map +1 -1
- package/esm/redux/_i18n/types.js.map +1 -1
- package/esm/redux/_modularui/actions.js.map +1 -1
- package/esm/redux/_modularui/connector.js.map +1 -1
- package/esm/redux/_modularui/index.js.map +1 -1
- package/esm/redux/_modularui/middleware.js.map +1 -1
- package/esm/redux/_modularui/modularuiUtils.js.map +1 -1
- package/esm/redux/_modularui/reducer.js.map +1 -1
- package/esm/redux/_modularui/selectors.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/actions.js.map +1 -1
- package/esm/redux/_router/connectors.js.map +1 -1
- package/esm/redux/_router/index.js.map +1 -1
- package/esm/redux/_router/middleware.js.map +1 -1
- package/esm/redux/_router/reducer.js.map +1 -1
- package/esm/redux/_router/types.js.map +1 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/Form.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Modals.js.map +1 -1
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js +32 -2
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/ProgressIndicator.js.map +1 -1
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/actions/index.js.map +1 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/Modal.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/Notification.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/Progress.js.map +1 -1
- package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/connectors/index.js.map +1 -1
- package/esm/redux/index.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js +5 -1
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/reducers/createReducer.js.map +1 -1
- package/esm/redux/reducers/index.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/redux/types.js.map +1 -1
- package/esm/utils/browser/Cache.js.map +1 -1
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/esm/utils/fetch/serverFetch.js.map +1 -1
- package/esm/utils/fetch/types.js.map +1 -1
- package/esm/utils/fetch/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/checkResource.js.map +1 -1
- package/esm/utils/helpers/createHash.js.map +1 -1
- package/esm/utils/helpers/createUUID.js.map +1 -1
- package/esm/utils/helpers/objects.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/helpers/text.js.map +1 -1
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/number/DecimalFormat.js.map +1 -1
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/builder/index.js.map +1 -1
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/Constants.js +9 -1
- package/lib/constants/Constants.js.flow +5 -0
- package/lib/constants/Constants.js.map +1 -1
- package/lib/constants/LayoutHintConfig.js.map +1 -1
- package/lib/constants/LayoutHints.js.map +1 -1
- package/lib/constants/Settings.js +37 -1
- package/lib/constants/Settings.js.flow +25 -1
- package/lib/constants/Settings.js.map +1 -1
- package/lib/constants/index.js.map +1 -1
- package/lib/exceptions/ConfigurationException.js.map +1 -1
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/IllegalArgumentException.js.map +1 -1
- package/lib/exceptions/IllegalReturnException.js.map +1 -1
- package/lib/exceptions/IllegalStateException.js.map +1 -1
- package/lib/exceptions/JsonParseException.js.map +1 -1
- package/lib/exceptions/MissingPropertyException.js.map +1 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/NotAllowedUriException.js.map +1 -1
- package/lib/exceptions/NotFoundException.js.map +1 -1
- package/lib/exceptions/ServerRequestException.js.map +1 -1
- package/lib/exceptions/ThemePropertyException.js.map +1 -1
- package/lib/exceptions/TimeoutException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
- package/lib/exceptions/index.js.map +1 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/useAllFormsOnModel.js.map +1 -1
- package/lib/hooks/useAuthentication.js.map +1 -1
- package/lib/hooks/useContent.js.map +1 -1
- package/lib/hooks/useDeepCompareEffect.js.map +1 -1
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModels.js.map +1 -1
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/hooks/useModularUIModel.js.map +1 -1
- package/lib/hooks/useModularUIRequest.js.map +1 -1
- package/lib/hooks/useNotification.js.map +1 -1
- package/lib/hooks/usePreference.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js.map +1 -1
- package/lib/hooks/useRouter.js.map +1 -1
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/index.js.map +1 -1
- package/lib/i18n/languages.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/lib/i18n/types.js.map +1 -1
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeModel.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/lib/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/lib/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/LabelAttributeModel.js.map +1 -1
- package/lib/models/attributes/MemoAttributeModel.js.map +1 -1
- package/lib/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/lib/models/attributes/NumberAttributeModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/StringAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/XMLAttributeModel.js.map +1 -1
- package/lib/models/attributes/_createAttribute.js.map +1 -1
- package/lib/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceCollection.js.map +1 -1
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptIndexModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
- package/lib/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentIndexModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/content/ContentTypeModel.js.map +1 -1
- package/lib/models/content/SectionModel.js.map +1 -1
- package/lib/models/content/SubSectionModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/lib/models/detail/DetailModel.js.map +1 -1
- package/lib/models/error/ErrorCollection.js.map +1 -1
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/error/ErrorResponse.js.map +1 -1
- package/lib/models/filters/AssignmentFilterModel.js.map +1 -1
- package/lib/models/filters/BaseFilterModel.js.map +1 -1
- package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/filters/FilterModel.js.map +1 -1
- package/lib/models/filters/RangeFilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/grouping/GroupingModel.js.map +1 -1
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/ListHref.js.map +1 -1
- package/lib/models/index.js.map +1 -1
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/links/LinkModel.js.map +1 -1
- package/lib/models/links/normalizeLinkJSON.js.map +1 -1
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListHeaderModel.js.map +1 -1
- package/lib/models/list/ListItemCollection.js.map +1 -1
- package/lib/models/list/ListItemModel.js.map +1 -1
- package/lib/models/list/ListModel.js +2 -2
- package/lib/models/list/ListModel.js.flow +1 -2
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListModel.spec.js.flow +13 -0
- package/lib/models/lookup/LookupOptionCollection.js.map +1 -1
- package/lib/models/lookup/LookupOptionsModel.js.map +1 -1
- package/lib/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/lib/models/paging/PagesizeModel.js.map +1 -1
- package/lib/models/paging/PagingModel.js.map +1 -1
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/search/CaseSearchModel.js.map +1 -1
- package/lib/models/sorting/SortOptionModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/tab/TabModel.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/lib/models/types.js.map +1 -1
- package/lib/models/user/UserModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js +10 -10
- package/lib/modularui/Authenticate.js.flow +11 -7
- package/lib/modularui/Authenticate.js.map +1 -1
- package/lib/modularui/ModularUIError.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/modularui/ModularUIResponse.js.map +1 -1
- package/lib/modularui/index.js.map +1 -1
- package/lib/react/ErrorBoundary.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react/index.js.map +1 -1
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/Init.js.map +1 -1
- package/lib/react-client/client.js +2 -1
- package/lib/react-client/client.js.flow +5 -1
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-client/contextPath.js.map +1 -1
- package/lib/react-client/index.js.map +1 -1
- package/lib/react-client/rehydrate.js.map +1 -1
- package/lib/react-server/__tests__/serverUtil.spec.js.flow +18 -0
- package/lib/react-server/contextPath.js.map +1 -1
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/htmlpage.js.map +1 -1
- package/lib/react-server/index.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js +1 -0
- package/lib/react-server/serverUtil.js.flow +2 -0
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/index.js.map +1 -1
- package/lib/react-theme/types.js.map +1 -1
- package/lib/react-theme/useTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/actions.js.map +1 -1
- package/lib/redux/_i18n/index.js.map +1 -1
- package/lib/redux/_i18n/reducer.js.map +1 -1
- package/lib/redux/_i18n/types.js.map +1 -1
- package/lib/redux/_modularui/actions.js.map +1 -1
- package/lib/redux/_modularui/connector.js.map +1 -1
- package/lib/redux/_modularui/index.js.map +1 -1
- package/lib/redux/_modularui/middleware.js.map +1 -1
- package/lib/redux/_modularui/modularuiUtils.js.map +1 -1
- package/lib/redux/_modularui/reducer.js.map +1 -1
- package/lib/redux/_modularui/selectors.js.map +1 -1
- package/lib/redux/_modularui/types.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/actions.js.map +1 -1
- package/lib/redux/_router/connectors.js.map +1 -1
- package/lib/redux/_router/index.js.map +1 -1
- package/lib/redux/_router/middleware.js.map +1 -1
- package/lib/redux/_router/reducer.js.map +1 -1
- package/lib/redux/_router/types.js.map +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Modals.js.map +1 -1
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js +41 -1
- package/lib/redux/actions/Preferences.js.flow +49 -2
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/actions/ProgressIndicator.js.map +1 -1
- package/lib/redux/actions/SignIn.js.map +1 -1
- package/lib/redux/actions/SignOut.js.map +1 -1
- package/lib/redux/actions/__tests__/Preferences.spec.js.flow +11 -0
- package/lib/redux/actions/index.js.map +1 -1
- package/lib/redux/connectors/Application.js.map +1 -1
- package/lib/redux/connectors/Breadcrumb.js.map +1 -1
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/Modal.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/Notification.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/Preferences.js.map +1 -1
- package/lib/redux/connectors/Progress.js.map +1 -1
- package/lib/redux/connectors/ProgressIndicator.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/SignIn.js.map +1 -1
- package/lib/redux/connectors/SignOut.js.map +1 -1
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/connectors/index.js.map +1 -1
- package/lib/redux/index.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js +5 -1
- package/lib/redux/reducers/PreferencesReducer.js.flow +8 -1
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/__tests__/PreferencesReducer.spec.js.flow +12 -0
- package/lib/redux/reducers/createReducer.js.map +1 -1
- package/lib/redux/reducers/index.js.map +1 -1
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/redux/types.js.flow +5 -0
- package/lib/redux/types.js.map +1 -1
- package/lib/utils/browser/Cache.js.map +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/serverFetch.js.map +1 -1
- package/lib/utils/fetch/types.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/createHash.js.map +1 -1
- package/lib/utils/helpers/createUUID.js.map +1 -1
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/helpers/text.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +16 -15
- package/src/constants/Constants.js +5 -0
- package/src/constants/Settings.js +25 -1
- package/src/models/list/ListModel.js +1 -2
- package/src/models/list/__tests__/ListModel.spec.js +13 -0
- package/src/models/list/__tests__/related-contributions.json +42 -0
- package/src/models/list/__tests__/related-data.json +32 -0
- package/src/modularui/Authenticate.js +11 -7
- package/src/react-client/client.js +5 -1
- package/src/react-server/__tests__/serverUtil.spec.js +18 -0
- package/src/react-server/serverUtil.js +2 -0
- package/src/redux/actions/Preferences.js +49 -2
- package/src/redux/actions/__tests__/Preferences.spec.js +11 -0
- package/src/redux/reducers/PreferencesReducer.js +8 -1
- package/src/redux/reducers/__tests__/PreferencesReducer.spec.js +12 -0
- package/src/redux/types.js +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/redux/_modularui/selectors.js"],"names":["getAllModelsByInstance","state","instance","locale","i18n","modularui","key","model","getFirstModelByInstance","getActiveModelByInstance","location","getLocation","selfhref","path","getApplication","ApplicationModel","getTab","TabModel","getCaseView","CaseViewModel","getForm","FormModel","modelByHref","href","findHref","Href","modelConfigKey","equals","keyByHref","router","pathname","getModels","models","forEach","modelKey","modelEntry","label","type","modelInfo","selfContentLink","ContentModel","ContentTOCModel","push","getActiveModels","defaultMemoize","value","other","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType"],"mappings":";;;;;;;;;;;;;;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AYJ,KAAK,CAACI,SAAlB,mBAEH,UAACC,GAAD;AAAA,aACEL,KAAK,CAACI,SAAN,CAAgBC,GAAhB,KACAL,KAAK,CAACI,SAAN,CAAgBC,GAAhB,EAAqBC,KADrB,IAEAN,KAAK,CAACI,SAAN,CAAgBC,GAAhB,EAAqBC,KAArB,CAA2B8B,IAA3B,KAAoCA,IAHtC;AAAA,KAFG,mBAOA,UAAC/B,GAAD;AAAA,aAASL,KAAK,CAACI,SAAN,CAAgBC,GAAhB,EAAqBC,KAA9B;AAAA,KAPA,CAAP;AAQD;;AAED,SAAO,EAAP;AACD,CAhBM","sourcesContent":["// @flow\nimport { createSelectorCreator, defaultMemoize } from \"reselect\";\nimport { has } from \"../../utils/helpers/objects\";\n\nimport Href from \"../../models/href/Href\";\nimport ContentModel from \"../../models/content/ContentModel\";\nimport ContentTOCModel from \"../../models/content/ContentTOCModel\";\nimport ApplicationModel from \"../../models/application/ApplicationModel\";\nimport TabModel from \"../../models/tab/TabModel\";\nimport CaseViewModel from \"../../models/caseview/CaseViewModel\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { ReduxState, PreferenceValue } from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\n\n/**\n */\nexport const getAllModelsByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): Array<ModularUIModel> => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n })\n .map((key) => modularui[key].model);\n }\n\n return [];\n};\n\n/**\n */\nexport const getFirstModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): T | null => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n */\nexport const getActiveModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): T | null => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return (\n model instanceof instance &&\n model.locale === locale &&\n location.startsWith(model.selfhref.path)\n );\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: ReduxState): null | ApplicationModel =>\n getFirstModelByInstance(state, ApplicationModel);\n\n/**\n */\nexport const getTab = (state: ReduxState): null | TabModel =>\n getFirstModelByInstance(state, TabModel);\n\n/**\n */\nexport const getCaseView = (state: ReduxState): null | CaseViewModel =>\n getFirstModelByInstance(state, CaseViewModel);\n\n/**\n */\nexport const getForm = (state: ReduxState): null | FormModel =>\n getFirstModelByInstance(state, FormModel);\n\n/**\n * Get the model by it's href\n */\nexport const modelByHref = (\n state: ReduxState,\n href: Href | string\n): null | ModularUIModel => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return (\n model.model &&\n model.model.selfhref &&\n model.model.selfhref.equals(findHref)\n );\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return null;\n};\n\n/**\n * Return the key of a model by the selfhref the model is saved in the reducer\n */\nexport const keyByHref = (state: ReduxState, href: Href | string): ?string => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return null;\n};\n\n/**\n */\nconst getLocation = (state): string => state?.router?.location.pathname;\n\n/**\n */\nconst getModels = (state) => {\n const models = [];\n\n Object.keys(state.modularui).forEach((modelKey: string) => {\n const modelEntry = state.modularui[modelKey];\n\n if (has(modelEntry, \"model\")) {\n const { key, selfhref, label, type } = modelEntry.model;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n};\n\nexport const getActiveModels: (state: ReduxState) => Array<{\n key: string,\n href: Href,\n label: string,\n type: string,\n}> = createSelectorCreator(\n defaultMemoize,\n (value, other) => JSON.stringify(value) === JSON.stringify(other)\n)([getLocation, getModels], (location, models) => {\n const contextModels = [];\n\n if (location) {\n const locationParts = location.split(\"/\");\n\n locationParts.reduce((accumulator, current) => {\n const path = `${accumulator}/${current}`;\n\n // Remove modelcatalog part to match breadcrumb parts\n const comparePath = decodeURIComponent(path).replace(\n \"/modelcatalog/\",\n \"/\"\n );\n\n const foundEntry = models.find(\n (model) => model.selfhref && model.selfhref.equals(comparePath)\n );\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n path.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n\n return path;\n });\n }\n\n return contextModels;\n});\n\n/**\n */\nexport const getPreference = (\n state: ReduxState,\n preferenceName: string\n): null | PreferenceValue => {\n if (state && state.preferences) {\n return state.preferences[preferenceName];\n }\n\n return null;\n};\n\n/**\n * @deprecated - Use getFirstModelByInstance or the appropriate getter for the model type: getApplication, getTab, etc\n */\nexport const getModelsByType = (\n state: ReduxState,\n type: string\n): Array<ModularUIModel> => {\n if (state && state.modularui) {\n return Object.keys(state.modularui)\n .filter(\n (key) =>\n state.modularui[key] &&\n state.modularui[key].model &&\n state.modularui[key].model.type === type\n )\n .map((key) => state.modularui[key].model);\n }\n\n return [];\n};\n"],"file":"selectors.js"}
|
|
1
|
+
{"version":3,"file":"selectors.js","names":["getAllModelsByInstance","state","instance","locale","i18n","modularui","key","model","getFirstModelByInstance","getActiveModelByInstance","location","getLocation","selfhref","path","getApplication","ApplicationModel","getTab","TabModel","getCaseView","CaseViewModel","getForm","FormModel","modelByHref","href","findHref","Href","modelConfigKey","equals","keyByHref","router","pathname","getModels","models","forEach","modelKey","modelEntry","label","type","modelInfo","selfContentLink","ContentModel","ContentTOCModel","push","getActiveModels","defaultMemoize","value","other","contextModels","locationParts","split","reduce","accumulator","current","comparePath","decodeURIComponent","replace","foundEntry","encodedHref","toString","getPreference","preferenceName","preferences","getModelsByType"],"sources":["../../../src/redux/_modularui/selectors.js"],"sourcesContent":["// @flow\nimport { createSelectorCreator, defaultMemoize } from \"reselect\";\nimport { has } from \"../../utils/helpers/objects\";\n\nimport Href from \"../../models/href/Href\";\nimport ContentModel from \"../../models/content/ContentModel\";\nimport ContentTOCModel from \"../../models/content/ContentTOCModel\";\nimport ApplicationModel from \"../../models/application/ApplicationModel\";\nimport TabModel from \"../../models/tab/TabModel\";\nimport CaseViewModel from \"../../models/caseview/CaseViewModel\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { ReduxState, PreferenceValue } from \"../types\";\nimport type { ModularUIModel } from \"../../models/types\";\n\n/**\n */\nexport const getAllModelsByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): Array<ModularUIModel> => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n return Object.keys(modularui)\n .filter((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n })\n .map((key) => modularui[key].model);\n }\n\n return [];\n};\n\n/**\n */\nexport const getFirstModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): T | null => {\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return model instanceof instance && model.locale === locale;\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n */\nexport const getActiveModelByInstance = <T>(\n state: ReduxState,\n instance: Class<T>\n): T | null => {\n const location = getLocation(state);\n\n const locale = state?.i18n?.locale || \"en\";\n const modularui = state?.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const { model } = modularui[key];\n return (\n model instanceof instance &&\n model.locale === locale &&\n location.startsWith(model.selfhref.path)\n );\n });\n\n if (key) {\n const { model } = modularui[key];\n if (model instanceof instance) {\n return model;\n }\n }\n }\n\n return null;\n};\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: ReduxState): null | ApplicationModel =>\n getFirstModelByInstance(state, ApplicationModel);\n\n/**\n */\nexport const getTab = (state: ReduxState): null | TabModel =>\n getFirstModelByInstance(state, TabModel);\n\n/**\n */\nexport const getCaseView = (state: ReduxState): null | CaseViewModel =>\n getFirstModelByInstance(state, CaseViewModel);\n\n/**\n */\nexport const getForm = (state: ReduxState): null | FormModel =>\n getFirstModelByInstance(state, FormModel);\n\n/**\n * Get the model by it's href\n */\nexport const modelByHref = (\n state: ReduxState,\n href: Href | string\n): null | ModularUIModel => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n const modelConfigKey = Object.keys(state.modularui).find((key) => {\n const model = state.modularui[key];\n\n return (\n model.model &&\n model.model.selfhref &&\n model.model.selfhref.equals(findHref)\n );\n });\n\n if (modelConfigKey) {\n return state.modularui[modelConfigKey].model;\n }\n }\n\n return null;\n};\n\n/**\n * Return the key of a model by the selfhref the model is saved in the reducer\n */\nexport const keyByHref = (state: ReduxState, href: Href | string): ?string => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).find((key) => {\n const { model } = state.modularui[key];\n\n return model && model.selfhref && model.selfhref.equals(findHref);\n });\n }\n\n return null;\n};\n\n/**\n */\nconst getLocation = (state): string => state?.router?.location.pathname;\n\n/**\n */\nconst getModels = (state) => {\n const models = [];\n\n Object.keys(state.modularui).forEach((modelKey: string) => {\n const modelEntry = state.modularui[modelKey];\n\n if (has(modelEntry, \"model\")) {\n const { key, selfhref, label, type } = modelEntry.model;\n\n const modelInfo = {\n key,\n selfhref,\n label,\n type,\n selfContentLink: null,\n };\n\n if (\n modelEntry.model instanceof ContentModel ||\n modelEntry.model instanceof ContentTOCModel\n ) {\n models.push({\n ...modelInfo,\n selfContentLink: modelEntry.model.selfContentLink,\n });\n } else {\n models.push(modelInfo);\n }\n }\n });\n\n return models;\n};\n\nexport const getActiveModels: (state: ReduxState) => Array<{\n key: string,\n href: Href,\n label: string,\n type: string,\n}> = createSelectorCreator(\n defaultMemoize,\n (value, other) => JSON.stringify(value) === JSON.stringify(other)\n)([getLocation, getModels], (location, models) => {\n const contextModels = [];\n\n if (location) {\n const locationParts = location.split(\"/\");\n\n locationParts.reduce((accumulator, current) => {\n const path = `${accumulator}/${current}`;\n\n // Remove modelcatalog part to match breadcrumb parts\n const comparePath = decodeURIComponent(path).replace(\n \"/modelcatalog/\",\n \"/\"\n );\n\n const foundEntry = models.find(\n (model) => model.selfhref && model.selfhref.equals(comparePath)\n );\n\n if (foundEntry) {\n const { key, label, type, selfhref, selfContentLink } = foundEntry;\n\n const href =\n path.startsWith(\"/modelcatalog/\") && selfContentLink\n ? new Href(`/modelcatalog${selfContentLink.encodedHref.toString()}`)\n : selfhref;\n\n contextModels.push({ key, href, label, type });\n }\n\n return path;\n });\n }\n\n return contextModels;\n});\n\n/**\n */\nexport const getPreference = (\n state: ReduxState,\n preferenceName: string\n): null | PreferenceValue => {\n if (state && state.preferences) {\n return state.preferences[preferenceName];\n }\n\n return null;\n};\n\n/**\n * @deprecated - Use getFirstModelByInstance or the appropriate getter for the model type: getApplication, getTab, etc\n */\nexport const getModelsByType = (\n state: ReduxState,\n type: string\n): Array<ModularUIModel> => {\n if (state && state.modularui) {\n return Object.keys(state.modularui)\n .filter(\n (key) =>\n state.modularui[key] &&\n state.modularui[key].model &&\n state.modularui[key].model.type === type\n )\n .map((key) => state.modularui[key].model);\n }\n\n return [];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAKA;AACA;AACO,IAAMA,sBAAsB,GAAG,SAAzBA,sBAAyB,CACpCC,KADoC,EAEpCC,QAFoC,EAGV;EAAA;;EAC1B,IAAMC,MAAM,GAAG,CAAAF,KAAK,SAAL,IAAAA,KAAK,WAAL,2BAAAA,KAAK,CAAEG,IAAP,4DAAaD,MAAb,KAAuB,IAAtC;EACA,IAAME,SAAS,GAAGJ,KAAH,aAAGA,KAAH,uBAAGA,KAAK,CAAEI,SAAzB;;EAEA,IAAIA,SAAJ,EAAe;IAAA;;IACb,OAAO,iFAAYA,SAAZ,mBACG,UAACC,GAAD,EAAS;MACf,IAAQC,KAAR,GAAkBF,SAAS,CAACC,GAAD,CAA3B,CAAQC,KAAR;MACA,OAAOA,KAAK,YAAYL,QAAjB,IAA6BK,KAAK,CAACJ,MAAN,KAAiBA,MAArD;IACD,CAJI,kBAKA,UAACG,GAAD;MAAA,OAASD,SAAS,CAACC,GAAD,CAAT,CAAeC,KAAxB;IAAA,CALA,CAAP;EAMD;;EAED,OAAO,EAAP;AACD,CAjBM;AAmBP;AACA;;;;;AACO,IAAMC,uBAAuB,GAAG,SAA1BA,uBAA0B,CACrCP,KADqC,EAErCC,QAFqC,EAGxB;EAAA;;EACb,IAAMC,MAAM,GAAG,CAAAF,KAAK,SAAL,IAAAA,KAAK,WAAL,4BAAAA,KAAK,CAAEG,IAAP,8DAAaD,MAAb,KAAuB,IAAtC;EACA,IAAME,SAAS,GAAGJ,KAAH,aAAGA,KAAH,uBAAGA,KAAK,CAAEI,SAAzB;;EAEA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C,IAF6B,EAGH;EAC1B,IAAIpC,KAAK,IAAIA,KAAK,CAACI,SAAnB,EAA8B;IAAA;;IAC5B,OAAO,kFAAYJ,KAAK,CAACI,SAAlB,mBAEH,UAACC,GAAD;MAAA,OACEL,KAAK,CAACI,SAAN,CAAgBC,GAAhB,KACAL,KAAK,CAACI,SAAN,CAAgBC,GAAhB,EAAqBC,KADrB,IAEAN,KAAK,CAACI,SAAN,CAAgBC,GAAhB,EAAqBC,KAArB,CAA2B8B,IAA3B,KAAoCA,IAHtC;IAAA,CAFG,mBAOA,UAAC/B,GAAD;MAAA,OAASL,KAAK,CAACI,SAAN,CAAgBC,GAAhB,EAAqBC,KAA9B;IAAA,CAPA,CAAP;EAQD;;EAED,OAAO,EAAP;AACD,CAhBM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/redux/_modularui/types.js"],"sourcesContent":["// @flow\nimport type { ModularUIModel } from \"../../models/types\";\nimport type Href from \"../../models/href/Href\";\nimport type { FetchException } from \"../../exceptions\";\nimport type { NoAction } from \"../types\";\nimport typeof {\n HTTP_METHODS,\n MODULARUI_STATUS,\n} from \"../../constants/Constants\";\nimport type { RequestBaseOptions } from \"../../utils/fetch/types\";\nimport type { ComponentType } from \"react\";\n\nexport type ModularUIOptions = {\n propName?: string,\n removeOnUnmount?: boolean,\n ...RequestBaseOptions,\n};\n\nexport type ModelEntry = {\n +status: string,\n +model: ModularUIModel,\n +lastModification: number,\n};\n\nexport type ModularUIState = {\n +[string]: ModelEntry,\n ...\n};\n\nexport type SetModelAction = {\n type: \"MODULARUI/SET\",\n payload: {\n key: string,\n model: ?ModularUIModel,\n },\n};\n\nexport type UpdateModelAction = {\n type: \"MODULARUI/UPDATE\",\n payload: ModularUIModel,\n};\n\nexport type ModularUIAction = {\n type: \"MODULARUI/FETCH\",\n payload: {\n href: Href,\n method?: $Keys<HTTP_METHODS>,\n data?: string | { [key: string]: string },\n locale: string,\n childmodels?: boolean,\n targetModel?: Class<ModularUIModel>,\n successAction: (\n model: ModularUIModel\n ) => UpdateModelAction | SetModelAction,\n errorAction?: (\n error: FetchException\n ) => UpdateStatusAction | RemoveModelByKeyAction | NoAction,\n },\n};\n\nexport type RemoveModelByKeyAction = {\n type: \"MODULARUI/REMOVE_KEY\",\n payload: string,\n};\n\nexport type ResetModularUIAction = {\n type: \"MODULARUI/RESET\",\n};\n\nexport type UpdateStatusAction = {\n type: \"MODULARUI/STATUS\",\n payload: {\n key: string,\n status: $Keys<MODULARUI_STATUS>,\n },\n};\n\nexport type ModularUIConnector = (\n Component: ComponentType<any>\n) => ComponentType<any>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"withModularUI.js","names":["getLocaleCode","state","i18n","locale","modularui","localeCode","href","options","modularuiRequest","ModularUIRequest","mapStateToProps","mapDispatchToProps","startProgress","finishProgress","reloadModel","handleError","withModularui"],"sources":["../../../src/redux/_modularui/withModularUI.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { createSelector } from \"reselect\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport { startProgress, finishProgress } from \"../actions/ProgressIndicator\";\n\nimport { handleError } from \"../actions/Error\";\n\nimport { reloadModel } from \"./actions\";\n\nimport type {\n ReduxState,\n StartProgressAction,\n FinishProgressAction,\n ThunkAction,\n} from \"../types\";\nimport type Href from \"../../models/href/Href\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { RequestBaseOptions } from \"../../utils/fetch/types\";\nimport type FetchException from \"../../exceptions/FetchException\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n modularui: (href: Href, options: any) => ModularUIRequest,\n locale: string,\n};\n\ntype DispatchProps = {\n startProgress: () => StartProgressAction,\n finishProgress: () => FinishProgressAction,\n reloadModel: (\n model: ModularUIModel,\n options?: RequestBaseOptions\n ) => ThunkAction,\n handleError: (error: Error | FetchException) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\n/**\n */\nconst getLocaleCode = (state) => state.i18n.locale ?? \"en\";\n\nconst modularui = createSelector(\n [getLocaleCode],\n (localeCode) =>\n (href, options = {}) => {\n const modularuiRequest = new ModularUIRequest(href, options);\n modularuiRequest.locale = localeCode;\n return modularuiRequest;\n }\n);\n\n/**\n */\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n modularui: modularui(state),\n locale: state.i18n.locale,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n startProgress,\n finishProgress,\n reloadModel,\n handleError,\n};\n\n/**\n * Injects the modular ui service and the progress start and finish actions\n * This can be used to request modular ui services inside react view components\n */\nconst withModularui: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n\nexport default withModularui;\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAkCA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;EAAA;;EAAA,6BAAWA,KAAK,CAACC,IAAN,CAAWC,MAAtB,mEAAgC,IAAhC;AAAA,CAAtB;;AAEA,IAAMC,SAAS,GAAG,8BAChB,CAACJ,aAAD,CADgB,EAEhB,UAACK,UAAD;EAAA,OACE,UAACC,IAAD,EAAwB;IAAA,IAAjBC,OAAiB,uEAAP,EAAO;IACtB,IAAMC,gBAAgB,GAAG,IAAIC,yBAAJ,CAAqBH,IAArB,EAA2BC,OAA3B,CAAzB;IACAC,gBAAgB,CAACL,MAAjB,GAA0BE,UAA1B;IACA,OAAOG,gBAAP;EACD,CALH;AAAA,CAFgB,CAAlB;AAUA;AACA;;AACA,IAAME,eAAe,GAAG,SAAlBA,eAAkB,CAACT,KAAD;EAAA,OAAoC;IAC1DG,SAAS,EAAEA,SAAS,CAACH,KAAD,CADsC;IAE1DE,MAAM,EAAEF,KAAK,CAACC,IAAN,CAAWC;EAFuC,CAApC;AAAA,CAAxB;;AAKA,IAAMQ,kBAAiC,GAAG;EACxCC,aAAa,EAAbA,gCADwC;EAExCC,cAAc,EAAdA,iCAFwC;EAGxCC,WAAW,EAAXA,oBAHwC;EAIxCC,WAAW,EAAXA;AAJwC,CAA1C;AAOA;AACA;AACA;AACA;;AACA,IAAMC,aAAiC,GAAG,yBAOxCN,eAPwC,EAOvBC,kBAPuB,CAA1C;eASeK,a"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"actions.js","names":["locationChange","location","action","type","payload","push","state","replace","go","delta","goBack","goForward"],"sources":["../../../src/redux/_router/actions.js"],"sourcesContent":["// @flow\nimport type { HistoryAction, Location, LocationShape } from \"react-router\";\n\nimport type {\n GoAction,\n GoBackAction,\n GoForwardAction,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n} from \"./types\";\n\n/**\n * Action called on location changes, reducer listens to these actions and updates reducers\n */\nexport const locationChange = (\n location: Location,\n action: HistoryAction\n): LocationChangeAction => ({\n type: \"ROUTER/LOCATION_CHANGE\",\n payload: {\n location,\n action,\n },\n});\n\n/**\n * Actions called to navigate, middleware listens to these actions and calls the appropriate history method\n */\nexport const push = (\n location: LocationShape | string,\n state?: { ... }\n): PushAction => ({\n type: \"ROUTER/PUSH\",\n payload: {\n location,\n state,\n },\n});\n\n/**\n */\nexport const replace = (\n location: LocationShape | string,\n state?: { ... }\n): ReplaceAction => {\n return {\n type: \"ROUTER/REPLACE\",\n payload: {\n location,\n state,\n },\n };\n};\n\n/**\n */\nexport const go = (delta: number): GoAction => ({\n type: \"ROUTER/GO\",\n payload: {\n delta,\n },\n});\n\n/**\n */\nexport const goBack = (): GoBackAction => ({\n type: \"ROUTER/GOBACK\",\n});\n\n/**\n */\nexport const goForward = (): GoForwardAction => ({\n type: \"ROUTER/GOFORWARD\",\n});\n"],"mappings":";;;;;;;AAYA;AACA;AACA;AACO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAC5BC,QAD4B,EAE5BC,MAF4B;EAAA,OAGF;IAC1BC,IAAI,EAAE,wBADoB;IAE1BC,OAAO,EAAE;MACPH,QAAQ,EAARA,QADO;MAEPC,MAAM,EAANA;IAFO;EAFiB,CAHE;AAAA,CAAvB;AAWP;AACA;AACA;;;;;AACO,IAAMG,IAAI,GAAG,SAAPA,IAAO,CAClBJ,QADkB,EAElBK,KAFkB;EAAA,OAGF;IAChBH,IAAI,EAAE,aADU;IAEhBC,OAAO,EAAE;MACPH,QAAQ,EAARA,QADO;MAEPK,KAAK,EAALA;IAFO;EAFO,CAHE;AAAA,CAAb;AAWP;AACA;;;;;AACO,IAAMC,OAAO,GAAG,SAAVA,OAAU,CACrBN,QADqB,EAErBK,KAFqB,EAGH;EAClB,OAAO;IACLH,IAAI,EAAE,gBADD;IAELC,OAAO,EAAE;MACPH,QAAQ,EAARA,QADO;MAEPK,KAAK,EAALA;IAFO;EAFJ,CAAP;AAOD,CAXM;AAaP;AACA;;;;;AACO,IAAME,EAAE,GAAG,SAALA,EAAK,CAACC,KAAD;EAAA,OAA8B;IAC9CN,IAAI,EAAE,WADwC;IAE9CC,OAAO,EAAE;MACPK,KAAK,EAALA;IADO;EAFqC,CAA9B;AAAA,CAAX;AAOP;AACA;;;;;AACO,IAAMC,MAAM,GAAG,SAATA,MAAS;EAAA,OAAqB;IACzCP,IAAI,EAAE;EADmC,CAArB;AAAA,CAAf;AAIP;AACA;;;;;AACO,IAAMQ,SAAS,GAAG,SAAZA,SAAY;EAAA,OAAwB;IAC/CR,IAAI,EAAE;EADyC,CAAxB;AAAA,CAAlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"connectors.js","names":["withKey","state","locationKey","router","location","key","withPathname","pathname","withLocation","withQuerystring","querystring","search","withNavigation","push","replace","go","goBack","goForward"],"sources":["../../../src/redux/_router/connectors.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { push, replace, go, goBack, goForward } from \"./actions\";\n\nimport type { Location, LocationShape } from \"react-router\";\nimport type {\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./types\";\nimport type { ComponentType } from \"react\";\nimport type { ReduxState } from \"../types\";\n\ntype WithKeyStateProps = { locationKey: string, ... };\n\ntype WithPathnameProps = { pathname: string, ... };\n\ntype WithLocationProps = { location: Location, ... };\n\ntype WithQuerystringProps = { querystring: string, ... };\n\ntype NavigationDispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n replace: (location: LocationShape | string, state?: { ... }) => ReplaceAction,\n go: (delta: number) => GoAction,\n goBack: () => GoBackAction,\n goForward: () => GoForwardAction,\n};\n\n/**\n */\nconst withKey: ComponentType<any> = connect<WithKeyStateProps, {}, _, _, _, _>(\n (state: ReduxState) => ({\n locationKey: state.router.location?.key ?? \"\",\n })\n);\n\n/**\n */\nconst withPathname: ComponentType<any> = connect<\n WithPathnameProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n pathname: state.router.location?.pathname,\n}));\n\n/**\n */\nconst withLocation: ComponentType<any> = connect<\n WithLocationProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n location: state.router.location,\n}));\n\n/**\n */\nconst withQuerystring: ComponentType<any> = connect<\n WithQuerystringProps,\n {},\n _,\n _,\n _,\n _\n>((state: ReduxState) => ({\n querystring: state.router.location?.search,\n}));\n\n/**\n */\nconst withNavigation: ComponentType<any> = connect<\n NavigationDispatchProps,\n {},\n _,\n _,\n _,\n _\n>(null, {\n push,\n replace,\n go,\n goBack,\n goForward,\n});\n\nexport { withKey, withPathname, withLocation, withQuerystring, withNavigation };\n"],"mappings":";;;;;;;AACA;;AAEA;;AA6BA;AACA;AACA,IAAMA,OAA2B,GAAG,yBAClC,UAACC,KAAD;EAAA;;EAAA,OAAwB;IACtBC,WAAW,qDAAED,KAAK,CAACE,MAAN,CAAaC,QAAf,2DAAE,uBAAuBC,GAAzB,yEAAgC;EADrB,CAAxB;AAAA,CADkC,CAApC;AAMA;AACA;;;AACA,IAAMC,YAAgC,GAAG,yBAOvC,UAACL,KAAD;EAAA;;EAAA,OAAwB;IACxBM,QAAQ,4BAAEN,KAAK,CAACE,MAAN,CAAaC,QAAf,2DAAE,uBAAuBG;EADT,CAAxB;AAAA,CAPuC,CAAzC;AAWA;AACA;;;AACA,IAAMC,YAAgC,GAAG,yBAOvC,UAACP,KAAD;EAAA,OAAwB;IACxBG,QAAQ,EAAEH,KAAK,CAACE,MAAN,CAAaC;EADC,CAAxB;AAAA,CAPuC,CAAzC;AAWA;AACA;;;AACA,IAAMK,eAAmC,GAAG,yBAO1C,UAACR,KAAD;EAAA;;EAAA,OAAwB;IACxBS,WAAW,4BAAET,KAAK,CAACE,MAAN,CAAaC,QAAf,2DAAE,uBAAuBO;EADZ,CAAxB;AAAA,CAP0C,CAA5C;AAWA;AACA;;;AACA,IAAMC,cAAkC,GAAG,yBAOzC,IAPyC,EAOnC;EACNC,IAAI,EAAJA,aADM;EAENC,OAAO,EAAPA,gBAFM;EAGNC,EAAE,EAAFA,WAHM;EAINC,MAAM,EAANA,eAJM;EAKNC,SAAS,EAATA;AALM,CAPmC,CAA3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/redux/_router/index.js"],"sourcesContent":["// @flow\nexport * from \"./middleware\";\nexport * from \"./reducer\";\n\nexport * from \"./actions\";\nexport * from \"./connectors\";\n\nexport type * from \"./types\";\n"],"mappings":";;;;;;;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"middleware.js","names":["routerMiddleware","history","next","action","type","payload","location","state","push","replace","delta","go","goBack","goForward"],"sources":["../../../src/redux/_router/middleware.js"],"sourcesContent":["// @flow\nimport type { RouterHistory } from \"react-router\";\nimport type { Middleware } from \"redux\";\nimport type {\n ReduxAction,\n ReduxState,\n Dispatch,\n PossibleAction,\n} from \"../types\";\n\n/**\n */\nexport const routerMiddleware =\n (history: RouterHistory): Middleware<ReduxState, ReduxAction, Dispatch> =>\n () =>\n (next: Dispatch) =>\n (action: PossibleAction) => {\n if (action.type === \"ROUTER/PUSH\") {\n // $FlowExpectedError[prop-missing]\n const { location, state } = action.payload;\n history.push(location, state);\n } else if (action.type === \"ROUTER/REPLACE\") {\n // $FlowExpectedError[prop-missing]\n const { location, state } = action.payload;\n history.replace(location, state);\n } else if (action.type === \"ROUTER/GO\") {\n // $FlowExpectedError[prop-missing]\n const { delta } = action.payload;\n history.go(delta);\n } else if (action.type === \"ROUTER/GOBACK\") {\n history.goBack();\n } else if (action.type === \"ROUTER/GOFORWARD\") {\n history.goForward();\n }\n\n return next(action);\n };\n"],"mappings":";;;;;;;AAUA;AACA;AACO,IAAMA,gBAAgB,GAC3B,SADWA,gBACX,CAACC,OAAD;EAAA,OACA;IAAA,OACA,UAACC,IAAD;MAAA,OACA,UAACC,MAAD,EAA4B;QAC1B,IAAIA,MAAM,CAACC,IAAP,KAAgB,aAApB,EAAmC;UACjC;UACA,sBAA4BD,MAAM,CAACE,OAAnC;UAAA,IAAQC,QAAR,mBAAQA,QAAR;UAAA,IAAkBC,KAAlB,mBAAkBA,KAAlB;UACAN,OAAO,CAACO,IAAR,CAAaF,QAAb,EAAuBC,KAAvB;QACD,CAJD,MAIO,IAAIJ,MAAM,CAACC,IAAP,KAAgB,gBAApB,EAAsC;UAC3C;UACA,uBAA4BD,MAAM,CAACE,OAAnC;UAAA,IAAQC,SAAR,oBAAQA,QAAR;UAAA,IAAkBC,MAAlB,oBAAkBA,KAAlB;UACAN,OAAO,CAACQ,OAAR,CAAgBH,SAAhB,EAA0BC,MAA1B;QACD,CAJM,MAIA,IAAIJ,MAAM,CAACC,IAAP,KAAgB,WAApB,EAAiC;UACtC;UACA,IAAQM,KAAR,GAAkBP,MAAM,CAACE,OAAzB,CAAQK,KAAR;UACAT,OAAO,CAACU,EAAR,CAAWD,KAAX;QACD,CAJM,MAIA,IAAIP,MAAM,CAACC,IAAP,KAAgB,eAApB,EAAqC;UAC1CH,OAAO,CAACW,MAAR;QACD,CAFM,MAEA,IAAIT,MAAM,CAACC,IAAP,KAAgB,kBAApB,EAAwC;UAC7CH,OAAO,CAACY,SAAR;QACD;;QAED,OAAOX,IAAI,CAACC,MAAD,CAAX;MACD,CArBD;IAAA,CADA;EAAA,CADA;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"reducer.js","names":["initialState","RouterReducer","state","action","type","payload"],"sources":["../../../src/redux/_router/reducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction } from \"../types\";\nimport type { RouterState } from \"./types\";\n\n// REDUCER\nconst initialState: $Shape<RouterState> = {};\n\n/**\n * Router reducer\n */\nexport const RouterReducer: Reducer<RouterState, ReduxAction> = (\n state = initialState,\n action = null\n) => {\n if (action && action.type === \"ROUTER/LOCATION_CHANGE\") {\n return action.payload;\n }\n\n return state;\n};\n"],"mappings":";;;;;;AAKA;AACA,IAAMA,YAAiC,GAAG,EAA1C;AAEA;AACA;AACA;;AACO,IAAMC,aAAgD,GAAG,SAAnDA,aAAmD,GAG3D;EAAA,IAFHC,KAEG,uEAFKF,YAEL;EAAA,IADHG,MACG,uEADM,IACN;;EACH,IAAIA,MAAM,IAAIA,MAAM,CAACC,IAAP,KAAgB,wBAA9B,EAAwD;IACtD,OAAOD,MAAM,CAACE,OAAd;EACD;;EAED,OAAOH,KAAP;AACD,CATM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/redux/_router/types.js"],"sourcesContent":["// @flow\nimport type { HistoryAction, Location, LocationShape } from \"react-router\";\n\nexport type RouterState = {\n +location: Location,\n +action: HistoryAction,\n};\n\nexport type LocationChangeAction = {\n type: \"ROUTER/LOCATION_CHANGE\",\n payload: {\n location: Location,\n action: HistoryAction,\n },\n};\n\nexport type PushAction = {\n type: \"ROUTER/PUSH\",\n payload: {\n location: string | LocationShape,\n state?: { ... },\n },\n};\nexport type ReplaceAction = {\n type: \"ROUTER/REPLACE\",\n payload: {\n location: string | LocationShape,\n state?: { ... },\n },\n};\nexport type GoAction = {\n type: \"ROUTER/GO\",\n payload: {\n delta: number,\n },\n};\nexport type GoBackAction = {\n type: \"ROUTER/GOBACK\",\n};\n\nexport type GoForwardAction = {\n type: \"ROUTER/GOFORWARD\",\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Application.js","names":["reloadApplication","dispatch","getState","modelKey","locale","i18n","Href","targetModel","ApplicationModel"],"sources":["../../../src/redux/actions/Application.js"],"sourcesContent":["// @flow\nimport { loadModularUI } from \"../_modularui/actions\";\nimport { keyByHref } from \"../_modularui/selectors\";\nimport { ApplicationModel, Href } from \"../../models\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\n\n/**\n */\nexport const reloadApplication =\n (): ThunkAction => (dispatch: Dispatch, getState: GetState) => {\n let modelKey = keyByHref(getState(), \"/\");\n\n if (!modelKey) {\n const locale = getState().i18n?.locale;\n modelKey = `application(/)(${locale})`;\n }\n\n return dispatch(\n loadModularUI(modelKey, new Href(\"/\", \"Application\"), {\n targetModel: ApplicationModel,\n })\n );\n };\n"],"mappings":";;;;;;;AACA;;AACA;;AACA;;AAIA;AACA;AACO,IAAMA,iBAAiB,GAC5B,SADWA,iBACX;EAAA,OAAmB,UAACC,QAAD,EAAqBC,QAArB,EAA4C;IAC7D,IAAIC,QAAQ,GAAG,0BAAUD,QAAQ,EAAlB,EAAsB,GAAtB,CAAf;;IAEA,IAAI,CAACC,QAAL,EAAe;MAAA;;MACb,IAAMC,MAAM,qBAAGF,QAAQ,GAAGG,IAAd,mDAAG,eAAiBD,MAAhC;MACAD,QAAQ,4BAAqBC,MAArB,MAAR;IACD;;IAED,OAAOH,QAAQ,CACb,4BAAcE,QAAd,EAAwB,IAAIG,YAAJ,CAAS,GAAT,EAAc,aAAd,CAAxB,EAAsD;MACpDC,WAAW,EAAEC;IADuC,CAAtD,CADa,CAAf;EAKD,CAbD;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Authorization.js","names":["handleUnauthorized","errorResponse","dispatch","getState","connectKey","response","error","window","location","reload","Cache","getItem","removeItem","isInvalidUsername","WARNING_TIMEOUT","NOTIFICATION_TYPES","WARNING","id","defaultMessage","message","router","pathname","LOGIN_PATH","locationFrom","state","from","modal","type"],"sources":["../../../src/redux/actions/Authorization.js"],"sourcesContent":["// @flow\nimport { LOGIN_PATH, NOTIFICATION_TYPES } from \"../../constants/Constants\";\n\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { replace } from \"../_router/actions\";\nimport { logoutSuccess } from \"./SignOut\";\nimport { showNotification } from \"./Notification\";\n\nimport Cache from \"../../utils/browser/Cache\";\n\nimport { removeModelByKey } from \"../_modularui/actions\";\nimport { reloadApplication } from \"./Application\";\n\nimport { getSetting } from \"../../constants\";\n\nimport type { ThunkAction } from \"../types\";\n\n/**\n */\nexport const handleUnauthorized =\n (errorResponse: ErrorResponse): ThunkAction =>\n (dispatch, getState) => {\n if (errorResponse.connectKey) {\n dispatch(removeModelByKey(errorResponse.connectKey));\n }\n\n if (\n getSetting(\"PAGE_RELOAD_ON_UNAUTHORIZED_ERROR\", false) &&\n errorResponse.response?.error\n ) {\n window.location.reload();\n return;\n }\n\n // reload application when flag auth is set\n if (Cache.getItem(\"auth\")) {\n dispatch(reloadApplication());\n }\n\n // set logged auth\n dispatch(logoutSuccess());\n\n Cache.removeItem(\"auth\");\n\n if (errorResponse.isInvalidUsername) {\n const WARNING_TIMEOUT = 4000;\n dispatch(\n showNotification(\n NOTIFICATION_TYPES.WARNING,\n {\n id: errorResponse.id,\n defaultMessage: errorResponse.message,\n },\n null,\n WARNING_TIMEOUT\n )\n );\n }\n\n // add current location as from location before redirect\n const location = getState().router.location;\n if (location?.pathname !== LOGIN_PATH) {\n const locationFrom = location?.state?.from;\n return dispatch(\n replace(LOGIN_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n // cannot open login in a modal, because of previous locations that might be secure\n modal: false,\n })\n );\n }\n\n return { type: \"NO_ACTION\" };\n };\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAEA;;AAEA;;AACA;;AAEA;;AAIA;AACA;AACO,IAAMA,kBAAkB,GAC7B,SADWA,kBACX,CAACC,aAAD;EAAA,OACA,UAACC,QAAD,EAAWC,QAAX,EAAwB;IAAA;;IACtB,IAAIF,aAAa,CAACG,UAAlB,EAA8B;MAC5BF,QAAQ,CAAC,gCAAiBD,aAAa,CAACG,UAA/B,CAAD,CAAR;IACD;;IAED,IACE,2BAAW,mCAAX,EAAgD,KAAhD,8BACAH,aAAa,CAACI,QADd,kDACA,sBAAwBC,KAF1B,EAGE;MACAC,MAAM,CAACC,QAAP,CAAgBC,MAAhB;MACA;IACD,CAXqB,CAatB;;;IACA,IAAIC,eAAMC,OAAN,CAAc,MAAd,CAAJ,EAA2B;MACzBT,QAAQ,CAAC,qCAAD,CAAR;IACD,CAhBqB,CAkBtB;;;IACAA,QAAQ,CAAC,6BAAD,CAAR;;IAEAQ,eAAME,UAAN,CAAiB,MAAjB;;IAEA,IAAIX,aAAa,CAACY,iBAAlB,EAAqC;MACnC,IAAMC,eAAe,GAAG,IAAxB;MACAZ,QAAQ,CACN,oCACEa,8BAAmBC,OADrB,EAEE;QACEC,EAAE,EAAEhB,aAAa,CAACgB,EADpB;QAEEC,cAAc,EAAEjB,aAAa,CAACkB;MAFhC,CAFF,EAME,IANF,EAOEL,eAPF,CADM,CAAR;IAWD,CApCqB,CAsCtB;;;IACA,IAAMN,QAAQ,GAAGL,QAAQ,GAAGiB,MAAX,CAAkBZ,QAAnC;;IACA,IAAI,CAAAA,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAEa,QAAV,MAAuBC,qBAA3B,EAAuC;MAAA;;MACrC,IAAMC,YAAY,GAAGf,QAAH,aAAGA,QAAH,0CAAGA,QAAQ,CAAEgB,KAAb,oDAAG,gBAAiBC,IAAtC;MACA,OAAOvB,QAAQ,CACb,sBAAQoB,qBAAR,EAAoB;QAClBG,IAAI,EAAEF,YAAY,GAAGA,YAAH,GAAkBpB,QAAQ,GAAGiB,MAAX,CAAkBZ,QADpC;QAElB;QACAkB,KAAK,EAAE;MAHW,CAApB,CADa,CAAf;IAOD;;IAED,OAAO;MAAEC,IAAI,EAAE;IAAR,CAAP;EACD,CArDD;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Error.js","names":["saveError","error","type","payload","defaultErrorResponseHandler","dispatch","isResourceNotFoundAfterReload","isRemoteServiceException","isUnauthorized","isBlocked","isConcurrentUser","LOGOUT_PATH","isChangePassword","IS_SERVER","setTimeout","customErrorResponseHandler","errorResponse","defaultHandler","setCustomErrorResponseHandler","handler","handleError","ErrorResponse"],"sources":["../../../src/redux/actions/Error.js"],"sourcesContent":["// @flow\nimport { LOGOUT_PATH, IS_SERVER } from \"../../constants/Constants\";\n\nimport ErrorResponse from \"../../models/error/ErrorResponse\";\n\nimport { push } from \"../_router/actions\";\nimport { showXHRErrorNotification } from \"./Notification\";\nimport { resetProgress } from \"./ProgressIndicator\";\nimport { changePassword } from \"./SignIn\";\nimport { handleUnauthorized } from \"./Authorization\";\n\nimport type { FetchException } from \"../../exceptions\";\nimport type { Dispatch, SaveErrorAction, ThunkAction } from \"../types\";\n\ntype DefaultErrorResponseHandler = (error: ErrorResponse) => ThunkAction;\ntype CustomErrorResponseHandler = (\n errorResponse: ErrorResponse,\n defaultHandler: DefaultErrorResponseHandler\n) => ThunkAction;\n\n/**\n */\nconst saveError = (error): SaveErrorAction => ({\n type: \"SAVE_ERROR\",\n payload: error,\n});\n\n/**\n */\nconst defaultErrorResponseHandler: DefaultErrorResponseHandler =\n (error: ErrorResponse): ThunkAction =>\n (dispatch: Dispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch({ type: \"NO_ACTION\" });\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser) {\n dispatch(push(LOGOUT_PATH));\n }\n\n if (error.isChangePassword) {\n return dispatch(changePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n setTimeout(() => {\n throw error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\n/**\n * Standard Custom error response, acts as a proxy and can be overwritten by {@link setCustomErrorResponseHandler}\n */\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (errorResponse, defaultHandler) => (dispatch: Dispatch) =>\n dispatch(defaultHandler(errorResponse));\n\n/**\n * Set a custom error response handler,\n * can be used when custom functionality is needed on certain (error) response\n * of the modular ui, for example when custom logic is needed when a user is unauthorized<br>\n * It receives an {@link ErrorResponse} and the {@link defaultErrorResponseHandler}\n */\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler\n) => {\n customErrorResponseHandler = handler;\n};\n\n/**\n * Handle errors by sending an error notification message\n */\nexport const handleError =\n (error: Error | FetchException): ThunkAction =>\n (dispatch: Dispatch) => {\n dispatch(resetProgress());\n\n const errorResponse = new ErrorResponse(error);\n\n return dispatch(\n customErrorResponseHandler(errorResponse, defaultErrorResponseHandler)\n );\n };\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAWA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,KAAD;EAAA,OAA6B;IAC7CC,IAAI,EAAE,YADuC;IAE7CC,OAAO,EAAEF;EAFoC,CAA7B;AAAA,CAAlB;AAKA;AACA;;;AACA,IAAMG,2BAAwD,GAC5D,SADIA,2BACJ,CAACH,KAAD;EAAA,OACA,UAACI,QAAD,EAAwB;IACtB,IAAIJ,KAAK,CAACK,6BAAN,IAAuCL,KAAK,CAACM,wBAAjD,EAA2E;MACzE,OAAOF,QAAQ,CAAC;QAAEH,IAAI,EAAE;MAAR,CAAD,CAAf;IACD;;IAED,IAAID,KAAK,CAACO,cAAV,EAA0B;MACxB,OAAOH,QAAQ,CAAC,uCAAmBJ,KAAnB,CAAD,CAAf;IACD;;IAED,IAAIA,KAAK,CAACQ,SAAN,IAAmBR,KAAK,CAACS,gBAA7B,EAA+C;MAC7CL,QAAQ,CAAC,mBAAKM,sBAAL,CAAD,CAAR;IACD;;IAED,IAAIV,KAAK,CAACW,gBAAV,EAA4B;MAC1B,OAAOP,QAAQ,CAAC,6BAAD,CAAf;IACD;;IAED,IAAIQ,oBAAJ,EAAe;MACb,OAAOR,QAAQ,CAACL,SAAS,CAACC,KAAD,CAAV,CAAf;IACD;;IAEDa,UAAU,CAAC,YAAM;MACf,MAAMb,KAAN;IACD,CAFS,CAAV;IAIA,OAAOI,QAAQ,CAAC,4CAAyBJ,KAAzB,CAAD,CAAf;EACD,CA3BD;AAAA,CADF;AA8BA;AACA;AACA;;;AACA,IAAIc,0BAAsD,GACxD,oCAACC,aAAD,EAAgBC,cAAhB;EAAA,OAAmC,UAACZ,QAAD;IAAA,OACjCA,QAAQ,CAACY,cAAc,CAACD,aAAD,CAAf,CADyB;EAAA,CAAnC;AAAA,CADF;AAIA;AACA;AACA;AACA;AACA;AACA;;;AACO,IAAME,6BAA6B,GAAG,SAAhCA,6BAAgC,CAC3CC,OAD2C,EAExC;EACHJ,0BAA0B,GAAGI,OAA7B;AACD,CAJM;AAMP;AACA;AACA;;;;;AACO,IAAMC,WAAW,GACtB,SADWA,WACX,CAACnB,KAAD;EAAA,OACA,UAACI,QAAD,EAAwB;IACtBA,QAAQ,CAAC,uCAAD,CAAR;IAEA,IAAMW,aAAa,GAAG,IAAIK,sBAAJ,CAAkBpB,KAAlB,CAAtB;IAEA,OAAOI,QAAQ,CACbU,0BAA0B,CAACC,aAAD,EAAgBZ,2BAAhB,CADb,CAAf;EAGD,CATD;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Form.js","names":["previousObject","form","newForm","clone","setPreviousObject","cancelForm","dispatch","getState","key","auth","mustChangePassword","Authenticate","logout","then"],"sources":["../../../src/redux/actions/Form.js"],"sourcesContent":["// @flow\nimport { goBack } from \"../_router/actions\";\nimport { updateModel } from \"../_modularui/actions\";\nimport { logoutSuccess } from \"./SignOut\";\nimport { reloadApplication } from \"./Application\";\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport Authenticate from \"../../modularui/Authenticate\";\n\nimport type { Dispatch, GetState, ThunkAction } from \"../types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\n\n/**\n * Go back to previous object (back button on form)\n */\nexport const previousObject = (form: FormModel): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.setPreviousObject();\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const cancelForm =\n (form: FormModel): ThunkAction =>\n (dispatch: Dispatch, getState: GetState) => {\n if (form.key === \"ChangePassword\" && getState().auth.mustChangePassword) {\n dispatch(startProgress());\n return new Authenticate().logout().then(() => {\n dispatch(logoutSuccess());\n dispatch(reloadApplication());\n dispatch(finishProgress());\n\n return dispatch(goBack());\n });\n }\n\n return dispatch(goBack());\n };\n"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AAMA;AACA;AACA;AACO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,IAAD,EAAwC;EACpE,IAAMC,OAAO,GAAGD,IAAI,CAACE,KAAL,EAAhB;EAEAD,OAAO,CAACE,iBAAR;EAEA,OAAO,2BAAYF,OAAZ,CAAP;AACD,CANM;AAQP;AACA;;;;;AACO,IAAMG,UAAU,GACrB,SADWA,UACX,CAACJ,IAAD;EAAA,OACA,UAACK,QAAD,EAAqBC,QAArB,EAA4C;IAC1C,IAAIN,IAAI,CAACO,GAAL,KAAa,gBAAb,IAAiCD,QAAQ,GAAGE,IAAX,CAAgBC,kBAArD,EAAyE;MACvEJ,QAAQ,CAAC,uCAAD,CAAR;MACA,OAAO,IAAIK,qBAAJ,GAAmBC,MAAnB,GAA4BC,IAA5B,CAAiC,YAAM;QAC5CP,QAAQ,CAAC,6BAAD,CAAR;QACAA,QAAQ,CAAC,qCAAD,CAAR;QACAA,QAAQ,CAAC,wCAAD,CAAR;QAEA,OAAOA,QAAQ,CAAC,sBAAD,CAAf;MACD,CANM,CAAP;IAOD;;IAED,OAAOA,QAAQ,CAAC,sBAAD,CAAf;EACD,CAdD;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"FormAttributeSet.js","names":["updateFormAttribute","form","formObject","attribute","inputvalue","options","autosubmit","autosave","forceUpdate","validate","dispatch","newForm","clone","undefined","currentFormObject","equals","updateAttribute","completedFormObjects","forEach","completeObject","isValid","autosubmitAction","isChanged","hasDynamicValidations"],"sources":["../../../src/redux/actions/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { updateModel } from \"../_modularui/actions\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { validateFormObject } from \"./FormValidations\";\nimport { autosaveFormObject } from \"./FormAutosave\";\nimport { autosubmitFormObject } from \"./FormAutosubmit\";\n\nimport type { Dispatch, ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\n\n/**\n * Update an attribute on a form\n */\nexport const updateFormAttribute =\n (\n form: FormModel,\n formObject: FormObjectModel,\n attribute: AttributeType,\n inputvalue: string,\n options: UpdateFormOptions = {\n autosubmit: false,\n autosave: false,\n forceUpdate: false,\n validate: true,\n }\n ): ThunkAction =>\n (dispatch: Dispatch) => {\n const newForm = form.clone();\n\n if (options.validate === undefined) {\n options.validate = true;\n }\n\n if (newForm.currentFormObject?.equals(formObject)) {\n newForm.currentFormObject.updateAttribute(attribute, inputvalue);\n } else {\n newForm.completedFormObjects.forEach((completeObject) => {\n if (completeObject.equals(formObject)) {\n completeObject.updateAttribute(attribute, inputvalue);\n }\n });\n }\n\n if (options.autosubmit && newForm.isValid) {\n const autosubmitAction = autosubmitFormObject(\n newForm,\n attribute,\n options.forceUpdate\n );\n if (autosubmitAction) {\n return dispatch(autosubmitAction);\n }\n }\n\n if (options.autosave && newForm.isValid && newForm.isChanged()) {\n dispatch(autosaveFormObject(newForm));\n }\n\n if (\n options.validate &&\n newForm.currentFormObject?.hasDynamicValidations &&\n getSetting(\"USE_INSTANT_SERVER_VALIDATION\")\n ) {\n // server form validations happens async, don't wait for the form to return\n dispatch(validateFormObject(newForm));\n }\n return dispatch(updateModel(newForm));\n };\n"],"mappings":";;;;;;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAOA;AACA;AACA;AACO,IAAMA,mBAAmB,GAC9B,SADWA,mBACX,CACEC,IADF,EAEEC,UAFF,EAGEC,SAHF,EAIEC,UAJF;EAAA,IAKEC,OALF,uEAK+B;IAC3BC,UAAU,EAAE,KADe;IAE3BC,QAAQ,EAAE,KAFiB;IAG3BC,WAAW,EAAE,KAHc;IAI3BC,QAAQ,E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A,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"FormAttributeSetRepeatable.js","names":["addRepeatableAttributeSet","form","newForm","clone","addEmptyFormObject","cancelRepeatableAttributeSet","formObject","removeFormObject","removeRepeatableAttributeSet"],"sources":["../../../src/redux/actions/FormAttributeSetRepeatable.js"],"sourcesContent":["// @flow\nimport { updateModel } from \"../_modularui/actions\";\n\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { UpdateModelAction } from \"../_modularui/types\";\n\n/**\n */\nexport const addRepeatableAttributeSet = (\n form: FormModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.addEmptyFormObject();\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n\n/**\n */\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel\n): UpdateModelAction => {\n const newForm = form.clone();\n\n newForm.removeFormObject(formObject);\n\n return updateModel(newForm);\n};\n"],"mappings":";;;;;;;AACA;;AAMA;AACA;AACO,IAAMA,yBAAyB,GAAG,SAA5BA,yBAA4B,CACvCC,IADuC,EAEjB;EACtB,IAAMC,OAAO,GAAGD,IAAI,CAACE,KAAL,EAAhB;EAEAD,OAAO,CAACE,kBAAR;EAEA,OAAO,0BAAYF,OAAZ,CAAP;AACD,CARM;AAUP;AACA;;;;;AACO,IAAMG,4BAA4B,GAAG,SAA/BA,4BAA+B,CAC1CJ,IAD0C,EAE1CK,UAF0C,EAGpB;EACtB,IAAMJ,OAAO,GAAGD,IAAI,CAACE,KAAL,EAAhB;EAEAD,OAAO,CAACE,kBAAR;EACAF,OAAO,CAACK,gBAAR,CAAyBD,UAAzB;EAEA,OAAO,0BAAYJ,OAAZ,CAAP;AACD,CAVM;AAYP;AACA;;;;;AACO,IAAMM,4BAA4B,GAAG,SAA/BA,4BAA+B,CAC1CP,IAD0C,EAE1CK,UAF0C,EAGpB;EACtB,IAAMJ,OAAO,GAAGD,IAAI,CAACE,KAAL,EAAhB;EAEAD,OAAO,CAACK,gBAAR,CAAyBD,UAAzB;EAEA,OAAO,0BAAYJ,OAAZ,CAAP;AACD,CATM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"FormAutosave.js","names":["updateAutosave","status","model","type","payload","autosave","dispatch","form","AUTOSAVE_STATUS","START","formdata","getFormData","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","data","childmodels","locale","fetch","then","savedForm","FormModel","lastServerUpdate","FINISHED","debouncedAutosave","VALIDATE_DEBOUNCE_TIMEOUT","autosaveFormObject"],"sources":["../../../src/redux/actions/FormAutosave.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\nimport FormModel from \"../../models/form/FormModel\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n AUTOSAVE_STATUS,\n} from \"../../constants/Constants\";\n\nimport { updateModel } from \"../_modularui/actions\";\n\nimport type { UpdateAutosaveAction, ThunkAction, Dispatch } from \"../types\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateAutosave = (\n status: $Keys<typeof AUTOSAVE_STATUS>,\n model: FormModel\n): UpdateAutosaveAction => ({\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status,\n model,\n },\n});\n\n/**\n */\nconst autosave = (dispatch: Dispatch, form: FormModel) => {\n dispatch(updateAutosave(AUTOSAVE_STATUS.START, form));\n\n const formdata = form.getFormData(true, false);\n\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"true\"), {\n method: HTTP_METHODS.POST,\n data: formdata,\n childmodels: false,\n locale: form.locale,\n })\n .fetch()\n .then((savedForm) => {\n if (savedForm instanceof FormModel) {\n // update last server update to indicate an update has happened\n // send the existing form to prevent updates in the ui based on autosave results\n form.lastServerUpdate = savedForm.lastServerUpdate;\n\n dispatch(updateModel(form));\n dispatch(updateAutosave(AUTOSAVE_STATUS.FINISHED, savedForm));\n }\n });\n};\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedAutosave = debounce((dispatch, form) => {\n autosave(dispatch, form);\n}, VALIDATE_DEBOUNCE_TIMEOUT);\n\n/**\n */\nexport const autosaveFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedAutosave(dispatch, form);\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AACA;;AAEA;;AAMA;;AAIA;AACA;AACA;AACA;AACA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CACrBC,MADqB,EAErBC,KAFqB;EAAA,OAGK;IAC1BC,IAAI,EAAE,wBADoB;IAE1BC,OAAO,EAAE;MACPH,MAAM,EAANA,MADO;MAEPC,KAAK,EAALA;IAFO;EAFiB,CAHL;AAAA,CAAvB;AAWA;AACA;;;AACA,IAAMG,QAAQ,GAAG,SAAXA,QAAW,CAACC,QAAD,EAAqBC,IAArB,EAAyC;EACxDD,QAAQ,CAACN,cAAc,CAACQ,2BAAgBC,KAAjB,EAAwBF,IAAxB,CAAf,CAAR;EAEA,IAAMG,QAAQ,GAAGH,IAAI,CAACI,WAAL,CAAiB,IAAjB,EAAuB,KAAvB,CAAjB;EAEA,IAAIC,yBAAJ,CAAqBL,IAAI,CAACM,QAAL,CAAcC,YAAd,CAA2B,QAA3B,EAAqC,MAArC,CAArB,EAAmE;IACjEC,MAAM,EAAEC,wBAAaC,IAD4C;IAEjEC,IAAI,EAAER,QAF2D;IAGjES,WAAW,EAAE,KAHoD;IAIjEC,MAAM,EAAEb,IAAI,CAACa;EAJoD,CAAnE,EAMGC,KANH,GAOGC,IAPH,CAOQ,UAACC,SAAD,EAAe;IACnB,IAAIA,SAAS,YAAYC,kBAAzB,EAAoC;MAClC;MACA;MACAjB,IAAI,CAACkB,gBAAL,GAAwBF,SAAS,CAACE,gBAAlC;MAEAnB,QAAQ,CAAC,0BAAYC,IAAZ,CAAD,CAAR;MACAD,QAAQ,CAACN,cAAc,CAACQ,2BAAgBkB,QAAjB,EAA2BH,SAA3B,CAAf,CAAR;IACD;EACF,CAhBH;AAiBD,CAtBD;AAwBA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMI,iBAAiB,GAAG,uBAAS,UAACrB,QAAD,EAAWC,IAAX,EAAoB;EACrDF,QAAQ,CAACC,QAAD,EAAWC,IAAX,CAAR;AACD,CAFyB,EAEvBqB,oCAFuB,CAA1B;AAIA;AACA;;AACO,IAAMC,kBAAkB,GAC7B,SADWA,kBACX,CAACtB,IAAD;EAAA,OACA,UAACD,QAAD;IAAA,OACEqB,iBAAiB,CAACrB,QAAD,EAAWC,IAAX,CADnB;EAAA,CADA;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"FormAutosubmit.js","names":["autosubmitFormObject","form","attribute","forceUpdate","allObjects","length","currentFormObject","hasAttributeByKey","key","setPreviousObject","isChanged","connectKey","selfhref","method","HTTP_METHODS","POST","data","formdata","updateModel"],"sources":["../../../src/redux/actions/FormAutosubmit.js"],"sourcesContent":["// @flow\nimport { loadModularUI } from \"../_modularui/actions\";\nimport { HTTP_METHODS } from \"../../constants/Constants\";\n\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ThunkAction } from \"../types\";\n\n/**\n */\nexport const autosubmitFormObject = (\n form: FormModel,\n attribute: AttributeType,\n forceUpdate: boolean = false\n): ?ThunkAction => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged() || forceUpdate) {\n return loadModularUI(form.connectKey, form.selfhref, {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateModel: form,\n });\n }\n\n return null;\n};\n"],"mappings":";;;;;;;AACA;;AACA;;AAMA;AACA;AACO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB,CAClCC,IADkC,EAElCC,SAFkC,EAIjB;EAAA,IADjBC,WACiB,uEADM,KACN;;EACjB;EACA;EACA;EACA,OACEF,IAAI,CAACG,UAAL,CAAgBC,MAAhB,GAAyB,CAAzB,KACC,CAACJ,IAAI,CAACK,iBAAN,IACC,CAACL,IAAI,CAACK,iBAAL,CAAuBC,iBAAvB,CAAyCL,SAAS,CAACM,GAAnD,CAFH,CADF,EAIE;IACAP,IAAI,CAACQ,iBAAL;EACD;;EAED,IAAIR,IAAI,CAACS,SAAL,MAAoBP,WAAxB,EAAqC;IACnC,OAAO,4BAAcF,IAAI,CAACU,UAAnB,EAA+BV,IAAI,CAACW,QAApC,EAA8C;MACnDC,MAAM,EAAEC,wBAAaC,IAD8B;MAEnDC,IAAI,EAAEf,IAAI,CAACgB,QAFwC;MAGnDC,WAAW,EAAEjB;IAHsC,CAA9C,CAAP;EAKD;;EAED,OAAO,IAAP;AACD,CAzBM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"FormValidations.js","names":["updateValidations","form","formWithValidations","dispatch","getState","currentForm","modularui","connectKey","validatedForm","model","clone","FormModel","data","debouncedValidateFormObject","ModularUIRequest","selfhref","setParameter","method","HTTP_METHODS","POST","validationData","childmodels","isValidationRequest","locale","fetch","then","VALIDATE_DEBOUNCE_TIMEOUT","leading","trailing","validateFormObject"],"sources":["../../../src/redux/actions/FormValidations.js"],"sourcesContent":["// @flow\nimport debounce from \"lodash/debounce\";\n\nimport { updateModel } from \"../_modularui/actions\";\n\nimport ModularUIRequest from \"../../modularui/ModularUIRequest\";\n\nimport {\n HTTP_METHODS,\n VALIDATE_DEBOUNCE_TIMEOUT,\n} from \"../../constants/Constants\";\n\nimport FormModel from \"../../models/form/FormModel\";\n\nimport type { Dispatch, ThunkAction } from \"../types\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateValidations =\n (form, formWithValidations) => (dispatch, getState) => {\n const currentForm = getState().modularui[form.connectKey];\n\n if (currentForm) {\n const validatedForm = currentForm.model.clone(true);\n if (validatedForm instanceof FormModel) {\n validatedForm.updateValidations(formWithValidations.data);\n }\n\n dispatch(updateModel(validatedForm));\n }\n };\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedValidateFormObject = debounce<\n (dispatch: Dispatch, form: FormModel) => void\n>(\n (dispatch, form: FormModel) => {\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"false\"), {\n method: HTTP_METHODS.POST,\n data: form.validationData,\n childmodels: false,\n isValidationRequest: true,\n locale: form.locale,\n })\n .fetch()\n .then((formWithValidations) =>\n dispatch(updateValidations(form, formWithValidations))\n );\n },\n VALIDATE_DEBOUNCE_TIMEOUT,\n {\n leading: true,\n trailing: true,\n }\n);\n\n/**\n */\nexport const validateFormObject =\n (form: FormModel): ThunkAction =>\n (dispatch) =>\n debouncedValidateFormObject(dispatch, form);\n"],"mappings":";;;;;;;;;AACA;;AAEA;;AAEA;;AAEA;;AAKA;;AAIA;AACA;AACA;AACA;AACA,IAAMA,iBAAiB,GACrB,SADIA,iBACJ,CAACC,IAAD,EAAOC,mBAAP;EAAA,OAA+B,UAACC,QAAD,EAAWC,QAAX,EAAwB;IACrD,IAAMC,WAAW,GAAGD,QAAQ,GAAGE,SAAX,CAAqBL,IAAI,CAACM,UAA1B,CAApB;;IAEA,IAAIF,WAAJ,EAAiB;MACf,IAAMG,aAAa,GAAGH,WAAW,CAACI,KAAZ,CAAkBC,KAAlB,CAAwB,IAAxB,CAAtB;;MACA,IAAIF,aAAa,YAAYG,kBAA7B,EAAwC;QACtCH,aAAa,CAACR,iBAAd,CAAgCE,mBAAmB,CAACU,IAApD;MACD;;MAEDT,QAAQ,CAAC,0BAAYK,aAAZ,CAAD,CAAR;IACD;EACF,CAXD;AAAA,CADF;AAcA;AACA;AACA;AACA;AACA;AACA;;;AACA,IAAMK,2BAA2B,GAAG,uBAGlC,UAACV,QAAD,EAAWF,IAAX,EAA+B;EAC7B,IAAIa,yBAAJ,CAAqBb,IAAI,CAACc,QAAL,CAAcC,YAAd,CAA2B,QAA3B,EAAqC,OAArC,CAArB,EAAoE;IAClEC,MAAM,EAAEC,wBAAaC,IAD6C;IAElEP,IAAI,EAAEX,IAAI,CAACmB,cAFuD;IAGlEC,WAAW,EAAE,KAHqD;IAIlEC,mBAAmB,EAAE,IAJ6C;IAKlEC,MAAM,EAAEtB,IAAI,CAACsB;EALqD,CAApE,EAOGC,KAPH,GAQGC,IARH,CAQQ,UAACvB,mBAAD;IAAA,OACJC,QAAQ,CAACH,iBAAiB,CAACC,IAAD,EAAOC,mBAAP,CAAlB,CADJ;EAAA,CARR;AAWD,CAfiC,EAgBlCwB,oCAhBkC,EAiBlC;EACEC,OAAO,EAAE,IADX;EAEEC,QAAQ,EAAE;AAFZ,CAjBkC,CAApC;AAuBA;AACA;;AACO,IAAMC,kBAAkB,GAC7B,SADWA,kBACX,CAAC5B,IAAD;EAAA,OACA,UAACE,QAAD;IAAA,OACEU,2BAA2B,CAACV,QAAD,EAAWF,IAAX,CAD7B;EAAA,CADA;AAAA,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Modals.js","names":["showModal","modalKey","type","payload","closeModal"],"sources":["../../../src/redux/actions/Modals.js"],"sourcesContent":["// @flow\nimport type { ShowModalAction, CloseModalAction } from \"../types\";\n\n/**\n */\nexport const showModal = (modalKey: string): ShowModalAction => ({\n type: \"SHOW_MODAL\",\n payload: modalKey,\n});\n\n/**\n */\nexport const closeModal = (modalKey: string): CloseModalAction => ({\n type: \"CLOSE_MODAL\",\n payload: modalKey,\n});\n"],"mappings":";;;;;;;AAGA;AACA;AACO,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,QAAD;EAAA,OAAwC;IAC/DC,IAAI,EAAE,YADyD;IAE/DC,OAAO,EAAEF;EAFsD,CAAxC;AAAA,CAAlB;AAKP;AACA;;;;;AACO,IAAMG,UAAU,GAAG,SAAbA,UAAa,CAACH,QAAD;EAAA,OAAyC;IACjEC,IAAI,EAAE,aAD2D;IAEjEC,OAAO,EAAEF;EAFwD,CAAzC;AAAA,CAAnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Notification.js","names":["dismissNotification","type","showNotification","message","error","timeout","dispatch","payload","setTimeout","getNotificationMessageId","form","actiontype","showFormNotification","NOTIFICATION_TYPES","SUCCESS","id","showXHRErrorNotification","ERROR","defaultMessage","parameters","properties"],"sources":["../../../src/redux/actions/Notification.js"],"sourcesContent":["// @flow\nimport { startProgress, finishProgress } from \"./ProgressIndicator\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { NOTIFICATION_TYPES } from \"../../constants/Constants\";\n\nimport type { DismissNotificationAction, ThunkAction } from \"../types\";\nimport type { MessageObject } from \"../../i18n/types\";\nimport type ErrorResponse from \"../../models/error/ErrorResponse\";\nimport type FormModel from \"../../models/form/FormModel\";\n\n/**\n * Dismiss notification message\n */\nexport const dismissNotification = (): DismissNotificationAction => ({\n type: \"DISMISS_NOTIFICATION\",\n});\n\n/**\n */\nexport const showNotification =\n (\n type: $Keys<typeof NOTIFICATION_TYPES>,\n message: MessageObject,\n error?: ?ErrorResponse,\n timeout?: ?number\n ): ThunkAction =>\n (dispatch) => {\n dispatch({\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type,\n message,\n error,\n },\n });\n\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n };\n\n/**\n */\nconst getNotificationMessageId = (form) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification =\n (form: FormModel): ThunkAction =>\n (dispatch) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification(NOTIFICATION_TYPES.SUCCESS, {\n id: getNotificationMessageId(form),\n })\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n };\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification =\n (error: ErrorResponse): ThunkAction =>\n (dispatch) =>\n dispatch(\n showNotification(\n NOTIFICATION_TYPES.ERROR,\n {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error\n )\n );\n"],"mappings":";;;;;;;AACA;;AAEA;;AAEA;;AAOA;AACA;AACA;AACO,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB;EAAA,OAAkC;IACnEC,IAAI,EAAE;EAD6D,CAAlC;AAAA,CAA5B;AAIP;AACA;;;;;AACO,IAAMC,gBAAgB,GAC3B,SADWA,gBACX,CACED,IADF,EAEEE,OAFF,EAGEC,KAHF,EAIEC,OAJF;EAAA,OAMA,UAACC,QAAD,EAAc;IACZA,QAAQ,CAAC;MACPL,IAAI,EAAE,mBADC;MAEPM,OAAO,EAAE;QACPN,IAAI,EAAJA,IADO;QAEPE,OAAO,EAAPA,OAFO;QAGPC,KAAK,EAALA;MAHO;IAFF,CAAD,CAAR;;IASA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ADK"}
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
4
|
+
|
|
5
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
6
|
+
|
|
7
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
8
|
+
|
|
9
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
10
|
+
|
|
11
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
12
|
+
|
|
3
13
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
14
|
|
|
5
15
|
Object.defineProperty(exports, "__esModule", {
|
|
6
16
|
value: true
|
|
7
17
|
});
|
|
8
|
-
exports.setThemePreference = exports.setServerPreference = exports.setPreference = exports.setAllContentInDataSetting = void 0;
|
|
18
|
+
exports.setThemePreference = exports.setServerPreference = exports.setPreferences = exports.setPreference = exports.setLoginPreferences = exports.setAllContentInDataSetting = void 0;
|
|
9
19
|
|
|
10
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
11
21
|
|
|
@@ -23,6 +33,10 @@ var _Settings = require("../../constants/Settings");
|
|
|
23
33
|
|
|
24
34
|
var _constants = require("../../constants");
|
|
25
35
|
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
+
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
|
+
|
|
26
40
|
/**
|
|
27
41
|
*/
|
|
28
42
|
var getServerPreferenceValue = function getServerPreferenceValue(preferenceName) {
|
|
@@ -77,6 +91,18 @@ var setPreference = function setPreference(propertyName) {
|
|
|
77
91
|
|
|
78
92
|
exports.setPreference = setPreference;
|
|
79
93
|
|
|
94
|
+
var setPreferences = function setPreferences(preferences) {
|
|
95
|
+
return {
|
|
96
|
+
type: "SET_PREFERENCES",
|
|
97
|
+
payload: _objectSpread({}, preferences)
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
exports.setPreferences = setPreferences;
|
|
105
|
+
|
|
80
106
|
var setThemePreference = function setThemePreference(configTheme) {
|
|
81
107
|
var themeData = {};
|
|
82
108
|
|
|
@@ -111,6 +137,20 @@ var setAllContentInDataSetting = function setAllContentInDataSetting(state) {
|
|
|
111
137
|
(0, _Settings.setSetting)(_constants.ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);
|
|
112
138
|
return setPreference(_constants.ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);
|
|
113
139
|
};
|
|
140
|
+
/**
|
|
141
|
+
* Retrieves login settings from runtime preferences and sets them as setting in the preference reducer
|
|
142
|
+
*/
|
|
143
|
+
|
|
114
144
|
|
|
115
145
|
exports.setAllContentInDataSetting = setAllContentInDataSetting;
|
|
146
|
+
|
|
147
|
+
var setLoginPreferences = function setLoginPreferences(state) {
|
|
148
|
+
var _state$preferences$LO, _state$preferences$LO2, _state$preferences$LO3, _state$preferences$LO4, _loginSettings;
|
|
149
|
+
|
|
150
|
+
var loginSettings = (_loginSettings = {}, (0, _defineProperty2.default)(_loginSettings, _constants.LOGIN_PATH_SETTING, getServerPreferenceValue(_constants.LOGIN_PATH_SETTING, (_state$preferences$LO = state === null || state === void 0 ? void 0 : state.preferences[_constants.LOGIN_PATH_SETTING]) !== null && _state$preferences$LO !== void 0 ? _state$preferences$LO : "".concat(_constants.BASE, "/j_security_check"))), (0, _defineProperty2.default)(_loginSettings, _constants.LOGIN_USERNAME_SETTING, getServerPreferenceValue(_constants.LOGIN_USERNAME_SETTING, (_state$preferences$LO2 = state === null || state === void 0 ? void 0 : state.preferences[_constants.LOGIN_USERNAME_SETTING]) !== null && _state$preferences$LO2 !== void 0 ? _state$preferences$LO2 : "j_username")), (0, _defineProperty2.default)(_loginSettings, _constants.LOGIN_PASSWORD_SETTING, getServerPreferenceValue(_constants.LOGIN_PASSWORD_SETTING, (_state$preferences$LO3 = state === null || state === void 0 ? void 0 : state.preferences[_constants.LOGIN_PASSWORD_SETTING]) !== null && _state$preferences$LO3 !== void 0 ? _state$preferences$LO3 : "j_password")), (0, _defineProperty2.default)(_loginSettings, _constants.LOGOUT_PATH_SETTING, getServerPreferenceValue(_constants.LOGOUT_PATH_SETTING, (_state$preferences$LO4 = state === null || state === void 0 ? void 0 : state.preferences[_constants.LOGOUT_PATH_SETTING]) !== null && _state$preferences$LO4 !== void 0 ? _state$preferences$LO4 : "".concat(_constants.BASE, "/Logoff"))), _loginSettings);
|
|
151
|
+
(0, _Settings.setSettings)(loginSettings);
|
|
152
|
+
return setPreferences(loginSettings);
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
exports.setLoginPreferences = setLoginPreferences;
|
|
116
156
|
//# sourceMappingURL=Preferences.js.map
|
|
@@ -2,14 +2,23 @@
|
|
|
2
2
|
import { isPlainObject } from "../../utils/helpers/objects";
|
|
3
3
|
|
|
4
4
|
import { JsonParseException } from "../../exceptions";
|
|
5
|
-
import {
|
|
5
|
+
import { setSetting, setSettings } from "../../constants/Settings";
|
|
6
6
|
|
|
7
7
|
import type {
|
|
8
8
|
PreferenceValue,
|
|
9
9
|
ReduxState,
|
|
10
10
|
SetPreferenceAction,
|
|
11
|
+
SetPreferencesAction,
|
|
11
12
|
} from "../types";
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
BASE,
|
|
16
|
+
ALL_CONTENT_IN_DATA_SETTING,
|
|
17
|
+
LOGIN_PASSWORD_SETTING,
|
|
18
|
+
LOGIN_PATH_SETTING,
|
|
19
|
+
LOGIN_USERNAME_SETTING,
|
|
20
|
+
LOGOUT_PATH_SETTING,
|
|
21
|
+
} from "../../constants";
|
|
13
22
|
|
|
14
23
|
/**
|
|
15
24
|
*/
|
|
@@ -57,6 +66,15 @@ export const setPreference = (
|
|
|
57
66
|
},
|
|
58
67
|
});
|
|
59
68
|
|
|
69
|
+
/**
|
|
70
|
+
*/
|
|
71
|
+
export const setPreferences = (preferences: Object): SetPreferencesAction => ({
|
|
72
|
+
type: "SET_PREFERENCES",
|
|
73
|
+
payload: {
|
|
74
|
+
...preferences,
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
|
|
60
78
|
/**
|
|
61
79
|
*/
|
|
62
80
|
export const setThemePreference = (
|
|
@@ -97,3 +115,32 @@ export const setAllContentInDataSetting = (
|
|
|
97
115
|
setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);
|
|
98
116
|
return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);
|
|
99
117
|
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Retrieves login settings from runtime preferences and sets them as setting in the preference reducer
|
|
121
|
+
*/
|
|
122
|
+
export const setLoginPreferences = (
|
|
123
|
+
state?: ReduxState
|
|
124
|
+
): SetPreferencesAction => {
|
|
125
|
+
const loginSettings = {
|
|
126
|
+
[LOGIN_PATH_SETTING]: getServerPreferenceValue(
|
|
127
|
+
LOGIN_PATH_SETTING,
|
|
128
|
+
state?.preferences[LOGIN_PATH_SETTING] ?? `${BASE}/j_security_check`
|
|
129
|
+
),
|
|
130
|
+
[LOGIN_USERNAME_SETTING]: getServerPreferenceValue(
|
|
131
|
+
LOGIN_USERNAME_SETTING,
|
|
132
|
+
state?.preferences[LOGIN_USERNAME_SETTING] ?? "j_username"
|
|
133
|
+
),
|
|
134
|
+
[LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(
|
|
135
|
+
LOGIN_PASSWORD_SETTING,
|
|
136
|
+
state?.preferences[LOGIN_PASSWORD_SETTING] ?? "j_password"
|
|
137
|
+
),
|
|
138
|
+
[LOGOUT_PATH_SETTING]: getServerPreferenceValue(
|
|
139
|
+
LOGOUT_PATH_SETTING,
|
|
140
|
+
state?.preferences[LOGOUT_PATH_SETTING] ?? `${BASE}/Logoff`
|
|
141
|
+
),
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
setSettings(loginSettings);
|
|
145
|
+
return setPreferences(loginSettings);
|
|
146
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Preferences.js","names":["getServerPreferenceValue","preferenceName","defaultValue","type","value","preferencesProvider","getPreferenceByName","split","val","setServerPreference","propertyName","setPreference","propertyValue","payload","setPreferences","preferences","setThemePreference","configTheme","themeData","JSON","parse","error","JsonParseException","settings","setAllContentInDataSetting","state","allContentInDataSetting","getModularUIContentInData","ALL_CONTENT_IN_DATA_SETTING","setLoginPreferences","loginSettings","LOGIN_PATH_SETTING","BASE","LOGIN_USERNAME_SETTING","LOGIN_PASSWORD_SETTING","LOGOUT_PATH_SETTING"],"sources":["../../../src/redux/actions/Preferences.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../../utils/helpers/objects\";\n\nimport { JsonParseException } from \"../../exceptions\";\nimport { setSetting, setSettings } from \"../../constants/Settings\";\n\nimport type {\n PreferenceValue,\n ReduxState,\n SetPreferenceAction,\n SetPreferencesAction,\n} from \"../types\";\n\nimport {\n BASE,\n ALL_CONTENT_IN_DATA_SETTING,\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"../../constants\";\n\n/**\n */\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n) => {\n let value = null;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (value == null) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value;\n};\n\n/**\n */\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue = null,\n type?: string\n): SetPreferenceAction => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\n/**\n */\nexport const setPreference = (\n propertyName: string,\n propertyValue: PreferenceValue = null\n): SetPreferenceAction => ({\n type: \"SET_PREFERENCE\",\n payload: {\n [propertyName]: propertyValue,\n },\n});\n\n/**\n */\nexport const setPreferences = (preferences: Object): SetPreferencesAction => ({\n type: \"SET_PREFERENCES\",\n payload: {\n ...preferences,\n },\n});\n\n/**\n */\nexport const setThemePreference = (\n configTheme: string\n): SetPreferenceAction => {\n let themeData = {};\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (\n state?: ReduxState\n): SetPreferenceAction => {\n let allContentInDataSetting = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[ALL_CONTENT_IN_DATA_SETTING];\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (\n state?: ReduxState\n): SetPreferencesAction => {\n const loginSettings = {\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ?? `${BASE}/j_security_check`\n ),\n [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(\n LOGIN_USERNAME_SETTING,\n state?.preferences[LOGIN_USERNAME_SETTING] ?? \"j_username\"\n ),\n [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(\n LOGIN_PASSWORD_SETTING,\n state?.preferences[LOGIN_PASSWORD_SETTING] ?? \"j_password\"\n ),\n [LOGOUT_PATH_SETTING]: getServerPreferenceValue(\n LOGOUT_PATH_SETTING,\n state?.preferences[LOGOUT_PATH_SETTING] ?? `${BASE}/Logoff`\n ),\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AACA;;AASA;;;;;;AASA;AACA;AACA,IAAMA,wBAAwB,GAAG,SAA3BA,wBAA2B,CAC/BC,cAD+B,EAI5B;EAAA,IAFHC,YAEG,uEAF6B,IAE7B;EAAA,IADHC,IACG;EACH,IAAIC,KAAK,GAAG,IAAZ;;EACA,IAAI,OAAOC,mBAAP,KAA+B,WAAnC,EAAgD;IAC9CD,KAAK,GAAGC,mBAAmB,CAACC,mBAApB,CAAwCL,cAAxC,CAAR;EACD;;EAED,IAAIG,KAAK,IAAI,IAAb,EAAmB;IACjBA,KAAK,GAAGF,YAAR;EACD;;EAED,IAAI,OAAOE,KAAP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