@carto/api-client 0.5.0-alpha.16 → 0.5.0-alpha.17
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 +5319 -401
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.js +5222 -361
- package/build/api-client.js.map +1 -1
- package/build/worker.js +5157 -284
- package/build/worker.js.map +1 -1
- package/package.json +11 -10
- package/src/operations/applySorting.ts +1 -1
- package/src/widget-sources/widget-tileset-source.ts +1 -1
- package/src/vendor/thenby.ts +0 -83
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"homepage": "https://github.com/CartoDB/carto-api-client#readme",
|
|
9
9
|
"author": "Don McCurdy <donmccurdy@carto.com>",
|
|
10
10
|
"packageManager": "yarn@4.3.1",
|
|
11
|
-
"version": "0.5.0-alpha.
|
|
11
|
+
"version": "0.5.0-alpha.17",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
@@ -63,15 +63,6 @@
|
|
|
63
63
|
],
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@loaders.gl/schema": "^4.3.3",
|
|
66
|
-
"@turf/bbox-clip": "^7.2.0",
|
|
67
|
-
"@turf/bbox-polygon": "^7.2.0",
|
|
68
|
-
"@turf/boolean-equal": "^7.2.0",
|
|
69
|
-
"@turf/boolean-intersects": "^7.2.0",
|
|
70
|
-
"@turf/boolean-within": "^7.2.0",
|
|
71
|
-
"@turf/helpers": "^7.2.0",
|
|
72
|
-
"@turf/intersect": "^7.2.0",
|
|
73
|
-
"@turf/invariant": "^7.2.0",
|
|
74
|
-
"@turf/union": "^7.2.0",
|
|
75
66
|
"@types/geojson": "^7946.0.16",
|
|
76
67
|
"d3-format": "^3.1.0",
|
|
77
68
|
"d3-scale": "^4.0.2",
|
|
@@ -97,8 +88,17 @@
|
|
|
97
88
|
"@luma.gl/engine": "~9.1.5",
|
|
98
89
|
"@luma.gl/shadertools": "~9.1.5",
|
|
99
90
|
"@luma.gl/webgl": "~9.1.5",
|
|
91
|
+
"@turf/bbox-clip": "^7.2.0",
|
|
92
|
+
"@turf/bbox-polygon": "^7.2.0",
|
|
93
|
+
"@turf/boolean-equal": "^7.2.0",
|
|
94
|
+
"@turf/boolean-intersects": "^7.2.0",
|
|
95
|
+
"@turf/boolean-within": "^7.2.0",
|
|
100
96
|
"@turf/buffer": "^7.2.0",
|
|
97
|
+
"@turf/helpers": "^7.2.0",
|
|
98
|
+
"@turf/intersect": "^7.2.0",
|
|
99
|
+
"@turf/invariant": "^7.2.0",
|
|
101
100
|
"@turf/random": "^7.2.0",
|
|
101
|
+
"@turf/union": "^7.2.0",
|
|
102
102
|
"@types/d3-format": "^3.0.4",
|
|
103
103
|
"@types/d3-scale": "^4.0.9",
|
|
104
104
|
"@types/json-schema": "^7.0.15",
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
"resolve-package-path": "^4.0.3",
|
|
117
117
|
"rimraf": "^6.0.1",
|
|
118
118
|
"semver": "^7.7.1",
|
|
119
|
+
"thenby": "^1.3.4",
|
|
119
120
|
"tinybench": "^3.1.1",
|
|
120
121
|
"tsup": "^8.3.6",
|
|
121
122
|
"typescript": "~5.8.2",
|
package/src/vendor/thenby.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Copyright 2013 Teun Duynstee
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
// Modifications by Don McCurdy, for minimal TypeScript compatibility. Moved
|
|
18
|
-
// into 'vendor' to avoid CJS/ESM compatibility issues in Web Workers.
|
|
19
|
-
|
|
20
|
-
export const firstBy: any = (function () {
|
|
21
|
-
function identity(v: unknown) {
|
|
22
|
-
return v;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function ignoreCase(v: unknown) {
|
|
26
|
-
return typeof v === 'string' ? v.toLowerCase() : v;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
30
|
-
function makeCompareFunction(f: Function | string, opt: any) {
|
|
31
|
-
opt = typeof opt === 'object' ? opt : {direction: opt};
|
|
32
|
-
|
|
33
|
-
if (typeof f != 'function') {
|
|
34
|
-
const prop = f;
|
|
35
|
-
// make unary function
|
|
36
|
-
f = function (v1: Record<string, unknown>) {
|
|
37
|
-
return v1[prop] ? v1[prop] : '';
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
if (f.length === 1) {
|
|
41
|
-
// f is a unary function mapping a single item to its sort score
|
|
42
|
-
const uf = f;
|
|
43
|
-
const preprocess = opt.ignoreCase ? ignoreCase : identity;
|
|
44
|
-
const cmp =
|
|
45
|
-
opt.cmp ||
|
|
46
|
-
function (v1: number, v2: number) {
|
|
47
|
-
return v1 < v2 ? -1 : v1 > v2 ? 1 : 0;
|
|
48
|
-
};
|
|
49
|
-
f = function (v1: unknown, v2: unknown) {
|
|
50
|
-
return cmp(preprocess(uf(v1)), preprocess(uf(v2)));
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
const descTokens = {'-1': '', desc: ''};
|
|
54
|
-
if (opt.direction in descTokens)
|
|
55
|
-
return function (v1: unknown, v2: unknown) {
|
|
56
|
-
return -f(v1, v2);
|
|
57
|
-
};
|
|
58
|
-
return f;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* adds a secondary compare function to the target function (`this` context)
|
|
62
|
-
which is applied in case the first one returns 0 (equal)
|
|
63
|
-
returns a new compare function, which has a `thenBy` method as well */
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
65
|
-
function tb(func: Function, opt: any) {
|
|
66
|
-
/* should get value false for the first call. This can be done by calling the
|
|
67
|
-
exported function, or the firstBy property on it (for es6 module compatibility)
|
|
68
|
-
*/
|
|
69
|
-
// @ts-expect-error Allowing otherwise-unwanted pattern in third-party code.
|
|
70
|
-
const x = typeof this == 'function' && !this.firstBy ? this : false;
|
|
71
|
-
const y = makeCompareFunction(func, opt);
|
|
72
|
-
const f = x
|
|
73
|
-
? function (a: unknown, b: unknown) {
|
|
74
|
-
return x(a, b) || y(a, b);
|
|
75
|
-
}
|
|
76
|
-
: y;
|
|
77
|
-
// @ts-expect-error Allowing otherwise-unwanted pattern in third-party code.
|
|
78
|
-
f.thenBy = tb;
|
|
79
|
-
return f;
|
|
80
|
-
}
|
|
81
|
-
tb.firstBy = tb;
|
|
82
|
-
return tb;
|
|
83
|
-
})();
|