@carto/api-client 0.5.1-alpha.1 → 0.5.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.
@@ -219,10 +219,6 @@ type PositionalQueryParameter = QueryParameterValue[];
219
219
  /** @privateRemarks Source: @deck.gl/carto */
220
220
  type QueryParameters = NamedQueryParameter | PositionalQueryParameter;
221
221
 
222
- /******************************************************************************
223
- * COMMON
224
- */
225
-
226
222
  /******************************************************************************
227
223
  * LOCAL CALCULATIONS
228
224
  */
@@ -323,8 +319,6 @@ type SourceOptionalOptions = {
323
319
  value?: number;
324
320
  };
325
321
  clientId: string;
326
- /** @deprecated use `query` instead **/
327
- format: Format;
328
322
  /**
329
323
  * Maximum URL character length. Above this limit, requests use POST.
330
324
  * Used to avoid browser and CDN limits.
@@ -637,11 +631,6 @@ type RasterMetadata = {
637
631
  type TilejsonResult = Tilejson & {
638
632
  accessToken: string;
639
633
  };
640
- type GeojsonResult = {
641
- type: 'FeatureCollection';
642
- features: Feature[];
643
- };
644
- type JsonResult = any[];
645
634
  type QueryResult = {
646
635
  meta: {
647
636
  cacheHit: boolean;
@@ -786,6 +775,7 @@ type KeplerMapConfig = {
786
775
  styleType: string;
787
776
  visibleLayerGroups: Record<string, boolean>;
788
777
  };
778
+ legendSettings?: any;
789
779
  popupSettings: any;
790
780
  visState: {
791
781
  layers: MapConfigLayer[];
@@ -864,7 +854,7 @@ type Dataset = {
864
854
  cache?: number;
865
855
  connectionName: string;
866
856
  geoColumn: string;
867
- data: TilejsonResult | GeojsonResult | JsonResult;
857
+ data: TilejsonResult;
868
858
  columns: string[];
869
859
  format: Format;
870
860
  aggregationExp: string;
@@ -926,6 +916,7 @@ declare function parseMap(json: any): {
926
916
  visibleLayerGroups: Record<string, boolean>;
927
917
  };
928
918
  popupSettings: any;
919
+ legendSettings: any;
929
920
  token: any;
930
921
  layers: (LayerDescriptor | undefined)[];
931
922
  };
@@ -1162,9 +1153,9 @@ interface TableRequestOptions extends BaseRequestOptions {
1162
1153
  sortByColumnType?: SortColumnType;
1163
1154
  offset?: number;
1164
1155
  limit?: number;
1165
- /** Local only. */
1156
+ /** @deprecated Supported for tilesets only. Prefer `filters` (for all sources) instead. */
1166
1157
  searchFilterColumn?: string;
1167
- /** Local only. */
1158
+ /** @deprecated Supported for tilesets only. Prefer `filters` (for all sources) instead. */
1168
1159
  searchFilterText?: string;
1169
1160
  }
1170
1161
  /** Options for {@link WidgetRemoteSource#getTimeSeries}. */
@@ -1408,6 +1399,8 @@ type TileFeatures = {
1408
1399
  /** @privateRemarks Source: @carto/react-core */
1409
1400
  type TileFeatureExtractOptions = {
1410
1401
  storeGeometry?: boolean;
1402
+ spatialDataType?: SpatialDataType;
1403
+ spatialDataColumn?: string;
1411
1404
  uniqueIdProperty?: string;
1412
1405
  };
1413
1406
  /** @privateRemarks Source: @carto/react-core */
@@ -1735,4 +1728,36 @@ declare function makeIntervalComplete(intervals: FilterInterval[]): FilterInterv
1735
1728
  */
1736
1729
  declare function transformToTileCoords<T extends Geometry>(geometry: T, bbox: BBox): T;
1737
1730
 
1738
- export { AGGREGATION, type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, ApiVersion, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CartoAPIError, type CategoryRequestOptions, type CategoryResponse, DEFAULT_API_BASE_URL, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GeojsonResult, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type JsonResult, type KeplerMapConfig, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, type SCALE_TYPE, SOURCE_DEFAULTS, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SortColumnType, type SortDirection, type SourceOptions, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type TilejsonResult, type TilesetSourceOptions, type TimeSeriesRequestOptions, type TimeSeriesResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, _buildFeatureFilter, domainFromValues as _domainFromValues, _getHexagonResolution, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, clearFilters, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getClient, getColorAccessor, getColorValueAccessor, getDataFilterExtensionProps, getFilter, getIconUrlAccessor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
1731
+ type FetchDatasetOptions = {
1732
+ accessToken: string;
1733
+ apiBaseUrl: string;
1734
+ connection: string;
1735
+ headers?: Record<string, string>;
1736
+ localCache?: {
1737
+ cacheControl: 'no-cache'[];
1738
+ };
1739
+ maxLengthURL?: number;
1740
+ };
1741
+ type FetchDataset = {
1742
+ dataset: Dataset;
1743
+ filters?: Filter;
1744
+ options: FetchDatasetOptions;
1745
+ };
1746
+ declare function configureSource({ dataset, filters, options, }: FetchDataset): Promise<TilejsonResult>;
1747
+ /**
1748
+ * @internal
1749
+ * State of `aggregationResLevel` in the UI and backend config is based on an assumption of
1750
+ * 512x512px tiles. Because we may change tile resolution for performance goals, the
1751
+ * `aggregationResLevel` passed to the deck.gl layer must be scaled with tile resolution.
1752
+ */
1753
+ declare function scaleAggregationResLevel(aggregationResLevel: number, tileResolution: number): number | undefined;
1754
+ /**
1755
+ * @internal
1756
+ */
1757
+ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined): string | null | undefined;
1758
+ /**
1759
+ * @internal
1760
+ */
1761
+ declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
1762
+
1763
+ export { AGGREGATION, type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CartoAPIError, type CategoryRequestOptions, type CategoryResponse, type ColumnsOption, DEFAULT_API_BASE_URL, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, type SCALE_TYPE, SOURCE_DEFAULTS, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, _buildFeatureFilter, domainFromValues as _domainFromValues, _getHexagonResolution, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getClient, getColorAccessor, getColorValueAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getFilter, getIconUrlAccessor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
@@ -219,10 +219,6 @@ type PositionalQueryParameter = QueryParameterValue[];
219
219
  /** @privateRemarks Source: @deck.gl/carto */
220
220
  type QueryParameters = NamedQueryParameter | PositionalQueryParameter;
221
221
 
222
- /******************************************************************************
223
- * COMMON
224
- */
225
-
226
222
  /******************************************************************************
227
223
  * LOCAL CALCULATIONS
228
224
  */
@@ -323,8 +319,6 @@ type SourceOptionalOptions = {
323
319
  value?: number;
324
320
  };
325
321
  clientId: string;
326
- /** @deprecated use `query` instead **/
327
- format: Format;
328
322
  /**
329
323
  * Maximum URL character length. Above this limit, requests use POST.
330
324
  * Used to avoid browser and CDN limits.
@@ -637,11 +631,6 @@ type RasterMetadata = {
637
631
  type TilejsonResult = Tilejson & {
638
632
  accessToken: string;
639
633
  };
640
- type GeojsonResult = {
641
- type: 'FeatureCollection';
642
- features: Feature[];
643
- };
644
- type JsonResult = any[];
645
634
  type QueryResult = {
646
635
  meta: {
647
636
  cacheHit: boolean;
@@ -786,6 +775,7 @@ type KeplerMapConfig = {
786
775
  styleType: string;
787
776
  visibleLayerGroups: Record<string, boolean>;
788
777
  };
778
+ legendSettings?: any;
789
779
  popupSettings: any;
790
780
  visState: {
791
781
  layers: MapConfigLayer[];
@@ -864,7 +854,7 @@ type Dataset = {
864
854
  cache?: number;
865
855
  connectionName: string;
866
856
  geoColumn: string;
867
- data: TilejsonResult | GeojsonResult | JsonResult;
857
+ data: TilejsonResult;
868
858
  columns: string[];
869
859
  format: Format;
870
860
  aggregationExp: string;
@@ -926,6 +916,7 @@ declare function parseMap(json: any): {
926
916
  visibleLayerGroups: Record<string, boolean>;
927
917
  };
928
918
  popupSettings: any;
919
+ legendSettings: any;
929
920
  token: any;
930
921
  layers: (LayerDescriptor | undefined)[];
931
922
  };
@@ -1162,9 +1153,9 @@ interface TableRequestOptions extends BaseRequestOptions {
1162
1153
  sortByColumnType?: SortColumnType;
1163
1154
  offset?: number;
1164
1155
  limit?: number;
1165
- /** Local only. */
1156
+ /** @deprecated Supported for tilesets only. Prefer `filters` (for all sources) instead. */
1166
1157
  searchFilterColumn?: string;
1167
- /** Local only. */
1158
+ /** @deprecated Supported for tilesets only. Prefer `filters` (for all sources) instead. */
1168
1159
  searchFilterText?: string;
1169
1160
  }
1170
1161
  /** Options for {@link WidgetRemoteSource#getTimeSeries}. */
@@ -1408,6 +1399,8 @@ type TileFeatures = {
1408
1399
  /** @privateRemarks Source: @carto/react-core */
1409
1400
  type TileFeatureExtractOptions = {
1410
1401
  storeGeometry?: boolean;
1402
+ spatialDataType?: SpatialDataType;
1403
+ spatialDataColumn?: string;
1411
1404
  uniqueIdProperty?: string;
1412
1405
  };
1413
1406
  /** @privateRemarks Source: @carto/react-core */
@@ -1735,4 +1728,36 @@ declare function makeIntervalComplete(intervals: FilterInterval[]): FilterInterv
1735
1728
  */
1736
1729
  declare function transformToTileCoords<T extends Geometry>(geometry: T, bbox: BBox): T;
1737
1730
 
1738
- export { AGGREGATION, type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, ApiVersion, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CartoAPIError, type CategoryRequestOptions, type CategoryResponse, DEFAULT_API_BASE_URL, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GeojsonResult, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type JsonResult, type KeplerMapConfig, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, type SCALE_TYPE, SOURCE_DEFAULTS, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SortColumnType, type SortDirection, type SourceOptions, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type TilejsonResult, type TilesetSourceOptions, type TimeSeriesRequestOptions, type TimeSeriesResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, _buildFeatureFilter, domainFromValues as _domainFromValues, _getHexagonResolution, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, clearFilters, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getClient, getColorAccessor, getColorValueAccessor, getDataFilterExtensionProps, getFilter, getIconUrlAccessor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
1731
+ type FetchDatasetOptions = {
1732
+ accessToken: string;
1733
+ apiBaseUrl: string;
1734
+ connection: string;
1735
+ headers?: Record<string, string>;
1736
+ localCache?: {
1737
+ cacheControl: 'no-cache'[];
1738
+ };
1739
+ maxLengthURL?: number;
1740
+ };
1741
+ type FetchDataset = {
1742
+ dataset: Dataset;
1743
+ filters?: Filter;
1744
+ options: FetchDatasetOptions;
1745
+ };
1746
+ declare function configureSource({ dataset, filters, options, }: FetchDataset): Promise<TilejsonResult>;
1747
+ /**
1748
+ * @internal
1749
+ * State of `aggregationResLevel` in the UI and backend config is based on an assumption of
1750
+ * 512x512px tiles. Because we may change tile resolution for performance goals, the
1751
+ * `aggregationResLevel` passed to the deck.gl layer must be scaled with tile resolution.
1752
+ */
1753
+ declare function scaleAggregationResLevel(aggregationResLevel: number, tileResolution: number): number | undefined;
1754
+ /**
1755
+ * @internal
1756
+ */
1757
+ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined): string | null | undefined;
1758
+ /**
1759
+ * @internal
1760
+ */
1761
+ declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
1762
+
1763
+ export { AGGREGATION, type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, ApiVersion, type Attribute, _default as BASEMAP, type BaseRequestOptions, type Basemap, type BoundaryQuerySourceOptions, type BoundaryQuerySourceResponse, type BoundaryTableSourceOptions, type BoundaryTableSourceResponse, CartoAPIError, type CategoryRequestOptions, type CategoryResponse, type ColumnsOption, DEFAULT_API_BASE_URL, FEATURE_GEOM_PROPERTY, type FeaturesRequestOptions, type FeaturesResponse, type FetchMapOptions, type FetchMapResult, type Filter, type FilterFunction, type FilterInterval, type FilterIntervalComplete, type FilterIntervalExtremum, type FilterLogicalOperator, type FilterOptions, FilterType, type Filters, type Format, type FormulaRequestOptions, type FormulaResponse, type GetFilterOptions, type GoogleBasemap, type GroupByFeature, type GroupDateType, type H3QuerySourceOptions, type H3QuerySourceResponse, type H3TableSourceOptions, type H3TableSourceResponse, type H3TilesetSourceOptions, type H3TilesetSourceResponse, type HasFilterOptions, type HistogramRequestOptions, type HistogramResponse, type KeplerMapConfig, type Layer, type LayerDescriptor, type LayerType, type MapLibreBasemap, type MapType, type NamedQueryParameter, OPACITY_MAP, type ParseMapResult, type PositionalQueryParameter, Provider, type ProviderType, type QuadbinQuerySourceOptions, type QuadbinQuerySourceResponse, type QuadbinTableSourceOptions, type QuadbinTableSourceResponse, type QuadbinTilesetSourceOptions, type QuadbinTilesetSourceResponse, type QueryOptions, type QueryParameterValue, type QueryParameters, type QueryResult, type QuerySourceOptions, type RangeRequestOptions, type RangeResponse, type Raster, RasterBandColorinterp, type RasterBandType, type RasterMetadata, type RasterMetadataBand, type RasterMetadataBandStats, type RasterSourceOptions, type RasterTile, type RemoveFilterOptions, type SCALE_TYPE, SOURCE_DEFAULTS, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, type TableRequestOptions, type TableResponse, type TableSourceOptions, type Tile, type TileFeatureExtractOptions, type TileFeatures, type TileFeaturesSpatialIndexOptions, TileFormat, type TileResolution, type Tilejson, type TilejsonResult, type TilesetSourceOptions, type Tilestats, type TimeSeriesRequestOptions, type TimeSeriesResponse, type VectorLayer, type VectorQuerySourceOptions, type VectorQuerySourceResponse, type VectorTableSourceOptions, type VectorTableSourceResponse, type VectorTilesetSourceOptions, type VectorTilesetSourceResponse, type ViewState, type Viewport, WidgetQuerySource, type WidgetQuerySourceResult, WidgetRasterSource, type WidgetRasterSourceProps, type WidgetRasterSourceResult, WidgetRemoteSource, type WidgetRemoteSourceProps, WidgetSource, type WidgetSourceProps, WidgetTableSource, type WidgetTableSourceResult, WidgetTilesetSource, type WidgetTilesetSourceProps, type WidgetTilesetSourceResult, type _DataFilterExtensionProps, _buildFeatureFilter, domainFromValues as _domainFromValues, _getHexagonResolution, addFilter, aggregate, aggregationFunctions, applyFilters, applySorting, boundaryQuerySource, boundaryTableSource, buildBinaryFeatureFilter, buildPublicMapUrl, buildStatsUrl, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getClient, getColorAccessor, getColorValueAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getFilter, getIconUrlAccessor, getLayerProps, getMaxMarkerSize, getSizeAccessor, getSpatialIndexFromGeoColumn, getTextAccessor, groupValuesByColumn, groupValuesByDateColumn, h3QuerySource, h3TableSource, h3TilesetSource, hasFilter, histogram, makeIntervalComplete, negateAccessor, opacityToAlpha, parseMap, quadbinQuerySource, quadbinTableSource, quadbinTilesetSource, query, rasterSource, removeFilter, requestWithParameters, scaleAggregationResLevel, scatterPlot, setClient, tileFeatures, tileFeaturesGeometries, tileFeaturesSpatialIndex, transformToTileCoords, vectorQuerySource, vectorTableSource, vectorTilesetSource };
@@ -10950,6 +10950,16 @@ function isEmptyObject(object) {
10950
10950
  }
10951
10951
  var isObject2 = (x) => x !== null && typeof x === "object";
10952
10952
  var isPureObject = (x) => isObject2(x) && x.constructor === {}.constructor;
10953
+ function assignOptional(target, ...sources) {
10954
+ for (const source of sources) {
10955
+ for (const key in source) {
10956
+ if (source[key] !== void 0) {
10957
+ target[key] = source[key];
10958
+ }
10959
+ }
10960
+ }
10961
+ return target;
10962
+ }
10953
10963
 
10954
10964
  // src/filters/tileFeatures.ts
10955
10965
  function tileFeatures({
@@ -11272,7 +11282,6 @@ function excludeURLParameters(baseUrlString, parameters) {
11272
11282
  // src/sources/base-source.ts
11273
11283
  var SOURCE_DEFAULTS = {
11274
11284
  apiBaseUrl: DEFAULT_API_BASE_URL,
11275
- format: "tilejson",
11276
11285
  headers: {},
11277
11286
  maxLengthURL: DEFAULT_MAX_LENGTH_URL
11278
11287
  };
@@ -11291,7 +11300,7 @@ async function baseSource(endpoint, options, urlParameters) {
11291
11300
  }
11292
11301
  }
11293
11302
  const baseUrl = buildSourceUrl(mergedOptions);
11294
- const { clientId, maxLengthURL, format, localCache } = mergedOptions;
11303
+ const { clientId, maxLengthURL, localCache } = mergedOptions;
11295
11304
  const headers = {
11296
11305
  Authorization: `Bearer ${options.accessToken}`,
11297
11306
  ...options.headers
@@ -11311,7 +11320,7 @@ async function baseSource(endpoint, options, urlParameters) {
11311
11320
  maxLengthURL,
11312
11321
  localCache
11313
11322
  });
11314
- const dataUrl = mapInstantiation[format].url[0];
11323
+ const dataUrl = mapInstantiation.tilejson.url[0];
11315
11324
  if (cache) {
11316
11325
  cache.value = parseInt(
11317
11326
  new URL(dataUrl).searchParams.get("cache") || "",
@@ -11319,21 +11328,7 @@ async function baseSource(endpoint, options, urlParameters) {
11319
11328
  );
11320
11329
  }
11321
11330
  errorContext.requestType = "Map data";
11322
- if (format === "tilejson") {
11323
- const json = await requestWithParameters({
11324
- baseUrl: dataUrl,
11325
- parameters: { client: clientId },
11326
- headers,
11327
- errorContext,
11328
- maxLengthURL,
11329
- localCache
11330
- });
11331
- if (accessToken) {
11332
- json.accessToken = accessToken;
11333
- }
11334
- return json;
11335
- }
11336
- return await requestWithParameters({
11331
+ const json = await requestWithParameters({
11337
11332
  baseUrl: dataUrl,
11338
11333
  parameters: { client: clientId },
11339
11334
  headers,
@@ -11341,6 +11336,10 @@ async function baseSource(endpoint, options, urlParameters) {
11341
11336
  maxLengthURL,
11342
11337
  localCache
11343
11338
  });
11339
+ if (accessToken) {
11340
+ json.accessToken = accessToken;
11341
+ }
11342
+ return json;
11344
11343
  }
11345
11344
 
11346
11345
  // src/sources/boundary-query-source.ts
@@ -11365,11 +11364,7 @@ var boundaryQuerySource = async function(options) {
11365
11364
  if (queryParameters) {
11366
11365
  urlParameters.queryParameters = queryParameters;
11367
11366
  }
11368
- return baseSource(
11369
- "boundary",
11370
- options,
11371
- urlParameters
11372
- );
11367
+ return baseSource("boundary", options, urlParameters);
11373
11368
  };
11374
11369
 
11375
11370
  // src/sources/boundary-table-source.ts
@@ -11385,11 +11380,7 @@ var boundaryTableSource = async function(options) {
11385
11380
  if (filters) {
11386
11381
  urlParameters.filters = filters;
11387
11382
  }
11388
- return baseSource(
11389
- "boundary",
11390
- options,
11391
- urlParameters
11392
- );
11383
+ return baseSource("boundary", options, urlParameters);
11393
11384
  };
11394
11385
 
11395
11386
  // src/widget-sources/widget-source.ts
@@ -12485,8 +12476,7 @@ var WidgetTilesetSourceImpl = class extends WidgetSource {
12485
12476
  return;
12486
12477
  }
12487
12478
  this._features = tileFeatures({
12488
- ...this.props,
12489
- ...this._tileFeatureExtractOptions,
12479
+ ...assignOptional({}, this.props, this._tileFeatureExtractOptions),
12490
12480
  tiles: this._tiles,
12491
12481
  spatialFilter
12492
12482
  });
@@ -12639,6 +12629,9 @@ var WidgetTilesetSourceImpl = class extends WidgetSource {
12639
12629
  return { rows: [], totalCount: 0 };
12640
12630
  }
12641
12631
  if (searchFilterColumn && searchFilterText) {
12632
+ console.warn(
12633
+ 'WidgetTilesetSource: "searchFilterText" is deprecated, use "filters" and FilterType.STRING_SEARCH instead.'
12634
+ );
12642
12635
  filteredFeatures = filteredFeatures.filter(
12643
12636
  (row) => row[searchFilterColumn] && String(row[searchFilterColumn]).toLowerCase().includes(String(searchFilterText).toLowerCase())
12644
12637
  );
@@ -14436,7 +14429,7 @@ function parseMap(json) {
14436
14429
  const { keplerMapConfig, datasets, token } = json;
14437
14430
  assert2(keplerMapConfig.version === "v1", "Only support Kepler v1");
14438
14431
  const config2 = keplerMapConfig.config;
14439
- const { filters, mapState, mapStyle, popupSettings } = config2;
14432
+ const { filters, mapState, mapStyle, popupSettings, legendSettings } = config2;
14440
14433
  const { layers, layerBlending, interactionConfig } = config2.visState;
14441
14434
  return {
14442
14435
  id: json.id,
@@ -14448,6 +14441,7 @@ function parseMap(json) {
14448
14441
  /** @deprecated Use `basemap`. */
14449
14442
  mapStyle,
14450
14443
  popupSettings,
14444
+ legendSettings,
14451
14445
  token,
14452
14446
  layers: layers.reverse().map(({ id, type, config: config3, visualChannels }) => {
14453
14447
  try {
@@ -15393,6 +15387,7 @@ export {
15393
15387
  buildPublicMapUrl,
15394
15388
  buildStatsUrl,
15395
15389
  clearFilters,
15390
+ configureSource,
15396
15391
  createPolygonSpatialFilter,
15397
15392
  createViewportSpatialFilter,
15398
15393
  fetchBasemapProps,
@@ -15402,12 +15397,14 @@ export {
15402
15397
  getClient,
15403
15398
  getColorAccessor,
15404
15399
  getColorValueAccessor,
15400
+ getColumnNameFromGeoColumn,
15405
15401
  getDataFilterExtensionProps,
15406
15402
  getFilter,
15407
15403
  getIconUrlAccessor,
15408
15404
  getLayerProps,
15409
15405
  getMaxMarkerSize,
15410
15406
  getSizeAccessor,
15407
+ getSpatialIndexFromGeoColumn,
15411
15408
  getTextAccessor,
15412
15409
  groupValuesByColumn,
15413
15410
  groupValuesByDateColumn,
@@ -15427,6 +15424,7 @@ export {
15427
15424
  rasterSource,
15428
15425
  removeFilter,
15429
15426
  requestWithParameters,
15427
+ scaleAggregationResLevel,
15430
15428
  scatterPlot,
15431
15429
  setClient,
15432
15430
  tileFeatures,