@beinformed/ui 1.45.0 → 1.45.1
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 +7 -0
- package/esm/builder/index.js.map +1 -1
- package/esm/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/esm/constants/Constants.js.map +1 -1
- package/esm/constants/LayoutHintConfig.js.map +1 -1
- package/esm/constants/LayoutHints.js.map +1 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/constants/index.js.map +1 -1
- package/esm/exceptions/ConfigurationException.js.map +1 -1
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/IllegalArgumentException.js.map +1 -1
- package/esm/exceptions/IllegalReturnException.js.map +1 -1
- package/esm/exceptions/IllegalStateException.js.map +1 -1
- package/esm/exceptions/JsonParseException.js.map +1 -1
- package/esm/exceptions/MissingPropertyException.js.map +1 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/NotAllowedUriException.js.map +1 -1
- package/esm/exceptions/NotFoundException.js.map +1 -1
- package/esm/exceptions/ServerRequestException.js.map +1 -1
- package/esm/exceptions/ThemePropertyException.js.map +1 -1
- package/esm/exceptions/TimeoutException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
- package/esm/exceptions/index.js.map +1 -1
- package/esm/hooks/index.js.map +1 -1
- package/esm/hooks/useAllFormsOnModel.js.map +1 -1
- package/esm/hooks/useAuthentication.js.map +1 -1
- package/esm/hooks/useContent.js.map +1 -1
- package/esm/hooks/useDeepCompareEffect.js.map +1 -1
- package/esm/hooks/useForm.js.map +1 -1
- package/esm/hooks/useI18n.js.map +1 -1
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModels.js.map +1 -1
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/hooks/useModularUIModel.js.map +1 -1
- package/esm/hooks/useModularUIRequest.js.map +1 -1
- package/esm/hooks/useNotification.js.map +1 -1
- package/esm/hooks/usePreference.js.map +1 -1
- package/esm/hooks/useProgressIndicator.js.map +1 -1
- package/esm/hooks/useRouter.js.map +1 -1
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/index.js.map +1 -1
- package/esm/i18n/languages.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/esm/i18n/types.js.map +1 -1
- package/esm/i18n/withMessage.js.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js +12 -2
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeModel.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js.map +1 -1
- package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeChildCollection.js.map +1 -1
- package/esm/models/attributes/CompositeAttributeModel.js.map +1 -1
- package/esm/models/attributes/DatetimeAttributeModel.js.map +1 -1
- package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/esm/models/attributes/LabelAttributeModel.js.map +1 -1
- package/esm/models/attributes/MemoAttributeModel.js.map +1 -1
- package/esm/models/attributes/MoneyAttributeModel.js.map +1 -1
- package/esm/models/attributes/NumberAttributeModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/StringAttributeModel.js.map +1 -1
- package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
- package/esm/models/attributes/XMLAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js.map +1 -1
- package/esm/models/attributes/input-constraints/BSNConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/FileSizeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/IBANConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RangeConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/RegexConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/StringLengthConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/XMLConstraint.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.js.map +1 -1
- package/esm/models/base/BaseCollection.js.map +1 -1
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceCollection.js.map +1 -1
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptIndexModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
- package/esm/models/concepts/ConceptTypeDetailModel.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentIndexModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/content/ContentTypeModel.js.map +1 -1
- package/esm/models/content/SectionModel.js.map +1 -1
- package/esm/models/content/SubSectionModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfiguration.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationResults.js.map +1 -1
- package/esm/models/detail/DetailModel.js.map +1 -1
- package/esm/models/error/ErrorCollection.js.map +1 -1
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/error/ErrorResponse.js.map +1 -1
- package/esm/models/filters/AssignmentFilterModel.js.map +1 -1
- package/esm/models/filters/BaseFilterModel.js.map +1 -1
- package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/filters/FilterModel.js.map +1 -1
- package/esm/models/filters/RangeFilterModel.js.map +1 -1
- package/esm/models/filters/StringFilterModel.js.map +1 -1
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js.map +1 -1
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/href/ListHref.js.map +1 -1
- package/esm/models/index.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/links/LinkModel.js.map +1 -1
- package/esm/models/links/normalizeLinkJSON.js.map +1 -1
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListHeaderModel.js.map +1 -1
- package/esm/models/list/ListItemCollection.js.map +1 -1
- package/esm/models/list/ListItemModel.js.map +1 -1
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js.map +1 -1
- package/esm/models/lookup/LookupOptionsModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCatalogModel.js.map +1 -1
- package/esm/models/paging/PagesizeModel.js.map +1 -1
- package/esm/models/paging/PagingModel.js.map +1 -1
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/models/parameter/Parameter.js.map +1 -1
- package/esm/models/process/ProcessStatusSettingsModel.js.map +1 -1
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/search/CaseSearchModel.js.map +1 -1
- package/esm/models/sorting/SortOptionModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/tab/TabModel.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
- package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
- package/esm/models/types.js.map +1 -1
- package/esm/models/user/UserModel.js.map +1 -1
- package/esm/models/user/UserProfileModel.js.map +1 -1
- package/esm/models/user/UserServicesModel.js.map +1 -1
- package/esm/modularui/Authenticate.js.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/modularui/index.js.map +1 -1
- package/esm/modularui/types.js.map +1 -1
- package/esm/react/ErrorBoundary.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.js +2 -1
- package/esm/react/ErrorBoundaryFallback.js.map +1 -1
- package/esm/react/index.js.map +1 -1
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/Init.js.map +1 -1
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-client/contextPath.js.map +1 -1
- package/esm/react-client/index.js.map +1 -1
- package/esm/react-client/rehydrate.js.map +1 -1
- package/esm/react-server/contextPath.js.map +1 -1
- package/esm/react-server/createSSRComplete.js.map +1 -1
- package/esm/react-server/htmlpage.js.map +1 -1
- package/esm/react-server/index.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverNoSSR.js.map +1 -1
- package/esm/react-server/serverSSR.js.map +1 -1
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/ThemeProvider.js.map +1 -1
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/index.js.map +1 -1
- package/esm/react-theme/types.js.map +1 -1
- package/esm/react-theme/useTheme.js.map +1 -1
- package/esm/react-theme/utils/background.js.map +1 -1
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/I18nActions.js.map +1 -1
- package/esm/redux/_i18n/I18nReducer.js.map +1 -1
- package/esm/redux/_i18n/index.js.map +1 -1
- package/esm/redux/_i18n/types.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/index.js.map +1 -1
- package/esm/redux/_modularui/types.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/RouterActions.js.map +1 -1
- package/esm/redux/_router/RouterConnectors.js.map +1 -1
- package/esm/redux/_router/RouterMiddleware.js.map +1 -1
- package/esm/redux/_router/RouterReducer.js.map +1 -1
- package/esm/redux/_router/index.js.map +1 -1
- package/esm/redux/_router/types.js.map +1 -1
- package/esm/redux/actions/Application.js.map +1 -1
- package/esm/redux/actions/Authorization.js.map +1 -1
- package/esm/redux/actions/Error.js.map +1 -1
- package/esm/redux/actions/Form.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/esm/redux/actions/FormAutosave.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/FormValidations.js.map +1 -1
- package/esm/redux/actions/Modals.js.map +1 -1
- package/esm/redux/actions/Notification.js.map +1 -1
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/actions/ProgressIndicator.js.map +1 -1
- package/esm/redux/actions/SignIn.js.map +1 -1
- package/esm/redux/actions/SignOut.js.map +1 -1
- package/esm/redux/actions/index.js.map +1 -1
- package/esm/redux/connectors/Application.js.map +1 -1
- package/esm/redux/connectors/Breadcrumb.js.map +1 -1
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/Modal.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/Notification.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/Preferences.js.map +1 -1
- package/esm/redux/connectors/Progress.js.map +1 -1
- package/esm/redux/connectors/ProgressIndicator.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/SignIn.js.map +1 -1
- package/esm/redux/connectors/SignOut.js.map +1 -1
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/connectors/index.js.map +1 -1
- package/esm/redux/index.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/reducers/createReducer.js.map +1 -1
- package/esm/redux/reducers/index.js.map +1 -1
- package/esm/redux/selectors/i18n.js.map +1 -1
- package/esm/redux/selectors/index.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/redux/types.js.map +1 -1
- package/esm/utils/browser/Cache.js.map +1 -1
- package/esm/utils/browser/Cookies.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/esm/utils/fetch/serverFetch.js.map +1 -1
- package/esm/utils/fetch/types.js.map +1 -1
- package/esm/utils/fetch/universalFetch.js.map +1 -1
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/checkResource.js.map +1 -1
- package/esm/utils/helpers/createHash.js.map +1 -1
- package/esm/utils/helpers/createHref.js.map +1 -1
- package/esm/utils/helpers/createUUID.js.map +1 -1
- package/esm/utils/helpers/index.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/helpers/text.js.map +1 -1
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/number/DecimalFormat.js.map +1 -1
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/builder/index.js.map +1 -1
- package/lib/builder/mergeLayoutHintConfigurations.js.map +1 -1
- package/lib/constants/Constants.js.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 +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 +1 -1
- package/lib/i18n/index.js.map +1 -1
- package/lib/i18n/languages.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_en.nl.js.map +1 -1
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.js.map +1 -1
- package/lib/i18n/types.js.map +1 -1
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js +12 -2
- package/lib/models/attributes/AttributeDataHelper.js.flow +14 -2
- 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/__tests__/AttributeDataHelper.spec.js.flow +85 -0
- 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/filters/StringFilterModel.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 +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/types.js.map +1 -1
- package/lib/models/user/UserModel.js.map +1 -1
- package/lib/models/user/UserProfileModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/Authenticate.js.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/modularui/types.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.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/contextPath.js.map +1 -1
- package/lib/react-server/createSSRComplete.js.map +1 -1
- package/lib/react-server/htmlpage.js.map +1 -1
- package/lib/react-server/index.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js +1 -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/types.js.map +1 -1
- package/lib/react-theme/useTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/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/_i18n/types.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/types.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/_router/types.js.map +1 -1
- package/lib/redux/actions/Application.js.map +1 -1
- package/lib/redux/actions/Authorization.js.map +1 -1
- package/lib/redux/actions/Error.js.map +1 -1
- package/lib/redux/actions/Form.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAttributeSetRepeatable.js.map +1 -1
- package/lib/redux/actions/FormAutosave.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/FormValidations.js.map +1 -1
- package/lib/redux/actions/Modals.js.map +1 -1
- package/lib/redux/actions/Notification.js.map +1 -1
- package/lib/redux/actions/Preferences.js.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/redux/types.js.map +1 -1
- package/lib/utils/browser/Cache.js.map +1 -1
- package/lib/utils/browser/Cookies.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/serverFetch.js.map +1 -1
- package/lib/utils/fetch/types.js.map +1 -1
- package/lib/utils/fetch/universalFetch.js.map +1 -1
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/checkResource.js.map +1 -1
- package/lib/utils/helpers/createHash.js.map +1 -1
- package/lib/utils/helpers/createHref.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 +1 -1
- package/src/models/attributes/AttributeDataHelper.js +14 -2
- package/src/models/attributes/__tests__/AttributeDataHelper.spec.js +85 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressIndicator.js","names":["_reactRedux","require","mapStateToProps","state","count","progressindicator","timestamp","percentComplete","connectProgressIndicator","exports","connect"],"sources":["../../../src/redux/connectors/ProgressIndicator.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { ReduxState } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n count: number,\n timestamp: number,\n percentComplete: number,\n};\n\ntype Props = {\n ...StateProps,\n ...\n};\n\n/**\n */\nconst mapStateToProps = (state: ReduxState) => ({\n count: state.progressindicator.count,\n timestamp: state.progressindicator.timestamp,\n percentComplete: state.progressindicator.percentComplete,\n});\n\n/**\n */\nexport const connectProgressIndicator: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n void,\n>(mapStateToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAgBA;AACA;AACA,MAAMC,eAAe,GAAIC,KAAiB,KAAM;EAC9CC,KAAK,EAAED,KAAK,CAACE,iBAAiB,CAACD,KAAK;EACpCE,SAAS,EAAEH,KAAK,CAACE,iBAAiB,CAACC,SAAS;EAC5CC,eAAe,EAAEJ,KAAK,CAACE,iBAAiB,CAACE;AAC3C,CAAC,CAAC;;AAEF;AACA;AACO,MAAMC,wBAA4C,GAAAC,OAAA,CAAAD,wBAAA,GAAG,IAAAE,mBAAO,EAOjER,eAAe,CAAC"
|
|
1
|
+
{"version":3,"file":"ProgressIndicator.js","names":["_reactRedux","require","mapStateToProps","state","count","progressindicator","timestamp","percentComplete","connectProgressIndicator","exports","connect"],"sources":["../../../src/redux/connectors/ProgressIndicator.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport type { ReduxState } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n count: number,\n timestamp: number,\n percentComplete: number,\n};\n\ntype Props = {\n ...StateProps,\n ...\n};\n\n/**\n */\nconst mapStateToProps = (state: ReduxState) => ({\n count: state.progressindicator.count,\n timestamp: state.progressindicator.timestamp,\n percentComplete: state.progressindicator.percentComplete,\n});\n\n/**\n */\nexport const connectProgressIndicator: ComponentType<any> = connect<\n Props,\n {},\n _,\n _,\n _,\n void,\n>(mapStateToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAgBA;AACA;AACA,MAAMC,eAAe,GAAIC,KAAiB,KAAM;EAC9CC,KAAK,EAAED,KAAK,CAACE,iBAAiB,CAACD,KAAK;EACpCE,SAAS,EAAEH,KAAK,CAACE,iBAAiB,CAACC,SAAS;EAC5CC,eAAe,EAAEJ,KAAK,CAACE,iBAAiB,CAACE;AAC3C,CAAC,CAAC;;AAEF;AACA;AACO,MAAMC,wBAA4C,GAAAC,OAAA,CAAAD,wBAAA,GAAG,IAAAE,mBAAO,EAOjER,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickSearch.js","names":["_redux","require","_reactRedux","_ModularUIConnector","_interopRequireDefault","_RouterActions","_Href","mapDispatchToProps","push","connectQuickSearch","exports","compose","connect","modularui","_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,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAYA,MAAMM,kBAAiC,GAAG;EACxCC,IAAI,EAAJA;AACF,CAAC;;AAED;AACA;AACO,MAAMC,kBAEmB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,cAAO,EACxC,IAAAC,mBAAO,EAA8B,IAAI,EAAEL,kBAAkB,CAAC,EAC9D,IAAAM,2BAAS,EAAC,aAAa,EAAEC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAAE;EAC3CC,QAAQ,EAAE;AACZ,CAAC,CACH,CAAC"
|
|
1
|
+
{"version":3,"file":"QuickSearch.js","names":["_redux","require","_reactRedux","_ModularUIConnector","_interopRequireDefault","_RouterActions","_Href","mapDispatchToProps","push","connectQuickSearch","exports","compose","connect","modularui","_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,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAKA,IAAAK,KAAA,GAAAF,sBAAA,CAAAH,OAAA;AAYA,MAAMM,kBAAiC,GAAG;EACxCC,IAAI,EAAJA;AACF,CAAC;;AAED;AACA;AACO,MAAMC,kBAEmB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,cAAO,EACxC,IAAAC,mBAAO,EAA8B,IAAI,EAAEL,kBAAkB,CAAC,EAC9D,IAAAM,2BAAS,EAAC,aAAa,EAAEC,IAAA;EAAA,IAAC;IAAEC;EAAK,CAAC,GAAAD,IAAA;EAAA,OAAKC,IAAI;AAAA,GAAE;EAC3CC,QAAQ,EAAE;AACZ,CAAC,CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignIn.js","names":["_reactRedux","require","_SignIn","_ModularUISelectors","mapStateToProps","state","application","getApplication","isAuthenticated","isLoggedIn","errorMessage","auth","error","mapDispatchToProps","onSubmit","login","connectSignIn","exports","connect"],"sources":["../../../src/redux/connectors/SignIn.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { login } from \"../actions/SignIn\";\n\nimport { getApplication } from \"../_modularui/ModularUISelectors\";\n\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n isAuthenticated: boolean,\n errorMessage: ?string,\n};\n\ntype DispatchProps = {\n onSubmit: (username: string, password: string) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const application = getApplication(state);\n\n return {\n isAuthenticated: application?.isLoggedIn ?? false,\n errorMessage: state.auth.error,\n };\n};\n\nconst mapDispatchToProps: DispatchProps = {\n onSubmit: login,\n};\n\n/**\n */\nexport const connectSignIn: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AAmBA,MAAMG,eAAe,GAAIC,KAAiB,IAAiB;EACzD,MAAMC,WAAW,GAAG,IAAAC,kCAAc,EAACF,KAAK,CAAC;EAEzC,OAAO;IACLG,eAAe,EAAEF,WAAW,EAAEG,UAAU,IAAI,KAAK;IACjDC,YAAY,EAAEL,KAAK,CAACM,IAAI,CAACC;EAC3B,CAAC;AACH,CAAC;AAED,MAAMC,kBAAiC,GAAG;EACxCC,QAAQ,EAAEC;AACZ,CAAC;;AAED;AACA;AACO,MAAMC,aAAiC,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,mBAAO,EAOtDd,eAAe,EAAES,kBAAkB,CAAC"
|
|
1
|
+
{"version":3,"file":"SignIn.js","names":["_reactRedux","require","_SignIn","_ModularUISelectors","mapStateToProps","state","application","getApplication","isAuthenticated","isLoggedIn","errorMessage","auth","error","mapDispatchToProps","onSubmit","login","connectSignIn","exports","connect"],"sources":["../../../src/redux/connectors/SignIn.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { login } from \"../actions/SignIn\";\n\nimport { getApplication } from \"../_modularui/ModularUISelectors\";\n\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ComponentType } from \"react\";\n\ntype StateProps = {\n isAuthenticated: boolean,\n errorMessage: ?string,\n};\n\ntype DispatchProps = {\n onSubmit: (username: string, password: string) => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => {\n const application = getApplication(state);\n\n return {\n isAuthenticated: application?.isLoggedIn ?? false,\n errorMessage: state.auth.error,\n };\n};\n\nconst mapDispatchToProps: DispatchProps = {\n onSubmit: login,\n};\n\n/**\n */\nexport const connectSignIn: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AAmBA,MAAMG,eAAe,GAAIC,KAAiB,IAAiB;EACzD,MAAMC,WAAW,GAAG,IAAAC,kCAAc,EAACF,KAAK,CAAC;EAEzC,OAAO;IACLG,eAAe,EAAEF,WAAW,EAAEG,UAAU,IAAI,KAAK;IACjDC,YAAY,EAAEL,KAAK,CAACM,IAAI,CAACC;EAC3B,CAAC;AACH,CAAC;AAED,MAAMC,kBAAiC,GAAG;EACxCC,QAAQ,EAAEC;AACZ,CAAC;;AAED;AACA;AACO,MAAMC,aAAiC,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,mBAAO,EAOtDd,eAAe,EAAES,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignOut.js","names":["_reactRedux","require","_SignOut","_modularui","mapStateToProps","state","isAuthenticated","getApplication","isLoggedIn","mapDispatchToProps","doLogout","logout","connectSignOut","exports","connect"],"sources":["../../../src/redux/connectors/SignOut.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { logout } from \"../actions/SignOut\";\n\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ComponentType } from \"react\";\nimport { getApplication } from \"../_modularui\";\n\ntype StateProps = {\n isAuthenticated: boolean,\n};\n\ntype DispatchProps = {\n doLogout: () => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n isAuthenticated: getApplication(state)?.isLoggedIn ?? false,\n});\n\nconst mapDispatchToProps = { doLogout: logout };\n\n/**\n */\nexport const connectSignOut: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAIA,IAAAE,UAAA,GAAAF,OAAA;AAeA,MAAMG,eAAe,GAAIC,KAAiB,KAAkB;EAC1DC,eAAe,EAAE,IAAAC,yBAAc,EAACF,KAAK,CAAC,EAAEG,UAAU,IAAI;AACxD,CAAC,CAAC;AAEF,MAAMC,kBAAkB,GAAG;EAAEC,QAAQ,EAAEC;AAAO,CAAC;;AAE/C;AACA;AACO,MAAMC,cAAkC,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,mBAAO,EAOvDV,eAAe,EAAEK,kBAAkB,CAAC"
|
|
1
|
+
{"version":3,"file":"SignOut.js","names":["_reactRedux","require","_SignOut","_modularui","mapStateToProps","state","isAuthenticated","getApplication","isLoggedIn","mapDispatchToProps","doLogout","logout","connectSignOut","exports","connect"],"sources":["../../../src/redux/connectors/SignOut.js"],"sourcesContent":["// @flow\nimport { connect } from \"react-redux\";\n\nimport { logout } from \"../actions/SignOut\";\n\nimport type { ReduxState, ThunkAction } from \"../types\";\nimport type { ComponentType } from \"react\";\nimport { getApplication } from \"../_modularui\";\n\ntype StateProps = {\n isAuthenticated: boolean,\n};\n\ntype DispatchProps = {\n doLogout: () => ThunkAction,\n};\n\ntype Props = {\n ...StateProps,\n ...DispatchProps,\n};\n\nconst mapStateToProps = (state: ReduxState): StateProps => ({\n isAuthenticated: getApplication(state)?.isLoggedIn ?? false,\n});\n\nconst mapDispatchToProps = { doLogout: logout };\n\n/**\n */\nexport const connectSignOut: ComponentType<any> = connect<\n Props,\n {},\n StateProps,\n _,\n _,\n _,\n>(mapStateToProps, mapDispatchToProps);\n"],"mappings":";;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAIA,IAAAE,UAAA,GAAAF,OAAA;AAeA,MAAMG,eAAe,GAAIC,KAAiB,KAAkB;EAC1DC,eAAe,EAAE,IAAAC,yBAAc,EAACF,KAAK,CAAC,EAAEG,UAAU,IAAI;AACxD,CAAC,CAAC;AAEF,MAAMC,kBAAkB,GAAG;EAAEC,QAAQ,EAAEC;AAAO,CAAC;;AAE/C;AACA;AACO,MAAMC,cAAkC,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,mBAAO,EAOvDV,eAAe,EAAEK,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectTab","exports","modularui","_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,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,UAA8B,GAAAC,OAAA,CAAAD,UAAA,GAAG,IAAAE,2BAAS,EACrD,KAAK,EACLC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC"
|
|
1
|
+
{"version":3,"file":"Tab.js","names":["_ModularUIConnector","_interopRequireDefault","require","connectTab","exports","modularui","_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,IAAAA,mBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA;AACA;AACO,MAAMC,UAA8B,GAAAC,OAAA,CAAAD,UAAA,GAAG,IAAAE,2BAAS,EACrD,KAAK,EACLC,IAAA;EAAA,IAAC;IAAEC;EAAM,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,GAAG;AAAA,GACxB;EACEC,QAAQ,EAAE;AACZ,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_Application","require","_Breadcrumb","_CaseView","_ConceptDetail","_ContentBrowser","_ContentDetail","_ContentDetailSection","_Form","_FormAttributeSet","_ListDetail","_Modal","_ModelCatalog","_Notification","_PanelRenderer","_Preferences","_Progress","_ProgressIndicator","_QuickSearch","_SignIn","_SignOut","_Tab"],"sources":["../../../src/redux/connectors/index.js"],"sourcesContent":["// @flow\nexport { connectApplication } from \"./Application\";\nexport { connectBreadcrumb } from \"./Breadcrumb\";\nexport { connectCaseView } from \"./CaseView\";\nexport { connectConceptDetail } from \"./ConceptDetail\";\nexport { connectContentBrowser } from \"./ContentBrowser\";\nexport { connectContentDetail } from \"./ContentDetail\";\nexport { connectContentDetailSection } from \"./ContentDetailSection\";\nexport { connectForm } from \"./Form\";\nexport { connectFormAttributeSet } from \"./FormAttributeSet\";\nexport { connectListDetail } from \"./ListDetail\";\nexport { connectModal } from \"./Modal\";\nexport { connectModelCatalog } from \"./ModelCatalog\";\nexport { connectNotification } from \"./Notification\";\nexport { connectPanel } from \"./PanelRenderer\";\nexport { connectPreferences } from \"./Preferences\";\nexport { connectProgress } from \"./Progress\";\nexport { connectProgressIndicator } from \"./ProgressIndicator\";\nexport { connectQuickSearch } from \"./QuickSearch\";\nexport { connectSignIn } from \"./SignIn\";\nexport { connectSignOut } from \"./SignOut\";\nexport { connectTab } from \"./Tab\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,cAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,SAAA,GAAAf,OAAA;AACA,IAAAgB,kBAAA,GAAAhB,OAAA;AACA,IAAAiB,YAAA,GAAAjB,OAAA;AACA,IAAAkB,OAAA,GAAAlB,OAAA;AACA,IAAAmB,QAAA,GAAAnB,OAAA;AACA,IAAAoB,IAAA,GAAApB,OAAA"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_Application","require","_Breadcrumb","_CaseView","_ConceptDetail","_ContentBrowser","_ContentDetail","_ContentDetailSection","_Form","_FormAttributeSet","_ListDetail","_Modal","_ModelCatalog","_Notification","_PanelRenderer","_Preferences","_Progress","_ProgressIndicator","_QuickSearch","_SignIn","_SignOut","_Tab"],"sources":["../../../src/redux/connectors/index.js"],"sourcesContent":["// @flow\nexport { connectApplication } from \"./Application\";\nexport { connectBreadcrumb } from \"./Breadcrumb\";\nexport { connectCaseView } from \"./CaseView\";\nexport { connectConceptDetail } from \"./ConceptDetail\";\nexport { connectContentBrowser } from \"./ContentBrowser\";\nexport { connectContentDetail } from \"./ContentDetail\";\nexport { connectContentDetailSection } from \"./ContentDetailSection\";\nexport { connectForm } from \"./Form\";\nexport { connectFormAttributeSet } from \"./FormAttributeSet\";\nexport { connectListDetail } from \"./ListDetail\";\nexport { connectModal } from \"./Modal\";\nexport { connectModelCatalog } from \"./ModelCatalog\";\nexport { connectNotification } from \"./Notification\";\nexport { connectPanel } from \"./PanelRenderer\";\nexport { connectPreferences } from \"./Preferences\";\nexport { connectProgress } from \"./Progress\";\nexport { connectProgressIndicator } from \"./ProgressIndicator\";\nexport { connectQuickSearch } from \"./QuickSearch\";\nexport { connectSignIn } from \"./SignIn\";\nexport { connectSignOut } from \"./SignOut\";\nexport { connectTab } from \"./Tab\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,cAAA,GAAAb,OAAA;AACA,IAAAc,YAAA,GAAAd,OAAA;AACA,IAAAe,SAAA,GAAAf,OAAA;AACA,IAAAgB,kBAAA,GAAAhB,OAAA;AACA,IAAAiB,YAAA,GAAAjB,OAAA;AACA,IAAAkB,OAAA,GAAAlB,OAAA;AACA,IAAAmB,QAAA,GAAAnB,OAAA;AACA,IAAAoB,IAAA,GAAApB,OAAA"}
|
package/lib/redux/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_index","require","_Object$keys","forEach","key","Object","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_index2","_index3","_configureStore","_interopRequireDefault","_index4","_index5","_index6","_index7"],"sources":["../../src/redux/index.js"],"sourcesContent":["// @flow\n\n// ROUTER\nexport * from \"./_router/index\";\n\n// I18N\nexport * from \"./_i18n/index\";\n\n// MODULAR UI\nexport * from \"./_modularui/index\";\n\n// STORE\nexport { default as configureStore } from \"./store/configureStore\";\n\n// ACTIONS\nexport * from \"./actions/index\";\n\n// CONNECTORS\nexport * from \"./connectors/index\";\n\n// REDUCERS\nexport * from \"./reducers/index\";\n\n// SELECTORS\nexport * from \"./selectors/index\";\n\nexport type * from \"./types\";\n"],"mappings":";;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GA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,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,OAAA,CAAAhB,GAAA;IAAA;EAAA;AAAA;AAGA,IAAAiB,OAAA,GAAApB,OAAA;AAAAC,YAAA,CAAAmB,OAAA,EAAAlB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAL,GAAA;EAAA,IAAAA,GAAA,IAAAM,OAAA,IAAAA,OAAA,CAAAN,GAAA,MAAAiB,OAAA,CAAAjB,GAAA;EAAAC,MAAA,CAAAM,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,OAAA,CAAAjB,GAAA;IAAA;EAAA;AAAA"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_index","require","_Object$keys","forEach","key","Object","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_index2","_index3","_configureStore","_interopRequireDefault","_index4","_index5","_index6","_index7"],"sources":["../../src/redux/index.js"],"sourcesContent":["// @flow\n\n// ROUTER\nexport * from \"./_router/index\";\n\n// I18N\nexport * from \"./_i18n/index\";\n\n// MODULAR UI\nexport * from \"./_modularui/index\";\n\n// STORE\nexport { default as configureStore } from \"./store/configureStore\";\n\n// ACTIONS\nexport * from \"./actions/index\";\n\n// CONNECTORS\nexport * from \"./connectors/index\";\n\n// REDUCERS\nexport * from \"./reducers/index\";\n\n// SELECTORS\nexport * from \"./selectors/index\";\n\nexport type * from \"./types\";\n"],"mappings":";;;;;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAA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OAAAO,OAAA,CAAAhB,GAAA;IAAA;EAAA;AAAA;AAGA,IAAAiB,OAAA,GAAApB,OAAA;AAAAC,YAAA,CAAAmB,OAAA,EAAAlB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAL,GAAA;EAAA,IAAAA,GAAA,IAAAM,OAAA,IAAAA,OAAA,CAAAN,GAAA,MAAAiB,OAAA,CAAAjB,GAAA;EAAAC,MAAA,CAAAM,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,OAAA,CAAAjB,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthReducer.js","names":["initialState","mustChangePassword","error","AuthReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"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;EAChB;AACF,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,WAAW"
|
|
1
|
+
{"version":3,"file":"AuthReducer.js","names":["initialState","mustChangePassword","error","AuthReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"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;EAChB;AACF,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorReducer.js","names":["initialState","ErrorReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"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;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,YAAY"
|
|
1
|
+
{"version":3,"file":"ErrorReducer.js","names":["initialState","ErrorReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"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;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalsReducer.js","names":["showModal","state","modalKey","_context","_map","default","modals","call","modal","visible","key","closeModal","_context2","_context3","_filter","idx","arr","length","initialState","ModalsReducer","arguments","undefined","action","type","payload","_default","exports"],"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,GAAG,IAAAC,IAAA,CAAAC,OAAA,EAAAF,QAAA,GAAAF,KAAK,CAACK,MAAM,EAAAC,IAAA,CAAAJ,QAAA,EAAMK,KAAK,KAAM;IAC9B,GAAGA,KAAK;IACRC,OAAO,EAAE;EACX,CAAC,CAAC,CAAC,EACH;IACEC,GAAG,EAAER,QAAQ;IACbO,OAAO,EAAE;EACX,CAAC,CACF;AAAA;AAED,MAAME,UAAU,GAAGA,CAACV,KAAkB,EAAEC,QAAgB;EAAA,IAAAU,SAAA,EAAAC,SAAA;EAAA,OACtD,IAAAT,IAAA,CAAAC,OAAA,EAAAO,SAAA,OAAAE,OAAA,CAAAT,OAAA,EAAAQ,SAAA,GAAAZ,KAAK,CAACK,MAAM,EAAAC,IAAA,CAAAM,SAAA,EACDL,KAAK,IAAKA,KAAK,CAACE,GAAG,KAAKR,QAAQ,CAAC,EAAAK,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,IAFHlB,KAAK,GAAAmB,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,OAAOrB,KAAK;EACd;EAEA,QAAQqB,MAAM,CAACC,IAAI;IACjB,KAAK,YAAY;MACf,OAAO;QACL,GAAGtB,KAAK;QACRK,MAAM,EAAEN,SAAS,CAACC,KAAK,EAAEqB,MAAM,CAACE,OAAO;MACzC,CAAC;IAEH,KAAK,aAAa;MAChB,OAAO;QACL,GAAGvB,KAAK;QACRK,MAAM,EAAEK,UAAU,CAACV,KAAK,EAAEqB,MAAM,CAACE,OAAO;MAC1C,CAAC;IAEH;MACE,OAAOvB,KAAK;EAChB;AACF,CAAC;AAAC,IAAAwB,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEac,aAAa"
|
|
1
|
+
{"version":3,"file":"ModalsReducer.js","names":["showModal","state","modalKey","_context","_map","default","modals","call","modal","visible","key","closeModal","_context2","_context3","_filter","idx","arr","length","initialState","ModalsReducer","arguments","undefined","action","type","payload","_default","exports"],"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,GAAG,IAAAC,IAAA,CAAAC,OAAA,EAAAF,QAAA,GAAAF,KAAK,CAACK,MAAM,EAAAC,IAAA,CAAAJ,QAAA,EAAMK,KAAK,KAAM;IAC9B,GAAGA,KAAK;IACRC,OAAO,EAAE;EACX,CAAC,CAAC,CAAC,EACH;IACEC,GAAG,EAAER,QAAQ;IACbO,OAAO,EAAE;EACX,CAAC,CACF;AAAA;AAED,MAAME,UAAU,GAAGA,CAACV,KAAkB,EAAEC,QAAgB;EAAA,IAAAU,SAAA,EAAAC,SAAA;EAAA,OACtD,IAAAT,IAAA,CAAAC,OAAA,EAAAO,SAAA,OAAAE,OAAA,CAAAT,OAAA,EAAAQ,SAAA,GAAAZ,KAAK,CAACK,MAAM,EAAAC,IAAA,CAAAM,SAAA,EACDL,KAAK,IAAKA,KAAK,CAACE,GAAG,KAAKR,QAAQ,CAAC,EAAAK,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,IAFHlB,KAAK,GAAAmB,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,OAAOrB,KAAK;EACd;EAEA,QAAQqB,MAAM,CAACC,IAAI;IACjB,KAAK,YAAY;MACf,OAAO;QACL,GAAGtB,KAAK;QACRK,MAAM,EAAEN,SAAS,CAACC,KAAK,EAAEqB,MAAM,CAACE,OAAO;MACzC,CAAC;IAEH,KAAK,aAAa;MAChB,OAAO;QACL,GAAGvB,KAAK;QACRK,MAAM,EAAEK,UAAU,CAACV,KAAK,EAAEqB,MAAM,CAACE,OAAO;MAC1C,CAAC;IAEH;MACE,OAAOvB,KAAK;EAChB;AACF,CAAC;AAAC,IAAAwB,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEac,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationReducer.js","names":["initialState","render","messageType","message","error","NotificationReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"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;EAChB;AACF,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,mBAAmB"
|
|
1
|
+
{"version":3,"file":"NotificationReducer.js","names":["initialState","render","messageType","message","error","NotificationReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"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;EAChB;AACF,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreferencesReducer.js","names":["initialState","PreferencesReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"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;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,kBAAkB"
|
|
1
|
+
{"version":3,"file":"PreferencesReducer.js","names":["initialState","PreferencesReducer","state","arguments","length","undefined","action","type","payload","_default","exports","default"],"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;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaV,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","arguments","length","undefined","action","type","payload","_default","exports","default"],"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,CAAC,CAAC,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;EAChB;AACF,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaT,wBAAwB"
|
|
1
|
+
{"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","arguments","length","undefined","action","type","payload","_default","exports","default"],"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,CAAC,CAAC,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;EAChB;AACF,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaT,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReducer.js","names":["_RouterReducer","require","_ModularUIReducer","_I18nReducer","_ModalsReducer","_interopRequireDefault","_AuthReducer","_ErrorReducer","_NotificationReducer","_ProgressIndicatorReducer","_PreferencesReducer","createReducer","router","RouterReducer","modularui","ModularUIReducer","i18n","I18nReducer","auth","AuthReducer","error","ErrorReducer","modals","ModalsReducer","notification","NotificationReducer","progressindicator","ProgressIndicatorReducer","preferences","PreferencesReducer","exports"],"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,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,oBAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,yBAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,mBAAA,GAAAL,sBAAA,CAAAJ,OAAA;AA4BA;AACA;AACO,MAAMU,aAAa,GAAGA,CAAA,MAAiB;EAC5CC,MAAM,EAAEC,4BAAa;EACrBC,SAAS,EAAEC,kCAAgB;EAC3BC,IAAI,EAAEC,wBAAW;EACjBC,IAAI,EAAEC,oBAAW;EACjBC,KAAK,EAAEC,qBAAY;EACnBC,MAAM,EAAEC,sBAAa;EACrBC,YAAY,EAAEC,4BAAmB;EACjCC,iBAAiB,EAAEC,iCAAwB;EAC3CC,WAAW,EAAEC;AACf,CAAC,CAAC;AAACC,OAAA,CAAAnB,aAAA,GAAAA,aAAA"
|
|
1
|
+
{"version":3,"file":"createReducer.js","names":["_RouterReducer","require","_ModularUIReducer","_I18nReducer","_ModalsReducer","_interopRequireDefault","_AuthReducer","_ErrorReducer","_NotificationReducer","_ProgressIndicatorReducer","_PreferencesReducer","createReducer","router","RouterReducer","modularui","ModularUIReducer","i18n","I18nReducer","auth","AuthReducer","error","ErrorReducer","modals","ModalsReducer","notification","NotificationReducer","progressindicator","ProgressIndicatorReducer","preferences","PreferencesReducer","exports"],"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,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,aAAA,GAAAF,sBAAA,CAAAJ,OAAA;AACA,IAAAO,oBAAA,GAAAH,sBAAA,CAAAJ,OAAA;AACA,IAAAQ,yBAAA,GAAAJ,sBAAA,CAAAJ,OAAA;AACA,IAAAS,mBAAA,GAAAL,sBAAA,CAAAJ,OAAA;AA4BA;AACA;AACO,MAAMU,aAAa,GAAGA,CAAA,MAAiB;EAC5CC,MAAM,EAAEC,4BAAa;EACrBC,SAAS,EAAEC,kCAAgB;EAC3BC,IAAI,EAAEC,wBAAW;EACjBC,IAAI,EAAEC,oBAAW;EACjBC,KAAK,EAAEC,qBAAY;EACnBC,MAAM,EAAEC,sBAAa;EACrBC,YAAY,EAAEC,4BAAmB;EACjCC,iBAAiB,EAAEC,iCAAwB;EAC3CC,WAAW,EAAEC;AACf,CAAC,CAAC;AAACC,OAAA,CAAAnB,aAAA,GAAAA,aAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_createReducer","require","_Object$keys","forEach","key","Object","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_AuthReducer","_interopRequireDefault","_ErrorReducer","_ModalsReducer","_NotificationReducer","_PreferencesReducer","_ProgressIndicatorReducer"],"sources":["../../../src/redux/reducers/index.js"],"sourcesContent":["// @flow\nexport * from \"./createReducer\";\n\nexport { default as AuthReducer } from \"./AuthReducer\";\nexport { default as ErrorReducer } from \"./ErrorReducer\";\nexport { default as ModalsReducer } from \"./ModalsReducer\";\nexport { default as NotificationReducer } from \"./NotificationReducer\";\nexport { default as PreferencesReducer } from \"./PreferencesReducer\";\nexport { default as ProgressIndicatorReducer } from \"./ProgressIndicatorReducer\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,cAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAL,GAAA;EAAA,IAAAA,GAAA,IAAAM,OAAA,IAAAA,OAAA,CAAAN,GAAA,MAAAJ,cAAA,CAAAI,GAAA;EAAAC,MAAA,CAAAM,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,cAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAU,YAAA,GAAAC,sBAAA,CAAAd,OAAA;AACA,IAAAe,aAAA,GAAAD,sBAAA,CAAAd,OAAA;AACA,IAAAgB,cAAA,GAAAF,sBAAA,CAAAd,OAAA;AACA,IAAAiB,oBAAA,GAAAH,sBAAA,CAAAd,OAAA;AACA,IAAAkB,mBAAA,GAAAJ,sBAAA,CAAAd,OAAA;AACA,IAAAmB,yBAAA,GAAAL,sBAAA,CAAAd,OAAA"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_createReducer","require","_Object$keys","forEach","key","Object","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_AuthReducer","_interopRequireDefault","_ErrorReducer","_ModalsReducer","_NotificationReducer","_PreferencesReducer","_ProgressIndicatorReducer"],"sources":["../../../src/redux/reducers/index.js"],"sourcesContent":["// @flow\nexport * from \"./createReducer\";\n\nexport { default as AuthReducer } from \"./AuthReducer\";\nexport { default as ErrorReducer } from \"./ErrorReducer\";\nexport { default as ModalsReducer } from \"./ModalsReducer\";\nexport { default as NotificationReducer } from \"./NotificationReducer\";\nexport { default as PreferencesReducer } from \"./PreferencesReducer\";\nexport { default as ProgressIndicatorReducer } from \"./ProgressIndicatorReducer\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,cAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAC,MAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAL,GAAA;EAAA,IAAAA,GAAA,IAAAM,OAAA,IAAAA,OAAA,CAAAN,GAAA,MAAAJ,cAAA,CAAAI,GAAA;EAAAC,MAAA,CAAAM,cAAA,CAAAD,OAAA,EAAAN,GAAA;IAAAQ,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,cAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAU,YAAA,GAAAC,sBAAA,CAAAd,OAAA;AACA,IAAAe,aAAA,GAAAD,sBAAA,CAAAd,OAAA;AACA,IAAAgB,cAAA,GAAAF,sBAAA,CAAAd,OAAA;AACA,IAAAiB,oBAAA,GAAAH,sBAAA,CAAAd,OAAA;AACA,IAAAkB,mBAAA,GAAAJ,sBAAA,CAAAd,OAAA;AACA,IAAAmB,yBAAA,GAAAL,sBAAA,CAAAd,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","names":["getLocale","state","i18n","locale","exports","getLocales","locales"],"sources":["../../../src/redux/selectors/i18n.js"],"sourcesContent":["// @flow\nimport type Locales from \"../../i18n/Locales\";\nimport type { ReduxState } from \"../types\";\n\n/**\n * Retrieve the locale from state\n */\nexport const getLocale = (state: ReduxState): string => {\n return state.i18n?.locale ?? \"en\";\n};\n\n/**\n * Retrieve all available locales in the store\n */\nexport const getLocales = (state: ReduxState): Locales => state.i18n.locales;\n"],"mappings":";;;;;;AAIA;AACA;AACA;AACO,MAAMA,SAAS,GAAIC,KAAiB,IAAa;EACtD,OAAOA,KAAK,CAACC,IAAI,EAAEC,MAAM,IAAI,IAAI;AACnC,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAJ,SAAA,GAAAA,SAAA;AAGO,MAAMK,UAAU,GAAIJ,KAAiB,IAAcA,KAAK,CAACC,IAAI,CAACI,OAAO;AAACF,OAAA,CAAAC,UAAA,GAAAA,UAAA"
|
|
1
|
+
{"version":3,"file":"i18n.js","names":["getLocale","state","i18n","locale","exports","getLocales","locales"],"sources":["../../../src/redux/selectors/i18n.js"],"sourcesContent":["// @flow\nimport type Locales from \"../../i18n/Locales\";\nimport type { ReduxState } from \"../types\";\n\n/**\n * Retrieve the locale from state\n */\nexport const getLocale = (state: ReduxState): string => {\n return state.i18n?.locale ?? \"en\";\n};\n\n/**\n * Retrieve all available locales in the store\n */\nexport const getLocales = (state: ReduxState): Locales => state.i18n.locales;\n"],"mappings":";;;;;;AAIA;AACA;AACA;AACO,MAAMA,SAAS,GAAIC,KAAiB,IAAa;EACtD,OAAOA,KAAK,CAACC,IAAI,EAAEC,MAAM,IAAI,IAAI;AACnC,CAAC;;AAED;AACA;AACA;AAFAC,OAAA,CAAAJ,SAAA,GAAAA,SAAA;AAGO,MAAMK,UAAU,GAAIJ,KAAiB,IAAcA,KAAK,CAACC,IAAI,CAACI,OAAO;AAACF,OAAA,CAAAC,UAAA,GAAAA,UAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_i18n","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get"],"sources":["../../../src/redux/selectors/index.js"],"sourcesContent":["// @flow\nexport * from \"./i18n\";\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA"
|
|
1
|
+
{"version":3,"file":"index.js","names":["_i18n","require","_Object$keys","forEach","key","exports","Object","defineProperty","enumerable","get"],"sources":["../../../src/redux/selectors/index.js"],"sourcesContent":["// @flow\nexport * from \"./i18n\";\n"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,YAAA,CAAAF,KAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAJ,KAAA,CAAAI,GAAA;EAAAE,MAAA,CAAAC,cAAA,CAAAF,OAAA,EAAAD,GAAA;IAAAI,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,KAAA,CAAAI,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","arguments","length","undefined","props","beforeRenderHook","exports"],"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;AACO,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;AAACE,OAAA,CAAAP,uBAAA,GAAAA,uBAAA"
|
|
1
|
+
{"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","arguments","length","undefined","props","beforeRenderHook","exports"],"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;AACO,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;AAACE,OAAA,CAAAP,uBAAA,GAAAA,uBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureStore.js","names":["_redux","require","_reduxThunk","_interopRequireDefault","_RouterMiddleware","_ModularUIMiddleware","_createReducer","_RouterActions","configureStore","routerHistory","customReducers","initialState","composeEnhancers","compose","process","env","NODE_ENV","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","combinedReducers","combineReducers","createReducer","middleware","applyMiddleware","modularUIMiddleware","routerMiddleware","thunk","enhancers","store","createReduxStore","router","dispatch","locationChange","location","_default","exports","default"],"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,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAMA;AACA;AACA,MAAMO,cAAc,GAAGA,CACrBC,aAA4B,EAC5BC,cAAuB,EACvBC,YAAiC,KACuB;EACxD,IAAIC,gBAAgB,GAAGC,cAAO;EAE9B,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IAC1EL,gBAAgB,GAAGK,MAAM,CAACC,oCAAoC,IAAIL,cAAO;EAC3E;EAEA,MAAMM,gBAAkD,GAAG,IAAAC,sBAAe,EAAC;IACzE,GAAGV,cAAc;IACjB,GAAG,IAAAW,4BAAa,EAAC;EACnB,CAAC,CAAC;EAEF,MAAMC,UAAU,GAAG,IAAAC,sBAAe,EAChCC,wCAAmB,EACnB,IAAAC,kCAAgB,EAAChB,aAAa,CAAC,EAC/BiB,mBACF,CAAC;EAED,MAAMC,SAAS,GAAGf,gBAAgB,CAACU,UAAU,CAAC;EAE9C,MAAMM,KAAiB,GAAG,IAAAC,kBAAgB,EACxCV,gBAAgB,EAChBR,YAAY,EACZgB,SACF,CAAC;EAED,IAAI,CAAChB,YAAY,EAAEmB,MAAM,EAAE;IACzBF,KAAK,CAACG,QAAQ,CAAC,IAAAC,6BAAc,EAACvB,aAAa,CAACwB,QAAQ,EAAE,MAAM,CAAC,CAAC;EAChE;EACA,OAAO;IAAExB,aAAa;IAAEmB;EAAM,CAAC;AACjC,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa5B,cAAc"
|
|
1
|
+
{"version":3,"file":"configureStore.js","names":["_redux","require","_reduxThunk","_interopRequireDefault","_RouterMiddleware","_ModularUIMiddleware","_createReducer","_RouterActions","configureStore","routerHistory","customReducers","initialState","composeEnhancers","compose","process","env","NODE_ENV","window","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","combinedReducers","combineReducers","createReducer","middleware","applyMiddleware","modularUIMiddleware","routerMiddleware","thunk","enhancers","store","createReduxStore","router","dispatch","locationChange","location","_default","exports","default"],"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,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AAEA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAMA;AACA;AACA,MAAMO,cAAc,GAAGA,CACrBC,aAA4B,EAC5BC,cAAuB,EACvBC,YAAiC,KACuB;EACxD,IAAIC,gBAAgB,GAAGC,cAAO;EAE9B,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE;IAC1EL,gBAAgB,GAAGK,MAAM,CAACC,oCAAoC,IAAIL,cAAO;EAC3E;EAEA,MAAMM,gBAAkD,GAAG,IAAAC,sBAAe,EAAC;IACzE,GAAGV,cAAc;IACjB,GAAG,IAAAW,4BAAa,EAAC;EACnB,CAAC,CAAC;EAEF,MAAMC,UAAU,GAAG,IAAAC,sBAAe,EAChCC,wCAAmB,EACnB,IAAAC,kCAAgB,EAAChB,aAAa,CAAC,EAC/BiB,mBACF,CAAC;EAED,MAAMC,SAAS,GAAGf,gBAAgB,CAACU,UAAU,CAAC;EAE9C,MAAMM,KAAiB,GAAG,IAAAC,kBAAgB,EACxCV,gBAAgB,EAChBR,YAAY,EACZgB,SACF,CAAC;EAED,IAAI,CAAChB,YAAY,EAAEmB,MAAM,EAAE;IACzBF,KAAK,CAACG,QAAQ,CAAC,IAAAC,6BAAc,EAACvB,aAAa,CAACwB,QAAQ,EAAE,MAAM,CAAC,CAAC;EAChE;EACA,OAAO;IAAExB,aAAa;IAAEmB;EAAM,CAAC;AACjC,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa5B,cAAc"}
|
package/lib/redux/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/redux/types.js"],"sourcesContent":["// @flow\nimport type { Store, DispatchAPI } from \"redux\";\n\nimport type ErrorResponse from \"../models/error/ErrorResponse\";\n\nimport type FormModel from \"../models/form/FormModel\";\nimport typeof {\n NOTIFICATION_TYPES,\n AUTOSAVE_STATUS,\n} from \"../constants/Constants\";\n\nimport type { MessageObject } from \"../i18n/types\";\nimport type {\n I18nState,\n UpdateLocaleAction,\n SetLocalesAction,\n} from \"./_i18n/types\";\nimport type {\n ModularUIState,\n ModularUIAction,\n UpdateStatusAction,\n SetModelAction,\n UpdateModelAction,\n UpdateFormAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n InitModelAction,\n} from \"./_modularui/types\";\nimport type {\n RouterState,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./_router/types\";\n\nexport type PreferenceValue =\n | null\n | string\n | boolean\n | { [key: string]: any }\n | Array<PreferenceValue>;\n\nexport type UpdateFormOptions = {\n autosubmit: boolean,\n autosave: boolean,\n forceUpdate?: boolean,\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean,\n};\n\nexport type NoAction = {\n type: \"NO_ACTION\",\n};\n\nexport type SaveErrorAction = {\n type: \"SAVE_ERROR\",\n payload: ErrorResponse,\n};\n\nexport type ShowModalAction = {\n type: \"SHOW_MODAL\",\n payload: string,\n};\n\nexport type CloseModalAction = {\n type: \"CLOSE_MODAL\",\n payload: string,\n};\n\nexport type DismissNotificationAction = {\n type: \"DISMISS_NOTIFICATION\",\n};\nexport type ShowNotificationAction = {\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type: $Keys<NOTIFICATION_TYPES>,\n message: MessageObject,\n error: ?ErrorResponse,\n },\n};\n\nexport type SetPreferenceAction = {\n type: \"SET_PREFERENCE\",\n payload: { [name: string]: PreferenceValue },\n};\nexport type SetPreferencesAction = {\n type: \"SET_PREFERENCES\",\n payload: { [name: string]: PreferenceValue },\n};\n\nexport type StartProgressAction = {\n type: \"START_PROGRESS\",\n};\nexport type FinishProgressAction = {\n type: \"FINISH_PROGRESS\",\n};\nexport type ResetProgressAction = {\n type: \"RESET_PROGRESS\",\n};\nexport type UpdateProgressAction = {\n type: \"UPDATE_PROGRESS\",\n payload: { percentComplete: number },\n};\n\nexport type SendAuthenticationErrorAction = {\n type: \"AUTHENTICATION_ERROR\",\n payload: string,\n};\n\nexport type ResetAuthErrorsAction = {\n type: \"AUTHENTICATION_RESET_ERRORS\",\n};\n\nexport type LoginSuccessAction = {\n type: \"AUTHENTICATION_SUCCESS\",\n};\n\nexport type ChangePasswordAction = {\n type: \"CHANGE_PASSWORD\",\n};\n\nexport type LogoutSuccessAction = {\n type: \"AUTHENTICATION_LOGOUT\",\n};\n\nexport type UpdateAutosaveAction = {\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status: $Keys<AUTOSAVE_STATUS>,\n model: FormModel,\n },\n};\n\nexport type ReduxAction =\n | UpdateStatusAction\n | SetModelAction\n | InitModelAction\n | UpdateModelAction\n | UpdateFormAction\n | RemoveModelByKeyAction\n | ResetModularUIAction\n | SaveErrorAction\n | UpdateLocaleAction\n | SetLocalesAction\n | ShowModalAction\n | CloseModalAction\n | DismissNotificationAction\n | ShowNotificationAction\n | SetPreferenceAction\n | SetPreferencesAction\n | StartProgressAction\n | FinishProgressAction\n | ResetProgressAction\n | UpdateProgressAction\n | ResetAuthErrorsAction\n | SendAuthenticationErrorAction\n | LoginSuccessAction\n | ChangePasswordAction\n | LogoutSuccessAction\n | UpdateAutosaveAction\n | LocationChangeAction\n | PushAction\n | ReplaceAction\n | GoAction\n | GoBackAction\n | GoForwardAction\n | ModularUIAction\n | NoAction;\n\n// Redux state\nexport type AuthState = {\n +mustChangePassword: boolean,\n +error: ?string,\n};\n\nexport type ErrorState = null | ErrorResponse;\n\nexport type ModalState = {\n +key: string,\n +visible: boolean,\n +size?: string,\n};\n\nexport type ModalsState = {\n +modals: Array<ModalState>,\n};\n\nexport type NotificationState = {\n +render: boolean,\n +messageType: string | null,\n +message: MessageObject | null,\n +error: ?ErrorResponse | null,\n};\n\nexport type PreferencesState = {\n +[name: string]: PreferenceValue,\n};\n\nexport type ProgressIndicatorState = {\n +count: number,\n +timestamp: number,\n +percentComplete: number,\n};\n\nexport type ReduxState = {\n +router: RouterState,\n +modularui: ModularUIState,\n +i18n: I18nState,\n +auth: AuthState,\n +error: ErrorState,\n +modals: ModalsState,\n +notification: NotificationState,\n +progressindicator: ProgressIndicatorState,\n +preferences: PreferencesState,\n ...\n};\n\nexport type GetState = () => ReduxState;\nexport type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;\nexport type PromiseAction = Promise<PossibleAction>;\nexport type Dispatch = DispatchAPI<PossibleAction>;\nexport type ReduxStore = Store<ReduxState, ReduxAction, Dispatch>;\n\nexport type PossibleAction = ReduxAction | ThunkAction | PromiseAction;\n\nexport type CustomReducers = { [reducerKey: string]: any };\n"],"mappings":""
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/redux/types.js"],"sourcesContent":["// @flow\nimport type { Store, DispatchAPI } from \"redux\";\n\nimport type ErrorResponse from \"../models/error/ErrorResponse\";\n\nimport type FormModel from \"../models/form/FormModel\";\nimport typeof {\n NOTIFICATION_TYPES,\n AUTOSAVE_STATUS,\n} from \"../constants/Constants\";\n\nimport type { MessageObject } from \"../i18n/types\";\nimport type {\n I18nState,\n UpdateLocaleAction,\n SetLocalesAction,\n} from \"./_i18n/types\";\nimport type {\n ModularUIState,\n ModularUIAction,\n UpdateStatusAction,\n SetModelAction,\n UpdateModelAction,\n UpdateFormAction,\n RemoveModelByKeyAction,\n ResetModularUIAction,\n InitModelAction,\n} from \"./_modularui/types\";\nimport type {\n RouterState,\n LocationChangeAction,\n PushAction,\n ReplaceAction,\n GoAction,\n GoBackAction,\n GoForwardAction,\n} from \"./_router/types\";\n\nexport type PreferenceValue =\n | null\n | string\n | boolean\n | { [key: string]: any }\n | Array<PreferenceValue>;\n\nexport type UpdateFormOptions = {\n autosubmit: boolean,\n autosave: boolean,\n forceUpdate?: boolean,\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean,\n};\n\nexport type NoAction = {\n type: \"NO_ACTION\",\n};\n\nexport type SaveErrorAction = {\n type: \"SAVE_ERROR\",\n payload: ErrorResponse,\n};\n\nexport type ShowModalAction = {\n type: \"SHOW_MODAL\",\n payload: string,\n};\n\nexport type CloseModalAction = {\n type: \"CLOSE_MODAL\",\n payload: string,\n};\n\nexport type DismissNotificationAction = {\n type: \"DISMISS_NOTIFICATION\",\n};\nexport type ShowNotificationAction = {\n type: \"SHOW_NOTIFICATION\",\n payload: {\n type: $Keys<NOTIFICATION_TYPES>,\n message: MessageObject,\n error: ?ErrorResponse,\n },\n};\n\nexport type SetPreferenceAction = {\n type: \"SET_PREFERENCE\",\n payload: { [name: string]: PreferenceValue },\n};\nexport type SetPreferencesAction = {\n type: \"SET_PREFERENCES\",\n payload: { [name: string]: PreferenceValue },\n};\n\nexport type StartProgressAction = {\n type: \"START_PROGRESS\",\n};\nexport type FinishProgressAction = {\n type: \"FINISH_PROGRESS\",\n};\nexport type ResetProgressAction = {\n type: \"RESET_PROGRESS\",\n};\nexport type UpdateProgressAction = {\n type: \"UPDATE_PROGRESS\",\n payload: { percentComplete: number },\n};\n\nexport type SendAuthenticationErrorAction = {\n type: \"AUTHENTICATION_ERROR\",\n payload: string,\n};\n\nexport type ResetAuthErrorsAction = {\n type: \"AUTHENTICATION_RESET_ERRORS\",\n};\n\nexport type LoginSuccessAction = {\n type: \"AUTHENTICATION_SUCCESS\",\n};\n\nexport type ChangePasswordAction = {\n type: \"CHANGE_PASSWORD\",\n};\n\nexport type LogoutSuccessAction = {\n type: \"AUTHENTICATION_LOGOUT\",\n};\n\nexport type UpdateAutosaveAction = {\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status: $Keys<AUTOSAVE_STATUS>,\n model: FormModel,\n },\n};\n\nexport type ReduxAction =\n | UpdateStatusAction\n | SetModelAction\n | InitModelAction\n | UpdateModelAction\n | UpdateFormAction\n | RemoveModelByKeyAction\n | ResetModularUIAction\n | SaveErrorAction\n | UpdateLocaleAction\n | SetLocalesAction\n | ShowModalAction\n | CloseModalAction\n | DismissNotificationAction\n | ShowNotificationAction\n | SetPreferenceAction\n | SetPreferencesAction\n | StartProgressAction\n | FinishProgressAction\n | ResetProgressAction\n | UpdateProgressAction\n | ResetAuthErrorsAction\n | SendAuthenticationErrorAction\n | LoginSuccessAction\n | ChangePasswordAction\n | LogoutSuccessAction\n | UpdateAutosaveAction\n | LocationChangeAction\n | PushAction\n | ReplaceAction\n | GoAction\n | GoBackAction\n | GoForwardAction\n | ModularUIAction\n | NoAction;\n\n// Redux state\nexport type AuthState = {\n +mustChangePassword: boolean,\n +error: ?string,\n};\n\nexport type ErrorState = null | ErrorResponse;\n\nexport type ModalState = {\n +key: string,\n +visible: boolean,\n +size?: string,\n};\n\nexport type ModalsState = {\n +modals: Array<ModalState>,\n};\n\nexport type NotificationState = {\n +render: boolean,\n +messageType: string | null,\n +message: MessageObject | null,\n +error: ?ErrorResponse | null,\n};\n\nexport type PreferencesState = {\n +[name: string]: PreferenceValue,\n};\n\nexport type ProgressIndicatorState = {\n +count: number,\n +timestamp: number,\n +percentComplete: number,\n};\n\nexport type ReduxState = {\n +router: RouterState,\n +modularui: ModularUIState,\n +i18n: I18nState,\n +auth: AuthState,\n +error: ErrorState,\n +modals: ModalsState,\n +notification: NotificationState,\n +progressindicator: ProgressIndicatorState,\n +preferences: PreferencesState,\n ...\n};\n\nexport type GetState = () => ReduxState;\nexport type ThunkAction = (dispatch: Dispatch, getState: GetState) => any;\nexport type PromiseAction = Promise<PossibleAction>;\nexport type Dispatch = DispatchAPI<PossibleAction>;\nexport type ReduxStore = Store<ReduxState, ReduxAction, Dispatch>;\n\nexport type PossibleAction = ReduxAction | ThunkAction | PromiseAction;\n\nexport type CustomReducers = { [reducerKey: string]: any };\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","_defineProperty2","default","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_stringify","setItem","removeItem","clear","pattern","_context","_filter","_keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_entries","_ref","_ref2","_default","exports"],"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}\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,sBAAsB,EAAEqB,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAAC;MAE3D,OAAOV,QAAQ,CAAC,CAAC;IACnB;IAEA,OAAO,IAAI;EACb;AACF;AAAC,IAAAiB,QAAA,GAAAC,OAAA,CAAApD,OAAA,GAEe,IAAIH,KAAK,CAAC,CAAC"
|
|
1
|
+
{"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","_defineProperty2","default","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_stringify","setItem","removeItem","clear","pattern","_context","_filter","_keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_entries","_ref","_ref2","_default","exports"],"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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AAEqB,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAAC;MAE3D,OAAOV,QAAQ,CAAC,CAAC;IACnB;IAEA,OAAO,IAAI;EACb;AACF;AAAC,IAAAiB,QAAA,GAAAC,OAAA,CAAApD,OAAA,GAEe,IAAIH,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cookies.js","names":["_jsCookie","_interopRequireDefault","require","_Settings","getCookie","name","Cookies","get","exports","setCookie","value","options","attributes","path","getBasePath","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,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAeA;AACA;AACO,MAAME,SAAS,GAAIC,IAAY,IAAoB;EACxD,OAAOC,iBAAO,CAACC,GAAG,CAACF,IAAI,CAAC;AAC1B,CAAC;;AAED;AACA;AADAG,OAAA,CAAAJ,SAAA,GAAAA,SAAA;AAEO,MAAMK,SAAS,GAAGA,CACvBJ,IAAY,EACZK,KAAU,EACVC,OAAuB,KACpB;EACH,MAAMC,UAA4B,GAAG;IAAEC,IAAI,EAAE,IAAAC,qBAAW,EAAC;EAAE,CAAC;EAC5DF,UAAU,CAACG,OAAO,GAAGJ,OAAO,EAAEK,IAAI;EAClCJ,UAAU,CAACK,QAAQ,GAAGN,OAAO,EAAEM,QAAQ,IAAI,QAAQ;EACnDL,UAAU,CAACM,MAAM,GAAGP,OAAO,EAAEO,MAAM;EAEnCZ,iBAAO,CAACa,GAAG,CAACd,IAAI,EAAEK,KAAK,EAAEE,UAAU,CAAC;AACtC,CAAC;;AAED;AACA;AADAJ,OAAA,CAAAC,SAAA,GAAAA,SAAA;AAEO,MAAMW,WAAW,GAAIf,IAAY,IAAK;EAC3CC,iBAAO,CAACe,MAAM,CAAChB,IAAI,EAAE;IAAEQ,IAAI,EAAE,IAAAC,qBAAW,EAAC;EAAE,CAAC,CAAC;AAC/C,CAAC;AAACN,OAAA,CAAAY,WAAA,GAAAA,WAAA"
|
|
1
|
+
{"version":3,"file":"Cookies.js","names":["_jsCookie","_interopRequireDefault","require","_Settings","getCookie","name","Cookies","get","exports","setCookie","value","options","attributes","path","getBasePath","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,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AAeA;AACA;AACO,MAAME,SAAS,GAAIC,IAAY,IAAoB;EACxD,OAAOC,iBAAO,CAACC,GAAG,CAACF,IAAI,CAAC;AAC1B,CAAC;;AAED;AACA;AADAG,OAAA,CAAAJ,SAAA,GAAAA,SAAA;AAEO,MAAMK,SAAS,GAAGA,CACvBJ,IAAY,EACZK,KAAU,EACVC,OAAuB,KACpB;EACH,MAAMC,UAA4B,GAAG;IAAEC,IAAI,EAAE,IAAAC,qBAAW,EAAC;EAAE,CAAC;EAC5DF,UAAU,CAACG,OAAO,GAAGJ,OAAO,EAAEK,IAAI;EAClCJ,UAAU,CAACK,QAAQ,GAAGN,OAAO,EAAEM,QAAQ,IAAI,QAAQ;EACnDL,UAAU,CAACM,MAAM,GAAGP,OAAO,EAAEO,MAAM;EAEnCZ,iBAAO,CAACa,GAAG,CAACd,IAAI,EAAEK,KAAK,EAAEE,UAAU,CAAC;AACtC,CAAC;;AAED;AACA;AADAJ,OAAA,CAAAC,SAAA,GAAAA,SAAA;AAEO,MAAMW,WAAW,GAAIf,IAAY,IAAK;EAC3CC,iBAAO,CAACe,MAAM,CAAChB,IAAI,EAAE;IAAEQ,IAAI,EAAE,IAAAC,qBAAW,EAAC;EAAE,CAAC,CAAC;AAC/C,CAAC;AAACN,OAAA,CAAAY,WAAA,GAAAA,WAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeUtil.js","names":["_dateFns","require","_locale","_Cookies","_Settings","_constants","BaseDateTimeUtil","constructor","isoFormat","_defineProperty2","default","_isoFormat","getLocale","locale","getCookie","nl","enGB","getOptions","weekStartsOn","getSetting","DEFAULT_WEEK_STARTS_ON","firstWeekContainsDate","DEFAULT_FIRST_WEEK_CONTAINS_DATE","toDate","date","inputFormat","arguments","length","undefined","parse","Date","toFormat","targetFormat","parsedDate","isValid","format","toISO","sourceFormat","now","convertFormat","hasFormat","realDate","formattedValue","isOutsideRange","isBefore","isAfter","replace","toUpperCase","inputDate","afterISODate","isSameOrAfter","isSame","beforeISODate","isSameOrBefore","compareDate","getTime","isSameDay","isOther","isWeekend","SATURDAY_NUMBER","SUNDAY_NUMBER","weekDay","getDay","addSeconds","amount","addMinutes","addHours","addDays","addWeeks","addMonths","addYears","subtractSeconds","subSeconds","subtractMinutes","subMinutes","subtractHours","subHours","subtractDays","subDays","subtractWeeks","subWeeks","subtractMonths","subMonths","subtractYears","subYears","startOfMonth","endOfMonth","startOfWeek","getHours","getMinutes","getWeek","setYear","year","setMonth","month","setHour","hour","setHours","setMinute","minute","setMinutes","setSecond","second","setSeconds","setMilliseconds","milliseconds","setTime","hours","minutes","seconds","set","DateUtil","exports","ISO_DATE_FORMAT","DateTimeUtil","ISO_DATETIME_FORMAT","TimeUtil","ISO_TIME_FORMAT","TimestampUtil","ISO_TIMESTAMP_FORMAT"],"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,IAAAA,QAAA,GAAAC,OAAA;AAoCA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AASA;AACA;AACA;AACA,MAAMK,gBAAgB,CAAC;EAGrBC,WAAWA,CAACC,SAAiB,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAC7B,IAAI,CAACC,UAAU,GAAGH,SAAS;EAC7B;;EAEA;AACF;EACEI,SAASA,CAAA,EAA4B;IACnC,MAAMC,MAAM,GAAG,IAAAC,kBAAS,EAAC,QAAQ,CAAC,IAAI,IAAI;IAE1C,IAAID,MAAM,KAAK,IAAI,EAAE;MACnB,OAAOE,UAAE;IACX;IAEA,OAAOC,YAAI;EACb;;EAEA;EACAC,UAAUA,CAAA,EAGR;IACA;IACA,MAAMC,YAAY,GAAG,IAAAC,oBAAU,EAC7B,yBAAyB,EACzBC,iCACF,CAAC;;IAED;IACA,MAAMC,qBAAqB,GAAG,IAAAF,oBA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F,CAAC,CACH,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA,MAAMM,QAA0B,GAAAC,OAAA,CAAAD,QAAA,GAAG,IAAIzG,gBAAgB,CAAC2G,0BAAe,CAAC;;AAExE;AACA;AACA;AACA,MAAMC,YAA8B,GAAAF,OAAA,CAAAE,YAAA,GAAG,IAAI5G,gBAAgB,CACzD6G,8BACF,CAAC;;AAED;AACA;AACA;AACA,MAAMC,QAA0B,GAAAJ,OAAA,CAAAI,QAAA,GAAG,IAAI9G,gBAAgB,CAAC+G,0BAAe,CAAC;;AAExE;AACA;AACA;AACA,MAAMC,aAA+B,GAAAN,OAAA,CAAAM,aAAA,GAAG,IAAIhH,gBAAgB,CAC1DiH,+BACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DateTimeUtil.js","names":["_dateFns","require","_locale","_Cookies","_Settings","_constants","BaseDateTimeUtil","constructor","isoFormat","_defineProperty2","default","_isoFormat","getLocale","locale","getCookie","nl","enGB","getOptions","weekStartsOn","getSetting","DEFAULT_WEEK_STARTS_ON","firstWeekContainsDate","DEFAULT_FIRST_WEEK_CONTAINS_DATE","toDate","date","inputFormat","arguments","length","undefined","parse","Date","toFormat","targetFormat","parsedDate","isValid","format","toISO","sourceFormat","now","convertFormat","hasFormat","realDate","formattedValue","isOutsideRange","isBefore","isAfter","replace","toUpperCase","inputDate","afterISODate","isSameOrAfter","isSame","beforeISODate","isSameOrBefore","compareDate","getTime","isSameDay","isOther","isWeekend","SATURDAY_NUMBER","SUNDAY_NUMBER","weekDay","getDay","addSeconds","amount","addMinutes","addHours","addDays","addWeeks","addMonths","addYears","subtractSeconds","subSeconds","subtractMinutes","subMinutes","subtractHours","subHours","subtractDays","subDays","subtractWeeks","subWeeks","subtractMonths","subMonths","subtractYears","subYears","startOfMonth","endOfMonth","startOfWeek","getHours","getMinutes","getWeek","setYear","year","setMonth","month","setHour","hour","setHours","setMinute","minute","setMinutes","setSecond","second","setSeconds","setMilliseconds","milliseconds","setTime","hours","minutes","seconds","set","DateUtil","exports","ISO_DATE_FORMAT","DateTimeUtil","ISO_DATETIME_FORMAT","TimeUtil","ISO_TIME_FORMAT","TimestampUtil","ISO_TIMESTAMP_FORMAT"],"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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":["_Settings","require","_exceptions","serverFetch","args","_context","urlNoBase","_includes","default","url","call","replace","getBasePath","params","data","dataFetcher","fetch","jsonData","JSON","parse","error","_promise","reject","FetchException","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,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAIA;AACA;AACA;AACe,SAASE,WAAWA,CAACC,IAAoB,EAAgB;EAAA,IAAAC,QAAA;EACtE;EACA,MAAMC,SAAS,GAAG,IAAAC,SAAA,CAAAC,OAAA,EAAAH,QAAA,GAAAD,IAAI,CAACK,GAAG,EAAAC,IAAA,CAAAL,QAAA,EAAU,MAAM,CAAC,GACvCD,IAAI,CAACK,GAAG,GACRL,IAAI,CAACK,GAAG,CAACE,OAAO,CAAC,IAAAC,qBAAW,EAAC,CAAC,EAAE,EAAE,CAAC;EACvC,MAAMC,MAAM,GAAGT,IAAI,CAACS,MAAM,GACtBT,IAAI,CAACS,MAAM,CAACF,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,GAC9C,EAAE;EACN,MAAMF,GAAG,GAAGI,MAAM,KAAK,EAAE,GAAGP,SAAS,GAAI,GAAEA,SAAU,IAAGO,MAAO,EAAC;EAEhE,MAAMC,IAAI,GAAGC,WAAW,CAACC,KAAK,CAACP,GAAG,EAAEL,IAAI,CAAC;EAEzC,IAAI;IACF,MAAMa,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACL,IAAI,CAAC;IAEjC,IAAIG,QAAQ,CAACG,KAAK,EAAE;MAClB,OAAOC,QAAA,CAAAb,OAAA,CAAQc,MAAM,CAAC,IAAIC,0BAAc,CAACN,QAAQ,EAAE,IAAI,EAAEb,IAAI,CAAC,CAAC;IACjE;IAEA,OAAOiB,QAAA,CAAAb,OAAA,CAAQgB,OAAO,CAACP,QAAQ,CAAC;EAClC,CAAC,CAAC,OAAOG,KAAK,EAAE;IACd,OAAOC,QAAA,CAAAb,OAAA,CAAQc,MAAM,CAACF,KAAK,CAAC;EAC9B;AACF"
|
|
1
|
+
{"version":3,"file":"serverFetch.js","names":["_Settings","require","_exceptions","serverFetch","args","_context","urlNoBase","_includes","default","url","call","replace","getBasePath","params","data","dataFetcher","fetch","jsonData","JSON","parse","error","_promise","reject","FetchException","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,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAIA;AACA;AACA;AACe,SAASE,WAAWA,CAACC,IAAoB,EAAgB;EAAA,IAAAC,QAAA;EACtE;EACA,MAAMC,SAAS,GAAG,IAAAC,SAAA,CAAAC,OAAA,EAAAH,QAAA,GAAAD,IAAI,CAACK,GAAG,EAAAC,IAAA,CAAAL,QAAA,EAAU,MAAM,CAAC,GACvCD,IAAI,CAACK,GAAG,GACRL,IAAI,CAACK,GAAG,CAACE,OAAO,CAAC,IAAAC,qBAAW,EAAC,CAAC,EAAE,EAAE,CAAC;EACvC,MAAMC,MAAM,GAAGT,IAAI,CAACS,MAAM,GACtBT,IAAI,CAACS,MAAM,CAACF,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,GAC9C,EAAE;EACN,MAAMF,GAAG,GAAGI,MAAM,KAAK,EAAE,GAAGP,SAAS,GAAI,GAAEA,SAAU,IAAGO,MAAO,EAAC;EAEhE,MAAMC,IAAI,GAAGC,WAAW,CAACC,KAAK,CAACP,GAAG,EAAEL,IAAI,CAAC;EAEzC,IAAI;IACF,MAAMa,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACL,IAAI,CAAC;IAEjC,IAAIG,QAAQ,CAACG,KAAK,EAAE;MAClB,OAAOC,QAAA,CAAAb,OAAA,CAAQc,MAAM,CAAC,IAAIC,0BAAc,CAACN,QAAQ,EAAE,IAAI,EAAEb,IAAI,CAAC,CAAC;IACjE;IAEA,OAAOiB,QAAA,CAAAb,OAAA,CAAQgB,OAAO,CAACP,QAAQ,CAAC;EAClC,CAAC,CAAC,OAAOG,KAAK,EAAE;IACd,OAAOC,QAAA,CAAAb,OAAA,CAAQc,MAAM,CAACF,KAAK,CAAC;EAC9B;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/utils/fetch/types.js"],"sourcesContent":["// @flow\nimport typeof { HTTP_METHODS } from \"../../constants/Constants\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { TargetModel } from \"../../modularui/types\";\n\nexport type RequestURLOptions = {\n url: string,\n};\n\nexport type RequestBaseOptions = {\n method?: $Keys<HTTP_METHODS>,\n params?: string,\n data?: any,\n timeout?: number,\n responseType?: string,\n headers?: {\n [headerName: string]: string,\n Accept?: string,\n \"Accept-Language\"?: string,\n \"Content-Type\"?: string,\n \"x-filename\"?: string,\n \"x-filesize\"?: string,\n },\n events?: { [eventName: string]: () => void },\n onProgress?: ProgressEventHandler,\n includeContext?: boolean,\n locale?: string,\n cache?: boolean,\n isReload?: boolean,\n};\n\nexport type RequestOptions = { ...RequestURLOptions, ...RequestBaseOptions };\n\nexport type RequestModularUIOptions = {\n ...RequestBaseOptions,\n targetModel?: TargetModel,\n forceTargetModel?: boolean,\n updateModel?: ModularUIModel,\n childmodels?: boolean,\n isValidationRequest?: boolean,\n removeOnUnmount?: boolean,\n};\n"],"mappings":""
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/utils/fetch/types.js"],"sourcesContent":["// @flow\nimport typeof { HTTP_METHODS } from \"../../constants/Constants\";\nimport type { ModularUIModel } from \"../../models/types\";\nimport type { TargetModel } from \"../../modularui/types\";\n\nexport type RequestURLOptions = {\n url: string,\n};\n\nexport type RequestBaseOptions = {\n method?: $Keys<HTTP_METHODS>,\n params?: string,\n data?: any,\n timeout?: number,\n responseType?: string,\n headers?: {\n [headerName: string]: string,\n Accept?: string,\n \"Accept-Language\"?: string,\n \"Content-Type\"?: string,\n \"x-filename\"?: string,\n \"x-filesize\"?: string,\n },\n events?: { [eventName: string]: () => void },\n onProgress?: ProgressEventHandler,\n includeContext?: boolean,\n locale?: string,\n cache?: boolean,\n isReload?: boolean,\n};\n\nexport type RequestOptions = { ...RequestURLOptions, ...RequestBaseOptions };\n\nexport type RequestModularUIOptions = {\n ...RequestBaseOptions,\n targetModel?: TargetModel,\n forceTargetModel?: boolean,\n updateModel?: ModularUIModel,\n childmodels?: boolean,\n isValidationRequest?: boolean,\n removeOnUnmount?: boolean,\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"universalFetch.js","names":["_objects","require","_Constants","_constants","_serverFetch","_interopRequireDefault","_xhr","_Cache","IS_FETCHING","waitForCachedItem","cacheKey","TIMEOUT","CHECK_TIMEOUT","_promise","default","resolve","reject","check","Cache","getItem","cachedItem","Error","setTimeout","browserFetch","args","cacheContributions","cache","createResourceKey","hasItem","cacheItem","isPlainObject","addItem","xhr","then","response","universalFetch","locale","headers","includeContext","url","IS_SYNC","serverFetch","_default","exports"],"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,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,MAAA,GAAAF,sBAAA,CAAAJ,OAAA;AAMA,MAAMO,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,IAAAC,QAAA,CAAAC,OAAA,CAA4B,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtD,MAAMC,KAAK,GAAGA,CAAA,KAAM;MAClB,IAAIC,cAAK,CAACC,OAAO,CAACT,QAAQ,CAAC,KAAKF,WAA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AAEC,QAAQ,IAAK;IAClC,IAAI,IAAAT,6BAAkB,EAAC,CAAC,IAAID,IAAI,CAACE,KAAK,EAAE;MACtC,MAAMhB,QAAQ,GAAGQ,cAAK,CAACS,iBAAiB,CAACH,IAAI,CAAC;MAE9CN,cAAK,CAACa,OAAO,CAACrB,QAAQ,EAAEwB,QAAQ,CAAC;IACnC;IAEA,OAAOA,QAAQ;EACjB,CAAC,CAAC;AACJ,CAAC;;AAED;AACA;AACA;AACA,MAAMC,cAAc,GAClBX,IAAoB,IACuB;EAC3C;EACA,IAAIA,IAAI,CAACY,MAAM,EAAE;IACfZ,IAAI,CAACa,OAAO,GAAG;MACb,iBAAiB,EAAEb,IAAI,CAACY;IAC1B,CAAC;EACH;EAEA,IAAIZ,IAAI,CAACc,cAAc,EAAE;IACvBd,IAAI,CAACe,GAAG,GAAI,GAAEf,IAAI,CAACe,GAAI,sBAAqB;EAC9C;;EAEA;EACA,IAAIC,kBAAO,EAAE;IACX,OAAO,IAAAC,oBAAW,EAACjB,IAAI,CAAC;EAC1B;EAEA,OAAOD,YAAY,CAACC,IAAI,CAAC;AAC3B,CAAC;AAAC,IAAAkB,QAAA,GAAAC,OAAA,CAAA7B,OAAA,GAEaqB,cAAc"
|
|
1
|
+
{"version":3,"file":"universalFetch.js","names":["_objects","require","_Constants","_constants","_serverFetch","_interopRequireDefault","_xhr","_Cache","IS_FETCHING","waitForCachedItem","cacheKey","TIMEOUT","CHECK_TIMEOUT","_promise","default","resolve","reject","check","Cache","getItem","cachedItem","Error","setTimeout","browserFetch","args","cacheContributions","cache","createResourceKey","hasItem","cacheItem","isPlainObject","addItem","xhr","then","response","universalFetch","locale","headers","includeContext","url","IS_SYNC","serverFetch","_default","exports"],"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 serverF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