@carto/api-client 0.5.10-alpha.PR193.4 → 0.5.11
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 +4 -0
- package/build/api-client.cjs +23 -34
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +11 -18
- package/build/api-client.d.ts +11 -18
- package/build/api-client.js +23 -34
- package/build/api-client.js.map +1 -1
- package/build/worker-compat.js +9 -6
- package/build/worker-compat.js.map +1 -1
- package/build/worker.js +9 -6
- package/build/worker.js.map +1 -1
- package/package.json +1 -1
- package/src/api/query.ts +2 -19
- package/src/api/request-with-parameters.ts +5 -10
- package/src/models/model.ts +0 -3
- package/src/operations/groupBy.ts +14 -6
- package/src/sources/base-source.ts +1 -1
- package/src/sources/types.ts +10 -5
- package/src/widget-sources/types.ts +5 -1
- package/src/widget-sources/widget-remote-source.ts +0 -1
package/build/worker-compat.js
CHANGED
|
@@ -20115,17 +20115,20 @@
|
|
|
20115
20115
|
function getSorter(orderBy) {
|
|
20116
20116
|
switch (orderBy) {
|
|
20117
20117
|
case "frequency_asc":
|
|
20118
|
-
return (a, b) => a.value - b.value ||
|
|
20118
|
+
return (a, b) => a.value - b.value || nameCompare(a.name, b.name);
|
|
20119
20119
|
case "frequency_desc":
|
|
20120
|
-
return (a, b) => b.value - a.value ||
|
|
20120
|
+
return (a, b) => b.value - a.value || nameCompare(a.name, b.name);
|
|
20121
20121
|
case "alphabetical_asc":
|
|
20122
|
-
return (a, b) =>
|
|
20122
|
+
return (a, b) => nameCompare(a.name, b.name) || b.value - a.value;
|
|
20123
20123
|
case "alphabetical_desc":
|
|
20124
|
-
return (a, b) =>
|
|
20124
|
+
return (a, b) => nameCompare(b.name, a.name) || b.value - a.value;
|
|
20125
20125
|
}
|
|
20126
20126
|
}
|
|
20127
|
-
function
|
|
20128
|
-
|
|
20127
|
+
function nameCompare(a, b) {
|
|
20128
|
+
if (typeof a === "number" && typeof b === "number") {
|
|
20129
|
+
return a - b;
|
|
20130
|
+
}
|
|
20131
|
+
return String(a ?? "null").localeCompare(String(b ?? "null"));
|
|
20129
20132
|
}
|
|
20130
20133
|
|
|
20131
20134
|
// src/utils/dateUtils.ts
|