@ohos-ports/superset-ui-core 0.20.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/esm/api/index.js +1 -0
- package/esm/api/types/core.js +0 -0
- package/esm/api/types/core.js.map +1 -0
- package/esm/chart/clients/ChartClient.js +201 -0
- package/esm/chart/clients/ChartClient.js.map +1 -0
- package/esm/chart/components/ChartDataProvider.js +171 -0
- package/esm/chart/components/ChartDataProvider.js.map +1 -0
- package/esm/chart/components/FallbackComponent.js +61 -0
- package/esm/chart/components/FallbackComponent.js.map +1 -0
- package/esm/chart/components/NoResultsComponent.js +88 -0
- package/esm/chart/components/NoResultsComponent.js.map +1 -0
- package/esm/chart/components/SuperChart.js +267 -0
- package/esm/chart/components/SuperChart.js.map +1 -0
- package/esm/chart/components/SuperChartCore.js +235 -0
- package/esm/chart/components/SuperChartCore.js.map +1 -0
- package/esm/chart/components/createLoadableRenderer.js +75 -0
- package/esm/chart/components/createLoadableRenderer.js.map +1 -0
- package/esm/chart/components/reactify.js +115 -0
- package/esm/chart/components/reactify.js.map +1 -0
- package/esm/chart/index.js +49 -0
- package/esm/chart/index.js.map +1 -0
- package/esm/chart/models/ChartControlPanel.js +1 -0
- package/esm/chart/models/ChartControlPanel.js.map +1 -0
- package/esm/chart/models/ChartMetadata.js +160 -0
- package/esm/chart/models/ChartMetadata.js.map +1 -0
- package/esm/chart/models/ChartPlugin.js +162 -0
- package/esm/chart/models/ChartPlugin.js.map +1 -0
- package/esm/chart/models/ChartProps.js +270 -0
- package/esm/chart/models/ChartProps.js.map +1 -0
- package/esm/chart/registries/ChartBuildQueryRegistrySingleton.js +53 -0
- package/esm/chart/registries/ChartBuildQueryRegistrySingleton.js.map +1 -0
- package/esm/chart/registries/ChartComponentRegistrySingleton.js +32 -0
- package/esm/chart/registries/ChartComponentRegistrySingleton.js.map +1 -0
- package/esm/chart/registries/ChartControlPanelRegistrySingleton.js +35 -0
- package/esm/chart/registries/ChartControlPanelRegistrySingleton.js.map +1 -0
- package/esm/chart/registries/ChartMetadataRegistrySingleton.js +32 -0
- package/esm/chart/registries/ChartMetadataRegistrySingleton.js.map +1 -0
- package/esm/chart/registries/ChartTransformPropsRegistrySingleton.js +35 -0
- package/esm/chart/registries/ChartTransformPropsRegistrySingleton.js.map +1 -0
- package/esm/chart/types/Annotation.js +1 -0
- package/esm/chart/types/Annotation.js.map +1 -0
- package/esm/chart/types/Base.js +108 -0
- package/esm/chart/types/Base.js.map +1 -0
- package/esm/chart/types/QueryResponse.js +53 -0
- package/esm/chart/types/QueryResponse.js.map +1 -0
- package/esm/chart/types/TransformFunction.js +55 -0
- package/esm/chart/types/TransformFunction.js.map +1 -0
- package/esm/chart/types/VizType.js +20 -0
- package/esm/chart/types/VizType.js.map +1 -0
- package/esm/chart-composition/ChartFrame.js +75 -0
- package/esm/chart-composition/ChartFrame.js.map +1 -0
- package/esm/chart-composition/index.js +24 -0
- package/esm/chart-composition/index.js.map +1 -0
- package/esm/chart-composition/legend/WithLegend.js +147 -0
- package/esm/chart-composition/legend/WithLegend.js.map +1 -0
- package/esm/chart-composition/tooltip/TooltipFrame.js +48 -0
- package/esm/chart-composition/tooltip/TooltipFrame.js.map +1 -0
- package/esm/chart-composition/tooltip/TooltipTable.js +70 -0
- package/esm/chart-composition/tooltip/TooltipTable.js.map +1 -0
- package/esm/color/CategoricalColorNamespace.js +122 -0
- package/esm/color/CategoricalColorNamespace.js.map +1 -0
- package/esm/color/CategoricalColorScale.js +375 -0
- package/esm/color/CategoricalColorScale.js.map +1 -0
- package/esm/color/CategoricalScheme.js +23 -0
- package/esm/color/CategoricalScheme.js.map +1 -0
- package/esm/color/CategoricalSchemeRegistrySingleton.js +36 -0
- package/esm/color/CategoricalSchemeRegistrySingleton.js.map +1 -0
- package/esm/color/ColorScheme.js +60 -0
- package/esm/color/ColorScheme.js.map +1 -0
- package/esm/color/ColorSchemeRegistry.js +44 -0
- package/esm/color/ColorSchemeRegistry.js.map +1 -0
- package/esm/color/LabelsColorMapSingleton.js +177 -0
- package/esm/color/LabelsColorMapSingleton.js.map +1 -0
- package/esm/color/SequentialScheme.js +97 -0
- package/esm/color/SequentialScheme.js.map +1 -0
- package/esm/color/SequentialSchemeRegistrySingleton.js +36 -0
- package/esm/color/SequentialSchemeRegistrySingleton.js.map +1 -0
- package/esm/color/colorSchemes/categorical/airbnb.js +46 -0
- package/esm/color/colorSchemes/categorical/airbnb.js.map +1 -0
- package/esm/color/colorSchemes/categorical/blueToGreen.js +45 -0
- package/esm/color/colorSchemes/categorical/blueToGreen.js.map +1 -0
- package/esm/color/colorSchemes/categorical/colorsOfRainbow.js +47 -0
- package/esm/color/colorSchemes/categorical/colorsOfRainbow.js.map +1 -0
- package/esm/color/colorSchemes/categorical/d3.js +121 -0
- package/esm/color/colorSchemes/categorical/d3.js.map +1 -0
- package/esm/color/colorSchemes/categorical/echarts.js +59 -0
- package/esm/color/colorSchemes/categorical/echarts.js.map +1 -0
- package/esm/color/colorSchemes/categorical/google.js +69 -0
- package/esm/color/colorSchemes/categorical/google.js.map +1 -0
- package/esm/color/colorSchemes/categorical/index.js +33 -0
- package/esm/color/colorSchemes/categorical/index.js.map +1 -0
- package/esm/color/colorSchemes/categorical/lyft.js +43 -0
- package/esm/color/colorSchemes/categorical/lyft.js.map +1 -0
- package/esm/color/colorSchemes/categorical/modernSunset.js +47 -0
- package/esm/color/colorSchemes/categorical/modernSunset.js.map +1 -0
- package/esm/color/colorSchemes/categorical/preset.js +57 -0
- package/esm/color/colorSchemes/categorical/preset.js.map +1 -0
- package/esm/color/colorSchemes/categorical/presetAndSuperset.js +47 -0
- package/esm/color/colorSchemes/categorical/presetAndSuperset.js.map +1 -0
- package/esm/color/colorSchemes/categorical/redToYellow.js +45 -0
- package/esm/color/colorSchemes/categorical/redToYellow.js.map +1 -0
- package/esm/color/colorSchemes/categorical/superset.js +57 -0
- package/esm/color/colorSchemes/categorical/superset.js.map +1 -0
- package/esm/color/colorSchemes/categorical/wavesOfBlue.js +45 -0
- package/esm/color/colorSchemes/categorical/wavesOfBlue.js.map +1 -0
- package/esm/color/colorSchemes/index.js +22 -0
- package/esm/color/colorSchemes/index.js.map +1 -0
- package/esm/color/colorSchemes/sequential/common.js +229 -0
- package/esm/color/colorSchemes/sequential/common.js.map +1 -0
- package/esm/color/colorSchemes/sequential/d3.js +530 -0
- package/esm/color/colorSchemes/sequential/d3.js.map +1 -0
- package/esm/color/colorSchemes/sequential/index.js +22 -0
- package/esm/color/colorSchemes/sequential/index.js.map +1 -0
- package/esm/color/index.js +43 -0
- package/esm/color/index.js.map +1 -0
- package/esm/color/stringifyAndTrim.js +27 -0
- package/esm/color/stringifyAndTrim.js.map +1 -0
- package/esm/color/types.js +36 -0
- package/esm/color/types.js.map +1 -0
- package/esm/color/utils.js +123 -0
- package/esm/color/utils.js.map +1 -0
- package/esm/components/SafeMarkdown.js +90 -0
- package/esm/components/SafeMarkdown.js.map +1 -0
- package/esm/components/constants.js +29 -0
- package/esm/components/constants.js.map +1 -0
- package/esm/components/index.js +22 -0
- package/esm/components/index.js.map +1 -0
- package/esm/connection/README.md +106 -0
- package/esm/connection/SupersetClient.js +56 -0
- package/esm/connection/SupersetClient.js.map +1 -0
- package/esm/connection/SupersetClientClass.js +279 -0
- package/esm/connection/SupersetClientClass.js.map +1 -0
- package/esm/connection/callApi/callApi.js +182 -0
- package/esm/connection/callApi/callApi.js.map +1 -0
- package/esm/connection/callApi/callApiAndParseWithTimeout.js +40 -0
- package/esm/connection/callApi/callApiAndParseWithTimeout.js.map +1 -0
- package/esm/connection/callApi/index.js +21 -0
- package/esm/connection/callApi/index.js.map +1 -0
- package/esm/connection/callApi/parseResponse.js +81 -0
- package/esm/connection/callApi/parseResponse.js.map +1 -0
- package/esm/connection/callApi/rejectAfterTimeout.js +35 -0
- package/esm/connection/callApi/rejectAfterTimeout.js.map +1 -0
- package/esm/connection/constants.js +42 -0
- package/esm/connection/constants.js.map +1 -0
- package/esm/connection/index.js +27 -0
- package/esm/connection/index.js.map +1 -0
- package/esm/connection/types.js +170 -0
- package/esm/connection/types.js.map +1 -0
- package/esm/currency-format/CurrencyFormatter.js +80 -0
- package/esm/currency-format/CurrencyFormatter.js.map +1 -0
- package/esm/currency-format/index.js +23 -0
- package/esm/currency-format/index.js.map +1 -0
- package/esm/currency-format/utils.js +100 -0
- package/esm/currency-format/utils.js.map +1 -0
- package/esm/dimension/computeMaxFontSize.js +95 -0
- package/esm/dimension/computeMaxFontSize.js.map +1 -0
- package/esm/dimension/getMultipleTextDimensions.js +85 -0
- package/esm/dimension/getMultipleTextDimensions.js.map +1 -0
- package/esm/dimension/getTextDimension.js +62 -0
- package/esm/dimension/getTextDimension.js.map +1 -0
- package/esm/dimension/index.js +28 -0
- package/esm/dimension/index.js.map +1 -0
- package/esm/dimension/mergeMargin.js +48 -0
- package/esm/dimension/mergeMargin.js.map +1 -0
- package/esm/dimension/parseLength.js +42 -0
- package/esm/dimension/parseLength.js.map +1 -0
- package/esm/dimension/svg/LazyFactory.js +61 -0
- package/esm/dimension/svg/LazyFactory.js.map +1 -0
- package/esm/dimension/svg/constants.js +22 -0
- package/esm/dimension/svg/constants.js.map +1 -0
- package/esm/dimension/svg/createHiddenSvgNode.js +34 -0
- package/esm/dimension/svg/createHiddenSvgNode.js.map +1 -0
- package/esm/dimension/svg/createTextNode.js +25 -0
- package/esm/dimension/svg/createTextNode.js.map +1 -0
- package/esm/dimension/svg/factories.js +26 -0
- package/esm/dimension/svg/factories.js.map +1 -0
- package/esm/dimension/svg/getBBoxCeil.js +35 -0
- package/esm/dimension/svg/getBBoxCeil.js.map +1 -0
- package/esm/dimension/svg/updateTextNode.js +72 -0
- package/esm/dimension/svg/updateTextNode.js.map +1 -0
- package/esm/dimension/types.js +42 -0
- package/esm/dimension/types.js.map +1 -0
- package/esm/dynamic-plugins/index.js +21 -0
- package/esm/dynamic-plugins/index.js.map +1 -0
- package/esm/dynamic-plugins/shared-modules.js +98 -0
- package/esm/dynamic-plugins/shared-modules.js.map +1 -0
- package/esm/hooks/index.js +26 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/useChangeEffect/index.js +21 -0
- package/esm/hooks/useChangeEffect/index.js.map +1 -0
- package/esm/hooks/useChangeEffect/useChangeEffect.js +39 -0
- package/esm/hooks/useChangeEffect/useChangeEffect.js.map +1 -0
- package/esm/hooks/useChangeEffect/useChangeEffect.test.js +55 -0
- package/esm/hooks/useChangeEffect/useChangeEffect.test.js.map +1 -0
- package/esm/hooks/useComponentDidMount/index.js +21 -0
- package/esm/hooks/useComponentDidMount/index.js.map +1 -0
- package/esm/hooks/useComponentDidMount/useComponentDidMount.js +25 -0
- package/esm/hooks/useComponentDidMount/useComponentDidMount.js.map +1 -0
- package/esm/hooks/useComponentDidMount/useComponentDidMount.test.js +29 -0
- package/esm/hooks/useComponentDidMount/useComponentDidMount.test.js.map +1 -0
- package/esm/hooks/useComponentDidUpdate/index.js +21 -0
- package/esm/hooks/useComponentDidUpdate/index.js.map +1 -0
- package/esm/hooks/useComponentDidUpdate/useComponentDidUpdate.js +36 -0
- package/esm/hooks/useComponentDidUpdate/useComponentDidUpdate.js.map +1 -0
- package/esm/hooks/useComponentDidUpdate/useComponentDidUpdate.test.js +32 -0
- package/esm/hooks/useComponentDidUpdate/useComponentDidUpdate.test.js.map +1 -0
- package/esm/hooks/useElementOnScreen/index.js +21 -0
- package/esm/hooks/useElementOnScreen/index.js.map +1 -0
- package/esm/hooks/useElementOnScreen/useElementOnScreen.js +47 -0
- package/esm/hooks/useElementOnScreen/useElementOnScreen.js.map +1 -0
- package/esm/hooks/useElementOnScreen/useElementOnScreen.test.js +111 -0
- package/esm/hooks/useElementOnScreen/useElementOnScreen.test.js.map +1 -0
- package/esm/hooks/usePrevious/index.js +21 -0
- package/esm/hooks/usePrevious/index.js.map +1 -0
- package/esm/hooks/usePrevious/usePrevious.js +37 -0
- package/esm/hooks/usePrevious/usePrevious.js.map +1 -0
- package/esm/hooks/usePrevious/usePrevious.test.js +44 -0
- package/esm/hooks/usePrevious/usePrevious.test.js.map +1 -0
- package/esm/hooks/useTruncation/index.js +24 -0
- package/esm/hooks/useTruncation/index.js.map +1 -0
- package/esm/hooks/useTruncation/useCSSTextTruncation.js +62 -0
- package/esm/hooks/useTruncation/useCSSTextTruncation.js.map +1 -0
- package/esm/hooks/useTruncation/useCSSTextTruncation.test.js +62 -0
- package/esm/hooks/useTruncation/useCSSTextTruncation.test.js.map +1 -0
- package/esm/hooks/useTruncation/useChildElementTruncation.js +95 -0
- package/esm/hooks/useTruncation/useChildElementTruncation.js.map +1 -0
- package/esm/hooks/useTruncation/useChildElementTruncation.test.js +223 -0
- package/esm/hooks/useTruncation/useChildElementTruncation.test.js.map +1 -0
- package/esm/index.js +41 -0
- package/esm/index.js.map +1 -0
- package/esm/math-expression/index.js +122 -0
- package/esm/math-expression/index.js.map +1 -0
- package/esm/models/ExtensibleFunction.js +31 -0
- package/esm/models/ExtensibleFunction.js.map +1 -0
- package/esm/models/Plugin.js +54 -0
- package/esm/models/Plugin.js.map +1 -0
- package/esm/models/Preset.js +57 -0
- package/esm/models/Preset.js.map +1 -0
- package/esm/models/Registry.js +286 -0
- package/esm/models/Registry.js.map +1 -0
- package/esm/models/RegistryWithDefaultKey.js +95 -0
- package/esm/models/RegistryWithDefaultKey.js.map +1 -0
- package/esm/models/TypedRegistry.js +61 -0
- package/esm/models/TypedRegistry.js.map +1 -0
- package/esm/models/index.js +25 -0
- package/esm/models/index.js.map +1 -0
- package/esm/number-format/D3FormatConfig.js +27 -0
- package/esm/number-format/D3FormatConfig.js.map +1 -0
- package/esm/number-format/NumberFormats.js +90 -0
- package/esm/number-format/NumberFormats.js.map +1 -0
- package/esm/number-format/NumberFormatter.js +87 -0
- package/esm/number-format/NumberFormatter.js.map +1 -0
- package/esm/number-format/NumberFormatterRegistry.js +86 -0
- package/esm/number-format/NumberFormatterRegistry.js.map +1 -0
- package/esm/number-format/NumberFormatterRegistrySingleton.js +41 -0
- package/esm/number-format/NumberFormatterRegistrySingleton.js.map +1 -0
- package/esm/number-format/README.md +82 -0
- package/esm/number-format/factories/createD3NumberFormatter.js +58 -0
- package/esm/number-format/factories/createD3NumberFormatter.js.map +1 -0
- package/esm/number-format/factories/createDurationFormatter.js +41 -0
- package/esm/number-format/factories/createDurationFormatter.js.map +1 -0
- package/esm/number-format/factories/createMemoryFormatter.js +56 -0
- package/esm/number-format/factories/createMemoryFormatter.js.map +1 -0
- package/esm/number-format/factories/createSiAtMostNDigitFormatter.js +46 -0
- package/esm/number-format/factories/createSiAtMostNDigitFormatter.js.map +1 -0
- package/esm/number-format/factories/createSmartNumberFormatter.js +71 -0
- package/esm/number-format/factories/createSmartNumberFormatter.js.map +1 -0
- package/esm/number-format/index.js +37 -0
- package/esm/number-format/index.js.map +1 -0
- package/esm/number-format/types.js +1 -0
- package/esm/number-format/types.js.map +1 -0
- package/esm/query/DatasourceKey.js +45 -0
- package/esm/query/DatasourceKey.js.map +1 -0
- package/esm/query/README.md +30 -0
- package/esm/query/api/legacy/getDatasourceMetadata.js +40 -0
- package/esm/query/api/legacy/getDatasourceMetadata.js.map +1 -0
- package/esm/query/api/legacy/getFormData.js +46 -0
- package/esm/query/api/legacy/getFormData.js.map +1 -0
- package/esm/query/api/legacy/index.js +25 -0
- package/esm/query/api/legacy/index.js.map +1 -0
- package/esm/query/api/legacy/types.js +27 -0
- package/esm/query/api/legacy/types.js.map +1 -0
- package/esm/query/api/types.js +1 -0
- package/esm/query/api/types.js.map +1 -0
- package/esm/query/api/v1/handleError.js +107 -0
- package/esm/query/api/v1/handleError.js.map +1 -0
- package/esm/query/api/v1/index.js +33 -0
- package/esm/query/api/v1/index.js.map +1 -0
- package/esm/query/api/v1/makeApi.js +159 -0
- package/esm/query/api/v1/makeApi.js.map +1 -0
- package/esm/query/api/v1/types.js +142 -0
- package/esm/query/api/v1/types.js.map +1 -0
- package/esm/query/buildQueryContext.js +72 -0
- package/esm/query/buildQueryContext.js.map +1 -0
- package/esm/query/buildQueryObject.js +141 -0
- package/esm/query/buildQueryObject.js.map +1 -0
- package/esm/query/constants.js +60 -0
- package/esm/query/constants.js.map +1 -0
- package/esm/query/convertFilter.js +57 -0
- package/esm/query/convertFilter.js.map +1 -0
- package/esm/query/extractExtras.js +84 -0
- package/esm/query/extractExtras.js.map +1 -0
- package/esm/query/extractQueryFields.js +129 -0
- package/esm/query/extractQueryFields.js.map +1 -0
- package/esm/query/extractTimegrain.js +39 -0
- package/esm/query/extractTimegrain.js.map +1 -0
- package/esm/query/getClientErrorObject.js +304 -0
- package/esm/query/getClientErrorObject.js.map +1 -0
- package/esm/query/getColumnLabel.js +31 -0
- package/esm/query/getColumnLabel.js.map +1 -0
- package/esm/query/getMetricLabel.js +36 -0
- package/esm/query/getMetricLabel.js.map +1 -0
- package/esm/query/getXAxis.js +52 -0
- package/esm/query/getXAxis.js.map +1 -0
- package/esm/query/index.js +48 -0
- package/esm/query/index.js.map +1 -0
- package/esm/query/normalizeOrderBy.js +80 -0
- package/esm/query/normalizeOrderBy.js.map +1 -0
- package/esm/query/normalizeTimeColumn.js +82 -0
- package/esm/query/normalizeTimeColumn.js.map +1 -0
- package/esm/query/processExtraFormData.js +50 -0
- package/esm/query/processExtraFormData.js.map +1 -0
- package/esm/query/processFilters.js +76 -0
- package/esm/query/processFilters.js.map +1 -0
- package/esm/query/types/AdvancedAnalytics.js +44 -0
- package/esm/query/types/AdvancedAnalytics.js.map +1 -0
- package/esm/query/types/AnnotationLayer.js +185 -0
- package/esm/query/types/AnnotationLayer.js.map +1 -0
- package/esm/query/types/Column.js +82 -0
- package/esm/query/types/Column.js.map +1 -0
- package/esm/query/types/Dashboard.js +171 -0
- package/esm/query/types/Dashboard.js.map +1 -0
- package/esm/query/types/Datasource.js +65 -0
- package/esm/query/types/Datasource.js.map +1 -0
- package/esm/query/types/Filter.js +100 -0
- package/esm/query/types/Filter.js.map +1 -0
- package/esm/query/types/Metric.js +98 -0
- package/esm/query/types/Metric.js.map +1 -0
- package/esm/query/types/Operator.js +75 -0
- package/esm/query/types/Operator.js.map +1 -0
- package/esm/query/types/PostProcessing.js +360 -0
- package/esm/query/types/PostProcessing.js.map +1 -0
- package/esm/query/types/Query.js +486 -0
- package/esm/query/types/Query.js.map +1 -0
- package/esm/query/types/QueryFormData.js +212 -0
- package/esm/query/types/QueryFormData.js.map +1 -0
- package/esm/query/types/QueryResponse.js +98 -0
- package/esm/query/types/QueryResponse.js.map +1 -0
- package/esm/query/types/Time.js +40 -0
- package/esm/query/types/Time.js.map +1 -0
- package/esm/query/types/index.js +43 -0
- package/esm/query/types/index.js.map +1 -0
- package/esm/style/index.js +174 -0
- package/esm/style/index.js.map +1 -0
- package/esm/time-comparison/README.md +47 -0
- package/esm/time-comparison/customTimeRangeDecode.js +174 -0
- package/esm/time-comparison/customTimeRangeDecode.js.map +1 -0
- package/esm/time-comparison/fetchTimeRange.js +113 -0
- package/esm/time-comparison/fetchTimeRange.js.map +1 -0
- package/esm/time-comparison/getComparisonFilters.js +68 -0
- package/esm/time-comparison/getComparisonFilters.js.map +1 -0
- package/esm/time-comparison/getComparisonInfo.js +66 -0
- package/esm/time-comparison/getComparisonInfo.js.map +1 -0
- package/esm/time-comparison/getTimeOffset.js +319 -0
- package/esm/time-comparison/getTimeOffset.js.map +1 -0
- package/esm/time-comparison/index.js +31 -0
- package/esm/time-comparison/index.js.map +1 -0
- package/esm/time-comparison/types.js +25 -0
- package/esm/time-comparison/types.js.map +1 -0
- package/esm/time-format/D3FormatConfig.js +66 -0
- package/esm/time-format/D3FormatConfig.js.map +1 -0
- package/esm/time-format/README.md +68 -0
- package/esm/time-format/TimeFormats.js +39 -0
- package/esm/time-format/TimeFormats.js.map +1 -0
- package/esm/time-format/TimeFormatsForGranularity.js +50 -0
- package/esm/time-format/TimeFormatsForGranularity.js.map +1 -0
- package/esm/time-format/TimeFormatter.js +77 -0
- package/esm/time-format/TimeFormatter.js.map +1 -0
- package/esm/time-format/TimeFormatterRegistry.js +78 -0
- package/esm/time-format/TimeFormatterRegistry.js.map +1 -0
- package/esm/time-format/TimeFormatterRegistrySingleton.js +92 -0
- package/esm/time-format/TimeFormatterRegistrySingleton.js.map +1 -0
- package/esm/time-format/TimeRangeFormatter.js +69 -0
- package/esm/time-format/TimeRangeFormatter.js.map +1 -0
- package/esm/time-format/factories/createD3TimeFormatter.js +65 -0
- package/esm/time-format/factories/createD3TimeFormatter.js.map +1 -0
- package/esm/time-format/factories/createMultiFormatter.js +124 -0
- package/esm/time-format/factories/createMultiFormatter.js.map +1 -0
- package/esm/time-format/formatters/finestTemporalGrain.js +81 -0
- package/esm/time-format/formatters/finestTemporalGrain.js.map +1 -0
- package/esm/time-format/formatters/finestTemporalGrain.test.js +64 -0
- package/esm/time-format/formatters/finestTemporalGrain.test.js.map +1 -0
- package/esm/time-format/formatters/smartDate.js +42 -0
- package/esm/time-format/formatters/smartDate.js.map +1 -0
- package/esm/time-format/formatters/smartDateDetailed.js +44 -0
- package/esm/time-format/formatters/smartDateDetailed.js.map +1 -0
- package/esm/time-format/formatters/smartDateVerbose.js +42 -0
- package/esm/time-format/formatters/smartDateVerbose.js.map +1 -0
- package/esm/time-format/index.js +54 -0
- package/esm/time-format/index.js.map +1 -0
- package/esm/time-format/types.js +48 -0
- package/esm/time-format/types.js.map +1 -0
- package/esm/time-format/utils/createTime.js +41 -0
- package/esm/time-format/utils/createTime.js.map +1 -0
- package/esm/time-format/utils/createTimeRangeFromGranularity.js +112 -0
- package/esm/time-format/utils/createTimeRangeFromGranularity.js.map +1 -0
- package/esm/time-format/utils/d3Time.js +142 -0
- package/esm/time-format/utils/d3Time.js.map +1 -0
- package/esm/time-format/utils/denormalizeTimestamp.js +29 -0
- package/esm/time-format/utils/denormalizeTimestamp.js.map +1 -0
- package/esm/time-format/utils/normalizeTimestamp.js +29 -0
- package/esm/time-format/utils/normalizeTimestamp.js.map +1 -0
- package/esm/time-format/utils/stringifyTimeInput.js +30 -0
- package/esm/time-format/utils/stringifyTimeInput.js.map +1 -0
- package/esm/translation/README.md +71 -0
- package/esm/translation/Translator.js +106 -0
- package/esm/translation/Translator.js.map +1 -0
- package/esm/translation/TranslatorSingleton.js +82 -0
- package/esm/translation/TranslatorSingleton.js.map +1 -0
- package/esm/translation/index.js +26 -0
- package/esm/translation/index.js.map +1 -0
- package/esm/translation/types/index.js +74 -0
- package/esm/translation/types/index.js.map +1 -0
- package/esm/translation/types/jed.js +57 -0
- package/esm/translation/types/jed.js.map +1 -0
- package/esm/types/index.js +23 -0
- package/esm/types/index.js.map +1 -0
- package/esm/ui-overrides/ExtensionsRegistry.js +32 -0
- package/esm/ui-overrides/ExtensionsRegistry.js.map +1 -0
- package/esm/ui-overrides/index.js +21 -0
- package/esm/ui-overrides/index.js.map +1 -0
- package/esm/ui-overrides/types.js +1 -0
- package/esm/ui-overrides/types.js.map +1 -0
- package/esm/utils/convertKeysToCamelCase.js +34 -0
- package/esm/utils/convertKeysToCamelCase.js.map +1 -0
- package/esm/utils/ensureIsArray.js +30 -0
- package/esm/utils/ensureIsArray.js.map +1 -0
- package/esm/utils/ensureIsInt.js +28 -0
- package/esm/utils/ensureIsInt.js.map +1 -0
- package/esm/utils/featureFlags.js +105 -0
- package/esm/utils/featureFlags.js.map +1 -0
- package/esm/utils/getSelectedText.js +20 -0
- package/esm/utils/getSelectedText.js.map +1 -0
- package/esm/utils/html.js +122 -0
- package/esm/utils/html.js.map +1 -0
- package/esm/utils/html.test.js +192 -0
- package/esm/utils/html.test.js.map +1 -0
- package/esm/utils/index.js +36 -0
- package/esm/utils/index.js.map +1 -0
- package/esm/utils/isDefined.js +23 -0
- package/esm/utils/isDefined.js.map +1 -0
- package/esm/utils/isEqualArray.js +34 -0
- package/esm/utils/isEqualArray.js.map +1 -0
- package/esm/utils/isEqualArray.test.js +32 -0
- package/esm/utils/isEqualArray.test.js.map +1 -0
- package/esm/utils/isRequired.js +23 -0
- package/esm/utils/isRequired.js.map +1 -0
- package/esm/utils/logging.js +39 -0
- package/esm/utils/logging.js.map +1 -0
- package/esm/utils/lruCache.js +75 -0
- package/esm/utils/lruCache.js.map +1 -0
- package/esm/utils/makeSingleton.js +38 -0
- package/esm/utils/makeSingleton.js.map +1 -0
- package/esm/utils/promiseTimeout.js +33 -0
- package/esm/utils/promiseTimeout.js.map +1 -0
- package/esm/utils/random.js +28 -0
- package/esm/utils/random.js.map +1 -0
- package/esm/utils/removeDuplicates.js +39 -0
- package/esm/utils/removeDuplicates.js.map +1 -0
- package/esm/utils/tooltip.js +58 -0
- package/esm/utils/tooltip.js.map +1 -0
- package/esm/utils/typedMemo.js +22 -0
- package/esm/utils/typedMemo.js.map +1 -0
- package/esm/validator/index.js +28 -0
- package/esm/validator/index.js.map +1 -0
- package/esm/validator/legacyValidateInteger.js +35 -0
- package/esm/validator/legacyValidateInteger.js.map +1 -0
- package/esm/validator/legacyValidateNumber.js +32 -0
- package/esm/validator/legacyValidateNumber.js.map +1 -0
- package/esm/validator/validateInteger.js +34 -0
- package/esm/validator/validateInteger.js.map +1 -0
- package/esm/validator/validateMapboxStylesUrl.js +37 -0
- package/esm/validator/validateMapboxStylesUrl.js.map +1 -0
- package/esm/validator/validateMaxValue.js +27 -0
- package/esm/validator/validateMaxValue.js.map +1 -0
- package/esm/validator/validateNonEmpty.js +33 -0
- package/esm/validator/validateNonEmpty.js.map +1 -0
- package/esm/validator/validateNumber.js +34 -0
- package/esm/validator/validateNumber.js.map +1 -0
- package/esm/validator/validateTimeComparisonRangeValues.js +38 -0
- package/esm/validator/validateTimeComparisonRangeValues.js.map +1 -0
- package/lib/api/index.js +1 -0
- package/lib/api/types/core.d.ts +30 -0
- package/lib/api/types/core.d.ts.map +1 -0
- package/lib/api/types/core.js +19 -0
- package/lib/api/types/core.js.map +1 -0
- package/lib/chart/clients/ChartClient.d.ts +34 -0
- package/lib/chart/clients/ChartClient.d.ts.map +1 -0
- package/lib/chart/clients/ChartClient.js +119 -0
- package/lib/chart/clients/ChartClient.js.map +1 -0
- package/lib/chart/components/ChartDataProvider.d.ts +52 -0
- package/lib/chart/components/ChartDataProvider.d.ts.map +1 -0
- package/lib/chart/components/ChartDataProvider.js +171 -0
- package/lib/chart/components/ChartDataProvider.js.map +1 -0
- package/lib/chart/components/ChartDataProvider.jsx +97 -0
- package/lib/chart/components/ChartDataProvider.jsx.map +1 -0
- package/lib/chart/components/FallbackComponent.d.ts +5 -0
- package/lib/chart/components/FallbackComponent.d.ts.map +1 -0
- package/lib/chart/components/FallbackComponent.js +61 -0
- package/lib/chart/components/FallbackComponent.js.map +1 -0
- package/lib/chart/components/FallbackComponent.jsx +41 -0
- package/lib/chart/components/FallbackComponent.jsx.map +1 -0
- package/lib/chart/components/NoResultsComponent.d.ts +9 -0
- package/lib/chart/components/NoResultsComponent.d.ts.map +1 -0
- package/lib/chart/components/NoResultsComponent.js +88 -0
- package/lib/chart/components/NoResultsComponent.js.map +1 -0
- package/lib/chart/components/NoResultsComponent.jsx +57 -0
- package/lib/chart/components/NoResultsComponent.jsx.map +1 -0
- package/lib/chart/components/SuperChart.d.ts +108 -0
- package/lib/chart/components/SuperChart.d.ts.map +1 -0
- package/lib/chart/components/SuperChart.js +267 -0
- package/lib/chart/components/SuperChart.js.map +1 -0
- package/lib/chart/components/SuperChart.jsx +121 -0
- package/lib/chart/components/SuperChart.jsx.map +1 -0
- package/lib/chart/components/SuperChartCore.d.ts +59 -0
- package/lib/chart/components/SuperChartCore.d.ts.map +1 -0
- package/lib/chart/components/SuperChartCore.js +236 -0
- package/lib/chart/components/SuperChartCore.js.map +1 -0
- package/lib/chart/components/SuperChartCore.jsx +139 -0
- package/lib/chart/components/SuperChartCore.jsx.map +1 -0
- package/lib/chart/components/createLoadableRenderer.d.ts +12 -0
- package/lib/chart/components/createLoadableRenderer.d.ts.map +1 -0
- package/lib/chart/components/createLoadableRenderer.js +52 -0
- package/lib/chart/components/createLoadableRenderer.js.map +1 -0
- package/lib/chart/components/reactify.d.ts +16 -0
- package/lib/chart/components/reactify.d.ts.map +1 -0
- package/lib/chart/components/reactify.js +115 -0
- package/lib/chart/components/reactify.js.map +1 -0
- package/lib/chart/components/reactify.jsx +69 -0
- package/lib/chart/components/reactify.jsx.map +1 -0
- package/lib/chart/index.d.ts +24 -0
- package/lib/chart/index.d.ts.map +1 -0
- package/lib/chart/index.js +40 -0
- package/lib/chart/index.js.map +1 -0
- package/lib/chart/models/ChartControlPanel.d.ts +4 -0
- package/lib/chart/models/ChartControlPanel.d.ts.map +1 -0
- package/lib/chart/models/ChartControlPanel.js +20 -0
- package/lib/chart/models/ChartControlPanel.js.map +1 -0
- package/lib/chart/models/ChartMetadata.d.ts +57 -0
- package/lib/chart/models/ChartMetadata.d.ts.map +1 -0
- package/lib/chart/models/ChartMetadata.js +74 -0
- package/lib/chart/models/ChartMetadata.js.map +1 -0
- package/lib/chart/models/ChartPlugin.d.ts +44 -0
- package/lib/chart/models/ChartPlugin.d.ts.map +1 -0
- package/lib/chart/models/ChartPlugin.js +92 -0
- package/lib/chart/models/ChartPlugin.js.map +1 -0
- package/lib/chart/models/ChartProps.d.ts +99 -0
- package/lib/chart/models/ChartProps.d.ts.map +1 -0
- package/lib/chart/models/ChartProps.js +95 -0
- package/lib/chart/models/ChartProps.js.map +1 -0
- package/lib/chart/registries/ChartBuildQueryRegistrySingleton.d.ts +17 -0
- package/lib/chart/registries/ChartBuildQueryRegistrySingleton.d.ts.map +1 -0
- package/lib/chart/registries/ChartBuildQueryRegistrySingleton.js +27 -0
- package/lib/chart/registries/ChartBuildQueryRegistrySingleton.js.map +1 -0
- package/lib/chart/registries/ChartComponentRegistrySingleton.d.ts +8 -0
- package/lib/chart/registries/ChartComponentRegistrySingleton.d.ts.map +1 -0
- package/lib/chart/registries/ChartComponentRegistrySingleton.js +27 -0
- package/lib/chart/registries/ChartComponentRegistrySingleton.js.map +1 -0
- package/lib/chart/registries/ChartControlPanelRegistrySingleton.d.ts +8 -0
- package/lib/chart/registries/ChartControlPanelRegistrySingleton.d.ts.map +1 -0
- package/lib/chart/registries/ChartControlPanelRegistrySingleton.js +27 -0
- package/lib/chart/registries/ChartControlPanelRegistrySingleton.js.map +1 -0
- package/lib/chart/registries/ChartMetadataRegistrySingleton.d.ts +8 -0
- package/lib/chart/registries/ChartMetadataRegistrySingleton.d.ts.map +1 -0
- package/lib/chart/registries/ChartMetadataRegistrySingleton.js +27 -0
- package/lib/chart/registries/ChartMetadataRegistrySingleton.js.map +1 -0
- package/lib/chart/registries/ChartTransformPropsRegistrySingleton.d.ts +8 -0
- package/lib/chart/registries/ChartTransformPropsRegistrySingleton.d.ts.map +1 -0
- package/lib/chart/registries/ChartTransformPropsRegistrySingleton.js +30 -0
- package/lib/chart/registries/ChartTransformPropsRegistrySingleton.js.map +1 -0
- package/lib/chart/types/Annotation.d.ts +5 -0
- package/lib/chart/types/Annotation.d.ts.map +1 -0
- package/lib/chart/types/Annotation.js +20 -0
- package/lib/chart/types/Annotation.js.map +1 -0
- package/lib/chart/types/Base.d.ts +67 -0
- package/lib/chart/types/Base.d.ts.map +1 -0
- package/lib/chart/types/Base.js +63 -0
- package/lib/chart/types/Base.js.map +1 -0
- package/lib/chart/types/QueryResponse.d.ts +25 -0
- package/lib/chart/types/QueryResponse.d.ts.map +1 -0
- package/lib/chart/types/QueryResponse.js +20 -0
- package/lib/chart/types/QueryResponse.js.map +1 -0
- package/lib/chart/types/TransformFunction.d.ts +21 -0
- package/lib/chart/types/TransformFunction.d.ts.map +1 -0
- package/lib/chart/types/TransformFunction.js +20 -0
- package/lib/chart/types/TransformFunction.js.map +1 -0
- package/lib/chart/types/VizType.d.ts +55 -0
- package/lib/chart/types/VizType.d.ts.map +1 -0
- package/lib/chart/types/VizType.js +74 -0
- package/lib/chart/types/VizType.js.map +1 -0
- package/lib/chart-composition/ChartFrame.d.ts +19 -0
- package/lib/chart-composition/ChartFrame.d.ts.map +1 -0
- package/lib/chart-composition/ChartFrame.js +76 -0
- package/lib/chart-composition/ChartFrame.js.map +1 -0
- package/lib/chart-composition/ChartFrame.jsx +48 -0
- package/lib/chart-composition/ChartFrame.jsx.map +1 -0
- package/lib/chart-composition/index.d.ts +5 -0
- package/lib/chart-composition/index.d.ts.map +1 -0
- package/lib/chart-composition/index.js +23 -0
- package/lib/chart-composition/index.js.map +1 -0
- package/lib/chart-composition/legend/WithLegend.d.ts +35 -0
- package/lib/chart-composition/legend/WithLegend.d.ts.map +1 -0
- package/lib/chart-composition/legend/WithLegend.js +147 -0
- package/lib/chart-composition/legend/WithLegend.js.map +1 -0
- package/lib/chart-composition/legend/WithLegend.jsx +105 -0
- package/lib/chart-composition/legend/WithLegend.jsx.map +1 -0
- package/lib/chart-composition/tooltip/TooltipFrame.d.ts +16 -0
- package/lib/chart-composition/tooltip/TooltipFrame.d.ts.map +1 -0
- package/lib/chart-composition/tooltip/TooltipFrame.js +48 -0
- package/lib/chart-composition/tooltip/TooltipFrame.js.map +1 -0
- package/lib/chart-composition/tooltip/TooltipFrame.jsx +34 -0
- package/lib/chart-composition/tooltip/TooltipFrame.jsx.map +1 -0
- package/lib/chart-composition/tooltip/TooltipTable.d.ts +25 -0
- package/lib/chart-composition/tooltip/TooltipTable.d.ts.map +1 -0
- package/lib/chart-composition/tooltip/TooltipTable.js +71 -0
- package/lib/chart-composition/tooltip/TooltipTable.js.map +1 -0
- package/lib/chart-composition/tooltip/TooltipTable.jsx +43 -0
- package/lib/chart-composition/tooltip/TooltipTable.jsx.map +1 -0
- package/lib/color/CategoricalColorNamespace.d.ts +32 -0
- package/lib/color/CategoricalColorNamespace.d.ts.map +1 -0
- package/lib/color/CategoricalColorNamespace.js +91 -0
- package/lib/color/CategoricalColorNamespace.js.map +1 -0
- package/lib/color/CategoricalColorScale.d.ts +132 -0
- package/lib/color/CategoricalColorScale.d.ts.map +1 -0
- package/lib/color/CategoricalColorScale.js +255 -0
- package/lib/color/CategoricalColorScale.js.map +1 -0
- package/lib/color/CategoricalScheme.d.ts +4 -0
- package/lib/color/CategoricalScheme.d.ts.map +1 -0
- package/lib/color/CategoricalScheme.js +22 -0
- package/lib/color/CategoricalScheme.js.map +1 -0
- package/lib/color/CategoricalSchemeRegistrySingleton.d.ts +8 -0
- package/lib/color/CategoricalSchemeRegistrySingleton.d.ts.map +1 -0
- package/lib/color/CategoricalSchemeRegistrySingleton.js +30 -0
- package/lib/color/CategoricalSchemeRegistrySingleton.js.map +1 -0
- package/lib/color/ColorScheme.d.ts +19 -0
- package/lib/color/ColorScheme.d.ts.map +1 -0
- package/lib/color/ColorScheme.js +35 -0
- package/lib/color/ColorScheme.js.map +1 -0
- package/lib/color/ColorSchemeRegistry.d.ts +6 -0
- package/lib/color/ColorSchemeRegistry.d.ts.map +1 -0
- package/lib/color/ColorSchemeRegistry.js +40 -0
- package/lib/color/ColorSchemeRegistry.js.map +1 -0
- package/lib/color/LabelsColorMapSingleton.d.ts +58 -0
- package/lib/color/LabelsColorMapSingleton.d.ts.map +1 -0
- package/lib/color/LabelsColorMapSingleton.js +141 -0
- package/lib/color/LabelsColorMapSingleton.js.map +1 -0
- package/lib/color/SequentialScheme.d.ts +30 -0
- package/lib/color/SequentialScheme.d.ts.map +1 -0
- package/lib/color/SequentialScheme.js +67 -0
- package/lib/color/SequentialScheme.js.map +1 -0
- package/lib/color/SequentialSchemeRegistrySingleton.d.ts +8 -0
- package/lib/color/SequentialSchemeRegistrySingleton.d.ts.map +1 -0
- package/lib/color/SequentialSchemeRegistrySingleton.js +30 -0
- package/lib/color/SequentialSchemeRegistrySingleton.js.map +1 -0
- package/lib/color/colorSchemes/categorical/airbnb.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/airbnb.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/airbnb.js +43 -0
- package/lib/color/colorSchemes/categorical/airbnb.js.map +1 -0
- package/lib/color/colorSchemes/categorical/blueToGreen.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/blueToGreen.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/blueToGreen.js +42 -0
- package/lib/color/colorSchemes/categorical/blueToGreen.js.map +1 -0
- package/lib/color/colorSchemes/categorical/colorsOfRainbow.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/colorsOfRainbow.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/colorsOfRainbow.js +44 -0
- package/lib/color/colorSchemes/categorical/colorsOfRainbow.js.map +1 -0
- package/lib/color/colorSchemes/categorical/d3.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/d3.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/d3.js +118 -0
- package/lib/color/colorSchemes/categorical/d3.js.map +1 -0
- package/lib/color/colorSchemes/categorical/echarts.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/echarts.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/echarts.js +56 -0
- package/lib/color/colorSchemes/categorical/echarts.js.map +1 -0
- package/lib/color/colorSchemes/categorical/google.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/google.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/google.js +66 -0
- package/lib/color/colorSchemes/categorical/google.js.map +1 -0
- package/lib/color/colorSchemes/categorical/index.d.ts +14 -0
- package/lib/color/colorSchemes/categorical/index.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/index.js +32 -0
- package/lib/color/colorSchemes/categorical/index.js.map +1 -0
- package/lib/color/colorSchemes/categorical/lyft.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/lyft.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/lyft.js +40 -0
- package/lib/color/colorSchemes/categorical/lyft.js.map +1 -0
- package/lib/color/colorSchemes/categorical/modernSunset.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/modernSunset.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/modernSunset.js +44 -0
- package/lib/color/colorSchemes/categorical/modernSunset.js.map +1 -0
- package/lib/color/colorSchemes/categorical/preset.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/preset.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/preset.js +54 -0
- package/lib/color/colorSchemes/categorical/preset.js.map +1 -0
- package/lib/color/colorSchemes/categorical/presetAndSuperset.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/presetAndSuperset.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/presetAndSuperset.js +44 -0
- package/lib/color/colorSchemes/categorical/presetAndSuperset.js.map +1 -0
- package/lib/color/colorSchemes/categorical/redToYellow.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/redToYellow.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/redToYellow.js +42 -0
- package/lib/color/colorSchemes/categorical/redToYellow.js.map +1 -0
- package/lib/color/colorSchemes/categorical/superset.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/superset.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/superset.js +54 -0
- package/lib/color/colorSchemes/categorical/superset.js.map +1 -0
- package/lib/color/colorSchemes/categorical/wavesOfBlue.d.ts +4 -0
- package/lib/color/colorSchemes/categorical/wavesOfBlue.d.ts.map +1 -0
- package/lib/color/colorSchemes/categorical/wavesOfBlue.js +42 -0
- package/lib/color/colorSchemes/categorical/wavesOfBlue.js.map +1 -0
- package/lib/color/colorSchemes/index.d.ts +3 -0
- package/lib/color/colorSchemes/index.d.ts.map +1 -0
- package/lib/color/colorSchemes/index.js +21 -0
- package/lib/color/colorSchemes/index.js.map +1 -0
- package/lib/color/colorSchemes/sequential/common.d.ts +4 -0
- package/lib/color/colorSchemes/sequential/common.d.ts.map +1 -0
- package/lib/color/colorSchemes/sequential/common.js +226 -0
- package/lib/color/colorSchemes/sequential/common.js.map +1 -0
- package/lib/color/colorSchemes/sequential/d3.d.ts +4 -0
- package/lib/color/colorSchemes/sequential/d3.d.ts.map +1 -0
- package/lib/color/colorSchemes/sequential/d3.js +527 -0
- package/lib/color/colorSchemes/sequential/d3.js.map +1 -0
- package/lib/color/colorSchemes/sequential/index.d.ts +3 -0
- package/lib/color/colorSchemes/sequential/index.d.ts.map +1 -0
- package/lib/color/colorSchemes/sequential/index.js +21 -0
- package/lib/color/colorSchemes/sequential/index.js.map +1 -0
- package/lib/color/index.d.ts +18 -0
- package/lib/color/index.d.ts.map +1 -0
- package/lib/color/index.js +36 -0
- package/lib/color/index.js.map +1 -0
- package/lib/color/stringifyAndTrim.d.ts +6 -0
- package/lib/color/stringifyAndTrim.d.ts.map +1 -0
- package/lib/color/stringifyAndTrim.js +26 -0
- package/lib/color/stringifyAndTrim.js.map +1 -0
- package/lib/color/types.d.ts +18 -0
- package/lib/color/types.d.ts.map +1 -0
- package/lib/color/types.js +25 -0
- package/lib/color/types.js.map +1 -0
- package/lib/color/utils.d.ts +6 -0
- package/lib/color/utils.d.ts.map +1 -0
- package/lib/color/utils.js +113 -0
- package/lib/color/utils.js.map +1 -0
- package/lib/components/SafeMarkdown.d.ts +11 -0
- package/lib/components/SafeMarkdown.d.ts.map +1 -0
- package/lib/components/SafeMarkdown.js +90 -0
- package/lib/components/SafeMarkdown.js.map +1 -0
- package/lib/components/SafeMarkdown.jsx +57 -0
- package/lib/components/SafeMarkdown.jsx.map +1 -0
- package/lib/components/constants.d.ts +27 -0
- package/lib/components/constants.d.ts.map +1 -0
- package/lib/components/constants.js +27 -0
- package/lib/components/constants.js.map +1 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +21 -0
- package/lib/components/index.js.map +1 -0
- package/lib/connection/README.md +106 -0
- package/lib/connection/SupersetClient.d.ts +4 -0
- package/lib/connection/SupersetClient.d.ts.map +1 -0
- package/lib/connection/SupersetClient.js +48 -0
- package/lib/connection/SupersetClient.js.map +1 -0
- package/lib/connection/SupersetClientClass.d.ts +45 -0
- package/lib/connection/SupersetClientClass.d.ts.map +1 -0
- package/lib/connection/SupersetClientClass.js +187 -0
- package/lib/connection/SupersetClientClass.js.map +1 -0
- package/lib/connection/callApi/callApi.d.ts +11 -0
- package/lib/connection/callApi/callApi.d.ts.map +1 -0
- package/lib/connection/callApi/callApi.js +145 -0
- package/lib/connection/callApi/callApi.js.map +1 -0
- package/lib/connection/callApi/callApiAndParseWithTimeout.d.ts +6 -0
- package/lib/connection/callApi/callApiAndParseWithTimeout.d.ts.map +1 -0
- package/lib/connection/callApi/callApiAndParseWithTimeout.js +29 -0
- package/lib/connection/callApi/callApiAndParseWithTimeout.js.map +1 -0
- package/lib/connection/callApi/index.d.ts +2 -0
- package/lib/connection/callApi/index.d.ts.map +1 -0
- package/lib/connection/callApi/index.js +20 -0
- package/lib/connection/callApi/index.js.map +1 -0
- package/lib/connection/callApi/parseResponse.d.ts +3 -0
- package/lib/connection/callApi/parseResponse.d.ts.map +1 -0
- package/lib/connection/callApi/parseResponse.js +63 -0
- package/lib/connection/callApi/parseResponse.js.map +1 -0
- package/lib/connection/callApi/rejectAfterTimeout.d.ts +2 -0
- package/lib/connection/callApi/rejectAfterTimeout.d.ts.map +1 -0
- package/lib/connection/callApi/rejectAfterTimeout.js +31 -0
- package/lib/connection/callApi/rejectAfterTimeout.js.map +1 -0
- package/lib/connection/constants.d.ts +11 -0
- package/lib/connection/constants.d.ts.map +1 -0
- package/lib/connection/constants.js +34 -0
- package/lib/connection/constants.js.map +1 -0
- package/lib/connection/index.d.ts +7 -0
- package/lib/connection/index.d.ts.map +1 -0
- package/lib/connection/index.js +25 -0
- package/lib/connection/index.js.map +1 -0
- package/lib/connection/types.d.ts +132 -0
- package/lib/connection/types.d.ts.map +1 -0
- package/lib/connection/types.js +2 -0
- package/lib/connection/types.js.map +1 -0
- package/lib/currency-format/CurrencyFormatter.d.ts +40 -0
- package/lib/currency-format/CurrencyFormatter.d.ts.map +1 -0
- package/lib/currency-format/CurrencyFormatter.js +55 -0
- package/lib/currency-format/CurrencyFormatter.js.map +1 -0
- package/lib/currency-format/index.d.ts +4 -0
- package/lib/currency-format/index.d.ts.map +1 -0
- package/lib/currency-format/index.js +22 -0
- package/lib/currency-format/index.js.map +1 -0
- package/lib/currency-format/utils.d.ts +23 -0
- package/lib/currency-format/utils.d.ts.map +1 -0
- package/lib/currency-format/utils.js +61 -0
- package/lib/currency-format/utils.js.map +1 -0
- package/lib/dimension/computeMaxFontSize.d.ts +7 -0
- package/lib/dimension/computeMaxFontSize.d.ts.map +1 -0
- package/lib/dimension/computeMaxFontSize.js +64 -0
- package/lib/dimension/computeMaxFontSize.js.map +1 -0
- package/lib/dimension/getMultipleTextDimensions.d.ts +13 -0
- package/lib/dimension/getMultipleTextDimensions.d.ts.map +1 -0
- package/lib/dimension/getMultipleTextDimensions.js +67 -0
- package/lib/dimension/getMultipleTextDimensions.js.map +1 -0
- package/lib/dimension/getTextDimension.d.ts +9 -0
- package/lib/dimension/getTextDimension.d.ts.map +1 -0
- package/lib/dimension/getTextDimension.js +45 -0
- package/lib/dimension/getTextDimension.js.map +1 -0
- package/lib/dimension/index.d.ts +8 -0
- package/lib/dimension/index.d.ts.map +1 -0
- package/lib/dimension/index.js +26 -0
- package/lib/dimension/index.js.map +1 -0
- package/lib/dimension/mergeMargin.d.ts +8 -0
- package/lib/dimension/mergeMargin.d.ts.map +1 -0
- package/lib/dimension/mergeMargin.js +36 -0
- package/lib/dimension/mergeMargin.js.map +1 -0
- package/lib/dimension/parseLength.d.ts +8 -0
- package/lib/dimension/parseLength.d.ts.map +1 -0
- package/lib/dimension/parseLength.js +32 -0
- package/lib/dimension/parseLength.js.map +1 -0
- package/lib/dimension/svg/LazyFactory.d.ts +8 -0
- package/lib/dimension/svg/LazyFactory.d.ts.map +1 -0
- package/lib/dimension/svg/LazyFactory.js +47 -0
- package/lib/dimension/svg/LazyFactory.js.map +1 -0
- package/lib/dimension/svg/constants.d.ts +2 -0
- package/lib/dimension/svg/constants.d.ts.map +1 -0
- package/lib/dimension/svg/constants.js +21 -0
- package/lib/dimension/svg/constants.js.map +1 -0
- package/lib/dimension/svg/createHiddenSvgNode.d.ts +2 -0
- package/lib/dimension/svg/createHiddenSvgNode.d.ts.map +1 -0
- package/lib/dimension/svg/createHiddenSvgNode.js +31 -0
- package/lib/dimension/svg/createHiddenSvgNode.js.map +1 -0
- package/lib/dimension/svg/createTextNode.d.ts +2 -0
- package/lib/dimension/svg/createTextNode.d.ts.map +1 -0
- package/lib/dimension/svg/createTextNode.js +23 -0
- package/lib/dimension/svg/createTextNode.js.map +1 -0
- package/lib/dimension/svg/factories.d.ts +4 -0
- package/lib/dimension/svg/factories.d.ts.map +1 -0
- package/lib/dimension/svg/factories.js +24 -0
- package/lib/dimension/svg/factories.js.map +1 -0
- package/lib/dimension/svg/getBBoxCeil.d.ts +6 -0
- package/lib/dimension/svg/getBBoxCeil.d.ts.map +1 -0
- package/lib/dimension/svg/getBBoxCeil.js +27 -0
- package/lib/dimension/svg/getBBoxCeil.js.map +1 -0
- package/lib/dimension/svg/updateTextNode.d.ts +7 -0
- package/lib/dimension/svg/updateTextNode.d.ts.map +1 -0
- package/lib/dimension/svg/updateTextNode.js +50 -0
- package/lib/dimension/svg/updateTextNode.js.map +1 -0
- package/lib/dimension/types.d.ts +21 -0
- package/lib/dimension/types.d.ts.map +1 -0
- package/lib/dimension/types.js +20 -0
- package/lib/dimension/types.js.map +1 -0
- package/lib/dynamic-plugins/index.d.ts +20 -0
- package/lib/dynamic-plugins/index.d.ts.map +1 -0
- package/lib/dynamic-plugins/index.js +20 -0
- package/lib/dynamic-plugins/index.js.map +1 -0
- package/lib/dynamic-plugins/shared-modules.d.ts +46 -0
- package/lib/dynamic-plugins/shared-modules.d.ts.map +1 -0
- package/lib/dynamic-plugins/shared-modules.js +68 -0
- package/lib/dynamic-plugins/shared-modules.js.map +1 -0
- package/lib/hooks/index.d.ts +25 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +25 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useChangeEffect/index.d.ts +20 -0
- package/lib/hooks/useChangeEffect/index.d.ts.map +1 -0
- package/lib/hooks/useChangeEffect/index.js +20 -0
- package/lib/hooks/useChangeEffect/index.js.map +1 -0
- package/lib/hooks/useChangeEffect/useChangeEffect.d.ts +25 -0
- package/lib/hooks/useChangeEffect/useChangeEffect.d.ts.map +1 -0
- package/lib/hooks/useChangeEffect/useChangeEffect.js +34 -0
- package/lib/hooks/useChangeEffect/useChangeEffect.js.map +1 -0
- package/lib/hooks/useChangeEffect/useChangeEffect.test.d.ts +2 -0
- package/lib/hooks/useChangeEffect/useChangeEffect.test.d.ts.map +1 -0
- package/lib/hooks/useChangeEffect/useChangeEffect.test.js +46 -0
- package/lib/hooks/useChangeEffect/useChangeEffect.test.js.map +1 -0
- package/lib/hooks/useComponentDidMount/index.d.ts +20 -0
- package/lib/hooks/useComponentDidMount/index.d.ts.map +1 -0
- package/lib/hooks/useComponentDidMount/index.js +20 -0
- package/lib/hooks/useComponentDidMount/index.js.map +1 -0
- package/lib/hooks/useComponentDidMount/useComponentDidMount.d.ts +21 -0
- package/lib/hooks/useComponentDidMount/useComponentDidMount.d.ts.map +1 -0
- package/lib/hooks/useComponentDidMount/useComponentDidMount.js +24 -0
- package/lib/hooks/useComponentDidMount/useComponentDidMount.js.map +1 -0
- package/lib/hooks/useComponentDidMount/useComponentDidMount.test.d.ts +2 -0
- package/lib/hooks/useComponentDidMount/useComponentDidMount.test.d.ts.map +1 -0
- package/lib/hooks/useComponentDidMount/useComponentDidMount.test.js +28 -0
- package/lib/hooks/useComponentDidMount/useComponentDidMount.test.js.map +1 -0
- package/lib/hooks/useComponentDidUpdate/index.d.ts +20 -0
- package/lib/hooks/useComponentDidUpdate/index.d.ts.map +1 -0
- package/lib/hooks/useComponentDidUpdate/index.js +20 -0
- package/lib/hooks/useComponentDidUpdate/index.js.map +1 -0
- package/lib/hooks/useComponentDidUpdate/useComponentDidUpdate.d.ts +21 -0
- package/lib/hooks/useComponentDidUpdate/useComponentDidUpdate.d.ts.map +1 -0
- package/lib/hooks/useComponentDidUpdate/useComponentDidUpdate.js +32 -0
- package/lib/hooks/useComponentDidUpdate/useComponentDidUpdate.js.map +1 -0
- package/lib/hooks/useComponentDidUpdate/useComponentDidUpdate.test.d.ts +2 -0
- package/lib/hooks/useComponentDidUpdate/useComponentDidUpdate.test.d.ts.map +1 -0
- package/lib/hooks/useComponentDidUpdate/useComponentDidUpdate.test.js +31 -0
- package/lib/hooks/useComponentDidUpdate/useComponentDidUpdate.test.js.map +1 -0
- package/lib/hooks/useElementOnScreen/index.d.ts +20 -0
- package/lib/hooks/useElementOnScreen/index.d.ts.map +1 -0
- package/lib/hooks/useElementOnScreen/index.js +20 -0
- package/lib/hooks/useElementOnScreen/index.js.map +1 -0
- package/lib/hooks/useElementOnScreen/useElementOnScreen.d.ts +21 -0
- package/lib/hooks/useElementOnScreen/useElementOnScreen.d.ts.map +1 -0
- package/lib/hooks/useElementOnScreen/useElementOnScreen.js +41 -0
- package/lib/hooks/useElementOnScreen/useElementOnScreen.js.map +1 -0
- package/lib/hooks/useElementOnScreen/useElementOnScreen.test.d.ts +2 -0
- package/lib/hooks/useElementOnScreen/useElementOnScreen.test.d.ts.map +1 -0
- package/lib/hooks/useElementOnScreen/useElementOnScreen.test.js +85 -0
- package/lib/hooks/useElementOnScreen/useElementOnScreen.test.js.map +1 -0
- package/lib/hooks/usePrevious/index.d.ts +20 -0
- package/lib/hooks/usePrevious/index.d.ts.map +1 -0
- package/lib/hooks/usePrevious/index.js +20 -0
- package/lib/hooks/usePrevious/index.js.map +1 -0
- package/lib/hooks/usePrevious/usePrevious.d.ts +26 -0
- package/lib/hooks/usePrevious/usePrevious.d.ts.map +1 -0
- package/lib/hooks/usePrevious/usePrevious.js +28 -0
- package/lib/hooks/usePrevious/usePrevious.js.map +1 -0
- package/lib/hooks/usePrevious/usePrevious.test.d.ts +2 -0
- package/lib/hooks/usePrevious/usePrevious.test.d.ts.map +1 -0
- package/lib/hooks/usePrevious/usePrevious.test.js +40 -0
- package/lib/hooks/usePrevious/usePrevious.test.js.map +1 -0
- package/lib/hooks/useTruncation/index.d.ts +22 -0
- package/lib/hooks/useTruncation/index.d.ts.map +1 -0
- package/lib/hooks/useTruncation/index.js +22 -0
- package/lib/hooks/useTruncation/index.js.map +1 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.d.ts +33 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.d.ts.map +1 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.js +52 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.js.map +1 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.test.d.ts +2 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.test.d.ts.map +1 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.test.js +62 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.test.js.map +1 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.test.jsx +48 -0
- package/lib/hooks/useTruncation/useCSSTextTruncation.test.jsx.map +1 -0
- package/lib/hooks/useTruncation/useChildElementTruncation.d.ts +12 -0
- package/lib/hooks/useTruncation/useChildElementTruncation.d.ts.map +1 -0
- package/lib/hooks/useTruncation/useChildElementTruncation.js +86 -0
- package/lib/hooks/useTruncation/useChildElementTruncation.js.map +1 -0
- package/lib/hooks/useTruncation/useChildElementTruncation.test.d.ts +2 -0
- package/lib/hooks/useTruncation/useChildElementTruncation.test.d.ts.map +1 -0
- package/lib/hooks/useTruncation/useChildElementTruncation.test.js +161 -0
- package/lib/hooks/useTruncation/useChildElementTruncation.test.js.map +1 -0
- package/lib/index.d.ts +40 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +40 -0
- package/lib/index.js.map +1 -0
- package/lib/math-expression/index.d.ts +3 -0
- package/lib/math-expression/index.d.ts.map +1 -0
- package/lib/math-expression/index.js +118 -0
- package/lib/math-expression/index.js.map +1 -0
- package/lib/models/ExtensibleFunction.d.ts +7 -0
- package/lib/models/ExtensibleFunction.d.ts.map +1 -0
- package/lib/models/ExtensibleFunction.js +29 -0
- package/lib/models/ExtensibleFunction.js.map +1 -0
- package/lib/models/Plugin.d.ts +13 -0
- package/lib/models/Plugin.d.ts.map +1 -0
- package/lib/models/Plugin.js +41 -0
- package/lib/models/Plugin.js.map +1 -0
- package/lib/models/Preset.d.ts +15 -0
- package/lib/models/Preset.d.ts.map +1 -0
- package/lib/models/Preset.js +41 -0
- package/lib/models/Preset.js.map +1 -0
- package/lib/models/Registry.d.ts +99 -0
- package/lib/models/Registry.d.ts.map +1 -0
- package/lib/models/Registry.js +191 -0
- package/lib/models/Registry.js.map +1 -0
- package/lib/models/RegistryWithDefaultKey.d.ts +20 -0
- package/lib/models/RegistryWithDefaultKey.d.ts.map +1 -0
- package/lib/models/RegistryWithDefaultKey.js +68 -0
- package/lib/models/RegistryWithDefaultKey.js.map +1 -0
- package/lib/models/TypedRegistry.d.ts +47 -0
- package/lib/models/TypedRegistry.d.ts.map +1 -0
- package/lib/models/TypedRegistry.js +55 -0
- package/lib/models/TypedRegistry.js.map +1 -0
- package/lib/models/index.d.ts +25 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/models/index.js +25 -0
- package/lib/models/index.js.map +1 -0
- package/lib/number-format/D3FormatConfig.d.ts +21 -0
- package/lib/number-format/D3FormatConfig.d.ts.map +1 -0
- package/lib/number-format/D3FormatConfig.js +7 -0
- package/lib/number-format/D3FormatConfig.js.map +1 -0
- package/lib/number-format/NumberFormats.d.ts +33 -0
- package/lib/number-format/NumberFormats.d.ts.map +1 -0
- package/lib/number-format/NumberFormats.js +80 -0
- package/lib/number-format/NumberFormats.js.map +1 -0
- package/lib/number-format/NumberFormatter.d.ts +43 -0
- package/lib/number-format/NumberFormatter.d.ts.map +1 -0
- package/lib/number-format/NumberFormatter.js +54 -0
- package/lib/number-format/NumberFormatter.js.map +1 -0
- package/lib/number-format/NumberFormatterRegistry.d.ts +29 -0
- package/lib/number-format/NumberFormatterRegistry.d.ts.map +1 -0
- package/lib/number-format/NumberFormatterRegistry.js +43 -0
- package/lib/number-format/NumberFormatterRegistry.js.map +1 -0
- package/lib/number-format/NumberFormatterRegistrySingleton.d.ts +26 -0
- package/lib/number-format/NumberFormatterRegistrySingleton.d.ts.map +1 -0
- package/lib/number-format/NumberFormatterRegistrySingleton.js +14 -0
- package/lib/number-format/NumberFormatterRegistrySingleton.js.map +1 -0
- package/lib/number-format/README.md +82 -0
- package/lib/number-format/factories/createD3NumberFormatter.d.ts +27 -0
- package/lib/number-format/factories/createD3NumberFormatter.d.ts.map +1 -0
- package/lib/number-format/factories/createD3NumberFormatter.js +44 -0
- package/lib/number-format/factories/createD3NumberFormatter.js.map +1 -0
- package/lib/number-format/factories/createDurationFormatter.d.ts +9 -0
- package/lib/number-format/factories/createDurationFormatter.d.ts.map +1 -0
- package/lib/number-format/factories/createDurationFormatter.js +30 -0
- package/lib/number-format/factories/createDurationFormatter.js.map +1 -0
- package/lib/number-format/factories/createMemoryFormatter.d.ts +9 -0
- package/lib/number-format/factories/createMemoryFormatter.d.ts.map +1 -0
- package/lib/number-format/factories/createMemoryFormatter.js +40 -0
- package/lib/number-format/factories/createMemoryFormatter.js.map +1 -0
- package/lib/number-format/factories/createSiAtMostNDigitFormatter.d.ts +8 -0
- package/lib/number-format/factories/createSiAtMostNDigitFormatter.d.ts.map +1 -0
- package/lib/number-format/factories/createSiAtMostNDigitFormatter.js +35 -0
- package/lib/number-format/factories/createSiAtMostNDigitFormatter.js.map +1 -0
- package/lib/number-format/factories/createSmartNumberFormatter.d.ts +8 -0
- package/lib/number-format/factories/createSmartNumberFormatter.d.ts.map +1 -0
- package/lib/number-format/factories/createSmartNumberFormatter.js +58 -0
- package/lib/number-format/factories/createSmartNumberFormatter.js.map +1 -0
- package/lib/number-format/index.d.ts +11 -0
- package/lib/number-format/index.d.ts.map +1 -0
- package/lib/number-format/index.js +29 -0
- package/lib/number-format/index.js.map +1 -0
- package/lib/number-format/types.d.ts +2 -0
- package/lib/number-format/types.d.ts.map +1 -0
- package/lib/number-format/types.js +20 -0
- package/lib/number-format/types.js.map +1 -0
- package/lib/query/DatasourceKey.d.ts +12 -0
- package/lib/query/DatasourceKey.d.ts.map +1 -0
- package/lib/query/DatasourceKey.js +39 -0
- package/lib/query/DatasourceKey.js.map +1 -0
- package/lib/query/README.md +30 -0
- package/lib/query/api/legacy/getDatasourceMetadata.d.ts +7 -0
- package/lib/query/api/legacy/getDatasourceMetadata.d.ts.map +1 -0
- package/lib/query/api/legacy/getDatasourceMetadata.js +28 -0
- package/lib/query/api/legacy/getDatasourceMetadata.js.map +1 -0
- package/lib/query/api/legacy/getFormData.d.ts +8 -0
- package/lib/query/api/legacy/getFormData.d.ts.map +1 -0
- package/lib/query/api/legacy/getFormData.js +31 -0
- package/lib/query/api/legacy/getFormData.js.map +1 -0
- package/lib/query/api/legacy/index.d.ts +5 -0
- package/lib/query/api/legacy/index.d.ts.map +1 -0
- package/lib/query/api/legacy/index.js +23 -0
- package/lib/query/api/legacy/index.js.map +1 -0
- package/lib/query/api/legacy/types.d.ts +25 -0
- package/lib/query/api/legacy/types.d.ts.map +1 -0
- package/lib/query/api/legacy/types.js +2 -0
- package/lib/query/api/legacy/types.js.map +1 -0
- package/lib/query/api/types.d.ts +24 -0
- package/lib/query/api/types.d.ts.map +1 -0
- package/lib/query/api/types.js +2 -0
- package/lib/query/api/types.js.map +1 -0
- package/lib/query/api/v1/handleError.d.ts +26 -0
- package/lib/query/api/v1/handleError.d.ts.map +1 -0
- package/lib/query/api/v1/handleError.js +97 -0
- package/lib/query/api/v1/handleError.js.map +1 -0
- package/lib/query/api/v1/index.d.ts +20 -0
- package/lib/query/api/v1/index.d.ts.map +1 -0
- package/lib/query/api/v1/index.js +30 -0
- package/lib/query/api/v1/index.js.map +1 -0
- package/lib/query/api/v1/makeApi.d.ts +40 -0
- package/lib/query/api/v1/makeApi.d.ts.map +1 -0
- package/lib/query/api/v1/makeApi.js +91 -0
- package/lib/query/api/v1/makeApi.js.map +1 -0
- package/lib/query/api/v1/types.d.ts +80 -0
- package/lib/query/api/v1/types.d.ts.map +1 -0
- package/lib/query/api/v1/types.js +54 -0
- package/lib/query/api/v1/types.js.map +1 -0
- package/lib/query/buildQueryContext.d.ts +14 -0
- package/lib/query/buildQueryContext.d.ts.map +1 -0
- package/lib/query/buildQueryContext.js +50 -0
- package/lib/query/buildQueryContext.js.map +1 -0
- package/lib/query/buildQueryObject.d.ts +11 -0
- package/lib/query/buildQueryObject.d.ts.map +1 -0
- package/lib/query/buildQueryObject.js +89 -0
- package/lib/query/buildQueryObject.js.map +1 -0
- package/lib/query/constants.d.ts +27 -0
- package/lib/query/constants.d.ts.map +1 -0
- package/lib/query/constants.js +24 -0
- package/lib/query/constants.js.map +1 -0
- package/lib/query/convertFilter.d.ts +4 -0
- package/lib/query/convertFilter.d.ts.map +1 -0
- package/lib/query/convertFilter.js +44 -0
- package/lib/query/convertFilter.js.map +1 -0
- package/lib/query/extractExtras.d.ts +16 -0
- package/lib/query/extractExtras.d.ts.map +1 -0
- package/lib/query/extractExtras.js +55 -0
- package/lib/query/extractExtras.js.map +1 -0
- package/lib/query/extractQueryFields.d.ts +11 -0
- package/lib/query/extractQueryFields.d.ts.map +1 -0
- package/lib/query/extractQueryFields.js +105 -0
- package/lib/query/extractQueryFields.js.map +1 -0
- package/lib/query/extractTimegrain.d.ts +22 -0
- package/lib/query/extractTimegrain.d.ts.map +1 -0
- package/lib/query/extractTimegrain.js +31 -0
- package/lib/query/extractTimegrain.js.map +1 -0
- package/lib/query/getClientErrorObject.d.ts +48 -0
- package/lib/query/getClientErrorObject.d.ts.map +1 -0
- package/lib/query/getClientErrorObject.js +226 -0
- package/lib/query/getClientErrorObject.js.map +1 -0
- package/lib/query/getColumnLabel.d.ts +21 -0
- package/lib/query/getColumnLabel.d.ts.map +1 -0
- package/lib/query/getColumnLabel.js +29 -0
- package/lib/query/getColumnLabel.js.map +1 -0
- package/lib/query/getMetricLabel.d.ts +3 -0
- package/lib/query/getMetricLabel.d.ts.map +1 -0
- package/lib/query/getMetricLabel.js +32 -0
- package/lib/query/getMetricLabel.js.map +1 -0
- package/lib/query/getXAxis.d.ts +23 -0
- package/lib/query/getXAxis.d.ts.map +1 -0
- package/lib/query/getXAxis.js +38 -0
- package/lib/query/getXAxis.js.map +1 -0
- package/lib/query/index.d.ts +43 -0
- package/lib/query/index.d.ts.map +1 -0
- package/lib/query/index.js +44 -0
- package/lib/query/index.js.map +1 -0
- package/lib/query/normalizeOrderBy.d.ts +3 -0
- package/lib/query/normalizeOrderBy.d.ts.map +1 -0
- package/lib/query/normalizeOrderBy.js +64 -0
- package/lib/query/normalizeOrderBy.js.map +1 -0
- package/lib/query/normalizeTimeColumn.d.ts +3 -0
- package/lib/query/normalizeTimeColumn.d.ts.map +1 -0
- package/lib/query/normalizeTimeColumn.js +62 -0
- package/lib/query/normalizeTimeColumn.js.map +1 -0
- package/lib/query/processExtraFormData.d.ts +21 -0
- package/lib/query/processExtraFormData.d.ts.map +1 -0
- package/lib/query/processExtraFormData.js +22 -0
- package/lib/query/processExtraFormData.js.map +1 -0
- package/lib/query/processFilters.d.ts +4 -0
- package/lib/query/processFilters.d.ts.map +1 -0
- package/lib/query/processFilters.js +67 -0
- package/lib/query/processFilters.js.map +1 -0
- package/lib/query/types/AdvancedAnalytics.d.ts +42 -0
- package/lib/query/types/AdvancedAnalytics.d.ts.map +1 -0
- package/lib/query/types/AdvancedAnalytics.js +35 -0
- package/lib/query/types/AdvancedAnalytics.js.map +1 -0
- package/lib/query/types/AnnotationLayer.d.ts +110 -0
- package/lib/query/types/AnnotationLayer.d.ts.map +1 -0
- package/lib/query/types/AnnotationLayer.js +68 -0
- package/lib/query/types/AnnotationLayer.js.map +1 -0
- package/lib/query/types/Column.d.ts +61 -0
- package/lib/query/types/Column.d.ts.map +1 -0
- package/lib/query/types/Column.js +33 -0
- package/lib/query/types/Column.js.map +1 -0
- package/lib/query/types/Dashboard.d.ts +120 -0
- package/lib/query/types/Dashboard.d.ts.map +1 -0
- package/lib/query/types/Dashboard.js +48 -0
- package/lib/query/types/Dashboard.js.map +1 -0
- package/lib/query/types/Datasource.d.ts +55 -0
- package/lib/query/types/Datasource.d.ts.map +1 -0
- package/lib/query/types/Datasource.js +16 -0
- package/lib/query/types/Datasource.js.map +1 -0
- package/lib/query/types/Filter.d.ts +35 -0
- package/lib/query/types/Filter.d.ts.map +1 -0
- package/lib/query/types/Filter.js +38 -0
- package/lib/query/types/Filter.js.map +1 -0
- package/lib/query/types/Metric.d.ts +68 -0
- package/lib/query/types/Metric.d.ts.map +1 -0
- package/lib/query/types/Metric.js +16 -0
- package/lib/query/types/Metric.js.map +1 -0
- package/lib/query/types/Operator.d.ts +17 -0
- package/lib/query/types/Operator.d.ts.map +1 -0
- package/lib/query/types/Operator.js +52 -0
- package/lib/query/types/Operator.js.map +1 -0
- package/lib/query/types/PostProcessing.d.ts +208 -0
- package/lib/query/types/PostProcessing.d.ts.map +1 -0
- package/lib/query/types/PostProcessing.js +51 -0
- package/lib/query/types/PostProcessing.js.map +1 -0
- package/lib/query/types/Query.d.ts +384 -0
- package/lib/query/types/Query.d.ts.map +1 -0
- package/lib/query/types/Query.js +233 -0
- package/lib/query/types/Query.js.map +1 -0
- package/lib/query/types/QueryFormData.d.ts +168 -0
- package/lib/query/types/QueryFormData.d.ts.map +1 -0
- package/lib/query/types/QueryFormData.js +29 -0
- package/lib/query/types/QueryFormData.js.map +1 -0
- package/lib/query/types/QueryResponse.d.ts +83 -0
- package/lib/query/types/QueryResponse.d.ts.map +1 -0
- package/lib/query/types/QueryResponse.js +30 -0
- package/lib/query/types/QueryResponse.js.map +1 -0
- package/lib/query/types/Time.d.ts +12 -0
- package/lib/query/types/Time.d.ts.map +1 -0
- package/lib/query/types/Time.js +20 -0
- package/lib/query/types/Time.js.map +1 -0
- package/lib/query/types/index.d.ts +42 -0
- package/lib/query/types/index.d.ts.map +1 -0
- package/lib/query/types/index.js +41 -0
- package/lib/query/types/index.js.map +1 -0
- package/lib/style/index.d.ts +236 -0
- package/lib/style/index.d.ts.map +1 -0
- package/lib/style/index.js +174 -0
- package/lib/style/index.js.map +1 -0
- package/lib/style/index.jsx +148 -0
- package/lib/style/index.jsx.map +1 -0
- package/lib/time-comparison/README.md +47 -0
- package/lib/time-comparison/customTimeRangeDecode.d.ts +22 -0
- package/lib/time-comparison/customTimeRangeDecode.d.ts.map +1 -0
- package/lib/time-comparison/customTimeRangeDecode.js +135 -0
- package/lib/time-comparison/customTimeRangeDecode.js.map +1 -0
- package/lib/time-comparison/fetchTimeRange.d.ts +12 -0
- package/lib/time-comparison/fetchTimeRange.d.ts.map +1 -0
- package/lib/time-comparison/fetchTimeRange.js +74 -0
- package/lib/time-comparison/fetchTimeRange.js.map +1 -0
- package/lib/time-comparison/getComparisonFilters.d.ts +31 -0
- package/lib/time-comparison/getComparisonFilters.d.ts.map +1 -0
- package/lib/time-comparison/getComparisonFilters.js +47 -0
- package/lib/time-comparison/getComparisonFilters.js.map +1 -0
- package/lib/time-comparison/getComparisonInfo.d.ts +31 -0
- package/lib/time-comparison/getComparisonInfo.d.ts.map +1 -0
- package/lib/time-comparison/getComparisonInfo.js +56 -0
- package/lib/time-comparison/getComparisonInfo.js.map +1 -0
- package/lib/time-comparison/getTimeOffset.d.ts +11 -0
- package/lib/time-comparison/getTimeOffset.d.ts.map +1 -0
- package/lib/time-comparison/getTimeOffset.js +266 -0
- package/lib/time-comparison/getTimeOffset.js.map +1 -0
- package/lib/time-comparison/index.d.ts +7 -0
- package/lib/time-comparison/index.d.ts.map +1 -0
- package/lib/time-comparison/index.js +25 -0
- package/lib/time-comparison/index.js.map +1 -0
- package/lib/time-comparison/types.d.ts +30 -0
- package/lib/time-comparison/types.d.ts.map +1 -0
- package/lib/time-comparison/types.js +30 -0
- package/lib/time-comparison/types.js.map +1 -0
- package/lib/time-format/D3FormatConfig.d.ts +21 -0
- package/lib/time-format/D3FormatConfig.d.ts.map +1 -0
- package/lib/time-format/D3FormatConfig.js +63 -0
- package/lib/time-format/D3FormatConfig.js.map +1 -0
- package/lib/time-format/README.md +68 -0
- package/lib/time-format/TimeFormats.d.ts +11 -0
- package/lib/time-format/TimeFormats.d.ts.map +1 -0
- package/lib/time-format/TimeFormats.js +35 -0
- package/lib/time-format/TimeFormats.js.map +1 -0
- package/lib/time-format/TimeFormatsForGranularity.d.ts +7 -0
- package/lib/time-format/TimeFormatsForGranularity.d.ts.map +1 -0
- package/lib/time-format/TimeFormatsForGranularity.js +46 -0
- package/lib/time-format/TimeFormatsForGranularity.js.map +1 -0
- package/lib/time-format/TimeFormatter.d.ts +42 -0
- package/lib/time-format/TimeFormatter.d.ts.map +1 -0
- package/lib/time-format/TimeFormatter.js +46 -0
- package/lib/time-format/TimeFormatter.js.map +1 -0
- package/lib/time-format/TimeFormatterRegistry.d.ts +29 -0
- package/lib/time-format/TimeFormatterRegistry.d.ts.map +1 -0
- package/lib/time-format/TimeFormatterRegistry.js +60 -0
- package/lib/time-format/TimeFormatterRegistry.js.map +1 -0
- package/lib/time-format/TimeFormatterRegistrySingleton.d.ts +17 -0
- package/lib/time-format/TimeFormatterRegistrySingleton.d.ts.map +1 -0
- package/lib/time-format/TimeFormatterRegistrySingleton.js +65 -0
- package/lib/time-format/TimeFormatterRegistrySingleton.js.map +1 -0
- package/lib/time-format/TimeRangeFormatter.d.ts +40 -0
- package/lib/time-format/TimeRangeFormatter.d.ts.map +1 -0
- package/lib/time-format/TimeRangeFormatter.js +40 -0
- package/lib/time-format/TimeRangeFormatter.js.map +1 -0
- package/lib/time-format/factories/createD3TimeFormatter.d.ts +28 -0
- package/lib/time-format/factories/createD3TimeFormatter.d.ts.map +1 -0
- package/lib/time-format/factories/createD3TimeFormatter.js +45 -0
- package/lib/time-format/factories/createD3TimeFormatter.js.map +1 -0
- package/lib/time-format/factories/createMultiFormatter.d.ts +22 -0
- package/lib/time-format/factories/createMultiFormatter.d.ts.map +1 -0
- package/lib/time-format/factories/createMultiFormatter.js +70 -0
- package/lib/time-format/factories/createMultiFormatter.js.map +1 -0
- package/lib/time-format/formatters/finestTemporalGrain.d.ts +3 -0
- package/lib/time-format/formatters/finestTemporalGrain.d.ts.map +1 -0
- package/lib/time-format/formatters/finestTemporalGrain.js +64 -0
- package/lib/time-format/formatters/finestTemporalGrain.js.map +1 -0
- package/lib/time-format/formatters/finestTemporalGrain.test.d.ts +2 -0
- package/lib/time-format/formatters/finestTemporalGrain.test.d.ts.map +1 -0
- package/lib/time-format/formatters/finestTemporalGrain.test.js +44 -0
- package/lib/time-format/formatters/finestTemporalGrain.test.js.map +1 -0
- package/lib/time-format/formatters/smartDate.d.ts +4 -0
- package/lib/time-format/formatters/smartDate.d.ts.map +1 -0
- package/lib/time-format/formatters/smartDate.js +38 -0
- package/lib/time-format/formatters/smartDate.js.map +1 -0
- package/lib/time-format/formatters/smartDateDetailed.d.ts +4 -0
- package/lib/time-format/formatters/smartDateDetailed.d.ts.map +1 -0
- package/lib/time-format/formatters/smartDateDetailed.js +38 -0
- package/lib/time-format/formatters/smartDateDetailed.js.map +1 -0
- package/lib/time-format/formatters/smartDateVerbose.d.ts +4 -0
- package/lib/time-format/formatters/smartDateVerbose.d.ts.map +1 -0
- package/lib/time-format/formatters/smartDateVerbose.js +38 -0
- package/lib/time-format/formatters/smartDateVerbose.js.map +1 -0
- package/lib/time-format/index.d.ts +14 -0
- package/lib/time-format/index.d.ts.map +1 -0
- package/lib/time-format/index.js +32 -0
- package/lib/time-format/index.js.map +1 -0
- package/lib/time-format/types.d.ts +28 -0
- package/lib/time-format/types.d.ts.map +1 -0
- package/lib/time-format/types.js +41 -0
- package/lib/time-format/types.js.map +1 -0
- package/lib/time-format/utils/createTime.d.ts +2 -0
- package/lib/time-format/utils/createTime.d.ts.map +1 -0
- package/lib/time-format/utils/createTime.js +31 -0
- package/lib/time-format/utils/createTime.js.map +1 -0
- package/lib/time-format/utils/createTimeRangeFromGranularity.d.ts +3 -0
- package/lib/time-format/utils/createTimeRangeFromGranularity.d.ts.map +1 -0
- package/lib/time-format/utils/createTimeRangeFromGranularity.js +83 -0
- package/lib/time-format/utils/createTimeRangeFromGranularity.js.map +1 -0
- package/lib/time-format/utils/d3Time.d.ts +63 -0
- package/lib/time-format/utils/d3Time.d.ts.map +1 -0
- package/lib/time-format/utils/d3Time.js +101 -0
- package/lib/time-format/utils/d3Time.js.map +1 -0
- package/lib/time-format/utils/denormalizeTimestamp.d.ts +2 -0
- package/lib/time-format/utils/denormalizeTimestamp.d.ts.map +1 -0
- package/lib/time-format/utils/denormalizeTimestamp.js +27 -0
- package/lib/time-format/utils/denormalizeTimestamp.js.map +1 -0
- package/lib/time-format/utils/normalizeTimestamp.d.ts +3 -0
- package/lib/time-format/utils/normalizeTimestamp.d.ts.map +1 -0
- package/lib/time-format/utils/normalizeTimestamp.js +27 -0
- package/lib/time-format/utils/normalizeTimestamp.js.map +1 -0
- package/lib/time-format/utils/stringifyTimeInput.d.ts +2 -0
- package/lib/time-format/utils/stringifyTimeInput.d.ts.map +1 -0
- package/lib/time-format/utils/stringifyTimeInput.js +25 -0
- package/lib/time-format/utils/stringifyTimeInput.js.map +1 -0
- package/lib/translation/README.md +71 -0
- package/lib/translation/Translator.d.ts +18 -0
- package/lib/translation/Translator.d.ts.map +1 -0
- package/lib/translation/Translator.js +89 -0
- package/lib/translation/Translator.js.map +1 -0
- package/lib/translation/TranslatorSingleton.d.ts +11 -0
- package/lib/translation/TranslatorSingleton.d.ts.map +1 -0
- package/lib/translation/TranslatorSingleton.js +59 -0
- package/lib/translation/TranslatorSingleton.js.map +1 -0
- package/lib/translation/index.d.ts +6 -0
- package/lib/translation/index.d.ts.map +1 -0
- package/lib/translation/index.js +23 -0
- package/lib/translation/index.js.map +1 -0
- package/lib/translation/types/index.d.ts +55 -0
- package/lib/translation/types/index.d.ts.map +1 -0
- package/lib/translation/types/index.js +4 -0
- package/lib/translation/types/index.js.map +1 -0
- package/lib/translation/types/jed.d.ts +31 -0
- package/lib/translation/types/jed.d.ts.map +1 -0
- package/lib/translation/types/jed.js +20 -0
- package/lib/translation/types/jed.js.map +1 -0
- package/lib/types/index.d.ts +26 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -0
- package/lib/ui-overrides/ExtensionsRegistry.d.ts +30 -0
- package/lib/ui-overrides/ExtensionsRegistry.d.ts.map +1 -0
- package/lib/ui-overrides/ExtensionsRegistry.js +29 -0
- package/lib/ui-overrides/ExtensionsRegistry.js.map +1 -0
- package/lib/ui-overrides/index.d.ts +21 -0
- package/lib/ui-overrides/index.d.ts.map +1 -0
- package/lib/ui-overrides/index.js +21 -0
- package/lib/ui-overrides/index.js.map +1 -0
- package/lib/ui-overrides/index.jsx +21 -0
- package/lib/ui-overrides/index.jsx.map +1 -0
- package/lib/ui-overrides/types.d.ts +192 -0
- package/lib/ui-overrides/types.d.ts.map +1 -0
- package/lib/ui-overrides/types.js +2 -0
- package/lib/ui-overrides/types.js.map +1 -0
- package/lib/utils/convertKeysToCamelCase.d.ts +2 -0
- package/lib/utils/convertKeysToCamelCase.d.ts.map +1 -0
- package/lib/utils/convertKeysToCamelCase.js +30 -0
- package/lib/utils/convertKeysToCamelCase.js.map +1 -0
- package/lib/utils/ensureIsArray.d.ts +24 -0
- package/lib/utils/ensureIsArray.d.ts.map +1 -0
- package/lib/utils/ensureIsArray.js +29 -0
- package/lib/utils/ensureIsArray.js.map +1 -0
- package/lib/utils/ensureIsInt.d.ts +20 -0
- package/lib/utils/ensureIsInt.d.ts.map +1 -0
- package/lib/utils/ensureIsInt.js +24 -0
- package/lib/utils/ensureIsInt.js.map +1 -0
- package/lib/utils/featureFlags.d.ts +66 -0
- package/lib/utils/featureFlags.d.ts.map +1 -0
- package/lib/utils/featureFlags.js +80 -0
- package/lib/utils/featureFlags.js.map +1 -0
- package/lib/utils/getSelectedText.d.ts +20 -0
- package/lib/utils/getSelectedText.d.ts.map +1 -0
- package/lib/utils/getSelectedText.js +20 -0
- package/lib/utils/getSelectedText.js.map +1 -0
- package/lib/utils/html.d.ts +12 -0
- package/lib/utils/html.d.ts.map +1 -0
- package/lib/utils/html.js +122 -0
- package/lib/utils/html.js.map +1 -0
- package/lib/utils/html.jsx +96 -0
- package/lib/utils/html.jsx.map +1 -0
- package/lib/utils/html.test.d.ts +2 -0
- package/lib/utils/html.test.d.ts.map +1 -0
- package/lib/utils/html.test.js +192 -0
- package/lib/utils/html.test.js.map +1 -0
- package/lib/utils/html.test.jsx +152 -0
- package/lib/utils/html.test.jsx.map +1 -0
- package/lib/utils/index.d.ts +36 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +36 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/isDefined.d.ts +2 -0
- package/lib/utils/isDefined.d.ts.map +1 -0
- package/lib/utils/isDefined.js +22 -0
- package/lib/utils/isDefined.js.map +1 -0
- package/lib/utils/isEqualArray.d.ts +20 -0
- package/lib/utils/isEqualArray.d.ts.map +1 -0
- package/lib/utils/isEqualArray.js +27 -0
- package/lib/utils/isEqualArray.js.map +1 -0
- package/lib/utils/isEqualArray.test.d.ts +2 -0
- package/lib/utils/isEqualArray.test.d.ts.map +1 -0
- package/lib/utils/isEqualArray.test.js +31 -0
- package/lib/utils/isEqualArray.test.js.map +1 -0
- package/lib/utils/isRequired.d.ts +2 -0
- package/lib/utils/isRequired.d.ts.map +1 -0
- package/lib/utils/isRequired.js +22 -0
- package/lib/utils/isRequired.js.map +1 -0
- package/lib/utils/logging.d.ts +55 -0
- package/lib/utils/logging.d.ts.map +1 -0
- package/lib/utils/logging.js +36 -0
- package/lib/utils/logging.js.map +1 -0
- package/lib/utils/lruCache.d.ts +31 -0
- package/lib/utils/lruCache.d.ts.map +1 -0
- package/lib/utils/lruCache.js +65 -0
- package/lib/utils/lruCache.js.map +1 -0
- package/lib/utils/makeSingleton.d.ts +6 -0
- package/lib/utils/makeSingleton.d.ts.map +1 -0
- package/lib/utils/makeSingleton.js +28 -0
- package/lib/utils/makeSingleton.js.map +1 -0
- package/lib/utils/promiseTimeout.d.ts +7 -0
- package/lib/utils/promiseTimeout.d.ts.map +1 -0
- package/lib/utils/promiseTimeout.js +31 -0
- package/lib/utils/promiseTimeout.js.map +1 -0
- package/lib/utils/random.d.ts +22 -0
- package/lib/utils/random.d.ts.map +1 -0
- package/lib/utils/random.js +26 -0
- package/lib/utils/random.js.map +1 -0
- package/lib/utils/removeDuplicates.d.ts +24 -0
- package/lib/utils/removeDuplicates.d.ts.map +1 -0
- package/lib/utils/removeDuplicates.js +36 -0
- package/lib/utils/removeDuplicates.js.map +1 -0
- package/lib/utils/tooltip.d.ts +2 -0
- package/lib/utils/tooltip.d.ts.map +1 -0
- package/lib/utils/tooltip.js +51 -0
- package/lib/utils/tooltip.js.map +1 -0
- package/lib/utils/typedMemo.d.ts +2 -0
- package/lib/utils/typedMemo.d.ts.map +1 -0
- package/lib/utils/typedMemo.js +21 -0
- package/lib/utils/typedMemo.js.map +1 -0
- package/lib/validator/index.d.ts +9 -0
- package/lib/validator/index.d.ts.map +1 -0
- package/lib/validator/index.js +27 -0
- package/lib/validator/index.js.map +1 -0
- package/lib/validator/legacyValidateInteger.d.ts +6 -0
- package/lib/validator/legacyValidateInteger.d.ts.map +1 -0
- package/lib/validator/legacyValidateInteger.js +31 -0
- package/lib/validator/legacyValidateInteger.js.map +1 -0
- package/lib/validator/legacyValidateNumber.d.ts +6 -0
- package/lib/validator/legacyValidateNumber.d.ts.map +1 -0
- package/lib/validator/legacyValidateNumber.js +30 -0
- package/lib/validator/legacyValidateNumber.js.map +1 -0
- package/lib/validator/validateInteger.d.ts +2 -0
- package/lib/validator/validateInteger.d.ts.map +1 -0
- package/lib/validator/validateInteger.js +29 -0
- package/lib/validator/validateInteger.js.map +1 -0
- package/lib/validator/validateMapboxStylesUrl.d.ts +6 -0
- package/lib/validator/validateMapboxStylesUrl.d.ts.map +1 -0
- package/lib/validator/validateMapboxStylesUrl.js +32 -0
- package/lib/validator/validateMapboxStylesUrl.js.map +1 -0
- package/lib/validator/validateMaxValue.d.ts +2 -0
- package/lib/validator/validateMaxValue.d.ts.map +1 -0
- package/lib/validator/validateMaxValue.js +26 -0
- package/lib/validator/validateMaxValue.js.map +1 -0
- package/lib/validator/validateNonEmpty.d.ts +2 -0
- package/lib/validator/validateNonEmpty.d.ts.map +1 -0
- package/lib/validator/validateNonEmpty.js +29 -0
- package/lib/validator/validateNonEmpty.js.map +1 -0
- package/lib/validator/validateNumber.d.ts +2 -0
- package/lib/validator/validateNumber.d.ts.map +1 -0
- package/lib/validator/validateNumber.js +29 -0
- package/lib/validator/validateNumber.js.map +1 -0
- package/lib/validator/validateTimeComparisonRangeValues.d.ts +3 -0
- package/lib/validator/validateTimeComparisonRangeValues.d.ts.map +1 -0
- package/lib/validator/validateTimeComparisonRangeValues.js +30 -0
- package/lib/validator/validateTimeComparisonRangeValues.js.map +1 -0
- package/package.json +101 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import TimeFormats from './TimeFormats.js';
|
|
21
|
+
import { TimeGranularity } from './types.js';
|
|
22
|
+
|
|
23
|
+
const { DATABASE_DATE, DATABASE_DATETIME } = TimeFormats;
|
|
24
|
+
const MINUTE = '%Y-%m-%d %H:%M';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Map time granularity to d3-format string
|
|
28
|
+
*/
|
|
29
|
+
const TimeFormatsForGranularity = {
|
|
30
|
+
[TimeGranularity.DATE]: DATABASE_DATE,
|
|
31
|
+
[TimeGranularity.SECOND]: DATABASE_DATETIME,
|
|
32
|
+
[TimeGranularity.MINUTE]: MINUTE,
|
|
33
|
+
[TimeGranularity.FIVE_MINUTES]: MINUTE,
|
|
34
|
+
[TimeGranularity.TEN_MINUTES]: MINUTE,
|
|
35
|
+
[TimeGranularity.FIFTEEN_MINUTES]: MINUTE,
|
|
36
|
+
[TimeGranularity.THIRTY_MINUTES]: MINUTE,
|
|
37
|
+
[TimeGranularity.HOUR]: '%Y-%m-%d %H:00',
|
|
38
|
+
[TimeGranularity.DAY]: DATABASE_DATE,
|
|
39
|
+
[TimeGranularity.WEEK]: DATABASE_DATE,
|
|
40
|
+
[TimeGranularity.MONTH]: '%b %Y',
|
|
41
|
+
[TimeGranularity.QUARTER]: '%Y Q%q',
|
|
42
|
+
[TimeGranularity.YEAR]: '%Y',
|
|
43
|
+
[TimeGranularity.WEEK_STARTING_SUNDAY]: DATABASE_DATE,
|
|
44
|
+
[TimeGranularity.WEEK_STARTING_MONDAY]: DATABASE_DATE,
|
|
45
|
+
[TimeGranularity.WEEK_ENDING_SATURDAY]: DATABASE_DATE,
|
|
46
|
+
[TimeGranularity.WEEK_ENDING_SUNDAY]: DATABASE_DATE
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default TimeFormatsForGranularity;
|
|
50
|
+
//# sourceMappingURL=TimeFormatsForGranularity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeFormatsForGranularity.js","names":["TimeFormats","TimeGranularity","DATABASE_DATE","DATABASE_DATETIME","MINUTE","TimeFormatsForGranularity","DATE","SECOND","FIVE_MINUTES","TEN_MINUTES","FIFTEEN_MINUTES","THIRTY_MINUTES","HOUR","DAY","WEEK","MONTH","QUARTER","YEAR","WEEK_STARTING_SUNDAY","WEEK_STARTING_MONDAY","WEEK_ENDING_SATURDAY","WEEK_ENDING_SUNDAY"],"sources":["../../src/time-format/TimeFormatsForGranularity.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport TimeFormats from './TimeFormats';\nimport { TimeGranularity } from './types';\n\nconst { DATABASE_DATE, DATABASE_DATETIME } = TimeFormats;\nconst MINUTE = '%Y-%m-%d %H:%M';\n\n/**\n * Map time granularity to d3-format string\n */\nconst TimeFormatsForGranularity: Record<TimeGranularity, string> = {\n [TimeGranularity.DATE]: DATABASE_DATE,\n [TimeGranularity.SECOND]: DATABASE_DATETIME,\n [TimeGranularity.MINUTE]: MINUTE,\n [TimeGranularity.FIVE_MINUTES]: MINUTE,\n [TimeGranularity.TEN_MINUTES]: MINUTE,\n [TimeGranularity.FIFTEEN_MINUTES]: MINUTE,\n [TimeGranularity.THIRTY_MINUTES]: MINUTE,\n [TimeGranularity.HOUR]: '%Y-%m-%d %H:00',\n [TimeGranularity.DAY]: DATABASE_DATE,\n [TimeGranularity.WEEK]: DATABASE_DATE,\n [TimeGranularity.MONTH]: '%b %Y',\n [TimeGranularity.QUARTER]: '%Y Q%q',\n [TimeGranularity.YEAR]: '%Y',\n [TimeGranularity.WEEK_STARTING_SUNDAY]: DATABASE_DATE,\n [TimeGranularity.WEEK_STARTING_MONDAY]: DATABASE_DATE,\n [TimeGranularity.WEEK_ENDING_SATURDAY]: DATABASE_DATE,\n [TimeGranularity.WEEK_ENDING_SUNDAY]: DATABASE_DATE,\n};\n\nexport default TimeFormatsForGranularity;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,WAAW,MAAM,eAAe;AACvC,SAASC,eAAe,QAAQ,SAAS;;AAEzC,MAAM,EAAEC,aAAa,EAAEC,iBAAiB,CAAC,CAAC,GAAGH,WAAW;AACxD,MAAMI,MAAM,GAAG,gBAAgB;;AAE/B;AACA;AACA;AACA,MAAMC,yBAA0D,GAAG;EACjE,CAACJ,eAAe,CAACK,IAAI,GAAGJ,aAAa;EACrC,CAACD,eAAe,CAACM,MAAM,GAAGJ,iBAAiB;EAC3C,CAACF,eAAe,CAACG,MAAM,GAAGA,MAAM;EAChC,CAACH,eAAe,CAACO,YAAY,GAAGJ,MAAM;EACtC,CAACH,eAAe,CAACQ,WAAW,GAAGL,MAAM;EACrC,CAACH,eAAe,CAACS,eAAe,GAAGN,MAAM;EACzC,CAACH,eAAe,CAACU,cAAc,GAAGP,MAAM;EACxC,CAACH,eAAe,CAACW,IAAI,GAAG,gBAAgB;EACxC,CAACX,eAAe,CAACY,GAAG,GAAGX,aAAa;EACpC,CAACD,eAAe,CAACa,IAAI,GAAGZ,aAAa;EACrC,CAACD,eAAe,CAACc,KAAK,GAAG,OAAO;EAChC,CAACd,eAAe,CAACe,OAAO,GAAG,QAAQ;EACnC,CAACf,eAAe,CAACgB,IAAI,GAAG,IAAI;EAC5B,CAAChB,eAAe,CAACiB,oBAAoB,GAAGhB,aAAa;EACrD,CAACD,eAAe,CAACkB,oBAAoB,GAAGjB,aAAa;EACrD,CAACD,eAAe,CAACmB,oBAAoB,GAAGlB,aAAa;EACrD,CAACD,eAAe,CAACoB,kBAAkB,GAAGnB;AACxC,CAAC;;AAED,eAAeG,yBAAyB","ignoreList":[]}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { ExtensibleFunction } from '../models/index.js';
|
|
20
|
+
import { isRequired } from '../utils/index.js';
|
|
21
|
+
|
|
22
|
+
import stringifyTimeInput from './utils/stringifyTimeInput.js';
|
|
23
|
+
|
|
24
|
+
export const PREVIEW_TIME = new Date(Date.UTC(2017, 1, 14, 11, 22, 33));
|
|
25
|
+
|
|
26
|
+
// Use type augmentation to indicate that
|
|
27
|
+
// an instance of TimeFormatter is also a function
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class TimeFormatter extends ExtensibleFunction {
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
constructor(config)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
{
|
|
50
|
+
super((value) => this.format(value));this.id = void 0;this.label = void 0;this.description = void 0;this.formatFunc = void 0;this.useLocalTime = void 0;
|
|
51
|
+
|
|
52
|
+
const {
|
|
53
|
+
id = isRequired('config.id'),
|
|
54
|
+
label,
|
|
55
|
+
description = '',
|
|
56
|
+
formatFunc = isRequired('config.formatFunc'),
|
|
57
|
+
useLocalTime = false
|
|
58
|
+
} = config;
|
|
59
|
+
|
|
60
|
+
this.id = id;
|
|
61
|
+
this.label = label != null ? label : id;
|
|
62
|
+
this.description = description;
|
|
63
|
+
this.formatFunc = formatFunc;
|
|
64
|
+
this.useLocalTime = useLocalTime;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
format(value) {
|
|
68
|
+
return stringifyTimeInput(value, (time) => this.formatFunc(time));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
preview(value = PREVIEW_TIME) {
|
|
72
|
+
return `${value.toUTCString()} => ${this.format(value)}`;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default TimeFormatter;
|
|
77
|
+
//# sourceMappingURL=TimeFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeFormatter.js","names":["ExtensibleFunction","isRequired","stringifyTimeInput","PREVIEW_TIME","Date","UTC","TimeFormatter","constructor","config","value","format","id","label","description","formatFunc","useLocalTime","time","preview","toUTCString"],"sources":["../../src/time-format/TimeFormatter.ts"],"sourcesContent":["/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport { ExtensibleFunction } from '../models';\nimport { isRequired } from '../utils';\nimport { TimeFormatFunction } from './types';\nimport stringifyTimeInput from './utils/stringifyTimeInput';\n\nexport const PREVIEW_TIME = new Date(Date.UTC(2017, 1, 14, 11, 22, 33));\n\n// Use type augmentation to indicate that\n// an instance of TimeFormatter is also a function\ninterface TimeFormatter {\n (value: Date | number | null | undefined): string;\n}\n\nclass TimeFormatter extends ExtensibleFunction {\n id: string;\n\n label: string;\n\n description: string;\n\n formatFunc: TimeFormatFunction;\n\n useLocalTime: boolean;\n\n constructor(config: {\n id: string;\n label?: string;\n description?: string;\n formatFunc: TimeFormatFunction;\n useLocalTime?: boolean;\n }) {\n super((value: Date | number | null | undefined) => this.format(value));\n\n const {\n id = isRequired('config.id'),\n label,\n description = '',\n formatFunc = isRequired('config.formatFunc'),\n useLocalTime = false,\n } = config;\n\n this.id = id;\n this.label = label ?? id;\n this.description = description;\n this.formatFunc = formatFunc;\n this.useLocalTime = useLocalTime;\n }\n\n format(value: Date | number | null | undefined) {\n return stringifyTimeInput(value, time => this.formatFunc(time));\n }\n\n preview(value: Date = PREVIEW_TIME) {\n return `${value.toUTCString()} => ${this.format(value)}`;\n }\n}\n\nexport default TimeFormatter;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,WAAW;AAC9C,SAASC,UAAU,QAAQ,UAAU;;AAErC,OAAOC,kBAAkB,MAAM,4BAA4B;;AAE3D,OAAO,MAAMC,YAAY,GAAG,IAAIC,IAAI,CAACA,IAAI,CAACC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;;AAEvE;AACA;;;;;AAKA,MAAMC,aAAa,SAASN,kBAAkB,CAAC;;;;;;;;;;;EAW7CO,WAAWA,CAACC,MAMX;;;;;;EAAE;IACD,KAAK,CAAC,CAACC,KAAuC,KAAK,IAAI,CAACC,MAAM,CAACD,KAAK,CAAC,CAAC,CAAC,KAjBzEE,EAAE,eAEFC,KAAK,eAELC,WAAW,eAEXC,UAAU,eAEVC,YAAY;;IAWV,MAAM;MACJJ,EAAE,GAAGV,UAAU,CAAC,WAAW,CAAC;MAC5BW,KAAK;MACLC,WAAW,GAAG,EAAE;MAChBC,UAAU,GAAGb,UAAU,CAAC,mBAAmB,CAAC;MAC5Cc,YAAY,GAAG;IACjB,CAAC,GAAGP,MAAM;;IAEV,IAAI,CAACG,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,KAAK,GAAGA,KAAK,WAALA,KAAK,GAAID,EAAE;IACxB,IAAI,CAACE,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY;EAClC;;EAEAL,MAAMA,CAACD,KAAuC,EAAE;IAC9C,OAAOP,kBAAkB,CAACO,KAAK,EAAE,CAAAO,IAAI,KAAI,IAAI,CAACF,UAAU,CAACE,IAAI,CAAC,CAAC;EACjE;;EAEAC,OAAOA,CAACR,KAAW,GAAGN,YAAY,EAAE;IAClC,OAAO,GAAGM,KAAK,CAACS,WAAW,CAAC,CAAC,OAAO,IAAI,CAACR,MAAM,CAACD,KAAK,CAAC,EAAE;EAC1D;AACF;;AAEA,eAAeH,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* 'License'); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
import { RegistryWithDefaultKey, OverwritePolicy } from '../models/index.js';
|
|
22
|
+
import { DEFAULT_D3_TIME_FORMAT } from './D3FormatConfig.js';
|
|
23
|
+
import TimeFormats, { LOCAL_PREFIX } from './TimeFormats.js';
|
|
24
|
+
import createD3TimeFormatter from './factories/createD3TimeFormatter.js';
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export default class TimeFormatterRegistry extends RegistryWithDefaultKey
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
{
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
constructor() {
|
|
34
|
+
super({
|
|
35
|
+
initialDefaultKey: TimeFormats.DATABASE_DATETIME,
|
|
36
|
+
name: 'TimeFormatter',
|
|
37
|
+
overwritePolicy: OverwritePolicy.Warn
|
|
38
|
+
});this.d3Format = void 0;
|
|
39
|
+
|
|
40
|
+
this.d3Format = DEFAULT_D3_TIME_FORMAT;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
setD3Format(d3Format) {
|
|
44
|
+
this.d3Format = { ...DEFAULT_D3_TIME_FORMAT, ...d3Format };
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
get(format) {
|
|
49
|
+
const targetFormat = `${
|
|
50
|
+
format === null || typeof format === 'undefined' || format === '' ?
|
|
51
|
+
this.defaultKey :
|
|
52
|
+
format}`.
|
|
53
|
+
trim();
|
|
54
|
+
|
|
55
|
+
if (this.has(targetFormat)) {
|
|
56
|
+
return super.get(targetFormat);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Create new formatter if does not exist
|
|
60
|
+
const useLocalTime = targetFormat.startsWith(LOCAL_PREFIX);
|
|
61
|
+
const formatString = targetFormat.replace(LOCAL_PREFIX, '');
|
|
62
|
+
const locale = this.d3Format;
|
|
63
|
+
const formatter = createD3TimeFormatter({
|
|
64
|
+
formatString,
|
|
65
|
+
useLocalTime,
|
|
66
|
+
locale
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
this.registerValue(targetFormat, formatter);
|
|
70
|
+
|
|
71
|
+
return formatter;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
format(format, value) {
|
|
75
|
+
return this.get(format)(value);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=TimeFormatterRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeFormatterRegistry.js","names":["RegistryWithDefaultKey","OverwritePolicy","DEFAULT_D3_TIME_FORMAT","TimeFormats","LOCAL_PREFIX","createD3TimeFormatter","TimeFormatterRegistry","constructor","initialDefaultKey","DATABASE_DATETIME","name","overwritePolicy","Warn","d3Format","setD3Format","get","format","targetFormat","defaultKey","trim","has","useLocalTime","startsWith","formatString","replace","locale","formatter","registerValue","value"],"sources":["../../src/time-format/TimeFormatterRegistry.ts"],"sourcesContent":["/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * 'License'); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport { TimeLocaleDefinition } from 'd3-time-format';\nimport { RegistryWithDefaultKey, OverwritePolicy } from '../models';\nimport { DEFAULT_D3_TIME_FORMAT } from './D3FormatConfig';\nimport TimeFormats, { LOCAL_PREFIX } from './TimeFormats';\nimport createD3TimeFormatter from './factories/createD3TimeFormatter';\nimport TimeFormatter from './TimeFormatter';\n\nexport default class TimeFormatterRegistry extends RegistryWithDefaultKey<\n TimeFormatter,\n TimeFormatter\n> {\n d3Format: TimeLocaleDefinition;\n\n constructor() {\n super({\n initialDefaultKey: TimeFormats.DATABASE_DATETIME,\n name: 'TimeFormatter',\n overwritePolicy: OverwritePolicy.Warn,\n });\n\n this.d3Format = DEFAULT_D3_TIME_FORMAT;\n }\n\n setD3Format(d3Format: Partial<TimeLocaleDefinition>) {\n this.d3Format = { ...DEFAULT_D3_TIME_FORMAT, ...d3Format };\n return this;\n }\n\n get(format?: string) {\n const targetFormat = `${\n format === null || typeof format === 'undefined' || format === ''\n ? this.defaultKey\n : format\n }`.trim();\n\n if (this.has(targetFormat)) {\n return super.get(targetFormat) as TimeFormatter;\n }\n\n // Create new formatter if does not exist\n const useLocalTime = targetFormat.startsWith(LOCAL_PREFIX);\n const formatString = targetFormat.replace(LOCAL_PREFIX, '');\n const locale = this.d3Format;\n const formatter = createD3TimeFormatter({\n formatString,\n useLocalTime,\n locale,\n });\n\n this.registerValue(targetFormat, formatter);\n\n return formatter;\n }\n\n format(format: string | undefined, value: Date | null | undefined): string {\n return this.get(format)(value);\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,SAASA,sBAAsB,EAAEC,eAAe,QAAQ,WAAW;AACnE,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,OAAOC,WAAW,IAAIC,YAAY,QAAQ,eAAe;AACzD,OAAOC,qBAAqB,MAAM,mCAAmC;;;AAGrE,eAAe,MAAMC,qBAAqB,SAASN;;;AAGjD;;;EAGAO,WAAWA,CAAA,EAAG;IACZ,KAAK,CAAC;MACJC,iBAAiB,EAAEL,WAAW,CAACM,iBAAiB;MAChDC,IAAI,EAAE,eAAe;MACrBC,eAAe,EAAEV,eAAe,CAACW;IACnC,CAAC,CAAC,CAAC,KAPLC,QAAQ;;IASN,IAAI,CAACA,QAAQ,GAAGX,sBAAsB;EACxC;;EAEAY,WAAWA,CAACD,QAAuC,EAAE;IACnD,IAAI,CAACA,QAAQ,GAAG,EAAE,GAAGX,sBAAsB,EAAE,GAAGW,QAAQ,CAAC,CAAC;IAC1D,OAAO,IAAI;EACb;;EAEAE,GAAGA,CAACC,MAAe,EAAE;IACnB,MAAMC,YAAY,GAAG;IACnBD,MAAM,KAAK,IAAI,IAAI,OAAOA,MAAM,KAAK,WAAW,IAAIA,MAAM,KAAK,EAAE;IAC7D,IAAI,CAACE,UAAU;IACfF,MAAM,EACV;IAACG,IAAI,CAAC,CAAC;;IAET,IAAI,IAAI,CAACC,GAAG,CAACH,YAAY,CAAC,EAAE;MAC1B,OAAO,KAAK,CAACF,GAAG,CAACE,YAAY,CAAC;IAChC;;IAEA;IACA,MAAMI,YAAY,GAAGJ,YAAY,CAACK,UAAU,CAAClB,YAAY,CAAC;IAC1D,MAAMmB,YAAY,GAAGN,YAAY,CAACO,OAAO,CAACpB,YAAY,EAAE,EAAE,CAAC;IAC3D,MAAMqB,MAAM,GAAG,IAAI,CAACZ,QAAQ;IAC5B,MAAMa,SAAS,GAAGrB,qBAAqB,CAAC;MACtCkB,YAAY;MACZF,YAAY;MACZI;IACF,CAAC,CAAC;;IAEF,IAAI,CAACE,aAAa,CAACV,YAAY,EAAES,SAAS,CAAC;;IAE3C,OAAOA,SAAS;EAClB;;EAEAV,MAAMA,CAACA,MAA0B,EAAEY,KAA8B,EAAU;IACzE,OAAO,IAAI,CAACb,GAAG,CAACC,MAAM,CAAC,CAACY,KAAK,CAAC;EAChC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { makeSingleton } from '../utils/index.js';
|
|
20
|
+
import TimeFormatterRegistry from './TimeFormatterRegistry.js';
|
|
21
|
+
import TimeFormatter from './TimeFormatter.js';
|
|
22
|
+
import TimeFormatsForGranularity from './TimeFormatsForGranularity.js';
|
|
23
|
+
import { LOCAL_PREFIX } from './TimeFormats.js';
|
|
24
|
+
|
|
25
|
+
import createTimeRangeFromGranularity from './utils/createTimeRangeFromGranularity.js';
|
|
26
|
+
import TimeRangeFormatter from './TimeRangeFormatter.js';
|
|
27
|
+
|
|
28
|
+
const getInstance = makeSingleton(TimeFormatterRegistry);
|
|
29
|
+
|
|
30
|
+
export default getInstance;
|
|
31
|
+
|
|
32
|
+
export function getTimeRangeFormatter(formatId) {
|
|
33
|
+
return new TimeRangeFormatter({
|
|
34
|
+
id: formatId || 'undefined',
|
|
35
|
+
formatFunc: (range) => {
|
|
36
|
+
const format = getInstance().get(formatId);
|
|
37
|
+
const [start, end] = range.map((value) => format(value));
|
|
38
|
+
return start === end ? start : [start, end].join(' — ');
|
|
39
|
+
},
|
|
40
|
+
useLocalTime: formatId == null ? void 0 : formatId.startsWith(LOCAL_PREFIX)
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function formatTimeRange(
|
|
45
|
+
formatId,
|
|
46
|
+
range)
|
|
47
|
+
{
|
|
48
|
+
return getTimeRangeFormatter(formatId)(range);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function getTimeFormatter(
|
|
52
|
+
formatId,
|
|
53
|
+
granularity)
|
|
54
|
+
{
|
|
55
|
+
if (granularity) {
|
|
56
|
+
const formatString = formatId || TimeFormatsForGranularity[granularity];
|
|
57
|
+
const timeRangeFormatter = getTimeRangeFormatter(formatString);
|
|
58
|
+
|
|
59
|
+
return new TimeFormatter({
|
|
60
|
+
id: [formatString, granularity].join('/'),
|
|
61
|
+
formatFunc: (value) =>
|
|
62
|
+
timeRangeFormatter.format(
|
|
63
|
+
createTimeRangeFromGranularity(
|
|
64
|
+
value,
|
|
65
|
+
granularity,
|
|
66
|
+
timeRangeFormatter.useLocalTime
|
|
67
|
+
)
|
|
68
|
+
),
|
|
69
|
+
useLocalTime: timeRangeFormatter.useLocalTime
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return getInstance().get(formatId);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Syntactic sugar for backward compatibility
|
|
78
|
+
* TODO: will be deprecated in a future version
|
|
79
|
+
* @param granularity
|
|
80
|
+
*/
|
|
81
|
+
export function getTimeFormatterForGranularity(granularity) {
|
|
82
|
+
return getTimeFormatter(undefined, granularity);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function formatTime(
|
|
86
|
+
formatId,
|
|
87
|
+
value,
|
|
88
|
+
granularity)
|
|
89
|
+
{
|
|
90
|
+
return getTimeFormatter(formatId, granularity)(value);
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=TimeFormatterRegistrySingleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeFormatterRegistrySingleton.js","names":["makeSingleton","TimeFormatterRegistry","TimeFormatter","TimeFormatsForGranularity","LOCAL_PREFIX","createTimeRangeFromGranularity","TimeRangeFormatter","getInstance","getTimeRangeFormatter","formatId","id","formatFunc","range","format","get","start","end","map","value","join","useLocalTime","startsWith","formatTimeRange","getTimeFormatter","granularity","formatString","timeRangeFormatter","getTimeFormatterForGranularity","undefined","formatTime"],"sources":["../../src/time-format/TimeFormatterRegistrySingleton.ts"],"sourcesContent":["/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport { makeSingleton } from '../utils';\nimport TimeFormatterRegistry from './TimeFormatterRegistry';\nimport TimeFormatter from './TimeFormatter';\nimport TimeFormatsForGranularity from './TimeFormatsForGranularity';\nimport { LOCAL_PREFIX } from './TimeFormats';\nimport { TimeGranularity } from './types';\nimport createTimeRangeFromGranularity from './utils/createTimeRangeFromGranularity';\nimport TimeRangeFormatter from './TimeRangeFormatter';\n\nconst getInstance = makeSingleton(TimeFormatterRegistry);\n\nexport default getInstance;\n\nexport function getTimeRangeFormatter(formatId?: string) {\n return new TimeRangeFormatter({\n id: formatId || 'undefined',\n formatFunc: (range: (Date | number | null | undefined)[]) => {\n const format = getInstance().get(formatId);\n const [start, end] = range.map(value => format(value));\n return start === end ? start : [start, end].join(' — ');\n },\n useLocalTime: formatId?.startsWith(LOCAL_PREFIX),\n });\n}\n\nexport function formatTimeRange(\n formatId: string | undefined,\n range: (Date | null | undefined)[],\n) {\n return getTimeRangeFormatter(formatId)(range);\n}\n\nexport function getTimeFormatter(\n formatId?: string,\n granularity?: TimeGranularity,\n) {\n if (granularity) {\n const formatString = formatId || TimeFormatsForGranularity[granularity];\n const timeRangeFormatter = getTimeRangeFormatter(formatString);\n\n return new TimeFormatter({\n id: [formatString, granularity].join('/'),\n formatFunc: (value: Date) =>\n timeRangeFormatter.format(\n createTimeRangeFromGranularity(\n value,\n granularity,\n timeRangeFormatter.useLocalTime,\n ),\n ),\n useLocalTime: timeRangeFormatter.useLocalTime,\n });\n }\n\n return getInstance().get(formatId);\n}\n\n/**\n * Syntactic sugar for backward compatibility\n * TODO: will be deprecated in a future version\n * @param granularity\n */\nexport function getTimeFormatterForGranularity(granularity?: TimeGranularity) {\n return getTimeFormatter(undefined, granularity);\n}\n\nexport function formatTime(\n formatId: string | undefined,\n value: Date | number | null | undefined,\n granularity?: TimeGranularity,\n) {\n return getTimeFormatter(formatId, granularity)(value);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,UAAU;AACxC,OAAOC,qBAAqB,MAAM,yBAAyB;AAC3D,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,yBAAyB,MAAM,6BAA6B;AACnE,SAASC,YAAY,QAAQ,eAAe;;AAE5C,OAAOC,8BAA8B,MAAM,wCAAwC;AACnF,OAAOC,kBAAkB,MAAM,sBAAsB;;AAErD,MAAMC,WAAW,GAAGP,aAAa,CAACC,qBAAqB,CAAC;;AAExD,eAAeM,WAAW;;AAE1B,OAAO,SAASC,qBAAqBA,CAACC,QAAiB,EAAE;EACvD,OAAO,IAAIH,kBAAkB,CAAC;IAC5BI,EAAE,EAAED,QAAQ,IAAI,WAAW;IAC3BE,UAAU,EAAEA,CAACC,KAA2C,KAAK;MAC3D,MAAMC,MAAM,GAAGN,WAAW,CAAC,CAAC,CAACO,GAAG,CAACL,QAAQ,CAAC;MAC1C,MAAM,CAACM,KAAK,EAAEC,GAAG,CAAC,GAAGJ,KAAK,CAACK,GAAG,CAAC,CAAAC,KAAK,KAAIL,MAAM,CAACK,KAAK,CAAC,CAAC;MACtD,OAAOH,KAAK,KAAKC,GAAG,GAAGD,KAAK,GAAG,CAACA,KAAK,EAAEC,GAAG,CAAC,CAACG,IAAI,CAAC,KAAK,CAAC;IACzD,CAAC;IACDC,YAAY,EAAEX,QAAQ,oBAARA,QAAQ,CAAEY,UAAU,CAACjB,YAAY;EACjD,CAAC,CAAC;AACJ;;AAEA,OAAO,SAASkB,eAAeA;AAC7Bb,QAA4B;AAC5BG,KAAkC;AAClC;EACA,OAAOJ,qBAAqB,CAACC,QAAQ,CAAC,CAACG,KAAK,CAAC;AAC/C;;AAEA,OAAO,SAASW,gBAAgBA;AAC9Bd,QAAiB;AACjBe,WAA6B;AAC7B;EACA,IAAIA,WAAW,EAAE;IACf,MAAMC,YAAY,GAAGhB,QAAQ,IAAIN,yBAAyB,CAACqB,WAAW,CAAC;IACvE,MAAME,kBAAkB,GAAGlB,qBAAqB,CAACiB,YAAY,CAAC;;IAE9D,OAAO,IAAIvB,aAAa,CAAC;MACvBQ,EAAE,EAAE,CAACe,YAAY,EAAED,WAAW,CAAC,CAACL,IAAI,CAAC,GAAG,CAAC;MACzCR,UAAU,EAAEA,CAACO,KAAW;MACtBQ,kBAAkB,CAACb,MAAM;QACvBR,8BAA8B;UAC5Ba,KAAK;UACLM,WAAW;UACXE,kBAAkB,CAACN;QACrB;MACF,CAAC;MACHA,YAAY,EAAEM,kBAAkB,CAACN;IACnC,CAAC,CAAC;EACJ;;EAEA,OAAOb,WAAW,CAAC,CAAC,CAACO,GAAG,CAACL,QAAQ,CAAC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASkB,8BAA8BA,CAACH,WAA6B,EAAE;EAC5E,OAAOD,gBAAgB,CAACK,SAAS,EAAEJ,WAAW,CAAC;AACjD;;AAEA,OAAO,SAASK,UAAUA;AACxBpB,QAA4B;AAC5BS,KAAuC;AACvCM,WAA6B;AAC7B;EACA,OAAOD,gBAAgB,CAACd,QAAQ,EAAEe,WAAW,CAAC,CAACN,KAAK,CAAC;AACvD","ignoreList":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { ExtensibleFunction } from '../models/index.js';
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
// Use type augmentation to indicate that
|
|
23
|
+
// an instance of TimeFormatter is also a function
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class TimeRangeFormatter extends ExtensibleFunction {
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
constructor(config)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
{
|
|
46
|
+
super((value) => this.format(value));this.id = void 0;this.label = void 0;this.description = void 0;this.formatFunc = void 0;this.useLocalTime = void 0;
|
|
47
|
+
|
|
48
|
+
const {
|
|
49
|
+
id,
|
|
50
|
+
label,
|
|
51
|
+
description = '',
|
|
52
|
+
formatFunc,
|
|
53
|
+
useLocalTime = false
|
|
54
|
+
} = config;
|
|
55
|
+
|
|
56
|
+
this.id = id;
|
|
57
|
+
this.label = label != null ? label : id;
|
|
58
|
+
this.description = description;
|
|
59
|
+
this.formatFunc = formatFunc;
|
|
60
|
+
this.useLocalTime = useLocalTime;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
format(values) {
|
|
64
|
+
return this.formatFunc(values);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export default TimeRangeFormatter;
|
|
69
|
+
//# sourceMappingURL=TimeRangeFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeRangeFormatter.js","names":["ExtensibleFunction","TimeRangeFormatter","constructor","config","value","format","id","label","description","formatFunc","useLocalTime","values"],"sources":["../../src/time-format/TimeRangeFormatter.ts"],"sourcesContent":["/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport { ExtensibleFunction } from '../models';\nimport { TimeRangeFormatFunction } from './types';\n\n// Use type augmentation to indicate that\n// an instance of TimeFormatter is also a function\ninterface TimeRangeFormatter {\n (value: (Date | number | null | undefined)[]): string;\n}\n\nclass TimeRangeFormatter extends ExtensibleFunction {\n id: string;\n\n label: string;\n\n description: string;\n\n formatFunc: TimeRangeFormatFunction;\n\n useLocalTime: boolean;\n\n constructor(config: {\n id: string;\n label?: string;\n description?: string;\n formatFunc: TimeRangeFormatFunction;\n useLocalTime?: boolean;\n }) {\n super((value: (Date | number | null | undefined)[]) => this.format(value));\n\n const {\n id,\n label,\n description = '',\n formatFunc,\n useLocalTime = false,\n } = config;\n\n this.id = id;\n this.label = label ?? id;\n this.description = description;\n this.formatFunc = formatFunc;\n this.useLocalTime = useLocalTime;\n }\n\n format(values: (Date | number | null | undefined)[]) {\n return this.formatFunc(values);\n }\n}\n\nexport default TimeRangeFormatter;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkB,QAAQ,WAAW;;;AAG9C;AACA;;;;;AAKA,MAAMC,kBAAkB,SAASD,kBAAkB,CAAC;;;;;;;;;;;EAWlDE,WAAWA,CAACC,MAMX;;;;;;EAAE;IACD,KAAK,CAAC,CAACC,KAA2C,KAAK,IAAI,CAACC,MAAM,CAACD,KAAK,CAAC,CAAC,CAAC,KAjB7EE,EAAE,eAEFC,KAAK,eAELC,WAAW,eAEXC,UAAU,eAEVC,YAAY;;IAWV,MAAM;MACJJ,EAAE;MACFC,KAAK;MACLC,WAAW,GAAG,EAAE;MAChBC,UAAU;MACVC,YAAY,GAAG;IACjB,CAAC,GAAGP,MAAM;;IAEV,IAAI,CAACG,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,KAAK,GAAGA,KAAK,WAALA,KAAK,GAAID,EAAE;IACxB,IAAI,CAACE,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,YAAY,GAAGA,YAAY;EAClC;;EAEAL,MAAMA,CAACM,MAA4C,EAAE;IACnD,OAAO,IAAI,CAACF,UAAU,CAACE,MAAM,CAAC;EAChC;AACF;;AAEA,eAAeV,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import {
|
|
20
|
+
utcFormat,
|
|
21
|
+
timeFormat,
|
|
22
|
+
timeFormatLocale } from
|
|
23
|
+
|
|
24
|
+
'd3-time-format';
|
|
25
|
+
import { isRequired } from '../../utils/index.js';
|
|
26
|
+
import TimeFormatter from '../TimeFormatter.js';
|
|
27
|
+
import { LOCAL_PREFIX } from '../TimeFormats.js';
|
|
28
|
+
|
|
29
|
+
export default function createD3TimeFormatter(config)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
{
|
|
36
|
+
const {
|
|
37
|
+
description,
|
|
38
|
+
formatString = isRequired('formatString'),
|
|
39
|
+
label,
|
|
40
|
+
locale,
|
|
41
|
+
useLocalTime = false
|
|
42
|
+
} = config;
|
|
43
|
+
|
|
44
|
+
const id = useLocalTime ? `${LOCAL_PREFIX}${formatString}` : formatString;
|
|
45
|
+
let formatFunc;
|
|
46
|
+
|
|
47
|
+
if (typeof locale === 'undefined') {
|
|
48
|
+
const format = useLocalTime ? timeFormat : utcFormat;
|
|
49
|
+
formatFunc = format(formatString);
|
|
50
|
+
} else {
|
|
51
|
+
const localeObject = timeFormatLocale(locale);
|
|
52
|
+
formatFunc = useLocalTime ?
|
|
53
|
+
localeObject.format(formatString) :
|
|
54
|
+
localeObject.utcFormat(formatString);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return new TimeFormatter({
|
|
58
|
+
description,
|
|
59
|
+
formatFunc,
|
|
60
|
+
id,
|
|
61
|
+
label,
|
|
62
|
+
useLocalTime
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=createD3TimeFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createD3TimeFormatter.js","names":["utcFormat","timeFormat","timeFormatLocale","isRequired","TimeFormatter","LOCAL_PREFIX","createD3TimeFormatter","config","description","formatString","label","locale","useLocalTime","id","formatFunc","format","localeObject"],"sources":["../../../src/time-format/factories/createD3TimeFormatter.ts"],"sourcesContent":["/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport {\n utcFormat,\n timeFormat,\n timeFormatLocale,\n TimeLocaleDefinition,\n} from 'd3-time-format';\nimport { isRequired } from '../../utils';\nimport TimeFormatter from '../TimeFormatter';\nimport { LOCAL_PREFIX } from '../TimeFormats';\n\nexport default function createD3TimeFormatter(config: {\n description?: string;\n formatString: string;\n label?: string;\n locale?: TimeLocaleDefinition;\n useLocalTime?: boolean;\n}) {\n const {\n description,\n formatString = isRequired('formatString'),\n label,\n locale,\n useLocalTime = false,\n } = config;\n\n const id = useLocalTime ? `${LOCAL_PREFIX}${formatString}` : formatString;\n let formatFunc;\n\n if (typeof locale === 'undefined') {\n const format = useLocalTime ? timeFormat : utcFormat;\n formatFunc = format(formatString);\n } else {\n const localeObject = timeFormatLocale(locale);\n formatFunc = useLocalTime\n ? localeObject.format(formatString)\n : localeObject.utcFormat(formatString);\n }\n\n return new TimeFormatter({\n description,\n formatFunc,\n id,\n label,\n useLocalTime,\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEA,SAAS;EACTC,UAAU;EACVC,gBAAgB;;AAEX,gBAAgB;AACvB,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,YAAY,QAAQ,gBAAgB;;AAE7C,eAAe,SAASC,qBAAqBA,CAACC,MAM7C;;;;;;AAAE;EACD,MAAM;IACJC,WAAW;IACXC,YAAY,GAAGN,UAAU,CAAC,cAAc,CAAC;IACzCO,KAAK;IACLC,MAAM;IACNC,YAAY,GAAG;EACjB,CAAC,GAAGL,MAAM;;EAEV,MAAMM,EAAE,GAAGD,YAAY,GAAG,GAAGP,YAAY,GAAGI,YAAY,EAAE,GAAGA,YAAY;EACzE,IAAIK,UAAU;;EAEd,IAAI,OAAOH,MAAM,KAAK,WAAW,EAAE;IACjC,MAAMI,MAAM,GAAGH,YAAY,GAAGX,UAAU,GAAGD,SAAS;IACpDc,UAAU,GAAGC,MAAM,CAACN,YAAY,CAAC;EACnC,CAAC,MAAM;IACL,MAAMO,YAAY,GAAGd,gBAAgB,CAACS,MAAM,CAAC;IAC7CG,UAAU,GAAGF,YAAY;IACrBI,YAAY,CAACD,MAAM,CAACN,YAAY,CAAC;IACjCO,YAAY,CAAChB,SAAS,CAACS,YAAY,CAAC;EAC1C;;EAEA,OAAO,IAAIL,aAAa,CAAC;IACvBI,WAAW;IACXM,UAAU;IACVD,EAAE;IACFH,KAAK;IACLE;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import {
|
|
20
|
+
timeFormatLocale,
|
|
21
|
+
|
|
22
|
+
timeFormat,
|
|
23
|
+
utcFormat } from
|
|
24
|
+
'd3-time-format';
|
|
25
|
+
import { utcUtils, localTimeUtils } from '../utils/d3Time.js';
|
|
26
|
+
import TimeFormatter from '../TimeFormatter.js';
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export default function createMultiFormatter({
|
|
40
|
+
id,
|
|
41
|
+
label,
|
|
42
|
+
description,
|
|
43
|
+
formats = {},
|
|
44
|
+
useLocalTime = false,
|
|
45
|
+
locale
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
}) {
|
|
54
|
+
const {
|
|
55
|
+
millisecond = '.%L',
|
|
56
|
+
second = ':%S',
|
|
57
|
+
minute = '%I:%M',
|
|
58
|
+
hour = '%I %p',
|
|
59
|
+
day = '%a %d',
|
|
60
|
+
week = '%b %d',
|
|
61
|
+
month = '%B',
|
|
62
|
+
year = '%Y'
|
|
63
|
+
} = formats;
|
|
64
|
+
|
|
65
|
+
let formatFunc;
|
|
66
|
+
|
|
67
|
+
if (typeof locale === 'undefined') {
|
|
68
|
+
formatFunc = useLocalTime ? timeFormat : utcFormat;
|
|
69
|
+
} else {
|
|
70
|
+
const formatLocale = timeFormatLocale(locale);
|
|
71
|
+
formatFunc = useLocalTime ? formatLocale.format : formatLocale.utcFormat;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const formatMillisecond = formatFunc(millisecond);
|
|
75
|
+
const formatSecond = formatFunc(second);
|
|
76
|
+
const formatMinute = formatFunc(minute);
|
|
77
|
+
const formatHour = formatFunc(hour);
|
|
78
|
+
const formatDay = formatFunc(day);
|
|
79
|
+
const formatFirstDayOfWeek = formatFunc(week);
|
|
80
|
+
const formatMonth = formatFunc(month);
|
|
81
|
+
const formatYear = formatFunc(year);
|
|
82
|
+
|
|
83
|
+
const {
|
|
84
|
+
hasMillisecond,
|
|
85
|
+
hasSecond,
|
|
86
|
+
hasMinute,
|
|
87
|
+
hasHour,
|
|
88
|
+
isNotFirstDayOfMonth,
|
|
89
|
+
isNotFirstDayOfWeek,
|
|
90
|
+
isNotFirstMonth
|
|
91
|
+
} = useLocalTime ? localTimeUtils : utcUtils;
|
|
92
|
+
|
|
93
|
+
function multiFormatFunc(date) {
|
|
94
|
+
if (hasMillisecond(date)) {
|
|
95
|
+
return formatMillisecond;
|
|
96
|
+
}
|
|
97
|
+
if (hasSecond(date)) {
|
|
98
|
+
return formatSecond;
|
|
99
|
+
}
|
|
100
|
+
if (hasMinute(date)) {
|
|
101
|
+
return formatMinute;
|
|
102
|
+
}
|
|
103
|
+
if (hasHour(date)) {
|
|
104
|
+
return formatHour;
|
|
105
|
+
}
|
|
106
|
+
if (isNotFirstDayOfMonth(date)) {
|
|
107
|
+
return isNotFirstDayOfWeek(date) ? formatDay : formatFirstDayOfWeek;
|
|
108
|
+
}
|
|
109
|
+
if (isNotFirstMonth(date)) {
|
|
110
|
+
return formatMonth;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return formatYear;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return new TimeFormatter({
|
|
117
|
+
description,
|
|
118
|
+
formatFunc: (date) => multiFormatFunc(date)(date),
|
|
119
|
+
id,
|
|
120
|
+
label,
|
|
121
|
+
useLocalTime
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=createMultiFormatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createMultiFormatter.js","names":["timeFormatLocale","timeFormat","utcFormat","utcUtils","localTimeUtils","TimeFormatter","createMultiFormatter","id","label","description","formats","useLocalTime","locale","millisecond","second","minute","hour","day","week","month","year","formatFunc","formatLocale","format","formatMillisecond","formatSecond","formatMinute","formatHour","formatDay","formatFirstDayOfWeek","formatMonth","formatYear","hasMillisecond","hasSecond","hasMinute","hasHour","isNotFirstDayOfMonth","isNotFirstDayOfWeek","isNotFirstMonth","multiFormatFunc","date"],"sources":["../../../src/time-format/factories/createMultiFormatter.ts"],"sourcesContent":["/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nimport {\n timeFormatLocale,\n TimeLocaleDefinition,\n timeFormat,\n utcFormat,\n} from 'd3-time-format';\nimport { utcUtils, localTimeUtils } from '../utils/d3Time';\nimport TimeFormatter from '../TimeFormatter';\n\ntype FormatsByStep = Partial<{\n millisecond: string;\n second: string;\n minute: string;\n hour: string;\n day: string;\n week: string;\n month: string;\n year: string;\n}>;\n\nexport default function createMultiFormatter({\n id,\n label,\n description,\n formats = {},\n useLocalTime = false,\n locale,\n}: {\n id: string;\n label?: string;\n description?: string;\n formats?: FormatsByStep;\n useLocalTime?: boolean;\n locale?: TimeLocaleDefinition;\n}) {\n const {\n millisecond = '.%L',\n second = ':%S',\n minute = '%I:%M',\n hour = '%I %p',\n day = '%a %d',\n week = '%b %d',\n month = '%B',\n year = '%Y',\n } = formats;\n\n let formatFunc;\n\n if (typeof locale === 'undefined') {\n formatFunc = useLocalTime ? timeFormat : utcFormat;\n } else {\n const formatLocale = timeFormatLocale(locale);\n formatFunc = useLocalTime ? formatLocale.format : formatLocale.utcFormat;\n }\n\n const formatMillisecond = formatFunc(millisecond);\n const formatSecond = formatFunc(second);\n const formatMinute = formatFunc(minute);\n const formatHour = formatFunc(hour);\n const formatDay = formatFunc(day);\n const formatFirstDayOfWeek = formatFunc(week);\n const formatMonth = formatFunc(month);\n const formatYear = formatFunc(year);\n\n const {\n hasMillisecond,\n hasSecond,\n hasMinute,\n hasHour,\n isNotFirstDayOfMonth,\n isNotFirstDayOfWeek,\n isNotFirstMonth,\n } = useLocalTime ? localTimeUtils : utcUtils;\n\n function multiFormatFunc(date: Date) {\n if (hasMillisecond(date)) {\n return formatMillisecond;\n }\n if (hasSecond(date)) {\n return formatSecond;\n }\n if (hasMinute(date)) {\n return formatMinute;\n }\n if (hasHour(date)) {\n return formatHour;\n }\n if (isNotFirstDayOfMonth(date)) {\n return isNotFirstDayOfWeek(date) ? formatDay : formatFirstDayOfWeek;\n }\n if (isNotFirstMonth(date)) {\n return formatMonth;\n }\n\n return formatYear;\n }\n\n return new TimeFormatter({\n description,\n formatFunc: (date: Date) => multiFormatFunc(date)(date),\n id,\n label,\n useLocalTime,\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEA,gBAAgB;;EAEhBC,UAAU;EACVC,SAAS;AACJ,gBAAgB;AACvB,SAASC,QAAQ,EAAEC,cAAc,QAAQ,iBAAiB;AAC1D,OAAOC,aAAa,MAAM,kBAAkB;;;;;;;;;;;;;AAa5C,eAAe,SAASC,oBAAoBA,CAAC;EAC3CC,EAAE;EACFC,KAAK;EACLC,WAAW;EACXC,OAAO,GAAG,CAAC,CAAC;EACZC,YAAY,GAAG,KAAK;EACpBC;;;;;;;;AAQF,CAAC,EAAE;EACD,MAAM;IACJC,WAAW,GAAG,KAAK;IACnBC,MAAM,GAAG,KAAK;IACdC,MAAM,GAAG,OAAO;IAChBC,IAAI,GAAG,OAAO;IACdC,GAAG,GAAG,OAAO;IACbC,IAAI,GAAG,OAAO;IACdC,KAAK,GAAG,IAAI;IACZC,IAAI,GAAG;EACT,CAAC,GAAGV,OAAO;;EAEX,IAAIW,UAAU;;EAEd,IAAI,OAAOT,MAAM,KAAK,WAAW,EAAE;IACjCS,UAAU,GAAGV,YAAY,GAAGV,UAAU,GAAGC,SAAS;EACpD,CAAC,MAAM;IACL,MAAMoB,YAAY,GAAGtB,gBAAgB,CAACY,MAAM,CAAC;IAC7CS,UAAU,GAAGV,YAAY,GAAGW,YAAY,CAACC,MAAM,GAAGD,YAAY,CAACpB,SAAS;EAC1E;;EAEA,MAAMsB,iBAAiB,GAAGH,UAAU,CAACR,WAAW,CAAC;EACjD,MAAMY,YAAY,GAAGJ,UAAU,CAACP,MAAM,CAAC;EACvC,MAAMY,YAAY,GAAGL,UAAU,CAACN,MAAM,CAAC;EACvC,MAAMY,UAAU,GAAGN,UAAU,CAACL,IAAI,CAAC;EACnC,MAAMY,SAAS,GAAGP,UAAU,CAACJ,GAAG,CAAC;EACjC,MAAMY,oBAAoB,GAAGR,UAAU,CAACH,IAAI,CAAC;EAC7C,MAAMY,WAAW,GAAGT,UAAU,CAACF,KAAK,CAAC;EACrC,MAAMY,UAAU,GAAGV,UAAU,CAACD,IAAI,CAAC;;EAEnC,MAAM;IACJY,cAAc;IACdC,SAAS;IACTC,SAAS;IACTC,OAAO;IACPC,oBAAoB;IACpBC,mBAAmB;IACnBC;EACF,CAAC,GAAG3B,YAAY,GAAGP,cAAc,GAAGD,QAAQ;;EAE5C,SAASoC,eAAeA,CAACC,IAAU,EAAE;IACnC,IAAIR,cAAc,CAACQ,IAAI,CAAC,EAAE;MACxB,OAAOhB,iBAAiB;IAC1B;IACA,IAAIS,SAAS,CAACO,IAAI,CAAC,EAAE;MACnB,OAAOf,YAAY;IACrB;IACA,IAAIS,SAAS,CAACM,IAAI,CAAC,EAAE;MACnB,OAAOd,YAAY;IACrB;IACA,IAAIS,OAAO,CAACK,IAAI,CAAC,EAAE;MACjB,OAAOb,UAAU;IACnB;IACA,IAAIS,oBAAoB,CAACI,IAAI,CAAC,EAAE;MAC9B,OAAOH,mBAAmB,CAACG,IAAI,CAAC,GAAGZ,SAAS,GAAGC,oBAAoB;IACrE;IACA,IAAIS,eAAe,CAACE,IAAI,CAAC,EAAE;MACzB,OAAOV,WAAW;IACpB;;IAEA,OAAOC,UAAU;EACnB;;EAEA,OAAO,IAAI1B,aAAa,CAAC;IACvBI,WAAW;IACXY,UAAU,EAAEA,CAACmB,IAAU,KAAKD,eAAe,CAACC,IAAI,CAAC,CAACA,IAAI,CAAC;IACvDjC,EAAE;IACFC,KAAK;IACLG;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|