@carto/api-client 0.5.2-alpha.0 → 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 +120 -12
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +20 -1
- package/build/api-client.d.ts +20 -1
- package/build/api-client.js +114 -12
- package/build/api-client.js.map +1 -1
- package/build/worker.js +28 -19
- package/build/worker.js.map +1 -1
- package/package.json +3 -2
- 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 +1 -1
- 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 +35 -0
- 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 +4 -4
- 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 +6 -5
- package/src/widget-sources/widget-tileset-source.ts +7 -7
package/build/worker.js
CHANGED
|
@@ -76,7 +76,23 @@ var require_thenBy_module = __commonJS({
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
+
// src/constants.ts
|
|
80
|
+
var FilterType = /* @__PURE__ */ ((FilterType2) => {
|
|
81
|
+
FilterType2["IN"] = "in";
|
|
82
|
+
FilterType2["BETWEEN"] = "between";
|
|
83
|
+
FilterType2["CLOSED_OPEN"] = "closed_open";
|
|
84
|
+
FilterType2["TIME"] = "time";
|
|
85
|
+
FilterType2["STRING_SEARCH"] = "stringSearch";
|
|
86
|
+
return FilterType2;
|
|
87
|
+
})(FilterType || {});
|
|
88
|
+
var DEFAULT_API_BASE_URL = "https://gcp-us-east1.api.carto.com";
|
|
89
|
+
var SpatialIndexColumn = Object.freeze({
|
|
90
|
+
["h3" /* H3 */]: ["h3", "hex", "h3id", "hex_id", "h3hex"],
|
|
91
|
+
["quadbin" /* QUADBIN */]: ["quadbin"]
|
|
92
|
+
});
|
|
93
|
+
|
|
79
94
|
// src/utils.ts
|
|
95
|
+
var FILTER_TYPES = new Set(Object.values(FilterType));
|
|
80
96
|
function assert(condition, message) {
|
|
81
97
|
if (!condition) {
|
|
82
98
|
throw new Error(message);
|
|
@@ -104,21 +120,6 @@ function assignOptional(target, ...sources) {
|
|
|
104
120
|
return target;
|
|
105
121
|
}
|
|
106
122
|
|
|
107
|
-
// src/constants.ts
|
|
108
|
-
var FilterType = /* @__PURE__ */ ((FilterType2) => {
|
|
109
|
-
FilterType2["IN"] = "in";
|
|
110
|
-
FilterType2["BETWEEN"] = "between";
|
|
111
|
-
FilterType2["CLOSED_OPEN"] = "closed_open";
|
|
112
|
-
FilterType2["TIME"] = "time";
|
|
113
|
-
FilterType2["STRING_SEARCH"] = "stringSearch";
|
|
114
|
-
return FilterType2;
|
|
115
|
-
})(FilterType || {});
|
|
116
|
-
var DEFAULT_API_BASE_URL = "https://gcp-us-east1.api.carto.com";
|
|
117
|
-
var SpatialIndexColumn = Object.freeze({
|
|
118
|
-
["h3" /* H3 */]: ["h3", "hex", "h3id", "hex_id", "h3hex"],
|
|
119
|
-
["quadbin" /* QUADBIN */]: ["quadbin"]
|
|
120
|
-
});
|
|
121
|
-
|
|
122
123
|
// src/utils/makeIntervalComplete.ts
|
|
123
124
|
function makeIntervalComplete(intervals) {
|
|
124
125
|
return intervals.map((val) => {
|
|
@@ -5530,7 +5531,11 @@ function min(values, keys, joinOperation) {
|
|
|
5530
5531
|
Infinity
|
|
5531
5532
|
);
|
|
5532
5533
|
}
|
|
5533
|
-
|
|
5534
|
+
let min2 = Number.POSITIVE_INFINITY;
|
|
5535
|
+
for (const value of values) {
|
|
5536
|
+
min2 = Math.min(min2, value);
|
|
5537
|
+
}
|
|
5538
|
+
return min2;
|
|
5534
5539
|
}
|
|
5535
5540
|
function max(values, keys, joinOperation) {
|
|
5536
5541
|
const normalizedKeys = normalizeKeys(keys);
|
|
@@ -5540,7 +5545,11 @@ function max(values, keys, joinOperation) {
|
|
|
5540
5545
|
-Infinity
|
|
5541
5546
|
);
|
|
5542
5547
|
}
|
|
5543
|
-
|
|
5548
|
+
let max2 = Number.NEGATIVE_INFINITY;
|
|
5549
|
+
for (const value of values) {
|
|
5550
|
+
max2 = Math.max(max2, value);
|
|
5551
|
+
}
|
|
5552
|
+
return max2;
|
|
5544
5553
|
}
|
|
5545
5554
|
function normalizeKeys(keys) {
|
|
5546
5555
|
return Array.isArray(keys) ? keys : typeof keys === "string" ? [keys] : void 0;
|
|
@@ -6131,8 +6140,8 @@ function booleanEqual(feature1, feature2, options = {}) {
|
|
|
6131
6140
|
}
|
|
6132
6141
|
|
|
6133
6142
|
// src/filters.ts
|
|
6134
|
-
var
|
|
6135
|
-
var isFilterType = (type) =>
|
|
6143
|
+
var FILTER_TYPES2 = new Set(Object.values(FilterType));
|
|
6144
|
+
var isFilterType = (type) => FILTER_TYPES2.has(type);
|
|
6136
6145
|
function getApplicableFilters(owner, filters) {
|
|
6137
6146
|
if (!filters) return {};
|
|
6138
6147
|
const applicableFilters = {};
|