@carto/api-client 0.5.1 → 0.5.2-alpha.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/build/api-client.cjs +194 -84
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +28 -1
- package/build/api-client.d.ts +28 -1
- package/build/api-client.js +186 -83
- package/build/api-client.js.map +1 -1
- package/build/worker.js +30 -19
- package/build/worker.js.map +1 -1
- package/package.json +5 -3
- package/src/api/carto-api-error.ts +1 -1
- package/src/api/endpoints.ts +1 -1
- package/src/api/index.ts +2 -2
- package/src/api/query.ts +1 -1
- package/src/api/request-with-parameters.ts +2 -2
- package/src/deck/get-data-filter-extension-props.ts +3 -3
- package/src/fetch-map/basemap-styles.ts +2 -2
- package/src/fetch-map/basemap.ts +2 -2
- package/src/fetch-map/fetch-map.ts +3 -3
- package/src/fetch-map/layer-map.ts +81 -5
- package/src/fetch-map/parse-map.ts +71 -7
- package/src/fetch-map/source.ts +10 -10
- package/src/fetch-map/types.ts +7 -3
- package/src/filters/Filter.ts +4 -4
- package/src/filters/FilterTypes.ts +1 -1
- package/src/filters/geosjonFeatures.ts +3 -3
- package/src/filters/tileFeatures.ts +8 -3
- package/src/filters/tileFeaturesGeometries.ts +5 -5
- package/src/filters/tileFeaturesRaster.ts +3 -3
- package/src/filters/tileFeaturesSpatialIndex.ts +4 -4
- package/src/filters.ts +38 -3
- package/src/geo.ts +1 -1
- package/src/index.ts +3 -3
- package/src/models/model.ts +6 -3
- package/src/operations/aggregation.ts +14 -4
- package/src/operations/applySorting.ts +2 -2
- package/src/operations/groupBy.ts +2 -2
- package/src/operations/groupByDate.ts +2 -2
- package/src/operations/histogram.ts +2 -2
- package/src/operations/scatterPlot.ts +2 -2
- package/src/sources/base-source.ts +2 -2
- package/src/sources/boundary-query-source.ts +1 -1
- package/src/sources/h3-query-source.ts +1 -1
- package/src/sources/h3-table-source.ts +1 -1
- package/src/sources/h3-tileset-source.ts +1 -1
- package/src/sources/quadbin-query-source.ts +1 -1
- package/src/sources/quadbin-table-source.ts +1 -1
- package/src/sources/quadbin-tileset-source.ts +1 -1
- package/src/sources/raster-source.ts +1 -1
- package/src/sources/types.ts +2 -2
- package/src/sources/vector-query-source.ts +1 -1
- package/src/sources/vector-table-source.ts +1 -1
- package/src/sources/vector-tileset-source.ts +1 -1
- package/src/utils/getTileFormat.ts +1 -1
- package/src/utils/makeIntervalComplete.ts +1 -1
- package/src/utils/transformTileCoordsToWGS84.ts +1 -1
- package/src/utils/transformToTileCoords.ts +1 -1
- package/src/utils.ts +1 -1
- package/src/widget-sources/types.ts +5 -2
- package/src/widget-sources/widget-query-source.ts +4 -4
- package/src/widget-sources/widget-raster-source.ts +2 -2
- package/src/widget-sources/widget-remote-source.ts +6 -5
- package/src/widget-sources/widget-source.ts +3 -3
- package/src/widget-sources/widget-table-source.ts +4 -4
- package/src/widget-sources/widget-tileset-source-impl.ts +8 -11
- package/src/widget-sources/widget-tileset-source.ts +7 -7
package/build/worker.js
CHANGED
|
@@ -93,23 +93,6 @@ var SpatialIndexColumn = Object.freeze({
|
|
|
93
93
|
|
|
94
94
|
// src/utils.ts
|
|
95
95
|
var FILTER_TYPES = new Set(Object.values(FilterType));
|
|
96
|
-
var isFilterType = (type) => FILTER_TYPES.has(type);
|
|
97
|
-
function getApplicableFilters(owner, filters) {
|
|
98
|
-
if (!filters) return {};
|
|
99
|
-
const applicableFilters = {};
|
|
100
|
-
for (const column in filters) {
|
|
101
|
-
for (const type in filters[column]) {
|
|
102
|
-
if (!isFilterType(type)) continue;
|
|
103
|
-
const filter = filters[column][type];
|
|
104
|
-
const isApplicable = !owner || !filter?.owner || filter?.owner !== owner;
|
|
105
|
-
if (filter && isApplicable) {
|
|
106
|
-
applicableFilters[column] || (applicableFilters[column] = {});
|
|
107
|
-
applicableFilters[column][type] = filter;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return applicableFilters;
|
|
112
|
-
}
|
|
113
96
|
function assert(condition, message) {
|
|
114
97
|
if (!condition) {
|
|
115
98
|
throw new Error(message);
|
|
@@ -5548,7 +5531,11 @@ function min(values, keys, joinOperation) {
|
|
|
5548
5531
|
Infinity
|
|
5549
5532
|
);
|
|
5550
5533
|
}
|
|
5551
|
-
|
|
5534
|
+
let min2 = Number.POSITIVE_INFINITY;
|
|
5535
|
+
for (const value of values) {
|
|
5536
|
+
min2 = Math.min(min2, value);
|
|
5537
|
+
}
|
|
5538
|
+
return min2;
|
|
5552
5539
|
}
|
|
5553
5540
|
function max(values, keys, joinOperation) {
|
|
5554
5541
|
const normalizedKeys = normalizeKeys(keys);
|
|
@@ -5558,7 +5545,11 @@ function max(values, keys, joinOperation) {
|
|
|
5558
5545
|
-Infinity
|
|
5559
5546
|
);
|
|
5560
5547
|
}
|
|
5561
|
-
|
|
5548
|
+
let max2 = Number.NEGATIVE_INFINITY;
|
|
5549
|
+
for (const value of values) {
|
|
5550
|
+
max2 = Math.max(max2, value);
|
|
5551
|
+
}
|
|
5552
|
+
return max2;
|
|
5562
5553
|
}
|
|
5563
5554
|
function normalizeKeys(keys) {
|
|
5564
5555
|
return Array.isArray(keys) ? keys : typeof keys === "string" ? [keys] : void 0;
|
|
@@ -6148,6 +6139,26 @@ function booleanEqual(feature1, feature2, options = {}) {
|
|
|
6148
6139
|
});
|
|
6149
6140
|
}
|
|
6150
6141
|
|
|
6142
|
+
// src/filters.ts
|
|
6143
|
+
var FILTER_TYPES2 = new Set(Object.values(FilterType));
|
|
6144
|
+
var isFilterType = (type) => FILTER_TYPES2.has(type);
|
|
6145
|
+
function getApplicableFilters(owner, filters) {
|
|
6146
|
+
if (!filters) return {};
|
|
6147
|
+
const applicableFilters = {};
|
|
6148
|
+
for (const column in filters) {
|
|
6149
|
+
for (const type in filters[column]) {
|
|
6150
|
+
if (!isFilterType(type)) continue;
|
|
6151
|
+
const filter = filters[column][type];
|
|
6152
|
+
const isApplicable = !owner || !filter?.owner || filter?.owner !== owner;
|
|
6153
|
+
if (filter && isApplicable) {
|
|
6154
|
+
applicableFilters[column] || (applicableFilters[column] = {});
|
|
6155
|
+
applicableFilters[column][type] = filter;
|
|
6156
|
+
}
|
|
6157
|
+
}
|
|
6158
|
+
}
|
|
6159
|
+
return applicableFilters;
|
|
6160
|
+
}
|
|
6161
|
+
|
|
6151
6162
|
// src/widget-sources/widget-tileset-source-impl.ts
|
|
6152
6163
|
var WidgetTilesetSourceImpl = class extends WidgetSource {
|
|
6153
6164
|
constructor() {
|