@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,279 @@
|
|
|
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 callApiAndParseWithTimeout from './callApi/callApiAndParseWithTimeout.js';
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
import { DEFAULT_FETCH_RETRY_OPTIONS, DEFAULT_BASE_URL } from './constants.js';
|
|
35
|
+
|
|
36
|
+
const defaultUnauthorizedHandler = () => {
|
|
37
|
+
if (!window.location.pathname.startsWith('/login')) {
|
|
38
|
+
window.location.href = `/login?next=${window.location.href}`;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default class SupersetClientClass {
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
constructor({
|
|
70
|
+
baseUrl = DEFAULT_BASE_URL,
|
|
71
|
+
host,
|
|
72
|
+
protocol,
|
|
73
|
+
headers = {},
|
|
74
|
+
fetchRetryOptions = {},
|
|
75
|
+
mode = 'same-origin',
|
|
76
|
+
timeout,
|
|
77
|
+
credentials = undefined,
|
|
78
|
+
csrfToken = undefined,
|
|
79
|
+
guestToken = undefined,
|
|
80
|
+
guestTokenHeaderName = 'X-GuestToken',
|
|
81
|
+
unauthorizedHandler = defaultUnauthorizedHandler
|
|
82
|
+
} = {}) {this.credentials = void 0;this.csrfToken = void 0;this.csrfPromise = void 0;this.guestToken = void 0;this.guestTokenHeaderName = void 0;this.fetchRetryOptions = void 0;this.baseUrl = void 0;this.protocol = void 0;this.host = void 0;this.headers = void 0;this.mode = void 0;this.timeout = void 0;this.handleUnauthorized = void 0;
|
|
83
|
+
const url = new URL(
|
|
84
|
+
host || protocol ?
|
|
85
|
+
`${protocol || 'https:'}//${host || 'localhost'}` :
|
|
86
|
+
baseUrl,
|
|
87
|
+
// baseUrl for API could also be relative, so we provide current location.href
|
|
88
|
+
// as the base of baseUrl
|
|
89
|
+
window.location.href
|
|
90
|
+
);
|
|
91
|
+
this.baseUrl = url.href.replace(/\/+$/, ''); // always strip trailing slash
|
|
92
|
+
this.host = url.host;
|
|
93
|
+
this.protocol = url.protocol;
|
|
94
|
+
this.headers = { Accept: 'application/json', ...headers }; // defaulting accept to json
|
|
95
|
+
this.mode = mode;
|
|
96
|
+
this.timeout = timeout;
|
|
97
|
+
this.credentials = credentials;
|
|
98
|
+
this.csrfToken = csrfToken;
|
|
99
|
+
this.guestToken = guestToken;
|
|
100
|
+
this.guestTokenHeaderName = guestTokenHeaderName;
|
|
101
|
+
this.fetchRetryOptions = {
|
|
102
|
+
...DEFAULT_FETCH_RETRY_OPTIONS,
|
|
103
|
+
...fetchRetryOptions
|
|
104
|
+
};
|
|
105
|
+
if (typeof this.csrfToken === 'string') {
|
|
106
|
+
this.headers = { ...this.headers, 'X-CSRFToken': this.csrfToken };
|
|
107
|
+
this.csrfPromise = Promise.resolve(this.csrfToken);
|
|
108
|
+
}
|
|
109
|
+
if (guestToken) {
|
|
110
|
+
this.headers[guestTokenHeaderName] = guestToken;
|
|
111
|
+
}
|
|
112
|
+
this.handleUnauthorized = unauthorizedHandler;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
async init(force = false) {
|
|
116
|
+
if (this.isAuthenticated() && !force) {
|
|
117
|
+
return this.csrfPromise;
|
|
118
|
+
}
|
|
119
|
+
return this.getCSRFToken();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
async postForm(url, payload, target = '_blank') {
|
|
123
|
+
if (url) {
|
|
124
|
+
await this.ensureAuth();
|
|
125
|
+
const hiddenForm = document.createElement('form');
|
|
126
|
+
hiddenForm.action = url;
|
|
127
|
+
hiddenForm.method = 'POST';
|
|
128
|
+
hiddenForm.target = target;
|
|
129
|
+
const payloadWithToken = {
|
|
130
|
+
...payload,
|
|
131
|
+
csrf_token: this.csrfToken
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
if (this.guestToken) {
|
|
135
|
+
payloadWithToken.guest_token = this.guestToken;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
Object.entries(payloadWithToken).forEach(([key, value]) => {
|
|
139
|
+
const data = document.createElement('input');
|
|
140
|
+
data.type = 'hidden';
|
|
141
|
+
data.name = key;
|
|
142
|
+
data.value = value;
|
|
143
|
+
hiddenForm.appendChild(data);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
document.body.appendChild(hiddenForm);
|
|
147
|
+
hiddenForm.submit();
|
|
148
|
+
document.body.removeChild(hiddenForm);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async reAuthenticate() {
|
|
153
|
+
return this.init(true);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
isAuthenticated() {
|
|
157
|
+
// if CSRF protection is disabled in the Superset app, the token may be an empty string
|
|
158
|
+
return this.csrfToken !== null && this.csrfToken !== undefined;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
getGuestToken() {
|
|
162
|
+
return this.guestToken;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async get(
|
|
166
|
+
requestConfig)
|
|
167
|
+
{
|
|
168
|
+
return this.request({ ...requestConfig, method: 'GET' });
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
async delete(
|
|
172
|
+
requestConfig)
|
|
173
|
+
{
|
|
174
|
+
return this.request({ ...requestConfig, method: 'DELETE' });
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
async put(
|
|
178
|
+
requestConfig)
|
|
179
|
+
{
|
|
180
|
+
return this.request({ ...requestConfig, method: 'PUT' });
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
async post(
|
|
184
|
+
requestConfig)
|
|
185
|
+
{
|
|
186
|
+
return this.request({ ...requestConfig, method: 'POST' });
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
async request({
|
|
190
|
+
credentials,
|
|
191
|
+
mode,
|
|
192
|
+
endpoint,
|
|
193
|
+
host,
|
|
194
|
+
url,
|
|
195
|
+
headers,
|
|
196
|
+
timeout,
|
|
197
|
+
fetchRetryOptions,
|
|
198
|
+
ignoreUnauthorized = false,
|
|
199
|
+
...rest
|
|
200
|
+
}) {
|
|
201
|
+
await this.ensureAuth();
|
|
202
|
+
return callApiAndParseWithTimeout({
|
|
203
|
+
...rest,
|
|
204
|
+
credentials: credentials != null ? credentials : this.credentials,
|
|
205
|
+
mode: mode != null ? mode : this.mode,
|
|
206
|
+
url: this.getUrl({ endpoint, host, url }),
|
|
207
|
+
headers: { ...this.headers, ...headers },
|
|
208
|
+
timeout: timeout != null ? timeout : this.timeout,
|
|
209
|
+
fetchRetryOptions: fetchRetryOptions != null ? fetchRetryOptions : this.fetchRetryOptions
|
|
210
|
+
}).catch((res) => {
|
|
211
|
+
if ((res == null ? void 0 : res.status) === 401 && !ignoreUnauthorized) {
|
|
212
|
+
this.handleUnauthorized();
|
|
213
|
+
}
|
|
214
|
+
return Promise.reject(res);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
async ensureAuth() {var _this$csrfPromise;
|
|
219
|
+
return (_this$csrfPromise =
|
|
220
|
+
this.csrfPromise) != null ? _this$csrfPromise :
|
|
221
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
222
|
+
Promise.reject({
|
|
223
|
+
error: `SupersetClient has not been provided a CSRF token, ensure it is
|
|
224
|
+
initialized with \`client.getCSRFToken()\` or try logging in at
|
|
225
|
+
${this.getUrl({ endpoint: '/login' })}`
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
async getCSRFToken() {
|
|
231
|
+
this.csrfToken = undefined;
|
|
232
|
+
// If we can request this resource successfully, it means that the user has
|
|
233
|
+
// authenticated. If not we throw an error prompting to authenticate.
|
|
234
|
+
this.csrfPromise = callApiAndParseWithTimeout({
|
|
235
|
+
credentials: this.credentials,
|
|
236
|
+
headers: {
|
|
237
|
+
...this.headers
|
|
238
|
+
},
|
|
239
|
+
method: 'GET',
|
|
240
|
+
mode: this.mode,
|
|
241
|
+
timeout: this.timeout,
|
|
242
|
+
url: this.getUrl({ endpoint: 'api/v1/security/csrf_token/' }),
|
|
243
|
+
parseMethod: 'json'
|
|
244
|
+
}).then(({ json }) => {
|
|
245
|
+
if (typeof json === 'object') {
|
|
246
|
+
this.csrfToken = json.result;
|
|
247
|
+
if (typeof this.csrfToken === 'string') {
|
|
248
|
+
this.headers = { ...this.headers, 'X-CSRFToken': this.csrfToken };
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
if (this.isAuthenticated()) {
|
|
252
|
+
return this.csrfToken;
|
|
253
|
+
}
|
|
254
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
255
|
+
return Promise.reject({ error: 'Failed to fetch CSRF token' });
|
|
256
|
+
});
|
|
257
|
+
return this.csrfPromise;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
getUrl({
|
|
261
|
+
host: inputHost,
|
|
262
|
+
endpoint = '',
|
|
263
|
+
url
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
} = {}) {
|
|
269
|
+
if (typeof url === 'string') return url;
|
|
270
|
+
|
|
271
|
+
const host = inputHost != null ? inputHost : this.host;
|
|
272
|
+
const cleanHost = host.slice(-1) === '/' ? host.slice(0, -1) : host; // no backslash
|
|
273
|
+
|
|
274
|
+
return `${this.protocol}//${cleanHost}/${
|
|
275
|
+
endpoint[0] === '/' ? endpoint.slice(1) : endpoint}`;
|
|
276
|
+
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=SupersetClientClass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SupersetClientClass.js","names":["callApiAndParseWithTimeout","DEFAULT_FETCH_RETRY_OPTIONS","DEFAULT_BASE_URL","defaultUnauthorizedHandler","window","location","pathname","startsWith","href","SupersetClientClass","constructor","baseUrl","host","protocol","headers","fetchRetryOptions","mode","timeout","credentials","undefined","csrfToken","guestToken","guestTokenHeaderName","unauthorizedHandler","csrfPromise","handleUnauthorized","url","URL","replace","Accept","Promise","resolve","init","force","isAuthenticated","getCSRFToken","postForm","payload","target","ensureAuth","hiddenForm","document","createElement","action","method","payloadWithToken","csrf_token","guest_token","Object","entries","forEach","key","value","data","type","name","appendChild","body","submit","removeChild","reAuthenticate","getGuestToken","get","requestConfig","request","delete","put","post","endpoint","ignoreUnauthorized","rest","getUrl","catch","res","status","reject","_this$csrfPromise","error","parseMethod","then","json","result","inputHost","cleanHost","slice"],"sources":["../../src/connection/SupersetClientClass.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 callApiAndParseWithTimeout from './callApi/callApiAndParseWithTimeout';\nimport {\n ClientConfig,\n ClientTimeout,\n Credentials,\n CsrfPromise,\n CsrfToken,\n FetchRetryOptions,\n Headers,\n Host,\n Mode,\n Protocol,\n RequestConfig,\n ParseMethod,\n} from './types';\nimport { DEFAULT_FETCH_RETRY_OPTIONS, DEFAULT_BASE_URL } from './constants';\n\nconst defaultUnauthorizedHandler = () => {\n if (!window.location.pathname.startsWith('/login')) {\n window.location.href = `/login?next=${window.location.href}`;\n }\n};\n\nexport default class SupersetClientClass {\n credentials: Credentials;\n\n csrfToken?: CsrfToken;\n\n csrfPromise?: CsrfPromise;\n\n guestToken?: string;\n\n guestTokenHeaderName: string;\n\n fetchRetryOptions?: FetchRetryOptions;\n\n baseUrl: string;\n\n protocol: Protocol;\n\n host: Host;\n\n headers: Headers;\n\n mode: Mode;\n\n timeout: ClientTimeout;\n\n handleUnauthorized: () => void;\n\n constructor({\n baseUrl = DEFAULT_BASE_URL,\n host,\n protocol,\n headers = {},\n fetchRetryOptions = {},\n mode = 'same-origin',\n timeout,\n credentials = undefined,\n csrfToken = undefined,\n guestToken = undefined,\n guestTokenHeaderName = 'X-GuestToken',\n unauthorizedHandler = defaultUnauthorizedHandler,\n }: ClientConfig = {}) {\n const url = new URL(\n host || protocol\n ? `${protocol || 'https:'}//${host || 'localhost'}`\n : baseUrl,\n // baseUrl for API could also be relative, so we provide current location.href\n // as the base of baseUrl\n window.location.href,\n );\n this.baseUrl = url.href.replace(/\\/+$/, ''); // always strip trailing slash\n this.host = url.host;\n this.protocol = url.protocol as Protocol;\n this.headers = { Accept: 'application/json', ...headers }; // defaulting accept to json\n this.mode = mode;\n this.timeout = timeout;\n this.credentials = credentials;\n this.csrfToken = csrfToken;\n this.guestToken = guestToken;\n this.guestTokenHeaderName = guestTokenHeaderName;\n this.fetchRetryOptions = {\n ...DEFAULT_FETCH_RETRY_OPTIONS,\n ...fetchRetryOptions,\n };\n if (typeof this.csrfToken === 'string') {\n this.headers = { ...this.headers, 'X-CSRFToken': this.csrfToken };\n this.csrfPromise = Promise.resolve(this.csrfToken);\n }\n if (guestToken) {\n this.headers[guestTokenHeaderName] = guestToken;\n }\n this.handleUnauthorized = unauthorizedHandler;\n }\n\n async init(force = false): CsrfPromise {\n if (this.isAuthenticated() && !force) {\n return this.csrfPromise as CsrfPromise;\n }\n return this.getCSRFToken();\n }\n\n async postForm(url: string, payload: Record<string, any>, target = '_blank') {\n if (url) {\n await this.ensureAuth();\n const hiddenForm = document.createElement('form');\n hiddenForm.action = url;\n hiddenForm.method = 'POST';\n hiddenForm.target = target;\n const payloadWithToken: Record<string, any> = {\n ...payload,\n csrf_token: this.csrfToken!,\n };\n\n if (this.guestToken) {\n payloadWithToken.guest_token = this.guestToken;\n }\n\n Object.entries(payloadWithToken).forEach(([key, value]) => {\n const data = document.createElement('input');\n data.type = 'hidden';\n data.name = key;\n data.value = value;\n hiddenForm.appendChild(data);\n });\n\n document.body.appendChild(hiddenForm);\n hiddenForm.submit();\n document.body.removeChild(hiddenForm);\n }\n }\n\n async reAuthenticate() {\n return this.init(true);\n }\n\n isAuthenticated(): boolean {\n // if CSRF protection is disabled in the Superset app, the token may be an empty string\n return this.csrfToken !== null && this.csrfToken !== undefined;\n }\n\n getGuestToken() {\n return this.guestToken;\n }\n\n async get<T extends ParseMethod = 'json'>(\n requestConfig: RequestConfig & { parseMethod?: T },\n ) {\n return this.request({ ...requestConfig, method: 'GET' });\n }\n\n async delete<T extends ParseMethod = 'json'>(\n requestConfig: RequestConfig & { parseMethod?: T },\n ) {\n return this.request({ ...requestConfig, method: 'DELETE' });\n }\n\n async put<T extends ParseMethod = 'json'>(\n requestConfig: RequestConfig & { parseMethod?: T },\n ) {\n return this.request({ ...requestConfig, method: 'PUT' });\n }\n\n async post<T extends ParseMethod = 'json'>(\n requestConfig: RequestConfig & { parseMethod?: T },\n ) {\n return this.request({ ...requestConfig, method: 'POST' });\n }\n\n async request<T extends ParseMethod = 'json'>({\n credentials,\n mode,\n endpoint,\n host,\n url,\n headers,\n timeout,\n fetchRetryOptions,\n ignoreUnauthorized = false,\n ...rest\n }: RequestConfig & { parseMethod?: T }) {\n await this.ensureAuth();\n return callApiAndParseWithTimeout({\n ...rest,\n credentials: credentials ?? this.credentials,\n mode: mode ?? this.mode,\n url: this.getUrl({ endpoint, host, url }),\n headers: { ...this.headers, ...headers },\n timeout: timeout ?? this.timeout,\n fetchRetryOptions: fetchRetryOptions ?? this.fetchRetryOptions,\n }).catch(res => {\n if (res?.status === 401 && !ignoreUnauthorized) {\n this.handleUnauthorized();\n }\n return Promise.reject(res);\n });\n }\n\n async ensureAuth(): CsrfPromise {\n return (\n this.csrfPromise ??\n // eslint-disable-next-line prefer-promise-reject-errors\n Promise.reject({\n error: `SupersetClient has not been provided a CSRF token, ensure it is\n initialized with \\`client.getCSRFToken()\\` or try logging in at\n ${this.getUrl({ endpoint: '/login' })}`,\n })\n );\n }\n\n async getCSRFToken() {\n this.csrfToken = undefined;\n // If we can request this resource successfully, it means that the user has\n // authenticated. If not we throw an error prompting to authenticate.\n this.csrfPromise = callApiAndParseWithTimeout({\n credentials: this.credentials,\n headers: {\n ...this.headers,\n },\n method: 'GET',\n mode: this.mode,\n timeout: this.timeout,\n url: this.getUrl({ endpoint: 'api/v1/security/csrf_token/' }),\n parseMethod: 'json',\n }).then(({ json }) => {\n if (typeof json === 'object') {\n this.csrfToken = json.result as string;\n if (typeof this.csrfToken === 'string') {\n this.headers = { ...this.headers, 'X-CSRFToken': this.csrfToken };\n }\n }\n if (this.isAuthenticated()) {\n return this.csrfToken;\n }\n // eslint-disable-next-line prefer-promise-reject-errors\n return Promise.reject({ error: 'Failed to fetch CSRF token' });\n });\n return this.csrfPromise;\n }\n\n getUrl({\n host: inputHost,\n endpoint = '',\n url,\n }: {\n endpoint?: string;\n host?: Host;\n url?: string;\n } = {}) {\n if (typeof url === 'string') return url;\n\n const host = inputHost ?? this.host;\n const cleanHost = host.slice(-1) === '/' ? host.slice(0, -1) : host; // no backslash\n\n return `${this.protocol}//${cleanHost}/${\n endpoint[0] === '/' ? endpoint.slice(1) : endpoint\n }`;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,0BAA0B,MAAM,sCAAsC;;;;;;;;;;;;;;;AAe7E,SAASC,2BAA2B,EAAEC,gBAAgB,QAAQ,aAAa;;AAE3E,MAAMC,0BAA0B,GAAGA,CAAA,KAAM;EACvC,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACC,QAAQ,CAACC,UAAU,CAAC,QAAQ,CAAC,EAAE;IAClDH,M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AAI,CAACd,SAAS;MACvB;MACA;MACA,OAAOU,OAAO,CAAC6C,MAAM,CAAC,EAAEE,KAAK,EAAE,4BAA4B,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC;IACF,OAAO,IAAI,CAACrD,WAAW;EACzB;;EAEA+C,MAAMA,CAAC;IACL3D,IAAI,EAAEsE,SAAS;IACfd,QAAQ,GAAG,EAAE;IACb1C;;;;;EAKF,CAAC,GAAG,CAAC,CAAC,EAAE;IACN,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE,OAAOA,GAAG;;IAEvC,MAAMd,IAAI,GAAGsE,SAAS,WAATA,SAAS,GAAI,IAAI,CAACtE,IAAI;IACnC,MAAMuE,SAAS,GAAGvE,IAAI,CAACwE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAGxE,IAAI,CAACwE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAGxE,IAAI,CAAC,CAAC;;IAErE,OAAO,GAAG,IAAI,CAACC,QAAQ,KAAKsE,SAAS;IACnCf,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG,GAAGA,QAAQ,CAACgB,KAAK,CAAC,CAAC,CAAC,GAAGhB,QAAQ,EAClD;;EACJ;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,182 @@
|
|
|
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 'whatwg-fetch';
|
|
21
|
+
import fetchRetry from 'fetch-retry';
|
|
22
|
+
|
|
23
|
+
import {
|
|
24
|
+
CACHE_AVAILABLE,
|
|
25
|
+
CACHE_KEY,
|
|
26
|
+
HTTP_STATUS_NOT_MODIFIED,
|
|
27
|
+
HTTP_STATUS_OK } from
|
|
28
|
+
'../constants.js';
|
|
29
|
+
|
|
30
|
+
function tryParsePayload(payload) {
|
|
31
|
+
try {
|
|
32
|
+
return typeof payload === 'string' ?
|
|
33
|
+
JSON.parse(payload) :
|
|
34
|
+
payload;
|
|
35
|
+
} catch (error) {
|
|
36
|
+
throw new Error(`Invalid payload:\n\n${payload}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Try appending search params to an URL if needed.
|
|
42
|
+
*/
|
|
43
|
+
function getFullUrl(partialUrl, params) {
|
|
44
|
+
if (params) {
|
|
45
|
+
const url = new URL(partialUrl, window.location.href);
|
|
46
|
+
const search =
|
|
47
|
+
params instanceof URLSearchParams ? params : new URLSearchParams(params);
|
|
48
|
+
// will completely override any existing search params
|
|
49
|
+
url.search = search.toString();
|
|
50
|
+
return url.href;
|
|
51
|
+
}
|
|
52
|
+
return partialUrl;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Fetch an API response and returns the corresponding json.
|
|
57
|
+
*
|
|
58
|
+
* @param {Payload} postPayload payload to send as FormData in a post form
|
|
59
|
+
* @param {Payload} jsonPayload json payload to post, will automatically add Content-Type header
|
|
60
|
+
* @param {string} stringify whether to stringify field values when post as formData
|
|
61
|
+
*/
|
|
62
|
+
export default async function callApi({
|
|
63
|
+
body,
|
|
64
|
+
cache = 'default',
|
|
65
|
+
credentials = 'same-origin',
|
|
66
|
+
fetchRetryOptions,
|
|
67
|
+
headers,
|
|
68
|
+
method = 'GET',
|
|
69
|
+
mode = 'same-origin',
|
|
70
|
+
postPayload,
|
|
71
|
+
jsonPayload,
|
|
72
|
+
redirect = 'follow',
|
|
73
|
+
signal,
|
|
74
|
+
stringify = true,
|
|
75
|
+
url: url_,
|
|
76
|
+
searchParams
|
|
77
|
+
}) {var _window$location;
|
|
78
|
+
const fetchWithRetry = fetchRetry(fetch, fetchRetryOptions);
|
|
79
|
+
const url = `${getFullUrl(url_, searchParams)}`;
|
|
80
|
+
|
|
81
|
+
const request = {
|
|
82
|
+
body,
|
|
83
|
+
cache,
|
|
84
|
+
credentials,
|
|
85
|
+
headers,
|
|
86
|
+
method,
|
|
87
|
+
mode,
|
|
88
|
+
redirect,
|
|
89
|
+
signal
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
if (
|
|
93
|
+
method === 'GET' &&
|
|
94
|
+
cache !== 'no-store' &&
|
|
95
|
+
cache !== 'reload' &&
|
|
96
|
+
CACHE_AVAILABLE &&
|
|
97
|
+
((_window$location = window.location) == null ? void 0 : _window$location.protocol) === 'https:')
|
|
98
|
+
{
|
|
99
|
+
let supersetCache = null;
|
|
100
|
+
try {
|
|
101
|
+
supersetCache = await caches.open(CACHE_KEY);
|
|
102
|
+
const cachedResponse = await supersetCache.match(url);
|
|
103
|
+
if (cachedResponse) {
|
|
104
|
+
// if we have a cached response, send its ETag in the
|
|
105
|
+
// `If-None-Match` header in a conditional request
|
|
106
|
+
const etag = cachedResponse.headers.get('Etag');
|
|
107
|
+
request.headers = { ...request.headers, 'If-None-Match': etag };
|
|
108
|
+
}
|
|
109
|
+
} catch {
|
|
110
|
+
|
|
111
|
+
// If superset is in an iframe and third-party cookies are disabled, caches.open throws
|
|
112
|
+
}
|
|
113
|
+
const response = await fetchWithRetry(url, request);
|
|
114
|
+
|
|
115
|
+
if (supersetCache && response.status === HTTP_STATUS_NOT_MODIFIED) {
|
|
116
|
+
const cachedFullResponse = await supersetCache.match(url);
|
|
117
|
+
if (cachedFullResponse) {
|
|
118
|
+
return cachedFullResponse.clone();
|
|
119
|
+
}
|
|
120
|
+
throw new Error('Received 304 but no content is cached!');
|
|
121
|
+
}
|
|
122
|
+
if (
|
|
123
|
+
supersetCache &&
|
|
124
|
+
response.status === HTTP_STATUS_OK &&
|
|
125
|
+
response.headers.get('Etag'))
|
|
126
|
+
{
|
|
127
|
+
supersetCache.delete(url);
|
|
128
|
+
supersetCache.put(url, response.clone());
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return response;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (method === 'POST' || method === 'PATCH' || method === 'PUT') {
|
|
135
|
+
if (postPayload && jsonPayload) {
|
|
136
|
+
throw new Error('Please provide only one of jsonPayload or postPayload');
|
|
137
|
+
}
|
|
138
|
+
if (postPayload instanceof FormData) {
|
|
139
|
+
request.body = postPayload;
|
|
140
|
+
} else if (postPayload) {
|
|
141
|
+
const payload = tryParsePayload(postPayload);
|
|
142
|
+
if (payload && typeof payload === 'object') {
|
|
143
|
+
// using FormData has the effect that Content-Type header is set to `multipart/form-data`,
|
|
144
|
+
// not e.g., 'application/x-www-form-urlencoded'
|
|
145
|
+
const formData = new FormData();
|
|
146
|
+
Object.keys(payload).forEach((key) => {
|
|
147
|
+
const value = payload[key];
|
|
148
|
+
if (typeof value !== 'undefined') {
|
|
149
|
+
let valueString;
|
|
150
|
+
try {
|
|
151
|
+
// We have seen instances where casting to String() throws error
|
|
152
|
+
// This check allows all valid attributes to be appended to the formData
|
|
153
|
+
// while logging error to console for any attribute that fails the cast to String
|
|
154
|
+
valueString = stringify ? JSON.stringify(value) : String(value);
|
|
155
|
+
} catch (e) {
|
|
156
|
+
// eslint-disable-next-line no-console
|
|
157
|
+
console.error(
|
|
158
|
+
`Unable to convert attribute '${key}' to a String(). '${key}' was not added to the formData in request.body for call to ${url}`,
|
|
159
|
+
value,
|
|
160
|
+
e
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
if (valueString !== undefined) {
|
|
164
|
+
formData.append(key, valueString);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
request.body = formData;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (jsonPayload !== undefined) {
|
|
172
|
+
request.body = JSON.stringify(jsonPayload);
|
|
173
|
+
request.headers = {
|
|
174
|
+
...request.headers,
|
|
175
|
+
'Content-Type': 'application/json'
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return fetchWithRetry(url, request);
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=callApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callApi.js","names":["fetchRetry","CACHE_AVAILABLE","CACHE_KEY","HTTP_STATUS_NOT_MODIFIED","HTTP_STATUS_OK","tryParsePayload","payload","JSON","parse","error","Error","getFullUrl","partialUrl","params","url","URL","window","location","href","search","URLSearchParams","toString","callApi","body","cache","credentials","fetchRetryOptions","headers","method","mode","postPayload","jsonPayload","redirect","signal","stringify","url_","searchParams","_window$location","fetchWithRetry","fetch","request","protocol","supersetCache","caches","open","cachedResponse","match","etag","get","response","status","cachedFullResponse","clone","delete","put","FormData","formData","Object","keys","forEach","key","value","valueString","String","e","console","undefined","append"],"sources":["../../../src/connection/callApi/callApi.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 'whatwg-fetch';\nimport fetchRetry from 'fetch-retry';\nimport { CallApi, Payload, JsonValue, JsonObject } from '../types';\nimport {\n CACHE_AVAILABLE,\n CACHE_KEY,\n HTTP_STATUS_NOT_MODIFIED,\n HTTP_STATUS_OK,\n} from '../constants';\n\nfunction tryParsePayload(payload: Payload) {\n try {\n return typeof payload === 'string'\n ? (JSON.parse(payload) as JsonValue)\n : payload;\n } catch (error) {\n throw new Error(`Invalid payload:\\n\\n${payload}`);\n }\n}\n\n/**\n * Try appending search params to an URL if needed.\n */\nfunction getFullUrl(partialUrl: string, params: CallApi['searchParams']) {\n if (params) {\n const url = new URL(partialUrl, window.location.href);\n const search =\n params instanceof URLSearchParams ? params : new URLSearchParams(params);\n // will completely override any existing search params\n url.search = search.toString();\n return url.href;\n }\n return partialUrl;\n}\n\n/**\n * Fetch an API response and returns the corresponding json.\n *\n * @param {Payload} postPayload payload to send as FormData in a post form\n * @param {Payload} jsonPayload json payload to post, will automatically add Content-Type header\n * @param {string} stringify whether to stringify field values when post as formData\n */\nexport default async function callApi({\n body,\n cache = 'default',\n credentials = 'same-origin',\n fetchRetryOptions,\n headers,\n method = 'GET',\n mode = 'same-origin',\n postPayload,\n jsonPayload,\n redirect = 'follow',\n signal,\n stringify = true,\n url: url_,\n searchParams,\n}: CallApi): Promise<Response> {\n const fetchWithRetry = fetchRetry(fetch, fetchRetryOptions);\n const url = `${getFullUrl(url_, searchParams)}`;\n\n const request = {\n body,\n cache,\n credentials,\n headers,\n method,\n mode,\n redirect,\n signal,\n };\n\n if (\n method === 'GET' &&\n cache !== 'no-store' &&\n cache !== 'reload' &&\n CACHE_AVAILABLE &&\n window.location?.protocol === 'https:'\n ) {\n let supersetCache: Cache | null = null;\n try {\n supersetCache = await caches.open(CACHE_KEY);\n const cachedResponse = await supersetCache.match(url);\n if (cachedResponse) {\n // if we have a cached response, send its ETag in the\n // `If-None-Match` header in a conditional request\n const etag = cachedResponse.headers.get('Etag') as string;\n request.headers = { ...request.headers, 'If-None-Match': etag };\n }\n } catch {\n // If superset is in an iframe and third-party cookies are disabled, caches.open throws\n }\n\n const response = await fetchWithRetry(url, request);\n\n if (supersetCache && response.status === HTTP_STATUS_NOT_MODIFIED) {\n const cachedFullResponse = await supersetCache.match(url);\n if (cachedFullResponse) {\n return cachedFullResponse.clone();\n }\n throw new Error('Received 304 but no content is cached!');\n }\n if (\n supersetCache &&\n response.status === HTTP_STATUS_OK &&\n response.headers.get('Etag')\n ) {\n supersetCache.delete(url);\n supersetCache.put(url, response.clone());\n }\n\n return response;\n }\n\n if (method === 'POST' || method === 'PATCH' || method === 'PUT') {\n if (postPayload && jsonPayload) {\n throw new Error('Please provide only one of jsonPayload or postPayload');\n }\n if (postPayload instanceof FormData) {\n request.body = postPayload;\n } else if (postPayload) {\n const payload = tryParsePayload(postPayload);\n if (payload && typeof payload === 'object') {\n // using FormData has the effect that Content-Type header is set to `multipart/form-data`,\n // not e.g., 'application/x-www-form-urlencoded'\n const formData: FormData = new FormData();\n Object.keys(payload).forEach(key => {\n const value = (payload as JsonObject)[key] as JsonValue;\n if (typeof value !== 'undefined') {\n let valueString;\n try {\n // We have seen instances where casting to String() throws error\n // This check allows all valid attributes to be appended to the formData\n // while logging error to console for any attribute that fails the cast to String\n valueString = stringify ? JSON.stringify(value) : String(value);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error(\n `Unable to convert attribute '${key}' to a String(). '${key}' was not added to the formData in request.body for call to ${url}`,\n value,\n e,\n );\n }\n if (valueString !== undefined) {\n formData.append(key, valueString);\n }\n }\n });\n request.body = formData;\n }\n }\n if (jsonPayload !== undefined) {\n request.body = JSON.stringify(jsonPayload);\n request.headers = {\n ...request.headers,\n 'Content-Type': 'application/json',\n };\n }\n }\n\n return fetchWithRetry(url, request);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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ACA,IAAIF,WAAW,KAAKI,SAAS,EAAE;cAC7BV,QAAQ,CAACW,MAAM,CAACP,GAAG,EAAEE,WAAW,CAAC;YACnC;UACF;QACF,CAAC,CAAC;QACFtB,OAAO,CAACjB,IAAI,GAAGiC,QAAQ;MACzB;IACF;IACA,IAAIzB,WAAW,KAAKmC,SAAS,EAAE;MAC7B1B,OAAO,CAACjB,IAAI,GAAGhB,IAAI,CAAC2B,SAAS,CAACH,WAAW,CAAC;MAC1CS,OAAO,CAACb,OAAO,GAAG;QAChB,GAAGa,OAAO,CAACb,OAAO;QAClB,cAAc,EAAE;MAClB,CAAC;IACH;EACF;;EAEA,OAAOW,cAAc,CAACxB,GAAG,EAAE0B,OAAO,CAAC;AACrC","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
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 callApi from './callApi.js';
|
|
21
|
+
import rejectAfterTimeout from './rejectAfterTimeout.js';
|
|
22
|
+
import parseResponse from './parseResponse.js';
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export default async function callApiAndParseWithTimeout(
|
|
26
|
+
|
|
27
|
+
{
|
|
28
|
+
timeout,
|
|
29
|
+
parseMethod,
|
|
30
|
+
...rest
|
|
31
|
+
}) {
|
|
32
|
+
const apiPromise = callApi(rest);
|
|
33
|
+
const racedPromise =
|
|
34
|
+
typeof timeout === 'number' && timeout > 0 ?
|
|
35
|
+
Promise.race([apiPromise, rejectAfterTimeout(timeout)]) :
|
|
36
|
+
apiPromise;
|
|
37
|
+
|
|
38
|
+
return parseResponse(racedPromise, parseMethod);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=callApiAndParseWithTimeout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callApiAndParseWithTimeout.js","names":["callApi","rejectAfterTimeout","parseResponse","callApiAndParseWithTimeout","timeout","parseMethod","rest","apiPromise","racedPromise","Promise","race"],"sources":["../../../src/connection/callApi/callApiAndParseWithTimeout.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 callApi from './callApi';\nimport rejectAfterTimeout from './rejectAfterTimeout';\nimport parseResponse from './parseResponse';\nimport { CallApi, ClientTimeout, ParseMethod } from '../types';\n\nexport default async function callApiAndParseWithTimeout<\n T extends ParseMethod = 'json',\n>({\n timeout,\n parseMethod,\n ...rest\n}: { timeout?: ClientTimeout; parseMethod?: T } & CallApi) {\n const apiPromise = callApi(rest);\n const racedPromise =\n typeof timeout === 'number' && timeout > 0\n ? Promise.race([apiPromise, rejectAfterTimeout<Response>(timeout)])\n : apiPromise;\n\n return parseResponse(racedPromise, parseMethod);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,OAAO,MAAM,WAAW;AAC/B,OAAOC,kBAAkB,MAAM,sBAAsB;AACrD,OAAOC,aAAa,MAAM,iBAAiB;;;AAG3C,eAAe,eAAeC,0BAA0BA;;AAEtD;EACAC,OAAO;EACPC,WAAW;EACX,GAAGC;AACmD,CAAC,EAAE;EACzD,MAAMC,UAAU,GAAGP,OAAO,CAACM,IAAI,CAAC;EAChC,MAAME,YAAY;EAChB,OAAOJ,OAAO,KAAK,QAAQ,IAAIA,OAAO,GAAG,CAAC;EACtCK,OAAO,CAACC,IAAI,CAAC,CAACH,UAAU,EAAEN,kBAAkB,CAAWG,OAAO,CAAC,CAAC,CAAC;EACjEG,UAAU;;EAEhB,OAAOL,aAAa,CAACM,YAAY,EAAEH,WAAW,CAAC;AACjD","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
export { default } from './callApiAndParseWithTimeout.js';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/connection/callApi/index.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\nexport { default } from './callApiAndParseWithTimeout';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,8BAA8B","ignoreList":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import _cloneDeepWith from "lodash/cloneDeepWith.js"; /*
|
|
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 _JSONbig from 'json-bigint';
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const JSONbig = _JSONbig({
|
|
25
|
+
constructorAction: 'preserve'
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export default async function parseResponse(
|
|
29
|
+
apiPromise,
|
|
30
|
+
parseMethod)
|
|
31
|
+
{
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
const response = await apiPromise;
|
|
40
|
+
// reject failed HTTP requests with the raw response
|
|
41
|
+
if (!response.ok) {
|
|
42
|
+
return Promise.reject(response);
|
|
43
|
+
}
|
|
44
|
+
if (parseMethod === null || parseMethod === 'raw') {
|
|
45
|
+
return response;
|
|
46
|
+
}
|
|
47
|
+
if (parseMethod === 'text') {
|
|
48
|
+
const text = await response.text();
|
|
49
|
+
const result = {
|
|
50
|
+
response,
|
|
51
|
+
text
|
|
52
|
+
};
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
if (parseMethod === 'json-bigint') {
|
|
56
|
+
const rawData = await response.text();
|
|
57
|
+
const json = JSONbig.parse(rawData);
|
|
58
|
+
const result = {
|
|
59
|
+
response,
|
|
60
|
+
// `json-bigint` could not handle floats well, see sidorares/json-bigint#62
|
|
61
|
+
// TODO: clean up after json-bigint>1.0.1 is released
|
|
62
|
+
json: _cloneDeepWith(json, (value) =>
|
|
63
|
+
(value == null ? void 0 : value.isInteger == null ? void 0 : value.isInteger()) === false ? Number(value) : undefined
|
|
64
|
+
)
|
|
65
|
+
};
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
// by default treat this as json
|
|
69
|
+
if (parseMethod === undefined || parseMethod === 'json') {
|
|
70
|
+
const json = await response.json();
|
|
71
|
+
const result = {
|
|
72
|
+
json,
|
|
73
|
+
response
|
|
74
|
+
};
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
throw new Error(
|
|
78
|
+
`Expected parseResponse=json|json-bigint|text|raw|null, got '${parseMethod}'.`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=parseResponse.js.map
|