@beinformed/ui 1.62.7 → 1.62.9
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 +16 -0
- package/esm/constants/Settings.js +4 -0
- package/esm/constants/Settings.js.flow +5 -1
- package/esm/constants/Settings.js.map +1 -1
- package/esm/react-client/client.js +19 -0
- package/esm/react-client/client.js.flow +23 -1
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-server/__tests__/requestInformation.spec.js.flow +265 -0
- package/esm/react-server/requestInformation.js +6 -3
- package/esm/react-server/requestInformation.js.flow +8 -3
- package/esm/react-server/requestInformation.js.map +1 -1
- package/esm/react-server/serverUtil.js +2 -2
- package/esm/react-server/serverUtil.js.flow +2 -2
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/redux/_i18n/I18nActions.js.flow +0 -1
- package/esm/redux/_i18n/I18nActions.js.map +1 -1
- package/esm/redux/_i18n/I18nReducer.js +11 -3
- package/esm/redux/_i18n/I18nReducer.js.flow +11 -3
- package/esm/redux/_i18n/I18nReducer.js.map +1 -1
- package/esm/redux/reducers/createReducer.js +2 -2
- package/esm/redux/reducers/createReducer.js.flow +1 -1
- package/esm/redux/reducers/createReducer.js.map +1 -1
- package/esm/redux/store/configureStore.js +0 -5
- package/esm/redux/store/configureStore.js.flow +0 -7
- package/esm/redux/store/configureStore.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js +3 -2
- package/esm/utils/datetime/DateTimeUtil.js.flow +3 -1
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/constants/Settings.js +7 -2
- package/lib/constants/Settings.js.map +1 -1
- package/lib/react-client/client.js +20 -1
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-server/requestInformation.js +6 -3
- package/lib/react-server/requestInformation.js.map +1 -1
- package/lib/react-server/serverUtil.js +1 -1
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/redux/_i18n/I18nActions.js.map +1 -1
- package/lib/redux/_i18n/I18nReducer.js +10 -2
- package/lib/redux/_i18n/I18nReducer.js.map +1 -1
- package/lib/redux/reducers/createReducer.js +2 -2
- package/lib/redux/reducers/createReducer.js.map +1 -1
- package/lib/redux/store/configureStore.js +0 -5
- package/lib/redux/store/configureStore.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js +2 -1
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/package.json +10 -10
- package/src/constants/Settings.js +5 -1
- package/src/react-client/client.js +23 -1
- package/src/react-server/__tests__/requestInformation.spec.js +265 -0
- package/src/react-server/requestInformation.js +8 -3
- package/src/react-server/serverUtil.js +2 -2
- package/src/redux/_i18n/I18nActions.js +0 -1
- package/src/redux/_i18n/I18nReducer.js +11 -3
- package/src/redux/reducers/createReducer.js +1 -1
- package/src/redux/store/configureStore.js +0 -7
- package/src/utils/datetime/DateTimeUtil.js +3 -1
- package/esm/builder/index.d.ts +0 -1
- package/esm/builder/mergeLayoutHintConfigurations.d.ts +0 -1
- package/esm/constants/Constants.d.ts +0 -158
- package/esm/constants/LayoutHintConfig.d.ts +0 -267
- package/esm/constants/LayoutHints.d.ts +0 -83
- package/esm/constants/Settings.d.ts +0 -32
- package/esm/constants/index.d.ts +0 -3
- package/esm/exceptions/ConfigurationException.d.ts +0 -7
- package/esm/exceptions/FetchException.d.ts +0 -31
- package/esm/exceptions/IllegalArgumentException.d.ts +0 -7
- package/esm/exceptions/IllegalReturnException.d.ts +0 -6
- package/esm/exceptions/IllegalStateException.d.ts +0 -7
- package/esm/exceptions/JsonParseException.d.ts +0 -7
- package/esm/exceptions/MissingPropertyException.d.ts +0 -7
- package/esm/exceptions/NetworkException.d.ts +0 -9
- package/esm/exceptions/NotAllowedUriException.d.ts +0 -7
- package/esm/exceptions/NotFoundException.d.ts +0 -10
- package/esm/exceptions/ServerRequestException.d.ts +0 -7
- package/esm/exceptions/ThemePropertyException.d.ts +0 -7
- package/esm/exceptions/TimeoutException.d.ts +0 -7
- package/esm/exceptions/UnauthorizedException.d.ts +0 -11
- package/esm/exceptions/UnsupportedOperationException.d.ts +0 -7
- package/esm/exceptions/index.d.ts +0 -15
- package/esm/hooks/index.d.ts +0 -16
- package/esm/hooks/useAllFormsOnModel.d.ts +0 -7
- package/esm/hooks/useAuthentication.d.ts +0 -16
- package/esm/hooks/useContent.d.ts +0 -3
- package/esm/hooks/useDeepCompareEffect.d.ts +0 -6
- package/esm/hooks/useForm.d.ts +0 -21
- package/esm/hooks/useI18n.d.ts +0 -13
- package/esm/hooks/useModal.d.ts +0 -12
- package/esm/hooks/useModelCatalog.d.ts +0 -34
- package/esm/hooks/useModels.d.ts +0 -10
- package/esm/hooks/useModularUI.d.ts +0 -3
- package/esm/hooks/useModularUIBasic.d.ts +0 -9
- package/esm/hooks/useModularUIModel.d.ts +0 -27
- package/esm/hooks/useModularUIRequest.d.ts +0 -4
- package/esm/hooks/useNotification.d.ts +0 -8
- package/esm/hooks/usePreference.d.ts +0 -2
- package/esm/hooks/useProgressIndicator.d.ts +0 -9
- package/esm/hooks/useRouter.d.ts +0 -23
- package/esm/i18n/Locale.d.ts +0 -53
- package/esm/i18n/Locales.d.ts +0 -59
- package/esm/i18n/Message.d.ts +0 -6
- package/esm/i18n/index.d.ts +0 -5
- package/esm/i18n/languages.d.ts +0 -215
- package/esm/i18n/translations/beinformed_error_messages_en.nl.d.ts +0 -97
- package/esm/i18n/translations/beinformed_error_messages_nl.nl.d.ts +0 -97
- package/esm/i18n/types.d.ts +0 -11
- package/esm/i18n/withMessage.d.ts +0 -3
- package/esm/index.d.ts +0 -6
- package/esm/models/actions/ActionCollection.d.ts +0 -30
- package/esm/models/actions/ActionModel.d.ts +0 -82
- package/esm/models/application/ApplicationModel.d.ts +0 -48
- package/esm/models/attributes/AttributeCollection.d.ts +0 -102
- package/esm/models/attributes/AttributeContent.d.ts +0 -64
- package/esm/models/attributes/AttributeDataHelper.d.ts +0 -67
- package/esm/models/attributes/AttributeModel.d.ts +0 -398
- package/esm/models/attributes/AttributeSetModel.d.ts +0 -36
- package/esm/models/attributes/BooleanAttributeModel.d.ts +0 -69
- package/esm/models/attributes/CaptchaAttributeModel.d.ts +0 -19
- package/esm/models/attributes/ChoiceAttributeModel.d.ts +0 -85
- package/esm/models/attributes/ChoiceAttributeOptionCollection.d.ts +0 -87
- package/esm/models/attributes/ChoiceAttributeOptionModel.d.ts +0 -151
- package/esm/models/attributes/CompositeAttributeChildCollection.d.ts +0 -57
- package/esm/models/attributes/CompositeAttributeModel.d.ts +0 -42
- package/esm/models/attributes/DatetimeAttributeModel.d.ts +0 -85
- package/esm/models/attributes/HelptextAttributeModel.d.ts +0 -16
- package/esm/models/attributes/LabelAttributeModel.d.ts +0 -12
- package/esm/models/attributes/MemoAttributeModel.d.ts +0 -14
- package/esm/models/attributes/MoneyAttributeModel.d.ts +0 -14
- package/esm/models/attributes/NumberAttributeModel.d.ts +0 -49
- package/esm/models/attributes/PasswordAttributeModel.d.ts +0 -62
- package/esm/models/attributes/StringAttributeModel.d.ts +0 -65
- package/esm/models/attributes/UploadAttributeModel.d.ts +0 -60
- package/esm/models/attributes/XMLAttributeModel.d.ts +0 -10
- package/esm/models/attributes/_createAttribute.d.ts +0 -7
- package/esm/models/attributes/input-constraints/BSNConstraint.d.ts +0 -26
- package/esm/models/attributes/input-constraints/ConstraintCollection.d.ts +0 -24
- package/esm/models/attributes/input-constraints/ConstraintModel.d.ts +0 -34
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +0 -65
- package/esm/models/attributes/input-constraints/DateTimeDateFormatConstraint.d.ts +0 -36
- package/esm/models/attributes/input-constraints/DateTimeTimeFormatConstraint.d.ts +0 -36
- package/esm/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +0 -50
- package/esm/models/attributes/input-constraints/FileExtensionConstraint.d.ts +0 -33
- package/esm/models/attributes/input-constraints/FileSizeConstraint.d.ts +0 -42
- package/esm/models/attributes/input-constraints/IBANConstraint.d.ts +0 -23
- package/esm/models/attributes/input-constraints/MandatoryConstraint.d.ts +0 -23
- package/esm/models/attributes/input-constraints/MandatoryRangeConstraint.d.ts +0 -36
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.d.ts +0 -61
- package/esm/models/attributes/input-constraints/NumberFormatConstraint.d.ts +0 -52
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.d.ts +0 -46
- package/esm/models/attributes/input-constraints/PasswordConfirmConstraint.d.ts +0 -36
- package/esm/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.d.ts +0 -23
- package/esm/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.d.ts +0 -32
- package/esm/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.d.ts +0 -32
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.d.ts +0 -35
- package/esm/models/attributes/input-constraints/RangeConstraint.d.ts +0 -51
- package/esm/models/attributes/input-constraints/RegexConstraint.d.ts +0 -37
- package/esm/models/attributes/input-constraints/StringLengthConstraint.d.ts +0 -46
- package/esm/models/attributes/input-constraints/XMLConstraint.d.ts +0 -26
- package/esm/models/attributes/layouthint-rules/BaseLayoutHintRule.d.ts +0 -45
- package/esm/models/attributes/layouthint-rules/DependentAttribute.d.ts +0 -57
- package/esm/models/attributes/layouthint-rules/LayoutHintRuleCollection.d.ts +0 -27
- package/esm/models/attributes/layouthint-rules/RemainingTotalUploadSize.d.ts +0 -17
- package/esm/models/base/BaseCollection.d.ts +0 -89
- package/esm/models/base/BaseModel.d.ts +0 -78
- package/esm/models/base/ResourceCollection.d.ts +0 -20
- package/esm/models/base/ResourceModel.d.ts +0 -102
- package/esm/models/caseview/CaseViewModel.d.ts +0 -46
- package/esm/models/concepts/BusinessScenarioModel.d.ts +0 -20
- package/esm/models/concepts/ConceptDetailModel.d.ts +0 -86
- package/esm/models/concepts/ConceptIndexModel.d.ts +0 -44
- package/esm/models/concepts/ConceptLinkModel.d.ts +0 -82
- package/esm/models/concepts/ConceptRelationCollection.d.ts +0 -36
- package/esm/models/concepts/ConceptRelationModel.d.ts +0 -61
- package/esm/models/concepts/ConceptTypeDetailModel.d.ts +0 -54
- package/esm/models/concepts/SourceReferenceCollection.d.ts +0 -14
- package/esm/models/concepts/SourceReferenceModel.d.ts +0 -48
- package/esm/models/content/ContentIndexModel.d.ts +0 -41
- package/esm/models/content/ContentLinkModel.d.ts +0 -102
- package/esm/models/content/ContentModel.d.ts +0 -80
- package/esm/models/content/ContentTOCModel.d.ts +0 -56
- package/esm/models/content/ContentTypeModel.d.ts +0 -26
- package/esm/models/content/SectionModel.d.ts +0 -79
- package/esm/models/content/SubSectionModel.d.ts +0 -69
- package/esm/models/contentconfiguration/ContentConfiguration.d.ts +0 -28
- package/esm/models/contentconfiguration/ContentConfigurationElements.d.ts +0 -47
- package/esm/models/contentconfiguration/ContentConfigurationEndResults.d.ts +0 -16
- package/esm/models/contentconfiguration/ContentConfigurationQuestions.d.ts +0 -22
- package/esm/models/contentconfiguration/ContentConfigurationResults.d.ts +0 -39
- package/esm/models/detail/DetailModel.d.ts +0 -80
- package/esm/models/error/ErrorCollection.d.ts +0 -51
- package/esm/models/error/ErrorModel.d.ts +0 -41
- package/esm/models/error/ErrorResponse.d.ts +0 -156
- package/esm/models/filters/AssignmentFilterModel.d.ts +0 -35
- package/esm/models/filters/BaseFilterModel.d.ts +0 -101
- package/esm/models/filters/ConceptIndexFilterModel.d.ts +0 -6
- package/esm/models/filters/FilterCollection.d.ts +0 -49
- package/esm/models/filters/FilterModel.d.ts +0 -5
- package/esm/models/filters/RangeFilterModel.d.ts +0 -6
- package/esm/models/filters/StringFilterModel.d.ts +0 -30
- package/esm/models/form/FormModel.d.ts +0 -350
- package/esm/models/form/FormObjectModel.d.ts +0 -210
- package/esm/models/grouping/GroupingModel.d.ts +0 -86
- package/esm/models/href/Href.d.ts +0 -218
- package/esm/models/href/ListHref.d.ts +0 -64
- package/esm/models/index.d.ts +0 -96
- package/esm/models/layouthint/LayoutHintCollection.d.ts +0 -43
- package/esm/models/links/LinkCollection.d.ts +0 -71
- package/esm/models/links/LinkModel.d.ts +0 -93
- package/esm/models/links/normalizeLinkJSON.d.ts +0 -9
- package/esm/models/list/ListDetailModel.d.ts +0 -69
- package/esm/models/list/ListHeaderModel.d.ts +0 -53
- package/esm/models/list/ListItemCollection.d.ts +0 -21
- package/esm/models/list/ListItemModel.d.ts +0 -35
- package/esm/models/list/ListModel.d.ts +0 -143
- package/esm/models/lookup/LookupOptionCollection.d.ts +0 -15
- package/esm/models/lookup/LookupOptionsModel.d.ts +0 -23
- package/esm/models/modelcatalog/ModelCatalogModel.d.ts +0 -23
- package/esm/models/modelcatalog/ModelCategoryCollection.d.ts +0 -11
- package/esm/models/modelcatalog/ModelCategoryModel.d.ts +0 -39
- package/esm/models/paging/PagesizeModel.d.ts +0 -25
- package/esm/models/paging/PagingModel.d.ts +0 -49
- package/esm/models/panels/GroupingPanelModel.d.ts +0 -49
- package/esm/models/parameter/Parameter.d.ts +0 -40
- package/esm/models/process/ProcessStatusSettingsModel.d.ts +0 -38
- package/esm/models/resolveModel.d.ts +0 -7
- package/esm/models/search/CaseSearchModel.d.ts +0 -14
- package/esm/models/sorting/SortOptionModel.d.ts +0 -48
- package/esm/models/sorting/SortingModel.d.ts +0 -42
- package/esm/models/tab/TabModel.d.ts +0 -53
- package/esm/models/taskgroup/TaskGroupCollection.d.ts +0 -12
- package/esm/models/taskgroup/TaskGroupModel.d.ts +0 -25
- package/esm/models/types.d.ts +0 -171
- package/esm/models/user/UserModel.d.ts +0 -18
- package/esm/models/user/UserProfileModel.d.ts +0 -17
- package/esm/models/user/UserServicesModel.d.ts +0 -39
- package/esm/modularui/Authenticate.d.ts +0 -46
- package/esm/modularui/CaptchaRequest.d.ts +0 -54
- package/esm/modularui/ModularUIError.d.ts +0 -10
- package/esm/modularui/ModularUIRequest.d.ts +0 -207
- package/esm/modularui/ModularUIResponse.d.ts +0 -78
- package/esm/modularui/UploadRequest.d.ts +0 -41
- package/esm/modularui/index.d.ts +0 -5
- package/esm/modularui/types.d.ts +0 -2
- package/esm/react/ErrorBoundary.d.ts +0 -31
- package/esm/react/ErrorBoundaryFallback.d.ts +0 -8
- package/esm/react/index.d.ts +0 -2
- package/esm/react/utils.d.ts +0 -5
- package/esm/react-client/Init.d.ts +0 -6
- package/esm/react-client/client.d.ts +0 -25
- package/esm/react-client/contextPath.d.ts +0 -1
- package/esm/react-client/index.d.ts +0 -3
- package/esm/react-client/rehydrate.d.ts +0 -5
- package/esm/react-server/contextPath.d.ts +0 -1
- package/esm/react-server/createSSRComplete.d.ts +0 -5
- package/esm/react-server/htmlpage.d.ts +0 -11
- package/esm/react-server/index.d.ts +0 -8
- package/esm/react-server/renderSSRComplete.d.ts +0 -13
- package/esm/react-server/renderSSRMinimal.d.ts +0 -11
- package/esm/react-server/requestInformation.d.ts +0 -6
- package/esm/react-server/serverNoSSR.d.ts +0 -15
- package/esm/react-server/serverSSR.d.ts +0 -15
- package/esm/react-server/serverUtil.d.ts +0 -46
- package/esm/react-theme/ThemeProvider.d.ts +0 -8
- package/esm/react-theme/createTheme.d.ts +0 -53
- package/esm/react-theme/index.d.ts +0 -10
- package/esm/react-theme/types.d.ts +0 -13
- package/esm/react-theme/useTheme.d.ts +0 -4
- package/esm/react-theme/utils/background.d.ts +0 -4
- package/esm/react-theme/utils/colors.d.ts +0 -9
- package/esm/react-theme/utils/contrast.d.ts +0 -18
- package/esm/react-theme/utils/corners.d.ts +0 -3
- package/esm/react-theme/utils/spacers.d.ts +0 -9
- package/esm/react-theme/utils/themeProps.d.ts +0 -7
- package/esm/redux/_i18n/I18nActions.d.ts +0 -7
- package/esm/redux/_i18n/I18nReducer.d.ts +0 -7
- package/esm/redux/_i18n/index.d.ts +0 -3
- package/esm/redux/_i18n/types.d.ts +0 -13
- package/esm/redux/_modularui/ModularUIActions.d.ts +0 -26
- package/esm/redux/_modularui/ModularUIConnector.d.ts +0 -7
- package/esm/redux/_modularui/ModularUIMiddleware.d.ts +0 -7
- package/esm/redux/_modularui/ModularUIReducer.d.ts +0 -7
- package/esm/redux/_modularui/ModularUISelectors.d.ts +0 -3
- package/esm/redux/_modularui/ModularUIUtils.d.ts +0 -5
- package/esm/redux/_modularui/index.d.ts +0 -8
- package/esm/redux/_modularui/types.d.ts +0 -84
- package/esm/redux/_modularui/withModularUI.d.ts +0 -3
- package/esm/redux/_router/RouterActions.d.ts +0 -10
- package/esm/redux/_router/RouterConnectors.d.ts +0 -6
- package/esm/redux/_router/RouterMiddleware.d.ts +0 -5
- package/esm/redux/_router/RouterReducer.d.ts +0 -7
- package/esm/redux/_router/index.d.ts +0 -5
- package/esm/redux/_router/types.d.ts +0 -35
- package/esm/redux/actions/Application.d.ts +0 -4
- package/esm/redux/actions/Authorization.d.ts +0 -3
- package/esm/redux/actions/Error.d.ts +0 -7
- package/esm/redux/actions/Form.d.ts +0 -5
- package/esm/redux/actions/FormAttributeSet.d.ts +0 -6
- package/esm/redux/actions/FormAttributeSetRepeatable.d.ts +0 -6
- package/esm/redux/actions/FormAutosave.d.ts +0 -3
- package/esm/redux/actions/FormAutosubmit.d.ts +0 -4
- package/esm/redux/actions/FormAutoupdate.d.ts +0 -4
- package/esm/redux/actions/FormValidations.d.ts +0 -3
- package/esm/redux/actions/Modals.d.ts +0 -4
- package/esm/redux/actions/ModelCatalog.d.ts +0 -2
- package/esm/redux/actions/Notification.d.ts +0 -10
- package/esm/redux/actions/Preferences.d.ts +0 -11
- package/esm/redux/actions/ProgressIndicator.d.ts +0 -8
- package/esm/redux/actions/SignIn.d.ts +0 -10
- package/esm/redux/actions/SignOut.d.ts +0 -4
- package/esm/redux/actions/index.d.ts +0 -16
- package/esm/redux/connectors/Application.d.ts +0 -4
- package/esm/redux/connectors/Breadcrumb.d.ts +0 -3
- package/esm/redux/connectors/CaseView.d.ts +0 -4
- package/esm/redux/connectors/ConceptDetail.d.ts +0 -4
- package/esm/redux/connectors/ContentBrowser.d.ts +0 -4
- package/esm/redux/connectors/ContentDetail.d.ts +0 -4
- package/esm/redux/connectors/ContentDetailSection.d.ts +0 -4
- package/esm/redux/connectors/Form.d.ts +0 -16
- package/esm/redux/connectors/FormAttributeSet.d.ts +0 -5
- package/esm/redux/connectors/ListDetail.d.ts +0 -4
- package/esm/redux/connectors/Modal.d.ts +0 -4
- package/esm/redux/connectors/ModelCatalog.d.ts +0 -4
- package/esm/redux/connectors/Notification.d.ts +0 -4
- package/esm/redux/connectors/PanelRenderer.d.ts +0 -4
- package/esm/redux/connectors/Preferences.d.ts +0 -2
- package/esm/redux/connectors/Progress.d.ts +0 -3
- package/esm/redux/connectors/ProgressIndicator.d.ts +0 -3
- package/esm/redux/connectors/QuickSearch.d.ts +0 -11
- package/esm/redux/connectors/SignIn.d.ts +0 -4
- package/esm/redux/connectors/SignOut.d.ts +0 -4
- package/esm/redux/connectors/Tab.d.ts +0 -4
- package/esm/redux/connectors/index.d.ts +0 -21
- package/esm/redux/index.d.ts +0 -9
- package/esm/redux/reducers/AuthReducer.d.ts +0 -8
- package/esm/redux/reducers/ErrorReducer.d.ts +0 -8
- package/esm/redux/reducers/ModalsReducer.d.ts +0 -8
- package/esm/redux/reducers/ModelCatalogReducer.d.ts +0 -8
- package/esm/redux/reducers/NotificationReducer.d.ts +0 -8
- package/esm/redux/reducers/PreferencesReducer.d.ts +0 -8
- package/esm/redux/reducers/ProgressIndicatorReducer.d.ts +0 -8
- package/esm/redux/reducers/createReducer.d.ts +0 -14
- package/esm/redux/reducers/index.d.ts +0 -8
- package/esm/redux/selectors/i18n.d.ts +0 -4
- package/esm/redux/selectors/index.d.ts +0 -2
- package/esm/redux/selectors/modelcatalog.d.ts +0 -2
- package/esm/redux/store/beforeRenderHooks.d.ts +0 -7
- package/esm/redux/store/configureStore.d.ts +0 -9
- package/esm/redux/types.d.ts +0 -113
- package/esm/utils/browser/Cache.d.ts +0 -45
- package/esm/utils/browser/Cookies.d.ts +0 -9
- package/esm/utils/datetime/DateTimeUtil.d.ts +0 -214
- package/esm/utils/fetch/__mocks__/universalFetch.d.ts +0 -3
- package/esm/utils/fetch/serverFetch.d.ts +0 -5
- package/esm/utils/fetch/types.d.ts +0 -44
- package/esm/utils/fetch/universalFetch.d.ts +0 -7
- package/esm/utils/fetch/xhr.d.ts +0 -5
- package/esm/utils/helpers/checkResource.d.ts +0 -3
- package/esm/utils/helpers/createHash.d.ts +0 -9
- package/esm/utils/helpers/createHref.d.ts +0 -8
- package/esm/utils/helpers/createUUID.d.ts +0 -4
- package/esm/utils/helpers/index.d.ts +0 -8
- package/esm/utils/helpers/objects.d.ts +0 -11
- package/esm/utils/helpers/repositoryResource.d.ts +0 -1
- package/esm/utils/helpers/sanitizeHtml.d.ts +0 -9
- package/esm/utils/helpers/text.d.ts +0 -7
- package/esm/utils/index.d.ts +0 -11
- package/esm/utils/number/DecimalFormat.d.ts +0 -90
- package/esm/utils/number/formatValue.d.ts +0 -4
- package/esm/utils/number/parseNumbers.d.ts +0 -9
- package/lib/builder/index.d.ts +0 -1
- package/lib/builder/mergeLayoutHintConfigurations.d.ts +0 -1
- package/lib/constants/Constants.d.ts +0 -158
- package/lib/constants/LayoutHintConfig.d.ts +0 -267
- package/lib/constants/LayoutHints.d.ts +0 -83
- package/lib/constants/Settings.d.ts +0 -32
- package/lib/constants/index.d.ts +0 -3
- package/lib/exceptions/ConfigurationException.d.ts +0 -7
- package/lib/exceptions/FetchException.d.ts +0 -31
- package/lib/exceptions/IllegalArgumentException.d.ts +0 -7
- package/lib/exceptions/IllegalReturnException.d.ts +0 -6
- package/lib/exceptions/IllegalStateException.d.ts +0 -7
- package/lib/exceptions/JsonParseException.d.ts +0 -7
- package/lib/exceptions/MissingPropertyException.d.ts +0 -7
- package/lib/exceptions/NetworkException.d.ts +0 -9
- package/lib/exceptions/NotAllowedUriException.d.ts +0 -7
- package/lib/exceptions/NotFoundException.d.ts +0 -10
- package/lib/exceptions/ServerRequestException.d.ts +0 -7
- package/lib/exceptions/ThemePropertyException.d.ts +0 -7
- package/lib/exceptions/TimeoutException.d.ts +0 -7
- package/lib/exceptions/UnauthorizedException.d.ts +0 -11
- package/lib/exceptions/UnsupportedOperationException.d.ts +0 -7
- package/lib/exceptions/index.d.ts +0 -15
- package/lib/hooks/index.d.ts +0 -16
- package/lib/hooks/useAllFormsOnModel.d.ts +0 -7
- package/lib/hooks/useAuthentication.d.ts +0 -16
- package/lib/hooks/useContent.d.ts +0 -3
- package/lib/hooks/useDeepCompareEffect.d.ts +0 -6
- package/lib/hooks/useForm.d.ts +0 -21
- package/lib/hooks/useI18n.d.ts +0 -13
- package/lib/hooks/useModal.d.ts +0 -12
- package/lib/hooks/useModelCatalog.d.ts +0 -34
- package/lib/hooks/useModels.d.ts +0 -10
- package/lib/hooks/useModularUI.d.ts +0 -3
- package/lib/hooks/useModularUIBasic.d.ts +0 -9
- package/lib/hooks/useModularUIModel.d.ts +0 -27
- package/lib/hooks/useModularUIRequest.d.ts +0 -4
- package/lib/hooks/useNotification.d.ts +0 -8
- package/lib/hooks/usePreference.d.ts +0 -2
- package/lib/hooks/useProgressIndicator.d.ts +0 -9
- package/lib/hooks/useRouter.d.ts +0 -23
- package/lib/i18n/Locale.d.ts +0 -53
- package/lib/i18n/Locales.d.ts +0 -59
- package/lib/i18n/Message.d.ts +0 -6
- package/lib/i18n/index.d.ts +0 -5
- package/lib/i18n/languages.d.ts +0 -215
- package/lib/i18n/translations/beinformed_error_messages_en.nl.d.ts +0 -97
- package/lib/i18n/translations/beinformed_error_messages_nl.nl.d.ts +0 -97
- package/lib/i18n/types.d.ts +0 -11
- package/lib/i18n/withMessage.d.ts +0 -3
- package/lib/index.d.ts +0 -6
- package/lib/models/actions/ActionCollection.d.ts +0 -30
- package/lib/models/actions/ActionModel.d.ts +0 -82
- package/lib/models/application/ApplicationModel.d.ts +0 -48
- package/lib/models/attributes/AttributeCollection.d.ts +0 -102
- package/lib/models/attributes/AttributeContent.d.ts +0 -64
- package/lib/models/attributes/AttributeDataHelper.d.ts +0 -67
- package/lib/models/attributes/AttributeModel.d.ts +0 -398
- package/lib/models/attributes/AttributeSetModel.d.ts +0 -36
- package/lib/models/attributes/BooleanAttributeModel.d.ts +0 -69
- package/lib/models/attributes/CaptchaAttributeModel.d.ts +0 -19
- package/lib/models/attributes/ChoiceAttributeModel.d.ts +0 -85
- package/lib/models/attributes/ChoiceAttributeOptionCollection.d.ts +0 -87
- package/lib/models/attributes/ChoiceAttributeOptionModel.d.ts +0 -151
- package/lib/models/attributes/CompositeAttributeChildCollection.d.ts +0 -57
- package/lib/models/attributes/CompositeAttributeModel.d.ts +0 -42
- package/lib/models/attributes/DatetimeAttributeModel.d.ts +0 -85
- package/lib/models/attributes/HelptextAttributeModel.d.ts +0 -16
- package/lib/models/attributes/LabelAttributeModel.d.ts +0 -12
- package/lib/models/attributes/MemoAttributeModel.d.ts +0 -14
- package/lib/models/attributes/MoneyAttributeModel.d.ts +0 -14
- package/lib/models/attributes/NumberAttributeModel.d.ts +0 -49
- package/lib/models/attributes/PasswordAttributeModel.d.ts +0 -62
- package/lib/models/attributes/StringAttributeModel.d.ts +0 -65
- package/lib/models/attributes/UploadAttributeModel.d.ts +0 -60
- package/lib/models/attributes/XMLAttributeModel.d.ts +0 -10
- package/lib/models/attributes/_createAttribute.d.ts +0 -7
- package/lib/models/attributes/input-constraints/BSNConstraint.d.ts +0 -26
- package/lib/models/attributes/input-constraints/ConstraintCollection.d.ts +0 -24
- package/lib/models/attributes/input-constraints/ConstraintModel.d.ts +0 -34
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +0 -65
- package/lib/models/attributes/input-constraints/DateTimeDateFormatConstraint.d.ts +0 -36
- package/lib/models/attributes/input-constraints/DateTimeTimeFormatConstraint.d.ts +0 -36
- package/lib/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +0 -50
- package/lib/models/attributes/input-constraints/FileExtensionConstraint.d.ts +0 -33
- package/lib/models/attributes/input-constraints/FileSizeConstraint.d.ts +0 -42
- package/lib/models/attributes/input-constraints/IBANConstraint.d.ts +0 -23
- package/lib/models/attributes/input-constraints/MandatoryConstraint.d.ts +0 -23
- package/lib/models/attributes/input-constraints/MandatoryRangeConstraint.d.ts +0 -36
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.d.ts +0 -61
- package/lib/models/attributes/input-constraints/NumberFormatConstraint.d.ts +0 -52
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.d.ts +0 -46
- package/lib/models/attributes/input-constraints/PasswordConfirmConstraint.d.ts +0 -36
- package/lib/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.d.ts +0 -23
- package/lib/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.d.ts +0 -32
- package/lib/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.d.ts +0 -32
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.d.ts +0 -35
- package/lib/models/attributes/input-constraints/RangeConstraint.d.ts +0 -51
- package/lib/models/attributes/input-constraints/RegexConstraint.d.ts +0 -37
- package/lib/models/attributes/input-constraints/StringLengthConstraint.d.ts +0 -46
- package/lib/models/attributes/input-constraints/XMLConstraint.d.ts +0 -26
- package/lib/models/attributes/layouthint-rules/BaseLayoutHintRule.d.ts +0 -45
- package/lib/models/attributes/layouthint-rules/DependentAttribute.d.ts +0 -57
- package/lib/models/attributes/layouthint-rules/LayoutHintRuleCollection.d.ts +0 -27
- package/lib/models/attributes/layouthint-rules/RemainingTotalUploadSize.d.ts +0 -17
- package/lib/models/base/BaseCollection.d.ts +0 -89
- package/lib/models/base/BaseModel.d.ts +0 -78
- package/lib/models/base/ResourceCollection.d.ts +0 -20
- package/lib/models/base/ResourceModel.d.ts +0 -102
- package/lib/models/caseview/CaseViewModel.d.ts +0 -46
- package/lib/models/concepts/BusinessScenarioModel.d.ts +0 -20
- package/lib/models/concepts/ConceptDetailModel.d.ts +0 -86
- package/lib/models/concepts/ConceptIndexModel.d.ts +0 -44
- package/lib/models/concepts/ConceptLinkModel.d.ts +0 -82
- package/lib/models/concepts/ConceptRelationCollection.d.ts +0 -36
- package/lib/models/concepts/ConceptRelationModel.d.ts +0 -61
- package/lib/models/concepts/ConceptTypeDetailModel.d.ts +0 -54
- package/lib/models/concepts/SourceReferenceCollection.d.ts +0 -14
- package/lib/models/concepts/SourceReferenceModel.d.ts +0 -48
- package/lib/models/content/ContentIndexModel.d.ts +0 -41
- package/lib/models/content/ContentLinkModel.d.ts +0 -102
- package/lib/models/content/ContentModel.d.ts +0 -80
- package/lib/models/content/ContentTOCModel.d.ts +0 -56
- package/lib/models/content/ContentTypeModel.d.ts +0 -26
- package/lib/models/content/SectionModel.d.ts +0 -79
- package/lib/models/content/SubSectionModel.d.ts +0 -69
- package/lib/models/contentconfiguration/ContentConfiguration.d.ts +0 -28
- package/lib/models/contentconfiguration/ContentConfigurationElements.d.ts +0 -47
- package/lib/models/contentconfiguration/ContentConfigurationEndResults.d.ts +0 -16
- package/lib/models/contentconfiguration/ContentConfigurationQuestions.d.ts +0 -22
- package/lib/models/contentconfiguration/ContentConfigurationResults.d.ts +0 -39
- package/lib/models/detail/DetailModel.d.ts +0 -80
- package/lib/models/error/ErrorCollection.d.ts +0 -51
- package/lib/models/error/ErrorModel.d.ts +0 -41
- package/lib/models/error/ErrorResponse.d.ts +0 -156
- package/lib/models/filters/AssignmentFilterModel.d.ts +0 -35
- package/lib/models/filters/BaseFilterModel.d.ts +0 -101
- package/lib/models/filters/ConceptIndexFilterModel.d.ts +0 -6
- package/lib/models/filters/FilterCollection.d.ts +0 -49
- package/lib/models/filters/FilterModel.d.ts +0 -5
- package/lib/models/filters/RangeFilterModel.d.ts +0 -6
- package/lib/models/filters/StringFilterModel.d.ts +0 -30
- package/lib/models/form/FormModel.d.ts +0 -350
- package/lib/models/form/FormObjectModel.d.ts +0 -210
- package/lib/models/grouping/GroupingModel.d.ts +0 -86
- package/lib/models/href/Href.d.ts +0 -218
- package/lib/models/href/ListHref.d.ts +0 -64
- package/lib/models/index.d.ts +0 -96
- package/lib/models/layouthint/LayoutHintCollection.d.ts +0 -43
- package/lib/models/links/LinkCollection.d.ts +0 -71
- package/lib/models/links/LinkModel.d.ts +0 -93
- package/lib/models/links/normalizeLinkJSON.d.ts +0 -9
- package/lib/models/list/ListDetailModel.d.ts +0 -69
- package/lib/models/list/ListHeaderModel.d.ts +0 -53
- package/lib/models/list/ListItemCollection.d.ts +0 -21
- package/lib/models/list/ListItemModel.d.ts +0 -35
- package/lib/models/list/ListModel.d.ts +0 -143
- package/lib/models/lookup/LookupOptionCollection.d.ts +0 -15
- package/lib/models/lookup/LookupOptionsModel.d.ts +0 -23
- package/lib/models/modelcatalog/ModelCatalogModel.d.ts +0 -23
- package/lib/models/modelcatalog/ModelCategoryCollection.d.ts +0 -11
- package/lib/models/modelcatalog/ModelCategoryModel.d.ts +0 -39
- package/lib/models/paging/PagesizeModel.d.ts +0 -25
- package/lib/models/paging/PagingModel.d.ts +0 -49
- package/lib/models/panels/GroupingPanelModel.d.ts +0 -49
- package/lib/models/parameter/Parameter.d.ts +0 -40
- package/lib/models/process/ProcessStatusSettingsModel.d.ts +0 -38
- package/lib/models/resolveModel.d.ts +0 -7
- package/lib/models/search/CaseSearchModel.d.ts +0 -14
- package/lib/models/sorting/SortOptionModel.d.ts +0 -48
- package/lib/models/sorting/SortingModel.d.ts +0 -42
- package/lib/models/tab/TabModel.d.ts +0 -53
- package/lib/models/taskgroup/TaskGroupCollection.d.ts +0 -12
- package/lib/models/taskgroup/TaskGroupModel.d.ts +0 -25
- package/lib/models/types.d.ts +0 -171
- package/lib/models/user/UserModel.d.ts +0 -18
- package/lib/models/user/UserProfileModel.d.ts +0 -17
- package/lib/models/user/UserServicesModel.d.ts +0 -39
- package/lib/modularui/Authenticate.d.ts +0 -46
- package/lib/modularui/CaptchaRequest.d.ts +0 -54
- package/lib/modularui/ModularUIError.d.ts +0 -10
- package/lib/modularui/ModularUIRequest.d.ts +0 -207
- package/lib/modularui/ModularUIResponse.d.ts +0 -78
- package/lib/modularui/UploadRequest.d.ts +0 -41
- package/lib/modularui/index.d.ts +0 -5
- package/lib/modularui/types.d.ts +0 -2
- package/lib/react/ErrorBoundary.d.ts +0 -31
- package/lib/react/ErrorBoundaryFallback.d.ts +0 -8
- package/lib/react/index.d.ts +0 -2
- package/lib/react/utils.d.ts +0 -5
- package/lib/react-client/Init.d.ts +0 -6
- package/lib/react-client/client.d.ts +0 -25
- package/lib/react-client/contextPath.d.ts +0 -1
- package/lib/react-client/index.d.ts +0 -3
- package/lib/react-client/rehydrate.d.ts +0 -5
- package/lib/react-server/contextPath.d.ts +0 -1
- package/lib/react-server/createSSRComplete.d.ts +0 -5
- package/lib/react-server/htmlpage.d.ts +0 -11
- package/lib/react-server/index.d.ts +0 -8
- package/lib/react-server/renderSSRComplete.d.ts +0 -13
- package/lib/react-server/renderSSRMinimal.d.ts +0 -11
- package/lib/react-server/requestInformation.d.ts +0 -6
- package/lib/react-server/serverNoSSR.d.ts +0 -15
- package/lib/react-server/serverSSR.d.ts +0 -15
- package/lib/react-server/serverUtil.d.ts +0 -46
- package/lib/react-theme/ThemeProvider.d.ts +0 -8
- package/lib/react-theme/createTheme.d.ts +0 -53
- package/lib/react-theme/index.d.ts +0 -10
- package/lib/react-theme/types.d.ts +0 -13
- package/lib/react-theme/useTheme.d.ts +0 -4
- package/lib/react-theme/utils/background.d.ts +0 -4
- package/lib/react-theme/utils/colors.d.ts +0 -9
- package/lib/react-theme/utils/contrast.d.ts +0 -18
- package/lib/react-theme/utils/corners.d.ts +0 -3
- package/lib/react-theme/utils/spacers.d.ts +0 -9
- package/lib/react-theme/utils/themeProps.d.ts +0 -7
- package/lib/redux/_i18n/I18nActions.d.ts +0 -7
- package/lib/redux/_i18n/I18nReducer.d.ts +0 -7
- package/lib/redux/_i18n/index.d.ts +0 -3
- package/lib/redux/_i18n/types.d.ts +0 -13
- package/lib/redux/_modularui/ModularUIActions.d.ts +0 -26
- package/lib/redux/_modularui/ModularUIConnector.d.ts +0 -7
- package/lib/redux/_modularui/ModularUIMiddleware.d.ts +0 -7
- package/lib/redux/_modularui/ModularUIReducer.d.ts +0 -7
- package/lib/redux/_modularui/ModularUISelectors.d.ts +0 -3
- package/lib/redux/_modularui/ModularUIUtils.d.ts +0 -5
- package/lib/redux/_modularui/index.d.ts +0 -8
- package/lib/redux/_modularui/types.d.ts +0 -84
- package/lib/redux/_modularui/withModularUI.d.ts +0 -3
- package/lib/redux/_router/RouterActions.d.ts +0 -10
- package/lib/redux/_router/RouterConnectors.d.ts +0 -6
- package/lib/redux/_router/RouterMiddleware.d.ts +0 -5
- package/lib/redux/_router/RouterReducer.d.ts +0 -7
- package/lib/redux/_router/index.d.ts +0 -5
- package/lib/redux/_router/types.d.ts +0 -35
- package/lib/redux/actions/Application.d.ts +0 -4
- package/lib/redux/actions/Authorization.d.ts +0 -3
- package/lib/redux/actions/Error.d.ts +0 -7
- package/lib/redux/actions/Form.d.ts +0 -5
- package/lib/redux/actions/FormAttributeSet.d.ts +0 -6
- package/lib/redux/actions/FormAttributeSetRepeatable.d.ts +0 -6
- package/lib/redux/actions/FormAutosave.d.ts +0 -3
- package/lib/redux/actions/FormAutosubmit.d.ts +0 -4
- package/lib/redux/actions/FormAutoupdate.d.ts +0 -4
- package/lib/redux/actions/FormValidations.d.ts +0 -3
- package/lib/redux/actions/Modals.d.ts +0 -4
- package/lib/redux/actions/ModelCatalog.d.ts +0 -2
- package/lib/redux/actions/Notification.d.ts +0 -10
- package/lib/redux/actions/Preferences.d.ts +0 -11
- package/lib/redux/actions/ProgressIndicator.d.ts +0 -8
- package/lib/redux/actions/SignIn.d.ts +0 -10
- package/lib/redux/actions/SignOut.d.ts +0 -4
- package/lib/redux/actions/index.d.ts +0 -16
- package/lib/redux/connectors/Application.d.ts +0 -4
- package/lib/redux/connectors/Breadcrumb.d.ts +0 -3
- package/lib/redux/connectors/CaseView.d.ts +0 -4
- package/lib/redux/connectors/ConceptDetail.d.ts +0 -4
- package/lib/redux/connectors/ContentBrowser.d.ts +0 -4
- package/lib/redux/connectors/ContentDetail.d.ts +0 -4
- package/lib/redux/connectors/ContentDetailSection.d.ts +0 -4
- package/lib/redux/connectors/Form.d.ts +0 -16
- package/lib/redux/connectors/FormAttributeSet.d.ts +0 -5
- package/lib/redux/connectors/ListDetail.d.ts +0 -4
- package/lib/redux/connectors/Modal.d.ts +0 -4
- package/lib/redux/connectors/ModelCatalog.d.ts +0 -4
- package/lib/redux/connectors/Notification.d.ts +0 -4
- package/lib/redux/connectors/PanelRenderer.d.ts +0 -4
- package/lib/redux/connectors/Preferences.d.ts +0 -2
- package/lib/redux/connectors/Progress.d.ts +0 -3
- package/lib/redux/connectors/ProgressIndicator.d.ts +0 -3
- package/lib/redux/connectors/QuickSearch.d.ts +0 -11
- package/lib/redux/connectors/SignIn.d.ts +0 -4
- package/lib/redux/connectors/SignOut.d.ts +0 -4
- package/lib/redux/connectors/Tab.d.ts +0 -4
- package/lib/redux/connectors/index.d.ts +0 -21
- package/lib/redux/index.d.ts +0 -9
- package/lib/redux/reducers/AuthReducer.d.ts +0 -8
- package/lib/redux/reducers/ErrorReducer.d.ts +0 -8
- package/lib/redux/reducers/ModalsReducer.d.ts +0 -8
- package/lib/redux/reducers/ModelCatalogReducer.d.ts +0 -8
- package/lib/redux/reducers/NotificationReducer.d.ts +0 -8
- package/lib/redux/reducers/PreferencesReducer.d.ts +0 -8
- package/lib/redux/reducers/ProgressIndicatorReducer.d.ts +0 -8
- package/lib/redux/reducers/createReducer.d.ts +0 -14
- package/lib/redux/reducers/index.d.ts +0 -8
- package/lib/redux/selectors/i18n.d.ts +0 -4
- package/lib/redux/selectors/index.d.ts +0 -2
- package/lib/redux/selectors/modelcatalog.d.ts +0 -2
- package/lib/redux/store/beforeRenderHooks.d.ts +0 -7
- package/lib/redux/store/configureStore.d.ts +0 -9
- package/lib/redux/types.d.ts +0 -113
- package/lib/utils/browser/Cache.d.ts +0 -45
- package/lib/utils/browser/Cookies.d.ts +0 -9
- package/lib/utils/datetime/DateTimeUtil.d.ts +0 -214
- package/lib/utils/fetch/__mocks__/universalFetch.d.ts +0 -3
- package/lib/utils/fetch/serverFetch.d.ts +0 -5
- package/lib/utils/fetch/types.d.ts +0 -44
- package/lib/utils/fetch/universalFetch.d.ts +0 -7
- package/lib/utils/fetch/xhr.d.ts +0 -5
- package/lib/utils/helpers/checkResource.d.ts +0 -3
- package/lib/utils/helpers/createHash.d.ts +0 -9
- package/lib/utils/helpers/createHref.d.ts +0 -8
- package/lib/utils/helpers/createUUID.d.ts +0 -4
- package/lib/utils/helpers/index.d.ts +0 -8
- package/lib/utils/helpers/objects.d.ts +0 -11
- package/lib/utils/helpers/repositoryResource.d.ts +0 -1
- package/lib/utils/helpers/sanitizeHtml.d.ts +0 -9
- package/lib/utils/helpers/text.d.ts +0 -7
- package/lib/utils/index.d.ts +0 -11
- package/lib/utils/number/DecimalFormat.d.ts +0 -90
- package/lib/utils/number/formatValue.d.ts +0 -4
- package/lib/utils/number/parseNumbers.d.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeUtil.js","names":["_format","require","_isAfter","_isBefore","_isSameDay","_isValid","_parse","_add","_sub","_set","_startOfMonth","_endOfMonth","_startOfWeek","_getHours","_getMinutes","_getDay","_getWeek","_locale","_tz","_timezoneSoft","_interopRequireDefault","_constants","_Cookies","BaseDateTimeUtil","constructor","isoFormat","doOffsets","arguments","length","undefined","_defineProperty2","default","Intl","DateTimeFormat","resolvedOptions","timeZone","_isoFormat","_doOffsets","isIncludeTimeOffsetInDateTimes","getOptions","weekStartsOn","getSetting","DEFAULT_WEEK_STARTS_ON","firstWeekContainsDate","DEFAULT_FIRST_WEEK_CONTAINS_DATE","getIsoFormat","DATETIME_OFFSET_FORMAT","convertFormat","javaFormat","_context","javaToUTS35Map","ZZZ","ZZ","Z","uts35Format","sortedKeys","_sort","_keys","call","a","b","javaToken","uts35Token","regex","RegExp","replace","getLocale","locale","getCookie","nl","enGB","toDate","date","inputFormat","Date","parse","in","getDateFnsContext","toFormat","targetFormat","parsedDate","isValid","format","toISO","sourceFormat","now","hasFormat","formattedValue","isOutsideRange","isBefore","isAfter","toUpperCase","inputDate","afterISODate","isSameOrAfter","isSame","beforeISODate","isSameOrBefore","compareDate","getTime","isSameDay","isOther","isWeekend","SATURDAY_NUMBER","SUNDAY_NUMBER","weekDay","getDay","isAmbiguous","dateTime","t","_map","x","newDate","add","minutes","time","indexOf","_calculate","calculationFn","property","value","addSeconds","amount","addMinutes","addHours","addDays","addWeeks","addMonths","addYears","subtractSeconds","sub","subtractMinutes","subtractHours","subtractDays","subtractWeeks","subtractMonths","subtractYears","_get","method","options","startOfMonth","endOfMonth","startOfWeek","getHours","getMinutes","getWeek","set","setYear","year","setMonth","month","setDay","day","setHour","hour","setMinute","minute","setSecond","second","setMilliseconds","millisecond","setTime","hours","seconds","milliseconds","getTimeZone","_timeZone","setTimeZone","IS_GRAALJS","tz","getOffset","dateOffset","offsets","getTimezoneOffsets","daylight","standard","createOffsetObject","info","_context2","_context3","sign","offset","absOffset","Math","abs","_trunc","round","offsetString","_padStart","String","label","name","abbr","timezone","soft","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 { format } from \"date-fns/format\";\nimport { isAfter } from \"date-fns/isAfter\";\nimport { isBefore } from \"date-fns/isBefore\";\nimport { isSameDay } from \"date-fns/isSameDay\";\nimport { isValid } from \"date-fns/isValid\";\nimport { parse } from \"date-fns/parse\";\nimport { add } from \"date-fns/add\";\nimport { sub } from \"date-fns/sub\";\nimport { set } from \"date-fns/set\";\nimport { startOfMonth } from \"date-fns/startOfMonth\";\nimport { endOfMonth } from \"date-fns/endOfMonth\";\nimport { startOfWeek } from \"date-fns/startOfWeek\";\nimport { getHours } from \"date-fns/getHours\";\nimport { getMinutes } from \"date-fns/getMinutes\";\nimport { getDay } from \"date-fns/getDay\";\nimport { getWeek } from \"date-fns/getWeek\";\n\nimport { enGB, nl } from \"date-fns/locale\";\nimport { tz } from \"@date-fns/tz\";\n\nimport soft from \"timezone-soft\";\n\nimport {\n DATETIME_OFFSET_FORMAT,\n DEFAULT_FIRST_WEEK_CONTAINS_DATE,\n DEFAULT_WEEK_STARTS_ON,\n getSetting,\n IS_GRAALJS,\n isIncludeTimeOffsetInDateTimes,\n ISO_DATE_FORMAT,\n ISO_DATETIME_FORMAT,\n ISO_TIME_FORMAT,\n ISO_TIMESTAMP_FORMAT,\n} from \"../../constants\";\n\nimport { getCookie } from \"../browser/Cookies\";\n\ntype OffsetInfoInput = {\n abbr: string,\n offset: number,\n name: string,\n};\n\nexport type OffsetInfo = {\n abbr: string,\n label: string,\n value: string,\n};\n\n/**\n * @hideconstructor\n */\nclass BaseDateTimeUtil {\n _isoFormat: string;\n _doOffsets: boolean;\n\n _timeZone: string =\n typeof Intl === \"undefined\"\n ? \"Etc/UTC\"\n : Intl.DateTimeFormat().resolvedOptions().timeZone || \"Etc/UTC\";\n\n constructor(isoFormat: string, doOffsets: boolean = false) {\n this._isoFormat = isoFormat;\n this._doOffsets = doOffsets;\n }\n\n /**\n * Indicates if offsets and timezones are relevant\n */\n get doOffsets(): boolean {\n return this._doOffsets ? isIncludeTimeOffsetInDateTimes() : false;\n }\n\n /**\n * Returns the options defined in settings\n */\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 getIsoFormat(): string {\n if (this.doOffsets) {\n return this._isoFormat + DATETIME_OFFSET_FORMAT;\n }\n return this._isoFormat;\n }\n\n /**\n */\n convertFormat(javaFormat: string): string {\n if (!javaFormat) {\n return this.getIsoFormat();\n }\n\n const javaToUTS35Map = {\n ZZZ: \"xxx\",\n ZZ: \"xx\",\n Z: \"x\",\n };\n\n // Replace Java pattern tokens with UTS #35 tokens\n let uts35Format = javaFormat;\n\n // Sort keys by length (descending) to handle multi-character tokens first\n const sortedKeys = Object.keys(javaToUTS35Map).sort(\n (a, b) => b.length - a.length,\n );\n\n for (const javaToken of sortedKeys) {\n const uts35Token = javaToUTS35Map[javaToken];\n const regex = new RegExp(javaToken, \"g\"); // Match all occurrences\n uts35Format = uts35Format.replace(regex, uts35Token);\n }\n\n return uts35Format;\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 /**\n */\n toDate(date: string | Date, inputFormat: string = this.getIsoFormat()): Date {\n if (date instanceof Date) {\n return date;\n }\n\n const { weekStartsOn, firstWeekContainsDate } = this.getOptions();\n\n return parse(date, inputFormat, new Date(), {\n in: this.getDateFnsContext(),\n weekStartsOn,\n firstWeekContainsDate,\n });\n }\n\n /**\n */\n toFormat(\n date: string | Date,\n targetFormat: string,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const { weekStartsOn } = this.getOptions();\n\n const parsedDate = this.toDate(date, inputFormat);\n\n if (isValid(parsedDate)) {\n return format(parsedDate, targetFormat, {\n in: this.getDateFnsContext(),\n weekStartsOn,\n locale: this.getLocale(),\n });\n }\n\n return \"Invalid Date\";\n }\n\n /**\n */\n toISO(\n date: string | Date,\n sourceFormat: string = this.getIsoFormat(),\n ): string {\n return this.toFormat(date, this.getIsoFormat(), sourceFormat);\n }\n\n /**\n */\n now(): string {\n return this.toISO(new Date());\n }\n\n //////////// VALIDATION\n\n /**\n */\n hasFormat(date: string, sourceFormat: string): boolean {\n const parsedDate = this.toDate(date, sourceFormat);\n\n const formattedValue = this.toFormat(parsedDate, sourceFormat);\n if (formattedValue === \"Invalid Date\") {\n return false;\n }\n\n const isOutsideRange =\n isBefore(parsedDate, new Date(1000, 1, 1)) ||\n isAfter(parsedDate, 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 /**\n */\n isValid(\n date: string | Date | null | void,\n inputFormat: string = this.getIsoFormat(),\n ): boolean {\n if (!date) {\n return false;\n }\n\n const parsedDate = this.toDate(date, inputFormat);\n return isValid(parsedDate);\n }\n\n /**\n */\n isAfter(\n inputDate: string | Date,\n afterISODate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n afterISODate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n beforeISODate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n beforeISODate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n compareDate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n compareDate: string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n compareDate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): boolean {\n return !this.isSame(inputDate, compareDate, inputFormat);\n }\n\n /**\n */\n isWeekend(inputDate: string | Date): 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 * Checks if a given local date and time is ambiguous in the specified timezone.\n * Ambiguity happens during the end of daylight saving time (DST) transitions.\n */\n isAmbiguous(\n inputDate: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): boolean {\n if (inputDate == null || typeof Intl === \"undefined\") {\n return false;\n }\n\n const dateTime = this.toDate(inputDate, inputFormat);\n if (!isValid(dateTime)) {\n return false;\n }\n\n const t = [60, -60, 30, -30];\n const a = t.map((x) => {\n const newDate = add(dateTime, { minutes: x });\n return format(newDate, \"HH:mm\");\n });\n const time = format(dateTime, \"HH:mm\");\n return a.indexOf(time) > -1;\n }\n\n //////////// CALCULATIONS\n\n /**\n * @private\n */\n _calculate(\n date: string | Date,\n calculationFn: Function,\n property: string,\n value: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const parsedDate = this.toDate(date, inputFormat);\n return this.toISO(\n calculationFn(\n parsedDate,\n { [property]: value },\n {\n in: this.getDateFnsContext(),\n },\n ),\n );\n }\n\n /**\n */\n addSeconds(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"seconds\", amount, inputFormat);\n }\n\n /**\n */\n addMinutes(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"minutes\", amount, inputFormat);\n }\n\n /**\n */\n addHours(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"hours\", amount, inputFormat);\n }\n\n /**\n */\n addDays(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"days\", amount, inputFormat);\n }\n\n /**\n */\n addWeeks(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"weeks\", amount, inputFormat);\n }\n\n /**\n */\n addMonths(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"months\", amount, inputFormat);\n }\n\n /**\n */\n addYears(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"years\", amount, inputFormat);\n }\n\n /**\n */\n subtractSeconds(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"seconds\", amount, inputFormat);\n }\n\n /**\n */\n subtractMinutes(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"minutes\", amount, inputFormat);\n }\n\n /**\n */\n subtractHours(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"hours\", amount, inputFormat);\n }\n\n /**\n */\n subtractDays(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"days\", amount, inputFormat);\n }\n\n /**\n */\n subtractWeeks(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"weeks\", amount, inputFormat);\n }\n\n /**\n */\n subtractMonths(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"months\", amount, inputFormat);\n }\n\n /**\n */\n subtractYears(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"years\", amount, inputFormat);\n }\n\n //////////// GETTERS\n\n /**\n * @private\n */\n _get(\n date: string | Date,\n method: Function,\n inputFormat: string = this.getIsoFormat(),\n options: Object = {},\n ): string {\n const parsedDate = this.toDate(date, inputFormat);\n return this.toISO(\n method(parsedDate, {\n in: this.getDateFnsContext(),\n ...options,\n }),\n );\n }\n\n /**\n */\n startOfMonth(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._get(date, startOfMonth, inputFormat);\n }\n\n /**\n */\n endOfMonth(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._get(date, endOfMonth, inputFormat);\n }\n\n /**\n */\n startOfWeek(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const { weekStartsOn } = this.getOptions();\n return this._get(date, startOfWeek, inputFormat, {\n weekStartsOn,\n });\n }\n\n /**\n */\n getHours(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): number {\n const parsedDate = this.toDate(date, inputFormat);\n return getHours(parsedDate, { in: this.getDateFnsContext() });\n }\n\n /**\n */\n getMinutes(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): number {\n const parsedDate = this.toDate(date, inputFormat);\n return getMinutes(parsedDate, { in: this.getDateFnsContext() });\n }\n\n /**\n */\n getWeek(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): number {\n const { weekStartsOn, firstWeekContainsDate } = this.getOptions();\n const parsedDate = this.toDate(date, inputFormat);\n return getWeek(parsedDate, {\n in: this.getDateFnsContext(),\n weekStartsOn,\n firstWeekContainsDate,\n });\n }\n\n //////////// SETTERS\n\n /**\n * @private\n */\n _set(\n date: string | Date,\n property: string,\n value: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const parsedDate = this.toDate(date, inputFormat);\n return this.toISO(\n set(\n parsedDate,\n { [property]: value },\n // {\n // in: this.getDateFnsContext(),\n // },\n ),\n );\n }\n\n /**\n */\n setYear(\n date: string | Date,\n year: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"year\", year, inputFormat);\n }\n\n /**\n */\n setMonth(\n date: string | Date,\n month: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"month\", month, inputFormat);\n }\n\n /**\n */\n setDay(\n date: string | Date,\n day: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"date\", day, inputFormat);\n }\n\n /**\n */\n setHour(\n date: string | Date,\n hour: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"hours\", hour, inputFormat);\n }\n\n /**\n */\n setMinute(\n date: string | Date,\n minute: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"minutes\", minute, inputFormat);\n }\n\n /**\n */\n setSecond(\n date: string | Date,\n second: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"seconds\", second, inputFormat);\n }\n\n /**\n */\n setMilliseconds(\n date: string | Date,\n millisecond: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"milliseconds\", millisecond, inputFormat);\n }\n\n /**\n */\n setTime(\n date: string,\n hours: number,\n minutes: number,\n seconds: number,\n milliseconds: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const parsedDate = this.toDate(date, inputFormat);\n return this.toISO(\n set(\n parsedDate,\n { hours, minutes, seconds, milliseconds },\n {\n in: this.getDateFnsContext(),\n },\n ),\n );\n }\n\n //////////// Timezone related\n\n /**\n */\n getTimeZone(): string {\n return this._timeZone;\n }\n\n /**\n */\n setTimeZone(timeZone: string) {\n this._timeZone = timeZone;\n }\n\n /**\n */\n getDateFnsContext(): null | Function {\n if (this.doOffsets && !IS_GRAALJS) {\n return tz(this.getTimeZone());\n }\n return undefined;\n }\n\n //////////// Offsets\n\n /**\n */\n getOffset(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): OffsetInfo | null {\n const parsedDate = this.toDate(date, inputFormat);\n if (isValid(parsedDate)) {\n const dateOffset = this.toFormat(parsedDate, DATETIME_OFFSET_FORMAT);\n const offsets = this.getTimezoneOffsets();\n if (\n typeof offsets.daylight !== \"undefined\" &&\n offsets.daylight.value === dateOffset\n ) {\n return offsets.daylight;\n } else if (\n typeof offsets.standard !== \"undefined\" &&\n offsets.standard.value === dateOffset\n ) {\n return offsets.standard;\n }\n }\n return null;\n }\n\n /**\n */\n getTimezoneOffsets(): {\n standard?: OffsetInfo,\n daylight?: OffsetInfo,\n } {\n const createOffsetObject = (info: OffsetInfoInput): OffsetInfo => {\n const sign = info.offset < 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(info.offset);\n const hours = Math.trunc(absOffset);\n const minutes = Math.round((absOffset % 1) * 60);\n\n const offsetString = `${sign}${String(hours + (minutes === 60 ? 1 : 0)).padStart(2, \"0\")}:${String(minutes % 60).padStart(2, \"0\")}`;\n\n return {\n label: info.name,\n abbr: info.abbr,\n value: offsetString,\n };\n };\n\n const timezone = soft(this.getTimeZone());\n\n if (timezone.length === 0) {\n return {\n standard: {\n label: \"Etc/UTC\",\n abbr: \"Etc/UTC\",\n value: \"+00:00\",\n },\n };\n }\n\n const { daylight, standard } = timezone[0];\n\n if (daylight) {\n return {\n daylight: createOffsetObject(daylight),\n standard: createOffsetObject(standard),\n };\n }\n\n return { standard: createOffsetObject(standard) };\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 true,\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 true,\n);\n\nexport { DateUtil, DateTimeUtil, TimeUtil, TimestampUtil };\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,IAAA,GAAAN,OAAA;AACA,IAAAO,IAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,WAAA,GAAAb,OAAA;AACA,IAAAc,OAAA,GAAAd,OAAA;AACA,IAAAe,QAAA,GAAAf,OAAA;AAEA,IAAAgB,OAAA,GAAAhB,OAAA;AACA,IAAAiB,GAAA,GAAAjB,OAAA;AAEA,IAAAkB,aAAA,GAAAC,sBAAA,CAAAnB,OAAA;AAEA,IAAAoB,UAAA,GAAApB,OAAA;AAaA,IAAAqB,QAAA,GAAArB,OAAA;AAcA;AACA;AACA;AACA,MAAMsB,gBAAgB,CAAC;EASrBC,WAAWA,CAACC,SAAiB,EAA8B;IAAA,IAA5BC,SAAkB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;IAAA,IAAAG,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA,qBAJvD,OAAOC,IAAI,KAAK,WAAW,GACvB,SAAS,GACTA,IAAI,CAACC,cAAc,CAAC,CAAC,CAACC,eA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0BAAe,CAAC;;AAExE;AACA;AACA;AACA,MAAMC,YAA8B,GAAAF,OAAA,CAAAE,YAAA,GAAG,IAAI/K,gBAAgB,CACzDgL,8BAAmB,EACnB,IACF,CAAC;;AAED;AACA;AACA;AACA,MAAMC,QAA0B,GAAAJ,OAAA,CAAAI,QAAA,GAAG,IAAIjL,gBAAgB,CAACkL,0BAAe,CAAC;;AAExE;AACA;AACA;AACA,MAAMC,aAA+B,GAAAN,OAAA,CAAAM,aAAA,GAAG,IAAInL,gBAAgB,CAC1DoL,+BAAoB,EACpB,IACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DateTimeUtil.js","names":["_format","require","_isAfter","_isBefore","_isSameDay","_isValid","_parse","_add","_sub","_set","_startOfMonth","_endOfMonth","_startOfWeek","_getHours","_getMinutes","_getDay","_getWeek","_locale","_tz","_timezoneSoft","_interopRequireDefault","_constants","_Cookies","BaseDateTimeUtil","constructor","isoFormat","doOffsets","arguments","length","undefined","_defineProperty2","default","Intl","DateTimeFormat","resolvedOptions","timeZone","_isoFormat","_doOffsets","isIncludeTimeOffsetInDateTimes","getOptions","weekStartsOn","getSetting","DEFAULT_WEEK_STARTS_ON","firstWeekContainsDate","DEFAULT_FIRST_WEEK_CONTAINS_DATE","getIsoFormat","DATETIME_OFFSET_FORMAT","convertFormat","javaFormat","_context","javaToUTS35Map","ZZZ","ZZ","Z","uts35Format","sortedKeys","_sort","_keys","call","a","b","javaToken","uts35Token","regex","RegExp","replace","getLocale","defaultLocale","getEnabledLocales","locale","getCookie","nl","enGB","toDate","date","inputFormat","Date","parse","in","getDateFnsContext","toFormat","targetFormat","parsedDate","isValid","format","toISO","sourceFormat","now","hasFormat","formattedValue","isOutsideRange","isBefore","isAfter","toUpperCase","inputDate","afterISODate","isSameOrAfter","isSame","beforeISODate","isSameOrBefore","compareDate","getTime","isSameDay","isOther","isWeekend","SATURDAY_NUMBER","SUNDAY_NUMBER","weekDay","getDay","isAmbiguous","dateTime","t","_map","x","newDate","add","minutes","time","indexOf","_calculate","calculationFn","property","value","addSeconds","amount","addMinutes","addHours","addDays","addWeeks","addMonths","addYears","subtractSeconds","sub","subtractMinutes","subtractHours","subtractDays","subtractWeeks","subtractMonths","subtractYears","_get","method","options","startOfMonth","endOfMonth","startOfWeek","getHours","getMinutes","getWeek","set","setYear","year","setMonth","month","setDay","day","setHour","hour","setMinute","minute","setSecond","second","setMilliseconds","millisecond","setTime","hours","seconds","milliseconds","getTimeZone","_timeZone","setTimeZone","IS_GRAALJS","tz","getOffset","dateOffset","offsets","getTimezoneOffsets","daylight","standard","createOffsetObject","info","_context2","_context3","sign","offset","absOffset","Math","abs","_trunc","round","offsetString","_padStart","String","label","name","abbr","timezone","soft","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 { format } from \"date-fns/format\";\nimport { isAfter } from \"date-fns/isAfter\";\nimport { isBefore } from \"date-fns/isBefore\";\nimport { isSameDay } from \"date-fns/isSameDay\";\nimport { isValid } from \"date-fns/isValid\";\nimport { parse } from \"date-fns/parse\";\nimport { add } from \"date-fns/add\";\nimport { sub } from \"date-fns/sub\";\nimport { set } from \"date-fns/set\";\nimport { startOfMonth } from \"date-fns/startOfMonth\";\nimport { endOfMonth } from \"date-fns/endOfMonth\";\nimport { startOfWeek } from \"date-fns/startOfWeek\";\nimport { getHours } from \"date-fns/getHours\";\nimport { getMinutes } from \"date-fns/getMinutes\";\nimport { getDay } from \"date-fns/getDay\";\nimport { getWeek } from \"date-fns/getWeek\";\n\nimport { enGB, nl } from \"date-fns/locale\";\nimport { tz } from \"@date-fns/tz\";\n\nimport soft from \"timezone-soft\";\n\nimport {\n DATETIME_OFFSET_FORMAT,\n DEFAULT_FIRST_WEEK_CONTAINS_DATE,\n DEFAULT_WEEK_STARTS_ON,\n getEnabledLocales,\n getSetting,\n IS_GRAALJS,\n isIncludeTimeOffsetInDateTimes,\n ISO_DATE_FORMAT,\n ISO_DATETIME_FORMAT,\n ISO_TIME_FORMAT,\n ISO_TIMESTAMP_FORMAT,\n} from \"../../constants\";\n\nimport { getCookie } from \"../browser/Cookies\";\n\ntype OffsetInfoInput = {\n abbr: string,\n offset: number,\n name: string,\n};\n\nexport type OffsetInfo = {\n abbr: string,\n label: string,\n value: string,\n};\n\n/**\n * @hideconstructor\n */\nclass BaseDateTimeUtil {\n _isoFormat: string;\n _doOffsets: boolean;\n\n _timeZone: string =\n typeof Intl === \"undefined\"\n ? \"Etc/UTC\"\n : Intl.DateTimeFormat().resolvedOptions().timeZone || \"Etc/UTC\";\n\n constructor(isoFormat: string, doOffsets: boolean = false) {\n this._isoFormat = isoFormat;\n this._doOffsets = doOffsets;\n }\n\n /**\n * Indicates if offsets and timezones are relevant\n */\n get doOffsets(): boolean {\n return this._doOffsets ? isIncludeTimeOffsetInDateTimes() : false;\n }\n\n /**\n * Returns the options defined in settings\n */\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 getIsoFormat(): string {\n if (this.doOffsets) {\n return this._isoFormat + DATETIME_OFFSET_FORMAT;\n }\n return this._isoFormat;\n }\n\n /**\n */\n convertFormat(javaFormat: string): string {\n if (!javaFormat) {\n return this.getIsoFormat();\n }\n\n const javaToUTS35Map = {\n ZZZ: \"xxx\",\n ZZ: \"xx\",\n Z: \"x\",\n };\n\n // Replace Java pattern tokens with UTS #35 tokens\n let uts35Format = javaFormat;\n\n // Sort keys by length (descending) to handle multi-character tokens first\n const sortedKeys = Object.keys(javaToUTS35Map).sort(\n (a, b) => b.length - a.length,\n );\n\n for (const javaToken of sortedKeys) {\n const uts35Token = javaToUTS35Map[javaToken];\n const regex = new RegExp(javaToken, \"g\"); // Match all occurrences\n uts35Format = uts35Format.replace(regex, uts35Token);\n }\n\n return uts35Format;\n }\n\n /**\n */\n getLocale(): typeof nl | typeof enGB {\n const defaultLocale = getEnabledLocales()[0];\n const locale = getCookie(\"locale\") ?? defaultLocale ?? \"en\";\n\n if (locale === \"nl\") {\n return nl;\n }\n\n return enGB;\n }\n\n /**\n */\n toDate(date: string | Date, inputFormat: string = this.getIsoFormat()): Date {\n if (date instanceof Date) {\n return date;\n }\n\n const { weekStartsOn, firstWeekContainsDate } = this.getOptions();\n\n return parse(date, inputFormat, new Date(), {\n in: this.getDateFnsContext(),\n weekStartsOn,\n firstWeekContainsDate,\n });\n }\n\n /**\n */\n toFormat(\n date: string | Date,\n targetFormat: string,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const { weekStartsOn } = this.getOptions();\n\n const parsedDate = this.toDate(date, inputFormat);\n\n if (isValid(parsedDate)) {\n return format(parsedDate, targetFormat, {\n in: this.getDateFnsContext(),\n weekStartsOn,\n locale: this.getLocale(),\n });\n }\n\n return \"Invalid Date\";\n }\n\n /**\n */\n toISO(\n date: string | Date,\n sourceFormat: string = this.getIsoFormat(),\n ): string {\n return this.toFormat(date, this.getIsoFormat(), sourceFormat);\n }\n\n /**\n */\n now(): string {\n return this.toISO(new Date());\n }\n\n //////////// VALIDATION\n\n /**\n */\n hasFormat(date: string, sourceFormat: string): boolean {\n const parsedDate = this.toDate(date, sourceFormat);\n\n const formattedValue = this.toFormat(parsedDate, sourceFormat);\n if (formattedValue === \"Invalid Date\") {\n return false;\n }\n\n const isOutsideRange =\n isBefore(parsedDate, new Date(1000, 1, 1)) ||\n isAfter(parsedDate, 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 /**\n */\n isValid(\n date: string | Date | null | void,\n inputFormat: string = this.getIsoFormat(),\n ): boolean {\n if (!date) {\n return false;\n }\n\n const parsedDate = this.toDate(date, inputFormat);\n return isValid(parsedDate);\n }\n\n /**\n */\n isAfter(\n inputDate: string | Date,\n afterISODate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n afterISODate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n beforeISODate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n beforeISODate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n compareDate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n compareDate: string | Date,\n inputFormat: string = this.getIsoFormat(),\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 | Date,\n compareDate: ?string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): boolean {\n return !this.isSame(inputDate, compareDate, inputFormat);\n }\n\n /**\n */\n isWeekend(inputDate: string | Date): 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 * Checks if a given local date and time is ambiguous in the specified timezone.\n * Ambiguity happens during the end of daylight saving time (DST) transitions.\n */\n isAmbiguous(\n inputDate: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): boolean {\n if (inputDate == null || typeof Intl === \"undefined\") {\n return false;\n }\n\n const dateTime = this.toDate(inputDate, inputFormat);\n if (!isValid(dateTime)) {\n return false;\n }\n\n const t = [60, -60, 30, -30];\n const a = t.map((x) => {\n const newDate = add(dateTime, { minutes: x });\n return format(newDate, \"HH:mm\");\n });\n const time = format(dateTime, \"HH:mm\");\n return a.indexOf(time) > -1;\n }\n\n //////////// CALCULATIONS\n\n /**\n * @private\n */\n _calculate(\n date: string | Date,\n calculationFn: Function,\n property: string,\n value: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const parsedDate = this.toDate(date, inputFormat);\n return this.toISO(\n calculationFn(\n parsedDate,\n { [property]: value },\n {\n in: this.getDateFnsContext(),\n },\n ),\n );\n }\n\n /**\n */\n addSeconds(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"seconds\", amount, inputFormat);\n }\n\n /**\n */\n addMinutes(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"minutes\", amount, inputFormat);\n }\n\n /**\n */\n addHours(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"hours\", amount, inputFormat);\n }\n\n /**\n */\n addDays(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"days\", amount, inputFormat);\n }\n\n /**\n */\n addWeeks(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"weeks\", amount, inputFormat);\n }\n\n /**\n */\n addMonths(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"months\", amount, inputFormat);\n }\n\n /**\n */\n addYears(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, add, \"years\", amount, inputFormat);\n }\n\n /**\n */\n subtractSeconds(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"seconds\", amount, inputFormat);\n }\n\n /**\n */\n subtractMinutes(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"minutes\", amount, inputFormat);\n }\n\n /**\n */\n subtractHours(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"hours\", amount, inputFormat);\n }\n\n /**\n */\n subtractDays(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"days\", amount, inputFormat);\n }\n\n /**\n */\n subtractWeeks(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"weeks\", amount, inputFormat);\n }\n\n /**\n */\n subtractMonths(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"months\", amount, inputFormat);\n }\n\n /**\n */\n subtractYears(\n date: string,\n amount: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._calculate(date, sub, \"years\", amount, inputFormat);\n }\n\n //////////// GETTERS\n\n /**\n * @private\n */\n _get(\n date: string | Date,\n method: Function,\n inputFormat: string = this.getIsoFormat(),\n options: Object = {},\n ): string {\n const parsedDate = this.toDate(date, inputFormat);\n return this.toISO(\n method(parsedDate, {\n in: this.getDateFnsContext(),\n ...options,\n }),\n );\n }\n\n /**\n */\n startOfMonth(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._get(date, startOfMonth, inputFormat);\n }\n\n /**\n */\n endOfMonth(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._get(date, endOfMonth, inputFormat);\n }\n\n /**\n */\n startOfWeek(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const { weekStartsOn } = this.getOptions();\n return this._get(date, startOfWeek, inputFormat, {\n weekStartsOn,\n });\n }\n\n /**\n */\n getHours(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): number {\n const parsedDate = this.toDate(date, inputFormat);\n return getHours(parsedDate, { in: this.getDateFnsContext() });\n }\n\n /**\n */\n getMinutes(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): number {\n const parsedDate = this.toDate(date, inputFormat);\n return getMinutes(parsedDate, { in: this.getDateFnsContext() });\n }\n\n /**\n */\n getWeek(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): number {\n const { weekStartsOn, firstWeekContainsDate } = this.getOptions();\n const parsedDate = this.toDate(date, inputFormat);\n return getWeek(parsedDate, {\n in: this.getDateFnsContext(),\n weekStartsOn,\n firstWeekContainsDate,\n });\n }\n\n //////////// SETTERS\n\n /**\n * @private\n */\n _set(\n date: string | Date,\n property: string,\n value: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const parsedDate = this.toDate(date, inputFormat);\n return this.toISO(\n set(\n parsedDate,\n { [property]: value },\n // {\n // in: this.getDateFnsContext(),\n // },\n ),\n );\n }\n\n /**\n */\n setYear(\n date: string | Date,\n year: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"year\", year, inputFormat);\n }\n\n /**\n */\n setMonth(\n date: string | Date,\n month: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"month\", month, inputFormat);\n }\n\n /**\n */\n setDay(\n date: string | Date,\n day: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"date\", day, inputFormat);\n }\n\n /**\n */\n setHour(\n date: string | Date,\n hour: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"hours\", hour, inputFormat);\n }\n\n /**\n */\n setMinute(\n date: string | Date,\n minute: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"minutes\", minute, inputFormat);\n }\n\n /**\n */\n setSecond(\n date: string | Date,\n second: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"seconds\", second, inputFormat);\n }\n\n /**\n */\n setMilliseconds(\n date: string | Date,\n millisecond: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n return this._set(date, \"milliseconds\", millisecond, inputFormat);\n }\n\n /**\n */\n setTime(\n date: string,\n hours: number,\n minutes: number,\n seconds: number,\n milliseconds: number,\n inputFormat: string = this.getIsoFormat(),\n ): string {\n const parsedDate = this.toDate(date, inputFormat);\n return this.toISO(\n set(\n parsedDate,\n { hours, minutes, seconds, milliseconds },\n {\n in: this.getDateFnsContext(),\n },\n ),\n );\n }\n\n //////////// Timezone related\n\n /**\n */\n getTimeZone(): string {\n return this._timeZone;\n }\n\n /**\n */\n setTimeZone(timeZone: string) {\n this._timeZone = timeZone;\n }\n\n /**\n */\n getDateFnsContext(): null | Function {\n if (this.doOffsets && !IS_GRAALJS) {\n return tz(this.getTimeZone());\n }\n return undefined;\n }\n\n //////////// Offsets\n\n /**\n */\n getOffset(\n date: string | Date,\n inputFormat: string = this.getIsoFormat(),\n ): OffsetInfo | null {\n const parsedDate = this.toDate(date, inputFormat);\n if (isValid(parsedDate)) {\n const dateOffset = this.toFormat(parsedDate, DATETIME_OFFSET_FORMAT);\n const offsets = this.getTimezoneOffsets();\n if (\n typeof offsets.daylight !== \"undefined\" &&\n offsets.daylight.value === dateOffset\n ) {\n return offsets.daylight;\n } else if (\n typeof offsets.standard !== \"undefined\" &&\n offsets.standard.value === dateOffset\n ) {\n return offsets.standard;\n }\n }\n return null;\n }\n\n /**\n */\n getTimezoneOffsets(): {\n standard?: OffsetInfo,\n daylight?: OffsetInfo,\n } {\n const createOffsetObject = (info: OffsetInfoInput): OffsetInfo => {\n const sign = info.offset < 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(info.offset);\n const hours = Math.trunc(absOffset);\n const minutes = Math.round((absOffset % 1) * 60);\n\n const offsetString = `${sign}${String(hours + (minutes === 60 ? 1 : 0)).padStart(2, \"0\")}:${String(minutes % 60).padStart(2, \"0\")}`;\n\n return {\n label: info.name,\n abbr: info.abbr,\n value: offsetString,\n };\n };\n\n const timezone = soft(this.getTimeZone());\n\n if (timezone.length === 0) {\n return {\n standard: {\n label: \"Etc/UTC\",\n abbr: \"Etc/UTC\",\n value: \"+00:00\",\n },\n };\n }\n\n const { daylight, standard } = timezone[0];\n\n if (daylight) {\n return {\n daylight: createOffsetObject(daylight),\n standard: createOffsetObject(standard),\n };\n }\n\n return { standard: createOffsetObject(standard) };\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 true,\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 true,\n);\n\nexport { DateUtil, DateTimeUtil, TimeUtil, TimestampUtil };\n"],"mappings":";;;;;;;;;;;;;AACA,IAAAA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gBAAgB,CACzDkL,8BAAmB,EACnB,IACF,CAAC;;AAED;AACA;AACA;AACA,MAAMC,QAA0B,GAAAJ,OAAA,CAAAI,QAAA,GAAG,IAAInL,gBAAgB,CAACoL,0BAAe,CAAC;;AAExE;AACA;AACA;AACA,MAAMC,aAA+B,GAAAN,OAAA,CAAAM,aAAA,GAAG,IAAIrL,gBAAgB,CAC1DsL,+BAAoB,EACpB,IACF,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beinformed/ui",
|
|
3
|
-
"version": "1.62.
|
|
3
|
+
"version": "1.62.9",
|
|
4
4
|
"description": "Toolbox for be informed javascript layouts",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"bugs": "https://support.beinformed.com",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"watch:esm": "cross-env BABEL_ENV=esm babel --watch src --out-dir esm --ignore \"**/__tests__/**\" --ignore \"**/__mock__/**\" --ignore \"**/__mocks__/**\"",
|
|
19
19
|
"quality": "npm run lint && npm run flow && npm run test",
|
|
20
20
|
"dev": "npm run clean && npm run build:lib && npm run build:flow && npm run build:proxies && npm run build:esm",
|
|
21
|
-
"build": "npm run clean && npm run build:lib && npm run build:flow && npm run build:proxies && npm run build:esm
|
|
21
|
+
"build": "npm run clean && npm run build:lib && npm run build:flow && npm run build:proxies && npm run build:esm",
|
|
22
22
|
"build:lib": "babel src --out-dir lib --ignore \"**/__tests__/**\" --ignore \"**/__mock__/**\" --ignore \"**/__mocks__/**\" --source-maps",
|
|
23
23
|
"build:esm": "cross-env BABEL_ENV=esm babel src --out-dir esm --ignore \"**/__tests__/**\" --ignore \"**/__mock__/**\" --ignore \"**/__mocks__/**\" --source-maps",
|
|
24
24
|
"build:proxies": "node .build/proxies.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"test:ci": "jest --ci",
|
|
37
37
|
"test:changed": "jest --onlyChanged",
|
|
38
38
|
"upgrade-interactive": "npm-check -u",
|
|
39
|
-
"release": "npm run quality && commit-and-tag-version",
|
|
39
|
+
"release": "npm run quality && npm run docs&& npm run build:ts && commit-and-tag-version",
|
|
40
40
|
"beta-release": "commit-and-tag-version --prerelease beta",
|
|
41
41
|
"prepublishOnly": "npm run build",
|
|
42
42
|
"docs": "rimraf docs && node ./.build/docs.mjs",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@babel/cli": "^7.27.2",
|
|
92
|
-
"@babel/core": "^7.27.
|
|
92
|
+
"@babel/core": "^7.27.7",
|
|
93
93
|
"@babel/eslint-parser": "^7.27.5",
|
|
94
94
|
"@babel/eslint-plugin": "^7.27.1",
|
|
95
95
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"@commitlint/config-conventional": "^19.8.1",
|
|
103
103
|
"@testing-library/dom": "^10.4.0",
|
|
104
104
|
"@testing-library/react": "^16.3.0",
|
|
105
|
-
"auditjs": "^4.0.
|
|
106
|
-
"babel-jest": "^
|
|
105
|
+
"auditjs": "^4.0.47",
|
|
106
|
+
"babel-jest": "^30.0.2",
|
|
107
107
|
"babel-plugin-styled-components": "^2.1.4",
|
|
108
108
|
"cherry-pick": "^0.5.0",
|
|
109
109
|
"commit-and-tag-version": "^12.5.1",
|
|
@@ -121,17 +121,17 @@
|
|
|
121
121
|
"flow-bin": "^0.200.1",
|
|
122
122
|
"flow-copy-source": "^2.0.9",
|
|
123
123
|
"flow-typed": "^3.9.0",
|
|
124
|
-
"hermes-eslint": "^0.
|
|
124
|
+
"hermes-eslint": "^0.29.0",
|
|
125
125
|
"history": "^4.0.0",
|
|
126
126
|
"husky": "^9.1.7",
|
|
127
|
-
"jest": "^
|
|
128
|
-
"jest-environment-jsdom": "^
|
|
127
|
+
"jest": "^30.0.3",
|
|
128
|
+
"jest-environment-jsdom": "^30.0.2",
|
|
129
129
|
"jest-junit": "^16.0.0",
|
|
130
130
|
"jest-sonar-reporter": "^2.0.0",
|
|
131
131
|
"jscodeshift": "^17.3.0",
|
|
132
132
|
"lint-staged": "^15.5.1",
|
|
133
133
|
"polished": "^4.0.0",
|
|
134
|
-
"prettier": "^3.
|
|
134
|
+
"prettier": "^3.6.2",
|
|
135
135
|
"react": "^19.1.0",
|
|
136
136
|
"react-dom": "^19.1.0",
|
|
137
137
|
"react-helmet-async": "^2.0.5",
|
|
@@ -145,7 +145,6 @@ export const getSetting = (key: string, defaultValue?: any): any => {
|
|
|
145
145
|
`Setting with name ${key} not found and no defaultValue given`,
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
|
-
|
|
149
148
|
return settings[key] ?? defaultValue;
|
|
150
149
|
};
|
|
151
150
|
|
|
@@ -210,6 +209,11 @@ export const hasAllContentInData = (): boolean =>
|
|
|
210
209
|
export const isIncludeTimeOffsetInDateTimes = (): boolean =>
|
|
211
210
|
getSetting(INCLUDE_TIME_OFFSET, false);
|
|
212
211
|
|
|
212
|
+
/**
|
|
213
|
+
*/
|
|
214
|
+
export const getEnabledLocales = (): Array<string> =>
|
|
215
|
+
getSetting("ENABLED_LOCALES", ["en"]);
|
|
216
|
+
|
|
213
217
|
/**
|
|
214
218
|
* Login type, only available when pac4j is configured
|
|
215
219
|
*
|
|
@@ -43,10 +43,12 @@ import type {
|
|
|
43
43
|
ElementType,
|
|
44
44
|
} from "react";
|
|
45
45
|
import type { Theme } from "../react-theme/types";
|
|
46
|
-
import type { CustomReducers, ReduxStore } from "../redux/types";
|
|
46
|
+
import type { CustomReducers, ReduxState, ReduxStore } from "../redux/types";
|
|
47
47
|
import type { RouterHistory } from "react-router";
|
|
48
48
|
import type { BeforeRenderHook } from "../redux/store/beforeRenderHooks";
|
|
49
49
|
import type { Props as FallbackProps } from "../react/ErrorBoundaryFallback";
|
|
50
|
+
import createTheme from "../react-theme/createTheme";
|
|
51
|
+
import { receiveLocale } from "../redux";
|
|
50
52
|
|
|
51
53
|
type RenderFunction = () => ReactElement<ElementType>;
|
|
52
54
|
type MountFunction = (
|
|
@@ -104,6 +106,21 @@ export const setUnhandledRejectionEvent = (store: ReduxStore) => {
|
|
|
104
106
|
};
|
|
105
107
|
};
|
|
106
108
|
|
|
109
|
+
/**
|
|
110
|
+
*/
|
|
111
|
+
const initThemeSettings = (state: ReduxState, theme?: Theme | Array<Theme>) => {
|
|
112
|
+
const storedTheme = state.preferences.theme;
|
|
113
|
+
// $FlowFixMe
|
|
114
|
+
createTheme(storedTheme, theme); // on theme creation, the settings are set
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const handleLocale = (store: ReduxStore) => {
|
|
118
|
+
const locale = store.getState().i18n.locale;
|
|
119
|
+
if (locale) {
|
|
120
|
+
store.dispatch(receiveLocale(locale));
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
107
124
|
/**
|
|
108
125
|
* The redirectURI querystring parameter is available when the server is redirecting an unauthorized deep link
|
|
109
126
|
* @param store
|
|
@@ -151,6 +168,7 @@ export const setModelCatalogEntryDate = (store: ReduxStore) => {
|
|
|
151
168
|
export const setupClient = (
|
|
152
169
|
customReducers: CustomReducers = {},
|
|
153
170
|
beforeRenderHooks: ?Array<BeforeRenderHook>,
|
|
171
|
+
theme?: Theme | Array<Theme>,
|
|
154
172
|
): { store: ReduxStore, routerHistory: RouterHistory } => {
|
|
155
173
|
if (typeof window.contextPath === "undefined") {
|
|
156
174
|
throw new Error("Missing contextPath on window object");
|
|
@@ -171,6 +189,10 @@ export const setupClient = (
|
|
|
171
189
|
rehydrate(data),
|
|
172
190
|
);
|
|
173
191
|
|
|
192
|
+
initThemeSettings(store.getState(), theme);
|
|
193
|
+
|
|
194
|
+
handleLocale(store);
|
|
195
|
+
|
|
174
196
|
handleRedirectURI(store);
|
|
175
197
|
setModelCatalogEntryDate(store);
|
|
176
198
|
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getFullRequestUrl,
|
|
3
|
+
getFullRequestHref,
|
|
4
|
+
getCookieFromRequest,
|
|
5
|
+
getPreferredLocale,
|
|
6
|
+
} from "../requestInformation"; // Adjust path as needed
|
|
7
|
+
|
|
8
|
+
// Mock the Href class
|
|
9
|
+
const mockHref = jest.fn((url) => ({
|
|
10
|
+
url: url, // For easy inspection in tests
|
|
11
|
+
// You can add other Href methods here if they are used by your functions
|
|
12
|
+
toString: () => url,
|
|
13
|
+
}));
|
|
14
|
+
jest.mock("../../models/href/Href", () => {
|
|
15
|
+
return jest.fn().mockImplementation((url) => {
|
|
16
|
+
return new mockHref(url);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// Mock the Locales class
|
|
21
|
+
const mockLocales = {
|
|
22
|
+
availableLocaleCodes: ["en-US", "es-ES", "fr-FR"],
|
|
23
|
+
getPreferredLocale: jest.fn((header) => {
|
|
24
|
+
if (header.includes("en")) return "en-US";
|
|
25
|
+
if (header.includes("es")) return "es-ES";
|
|
26
|
+
if (header.includes("fr")) return "fr-FR";
|
|
27
|
+
return mockLocales.availableLocaleCodes[0]; // Default if no match
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
jest.mock("../../i18n/Locales", () => {
|
|
31
|
+
return jest.fn().mockImplementation(() => {
|
|
32
|
+
return mockLocales;
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Helper function to create a mock HttpServletRequestJava object
|
|
37
|
+
const createMockRequest = ({
|
|
38
|
+
pathInfo = null,
|
|
39
|
+
queryString = null,
|
|
40
|
+
cookies = [],
|
|
41
|
+
headers = {},
|
|
42
|
+
} = {}) => ({
|
|
43
|
+
getPathInfo: jest.fn(() => pathInfo),
|
|
44
|
+
getQueryString: jest.fn(() => queryString),
|
|
45
|
+
getCookieByName: jest.fn((name) => {
|
|
46
|
+
const cookie = cookies.find((c) => c.name === name);
|
|
47
|
+
return cookie ? cookie.value : null;
|
|
48
|
+
}),
|
|
49
|
+
getHeader: jest.fn((name) => headers[name.toLowerCase()] || null),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
describe("requestInformation", () => {
|
|
53
|
+
beforeEach(() => {
|
|
54
|
+
jest.clearAllMocks();
|
|
55
|
+
|
|
56
|
+
// Reset mock Href to its initial mock implementation
|
|
57
|
+
// This is important if you test multiple instantiations or interactions
|
|
58
|
+
// with the Href mock.
|
|
59
|
+
require("../../models/href/Href").mockClear();
|
|
60
|
+
require("../../models/href/Href").mockImplementation((url) => {
|
|
61
|
+
return new mockHref(url);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
describe("getFullRequestUrl", () => {
|
|
66
|
+
it("should return the path info when no query string is present", () => {
|
|
67
|
+
const request = createMockRequest({
|
|
68
|
+
pathInfo: "/some/path",
|
|
69
|
+
});
|
|
70
|
+
expect(getFullRequestUrl(request)).toBe("/some/path");
|
|
71
|
+
expect(request.getPathInfo).toHaveBeenCalledTimes(1);
|
|
72
|
+
expect(request.getQueryString).toHaveBeenCalledTimes(1);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it("should return the path info with a leading slash if pathInfo is null", () => {
|
|
76
|
+
const request = createMockRequest({
|
|
77
|
+
pathInfo: null,
|
|
78
|
+
});
|
|
79
|
+
expect(getFullRequestUrl(request)).toBe("/");
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("should return the path info with a leading slash if pathInfo is an empty string", () => {
|
|
83
|
+
const request = createMockRequest({
|
|
84
|
+
pathInfo: "",
|
|
85
|
+
});
|
|
86
|
+
expect(getFullRequestUrl(request)).toBe("/");
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("should return the path info with an encoded query string", () => {
|
|
90
|
+
const request = createMockRequest({
|
|
91
|
+
pathInfo: "/search",
|
|
92
|
+
queryString: "q=hello world&filter=test",
|
|
93
|
+
});
|
|
94
|
+
expect(getFullRequestUrl(request)).toBe(
|
|
95
|
+
"/search?q%3Dhello%20world%26filter%3Dtest",
|
|
96
|
+
);
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("should handle special characters in pathInfo by encoding them", () => {
|
|
100
|
+
const request = createMockRequest({
|
|
101
|
+
pathInfo: "/path with spaces/and<script>alert(1)</script>",
|
|
102
|
+
});
|
|
103
|
+
expect(getFullRequestUrl(request)).toBe(
|
|
104
|
+
"/path%20with%20spaces/and%3Cscript%3Ealert(1)%3C/script%3E",
|
|
105
|
+
);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it("should handle path info with multiple segments and special characters", () => {
|
|
109
|
+
const request = createMockRequest({
|
|
110
|
+
pathInfo: "/product/category/item with special chars & numbers/id-123",
|
|
111
|
+
});
|
|
112
|
+
expect(getFullRequestUrl(request)).toBe(
|
|
113
|
+
"/product/category/item%20with%20special%20chars%20%26%20numbers/id-123",
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it("should correctly encode both path and query string with special characters", () => {
|
|
118
|
+
const request = createMockRequest({
|
|
119
|
+
pathInfo: "/api/data",
|
|
120
|
+
queryString: "name=John Doe & email=john@example.com",
|
|
121
|
+
});
|
|
122
|
+
expect(getFullRequestUrl(request)).toBe(
|
|
123
|
+
"/api/data?name%3DJohn%20Doe%20%26%20email%3Djohn%40example.com",
|
|
124
|
+
);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it("should handle an empty query string (not null) gracefully", () => {
|
|
128
|
+
const request = createMockRequest({
|
|
129
|
+
pathInfo: "/home",
|
|
130
|
+
queryString: "",
|
|
131
|
+
});
|
|
132
|
+
expect(getFullRequestUrl(request)).toBe("/home");
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
describe("getFullRequestHref", () => {
|
|
137
|
+
it("should return an Href instance with the full request URL", () => {
|
|
138
|
+
const request = createMockRequest({
|
|
139
|
+
pathInfo: "/products",
|
|
140
|
+
queryString: "id=123",
|
|
141
|
+
});
|
|
142
|
+
const hrefInstance = getFullRequestHref(request);
|
|
143
|
+
|
|
144
|
+
// Verify that Href constructor was called with the correct URL
|
|
145
|
+
expect(require("../../models/href/Href")).toHaveBeenCalledTimes(1);
|
|
146
|
+
expect(require("../../models/href/Href")).toHaveBeenCalledWith(
|
|
147
|
+
"/products?id%3D123",
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
// Verify the returned object is an instance of the mock Href
|
|
151
|
+
expect(hrefInstance.url).toBe("/products?id%3D123");
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it("should handle complex URLs and pass them to Href", () => {
|
|
155
|
+
const request = createMockRequest({
|
|
156
|
+
pathInfo: "/search/results",
|
|
157
|
+
queryString: "q=javascript%20xss¶m=value",
|
|
158
|
+
});
|
|
159
|
+
const hrefInstance = getFullRequestHref(request);
|
|
160
|
+
expect(require("../../models/href/Href")).toHaveBeenCalledWith(
|
|
161
|
+
"/search/results?q%3Djavascript%2520xss%26param%3Dvalue",
|
|
162
|
+
);
|
|
163
|
+
expect(hrefInstance.url).toBe(
|
|
164
|
+
"/search/results?q%3Djavascript%2520xss%26param%3Dvalue",
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
describe("getCookieFromRequest", () => {
|
|
170
|
+
it("should return the cookie value if found", () => {
|
|
171
|
+
const request = createMockRequest({
|
|
172
|
+
cookies: [
|
|
173
|
+
{
|
|
174
|
+
name: "session_id",
|
|
175
|
+
value: "abc123xyz",
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
});
|
|
179
|
+
expect(getCookieFromRequest(request, "session_id")).toBe("abc123xyz");
|
|
180
|
+
expect(request.getCookieByName).toHaveBeenCalledWith("session_id");
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it("should return null if the cookie is not found", () => {
|
|
184
|
+
const request = createMockRequest({
|
|
185
|
+
cookies: [
|
|
186
|
+
{
|
|
187
|
+
name: "other_cookie",
|
|
188
|
+
value: "value",
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
});
|
|
192
|
+
expect(getCookieFromRequest(request, "non_existent_cookie")).toBeNull();
|
|
193
|
+
expect(request.getCookieByName).toHaveBeenCalledWith(
|
|
194
|
+
"non_existent_cookie",
|
|
195
|
+
);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it("should handle empty cookies array", () => {
|
|
199
|
+
const request = createMockRequest({
|
|
200
|
+
cookies: [],
|
|
201
|
+
});
|
|
202
|
+
expect(getCookieFromRequest(request, "any_cookie")).toBeNull();
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
describe("getPreferredLocale", () => {
|
|
207
|
+
it("should return locale from cookie if present", () => {
|
|
208
|
+
const request = createMockRequest({
|
|
209
|
+
cookies: [
|
|
210
|
+
{
|
|
211
|
+
name: "locale",
|
|
212
|
+
value: "es-ES",
|
|
213
|
+
},
|
|
214
|
+
],
|
|
215
|
+
headers: {
|
|
216
|
+
"accept-language": "en-US,en;q=0.9",
|
|
217
|
+
},
|
|
218
|
+
});
|
|
219
|
+
const locales = mockLocales; // Using the mocked locales directly for convenience
|
|
220
|
+
expect(getPreferredLocale(request, locales)).toBe("es-ES");
|
|
221
|
+
expect(locales.getPreferredLocale).toHaveBeenCalledWith("es-ES"); // Because cookie took precedence
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
it("should return the first available locale code if no cookie and no Accept-Language header", () => {
|
|
225
|
+
const request = createMockRequest({}); // No cookies, no headers
|
|
226
|
+
const locales = mockLocales;
|
|
227
|
+
expect(getPreferredLocale(request, locales)).toBe("en-US");
|
|
228
|
+
expect(locales.getPreferredLocale).not.toHaveBeenCalled();
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
it("should handle null Accept-Language header correctly", () => {
|
|
232
|
+
const request = createMockRequest({
|
|
233
|
+
headers: {
|
|
234
|
+
"accept-language": null,
|
|
235
|
+
},
|
|
236
|
+
}); // Explicitly null header
|
|
237
|
+
const locales = mockLocales;
|
|
238
|
+
expect(getPreferredLocale(request, locales)).toBe("en-US");
|
|
239
|
+
expect(locales.getPreferredLocale).not.toHaveBeenCalled();
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
it("should handle empty string Accept-Language header correctly", () => {
|
|
243
|
+
const request = createMockRequest({
|
|
244
|
+
headers: {
|
|
245
|
+
"accept-language": "",
|
|
246
|
+
},
|
|
247
|
+
}); // Explicitly empty header
|
|
248
|
+
const locales = mockLocales;
|
|
249
|
+
expect(getPreferredLocale(request, locales)).toBe("en-US");
|
|
250
|
+
expect(locales.getPreferredLocale).not.toHaveBeenCalled();
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
it("should call getCookieFromRequest and getHeader", () => {
|
|
254
|
+
const request = createMockRequest({
|
|
255
|
+
headers: {
|
|
256
|
+
"accept-language": "de-DE",
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
const locales = mockLocales;
|
|
260
|
+
getPreferredLocale(request, locales);
|
|
261
|
+
expect(request.getCookieByName).toHaveBeenCalledWith("locale");
|
|
262
|
+
expect(request.getHeader).toHaveBeenCalledWith("Accept-Language");
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
});
|
|
@@ -6,11 +6,16 @@ import type Locales from "../i18n/Locales";
|
|
|
6
6
|
/**
|
|
7
7
|
*/
|
|
8
8
|
export const getFullRequestUrl = (request: HttpServletRequestJava): string => {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
let pathInfo = request.getPathInfo() || "/";
|
|
10
|
+
let queryString = request.getQueryString();
|
|
11
|
+
|
|
12
|
+
pathInfo = pathInfo
|
|
13
|
+
.split("/")
|
|
14
|
+
.map((segment) => encodeURIComponent(segment))
|
|
15
|
+
.join("/");
|
|
11
16
|
|
|
12
17
|
if (queryString) {
|
|
13
|
-
return `${pathInfo}?${queryString}`;
|
|
18
|
+
return `${pathInfo}?${encodeURIComponent(queryString)}`;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
return pathInfo;
|