@carto/api-client 0.5.6-alpha.bundle.4 → 0.5.7-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/CHANGELOG.md +7 -0
- package/build/api-client.cjs +29 -18
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +15 -2
- package/build/api-client.d.ts +15 -2
- package/build/api-client.js +28 -18
- package/build/api-client.js.map +1 -1
- package/build/worker-compat.js +14 -6
- package/build/worker-compat.js.map +1 -1
- package/build/worker.js +14 -6
- package/build/worker.js.map +1 -1
- package/package.json +1 -1
- 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/types.ts +2 -0
- package/src/widget-sources/widget-remote-source.ts +7 -6
- package/src/widget-sources/widget-tileset-source-impl.ts +7 -6
package/build/worker-compat.js
CHANGED
|
@@ -98,6 +98,14 @@
|
|
|
98
98
|
["h3" /* H3 */]: ["h3", "hex", "h3id", "hex_id", "h3hex"],
|
|
99
99
|
["quadbin" /* QUADBIN */]: ["quadbin"]
|
|
100
100
|
});
|
|
101
|
+
var AggregationTypes = {
|
|
102
|
+
Count: "count",
|
|
103
|
+
Avg: "avg",
|
|
104
|
+
Min: "min",
|
|
105
|
+
Max: "max",
|
|
106
|
+
Sum: "sum",
|
|
107
|
+
Custom: "custom"
|
|
108
|
+
};
|
|
101
109
|
|
|
102
110
|
// src/utils.ts
|
|
103
111
|
var FILTER_TYPES = new Set(Object.values(FilterType));
|
|
@@ -19461,7 +19469,7 @@
|
|
|
19461
19469
|
}
|
|
19462
19470
|
async getFormula({
|
|
19463
19471
|
column = "*",
|
|
19464
|
-
operation: operation2 =
|
|
19472
|
+
operation: operation2 = AggregationTypes.Count,
|
|
19465
19473
|
joinOperation,
|
|
19466
19474
|
filters,
|
|
19467
19475
|
filterOwner,
|
|
@@ -19472,13 +19480,13 @@
|
|
|
19472
19480
|
filters,
|
|
19473
19481
|
filterOwner
|
|
19474
19482
|
);
|
|
19475
|
-
if (filteredFeatures.length === 0 && operation2 !==
|
|
19483
|
+
if (filteredFeatures.length === 0 && operation2 !== AggregationTypes.Count) {
|
|
19476
19484
|
return { value: null };
|
|
19477
19485
|
}
|
|
19478
|
-
if (operation2 ===
|
|
19486
|
+
if (operation2 === AggregationTypes.Custom) {
|
|
19479
19487
|
throw new Error("Custom aggregation not supported for tilesets");
|
|
19480
19488
|
}
|
|
19481
|
-
if (column && column !== "*" || operation2 !==
|
|
19489
|
+
if (column && column !== "*" || operation2 !== AggregationTypes.Count) {
|
|
19482
19490
|
assertColumn(this._features, column);
|
|
19483
19491
|
}
|
|
19484
19492
|
const targetOperation = aggregationFunctions[operation2];
|
|
@@ -19487,7 +19495,7 @@
|
|
|
19487
19495
|
};
|
|
19488
19496
|
}
|
|
19489
19497
|
async getHistogram({
|
|
19490
|
-
operation: operation2 =
|
|
19498
|
+
operation: operation2 = AggregationTypes.Count,
|
|
19491
19499
|
ticks,
|
|
19492
19500
|
column,
|
|
19493
19501
|
joinOperation,
|
|
@@ -19514,7 +19522,7 @@
|
|
|
19514
19522
|
}
|
|
19515
19523
|
async getCategories({
|
|
19516
19524
|
column,
|
|
19517
|
-
operation: operation2 =
|
|
19525
|
+
operation: operation2 = AggregationTypes.Count,
|
|
19518
19526
|
operationColumn,
|
|
19519
19527
|
joinOperation,
|
|
19520
19528
|
filters,
|