@kepler.gl/utils 3.3.0-alpha.27 → 3.3.0-alpha.28

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/dist/cjs/index.js CHANGED
@@ -6,6 +6,9 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  var _exportNames = {
9
+ normalizeAnnotationViewport: true,
10
+ normalizeAnnotationReadout: true,
11
+ normalizeAnnotationCaption: true,
9
12
  getCameraSnapshot: true,
10
13
  normalizeCameraBookmarks: true,
11
14
  cameraForMap: true,
@@ -1209,6 +1212,24 @@ Object.defineProperty(exports, "nextUp", {
1209
1212
  return _plot.nextUp;
1210
1213
  }
1211
1214
  });
1215
+ Object.defineProperty(exports, "normalizeAnnotationCaption", {
1216
+ enumerable: true,
1217
+ get: function get() {
1218
+ return _annotationCaption.normalizeAnnotationCaption;
1219
+ }
1220
+ });
1221
+ Object.defineProperty(exports, "normalizeAnnotationReadout", {
1222
+ enumerable: true,
1223
+ get: function get() {
1224
+ return _annotationCaption.normalizeAnnotationReadout;
1225
+ }
1226
+ });
1227
+ Object.defineProperty(exports, "normalizeAnnotationViewport", {
1228
+ enumerable: true,
1229
+ get: function get() {
1230
+ return _annotationCaption.normalizeAnnotationViewport;
1231
+ }
1232
+ });
1212
1233
  Object.defineProperty(exports, "normalizeCameraBookmarks", {
1213
1234
  enumerable: true,
1214
1235
  get: function get() {
@@ -1449,6 +1470,7 @@ Object.defineProperty(exports, "valueToPosition", {
1449
1470
  return _sliderScaleUtils.valueToPosition;
1450
1471
  }
1451
1472
  });
1473
+ var _annotationCaption = require("./annotation-caption");
1452
1474
  var _cameraUtils = require("./camera-utils");
1453
1475
  var _cameraTour = require("./camera-tour");
1454
1476
  var _layerVisibility = require("./layer-visibility");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_cameraUtils","require","_cameraTour","_layerVisibility","_colorUtils","_notificationsUtils","_domUtils","_domToImage","_interopRequireDefault","_aggregation","_columnStatistics","_plot","_layerHistogram","_dataUtils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_strings","_time","_positionUtils","_datasetUtils","_exportMapHtml","_exportUtils","_interopRequireWildcard","_format","_glUtils","_localeUtils","_mapInfoUtils","_mapboxGlStyleEditor","_mapboxUtils","_observeDimensions","_projectionUtils","_splitMapUtils","_utils","_effectUtils","_mapboxUtils2","_mapUtils","_arrowDataContainer","_dataContainerUtils","_filterUtils","_editorFeatureUtils","_extractDatasetUtils","_dataScaleUtils","_dataRow","_applicationConfig","_themeUtils","_browserUtils","_quickInsertionSort","_jenks","_sliderScaleUtils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","set","_t","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\n// UTILS\nexport {getCameraSnapshot, normalizeCameraBookmarks, cameraForMap} from './camera-utils';\nexport {normalizeCameraTour, getCameraTourDuration, evaluateCameraTour} from './camera-tour';\nexport {\n getLayerOpacityFactor,\n getAnnotationOpacityDuration,\n DEFAULT_LAYER_ANIMATABLE_PROPS,\n normalizeLayerPropertyTransitions,\n getLayerPropertyTransitions,\n getLayerAnimationTracks,\n getLayerAnimationDuration,\n getLayerAnimationOpacityFactor,\n getLayerAnimatedConfig\n} from './layer-visibility';\n\nexport {\n colorMaybeToRGB,\n colorRangeBackwardCompatibility,\n createLinearGradient,\n hasColorMap,\n hexToRgb,\n isHexColor,\n isRgbColor,\n normalizeColor,\n reverseColorRange,\n rgbToHex,\n addCustomPaletteColor,\n removeCustomPaletteColor,\n sortCustomPaletteColor,\n updateCustomPaletteColor,\n updateColorRangeBySelectedPalette,\n paletteIsSteps,\n paletteIsType,\n paletteIsColorBlindSafe,\n updateColorRangeByMatchingPalette,\n updateCustomColorRangeByColorUI,\n initializeCustomPalette\n} from './color-utils';\nexport {errorNotification} from './notifications-utils';\n\nexport {createNotification, exportImageError, successNotification} from './notifications-utils';\n\nexport {setStyleSheetBaseHref} from './dom-utils';\nexport {default as domtoimage} from './dom-to-image';\nexport {getFrequency, getMode, aggregate} from './aggregation';\nexport {\n ColumnStatsType,\n NUMERIC_BIN_COUNT,\n collectColumnValues,\n computeColumnStats,\n getColumnStatistics\n} from './column-statistics';\nexport type {\n ColumnStats,\n NumericColumnStats,\n CategoricalColumnStats,\n TimeColumnStats,\n Quantile\n} from './column-statistics';\nexport {\n adjustValueToAnimationWindow,\n getBinThresholds,\n getNumericBinThresholds,\n getNumericPlotInterval,\n getNumericRangeMinimum,\n nextDown,\n nextUp,\n getFilterBinThresholds,\n intervalBinFromMarks,\n histogramFromThreshold,\n histogramFromValues,\n histogramFromDomain,\n histogramFromOrdinal,\n histogramFromTimeIntervals,\n mergePolygonLayerIndexes,\n runGpuFilterForPlot,\n updateTimeFilterPlotType,\n getLineChart,\n getCategoricalHistogram,\n mergePlotGroupBy,\n lineChartSeriesLegend,\n defaultPlotGroupColorRange,\n PLOT_GROUP_OTHERS_NAME,\n PLOT_NUM_GROUPS_ALL,\n PLOT_NUM_GROUPS_OPTIONS,\n DEFAULT_PLOT_NUM_GROUPS,\n MAX_PLOT_NUM_GROUPS\n} from './plot';\nexport {getLayerHistogram, isLayerHistogramSupported} from './layer-histogram';\n// eslint-disable-next-line prettier/prettier\nexport * from './data-utils';\nexport type {FieldFormatter} from './data-utils';\nexport * from './strings';\nexport {\n SAMPLE_TIMELINE,\n TIMELINE_MODES,\n TIME_INTERVALS_ORDERED,\n LayerToFilterTimeInterval,\n LayerTimeInterval,\n getTimelineFromAnimationConfig,\n getTimelineFromFilter,\n filterIntervalOptions\n} from './time';\nexport {maybeHexToGeo, getPositionFromHexValue} from './position-utils';\n\nexport {\n datasetColorMaker,\n findDefaultColorField,\n findDefaultColorFieldWithValues,\n getFieldFormatLabels,\n getFormatLabels,\n validateInputData\n} from './dataset-utils';\nexport {exportMapToHTML} from './export-map-html';\nexport {\n calculateExportImageSize,\n convertToPng,\n dataURItoBlob,\n downloadFile,\n exportHtml,\n exportImage,\n exportJson,\n exportMap,\n exportToJsonString,\n default as exporters,\n getExportFileName,\n getExportFileNameBase,\n getMapJSON,\n getScaleFromImageSize,\n isMSEdge,\n omitLayerApiKeys\n} from './export-utils';\nexport {getFormatValue, getDefaultTimeFormat} from './format';\nexport {getLayerBlendingParameters, patchDeckRendererForPostProcessing} from './gl-utils';\nexport {flattenMessages, mergeMessages} from './locale-utils';\nexport {isValidMapInfo, optionalMapInfo, optionalMapText} from './map-info-utils';\nexport {\n editBottomMapStyle,\n editTopMapStyle,\n getDefaultLayerGroupVisibility,\n getStyleDownloadUrl,\n getStyleImageIcon,\n mergeLayerGroupVisibility,\n scaleMapStyleByResolution\n} from './map-style-utils/mapbox-gl-style-editor';\nexport {validateToken} from './mapbox-utils';\nexport {\n default as useDimensions,\n observeDimensions,\n unobserveDimensions\n} from './observe-dimensions';\nexport type {Dimensions} from './observe-dimensions';\nexport {snapToMarks, getTimeBins} from './plot';\nexport * from './projection-utils';\nexport * from './split-map-utils';\nexport * from './utils';\n\nexport {\n computeDeckEffects,\n fixEffectOrder,\n reorderEffectOrder,\n validateEffectParameters\n} from './effect-utils';\n// Mapbox\nexport {\n isStyleUsingMapboxTiles,\n isStyleUsingOpenStreetMapTiles,\n mapHasOpenStreetMapAttribution,\n getBaseMapAttributions,\n getBaseMapLibrary,\n transformRequest\n} from './map-style-utils/mapbox-utils';\nexport type {AttributionMapLike} from './map-style-utils/mapbox-utils';\n\n// Map\nexport * from './map-utils';\n\nexport {\n ArrowDataContainer,\n createArrowVector,\n convertStructToFixedSizeList,\n compactArrowTable,\n arrowDataTypeToAnalyzerDataType,\n arrowDataTypeToFieldType,\n isArrowTable,\n isArrowFixedSizeList,\n isArrowStruct,\n isArrowVector\n} from './arrow-data-container';\nexport type {DataContainerInterface} from './data-container-interface';\nexport {\n DataForm,\n createDataContainer,\n createIndexedDataContainer,\n getSampleData as getSampleContainerData\n} from './data-container-utils';\nexport * from './filter-utils';\nexport type {FilterChanged, FilterResult, dataValueAccessor} from './filter-utils';\nexport * from './editor-feature-utils';\nexport type {EditorFeatureCollection} from './editor-feature-utils';\nexport {\n extractRowsInsideFeature,\n extractVectorTileFeaturesInsideFeature,\n extractRasterInsideFeature,\n isExtractableDataset,\n isExtractableLayer,\n isRasterTileExtractLayer,\n isVectorTileExtractLayer\n} from './extract-dataset-utils';\nexport type {\n ExtractableDataset,\n ExtractableLayer,\n ExtractedGeojson,\n ExtractedTable,\n ExtractResult\n} from './extract-dataset-utils';\n\nexport {\n colorMapToColorBreaks,\n colorBreaksToColorMap,\n getLayerColorScale,\n getLegendOfScale,\n getJenksDomain,\n getLinearDomain,\n getLogDomain,\n getOrdinalDomain,\n getQuantileDomain,\n getScaleFunction,\n getVisualChannelScaleByZoom,\n initializeLayerColorMap,\n isNumericColorBreaks,\n isDomainStops,\n isDomainQuantile,\n getDomainStepsbyZoom,\n getThresholdsFromQuantiles,\n getQuantLabelFormat,\n getHistogramDomain,\n getQuantLegends,\n getCategoricalColorMap,\n getCategoricalColorScale,\n initCustomPaletteByCustomScale,\n colorMapToCategoricalColorBreaks,\n resetCategoricalColorMapByIndex,\n selectRestCategoricalColorMapByIndex,\n removeCategoricalValueFromColorMap,\n addCategoricalValuesToColorMap\n} from './data-scale-utils';\nexport type {ColorBreak, ColorBreakOrdinal, DomainQuantiles, DomainStops} from './data-scale-utils';\n\nexport {DataRow} from './data-row';\n\n// Application config\nexport {getApplicationConfig, initApplicationConfig} from './application-config';\nexport {\n getConfiguredThemes,\n shouldShowThemeSwitcher,\n getDefaultUiTheme,\n getNextUiTheme\n} from './theme-utils';\nexport type {\n KeplerApplicationConfig,\n KeplerAcceptedFileFormat,\n BaseMapLibraryConfig,\n MapLibInstance,\n GetMapRef,\n SvgIcon,\n ReduxLogLevel\n} from './application-config';\nexport type {DatabaseAdapter, DatabaseConnection} from './application-config-types';\n\n// Browser utils\nexport {isAppleDevice} from './browser-utils';\n\nexport {default as quickInsertionSort} from './quick-insertion-sort';\nexport {default as naturalBreaks} from './jenks';\n\nexport type {KeplerTableModel} from './types';\n\nexport {valueToPosition, positionToValue, createSliderScale} from './slider-scale-utils';\nexport type {SliderScaleConfig} from './slider-scale-utils';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A,CAAAM,GAAA,CAAAZ,CAAA,EAAAQ,CAAA,cAAAK,EAAA,IAAAb,CAAA,gBAAAa,EAAA,OAAArD,cAAA,CAAAC,IAAA,CAAAuC,CAAA,EAAAa,EAAA,OAAAN,CAAA,IAAAD,CAAA,GAAAnD,MAAA,CAAAS,cAAA,KAAAT,MAAA,CAAA2D,wBAAA,CAAAd,CAAA,EAAAa,EAAA,OAAAN,CAAA,CAAAzC,GAAA,IAAAyC,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAK,EAAA,EAAAN,CAAA,IAAAC,CAAA,CAAAK,EAAA,IAAAb,CAAA,CAAAa,EAAA,WAAAL,CAAA,KAAAR,CAAA,EAAAC,CAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_annotationCaption","require","_cameraUtils","_cameraTour","_layerVisibility","_colorUtils","_notificationsUtils","_domUtils","_domToImage","_interopRequireDefault","_aggregation","_columnStatistics","_plot","_layerHistogram","_dataUtils","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_strings","_time","_positionUtils","_datasetUtils","_exportMapHtml","_exportUtils","_interopRequireWildcard","_format","_glUtils","_localeUtils","_mapInfoUtils","_mapboxGlStyleEditor","_mapboxUtils","_observeDimensions","_projectionUtils","_splitMapUtils","_utils","_effectUtils","_mapboxUtils2","_mapUtils","_arrowDataContainer","_dataContainerUtils","_filterUtils","_editorFeatureUtils","_extractDatasetUtils","_dataScaleUtils","_dataRow","_applicationConfig","_themeUtils","_browserUtils","_quickInsertionSort","_jenks","_sliderScaleUtils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","_typeof","has","set","_t","getOwnPropertyDescriptor"],"sources":["../../src/index.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\n// UTILS\nexport {\n normalizeAnnotationViewport,\n normalizeAnnotationReadout,\n normalizeAnnotationCaption\n} from './annotation-caption';\nexport {getCameraSnapshot, normalizeCameraBookmarks, cameraForMap} from './camera-utils';\nexport {normalizeCameraTour, getCameraTourDuration, evaluateCameraTour} from './camera-tour';\nexport {\n getLayerOpacityFactor,\n getAnnotationOpacityDuration,\n DEFAULT_LAYER_ANIMATABLE_PROPS,\n normalizeLayerPropertyTransitions,\n getLayerPropertyTransitions,\n getLayerAnimationTracks,\n getLayerAnimationDuration,\n getLayerAnimationOpacityFactor,\n getLayerAnimatedConfig\n} from './layer-visibility';\n\nexport {\n colorMaybeToRGB,\n colorRangeBackwardCompatibility,\n createLinearGradient,\n hasColorMap,\n hexToRgb,\n isHexColor,\n isRgbColor,\n normalizeColor,\n reverseColorRange,\n rgbToHex,\n addCustomPaletteColor,\n removeCustomPaletteColor,\n sortCustomPaletteColor,\n updateCustomPaletteColor,\n updateColorRangeBySelectedPalette,\n paletteIsSteps,\n paletteIsType,\n paletteIsColorBlindSafe,\n updateColorRangeByMatchingPalette,\n updateCustomColorRangeByColorUI,\n initializeCustomPalette\n} from './color-utils';\nexport {errorNotification} from './notifications-utils';\n\nexport {createNotification, exportImageError, successNotification} from './notifications-utils';\n\nexport {setStyleSheetBaseHref} from './dom-utils';\nexport {default as domtoimage} from './dom-to-image';\nexport {getFrequency, getMode, aggregate} from './aggregation';\nexport {\n ColumnStatsType,\n NUMERIC_BIN_COUNT,\n collectColumnValues,\n computeColumnStats,\n getColumnStatistics\n} from './column-statistics';\nexport type {\n ColumnStats,\n NumericColumnStats,\n CategoricalColumnStats,\n TimeColumnStats,\n Quantile\n} from './column-statistics';\nexport {\n adjustValueToAnimationWindow,\n getBinThresholds,\n getNumericBinThresholds,\n getNumericPlotInterval,\n getNumericRangeMinimum,\n nextDown,\n nextUp,\n getFilterBinThresholds,\n intervalBinFromMarks,\n histogramFromThreshold,\n histogramFromValues,\n histogramFromDomain,\n histogramFromOrdinal,\n histogramFromTimeIntervals,\n mergePolygonLayerIndexes,\n runGpuFilterForPlot,\n updateTimeFilterPlotType,\n getLineChart,\n getCategoricalHistogram,\n mergePlotGroupBy,\n lineChartSeriesLegend,\n defaultPlotGroupColorRange,\n PLOT_GROUP_OTHERS_NAME,\n PLOT_NUM_GROUPS_ALL,\n PLOT_NUM_GROUPS_OPTIONS,\n DEFAULT_PLOT_NUM_GROUPS,\n MAX_PLOT_NUM_GROUPS\n} from './plot';\nexport {getLayerHistogram, isLayerHistogramSupported} from './layer-histogram';\n// eslint-disable-next-line prettier/prettier\nexport * from './data-utils';\nexport type {FieldFormatter} from './data-utils';\nexport * from './strings';\nexport {\n SAMPLE_TIMELINE,\n TIMELINE_MODES,\n TIME_INTERVALS_ORDERED,\n LayerToFilterTimeInterval,\n LayerTimeInterval,\n getTimelineFromAnimationConfig,\n getTimelineFromFilter,\n filterIntervalOptions\n} from './time';\nexport {maybeHexToGeo, getPositionFromHexValue} from './position-utils';\n\nexport {\n datasetColorMaker,\n findDefaultColorField,\n findDefaultColorFieldWithValues,\n getFieldFormatLabels,\n getFormatLabels,\n validateInputData\n} from './dataset-utils';\nexport {exportMapToHTML} from './export-map-html';\nexport {\n calculateExportImageSize,\n convertToPng,\n dataURItoBlob,\n downloadFile,\n exportHtml,\n exportImage,\n exportJson,\n exportMap,\n exportToJsonString,\n default as exporters,\n getExportFileName,\n getExportFileNameBase,\n getMapJSON,\n getScaleFromImageSize,\n isMSEdge,\n omitLayerApiKeys\n} from './export-utils';\nexport {getFormatValue, getDefaultTimeFormat} from './format';\nexport {getLayerBlendingParameters, patchDeckRendererForPostProcessing} from './gl-utils';\nexport {flattenMessages, mergeMessages} from './locale-utils';\nexport {isValidMapInfo, optionalMapInfo, optionalMapText} from './map-info-utils';\nexport {\n editBottomMapStyle,\n editTopMapStyle,\n getDefaultLayerGroupVisibility,\n getStyleDownloadUrl,\n getStyleImageIcon,\n mergeLayerGroupVisibility,\n scaleMapStyleByResolution\n} from './map-style-utils/mapbox-gl-style-editor';\nexport {validateToken} from './mapbox-utils';\nexport {\n default as useDimensions,\n observeDimensions,\n unobserveDimensions\n} from './observe-dimensions';\nexport type {Dimensions} from './observe-dimensions';\nexport {snapToMarks, getTimeBins} from './plot';\nexport * from './projection-utils';\nexport * from './split-map-utils';\nexport * from './utils';\n\nexport {\n computeDeckEffects,\n fixEffectOrder,\n reorderEffectOrder,\n validateEffectParameters\n} from './effect-utils';\n// Mapbox\nexport {\n isStyleUsingMapboxTiles,\n isStyleUsingOpenStreetMapTiles,\n mapHasOpenStreetMapAttribution,\n getBaseMapAttributions,\n getBaseMapLibrary,\n transformRequest\n} from './map-style-utils/mapbox-utils';\nexport type {AttributionMapLike} from './map-style-utils/mapbox-utils';\n\n// Map\nexport * from './map-utils';\n\nexport {\n ArrowDataContainer,\n createArrowVector,\n convertStructToFixedSizeList,\n compactArrowTable,\n arrowDataTypeToAnalyzerDataType,\n arrowDataTypeToFieldType,\n isArrowTable,\n isArrowFixedSizeList,\n isArrowStruct,\n isArrowVector\n} from './arrow-data-container';\nexport type {DataContainerInterface} from './data-container-interface';\nexport {\n DataForm,\n createDataContainer,\n createIndexedDataContainer,\n getSampleData as getSampleContainerData\n} from './data-container-utils';\nexport * from './filter-utils';\nexport type {FilterChanged, FilterResult, dataValueAccessor} from './filter-utils';\nexport * from './editor-feature-utils';\nexport type {EditorFeatureCollection} from './editor-feature-utils';\nexport {\n extractRowsInsideFeature,\n extractVectorTileFeaturesInsideFeature,\n extractRasterInsideFeature,\n isExtractableDataset,\n isExtractableLayer,\n isRasterTileExtractLayer,\n isVectorTileExtractLayer\n} from './extract-dataset-utils';\nexport type {\n ExtractableDataset,\n ExtractableLayer,\n ExtractedGeojson,\n ExtractedTable,\n ExtractResult\n} from './extract-dataset-utils';\n\nexport {\n colorMapToColorBreaks,\n colorBreaksToColorMap,\n getLayerColorScale,\n getLegendOfScale,\n getJenksDomain,\n getLinearDomain,\n getLogDomain,\n getOrdinalDomain,\n getQuantileDomain,\n getScaleFunction,\n getVisualChannelScaleByZoom,\n initializeLayerColorMap,\n isNumericColorBreaks,\n isDomainStops,\n isDomainQuantile,\n getDomainStepsbyZoom,\n getThresholdsFromQuantiles,\n getQuantLabelFormat,\n getHistogramDomain,\n getQuantLegends,\n getCategoricalColorMap,\n getCategoricalColorScale,\n initCustomPaletteByCustomScale,\n colorMapToCategoricalColorBreaks,\n resetCategoricalColorMapByIndex,\n selectRestCategoricalColorMapByIndex,\n removeCategoricalValueFromColorMap,\n addCategoricalValuesToColorMap\n} from './data-scale-utils';\nexport type {ColorBreak, ColorBreakOrdinal, DomainQuantiles, DomainStops} from './data-scale-utils';\n\nexport {DataRow} from './data-row';\n\n// Application config\nexport {getApplicationConfig, initApplicationConfig} from './application-config';\nexport {\n getConfiguredThemes,\n shouldShowThemeSwitcher,\n getDefaultUiTheme,\n getNextUiTheme\n} from './theme-utils';\nexport type {\n KeplerApplicationConfig,\n KeplerAcceptedFileFormat,\n BaseMapLibraryConfig,\n MapLibInstance,\n GetMapRef,\n SvgIcon,\n ReduxLogLevel\n} from './application-config';\nexport type {DatabaseAdapter, DatabaseConnection} from './application-config-types';\n\n// Browser utils\nexport {isAppleDevice} from './browser-utils';\n\nexport {default as quickInsertionSort} from './quick-insertion-sort';\nexport {default as naturalBreaks} from './jenks';\n\nexport type {KeplerTableModel} from './types';\n\nexport {valueToPosition, positionToValue, createSliderScale} from './slider-scale-utils';\nexport type {SliderScaleConfig} from './slider-scale-utils';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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_typeof from "@babel/runtime/helpers/esm/typeof";
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ // SPDX-License-Identifier: MIT
6
+ // Copyright contributors to the kepler.gl project
7
+
8
+ import { AnnotationKind } from '@kepler.gl/constants';
9
+ var anchors = new Set(['top-left', 'top', 'top-right', 'left', 'right', 'bottom-left', 'bottom', 'bottom-right']);
10
+ export function normalizeAnnotationViewport(value) {
11
+ if (!value || _typeof(value) !== 'object') return undefined;
12
+ var _ref = value,
13
+ anchor = _ref.anchor,
14
+ margin = _ref.margin;
15
+ if (!anchors.has(anchor) || !Array.isArray(margin) || margin.length !== 2 || !margin.every(function (item) {
16
+ return Number.isFinite(item) && item >= 0;
17
+ })) return undefined;
18
+ return {
19
+ anchor: anchor,
20
+ margin: [margin[0], margin[1]]
21
+ };
22
+ }
23
+ export function normalizeAnnotationReadout(value) {
24
+ if (!value || _typeof(value) !== 'object') return undefined;
25
+ var readout = value;
26
+ if (readout.type === 'time' && (readout.format === undefined || typeof readout.format === 'string' && readout.format.length > 0 && readout.format.length <= 128)) {
27
+ return _objectSpread({
28
+ type: 'time'
29
+ }, readout.format !== undefined ? {
30
+ format: readout.format
31
+ } : {});
32
+ }
33
+ if (readout.type === 'count' && typeof readout.dataId === 'string' && readout.dataId.trim()) {
34
+ return {
35
+ type: 'count',
36
+ dataId: readout.dataId
37
+ };
38
+ }
39
+ return undefined;
40
+ }
41
+
42
+ /** Own caption metadata and discard it when changing back to a geographic annotation. */
43
+ export function normalizeAnnotationCaption(config) {
44
+ var viewport = config.kind === AnnotationKind.TEXT ? normalizeAnnotationViewport(config.viewport) : undefined;
45
+ if (!viewport) return {};
46
+ var readout = normalizeAnnotationReadout(config.readout);
47
+ return _objectSpread({
48
+ viewport: viewport
49
+ }, readout ? {
50
+ readout: readout
51
+ } : {});
52
+ }
53
+ //# sourceMappingURL=annotation-caption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation-caption.js","names":["AnnotationKind","anchors","Set","normalizeAnnotationViewport","value","_typeof","undefined","_ref","anchor","margin","has","Array","isArray","length","every","item","Number","isFinite","normalizeAnnotationReadout","readout","type","format","_objectSpread","dataId","trim","normalizeAnnotationCaption","config","viewport","kind","TEXT"],"sources":["../../src/annotation-caption.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nimport {AnnotationKind} from '@kepler.gl/constants';\nimport type {\n AnnotationPropsPartial,\n AnnotationReadout,\n ViewportAnnotationPlacement\n} from '@kepler.gl/types';\n\nconst anchors = new Set([\n 'top-left',\n 'top',\n 'top-right',\n 'left',\n 'right',\n 'bottom-left',\n 'bottom',\n 'bottom-right'\n]);\n\nexport function normalizeAnnotationViewport(\n value: unknown\n): ViewportAnnotationPlacement | undefined {\n if (!value || typeof value !== 'object') return undefined;\n const {anchor, margin} = value as ViewportAnnotationPlacement;\n if (\n !anchors.has(anchor) ||\n !Array.isArray(margin) ||\n margin.length !== 2 ||\n !margin.every(item => Number.isFinite(item) && item >= 0)\n )\n return undefined;\n return {anchor, margin: [margin[0], margin[1]]};\n}\n\nexport function normalizeAnnotationReadout(value: unknown): AnnotationReadout | undefined {\n if (!value || typeof value !== 'object') return undefined;\n const readout = value as AnnotationReadout;\n if (\n readout.type === 'time' &&\n (readout.format === undefined ||\n (typeof readout.format === 'string' &&\n readout.format.length > 0 &&\n readout.format.length <= 128))\n ) {\n return {type: 'time', ...(readout.format !== undefined ? {format: readout.format} : {})};\n }\n if (readout.type === 'count' && typeof readout.dataId === 'string' && readout.dataId.trim()) {\n return {type: 'count', dataId: readout.dataId};\n }\n return undefined;\n}\n\n/** Own caption metadata and discard it when changing back to a geographic annotation. */\nexport function normalizeAnnotationCaption(\n config: AnnotationPropsPartial\n): Pick<AnnotationPropsPartial, 'viewport' | 'readout'> {\n const viewport =\n config.kind === AnnotationKind.TEXT ? normalizeAnnotationViewport(config.viewport) : undefined;\n if (!viewport) return {};\n const readout = normalizeAnnotationReadout(config.readout);\n return {viewport, ...(readout ? {readout} : {})};\n}\n"],"mappings":";;;;AAAA;AACA;;AAEA,SAAQA,cAAc,QAAO,sBAAsB;AAOnD,IAAMC,OAAO,GAAG,IAAIC,GAAG,CAAC,CACtB,UAAU,EACV,KAAK,EACL,WAAW,EACX,MAAM,EACN,OAAO,EACP,aAAa,EACb,QAAQ,EACR,cAAc,CACf,CAAC;AAEF,OAAO,SAASC,2BAA2BA,CACzCC,KAAc,EAC2B;EACzC,IAAI,CAACA,KAAK,IAAIC,OAAA,CAAOD,KAAK,MAAK,QAAQ,EAAE,OAAOE,SAAS;EACzD,IAAAC,IAAA,GAAyBH,KAAK;IAAvBI,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;EACrB,IACE,CAACR,OAAO,CAACS,GAAG,CAACF,MAAM,CAAC,IACpB,CAACG,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,IACtBA,MAAM,CAACI,MAAM,KAAK,CAAC,IACnB,CAACJ,MAAM,CAACK,KAAK,CAAC,UAAAC,IAAI;IAAA,OAAIC,MAAM,CAACC,QAAQ,CAACF,IAAI,CAAC,IAAIA,IAAI,IAAI,CAAC;EAAA,EAAC,EAEzD,OAAOT,SAAS;EAClB,OAAO;IAACE,MAAM,EAANA,MAAM;IAAEC,MAAM,EAAE,CAACA,MAAM,CAAC,CAAC,CA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,OAAO,GAAG;IAACA,OAAO,EAAPA;EAAO,CAAC,GAAG,CAAC,CAAC;AAChD","ignoreList":[]}
@@ -1377,9 +1377,13 @@ export function mergeFilterDomain(filter, datasets) {
1377
1377
  }
1378
1378
  var endName = toArray(filter.endName)[idx];
1379
1379
  if (endName) {
1380
- var _domainSteps2;
1381
1380
  var endProps = dataset.getColumnFilterProps(endName);
1382
- domainSteps = mergeFilterDomainStep((_domainSteps2 = domainSteps) !== null && _domainSteps2 !== void 0 ? _domainSteps2 : {}, endProps);
1381
+ // All-null ends are open intervals. Their synthetic timestamp domain
1382
+ // does not represent an observation and must not extend the timeline.
1383
+ if (endProps && 'mappedValue' in endProps && Array.isArray(endProps.mappedValue) && endProps.mappedValue.some(Number.isFinite)) {
1384
+ var _domainSteps2;
1385
+ domainSteps = mergeFilterDomainStep((_domainSteps2 = domainSteps) !== null && _domainSteps2 !== void 0 ? _domainSteps2 : {}, endProps);
1386
+ }
1383
1387
  }
1384
1388
  });
1385
1389
  return domainSteps;