@carto/api-client 0.5.6-alpha.bundle.3 → 0.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/build/api-client.cjs +26 -17
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +13 -2
- package/build/api-client.d.ts +13 -2
- package/build/api-client.js +25 -17
- package/build/api-client.js.map +1 -1
- package/build/worker-compat.d.ts +2 -0
- package/build/{worker.global.js → worker-compat.js} +15 -7
- package/build/worker-compat.js.map +1 -0
- package/build/worker.js +14 -6
- package/build/worker.js.map +1 -1
- package/package.json +3 -3
- package/src/constants.ts +12 -0
- package/src/fetch-map/layer-map.ts +2 -1
- package/src/types.ts +1 -1
- package/src/widget-sources/widget-remote-source.ts +5 -5
- package/src/widget-sources/widget-tileset-source-impl.ts +7 -6
- package/src/widget-sources/widget-tileset-source.ts +2 -3
- package/build/worker.global.js.map +0 -1
package/build/api-client.d.cts
CHANGED
|
@@ -72,6 +72,17 @@ declare const SpatialIndexColumn: Readonly<{
|
|
|
72
72
|
h3: string[];
|
|
73
73
|
quadbin: string[];
|
|
74
74
|
}>;
|
|
75
|
+
/**
|
|
76
|
+
* Enum like container for all types of aggregations available for widgets.
|
|
77
|
+
*/
|
|
78
|
+
declare const AggregationTypes: {
|
|
79
|
+
readonly Count: "count";
|
|
80
|
+
readonly Avg: "avg";
|
|
81
|
+
readonly Min: "min";
|
|
82
|
+
readonly Max: "max";
|
|
83
|
+
readonly Sum: "sum";
|
|
84
|
+
readonly Custom: "custom";
|
|
85
|
+
};
|
|
75
86
|
|
|
76
87
|
/******************************************************************************
|
|
77
88
|
* MAP INSTANTIATION
|
|
@@ -160,7 +171,7 @@ type Raster = {
|
|
|
160
171
|
* AGGREGATION
|
|
161
172
|
*/
|
|
162
173
|
/**
|
|
163
|
-
* Enum for the different types of aggregations available for widgets.
|
|
174
|
+
* Enum type for the different types of aggregations available for widgets.
|
|
164
175
|
*
|
|
165
176
|
* @privateRemarks Source: @carto/constants
|
|
166
177
|
* @privateRemarks Converted from enum to type union, for improved declarative API.
|
|
@@ -1892,4 +1903,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
|
|
|
1892
1903
|
*/
|
|
1893
1904
|
declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
|
|
1894
1905
|
|
|
1895
|
-
export { 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, type D3Scale, 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, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, 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, calculateClusterRadius, calculateClusterTextFontSize, clearDefaultRequestCache, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, 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 };
|
|
1906
|
+
export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, 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, type D3Scale, 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, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, 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, calculateClusterRadius, calculateClusterTextFontSize, clearDefaultRequestCache, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, 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 };
|
package/build/api-client.d.ts
CHANGED
|
@@ -72,6 +72,17 @@ declare const SpatialIndexColumn: Readonly<{
|
|
|
72
72
|
h3: string[];
|
|
73
73
|
quadbin: string[];
|
|
74
74
|
}>;
|
|
75
|
+
/**
|
|
76
|
+
* Enum like container for all types of aggregations available for widgets.
|
|
77
|
+
*/
|
|
78
|
+
declare const AggregationTypes: {
|
|
79
|
+
readonly Count: "count";
|
|
80
|
+
readonly Avg: "avg";
|
|
81
|
+
readonly Min: "min";
|
|
82
|
+
readonly Max: "max";
|
|
83
|
+
readonly Sum: "sum";
|
|
84
|
+
readonly Custom: "custom";
|
|
85
|
+
};
|
|
75
86
|
|
|
76
87
|
/******************************************************************************
|
|
77
88
|
* MAP INSTANTIATION
|
|
@@ -160,7 +171,7 @@ type Raster = {
|
|
|
160
171
|
* AGGREGATION
|
|
161
172
|
*/
|
|
162
173
|
/**
|
|
163
|
-
* Enum for the different types of aggregations available for widgets.
|
|
174
|
+
* Enum type for the different types of aggregations available for widgets.
|
|
164
175
|
*
|
|
165
176
|
* @privateRemarks Source: @carto/constants
|
|
166
177
|
* @privateRemarks Converted from enum to type union, for improved declarative API.
|
|
@@ -1892,4 +1903,4 @@ declare function getColumnNameFromGeoColumn(geoColumn: string | null | undefined
|
|
|
1892
1903
|
*/
|
|
1893
1904
|
declare function getSpatialIndexFromGeoColumn(geoColumn: string): SpatialIndex | null;
|
|
1894
1905
|
|
|
1895
|
-
export { 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, type D3Scale, 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, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, 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, calculateClusterRadius, calculateClusterTextFontSize, clearDefaultRequestCache, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, 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 };
|
|
1906
|
+
export { type APIErrorContext, type APIRequestType, type AddFilterOptions, type AggregationFunction, type AggregationType, AggregationTypes, 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, type D3Scale, 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, SOURCE_DEFAULTS, type Scale, type ScaleKey, type ScaleType, type ScatterPlotFeature, type ScatterRequestOptions, type ScatterResponse, type SchemaField, SchemaFieldType, type SortColumnType, type SortDirection, type SourceOptionalOptions, type SourceOptions, type SourceRequiredOptions, type SpatialDataType, type SpatialFilter, type SpatialFilterPolyfillMode, SpatialIndex, SpatialIndexColumn, type SpatialIndexTile, type StringSearchOptions, TEXT_LABEL_INDEX, TEXT_NUMBER_FORMATTER, TEXT_OUTLINE_OPACITY, 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, calculateClusterRadius, calculateClusterTextFontSize, clearDefaultRequestCache, clearFilters, configureSource, createPolygonSpatialFilter, createViewportSpatialFilter, fetchBasemapProps, fetchMap, filterFunctions, geojsonFeatures, getApplicableFilters, getClient, getColorAccessor, getColumnNameFromGeoColumn, getDataFilterExtensionProps, getDefaultAggregationExpColumnAliasForLayerType, 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 };
|
package/build/api-client.js
CHANGED
|
@@ -94,11 +94,11 @@ var FilterType = /* @__PURE__ */ ((FilterType2) => {
|
|
|
94
94
|
FilterType2["STRING_SEARCH"] = "stringSearch";
|
|
95
95
|
return FilterType2;
|
|
96
96
|
})(FilterType || {});
|
|
97
|
-
var ApiVersion = /* @__PURE__ */ ((
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return
|
|
97
|
+
var ApiVersion = /* @__PURE__ */ ((ApiVersion3) => {
|
|
98
|
+
ApiVersion3["V1"] = "v1";
|
|
99
|
+
ApiVersion3["V2"] = "v2";
|
|
100
|
+
ApiVersion3["V3"] = "v3";
|
|
101
|
+
return ApiVersion3;
|
|
102
102
|
})(ApiVersion || {});
|
|
103
103
|
var DEFAULT_API_BASE_URL = "https://gcp-us-east1.api.carto.com";
|
|
104
104
|
var TileFormat = /* @__PURE__ */ ((TileFormat2) => {
|
|
@@ -126,6 +126,14 @@ var SpatialIndexColumn = Object.freeze({
|
|
|
126
126
|
["h3" /* H3 */]: ["h3", "hex", "h3id", "hex_id", "h3hex"],
|
|
127
127
|
["quadbin" /* QUADBIN */]: ["quadbin"]
|
|
128
128
|
});
|
|
129
|
+
var AggregationTypes = {
|
|
130
|
+
Count: "count",
|
|
131
|
+
Avg: "avg",
|
|
132
|
+
Min: "min",
|
|
133
|
+
Max: "max",
|
|
134
|
+
Sum: "sum",
|
|
135
|
+
Custom: "custom"
|
|
136
|
+
};
|
|
129
137
|
|
|
130
138
|
// src/utils/makeIntervalComplete.ts
|
|
131
139
|
function makeIntervalComplete(intervals) {
|
|
@@ -6264,7 +6272,7 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6264
6272
|
...params
|
|
6265
6273
|
} = options;
|
|
6266
6274
|
const { column, operation: operation2, operationColumn, operationExp } = params;
|
|
6267
|
-
if (operation2 ===
|
|
6275
|
+
if (operation2 === AggregationTypes.Custom) {
|
|
6268
6276
|
assert2(operationExp, "operationExp is required for custom operation");
|
|
6269
6277
|
}
|
|
6270
6278
|
return executeModel({
|
|
@@ -6323,7 +6331,7 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6323
6331
|
...params
|
|
6324
6332
|
} = options;
|
|
6325
6333
|
const { column, operation: operation2 } = params;
|
|
6326
|
-
if (operation2 ===
|
|
6334
|
+
if (operation2 === AggregationTypes.Custom) {
|
|
6327
6335
|
assert2(operationExp, "operationExp is required for custom operation");
|
|
6328
6336
|
}
|
|
6329
6337
|
return executeModel({
|
|
@@ -6335,7 +6343,7 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6335
6343
|
},
|
|
6336
6344
|
params: {
|
|
6337
6345
|
column: column ?? "*",
|
|
6338
|
-
operation: operation2 ??
|
|
6346
|
+
operation: operation2 ?? AggregationTypes.Count,
|
|
6339
6347
|
operationExp
|
|
6340
6348
|
},
|
|
6341
6349
|
opts: { signal, headers: this.props.headers }
|
|
@@ -6471,7 +6479,7 @@ var WidgetRemoteSource = class extends WidgetSource {
|
|
|
6471
6479
|
splitByCategoryLimit,
|
|
6472
6480
|
splitByCategoryValues
|
|
6473
6481
|
} = params;
|
|
6474
|
-
if (operation2 ===
|
|
6482
|
+
if (operation2 === AggregationTypes.Custom) {
|
|
6475
6483
|
assert2(operationExp, "operationExp is required for custom operation");
|
|
6476
6484
|
}
|
|
6477
6485
|
return executeModel({
|
|
@@ -7203,7 +7211,7 @@ var WidgetTilesetSourceImpl = class extends WidgetSource {
|
|
|
7203
7211
|
}
|
|
7204
7212
|
async getFormula({
|
|
7205
7213
|
column = "*",
|
|
7206
|
-
operation: operation2 =
|
|
7214
|
+
operation: operation2 = AggregationTypes.Count,
|
|
7207
7215
|
joinOperation,
|
|
7208
7216
|
filters,
|
|
7209
7217
|
filterOwner,
|
|
@@ -7214,13 +7222,13 @@ var WidgetTilesetSourceImpl = class extends WidgetSource {
|
|
|
7214
7222
|
filters,
|
|
7215
7223
|
filterOwner
|
|
7216
7224
|
);
|
|
7217
|
-
if (filteredFeatures.length === 0 && operation2 !==
|
|
7225
|
+
if (filteredFeatures.length === 0 && operation2 !== AggregationTypes.Count) {
|
|
7218
7226
|
return { value: null };
|
|
7219
7227
|
}
|
|
7220
|
-
if (operation2 ===
|
|
7228
|
+
if (operation2 === AggregationTypes.Custom) {
|
|
7221
7229
|
throw new Error("Custom aggregation not supported for tilesets");
|
|
7222
7230
|
}
|
|
7223
|
-
if (column && column !== "*" || operation2 !==
|
|
7231
|
+
if (column && column !== "*" || operation2 !== AggregationTypes.Count) {
|
|
7224
7232
|
assertColumn(this._features, column);
|
|
7225
7233
|
}
|
|
7226
7234
|
const targetOperation = aggregationFunctions[operation2];
|
|
@@ -7229,7 +7237,7 @@ var WidgetTilesetSourceImpl = class extends WidgetSource {
|
|
|
7229
7237
|
};
|
|
7230
7238
|
}
|
|
7231
7239
|
async getHistogram({
|
|
7232
|
-
operation: operation2 =
|
|
7240
|
+
operation: operation2 = AggregationTypes.Count,
|
|
7233
7241
|
ticks,
|
|
7234
7242
|
column,
|
|
7235
7243
|
joinOperation,
|
|
@@ -7256,7 +7264,7 @@ var WidgetTilesetSourceImpl = class extends WidgetSource {
|
|
|
7256
7264
|
}
|
|
7257
7265
|
async getCategories({
|
|
7258
7266
|
column,
|
|
7259
|
-
operation: operation2 =
|
|
7267
|
+
operation: operation2 = AggregationTypes.Count,
|
|
7260
7268
|
operationColumn,
|
|
7261
7269
|
joinOperation,
|
|
7262
7270
|
filters,
|
|
@@ -7469,7 +7477,6 @@ var WidgetTilesetSource = class extends WidgetSource {
|
|
|
7469
7477
|
}
|
|
7470
7478
|
if (this.props.widgetWorkerUrl) {
|
|
7471
7479
|
this._workerImpl = new Worker(this.props.widgetWorkerUrl, {
|
|
7472
|
-
// type: 'module',
|
|
7473
7480
|
name: "cartowidgettileset"
|
|
7474
7481
|
});
|
|
7475
7482
|
} else {
|
|
@@ -8977,7 +8984,7 @@ function negateAccessor(accessor) {
|
|
|
8977
8984
|
function getSizeAccessor({ name }, scaleType, aggregation, range, data) {
|
|
8978
8985
|
const scale2 = scaleType ? SCALE_FUNCS[scaleType]() : identity2;
|
|
8979
8986
|
if (scaleType) {
|
|
8980
|
-
if (aggregation !==
|
|
8987
|
+
if (aggregation !== AggregationTypes.Count) {
|
|
8981
8988
|
scale2.domain(calculateDomain(data, name, scaleType));
|
|
8982
8989
|
}
|
|
8983
8990
|
scale2.range(range);
|
|
@@ -9957,6 +9964,7 @@ function _getHexagonResolution(viewport, tileSize) {
|
|
|
9957
9964
|
);
|
|
9958
9965
|
}
|
|
9959
9966
|
export {
|
|
9967
|
+
AggregationTypes,
|
|
9960
9968
|
ApiVersion,
|
|
9961
9969
|
basemap_styles_default as BASEMAP,
|
|
9962
9970
|
CartoAPIError,
|