@beinformed/ui 1.63.2 → 1.63.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/esm/constants/Settings.js +3 -14
- package/esm/constants/Settings.js.map +1 -1
- package/esm/exceptions/NotFoundException.js +1 -2
- package/esm/exceptions/NotFoundException.js.map +1 -1
- package/esm/hooks/useI18n.js +1 -6
- package/esm/hooks/useI18n.js.map +1 -1
- package/esm/hooks/useModal.js +3 -4
- package/esm/hooks/useModal.js.map +1 -1
- package/esm/hooks/useModelCatalog.js +10 -30
- package/esm/hooks/useModelCatalog.js.map +1 -1
- package/esm/hooks/useModularUI.js +4 -5
- package/esm/hooks/useModularUI.js.map +1 -1
- package/esm/hooks/useModularUIBasic.js +7 -8
- package/esm/hooks/useModularUIBasic.js.map +1 -1
- package/esm/i18n/Locale.js +2 -5
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js +2 -5
- package/esm/i18n/Locales.js.map +1 -1
- package/esm/i18n/Message.js +9 -10
- package/esm/i18n/Message.js.map +1 -1
- package/esm/i18n/withMessage.js +1 -6
- package/esm/i18n/withMessage.js.map +1 -1
- package/esm/models/actions/ActionCollection.js +3 -6
- package/esm/models/actions/ActionCollection.js.map +1 -1
- package/esm/models/actions/ActionModel.js +1 -4
- package/esm/models/actions/ActionModel.js.map +1 -1
- package/esm/models/application/ApplicationModel.js +2 -2
- package/esm/models/application/ApplicationModel.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js +4 -14
- package/esm/models/attributes/AttributeCollection.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js +1 -2
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/AttributeSetModel.js +1 -5
- package/esm/models/attributes/AttributeSetModel.js.map +1 -1
- package/esm/models/attributes/CaptchaAttributeModel.js +2 -2
- package/esm/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeModel.js +1 -3
- package/esm/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js +3 -9
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/esm/models/attributes/ChoiceAttributeOptionModel.js +2 -8
- package/esm/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/esm/models/attributes/PasswordAttributeModel.js +2 -2
- package/esm/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/esm/models/attributes/UploadAttributeModel.js +2 -2
- package/esm/models/attributes/UploadAttributeModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintCollection.js +1 -2
- package/esm/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/esm/models/attributes/input-constraints/ConstraintModel.js +1 -2
- package/esm/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js +1 -4
- package/esm/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js +1 -6
- package/esm/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js +1 -4
- package/esm/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +1 -2
- package/esm/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
- package/esm/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/esm/models/base/BaseCollection.js +1 -2
- package/esm/models/base/BaseCollection.js.map +1 -1
- package/esm/models/base/BaseModel.js +6 -9
- package/esm/models/base/BaseModel.js.map +1 -1
- package/esm/models/base/ResourceModel.js +1 -2
- package/esm/models/base/ResourceModel.js.map +1 -1
- package/esm/models/concepts/BusinessScenarioModel.js +2 -2
- package/esm/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js +1 -2
- package/esm/models/concepts/ConceptDetailModel.js.map +1 -1
- package/esm/models/concepts/ConceptLinkModel.js +1 -3
- package/esm/models/concepts/ConceptLinkModel.js.map +1 -1
- package/esm/models/concepts/ConceptRelationCollection.js +1 -4
- package/esm/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/esm/models/concepts/ConceptRelationModel.js +1 -3
- package/esm/models/concepts/ConceptRelationModel.js.map +1 -1
- package/esm/models/concepts/SourceReferenceCollection.js +1 -4
- package/esm/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/esm/models/concepts/SourceReferenceModel.js +7 -3
- package/esm/models/concepts/SourceReferenceModel.js.flow +6 -0
- package/esm/models/concepts/SourceReferenceModel.js.map +1 -1
- package/esm/models/content/ContentLinkModel.js +1 -3
- package/esm/models/content/ContentLinkModel.js.map +1 -1
- package/esm/models/content/ContentTOCModel.js +2 -2
- package/esm/models/content/ContentTOCModel.js.map +1 -1
- package/esm/models/contentconfiguration/ContentConfigurationElements.js +1 -2
- package/esm/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/esm/models/error/ErrorModel.js +1 -3
- package/esm/models/error/ErrorModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js +1 -4
- package/esm/models/filters/FilterCollection.js.map +1 -1
- package/esm/models/form/FormModel.js +3 -9
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js +2 -4
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/href/Href.js +3 -6
- package/esm/models/href/Href.js.map +1 -1
- package/esm/models/href/ListHref.js +1 -2
- package/esm/models/href/ListHref.js.map +1 -1
- package/esm/models/layouthint/LayoutHintCollection.js +3 -10
- package/esm/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/esm/models/links/LinkCollection.js +6 -15
- package/esm/models/links/LinkCollection.js.map +1 -1
- package/esm/models/list/ListModel.js +2 -2
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/modelcatalog/ModelCategoryCollection.js +1 -2
- package/esm/models/modelcatalog/ModelCategoryCollection.js.map +1 -1
- package/esm/models/parameter/Parameter.js +2 -4
- package/esm/models/parameter/Parameter.js.map +1 -1
- package/esm/models/resolveModel.js +1 -2
- package/esm/models/resolveModel.js.map +1 -1
- package/esm/models/sorting/SortingModel.js +1 -2
- package/esm/models/sorting/SortingModel.js.map +1 -1
- package/esm/models/user/UserServicesModel.js +2 -2
- package/esm/models/user/UserServicesModel.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js +1 -2
- package/esm/modularui/ModularUIRequest.js.map +1 -1
- package/esm/react/ErrorBoundary.js +2 -2
- package/esm/react/ErrorBoundary.js.map +1 -1
- package/esm/react/ErrorBoundaryFallback.js +13 -16
- package/esm/react/ErrorBoundaryFallback.js.map +1 -1
- package/esm/react/utils.js +1 -3
- package/esm/react/utils.js.map +1 -1
- package/esm/react-client/Init.js +20 -23
- package/esm/react-client/Init.js.map +1 -1
- package/esm/react-client/client.js +9 -13
- package/esm/react-client/client.js.map +1 -1
- package/esm/react-server/renderSSRComplete.js +9 -10
- package/esm/react-server/renderSSRComplete.js.map +1 -1
- package/esm/react-server/renderSSRMinimal.js +7 -8
- package/esm/react-server/renderSSRMinimal.js.map +1 -1
- package/esm/react-server/serverNoSSR.js +11 -12
- package/esm/react-server/serverNoSSR.js.map +1 -1
- package/esm/react-server/serverSSR.js +11 -12
- package/esm/react-server/serverSSR.js.map +1 -1
- package/esm/react-server/serverUtil.js +1 -3
- package/esm/react-server/serverUtil.js.map +1 -1
- package/esm/react-theme/ThemeProvider.js +7 -11
- package/esm/react-theme/ThemeProvider.js.map +1 -1
- package/esm/react-theme/createTheme.js +3 -10
- package/esm/react-theme/createTheme.js.map +1 -1
- package/esm/react-theme/utils/background.js +3 -4
- package/esm/react-theme/utils/background.js.map +1 -1
- package/esm/react-theme/utils/colors.js +7 -16
- package/esm/react-theme/utils/colors.js.map +1 -1
- package/esm/react-theme/utils/contrast.js +11 -19
- package/esm/react-theme/utils/contrast.js.map +1 -1
- package/esm/react-theme/utils/corners.js +10 -16
- package/esm/react-theme/utils/corners.js.map +1 -1
- package/esm/react-theme/utils/spacers.js +15 -38
- package/esm/react-theme/utils/spacers.js.map +1 -1
- package/esm/react-theme/utils/themeProps.js +7 -22
- package/esm/react-theme/utils/themeProps.js.map +1 -1
- package/esm/redux/_i18n/I18nReducer.js +5 -8
- package/esm/redux/_i18n/I18nReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUIActions.js +19 -23
- package/esm/redux/_modularui/ModularUIActions.js.map +1 -1
- package/esm/redux/_modularui/ModularUIConnector.js +4 -5
- package/esm/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/esm/redux/_modularui/ModularUIReducer.js +14 -19
- package/esm/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/esm/redux/_modularui/ModularUIUtils.js +1 -2
- package/esm/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/esm/redux/_modularui/withModularUI.js +1 -2
- package/esm/redux/_modularui/withModularUI.js.map +1 -1
- package/esm/redux/_router/RouterReducer.js +1 -3
- package/esm/redux/_router/RouterReducer.js.map +1 -1
- package/esm/redux/actions/FormAttributeSet.js +34 -37
- package/esm/redux/actions/FormAttributeSet.js.map +1 -1
- package/esm/redux/actions/FormAutosubmit.js +1 -2
- package/esm/redux/actions/FormAutosubmit.js.map +1 -1
- package/esm/redux/actions/Preferences.js +8 -15
- package/esm/redux/actions/Preferences.js.map +1 -1
- package/esm/redux/connectors/CaseView.js +3 -6
- package/esm/redux/connectors/CaseView.js.map +1 -1
- package/esm/redux/connectors/ConceptDetail.js +4 -7
- package/esm/redux/connectors/ConceptDetail.js.map +1 -1
- package/esm/redux/connectors/ContentBrowser.js +3 -6
- package/esm/redux/connectors/ContentBrowser.js.map +1 -1
- package/esm/redux/connectors/ContentDetail.js +4 -7
- package/esm/redux/connectors/ContentDetail.js.map +1 -1
- package/esm/redux/connectors/ContentDetailSection.js +5 -8
- package/esm/redux/connectors/ContentDetailSection.js.map +1 -1
- package/esm/redux/connectors/Form.js +4 -5
- package/esm/redux/connectors/Form.js.map +1 -1
- package/esm/redux/connectors/FormAttributeSet.js +5 -8
- package/esm/redux/connectors/FormAttributeSet.js.map +1 -1
- package/esm/redux/connectors/ListDetail.js +3 -6
- package/esm/redux/connectors/ListDetail.js.map +1 -1
- package/esm/redux/connectors/ModelCatalog.js +3 -6
- package/esm/redux/connectors/ModelCatalog.js.map +1 -1
- package/esm/redux/connectors/PanelRenderer.js +5 -6
- package/esm/redux/connectors/PanelRenderer.js.map +1 -1
- package/esm/redux/connectors/QuickSearch.js +3 -6
- package/esm/redux/connectors/QuickSearch.js.map +1 -1
- package/esm/redux/connectors/Tab.js +3 -6
- package/esm/redux/connectors/Tab.js.map +1 -1
- package/esm/redux/reducers/AuthReducer.js +1 -3
- package/esm/redux/reducers/AuthReducer.js.map +1 -1
- package/esm/redux/reducers/ErrorReducer.js +1 -3
- package/esm/redux/reducers/ErrorReducer.js.map +1 -1
- package/esm/redux/reducers/ModalsReducer.js +1 -3
- package/esm/redux/reducers/ModalsReducer.js.map +1 -1
- package/esm/redux/reducers/ModelCatalogReducer.js +1 -3
- package/esm/redux/reducers/ModelCatalogReducer.js.map +1 -1
- package/esm/redux/reducers/NotificationReducer.js +1 -3
- package/esm/redux/reducers/NotificationReducer.js.map +1 -1
- package/esm/redux/reducers/PreferencesReducer.js +1 -3
- package/esm/redux/reducers/PreferencesReducer.js.map +1 -1
- package/esm/redux/reducers/ProgressIndicatorReducer.js +1 -3
- package/esm/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/esm/redux/store/beforeRenderHooks.js +1 -3
- package/esm/redux/store/beforeRenderHooks.js.map +1 -1
- package/esm/utils/browser/Cache.js +1 -5
- package/esm/utils/browser/Cache.js.map +1 -1
- package/esm/utils/datetime/DateTimeUtil.js +45 -91
- package/esm/utils/datetime/DateTimeUtil.js.map +1 -1
- package/esm/utils/fetch/xhr.js +1 -2
- package/esm/utils/fetch/xhr.js.map +1 -1
- package/esm/utils/helpers/repositoryResource.js +1 -3
- package/esm/utils/helpers/repositoryResource.js.map +1 -1
- package/esm/utils/helpers/sanitizeHtml.js +3 -4
- package/esm/utils/helpers/sanitizeHtml.js.map +1 -1
- package/esm/utils/number/DecimalFormat.js +1 -2
- package/esm/utils/number/DecimalFormat.js.map +1 -1
- package/esm/utils/number/formatValue.js +1 -4
- package/esm/utils/number/formatValue.js.map +1 -1
- package/esm/utils/number/parseNumbers.js +2 -6
- package/esm/utils/number/parseNumbers.js.map +1 -1
- package/lib/constants/Settings.js +3 -14
- package/lib/constants/Settings.js.map +1 -1
- package/lib/exceptions/NotFoundException.js +1 -2
- package/lib/exceptions/NotFoundException.js.map +1 -1
- package/lib/hooks/useI18n.js +1 -6
- package/lib/hooks/useI18n.js.map +1 -1
- package/lib/hooks/useModal.js +3 -4
- package/lib/hooks/useModal.js.map +1 -1
- package/lib/hooks/useModelCatalog.js +10 -30
- package/lib/hooks/useModelCatalog.js.map +1 -1
- package/lib/hooks/useModularUI.js +4 -5
- package/lib/hooks/useModularUI.js.map +1 -1
- package/lib/hooks/useModularUIBasic.js +7 -8
- package/lib/hooks/useModularUIBasic.js.map +1 -1
- package/lib/i18n/Locale.js +2 -5
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js +2 -5
- package/lib/i18n/Locales.js.map +1 -1
- package/lib/i18n/Message.js +9 -10
- package/lib/i18n/Message.js.map +1 -1
- package/lib/i18n/withMessage.js +1 -6
- package/lib/i18n/withMessage.js.map +1 -1
- package/lib/models/actions/ActionCollection.js +3 -6
- package/lib/models/actions/ActionCollection.js.map +1 -1
- package/lib/models/actions/ActionModel.js +1 -4
- package/lib/models/actions/ActionModel.js.map +1 -1
- package/lib/models/application/ApplicationModel.js +2 -2
- package/lib/models/application/ApplicationModel.js.map +1 -1
- package/lib/models/attributes/AttributeCollection.js +4 -14
- package/lib/models/attributes/AttributeCollection.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js +1 -2
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/AttributeSetModel.js +1 -5
- package/lib/models/attributes/AttributeSetModel.js.map +1 -1
- package/lib/models/attributes/CaptchaAttributeModel.js +2 -2
- package/lib/models/attributes/CaptchaAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeModel.js +1 -3
- package/lib/models/attributes/ChoiceAttributeModel.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js +3 -9
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js.map +1 -1
- package/lib/models/attributes/ChoiceAttributeOptionModel.js +2 -8
- package/lib/models/attributes/ChoiceAttributeOptionModel.js.map +1 -1
- package/lib/models/attributes/PasswordAttributeModel.js +2 -2
- package/lib/models/attributes/PasswordAttributeModel.js.map +1 -1
- package/lib/models/attributes/UploadAttributeModel.js +2 -2
- package/lib/models/attributes/UploadAttributeModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintCollection.js +1 -2
- package/lib/models/attributes/input-constraints/ConstraintCollection.js.map +1 -1
- package/lib/models/attributes/input-constraints/ConstraintModel.js +1 -2
- package/lib/models/attributes/input-constraints/ConstraintModel.js.map +1 -1
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js +1 -4
- package/lib/models/attributes/input-constraints/DateBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js +1 -6
- package/lib/models/attributes/input-constraints/NumberBoundaryConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js +1 -4
- package/lib/models/attributes/input-constraints/NumberGroupingConstraint.js.map +1 -1
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js +1 -2
- package/lib/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.js.map +1 -1
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js +2 -2
- package/lib/models/attributes/layouthint-rules/DependentAttribute.js.map +1 -1
- package/lib/models/base/BaseCollection.js +1 -2
- package/lib/models/base/BaseCollection.js.map +1 -1
- package/lib/models/base/BaseModel.js +6 -9
- package/lib/models/base/BaseModel.js.map +1 -1
- package/lib/models/base/ResourceModel.js +1 -2
- package/lib/models/base/ResourceModel.js.map +1 -1
- package/lib/models/concepts/BusinessScenarioModel.js +2 -2
- package/lib/models/concepts/BusinessScenarioModel.js.map +1 -1
- package/lib/models/concepts/ConceptDetailModel.js +1 -2
- package/lib/models/concepts/ConceptDetailModel.js.map +1 -1
- package/lib/models/concepts/ConceptLinkModel.js +1 -3
- package/lib/models/concepts/ConceptLinkModel.js.map +1 -1
- package/lib/models/concepts/ConceptRelationCollection.js +1 -4
- package/lib/models/concepts/ConceptRelationCollection.js.map +1 -1
- package/lib/models/concepts/ConceptRelationModel.js +1 -3
- package/lib/models/concepts/ConceptRelationModel.js.map +1 -1
- package/lib/models/concepts/SourceReferenceCollection.js +1 -4
- package/lib/models/concepts/SourceReferenceCollection.js.map +1 -1
- package/lib/models/concepts/SourceReferenceModel.js +7 -3
- package/lib/models/concepts/SourceReferenceModel.js.map +1 -1
- package/lib/models/content/ContentLinkModel.js +1 -3
- package/lib/models/content/ContentLinkModel.js.map +1 -1
- package/lib/models/content/ContentTOCModel.js +2 -2
- package/lib/models/content/ContentTOCModel.js.map +1 -1
- package/lib/models/contentconfiguration/ContentConfigurationElements.js +1 -2
- package/lib/models/contentconfiguration/ContentConfigurationElements.js.map +1 -1
- package/lib/models/error/ErrorModel.js +1 -3
- package/lib/models/error/ErrorModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js +1 -4
- package/lib/models/filters/FilterCollection.js.map +1 -1
- package/lib/models/form/FormModel.js +3 -9
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js +2 -4
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/href/Href.js +3 -6
- package/lib/models/href/Href.js.map +1 -1
- package/lib/models/href/ListHref.js +1 -2
- package/lib/models/href/ListHref.js.map +1 -1
- package/lib/models/layouthint/LayoutHintCollection.js +3 -10
- package/lib/models/layouthint/LayoutHintCollection.js.map +1 -1
- package/lib/models/links/LinkCollection.js +6 -15
- package/lib/models/links/LinkCollection.js.map +1 -1
- package/lib/models/list/ListModel.js +2 -2
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/modelcatalog/ModelCategoryCollection.js +1 -2
- package/lib/models/modelcatalog/ModelCategoryCollection.js.map +1 -1
- package/lib/models/parameter/Parameter.js +2 -4
- package/lib/models/parameter/Parameter.js.map +1 -1
- package/lib/models/resolveModel.js +1 -2
- package/lib/models/resolveModel.js.map +1 -1
- package/lib/models/sorting/SortingModel.js +1 -2
- package/lib/models/sorting/SortingModel.js.map +1 -1
- package/lib/models/user/UserServicesModel.js +2 -2
- package/lib/models/user/UserServicesModel.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +1 -2
- package/lib/modularui/ModularUIRequest.js.map +1 -1
- package/lib/react/ErrorBoundary.js +2 -2
- package/lib/react/ErrorBoundary.js.map +1 -1
- package/lib/react/ErrorBoundaryFallback.js +13 -16
- package/lib/react/ErrorBoundaryFallback.js.map +1 -1
- package/lib/react/utils.js +1 -3
- package/lib/react/utils.js.map +1 -1
- package/lib/react-client/Init.js +20 -23
- package/lib/react-client/Init.js.map +1 -1
- package/lib/react-client/client.js +9 -13
- package/lib/react-client/client.js.map +1 -1
- package/lib/react-server/renderSSRComplete.js +9 -10
- package/lib/react-server/renderSSRComplete.js.map +1 -1
- package/lib/react-server/renderSSRMinimal.js +7 -8
- package/lib/react-server/renderSSRMinimal.js.map +1 -1
- package/lib/react-server/serverNoSSR.js +11 -12
- package/lib/react-server/serverNoSSR.js.map +1 -1
- package/lib/react-server/serverSSR.js +11 -12
- package/lib/react-server/serverSSR.js.map +1 -1
- package/lib/react-server/serverUtil.js +1 -3
- package/lib/react-server/serverUtil.js.map +1 -1
- package/lib/react-theme/ThemeProvider.js +7 -11
- package/lib/react-theme/ThemeProvider.js.map +1 -1
- package/lib/react-theme/createTheme.js +3 -10
- package/lib/react-theme/createTheme.js.map +1 -1
- package/lib/react-theme/utils/background.js +3 -4
- package/lib/react-theme/utils/background.js.map +1 -1
- package/lib/react-theme/utils/colors.js +7 -16
- package/lib/react-theme/utils/colors.js.map +1 -1
- package/lib/react-theme/utils/contrast.js +11 -19
- package/lib/react-theme/utils/contrast.js.map +1 -1
- package/lib/react-theme/utils/corners.js +10 -16
- package/lib/react-theme/utils/corners.js.map +1 -1
- package/lib/react-theme/utils/spacers.js +15 -38
- package/lib/react-theme/utils/spacers.js.map +1 -1
- package/lib/react-theme/utils/themeProps.js +7 -22
- package/lib/react-theme/utils/themeProps.js.map +1 -1
- package/lib/redux/_i18n/I18nReducer.js +5 -8
- package/lib/redux/_i18n/I18nReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUIActions.js +19 -23
- package/lib/redux/_modularui/ModularUIActions.js.map +1 -1
- package/lib/redux/_modularui/ModularUIConnector.js +4 -5
- package/lib/redux/_modularui/ModularUIConnector.js.map +1 -1
- package/lib/redux/_modularui/ModularUIReducer.js +14 -19
- package/lib/redux/_modularui/ModularUIReducer.js.map +1 -1
- package/lib/redux/_modularui/ModularUIUtils.js +1 -2
- package/lib/redux/_modularui/ModularUIUtils.js.map +1 -1
- package/lib/redux/_modularui/withModularUI.js +1 -2
- package/lib/redux/_modularui/withModularUI.js.map +1 -1
- package/lib/redux/_router/RouterReducer.js +1 -3
- package/lib/redux/_router/RouterReducer.js.map +1 -1
- package/lib/redux/actions/FormAttributeSet.js +34 -37
- package/lib/redux/actions/FormAttributeSet.js.map +1 -1
- package/lib/redux/actions/FormAutosubmit.js +1 -2
- package/lib/redux/actions/FormAutosubmit.js.map +1 -1
- package/lib/redux/actions/Preferences.js +8 -15
- package/lib/redux/actions/Preferences.js.map +1 -1
- package/lib/redux/connectors/CaseView.js +3 -6
- package/lib/redux/connectors/CaseView.js.map +1 -1
- package/lib/redux/connectors/ConceptDetail.js +4 -7
- package/lib/redux/connectors/ConceptDetail.js.map +1 -1
- package/lib/redux/connectors/ContentBrowser.js +3 -6
- package/lib/redux/connectors/ContentBrowser.js.map +1 -1
- package/lib/redux/connectors/ContentDetail.js +4 -7
- package/lib/redux/connectors/ContentDetail.js.map +1 -1
- package/lib/redux/connectors/ContentDetailSection.js +5 -8
- package/lib/redux/connectors/ContentDetailSection.js.map +1 -1
- package/lib/redux/connectors/Form.js +4 -5
- package/lib/redux/connectors/Form.js.map +1 -1
- package/lib/redux/connectors/FormAttributeSet.js +5 -8
- package/lib/redux/connectors/FormAttributeSet.js.map +1 -1
- package/lib/redux/connectors/ListDetail.js +3 -6
- package/lib/redux/connectors/ListDetail.js.map +1 -1
- package/lib/redux/connectors/ModelCatalog.js +3 -6
- package/lib/redux/connectors/ModelCatalog.js.map +1 -1
- package/lib/redux/connectors/PanelRenderer.js +5 -6
- package/lib/redux/connectors/PanelRenderer.js.map +1 -1
- package/lib/redux/connectors/QuickSearch.js +3 -6
- package/lib/redux/connectors/QuickSearch.js.map +1 -1
- package/lib/redux/connectors/Tab.js +3 -6
- package/lib/redux/connectors/Tab.js.map +1 -1
- package/lib/redux/reducers/AuthReducer.js +1 -3
- package/lib/redux/reducers/AuthReducer.js.map +1 -1
- package/lib/redux/reducers/ErrorReducer.js +1 -3
- package/lib/redux/reducers/ErrorReducer.js.map +1 -1
- package/lib/redux/reducers/ModalsReducer.js +1 -3
- package/lib/redux/reducers/ModalsReducer.js.map +1 -1
- package/lib/redux/reducers/ModelCatalogReducer.js +1 -3
- package/lib/redux/reducers/ModelCatalogReducer.js.map +1 -1
- package/lib/redux/reducers/NotificationReducer.js +1 -3
- package/lib/redux/reducers/NotificationReducer.js.map +1 -1
- package/lib/redux/reducers/PreferencesReducer.js +1 -3
- package/lib/redux/reducers/PreferencesReducer.js.map +1 -1
- package/lib/redux/reducers/ProgressIndicatorReducer.js +1 -3
- package/lib/redux/reducers/ProgressIndicatorReducer.js.map +1 -1
- package/lib/redux/store/beforeRenderHooks.js +1 -3
- package/lib/redux/store/beforeRenderHooks.js.map +1 -1
- package/lib/utils/browser/Cache.js +1 -5
- package/lib/utils/browser/Cache.js.map +1 -1
- package/lib/utils/datetime/DateTimeUtil.js +45 -91
- package/lib/utils/datetime/DateTimeUtil.js.map +1 -1
- package/lib/utils/fetch/xhr.js +1 -2
- package/lib/utils/fetch/xhr.js.map +1 -1
- package/lib/utils/helpers/repositoryResource.js +1 -3
- package/lib/utils/helpers/repositoryResource.js.map +1 -1
- package/lib/utils/helpers/sanitizeHtml.js +3 -4
- package/lib/utils/helpers/sanitizeHtml.js.map +1 -1
- package/lib/utils/number/DecimalFormat.js +1 -2
- package/lib/utils/number/DecimalFormat.js.map +1 -1
- package/lib/utils/number/formatValue.js +1 -4
- package/lib/utils/number/formatValue.js.map +1 -1
- package/lib/utils/number/parseNumbers.js +2 -6
- package/lib/utils/number/parseNumbers.js.map +1 -1
- package/package.json +22 -22
- package/src/models/concepts/SourceReferenceModel.js +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","
|
|
1
|
+
{"version":3,"file":"ProgressIndicatorReducer.js","names":["initialState","count","timestamp","percentComplete","finishProgress","state","isFinalFinish","Date","now","progressIndicatorReducer","action","type","payload"],"sources":["../../../src/redux/reducers/ProgressIndicatorReducer.js"],"sourcesContent":["// @flow\nimport type { Reducer } from \"redux\";\nimport type { ReduxAction, ProgressIndicatorState } from \"../types\";\n\n// REDUCER\nconst initialState: ProgressIndicatorState = {\n count: 0,\n timestamp: 0,\n percentComplete: 0,\n};\n\nconst finishProgress = (state: ProgressIndicatorState) => {\n const isFinalFinish = state.count - 1 === 0;\n return {\n ...state,\n count: state.count <= 0 ? 0 : state.count - 1,\n timestamp: isFinalFinish ? Date.now() : state.timestamp,\n percentComplete: isFinalFinish ? 0 : state.percentComplete,\n };\n};\n\n/**\n * Keep state for the progress indicator\n */\nconst progressIndicatorReducer: Reducer<ProgressIndicatorState, ReduxAction> = (\n state = initialState,\n action,\n) => {\n if (!action) {\n return state;\n }\n\n switch (action.type) {\n case \"UPDATE_PROGRESS\":\n return {\n ...state,\n percentComplete: action.payload?.percentComplete,\n };\n\n case \"FINISH_PROGRESS\":\n return finishProgress(state);\n\n case \"START_PROGRESS\":\n return {\n ...state,\n count: state.count + 1,\n };\n\n case \"RESET_PROGRESS\":\n return {\n ...state,\n count: 0,\n };\n\n default:\n return state;\n }\n};\n\nexport default progressIndicatorReducer;\n"],"mappings":"AAIA;AACA,MAAMA,YAAoC,GAAG;EAC3CC,KAAK,EAAE,CAAC;EACRC,SAAS,EAAE,CAAC;EACZC,eAAe,EAAE;AACnB,CAAC;AAED,MAAMC,cAAc,GAAIC,KAA6B,IAAK;EACxD,MAAMC,aAAa,GAAGD,KAAK,CAACJ,KAAK,GAAG,CAAC,KAAK,CAAC;EAC3C,OAAO;IACL,GAAGI,KAAK;IACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,IAAI,CAAC,GAAG,CAAC,GAAGI,KAAK,CAACJ,KAAK,GAAG,CAAC;IAC7CC,SAAS,EAAEI,aAAa,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGH,KAAK,CAACH,SAAS;IACvDC,eAAe,EAAEG,aAAa,GAAG,CAAC,GAAGD,KAAK,CAACF;EAC7C,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA,MAAMM,wBAAsE,GAAGA,CAC7EJ,KAAK,GAAGL,YAAY,EACpBU,MAAM,KACH;EACH,IAAI,CAACA,MAAM,EAAE;IACX,OAAOL,KAAK;EACd;EAEA,QAAQK,MAAM,CAACC,IAAI;IACjB,KAAK,iBAAiB;MACpB,OAAO;QACL,GAAGN,KAAK;QACRF,eAAe,EAAEO,MAAM,CAACE,OAAO,EAAET;MACnC,CAAC;IAEH,KAAK,iBAAiB;MACpB,OAAOC,cAAc,CAACC,KAAK,CAAC;IAE9B,KAAK,gBAAgB;MACnB,OAAO;QACL,GAAGA,KAAK;QACRJ,KAAK,EAAEI,KAAK,CAACJ,KAAK,GAAG;MACvB,CAAC;IAEH,KAAK,gBAAgB;MACnB,OAAO;QACL,GAAGI,KAAK;QACRJ,KAAK,EAAE;MACT,CAAC;IAEH;MACE,OAAOI,KAAK;EAChB;AACF,CAAC;AAED,eAAeI,wBAAwB","ignoreList":[]}
|
|
@@ -5,9 +5,7 @@
|
|
|
5
5
|
* for example server preferences, and the request is available to retrieve request information
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
export const handleBeforeRenderHooks =
|
|
9
|
-
let beforeRenderHooks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
10
|
-
let props = arguments.length > 1 ? arguments[1] : undefined;
|
|
8
|
+
export const handleBeforeRenderHooks = (beforeRenderHooks = [], props) => {
|
|
11
9
|
if (beforeRenderHooks.length > 0) {
|
|
12
10
|
for (const beforeRenderHook of beforeRenderHooks) {
|
|
13
11
|
beforeRenderHook(props);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","
|
|
1
|
+
{"version":3,"file":"beforeRenderHooks.js","names":["handleBeforeRenderHooks","beforeRenderHooks","props","length","beforeRenderHook"],"sources":["../../../src/redux/store/beforeRenderHooks.js"],"sourcesContent":["// @flow\nimport type { ReduxStore } from \"../types\";\n\nexport type BeforeRenderHookProps = {\n store: ReduxStore,\n request?: HttpServletRequestJava,\n};\nexport type BeforeRenderHook = (props: BeforeRenderHookProps) => void;\n\n/**\n * Process handlers that need to be run before the react application starts,\n * for example to start a third party service<br>\n * An object with the store is available to make it possible to read state available in the redux store,\n * for example server preferences, and the request is available to retrieve request information\n *\n */\nexport const handleBeforeRenderHooks = (\n beforeRenderHooks: Array<BeforeRenderHook> = [],\n props: BeforeRenderHookProps,\n) => {\n if (beforeRenderHooks.length > 0) {\n for (const beforeRenderHook of beforeRenderHooks) {\n beforeRenderHook(props);\n }\n }\n};\n"],"mappings":"AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,uBAAuB,GAAGA,CACrCC,iBAA0C,GAAG,EAAE,EAC/CC,KAA4B,KACzB;EACH,IAAID,iBAAiB,CAACE,MAAM,GAAG,CAAC,EAAE;IAChC,KAAK,MAAMC,gBAAgB,IAAIH,iBAAiB,EAAE;MAChDG,gBAAgB,CAACF,KAAK,CAAC;IACzB;EACF;AACF,CAAC","ignoreList":[]}
|
|
@@ -127,11 +127,7 @@ class Cache {
|
|
|
127
127
|
var _context2;
|
|
128
128
|
// receive sessionstorage from other tabs
|
|
129
129
|
const newData = e.newValue ? JSON.parse(e.newValue) : {};
|
|
130
|
-
_filterInstanceProperty(_context2 = _Object$entries(newData)).call(_context2,
|
|
131
|
-
let [key] = _ref;
|
|
132
|
-
return !this.hasItem(key) && !_startsWithInstanceProperty(key).call(key, RESOURCE_CACHE_PREFIX);
|
|
133
|
-
}).forEach(_ref2 => {
|
|
134
|
-
let [key, value] = _ref2;
|
|
130
|
+
_filterInstanceProperty(_context2 = _Object$entries(newData)).call(_context2, ([key]) => !this.hasItem(key) && !_startsWithInstanceProperty(key).call(key, RESOURCE_CACHE_PREFIX)).forEach(([key, value]) => {
|
|
135
131
|
this.addItem(key, value);
|
|
136
132
|
});
|
|
137
133
|
this.setItem("sessionStorageCopied", Date.now().toString());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","_defineProperty","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_JSON$stringify","setItem","removeItem","clear","pattern","_context","_filterInstanceProperty","_Object$keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_Object$entries","
|
|
1
|
+
{"version":3,"file":"Cache.js","names":["RESOURCE_CACHE_PREFIX","Cache","constructor","_defineProperty","sessionStorage","_cache","createResourceKey","requestArgs","resourceKey","url","params","locale","getItem","key","cache","cacheItem","JSON","parse","error","hasItem","addItem","value","stringValue","_JSON$stringify","setItem","removeItem","clear","pattern","_context","_filterInstanceProperty","_Object$keys","call","k","RegExp","test","forEach","loadOtherBrowserTabs","callback","window","addEventListener","e","sendSessionStorage","receiveSessionStorage","length","localStorage","Date","now","toString","_context2","newData","newValue","_Object$entries","_startsWithInstanceProperty"],"sources":["../../../src/utils/browser/Cache.js"],"sourcesContent":["// @flow\nimport type { RequestOptions } from \"../fetch/types\";\n\nconst RESOURCE_CACHE_PREFIX = \"res:\";\n\n/**\n * Manage the browser cache\n */\nclass Cache {\n _cache: Storage;\n\n /**\n */\n constructor() {\n if (typeof sessionStorage !== \"undefined\") {\n this._cache = sessionStorage;\n }\n }\n\n /**\n * Create a key that can be used to cache resources, needs the request arguments and uses url, params and header of the request args\n * to create a key that is unique for time versions and locale\n */\n createResourceKey(requestArgs: RequestOptions): string {\n let resourceKey = requestArgs.url;\n\n if (requestArgs.params) {\n resourceKey += `|${requestArgs.params}`;\n }\n\n if (requestArgs.locale) {\n resourceKey += `|${requestArgs.locale}`;\n }\n\n return `${RESOURCE_CACHE_PREFIX}${resourceKey}`;\n }\n\n /**\n * Get a cached item by it's key\n */\n getItem(key: string): any {\n const cache = this._cache;\n\n if (!cache) {\n return null;\n }\n\n const cacheItem = cache.getItem(key);\n\n if (!cacheItem) {\n return null;\n }\n\n try {\n return JSON.parse(cacheItem);\n } catch (error) {\n return this._cache.getItem(key);\n }\n }\n\n /**\n * Check if the item with key exists in the browser cache\n */\n hasItem(key: string): boolean {\n return this.getItem(key) !== null;\n }\n\n /**\n * Add an item to the cache\n */\n addItem(key: string, value: string | Object) {\n const stringValue =\n typeof value === \"string\" ? value : JSON.stringify(value);\n\n this._cache.setItem(key, stringValue);\n }\n\n /**\n */\n setItem(key: string, value: string | Object) {\n this.addItem(key, value);\n }\n\n /**\n */\n removeItem(key: string) {\n this._cache.removeItem(key);\n }\n\n /**\n * Clear complete cache storage\n */\n clear(pattern: ?string) {\n if (!this._cache) {\n return;\n }\n\n if (pattern) {\n Object.keys(this._cache)\n .filter((k) => (pattern ? new RegExp(pattern).test(k) : true))\n .forEach((k) => this._cache.removeItem(k));\n } else {\n this._cache.clear();\n }\n }\n\n // Session storage is not available between different tabs in the same window,\n // this load method copies sessionStorage from other tabs into this tab using localStorage\n // see https://blog.guya.net/2015/06/12/sharing-sessionstorage-between-tabs-for-secure-multi-tab-authentication/\n /**\n */\n loadOtherBrowserTabs(callback: Function) {\n window.addEventListener(\"storage\", (e) => {\n this.sendSessionStorage(e);\n this.receiveSessionStorage(e, callback);\n });\n\n if (this._cache.length === 0) {\n // trigger retrieval of sessionstorage on other tabs\n localStorage.setItem(\"getSessionStorage\", Date.now().toString());\n }\n }\n\n /**\n */\n sendSessionStorage(e: StorageEvent) {\n if (e.key === \"getSessionStorage\") {\n localStorage.setItem(\"sessionStorage\", JSON.stringify(this._cache));\n localStorage.removeItem(\"sessionStorage\");\n }\n }\n\n /**\n */\n receiveSessionStorage(e: StorageEvent, callback: Function): any {\n if (e.key === \"sessionStorage\" && !this.getItem(\"sessionStorageCopied\")) {\n // receive sessionstorage from other tabs\n const newData = e.newValue ? JSON.parse(e.newValue) : {};\n Object.entries(newData)\n .filter(\n ([key]) =>\n !this.hasItem(key) && !key.startsWith(RESOURCE_CACHE_PREFIX),\n )\n .forEach(([key, value]) => {\n this.addItem(key, value);\n });\n\n this.setItem(\"sessionStorageCopied\", Date.now().toString());\n\n return callback();\n }\n\n return null;\n }\n}\n\nexport default (new Cache(): Cache);\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -29,8 +29,7 @@ import { getCookie } from "../browser/Cookies";
|
|
|
29
29
|
* @hideconstructor
|
|
30
30
|
*/
|
|
31
31
|
class BaseDateTimeUtil {
|
|
32
|
-
constructor(isoFormat) {
|
|
33
|
-
let doOffsets = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
32
|
+
constructor(isoFormat, doOffsets = false) {
|
|
34
33
|
_defineProperty(this, "_isoFormat", void 0);
|
|
35
34
|
_defineProperty(this, "_doOffsets", void 0);
|
|
36
35
|
_defineProperty(this, "_timeZone", typeof Intl === "undefined" ? "Etc/UTC" : Intl.DateTimeFormat().resolvedOptions().timeZone || "Etc/UTC");
|
|
@@ -108,8 +107,7 @@ class BaseDateTimeUtil {
|
|
|
108
107
|
|
|
109
108
|
/**
|
|
110
109
|
*/
|
|
111
|
-
toDate(date) {
|
|
112
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
110
|
+
toDate(date, inputFormat = this.getIsoFormat()) {
|
|
113
111
|
if (date instanceof Date) {
|
|
114
112
|
return date;
|
|
115
113
|
}
|
|
@@ -126,8 +124,7 @@ class BaseDateTimeUtil {
|
|
|
126
124
|
|
|
127
125
|
/**
|
|
128
126
|
*/
|
|
129
|
-
toFormat(date, targetFormat) {
|
|
130
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
127
|
+
toFormat(date, targetFormat, inputFormat = this.getIsoFormat()) {
|
|
131
128
|
const {
|
|
132
129
|
weekStartsOn
|
|
133
130
|
} = this.getOptions();
|
|
@@ -144,8 +141,7 @@ class BaseDateTimeUtil {
|
|
|
144
141
|
|
|
145
142
|
/**
|
|
146
143
|
*/
|
|
147
|
-
toISO(date) {
|
|
148
|
-
let sourceFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
144
|
+
toISO(date, sourceFormat = this.getIsoFormat()) {
|
|
149
145
|
return this.toFormat(date, this.getIsoFormat(), sourceFormat);
|
|
150
146
|
}
|
|
151
147
|
|
|
@@ -174,8 +170,7 @@ class BaseDateTimeUtil {
|
|
|
174
170
|
|
|
175
171
|
/**
|
|
176
172
|
*/
|
|
177
|
-
isValid(date) {
|
|
178
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
173
|
+
isValid(date, inputFormat = this.getIsoFormat()) {
|
|
179
174
|
if (!date) {
|
|
180
175
|
return false;
|
|
181
176
|
}
|
|
@@ -185,50 +180,43 @@ class BaseDateTimeUtil {
|
|
|
185
180
|
|
|
186
181
|
/**
|
|
187
182
|
*/
|
|
188
|
-
isAfter(inputDate, afterISODate) {
|
|
189
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
183
|
+
isAfter(inputDate, afterISODate, inputFormat = this.getIsoFormat()) {
|
|
190
184
|
return afterISODate != null && isAfter(this.toDate(inputDate, inputFormat), this.toDate(afterISODate));
|
|
191
185
|
}
|
|
192
186
|
|
|
193
187
|
/**
|
|
194
188
|
*/
|
|
195
|
-
isSameOrAfter(inputDate, afterISODate) {
|
|
196
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
189
|
+
isSameOrAfter(inputDate, afterISODate, inputFormat = this.getIsoFormat()) {
|
|
197
190
|
return afterISODate != null && (this.isAfter(inputDate, afterISODate, inputFormat) || this.isSame(inputDate, afterISODate, inputFormat));
|
|
198
191
|
}
|
|
199
192
|
|
|
200
193
|
/**
|
|
201
194
|
*/
|
|
202
|
-
isBefore(inputDate, beforeISODate) {
|
|
203
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
195
|
+
isBefore(inputDate, beforeISODate, inputFormat = this.getIsoFormat()) {
|
|
204
196
|
return beforeISODate != null && isBefore(this.toDate(inputDate, inputFormat), this.toDate(beforeISODate));
|
|
205
197
|
}
|
|
206
198
|
|
|
207
199
|
/**
|
|
208
200
|
*/
|
|
209
|
-
isSameOrBefore(inputDate, beforeISODate) {
|
|
210
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
201
|
+
isSameOrBefore(inputDate, beforeISODate, inputFormat = this.getIsoFormat()) {
|
|
211
202
|
return beforeISODate != null && (this.isBefore(inputDate, beforeISODate, inputFormat) || this.isSame(inputDate, beforeISODate, inputFormat));
|
|
212
203
|
}
|
|
213
204
|
|
|
214
205
|
/**
|
|
215
206
|
*/
|
|
216
|
-
isSame(inputDate, compareDate) {
|
|
217
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
207
|
+
isSame(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
|
|
218
208
|
return compareDate != null && this.toDate(inputDate, inputFormat).getTime() === this.toDate(compareDate).getTime();
|
|
219
209
|
}
|
|
220
210
|
|
|
221
211
|
/**
|
|
222
212
|
*/
|
|
223
|
-
isSameDay(inputDate, compareDate) {
|
|
224
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
213
|
+
isSameDay(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
|
|
225
214
|
return compareDate != null && isSameDay(this.toDate(inputDate, inputFormat), this.toDate(compareDate, inputFormat));
|
|
226
215
|
}
|
|
227
216
|
|
|
228
217
|
/**
|
|
229
218
|
*/
|
|
230
|
-
isOther(inputDate, compareDate) {
|
|
231
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
219
|
+
isOther(inputDate, compareDate, inputFormat = this.getIsoFormat()) {
|
|
232
220
|
return !this.isSame(inputDate, compareDate, inputFormat);
|
|
233
221
|
}
|
|
234
222
|
|
|
@@ -245,8 +233,7 @@ class BaseDateTimeUtil {
|
|
|
245
233
|
* Checks if a given local date and time is ambiguous in the specified timezone.
|
|
246
234
|
* Ambiguity happens during the end of daylight saving time (DST) transitions.
|
|
247
235
|
*/
|
|
248
|
-
isAmbiguous(inputDate) {
|
|
249
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
236
|
+
isAmbiguous(inputDate, inputFormat = this.getIsoFormat()) {
|
|
250
237
|
if (inputDate == null || typeof Intl === "undefined") {
|
|
251
238
|
return false;
|
|
252
239
|
}
|
|
@@ -270,8 +257,7 @@ class BaseDateTimeUtil {
|
|
|
270
257
|
/**
|
|
271
258
|
* @private
|
|
272
259
|
*/
|
|
273
|
-
_calculate(date, calculationFn, property, value) {
|
|
274
|
-
let inputFormat = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.getIsoFormat();
|
|
260
|
+
_calculate(date, calculationFn, property, value, inputFormat = this.getIsoFormat()) {
|
|
275
261
|
const parsedDate = this.toDate(date, inputFormat);
|
|
276
262
|
return this.toISO(calculationFn(parsedDate, {
|
|
277
263
|
[property]: value
|
|
@@ -282,99 +268,85 @@ class BaseDateTimeUtil {
|
|
|
282
268
|
|
|
283
269
|
/**
|
|
284
270
|
*/
|
|
285
|
-
addSeconds(date, amount) {
|
|
286
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
271
|
+
addSeconds(date, amount, inputFormat = this.getIsoFormat()) {
|
|
287
272
|
return this._calculate(date, add, "seconds", amount, inputFormat);
|
|
288
273
|
}
|
|
289
274
|
|
|
290
275
|
/**
|
|
291
276
|
*/
|
|
292
|
-
addMinutes(date, amount) {
|
|
293
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
277
|
+
addMinutes(date, amount, inputFormat = this.getIsoFormat()) {
|
|
294
278
|
return this._calculate(date, add, "minutes", amount, inputFormat);
|
|
295
279
|
}
|
|
296
280
|
|
|
297
281
|
/**
|
|
298
282
|
*/
|
|
299
|
-
addHours(date, amount) {
|
|
300
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
283
|
+
addHours(date, amount, inputFormat = this.getIsoFormat()) {
|
|
301
284
|
return this._calculate(date, add, "hours", amount, inputFormat);
|
|
302
285
|
}
|
|
303
286
|
|
|
304
287
|
/**
|
|
305
288
|
*/
|
|
306
|
-
addDays(date, amount) {
|
|
307
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
289
|
+
addDays(date, amount, inputFormat = this.getIsoFormat()) {
|
|
308
290
|
return this._calculate(date, add, "days", amount, inputFormat);
|
|
309
291
|
}
|
|
310
292
|
|
|
311
293
|
/**
|
|
312
294
|
*/
|
|
313
|
-
addWeeks(date, amount) {
|
|
314
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
295
|
+
addWeeks(date, amount, inputFormat = this.getIsoFormat()) {
|
|
315
296
|
return this._calculate(date, add, "weeks", amount, inputFormat);
|
|
316
297
|
}
|
|
317
298
|
|
|
318
299
|
/**
|
|
319
300
|
*/
|
|
320
|
-
addMonths(date, amount) {
|
|
321
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
301
|
+
addMonths(date, amount, inputFormat = this.getIsoFormat()) {
|
|
322
302
|
return this._calculate(date, add, "months", amount, inputFormat);
|
|
323
303
|
}
|
|
324
304
|
|
|
325
305
|
/**
|
|
326
306
|
*/
|
|
327
|
-
addYears(date, amount) {
|
|
328
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
307
|
+
addYears(date, amount, inputFormat = this.getIsoFormat()) {
|
|
329
308
|
return this._calculate(date, add, "years", amount, inputFormat);
|
|
330
309
|
}
|
|
331
310
|
|
|
332
311
|
/**
|
|
333
312
|
*/
|
|
334
|
-
subtractSeconds(date, amount) {
|
|
335
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
313
|
+
subtractSeconds(date, amount, inputFormat = this.getIsoFormat()) {
|
|
336
314
|
return this._calculate(date, sub, "seconds", amount, inputFormat);
|
|
337
315
|
}
|
|
338
316
|
|
|
339
317
|
/**
|
|
340
318
|
*/
|
|
341
|
-
subtractMinutes(date, amount) {
|
|
342
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
319
|
+
subtractMinutes(date, amount, inputFormat = this.getIsoFormat()) {
|
|
343
320
|
return this._calculate(date, sub, "minutes", amount, inputFormat);
|
|
344
321
|
}
|
|
345
322
|
|
|
346
323
|
/**
|
|
347
324
|
*/
|
|
348
|
-
subtractHours(date, amount) {
|
|
349
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
325
|
+
subtractHours(date, amount, inputFormat = this.getIsoFormat()) {
|
|
350
326
|
return this._calculate(date, sub, "hours", amount, inputFormat);
|
|
351
327
|
}
|
|
352
328
|
|
|
353
329
|
/**
|
|
354
330
|
*/
|
|
355
|
-
subtractDays(date, amount) {
|
|
356
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
331
|
+
subtractDays(date, amount, inputFormat = this.getIsoFormat()) {
|
|
357
332
|
return this._calculate(date, sub, "days", amount, inputFormat);
|
|
358
333
|
}
|
|
359
334
|
|
|
360
335
|
/**
|
|
361
336
|
*/
|
|
362
|
-
subtractWeeks(date, amount) {
|
|
363
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
337
|
+
subtractWeeks(date, amount, inputFormat = this.getIsoFormat()) {
|
|
364
338
|
return this._calculate(date, sub, "weeks", amount, inputFormat);
|
|
365
339
|
}
|
|
366
340
|
|
|
367
341
|
/**
|
|
368
342
|
*/
|
|
369
|
-
subtractMonths(date, amount) {
|
|
370
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
343
|
+
subtractMonths(date, amount, inputFormat = this.getIsoFormat()) {
|
|
371
344
|
return this._calculate(date, sub, "months", amount, inputFormat);
|
|
372
345
|
}
|
|
373
346
|
|
|
374
347
|
/**
|
|
375
348
|
*/
|
|
376
|
-
subtractYears(date, amount) {
|
|
377
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
349
|
+
subtractYears(date, amount, inputFormat = this.getIsoFormat()) {
|
|
378
350
|
return this._calculate(date, sub, "years", amount, inputFormat);
|
|
379
351
|
}
|
|
380
352
|
|
|
@@ -383,9 +355,7 @@ class BaseDateTimeUtil {
|
|
|
383
355
|
/**
|
|
384
356
|
* @private
|
|
385
357
|
*/
|
|
386
|
-
_get(date, method) {
|
|
387
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
388
|
-
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
358
|
+
_get(date, method, inputFormat = this.getIsoFormat(), options = {}) {
|
|
389
359
|
const parsedDate = this.toDate(date, inputFormat);
|
|
390
360
|
return this.toISO(method(parsedDate, {
|
|
391
361
|
in: this.getDateFnsContext(),
|
|
@@ -395,22 +365,19 @@ class BaseDateTimeUtil {
|
|
|
395
365
|
|
|
396
366
|
/**
|
|
397
367
|
*/
|
|
398
|
-
startOfMonth(date) {
|
|
399
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
368
|
+
startOfMonth(date, inputFormat = this.getIsoFormat()) {
|
|
400
369
|
return this._get(date, startOfMonth, inputFormat);
|
|
401
370
|
}
|
|
402
371
|
|
|
403
372
|
/**
|
|
404
373
|
*/
|
|
405
|
-
endOfMonth(date) {
|
|
406
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
374
|
+
endOfMonth(date, inputFormat = this.getIsoFormat()) {
|
|
407
375
|
return this._get(date, endOfMonth, inputFormat);
|
|
408
376
|
}
|
|
409
377
|
|
|
410
378
|
/**
|
|
411
379
|
*/
|
|
412
|
-
startOfWeek(date) {
|
|
413
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
380
|
+
startOfWeek(date, inputFormat = this.getIsoFormat()) {
|
|
414
381
|
const {
|
|
415
382
|
weekStartsOn
|
|
416
383
|
} = this.getOptions();
|
|
@@ -421,8 +388,7 @@ class BaseDateTimeUtil {
|
|
|
421
388
|
|
|
422
389
|
/**
|
|
423
390
|
*/
|
|
424
|
-
getHours(date) {
|
|
425
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
391
|
+
getHours(date, inputFormat = this.getIsoFormat()) {
|
|
426
392
|
const parsedDate = this.toDate(date, inputFormat);
|
|
427
393
|
return getHours(parsedDate, {
|
|
428
394
|
in: this.getDateFnsContext()
|
|
@@ -431,8 +397,7 @@ class BaseDateTimeUtil {
|
|
|
431
397
|
|
|
432
398
|
/**
|
|
433
399
|
*/
|
|
434
|
-
getMinutes(date) {
|
|
435
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
400
|
+
getMinutes(date, inputFormat = this.getIsoFormat()) {
|
|
436
401
|
const parsedDate = this.toDate(date, inputFormat);
|
|
437
402
|
return getMinutes(parsedDate, {
|
|
438
403
|
in: this.getDateFnsContext()
|
|
@@ -441,8 +406,7 @@ class BaseDateTimeUtil {
|
|
|
441
406
|
|
|
442
407
|
/**
|
|
443
408
|
*/
|
|
444
|
-
getWeek(date) {
|
|
445
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
409
|
+
getWeek(date, inputFormat = this.getIsoFormat()) {
|
|
446
410
|
const {
|
|
447
411
|
weekStartsOn,
|
|
448
412
|
firstWeekContainsDate
|
|
@@ -460,8 +424,7 @@ class BaseDateTimeUtil {
|
|
|
460
424
|
/**
|
|
461
425
|
* @private
|
|
462
426
|
*/
|
|
463
|
-
_set(date, property, value) {
|
|
464
|
-
let inputFormat = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : this.getIsoFormat();
|
|
427
|
+
_set(date, property, value, inputFormat = this.getIsoFormat()) {
|
|
465
428
|
const parsedDate = this.toDate(date, inputFormat);
|
|
466
429
|
return this.toISO(set(parsedDate, {
|
|
467
430
|
[property]: value
|
|
@@ -474,57 +437,49 @@ class BaseDateTimeUtil {
|
|
|
474
437
|
|
|
475
438
|
/**
|
|
476
439
|
*/
|
|
477
|
-
setYear(date, year) {
|
|
478
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
440
|
+
setYear(date, year, inputFormat = this.getIsoFormat()) {
|
|
479
441
|
return this._set(date, "year", year, inputFormat);
|
|
480
442
|
}
|
|
481
443
|
|
|
482
444
|
/**
|
|
483
445
|
*/
|
|
484
|
-
setMonth(date, month) {
|
|
485
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
446
|
+
setMonth(date, month, inputFormat = this.getIsoFormat()) {
|
|
486
447
|
return this._set(date, "month", month, inputFormat);
|
|
487
448
|
}
|
|
488
449
|
|
|
489
450
|
/**
|
|
490
451
|
*/
|
|
491
|
-
setDay(date, day) {
|
|
492
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
452
|
+
setDay(date, day, inputFormat = this.getIsoFormat()) {
|
|
493
453
|
return this._set(date, "date", day, inputFormat);
|
|
494
454
|
}
|
|
495
455
|
|
|
496
456
|
/**
|
|
497
457
|
*/
|
|
498
|
-
setHour(date, hour) {
|
|
499
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
458
|
+
setHour(date, hour, inputFormat = this.getIsoFormat()) {
|
|
500
459
|
return this._set(date, "hours", hour, inputFormat);
|
|
501
460
|
}
|
|
502
461
|
|
|
503
462
|
/**
|
|
504
463
|
*/
|
|
505
|
-
setMinute(date, minute) {
|
|
506
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
464
|
+
setMinute(date, minute, inputFormat = this.getIsoFormat()) {
|
|
507
465
|
return this._set(date, "minutes", minute, inputFormat);
|
|
508
466
|
}
|
|
509
467
|
|
|
510
468
|
/**
|
|
511
469
|
*/
|
|
512
|
-
setSecond(date, second) {
|
|
513
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
470
|
+
setSecond(date, second, inputFormat = this.getIsoFormat()) {
|
|
514
471
|
return this._set(date, "seconds", second, inputFormat);
|
|
515
472
|
}
|
|
516
473
|
|
|
517
474
|
/**
|
|
518
475
|
*/
|
|
519
|
-
setMilliseconds(date, millisecond) {
|
|
520
|
-
let inputFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this.getIsoFormat();
|
|
476
|
+
setMilliseconds(date, millisecond, inputFormat = this.getIsoFormat()) {
|
|
521
477
|
return this._set(date, "milliseconds", millisecond, inputFormat);
|
|
522
478
|
}
|
|
523
479
|
|
|
524
480
|
/**
|
|
525
481
|
*/
|
|
526
|
-
setTime(date, hours, minutes, seconds, milliseconds) {
|
|
527
|
-
let inputFormat = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : this.getIsoFormat();
|
|
482
|
+
setTime(date, hours, minutes, seconds, milliseconds, inputFormat = this.getIsoFormat()) {
|
|
528
483
|
const parsedDate = this.toDate(date, inputFormat);
|
|
529
484
|
return this.toISO(set(parsedDate, {
|
|
530
485
|
hours,
|
|
@@ -563,8 +518,7 @@ class BaseDateTimeUtil {
|
|
|
563
518
|
|
|
564
519
|
/**
|
|
565
520
|
*/
|
|
566
|
-
getOffset(date) {
|
|
567
|
-
let inputFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getIsoFormat();
|
|
521
|
+
getOffset(date, inputFormat = this.getIsoFormat()) {
|
|
568
522
|
const parsedDate = this.toDate(date, inputFormat);
|
|
569
523
|
if (isValid(parsedDate)) {
|
|
570
524
|
const dateOffset = this.toFormat(parsedDate, DATETIME_OFFSET_FORMAT);
|