@beinformed/ui 1.28.2 → 1.28.4
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 +13 -0
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/exceptions/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/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/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/withMessage.js.map +1 -1
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/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/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/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.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/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.map +1 -1
- package/esm/modularui/CaptchaRequest.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/UploadRequest.js.map +1 -1
- package/esm/react/ErrorBoundary.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.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 +6 -5
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/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/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.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/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/I18nActions.js.map +1 -1
- package/esm/redux/_i18n/I18nReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/esm/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/RouterActions.js.map +1 -1
- package/esm/redux/_router/RouterReducer.js.map +1 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js +2 -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/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/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/reducers/createReducer.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/utils/browser/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/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/createUUID.js.map +1 -1
- package/esm/utils/helpers/objects.js.map +1 -1
- package/esm/utils/helpers/repositoryResource.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.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.map +1 -1
- package/lib/constants/LayoutHintConfig.js.map +1 -1
- package/lib/constants/LayoutHints.js.map +1 -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/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.map +1 -1
- 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/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.map +1 -1
- package/lib/modularui/CaptchaRequest.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/UploadRequest.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 +6 -5
- package/lib/react-client/client.js.flow +14 -7
- 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 +4 -4
- 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.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/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/I18nActions.js.map +1 -1
- package/lib/redux/_i18n/I18nReducer.js.map +1 -1
- package/lib/redux/_i18n/index.js.map +1 -1
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/lib/redux/_modularui/ModularUIMiddleware.js.map +1 -1
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUISelectors.js.map +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/lib/redux/_modularui/index.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/RouterActions.js.map +1 -1
- package/lib/redux/_router/RouterConnectors.js.map +1 -1
- package/lib/redux/_router/RouterMiddleware.js.map +1 -1
- package/lib/redux/_router/RouterReducer.js.map +1 -1
- package/lib/redux/_router/index.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 +2 -2
- package/lib/redux/actions/Preferences.js.flow +3 -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/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.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/reducers/createReducer.js.map +1 -1
- package/lib/redux/reducers/index.js.map +1 -1
- package/lib/redux/selectors/i18n.js.map +1 -1
- package/lib/redux/selectors/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/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/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/index.js.map +1 -1
- package/lib/utils/helpers/objects.js.map +1 -1
- package/lib/utils/helpers/repositoryResource.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 +5 -5
- package/src/react-client/client.js +14 -7
- package/src/react-server/__tests__/serverUtil.spec.js +4 -4
- package/src/redux/actions/Preferences.js +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentDetailSection.js","names":["Href","modularui","connectContentDetailSection","sectioncontent","section","entryDate","decodeURIComponent","addParameter","propName"],"sources":["../../../src/redux/connectors/ContentDetailSection.js"],"sourcesContent":["// @flow\nimport Href from \"../../models/href/Href\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetailSection: ModularUIConnector = modularui(\n \"ContentDetailSection\",\n ({ sectioncontent, section, entryDate }) =>\n new Href(\n `/content/${decodeURIComponent(sectioncontent)}/${section}`\n ).addParameter(\"entryDate\", entryDate),\n { propName: \"content\" }\n);\n"],"mappings":"AACA,OAAOA,IAAI,MAAM,wBAAwB;AAEzC,OAAOC,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,2BAA+C,GAAGD,SAAS,CACtE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"ContentDetailSection.js","names":["Href","modularui","connectContentDetailSection","_ref","sectioncontent","section","entryDate","decodeURIComponent","addParameter","propName"],"sources":["../../../src/redux/connectors/ContentDetailSection.js"],"sourcesContent":["// @flow\nimport Href from \"../../models/href/Href\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectContentDetailSection: ModularUIConnector = modularui(\n \"ContentDetailSection\",\n ({ sectioncontent, section, entryDate }) =>\n new Href(\n `/content/${decodeURIComponent(sectioncontent)}/${section}`\n ).addParameter(\"entryDate\", entryDate),\n { propName: \"content\" }\n);\n"],"mappings":"AACA,OAAOA,IAAI,MAAM,wBAAwB;AAEzC,OAAOC,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,2BAA+C,GAAGD,SAAS,CACtE,sBAAsB,EACtBE,IAAA;EAAA,IAAC;IAAEC,cAAc;IAAEC,OAAO;IAAEC;EAAU,CAAC,GAAAH,IAAA;EAAA,OACrC,IAAIH,IAAI,CACL,YAAWO,kBAAkB,CAACH,cAAc,CAAE,IAAGC,OAAQ,EAAC,CAC5D,CAACG,YAAY,CAAC,WAAW,EAAEF,SAAS,CAAC;AAAA,GACxC;EAAEG,QAAQ,EAAE;AAAU,CAAC,CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","names":["compose","connect","modularui","HTTP_METHODS","getSetting","cancelForm","previousObject","showFormNotification","Href","mapStateToProps","state","ownProps","isModal","router","location","modal","mapDispatchToProps","onPrevious","onCancel","reduxConnectedForm","moduiConnectedForm","href","formHref","pathname","search","addParameter","propName","method","POST","connectForm"],"sources":["../../../src/redux/connectors/Form.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport { HTTP_METHODS } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { cancelForm, previousObject } from \"../actions/Form\";\nimport { showFormNotification } from \"../actions/Notification\";\n\nimport Href from \"../../models/href/Href\";\n\nimport type { AbstractComponent } from \"react\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ContextRouter } from \"react-router\";\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ModularUIConnector, UpdateFormAction } from \"../_modularui/types\";\n\ntype OwnProps = {\n ...?ContextRouter,\n href?: Href,\n isModal?: boolean,\n redirectTo?: string,\n};\n\ntype StateProps = {\n isModal: boolean,\n};\n\ntype DispatchProps = {\n onPrevious: (form: FormModel) => UpdateFormAction,\n onCancel: (form: FormModel) => ThunkAction,\n showFormNotification: (form: FormModel) => ThunkAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (\n state: ReduxState,\n ownProps: OwnProps\n): StateProps => ({\n isModal: state.router.location?.state?.modal || ownProps.isModal || false,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n onPrevious: previousObject,\n onCancel: cancelForm,\n showFormNotification,\n};\n\nconst reduxConnectedForm = connect<Props, OwnProps, StateProps, _, _, _>(\n mapStateToProps,\n mapDispatchToProps\n);\n\nconst moduiConnectedForm: ModularUIConnector = modularui(\n \"Form\",\n ({ href, location }) => {\n const formHref = href || new Href(`${location.pathname}${location.search}`);\n\n if (getSetting(\"ALWAYS_COMMIT_FORM\")) {\n return formHref;\n }\n\n return formHref.addParameter(\"commit\", \"false\");\n },\n { propName: \"form\", method: HTTP_METHODS.POST }\n);\n\n/**\n */\nexport const connectForm: (\n Component: AbstractComponent<Props>\n) => AbstractComponent<OwnProps> = compose(\n moduiConnectedForm,\n reduxConnectedForm\n);\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,OAAO,QAAQ,aAAa;AAErC,OAAOC,SAAS,MAAM,kCAAkC;AAExD,SAASC,YAAY,QAAQ,2BAA2B;AACxD,SAASC,UAAU,QAAQ,0BAA0B;AAErD,SAASC,UAAU,EAAEC,cAAc,QAAQ,iBAAiB;AAC5D,SAASC,oBAAoB,QAAQ,yBAAyB;AAE9D,OAAOC,IAAI,MAAM,wBAAwB;AA+BzC,MAAMC,eAAe,
|
|
1
|
+
{"version":3,"file":"Form.js","names":["compose","connect","modularui","HTTP_METHODS","getSetting","cancelForm","previousObject","showFormNotification","Href","mapStateToProps","state","ownProps","isModal","router","location","modal","mapDispatchToProps","onPrevious","onCancel","reduxConnectedForm","moduiConnectedForm","_ref","href","formHref","pathname","search","addParameter","propName","method","POST","connectForm"],"sources":["../../../src/redux/connectors/Form.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport { HTTP_METHODS } from \"../../constants/Constants\";\nimport { getSetting } from \"../../constants/Settings\";\n\nimport { cancelForm, previousObject } from \"../actions/Form\";\nimport { showFormNotification } from \"../actions/Notification\";\n\nimport Href from \"../../models/href/Href\";\n\nimport type { AbstractComponent } from \"react\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type { ContextRouter } from \"react-router\";\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ModularUIConnector, UpdateFormAction } from \"../_modularui/types\";\n\ntype OwnProps = {\n ...?ContextRouter,\n href?: Href,\n isModal?: boolean,\n redirectTo?: string,\n};\n\ntype StateProps = {\n isModal: boolean,\n};\n\ntype DispatchProps = {\n onPrevious: (form: FormModel) => UpdateFormAction,\n onCancel: (form: FormModel) => ThunkAction,\n showFormNotification: (form: FormModel) => ThunkAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (\n state: ReduxState,\n ownProps: OwnProps\n): StateProps => ({\n isModal: state.router.location?.state?.modal || ownProps.isModal || false,\n});\n\nconst mapDispatchToProps: DispatchProps = {\n onPrevious: previousObject,\n onCancel: cancelForm,\n showFormNotification,\n};\n\nconst reduxConnectedForm = connect<Props, OwnProps, StateProps, _, _, _>(\n mapStateToProps,\n mapDispatchToProps\n);\n\nconst moduiConnectedForm: ModularUIConnector = modularui(\n \"Form\",\n ({ href, location }) => {\n const formHref = href || new Href(`${location.pathname}${location.search}`);\n\n if (getSetting(\"ALWAYS_COMMIT_FORM\")) {\n return formHref;\n }\n\n return formHref.addParameter(\"commit\", \"false\");\n },\n { propName: \"form\", method: HTTP_METHODS.POST }\n);\n\n/**\n */\nexport const connectForm: (\n Component: AbstractComponent<Props>\n) => AbstractComponent<OwnProps> = compose(\n moduiConnectedForm,\n reduxConnectedForm\n);\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,OAAO,QAAQ,aAAa;AAErC,OAAOC,SAAS,MAAM,kCAAkC;AAExD,SAASC,YAAY,QAAQ,2BAA2B;AACxD,SAASC,UAAU,QAAQ,0BAA0B;AAErD,SAASC,UAAU,EAAEC,cAAc,QAAQ,iBAAiB;AAC5D,SAASC,oBAAoB,QAAQ,yBAAyB;AAE9D,OAAOC,IAAI,MAAM,wBAAwB;AA+BzC,MAAMC,eAAe,GAAGA,CACtBC,KAAiB,EACjBC,QAAkB,MACF;EAChBC,OAAO,EAAEF,KAAK,CAACG,MAAM,CAACC,QAAQ,EAAEJ,KAAK,EAAEK,KAAK,IAAIJ,QAAQ,CAACC,OAAO,IAAI;AACtE,CAAC,CAAC;AAEF,MAAMI,kBAAiC,GAAG;EACxCC,UAAU,EAAEX,cAAc;EAC1BY,QAAQ,EAAEb,UAAU;EACpBE;AACF,CAAC;AAED,MAAMY,kBAAkB,GAAGlB,OAAO,CAChCQ,eAAe,EACfO,kBAAkB,CACnB;AAED,MAAMI,kBAAsC,GAAGlB,SAAS,CACtD,MAAM,EACNmB,IAAA,IAAwB;EAAA,IAAvB;IAAEC,IAAI;IAAER;EAAS,CAAC,GAAAO,IAAA;EACjB,MAAME,QAAQ,GAAGD,IAAI,IAAI,IAAId,IAAI,CAAE,GAAEM,QAAQ,CAACU,QAAS,GAAEV,QAAQ,CAACW,MAAO,EAAC,CAAC;EAE3E,IAAIrB,UAAU,CAAC,oBAAoB,CAAC,EAAE;IACpC,OAAOmB,QAAQ;EACjB;EAEA,OAAOA,QAAQ,CAACG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC;AACjD,CAAC,EACD;EAAEC,QAAQ,EAAE,MAAM;EAAEC,MAAM,EAAEzB,YAAY,CAAC0B;AAAK,CAAC,CAChD;;AAED;AACA;AACA,OAAO,MAAMC,WAEmB,GAAG9B,OAAO,CACxCoB,kBAAkB,EAClBD,kBAAkB,CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormAttributeSet.js","names":["connect","updateFormAttribute","addRepeatableAttributeSet","cancelRepeatableAttributeSet","removeRepeatableAttributeSet","mapDispatchToProps","dispatch","ownProps","onAttributeChange","attribute","value","options","autosubmit","autosave","form","object","onAddAttributeSetClick","onCancelAttributeSetClick","formObject","onRemoveAttributeSetClick","connectFormAttributeSet"],"sources":["../../../src/redux/connectors/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { updateFormAttribute } from \"../actions/FormAttributeSet\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../actions/FormAttributeSetRepeatable\";\n\nimport type { ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { UpdateFormAction } from \"../_modularui/types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { DispatchAPI } from \"redux\";\nimport type { ComponentType } from \"react\";\n\ntype Dispatch = DispatchAPI<UpdateFormAction> & DispatchAPI<ThunkAction>;\n\ntype OwnProps = {\n form: FormModel,\n object: FormObjectModel,\n formLayout?: \"vertical\" | \"horizontal\" | \"compact\",\n autosubmit?: boolean,\n autosave?: boolean,\n};\n\ntype DispatchProps = {\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n ) => ThunkAction,\n onAddAttributeSetClick: () => UpdateFormAction,\n onCancelAttributeSetClick: (formObject: FormObjectModel) => UpdateFormAction,\n onRemoveAttributeSetClick: (formObject: FormObjectModel) => UpdateFormAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps = (\n dispatch: Dispatch,\n ownProps: OwnProps\n): DispatchProps => ({\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions = {\n autosubmit: ownProps.autosubmit || false,\n autosave: ownProps.autosave || false,\n }\n ) =>\n dispatch(\n updateFormAttribute(\n ownProps.form,\n ownProps.object,\n attribute,\n value,\n options\n )\n ),\n onAddAttributeSetClick: () =>\n dispatch(addRepeatableAttributeSet(ownProps.form)),\n onCancelAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(ownProps.form, formObject)),\n onRemoveAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(ownProps.form, formObject)),\n});\n\n/**\n */\nexport const connectFormAttributeSet: ComponentType<any> = connect<\n Props,\n OwnProps,\n _,\n DispatchProps,\n _,\n _\n>(null, mapDispatchToProps);\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,aAAa;AAErC,SAASC,mBAAmB,QAAQ,6BAA6B;AACjE,SACEC,yBAAyB,EACzBC,4BAA4B,EAC5BC,4BAA4B,QACvB,uCAAuC;AAoC9C,MAAMC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"FormAttributeSet.js","names":["connect","updateFormAttribute","addRepeatableAttributeSet","cancelRepeatableAttributeSet","removeRepeatableAttributeSet","mapDispatchToProps","dispatch","ownProps","onAttributeChange","attribute","value","options","arguments","length","undefined","autosubmit","autosave","form","object","onAddAttributeSetClick","onCancelAttributeSetClick","formObject","onRemoveAttributeSetClick","connectFormAttributeSet"],"sources":["../../../src/redux/connectors/FormAttributeSet.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { updateFormAttribute } from \"../actions/FormAttributeSet\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../actions/FormAttributeSetRepeatable\";\n\nimport type { ThunkAction, UpdateFormOptions } from \"../types\";\nimport type { UpdateFormAction } from \"../_modularui/types\";\nimport type { AttributeType } from \"../../models/types\";\nimport type FormModel from \"../../models/form/FormModel\";\nimport type FormObjectModel from \"../../models/form/FormObjectModel\";\nimport type { DispatchAPI } from \"redux\";\nimport type { ComponentType } from \"react\";\n\ntype Dispatch = DispatchAPI<UpdateFormAction> & DispatchAPI<ThunkAction>;\n\ntype OwnProps = {\n form: FormModel,\n object: FormObjectModel,\n formLayout?: \"vertical\" | \"horizontal\" | \"compact\",\n autosubmit?: boolean,\n autosave?: boolean,\n};\n\ntype DispatchProps = {\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions\n ) => ThunkAction,\n onAddAttributeSetClick: () => UpdateFormAction,\n onCancelAttributeSetClick: (formObject: FormObjectModel) => UpdateFormAction,\n onRemoveAttributeSetClick: (formObject: FormObjectModel) => UpdateFormAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps = (\n dispatch: Dispatch,\n ownProps: OwnProps\n): DispatchProps => ({\n onAttributeChange: (\n attribute: AttributeType,\n value: string,\n options: UpdateFormOptions = {\n autosubmit: ownProps.autosubmit || false,\n autosave: ownProps.autosave || false,\n }\n ) =>\n dispatch(\n updateFormAttribute(\n ownProps.form,\n ownProps.object,\n attribute,\n value,\n options\n )\n ),\n onAddAttributeSetClick: () =>\n dispatch(addRepeatableAttributeSet(ownProps.form)),\n onCancelAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(ownProps.form, formObject)),\n onRemoveAttributeSetClick: (formObject: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(ownProps.form, formObject)),\n});\n\n/**\n */\nexport const connectFormAttributeSet: ComponentType<any> = connect<\n Props,\n OwnProps,\n _,\n DispatchProps,\n _,\n _\n>(null, mapDispatchToProps);\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,aAAa;AAErC,SAASC,mBAAmB,QAAQ,6BAA6B;AACjE,SACEC,yBAAyB,EACzBC,4BAA4B,EAC5BC,4BAA4B,QACvB,uCAAuC;AAoC9C,MAAMC,kBAAkB,GAAGA,CACzBC,QAAkB,EAClBC,QAAkB,MACC;EACnBC,iBAAiB,EAAE,SAAAA,CACjBC,SAAwB,EACxBC,KAAa;IAAA,IACbC,OAA0B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;MAC3BG,UAAU,EAAER,QAAQ,CAACQ,UAAU,IAAI,KAAK;MACxCC,QAAQ,EAAET,QAAQ,CAACS,QAAQ,IAAI;IACjC,CAAC;IAAA,OAEDV,QAAQ,CACNL,mBAAmB,CACjBM,QAAQ,CAACU,IAAI,EACbV,QAAQ,CAACW,MAAM,EACfT,SAAS,EACTC,KAAK,EACLC,OAAO,CACR,CACF;EAAA;EACHQ,sBAAsB,EAAEA,CAAA,KACtBb,QAAQ,CAACJ,yBAAyB,CAACK,QAAQ,CAACU,IAAI,CAAC,CAAC;EACpDG,yBAAyB,EAAGC,UAA2B,IACrDf,QAAQ,CAACH,4BAA4B,CAACI,QAAQ,CAACU,IAAI,EAAEI,UAAU,CAAC,CAAC;EACnEC,yBAAyB,EAAGD,UAA2B,IACrDf,QAAQ,CAACF,4BAA4B,CAACG,QAAQ,CAACU,IAAI,EAAEI,UAAU,CAAC;AACpE,CAAC,CAAC;;AAEF;AACA;AACA,OAAO,MAAME,uBAA2C,GAAGvB,OAAO,CAOhE,IAAI,EAAEK,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListDetail.js","names":["modularui","ListDetailModel","connectListDetail","href","propName","targetModel"],"sources":["../../../src/redux/connectors/ListDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport ListDetailModel from \"../../models/list/ListDetailModel\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectListDetail: ModularUIConnector = modularui(\n \"ListDetail\",\n ({ href }) => href,\n {\n propName: \"detail\",\n targetModel: ListDetailModel,\n }\n);\n"],"mappings":"AACA,OAAOA,SAAS,MAAM,kCAAkC;AACxD,OAAOC,eAAe,MAAM,mCAAmC;AAI/D;AACA;AACA,OAAO,MAAMC,iBAAqC,GAAGF,SAAS,CAC5D,YAAY,
|
|
1
|
+
{"version":3,"file":"ListDetail.js","names":["modularui","ListDetailModel","connectListDetail","_ref","href","propName","targetModel"],"sources":["../../../src/redux/connectors/ListDetail.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport ListDetailModel from \"../../models/list/ListDetailModel\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectListDetail: ModularUIConnector = modularui(\n \"ListDetail\",\n ({ href }) => href,\n {\n propName: \"detail\",\n targetModel: ListDetailModel,\n }\n);\n"],"mappings":"AACA,OAAOA,SAAS,MAAM,kCAAkC;AACxD,OAAOC,eAAe,MAAM,mCAAmC;AAI/D;AACA;AACA,OAAO,MAAMC,iBAAqC,GAAGF,SAAS,CAC5D,YAAY,EACZG,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAClB;EACEC,QAAQ,EAAE,QAAQ;EAClBC,WAAW,EAAEL;AACf,CAAC,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","names":["connect","showModal","closeModal","mapStateToProps","state","visibleModal","modals","modal","visible","visibleModalKey","key","visibleModalSize","size","mapDispatchToProps","onShowModal","onCloseModal","connectModal"],"sources":["../../../src/redux/connectors/Modal.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../actions/Modals\";\n\nimport type { ReduxState, ShowModalAction, CloseModalAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n visibleModalKey: string | null,\n visibleModalSize?: string | null,\n};\n\ntype DispatchProps = {\n onShowModal: (modalKey: string) => ShowModalAction,\n onCloseModal: (modalKey: string) => CloseModalAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const visibleModal = state.modals.modals.find((modal) => modal.visible);\n\n return {\n visibleModalKey: visibleModal ? visibleModal.key : null,\n visibleModalSize: visibleModal ? visibleModal.size : null,\n };\n};\n\nconst mapDispatchToProps = {\n onShowModal: showModal,\n onCloseModal: closeModal,\n};\n\n/**\n */\nexport const connectModal: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";AACA,SAASA,OAAO,QAAQ,aAAa;AAErC,SAASC,SAAS,EAAEC,UAAU,QAAQ,mBAAmB;AAoBzD,MAAMC,eAAe,GAAIC,KAAiB,IAAiB;EAAA;EACzD,MAAMC,YAAY,
|
|
1
|
+
{"version":3,"file":"Modal.js","names":["connect","showModal","closeModal","mapStateToProps","state","_context","visibleModal","_findInstanceProperty","modals","call","modal","visible","visibleModalKey","key","visibleModalSize","size","mapDispatchToProps","onShowModal","onCloseModal","connectModal"],"sources":["../../../src/redux/connectors/Modal.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { showModal, closeModal } from \"../actions/Modals\";\n\nimport type { ReduxState, ShowModalAction, CloseModalAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n visibleModalKey: string | null,\n visibleModalSize?: string | null,\n};\n\ntype DispatchProps = {\n onShowModal: (modalKey: string) => ShowModalAction,\n onCloseModal: (modalKey: string) => CloseModalAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const visibleModal = state.modals.modals.find((modal) => modal.visible);\n\n return {\n visibleModalKey: visibleModal ? visibleModal.key : null,\n visibleModalSize: visibleModal ? visibleModal.size : null,\n };\n};\n\nconst mapDispatchToProps = {\n onShowModal: showModal,\n onCloseModal: closeModal,\n};\n\n/**\n */\nexport const connectModal: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";AACA,SAASA,OAAO,QAAQ,aAAa;AAErC,SAASC,SAAS,EAAEC,UAAU,QAAQ,mBAAmB;AAoBzD,MAAMC,eAAe,GAAIC,KAAiB,IAAiB;EAAA,IAAAC,QAAA;EACzD,MAAMC,YAAY,GAAGC,qBAAA,CAAAF,QAAA,GAAAD,KAAK,CAACI,MAAM,CAACA,MAAM,EAAAC,IAAA,CAAAJ,QAAA,EAAOK,KAAK,IAAKA,KAAK,CAACC,OAAO,CAAC;EAEvE,OAAO;IACLC,eAAe,EAAEN,YAAY,GAAGA,YAAY,CAACO,GAAG,GAAG,IAAI;IACvDC,gBAAgB,EAAER,YAAY,GAAGA,YAAY,CAACS,IAAI,GAAG;EACvD,CAAC;AACH,CAAC;AAED,MAAMC,kBAAkB,GAAG;EACzBC,WAAW,EAAEhB,SAAS;EACtBiB,YAAY,EAAEhB;AAChB,CAAC;;AAED;AACA;AACA,OAAO,MAAMiB,YAAgC,GAAGnB,OAAO,CAOrDG,eAAe,EAAEa,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelCatalog.js","names":["modularui","connectModelCatalog","match","url","propName"],"sources":["../../../src/redux/connectors/ModelCatalog.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectModelCatalog: ModularUIConnector = modularui(\n \"ModelCatalog\",\n ({ match }) => match.url,\n {\n propName: \"modelcatalog\",\n }\n);\n"],"mappings":"AACA,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,mBAAuC,GAAGD,SAAS,CAC9D,cAAc,
|
|
1
|
+
{"version":3,"file":"ModelCatalog.js","names":["modularui","connectModelCatalog","_ref","match","url","propName"],"sources":["../../../src/redux/connectors/ModelCatalog.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectModelCatalog: ModularUIConnector = modularui(\n \"ModelCatalog\",\n ({ match }) => match.url,\n {\n propName: \"modelcatalog\",\n }\n);\n"],"mappings":"AACA,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,mBAAuC,GAAGD,SAAS,CAC9D,cAAc,EACdE,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelRenderer.js","names":["modularui","Href","connectPanel","href","match","querystring","Error","panelHref","url","isExact","addParametersFromString","propName"],"sources":["../../../src/redux/connectors/PanelRenderer.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectPanel: ModularUIConnector = modularui(\n \"PanelRenderer\",\n ({ href, match, querystring = \"\" }) => {\n if (!href && !match) {\n throw new Error(\n \"Cannot determine panel url because of missing href and match\"\n );\n }\n\n const panelHref = href ? new Href(href) : new Href(match.url);\n\n if (match && match.isExact) {\n panelHref.addParametersFromString(querystring);\n }\n\n return panelHref;\n },\n {\n propName: \"panel\",\n }\n);\n"],"mappings":"AACA,OAAOA,SAAS,MAAM,kCAAkC;AACxD,OAAOC,IAAI,MAAM,wBAAwB;AAIzC;AACA;AACA,OAAO,MAAMC,YAAgC,GAAGF,SAAS,CACvD,eAAe,
|
|
1
|
+
{"version":3,"file":"PanelRenderer.js","names":["modularui","Href","connectPanel","_ref","href","match","querystring","Error","panelHref","url","isExact","addParametersFromString","propName"],"sources":["../../../src/redux/connectors/PanelRenderer.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport Href from \"../../models/href/Href\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectPanel: ModularUIConnector = modularui(\n \"PanelRenderer\",\n ({ href, match, querystring = \"\" }) => {\n if (!href && !match) {\n throw new Error(\n \"Cannot determine panel url because of missing href and match\"\n );\n }\n\n const panelHref = href ? new Href(href) : new Href(match.url);\n\n if (match && match.isExact) {\n panelHref.addParametersFromString(querystring);\n }\n\n return panelHref;\n },\n {\n propName: \"panel\",\n }\n);\n"],"mappings":"AACA,OAAOA,SAAS,MAAM,kCAAkC;AACxD,OAAOC,IAAI,MAAM,wBAAwB;AAIzC;AACA;AACA,OAAO,MAAMC,YAAgC,GAAGF,SAAS,CACvD,eAAe,EACfG,IAAA,IAAuC;EAAA,IAAtC;IAAEC,IAAI;IAAEC,KAAK;IAAEC,WAAW,GAAG;EAAG,CAAC,GAAAH,IAAA;EAChC,IAAI,CAACC,IAAI,IAAI,CAACC,KAAK,EAAE;IACnB,MAAM,IAAIE,KAAK,CACb,8DAA8D,CAC/D;EACH;EAEA,MAAMC,SAAS,GAAGJ,IAAI,GAAG,IAAIH,IAAI,CAACG,IAAI,CAAC,GAAG,IAAIH,IAAI,CAACI,KAAK,CAACI,GAAG,CAAC;EAE7D,IAAIJ,KAAK,IAAIA,KAAK,CAACK,OAAO,EAAE;IAC1BF,SAAS,CAACG,uBAAuB,CAACL,WAAW,CAAC;EAChD;EAEA,OAAOE,SAAS;AAClB,CAAC,EACD;EACEI,QAAQ,EAAE;AACZ,CAAC,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preferences.js","names":["connect","getPreferences","preferences","preferenceName","requestedPreferences","Array","isArray","prefs","forEach","prefName","connectPreferences","WrappedComponent","mapStateToProps","state"],"sources":["../../../src/redux/connectors/Preferences.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { AbstractComponent, ComponentType } from \"react\";\nimport type { ReduxState, PreferenceValue, PreferencesState } from \"../types\";\n\ntype StateProps = {\n [prefName: string]: PreferenceValue,\n};\n\ntype OwnProps = {};\n\ntype Props = {\n ...StateProps,\n ...OwnProps,\n dispatch: void,\n};\n\n/**\n */\nconst getPreferences = (\n preferences: PreferencesState,\n preferenceName: string | Array<string>\n) => {\n const requestedPreferences = Array.isArray(preferenceName)\n ? preferenceName\n : [preferenceName];\n\n const prefs: $Shape<StateProps> = {};\n\n requestedPreferences.forEach((prefName) => {\n prefs[prefName] = preferences[prefName];\n });\n\n return prefs;\n};\n\n/**\n * Injects a preference by name into a react component\n */\nexport const connectPreferences = (\n WrappedComponent: AbstractComponent<any>,\n preferenceName: string | Array<string>\n): ComponentType<any> => {\n /**\n */\n const mapStateToProps = (state: ReduxState): StateProps =>\n getPreferences(state.preferences, preferenceName);\n\n return connect<Props, OwnProps, _, _, _, _>(mapStateToProps)(\n WrappedComponent\n );\n};\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,aAAa;AAiBrC;AACA;AACA,MAAMC,cAAc,
|
|
1
|
+
{"version":3,"file":"Preferences.js","names":["connect","getPreferences","preferences","preferenceName","requestedPreferences","Array","isArray","prefs","forEach","prefName","connectPreferences","WrappedComponent","mapStateToProps","state"],"sources":["../../../src/redux/connectors/Preferences.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { AbstractComponent, ComponentType } from \"react\";\nimport type { ReduxState, PreferenceValue, PreferencesState } from \"../types\";\n\ntype StateProps = {\n [prefName: string]: PreferenceValue,\n};\n\ntype OwnProps = {};\n\ntype Props = {\n ...StateProps,\n ...OwnProps,\n dispatch: void,\n};\n\n/**\n */\nconst getPreferences = (\n preferences: PreferencesState,\n preferenceName: string | Array<string>\n) => {\n const requestedPreferences = Array.isArray(preferenceName)\n ? preferenceName\n : [preferenceName];\n\n const prefs: $Shape<StateProps> = {};\n\n requestedPreferences.forEach((prefName) => {\n prefs[prefName] = preferences[prefName];\n });\n\n return prefs;\n};\n\n/**\n * Injects a preference by name into a react component\n */\nexport const connectPreferences = (\n WrappedComponent: AbstractComponent<any>,\n preferenceName: string | Array<string>\n): ComponentType<any> => {\n /**\n */\n const mapStateToProps = (state: ReduxState): StateProps =>\n getPreferences(state.preferences, preferenceName);\n\n return connect<Props, OwnProps, _, _, _, _>(mapStateToProps)(\n WrappedComponent\n );\n};\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,aAAa;AAiBrC;AACA;AACA,MAAMC,cAAc,GAAGA,CACrBC,WAA6B,EAC7BC,cAAsC,KACnC;EACH,MAAMC,oBAAoB,GAAGC,KAAK,CAACC,OAAO,CAACH,cAAc,CAAC,GACtDA,cAAc,GACd,CAACA,cAAc,CAAC;EAEpB,MAAMI,KAAyB,GAAG,CAAC,CAAC;EAEpCH,oBAAoB,CAACI,OAAO,CAAEC,QAAQ,IAAK;IACzCF,KAAK,CAACE,QAAQ,CAAC,GAAGP,WAAW,CAACO,QAAQ,CAAC;EACzC,CAAC,CAAC;EAEF,OAAOF,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMG,kBAAkB,GAAGA,CAChCC,gBAAwC,EACxCR,cAAsC,KACf;EACvB;AACF;EACE,MAAMS,eAAe,GAAIC,KAAiB,IACxCZ,cAAc,CAACY,KAAK,CAACX,WAAW,EAAEC,cAAc,CAAC;EAEnD,OAAOH,OAAO,CAA8BY,eAAe,CAAC,CAC1DD,gBAAgB,CACjB;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickSearch.js","names":["compose","connect","modularui","push","Href","mapDispatchToProps","connectQuickSearch","href","propName"],"sources":["../../../src/redux/connectors/QuickSearch.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport { push } from \"../_router/RouterActions\";\n\nimport type { PushAction } from \"../_router/types\";\nimport type { LocationShape } from \"react-router\";\nimport type { AbstractComponent } from \"react\";\nimport Href from \"../../models/href/Href\";\n\ntype OwnProps = { href: Href };\ntype DispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps: DispatchProps = {\n push,\n};\n\n/**\n */\nexport const connectQuickSearch: (\n Component: AbstractComponent<Props>\n) => AbstractComponent<OwnProps> = compose(\n connect<Props, OwnProps, _, _, _, _>(null, mapDispatchToProps),\n modularui(\"QuickSearch\", ({ href }) => href, {\n propName: \"search\",\n })\n);\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,OAAO,QAAQ,aAAa;AAErC,OAAOC,SAAS,MAAM,kCAAkC;AACxD,SAASC,IAAI,QAAQ,0BAA0B;AAK/C,OAAOC,IAAI,MAAM,wBAAwB;AAYzC,MAAMC,kBAAiC,GAAG;EACxCF;AACF,CAAC;;AAED;AACA;AACA,OAAO,MAAMG,kBAEmB,GAAGN,OAAO,CACxCC,OAAO,CAA8B,IAAI,EAAEI,kBAAkB,CAAC,EAC9DH,SAAS,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"QuickSearch.js","names":["compose","connect","modularui","push","Href","mapDispatchToProps","connectQuickSearch","_ref","href","propName"],"sources":["../../../src/redux/connectors/QuickSearch.js"],"sourcesContent":["// @flow\nimport { compose } from \"redux\";\nimport { connect } from \"react-redux\";\n\nimport modularui from \"../_modularui/ModularUIConnector\";\nimport { push } from \"../_router/RouterActions\";\n\nimport type { PushAction } from \"../_router/types\";\nimport type { LocationShape } from \"react-router\";\nimport type { AbstractComponent } from \"react\";\nimport Href from \"../../models/href/Href\";\n\ntype OwnProps = { href: Href };\ntype DispatchProps = {\n push: (location: LocationShape | string, state?: { ... }) => PushAction,\n};\n\ntype Props = {\n ...OwnProps,\n ...DispatchProps,\n};\n\nconst mapDispatchToProps: DispatchProps = {\n push,\n};\n\n/**\n */\nexport const connectQuickSearch: (\n Component: AbstractComponent<Props>\n) => AbstractComponent<OwnProps> = compose(\n connect<Props, OwnProps, _, _, _, _>(null, mapDispatchToProps),\n modularui(\"QuickSearch\", ({ href }) => href, {\n propName: \"search\",\n })\n);\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,OAAO,QAAQ,aAAa;AAErC,OAAOC,SAAS,MAAM,kCAAkC;AACxD,SAASC,IAAI,QAAQ,0BAA0B;AAK/C,OAAOC,IAAI,MAAM,wBAAwB;AAYzC,MAAMC,kBAAiC,GAAG;EACxCF;AACF,CAAC;;AAED;AACA;AACA,OAAO,MAAMG,kBAEmB,GAAGN,OAAO,CACxCC,OAAO,CAA8B,IAAI,EAAEI,kBAAkB,CAAC,EAC9DH,SAAS,CAAC,aAAa,EAAEK,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAAE;EAC3CC,QAAQ,EAAE;AACZ,CAAC,CAAC,CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","names":["modularui","connectTab","match","url","propName"],"sources":["../../../src/redux/connectors/Tab.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectTab: ModularUIConnector = modularui(\n \"Tab\",\n ({ match }) => match.url,\n {\n propName: \"tab\",\n }\n);\n"],"mappings":"AACA,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,UAA8B,GAAGD,SAAS,CACrD,KAAK,
|
|
1
|
+
{"version":3,"file":"Tab.js","names":["modularui","connectTab","_ref","match","url","propName"],"sources":["../../../src/redux/connectors/Tab.js"],"sourcesContent":["// @flow\nimport modularui from \"../_modularui/ModularUIConnector\";\n\nimport type { ModularUIConnector } from \"../_modularui/types\";\n\n/**\n */\nexport const connectTab: ModularUIConnector = modularui(\n \"Tab\",\n ({ match }) => match.url,\n {\n propName: \"tab\",\n }\n);\n"],"mappings":"AACA,OAAOA,SAAS,MAAM,kCAAkC;AAIxD;AACA;AACA,OAAO,MAAMC,UAA8B,GAAGD,SAAS,CACrD,KAAK,EACLE,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CAAC,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthReducer.js","names":["initialState","mustChangePassword","error","AuthReducer","state","action","type","payload"],"sources":["../../../src/redux/reducers/AuthReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { AuthState, ReduxAction } from \"../types\";\n\n// REDUCER\nconst initialState: AuthState = {\n mustChangePassword: false,\n error: null,\n};\n\n/**\n * Auth reducer\n */\nconst AuthReducer: Reducer<AuthState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"AUTHENTICATION_SUCCESS\":\n return {\n ...state,\n error: null,\n mustChangePassword: false,\n };\n\n case \"AUTHENTICATION_ERROR\":\n return { ...state, mustChangePassword: false, error: action.payload };\n\n case \"AUTHENTICATION_RESET_ERRORS\":\n return { ...state, error: null };\n\n case \"AUTHENTICATION_LOGOUT\": {\n return {\n ...state,\n mustChangePassword: false,\n error: null,\n };\n }\n\n case \"CHANGE_PASSWORD\":\n return {\n ...state,\n mustChangePassword: true,\n error: null,\n };\n\n default:\n return state;\n }\n};\n\nexport default AuthReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAAuB,GAAG;EAC9BC,kBAAkB,EAAE,KAAK;EACzBC,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA,MAAMC,WAA4C,GAAG,
|
|
1
|
+
{"version":3,"file":"AuthReducer.js","names":["initialState","mustChangePassword","error","AuthReducer","state","arguments","length","undefined","action","type","payload"],"sources":["../../../src/redux/reducers/AuthReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { AuthState, ReduxAction } from \"../types\";\n\n// REDUCER\nconst initialState: AuthState = {\n mustChangePassword: false,\n error: null,\n};\n\n/**\n * Auth reducer\n */\nconst AuthReducer: Reducer<AuthState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"AUTHENTICATION_SUCCESS\":\n return {\n ...state,\n error: null,\n mustChangePassword: false,\n };\n\n case \"AUTHENTICATION_ERROR\":\n return { ...state, mustChangePassword: false, error: action.payload };\n\n case \"AUTHENTICATION_RESET_ERRORS\":\n return { ...state, error: null };\n\n case \"AUTHENTICATION_LOGOUT\": {\n return {\n ...state,\n mustChangePassword: false,\n error: null,\n };\n }\n\n case \"CHANGE_PASSWORD\":\n return {\n ...state,\n mustChangePassword: true,\n error: null,\n };\n\n default:\n return state;\n }\n};\n\nexport default AuthReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAAuB,GAAG;EAC9BC,kBAAkB,EAAE,KAAK;EACzBC,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA,MAAMC,WAA4C,GAAG,SAAAA,CAAA,EAGhD;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGL,YAAY;EAAA,IACpBQ,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOJ,KAAK;EACd;EAEA,QAAQI,MAAM,CAACC,IAAI;IACjB,KAAK,wBAAwB;MAC3B,OAAO;QACL,GAAGL,KAAK;QACRF,KAAK,EAAE,IAAI;QACXD,kBAAkB,EAAE;MACtB,CAAC;IAEH,KAAK,sBAAsB;MACzB,OAAO;QAAE,GAAGG,KAAK;QAAEH,kBAAkB,EAAE,KAAK;QAAEC,KAAK,EAAEM,MAAM,CAACE;MAAQ,CAAC;IAEvE,KAAK,6BAA6B;MAChC,OAAO;QAAE,GAAGN,KAAK;QAAEF,KAAK,EAAE;MAAK,CAAC;IAElC,KAAK,uBAAuB;MAAE;QAC5B,OAAO;UACL,GAAGE,KAAK;UACRH,kBAAkB,EAAE,KAAK;UACzBC,KAAK,EAAE;QACT,CAAC;MACH;IAEA,KAAK,iBAAiB;MACpB,OAAO;QACL,GAAGE,KAAK;QACRH,kBAAkB,EAAE,IAAI;QACxBC,KAAK,EAAE;MACT,CAAC;IAEH;MACE,OAAOE,KAAK;EAAC;AAEnB,CAAC;AAED,eAAeD,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorReducer.js","names":["initialState","ErrorReducer","state","action","type","payload"],"sources":["../../../src/redux/reducers/ErrorReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ErrorState } from \"../types\";\n\n// REDUCER\nconst initialState: ErrorState = null;\n\n/**\n * Error reducer\n */\nconst ErrorReducer: Reducer<ErrorState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (action && action.type === \"SAVE_ERROR\") {\n return action.payload;\n }\n\n return state;\n};\n\nexport default ErrorReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAAwB,GAAG,IAAI;;AAErC;AACA;AACA;AACA,MAAMC,YAA8C,GAAG,
|
|
1
|
+
{"version":3,"file":"ErrorReducer.js","names":["initialState","ErrorReducer","state","arguments","length","undefined","action","type","payload"],"sources":["../../../src/redux/reducers/ErrorReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ErrorState } from \"../types\";\n\n// REDUCER\nconst initialState: ErrorState = null;\n\n/**\n * Error reducer\n */\nconst ErrorReducer: Reducer<ErrorState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (action && action.type === \"SAVE_ERROR\") {\n return action.payload;\n }\n\n return state;\n};\n\nexport default ErrorReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAAwB,GAAG,IAAI;;AAErC;AACA;AACA;AACA,MAAMC,YAA8C,GAAG,SAAAA,CAAA,EAGlD;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGH,YAAY;EAAA,IACpBM,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAIC,MAAM,IAAIA,MAAM,CAACC,IAAI,KAAK,YAAY,EAAE;IAC1C,OAAOD,MAAM,CAACE,OAAO;EACvB;EAEA,OAAON,KAAK;AACd,CAAC;AAED,eAAeD,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalsReducer.js","names":["showModal","state","modalKey","modals","modal","visible","key","closeModal","idx","arr","length","initialState","ModalsReducer","action","type","payload"],"sources":["../../../src/redux/reducers/ModalsReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ModalsState } from \"../types\";\n\nconst showModal = (state: ModalsState, modalKey: string) => [\n ...state.modals.map((modal) => ({\n ...modal,\n visible: false,\n })),\n {\n key: modalKey,\n visible: true,\n },\n];\n\nconst closeModal = (state: ModalsState, modalKey: string) =>\n state.modals\n .filter((modal) => modal.key !== modalKey)\n .map((modal, idx, arr) => ({\n ...modal,\n visible: arr.length === idx + 1,\n }));\n\n// REDUCER\nconst initialState: ModalsState = {\n modals: [],\n};\n\n/**\n * Modals reducer\n */\nconst ModalsReducer: Reducer<ModalsState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"SHOW_MODAL\":\n return {\n ...state,\n modals: showModal(state, action.payload),\n };\n\n case \"CLOSE_MODAL\":\n return {\n ...state,\n modals: closeModal(state, action.payload),\n };\n\n default:\n return state;\n }\n};\n\nexport default ModalsReducer;\n"],"mappings":";;AAIA,MAAMA,SAAS,
|
|
1
|
+
{"version":3,"file":"ModalsReducer.js","names":["showModal","state","modalKey","_context","_mapInstanceProperty","modals","call","modal","visible","key","closeModal","_context2","_context3","_filterInstanceProperty","idx","arr","length","initialState","ModalsReducer","arguments","undefined","action","type","payload"],"sources":["../../../src/redux/reducers/ModalsReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ModalsState } from \"../types\";\n\nconst showModal = (state: ModalsState, modalKey: string) => [\n ...state.modals.map((modal) => ({\n ...modal,\n visible: false,\n })),\n {\n key: modalKey,\n visible: true,\n },\n];\n\nconst closeModal = (state: ModalsState, modalKey: string) =>\n state.modals\n .filter((modal) => modal.key !== modalKey)\n .map((modal, idx, arr) => ({\n ...modal,\n visible: arr.length === idx + 1,\n }));\n\n// REDUCER\nconst initialState: ModalsState = {\n modals: [],\n};\n\n/**\n * Modals reducer\n */\nconst ModalsReducer: Reducer<ModalsState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"SHOW_MODAL\":\n return {\n ...state,\n modals: showModal(state, action.payload),\n };\n\n case \"CLOSE_MODAL\":\n return {\n ...state,\n modals: closeModal(state, action.payload),\n };\n\n default:\n return state;\n }\n};\n\nexport default ModalsReducer;\n"],"mappings":";;AAIA,MAAMA,SAAS,GAAGA,CAACC,KAAkB,EAAEC,QAAgB;EAAA,IAAAC,QAAA;EAAA,OAAK,CAC1D,GAAGC,oBAAA,CAAAD,QAAA,GAAAF,KAAK,CAACI,MAAM,EAAAC,IAAA,CAAAH,QAAA,EAAMI,KAAK,KAAM;IAC9B,GAAGA,KAAK;IACRC,OAAO,EAAE;EACX,CAAC,CAAC,CAAC,EACH;IACEC,GAAG,EAAEP,QAAQ;IACbM,OAAO,EAAE;EACX,CAAC,CACF;AAAA;AAED,MAAME,UAAU,GAAGA,CAACT,KAAkB,EAAEC,QAAgB;EAAA,IAAAS,SAAA,EAAAC,SAAA;EAAA,OACtDR,oBAAA,CAAAO,SAAA,GAAAE,uBAAA,CAAAD,SAAA,GAAAX,KAAK,CAACI,MAAM,EAAAC,IAAA,CAAAM,SAAA,EACDL,KAAK,IAAKA,KAAK,CAACE,GAAG,KAAKP,QAAQ,CAAC,EAAAI,IAAA,CAAAK,SAAA,EACrC,CAACJ,KAAK,EAAEO,GAAG,EAAEC,GAAG,MAAM;IACzB,GAAGR,KAAK;IACRC,OAAO,EAAEO,GAAG,CAACC,MAAM,KAAKF,GAAG,GAAG;EAChC,CAAC,CAAC,CAAC;AAAA;;AAEP;AACA,MAAMG,YAAyB,GAAG;EAChCZ,MAAM,EAAE;AACV,CAAC;;AAED;AACA;AACA;AACA,MAAMa,aAAgD,GAAG,SAAAA,CAAA,EAGpD;EAAA,IAFHjB,KAAK,GAAAkB,SAAA,CAAAH,MAAA,QAAAG,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAGF,YAAY;EAAA,IACpBI,MAAM,GAAAF,SAAA,CAAAH,MAAA,OAAAG,SAAA,MAAAC,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOpB,KAAK;EACd;EAEA,QAAQoB,MAAM,CAACC,IAAI;IACjB,KAAK,YAAY;MACf,OAAO;QACL,GAAGrB,KAAK;QACRI,MAAM,EAAEL,SAAS,CAACC,KAAK,EAAEoB,MAAM,CAACE,OAAO;MACzC,CAAC;IAEH,KAAK,aAAa;MAChB,OAAO;QACL,GAAGtB,KAAK;QACRI,MAAM,EAAEK,UAAU,CAACT,KAAK,EAAEoB,MAAM,CAACE,OAAO;MAC1C,CAAC;IAEH;MACE,OAAOtB,KAAK;EAAC;AAEnB,CAAC;AAED,eAAeiB,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationReducer.js","names":["initialState","render","messageType","message","error","NotificationReducer","state","action","type","payload"],"sources":["../../../src/redux/reducers/NotificationReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, NotificationState } from \"../types\";\n\n// REDUCER\nconst initialState: NotificationState = {\n render: false,\n messageType: null,\n message: null,\n error: null,\n};\n\n/**\n * Form reducer\n */\nconst NotificationReducer: Reducer<NotificationState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"DISMISS_NOTIFICATION\":\n return {\n ...state,\n render: false,\n };\n\n case \"SHOW_NOTIFICATION\":\n return {\n ...state,\n render: true,\n messageType: action.payload.type,\n message: action.payload.message,\n error: action.payload.error,\n };\n\n default:\n return state;\n }\n};\n\nexport default NotificationReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAA+B,GAAG;EACtCC,MAAM,EAAE,KAAK;EACbC,WAAW,EAAE,IAAI;EACjBC,OAAO,EAAE,IAAI;EACbC,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA,MAAMC,mBAA4D,GAAG,
|
|
1
|
+
{"version":3,"file":"NotificationReducer.js","names":["initialState","render","messageType","message","error","NotificationReducer","state","arguments","length","undefined","action","type","payload"],"sources":["../../../src/redux/reducers/NotificationReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, NotificationState } from \"../types\";\n\n// REDUCER\nconst initialState: NotificationState = {\n render: false,\n messageType: null,\n message: null,\n error: null,\n};\n\n/**\n * Form reducer\n */\nconst NotificationReducer: Reducer<NotificationState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"DISMISS_NOTIFICATION\":\n return {\n ...state,\n render: false,\n };\n\n case \"SHOW_NOTIFICATION\":\n return {\n ...state,\n render: true,\n messageType: action.payload.type,\n message: action.payload.message,\n error: action.payload.error,\n };\n\n default:\n return state;\n }\n};\n\nexport default NotificationReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAA+B,GAAG;EACtCC,MAAM,EAAE,KAAK;EACbC,WAAW,EAAE,IAAI;EACjBC,OAAO,EAAE,IAAI;EACbC,KAAK,EAAE;AACT,CAAC;;AAED;AACA;AACA;AACA,MAAMC,mBAA4D,GAAG,SAAAA,CAAA,EAGhE;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGP,YAAY;EAAA,IACpBU,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOJ,KAAK;EACd;EAEA,QAAQI,MAAM,CAACC,IAAI;IACjB,KAAK,sBAAsB;MACzB,OAAO;QACL,GAAGL,KAAK;QACRL,MAAM,EAAE;MACV,CAAC;IAEH,KAAK,mBAAmB;MACtB,OAAO;QACL,GAAGK,KAAK;QACRL,MAAM,EAAE,IAAI;QACZC,WAAW,EAAEQ,MAAM,CAACE,OAAO,CAACD,IAAI;QAChCR,OAAO,EAAEO,MAAM,CAACE,OAAO,CAACT,OAAO;QAC/BC,KAAK,EAAEM,MAAM,CAACE,OAAO,CAACR;MACxB,CAAC;IAEH;MACE,OAAOE,KAAK;EAAC;AAEnB,CAAC;AAED,eAAeD,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreferencesReducer.js","names":["initialState","PreferencesReducer","state","action","type","payload"],"sources":["../../../src/redux/reducers/PreferencesReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, PreferencesState } from \"../types\";\n\nconst initialState: $Shape<PreferencesState> = {};\n\n/**\n * Pref reducer\n */\nconst PreferencesReducer: Reducer<PreferencesState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (action?.type === \"SET_PREFERENCE\") {\n return {\n ...state,\n ...action.payload,\n };\n }\n\n if (action?.type === \"SET_PREFERENCES\") {\n return {\n ...state,\n ...action.payload,\n };\n }\n\n return state;\n};\n\nexport default PreferencesReducer;\n"],"mappings":"AAIA,MAAMA,YAAsC,GAAG,CAAC,CAAC;;AAEjD;AACA;AACA;AACA,MAAMC,kBAA0D,GAAG,
|
|
1
|
+
{"version":3,"file":"PreferencesReducer.js","names":["initialState","PreferencesReducer","state","arguments","length","undefined","action","type","payload"],"sources":["../../../src/redux/reducers/PreferencesReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, PreferencesState } from \"../types\";\n\nconst initialState: $Shape<PreferencesState> = {};\n\n/**\n * Pref reducer\n */\nconst PreferencesReducer: Reducer<PreferencesState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (action?.type === \"SET_PREFERENCE\") {\n return {\n ...state,\n ...action.payload,\n };\n }\n\n if (action?.type === \"SET_PREFERENCES\") {\n return {\n ...state,\n ...action.payload,\n };\n }\n\n return state;\n};\n\nexport default PreferencesReducer;\n"],"mappings":"AAIA,MAAMA,YAAsC,GAAG,CAAC,CAAC;;AAEjD;AACA;AACA;AACA,MAAMC,kBAA0D,GAAG,SAAAA,CAAA,EAG9D;EAAA,IAFHC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGH,YAAY;EAAA,IACpBM,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAIC,MAAM,EAAEC,IAAI,KAAK,gBAAgB,EAAE;IACrC,OAAO;MACL,GAAGL,KAAK;MACR,GAAGI,MAAM,CAACE;IACZ,CAAC;EACH;EAEA,IAAIF,MAAM,EAAEC,IAAI,KAAK,iBAAiB,EAAE;IACtC,OAAO;MACL,GAAGL,KAAK;MACR,GAAGI,MAAM,CAACE;IACZ,CAAC;EACH;EAEA,OAAON,KAAK;AACd,CAAC;AAED,eAAeD,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","action","type","payload"],"sources":["../../../src/redux/reducers/ProgressIndicatorReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ProgressIndicatorState } from \"../types\";\n\n// REDUCER\nconst initialState: ProgressIndicatorState = {\n count: 0,\n timestamp: 0,\n percentComplete: 0,\n};\n\nconst finishProgress = (state: ProgressIndicatorState) => {\n const isFinalFinish = state.count - 1 === 0;\n return {\n ...state,\n count: state.count <= 0 ? 0 : state.count - 1,\n timestamp: isFinalFinish ? Date.now() : state.timestamp,\n percentComplete: isFinalFinish ? 0 : state.percentComplete,\n };\n};\n\n/**\n * Keep state for the progress indicator\n */\nconst progressIndicatorReducer: Reducer<ProgressIndicatorState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"UPDATE_PROGRESS\":\n return {\n ...state,\n percentComplete: action.payload?.percentComplete,\n };\n\n case \"FINISH_PROGRESS\":\n return finishProgress(state);\n\n case \"START_PROGRESS\":\n return {\n ...state,\n count: state.count + 1,\n };\n\n case \"RESET_PROGRESS\":\n return {\n ...state,\n count: 0,\n };\n\n default:\n return state;\n }\n};\n\nexport default progressIndicatorReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAAoC,GAAG;EAC3CC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,eAAe,EAAE;AACnB,CAAC;AAED,MAAMC,cAAc,GAAIC,KAA6B,IAAK;EACxD,MAAMC,aAAa,GAAGD,KAAK,CAACJ,KAAK,GAAG,CAAC,KAAK,CAAC;EAC3C,OAAO;IACL,GAAGI,KAAK;IACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,IAAI,CAAC,GAAG,CAAC,GAAGI,KAAK,CAACJ,KAAK,GAAG,CAAC;IAC7CC,SAAS,EAAEI,aAAa,GAAGC,IAAI,CAACC,GAAG,EAAE,GAAGH,KAAK,CAACH,SAAS;IACvDC,eAAe,EAAEG,aAAa,GAAG,CAAC,GAAGD,KAAK,CAACF;EAC7C,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA,MAAMM,wBAAsE,GAAG,
|
|
1
|
+
{"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","arguments","length","undefined","action","type","payload"],"sources":["../../../src/redux/reducers/ProgressIndicatorReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ProgressIndicatorState } from \"../types\";\n\n// REDUCER\nconst initialState: ProgressIndicatorState = {\n count: 0,\n timestamp: 0,\n percentComplete: 0,\n};\n\nconst finishProgress = (state: ProgressIndicatorState) => {\n const isFinalFinish = state.count - 1 === 0;\n return {\n ...state,\n count: state.count <= 0 ? 0 : state.count - 1,\n timestamp: isFinalFinish ? Date.now() : state.timestamp,\n percentComplete: isFinalFinish ? 0 : state.percentComplete,\n };\n};\n\n/**\n * Keep state for the progress indicator\n */\nconst progressIndicatorReducer: Reducer<ProgressIndicatorState, ReduxAction> = (\n state = initialState,\n action\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"UPDATE_PROGRESS\":\n return {\n ...state,\n percentComplete: action.payload?.percentComplete,\n };\n\n case \"FINISH_PROGRESS\":\n return finishProgress(state);\n\n case \"START_PROGRESS\":\n return {\n ...state,\n count: state.count + 1,\n };\n\n case \"RESET_PROGRESS\":\n return {\n ...state,\n count: 0,\n };\n\n default:\n return state;\n }\n};\n\nexport default progressIndicatorReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAAoC,GAAG;EAC3CC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,eAAe,EAAE;AACnB,CAAC;AAED,MAAMC,cAAc,GAAIC,KAA6B,IAAK;EACxD,MAAMC,aAAa,GAAGD,KAAK,CAACJ,KAAK,GAAG,CAAC,KAAK,CAAC;EAC3C,OAAO;IACL,GAAGI,KAAK;IACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,IAAI,CAAC,GAAG,CAAC,GAAGI,KAAK,CAACJ,KAAK,GAAG,CAAC;IAC7CC,SAAS,EAAEI,aAAa,GAAGC,IAAI,CAACC,GAAG,EAAE,GAAGH,KAAK,CAACH,SAAS;IACvDC,eAAe,EAAEG,aAAa,GAAG,CAAC,GAAGD,KAAK,CAACF;EAC7C,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA,MAAMM,wBAAsE,GAAG,SAAAA,CAAA,EAG1E;EAAA,IAFHJ,KAAK,GAAAK,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGV,YAAY;EAAA,IACpBa,MAAM,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAEN,IAAI,CAACC,MAAM,EAAE;IACX,OAAOR,KAAK;EACd;EAEA,QAAQQ,MAAM,CAACC,IAAI;IACjB,KAAK,iBAAiB;MACpB,OAAO;QACL,GAAGT,KAAK;QACRF,eAAe,EAAEU,MAAM,CAACE,OAAO,EAAEZ;MACnC,CAAC;IAEH,KAAK,iBAAiB;MACpB,OAAOC,cAAc,CAACC,KAAK,CAAC;IAE9B,KAAK,gBAAgB;MACnB,OAAO;QACL,GAAGA,KAAK;QACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,GAAG;MACvB,CAAC;IAEH,KAAK,gBAAgB;MACnB,OAAO;QACL,GAAGI,KAAK;QACRJ,KAAK,EAAE;MACT,CAAC;IAEH;MACE,OAAOI,KAAK;EAAC;AAEnB,CAAC;AAED,eAAeI,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReducer.js","names":["RouterReducer","ModularUIReducer","I18nReducer","ModalsReducer","AuthReducer","ErrorReducer","NotificationReducer","ProgressIndicatorReducer","PreferencesReducer","createReducer","router","modularui","i18n","auth","error","modals","notification","progressindicator","preferences"],"sources":["../../../src/redux/reducers/createReducer.js"],"sourcesContent":["// @flow\nimport { RouterReducer } from \"../_router/RouterReducer\";\nimport { ModularUIReducer } from \"../_modularui/ModularUIReducer\";\nimport { I18nReducer } from \"../_i18n/I18nReducer\";\n\nimport ModalsReducer from \"./ModalsReducer\";\nimport AuthReducer from \"./AuthReducer\";\nimport ErrorReducer from \"./ErrorReducer\";\nimport NotificationReducer from \"./NotificationReducer\";\nimport ProgressIndicatorReducer from \"./ProgressIndicatorReducer\";\nimport PreferencesReducer from \"./PreferencesReducer\";\n\nimport type { Reducer } from \"redux\";\nimport type {\n ReduxAction,\n ProgressIndicatorState,\n PreferencesState,\n NotificationState,\n ModalsState,\n ErrorState,\n AuthState,\n} from \"../types\";\nimport type { RouterState } from \"../_router/types\";\nimport type { ModularUIState } from \"../_modularui/types\";\nimport type { I18nState } from \"../_i18n/types\";\n\ntype Reducers = {\n auth: Reducer<AuthState, ReduxAction>,\n error: Reducer<ErrorState, ReduxAction>,\n i18n: Reducer<I18nState, ReduxAction>,\n modals: Reducer<ModalsState, ReduxAction>,\n modularui: Reducer<ModularUIState, ReduxAction>,\n notification: Reducer<NotificationState, ReduxAction>,\n preferences: Reducer<PreferencesState, ReduxAction>,\n progressindicator: Reducer<ProgressIndicatorState, ReduxAction>,\n router: Reducer<RouterState, ReduxAction>,\n};\n\n/**\n */\nexport const createReducer = (): Reducers => ({\n router: RouterReducer,\n modularui: ModularUIReducer,\n i18n: I18nReducer,\n auth: AuthReducer,\n error: ErrorReducer,\n modals: ModalsReducer,\n notification: NotificationReducer,\n progressindicator: ProgressIndicatorReducer,\n preferences: PreferencesReducer,\n});\n"],"mappings":"AACA,SAASA,aAAa,QAAQ,0BAA0B;AACxD,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAASC,WAAW,QAAQ,sBAAsB;AAElD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,kBAAkB,MAAM,sBAAsB;AA4BrD;AACA;AACA,OAAO,MAAMC,aAAa,
|
|
1
|
+
{"version":3,"file":"createReducer.js","names":["RouterReducer","ModularUIReducer","I18nReducer","ModalsReducer","AuthReducer","ErrorReducer","NotificationReducer","ProgressIndicatorReducer","PreferencesReducer","createReducer","router","modularui","i18n","auth","error","modals","notification","progressindicator","preferences"],"sources":["../../../src/redux/reducers/createReducer.js"],"sourcesContent":["// @flow\nimport { RouterReducer } from \"../_router/RouterReducer\";\nimport { ModularUIReducer } from \"../_modularui/ModularUIReducer\";\nimport { I18nReducer } from \"../_i18n/I18nReducer\";\n\nimport ModalsReducer from \"./ModalsReducer\";\nimport AuthReducer from \"./AuthReducer\";\nimport ErrorReducer from \"./ErrorReducer\";\nimport NotificationReducer from \"./NotificationReducer\";\nimport ProgressIndicatorReducer from \"./ProgressIndicatorReducer\";\nimport PreferencesReducer from \"./PreferencesReducer\";\n\nimport type { Reducer } from \"redux\";\nimport type {\n ReduxAction,\n ProgressIndicatorState,\n PreferencesState,\n NotificationState,\n ModalsState,\n ErrorState,\n AuthState,\n} from \"../types\";\nimport type { RouterState } from \"../_router/types\";\nimport type { ModularUIState } from \"../_modularui/types\";\nimport type { I18nState } from \"../_i18n/types\";\n\ntype Reducers = {\n auth: Reducer<AuthState, ReduxAction>,\n error: Reducer<ErrorState, ReduxAction>,\n i18n: Reducer<I18nState, ReduxAction>,\n modals: Reducer<ModalsState, ReduxAction>,\n modularui: Reducer<ModularUIState, ReduxAction>,\n notification: Reducer<NotificationState, ReduxAction>,\n preferences: Reducer<PreferencesState, ReduxAction>,\n progressindicator: Reducer<ProgressIndicatorState, ReduxAction>,\n router: Reducer<RouterState, ReduxAction>,\n};\n\n/**\n */\nexport const createReducer = (): Reducers => ({\n router: RouterReducer,\n modularui: ModularUIReducer,\n i18n: I18nReducer,\n auth: AuthReducer,\n error: ErrorReducer,\n modals: ModalsReducer,\n notification: NotificationReducer,\n progressindicator: ProgressIndicatorReducer,\n preferences: PreferencesReducer,\n});\n"],"mappings":"AACA,SAASA,aAAa,QAAQ,0BAA0B;AACxD,SAASC,gBAAgB,QAAQ,gCAAgC;AACjE,SAASC,WAAW,QAAQ,sBAAsB;AAElD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAOC,mBAAmB,MAAM,uBAAuB;AACvD,OAAOC,wBAAwB,MAAM,4BAA4B;AACjE,OAAOC,kBAAkB,MAAM,sBAAsB;AA4BrD;AACA;AACA,OAAO,MAAMC,aAAa,GAAGA,CAAA,MAAiB;EAC5CC,MAAM,EAAEV,aAAa;EACrBW,SAAS,EAAEV,gBAAgB;EAC3BW,IAAI,EAAEV,WAAW;EACjBW,IAAI,EAAET,WAAW;EACjBU,KAAK,EAAET,YAAY;EACnBU,MAAM,EAAEZ,aAAa;EACrBa,YAAY,EAAEV,mBAAmB;EACjCW,iBAAiB,EAAEV,wBAAwB;EAC3CW,WAAW,EAAEV;AACf,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","
|
|
1
|
+
{"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","arguments","length","undefined","props","beforeRenderHook"],"sources":["../../../src/redux/store/beforeRenderHooks.js"],"sourcesContent":["// @flow\nimport type { ReduxStore } from \"../types\";\n\nexport type BeforeRenderHookProps = {\n store: ReduxStore,\n request?: HttpServletRequestJava,\n};\nexport type BeforeRenderHook = (props: BeforeRenderHookProps) => void;\n\n/**\n * Process handlers that need to be run before the react application starts,\n * for example to start a third party service<br>\n * An object with the store is available to make it possible to read state available in the redux store,\n * for example server preferences, and the request is available to retrieve request information\n *\n */\nexport const handleBeforeRenderHooks = (\n beforeRenderHooks: Array<BeforeRenderHook> = [],\n props: BeforeRenderHookProps\n) => {\n if (beforeRenderHooks.length > 0) {\n for (const beforeRenderHook of beforeRenderHooks) {\n beforeRenderHook(props);\n }\n }\n};\n"],"mappings":"AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,uBAAuB,GAAG,SAAAA,CAAA,EAGlC;EAAA,IAFHC,iBAA0C,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAAA,IAC/CG,KAA4B,GAAAH,SAAA,CAAAC,MAAA,OAAAD,SAAA,MAAAE,SAAA;EAE5B,IAAIH,iBAAiB,CAACE,MAAM,GAAG,CAAC,EAAE;IAChC,KAAK,MAAMG,gBAAgB,IAAIL,iBAAiB,EAAE;MAChDK,gBAAgB,CAACD,KAAK,CAAC;IACzB;EACF;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureStore.js","names":["applyMiddleware","compose","combineReducers","createStore","createReduxStore","thunk","routerMiddleware","modularUIMiddleware","createReducer","locationChange","configureStore","routerHistory","customReducers","initialState","composeEnhancers","process","env","NODE_ENV","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","combinedReducers","middleware","enhancers","store","router","dispatch","location"],"sources":["../../../src/redux/store/configureStore.js"],"sourcesContent":["// @flow\nimport {\n applyMiddleware,\n compose,\n combineReducers,\n createStore as createReduxStore,\n} from \"redux\";\nimport thunk from \"redux-thunk\";\n\nimport { routerMiddleware } from \"../_router/RouterMiddleware\";\nimport { modularUIMiddleware } from \"../_modularui/ModularUIMiddleware\";\n\nimport { createReducer } from \"../reducers/createReducer\";\nimport { locationChange } from \"../_router/RouterActions\";\n\nimport type { RouterHistory } from \"react-router\";\nimport type { ReduxAction, ReduxState, ReduxStore } from \"../types\";\nimport type { Reducer } from \"redux\";\n\n/**\n */\nconst configureStore = (\n routerHistory: RouterHistory,\n customReducers?: Object,\n initialState?: $Shape<ReduxState>\n): { routerHistory: RouterHistory, store: ReduxStore } => {\n let composeEnhancers = compose;\n\n if (process.env.NODE_ENV !== \"production\" && typeof window !== \"undefined\") {\n composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n }\n\n const combinedReducers: Reducer<ReduxState, ReduxAction> = combineReducers({\n ...customReducers,\n ...createReducer(),\n });\n\n const middleware = applyMiddleware(\n modularUIMiddleware,\n routerMiddleware(routerHistory),\n thunk\n );\n\n const enhancers = composeEnhancers(middleware);\n\n const store: ReduxStore = createReduxStore(\n combinedReducers,\n initialState,\n enhancers\n );\n\n if (!initialState?.router) {\n store.dispatch(locationChange(routerHistory.location, \"PUSH\"));\n }\n return { routerHistory, store };\n};\n\nexport default configureStore;\n"],"mappings":"AACA,SACEA,eAAe,EACfC,OAAO,EACPC,eAAe,EACfC,WAAW,IAAIC,gBAAgB,QAC1B,OAAO;AACd,OAAOC,KAAK,MAAM,aAAa;AAE/B,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,mBAAmB,QAAQ,mCAAmC;AAEvE,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,cAAc,QAAQ,0BAA0B;AAMzD;AACA;AACA,MAAMC,cAAc,
|
|
1
|
+
{"version":3,"file":"configureStore.js","names":["applyMiddleware","compose","combineReducers","createStore","createReduxStore","thunk","routerMiddleware","modularUIMiddleware","createReducer","locationChange","configureStore","routerHistory","customReducers","initialState","composeEnhancers","process","env","NODE_ENV","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","combinedReducers","middleware","enhancers","store","router","dispatch","location"],"sources":["../../../src/redux/store/configureStore.js"],"sourcesContent":["// @flow\nimport {\n applyMiddleware,\n compose,\n combineReducers,\n createStore as createReduxStore,\n} from \"redux\";\nimport thunk from \"redux-thunk\";\n\nimport { routerMiddleware } from \"../_router/RouterMiddleware\";\nimport { modularUIMiddleware } from \"../_modularui/ModularUIMiddleware\";\n\nimport { createReducer } from \"../reducers/createReducer\";\nimport { locationChange } from \"../_router/RouterActions\";\n\nimport type { RouterHistory } from \"react-router\";\nimport type { ReduxAction, ReduxState, ReduxStore } from \"../types\";\nimport type { Reducer } from \"redux\";\n\n/**\n */\nconst configureStore = (\n routerHistory: RouterHistory,\n customReducers?: Object,\n initialState?: $Shape<ReduxState>\n): { routerHistory: RouterHistory, store: ReduxStore } => {\n let composeEnhancers = compose;\n\n if (process.env.NODE_ENV !== \"production\" && typeof window !== \"undefined\") {\n composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;\n }\n\n const combinedReducers: Reducer<ReduxState, ReduxAction> = combineReducers({\n ...customReducers,\n ...createReducer(),\n });\n\n const middleware = applyMiddleware(\n modularUIMiddleware,\n routerMiddleware(routerHistory),\n thunk\n );\n\n const enhancers = composeEnhancers(middleware);\n\n const store: ReduxStore = createReduxStore(\n combinedReducers,\n initialState,\n enhancers\n );\n\n if (!initialState?.router) {\n store.dispatch(locationChange(routerHistory.location, \"PUSH\"));\n }\n return { routerHistory, store };\n};\n\nexport default configureStore;\n"],"mappings":"AACA,SACEA,eAAe,EACfC,OAAO,EACPC,eAAe,EACfC,WAAW,IAAIC,gBAAgB,QAC1B,OAAO;AACd,OAAOC,KAAK,MAAM,aAAa;AAE/B,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,mBAAmB,QAAQ,mCAAmC;AAEvE,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,cAAc,QAAQ,0BAA0B;AAMzD;AACA;AACA,MAAMC,cAAc,GAAGA,CACrBC,aAA4B,EAC5BC,cAAuB,EACvBC,YAAiC,KACuB;EACxD,IAAIC,gBAAgB,GAAGb,OAAO;EAE9B,IAAIc,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IAC1EJ,gBAAgB,GAAGI,MAAM,CAACC,oCAAoC,IAAIlB,OAAO;EAC3E;EAEA,MAAMmB,gBAAkD,GAAGlB,eAAe,CAAC;IACzE,GAAGU,cAAc;IACjB,GAAGJ,aAAa;EAClB,CAAC,CAAC;EAEF,MAAMa,UAAU,GAAGrB,eAAe,CAChCO,mBAAmB,EACnBD,gBAAgB,CAACK,aAAa,CAAC,EAC/BN,KAAK,CACN;EAED,MAAMiB,SAAS,GAAGR,gBAAgB,CAACO,UAAU,CAAC;EAE9C,MAAME,KAAiB,GAAGnB,gBAAgB,CACxCgB,gBAAgB,EAChBP,YAAY,EACZS,SAAS,CACV;EAED,IAAI,CAACT,YAAY,EAAEW,MAAM,EAAE;IACzBD,KAAK,CAACE,QAAQ,CAAChB,cAAc,CAACE,aAAa,CAACe,QAAQ,EAAE,MAAM,CAAC,CAAC;EAChE;EACA,OAAO;IAAEf,aAAa;IAAEY;EAAM,CAAC;AACjC,CAAC;AAED,eAAeb,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","setItem","removeItem","clear","pattern","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","newData","newValue"],"sources":["../../../src/utils/browser/Cache.js"],"sourcesContent":["// @flow\nimport type { RequestOptions } from \"../fetch/types\";\n\nconst RESOURCE_CACHE_PREFIX = \"res:\";\n\n/**\n * Manage the browser cache\n */\nclass Cache {\n _cache: Storage;\n\n /**\n */\n constructor() {\n if (typeof sessionStorage !== \"undefined\") {\n this._cache = sessionStorage;\n }\n }\n\n /**\n * Create a key that can be used to cache resources, needs the request arguments and uses url, params and header of the request args\n * to create a key that is unique for time versions and locale\n */\n createResourceKey(requestArgs: RequestOptions): string {\n let resourceKey = requestArgs.url;\n\n if (requestArgs.params) {\n resourceKey += `|${requestArgs.params}`;\n }\n\n if (requestArgs.locale) {\n resourceKey += `|${requestArgs.locale}`;\n }\n\n return `${RESOURCE_CACHE_PREFIX}${resourceKey}`;\n }\n\n /**\n * Get a cached item by it's key\n */\n getItem(key: string): any {\n const cache = this._cache;\n\n if (!cache) {\n return null;\n }\n\n const cacheItem = cache.getItem(key);\n\n if (!cacheItem) {\n return null;\n }\n\n try {\n return JSON.parse(cacheItem);\n } catch (error) {\n return this._cache.getItem(key);\n }\n }\n\n /**\n * Check if the item with key exists in the browser cache\n */\n hasItem(key: string): boolean {\n return this.getItem(key) !== null;\n }\n\n /**\n * Add an item to the cache\n */\n addItem(key: string, value: string | Object) {\n const stringValue =\n typeof value === \"string\" ? value : JSON.stringify(value);\n\n this._cache.setItem(key, stringValue);\n }\n\n /**\n */\n setItem(key: string, value: string | Object) {\n this.addItem(key, value);\n }\n\n /**\n */\n removeItem(key: string) {\n this._cache.removeItem(key);\n }\n\n /**\n * Clear complete cache storage\n */\n clear(pattern: ?string) {\n if (!this._cache) {\n return;\n }\n\n if (pattern) {\n Object.keys(this._cache)\n .filter((k) => (pattern ? new RegExp(pattern).test(k) : true))\n .forEach((k) => this._cache.removeItem(k));\n } else {\n this._cache.clear();\n }\n }\n\n // Session storage is not available between different tabs in the same window,\n // this load method copies sessionStorage from other tabs into this tab using localStorage\n // see https://blog.guya.net/2015/06/12/sharing-sessionstorage-between-tabs-for-secure-multi-tab-authentication/\n /**\n */\n loadOtherBrowserTabs(callback: Function) {\n window.addEventListener(\"storage\", (e) => {\n this.sendSessionStorage(e);\n this.receiveSessionStorage(e, callback);\n });\n\n if (this._cache.length === 0) {\n // trigger retrieval of sessionstorage on other tabs\n localStorage.setItem(\"getSessionStorage\", Date.now().toString());\n }\n }\n\n /**\n */\n sendSessionStorage(e: StorageEvent) {\n if (e.key === \"getSessionStorage\") {\n localStorage.setItem(\"sessionStorage\", JSON.stringify(this._cache));\n localStorage.removeItem(\"sessionStorage\");\n }\n }\n\n /**\n */\n receiveSessionStorage(e: StorageEvent, callback: Function): any {\n if (e.key === \"sessionStorage\" && !this.getItem(\"sessionStorageCopied\")) {\n // receive sessionstorage from other tabs\n const newData = e.newValue ? JSON.parse(e.newValue) : {};\n Object.entries(newData)\n .filter(([key]) => !this.hasItem(key))\n .forEach(([key, value]) => {\n this.addItem(key, value);\n });\n\n this.setItem(\"sessionStorageCopied\", Date.now().toString());\n\n return callback();\n }\n\n return null;\n }\n}\n\nexport default (new Cache(): Cache);\n"],"mappings":";;;;;AAGA,MAAMA,qBAAqB,GAAG,MAAM;;AAEpC;AACA;AACA;AACA,MAAMC,KAAK,CAAC;EAGV;AACF;EACEC,
|
|
1
|
+
{"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","_defineProperty","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_JSON$stringify","setItem","removeItem","clear","pattern","_context","_filterInstanceProperty","_Object$keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_Object$entries","_ref","_ref2"],"sources":["../../../src/utils/browser/Cache.js"],"sourcesContent":["// @flow\nimport type { RequestOptions } from \"../fetch/types\";\n\nconst RESOURCE_CACHE_PREFIX = \"res:\";\n\n/**\n * Manage the browser cache\n */\nclass Cache {\n _cache: Storage;\n\n /**\n */\n constructor() {\n if (typeof sessionStorage !== \"undefined\") {\n this._cache = sessionStorage;\n }\n }\n\n /**\n * Create a key that can be used to cache resources, needs the request arguments and uses url, params and header of the request args\n * to create a key that is unique for time versions and locale\n */\n createResourceKey(requestArgs: RequestOptions): string {\n let resourceKey = requestArgs.url;\n\n if (requestArgs.params) {\n resourceKey += `|${requestArgs.params}`;\n }\n\n if (requestArgs.locale) {\n resourceKey += `|${requestArgs.locale}`;\n }\n\n return `${RESOURCE_CACHE_PREFIX}${resourceKey}`;\n }\n\n /**\n * Get a cached item by it's key\n */\n getItem(key: string): any {\n const cache = this._cache;\n\n if (!cache) {\n return null;\n }\n\n const cacheItem = cache.getItem(key);\n\n if (!cacheItem) {\n return null;\n }\n\n try {\n return JSON.parse(cacheItem);\n } catch (error) {\n return this._cache.getItem(key);\n }\n }\n\n /**\n * Check if the item with key exists in the browser cache\n */\n hasItem(key: string): boolean {\n return this.getItem(key) !== null;\n }\n\n /**\n * Add an item to the cache\n */\n addItem(key: string, value: string | Object) {\n const stringValue =\n typeof value === \"string\" ? value : JSON.stringify(value);\n\n this._cache.setItem(key, stringValue);\n }\n\n /**\n */\n setItem(key: string, value: string | Object) {\n this.addItem(key, value);\n }\n\n /**\n */\n removeItem(key: string) {\n this._cache.removeItem(key);\n }\n\n /**\n * Clear complete cache storage\n */\n clear(pattern: ?string) {\n if (!this._cache) {\n return;\n }\n\n if (pattern) {\n Object.keys(this._cache)\n .filter((k) => (pattern ? new RegExp(pattern).test(k) : true))\n .forEach((k) => this._cache.removeItem(k));\n } else {\n this._cache.clear();\n }\n }\n\n // Session storage is not available between different tabs in the same window,\n // this load method copies sessionStorage from other tabs into this tab using localStorage\n // see https://blog.guya.net/2015/06/12/sharing-sessionstorage-between-tabs-for-secure-multi-tab-authentication/\n /**\n */\n loadOtherBrowserTabs(callback: Function) {\n window.addEventListener(\"storage\", (e) => {\n this.sendSessionStorage(e);\n this.receiveSessionStorage(e, callback);\n });\n\n if (this._cache.length === 0) {\n // trigger retrieval of sessionstorage on other tabs\n localStorage.setItem(\"getSessionStorage\", Date.now().toString());\n }\n }\n\n /**\n */\n sendSessionStorage(e: StorageEvent) {\n if (e.key === \"getSessionStorage\") {\n localStorage.setItem(\"sessionStorage\", JSON.stringify(this._cache));\n localStorage.removeItem(\"sessionStorage\");\n }\n }\n\n /**\n */\n receiveSessionStorage(e: StorageEvent, callback: Function): any {\n if (e.key === \"sessionStorage\" && !this.getItem(\"sessionStorageCopied\")) {\n // receive sessionstorage from other tabs\n const newData = e.newValue ? JSON.parse(e.newValue) : {};\n Object.entries(newData)\n .filter(([key]) => !this.hasItem(key))\n .forEach(([key, value]) => {\n this.addItem(key, value);\n });\n\n this.setItem(\"sessionStorageCopied\", Date.now().toString());\n\n return callback();\n }\n\n return null;\n }\n}\n\nexport default (new Cache(): Cache);\n"],"mappings":";;;;;AAGA,MAAMA,qBAAqB,GAAG,MAAM;;AAEpC;AACA;AACA;AACA,MAAMC,KAAK,CAAC;EAGV;AACF;EACEC,WAAWA,CAAA,EAAG;IAAAC,eAAA;IACZ,IAAI,OAAOC,cAAc,KAAK,WAAW,EAAE;MACzC,IAAI,CAACC,MAAM,GAAGD,cAAc;IAC9B;EACF;;EAEA;AACF;AACA;AACA;EACEE,iBAAiBA,CAACC,WAA2B,EAAU;IACrD,IAAIC,WAAW,GAAGD,WAAW,CAACE,GAAG;IAEjC,IAAIF,WAAW,CAACG,MAAM,EAAE;MACtBF,WAAW,IAAK,IAAGD,WAAW,CAACG,MAAO,EAAC;IACzC;IAEA,IAAIH,WAAW,CAACI,MAAM,EAAE;MACtBH,WAAW,IAAK,IAAGD,WAAW,CAACI,MAA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A;MACvE;MACA,MAAMC,OAAO,GAAGT,CAAC,CAACU,QAAQ,GAAGlC,IAAI,CAACC,KAAK,CAACuB,CAAC,CAACU,QAAQ,CAAC,GAAG,CAAC,CAAC;MACxDrB,uBAAA,CAAAmB,SAAA,GAAAG,eAAA,CAAeF,OAAO,CAAC,EAAAlB,IAAA,CAAAiB,SAAA,EACbI,IAAA;QAAA,IAAC,CAACvC,GAAG,CAAC,GAAAuC,IAAA;QAAA,OAAK,CAAC,IAAI,CAACjC,OAAO,CAACN,GAAG,CAAC;MAAA,EAAC,CACrCsB,OAAO,CAACkB,KAAA,IAAkB;QAAA,IAAjB,CAACxC,GAAG,EAAEQ,KAAK,CAAC,GAAAgC,KAAA;QACpB,IAAI,CAACjC,OAAO,CAACP,GAAG,EAAEQ,KAAK,CAAC;MAC1B,CAAC,CAAC;MAEJ,IAAI,CAACG,OAAO,CAAC,sBAAsB,EAAEqB,IAAI,CAACC,GAAG,EAAE,CAACC,QAAQ,EAAE,CAAC;MAE3D,OAAOV,QAAQ,EAAE;IACnB;IAEA,OAAO,IAAI;EACb;AACF;AAEA,eAAgB,IAAIpC,KAAK,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cookies.js","names":["Cookies","getBasePath","getCookie","name","get","setCookie","value","options","attributes","path","expires","days","sameSite","secure","set","clearCookie","remove"],"sources":["../../../src/utils/browser/Cookies.js"],"sourcesContent":["// @flow\nimport Cookies from \"js-cookie\";\n\nimport { getBasePath } from \"../../constants/Settings\";\n\ntype CookieOptions = {\n days?: number,\n sameSite?: \"None\" | \"Lax\" | \"Strict\",\n secure?: boolean,\n};\n\ntype CookieAttributes = {\n path: string,\n expires?: number,\n sameSite?: string,\n secure?: boolean,\n};\n\n/**\n */\nexport const getCookie = (name: string): null | string => {\n return Cookies.get(name);\n};\n\n/**\n */\nexport const setCookie = (\n name: string,\n value: any,\n options?: CookieOptions\n) => {\n const attributes: CookieAttributes = { path: getBasePath() };\n attributes.expires = options?.days;\n attributes.sameSite = options?.sameSite ?? \"Strict\";\n attributes.secure = options?.secure;\n\n Cookies.set(name, value, attributes);\n};\n\n/**\n */\nexport const clearCookie = (name: string) => {\n Cookies.remove(name, { path: getBasePath() });\n};\n"],"mappings":"AACA,OAAOA,OAAO,MAAM,WAAW;AAE/B,SAASC,WAAW,QAAQ,0BAA0B;AAetD;AACA;AACA,OAAO,MAAMC,SAAS,GAAIC,IAAY,IAAoB;EACxD,OAAOH,OAAO,CAACI,GAAG,CAACD,IAAI,CAAC;AAC1B,CAAC;;AAED;AACA;AACA,OAAO,MAAME,SAAS,
|
|
1
|
+
{"version":3,"file":"Cookies.js","names":["Cookies","getBasePath","getCookie","name","get","setCookie","value","options","attributes","path","expires","days","sameSite","secure","set","clearCookie","remove"],"sources":["../../../src/utils/browser/Cookies.js"],"sourcesContent":["// @flow\nimport Cookies from \"js-cookie\";\n\nimport { getBasePath } from \"../../constants/Settings\";\n\ntype CookieOptions = {\n days?: number,\n sameSite?: \"None\" | \"Lax\" | \"Strict\",\n secure?: boolean,\n};\n\ntype CookieAttributes = {\n path: string,\n expires?: number,\n sameSite?: string,\n secure?: boolean,\n};\n\n/**\n */\nexport const getCookie = (name: string): null | string => {\n return Cookies.get(name);\n};\n\n/**\n */\nexport const setCookie = (\n name: string,\n value: any,\n options?: CookieOptions\n) => {\n const attributes: CookieAttributes = { path: getBasePath() };\n attributes.expires = options?.days;\n attributes.sameSite = options?.sameSite ?? \"Strict\";\n attributes.secure = options?.secure;\n\n Cookies.set(name, value, attributes);\n};\n\n/**\n */\nexport const clearCookie = (name: string) => {\n Cookies.remove(name, { path: getBasePath() });\n};\n"],"mappings":"AACA,OAAOA,OAAO,MAAM,WAAW;AAE/B,SAASC,WAAW,QAAQ,0BAA0B;AAetD;AACA;AACA,OAAO,MAAMC,SAAS,GAAIC,IAAY,IAAoB;EACxD,OAAOH,OAAO,CAACI,GAAG,CAACD,IAAI,CAAC;AAC1B,CAAC;;AAED;AACA;AACA,OAAO,MAAME,SAAS,GAAGA,CACvBF,IAAY,EACZG,KAAU,EACVC,OAAuB,KACpB;EACH,MAAMC,UAA4B,GAAG;IAAEC,IAAI,EAAER,WAAW;EAAG,CAAC;EAC5DO,UAAU,CAACE,OAAO,GAAGH,OAAO,EAAEI,IAAI;EAClCH,UAAU,CAACI,QAAQ,GAAGL,OAAO,EAAEK,QAAQ,IAAI,QAAQ;EACnDJ,UAAU,CAACK,MAAM,GAAGN,OAAO,EAAEM,MAAM;EAEnCb,OAAO,CAACc,GAAG,CAACX,IAAI,EAAEG,KAAK,EAAEE,UAAU,CAAC;AACtC,CAAC;;AAED;AACA;AACA,OAAO,MAAMO,WAAW,GAAIZ,IAAY,IAAK;EAC3CH,OAAO,CAACgB,MAAM,CAACb,IAAI,EAAE;IAAEM,IAAI,EAAER,WAAW;EAAG,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeUtil.js","names":["parse","format","isValid","isAfter","isBefore","isSameDay","addSeconds","addMinutes","addHours","addDays","addWeeks","addMonths","addYears","subSeconds","subMinutes","subHours","subDays","subWeeks","subMonths","subYears","startOfMonth","endOfMonth","startOfWeek","getHours","getMinutes","getDay","getWeek","setMilliseconds","setSeconds","setMinutes","setHours","setMonth","setYear","set","nl","enGB","getCookie","getSetting","ISO_DATE_FORMAT","ISO_DATETIME_FORMAT","ISO_TIME_FORMAT","ISO_TIMESTAMP_FORMAT","DEFAULT_WEEK_STARTS_ON","DEFAULT_FIRST_WEEK_CONTAINS_DATE","BaseDateTimeUtil","constructor","isoFormat","_isoFormat","getLocale","locale","getOptions","weekStartsOn","firstWeekContainsDate","toDate","date","inputFormat","Date","toFormat","targetFormat","parsedDate","toISO","sourceFormat","now","convertFormat","hasFormat","realDate","formattedValue","isOutsideRange","replace","toUpperCase","inputDate","afterISODate","isSameOrAfter","isSame","beforeISODate","isSameOrBefore","compareDate","getTime","isOther","isWeekend","SATURDAY_NUMBER","SUNDAY_NUMBER","weekDay","amount","subtractSeconds","subtractMinutes","subtractHours","subtractDays","subtractWeeks","subtractMonths","subtractYears","year","month","setHour","hour","setMinute","minute","setSecond","second","milliseconds","setTime","hours","minutes","seconds","DateUtil","DateTimeUtil","TimeUtil","TimestampUtil"],"sources":["../../../src/utils/datetime/DateTimeUtil.js"],"sourcesContent":["// @flow\nimport {\n parse,\n format,\n isValid,\n isAfter,\n isBefore,\n isSameDay,\n addSeconds,\n addMinutes,\n addHours,\n addDays,\n addWeeks,\n addMonths,\n addYears,\n subSeconds,\n subMinutes,\n subHours,\n subDays,\n subWeeks,\n subMonths,\n subYears,\n startOfMonth,\n endOfMonth,\n startOfWeek,\n getHours,\n getMinutes,\n getDay,\n getWeek,\n setMilliseconds,\n setSeconds,\n setMinutes,\n setHours,\n setMonth,\n setYear,\n set,\n} from \"date-fns\";\nimport { nl, enGB } from \"date-fns/locale\";\n\nimport { getCookie } from \"../browser/Cookies\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport {\n ISO_DATE_FORMAT,\n ISO_DATETIME_FORMAT,\n ISO_TIME_FORMAT,\n ISO_TIMESTAMP_FORMAT,\n DEFAULT_WEEK_STARTS_ON,\n DEFAULT_FIRST_WEEK_CONTAINS_DATE,\n} from \"../../constants\";\n\n/**\n * @hideconstructor\n */\nclass BaseDateTimeUtil {\n _isoFormat: string;\n\n constructor(isoFormat: string) {\n this._isoFormat = isoFormat;\n }\n\n /**\n */\n getLocale(): typeof nl | typeof enGB {\n const locale = getCookie(\"locale\") ?? \"en\";\n\n if (locale === \"nl\") {\n return nl;\n }\n\n return enGB;\n }\n\n // returns the options defined in settings\n getOptions(): {\n weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6,\n firstWeekContainsDate: 1 | 2 | 3 | 4 | 5 | 6 | 7,\n } {\n // indicates on what day the week starts\n const weekStartsOn = getSetting(\n \"CALENDAR_WEEK_STARTS_ON\",\n DEFAULT_WEEK_STARTS_ON\n );\n\n // indicates which date indicates the first week of the year\n const firstWeekContainsDate = getSetting(\n \"CALENDAR_FIRST_WEEK_CONTAINS_DATE\",\n DEFAULT_FIRST_WEEK_CONTAINS_DATE\n );\n\n return { weekStartsOn, firstWeekContainsDate };\n }\n\n /**\n */\n toDate(date: string, inputFormat: string = this._isoFormat): Date {\n const { weekStartsOn, firstWeekContainsDate } = this.getOptions();\n\n return parse(date, inputFormat, new Date(), {\n weekStartsOn,\n firstWeekContainsDate,\n });\n }\n\n /**\n */\n toFormat(date: string | Date, targetFormat: string): string {\n const { weekStartsOn } = this.getOptions();\n\n const parsedDate = typeof date === \"string\" ? this.toDate(date) : date;\n\n if (isValid(parsedDate)) {\n return format(parsedDate, targetFormat, {\n weekStartsOn,\n locale: this.getLocale(),\n });\n }\n\n return \"Invalid Date\";\n }\n\n /**\n */\n toISO(date: string | Date, sourceFormat: string = this._isoFormat): string {\n const { weekStartsOn } = this.getOptions();\n\n const parsedDate =\n typeof date === \"string\" ? this.toDate(date, sourceFormat) : date;\n\n if (isValid(parsedDate)) {\n return format(parsedDate, this._isoFormat, {\n weekStartsOn,\n });\n }\n\n return \"Invalid Date\";\n }\n\n /**\n */\n now(): string {\n return this.toISO(new Date());\n }\n\n /**\n */\n convertFormat(sourceFormat: string): string {\n return sourceFormat ? sourceFormat : this._isoFormat;\n }\n\n /**\n * VALIDATION\n */\n hasFormat(date: string, sourceFormat: string): boolean {\n const { weekStartsOn } = this.getOptions();\n\n const realDate = this.toDate(date, sourceFormat);\n if (isValid(realDate)) {\n const formattedValue = format(realDate, sourceFormat, {\n weekStartsOn,\n });\n\n const isOutsideRange =\n isBefore(realDate, new Date(1000, 1, 1)) ||\n isAfter(realDate, new Date(9999, 11, 31));\n if (isOutsideRange) {\n return false;\n }\n\n return (\n formattedValue.replace(/0/gu, \"\").toUpperCase() ===\n date.replace(/0/gu, \"\").toUpperCase()\n );\n }\n\n return false;\n }\n\n /**\n */\n isValid(date: string, inputFormat: string = this._isoFormat): boolean {\n return isValid(this.toDate(date, inputFormat));\n }\n\n /**\n */\n isAfter(\n inputDate: string,\n afterISODate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n afterISODate != null &&\n isAfter(this.toDate(inputDate, inputFormat), this.toDate(afterISODate))\n );\n }\n\n /**\n */\n isSameOrAfter(\n inputDate: string,\n afterISODate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n afterISODate != null &&\n (this.isAfter(inputDate, afterISODate, inputFormat) ||\n this.isSame(inputDate, afterISODate, inputFormat))\n );\n }\n\n /**\n */\n isBefore(\n inputDate: string,\n beforeISODate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n beforeISODate != null &&\n isBefore(this.toDate(inputDate, inputFormat), this.toDate(beforeISODate))\n );\n }\n\n /**\n */\n isSameOrBefore(\n inputDate: string,\n beforeISODate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n beforeISODate != null &&\n (this.isBefore(inputDate, beforeISODate, inputFormat) ||\n this.isSame(inputDate, beforeISODate, inputFormat))\n );\n }\n\n /**\n */\n isSame(\n inputDate: string,\n compareDate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n compareDate != null &&\n this.toDate(inputDate, inputFormat).getTime() ===\n this.toDate(compareDate).getTime()\n );\n }\n\n /**\n */\n isSameDay(\n inputDate: string,\n compareDate: string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n compareDate != null &&\n isSameDay(\n this.toDate(inputDate, inputFormat),\n this.toDate(compareDate, inputFormat)\n )\n );\n }\n\n /**\n */\n isOther(\n inputDate: string,\n compareDate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return !this.isSame(inputDate, compareDate, inputFormat);\n }\n\n /**\n */\n isWeekend(inputDate: string): boolean {\n const SATURDAY_NUMBER = 6;\n const SUNDAY_NUMBER = 0;\n const weekDay = getDay(this.toDate(inputDate));\n\n return weekDay === SATURDAY_NUMBER || weekDay === SUNDAY_NUMBER;\n }\n\n /**\n * CALCULATIONS\n */\n addSeconds(date: string, amount: number): string {\n return this.toISO(addSeconds(this.toDate(date), amount));\n }\n\n /**\n */\n addMinutes(date: string, amount: number): string {\n return this.toISO(addMinutes(this.toDate(date), amount));\n }\n\n /**\n */\n addHours(date: string, amount: number): string {\n return this.toISO(addHours(this.toDate(date), amount));\n }\n\n /**\n */\n addDays(date: string, amount: number): string {\n return this.toISO(addDays(this.toDate(date), amount));\n }\n\n /**\n */\n addWeeks(date: string, amount: number): string {\n return this.toISO(addWeeks(this.toDate(date), amount));\n }\n\n /**\n */\n addMonths(date: string, amount: number): string {\n return this.toISO(addMonths(this.toDate(date), amount));\n }\n\n /**\n */\n addYears(date: string, amount: number): string {\n return this.toISO(addYears(this.toDate(date), amount));\n }\n\n /**\n */\n subtractSeconds(date: string, amount: number): string {\n return this.toISO(subSeconds(this.toDate(date), amount));\n }\n\n /**\n */\n subtractMinutes(date: string, amount: number): string {\n return this.toISO(subMinutes(this.toDate(date), amount));\n }\n\n /**\n */\n subtractHours(date: string, amount: number): string {\n return this.toISO(subHours(this.toDate(date), amount));\n }\n\n /**\n */\n subtractDays(date: string, amount: number): string {\n return this.toISO(subDays(this.toDate(date), amount));\n }\n\n /**\n */\n subtractWeeks(date: string, amount: number): string {\n return this.toISO(subWeeks(this.toDate(date), amount));\n }\n\n /**\n */\n subtractMonths(date: string, amount: number): string {\n return this.toISO(subMonths(this.toDate(date), amount));\n }\n\n /**\n */\n subtractYears(date: string, amount: number): string {\n return this.toISO(subYears(this.toDate(date), amount));\n }\n\n /**\n * GETTERS\n */\n startOfMonth(date: string, inputFormat: string = this._isoFormat): string {\n return this.toISO(startOfMonth(this.toDate(date, inputFormat)));\n }\n\n /**\n */\n endOfMonth(date: string, inputFormat: string = this._isoFormat): string {\n return this.toISO(endOfMonth(this.toDate(date, inputFormat)));\n }\n\n /**\n */\n startOfWeek(date: string, inputFormat: string = this._isoFormat): string {\n const { weekStartsOn } = this.getOptions();\n\n return this.toISO(\n startOfWeek(this.toDate(date, inputFormat), {\n weekStartsOn,\n })\n );\n }\n\n /**\n */\n getHours(date: string | Date): number {\n const parsedDate = typeof date === \"string\" ? this.toDate(date) : date;\n return getHours(parsedDate);\n }\n\n /**\n */\n getMinutes(date: string | Date): number {\n const parsedDate = typeof date === \"string\" ? this.toDate(date) : date;\n return getMinutes(parsedDate);\n }\n\n /**\n */\n getWeek(date: string): number {\n const { weekStartsOn, firstWeekContainsDate } = this.getOptions();\n\n return getWeek(this.toDate(date), {\n weekStartsOn,\n firstWeekContainsDate,\n });\n }\n\n /**\n * SETTERS\n */\n setYear(date: string, year: number): string {\n return this.toISO(setYear(this.toDate(date), year));\n }\n\n /**\n */\n setMonth(date: string, month: number): string {\n return this.toISO(setMonth(this.toDate(date), month));\n }\n\n /**\n */\n setHour(date: string, hour: number): string {\n return this.toISO(setHours(this.toDate(date), hour));\n }\n\n /**\n */\n setMinute(date: string, minute: number): string {\n return this.toISO(setMinutes(this.toDate(date), minute));\n }\n\n /**\n */\n setSecond(date: string, second: number): string {\n return this.toISO(setSeconds(this.toDate(date), second));\n }\n\n /**\n */\n setMilliseconds(date: string, milliseconds: number): string {\n return this.toISO(setMilliseconds(this.toDate(date), milliseconds));\n }\n\n /**\n */\n setTime(\n date: string,\n hours: number,\n minutes: number,\n seconds: number,\n milliseconds: number\n ): string {\n return this.toISO(\n set(this.toDate(date), {\n hours,\n minutes,\n seconds,\n milliseconds,\n })\n );\n }\n}\n\n/**\n * DateUtil\n */\nconst DateUtil: BaseDateTimeUtil = new BaseDateTimeUtil(ISO_DATE_FORMAT);\n\n/**\n * DateTimeUtil\n */\nconst DateTimeUtil: BaseDateTimeUtil = new BaseDateTimeUtil(\n ISO_DATETIME_FORMAT\n);\n\n/**\n * TimeUtil\n */\nconst TimeUtil: BaseDateTimeUtil = new BaseDateTimeUtil(ISO_TIME_FORMAT);\n\n/**\n * TimestampUtil\n */\nconst TimestampUtil: BaseDateTimeUtil = new BaseDateTimeUtil(\n ISO_TIMESTAMP_F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AAC;;AAExE;AACA;AACA;AACA,MAAMmE,YAA8B,GAAG,IAAI7D,gBAAgB,CACzDL,mBAAmB,CACpB;;AAED;AACA;AACA;AACA,MAAMmE,QAA0B,GAAG,IAAI9D,gBAAgB,CAACJ,eAAe,CAAC;;AAExE;AACA;AACA;AACA,MAAMmE,aAA+B,GAAG,IAAI/D,gBAAgB,CAC1DH,oBAAoB,CACrB;AAED,SAAS+D,QAAQ,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,aAAa"}
|
|
1
|
+
{"version":3,"file":"DateTimeUtil.js","names":["parse","format","isValid","isAfter","isBefore","isSameDay","addSeconds","addMinutes","addHours","addDays","addWeeks","addMonths","addYears","subSeconds","subMinutes","subHours","subDays","subWeeks","subMonths","subYears","startOfMonth","endOfMonth","startOfWeek","getHours","getMinutes","getDay","getWeek","setMilliseconds","setSeconds","setMinutes","setHours","setMonth","setYear","set","nl","enGB","getCookie","getSetting","ISO_DATE_FORMAT","ISO_DATETIME_FORMAT","ISO_TIME_FORMAT","ISO_TIMESTAMP_FORMAT","DEFAULT_WEEK_STARTS_ON","DEFAULT_FIRST_WEEK_CONTAINS_DATE","BaseDateTimeUtil","constructor","isoFormat","_defineProperty","_isoFormat","getLocale","locale","getOptions","weekStartsOn","firstWeekContainsDate","toDate","date","inputFormat","arguments","length","undefined","Date","toFormat","targetFormat","parsedDate","toISO","sourceFormat","now","convertFormat","hasFormat","realDate","formattedValue","isOutsideRange","replace","toUpperCase","inputDate","afterISODate","isSameOrAfter","isSame","beforeISODate","isSameOrBefore","compareDate","getTime","isOther","isWeekend","SATURDAY_NUMBER","SUNDAY_NUMBER","weekDay","amount","subtractSeconds","subtractMinutes","subtractHours","subtractDays","subtractWeeks","subtractMonths","subtractYears","year","month","setHour","hour","setMinute","minute","setSecond","second","milliseconds","setTime","hours","minutes","seconds","DateUtil","DateTimeUtil","TimeUtil","TimestampUtil"],"sources":["../../../src/utils/datetime/DateTimeUtil.js"],"sourcesContent":["// @flow\nimport {\n parse,\n format,\n isValid,\n isAfter,\n isBefore,\n isSameDay,\n addSeconds,\n addMinutes,\n addHours,\n addDays,\n addWeeks,\n addMonths,\n addYears,\n subSeconds,\n subMinutes,\n subHours,\n subDays,\n subWeeks,\n subMonths,\n subYears,\n startOfMonth,\n endOfMonth,\n startOfWeek,\n getHours,\n getMinutes,\n getDay,\n getWeek,\n setMilliseconds,\n setSeconds,\n setMinutes,\n setHours,\n setMonth,\n setYear,\n set,\n} from \"date-fns\";\nimport { nl, enGB } from \"date-fns/locale\";\n\nimport { getCookie } from \"../browser/Cookies\";\n\nimport { getSetting } from \"../../constants/Settings\";\n\nimport {\n ISO_DATE_FORMAT,\n ISO_DATETIME_FORMAT,\n ISO_TIME_FORMAT,\n ISO_TIMESTAMP_FORMAT,\n DEFAULT_WEEK_STARTS_ON,\n DEFAULT_FIRST_WEEK_CONTAINS_DATE,\n} from \"../../constants\";\n\n/**\n * @hideconstructor\n */\nclass BaseDateTimeUtil {\n _isoFormat: string;\n\n constructor(isoFormat: string) {\n this._isoFormat = isoFormat;\n }\n\n /**\n */\n getLocale(): typeof nl | typeof enGB {\n const locale = getCookie(\"locale\") ?? \"en\";\n\n if (locale === \"nl\") {\n return nl;\n }\n\n return enGB;\n }\n\n // returns the options defined in settings\n getOptions(): {\n weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6,\n firstWeekContainsDate: 1 | 2 | 3 | 4 | 5 | 6 | 7,\n } {\n // indicates on what day the week starts\n const weekStartsOn = getSetting(\n \"CALENDAR_WEEK_STARTS_ON\",\n DEFAULT_WEEK_STARTS_ON\n );\n\n // indicates which date indicates the first week of the year\n const firstWeekContainsDate = getSetting(\n \"CALENDAR_FIRST_WEEK_CONTAINS_DATE\",\n DEFAULT_FIRST_WEEK_CONTAINS_DATE\n );\n\n return { weekStartsOn, firstWeekContainsDate };\n }\n\n /**\n */\n toDate(date: string, inputFormat: string = this._isoFormat): Date {\n const { weekStartsOn, firstWeekContainsDate } = this.getOptions();\n\n return parse(date, inputFormat, new Date(), {\n weekStartsOn,\n firstWeekContainsDate,\n });\n }\n\n /**\n */\n toFormat(date: string | Date, targetFormat: string): string {\n const { weekStartsOn } = this.getOptions();\n\n const parsedDate = typeof date === \"string\" ? this.toDate(date) : date;\n\n if (isValid(parsedDate)) {\n return format(parsedDate, targetFormat, {\n weekStartsOn,\n locale: this.getLocale(),\n });\n }\n\n return \"Invalid Date\";\n }\n\n /**\n */\n toISO(date: string | Date, sourceFormat: string = this._isoFormat): string {\n const { weekStartsOn } = this.getOptions();\n\n const parsedDate =\n typeof date === \"string\" ? this.toDate(date, sourceFormat) : date;\n\n if (isValid(parsedDate)) {\n return format(parsedDate, this._isoFormat, {\n weekStartsOn,\n });\n }\n\n return \"Invalid Date\";\n }\n\n /**\n */\n now(): string {\n return this.toISO(new Date());\n }\n\n /**\n */\n convertFormat(sourceFormat: string): string {\n return sourceFormat ? sourceFormat : this._isoFormat;\n }\n\n /**\n * VALIDATION\n */\n hasFormat(date: string, sourceFormat: string): boolean {\n const { weekStartsOn } = this.getOptions();\n\n const realDate = this.toDate(date, sourceFormat);\n if (isValid(realDate)) {\n const formattedValue = format(realDate, sourceFormat, {\n weekStartsOn,\n });\n\n const isOutsideRange =\n isBefore(realDate, new Date(1000, 1, 1)) ||\n isAfter(realDate, new Date(9999, 11, 31));\n if (isOutsideRange) {\n return false;\n }\n\n return (\n formattedValue.replace(/0/gu, \"\").toUpperCase() ===\n date.replace(/0/gu, \"\").toUpperCase()\n );\n }\n\n return false;\n }\n\n /**\n */\n isValid(date: string, inputFormat: string = this._isoFormat): boolean {\n return isValid(this.toDate(date, inputFormat));\n }\n\n /**\n */\n isAfter(\n inputDate: string,\n afterISODate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n afterISODate != null &&\n isAfter(this.toDate(inputDate, inputFormat), this.toDate(afterISODate))\n );\n }\n\n /**\n */\n isSameOrAfter(\n inputDate: string,\n afterISODate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n afterISODate != null &&\n (this.isAfter(inputDate, afterISODate, inputFormat) ||\n this.isSame(inputDate, afterISODate, inputFormat))\n );\n }\n\n /**\n */\n isBefore(\n inputDate: string,\n beforeISODate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n beforeISODate != null &&\n isBefore(this.toDate(inputDate, inputFormat), this.toDate(beforeISODate))\n );\n }\n\n /**\n */\n isSameOrBefore(\n inputDate: string,\n beforeISODate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n beforeISODate != null &&\n (this.isBefore(inputDate, beforeISODate, inputFormat) ||\n this.isSame(inputDate, beforeISODate, inputFormat))\n );\n }\n\n /**\n */\n isSame(\n inputDate: string,\n compareDate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n compareDate != null &&\n this.toDate(inputDate, inputFormat).getTime() ===\n this.toDate(compareDate).getTime()\n );\n }\n\n /**\n */\n isSameDay(\n inputDate: string,\n compareDate: string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return (\n compareDate != null &&\n isSameDay(\n this.toDate(inputDate, inputFormat),\n this.toDate(compareDate, inputFormat)\n )\n );\n }\n\n /**\n */\n isOther(\n inputDate: string,\n compareDate: ?string,\n inputFormat: string = this._isoFormat\n ): boolean {\n return !this.isSame(inputDate, compareDate, inputFormat);\n }\n\n /**\n */\n isWeekend(inputDate: string): boolean {\n const SATURDAY_NUMBER = 6;\n const SUNDAY_NUMBER = 0;\n const weekDay = getDay(this.toDate(inputDate));\n\n return weekDay === SATURDAY_NUMBER || weekDay === SUNDAY_NUMBER;\n }\n\n /**\n * CALCULATIONS\n */\n addSeconds(date: string, amount: number): string {\n return this.toISO(addSeconds(this.toDate(date), amount));\n }\n\n /**\n */\n addMinutes(date: string, amount: number): string {\n return this.toISO(addMinutes(this.toDate(date), amount));\n }\n\n /**\n */\n addHours(date: string, amount: number): string {\n return this.toISO(addHours(this.toDate(date), amount));\n }\n\n /**\n */\n addDays(date: string, amount: number): string {\n return this.toISO(addDays(this.toDate(date), amount));\n }\n\n /**\n */\n addWeeks(date: string, amount: number): string {\n return this.toISO(addWeeks(this.toDate(date), amount));\n }\n\n /**\n */\n addMonths(date: string, amount: number): string {\n return this.toISO(addMonths(this.toDate(date), amount));\n }\n\n /**\n */\n addYears(date: string, amount: number): string {\n return this.toISO(addYears(this.toDate(date), amount));\n }\n\n /**\n */\n subtractSeconds(date: string, amount: number): string {\n return this.toISO(subSeconds(this.toDate(date), amount));\n }\n\n /**\n */\n subtractMinutes(date: string, amount: number): string {\n return this.toISO(subMinutes(this.toDate(date), amount));\n }\n\n /**\n */\n subtractHours(date: string, amount: number): string {\n return this.toISO(subHours(this.toDate(date), amount));\n }\n\n /**\n */\n subtractDays(date: string, amount: number): string {\n return this.toISO(subDays(this.toDate(date), amount));\n }\n\n /**\n */\n subtractWeeks(date: string, amount: number): string {\n return this.toISO(subWeeks(this.toDate(date), amount));\n }\n\n /**\n */\n subtractMonths(date: string, amount: number): string {\n return this.toISO(subMonths(this.toDate(date), amount));\n }\n\n /**\n */\n subtractYears(date: string, amount: number): string {\n return this.toISO(subYears(this.toDate(date), amount));\n }\n\n /**\n * GETTERS\n */\n startOfMonth(date: string, inputFormat: string = this._isoFormat): string {\n return this.toISO(startOfMonth(this.toDate(date, inputFormat)));\n }\n\n /**\n */\n endOfMonth(date: string, inputFormat: string = this._isoFormat): string {\n return this.toISO(endOfMonth(this.toDate(date, inputFormat)));\n }\n\n /**\n */\n startOfWeek(date: string, inputFormat: string = this._isoFormat): string {\n const { weekStartsOn } = this.getOptions();\n\n return this.toISO(\n startOfWeek(this.toDate(date, inputFormat), {\n weekStartsOn,\n })\n );\n }\n\n /**\n */\n getHours(date: string | Date): number {\n const parsedDate = typeof date === \"string\" ? this.toDate(date) : date;\n return getHours(parsedDate);\n }\n\n /**\n */\n getMinutes(date: string | Date): number {\n const parsedDate = typeof date === \"string\" ? this.toDate(date) : date;\n return getMinutes(parsedDate);\n }\n\n /**\n */\n getWeek(date: string): number {\n const { weekStartsOn, firstWeekContainsDate } = this.getOptions();\n\n return getWeek(this.toDate(date), {\n weekStartsOn,\n firstWeekContainsDate,\n });\n }\n\n /**\n * SETTERS\n */\n setYear(date: string, year: number): string {\n return this.toISO(setYear(this.toDate(date), year));\n }\n\n /**\n */\n setMonth(date: string, month: number): string {\n return this.toISO(setMonth(this.toDate(date), month));\n }\n\n /**\n */\n setHour(date: string, hour: number): string {\n return this.toISO(setHours(this.toDate(date), hour));\n }\n\n /**\n */\n setMinute(date: string, minute: number): string {\n return this.toISO(setMinutes(this.toDate(date), minute));\n }\n\n /**\n */\n setSecond(date: string, second: number): string {\n return this.toISO(setSeconds(this.toDate(date), second));\n }\n\n /**\n */\n setMilliseconds(date: string, milliseconds: number): string {\n return this.toISO(setMilliseconds(this.toDate(date), milliseconds));\n }\n\n /**\n */\n setTime(\n date: string,\n hours: number,\n minutes: number,\n seconds: number,\n milliseconds: number\n ): string {\n return this.toISO(\n set(this.toDate(date), {\n hours,\n minutes,\n seconds,\n milliseconds,\n })\n );\n }\n}\n\n/**\n * DateUtil\n */\nconst DateUtil: BaseDateTimeUtil = new BaseDateTimeUtil(ISO_DATE_FORMAT);\n\n/**\n * DateTimeUtil\n */\nconst DateTimeUtil: BaseDateTimeUtil = new BaseDateTimeUtil(\n ISO_DATETIME_FORMAT\n);\n\n/**\n * TimeUtil\n */\nconst TimeUtil: BaseDateTimeUtil = new BaseDateTimeUtil(ISO_TIME_FORMAT);\n\n/**\n * TimestampUtil\n */\nconst TimestampUtil: BaseDateTimeUtil = new BaseDateTimeUtil(\n ISO_TIMESTAMP_FORMAT\n);\n\nexport { DateUtil, DateTimeUtil, TimeUtil, TimestampUtil };\n"],"mappings":";AACA,SACEA,KAAK,EACLC,MAAM,EACNC,OAAO,EACPC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,UAAU,EACVC,QAAQ,EACRC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACTC,QAAQ,EACRC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9C,IAAY,EAAE+C,MAAc,EAAU;IAC9C,OAAO,IAAI,CAACtC,KAAK,CAACpC,UAAU,CAAC,IAAI,CAAC0B,MAAM,CAACC,IAAI,CAAC,EAAE+C,MAAM,CAAC,CAAC;EAC1D;;EAEA;AACF;EACE3E,eAAeA,CAAC4B,IAAY,EAAEgD,YAAoB,EAAU;IAC1D,OAAO,IAAI,CAACvC,KAAK,CAACrC,eAAe,CAAC,IAAI,CAAC2B,MAAM,CAACC,IAAI,CAAC,EAAEgD,YAAY,CAAC,CAAC;EACrE;;EAEA;AACF;EACEC,OAAOA,CACLjD,IAAY,EACZkD,KAAa,EACbC,OAAe,EACfC,OAAe,EACfJ,YAAoB,EACZ;IACR,OAAO,IAAI,CAACvC,KAAK,CACf/B,GAAG,CAAC,IAAI,CAACqB,MAAM,CAACC,IAAI,CAAC,EAAE;MACrBkD,KAAK;MACLC,OAAO;MACPC,OAAO;MACPJ;IACF,CAAC,CAAC,CACH;EACH;AACF;;AAEA;AACA;AACA;AACA,MAAMK,QAA0B,GAAG,IAAIhE,gBAAgB,CAACN,eAAe,CAAC;;AAExE;AACA;AACA;AACA,MAAMuE,YAA8B,GAAG,IAAIjE,gBAAgB,CACzDL,mBAAmB,CACpB;;AAED;AACA;AACA;AACA,MAAMuE,QAA0B,GAAG,IAAIlE,gBAAgB,CAACJ,eAAe,CAAC;;AAExE;AACA;AACA;AACA,MAAMuE,aAA+B,GAAG,IAAInE,gBAAgB,CAC1DH,oBAAoB,CACrB;AAED,SAASmE,QAAQ,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverFetch.js","names":["getBasePath","FetchException","serverFetch","args","urlNoBase","url","replace","params","data","dataFetcher","fetch","jsonData","JSON","parse","error","reject","resolve"],"sources":["../../../src/utils/fetch/serverFetch.js"],"sourcesContent":["// @flow\nimport { getBasePath } from \"../../constants/Settings\";\nimport { FetchException } from \"../../exceptions\";\n\nimport type { RequestOptions } from \"./types\";\n\n/**\n * Fetch data from server (uses nashorn and datafetcher).\n */\nexport default function serverFetch(args: RequestOptions): Promise<any> {\n // remove contextPath of url, when the request is internal the context path is not needed\n const urlNoBase = args.url.includes(\"http\")\n ? args.url\n : args.url.replace(getBasePath(), \"\");\n const params = args.params\n ? args.params.replace(\"includeContext=true\", \"\")\n : \"\";\n const url = params === \"\" ? urlNoBase : `${urlNoBase}?${params}`;\n\n const data = dataFetcher.fetch(url, args);\n\n try {\n const jsonData = JSON.parse(data);\n\n if (jsonData.error) {\n return Promise.reject(new FetchException(jsonData, null, args));\n }\n\n return Promise.resolve(jsonData);\n } catch (error) {\n return Promise.reject(error);\n }\n}\n"],"mappings":";;AACA,SAASA,WAAW,QAAQ,0BAA0B;AACtD,SAASC,cAAc,QAAQ,kBAAkB;AAIjD;AACA;AACA;AACA,eAAe,SAASC,
|
|
1
|
+
{"version":3,"file":"serverFetch.js","names":["getBasePath","FetchException","serverFetch","args","_context","urlNoBase","_includesInstanceProperty","url","call","replace","params","data","dataFetcher","fetch","jsonData","JSON","parse","error","_Promise","reject","resolve"],"sources":["../../../src/utils/fetch/serverFetch.js"],"sourcesContent":["// @flow\nimport { getBasePath } from \"../../constants/Settings\";\nimport { FetchException } from \"../../exceptions\";\n\nimport type { RequestOptions } from \"./types\";\n\n/**\n * Fetch data from server (uses nashorn and datafetcher).\n */\nexport default function serverFetch(args: RequestOptions): Promise<any> {\n // remove contextPath of url, when the request is internal the context path is not needed\n const urlNoBase = args.url.includes(\"http\")\n ? args.url\n : args.url.replace(getBasePath(), \"\");\n const params = args.params\n ? args.params.replace(\"includeContext=true\", \"\")\n : \"\";\n const url = params === \"\" ? urlNoBase : `${urlNoBase}?${params}`;\n\n const data = dataFetcher.fetch(url, args);\n\n try {\n const jsonData = JSON.parse(data);\n\n if (jsonData.error) {\n return Promise.reject(new FetchException(jsonData, null, args));\n }\n\n return Promise.resolve(jsonData);\n } catch (error) {\n return Promise.reject(error);\n }\n}\n"],"mappings":";;AACA,SAASA,WAAW,QAAQ,0BAA0B;AACtD,SAASC,cAAc,QAAQ,kBAAkB;AAIjD;AACA;AACA;AACA,eAAe,SAASC,WAAWA,CAACC,IAAoB,EAAgB;EAAA,IAAAC,QAAA;EACtE;EACA,MAAMC,SAAS,GAAGC,yBAAA,CAAAF,QAAA,GAAAD,IAAI,CAACI,GAAG,EAAAC,IAAA,CAAAJ,QAAA,EAAU,MAAM,CAAC,GACvCD,IAAI,CAACI,GAAG,GACRJ,IAAI,CAACI,GAAG,CAACE,OAAO,CAACT,WAAW,EAAE,EAAE,EAAE,CAAC;EACvC,MAAMU,MAAM,GAAGP,IAAI,CAACO,MAAM,GACtBP,IAAI,CAACO,MAAM,CAACD,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,GAC9C,EAAE;EACN,MAAMF,GAAG,GAAGG,MAAM,KAAK,EAAE,GAAGL,SAAS,GAAI,GAAEA,SAAU,IAAGK,MAAO,EAAC;EAEhE,MAAMC,IAAI,GAAGC,WAAW,CAACC,KAAK,CAACN,GAAG,EAAEJ,IAAI,CAAC;EAEzC,IAAI;IACF,MAAMW,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACL,IAAI,CAAC;IAEjC,IAAIG,QAAQ,CAACG,KAAK,EAAE;MAClB,OAAOC,QAAA,CAAQC,MAAM,CAAC,IAAIlB,cAAc,CAACa,QAAQ,EAAE,IAAI,EAAEX,IAAI,CAAC,CAAC;IACjE;IAEA,OAAOe,QAAA,CAAQE,OAAO,CAACN,QAAQ,CAAC;EAClC,CAAC,CAAC,OAAOG,KAAK,EAAE;IACd,OAAOC,QAAA,CAAQC,MAAM,CAACF,KAAK,CAAC;EAC9B;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"universalFetch.js","names":["isPlainObject","IS_SYNC","cacheContributions","serverFetch","xhr","Cache","IS_FETCHING","waitForCachedItem","cacheKey","TIMEOUT","CHECK_TIMEOUT","resolve","reject","check","getItem","cachedItem","Error","setTimeout","browserFetch","args","cache","createResourceKey","hasItem","cacheItem","addItem","then","response","universalFetch","locale","headers","includeContext","url"],"sources":["../../../src/utils/fetch/universalFetch.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../helpers/objects\";\n\nimport { IS_SYNC } from \"../../constants/Constants\";\nimport { cacheContributions } from \"../../constants\";\n\nimport serverFetch from \"./serverFetch\";\nimport xhr from \"./xhr\";\nimport Cache from \"../browser/Cache\";\n\nimport type { RequestOptions } from \"./types\";\n\ntype CachedResponse = any;\n\nconst IS_FETCHING = \"is-fetching\";\n\n/**\n * Checks each x ms if a cache item is set after fetching the item.\n * @private\n */\nconst waitForCachedItem = (cacheKey: string) => {\n let TIMEOUT = 3000;\n const CHECK_TIMEOUT = 100;\n\n return new Promise<CachedResponse>((resolve, reject) => {\n const check = () => {\n if (Cache.getItem(cacheKey) !== IS_FETCHING) {\n const cachedItem = Cache.getItem(cacheKey);\n if (cachedItem != null) {\n resolve(cachedItem);\n } else {\n reject(new Error(\"Empty cached item\"));\n }\n } else if (TIMEOUT <= 0) {\n reject(new Error(\"Empty cached item\"));\n } else {\n TIMEOUT = TIMEOUT - CHECK_TIMEOUT;\n setTimeout(check, CHECK_TIMEOUT);\n }\n };\n\n setTimeout(check, CHECK_TIMEOUT);\n });\n};\n\n/**\n * @private\n */\nconst browserFetch = (args: RequestOptions) => {\n if (cacheContributions() && args.cache) {\n const cacheKey = Cache.createResourceKey(args);\n\n if (Cache.hasItem(cacheKey)) {\n const cacheItem = Cache.getItem(cacheKey);\n\n if (cacheItem != null) {\n if (cacheItem === IS_FETCHING) {\n return waitForCachedItem(cacheKey);\n } else if (isPlainObject(cacheItem)) {\n return Promise.resolve(cacheItem);\n }\n }\n }\n\n Cache.addItem(cacheKey, IS_FETCHING);\n }\n\n return xhr(args).then((response) => {\n if (cacheContributions() && args.cache) {\n const cacheKey = Cache.createResourceKey(args);\n\n Cache.addItem(cacheKey, response);\n }\n\n return response;\n });\n};\n\n/**\n * Request data from server, uses server datafetcher or xhr in browser.\n */\nconst universalFetch = (\n args: RequestOptions\n): Promise<CachedResponse> | Promise<any> => {\n // Set locale as Accept-Language header\n if (args.locale) {\n args.headers = {\n \"Accept-Language\": args.locale,\n };\n }\n\n if (args.includeContext) {\n args.url = `${args.url}?includeContext=true`;\n }\n\n // server side no access to the browser cache apis, no cache available\n if (IS_SYNC) {\n return serverFetch(args);\n }\n\n return browserFetch(args);\n};\n\nexport default universalFetch;\n"],"mappings":";AACA,SAASA,aAAa,QAAQ,oBAAoB;AAElD,SAASC,OAAO,QAAQ,2BAA2B;AACnD,SAASC,kBAAkB,QAAQ,iBAAiB;AAEpD,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,GAAG,MAAM,OAAO;AACvB,OAAOC,KAAK,MAAM,kBAAkB;AAMpC,MAAMC,WAAW,GAAG,aAAa;;AAEjC;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAIC,QAAgB,IAAK;EAC9C,IAAIC,OAAO,GAAG,IAAI;EAClB,MAAMC,aAAa,GAAG,GAAG;EAEzB,OAAO,
|
|
1
|
+
{"version":3,"file":"universalFetch.js","names":["isPlainObject","IS_SYNC","cacheContributions","serverFetch","xhr","Cache","IS_FETCHING","waitForCachedItem","cacheKey","TIMEOUT","CHECK_TIMEOUT","_Promise","resolve","reject","check","getItem","cachedItem","Error","setTimeout","browserFetch","args","cache","createResourceKey","hasItem","cacheItem","addItem","then","response","universalFetch","locale","headers","includeContext","url"],"sources":["../../../src/utils/fetch/universalFetch.js"],"sourcesContent":["// @flow\nimport { isPlainObject } from \"../helpers/objects\";\n\nimport { IS_SYNC } from \"../../constants/Constants\";\nimport { cacheContributions } from \"../../constants\";\n\nimport serverFetch from \"./serverFetch\";\nimport xhr from \"./xhr\";\nimport Cache from \"../browser/Cache\";\n\nimport type { RequestOptions } from \"./types\";\n\ntype CachedResponse = any;\n\nconst IS_FETCHING = \"is-fetching\";\n\n/**\n * Checks each x ms if a cache item is set after fetching the item.\n * @private\n */\nconst waitForCachedItem = (cacheKey: string) => {\n let TIMEOUT = 3000;\n const CHECK_TIMEOUT = 100;\n\n return new Promise<CachedResponse>((resolve, reject) => {\n const check = () => {\n if (Cache.getItem(cacheKey) !== IS_FETCHING) {\n const cachedItem = Cache.getItem(cacheKey);\n if (cachedItem != null) {\n resolve(cachedItem);\n } else {\n reject(new Error(\"Empty cached item\"));\n }\n } else if (TIMEOUT <= 0) {\n reject(new Error(\"Empty cached item\"));\n } else {\n TIMEOUT = TIMEOUT - CHECK_TIMEOUT;\n setTimeout(check, CHECK_TIMEOUT);\n }\n };\n\n setTimeout(check, CHECK_TIMEOUT);\n });\n};\n\n/**\n * @private\n */\nconst browserFetch = (args: RequestOptions) => {\n if (cacheContributions() && args.cache) {\n const cacheKey = Cache.createResourceKey(args);\n\n if (Cache.hasItem(cacheKey)) {\n const cacheItem = Cache.getItem(cacheKey);\n\n if (cacheItem != null) {\n if (cacheItem === IS_FETCHING) {\n return waitForCachedItem(cacheKey);\n } else if (isPlainObject(cacheItem)) {\n return Promise.resolve(cacheItem);\n }\n }\n }\n\n Cache.addItem(cacheKey, IS_FETCHING);\n }\n\n return xhr(args).then((response) => {\n if (cacheContributions() && args.cache) {\n const cacheKey = Cache.createResourceKey(args);\n\n Cache.addItem(cacheKey, response);\n }\n\n return response;\n });\n};\n\n/**\n * Request data from server, uses server datafetcher or xhr in browser.\n */\nconst universalFetch = (\n args: RequestOptions\n): Promise<CachedResponse> | Promise<any> => {\n // Set locale as Accept-Language header\n if (args.locale) {\n args.headers = {\n \"Accept-Language\": args.locale,\n };\n }\n\n if (args.includeContext) {\n args.url = `${args.url}?includeContext=true`;\n }\n\n // server side no access to the browser cache apis, no cache available\n if (IS_SYNC) {\n return serverFetch(args);\n }\n\n return browserFetch(args);\n};\n\nexport default universalFetch;\n"],"mappings":";AACA,SAASA,aAAa,QAAQ,oBAAoB;AAElD,SAASC,OAAO,QAAQ,2BAA2B;AACnD,SAASC,kBAAkB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